diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index b785d9fbe..f5639770d 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -25,4 +25,4 @@ jobs: uses: atls/shared/.github/workflows/checks.yaml@master permissions: write-all with: - installPlaywright: true + installPlaywright: false diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 561d7a297..63f2ad1bd 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -18,4 +18,3 @@ jobs: clientId: ${{ vars.ATLANTIS_SUPER_BOT_CLIENT_ID }} secrets: appPrivateKey: ${{ secrets.ATLANTIS_SUPER_BOT_PRIVATE_KEY }} - npmAuthToken: ${{ secrets.NPM_TOKEN }} diff --git a/.pnp.cjs b/.pnp.cjs index eb6c820a1..bc6bf6831 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -256,7 +256,7 @@ const RAW_RUNTIME_STATE = ["@atls-ui-generators/utils", ["workspace:generators/utils"]],\ ["@atls-ui-parts/autocomplete", ["workspace:ui-parts/autocomplete"]],\ ["@atls-ui-parts/avatar", ["workspace:ui-parts/avatar"]],\ - ["@atls-ui-parts/button", ["virtual:90c3fa37a29dbddd012ae896ef9d136c46ca1d320faf1baf430439ab5aac7e1e7c8ef5281a72424df8d016a8c33c9d5ffe66ee23d2face19f27de3042508900f#workspace:ui-parts/button", "workspace:ui-parts/button"]],\ + ["@atls-ui-parts/button", ["virtual:90c3fa37a29dbddd012ae896ef9d136c46ca1d320faf1baf430439ab5aac7e1e7c8ef5281a72424df8d016a8c33c9d5ffe66ee23d2face19f27de3042508900f#workspace:ui-parts/button", "virtual:fddaadc76cf131c6c2f5b94374251d81423b248e5230476b3fd502df2449cc0d0367da628b38720e7d2b419bfefd7235e5e9212b749d829a823032fdfe48bb9f#workspace:ui-parts/button", "workspace:ui-parts/button"]],\ ["@atls-ui-parts/card", ["workspace:ui-parts/card"]],\ ["@atls-ui-parts/carousel", ["workspace:ui-parts/carousel"]],\ ["@atls-ui-parts/checkbox", ["workspace:ui-parts/checkbox"]],\ @@ -266,7 +266,7 @@ const RAW_RUNTIME_STATE = ["@atls-ui-parts/design", ["workspace:ui-parts/design"]],\ ["@atls-ui-parts/dom", ["virtual:b378c3744940a7b99c67abdb39dc737773a80c0cc25dff9c1c69af815451ed8f73418ff7e0686ab1125f5a97f0715093ece934285ed0996c6ab9e33426941881#workspace:ui-parts/dom", "workspace:ui-parts/dom"]],\ ["@atls-ui-parts/events-state", ["workspace:ui-parts/events-state"]],\ - ["@atls-ui-parts/icons", ["virtual:37630b2bec7c75945c5b76e78d0446ab9f7dea61653ed06d66ebccae59680f97824953d09a69ffd1833f9761b6d2aa0b6aceadeff024107a86da32f8c288dba9#workspace:ui-parts/icons", "virtual:8480592f2ac0c5b00b17bd33d76d0c6d79665a3657c712c5bc5180464a86ac9bcb81d64ef54341b94b31e43db66a2fad906cfc6036c573c170560d657b7f96aa#workspace:ui-parts/icons", "workspace:ui-parts/icons"]],\ + ["@atls-ui-parts/icons", ["virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/icons", "virtual:8480592f2ac0c5b00b17bd33d76d0c6d79665a3657c712c5bc5180464a86ac9bcb81d64ef54341b94b31e43db66a2fad906cfc6036c573c170560d657b7f96aa#workspace:ui-parts/icons", "workspace:ui-parts/icons"]],\ ["@atls-ui-parts/image", ["virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/image", "workspace:ui-parts/image"]],\ ["@atls-ui-parts/input", ["virtual:e8b379d238bee0c446fdeaddb9725553fcee91eeb8db9f1f4b47e4e36a5c6c26c07ae1861b7d0a5dd574863bc008f048d25fc793392ceeaade0c9801b921d418#workspace:ui-parts/input", "workspace:ui-parts/input"]],\ ["@atls-ui-parts/layout", ["virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/layout", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#workspace:ui-parts/layout", "virtual:ba0336f2ccf109a54b4b8063d4801935b554fc6f958edd172cb3c73a5a5a49118f16d1cd01b286a3749f851b3f37efaad86c3ceef598318c20b6e7cbecad90d2#workspace:ui-parts/layout", "workspace:ui-parts/layout"]],\ @@ -277,7 +277,7 @@ const RAW_RUNTIME_STATE = ["@atls-ui-parts/parallax", ["workspace:ui-parts/parallax"]],\ ["@atls-ui-parts/popover", ["workspace:ui-parts/popover"]],\ ["@atls-ui-parts/portal", ["workspace:ui-parts/portal"]],\ - ["@atls-ui-parts/progress", ["virtual:144bd10b47610de450c041ff553326fefe11958aedc1da4a2a09dafd48e073b7fc7fd88c35623eafbf7d353919a302f576bfc9d4dea4795b88e73d2fea0dc288#workspace:ui-parts/progress", "workspace:ui-parts/progress"]],\ + ["@atls-ui-parts/progress", ["virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/progress", "virtual:144bd10b47610de450c041ff553326fefe11958aedc1da4a2a09dafd48e073b7fc7fd88c35623eafbf7d353919a302f576bfc9d4dea4795b88e73d2fea0dc288#workspace:ui-parts/progress", "workspace:ui-parts/progress"]],\ ["@atls-ui-parts/scalable-content", ["workspace:ui-parts/scalable-content"]],\ ["@atls-ui-parts/select", ["workspace:ui-parts/select"]],\ ["@atls-ui-parts/sidebar", ["workspace:ui-parts/sidebar"]],\ @@ -304,7 +304,6 @@ const RAW_RUNTIME_STATE = "packageLocation": "./",\ "packageDependencies": [\ ["@atls/raijin", "npm:2.1.1"],\ - ["@playwright/test", "npm:1.63.0"],\ ["@types/aria-query", "npm:5.0.4"],\ ["@types/chai", "npm:5.2.3"],\ ["@types/geojson", "npm:7946.0.16"],\ @@ -960,6 +959,38 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["virtual:fddaadc76cf131c6c2f5b94374251d81423b248e5230476b3fd502df2449cc0d0367da628b38720e7d2b419bfefd7235e5e9212b749d829a823032fdfe48bb9f#workspace:ui-parts/button", {\ + "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-button-virtual-9f1376d515/1/ui-parts/button/",\ + "packageDependencies": [\ + ["@atls-ui-parts/button", "virtual:fddaadc76cf131c6c2f5b94374251d81423b248e5230476b3fd502df2449cc0d0367da628b38720e7d2b419bfefd7235e5e9212b749d829a823032fdfe48bb9f#workspace:ui-parts/button"],\ + ["@atls-ui-parts/layout", "virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/layout"],\ + ["@atls-ui-parts/theme", "virtual:6e3d13d4bb141546c851eafb803659d9bef8a8a4b826ab761e48399dcbf8cda80227a38097da69531ddae63c1380c43a5fad649d9ff8e485d2bc4c96720b9bd0#workspace:ui-parts/theme"],\ + ["@atls-ui/theme", "workspace:ui/theme"],\ + ["@storybook/react", "virtual:5d5a2d83c74dbbb6a29a65ad5d9fce09aed4258bbc7c7bef7d0ae41fe2cbed3efa30eb23487731e7ba540c2485008f2e2cdc8aa4b98cd0d0d6df800a358cdf39#patch:@storybook/react@npm%3A10.4.6#~/.yarn/patches/@storybook-react-npm-10.4.6-574597d2a0.patch::version=10.4.6&hash=1496cc"],\ + ["@types/react", "npm:19.1.2"],\ + ["@types/react-dom", "virtual:5f86f1a5332e16c95a81a0110273983bf84bc321937a52639ecb2d1dbbe0c50b67b565e7d70a5b80d6aa73617eed1d997fb59c909e6a58a6745c2bfb79f9b253#npm:19.1.2"],\ + ["@types/vanilla-extract__css", null],\ + ["@types/vanilla-extract__dynamic", null],\ + ["@vanilla-extract/css", "npm:1.17.1"],\ + ["@vanilla-extract/dynamic", "npm:2.1.2"],\ + ["clsx", "npm:2.1.1"],\ + ["rainbow-sprinkles", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:1.0.0"],\ + ["react", "npm:19.1.0"],\ + ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"],\ + ["storybook", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:10.4.6"],\ + ["typescript", "patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5"]\ + ],\ + "packagePeers": [\ + "@types/react-dom",\ + "@types/vanilla-extract__css",\ + "@types/vanilla-extract__dynamic",\ + "@vanilla-extract/css",\ + "@vanilla-extract/dynamic",\ + "react-dom",\ + "react"\ + ],\ + "linkType": "SOFT"\ + }],\ ["workspace:ui-parts/button", {\ "packageLocation": "./ui-parts/button/",\ "packageDependencies": [\ @@ -1260,10 +1291,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@atls-ui-parts/icons", [\ - ["virtual:37630b2bec7c75945c5b76e78d0446ab9f7dea61653ed06d66ebccae59680f97824953d09a69ffd1833f9761b6d2aa0b6aceadeff024107a86da32f8c288dba9#workspace:ui-parts/icons", {\ - "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-icons-virtual-0cb95a149b/1/ui-parts/icons/",\ + ["virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/icons", {\ + "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-icons-virtual-86639232d9/1/ui-parts/icons/",\ "packageDependencies": [\ - ["@atls-ui-parts/icons", "virtual:37630b2bec7c75945c5b76e78d0446ab9f7dea61653ed06d66ebccae59680f97824953d09a69ffd1833f9761b6d2aa0b6aceadeff024107a86da32f8c288dba9#workspace:ui-parts/icons"],\ + ["@atls-ui-parts/icons", "virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/icons"],\ ["@types/react", "npm:19.1.2"],\ ["@types/react-dom", "virtual:5f86f1a5332e16c95a81a0110273983bf84bc321937a52639ecb2d1dbbe0c50b67b565e7d70a5b80d6aa73617eed1d997fb59c909e6a58a6745c2bfb79f9b253#npm:19.1.2"],\ ["react", "npm:19.1.0"],\ @@ -1310,7 +1341,12 @@ const RAW_RUNTIME_STATE = ["virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/image", {\ "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-image-virtual-10644da7cf/1/ui-parts/image/",\ "packageDependencies": [\ + ["@atls-ui-parts/icons", "virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/icons"],\ ["@atls-ui-parts/image", "virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/image"],\ + ["@atls-ui-parts/progress", "virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/progress"],\ + ["@atls-ui-parts/theme", "virtual:6e3d13d4bb141546c851eafb803659d9bef8a8a4b826ab761e48399dcbf8cda80227a38097da69531ddae63c1380c43a5fad649d9ff8e485d2bc4c96720b9bd0#workspace:ui-parts/theme"],\ + ["@atls-ui/theme", "workspace:ui/theme"],\ + ["@storybook/react", "virtual:5d5a2d83c74dbbb6a29a65ad5d9fce09aed4258bbc7c7bef7d0ae41fe2cbed3efa30eb23487731e7ba540c2485008f2e2cdc8aa4b98cd0d0d6df800a358cdf39#patch:@storybook/react@npm%3A10.4.6#~/.yarn/patches/@storybook-react-npm-10.4.6-574597d2a0.patch::version=10.4.6&hash=1496cc"],\ ["@types/react", "npm:19.1.2"],\ ["@types/react-dom", "virtual:5f86f1a5332e16c95a81a0110273983bf84bc321937a52639ecb2d1dbbe0c50b67b565e7d70a5b80d6aa73617eed1d997fb59c909e6a58a6745c2bfb79f9b253#npm:19.1.2"],\ ["@types/vanilla-extract__css", null],\ @@ -1318,9 +1354,10 @@ const RAW_RUNTIME_STATE = ["@vanilla-extract/css", "npm:1.17.1"],\ ["@vanilla-extract/dynamic", "npm:2.1.2"],\ ["clsx", "npm:2.1.1"],\ - ["rainbow-sprinkles", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:1.0.0"],\ ["react", "npm:19.1.0"],\ - ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"]\ + ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"],\ + ["storybook", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:10.4.6"],\ + ["typescript", "patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5"]\ ],\ "packagePeers": [\ "@types/react-dom",\ @@ -1336,12 +1373,20 @@ const RAW_RUNTIME_STATE = ["workspace:ui-parts/image", {\ "packageLocation": "./ui-parts/image/",\ "packageDependencies": [\ + ["@atls-ui-parts/icons", "virtual:8480592f2ac0c5b00b17bd33d76d0c6d79665a3657c712c5bc5180464a86ac9bcb81d64ef54341b94b31e43db66a2fad906cfc6036c573c170560d657b7f96aa#workspace:ui-parts/icons"],\ ["@atls-ui-parts/image", "workspace:ui-parts/image"],\ + ["@atls-ui-parts/progress", "virtual:144bd10b47610de450c041ff553326fefe11958aedc1da4a2a09dafd48e073b7fc7fd88c35623eafbf7d353919a302f576bfc9d4dea4795b88e73d2fea0dc288#workspace:ui-parts/progress"],\ + ["@atls-ui-parts/theme", "virtual:6e3d13d4bb141546c851eafb803659d9bef8a8a4b826ab761e48399dcbf8cda80227a38097da69531ddae63c1380c43a5fad649d9ff8e485d2bc4c96720b9bd0#workspace:ui-parts/theme"],\ + ["@atls-ui/theme", "workspace:ui/theme"],\ + ["@storybook/react", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#patch:@storybook/react@npm%3A10.4.6#~/.yarn/patches/@storybook-react-npm-10.4.6-574597d2a0.patch::version=10.4.6&hash=1496cc"],\ ["@types/react", "npm:19.1.2"],\ ["@vanilla-extract/css", "npm:1.17.1"],\ ["@vanilla-extract/dynamic", "npm:2.1.2"],\ ["clsx", "npm:2.1.1"],\ - ["rainbow-sprinkles", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:1.0.0"]\ + ["react", "npm:19.1.0"],\ + ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"],\ + ["storybook", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:10.4.6"],\ + ["typescript", "patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5"]\ ],\ "linkType": "SOFT"\ }]\ @@ -1502,7 +1547,7 @@ const RAW_RUNTIME_STATE = ["virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/link", {\ "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-link-virtual-37630b2bec/1/ui-parts/link/",\ "packageDependencies": [\ - ["@atls-ui-parts/icons", "virtual:37630b2bec7c75945c5b76e78d0446ab9f7dea61653ed06d66ebccae59680f97824953d09a69ffd1833f9761b6d2aa0b6aceadeff024107a86da32f8c288dba9#workspace:ui-parts/icons"],\ + ["@atls-ui-parts/icons", "virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/icons"],\ ["@atls-ui-parts/link", "virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/link"],\ ["@atls-ui-parts/theme", "virtual:6e3d13d4bb141546c851eafb803659d9bef8a8a4b826ab761e48399dcbf8cda80227a38097da69531ddae63c1380c43a5fad649d9ff8e485d2bc4c96720b9bd0#workspace:ui-parts/theme"],\ ["@atls-ui/theme", "workspace:ui/theme"],\ @@ -1661,6 +1706,39 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@atls-ui-parts/progress", [\ + ["virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/progress", {\ + "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-progress-virtual-fddaadc76c/1/ui-parts/progress/",\ + "packageDependencies": [\ + ["@atls-ui-parts/button", "virtual:fddaadc76cf131c6c2f5b94374251d81423b248e5230476b3fd502df2449cc0d0367da628b38720e7d2b419bfefd7235e5e9212b749d829a823032fdfe48bb9f#workspace:ui-parts/button"],\ + ["@atls-ui-parts/layout", "virtual:5dae0025774218e7d5b25f9293624b65d07c18a455c0543b6b0cbcc49eab1f8daaf93f688033cd0934a58e64a6421749d3e30955e506415c50f4612545e60177#workspace:ui-parts/layout"],\ + ["@atls-ui-parts/progress", "virtual:10644da7cfec7698f38071843c6ab31167ef451db4b30e149c262e1ef7e895442319533d42afd5f4433beb7cc1bc7902c2bfb61caac3807b277394304e034a4d#workspace:ui-parts/progress"],\ + ["@atls-ui-parts/theme", "virtual:6e3d13d4bb141546c851eafb803659d9bef8a8a4b826ab761e48399dcbf8cda80227a38097da69531ddae63c1380c43a5fad649d9ff8e485d2bc4c96720b9bd0#workspace:ui-parts/theme"],\ + ["@atls-ui/theme", "workspace:ui/theme"],\ + ["@storybook/react", "virtual:5d5a2d83c74dbbb6a29a65ad5d9fce09aed4258bbc7c7bef7d0ae41fe2cbed3efa30eb23487731e7ba540c2485008f2e2cdc8aa4b98cd0d0d6df800a358cdf39#patch:@storybook/react@npm%3A10.4.6#~/.yarn/patches/@storybook-react-npm-10.4.6-574597d2a0.patch::version=10.4.6&hash=1496cc"],\ + ["@types/react", "npm:19.1.2"],\ + ["@types/react-dom", "virtual:5f86f1a5332e16c95a81a0110273983bf84bc321937a52639ecb2d1dbbe0c50b67b565e7d70a5b80d6aa73617eed1d997fb59c909e6a58a6745c2bfb79f9b253#npm:19.1.2"],\ + ["@types/vanilla-extract__css", null],\ + ["@types/vanilla-extract__dynamic", null],\ + ["@vanilla-extract/css", "npm:1.17.1"],\ + ["@vanilla-extract/dynamic", "npm:2.1.2"],\ + ["clsx", "npm:2.1.1"],\ + ["rainbow-sprinkles", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:1.0.0"],\ + ["react", "npm:19.1.0"],\ + ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"],\ + ["storybook", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:10.4.6"],\ + ["typescript", "patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5"]\ + ],\ + "packagePeers": [\ + "@types/react-dom",\ + "@types/vanilla-extract__css",\ + "@types/vanilla-extract__dynamic",\ + "@vanilla-extract/css",\ + "@vanilla-extract/dynamic",\ + "react-dom",\ + "react"\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:144bd10b47610de450c041ff553326fefe11958aedc1da4a2a09dafd48e073b7fc7fd88c35623eafbf7d353919a302f576bfc9d4dea4795b88e73d2fea0dc288#workspace:ui-parts/progress", {\ "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-progress-virtual-0144ba8a3f/1/ui-parts/progress/",\ "packageDependencies": [\ @@ -1939,12 +2017,9 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/__virtual__/@atls-ui-parts-text-transform-virtual-d3f7af9d87/1/ui-parts/text-transform/",\ "packageDependencies": [\ ["@atls-ui-parts/text-transform", "virtual:144bd10b47610de450c041ff553326fefe11958aedc1da4a2a09dafd48e073b7fc7fd88c35623eafbf7d353919a302f576bfc9d4dea4795b88e73d2fea0dc288#workspace:ui-parts/text-transform"],\ - ["@playwright/test", "npm:1.63.0"],\ - ["@types/http-server", "npm:0.12.4"],\ ["@types/node", "npm:25.9.3"],\ ["@types/react", "npm:19.1.2"],\ ["@types/react-dom", "virtual:5f86f1a5332e16c95a81a0110273983bf84bc321937a52639ecb2d1dbbe0c50b67b565e7d70a5b80d6aa73617eed1d997fb59c909e6a58a6745c2bfb79f9b253#npm:19.1.2"],\ - ["http-server", "npm:14.1.1"],\ ["react", "npm:19.1.0"],\ ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"]\ ],\ @@ -1958,12 +2033,9 @@ const RAW_RUNTIME_STATE = "packageLocation": "./ui-parts/text-transform/",\ "packageDependencies": [\ ["@atls-ui-parts/text-transform", "workspace:ui-parts/text-transform"],\ - ["@playwright/test", "npm:1.63.0"],\ - ["@types/http-server", "npm:0.12.4"],\ ["@types/node", "npm:25.9.3"],\ ["@types/react", "npm:19.1.2"],\ ["@types/react-dom", "virtual:5f86f1a5332e16c95a81a0110273983bf84bc321937a52639ecb2d1dbbe0c50b67b565e7d70a5b80d6aa73617eed1d997fb59c909e6a58a6745c2bfb79f9b253#npm:19.1.2"],\ - ["http-server", "npm:14.1.1"],\ ["react", "npm:19.1.0"],\ ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"]\ ],\ @@ -2053,17 +2125,16 @@ const RAW_RUNTIME_STATE = ["workspace:ui-parts/tooltip", {\ "packageLocation": "./ui-parts/tooltip/",\ "packageDependencies": [\ - ["@atls-ui-parts/condition", "virtual:06315aec6049f1c6c32004d6e584058ffedd6c8eaf08aaee2ce03aaedeaf84c340968f24d92b3566001c478f3ac64eca59adabd63e33390cb5990761978a1ea2#workspace:ui-parts/condition"],\ ["@atls-ui-parts/layout", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#workspace:ui-parts/layout"],\ ["@atls-ui-parts/theme", "virtual:6e3d13d4bb141546c851eafb803659d9bef8a8a4b826ab761e48399dcbf8cda80227a38097da69531ddae63c1380c43a5fad649d9ff8e485d2bc4c96720b9bd0#workspace:ui-parts/theme"],\ ["@atls-ui-parts/tooltip", "workspace:ui-parts/tooltip"],\ + ["@atls-ui/theme", "workspace:ui/theme"],\ ["@atls-utils/use-float", "virtual:e8b379d238bee0c446fdeaddb9725553fcee91eeb8db9f1f4b47e4e36a5c6c26c07ae1861b7d0a5dd574863bc008f048d25fc793392ceeaade0c9801b921d418#workspace:utils/use-float"],\ ["@floating-ui/react", "virtual:bdec61daa5ce18b211e41086a87aa58babcd016eed745eb318a2389812d34b0215bd01c4e05f4de11cfc30bd0259efe6cace4826920dba58cacb6c2dd7978d3e#npm:0.27.8"],\ ["@storybook/react", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#patch:@storybook/react@npm%3A10.4.6#~/.yarn/patches/@storybook-react-npm-10.4.6-574597d2a0.patch::version=10.4.6&hash=1496cc"],\ ["@types/react", "npm:19.1.2"],\ ["@vanilla-extract/css", "npm:1.17.1"],\ ["@vanilla-extract/dynamic", "npm:2.1.2"],\ - ["framer-motion", "virtual:06315aec6049f1c6c32004d6e584058ffedd6c8eaf08aaee2ce03aaedeaf84c340968f24d92b3566001c478f3ac64eca59adabd63e33390cb5990761978a1ea2#npm:12.43.0"],\ ["react", "npm:19.1.0"],\ ["react-dom", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:19.1.0"],\ ["storybook", "virtual:76ebc481ac02aa95961a7136f7e551f7070fbf8eb171c0ca48399e504fe0f0f0edaf1d4f5953b763ae0b309e0e91ebf7d54e047cc0a0270d8aee71a756c50a70#npm:10.4.6"],\ @@ -5125,16 +5196,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["@playwright/test", [\ - ["npm:1.63.0", {\ - "packageLocation": "../.yarn/berry/cache/@playwright-test-npm-1.63.0-98d5b1a3d6-10.zip/node_modules/@playwright/test/",\ - "packageDependencies": [\ - ["@playwright/test", "npm:1.63.0"],\ - ["playwright", "npm:1.63.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@radix-ui/react-avatar", [\ ["npm:1.1.7", {\ "packageLocation": "../.yarn/berry/cache/@radix-ui-react-avatar-npm-1.1.7-21c0d7523f-10.zip/node_modules/@radix-ui/react-avatar/",\ @@ -7066,16 +7127,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["@types/http-server", [\ - ["npm:0.12.4", {\ - "packageLocation": "../.yarn/berry/cache/@types-http-server-npm-0.12.4-89530d6d63-10.zip/node_modules/@types/http-server/",\ - "packageDependencies": [\ - ["@types/connect", "npm:3.4.38"],\ - ["@types/http-server", "npm:0.12.4"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@types/inquirer", [\ ["npm:9.0.9", {\ "packageLocation": "../.yarn/berry/cache/@types-inquirer-npm-9.0.9-32cc483954-10.zip/node_modules/@types/inquirer/",\ @@ -8746,16 +8797,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["async", [\ - ["npm:2.6.4", {\ - "packageLocation": "../.yarn/berry/cache/async-npm-2.6.4-3155e80151-10.zip/node_modules/async/",\ - "packageDependencies": [\ - ["async", "npm:2.6.4"],\ - ["lodash", "npm:4.17.21"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["async-function", [\ ["npm:1.0.0", {\ "packageLocation": "../.yarn/berry/cache/async-function-npm-1.0.0-a81667ebcd-10.zip/node_modules/async-function/",\ @@ -8875,16 +8916,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["basic-auth", [\ - ["npm:2.0.1", {\ - "packageLocation": "../.yarn/berry/cache/basic-auth-npm-2.0.1-f1627ef330-10.zip/node_modules/basic-auth/",\ - "packageDependencies": [\ - ["basic-auth", "npm:2.0.1"],\ - ["safe-buffer", "npm:5.1.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["big.js", [\ ["npm:5.2.2", {\ "packageLocation": "../.yarn/berry/cache/big.js-npm-5.2.2-e147c30820-10.zip/node_modules/big.js/",\ @@ -9763,15 +9794,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["corser", [\ - ["npm:2.0.1", {\ - "packageLocation": "../.yarn/berry/cache/corser-npm-2.0.1-4dbc602b14-10.zip/node_modules/corser/",\ - "packageDependencies": [\ - ["corser", "npm:2.0.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["cosmiconfig", [\ ["npm:7.1.0", {\ "packageLocation": "../.yarn/berry/cache/cosmiconfig-npm-7.1.0-13a5090bcd-10.zip/node_modules/cosmiconfig/",\ @@ -10111,13 +10133,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["debug", [\ - ["npm:3.2.7", {\ - "packageLocation": "../.yarn/berry/cache/debug-npm-3.2.7-754e818c7a-10.zip/node_modules/debug/",\ - "packageDependencies": [\ - ["debug", "npm:3.2.7"]\ - ],\ - "linkType": "SOFT"\ - }],\ ["npm:4.3.6", {\ "packageLocation": "../.yarn/berry/cache/debug-npm-4.3.6-ecb233d831-10.zip/node_modules/debug/",\ "packageDependencies": [\ @@ -10139,20 +10154,6 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ - ["virtual:20cc84ebcf793f102bdd4cbd1642fac6bac821ec9856c29da3cd6f8e5bc67d73af7b69ac493220777a753991201e5d8c49b679bf02b268f24e146bb3e7db55ff#npm:3.2.7", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-e421eb7e5e/2/.yarn/berry/cache/debug-npm-3.2.7-754e818c7a-10.zip/node_modules/debug/",\ - "packageDependencies": [\ - ["@types/supports-color", null],\ - ["debug", "virtual:20cc84ebcf793f102bdd4cbd1642fac6bac821ec9856c29da3cd6f8e5bc67d73af7b69ac493220777a753991201e5d8c49b679bf02b268f24e146bb3e7db55ff#npm:3.2.7"],\ - ["ms", "npm:2.1.3"],\ - ["supports-color", null]\ - ],\ - "packagePeers": [\ - "@types/supports-color",\ - "supports-color"\ - ],\ - "linkType": "HARD"\ - }],\ ["virtual:69c3455e973f914a9da079b465f412398aa9db4de6c967c5de9b7df9f75964a40ef9a5e9756b59c737917bf508a15667d830fc1be46cb0566180c490a2062629#npm:4.3.6", {\ "packageLocation": "./.yarn/__virtual__/debug-virtual-4475a483b5/2/.yarn/berry/cache/debug-npm-4.3.6-ecb233d831-10.zip/node_modules/debug/",\ "packageDependencies": [\ @@ -11721,15 +11722,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["eventemitter3", [\ - ["npm:4.0.7", {\ - "packageLocation": "../.yarn/berry/cache/eventemitter3-npm-4.0.7-7afcdd74ae-10.zip/node_modules/eventemitter3/",\ - "packageDependencies": [\ - ["eventemitter3", "npm:4.0.7"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["events", [\ ["npm:3.3.0", {\ "packageLocation": "../.yarn/berry/cache/events-npm-3.3.0-c280bc7e48-10.zip/node_modules/events/",\ @@ -12148,28 +12140,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["follow-redirects", [\ - ["npm:1.15.9", {\ - "packageLocation": "../.yarn/berry/cache/follow-redirects-npm-1.15.9-539785d34c-10.zip/node_modules/follow-redirects/",\ - "packageDependencies": [\ - ["follow-redirects", "npm:1.15.9"]\ - ],\ - "linkType": "SOFT"\ - }],\ - ["virtual:a313c479c5c7e54d9ec8fbeeea69ff640f56b8989ea2dff42351a3fa5c4061fb80a52d8ede0f0826a181a216820c2d2c3f15da881e7fdf31cef1c446e42f0c45#npm:1.15.9", {\ - "packageLocation": "./.yarn/__virtual__/follow-redirects-virtual-eef30d12cf/2/.yarn/berry/cache/follow-redirects-npm-1.15.9-539785d34c-10.zip/node_modules/follow-redirects/",\ - "packageDependencies": [\ - ["@types/debug", null],\ - ["debug", null],\ - ["follow-redirects", "virtual:a313c479c5c7e54d9ec8fbeeea69ff640f56b8989ea2dff42351a3fa5c4061fb80a52d8ede0f0826a181a216820c2d2c3f15da881e7fdf31cef1c446e42f0c45#npm:1.15.9"]\ - ],\ - "packagePeers": [\ - "@types/debug",\ - "debug"\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["for-each", [\ ["npm:0.3.3", {\ "packageLocation": "../.yarn/berry/cache/for-each-npm-0.3.3-0010ca8cdd-10.zip/node_modules/for-each/",\ @@ -13053,16 +13023,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["html-encoding-sniffer", [\ - ["npm:3.0.0", {\ - "packageLocation": "../.yarn/berry/cache/html-encoding-sniffer-npm-3.0.0-daac3dfe41-10.zip/node_modules/html-encoding-sniffer/",\ - "packageDependencies": [\ - ["html-encoding-sniffer", "npm:3.0.0"],\ - ["whatwg-encoding", "npm:2.0.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["html-entities", [\ ["npm:2.5.2", {\ "packageLocation": "../.yarn/berry/cache/html-entities-npm-2.5.2-0b6113e376-10.zip/node_modules/html-entities/",\ @@ -13173,18 +13133,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["http-proxy", [\ - ["npm:1.18.1", {\ - "packageLocation": "../.yarn/berry/cache/http-proxy-npm-1.18.1-a313c479c5-10.zip/node_modules/http-proxy/",\ - "packageDependencies": [\ - ["eventemitter3", "npm:4.0.7"],\ - ["follow-redirects", "virtual:a313c479c5c7e54d9ec8fbeeea69ff640f56b8989ea2dff42351a3fa5c4061fb80a52d8ede0f0826a181a216820c2d2c3f15da881e7fdf31cef1c446e42f0c45#npm:1.15.9"],\ - ["http-proxy", "npm:1.18.1"],\ - ["requires-port", "npm:1.0.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["http-proxy-agent", [\ ["npm:7.0.2", {\ "packageLocation": "../.yarn/berry/cache/http-proxy-agent-npm-7.0.2-643ed7cc33-10.zip/node_modules/http-proxy-agent/",\ @@ -13196,28 +13144,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["http-server", [\ - ["npm:14.1.1", {\ - "packageLocation": "../.yarn/berry/cache/http-server-npm-14.1.1-93097e8f48-10.zip/node_modules/http-server/",\ - "packageDependencies": [\ - ["basic-auth", "npm:2.0.1"],\ - ["chalk", "npm:4.1.2"],\ - ["corser", "npm:2.0.1"],\ - ["he", "npm:1.2.0"],\ - ["html-encoding-sniffer", "npm:3.0.0"],\ - ["http-proxy", "npm:1.18.1"],\ - ["http-server", "npm:14.1.1"],\ - ["mime", "npm:1.6.0"],\ - ["minimist", "npm:1.2.8"],\ - ["opener", "npm:1.5.2"],\ - ["portfinder", "npm:1.0.32"],\ - ["secure-compare", "npm:3.0.1"],\ - ["union", "npm:0.5.0"],\ - ["url-join", "npm:4.0.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["http2-wrapper", [\ ["npm:1.0.3", {\ "packageLocation": "../.yarn/berry/cache/http2-wrapper-npm-1.0.3-5b58ade1df-10.zip/node_modules/http2-wrapper/",\ @@ -13263,7 +13189,6 @@ const RAW_RUNTIME_STATE = "packageLocation": "./",\ "packageDependencies": [\ ["@atls/raijin", "npm:2.1.1"],\ - ["@playwright/test", "npm:1.63.0"],\ ["@types/aria-query", "npm:5.0.4"],\ ["@types/chai", "npm:5.2.3"],\ ["@types/geojson", "npm:7946.0.16"],\ @@ -14691,15 +14616,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["mime", [\ - ["npm:1.6.0", {\ - "packageLocation": "../.yarn/berry/cache/mime-npm-1.6.0-60ae95038a-10.zip/node_modules/mime/",\ - "packageDependencies": [\ - ["mime", "npm:1.6.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["mime-db", [\ ["npm:1.52.0", {\ "packageLocation": "../.yarn/berry/cache/mime-db-npm-1.52.0-b5371d6fd2-10.zip/node_modules/mime-db/",\ @@ -15046,14 +14962,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["mkdirp", [\ - ["npm:0.5.6", {\ - "packageLocation": "../.yarn/berry/cache/mkdirp-npm-0.5.6-dcd5a6b97b-10.zip/node_modules/mkdirp/",\ - "packageDependencies": [\ - ["minimist", "npm:1.2.8"],\ - ["mkdirp", "npm:0.5.6"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:1.0.4", {\ "packageLocation": "../.yarn/berry/cache/mkdirp-npm-1.0.4-37f6ef56b9-10.zip/node_modules/mkdirp/",\ "packageDependencies": [\ @@ -15715,15 +15623,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["opener", [\ - ["npm:1.5.2", {\ - "packageLocation": "../.yarn/berry/cache/opener-npm-1.5.2-7a1aa69f14-10.zip/node_modules/opener/",\ - "packageDependencies": [\ - ["opener", "npm:1.5.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["optionator", [\ ["npm:0.9.4", {\ "packageLocation": "../.yarn/berry/cache/optionator-npm-0.9.4-1f114b00e8-10.zip/node_modules/optionator/",\ @@ -16279,25 +16178,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["playwright", [\ - ["npm:1.63.0", {\ - "packageLocation": "../.yarn/berry/cache/playwright-npm-1.63.0-f27e8a40d2-10.zip/node_modules/playwright/",\ - "packageDependencies": [\ - ["playwright", "npm:1.63.0"],\ - ["playwright-core", "npm:1.63.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["playwright-core", [\ - ["npm:1.63.0", {\ - "packageLocation": "../.yarn/berry/cache/playwright-core-npm-1.63.0-ef52743921-10.zip/node_modules/playwright-core/",\ - "packageDependencies": [\ - ["playwright-core", "npm:1.63.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["plop", [\ ["npm:4.0.4", {\ "packageLocation": "../.yarn/berry/cache/plop-npm-4.0.4-9fe4a57db2-10.zip/node_modules/plop/",\ @@ -16315,18 +16195,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["portfinder", [\ - ["npm:1.0.32", {\ - "packageLocation": "../.yarn/berry/cache/portfinder-npm-1.0.32-20cc84ebcf-10.zip/node_modules/portfinder/",\ - "packageDependencies": [\ - ["async", "npm:2.6.4"],\ - ["debug", "virtual:20cc84ebcf793f102bdd4cbd1642fac6bac821ec9856c29da3cd6f8e5bc67d73af7b69ac493220777a753991201e5d8c49b679bf02b268f24e146bb3e7db55ff#npm:3.2.7"],\ - ["mkdirp", "npm:0.5.6"],\ - ["portfinder", "npm:1.0.32"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["possible-typed-array-names", [\ ["npm:1.0.0", {\ "packageLocation": "../.yarn/berry/cache/possible-typed-array-names-npm-1.0.0-3a8176348a-10.zip/node_modules/possible-typed-array-names/",\ @@ -17087,15 +16955,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["requires-port", [\ - ["npm:1.0.0", {\ - "packageLocation": "../.yarn/berry/cache/requires-port-npm-1.0.0-fd036b488a-10.zip/node_modules/requires-port/",\ - "packageDependencies": [\ - ["requires-port", "npm:1.0.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["resolve", [\ ["patch:resolve@npm%3A1.22.11#optional!builtin::version=1.22.11&hash=9bd1a5", {\ "packageLocation": "../.yarn/berry/cache/resolve-patch-6a14e45123-10.zip/node_modules/resolve/",\ @@ -17302,13 +17161,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["safe-buffer", [\ - ["npm:5.1.2", {\ - "packageLocation": "../.yarn/berry/cache/safe-buffer-npm-5.1.2-c27fedf6c4-10.zip/node_modules/safe-buffer/",\ - "packageDependencies": [\ - ["safe-buffer", "npm:5.1.2"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:5.2.1", {\ "packageLocation": "../.yarn/berry/cache/safe-buffer-npm-5.2.1-3481c8aa9b-10.zip/node_modules/safe-buffer/",\ "packageDependencies": [\ @@ -17461,15 +17313,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["secure-compare", [\ - ["npm:3.0.1", {\ - "packageLocation": "../.yarn/berry/cache/secure-compare-npm-3.0.1-5bb9fae9c0-10.zip/node_modules/secure-compare/",\ - "packageDependencies": [\ - ["secure-compare", "npm:3.0.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["secure-json-parse", [\ ["npm:2.7.0", {\ "packageLocation": "../.yarn/berry/cache/secure-json-parse-npm-2.7.0-d5b89b0a3e-10.zip/node_modules/secure-json-parse/",\ @@ -19141,16 +18984,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["union", [\ - ["npm:0.5.0", {\ - "packageLocation": "../.yarn/berry/cache/union-npm-0.5.0-6b68db9cf0-10.zip/node_modules/union/",\ - "packageDependencies": [\ - ["qs", "npm:6.14.0"],\ - ["union", "npm:0.5.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["unique-filename", [\ ["npm:3.0.0", {\ "packageLocation": "../.yarn/berry/cache/unique-filename-npm-3.0.0-77d68e0a45-10.zip/node_modules/unique-filename/",\ @@ -19280,15 +19113,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["url-join", [\ - ["npm:4.0.1", {\ - "packageLocation": "../.yarn/berry/cache/url-join-npm-4.0.1-e1f4415722-10.zip/node_modules/url-join/",\ - "packageDependencies": [\ - ["url-join", "npm:4.0.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["use-sync-external-store", [\ ["npm:1.5.0", {\ "packageLocation": "../.yarn/berry/cache/use-sync-external-store-npm-1.5.0-556c6970f1-10.zip/node_modules/use-sync-external-store/",\ @@ -19536,14 +19360,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["whatwg-encoding", [\ - ["npm:2.0.0", {\ - "packageLocation": "../.yarn/berry/cache/whatwg-encoding-npm-2.0.0-d7451f51b4-10.zip/node_modules/whatwg-encoding/",\ - "packageDependencies": [\ - ["iconv-lite", "npm:0.6.3"],\ - ["whatwg-encoding", "npm:2.0.0"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:3.1.1", {\ "packageLocation": "../.yarn/berry/cache/whatwg-encoding-npm-3.1.1-7dfe21cf7d-10.zip/node_modules/whatwg-encoding/",\ "packageDependencies": [\ diff --git a/generators/appearance/package.json b/generators/appearance/package.json index 0d6a86a35..d15fced11 100644 --- a/generators/appearance/package.json +++ b/generators/appearance/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-generators/appearance", - "version": "1.2.0", + "version": "1.2.1", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "generators/appearance" + }, "license": "BSD-3-Clause", "type": "module", "exports": { diff --git a/generators/components/package.json b/generators/components/package.json index d1754d3b8..89b5920f8 100644 --- a/generators/components/package.json +++ b/generators/components/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-generators/components", - "version": "1.0.10", + "version": "1.0.11", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "generators/components" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/generators/components/src/templates/tooltip/component.tsx.hbs b/generators/components/src/templates/tooltip/component.tsx.hbs index ed7f8a282..9bc14ec60 100644 --- a/generators/components/src/templates/tooltip/component.tsx.hbs +++ b/generators/components/src/templates/tooltip/component.tsx.hbs @@ -1,13 +1,10 @@ import type { TooltipProps } from '@atls-ui-parts/tooltip' import type { ReactNode } from 'react' -import { Box } from '@ui/layout' import { Tooltip as BaseTooltip } from '@atls-ui-parts/tooltip' -import { baseContainerStyles } from './styles.css.js' - export const Tooltip = ({ children, ...props }: TooltipProps): ReactNode => ( - }> + {children} ) diff --git a/generators/components/src/templates/tooltip/index.ts.hbs b/generators/components/src/templates/tooltip/index.ts.hbs index 5f14e1213..2f0adba4d 100644 --- a/generators/components/src/templates/tooltip/index.ts.hbs +++ b/generators/components/src/templates/tooltip/index.ts.hbs @@ -1,2 +1,2 @@ export * from './component.js' -export type { TooltipProps, ArrowProps } from '@atls-ui-parts/tooltip' +export type { TooltipProps, TooltipShape, TooltipAppearance } from '@atls-ui-parts/tooltip' diff --git a/generators/components/src/templates/tooltip/styles.css.ts.hbs b/generators/components/src/templates/tooltip/styles.css.ts.hbs deleted file mode 100644 index 24fceee4a..000000000 --- a/generators/components/src/templates/tooltip/styles.css.ts.hbs +++ /dev/null @@ -1,17 +0,0 @@ -import { style } from '@vanilla-extract/css' - -export const baseContainerStyles = style({ - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - minWidth: 30, - minHeight: 32, - padding: '8px 12px', - margin: 0, - color: 'rgba(255, 255, 255, 1)', - wordWrap: 'break-word', - backgroundColor: 'rgba(0, 0, 0, 0.75)', - borderRadius: '8px', - boxShadow: '0px 2px 24px rgba(0, 0, 0, 0.15)', - zIndex: 1000, -}) diff --git a/generators/icons/package.json b/generators/icons/package.json index d485a169f..04d1e0bf9 100644 --- a/generators/icons/package.json +++ b/generators/icons/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-generators/icons", - "version": "1.2.4", + "version": "1.2.5", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "generators/icons" + }, "license": "BSD-3-Clause", "type": "module", "exports": { diff --git a/generators/icons/src/svgr-utils/compile-icons/template.ts b/generators/icons/src/svgr-utils/compile-icons/template.ts index 6914a1c2b..9f06f7723 100644 --- a/generators/icons/src/svgr-utils/compile-icons/template.ts +++ b/generators/icons/src/svgr-utils/compile-icons/template.ts @@ -12,7 +12,7 @@ export const svgrTemplate: Config['template'] = ({ jsx, componentName }, { tpl } export const ${componentName} = (props: IconProps): ReactNode => { const { className, style, otherProps } = iconSprinkles(props) - const iconStyle = { ...style, ...otherProps.style } + const iconStyle = { ...style, ...otherProps.style } return ( ${jsx} diff --git a/generators/locales/package.json b/generators/locales/package.json index decd6182c..5d8dc9906 100644 --- a/generators/locales/package.json +++ b/generators/locales/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-generators/locales", - "version": "1.0.3", + "version": "1.0.4", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "generators/locales" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/generators/utils/package.json b/generators/utils/package.json index c80e39070..8a21465c4 100644 --- a/generators/utils/package.json +++ b/generators/utils/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-generators/utils", - "version": "1.0.6", + "version": "1.0.7", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "generators/utils" + }, "license": "BSD-3-Clause", "type": "module", "main": "src/index.ts", diff --git a/package.json b/package.json index 16f98fac4..c9ea330b4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ }, "devDependencies": { "@atls/raijin": "latest", - "@playwright/test": "1.63.0", "@types/aria-query": "5.0.4", "@types/chai": "5.2.3", "@types/geojson": "7946.0.16", diff --git a/ui-admin/button/package.json b/ui-admin/button/package.json index f437a24ea..bc2a0190f 100644 --- a/ui-admin/button/package.json +++ b/ui-admin/button/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/button", - "version": "1.2.2", + "version": "1.2.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/button" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-admin/examples/bottom-navigation/package.json b/ui-admin/examples/bottom-navigation/package.json index 982a3bc54..21aaadd1b 100644 --- a/ui-admin/examples/bottom-navigation/package.json +++ b/ui-admin/examples/bottom-navigation/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/bottom-navigation", - "version": "0.1.2", + "version": "0.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/examples/bottom-navigation" + }, "license": "BSD-3-Clause", "type": "module", "exports": { diff --git a/ui-admin/examples/sidebar/package.json b/ui-admin/examples/sidebar/package.json index b1db49c0e..7af966a1e 100644 --- a/ui-admin/examples/sidebar/package.json +++ b/ui-admin/examples/sidebar/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/sidebar", - "version": "0.1.2", + "version": "0.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/examples/sidebar" + }, "license": "BSD-3-Clause", "type": "module", "exports": { diff --git a/ui-admin/icon/package.json b/ui-admin/icon/package.json index 13a999ae1..77a282941 100644 --- a/ui-admin/icon/package.json +++ b/ui-admin/icon/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/icon", - "version": "1.0.8", + "version": "1.0.9", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/icon" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-admin/icons/package.json b/ui-admin/icons/package.json index df0dd141a..b119e520f 100644 --- a/ui-admin/icons/package.json +++ b/ui-admin/icons/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/icons", - "version": "1.2.2", + "version": "1.2.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/icons" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-admin/layout/package.json b/ui-admin/layout/package.json index ca3e2b3a8..0873b532b 100644 --- a/ui-admin/layout/package.json +++ b/ui-admin/layout/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/layout", - "version": "1.0.12", + "version": "1.0.13", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/layout" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-admin/text/package.json b/ui-admin/text/package.json index a1fe3a07a..ab240af46 100644 --- a/ui-admin/text/package.json +++ b/ui-admin/text/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/text", - "version": "1.1.2", + "version": "1.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/text" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-admin/theme/package.json b/ui-admin/theme/package.json index c710951c6..194781db0 100644 --- a/ui-admin/theme/package.json +++ b/ui-admin/theme/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/theme", - "version": "1.0.14", + "version": "1.0.15", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/theme" + }, "license": "BSD-3-Clause", "type": "module", "exports": { diff --git a/ui-admin/upload/package.json b/ui-admin/upload/package.json index da33e1e22..6fa2c71ef 100644 --- a/ui-admin/upload/package.json +++ b/ui-admin/upload/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-admin/upload", - "version": "1.2.2", + "version": "1.2.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-admin/upload" + }, "license": "MIT", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/autocomplete/package.json b/ui-parts/autocomplete/package.json index c33e0d6f2..c42f4474c 100644 --- a/ui-parts/autocomplete/package.json +++ b/ui-parts/autocomplete/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/autocomplete", - "version": "1.1.1", + "version": "1.1.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/autocomplete" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/avatar/package.json b/ui-parts/avatar/package.json index 56c6c0687..ff8b4d2dc 100644 --- a/ui-parts/avatar/package.json +++ b/ui-parts/avatar/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/avatar", - "version": "1.1.1", + "version": "1.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/avatar" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/button/package.json b/ui-parts/button/package.json index d4cec2b97..03e405a74 100644 --- a/ui-parts/button/package.json +++ b/ui-parts/button/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/button", - "version": "1.2.1", + "version": "1.2.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/button" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/card/package.json b/ui-parts/card/package.json index 19262e971..53285456c 100755 --- a/ui-parts/card/package.json +++ b/ui-parts/card/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/card", - "version": "1.1.2", + "version": "1.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/card" + }, "license": "MIT", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/carousel/package.json b/ui-parts/carousel/package.json index 560bab600..a9a792bbf 100644 --- a/ui-parts/carousel/package.json +++ b/ui-parts/carousel/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/carousel", - "version": "1.1.1", + "version": "1.1.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/carousel" + }, "license": "BSD 3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/checkbox/package.json b/ui-parts/checkbox/package.json index a4de85255..4e76c5d6e 100644 --- a/ui-parts/checkbox/package.json +++ b/ui-parts/checkbox/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/checkbox", - "version": "1.1.1", + "version": "1.1.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/checkbox" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/condition/package.json b/ui-parts/condition/package.json index 041f627ad..fb8ee1276 100755 --- a/ui-parts/condition/package.json +++ b/ui-parts/condition/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/condition", - "version": "1.2.1", + "version": "1.2.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/condition" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/conditional-render/package.json b/ui-parts/conditional-render/package.json index 33fac3f66..2f2e62d82 100644 --- a/ui-parts/conditional-render/package.json +++ b/ui-parts/conditional-render/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/conditional-render", - "version": "1.0.4", + "version": "1.0.5", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/conditional-render" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/datepicker/package.json b/ui-parts/datepicker/package.json index baf2a94bd..4a905f397 100644 --- a/ui-parts/datepicker/package.json +++ b/ui-parts/datepicker/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/datepicker", - "version": "1.1.1", + "version": "1.1.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/datepicker" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/design/src/main.ts b/ui-parts/design/src/main.ts index ddc66f830..1879a7375 100644 --- a/ui-parts/design/src/main.ts +++ b/ui-parts/design/src/main.ts @@ -14,11 +14,10 @@ const getAbsolutePath = (value: string): string => const config: StorybookConfig = { stories: [ - '../../**/src/stories.@(js|jsx|mjs|ts|tsx|mdx)', - '../../**/src/*.stories.@(js|jsx|mjs|ts|tsx|mdx)', - '../../**/src/*/stories.@(js|jsx|mjs|ts|tsx|mdx)', + '../../*/src/**/stories.@(js|jsx|mjs|ts|tsx|mdx)', + '../../*/src/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)', '../../**/src/*.mdx', - '../../**/stories/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)', + '../../*/stories/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)', '../../**/stories/**/*.mdx', ], addons: [ diff --git a/ui-parts/dom/package.json b/ui-parts/dom/package.json index c2c6937be..925323ab2 100644 --- a/ui-parts/dom/package.json +++ b/ui-parts/dom/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/dom", - "version": "1.0.4", + "version": "1.0.5", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/dom" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/events-state/package.json b/ui-parts/events-state/package.json index 3ec6a08d8..a475675d6 100644 --- a/ui-parts/events-state/package.json +++ b/ui-parts/events-state/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/events-state", - "version": "1.0.4", + "version": "1.0.5", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/events-state" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/icons/package.json b/ui-parts/icons/package.json index e41050208..290328c93 100644 --- a/ui-parts/icons/package.json +++ b/ui-parts/icons/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/icons", "version": "1.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/icons" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/icons/src/icons/index.ts b/ui-parts/icons/src/icons/index.ts index 910485ceb..5399b85df 100644 --- a/ui-parts/icons/src/icons/index.ts +++ b/ui-parts/icons/src/icons/index.ts @@ -8,3 +8,4 @@ export * from './lock.icon.js' export * from './minus.icon.js' export * from './phone.icon.js' export * from './search.icon.js' +export * from './placeholder.icon.js' diff --git a/ui-parts/icons/src/icons/placeholder.icon.tsx b/ui-parts/icons/src/icons/placeholder.icon.tsx new file mode 100644 index 000000000..2849370ec --- /dev/null +++ b/ui-parts/icons/src/icons/placeholder.icon.tsx @@ -0,0 +1,21 @@ +import type { ReactNode } from 'react' + +import type { IconProps } from '../icons.interfaces.js' +export const PlaceholderIcon = (props: IconProps): ReactNode => ( + + + + + + +) diff --git a/ui-parts/icons/svg/placeholder.svg b/ui-parts/icons/svg/placeholder.svg new file mode 100644 index 000000000..f8f3636dc --- /dev/null +++ b/ui-parts/icons/svg/placeholder.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/ui-parts/image/assets/example.png b/ui-parts/image/assets/example.png new file mode 100644 index 000000000..cac0ae863 Binary files /dev/null and b/ui-parts/image/assets/example.png differ diff --git a/ui-parts/image/package.json b/ui-parts/image/package.json index b63078eca..57f4edb0d 100644 --- a/ui-parts/image/package.json +++ b/ui-parts/image/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/image", - "version": "1.0.8", + "version": "1.0.9", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/image" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", @@ -13,19 +18,27 @@ "postpack": "rm -rf dist" }, "dependencies": { - "clsx": "2.1.1", - "rainbow-sprinkles": "1.0.0" + "@atls-ui-parts/icons": "workspace:*", + "@atls-ui-parts/progress": "workspace:*", + "@atls-ui-parts/theme": "workspace:*", + "@atls-ui/theme": "workspace:*", + "clsx": "2.1.1" }, "devDependencies": { + "@storybook/react": "10.4.6", "@types/react": "19.1.2", "@vanilla-extract/css": "1.17.1", - "@vanilla-extract/dynamic": "2.1.2" + "@vanilla-extract/dynamic": "2.1.2", + "react": "19.1.0", + "react-dom": "19.1.0", + "storybook": "10.4.6", + "typescript": "5.9.3" }, "peerDependencies": { "@vanilla-extract/css": "*", "@vanilla-extract/dynamic": "*", - "react": "*", - "react-dom": "*" + "react": "^19", + "react-dom": "^19" }, "publishConfig": { "access": "public", diff --git a/ui-parts/image/src/component.tsx b/ui-parts/image/src/component.tsx new file mode 100644 index 000000000..5c4f33047 --- /dev/null +++ b/ui-parts/image/src/component.tsx @@ -0,0 +1,91 @@ +'use client' + +/* eslint-disable @next/next/no-img-element */ +import type { ImageProps } from './interfaces.js' +import { clsx } from 'clsx' + +import { PlaceholderIcon } from '@atls-ui-parts/icons' +import { CircleProgress } from '@atls-ui-parts/progress' + +import { containerStyles } from './container/styles/base.css.js' +import { fallbackStyles } from './fallback/styles/base.css.js' +import { fallbackIconStyles } from './fallback/styles/base.css.js' +import { descriptionStyles } from './fallback/styles/base.css.js' +import { loadingStyles } from './loading/styles/base.css.js' +import { pictureStyles } from './picture/styles/base.css.js' +import { imageAnimationStyles } from './styles/animation.css.js' +import { useImage } from './useImage.js' + +export const Image = (props: ImageProps) => { + const { + shape, + colors, + state, + busy, + hasSource, + fallbackContent, + errorDescription, + loadingIndicator, + containerProps, + imageProps, + } = useImage(props) + return ( +
+ + {hasSource && ( + {imageProps.alt} + )} + +
+ ) +} diff --git a/ui-parts/image/src/container/styles/base.css.ts b/ui-parts/image/src/container/styles/base.css.ts new file mode 100644 index 000000000..61855932d --- /dev/null +++ b/ui-parts/image/src/container/styles/base.css.ts @@ -0,0 +1,7 @@ +import { style } from '@vanilla-extract/css' +export const containerStyles = style({ + position: 'relative', + display: 'inline-block', + overflow: 'hidden', + verticalAlign: 'middle', +}) diff --git a/ui-parts/image/src/container/styles/shape/constants.ts b/ui-parts/image/src/container/styles/shape/constants.ts new file mode 100644 index 000000000..a3ec7bab1 --- /dev/null +++ b/ui-parts/image/src/container/styles/shape/constants.ts @@ -0,0 +1 @@ +export const IMAGE_SIZE = 120 diff --git a/ui-parts/image/src/container/styles/shape/interfaces.ts b/ui-parts/image/src/container/styles/shape/interfaces.ts new file mode 100644 index 000000000..a05865d83 --- /dev/null +++ b/ui-parts/image/src/container/styles/shape/interfaces.ts @@ -0,0 +1,6 @@ +import type { CSSProperties } from 'react' +export interface ContainerShape { + width: CSSProperties['width'] + height: CSSProperties['height'] + radius: CSSProperties['borderRadius'] +} diff --git a/ui-parts/image/src/container/styles/shape/variants.ts b/ui-parts/image/src/container/styles/shape/variants.ts new file mode 100644 index 000000000..05e5d7904 --- /dev/null +++ b/ui-parts/image/src/container/styles/shape/variants.ts @@ -0,0 +1,8 @@ +import type { ContainerShape } from './interfaces.js' + +import { radii } from '@atls-ui/theme/tokens' + +import { IMAGE_SIZE } from './constants.js' +export const containerShapes = { + default: { width: IMAGE_SIZE, height: IMAGE_SIZE, radius: radii.none }, +} satisfies Record diff --git a/ui-parts/image/src/fallback/styles/appearance/interfaces.ts b/ui-parts/image/src/fallback/styles/appearance/interfaces.ts new file mode 100644 index 000000000..780b3a635 --- /dev/null +++ b/ui-parts/image/src/fallback/styles/appearance/interfaces.ts @@ -0,0 +1,5 @@ +export interface FallbackAppearance { + backgroundColor: string + color: string + errorColor: string +} diff --git a/ui-parts/image/src/fallback/styles/appearance/variants.ts b/ui-parts/image/src/fallback/styles/appearance/variants.ts new file mode 100644 index 000000000..8187739fb --- /dev/null +++ b/ui-parts/image/src/fallback/styles/appearance/variants.ts @@ -0,0 +1,10 @@ +import type { Theme } from '@atls-ui/theme' + +import type { FallbackAppearance } from './interfaces.js' +export const fallbackAppearances = { + default: (theme: Theme): FallbackAppearance => ({ + backgroundColor: theme.colors.action.subtle, + color: theme.colors.text.primary, + errorColor: theme.colors.status.error, + }), +} diff --git a/ui-parts/image/src/fallback/styles/base.css.ts b/ui-parts/image/src/fallback/styles/base.css.ts new file mode 100644 index 000000000..bf4148846 --- /dev/null +++ b/ui-parts/image/src/fallback/styles/base.css.ts @@ -0,0 +1,26 @@ +import { style } from '@vanilla-extract/css' + +import { spacing } from '@atls-ui/theme/tokens' +export const fallbackStyles = style({ + position: 'absolute', + inset: 0, + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + boxSizing: 'border-box', + textAlign: 'center', +}) +export const fallbackIconStyles = style({ + display: 'block', + flexShrink: 0, + width: '100%', + height: 'auto', +}) +export const descriptionStyles = style({ + flexShrink: 0, + width: '100%', + margin: spacing.component.none, + overflowWrap: 'anywhere', + maxWidth: '100%', +}) diff --git a/ui-parts/image/src/fallback/styles/shape/interfaces.ts b/ui-parts/image/src/fallback/styles/shape/interfaces.ts new file mode 100644 index 000000000..04b210981 --- /dev/null +++ b/ui-parts/image/src/fallback/styles/shape/interfaces.ts @@ -0,0 +1,6 @@ +import type { CSSProperties } from 'react' +export interface FallbackShape { + paddingInline: CSSProperties['paddingInline'] + gap: CSSProperties['gap'] + typography: CSSProperties +} diff --git a/ui-parts/image/src/fallback/styles/shape/variants.ts b/ui-parts/image/src/fallback/styles/shape/variants.ts new file mode 100644 index 000000000..9fc17a9cc --- /dev/null +++ b/ui-parts/image/src/fallback/styles/shape/variants.ts @@ -0,0 +1,12 @@ +import type { FallbackShape } from './interfaces.js' + +import { spacing } from '@atls-ui/theme/tokens' +import { typography } from '@atls-ui/theme/tokens' + +export const fallbackShapes = { + default: { + paddingInline: spacing.component.lg, + gap: spacing.component.xs, + typography: typography.overline, + }, +} satisfies Record diff --git a/ui-parts/image/src/image.component.tsx b/ui-parts/image/src/image.component.tsx deleted file mode 100644 index 465935222..000000000 --- a/ui-parts/image/src/image.component.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ - -import type { ReactNode } from 'react' - -import type { ImageProps } from './image.interfaces.js' - -import { clsx } from 'clsx' - -import { baseImageStyles } from './image.css.js' -import { imageSprinkles } from './image.css.js' - -export const Image = ({ alt, width, height, ref, ...props }: ImageProps): ReactNode => { - const { className, style, otherProps } = imageSprinkles({ ...props, width, height }) - - return ( - {alt} - ) -} diff --git a/ui-parts/image/src/image.css.ts b/ui-parts/image/src/image.css.ts deleted file mode 100644 index e6c4a4904..000000000 --- a/ui-parts/image/src/image.css.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { SprinklesFn } from 'rainbow-sprinkles' - -import { style } from '@vanilla-extract/css' -import { createRainbowSprinkles } from 'rainbow-sprinkles' -import { defineProperties } from 'rainbow-sprinkles' - -const imageProperties = defineProperties({ - dynamicProperties: { - width: true, - height: true, - }, -}) - -export const imageSprinkles: SprinklesFn<[typeof imageProperties]> = - createRainbowSprinkles(imageProperties) - -export type ImageSprinkles = Parameters[0] - -export const baseImageStyles = style({ - display: 'block', - height: '100%', - width: '100%', - objectFit: 'cover', -}) diff --git a/ui-parts/image/src/image.interfaces.ts b/ui-parts/image/src/image.interfaces.ts deleted file mode 100644 index 272795e45..000000000 --- a/ui-parts/image/src/image.interfaces.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { PropsWithChildren } from 'react' -import type { Ref } from 'react' -import type { ImgHTMLAttributes } from 'react' - -export interface ImageProps extends PropsWithChildren, ImgHTMLAttributes { - ref?: Ref -} diff --git a/ui-parts/image/src/index.ts b/ui-parts/image/src/index.ts index f61ccee90..c81d37b88 100644 --- a/ui-parts/image/src/index.ts +++ b/ui-parts/image/src/index.ts @@ -1 +1,12 @@ -export * from './image.component.js' +export { Image } from './component.js' +export type { ImageProps } from './interfaces.js' +export type { ImageShape } from './styles/shape/interfaces.js' +export { imageShapes } from './styles/shape/variants.js' +export type { ImageAppearance } from './styles/appearance/interfaces.js' +export { imageAppearances } from './styles/appearance/variants.js' +export type { ContainerShape } from './container/styles/shape/interfaces.js' +export type { PictureShape } from './picture/styles/shape/interfaces.js' +export type { FallbackShape } from './fallback/styles/shape/interfaces.js' +export type { FallbackAppearance } from './fallback/styles/appearance/interfaces.js' +export type { LoadingShape } from './loading/styles/shape/interfaces.js' +export type { LoadingAppearance } from './loading/styles/appearance/interfaces.js' diff --git a/ui-parts/image/src/interfaces.ts b/ui-parts/image/src/interfaces.ts new file mode 100644 index 000000000..65ee502a4 --- /dev/null +++ b/ui-parts/image/src/interfaces.ts @@ -0,0 +1,27 @@ +import type { HTMLAttributes } from 'react' +import type { ImgHTMLAttributes } from 'react' +import type { ReactNode } from 'react' +import type { Ref } from 'react' + +import type { ImageAppearance } from './styles/appearance/interfaces.js' +import type { ImageShape } from './styles/shape/interfaces.js' +export interface ImageProps extends Omit< + ImgHTMLAttributes, + 'children' | 'dangerouslySetInnerHTML' +> { + alt: string + ref?: Ref + shape?: ImageShape + appearance?: ImageAppearance | 'default' + isLoading?: boolean + fallback?: ReactNode + errorFallback?: ReactNode + errorDescription?: string + loadingIndicator?: ReactNode + containerProps?: Omit, 'children' | 'dangerouslySetInnerHTML'> +} + +export interface ImageLoadResult { + source: string + state: 'error' | 'loaded' +} diff --git a/ui-parts/image/src/loading/styles/appearance/interfaces.ts b/ui-parts/image/src/loading/styles/appearance/interfaces.ts new file mode 100644 index 000000000..c5f659575 --- /dev/null +++ b/ui-parts/image/src/loading/styles/appearance/interfaces.ts @@ -0,0 +1,5 @@ +import type { CircleProgressAppearance } from '@atls-ui-parts/progress' +export interface LoadingAppearance { + backgroundColor: string + progress: CircleProgressAppearance +} diff --git a/ui-parts/image/src/loading/styles/appearance/variants.ts b/ui-parts/image/src/loading/styles/appearance/variants.ts new file mode 100644 index 000000000..704297e50 --- /dev/null +++ b/ui-parts/image/src/loading/styles/appearance/variants.ts @@ -0,0 +1,11 @@ +import type { Theme } from '@atls-ui/theme' + +import type { LoadingAppearance } from './interfaces.js' + +import { circleProgressAppearances } from '@atls-ui-parts/progress' +export const loadingAppearances = { + default: (theme: Theme): LoadingAppearance => ({ + backgroundColor: theme.colors.elevation.lg, + progress: circleProgressAppearances.secondary(theme), + }), +} diff --git a/ui-parts/image/src/loading/styles/base.css.ts b/ui-parts/image/src/loading/styles/base.css.ts new file mode 100644 index 000000000..f89ad5385 --- /dev/null +++ b/ui-parts/image/src/loading/styles/base.css.ts @@ -0,0 +1,14 @@ +import { style } from '@vanilla-extract/css' + +import { opacity } from '@atls-ui/theme/tokens' +export const loadingStyles = style({ + position: 'absolute', + inset: 0, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + pointerEvents: 'none', + opacity: opacity.none, + visibility: 'hidden', + selectors: { '&[data-loading="true"]': { opacity: opacity.full, visibility: 'visible' } }, +}) diff --git a/ui-parts/image/src/loading/styles/shape/interfaces.ts b/ui-parts/image/src/loading/styles/shape/interfaces.ts new file mode 100644 index 000000000..20230ca2c --- /dev/null +++ b/ui-parts/image/src/loading/styles/shape/interfaces.ts @@ -0,0 +1,4 @@ +import type { CircleProgressShape } from '@atls-ui-parts/progress' +export interface LoadingShape { + progress: CircleProgressShape +} diff --git a/ui-parts/image/src/loading/styles/shape/variants.ts b/ui-parts/image/src/loading/styles/shape/variants.ts new file mode 100644 index 000000000..ec260eb06 --- /dev/null +++ b/ui-parts/image/src/loading/styles/shape/variants.ts @@ -0,0 +1,6 @@ +import type { LoadingShape } from './interfaces.js' + +import { circleProgressShapes } from '@atls-ui-parts/progress' +export const loadingShapes = { + default: { progress: circleProgressShapes.xs }, +} satisfies Record diff --git a/ui-parts/image/src/picture/styles/base.css.ts b/ui-parts/image/src/picture/styles/base.css.ts new file mode 100644 index 000000000..0b51e8cc6 --- /dev/null +++ b/ui-parts/image/src/picture/styles/base.css.ts @@ -0,0 +1,12 @@ +import { style } from '@vanilla-extract/css' + +import { opacity } from '@atls-ui/theme/tokens' +export const pictureStyles = style({ + position: 'relative', + display: 'block', + width: '100%', + height: '100%', + opacity: opacity.none, + visibility: 'hidden', + selectors: { '&[data-loaded="true"]': { opacity: opacity.full, visibility: 'visible' } }, +}) diff --git a/ui-parts/image/src/picture/styles/shape/interfaces.ts b/ui-parts/image/src/picture/styles/shape/interfaces.ts new file mode 100644 index 000000000..a6599aefe --- /dev/null +++ b/ui-parts/image/src/picture/styles/shape/interfaces.ts @@ -0,0 +1,5 @@ +import type { CSSProperties } from 'react' +export interface PictureShape { + objectFit: CSSProperties['objectFit'] + objectPosition: CSSProperties['objectPosition'] +} diff --git a/ui-parts/image/src/picture/styles/shape/variants.ts b/ui-parts/image/src/picture/styles/shape/variants.ts new file mode 100644 index 000000000..7deded8cc --- /dev/null +++ b/ui-parts/image/src/picture/styles/shape/variants.ts @@ -0,0 +1,4 @@ +import type { PictureShape } from './interfaces.js' +export const pictureShapes = { + default: { objectFit: 'cover', objectPosition: 'center' }, +} satisfies Record diff --git a/ui-parts/image/src/stories.tsx b/ui-parts/image/src/stories.tsx new file mode 100644 index 000000000..e47c20f3c --- /dev/null +++ b/ui-parts/image/src/stories.tsx @@ -0,0 +1,52 @@ +import type { Meta } from '@storybook/react' +import type { StoryObj } from '@storybook/react' + +import type { ImageProps } from './interfaces.js' + +import { Image } from './component.js' +import { imageAppearances } from './styles/appearance/variants.js' +import { imageShapes } from './styles/shape/variants.js' +const example = new URL('../assets/example.png', import.meta.url).href +interface ImageStoryProps extends Omit { + shape: keyof typeof imageShapes + fit: 'contain' | 'cover' +} +const meta: Meta = { + title: 'Components/Image', + tags: ['autodocs'], + parameters: { layout: 'centered' }, + render: ({ shape = 'default', fit = 'cover', ...props }) => ( + + ), + argTypes: { + shape: { control: 'select', options: Object.keys(imageShapes) }, + appearance: { control: 'select', options: Object.keys(imageAppearances) }, + fit: { control: 'select', options: ['cover', 'contain'] }, + src: { control: 'text' }, + alt: { control: 'text' }, + isLoading: { control: 'boolean' }, + width: { control: 'number' }, + height: { control: 'number' }, + errorDescription: { control: 'text' }, + fallback: { control: false }, + errorFallback: { control: false }, + loadingIndicator: { control: false }, + containerProps: { control: false }, + }, +} +export default meta +export const Base: StoryObj = { + name: 'Базовый', + args: { + src: example, + alt: 'Optimus Prime', + shape: 'default', + appearance: 'default', + fit: 'cover', + isLoading: false, + errorDescription: 'Description text', + }, +} diff --git a/ui-parts/image/src/styles/animation.css.ts b/ui-parts/image/src/styles/animation.css.ts new file mode 100644 index 000000000..9d39ea6b3 --- /dev/null +++ b/ui-parts/image/src/styles/animation.css.ts @@ -0,0 +1,11 @@ +import { style } from '@vanilla-extract/css' + +import { animations } from '@atls-ui/theme/tokens' +export const imageAnimationStyles = style({ + transitionProperty: 'opacity, background-color, color', + transitionDuration: animations.duration.lg, + transitionTimingFunction: animations.easing.easeInOut, + '@media': { + '(prefers-reduced-motion: reduce)': { transitionDuration: animations.duration.none }, + }, +}) diff --git a/ui-parts/image/src/styles/appearance/interfaces.ts b/ui-parts/image/src/styles/appearance/interfaces.ts new file mode 100644 index 000000000..29f7a4ccb --- /dev/null +++ b/ui-parts/image/src/styles/appearance/interfaces.ts @@ -0,0 +1,6 @@ +import type { FallbackAppearance } from '../../fallback/styles/appearance/interfaces.js' +import type { LoadingAppearance } from '../../loading/styles/appearance/interfaces.js' +export interface ImageAppearance { + fallback: FallbackAppearance + loading: LoadingAppearance +} diff --git a/ui-parts/image/src/styles/appearance/variants.ts b/ui-parts/image/src/styles/appearance/variants.ts new file mode 100644 index 000000000..5efe65328 --- /dev/null +++ b/ui-parts/image/src/styles/appearance/variants.ts @@ -0,0 +1,12 @@ +import type { Theme } from '@atls-ui/theme' + +import type { ImageAppearance } from './interfaces.js' + +import { fallbackAppearances } from '../../fallback/styles/appearance/variants.js' +import { loadingAppearances } from '../../loading/styles/appearance/variants.js' +export const imageAppearances = { + default: (theme: Theme): ImageAppearance => ({ + fallback: fallbackAppearances.default(theme), + loading: loadingAppearances.default(theme), + }), +} diff --git a/ui-parts/image/src/styles/shape/interfaces.ts b/ui-parts/image/src/styles/shape/interfaces.ts new file mode 100644 index 000000000..3cea107e5 --- /dev/null +++ b/ui-parts/image/src/styles/shape/interfaces.ts @@ -0,0 +1,10 @@ +import type { ContainerShape } from '../../container/styles/shape/interfaces.js' +import type { FallbackShape } from '../../fallback/styles/shape/interfaces.js' +import type { LoadingShape } from '../../loading/styles/shape/interfaces.js' +import type { PictureShape } from '../../picture/styles/shape/interfaces.js' +export interface ImageShape { + container: ContainerShape + picture: PictureShape + fallback: FallbackShape + loading: LoadingShape +} diff --git a/ui-parts/image/src/styles/shape/variants.ts b/ui-parts/image/src/styles/shape/variants.ts new file mode 100644 index 000000000..c7493ee30 --- /dev/null +++ b/ui-parts/image/src/styles/shape/variants.ts @@ -0,0 +1,14 @@ +import type { ImageShape } from './interfaces.js' + +import { containerShapes } from '../../container/styles/shape/variants.js' +import { fallbackShapes } from '../../fallback/styles/shape/variants.js' +import { loadingShapes } from '../../loading/styles/shape/variants.js' +import { pictureShapes } from '../../picture/styles/shape/variants.js' +export const imageShapes = { + default: { + container: containerShapes.default, + picture: pictureShapes.default, + fallback: fallbackShapes.default, + loading: loadingShapes.default, + }, +} satisfies Record diff --git a/ui-parts/image/src/useImage.ts b/ui-parts/image/src/useImage.ts new file mode 100644 index 000000000..c2c85c97e --- /dev/null +++ b/ui-parts/image/src/useImage.ts @@ -0,0 +1,94 @@ +import type { ComponentPropsWithRef } from 'react' +import type { RefCallback } from 'react' + +import type { ImageProps } from './interfaces.js' +import type { ImageLoadResult } from './interfaces.js' + +import { useCallback } from 'react' +import { useState } from 'react' + +import { useTheme } from '@atls-ui-parts/theme' + +import { imageAppearances } from './styles/appearance/variants.js' +import { imageShapes } from './styles/shape/variants.js' + +export const useImage = ({ + shape = imageShapes.default, + appearance = 'default', + isLoading = false, + fallback, + errorFallback, + errorDescription = 'Failed to load image', + loadingIndicator, + containerProps, + ref, + onLoad, + onError, + ...nativeProps +}: ImageProps) => { + const theme = useTheme() + const colors = typeof appearance === 'string' ? imageAppearances[appearance](theme) : appearance + const source = JSON.stringify([ + nativeProps.src, + nativeProps.srcSet, + nativeProps.sizes, + nativeProps.crossOrigin, + nativeProps.referrerPolicy, + ]) + const [result, setResult] = useState() + const requestState = result?.source === source ? result.state : 'loading' + const hasSource = Boolean(nativeProps.src || nativeProps.srcSet) + const state = hasSource ? requestState : 'empty' + const busy = isLoading || state === 'loading' + const imageRef = useCallback>( + (image: HTMLImageElement | null) => { + if (image?.complete) { + const nextState = image.naturalWidth > 0 ? 'loaded' : 'error' + setResult((previous) => + previous?.source === source && previous.state === nextState + ? previous + : { source, state: nextState }) + } + if (typeof ref === 'function') return ref(image) + if (ref) { + ref.current = image + return () => { + ref.current = null + } + } + return undefined + }, + [source, ref] + ) + return { + shape, + colors, + state, + busy, + hasSource, + fallbackContent: state === 'error' ? errorFallback : fallback, + errorDescription, + loadingIndicator, + containerProps: { + ...containerProps, + role: state === 'loaded' || !nativeProps.alt ? containerProps?.role : 'img', + 'aria-label': + state === 'loaded' ? containerProps?.['aria-label'] : nativeProps.alt || undefined, + 'aria-busy': busy || undefined, + 'data-state': state, + }, + imageProps: { + ...nativeProps, + key: source, + ref: imageRef, + onLoad: (event) => { + setResult({ source, state: 'loaded' }) + onLoad?.(event) + }, + onError: (event) => { + setResult({ source, state: 'error' }) + onError?.(event) + }, + } satisfies ComponentPropsWithRef<'img'>, + } +} diff --git a/ui-parts/input/package.json b/ui-parts/input/package.json index 28ff7cc33..641b27a28 100644 --- a/ui-parts/input/package.json +++ b/ui-parts/input/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/input", - "version": "1.1.1", + "version": "1.1.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/input" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/layout/package.json b/ui-parts/layout/package.json index 527cb286c..2a2f36a89 100644 --- a/ui-parts/layout/package.json +++ b/ui-parts/layout/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/layout", - "version": "1.0.13", + "version": "1.0.14", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/layout" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/link/package.json b/ui-parts/link/package.json index 792580149..e2a965303 100644 --- a/ui-parts/link/package.json +++ b/ui-parts/link/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/link", - "version": "1.0.9", + "version": "1.0.10", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/link" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/mapbox/package.json b/ui-parts/mapbox/package.json index 103f32323..acf1b11d4 100644 --- a/ui-parts/mapbox/package.json +++ b/ui-parts/mapbox/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/mapbox", - "version": "1.0.5", + "version": "1.0.6", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/mapbox" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/modal/package.json b/ui-parts/modal/package.json index 0c9395ff4..0296a9d72 100644 --- a/ui-parts/modal/package.json +++ b/ui-parts/modal/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/modal", - "version": "1.2.1", + "version": "1.2.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/modal" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/next-image/package.json b/ui-parts/next-image/package.json index 9f2cea199..4f0dbf8cd 100644 --- a/ui-parts/next-image/package.json +++ b/ui-parts/next-image/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/next-image", - "version": "1.0.8", + "version": "1.0.9", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/next-image" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/parallax/package.json b/ui-parts/parallax/package.json index 6991b6385..ad6aba37a 100644 --- a/ui-parts/parallax/package.json +++ b/ui-parts/parallax/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/parallax", - "version": "1.0.14", + "version": "1.0.15", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/parallax" + }, "license": "BSD 3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/popover/package.json b/ui-parts/popover/package.json index 49356282d..766020e0c 100644 --- a/ui-parts/popover/package.json +++ b/ui-parts/popover/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/popover", - "version": "1.3.1", + "version": "1.3.2", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/popover" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/portal/package.json b/ui-parts/portal/package.json index ed1669cd3..aaa2920bf 100644 --- a/ui-parts/portal/package.json +++ b/ui-parts/portal/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/portal", - "version": "1.0.6", + "version": "1.0.7", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/portal" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/progress/package.json b/ui-parts/progress/package.json index ddadc25cd..8e5532060 100644 --- a/ui-parts/progress/package.json +++ b/ui-parts/progress/package.json @@ -1,6 +1,11 @@ { "name": "@atls-ui-parts/progress", - "version": "1.1.2", + "version": "1.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/atls/hyperion.git", + "directory": "ui-parts/progress" + }, "license": "BSD-3-Clause", "type": "module", "main": "./src/index.ts", diff --git a/ui-parts/progress/src/circle/box/component.tsx b/ui-parts/progress/src/circle/box/component.tsx index e87ca3f46..ce85272d5 100644 --- a/ui-parts/progress/src/circle/box/component.tsx +++ b/ui-parts/progress/src/circle/box/component.tsx @@ -3,27 +3,34 @@ import type { ReactNode } from 'react' import type { BoxAppearance } from './styles/appearance/interfaces.js' import type { BoxShape } from './styles/shape/interfaces.js' +import { assignInlineVars } from '@vanilla-extract/dynamic' + import { boxStyles } from './styles/base.css.js' +import { surfaceStyles } from './styles/base.css.js' +import { boxBackground } from './styles/base.css.js' +import { boxShadow } from './styles/base.css.js' export const Box = ({ - children, shape, appearance, + children, }: { - children: ReactNode shape: BoxShape appearance: BoxAppearance + children: ReactNode }): ReactNode => (
+ ) diff --git a/ui-parts/progress/src/circle/box/styles/appearance/variants.ts b/ui-parts/progress/src/circle/box/styles/appearance/variants.ts index f826c6989..c05a9739b 100644 --- a/ui-parts/progress/src/circle/box/styles/appearance/variants.ts +++ b/ui-parts/progress/src/circle/box/styles/appearance/variants.ts @@ -2,23 +2,15 @@ import type { Theme } from '@atls-ui/theme' import type { BoxAppearance } from './interfaces.js' -import { shadowOffsets } from '@atls-ui/theme/tokens' -import { shadowBlurs } from '@atls-ui/theme/tokens' -import { shadowSpreads } from '@atls-ui/theme/tokens' - -const boxShadow = (theme: Theme): BoxAppearance['shadow'] => - [ - `${shadowOffsets.none} ${shadowOffsets.none} ${shadowBlurs.xs6} ${shadowSpreads.xs2} ${theme.colors.action.subtle}`, - `${shadowOffsets.none} ${shadowOffsets.none} ${shadowBlurs.xs7} ${shadowSpreads.xs3} ${theme.colors.elevation.sm}`, - ].join(', ') +import { progressShadow } from '../../../../shadow.js' export const boxAppearances = { primary: (theme: Theme): BoxAppearance => ({ backgroundColor: theme.colors.surface.base, - shadow: boxShadow(theme), + shadow: progressShadow(theme), }), secondary: (theme: Theme): BoxAppearance => ({ backgroundColor: theme.colors.text.secondary, - shadow: boxShadow(theme), + shadow: progressShadow(theme), }), } diff --git a/ui-parts/progress/src/circle/box/styles/base.css.ts b/ui-parts/progress/src/circle/box/styles/base.css.ts index 94bdf78b0..70e4aecdd 100644 --- a/ui-parts/progress/src/circle/box/styles/base.css.ts +++ b/ui-parts/progress/src/circle/box/styles/base.css.ts @@ -1,11 +1,43 @@ -import { style } from '@vanilla-extract/css' +import { createVar } from '@vanilla-extract/css' +import { style } from '@vanilla-extract/css' +import { boxRadius } from './shape/variables.css.js' +import { radiusInput } from './shape/variables.css.js' +export const boxBackground = createVar() +export const boxShadow = createVar() +const radius = `min(${boxRadius}, 50%) / min(${boxRadius}, 50%)` export const boxStyles = style({ + gridArea: '1 / 1', position: 'relative', - zIndex: 0, - boxSizing: 'border-box', - minWidth: 0, - minHeight: 0, + isolation: 'isolate', display: 'grid', placeItems: 'center', + minWidth: 0, + minHeight: 0, + boxSizing: 'border-box', +}) +export const surfaceStyles = style({ + position: 'absolute', + inset: 0, + containerType: 'size', + zIndex: -1, + pointerEvents: 'none', + selectors: { + '&::before': { + content: '""', + position: 'absolute', + inset: 0, + vars: { [boxRadius]: radiusInput }, + borderRadius: radius, + boxShadow, + }, + '&::after': { + content: '""', + position: 'absolute', + inset: 0, + vars: { [boxRadius]: radiusInput }, + clipPath: `inset(0 round ${radius})`, + backgroundColor: boxBackground, + }, + }, }) diff --git a/ui-parts/progress/src/circle/box/styles/shape/constants.ts b/ui-parts/progress/src/circle/box/styles/shape/constants.ts new file mode 100644 index 000000000..5b7a00b11 --- /dev/null +++ b/ui-parts/progress/src/circle/box/styles/shape/constants.ts @@ -0,0 +1,3 @@ +import { radii } from '@atls-ui/theme/tokens' + +export const FULL_RADIUS = `min(${radii.full}, 50cqmin)` diff --git a/ui-parts/progress/src/circle/box/styles/shape/variables.css.ts b/ui-parts/progress/src/circle/box/styles/shape/variables.css.ts new file mode 100644 index 000000000..3dae5399e --- /dev/null +++ b/ui-parts/progress/src/circle/box/styles/shape/variables.css.ts @@ -0,0 +1,8 @@ +import { createVar } from '@vanilla-extract/css' + +export const radiusInput = createVar() +export const boxRadius = createVar({ + syntax: '', + inherits: true, + initialValue: '0px', +}) diff --git a/ui-parts/progress/src/circle/box/styles/shape/variants.ts b/ui-parts/progress/src/circle/box/styles/shape/variants.ts index 15d96fe55..6a3a52251 100644 --- a/ui-parts/progress/src/circle/box/styles/shape/variants.ts +++ b/ui-parts/progress/src/circle/box/styles/shape/variants.ts @@ -1,37 +1,11 @@ import type { BoxShape } from './interfaces.js' -import { radii } from '@atls-ui/theme/tokens' import { spacing } from '@atls-ui/theme/tokens' -export const boxShapes = { - xs2: { - paddingInline: spacing.component.none, - paddingBlock: spacing.component.none, - radius: radii.full, - }, - xs: { - paddingInline: spacing.component.none, - paddingBlock: spacing.component.none, - radius: radii.full, - }, - sm: { - paddingInline: spacing.component.none, - paddingBlock: spacing.component.none, - radius: radii.full, - }, - md: { - paddingInline: spacing.component.none, - paddingBlock: spacing.component.none, - radius: radii.full, - }, - lg: { - paddingInline: spacing.component.none, - paddingBlock: spacing.component.none, - radius: radii.full, - }, - xl: { - paddingInline: spacing.component.none, - paddingBlock: spacing.component.none, - radius: radii.full, - }, -} satisfies Record +import { FULL_RADIUS } from './constants.js' + +export const boxShape: BoxShape = { + paddingInline: spacing.component.none, + paddingBlock: spacing.component.none, + radius: FULL_RADIUS, +} diff --git a/ui-parts/progress/src/circle/component.tsx b/ui-parts/progress/src/circle/component.tsx index 135e37fe1..b9fd5c46d 100644 --- a/ui-parts/progress/src/circle/component.tsx +++ b/ui-parts/progress/src/circle/component.tsx @@ -2,18 +2,23 @@ import type { ReactNode } from 'react' import type { CircleProgressProps } from './interfaces.js' +import { assignInlineVars } from '@vanilla-extract/dynamic' +import { clsx } from 'clsx' + import { useTheme } from '@atls-ui-parts/theme' import { Box } from './box/component.js' import { PROGRESS_MAX } from './constants.js' -import { Indicator } from './indicator/component.js' +import { DEFAULT_INDICATOR_OVERLAP } from './indicator/styles/shape/constants.js' import { Label } from './label/component.js' import { Track } from './track/component.js' +import { radiusInput } from './box/styles/shape/variables.css.js' import { containerStyles } from './container/styles/base.css.js' import { circleProgressAnimations } from './indicator/animation/variants.js' import { circleProgressAppearances } from './styles/appearance/variants.js' -import { resolveShape } from './styles/shape/resolve.js' import { circleProgressShapes } from './styles/shape/variants.js' +import { indicatorOverlap } from './track/styles/variables.css.js' +import { strokeWidth } from './track/styles/variables.css.js' export const CircleProgress = ({ value, @@ -32,7 +37,7 @@ export const CircleProgress = ({ value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(value, PROGRESS_MAX)) - const { padding, paintPadding, strokeWidth, contour } = resolveShape(shape) + const { strokeWidth: thickness, overlap = DEFAULT_INDICATOR_OVERLAP } = shape.indicator return (
- + {children ?? diff --git a/ui-parts/progress/src/circle/container/styles/base.css.ts b/ui-parts/progress/src/circle/container/styles/base.css.ts index 92a381924..04a56977d 100644 --- a/ui-parts/progress/src/circle/container/styles/base.css.ts +++ b/ui-parts/progress/src/circle/container/styles/base.css.ts @@ -1,8 +1,11 @@ -import { style } from '@vanilla-extract/css' +import { style } from '@vanilla-extract/css' + +import { strokeWidth } from '../../track/styles/variables.css.js' export const containerStyles = style({ position: 'relative', display: 'inline-grid', boxSizing: 'border-box', verticalAlign: 'top', + padding: `calc(${strokeWidth} / 2)`, }) diff --git a/ui-parts/progress/src/circle/container/styles/shape/constants.ts b/ui-parts/progress/src/circle/container/styles/shape/constants.ts index 5a5a128af..08be594c4 100644 --- a/ui-parts/progress/src/circle/container/styles/shape/constants.ts +++ b/ui-parts/progress/src/circle/container/styles/shape/constants.ts @@ -1,5 +1,3 @@ -export const XS_CONTAINER_PADDING = '1.5px' - export const CONTAINER_SIZES = { xs2: { width: 30, height: 14 }, xs: { width: 41, height: 17 }, diff --git a/ui-parts/progress/src/circle/container/styles/shape/variants.ts b/ui-parts/progress/src/circle/container/styles/shape/variants.ts index 099cf52f1..828c26f2f 100644 --- a/ui-parts/progress/src/circle/container/styles/shape/variants.ts +++ b/ui-parts/progress/src/circle/container/styles/shape/variants.ts @@ -1,14 +1,13 @@ -import type { ContainerShape } from './interfaces.js' +import type { ContainerShape } from './interfaces.js' -import { borderWidths } from '@atls-ui/theme/tokens' -import { spacing } from '@atls-ui/theme/tokens' +import { space } from '@atls-ui/theme/tokens' +import { spacing } from '@atls-ui/theme/tokens' -import { XS_CONTAINER_PADDING } from './constants.js' -import { CONTAINER_SIZES } from './constants.js' +import { CONTAINER_SIZES } from './constants.js' export const containerShapes = { - xs2: { ...CONTAINER_SIZES.xs2, padding: borderWidths.sm }, - xs: { ...CONTAINER_SIZES.xs, padding: XS_CONTAINER_PADDING }, + xs2: { ...CONTAINER_SIZES.xs2, padding: space.g1 }, + xs: { ...CONTAINER_SIZES.xs, padding: spacing.component.xs3 }, sm: { ...CONTAINER_SIZES.sm, padding: spacing.component.xs2 }, md: { ...CONTAINER_SIZES.md, padding: spacing.component.xs2 }, lg: { ...CONTAINER_SIZES.lg, padding: spacing.component.xs2 }, diff --git a/ui-parts/progress/src/circle/indicator/animation/constants.ts b/ui-parts/progress/src/circle/indicator/animation/constants.ts index 5d4621699..2eec6dd65 100644 --- a/ui-parts/progress/src/circle/indicator/animation/constants.ts +++ b/ui-parts/progress/src/circle/indicator/animation/constants.ts @@ -1,6 +1,6 @@ -export const MILLISECONDS_PER_SECOND = 1000 -export const STATIC_ANIMATION_DURATION = 1 -export const SPINNER_ARC_LENGTH = 0.25 -export const ORBIT_ARC_LENGTH = 0.18 -export const ORBIT_JOIN_PHASE = 0.5 -export const ORBIT_JOIN_TRAVEL = 0.5 +export const SPINNER_DASH_ARRAY = '0.25 0.75' +export const SPINNER_OFFSETS = { start: 0.25, end: 1.25 } as const + +export const ORBIT_DASH_ARRAY = '0.18 0.82' +export const ORBIT_LEADING_OFFSETS = { start: 1, middle: 1.5 } as const +export const ORBIT_TRAILING_OFFSETS = { start: 1.18, middle: 1.68, end: 2.18 } as const diff --git a/ui-parts/progress/src/circle/indicator/animation/interfaces.ts b/ui-parts/progress/src/circle/indicator/animation/interfaces.ts index 944d60fdb..c1e868bd4 100644 --- a/ui-parts/progress/src/circle/indicator/animation/interfaces.ts +++ b/ui-parts/progress/src/circle/indicator/animation/interfaces.ts @@ -1,17 +1,7 @@ import type { CSSProperties } from 'react' -export interface SegmentFrame { - at: number - start: number - end: number -} - -export interface SegmentAnimation { - frames: ReadonlyArray -} - export interface CircleProgressAnimation { duration: `${number}ms` | `${number}s` easing?: CSSProperties['animationTimingFunction'] - segments: ReadonlyArray + segments: ReadonlyArray } diff --git a/ui-parts/progress/src/circle/indicator/animation/keyframes.css.ts b/ui-parts/progress/src/circle/indicator/animation/keyframes.css.ts new file mode 100644 index 000000000..cbc233a7d --- /dev/null +++ b/ui-parts/progress/src/circle/indicator/animation/keyframes.css.ts @@ -0,0 +1,23 @@ +import { keyframes } from '@vanilla-extract/css' + +import { SPINNER_DASH_ARRAY } from './constants.js' +import { SPINNER_OFFSETS } from './constants.js' +import { ORBIT_DASH_ARRAY } from './constants.js' +import { ORBIT_LEADING_OFFSETS } from './constants.js' +import { ORBIT_TRAILING_OFFSETS } from './constants.js' + +export const spinner = keyframes({ + from: { strokeDasharray: SPINNER_DASH_ARRAY, strokeDashoffset: SPINNER_OFFSETS.start }, + to: { strokeDasharray: SPINNER_DASH_ARRAY, strokeDashoffset: SPINNER_OFFSETS.end }, +}) + +export const orbitLeading = keyframes({ + 'from, to': { strokeDasharray: ORBIT_DASH_ARRAY, strokeDashoffset: ORBIT_LEADING_OFFSETS.start }, + '50%': { strokeDasharray: ORBIT_DASH_ARRAY, strokeDashoffset: ORBIT_LEADING_OFFSETS.middle }, +}) + +export const orbitTrailing = keyframes({ + from: { strokeDasharray: ORBIT_DASH_ARRAY, strokeDashoffset: ORBIT_TRAILING_OFFSETS.start }, + '50%': { strokeDasharray: ORBIT_DASH_ARRAY, strokeDashoffset: ORBIT_TRAILING_OFFSETS.middle }, + to: { strokeDasharray: ORBIT_DASH_ARRAY, strokeDashoffset: ORBIT_TRAILING_OFFSETS.end }, +}) diff --git a/ui-parts/progress/src/circle/indicator/animation/keyframes.ts b/ui-parts/progress/src/circle/indicator/animation/keyframes.ts deleted file mode 100644 index 3b8c12a45..000000000 --- a/ui-parts/progress/src/circle/indicator/animation/keyframes.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { SegmentFrame } from './interfaces.js' - -import { assignInlineVars } from '@vanilla-extract/dynamic' - -export const getSegmentKeyframes = ( - frames: ReadonlyArray, - variables: { start: string; length: string }, - easing = 'linear' -): Array => { - const keyframes = frames.map(({ at, start, end }) => ({ - offset: at, - easing, - ...assignInlineVars({ - [variables.start]: String(start), - [variables.length]: String(end - start), - }), - })) - if (!keyframes.length) return getSegmentKeyframes([{ at: 0, start: 0, end: 0 }], variables) - if (keyframes[0].offset > 0) keyframes.unshift({ ...keyframes[0], offset: 0 }) - if (keyframes[keyframes.length - 1].offset < 1) - keyframes.push({ ...keyframes[keyframes.length - 1], offset: 1 }) - return keyframes -} diff --git a/ui-parts/progress/src/circle/indicator/animation/styles.css.ts b/ui-parts/progress/src/circle/indicator/animation/styles.css.ts deleted file mode 100644 index 7ddf5593a..000000000 --- a/ui-parts/progress/src/circle/indicator/animation/styles.css.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { style } from '@vanilla-extract/css' - -import { animations } from '@atls-ui/theme/tokens' - -import { segmentLength } from '../styles/base.css.js' - -export const valueTransitionStyles = style({ - transitionProperty: segmentLength.slice(4, -1), - transitionDuration: animations.duration.md, - transitionTimingFunction: animations.easing.easeOut, - '@media': { - '(prefers-reduced-motion: reduce)': { transitionDuration: animations.duration.none }, - }, -}) diff --git a/ui-parts/progress/src/circle/indicator/animation/useAnimation.ts b/ui-parts/progress/src/circle/indicator/animation/useAnimation.ts deleted file mode 100644 index fd74c1b4a..000000000 --- a/ui-parts/progress/src/circle/indicator/animation/useAnimation.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { RefObject } from 'react' - -import type { CircleProgressAnimation } from './interfaces.js' - -import { useEffect } from 'react' - -import { MILLISECONDS_PER_SECOND } from './constants.js' -import { STATIC_ANIMATION_DURATION } from './constants.js' -import { segmentStart } from '../styles/base.css.js' -import { segmentLength } from '../styles/base.css.js' -import { getSegmentKeyframes } from './keyframes.js' - -export const useAnimation = ( - ref: RefObject, - animation: CircleProgressAnimation | undefined -): void => { - useEffect(() => { - const element = ref.current - const view = element?.ownerDocument.defaultView - if (!element || !view || !animation) return undefined - const duration = - Number.parseFloat(animation.duration) * - (animation.duration.endsWith('ms') ? 1 : MILLISECONDS_PER_SECOND) - const motion = view.matchMedia('(prefers-reduced-motion: reduce)') - const players = Array.from(element.querySelectorAll('rect')).map((segment, index) => - segment.animate( - getSegmentKeyframes( - animation.segments[index].frames, - { start: segmentStart, length: segmentLength }, - animation.easing - ), - { - duration: duration > 0 ? duration : STATIC_ANIMATION_DURATION, - iterations: Infinity, - fill: 'both', - } - )) - const update = (): void => { - players.forEach((player) => { - if (motion.matches || duration <= 0) { - player.pause() - player.currentTime = 0 - } else { - player.play() - } - }) - } - update() - motion.addEventListener('change', update) - return () => { - players.forEach((player) => { - player.cancel() - }) - motion.removeEventListener('change', update) - } - }, [ref, animation]) -} diff --git a/ui-parts/progress/src/circle/indicator/animation/variants.ts b/ui-parts/progress/src/circle/indicator/animation/variants.ts index 0fe87470c..42e708316 100644 --- a/ui-parts/progress/src/circle/indicator/animation/variants.ts +++ b/ui-parts/progress/src/circle/indicator/animation/variants.ts @@ -2,50 +2,18 @@ import type { CircleProgressAnimation } from './interfaces.js' import { animations } from '@atls-ui/theme/tokens' -import { SPINNER_ARC_LENGTH } from './constants.js' -import { ORBIT_ARC_LENGTH } from './constants.js' -import { ORBIT_JOIN_PHASE } from './constants.js' -import { ORBIT_JOIN_TRAVEL } from './constants.js' - +import { orbitLeading } from './keyframes.css.js' +import { orbitTrailing } from './keyframes.css.js' +import { spinner } from './keyframes.css.js' export const circleProgressAnimations = { spinner: { duration: `${animations.loopDuration.sm}ms`, easing: animations.easing.linear, - segments: [ - { - frames: [ - { at: 0, start: 0, end: SPINNER_ARC_LENGTH }, - { at: 1, start: 1, end: 1 + SPINNER_ARC_LENGTH }, - ], - }, - ], + segments: [spinner], }, orbit: { duration: `${animations.loopDuration.md}ms`, easing: `cubic-bezier(${animations.curves.smooth.join(', ')})`, - segments: [ - { - frames: [ - { at: 0, start: 1 - ORBIT_ARC_LENGTH, end: 1 }, - { - at: ORBIT_JOIN_PHASE, - start: 1 + ORBIT_JOIN_TRAVEL - ORBIT_ARC_LENGTH, - end: 1 + ORBIT_JOIN_TRAVEL, - }, - { at: 1, start: 1 - ORBIT_ARC_LENGTH, end: 1 }, - ], - }, - { - frames: [ - { at: 0, start: 1, end: 1 + ORBIT_ARC_LENGTH }, - { - at: ORBIT_JOIN_PHASE, - start: 1 + ORBIT_JOIN_TRAVEL, - end: 1 + ORBIT_JOIN_TRAVEL + ORBIT_ARC_LENGTH, - }, - { at: 1, start: 2, end: 2 + ORBIT_ARC_LENGTH }, - ], - }, - ], + segments: [orbitLeading, orbitTrailing], }, } satisfies Record diff --git a/ui-parts/progress/src/circle/indicator/component.tsx b/ui-parts/progress/src/circle/indicator/component.tsx index b81351ee2..717d0f2ef 100644 --- a/ui-parts/progress/src/circle/indicator/component.tsx +++ b/ui-parts/progress/src/circle/indicator/component.tsx @@ -1,81 +1,48 @@ import type { ReactNode } from 'react' -import type { ContourStyles } from '../styles/shape/interfaces.js' import type { CircleProgressAnimation } from './animation/interfaces.js' -import type { IndicatorAppearance } from './styles/appearance/interfaces.js' -import type { IndicatorShape } from './styles/shape/interfaces.js' -import { assignInlineVars } from '@vanilla-extract/dynamic' -import { clsx } from 'clsx' -import { useId } from 'react' -import { useRef } from 'react' +import { animations } from '@atls-ui/theme/tokens' +import { opacity } from '@atls-ui/theme/tokens' import { PROGRESS_MAX } from '../constants.js' -import { valueTransitionStyles } from './animation/styles.css.js' -import { useAnimation } from './animation/useAnimation.js' -import { segmentStyles } from './styles/base.css.js' -import { segmentLength } from './styles/base.css.js' +import { movingStyles } from './styles/base.css.js' +import { valueStyles } from './styles/base.css.js' export const Indicator = ({ - contour, - strokeWidth, - appearance, + href, value, animation, }: { - contour: ContourStyles - strokeWidth: IndicatorShape['strokeWidth'] - appearance: IndicatorAppearance + href: string value?: number animation: CircleProgressAnimation }): ReactNode => { - const maskId = useId() - const maskRef = useRef(null) - useAnimation(maskRef, value === undefined ? animation : undefined) - const segments = value === undefined ? animation.segments : [{ frames: [] }] - - return ( - <> - - - - - {segments.map((_, index) => ( - - ))} - - - - -
- - ) + ) + } + return animation.segments.map((animationName, index) => ( + + )) } diff --git a/ui-parts/progress/src/circle/indicator/styles/base.css.ts b/ui-parts/progress/src/circle/indicator/styles/base.css.ts index d0fb6a973..76319259c 100644 --- a/ui-parts/progress/src/circle/indicator/styles/base.css.ts +++ b/ui-parts/progress/src/circle/indicator/styles/base.css.ts @@ -1,16 +1,30 @@ -import { createVar } from '@vanilla-extract/css' -import { style } from '@vanilla-extract/css' +import { style } from '@vanilla-extract/css' -import { SEGMENT_VISIBILITY_THRESHOLD } from './constants.js' +import { animations } from '@atls-ui/theme/tokens' -export const segmentStart = createVar({ syntax: '', inherits: false, initialValue: '0' }) -export const segmentLength = createVar({ syntax: '', inherits: false, initialValue: '0' }) - -export const segmentStyles = style({ - strokeDasharray: `clamp(0, ${segmentLength}, 1) calc(1 - clamp(0, ${segmentLength}, 1))`, - strokeDashoffset: `calc(${segmentStart} + ${segmentLength})`, +const segmentStyles = style({ + stroke: 'white', + strokeLinecap: 'round', transform: 'scaleX(-1)', transformBox: 'fill-box', transformOrigin: 'center', - opacity: `clamp(0, calc((${segmentLength} - ${SEGMENT_VISIBILITY_THRESHOLD}) * ${1 / SEGMENT_VISIBILITY_THRESHOLD}), 1)`, }) +export const movingStyles = style([ + segmentStyles, + { + animationIterationCount: 'infinite', + animationFillMode: 'both', + '@media': { '(prefers-reduced-motion: reduce)': { animationPlayState: 'paused' } }, + }, +]) +export const valueStyles = style([ + segmentStyles, + { + transitionProperty: 'stroke-dasharray, stroke-dashoffset, opacity', + transitionDuration: animations.duration.md, + transitionTimingFunction: animations.easing.easeOut, + '@media': { + '(prefers-reduced-motion: reduce)': { transitionDuration: animations.duration.none }, + }, + }, +]) diff --git a/ui-parts/progress/src/circle/indicator/styles/constants.ts b/ui-parts/progress/src/circle/indicator/styles/constants.ts deleted file mode 100644 index d4bfa44b8..000000000 --- a/ui-parts/progress/src/circle/indicator/styles/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const SEGMENT_VISIBILITY_THRESHOLD = 1e-9 diff --git a/ui-parts/progress/src/circle/indicator/styles/shape/interfaces.ts b/ui-parts/progress/src/circle/indicator/styles/shape/interfaces.ts index 44233916d..6147443ed 100644 --- a/ui-parts/progress/src/circle/indicator/styles/shape/interfaces.ts +++ b/ui-parts/progress/src/circle/indicator/styles/shape/interfaces.ts @@ -1,6 +1,4 @@ -import type { CSSProperties } from 'react' - export interface IndicatorShape { overlap?: number - strokeWidth: NonNullable + strokeWidth: number | '0' | `${number}px` } diff --git a/ui-parts/progress/src/circle/label/component.tsx b/ui-parts/progress/src/circle/label/component.tsx index 39c92f651..d55e2e615 100644 --- a/ui-parts/progress/src/circle/label/component.tsx +++ b/ui-parts/progress/src/circle/label/component.tsx @@ -1,12 +1,11 @@ -import type { ReactNode } from 'react' +import type { ReactNode } from 'react' -import type { LabelShape } from './styles/shape/interfaces.js' +import type { LabelShape } from './styles/shape/interfaces.js' -import { useTheme } from '@atls-ui-parts/theme' +import { useTheme } from '@atls-ui-parts/theme' -import { labelStyles } from './styles/base.css.js' -import { labelReserveStyles } from './styles/base.css.js' -import { labelValueStyles } from './styles/base.css.js' +import { labelStyles } from './styles/base.css.js' +import { labelValueStyles } from './styles/base.css.js' export const Label = ({ value, @@ -22,9 +21,6 @@ export const Label = ({ typeof shape.typography === 'function' ? shape.typography(theme) : shape.typography return ( - {value === undefined ? null : `${Math.round(value)}%`} diff --git a/ui-parts/progress/src/circle/label/styles/base.css.ts b/ui-parts/progress/src/circle/label/styles/base.css.ts index 8f9cf8c0a..132e5c773 100644 --- a/ui-parts/progress/src/circle/label/styles/base.css.ts +++ b/ui-parts/progress/src/circle/label/styles/base.css.ts @@ -4,6 +4,8 @@ export const labelStyles = style({ display: 'inline-grid', whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums', + selectors: { + '&::before': { content: '"100%"', gridArea: '1 / 1', visibility: 'hidden' }, + }, }) -export const labelReserveStyles = style({ gridArea: '1 / 1', visibility: 'hidden' }) export const labelValueStyles = style({ gridArea: '1 / 1', textAlign: 'center' }) diff --git a/ui-parts/progress/src/circle/stories/constants.ts b/ui-parts/progress/src/circle/stories/constants.ts new file mode 100644 index 000000000..e6014e1fa --- /dev/null +++ b/ui-parts/progress/src/circle/stories/constants.ts @@ -0,0 +1,6 @@ +export const ARC_DASH_ARRAY = '0.1 0.9' +export const THREE_ARCS_OFFSETS = [ + [0.1, 1.1], + [0.5, 1.5], + [0.9, 1.9], +] as const diff --git a/ui-parts/progress/src/circle/stories.tsx b/ui-parts/progress/src/circle/stories/stories.tsx similarity index 75% rename from ui-parts/progress/src/circle/stories.tsx rename to ui-parts/progress/src/circle/stories/stories.tsx index 56a5d6581..0421d69de 100644 --- a/ui-parts/progress/src/circle/stories.tsx +++ b/ui-parts/progress/src/circle/stories/stories.tsx @@ -1,15 +1,17 @@ import type { Meta } from '@storybook/react' import type { StoryObj } from '@storybook/react' -import type { CircleProgressAnimation } from './indicator/animation/interfaces.js' -import type { CircleProgressProps } from './interfaces.js' +import type { CircleProgressAnimation } from '../../index.js' +import type { CircleProgressProps } from '../../index.js' import { useTheme } from '@atls-ui-parts/theme' import { spacing } from '@atls-ui/theme/tokens' +import { animations } from '@atls-ui/theme/tokens' -import { CircleProgress } from './component.js' -import { circleProgressAnimations } from './indicator/animation/variants.js' -import { circleProgressShapes } from './styles/shape/variants.js' +import { CircleProgress } from '../../index.js' +import { circleProgressAnimations } from '../../index.js' +import { circleProgressShapes } from '../../index.js' +import { threeArcs } from './styles.css.js' const storyShapes = { ...circleProgressShapes, @@ -27,28 +29,9 @@ const storyShapes = { const storyAnimations = { ...circleProgressAnimations, custom: { - duration: '3s', - easing: 'linear', - segments: [ - { - frames: [ - { at: 0, start: 0, end: 0.1 }, - { at: 1, start: 1, end: 1.1 }, - ], - }, - { - frames: [ - { at: 0, start: 0.4, end: 0.5 }, - { at: 1, start: 1.4, end: 1.5 }, - ], - }, - { - frames: [ - { at: 0, start: 0.8, end: 0.9 }, - { at: 1, start: 1.8, end: 1.9 }, - ], - }, - ], + duration: `${animations.loopDuration.md}ms`, + easing: animations.easing.linear, + segments: threeArcs, }, } satisfies Record @@ -65,8 +48,8 @@ const CustomCircle = ({ indeterminate, indicatorBackground, ...args }: StoryArgs animation={ args.animation ?? { ...circleProgressAnimations.spinner, - duration: '2s', - easing: 'ease-in-out', + duration: `${animations.loopDuration.sm}ms`, + easing: animations.easing.easeInOut, } } appearance={{ diff --git a/ui-parts/progress/src/circle/stories/styles.css.ts b/ui-parts/progress/src/circle/stories/styles.css.ts new file mode 100644 index 000000000..e9de1bfe0 --- /dev/null +++ b/ui-parts/progress/src/circle/stories/styles.css.ts @@ -0,0 +1,11 @@ +import { keyframes } from '@vanilla-extract/css' + +import { ARC_DASH_ARRAY } from './constants.js' +import { THREE_ARCS_OFFSETS } from './constants.js' + +const arc = (from: number, to: number): string => + keyframes({ + from: { strokeDasharray: ARC_DASH_ARRAY, strokeDashoffset: from }, + to: { strokeDasharray: ARC_DASH_ARRAY, strokeDashoffset: to }, + }) +export const threeArcs = THREE_ARCS_OFFSETS.map(([from, to]) => arc(from, to)) diff --git a/ui-parts/progress/src/circle/styles/shape/constants.ts b/ui-parts/progress/src/circle/styles/shape/constants.ts deleted file mode 100644 index 13f05aca6..000000000 --- a/ui-parts/progress/src/circle/styles/shape/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const PERCENTAGE_SCALE = 100 -export const MAX_RADIUS_RATIO = 0.5 -export const SVG_DIAGONAL_RATIO = Math.SQRT1_2 diff --git a/ui-parts/progress/src/circle/styles/shape/interfaces.ts b/ui-parts/progress/src/circle/styles/shape/interfaces.ts index 322254eee..ea129ff56 100644 --- a/ui-parts/progress/src/circle/styles/shape/interfaces.ts +++ b/ui-parts/progress/src/circle/styles/shape/interfaces.ts @@ -1,5 +1,3 @@ -import type { SVGAttributes } from 'react' - import type { BoxShape } from '../../box/styles/shape/interfaces.js' import type { ContainerShape } from '../../container/styles/shape/interfaces.js' import type { IndicatorShape } from '../../indicator/styles/shape/interfaces.js' @@ -11,14 +9,3 @@ export interface CircleProgressShape { indicator: IndicatorShape label: LabelShape } -export type ContourStyles = Pick< - SVGAttributes, - 'height' | 'rx' | 'ry' | 'width' | 'x' | 'y' -> - -export interface ResolvedCircleProgressShape { - padding: string - paintPadding: string - strokeWidth: string - contour: ContourStyles -} diff --git a/ui-parts/progress/src/circle/styles/shape/resolve.ts b/ui-parts/progress/src/circle/styles/shape/resolve.ts deleted file mode 100644 index 08716dc85..000000000 --- a/ui-parts/progress/src/circle/styles/shape/resolve.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { CircleProgressShape } from './interfaces.js' -import type { ResolvedCircleProgressShape } from './interfaces.js' - -import { spacing } from '@atls-ui/theme/tokens' - -import { PAINT_PIXEL_SIZE } from '../../constants.js' -import { STROKE_CENTER_RATIO } from '../../constants.js' -import { DEFAULT_INDICATOR_OVERLAP } from '../../indicator/styles/shape/constants.js' -import { MAX_RADIUS_RATIO } from './constants.js' -import { PERCENTAGE_SCALE } from './constants.js' -import { SVG_DIAGONAL_RATIO } from './constants.js' - -const percentage = (value: string): number | undefined => { - const normalized = value.trim() - if (!normalized.endsWith('%')) return undefined - const number = Number(normalized.slice(0, -1)) - return Number.isFinite(number) ? number / PERCENTAGE_SCALE : undefined -} - -const length = (value: number | string): string => - typeof value === 'number' || value.trim() === '0' ? `${Number(value)}px` : value - -export const resolveShape = (shape: CircleProgressShape): ResolvedCircleProgressShape => { - const { overlap = DEFAULT_INDICATOR_OVERLAP } = shape.indicator - const rawStroke = length(shape.indicator.strokeWidth) - const strokeRatio = percentage(rawStroke) - const strokeWidth = - strokeRatio === undefined - ? rawStroke - : `calc(hypot(100cqw, 100cqh) * ${strokeRatio * SVG_DIAGONAL_RATIO})` - const containerPadding = shape.container?.padding - const padding = length( - containerPadding ?? - (strokeRatio === undefined ? `calc(${rawStroke} / 2)` : spacing.component.none) - ) - const offset = `calc(${strokeWidth} * (${STROKE_CENTER_RATIO} - ${overlap}))` - const inset = `calc(${padding} - ${offset})` - const paintPadding = `calc(${strokeWidth} + ${PAINT_PIXEL_SIZE})` - const width = `calc(100cqw - 2 * ${inset})` - const height = `calc(100cqh - 2 * ${inset})` - const radiusRatio = percentage(shape.box.radius) - const radius = `min(max(0px, calc(${length(shape.box.radius)} + ${offset})), ${width} / 2, ${height} / 2)` - const axisRadius = (axis: string): string => - radiusRatio === undefined - ? radius - : `max(0px, calc((100${axis} - 2 * ${padding}) * ${Math.min(radiusRatio, MAX_RADIUS_RATIO)} + ${offset}))` - return { - padding, - paintPadding, - strokeWidth, - contour: { - x: `calc(${inset} + ${paintPadding})`, - y: `calc(${inset} + ${paintPadding})`, - width, - height, - rx: axisRadius('cqw'), - ry: axisRadius('cqh'), - }, - } -} diff --git a/ui-parts/progress/src/circle/styles/shape/variants.ts b/ui-parts/progress/src/circle/styles/shape/variants.ts index 09fd98688..e25c1caf1 100644 --- a/ui-parts/progress/src/circle/styles/shape/variants.ts +++ b/ui-parts/progress/src/circle/styles/shape/variants.ts @@ -1,6 +1,6 @@ import type { CircleProgressShape } from './interfaces.js' -import { boxShapes } from '../../box/styles/shape/variants.js' +import { boxShape } from '../../box/styles/shape/variants.js' import { containerShapes } from '../../container/styles/shape/variants.js' import { indicatorShapes } from '../../indicator/styles/shape/variants.js' import { labelShapes } from '../../label/styles/shape/variants.js' @@ -11,37 +11,37 @@ export const circleProgressShapes: Record< > = { xs2: { container: containerShapes.xs2, - box: boxShapes.xs2, + box: { ...boxShape }, indicator: indicatorShapes.xs2, label: labelShapes.xs2, }, xs: { container: containerShapes.xs, - box: boxShapes.xs, + box: { ...boxShape }, indicator: indicatorShapes.xs, label: labelShapes.xs, }, sm: { container: containerShapes.sm, - box: boxShapes.sm, + box: { ...boxShape }, indicator: indicatorShapes.sm, label: labelShapes.sm, }, md: { container: containerShapes.md, - box: boxShapes.md, + box: { ...boxShape }, indicator: indicatorShapes.md, label: labelShapes.md, }, lg: { container: containerShapes.lg, - box: boxShapes.lg, + box: { ...boxShape }, indicator: indicatorShapes.lg, label: labelShapes.lg, }, xl: { container: containerShapes.xl, - box: boxShapes.xl, + box: { ...boxShape }, indicator: indicatorShapes.xl, label: labelShapes.xl, }, diff --git a/ui-parts/progress/src/circle/track/component.tsx b/ui-parts/progress/src/circle/track/component.tsx index 1eac846d0..c917507e8 100644 --- a/ui-parts/progress/src/circle/track/component.tsx +++ b/ui-parts/progress/src/circle/track/component.tsx @@ -1,23 +1,41 @@ -import type { ReactNode } from 'react' +import type { ReactNode } from 'react' -import type { IndicatorShape } from '../indicator/styles/shape/interfaces.js' -import type { ContourStyles } from '../styles/shape/interfaces.js' +import type { CircleProgressAnimation } from '../indicator/animation/interfaces.js' +import type { CircleProgressAppearance } from '../styles/appearance/interfaces.js' + +import { useId } from 'react' + +import { Indicator } from '../indicator/component.js' +import { lineStyles } from './styles/track.css.js' +import { layerStyles } from './styles/track.css.js' +import { trackStyles } from './styles/track.css.js' export const Track = ({ - contour, - strokeWidth, - color, + appearance, + value, + animation, }: { - contour: ContourStyles - strokeWidth: IndicatorShape['strokeWidth'] - color: string -}): ReactNode => ( - -) + appearance: CircleProgressAppearance + value?: number + animation: CircleProgressAnimation +}): ReactNode => { + const id = useId() + const maskId = useId() + return ( +