@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,9 +1,11 @@
|
|
|
1
1
|
import type { ModifierFamily } from "@canonical/ds-types";
|
|
2
|
-
import type
|
|
2
|
+
import type { ComponentProps, MouseEventHandler } from "react";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The Chip's design-system props, shared by both of its possible roots.
|
|
5
|
+
* Private: `ChipProps` below is the public type, so the name a consumer
|
|
6
|
+
* imports is the one that describes what `<Chip>` accepts.
|
|
5
7
|
*/
|
|
6
|
-
|
|
8
|
+
type OwnProps = {
|
|
7
9
|
/**
|
|
8
10
|
* Criticality modifier for status indication.
|
|
9
11
|
* - "success": Positive status
|
|
@@ -24,16 +26,30 @@ export interface ChipProps {
|
|
|
24
26
|
lead?: string;
|
|
25
27
|
/** The chip’s value text. */
|
|
26
28
|
value?: string;
|
|
27
|
-
/** Called when the chip is clicked. */
|
|
28
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
29
29
|
/** Called when the chip is dismissed. */
|
|
30
30
|
onDismiss?: () => void;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Interactive chip — rendered as a `<button>` when an `onClick` handler is
|
|
34
|
+
* supplied, so it extends native `<button>` props.
|
|
35
|
+
*/
|
|
36
|
+
type InteractiveChipProps = OwnProps & {
|
|
37
|
+
/** Called when the chip is clicked. Its presence makes the chip a button. */
|
|
38
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
39
|
+
} & Omit<ComponentProps<"button">, keyof OwnProps | "onClick" | "children">;
|
|
40
|
+
/**
|
|
41
|
+
* Static chip — rendered as a `<span>` when no `onClick` is supplied, so it
|
|
42
|
+
* extends native `<span>` props.
|
|
43
|
+
*/
|
|
44
|
+
type StaticChipProps = OwnProps & {
|
|
45
|
+
/** A static chip has no click handler and renders a `<span>`. */
|
|
46
|
+
onClick?: undefined;
|
|
47
|
+
} & Omit<ComponentProps<"span">, keyof OwnProps | "onClick" | "children">;
|
|
48
|
+
/**
|
|
49
|
+
* Chip props: a discriminated union on `onClick` (issue #628 precedent). A chip
|
|
50
|
+
* with an `onClick` renders a `<button>` and extends button props; one without
|
|
51
|
+
* renders a `<span>` and extends span props. No polymorphic `as` generic.
|
|
52
|
+
*/
|
|
53
|
+
export type ChipProps = InteractiveChipProps | StaticChipProps;
|
|
54
|
+
export {};
|
|
39
55
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Chip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Chip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;GAIG;AACH,KAAK,QAAQ,GAAG;IACd;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAE5C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,KAAK,oBAAoB,GAAG,QAAQ,GAAG;IACrC,6EAA6E;IAC7E,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAC/C,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAE5E;;;GAGG;AACH,KAAK,eAAe,GAAG,QAAQ,GAAG;IAChC,iEAAiE;IACjE,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,oBAAoB,GAAG,eAAe,CAAC"}
|
|
@@ -2,14 +2,14 @@ import type React from "react";
|
|
|
2
2
|
import type { ContextualMenuProps } from "./types.js";
|
|
3
3
|
import "./styles.css";
|
|
4
4
|
/**
|
|
5
|
-
* A contextual menu presents a list of
|
|
6
|
-
* It opens on click, positions itself
|
|
7
|
-
*
|
|
5
|
+
* A contextual menu presents a flat list of actions — optionally partitioned
|
|
6
|
+
* by separators — anchored to a trigger. It opens on click, positions itself
|
|
7
|
+
* with viewport-fitment, and supports full keyboard navigation.
|
|
8
8
|
*
|
|
9
9
|
* `import { ContextualMenu } from "@canonical/react-ds-global";`
|
|
10
10
|
*
|
|
11
11
|
* @implements ds:global.component.contextual_menu
|
|
12
12
|
*/
|
|
13
|
-
declare const ContextualMenu: ({ trigger,
|
|
13
|
+
declare const ContextualMenu: ({ trigger, items, label, className, preferredDirections, distance, gutter, maxWidth, autoFit, wrap, onSelect, open, onOpenChange, ...props }: ContextualMenuProps) => React.ReactElement;
|
|
14
14
|
export default ContextualMenu;
|
|
15
15
|
//# sourceMappingURL=ContextualMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextualMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ContextualMenu/ContextualMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,mBAAmB,EAAY,MAAM,YAAY,CAAC;AAChE,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,QAAA,MAAM,cAAc,GAAI
|
|
1
|
+
{"version":3,"file":"ContextualMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ContextualMenu/ContextualMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,mBAAmB,EAAY,MAAM,YAAY,CAAC;AAChE,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,QAAA,MAAM,cAAc,GAAI,8IAerB,mBAAmB,KAAG,KAAK,CAAC,YAmJ9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/ContextualMenu/common/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,cAAc,CAAC;AAItB;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,GAAI,+BAA+B,SAAS,KAAG,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/ContextualMenu/common/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,cAAc,CAAC;AAItB;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,GAAI,+BAA+B,SAAS,KAAG,KAAK,CAAC,YAkF9D,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { _Item } from "@canonical/ds-types";
|
|
2
2
|
import type { MenuItem } from "../../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Internal renderer props — exempt from the native-prop extension convention.
|
|
5
|
+
* This is not a public component and has no single native root the consumer
|
|
6
|
+
* styles: it receives a ready-made ARIA/roving prop bag (`itemProps`) from the
|
|
7
|
+
* menu hook and spreads that onto its element instead of extending a tag's
|
|
8
|
+
* native props.
|
|
9
|
+
*/
|
|
3
10
|
export interface ItemProps {
|
|
4
11
|
/** The annotated menu item to render. */
|
|
5
12
|
item: _Item<MenuItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/ContextualMenu/common/Item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,SAAS;IACxB,yCAAyC;IACzC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IACtB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/ContextualMenu/common/Item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,yCAAyC;IACzC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IACtB,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -8,7 +8,7 @@ import type { MenuItem } from "../types.js";
|
|
|
8
8
|
* whole tree shares one highlight path, one roving focus, and one keyboard
|
|
9
9
|
* handler.
|
|
10
10
|
*/
|
|
11
|
-
export interface MenuContextValue extends Pick<UseContextualMenuResult, "getItemProps" | "getMenuProps" | "
|
|
11
|
+
export interface MenuContextValue extends Pick<UseContextualMenuResult, "getItemProps" | "getMenuProps" | "getNodeStatus" | "highlightItem" | "close" | "isOpen"> {
|
|
12
12
|
/** Activate an item (run the consumer's onSelect and close the menu). */
|
|
13
13
|
onSelectItem: (item: _Item<MenuItem>) => void;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/component/ContextualMenu/common/MenuContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,uBAAuB,EACrB,cAAc,GACd,cAAc,GACd,eAAe,GACf,eAAe,GACf,
|
|
1
|
+
{"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/component/ContextualMenu/common/MenuContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,uBAAuB,EACrB,cAAc,GACd,cAAc,GACd,eAAe,GACf,eAAe,GACf,OAAO,GACP,QAAQ,CACX;IACD,yEAAyE;IACzE,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;CAC/C;AAED,QAAA,MAAM,WAAW,kDAA+C,CAAC;AAEjE,yEAAyE;AACzE,eAAO,MAAM,cAAc,QAAO,gBAMjC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { _Item } from "@canonical/ds-types";
|
|
2
2
|
import { type ReactElement } from "react";
|
|
3
|
-
import type {
|
|
3
|
+
import type { MenuEntry } from "../../types.js";
|
|
4
4
|
/**
|
|
5
|
-
* One node in a (possibly nested) contextual menu. A
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* One node in a (possibly nested) contextual menu. A separator renders as a
|
|
6
|
+
* plain divider (no item props — it is not interactive, and the navigation
|
|
7
|
+
* tree never highlights it); a leaf renders a plain item; a submenu parent
|
|
8
|
+
* renders the item plus a positioned nested popup for its children (see
|
|
9
|
+
* {@link SubMenuParent}). The hook that positions the popup runs ONLY for
|
|
10
|
+
* submenu parents — leaves render a bare item — so a menu of leaves spins up
|
|
11
|
+
* no positioning machinery.
|
|
10
12
|
*/
|
|
11
13
|
declare const SubMenu: ({ item }: {
|
|
12
|
-
item: _Item<
|
|
14
|
+
item: _Item<MenuEntry>;
|
|
13
15
|
}) => ReactElement;
|
|
14
16
|
export default SubMenu;
|
|
15
17
|
//# sourceMappingURL=SubMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubMenu.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/ContextualMenu/common/SubMenu/SubMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SubMenu.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/ContextualMenu/common/SubMenu/SubMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,OAAO,CAAC;AAQ9E,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAI1D;;;;;;;;GAQG;AACH,QAAA,MAAM,OAAO,GAAI,UAAU;IAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;CAAE,KAAG,YAmBvD,CAAC;AAgKF,eAAe,OAAO,CAAC"}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { MenuItem, UseContextualMenuProps, WindowFitmentPlacement, WindowFitmentSide } from "../../hooks/index.js";
|
|
3
|
-
export type { MenuItem } from "../../hooks/index.js";
|
|
4
|
-
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type { MenuEntry, MenuItem, UseContextualMenuProps, WindowFitmentPlacement, WindowFitmentSide } from "../../hooks/index.js";
|
|
3
|
+
export type { MenuEntry, MenuItem, MenuSeparator } from "../../hooks/index.js";
|
|
4
|
+
type OwnProps = Pick<UseContextualMenuProps, "distance" | "gutter" | "maxWidth" | "autoFit"> & {
|
|
5
|
+
/**
|
|
6
|
+
* Whether arrow keys wrap at the first/last item. Defaults to true (the
|
|
7
|
+
* APG menu convention), unlike the underlying hook. Declared here rather
|
|
8
|
+
* than picked from the hook so the differing default is documented where a
|
|
9
|
+
* consumer reads it.
|
|
10
|
+
*/
|
|
11
|
+
wrap?: boolean;
|
|
5
12
|
/**
|
|
6
13
|
* The trigger content, rendered inside the trigger button. Clicking it opens
|
|
7
14
|
* the menu.
|
|
8
15
|
*/
|
|
9
16
|
trigger: ReactNode;
|
|
10
17
|
/**
|
|
11
|
-
* The menu
|
|
12
|
-
*
|
|
18
|
+
* The menu entries: one flat list of items and separators
|
|
19
|
+
* (`{ type: "separator", key: "…" }`). An item's own `items` form its submenu, which
|
|
20
|
+
* may itself contain separators.
|
|
13
21
|
*/
|
|
14
|
-
|
|
22
|
+
items: MenuEntry[];
|
|
15
23
|
/** Accessible name for the menu. Falls back to labelling by the trigger. */
|
|
16
24
|
label?: string;
|
|
17
25
|
/**
|
|
@@ -26,5 +34,6 @@ export interface ContextualMenuProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
26
34
|
open?: boolean;
|
|
27
35
|
/** Called when the open state changes. */
|
|
28
36
|
onOpenChange?: (open: boolean) => void;
|
|
29
|
-
}
|
|
37
|
+
};
|
|
38
|
+
export type ContextualMenuProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
30
39
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ContextualMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EACV,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/ContextualMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE/E,KAAK,QAAQ,GAAG,IAAI,CAClB,sBAAsB,EACtB,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAC/C,GAAG;IACF;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,iBAAiB,GAAG,sBAAsB,CAAC,EAAE,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GACxC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { IconName } from "@canonical/ds-assets";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
We have used the `HTMLDivElement` as a default props base.
|
|
5
|
-
If your component is based on a different HTML element, please update it accordingly.
|
|
6
|
-
See https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API for a full list of HTML elements interfaces.
|
|
7
|
-
*/
|
|
8
|
-
export interface IconProps extends SVGAttributes<HTMLOrSVGElement> {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
type OwnProps = {
|
|
9
4
|
/**
|
|
10
5
|
* Name of the icon to display.
|
|
11
6
|
* Icons are decorative by default (`aria-hidden="true"`). Pass an
|
|
@@ -15,5 +10,8 @@ export interface IconProps extends SVGAttributes<HTMLOrSVGElement> {
|
|
|
15
10
|
icon: IconName;
|
|
16
11
|
/** Root path to the icons (default: /icons). Must be exposed to the user. */
|
|
17
12
|
rootPath?: string;
|
|
18
|
-
}
|
|
13
|
+
};
|
|
14
|
+
/** Props for the Icon component, extending the native props of its `<svg>` root. */
|
|
15
|
+
export type IconProps = OwnProps & Omit<ComponentProps<"svg">, keyof OwnProps>;
|
|
16
|
+
export {};
|
|
19
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Icon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Icon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,QAAQ,GAAG;IACd;;;;;OAKG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
type OwnProps = {
|
|
3
3
|
/** The code to render. */
|
|
4
4
|
children?: ReactNode;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
|
+
/** Props for the InlineCode component, extending its native `<code>` root. */
|
|
7
|
+
export type InlineCodeProps = OwnProps & Omit<ComponentProps<"code">, keyof OwnProps>;
|
|
8
|
+
export {};
|
|
6
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/InlineCode/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/InlineCode/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,KAAK,QAAQ,GAAG;IACd,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG,QAAQ,GACpC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import type { KEY_LABELS } from "./constants.js";
|
|
3
3
|
/** Valid keyboard key identifiers, derived from KEY_LABELS */
|
|
4
4
|
export type Key = keyof typeof KEY_LABELS;
|
|
5
|
-
|
|
5
|
+
type OwnProps = {
|
|
6
6
|
/** The keyboard key to display */
|
|
7
7
|
keyValue: Key;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
/** Props for the KeyboardKey component, extending its native `<kbd>` root. */
|
|
10
|
+
export type KeyboardKeyProps = OwnProps & Omit<ComponentProps<"kbd">, keyof OwnProps>;
|
|
11
|
+
export {};
|
|
9
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/KeyboardKey/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,8DAA8D;AAC9D,MAAM,MAAM,GAAG,GAAG,MAAM,OAAO,UAAU,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/KeyboardKey/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,8DAA8D;AAC9D,MAAM,MAAM,GAAG,GAAG,MAAM,OAAO,UAAU,CAAC;AAE1C,KAAK,QAAQ,GAAG;IACd,kCAAkC;IAClC,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GACrC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { UseDisclosureProps, WindowFitmentSide } from "../../hooks/index.js";
|
|
3
|
-
|
|
3
|
+
type OwnProps = Pick<UseDisclosureProps, "distance" | "gutter" | "maxWidth" | "autoFit" | "closeOnEscape" | "closeOnOutsideClick"> & {
|
|
4
4
|
/**
|
|
5
5
|
* The trigger content, rendered inside the `<summary>`. Clicking it toggles
|
|
6
6
|
* the popover; with no JavaScript the native `<details>` handles the toggle.
|
|
@@ -20,5 +20,12 @@ export interface PopoverProps extends Omit<HTMLAttributes<HTMLDetailsElement>, "
|
|
|
20
20
|
* (`inline-*` mirrors in RTL). Defaults to the reading-direction order.
|
|
21
21
|
*/
|
|
22
22
|
preferredDirections?: WindowFitmentSide[];
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Props for the Popover component. Extends its native `<details>` root, with
|
|
26
|
+
* `onToggle` deliberately excluded: once hydrated the disclosure hook owns the
|
|
27
|
+
* toggle, so consumers drive open state via `open`/`onOpenChange`.
|
|
28
|
+
*/
|
|
29
|
+
export type PopoverProps = OwnProps & Omit<ComponentProps<"details">, keyof OwnProps | "onToggle">;
|
|
30
|
+
export {};
|
|
24
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,KAAK,QAAQ,GAAG,IAAI,CAClB,kBAAkB,EAChB,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,eAAe,GACf,qBAAqB,CACxB,GAAG;IACF;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC3C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC"}
|
|
@@ -6,6 +6,10 @@ import type { TabItem } from "../../types.js";
|
|
|
6
6
|
* Not a public subcomponent — Tabs iterates `navigationRoot.items` and renders
|
|
7
7
|
* one of these per child. Kept internal so router integration lives in one
|
|
8
8
|
* place (the `LinkComponent` on Tabs), mirroring SideNavigation.
|
|
9
|
+
*
|
|
10
|
+
* Exempt from the native-prop extension convention: it is an internal renderer
|
|
11
|
+
* that derives its `<li>` from the `item` model rather than forwarding native
|
|
12
|
+
* props from the caller.
|
|
9
13
|
*/
|
|
10
14
|
export interface ItemProps {
|
|
11
15
|
/** The tab's navigation item. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tabs/common/Item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tabs/common/Item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,+EAA+E;IAC/E,MAAM,EAAE,OAAO,CAAC;IAChB,gFAAgF;IAChF,aAAa,EAAE,aAAa,CAAC;CAC9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Item } from "@canonical/ds-types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
import type { LinkComponent } from "../../types/link.js";
|
|
4
4
|
/**
|
|
5
5
|
* A tab, as a WD405 navigation `Item`. A tab strip is flat, so only the
|
|
@@ -7,16 +7,11 @@ import type { LinkComponent } from "../../types/link.js";
|
|
|
7
7
|
* `label` (visible text), `key` (identity when there is no url), and
|
|
8
8
|
* `disabled`. Nested `items` are ignored (tabs cannot nest).
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type TabItem = Item & {
|
|
11
11
|
/** CSS class name applied to this tab's `<li>`, in addition to the base classes. */
|
|
12
12
|
className?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
* Props for the Tabs component
|
|
16
|
-
*
|
|
17
|
-
* @implements ds:global.component.tabs
|
|
18
|
-
*/
|
|
19
|
-
export interface TabsProps extends HTMLAttributes<HTMLElement> {
|
|
13
|
+
};
|
|
14
|
+
type OwnProps = {
|
|
20
15
|
/**
|
|
21
16
|
* The tab strip, as a root navigation `Item`. Its **direct children**
|
|
22
17
|
* (`navigationRoot.items`) are rendered as tabs; the root node itself is a
|
|
@@ -42,5 +37,12 @@ export interface TabsProps extends HTMLAttributes<HTMLElement> {
|
|
|
42
37
|
* distinguish this tab strip from other navigation regions.
|
|
43
38
|
*/
|
|
44
39
|
"aria-label": string;
|
|
45
|
-
}
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Props for the Tabs component, extending the native props of its `<nav>` root.
|
|
43
|
+
*
|
|
44
|
+
* @implements ds:global.component.tabs
|
|
45
|
+
*/
|
|
46
|
+
export type TabsProps = OwnProps & Omit<ComponentProps<"nav">, keyof OwnProps>;
|
|
47
|
+
export {};
|
|
46
48
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG;IAC3B,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
type OwnProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Content to display in the tile body
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* Props for the Tile.Content subcomponent
|
|
4
10
|
*
|
|
@@ -9,10 +15,6 @@ import type { HTMLAttributes, ReactNode } from "react";
|
|
|
9
15
|
* - layout.direction: vertical
|
|
10
16
|
* - spacing.internal: spacing/medium
|
|
11
17
|
*/
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
* Content to display in the tile body
|
|
15
|
-
*/
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
}
|
|
18
|
+
export type ContentProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
19
|
+
export {};
|
|
18
20
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tile/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tile/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,KAAK,QAAQ,GAAG;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
type OwnProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Header content
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* Props for the Tile.Header subcomponent
|
|
4
10
|
*
|
|
@@ -10,10 +16,6 @@ import type { HTMLAttributes, ReactNode } from "react";
|
|
|
10
16
|
* - layout.align: center
|
|
11
17
|
* - spacing.internal: spacing/medium
|
|
12
18
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
* Header content
|
|
16
|
-
*/
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
}
|
|
19
|
+
export type HeaderProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
20
|
+
export {};
|
|
19
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tile/common/Header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tile/common/Header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,KAAK,QAAQ,GAAG;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAChC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
2
|
import type { ContentProps } from "./common/Content/types.js";
|
|
3
3
|
import type { HeaderProps } from "./common/Header/types.js";
|
|
4
|
+
type OwnProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Tile.Header and Tile.Content elements
|
|
7
|
+
* DOM order: Header first, Content second (per DSL edges)
|
|
8
|
+
*/
|
|
9
|
+
children: ReactElement<HeaderProps | ContentProps> | ReactElement<HeaderProps | ContentProps>[];
|
|
10
|
+
};
|
|
4
11
|
/**
|
|
5
12
|
* Props for the Tile component
|
|
6
13
|
*
|
|
@@ -15,13 +22,7 @@ import type { HeaderProps } from "./common/Header/types.js";
|
|
|
15
22
|
* - [0] tile-header (slotName: header, cardinality: 0..1)
|
|
16
23
|
* - [1] tile-content (slotName: default, cardinality: 1)
|
|
17
24
|
*/
|
|
18
|
-
export
|
|
19
|
-
/**
|
|
20
|
-
* Tile.Header and Tile.Content elements
|
|
21
|
-
* DOM order: Header first, Content second (per DSL edges)
|
|
22
|
-
*/
|
|
23
|
-
children: ReactElement<HeaderProps | ContentProps> | ReactElement<HeaderProps | ContentProps>[];
|
|
24
|
-
}
|
|
25
|
+
export type TileProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
25
26
|
/**
|
|
26
27
|
* Tile component type with attached subcomponents
|
|
27
28
|
*/
|
|
@@ -29,4 +30,5 @@ export type TileComponent = ((props: TileProps) => ReactElement) & {
|
|
|
29
30
|
Header: (props: HeaderProps) => ReactElement;
|
|
30
31
|
Content: (props: ContentProps) => ReactElement;
|
|
31
32
|
};
|
|
33
|
+
export {};
|
|
32
34
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,EACJ,YAAY,CAAC,WAAW,GAAG,YAAY,CAAC,GACxC,YAAY,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;CAChD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,YAAY,CAAC,GAAG;IACjE,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,YAAY,CAAC;IAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,YAAY,CAAC;CAChD,CAAC"}
|
|
@@ -8,6 +8,6 @@ import type { TooltipProps } from "./types.js";
|
|
|
8
8
|
*
|
|
9
9
|
* @implements ds:global.component.tooltip
|
|
10
10
|
*/
|
|
11
|
-
declare const Tooltip: ({
|
|
11
|
+
declare const Tooltip: ({ children, icon, className, style, isOpen, zIndex, ...props }: TooltipProps) => React.ReactElement;
|
|
12
12
|
export default Tooltip;
|
|
13
13
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C;;;;;;GAMG;AACH,QAAA,MAAM,OAAO,GAAI,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C;;;;;;GAMG;AACH,QAAA,MAAM,OAAO,GAAI,gEAQd,YAAY,KAAG,KAAK,CAAC,YA6BvB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentProps, CSSProperties, ReactNode } from "react";
|
|
2
2
|
import type { UseDisclosureProps } from "../../hooks/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* The full option surface of the tooltip engine that `withTooltip` owns:
|
|
@@ -59,9 +59,8 @@ export interface TooltipEngineProps extends Omit<UseDisclosureProps, "mode"> {
|
|
|
59
59
|
* timing, etc.
|
|
60
60
|
*/
|
|
61
61
|
export type WithTooltipOptions = Omit<TooltipEngineProps, "children" | "Message">;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className?: string;
|
|
62
|
+
type OwnProps = {
|
|
63
|
+
/** Child elements */
|
|
65
64
|
children: ReactNode;
|
|
66
65
|
/**
|
|
67
66
|
* An optional leading icon, rendered before the text and top-aligned with the
|
|
@@ -69,14 +68,16 @@ export interface TooltipProps {
|
|
|
69
68
|
* (e.g. an `<Icon>` or inline SVG).
|
|
70
69
|
*/
|
|
71
70
|
icon?: ReactNode;
|
|
72
|
-
style?: CSSProperties;
|
|
73
71
|
/** Whether the tooltip is open or not */
|
|
74
72
|
isOpen?: boolean;
|
|
75
|
-
/** Ref to the tooltip, useful for calculating its dimensions */
|
|
76
|
-
ref?: RefObject<HTMLDivElement | null>;
|
|
77
73
|
/** The z-index of the tooltip */
|
|
78
74
|
zIndex?: number;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Props for the Tooltip message element, extending the native props of its
|
|
78
|
+
* `<div>` root — so `id`, `className`, `style`, `ref`, and native handlers such
|
|
79
|
+
* as `onPointerEnter`/`onFocus` are all forwarded to the DOM node.
|
|
80
|
+
*/
|
|
81
|
+
export type TooltipProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
82
|
+
export {};
|
|
82
83
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAC1E;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yCAAyC;IACzC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,wDAAwD;IACxD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,kBAAkB,EAClB,UAAU,GAAG,SAAS,CACvB,CAAC;AACF,KAAK,QAAQ,GAAG;IACd,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
type OwnProps = {
|
|
3
3
|
/** The `Card` elements to lay out. */
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
/**
|
|
@@ -10,5 +10,8 @@ export interface CardsProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
* @default 1
|
|
11
11
|
*/
|
|
12
12
|
cardSpan?: number;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
|
+
/** Props for the Cards group, extending the native props of its `<div>` root. */
|
|
15
|
+
export type CardsProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
|
|
16
|
+
export {};
|
|
14
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/group/Cards/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/group/Cards/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,KAAK,QAAQ,GAAG;IACd,sCAAsC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the KeyboardKeys group. No DS-owned props — it renders a plain
|
|
4
|
+
* `<kbd>` root, so it accepts every native `<kbd>` prop.
|
|
5
|
+
*/
|
|
6
|
+
export type KeyboardKeysProps = ComponentProps<"kbd">;
|
|
4
7
|
//# sourceMappingURL=types.d.ts.map
|