From 4057330f8b9cf34d63e766dc904ca2b96b9db13d Mon Sep 17 00:00:00 2001 From: thejackshelton Date: Tue, 16 Apr 2024 21:47:30 -0500 Subject: [PATCH 1/2] refactor: modal improve scroll lock tests --- .../headless/modal/examples/portalled.tsx | 33 +++++ .../headless/modal/examples/scroll-lock.tsx | 2 +- package.json | 3 + .../src/components/modal/modal.test.ts | 28 +--- pnpm-lock.yaml | 140 ++---------------- 5 files changed, 57 insertions(+), 149 deletions(-) create mode 100644 apps/website/src/routes/docs/headless/modal/examples/portalled.tsx diff --git a/apps/website/src/routes/docs/headless/modal/examples/portalled.tsx b/apps/website/src/routes/docs/headless/modal/examples/portalled.tsx new file mode 100644 index 000000000..48d9f0664 --- /dev/null +++ b/apps/website/src/routes/docs/headless/modal/examples/portalled.tsx @@ -0,0 +1,33 @@ +import { component$, useSignal, useStyles$, useVisibleTask$ } from '@builder.io/qwik'; +import { Modal } from '@qwik-ui/headless'; +import styles from '../snippets/modal.css?inline'; +import flatpickr from 'flatpickr'; +import datePickerStyles from 'flatpickr/dist/flatpickr.min.css?inline'; + +export default component$(() => { + useStyles$(styles); + useStyles$(datePickerStyles); + const pickerTriggerRef = useSignal(); + const isOpen = useSignal(false); + + useVisibleTask$(() => { + if (pickerTriggerRef.value) { + flatpickr(pickerTriggerRef.value); + } + }); + + return ( + <> + + + + + + ); +}); diff --git a/apps/website/src/routes/docs/headless/modal/examples/scroll-lock.tsx b/apps/website/src/routes/docs/headless/modal/examples/scroll-lock.tsx index 75b76dd5d..242029f79 100644 --- a/apps/website/src/routes/docs/headless/modal/examples/scroll-lock.tsx +++ b/apps/website/src/routes/docs/headless/modal/examples/scroll-lock.tsx @@ -7,7 +7,7 @@ export default component$(() => { const isOpen = useSignal(false); return ( -
+
diff --git a/package.json b/package.json index a52dc333c..3bff447d5 100644 --- a/package.json +++ b/package.json @@ -182,5 +182,8 @@ ], "nx": { "includedScripts": [] + }, + "dependencies": { + "flatpickr": "4.6.13" } } diff --git a/packages/kit-headless/src/components/modal/modal.test.ts b/packages/kit-headless/src/components/modal/modal.test.ts index dda6d9b79..d9c1ce475 100644 --- a/packages/kit-headless/src/components/modal/modal.test.ts +++ b/packages/kit-headless/src/components/modal/modal.test.ts @@ -69,21 +69,11 @@ test.describe('Scroll locking', () => { THEN the body should have overflow hidden`, async ({ page }) => { const { driver: d } = await setup(page, 'scroll-lock'); - expect( - await page.evaluate(() => { - const { overflow } = getComputedStyle(document.body); - return overflow === 'hidden'; - }), - ).toBe(false); + await expect(page.locator('body')).toHaveCSS('overflow', 'visible'); await d.openModal(); - expect( - await page.evaluate(() => { - const { overflow } = getComputedStyle(document.body); - return overflow === 'hidden'; - }), - ).toBe(true); + await expect(page.locator('body')).toHaveCSS('overflow', 'hidden'); }); test(`GIVEN an open modal that has overflow hidden on the body @@ -100,22 +90,12 @@ test.describe('Scroll locking', () => { await d.openModal(); - expect( - await page.evaluate(() => { - const { overflow } = getComputedStyle(document.body); - return overflow === 'hidden'; - }), - ).toBe(true); + await expect(page.locator('body')).toHaveCSS('overflow', 'hidden'); await d.getTrigger().press('Escape'); await expect(d.getModal()).toBeHidden(); - expect( - await page.evaluate(() => { - const { overflow } = getComputedStyle(document.body); - return overflow === 'hidden'; - }), - ).toBe(false); + await expect(page.locator('body')).toHaveCSS('overflow', 'visible'); }); test(`GIVEN two open modals, one nested inside the other diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 286f4f405..fea5c3654 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,10 @@ settings: importers: .: + dependencies: + flatpickr: + specifier: 4.6.13 + version: 4.6.13 devDependencies: '@axe-core/playwright': specifier: 4.8.5 @@ -424,13 +428,13 @@ importers: dependencies: '@builder.io/qwik': specifier: ^1.4.0 - version: 1.4.0(undici@5.28.2) + version: 1.4.0(@types/node@20.11.20)(sass@1.69.7)(undici@5.28.2) packages/kit-styled: dependencies: '@builder.io/qwik': specifier: ^1.1.0 - version: 1.4.0(undici@5.28.2) + version: 1.4.0(@types/node@20.11.20)(sass@1.69.7)(undici@5.28.2) devDependencies: '@qwik-ui/headless': specifier: 0.3.6 @@ -1872,7 +1876,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /@builder.io/qwik@1.4.0(undici@5.28.2): + /@builder.io/qwik@1.4.0(@types/node@20.11.20)(sass@1.69.7)(undici@5.28.2): resolution: {integrity: sha512-IZc7Mt7GLuBUWatWmagdocTfPJPCEHUraTiPMebkz0XFjLikM4Kb/M2bcd1C8zqyZfj+fYHB4z6+qlcn0sKLyQ==} engines: {node: '>=16.8.0 <18.0.0 || >=18.11'} hasBin: true @@ -1881,7 +1885,7 @@ packages: dependencies: csstype: 3.1.3 undici: 5.28.2 - vite: 5.1.3 + vite: 5.1.3(@types/node@20.11.20)(sass@1.69.7) transitivePeerDependencies: - '@types/node' - less @@ -4539,17 +4543,6 @@ packages: - debug dev: true - /@nrwl/tao@17.1.3: - resolution: {integrity: sha512-9YpfEkUpVqOweqgQvMDcWApNx4jhCqBNH5IByZj302Enp3TLnQSvhuX5Dfr8hNQRQokIpEn6tW8SGTctTM5LXw==} - hasBin: true - dependencies: - nx: 17.1.3 - tslib: 2.6.2 - transitivePeerDependencies: - - '@swc-node/register' - - '@swc/core' - - debug - /@nrwl/tao@17.1.3(@swc-node/register@1.6.8)(@swc/core@1.3.103): resolution: {integrity: sha512-9YpfEkUpVqOweqgQvMDcWApNx4jhCqBNH5IByZj302Enp3TLnQSvhuX5Dfr8hNQRQokIpEn6tW8SGTctTM5LXw==} hasBin: true @@ -4560,7 +4553,6 @@ packages: - '@swc-node/register' - '@swc/core' - debug - dev: true /@nrwl/tao@17.2.3(@swc-node/register@1.6.8)(@swc/core@1.3.103): resolution: {integrity: sha512-tbSgRw/Yda+5XAt2swhZv37f8YqWEa0Qn8lch+BhHZmRq4EamG1wUKNF+YjQH51RFODmaB/U0gU6ZBehNMe++A==} @@ -4734,7 +4726,7 @@ packages: ejs: 3.1.9 enquirer: 2.3.6 ignore: 5.3.0 - nx: 17.1.3 + nx: 17.1.3(@swc-node/register@1.6.8)(@swc/core@1.3.103) semver: 7.5.3 tmp: 0.2.1 tslib: 2.6.2 @@ -8152,7 +8144,6 @@ packages: dependencies: '@swc/core': 1.3.103 '@swc/types': 0.1.5 - dev: true /@swc-node/register@1.6.8(@swc/core@1.3.103)(@swc/types@0.1.5)(typescript@5.3.3): resolution: {integrity: sha512-74ijy7J9CWr1Z88yO+ykXphV29giCrSpANQPQRooE0bObpkTO1g4RzQovIfbIaniBiGDDVsYwDoQ3FIrCE8HcQ==} @@ -8171,14 +8162,12 @@ packages: transitivePeerDependencies: - '@swc/types' - supports-color - dev: true /@swc-node/sourcemap-support@0.3.0: resolution: {integrity: sha512-gqBJSmJMWomZFxlppaKea7NeAqFrDrrS0RMt24No92M3nJWcyI9YKGEQKl+EyJqZ5gh6w1s0cTklMHMzRwA1NA==} dependencies: source-map-support: 0.5.21 tslib: 2.6.2 - dev: true /@swc/core-darwin-arm64@1.3.103: resolution: {integrity: sha512-Dqqz48mvdm/3PHPPA6YeAEofkF9H5Krgqd/baPf0dXcarzng6U9Ilv2aCtDjq7dfI9jfkVCW5zuwq98PE2GEdw==} @@ -8186,7 +8175,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-darwin-x64@1.3.103: @@ -8195,7 +8183,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm-gnueabihf@1.3.103: @@ -8204,7 +8191,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-gnu@1.3.103: @@ -8213,7 +8199,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-musl@1.3.103: @@ -8222,7 +8207,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-gnu@1.3.103: @@ -8231,7 +8215,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-musl@1.3.103: @@ -8240,7 +8223,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-win32-arm64-msvc@1.3.103: @@ -8249,7 +8231,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-ia32-msvc@1.3.103: @@ -8258,7 +8239,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-x64-msvc@1.3.103: @@ -8267,7 +8247,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core@1.3.103: @@ -8293,11 +8272,9 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.103 '@swc/core-win32-ia32-msvc': 1.3.103 '@swc/core-win32-x64-msvc': 1.3.103 - dev: true /@swc/counter@0.1.2: resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} - dev: true /@swc/helpers@0.5.3: resolution: {integrity: sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A==} @@ -8318,7 +8295,6 @@ packages: /@swc/types@0.1.5: resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} - dev: true /@szmarczak/http-timer@4.0.6: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} @@ -8720,7 +8696,6 @@ packages: resolution: {integrity: sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==} dependencies: undici-types: 5.26.5 - dev: true /@types/node@20.5.1: resolution: {integrity: sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==} @@ -9903,7 +9878,6 @@ packages: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - dev: true /apache-md5@1.1.8: resolution: {integrity: sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==} @@ -10405,7 +10379,6 @@ packages: /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - dev: true /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -10495,7 +10468,6 @@ packages: engines: {node: '>=8'} dependencies: fill-range: 7.0.1 - dev: true /breakword@1.0.6: resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} @@ -10547,7 +10519,6 @@ packages: /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -10834,7 +10805,6 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 - dev: true /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -11060,7 +11030,6 @@ packages: /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - dev: true /colors@1.2.5: resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} @@ -11940,7 +11909,6 @@ packages: dependencies: ms: 2.1.2 supports-color: 8.1.1 - dev: true /decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} @@ -13335,7 +13303,6 @@ packages: engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 - dev: true /filter-obj@1.1.0: resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} @@ -13481,6 +13448,10 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + /flatpickr@4.6.13: + resolution: {integrity: sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==} + dev: false + /flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true @@ -13832,7 +13803,6 @@ packages: engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 - dev: true /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} @@ -14453,7 +14423,6 @@ packages: /immutable@4.3.4: resolution: {integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==} - dev: true /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} @@ -14708,7 +14677,6 @@ packages: engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 - dev: true /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} @@ -14770,7 +14738,6 @@ packages: /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - dev: true /is-fullwidth-code-point@1.0.0: resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} @@ -14805,7 +14772,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 - dev: true /is-gzip@1.0.0: resolution: {integrity: sha512-rcfALRIb1YewtnksfRIHGcIY93QnK8BIQ/2c9yDYcG/Y6+vRoJuTWBmmSEbyLLYtXm7q35pHOHbZFQBaLrhlWQ==} @@ -14882,7 +14848,6 @@ packages: /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - dev: true /is-obj@2.0.0: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} @@ -17680,7 +17645,6 @@ packages: /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -17894,7 +17858,6 @@ packages: /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - dev: true /normalize-range@0.1.2: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} @@ -18078,68 +18041,6 @@ packages: - debug dev: true - /nx@17.1.3: - resolution: {integrity: sha512-6LYoTt01nS1d/dvvYtRs+pEAMQmUVsd2fr/a8+X1cDjWrb8wsf1O3DwlBTqKOXOazpS3eOr0Ukc9N1svbu7uXA==} - hasBin: true - requiresBuild: true - peerDependencies: - '@swc-node/register': ^1.6.7 - '@swc/core': ^1.3.85 - peerDependenciesMeta: - '@swc-node/register': - optional: true - '@swc/core': - optional: true - dependencies: - '@nrwl/tao': 17.1.3 - '@yarnpkg/lockfile': 1.1.0 - '@yarnpkg/parsers': 3.0.0-rc.46 - '@zkochan/js-yaml': 0.0.6 - axios: 1.6.5 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.6.1 - cliui: 8.0.1 - dotenv: 16.3.1 - dotenv-expand: 10.0.0 - enquirer: 2.3.6 - figures: 3.2.0 - flat: 5.0.2 - fs-extra: 11.2.0 - glob: 7.1.4 - ignore: 5.3.0 - jest-diff: 29.7.0 - js-yaml: 4.1.0 - jsonc-parser: 3.2.0 - lines-and-columns: 2.0.4 - minimatch: 3.0.5 - node-machine-id: 1.1.12 - npm-run-path: 4.0.1 - open: 8.4.2 - semver: 7.5.3 - string-width: 4.2.3 - strong-log-transformer: 2.1.0 - tar-stream: 2.2.0 - tmp: 0.2.1 - tsconfig-paths: 4.2.0 - tslib: 2.6.2 - v8-compile-cache: 2.3.0 - yargs: 17.7.2 - yargs-parser: 21.1.1 - optionalDependencies: - '@nx/nx-darwin-arm64': 17.1.3 - '@nx/nx-darwin-x64': 17.1.3 - '@nx/nx-freebsd-x64': 17.1.3 - '@nx/nx-linux-arm-gnueabihf': 17.1.3 - '@nx/nx-linux-arm64-gnu': 17.1.3 - '@nx/nx-linux-arm64-musl': 17.1.3 - '@nx/nx-linux-x64-gnu': 17.1.3 - '@nx/nx-linux-x64-musl': 17.1.3 - '@nx/nx-win32-arm64-msvc': 17.1.3 - '@nx/nx-win32-x64-msvc': 17.1.3 - transitivePeerDependencies: - - debug - /nx@17.1.3(@swc-node/register@1.6.8)(@swc/core@1.3.103): resolution: {integrity: sha512-6LYoTt01nS1d/dvvYtRs+pEAMQmUVsd2fr/a8+X1cDjWrb8wsf1O3DwlBTqKOXOazpS3eOr0Ukc9N1svbu7uXA==} hasBin: true @@ -18203,7 +18104,6 @@ packages: '@nx/nx-win32-x64-msvc': 17.1.3 transitivePeerDependencies: - debug - dev: true /nx@17.2.3(@swc-node/register@1.6.8)(@swc/core@1.3.103): resolution: {integrity: sha512-B/d8VCs/i5Ho5c42pZSleqUWsohYBN0iy4zRyGLA2Vl0qG2c4Q8z8NHVO1PFJ5qZmH3xKHN0Ziu6q1JGmmA14Q==} @@ -18910,7 +18810,6 @@ packages: /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: true /picomatch@3.0.1: resolution: {integrity: sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==} @@ -18979,7 +18878,6 @@ packages: /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} - dev: true /pkg-dir@3.0.0: resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} @@ -19748,7 +19646,6 @@ packages: engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 - dev: true /readline-sync@1.4.10: resolution: {integrity: sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==} @@ -20246,7 +20143,6 @@ packages: chokidar: 3.5.3 immutable: 4.3.4 source-map-js: 1.0.2 - dev: true /saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} @@ -20590,12 +20486,10 @@ packages: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - dev: true /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - dev: true /source-map@0.7.4: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} @@ -21045,7 +20939,6 @@ packages: engines: {node: '>=10'} dependencies: has-flag: 4.0.0 - dev: true /supports-hyperlinks@1.0.1: resolution: {integrity: sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==} @@ -21381,7 +21274,6 @@ packages: engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 - dev: true /tocbot@4.25.0: resolution: {integrity: sha512-kE5wyCQJ40hqUaRVkyQ4z5+4juzYsv/eK+aqD97N62YH0TxFhzJvo22RUQQZdO3YnXAk42ZOfOpjVdy+Z0YokA==} @@ -21855,7 +21747,6 @@ packages: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true - dev: true /ufo@1.3.2: resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} @@ -21880,7 +21771,6 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true /undici@5.28.2: resolution: {integrity: sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==} @@ -22516,7 +22406,7 @@ packages: fsevents: 2.3.3 dev: true - /vite@5.1.3: + /vite@5.1.3(@types/node@20.11.20)(sass@1.69.7): resolution: {integrity: sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -22544,9 +22434,11 @@ packages: terser: optional: true dependencies: + '@types/node': 20.11.20 esbuild: 0.19.11 postcss: 8.4.35 rollup: 4.9.5 + sass: 1.69.7 optionalDependencies: fsevents: 2.3.3 dev: false From 81f5c4352acb9a545d5b1f3bbf110c1b9da8b265 Mon Sep 17 00:00:00 2001 From: thejackshelton Date: Tue, 16 Apr 2024 23:29:18 -0500 Subject: [PATCH 2/2] removed portal stuff --- .../headless/modal/examples/portalled.tsx | 33 ------------------- package.json | 3 -- pnpm-lock.yaml | 8 ----- 3 files changed, 44 deletions(-) delete mode 100644 apps/website/src/routes/docs/headless/modal/examples/portalled.tsx diff --git a/apps/website/src/routes/docs/headless/modal/examples/portalled.tsx b/apps/website/src/routes/docs/headless/modal/examples/portalled.tsx deleted file mode 100644 index 48d9f0664..000000000 --- a/apps/website/src/routes/docs/headless/modal/examples/portalled.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { component$, useSignal, useStyles$, useVisibleTask$ } from '@builder.io/qwik'; -import { Modal } from '@qwik-ui/headless'; -import styles from '../snippets/modal.css?inline'; -import flatpickr from 'flatpickr'; -import datePickerStyles from 'flatpickr/dist/flatpickr.min.css?inline'; - -export default component$(() => { - useStyles$(styles); - useStyles$(datePickerStyles); - const pickerTriggerRef = useSignal(); - const isOpen = useSignal(false); - - useVisibleTask$(() => { - if (pickerTriggerRef.value) { - flatpickr(pickerTriggerRef.value); - } - }); - - return ( - <> - - - - - - ); -}); diff --git a/package.json b/package.json index 3bff447d5..a52dc333c 100644 --- a/package.json +++ b/package.json @@ -182,8 +182,5 @@ ], "nx": { "includedScripts": [] - }, - "dependencies": { - "flatpickr": "4.6.13" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fea5c3654..06e9a8c5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,10 +7,6 @@ settings: importers: .: - dependencies: - flatpickr: - specifier: 4.6.13 - version: 4.6.13 devDependencies: '@axe-core/playwright': specifier: 4.8.5 @@ -13448,10 +13444,6 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - /flatpickr@4.6.13: - resolution: {integrity: sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==} - dev: false - /flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true