@tpzdsp/next-toolkit 2.5.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +21 -12
- package/src/assets/styles/globals.css +75 -95
- package/src/assets/styles/ol.css +57 -16
- package/src/assets/styles/utils.css +80 -0
- package/src/components/Accordion/Accordion.css +85 -0
- package/src/components/Accordion/Accordion.stories.tsx +264 -0
- package/src/components/Accordion/Accordion.tsx +98 -0
- package/src/components/Alert/Alert.css +129 -0
- package/src/components/Alert/Alert.stories.tsx +291 -0
- package/src/components/Alert/Alert.tsx +76 -0
- package/src/components/BackLink/BackLink.css +12 -0
- package/src/components/BackLink/BackLink.stories.tsx +52 -0
- package/src/components/BackLink/BackLink.tsx +44 -0
- package/src/components/BackToTop/BackToTop.css +23 -0
- package/src/components/BackToTop/BackToTop.stories.tsx +41 -0
- package/src/components/BackToTop/BackToTop.tsx +48 -0
- package/src/components/Breadcrumb/Breadcrumb.css +42 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +94 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +135 -0
- package/src/components/Button/Button.css +229 -0
- package/src/components/Button/Button.stories.tsx +140 -20
- package/src/components/Button/Button.tsx +53 -28
- package/src/components/Button/ButtonSkeleton.stories.tsx +50 -0
- package/src/components/Button/ButtonSkeleton.tsx +14 -0
- package/src/components/ButtonGroup/ButtonGroup.css +52 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +156 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +50 -0
- package/src/components/ButtonLink/ButtonLink.css +114 -0
- package/src/components/ButtonLink/ButtonLink.stories.tsx +38 -51
- package/src/components/ButtonLink/ButtonLink.tsx +54 -23
- package/src/components/Card/Card.css +13 -0
- package/src/components/Card/Card.stories.tsx +98 -57
- package/src/components/Card/Card.tsx +4 -13
- package/src/components/CardGroup/CardGroup.css +10 -0
- package/src/components/CardGroup/CardGroup.stories.tsx +81 -0
- package/src/components/CardGroup/CardGroup.tsx +9 -0
- package/src/components/Checkbox/Checkbox.css +49 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +86 -0
- package/src/components/Checkbox/Checkbox.tsx +32 -0
- package/src/components/Chip/Chip.css +54 -0
- package/src/components/Chip/Chip.stories.tsx +94 -0
- package/src/components/Chip/Chip.tsx +34 -0
- package/src/components/CookieBanner/CookieBanner.css +19 -0
- package/src/components/CookieBanner/CookieBanner.stories.tsx +52 -0
- package/src/components/CookieBanner/CookieBanner.tsx +55 -0
- package/src/components/CopyButton/CopyButton.stories.tsx +28 -0
- package/src/components/CopyButton/CopyButton.tsx +65 -0
- package/src/components/DateInput/DateInput.css +13 -0
- package/src/components/DateInput/DateInput.stories.tsx +131 -0
- package/src/components/DateInput/DateInput.test.tsx +21 -0
- package/src/components/DateInput/DateInput.tsx +98 -0
- package/src/components/Details/Details.css +28 -0
- package/src/components/Details/Details.stories.tsx +48 -0
- package/src/components/Details/Details.tsx +41 -0
- package/src/components/Dropdown/Dropdown.css +81 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +131 -0
- package/src/components/Dropdown/Dropdown.tsx +69 -0
- package/src/components/ErrorBoundary/ErrorBoundary.stories.tsx +4 -39
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +7 -4
- package/src/components/ErrorBoundary/ErrorFallback.tsx +32 -66
- package/src/components/ErrorModal/ErrorModal.css +32 -0
- package/src/components/ErrorModal/ErrorModal.stories.tsx +101 -0
- package/src/components/ErrorModal/ErrorModal.tsx +120 -0
- package/src/components/ErrorText/ErrorText.css +22 -0
- package/src/components/ErrorText/ErrorText.stories.tsx +42 -27
- package/src/components/ErrorText/ErrorText.tsx +10 -8
- package/src/components/ExternalLink/ExternalLink.css +12 -0
- package/src/components/ExternalLink/ExternalLink.stories.tsx +43 -0
- package/src/components/ExternalLink/ExternalLink.tsx +43 -0
- package/src/components/Fieldset/Fieldset.css +103 -0
- package/src/components/Fieldset/Fieldset.stories.tsx +304 -0
- package/src/components/Fieldset/Fieldset.tsx +38 -0
- package/src/components/FileUpload/FileUpload.css +85 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +106 -0
- package/src/components/FileUpload/FileUpload.tsx +99 -0
- package/src/components/{layout/footer → Footer}/Copyright.tsx +4 -2
- package/src/components/Footer/Footer.stories.tsx +24 -0
- package/src/components/Footer/Footer.tsx +41 -0
- package/src/components/Footer/Licence.tsx +18 -0
- package/src/components/{layout/footer → Footer}/MetaLinks.tsx +8 -3
- package/src/components/Footer/Small/SmallFooter.tsx +43 -42
- package/src/components/Form/FormGroup.css +18 -0
- package/src/components/Form/FormGroup.stories.tsx +87 -0
- package/src/components/Form/FormGroup.tsx +16 -0
- package/src/components/{layout/header → Header}/Header.stories.tsx +26 -12
- package/src/components/Header/Header.test.tsx +87 -0
- package/src/components/Header/Header.tsx +303 -0
- package/src/components/Header/HeaderAppContent.tsx +120 -0
- package/src/components/Heading/Heading.css +40 -0
- package/src/components/Heading/Heading.stories.tsx +15 -5
- package/src/components/Heading/Heading.tsx +21 -44
- package/src/components/Heading/HeadingSkeleton.stories.tsx +30 -0
- package/src/components/Heading/HeadingSkeleton.tsx +14 -0
- package/src/components/Hero/Hero.css +19 -0
- package/src/components/Hero/Hero.stories.tsx +41 -0
- package/src/components/Hero/Hero.tsx +14 -0
- package/src/components/HintText/HintText.css +5 -0
- package/src/components/HintText/HintText.stories.tsx +29 -0
- package/src/components/HintText/HintText.tsx +13 -0
- package/src/components/InfoBox/InfoBox.css +38 -0
- package/src/components/InfoBox/InfoBox.stories.tsx +51 -403
- package/src/components/InfoBox/InfoBox.tsx +31 -158
- package/src/components/Input/Input.css +77 -0
- package/src/components/Input/Input.stories.tsx +123 -0
- package/src/components/Input/Input.tsx +74 -0
- package/src/components/InputGroup/InputGroup.css +140 -0
- package/src/components/InputGroup/InputGroup.stories.tsx +125 -0
- package/src/components/InputGroup/InputGroup.tsx +47 -0
- package/src/components/InsetText/InsetText.css +5 -0
- package/src/components/InsetText/InsetText.stories.tsx +30 -0
- package/src/components/InsetText/InsetText.tsx +9 -0
- package/src/components/Keyboard/Keyboard.css +9 -0
- package/src/components/Keyboard/Keyboard.stories.tsx +63 -0
- package/src/components/Keyboard/Keyboard.tsx +30 -0
- package/src/components/Label/Label.css +27 -0
- package/src/components/Label/Label.stories.tsx +40 -0
- package/src/components/Label/Label.tsx +17 -0
- package/src/components/LayerSwitcher/LayerSwitcher.css +59 -0
- package/src/components/LayerSwitcher/LayerSwitcher.stories.tsx +112 -0
- package/src/components/LayerSwitcher/LayerSwitcher.tsx +61 -0
- package/src/components/Layout/401/401.stories.tsx +23 -0
- package/src/components/Layout/401/401.tsx +1 -0
- package/src/components/Layout/403/403.stories.tsx +23 -0
- package/src/components/Layout/403/403.tsx +21 -0
- package/src/components/Layout/404/404.stories.tsx +23 -0
- package/src/components/Layout/404/404.tsx +28 -0
- package/src/components/Layout/500/500.stories.tsx +56 -0
- package/src/components/Layout/500/500.tsx +63 -0
- package/src/components/Layout/ButtonGroup/ButtonGroup.css +52 -0
- package/src/components/Layout/ButtonGroup/ButtonGroup.stories.tsx +156 -0
- package/src/components/Layout/ButtonGroup/ButtonGroup.tsx +50 -0
- package/src/components/Layout/HeadingGroup/HeadingGroup.css +21 -0
- package/src/components/Layout/HeadingGroup/HeadingGroup.stories.tsx +84 -0
- package/src/components/Layout/HeadingGroup/HeadingGroup.tsx +9 -0
- package/src/components/Layout/MainWrapper/MainWrapper.css +12 -0
- package/src/components/Layout/MainWrapper/MainWrapper.stories.tsx +36 -0
- package/src/components/Layout/MainWrapper/MainWrapper.tsx +14 -0
- package/src/components/Layout/PageShell/PageShell.css +42 -0
- package/src/components/Layout/PageShell/PageShell.stories.tsx +108 -0
- package/src/components/Layout/PageShell/PageShell.tsx +31 -0
- package/src/components/Layout/ParagraphGroup/ParagraphGroup.css +5 -0
- package/src/components/Layout/ParagraphGroup/ParagraphGroup.stories.tsx +34 -0
- package/src/components/Layout/ParagraphGroup/ParagraphGroup.tsx +9 -0
- package/src/components/Layout/Stack/Stack.css +29 -0
- package/src/components/Layout/Stack/Stack.stories.tsx +83 -0
- package/src/components/Layout/Stack/Stack.tsx +19 -0
- package/src/components/Layout/WidthContainer/WidthContainer.css +17 -0
- package/src/components/Layout/WidthContainer/WidthContainer.stories.tsx +59 -0
- package/src/components/Layout/WidthContainer/WidthContainer.tsx +13 -0
- package/src/components/Legend/Legend.css +95 -0
- package/src/components/Legend/Legend.stories.tsx +81 -0
- package/src/components/Legend/Legend.tsx +32 -0
- package/src/components/Legend/LegendDot.tsx +15 -0
- package/src/components/Legend/LegendPanel.stories.tsx +101 -0
- package/src/components/Legend/LegendPanel.tsx +68 -0
- package/src/components/Legend/LegendSkeleton.stories.tsx +87 -0
- package/src/components/Legend/LegendSkeleton.tsx +73 -0
- package/src/components/LegendSelect/LegendSelect.css +8 -0
- package/src/components/LegendSelect/LegendSelect.stories.tsx +80 -0
- package/src/components/LegendSelect/LegendSelect.tsx +26 -0
- package/src/components/Link/Link.css +98 -0
- package/src/components/Link/Link.stories.tsx +70 -0
- package/src/components/Link/Link.tsx +52 -0
- package/src/components/LinkButton/LinkButton.css +67 -0
- package/src/components/LinkButton/LinkButton.stories.tsx +90 -42
- package/src/components/LinkButton/LinkButton.tsx +50 -63
- package/src/components/LinkList/LinkList.css +28 -0
- package/src/components/LinkList/LinkList.stories.tsx +46 -0
- package/src/components/LinkList/LinkList.tsx +23 -0
- package/src/components/List/Li.tsx +9 -0
- package/src/components/List/List.css +9 -0
- package/src/components/List/OrderedList.stories.tsx +36 -0
- package/src/components/List/OrderedList.tsx +9 -0
- package/src/components/List/UnorderedList.stories.tsx +36 -0
- package/src/components/List/UnorderedList.tsx +9 -0
- package/src/components/LoadingBox/LoadingBox.css +27 -0
- package/src/components/LoadingBox/LoadingBox.stories.tsx +66 -0
- package/src/components/LoadingBox/LoadingBox.tsx +40 -0
- package/src/components/Modal/Modal.css +114 -0
- package/src/components/Modal/Modal.stories.tsx +41 -160
- package/src/components/Modal/Modal.tsx +132 -75
- package/src/components/NoScriptBanner/NoScriptBanner.css +17 -0
- package/src/components/NoScriptBanner/NoScriptBanner.stories.tsx +46 -0
- package/src/components/NoScriptBanner/NoScriptBanner.tsx +26 -0
- package/src/components/Paragraph/Paragraph.css +22 -0
- package/src/components/Paragraph/Paragraph.stories.tsx +1 -42
- package/src/components/Paragraph/Paragraph.tsx +4 -3
- package/src/components/Paragraph/ParagraphSkeleton.stories.tsx +44 -0
- package/src/components/Paragraph/ParagraphSkeleton.tsx +33 -0
- package/src/components/PasswordInput/PasswordInput.css +3 -0
- package/src/components/PasswordInput/PasswordInput.stories.tsx +47 -0
- package/src/components/PasswordInput/PasswordInput.tsx +45 -0
- package/src/components/PhaseBanner/PhaseBanner.css +12 -0
- package/src/components/PhaseBanner/PhaseBanner.stories.tsx +61 -0
- package/src/components/PhaseBanner/PhaseBanner.tsx +17 -0
- package/src/components/Popover/Popover.css +43 -0
- package/src/components/Popover/Popover.stories.tsx +102 -0
- package/src/components/Popover/Popover.tsx +40 -0
- package/src/components/Radio/Radio.css +69 -0
- package/src/components/Radio/Radio.stories.tsx +169 -0
- package/src/components/Radio/Radio.tsx +56 -0
- package/src/components/Resizable/Resizable.css +86 -0
- package/src/components/Resizable/Resizable.stories.tsx +123 -0
- package/src/components/Resizable/Resizable.tsx +86 -0
- package/src/components/ScrollArea/ScrollArea.css +9 -0
- package/src/components/ScrollArea/ScrollArea.stories.tsx +42 -0
- package/src/components/ScrollArea/ScrollArea.tsx +11 -0
- package/src/components/SearchBox/SearchBox.stories.tsx +88 -0
- package/src/components/SearchBox/SearchBox.tsx +36 -0
- package/src/components/Select/AsyncSelect.stories.tsx +84 -0
- package/src/components/Select/AsyncSelect.tsx +41 -0
- package/src/components/Select/Select.css +194 -0
- package/src/components/Select/Select.stories.tsx +162 -0
- package/src/components/Select/Select.test.tsx +36 -0
- package/src/components/Select/Select.tsx +291 -0
- package/src/components/Select/SelectSkeleton.stories.tsx +51 -0
- package/src/components/Select/SelectSkeleton.tsx +23 -0
- package/src/components/Separator/Separator.css +41 -0
- package/src/components/Separator/Separator.stories.tsx +63 -0
- package/src/components/Separator/Separator.tsx +42 -0
- package/src/components/Sidebar/ResizableSidebar.tsx +118 -0
- package/src/components/Sidebar/Sidebar.css +203 -0
- package/src/components/Sidebar/Sidebar.stories.tsx +438 -0
- package/src/components/Sidebar/Sidebar.tsx +225 -0
- package/src/components/Skeleton/Skeleton.css +16 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +39 -0
- package/src/components/Skeleton/Skeleton.tsx +12 -0
- package/src/components/SkipLink/SkipLink.css +16 -0
- package/src/components/SkipLink/SkipLink.stories.tsx +40 -0
- package/src/components/SkipLink/SkipLink.tsx +15 -0
- package/src/components/Spinner/Spinner.css +30 -0
- package/src/components/Spinner/Spinner.stories.tsx +36 -0
- package/src/components/Spinner/Spinner.tsx +45 -0
- package/src/components/StartButton/StartButton.css +13 -0
- package/src/components/StartButton/StartButton.stories.tsx +68 -0
- package/src/components/StartButton/StartButton.tsx +50 -0
- package/src/components/SubmitButton/SubmitButton.stories.tsx +31 -0
- package/src/components/SubmitButton/SubmitButton.tsx +14 -0
- package/src/components/SummaryList/SummaryList.css +71 -0
- package/src/components/SummaryList/SummaryList.stories.tsx +211 -0
- package/src/components/SummaryList/SummaryList.tsx +41 -0
- package/src/components/SummaryList/SummaryListSkeleton.stories.tsx +67 -0
- package/src/components/SummaryList/SummaryListSkeleton.tsx +40 -0
- package/src/components/Tabs/Tabs.css +84 -0
- package/src/components/Tabs/Tabs.stories.tsx +133 -0
- package/src/components/Tabs/Tabs.tsx +66 -0
- package/src/components/Tag/Tag.css +8 -0
- package/src/components/Tag/Tag.stories.tsx +96 -0
- package/src/components/Tag/Tag.tsx +34 -0
- package/src/components/Textarea/Textarea.css +38 -0
- package/src/components/Textarea/Textarea.stories.tsx +131 -0
- package/src/components/Textarea/Textarea.tsx +50 -0
- package/src/components/TextareaCount/TextareaCount.css +17 -0
- package/src/components/TextareaCount/TextareaCount.stories.tsx +131 -0
- package/src/components/TextareaCount/TextareaCount.tsx +108 -0
- package/src/components/Tooltip/Tooltip.css +43 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +110 -0
- package/src/components/Tooltip/Tooltip.tsx +53 -0
- package/src/components/WarningText/WarningText.css +20 -0
- package/src/components/WarningText/WarningText.stories.tsx +29 -0
- package/src/components/WarningText/WarningText.tsx +17 -0
- package/src/components/index.ts +342 -61
- package/src/errors/errorDisplay.ts +70 -0
- package/src/errors/index.ts +1 -0
- package/src/http/constants.ts +1 -0
- package/src/http/fetch.ts +7 -3
- package/src/map/LayerSwitcherPanel.tsx +2 -173
- package/src/map/LegendShim.tsx +2 -0
- package/src/map/MapComponent.tsx +7 -17
- package/src/map/MapControlsOverlay.tsx +68 -175
- package/src/map/Popup.tsx +71 -24
- package/src/map/geocoder/Geocoder.test.tsx +46 -3
- package/src/map/geocoder/Geocoder.tsx +155 -278
- package/src/map/index.ts +1 -1
- package/src/types/utils.ts +0 -10
- package/src/utils/components.ts +96 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/utils.ts +0 -12
- package/src/assets/images/defra-logo.svg +0 -51
- package/src/assets/images/ea-logo.svg +0 -58
- package/src/assets/images/ogl.svg +0 -1
- package/src/components/Button/Button.test.tsx +0 -53
- package/src/components/ButtonLink/ButtonLink.test.tsx +0 -154
- package/src/components/Card/Card.test.tsx +0 -51
- package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +0 -75
- package/src/components/ErrorBoundary/ErrorFallback.test.tsx +0 -107
- package/src/components/ErrorText/ErrorText.test.tsx +0 -33
- package/src/components/Heading/Heading.test.tsx +0 -22
- package/src/components/Hint/Hint.stories.tsx +0 -58
- package/src/components/Hint/Hint.test.tsx +0 -33
- package/src/components/Hint/Hint.tsx +0 -12
- package/src/components/InfoBox/InfoBox.test.tsx +0 -330
- package/src/components/InfoBox/types.ts +0 -6
- package/src/components/LinkButton/LinkButton.test.tsx +0 -177
- package/src/components/Modal/Modal.test.tsx +0 -246
- package/src/components/NotificationBanner/NotificationBanner.stories.tsx +0 -45
- package/src/components/NotificationBanner/NotificationBanner.test.tsx +0 -58
- package/src/components/NotificationBanner/NotificationBanner.tsx +0 -45
- package/src/components/Paragraph/Paragraph.test.tsx +0 -10
- package/src/components/SlidingPanel/SlidingPanel.stories.tsx +0 -129
- package/src/components/SlidingPanel/SlidingPanel.test.tsx +0 -83
- package/src/components/SlidingPanel/SlidingPanel.tsx +0 -258
- package/src/components/accordion/Accordion.stories.tsx +0 -234
- package/src/components/accordion/Accordion.test.tsx +0 -192
- package/src/components/accordion/Accordion.tsx +0 -73
- package/src/components/backToTop/BackToTop.stories.tsx +0 -407
- package/src/components/backToTop/BackToTop.test.tsx +0 -57
- package/src/components/backToTop/BackToTop.tsx +0 -134
- package/src/components/chip/Chip.stories.tsx +0 -61
- package/src/components/chip/Chip.test.tsx +0 -31
- package/src/components/chip/Chip.tsx +0 -23
- package/src/components/container/Container.tsx +0 -42
- package/src/components/cookieBanner/CookieBanner.stories.tsx +0 -257
- package/src/components/cookieBanner/CookieBanner.test.tsx +0 -68
- package/src/components/cookieBanner/CookieBanner.tsx +0 -73
- package/src/components/divider/RuleDivider.stories.tsx +0 -254
- package/src/components/divider/RuleDivider.test.tsx +0 -164
- package/src/components/divider/RuleDivider.tsx +0 -23
- package/src/components/dropdown/DropdownMenu.test.tsx +0 -211
- package/src/components/dropdown/DropdownMenu.tsx +0 -108
- package/src/components/dropdown/useDropdownMenu.ts +0 -249
- package/src/components/form/Input.stories.tsx +0 -435
- package/src/components/form/Input.test.tsx +0 -206
- package/src/components/form/Input.tsx +0 -23
- package/src/components/form/TextArea.stories.tsx +0 -464
- package/src/components/form/TextArea.test.tsx +0 -232
- package/src/components/form/TextArea.tsx +0 -23
- package/src/components/layout/footer/Footer.tsx +0 -26
- package/src/components/layout/footer/Licence.tsx +0 -19
- package/src/components/layout/header/Header.test.tsx +0 -36
- package/src/components/layout/header/Header.tsx +0 -90
- package/src/components/layout/header/HeaderAuthClient.test.tsx +0 -45
- package/src/components/layout/header/HeaderAuthClient.tsx +0 -40
- package/src/components/layout/header/HeaderNavClient.test.tsx +0 -44
- package/src/components/layout/header/HeaderNavClient.tsx +0 -67
- package/src/components/link/ExternalLink.test.tsx +0 -102
- package/src/components/link/ExternalLink.tsx +0 -29
- package/src/components/link/Link.tsx +0 -26
- package/src/components/select/Select.stories.tsx +0 -336
- package/src/components/select/Select.test.tsx +0 -474
- package/src/components/select/Select.tsx +0 -125
- package/src/components/select/SelectSkeleton.stories.tsx +0 -194
- package/src/components/select/SelectSkeleton.test.tsx +0 -104
- package/src/components/select/SelectSkeleton.tsx +0 -23
- package/src/components/select/common.ts +0 -3
- package/src/components/select/index.ts +0 -18
- package/src/components/skipLink/SkipLink.stories.tsx +0 -346
- package/src/components/skipLink/SkipLink.test.tsx +0 -22
- package/src/components/skipLink/SkipLink.tsx +0 -49
- package/src/map/LegendPanel.tsx +0 -85
- /package/src/{components → assets}/images/DefraLogo.tsx +0 -0
- /package/src/{components → assets}/images/EaLogo.tsx +0 -0
- /package/src/{components → assets}/images/OglLogo.tsx +0 -0
- /package/src/components/{googleAnalytics → GoogleAnalytics}/GlobalVars.tsx +0 -0
- /package/src/components/{googleAnalytics → GoogleAnalytics}/GoogleAnalytics.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpzdsp/next-toolkit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "A reusable React component library for Next.js applications",
|
|
5
5
|
"packageManager": "pnpm@11.5.3",
|
|
6
6
|
"engines": {
|
|
@@ -132,17 +132,18 @@
|
|
|
132
132
|
"@commitlint/config-conventional": "^21.1.0",
|
|
133
133
|
"@commitlint/types": "^21.1.0",
|
|
134
134
|
"@floating-ui/react": "^0.27.17",
|
|
135
|
-
"@storybook/addon-docs": "10.
|
|
136
|
-
"@storybook/addon-links": "10.
|
|
137
|
-
"@storybook/addon-onboarding": "10.
|
|
138
|
-
"@storybook/react-vite": "10.
|
|
139
|
-
"@tailwindcss/
|
|
135
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
136
|
+
"@storybook/addon-links": "^10.4.6",
|
|
137
|
+
"@storybook/addon-onboarding": "^10.4.6",
|
|
138
|
+
"@storybook/react-vite": "^10.4.6",
|
|
139
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
140
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
140
141
|
"@tanstack/react-query": "^5.90.19",
|
|
141
142
|
"@testing-library/dom": "^10.4.1",
|
|
142
143
|
"@testing-library/jest-dom": "^6.6.4",
|
|
143
144
|
"@testing-library/react": "^16.3.0",
|
|
144
145
|
"@testing-library/user-event": "^14.6.1",
|
|
145
|
-
"@tpzdsp/eslint-config-dsp": "^
|
|
146
|
+
"@tpzdsp/eslint-config-dsp": "^5.0.0",
|
|
146
147
|
"@turf/turf": "^7.2.0",
|
|
147
148
|
"@types/geojson": "^7946.0.16",
|
|
148
149
|
"@types/jsonwebtoken": "^9.0.10",
|
|
@@ -152,12 +153,12 @@
|
|
|
152
153
|
"@vitejs/plugin-react": "^6.0.1",
|
|
153
154
|
"@vitest/coverage-v8": "^4.0.17",
|
|
154
155
|
"@vitest/eslint-plugin": "^1.3.4",
|
|
155
|
-
"autoprefixer": "^10.4.21",
|
|
156
156
|
"buffer": "^6.0.3",
|
|
157
|
+
"class-variance-authority": "^0.7.1",
|
|
157
158
|
"crypto-browserify": "^3.12.1",
|
|
158
159
|
"date-fns": "^4.1.0",
|
|
159
160
|
"eslint": "^9.39.4",
|
|
160
|
-
"eslint-plugin-storybook": "10.
|
|
161
|
+
"eslint-plugin-storybook": "^10.4.6",
|
|
161
162
|
"focus-trap": "^8.0.1",
|
|
162
163
|
"focus-trap-react": "^12.0.0",
|
|
163
164
|
"geojson": "^0.5.0",
|
|
@@ -168,22 +169,24 @@
|
|
|
168
169
|
"next": "^16.1.4",
|
|
169
170
|
"ol": "^10.6.1",
|
|
170
171
|
"ol-mapbox-style": "^13.0.1",
|
|
171
|
-
"postcss": "^8.5.
|
|
172
|
+
"postcss": "^8.5.15",
|
|
172
173
|
"prettier": "^3.8.1",
|
|
173
174
|
"process": "^0.11.10",
|
|
174
175
|
"proj4": "^2.19.10",
|
|
176
|
+
"radix-ui": "^1.6.0",
|
|
175
177
|
"react": "^19.2.1",
|
|
176
178
|
"react-dom": "^19.2.1",
|
|
177
179
|
"react-error-boundary": "^6.0.0",
|
|
178
180
|
"react-icons": "^5.5.0",
|
|
181
|
+
"react-resizable-panels": "^4.12.0",
|
|
179
182
|
"react-select": "^5.10.2",
|
|
180
183
|
"react-select-event": "^5.5.1",
|
|
181
184
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
182
185
|
"semantic-release": "^25.0.2",
|
|
183
|
-
"storybook": "10.
|
|
186
|
+
"storybook": "^10.4.6",
|
|
184
187
|
"stream-browserify": "^3.0.0",
|
|
185
188
|
"tailwind-merge": "^3.4.0",
|
|
186
|
-
"tailwindcss": "^3.
|
|
189
|
+
"tailwindcss": "^4.3.1",
|
|
187
190
|
"typescript": "^6.0.2",
|
|
188
191
|
"typescript-eslint": "^8.35.1",
|
|
189
192
|
"util": "^0.12.5",
|
|
@@ -197,6 +200,7 @@
|
|
|
197
200
|
"@floating-ui/react": "^0.27",
|
|
198
201
|
"@tanstack/react-query": "^5",
|
|
199
202
|
"@turf/turf": "^7",
|
|
203
|
+
"class-variance-authority": "^0.7.1",
|
|
200
204
|
"date-fns": "^4",
|
|
201
205
|
"focus-trap": "^8",
|
|
202
206
|
"focus-trap-react": "^12",
|
|
@@ -206,10 +210,12 @@
|
|
|
206
210
|
"ol": "^10",
|
|
207
211
|
"ol-mapbox-style": "^13",
|
|
208
212
|
"proj4": "^2",
|
|
213
|
+
"radix-ui": "^1.6.0",
|
|
209
214
|
"react": "^19",
|
|
210
215
|
"react-dom": "^19",
|
|
211
216
|
"react-error-boundary": "^6",
|
|
212
217
|
"react-icons": "^5",
|
|
218
|
+
"react-resizable-panels": "^4",
|
|
213
219
|
"react-select": "^5",
|
|
214
220
|
"zod": "^4"
|
|
215
221
|
},
|
|
@@ -250,6 +256,9 @@
|
|
|
250
256
|
"proj4": {
|
|
251
257
|
"optional": true
|
|
252
258
|
},
|
|
259
|
+
"react-resizable-panels": {
|
|
260
|
+
"optional": true
|
|
261
|
+
},
|
|
253
262
|
"react-select": {
|
|
254
263
|
"optional": true
|
|
255
264
|
},
|
|
@@ -1,97 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
@tailwind base;
|
|
3
|
-
@tailwind components;
|
|
4
|
-
@tailwind utilities;
|
|
1
|
+
@import '@tpzdsp/eslint-config-dsp/tailwindcss';
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
@import './utils.css';
|
|
4
|
+
@import '../../components/Button/Button.css';
|
|
5
|
+
@import '../../components/InfoBox/InfoBox.css';
|
|
6
|
+
@import '../../components/Layout/ButtonGroup/ButtonGroup.css';
|
|
7
|
+
@import '../../components/StartButton/StartButton.css';
|
|
8
|
+
@import '../../components/ButtonLink/ButtonLink.css';
|
|
9
|
+
@import '../../components/LinkButton/LinkButton.css';
|
|
10
|
+
@import '../../components/Fieldset/Fieldset.css';
|
|
11
|
+
@import '../../components/Label/Label.css';
|
|
12
|
+
@import '../../components/Link/Link.css';
|
|
13
|
+
@import '../../components/ExternalLink/ExternalLink.css';
|
|
14
|
+
@import '../../components/Modal/Modal.css';
|
|
15
|
+
@import '../../components/ErrorModal/ErrorModal.css';
|
|
16
|
+
@import '../../components/Separator/Separator.css';
|
|
17
|
+
@import '../../components/Checkbox/Checkbox.css';
|
|
18
|
+
@import '../../components/Radio/Radio.css';
|
|
19
|
+
@import '../../components/Form/FormGroup.css';
|
|
20
|
+
@import '../../components/Input/Input.css';
|
|
21
|
+
@import '../../components/DateInput/DateInput.css';
|
|
22
|
+
@import '../../components/InputGroup/InputGroup.css';
|
|
23
|
+
@import '../../components/PasswordInput/PasswordInput.css';
|
|
24
|
+
@import '../../components/Textarea/Textarea.css';
|
|
25
|
+
@import '../../components/TextareaCount/TextareaCount.css';
|
|
26
|
+
@import '../../components/FileUpload/FileUpload.css';
|
|
27
|
+
@import '../../components/Tag/Tag.css';
|
|
28
|
+
@import '../../components/PhaseBanner/PhaseBanner.css';
|
|
29
|
+
@import '../../components/Alert/Alert.css';
|
|
30
|
+
@import '../../components/Chip/Chip.css';
|
|
31
|
+
@import '../../components/Select/Select.css';
|
|
32
|
+
@import '../../components/LegendSelect/LegendSelect.css';
|
|
33
|
+
@import '../../components/Accordion/Accordion.css';
|
|
34
|
+
@import '../../components/Skeleton/Skeleton.css';
|
|
35
|
+
@import '../../components/Spinner/Spinner.css';
|
|
36
|
+
@import '../../components/LoadingBox/LoadingBox.css';
|
|
37
|
+
@import '../../components/Heading/Heading.css';
|
|
38
|
+
@import '../../components/Paragraph/Paragraph.css';
|
|
39
|
+
@import '../../components/InsetText/InsetText.css';
|
|
40
|
+
@import '../../components/Tooltip/Tooltip.css';
|
|
41
|
+
@import '../../components/Popover/Popover.css';
|
|
42
|
+
@import '../../components/Dropdown/Dropdown.css';
|
|
43
|
+
@import '../../components/Tabs/Tabs.css';
|
|
44
|
+
@import '../../components/Sidebar/Sidebar.css';
|
|
45
|
+
@import '../../components/SkipLink/SkipLink.css';
|
|
46
|
+
@import '../../components/BackToTop/BackToTop.css';
|
|
47
|
+
@import '../../components/BackLink/BackLink.css';
|
|
48
|
+
@import '../../components/Breadcrumb/Breadcrumb.css';
|
|
49
|
+
@import '../../components/Keyboard/Keyboard.css';
|
|
50
|
+
@import '../../components/ScrollArea/ScrollArea.css';
|
|
51
|
+
@import '../../components/ErrorText/ErrorText.css';
|
|
52
|
+
@import '../../components/HintText/HintText.css';
|
|
53
|
+
@import '../../components/Details/Details.css';
|
|
54
|
+
@import '../../components/Resizable/Resizable.css';
|
|
55
|
+
@import '../../components/WarningText/WarningText.css';
|
|
56
|
+
@import '../../components/Card/Card.css';
|
|
57
|
+
@import '../../components/CardGroup/CardGroup.css';
|
|
58
|
+
@import '../../components/CookieBanner/CookieBanner.css';
|
|
59
|
+
@import '../../components/NoScriptBanner/NoScriptBanner.css';
|
|
60
|
+
@import '../../components/SummaryList/SummaryList.css';
|
|
61
|
+
@import '../../components/List/List.css';
|
|
62
|
+
@import '../../components/LinkList/LinkList.css';
|
|
63
|
+
@import '../../components/LayerSwitcher/LayerSwitcher.css';
|
|
64
|
+
@import '../../components/Legend/Legend.css';
|
|
65
|
+
@import '../../components/Layout/HeadingGroup/HeadingGroup.css';
|
|
66
|
+
@import '../../components/Layout/ParagraphGroup/ParagraphGroup.css';
|
|
67
|
+
@import '../../components/Layout/Stack/Stack.css';
|
|
68
|
+
@import '../../components/Hero/Hero.css';
|
|
69
|
+
@import '../../components/Dropdown/Dropdown.css';
|
|
70
|
+
@import '../../components/Layout/WidthContainer/WidthContainer.css';
|
|
71
|
+
@import '../../components/Layout/MainWrapper/MainWrapper.css';
|
|
72
|
+
@import '../../components/Layout/PageShell/PageShell.css';
|
|
26
73
|
|
|
27
|
-
/*
|
|
28
|
-
@
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
font-family: 'GDSTransport';
|
|
32
|
-
src: url('../fonts/gds-light-w2-v2.woff2') format('woff2');
|
|
33
|
-
font-weight: 400;
|
|
34
|
-
font-style: normal;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@font-face {
|
|
38
|
-
font-family: 'GDSTransport';
|
|
39
|
-
src: url('../fonts/gds-bold-w2-v2.woff2') format('woff2');
|
|
40
|
-
font-weight: 700;
|
|
41
|
-
font-style: normal;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Component-specific styles */
|
|
46
|
-
@layer components {
|
|
47
|
-
.focus-yellow {
|
|
48
|
-
@apply focus:border-focus focus:outline focus:outline-2 focus:outline-focus;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.library-button {
|
|
52
|
-
@apply inline-flex items-center justify-center rounded-md font-medium transition-colors;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.library-card {
|
|
56
|
-
@apply rounded-lg border border-gray-200 bg-white shadow-sm;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Button Styles */
|
|
60
|
-
.button {
|
|
61
|
-
--border: theme('borderWidth.form');
|
|
62
|
-
--shadow: var(--border);
|
|
63
|
-
|
|
64
|
-
padding: calc(theme('spacing.2') - var(--border)) theme('spacing.2')
|
|
65
|
-
calc(theme('spacing.2') - var(--border) - calc(var(--shadow) / 2));
|
|
66
|
-
|
|
67
|
-
box-shadow: 0 var(--shadow) 0 var(--tw-shadow-color);
|
|
68
|
-
|
|
69
|
-
&:focus:not(:active):not(:hover) {
|
|
70
|
-
box-shadow: 0 var(--shadow) 0 var(--tw-shadow-color);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&::before {
|
|
74
|
-
@apply absolute block content-[""];
|
|
75
|
-
|
|
76
|
-
top: calc(var(--border) * -1);
|
|
77
|
-
left: calc(var(--border) * -1);
|
|
78
|
-
right: calc(var(--border) * -1);
|
|
79
|
-
bottom: calc(calc(var(--border) + calc(var(--shadow) / 2)) * -1);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&:active::before {
|
|
83
|
-
top: calc(calc(var(--border) + var(--shadow)) * -1);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.input-height {
|
|
88
|
-
@apply h-[38px];
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* Utilities */
|
|
93
|
-
@layer utilities {
|
|
94
|
-
.text-balance {
|
|
95
|
-
text-wrap: balance;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
74
|
+
/* @source must follow all @imports as CSS drops imports that appear after any
|
|
75
|
+
non-import rule. This tells @tailwindcss/postcss to scan component source
|
|
76
|
+
files so utility classes used only in stories are always generated. */
|
|
77
|
+
@source "../../**/*.{tsx,ts,jsx,js}";
|
package/src/assets/styles/ol.css
CHANGED
|
@@ -16,12 +16,19 @@
|
|
|
16
16
|
* 3. Position the control container with absolute positioning
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
/* Values mirror cn-button-appearance-panel (Button.css) and the tokens it's
|
|
20
|
+
built from (utils.css's `panel` utility, --border-width-form,
|
|
21
|
+
--color-focus, --color-on-focus, --color-muted), this file can't reach
|
|
22
|
+
those directly (see the .map-fullscreen comment below for why), so they're
|
|
23
|
+
hardcoded here and need to stay in sync by hand. */
|
|
19
24
|
:root {
|
|
20
|
-
--focus-color: #ffdd00;
|
|
25
|
+
--focus-color: #ffdd00; /* --color-focus */
|
|
21
26
|
--focus-outline-color: #ffbf47;
|
|
22
|
-
--control-bg: #fff;
|
|
27
|
+
--control-bg: #fff; /* --color-panel */
|
|
23
28
|
--control-border: #505a5f;
|
|
24
|
-
--control-text: #0b0c0c;
|
|
29
|
+
--control-text: #0b0c0c; /* --color-on-focus, also matches control-border-color at rest */
|
|
30
|
+
--control-border-color: #0b0c0c; /* --color-panel-border */
|
|
31
|
+
--control-active-bg: #cecece; /* --color-muted, cn-button-appearance-panel's :active background */
|
|
25
32
|
--control-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
|
|
26
33
|
}
|
|
27
34
|
|
|
@@ -34,7 +41,7 @@
|
|
|
34
41
|
width: 40px !important;
|
|
35
42
|
height: 40px !important;
|
|
36
43
|
outline: none !important;
|
|
37
|
-
border: 2px solid
|
|
44
|
+
border: 2px solid var(--control-border-color) !important;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
.ol-btn {
|
|
@@ -65,18 +72,27 @@
|
|
|
65
72
|
margin: 0 auto;
|
|
66
73
|
}
|
|
67
74
|
|
|
68
|
-
|
|
75
|
+
/* cn-button-appearance-panel has no :hover override of its own (panel
|
|
76
|
+
buttons don't highlight on hover), only :active and :focus change. */
|
|
69
77
|
.ol-btn:active {
|
|
70
|
-
background: var(--
|
|
78
|
+
background: var(--control-active-bg) !important;
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
.ol-btn:focus,
|
|
74
82
|
.ol-btn:focus-visible {
|
|
75
|
-
border-color: var(--focus-
|
|
76
|
-
|
|
83
|
+
border-color: var(--focus-color) !important;
|
|
84
|
+
box-shadow: inset 0 0 0 2px var(--focus-color);
|
|
77
85
|
z-index: 2;
|
|
78
86
|
}
|
|
79
87
|
|
|
88
|
+
/* Isolated focus (not hover/active): solid yellow fill, matching
|
|
89
|
+
cn-button's own base &:focus:not(:active):not(:hover) rule. */
|
|
90
|
+
.ol-btn:focus:not(:hover):not(:active),
|
|
91
|
+
.ol-btn:focus-visible:not(:hover):not(:active) {
|
|
92
|
+
background: var(--focus-color) !important;
|
|
93
|
+
color: var(--control-text) !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
80
96
|
.ol-btn:disabled {
|
|
81
97
|
opacity: 0.4;
|
|
82
98
|
cursor: not-allowed;
|
|
@@ -94,7 +110,13 @@
|
|
|
94
110
|
z-index: 2;
|
|
95
111
|
}
|
|
96
112
|
|
|
97
|
-
/* Zoom control container
|
|
113
|
+
/* Zoom control container. Buttons stack with shared, joined borders rather
|
|
114
|
+
than each keeping its own on every side, the same technique
|
|
115
|
+
cn-button-group's own data-compressed variant uses for adjacent
|
|
116
|
+
appearance="panel" icon buttons (see ButtonGroup.css): overlap by one
|
|
117
|
+
border-width so touching edges merge into a single line, and raise the
|
|
118
|
+
focused button's z-index so its border/ring never gets clipped under a
|
|
119
|
+
neighbour. */
|
|
98
120
|
.ol-zoom {
|
|
99
121
|
top: 1.5rem;
|
|
100
122
|
right: 1rem;
|
|
@@ -104,6 +126,10 @@
|
|
|
104
126
|
z-index: 10;
|
|
105
127
|
}
|
|
106
128
|
|
|
129
|
+
.ol-zoom button + button {
|
|
130
|
+
margin-top: -2px !important; /* -1 * --border-width-form */
|
|
131
|
+
}
|
|
132
|
+
|
|
107
133
|
/* Apply base button styling to zoom buttons */
|
|
108
134
|
.ol-zoom button,
|
|
109
135
|
.ol-zoom button:hover,
|
|
@@ -113,7 +139,7 @@
|
|
|
113
139
|
width: 40px !important;
|
|
114
140
|
height: 40px !important;
|
|
115
141
|
outline: none !important;
|
|
116
|
-
border: 2px solid
|
|
142
|
+
border: 2px solid var(--control-border-color) !important;
|
|
117
143
|
}
|
|
118
144
|
|
|
119
145
|
.ol-zoom button {
|
|
@@ -135,18 +161,24 @@
|
|
|
135
161
|
position: relative;
|
|
136
162
|
}
|
|
137
163
|
|
|
138
|
-
|
|
164
|
+
/* cn-button-appearance-panel has no :hover override of its own. */
|
|
139
165
|
.ol-zoom button:active {
|
|
140
|
-
background: var(--
|
|
166
|
+
background: var(--control-active-bg) !important;
|
|
141
167
|
}
|
|
142
168
|
|
|
143
169
|
.ol-zoom button:focus,
|
|
144
170
|
.ol-zoom button:focus-visible {
|
|
145
|
-
border-color: var(--focus-
|
|
146
|
-
|
|
171
|
+
border-color: var(--focus-color) !important;
|
|
172
|
+
box-shadow: inset 0 0 0 2px var(--focus-color);
|
|
147
173
|
z-index: 2;
|
|
148
174
|
}
|
|
149
175
|
|
|
176
|
+
.ol-zoom button:focus:not(:hover):not(:active),
|
|
177
|
+
.ol-zoom button:focus-visible:not(:hover):not(:active) {
|
|
178
|
+
background: var(--focus-color) !important;
|
|
179
|
+
color: var(--control-text) !important;
|
|
180
|
+
}
|
|
181
|
+
|
|
150
182
|
/* Override default zoom button text with SVG icons */
|
|
151
183
|
.ol-zoom-in::before,
|
|
152
184
|
.ol-zoom-out::before {
|
|
@@ -183,7 +215,16 @@
|
|
|
183
215
|
right: 1rem;
|
|
184
216
|
}
|
|
185
217
|
|
|
186
|
-
/* Full screen mode for map container
|
|
218
|
+
/* Full screen mode for map container.
|
|
219
|
+
z-index matches cn-z-overlay (see utils.css) rather than OpenLayers' own
|
|
220
|
+
plain 9999, this file can't reliably reach that utility itself (this
|
|
221
|
+
stylesheet ships as a separate package export, ./styles/ol, imported
|
|
222
|
+
independently of the Tailwind-processed component CSS, so @apply isn't
|
|
223
|
+
guaranteed to resolve here), but the numeric value still needs to stay in
|
|
224
|
+
sync with it: full screen is meant to cover literally everything on the
|
|
225
|
+
page, including cn-z-top elements like a resizable handle, and cn-z-top
|
|
226
|
+
(99999) already sits above OpenLayers' own layers, so matching it (or
|
|
227
|
+
less) would put full screen mode back underneath them. */
|
|
187
228
|
.map-fullscreen {
|
|
188
229
|
position: fixed !important;
|
|
189
230
|
top: 0 !important;
|
|
@@ -192,7 +233,7 @@
|
|
|
192
233
|
bottom: 0 !important;
|
|
193
234
|
width: 100vw !important;
|
|
194
235
|
height: 100vh !important;
|
|
195
|
-
z-index:
|
|
236
|
+
z-index: 999999 !important;
|
|
196
237
|
margin: 0 !important;
|
|
197
238
|
padding: 0 !important;
|
|
198
239
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* Class names starting with `cn` are generally reserved for the toolkit only, although they may show up in intellisense. */
|
|
2
|
+
|
|
3
|
+
/* This does not follow the `cn-panel` name as we may want to use this outside the toolkit. */
|
|
4
|
+
@utility panel {
|
|
5
|
+
@apply bg-panel border-form border-solid border-panel-border;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* MARK: Form field border
|
|
9
|
+
Shared 2px solid border for form fields (input, textarea, select).
|
|
10
|
+
No border-radius per GDS. Color can be overridden (e.g. border-error on invalid fields). */
|
|
11
|
+
@utility cn-form-border {
|
|
12
|
+
@apply border-form border-solid border-divider-input rounded-none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Bordered wash-background swatch — shared base for InputGroup swatches and FileUpload trigger. */
|
|
16
|
+
@utility cn-form-swatch {
|
|
17
|
+
@apply cn-form-border flex items-center h-10 text-base bg-wash;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* GDS link underline. Applies to any element that needs link-style text decoration. */
|
|
21
|
+
@utility cn-link-decoration {
|
|
22
|
+
@apply underline;
|
|
23
|
+
text-decoration-thickness: max(1px, 0.0625rem);
|
|
24
|
+
text-underline-offset: 0.1578em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@utility cn-link-hover-decoration {
|
|
28
|
+
@apply underline;
|
|
29
|
+
text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
|
|
30
|
+
/* Prevent underline gaps around descenders on hover */
|
|
31
|
+
text-decoration-skip-ink: none;
|
|
32
|
+
text-decoration-skip: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Always renders above everything else on the page, including third-party
|
|
36
|
+
libraries with their own aggressive z-index (e.g. OpenLayers assigns some
|
|
37
|
+
of its own layers z-index: 9999, see assets/styles/ol.css). Centralised so
|
|
38
|
+
every "must always be on top" element (resizable handles, tab underlines,
|
|
39
|
+
...) shares one place to tune if that ever needs to go even higher. */
|
|
40
|
+
@utility cn-z-top {
|
|
41
|
+
z-index: 99999;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* One tier above cn-z-top: floating overlays (Popover, Tooltip, Select's
|
|
45
|
+
dropdown, Modal) need to render above cn-z-top elements too (e.g. a
|
|
46
|
+
Popover opened next to a resizable handle), not just above ordinary page
|
|
47
|
+
content. */
|
|
48
|
+
@utility cn-z-overlay {
|
|
49
|
+
z-index: 999999;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* MARK: Icon sizes
|
|
53
|
+
Canonical icon-button dimensions. Applied by cn-button-size-* and
|
|
54
|
+
cn-button-link-size-* when data-variant is "icon". */
|
|
55
|
+
|
|
56
|
+
@utility cn-icon-sm {
|
|
57
|
+
@apply h-8 w-8 p-1.5;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@utility cn-icon-base {
|
|
61
|
+
@apply h-10 w-10 p-2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@utility cn-icon-lg {
|
|
65
|
+
@apply h-12 w-12 p-2.5;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Fallback focus ring for any element not covered by component-specific styles
|
|
69
|
+
(e.g. Radix primitive roots that render as plain HTML elements).
|
|
70
|
+
Component-layer focus styles always win — this only fires for unstyled elements. */
|
|
71
|
+
@layer base {
|
|
72
|
+
:focus-visible {
|
|
73
|
+
outline: var(--focus-ring-width) solid var(--color-focus);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
html,
|
|
78
|
+
body {
|
|
79
|
+
@apply text-body text-base;
|
|
80
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@keyframes accordion-down {
|
|
2
|
+
from {
|
|
3
|
+
height: 0;
|
|
4
|
+
}
|
|
5
|
+
to {
|
|
6
|
+
height: var(--radix-accordion-content-height);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes accordion-up {
|
|
11
|
+
from {
|
|
12
|
+
height: var(--radix-accordion-content-height);
|
|
13
|
+
}
|
|
14
|
+
to {
|
|
15
|
+
height: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@layer components {
|
|
20
|
+
/* MARK: Accordion
|
|
21
|
+
Separator-based design: thin divider lines above the first item and below
|
|
22
|
+
each item. Works edge-to-edge in a sidebar or as a standalone FAQ section,
|
|
23
|
+
the trigger padding provides the visual inset for content. */
|
|
24
|
+
.cn-accordion {
|
|
25
|
+
@apply w-full border-t border-divider;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cn-accordion-item {
|
|
29
|
+
@apply border-b border-divider;
|
|
30
|
+
|
|
31
|
+
& [data-disabled],
|
|
32
|
+
&:disabled {
|
|
33
|
+
@apply opacity-50 cursor-not-allowed;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* MARK: Trigger */
|
|
38
|
+
.cn-accordion-trigger {
|
|
39
|
+
@apply flex w-full items-center justify-between gap-gds-2 p-gds-2 py-gds-2 text-base text-left
|
|
40
|
+
text-body bg-transparent border-none cursor-pointer;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
@apply bg-wash;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:focus-visible {
|
|
47
|
+
@apply outline-focus;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.cn-accordion-trigger-icon {
|
|
52
|
+
@apply size-5 shrink-0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.cn-accordion-trigger[data-state='open'] .cn-accordion-trigger-icon {
|
|
56
|
+
@apply rotate-180;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* MARK: Content
|
|
60
|
+
bg-surface (a light tint of the accent colour, same treatment
|
|
61
|
+
CookieBanner uses for its own full-width background) rather than
|
|
62
|
+
bg-wash: a flat grey reads fine for a small, isolated element like a
|
|
63
|
+
hover state, but washes out and looks heavier than intended once it's
|
|
64
|
+
filling an entire content area, especially stacked with other grey
|
|
65
|
+
(bg-wash/bg-muted) elements inside it. */
|
|
66
|
+
.cn-accordion-content {
|
|
67
|
+
@apply overflow-hidden bg-surface;
|
|
68
|
+
|
|
69
|
+
&[data-state='open'] {
|
|
70
|
+
animation: accordion-down 0.15s ease-out;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&[data-state='closed'] {
|
|
74
|
+
animation: accordion-up 0.15s ease-out;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[data-disable-transition] {
|
|
78
|
+
animation: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.cn-accordion-content-inner {
|
|
83
|
+
@apply p-gds-2 text-base;
|
|
84
|
+
}
|
|
85
|
+
}
|