From 933f776471d0515bf412df5296a154c2cb02b7f2 Mon Sep 17 00:00:00 2001 From: gioboa Date: Sun, 19 Feb 2023 14:28:03 +0100 Subject: [PATCH 1/3] fix: add missing devDependency --- package.json | 1 + pnpm-lock.yaml | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7053c1e4f..0a669a688 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@commitlint/config-conventional": "^17.4.3", "@cypress/code-coverage": "3.10.0", "@cypress/vite-dev-server": "^2.2.1", + "@floating-ui/dom": "1.0.10", "@jscutlery/semver": "^2.30.1", "@nrwl/cli": "15.7.1", "@nrwl/cypress": "15.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e31aff86b..111ae0d4c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,6 +10,7 @@ importers: '@commitlint/config-conventional': ^17.4.3 '@cypress/code-coverage': 3.10.0 '@cypress/vite-dev-server': ^2.2.1 + '@floating-ui/dom': 1.0.10 '@jscutlery/semver': ^2.30.1 '@nrwl/cli': 15.7.1 '@nrwl/cypress': 15.7.1 @@ -79,6 +80,7 @@ importers: '@commitlint/config-conventional': 17.4.3 '@cypress/code-coverage': 3.10.0_cypress@12.6.0 '@cypress/vite-dev-server': 2.2.3_vite@4.1.1 + '@floating-ui/dom': 1.0.10 '@jscutlery/semver': 2.30.1 '@nrwl/cli': 15.7.1 '@nrwl/cypress': 15.7.1_e7uv62xnxll7mv6d3ezs3pvjny @@ -141,9 +143,6 @@ importers: apps/website: specifiers: {} - apps/website_old: - specifiers: {} - packages/daisy: specifiers: {} @@ -2721,7 +2720,6 @@ packages: { integrity: sha512-LSqwPZkK3rYfD7GKoIeExXOyYx6Q1O4iqZWwIehDNuv3Dv425FIAE8PRwtAx1imEolFTHgBEcoFHm9MDnYgPCg==, } - dev: false /@floating-ui/dom/1.0.10: resolution: @@ -2730,7 +2728,6 @@ packages: } dependencies: '@floating-ui/core': 1.2.1 - dev: false /@humanwhocodes/config-array/0.11.8: resolution: From 740b70f21670bb00089fed2785e261a7e5afc276 Mon Sep 17 00:00:00 2001 From: gioboa Date: Sun, 19 Feb 2023 14:28:41 +0100 Subject: [PATCH 2/3] chore: fix className --> class --- .../src/routes/docs/headless/rating/index.tsx | 2 +- .../daisy/src/components/rating/rating.tsx | 52 +++++++++---------- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/apps/website/src/routes/docs/headless/rating/index.tsx b/apps/website/src/routes/docs/headless/rating/index.tsx index cb6744533..df769d768 100644 --- a/apps/website/src/routes/docs/headless/rating/index.tsx +++ b/apps/website/src/routes/docs/headless/rating/index.tsx @@ -28,7 +28,7 @@ export default component$(() => { export const MyStarIcon = component$(() => <>💩); export const MyHeartIcon = component$(() => ( -
♥️
+
♥️
)); export const MyComponentIcon = component$(() => (
diff --git a/packages/daisy/src/components/rating/rating.tsx b/packages/daisy/src/components/rating/rating.tsx index 52f02d768..d77d57b99 100644 --- a/packages/daisy/src/components/rating/rating.tsx +++ b/packages/daisy/src/components/rating/rating.tsx @@ -1,43 +1,39 @@ -import { component$, createContext, useContext, useContextProvider, useStore, useStyles$ } from '@builder.io/qwik'; import { - Rating as HeadlessRating, RatingProps, -} from '@qwik-ui/headless'; + component$, + createContext, + useContext, + useContextProvider, + useStore, + useStyles$, +} from '@builder.io/qwik'; +import { Rating as HeadlessRating, RatingProps } from '@qwik-ui/headless'; import styles from './rating.css?inline'; - export type DaisyRatingProps = { /** * Daisy Custom mask * https://daisyui.com/components/mask/ */ mask?: string; -} & RatingProps +} & RatingProps; export const ContextService = createContext<{ mask: string }>('my-context'); -export const Rating = component$( - (props: DaisyRatingProps) => { - useStyles$(styles) - const { mask = 'mask-star bg-yellow-500', ...rest } = props; - - const state = useStore({ mask }); - useContextProvider(ContextService, state); - - return ( -
- -
- ); - } -); +export const Rating = component$((props: DaisyRatingProps) => { + useStyles$(styles); + const { mask = 'mask-star bg-yellow-500', ...rest } = props; + const state = useStore({ mask }); + useContextProvider(ContextService, state); -export const DaisyIcon = component$( - () => { - const state = useContext(ContextService); - return
- }) + return ( +
+ +
+ ); +}); +export const DaisyIcon = component$(() => { + const state = useContext(ContextService); + return
; +}); From 51c9220315d7e7328bfedec235087d79a7194fe0 Mon Sep 17 00:00:00 2001 From: gioboa Date: Sun, 19 Feb 2023 14:32:59 +0100 Subject: [PATCH 3/3] docs: fix run library command --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5efb5a42c..83b9fe447 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ git checkout -b my-fix-branch main - From the root of the project run `pnpm install`. -- Then run `pnpm run dev --workspace=apps/website`. +- Then run `npx nx@latest serve website`. - Visit the URL printed in the console and you'll have a page opened with the suite of widgets.