@canonical/react-ds-global 0.36.0 → 0.38.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/README.md +72 -0
- package/dist/esm/lib/_work_in_progress/Announcement/styles.css +51 -42
- package/dist/esm/lib/_work_in_progress/CategoriesSection/common/Category/styles.css +21 -17
- package/dist/esm/lib/_work_in_progress/CategoriesSection/styles.css +16 -12
- package/dist/esm/lib/_work_in_progress/ChatSection/styles.css +22 -18
- package/dist/esm/lib/_work_in_progress/DescriptionSection/styles.css +14 -10
- package/dist/esm/lib/_work_in_progress/IconSection/styles.css +18 -14
- package/dist/esm/lib/_work_in_progress/Label/styles.css +36 -32
- package/dist/esm/lib/_work_in_progress/Link/styles.css +32 -28
- package/dist/esm/lib/_work_in_progress/Rule/styles.css +21 -14
- package/dist/esm/lib/_work_in_progress/Section/styles.css +66 -62
- package/dist/esm/lib/_work_in_progress/SkipLink/styles.css +35 -32
- package/dist/esm/lib/_work_in_progress/TSection/styles.css +26 -22
- package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.js +4 -1
- package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.js.map +1 -1
- package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/styles.css +21 -17
- package/dist/esm/lib/_work_in_progress/grid/GridCard/GridCard.js +4 -1
- package/dist/esm/lib/_work_in_progress/grid/GridCard/GridCard.js.map +1 -1
- package/dist/esm/lib/_work_in_progress/grid/GridCard/styles.css +8 -4
- package/dist/esm/lib/_work_in_progress/grid/InnerGridDemo/styles.css +38 -33
- package/dist/esm/lib/_work_in_progress/grid/SettingsView/SettingsView.js +4 -1
- package/dist/esm/lib/_work_in_progress/grid/SettingsView/SettingsView.js.map +1 -1
- package/dist/esm/lib/_work_in_progress/grid/SettingsView/styles.css +23 -19
- package/dist/esm/lib/component/Accordion/common/Item/styles.css +305 -299
- package/dist/esm/lib/component/Accordion/styles.css +35 -31
- package/dist/esm/lib/component/Badge/hooks/useBadge.js +1 -1
- package/dist/esm/lib/component/Badge/hooks/useBadge.js.map +1 -1
- package/dist/esm/lib/component/Badge/styles.css +45 -41
- package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/esm/lib/component/Breadcrumbs/common/Item/styles.css +69 -65
- package/dist/esm/lib/component/Breadcrumbs/styles.css +30 -26
- package/dist/esm/lib/component/Button/styles.css +293 -260
- package/dist/esm/lib/component/Card/common/Content/styles.css +27 -23
- package/dist/esm/lib/component/Card/common/Footer/styles.css +30 -26
- package/dist/esm/lib/component/Card/common/Header/styles.css +25 -21
- package/dist/esm/lib/component/Card/common/Image/styles.css +8 -4
- package/dist/esm/lib/component/Card/styles.css +77 -73
- package/dist/esm/lib/component/Chip/Chip.js +29 -6
- package/dist/esm/lib/component/Chip/Chip.js.map +1 -1
- package/dist/esm/lib/component/Chip/styles.css +105 -101
- package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js +29 -20
- package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js.map +1 -1
- package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js +25 -2
- package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js.map +1 -1
- package/dist/esm/lib/component/ContextualMenu/common/Item/styles.css +116 -106
- package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js +29 -9
- package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js.map +1 -1
- package/dist/esm/lib/component/ContextualMenu/styles.css +74 -72
- package/dist/esm/lib/component/Icon/styles.css +24 -20
- package/dist/esm/lib/component/InlineCode/styles.css +19 -15
- package/dist/esm/lib/component/KeyboardKey/styles.css +44 -40
- package/dist/esm/lib/component/Popover/Popover.js.map +1 -1
- package/dist/esm/lib/component/Popover/styles.css +59 -52
- package/dist/esm/lib/component/Tabs/common/Item/styles.css +80 -76
- package/dist/esm/lib/component/Tabs/styles.css +36 -32
- package/dist/esm/lib/component/Tile/common/Content/styles.css +28 -24
- package/dist/esm/lib/component/Tile/common/Header/styles.css +28 -24
- package/dist/esm/lib/component/Tile/styles.css +31 -27
- package/dist/esm/lib/component/Tooltip/Tooltip.js +6 -2
- package/dist/esm/lib/component/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/lib/component/Tooltip/styles.css +213 -208
- package/dist/esm/lib/group/Cards/styles.css +26 -22
- package/dist/esm/lib/group/KeyboardKeys/styles.css +14 -10
- package/dist/esm/lib/hooks/useContextualMenu/index.js +1 -0
- package/dist/esm/lib/hooks/useContextualMenu/index.js.map +1 -1
- package/dist/esm/lib/hooks/useContextualMenu/isMenuSeparator.js +11 -0
- package/dist/esm/lib/hooks/useContextualMenu/isMenuSeparator.js.map +1 -0
- package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js +54 -34
- package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js.map +1 -1
- package/dist/esm/lib/hooks/useDisclosure/useDisclosure.js.map +1 -1
- package/dist/esm/lib/hooks/useWindowDimensions/useWindowDimensions.js +1 -1
- package/dist/esm/lib/hooks/useWindowDimensions/useWindowDimensions.js.map +1 -1
- package/dist/esm/lib/hooks/useWindowFitment/useWindowFitment.js +3 -0
- package/dist/esm/lib/hooks/useWindowFitment/useWindowFitment.js.map +1 -1
- package/dist/esm/lib/index.css +79 -0
- package/dist/esm/lib/pattern/Modal/Context.js +10 -0
- package/dist/esm/lib/pattern/Modal/Context.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/Provider.js +103 -0
- package/dist/esm/lib/pattern/Modal/Provider.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Content/Content.js +15 -0
- package/dist/esm/lib/pattern/Modal/common/Content/Content.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Content/index.js +3 -0
- package/dist/esm/lib/pattern/Modal/common/Content/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Content/styles.css +37 -0
- package/dist/esm/lib/pattern/Modal/common/Content/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/common/Content/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/Footer.js +16 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/Footer.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/index.js +3 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/styles.css +57 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/common/Footer/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Header/Header.js +27 -0
- package/dist/esm/lib/pattern/Modal/common/Header/Header.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Header/index.js +3 -0
- package/dist/esm/lib/pattern/Modal/common/Header/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/Header/styles.css +79 -0
- package/dist/esm/lib/pattern/Modal/common/Header/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/common/Header/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/common/index.js +5 -0
- package/dist/esm/lib/pattern/Modal/common/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalContext.js +11 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalContext.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalState.js +15 -0
- package/dist/esm/lib/pattern/Modal/hooks/useModalState.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/index.js +4 -0
- package/dist/esm/lib/pattern/Modal/index.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/styles.css +119 -0
- package/dist/esm/lib/pattern/Modal/types.js +2 -0
- package/dist/esm/lib/pattern/Modal/types.js.map +1 -0
- package/dist/esm/lib/pattern/Modal/withModal.js +102 -0
- package/dist/esm/lib/pattern/Modal/withModal.js.map +1 -0
- package/dist/esm/lib/pattern/Timeline/common/Content/styles.css +16 -12
- package/dist/esm/lib/pattern/Timeline/common/Event/styles.css +116 -112
- package/dist/esm/lib/pattern/Timeline/styles.css +16 -12
- package/dist/esm/lib/pattern/index.js +1 -0
- package/dist/esm/lib/pattern/index.js.map +1 -1
- package/dist/esm/lib/subcomponent/Spinner/styles.css +38 -34
- package/dist/types/lib/_work_in_progress/Announcement/types.d.ts +8 -8
- package/dist/types/lib/_work_in_progress/Announcement/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/CategoriesSection/common/Category/types.d.ts +5 -3
- package/dist/types/lib/_work_in_progress/CategoriesSection/common/Category/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/CategoriesSection/types.d.ts +6 -3
- package/dist/types/lib/_work_in_progress/CategoriesSection/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/ChatSection/types.d.ts +6 -3
- package/dist/types/lib/_work_in_progress/ChatSection/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/DescriptionSection/types.d.ts +6 -3
- package/dist/types/lib/_work_in_progress/DescriptionSection/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/IconSection/types.d.ts +6 -3
- package/dist/types/lib/_work_in_progress/IconSection/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/Label/types.d.ts +20 -18
- package/dist/types/lib/_work_in_progress/Label/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/Rule/types.d.ts +5 -7
- package/dist/types/lib/_work_in_progress/Rule/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/Section/types.d.ts +9 -10
- package/dist/types/lib/_work_in_progress/Section/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/SkipLink/types.d.ts +14 -8
- package/dist/types/lib/_work_in_progress/SkipLink/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/TSection/types.d.ts +14 -3
- package/dist/types/lib/_work_in_progress/TSection/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/types.d.ts +5 -3
- package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/GridCard/GridCard.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/GridCard/types.d.ts +5 -3
- package/dist/types/lib/_work_in_progress/grid/GridCard/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/InnerGridDemo/types.d.ts +5 -3
- package/dist/types/lib/_work_in_progress/grid/InnerGridDemo/types.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/SettingsView/SettingsView.d.ts.map +1 -1
- package/dist/types/lib/_work_in_progress/grid/SettingsView/types.d.ts +5 -3
- package/dist/types/lib/_work_in_progress/grid/SettingsView/types.d.ts.map +1 -1
- package/dist/types/lib/component/Accordion/common/Item/types.d.ts +28 -22
- package/dist/types/lib/component/Accordion/common/Item/types.d.ts.map +1 -1
- package/dist/types/lib/component/Accordion/types.d.ts +8 -6
- package/dist/types/lib/component/Accordion/types.d.ts.map +1 -1
- package/dist/types/lib/component/Badge/types.d.ts +6 -4
- package/dist/types/lib/component/Badge/types.d.ts.map +1 -1
- package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts +12 -10
- package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts.map +1 -1
- package/dist/types/lib/component/Breadcrumbs/types.d.ts +11 -10
- package/dist/types/lib/component/Breadcrumbs/types.d.ts.map +1 -1
- package/dist/types/lib/component/Button/index.d.ts +1 -1
- package/dist/types/lib/component/Button/index.d.ts.map +1 -1
- package/dist/types/lib/component/Button/types.d.ts +10 -8
- package/dist/types/lib/component/Button/types.d.ts.map +1 -1
- package/dist/types/lib/component/Card/common/Content/types.d.ts +7 -5
- package/dist/types/lib/component/Card/common/Content/types.d.ts.map +1 -1
- package/dist/types/lib/component/Card/common/Footer/types.d.ts +7 -5
- package/dist/types/lib/component/Card/common/Footer/types.d.ts.map +1 -1
- package/dist/types/lib/component/Card/common/Header/types.d.ts +7 -5
- package/dist/types/lib/component/Card/common/Header/types.d.ts.map +1 -1
- package/dist/types/lib/component/Card/common/Image/types.d.ts +6 -3
- package/dist/types/lib/component/Card/common/Image/types.d.ts.map +1 -1
- package/dist/types/lib/component/Card/types.d.ts +6 -3
- package/dist/types/lib/component/Card/types.d.ts.map +1 -1
- package/dist/types/lib/component/Chip/Chip.d.ts +7 -2
- package/dist/types/lib/component/Chip/Chip.d.ts.map +1 -1
- package/dist/types/lib/component/Chip/types.d.ts +29 -13
- package/dist/types/lib/component/Chip/types.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts +4 -4
- package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/Item/Item.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/Item/types.d.ts +7 -0
- package/dist/types/lib/component/ContextualMenu/common/Item/types.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/MenuContext.d.ts +1 -1
- package/dist/types/lib/component/ContextualMenu/common/MenuContext.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts +9 -7
- package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts.map +1 -1
- package/dist/types/lib/component/ContextualMenu/types.d.ts +17 -8
- package/dist/types/lib/component/ContextualMenu/types.d.ts.map +1 -1
- package/dist/types/lib/component/Icon/types.d.ts +6 -8
- package/dist/types/lib/component/Icon/types.d.ts.map +1 -1
- package/dist/types/lib/component/InlineCode/types.d.ts +6 -3
- package/dist/types/lib/component/InlineCode/types.d.ts.map +1 -1
- package/dist/types/lib/component/KeyboardKey/types.d.ts +6 -3
- package/dist/types/lib/component/KeyboardKey/types.d.ts.map +1 -1
- package/dist/types/lib/component/Popover/types.d.ts +10 -3
- package/dist/types/lib/component/Popover/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tabs/common/Item/types.d.ts +4 -0
- package/dist/types/lib/component/Tabs/common/Item/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tabs/types.d.ts +12 -10
- package/dist/types/lib/component/Tabs/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tile/common/Content/types.d.ts +9 -7
- package/dist/types/lib/component/Tile/common/Content/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tile/common/Header/types.d.ts +9 -7
- package/dist/types/lib/component/Tile/common/Header/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tile/types.d.ts +10 -8
- package/dist/types/lib/component/Tile/types.d.ts.map +1 -1
- package/dist/types/lib/component/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/lib/component/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/lib/component/Tooltip/types.d.ts +11 -10
- package/dist/types/lib/component/Tooltip/types.d.ts.map +1 -1
- package/dist/types/lib/group/Cards/types.d.ts +6 -3
- package/dist/types/lib/group/Cards/types.d.ts.map +1 -1
- package/dist/types/lib/group/KeyboardKeys/types.d.ts +6 -3
- package/dist/types/lib/group/KeyboardKeys/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useContextualMenu/index.d.ts +1 -0
- package/dist/types/lib/hooks/useContextualMenu/index.d.ts.map +1 -1
- package/dist/types/lib/hooks/useContextualMenu/isMenuSeparator.d.ts +13 -0
- package/dist/types/lib/hooks/useContextualMenu/isMenuSeparator.d.ts.map +1 -0
- package/dist/types/lib/hooks/useContextualMenu/types.d.ts +45 -15
- package/dist/types/lib/hooks/useContextualMenu/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts +5 -6
- package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts.map +1 -1
- package/dist/types/lib/hooks/useDisclosure/types.d.ts +7 -2
- package/dist/types/lib/hooks/useDisclosure/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useDisclosure/useDisclosure.d.ts +1 -1
- package/dist/types/lib/hooks/useDisclosure/useDisclosure.d.ts.map +1 -1
- package/dist/types/lib/hooks/useWindowFitment/types.d.ts +12 -3
- package/dist/types/lib/hooks/useWindowFitment/types.d.ts.map +1 -1
- package/dist/types/lib/hooks/useWindowFitment/useWindowFitment.d.ts +1 -1
- package/dist/types/lib/hooks/useWindowFitment/useWindowFitment.d.ts.map +1 -1
- package/dist/types/lib/pattern/Modal/Context.d.ts +10 -0
- package/dist/types/lib/pattern/Modal/Context.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/Provider.d.ts +63 -0
- package/dist/types/lib/pattern/Modal/Provider.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Content/Content.d.ts +17 -0
- package/dist/types/lib/pattern/Modal/common/Content/Content.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Content/index.d.ts +3 -0
- package/dist/types/lib/pattern/Modal/common/Content/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Content/types.d.ts +15 -0
- package/dist/types/lib/pattern/Modal/common/Content/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Footer/Footer.d.ts +18 -0
- package/dist/types/lib/pattern/Modal/common/Footer/Footer.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Footer/index.d.ts +3 -0
- package/dist/types/lib/pattern/Modal/common/Footer/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Footer/types.d.ts +16 -0
- package/dist/types/lib/pattern/Modal/common/Footer/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Header/Header.d.ts +24 -0
- package/dist/types/lib/pattern/Modal/common/Header/Header.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Header/index.d.ts +3 -0
- package/dist/types/lib/pattern/Modal/common/Header/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/Header/types.d.ts +36 -0
- package/dist/types/lib/pattern/Modal/common/Header/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/common/index.d.ts +4 -0
- package/dist/types/lib/pattern/Modal/common/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalContext.d.ts +4 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalContext.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalState.d.ts +10 -0
- package/dist/types/lib/pattern/Modal/hooks/useModalState.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/index.d.ts +4 -0
- package/dist/types/lib/pattern/Modal/index.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/types.d.ts +122 -0
- package/dist/types/lib/pattern/Modal/types.d.ts.map +1 -0
- package/dist/types/lib/pattern/Modal/withModal.d.ts +74 -0
- package/dist/types/lib/pattern/Modal/withModal.d.ts.map +1 -0
- package/dist/types/lib/pattern/Timeline/common/Content/types.d.ts +10 -8
- package/dist/types/lib/pattern/Timeline/common/Content/types.d.ts.map +1 -1
- package/dist/types/lib/pattern/Timeline/common/Event/types.d.ts +18 -16
- package/dist/types/lib/pattern/Timeline/common/Event/types.d.ts.map +1 -1
- package/dist/types/lib/pattern/Timeline/types.d.ts +10 -8
- package/dist/types/lib/pattern/Timeline/types.d.ts.map +1 -1
- package/dist/types/lib/pattern/index.d.ts +1 -0
- package/dist/types/lib/pattern/index.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/Spinner/types.d.ts +10 -8
- package/dist/types/lib/subcomponent/Spinner/types.d.ts.map +1 -1
- package/package.json +28 -18
|
@@ -1,86 +1,88 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Mapped strictly to the Figma "Contextual Menu" frame: white background
|
|
3
|
-
(color-background) on the modal surface, a drop shadow (no border), and a
|
|
4
|
-
muted 1px divider between groups. */
|
|
5
|
-
:root {
|
|
6
|
-
--contextual-menu-color-divider: var(--color-border-muted);
|
|
7
|
-
--contextual-menu-divider-width: var(--dimension-stroke-thickness-medium);
|
|
8
|
-
--contextual-menu-min-width: 12rem;
|
|
9
|
-
--contextual-menu-max-width: 20rem;
|
|
10
|
-
/* Three-layer drop shadow from the Figma effect. */
|
|
11
|
-
--contextual-menu-shadow:
|
|
12
|
-
0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 2px 2px -1px rgba(0, 0, 0, 0.15),
|
|
13
|
-
0 0 3px 0 rgba(0, 0, 0, 0.2);
|
|
14
|
-
--contextual-menu-motion-duration: 0.12s;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ds.contextual-menu {
|
|
18
|
-
display: inline-block;
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Component tokens — sourced from @canonical/design-tokens.
|
|
5
|
+
Mapped strictly to the Figma "Contextual Menu" frame: white background
|
|
6
|
+
(color-background) on the modal surface, a drop shadow (no border), and a
|
|
7
|
+
muted 1px divider between sections. */
|
|
8
|
+
:root {
|
|
9
|
+
--contextual-menu-color-divider: var(--color-border-muted);
|
|
10
|
+
--contextual-menu-divider-width: var(--dimension-stroke-thickness-medium);
|
|
11
|
+
--contextual-menu-min-width: 12rem;
|
|
12
|
+
--contextual-menu-max-width: 20rem;
|
|
13
|
+
/* Three-layer drop shadow from the Figma effect. */
|
|
14
|
+
--contextual-menu-shadow:
|
|
15
|
+
0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 2px 2px -1px rgba(0, 0, 0, 0.15),
|
|
16
|
+
0 0 3px 0 rgba(0, 0, 0, 0.2);
|
|
17
|
+
--contextual-menu-motion-duration: 0.12s;
|
|
22
18
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ds.contextual-menu__surface {
|
|
26
|
-
position: fixed;
|
|
27
|
-
z-index: var(--z-index-overlay, 100);
|
|
28
|
-
min-width: var(--contextual-menu-min-width);
|
|
29
|
-
max-width: var(--contextual-menu-max-width);
|
|
30
|
-
/* A menu (or submenu) taller than the viewport scrolls INSIDE itself instead
|
|
31
|
-
of overflowing off-screen — otherwise keyboard-navigating to an item below
|
|
32
|
-
the fold would move the highlight to an item that is not visible. The
|
|
33
|
-
highlighted item is scrolled into view on keyboard nav (see Item). */
|
|
34
|
-
max-block-size: calc(100dvh - 2 * var(--dimension-200, 16px));
|
|
35
|
-
overflow-y: auto;
|
|
36
|
-
overscroll-behavior: contain;
|
|
37
|
-
/* Read the surface channel directly on this element so the `.modal` surface
|
|
38
|
-
applied here resolves (a :root intermediate would see it unset). */
|
|
39
|
-
background-color: var(--surface-color-background, var(--color-background));
|
|
40
|
-
box-shadow: var(--contextual-menu-shadow);
|
|
41
|
-
|
|
42
|
-
/* CSS-only enter/exit animation. */
|
|
43
|
-
opacity: 0;
|
|
44
|
-
visibility: hidden;
|
|
45
|
-
transition:
|
|
46
|
-
opacity var(--contextual-menu-motion-duration) ease-in-out,
|
|
47
|
-
visibility var(--contextual-menu-motion-duration) allow-discrete;
|
|
48
19
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
visibility: visible;
|
|
20
|
+
.ds.contextual-menu {
|
|
21
|
+
display: inline-block;
|
|
52
22
|
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
> .trigger {
|
|
24
|
+
cursor: pointer;
|
|
55
25
|
}
|
|
56
26
|
}
|
|
57
27
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
28
|
+
.ds.contextual-menu__surface {
|
|
29
|
+
position: fixed;
|
|
30
|
+
z-index: var(--z-index-overlay, 100);
|
|
31
|
+
min-width: var(--contextual-menu-min-width);
|
|
32
|
+
max-width: var(--contextual-menu-max-width);
|
|
33
|
+
/* A menu (or submenu) taller than the viewport scrolls INSIDE itself instead
|
|
34
|
+
of overflowing off-screen — otherwise keyboard-navigating to an item below
|
|
35
|
+
the fold would move the highlight to an item that is not visible. The
|
|
36
|
+
highlighted item is scrolled into view on keyboard nav (see Item). */
|
|
37
|
+
max-block-size: calc(100dvh - 2 * var(--dimension-200, 16px));
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
overscroll-behavior: contain;
|
|
40
|
+
/* Read the surface channel directly on this element so the `.modal` surface
|
|
41
|
+
applied here resolves (a :root intermediate would see it unset). */
|
|
42
|
+
background-color: var(--surface-color-background, var(--color-background));
|
|
43
|
+
box-shadow: var(--contextual-menu-shadow);
|
|
44
|
+
|
|
45
|
+
/* CSS-only enter/exit animation. */
|
|
61
46
|
opacity: 0;
|
|
62
47
|
visibility: hidden;
|
|
63
|
-
|
|
48
|
+
transition:
|
|
49
|
+
opacity var(--contextual-menu-motion-duration) ease-in-out,
|
|
50
|
+
visibility var(--contextual-menu-motion-duration) allow-discrete;
|
|
64
51
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
&[aria-hidden="false"] {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
visibility: visible;
|
|
68
55
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
56
|
+
@starting-style {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* A submenu mounts on open but is positioned a frame later; keep it hidden
|
|
62
|
+
until `data-positioned` so it never paints at the fallback top:0/left:0. */
|
|
63
|
+
&.submenu[aria-hidden="false"]:not([data-positioned="true"]) {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
}
|
|
80
67
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
@media (prefers-reduced-motion: reduce) {
|
|
69
|
+
transition: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* A separator entry draws the muted divider between sections (Figma:
|
|
73
|
+
color-border-muted, stroke-thickness-medium). Reset the UA's <hr> box —
|
|
74
|
+
the divider is a coloured border, not a margin-bearing rule. */
|
|
75
|
+
.separator {
|
|
76
|
+
margin: 0;
|
|
77
|
+
border: none;
|
|
78
|
+
border-block-start: var(--contextual-menu-divider-width, 1px) solid
|
|
79
|
+
var(--contextual-menu-color-divider);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* The submenu-anchor wraps a submenu-parent item for hover detection; it must
|
|
83
|
+
not disturb the vertical item flow, so it lays out like the item it wraps. */
|
|
84
|
+
.submenu-anchor {
|
|
85
|
+
display: block;
|
|
86
|
+
}
|
|
85
87
|
}
|
|
86
88
|
}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
2
|
+
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Component tokens (migrated from @canonical/styles-primitives-canonical tokens.css) */
|
|
5
|
+
:root {
|
|
6
|
+
--icon-size: 1em;
|
|
7
|
+
}
|
|
5
8
|
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.ds.icon {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Icon styles
|
|
11
|
+
* @implements ds:global.component.icon
|
|
12
|
+
*
|
|
13
|
+
* DSL anatomy mapping:
|
|
14
|
+
* - layout.display: inline-block -> display: inline-block
|
|
15
|
+
* - size.width: size/icon/default -> width: var(--size-icon-default)
|
|
16
|
+
* - size.height: size/icon/default -> height: var(--size-icon-default)
|
|
17
|
+
*/
|
|
18
|
+
.ds.icon {
|
|
19
|
+
/* layout.display: inline-block */
|
|
20
|
+
display: inline-block;
|
|
21
|
+
vertical-align: middle;
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
/* size.width: size/icon/default, size.height: size/icon/default */
|
|
24
|
+
width: var(--icon-size, var(--size-icon-default, 1rem));
|
|
25
|
+
height: var(--icon-size, var(--size-icon-default, 1rem));
|
|
26
|
+
}
|
|
23
27
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
2
|
+
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
:root {
|
|
5
|
+
--inline-code-color-text: var(--color-text);
|
|
6
|
+
--inline-code-color-background: var(--color-foreground-secondary);
|
|
7
|
+
--inline-code-padding-inline: var(--dimension-050);
|
|
8
|
+
--inline-code-border-radius: var(--dimension-radius-small);
|
|
9
|
+
}
|
|
7
10
|
|
|
8
|
-
/* The `.code` baseline utility (from @canonical/styles) supplies the
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.ds.inline-code {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
/* The `.code` baseline utility (from @canonical/styles) supplies the
|
|
12
|
+
monospace typography tier and the baseline-grid padding-block nudges, so
|
|
13
|
+
the component sets no vertical padding. Per the Figma spec it adds only the
|
|
14
|
+
horizontal padding plus the code colour and background (both mode-aware). */
|
|
15
|
+
.ds.inline-code {
|
|
16
|
+
color: var(--inline-code-color-text);
|
|
17
|
+
background-color: var(--inline-code-color-background);
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
padding-inline: var(--inline-code-padding-inline);
|
|
20
|
+
border-radius: var(--inline-code-border-radius);
|
|
21
|
+
}
|
|
18
22
|
}
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
:
|
|
2
|
-
/* Static (surface-independent) chrome tokens only. The COLOUR reads that
|
|
3
|
-
depend on the surface stack are NOT declared here — a custom property set at
|
|
4
|
-
`:root` resolves its `var(--surface-color-*)` immediately at `:root`, where
|
|
5
|
-
there is no `.surface` ancestor, so it would freeze to layer1 and the
|
|
6
|
-
surface stepping would never happen. Those reads live on `.ds.keyboard-key`
|
|
7
|
-
below, where the key's own `.surface` scope is in effect. */
|
|
8
|
-
--keyboard-key-color-border: var(--color-border-muted);
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
:root {
|
|
5
|
+
/* Static (surface-independent) chrome tokens only. The COLOUR reads that
|
|
6
|
+
depend on the surface stack are NOT declared here — a custom property set at
|
|
7
|
+
`:root` resolves its `var(--surface-color-*)` immediately at `:root`, where
|
|
8
|
+
there is no `.surface` ancestor, so it would freeze to layer1 and the
|
|
9
|
+
surface stepping would never happen. Those reads live on `.ds.keyboard-key`
|
|
10
|
+
below, where the key's own `.surface` scope is in effect. */
|
|
11
|
+
--keyboard-key-color-border: var(--color-border-muted);
|
|
12
|
+
|
|
13
|
+
/* Figma corner radius is 2px, but that token is not yet validated / does not
|
|
14
|
+
exist — the spec note says "maybe 0 for now", so this stays on radius-small
|
|
15
|
+
(currently 0). Revisit once a 2px radius token lands. */
|
|
16
|
+
--keyboard-key-border-radius: var(--dimension-radius-small);
|
|
17
|
+
--keyboard-key-border-width: var(--dimension-stroke-thickness-medium);
|
|
18
|
+
/* 4px inline padding (Figma: 4px left/right). */
|
|
19
|
+
--keyboard-key-padding-inline: var(--dimension-050);
|
|
20
|
+
}
|
|
18
21
|
|
|
19
|
-
/* The `.code` baseline utility (from @canonical/styles) supplies the
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.ds.keyboard-key {
|
|
26
|
-
|
|
22
|
+
/* The `.code` baseline utility (from @canonical/styles) supplies the
|
|
23
|
+
monospace typography tier — font-family, font-size, font-weight and
|
|
24
|
+
line-height — plus the padding-block nudges that snap the box onto the
|
|
25
|
+
baseline grid. The component itself only adds inline padding and the
|
|
26
|
+
key-specific chrome (colour, border, radius); it must not redeclare the
|
|
27
|
+
typography properties, which would bypass the baseline-grid maths. */
|
|
28
|
+
.ds.keyboard-key {
|
|
29
|
+
display: inline-block;
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
/* Figma (26.10 Keyboard Key, node 6004-72): a key-cap sits on a surface+1 fill
|
|
32
|
+
"like an input", with a muted border and the surface's text colour.
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
The key establishes its own `.surface` (see KeyboardKey.tsx), so it IS the
|
|
35
|
+
next surface layer and paints ITSELF with that layer's background — exactly
|
|
36
|
+
like the Tile. These reads MUST be here on the class (not `:root`) so
|
|
37
|
+
`--surface-color-*` resolves against the key's own surface depth: nested in
|
|
38
|
+
the ambient surface the background steps to the next layer (the "surface+1,
|
|
39
|
+
like inputs" the spec asks for), and on a `.contrasted` surface it inverts
|
|
40
|
+
for free. The fallbacks keep it sane when placed outside any surface. */
|
|
41
|
+
background-color: var(--surface-color-background, var(--color-background));
|
|
42
|
+
color: var(--surface-color-text, var(--color-text));
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
border-style: solid;
|
|
45
|
+
border-width: var(--keyboard-key-border-width);
|
|
46
|
+
border-color: var(--keyboard-key-color-border);
|
|
47
|
+
border-radius: var(--keyboard-key-border-radius);
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
padding-inline: var(--keyboard-key-padding-inline);
|
|
50
|
+
}
|
|
47
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../../src/lib/component/Popover/Popover.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,cAAc,CAAC;AAEtB,6EAA6E;AAC7E,oEAAoE;AACpE,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAC3C,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,OAAO,EACP,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,GAAG,KAAK,EACK,EAAsB,EAAE;IACrC,MAAM,EACJ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../../src/lib/component/Popover/Popover.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,cAAc,CAAC;AAEtB,6EAA6E;AAC7E,oEAAoE;AACpE,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAC3C,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,OAAO,EACP,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,GAAG,KAAK,EACK,EAAsB,EAAE;IACrC,MAAM,EACJ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,GAAG,aAAa,CAAqB;QACpC,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,IAAI;QACZ,mEAAmE;QACnE,0EAA0E;QAC1E,mBAAmB,EAAE,mBAAmB,IAAI,iBAAiB;QAC7D,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,OAAO,EAAE,OAAO,IAAI,IAAI;QACxB,aAAa;QACb,mBAAmB;QACnB,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC;QAClC,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;KACpC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,4EAA4E;IAC5E,8EAA8E;IAC9E,yEAAyE;IACzE,wCAAwC;IACxC,MAAM,kBAAkB,GAAG,WAAW,CACpC,CAAC,KAAuB,EAAE,EAAE;QAC1B,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,WAAW,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,EACD,CAAC,WAAW,CAAC,CACd,CAAC;IAEF,OAAO,CACL,mBACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC;aACtE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,SAAS,KACV,KAAK,aAGT,kBACE,SAAS,EAAC,SAAS,mBAGJ,WAAW,CAAC,eAAe,CAAC,EAC3C,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,WAAW,CAAC,SAAS,YAE/B,OAAO,GACA,EACV,cACE,SAAS,EAAE,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACzD,EAAE,EAAE,OAAO,EACX,GAAG,EAAE,QAAQ,EACb,IAAI,EAAC,QAAQ,iBAEA,CAAC,MAAM,qBAMH,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAClD,KAAK,EAAE,kBAAkB,EACzB,cAAc,EAAE,YAAY,CAAC,cAAc,YAE1C,QAAQ,GACL,IACE,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,65 +1,72 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
2
|
+
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Component tokens — sourced from @canonical/design-tokens */
|
|
5
|
+
:root {
|
|
6
|
+
--popover-color-border: var(--color-border);
|
|
7
|
+
--popover-border-radius: 0;
|
|
8
|
+
--popover-border-width: 1px;
|
|
9
|
+
--popover-padding-vertical: var(--dimension-100);
|
|
10
|
+
--popover-padding-horizontal: var(--dimension-200);
|
|
11
|
+
--popover-motion-duration: 0.12s;
|
|
12
|
+
}
|
|
10
13
|
|
|
11
|
-
.ds.popover {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
.ds.popover {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: inline-block;
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
> .trigger {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
list-style: none;
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
/* Remove the native disclosure triangle; the trigger content owns the affordance. */
|
|
23
|
+
&::-webkit-details-marker {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
22
26
|
}
|
|
23
|
-
}
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
> .content {
|
|
29
|
+
position: fixed;
|
|
30
|
+
z-index: var(--z-index-overlay, 100);
|
|
31
|
+
/* Read the surface channels directly on .content so the `.contrasted`
|
|
32
|
+
surface applied to this element resolves (a :root intermediate would see
|
|
33
|
+
them unset and fall back to the base colours). */
|
|
34
|
+
background-color: var(
|
|
35
|
+
--surface-color-background,
|
|
36
|
+
var(--color-background)
|
|
37
|
+
);
|
|
38
|
+
color: var(--surface-color-text, var(--color-text));
|
|
39
|
+
border: var(--popover-border-width, 1px) solid var(--popover-color-border);
|
|
40
|
+
border-radius: var(--popover-border-radius);
|
|
41
|
+
padding-block: var(--popover-padding-vertical);
|
|
42
|
+
padding-inline: var(--popover-padding-horizontal);
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
/*
|
|
45
|
+
CSS-only enter/exit animation. `allow-discrete` transitions `visibility`
|
|
46
|
+
(a discrete property) alongside `opacity`; `@starting-style` supplies the
|
|
47
|
+
opening frame so the fade-in runs. No JavaScript timing.
|
|
48
|
+
*/
|
|
49
|
+
opacity: 0;
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
transition:
|
|
52
|
+
opacity var(--popover-motion-duration) ease-in-out,
|
|
53
|
+
visibility var(--popover-motion-duration) allow-discrete;
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
/* Visible only when open (aria-hidden="false") AND positioned
|
|
56
|
+
(data-positioned) — so the content never paints at the unresolved
|
|
57
|
+
top:0/left:0 fallback, and the fade runs from the anchored position. */
|
|
58
|
+
&[aria-hidden="false"][data-positioned="true"] {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
visibility: visible;
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
@starting-style {
|
|
63
|
+
opacity: 0;
|
|
64
|
+
}
|
|
58
65
|
}
|
|
59
|
-
}
|
|
60
66
|
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
@media (prefers-reduced-motion: reduce) {
|
|
68
|
+
transition: none;
|
|
69
|
+
}
|
|
63
70
|
}
|
|
64
71
|
}
|
|
65
72
|
}
|
|
@@ -1,87 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
* Tabs Item styles (internal renderer)
|
|
3
|
-
*
|
|
4
|
-
* Figma (node 4388-106316): each tab is text with `--dimension-200` (16px)
|
|
5
|
-
* horizontal padding, no gap to its neighbours. The tab shows a bottom border
|
|
6
|
-
* on hover (muted) and when active (highlighted); an inert tab (no url) is
|
|
7
|
-
* muted with no hover affordance.
|
|
8
|
-
*
|
|
9
|
-
* Baseline grid: the tab box snaps to the typographic baseline grid — its
|
|
10
|
-
* min block-size and vertical padding are whole multiples of --baseline-height
|
|
11
|
-
* (1bU = 8px), so the strip sits on the same grid as surrounding text.
|
|
12
|
-
*/
|
|
13
|
-
:root {
|
|
14
|
-
--tabs-tab-border-width: var(--dimension-strokeThickness-large, 2px);
|
|
15
|
-
--tabs-tab-padding-inline: var(--space-200); /* 16px */
|
|
16
|
-
/* 5bU = 40px tab height on the 8px baseline grid. */
|
|
17
|
-
--tabs-tab-min-block-size: calc(var(--baseline-height) * 5);
|
|
18
|
-
--tabs-tab-focus-ring-width: var(--dimension-strokeThickness-large, 2px);
|
|
19
|
-
--tabs-tab-focus-ring-color: var(--color-focusRing);
|
|
20
|
-
}
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
21
2
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/**
|
|
5
|
+
* Tabs Item styles (internal renderer)
|
|
6
|
+
*
|
|
7
|
+
* Figma (node 4388-106316): each tab is text with `--dimension-200` (16px)
|
|
8
|
+
* horizontal padding, no gap to its neighbours. The tab shows a bottom border
|
|
9
|
+
* on hover (muted) and when active (highlighted); an inert tab (no url) is
|
|
10
|
+
* muted with no hover affordance.
|
|
11
|
+
*
|
|
12
|
+
* Baseline grid: the tab box snaps to the typographic baseline grid — its
|
|
13
|
+
* min block-size and vertical padding are whole multiples of --baseline-height
|
|
14
|
+
* (1bU = 8px), so the strip sits on the same grid as surrounding text.
|
|
15
|
+
*/
|
|
16
|
+
:root {
|
|
17
|
+
--tabs-tab-border-width: var(--dimension-strokeThickness-large, 2px);
|
|
18
|
+
--tabs-tab-padding-inline: var(--space-200); /* 16px */
|
|
19
|
+
/* 5bU = 40px tab height on the 8px baseline grid. */
|
|
20
|
+
--tabs-tab-min-block-size: calc(var(--baseline-height) * 5);
|
|
21
|
+
--tabs-tab-focus-ring-width: var(--dimension-strokeThickness-large, 2px);
|
|
22
|
+
--tabs-tab-focus-ring-color: var(--color-focus-ring);
|
|
23
|
+
}
|
|
25
24
|
|
|
26
|
-
.ds.tabs-item
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
/* Baseline-snapped block size; vertical padding kept to baseline units so the
|
|
31
|
-
label's line box centres on the grid. */
|
|
32
|
-
min-block-size: var(--tabs-tab-min-block-size);
|
|
33
|
-
padding-block: var(--space-100); /* 1bU */
|
|
34
|
-
padding-inline: var(--tabs-tab-padding-inline);
|
|
35
|
-
font: var(--typography-text-primary);
|
|
36
|
-
color: var(--color-text);
|
|
37
|
-
text-decoration: none;
|
|
38
|
-
white-space: nowrap;
|
|
25
|
+
.ds.tabs-item {
|
|
26
|
+
display: flex;
|
|
27
|
+
}
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
.ds.tabs-item .tabs-link {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
/* Baseline-snapped block size; vertical padding kept to baseline units so the
|
|
34
|
+
label's line box centres on the grid. */
|
|
35
|
+
min-block-size: var(--tabs-tab-min-block-size);
|
|
36
|
+
padding-block: var(--space-100); /* 1bU */
|
|
37
|
+
padding-inline: var(--tabs-tab-padding-inline);
|
|
38
|
+
font: var(--typography-text-primary);
|
|
39
|
+
color: var(--color-text);
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
|
|
43
|
+
/* Transparent underline reserved so the row never shifts when a border
|
|
44
|
+
appears on hover/active. */
|
|
45
|
+
border-bottom: var(--tabs-tab-border-width) solid transparent;
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
/* Keyboard focus: a design-system focus ring (design review) instead of the
|
|
48
|
+
UA default outline. Inset offset so the ring hugs the tab and the row's
|
|
49
|
+
`overflow` never clips it; :focus-visible only, so pointer clicks stay
|
|
50
|
+
quiet. */
|
|
51
|
+
&:focus-visible {
|
|
52
|
+
outline: var(--tabs-tab-focus-ring-width) solid
|
|
53
|
+
var(--tabs-tab-focus-ring-color);
|
|
54
|
+
outline-offset: calc(-1 * var(--tabs-tab-focus-ring-width));
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
|
-
}
|
|
54
57
|
|
|
55
|
-
/* Hover: a muted bottom border hints the tab is navigable, and settles faster
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
.ds.tabs-item:not([data-active]):not([data-inert]):not([data-disabled])
|
|
60
|
-
.tabs-link:hover {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
58
|
+
/* Hover: a muted bottom border hints the tab is navigable, and settles faster
|
|
59
|
+
than the active/selection change (below). Not on the active tab (it already
|
|
60
|
+
shows the highlighted border), nor on inert or disabled tabs (they are not
|
|
61
|
+
interactive). */
|
|
62
|
+
.ds.tabs-item:not([data-active]):not([data-inert]):not([data-disabled])
|
|
63
|
+
.tabs-link:hover {
|
|
64
|
+
border-bottom-color: var(--color-border-muted);
|
|
65
|
+
transition-duration: var(--motion-duration-fast);
|
|
66
|
+
}
|
|
64
67
|
|
|
65
|
-
/* Active tab: highlighted underline over the strip's muted baseline. */
|
|
66
|
-
.ds.tabs-item[data-active] .tabs-link,
|
|
67
|
-
.ds.tabs-item .tabs-link[aria-current="page"] {
|
|
68
|
-
|
|
69
|
-
}
|
|
68
|
+
/* Active tab: highlighted underline over the strip's muted baseline. */
|
|
69
|
+
.ds.tabs-item[data-active] .tabs-link,
|
|
70
|
+
.ds.tabs-item .tabs-link[aria-current="page"] {
|
|
71
|
+
border-bottom-color: var(--color-border-highlighted);
|
|
72
|
+
}
|
|
70
73
|
|
|
71
|
-
/* Inert (no url) or disabled tabs: muted, non-interactive, no hover
|
|
72
|
-
|
|
73
|
-
.ds.tabs-item[data-inert] .tabs-link,
|
|
74
|
-
.ds.tabs-item[data-disabled] .tabs-link {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
74
|
+
/* Inert (no url) or disabled tabs: muted, non-interactive, no hover
|
|
75
|
+
affordance. */
|
|
76
|
+
.ds.tabs-item[data-inert] .tabs-link,
|
|
77
|
+
.ds.tabs-item[data-disabled] .tabs-link {
|
|
78
|
+
color: var(--color-text-muted);
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
78
81
|
|
|
79
|
-
/* Motion: the border transitions on the medium duration by default; the hover
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
/* Motion: the border transitions on the medium duration by default; the hover
|
|
83
|
+
rule above overrides it to the faster duration, so hover feedback is snappier
|
|
84
|
+
than the active/selection settle. */
|
|
85
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
86
|
+
.ds.tabs-item .tabs-link {
|
|
87
|
+
transition: border-bottom-color var(--motion-duration-medium)
|
|
88
|
+
var(--motion-easing-standard);
|
|
89
|
+
}
|
|
86
90
|
}
|
|
87
91
|
}
|