@canonical/react-ds-global 0.33.0 → 0.35.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/dist/esm/lib/_work_in_progress/Label/styles.css +1 -1
- package/dist/esm/lib/_work_in_progress/SkipLink/SkipLink.js +1 -1
- package/dist/esm/lib/_work_in_progress/SkipLink/styles.css +7 -6
- package/dist/esm/lib/component/Accordion/Accordion.js +1 -1
- package/dist/esm/lib/component/Accordion/common/Item/Item.js +1 -1
- package/dist/esm/lib/component/Accordion/common/Item/styles.css +1 -1
- package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/lib/component/Breadcrumbs/common/Item/styles.css +1 -1
- package/dist/esm/lib/component/Breadcrumbs/styles.css +1 -1
- package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js +1 -1
- package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js +1 -1
- package/dist/esm/lib/component/Icon/styles.css +1 -1
- package/dist/esm/lib/component/InlineCode/InlineCode.js +1 -1
- package/dist/esm/lib/component/KeyboardKey/KeyboardKey.js +1 -1
- package/dist/esm/lib/component/Popover/Popover.js +1 -1
- package/dist/esm/lib/component/Tabs/Tabs.js +1 -1
- package/dist/esm/lib/component/Tabs/styles.css +1 -1
- package/dist/esm/lib/component/Tooltip/withTooltip.js +3 -0
- package/dist/esm/lib/component/Tooltip/withTooltip.js.map +1 -1
- package/dist/esm/lib/group/Cards/Cards.js +1 -1
- package/dist/esm/lib/group/KeyboardKeys/KeyboardKeys.js +1 -1
- package/dist/esm/lib/pattern/Timeline/common/Content/styles.css +1 -1
- package/dist/esm/lib/pattern/Timeline/common/Event/styles.css +1 -1
- package/dist/esm/lib/pattern/Timeline/styles.css +1 -1
- package/dist/esm/lib/subcomponent/Spinner/styles.css +1 -1
- package/dist/types/lib/_work_in_progress/Label/types.d.ts +1 -1
- package/dist/types/lib/_work_in_progress/SkipLink/SkipLink.d.ts +1 -1
- package/dist/types/lib/component/Accordion/Accordion.d.ts +1 -1
- package/dist/types/lib/component/Accordion/common/Item/Item.d.ts +1 -1
- package/dist/types/lib/component/Accordion/common/Item/types.d.ts +1 -1
- package/dist/types/lib/component/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts +1 -1
- package/dist/types/lib/component/Breadcrumbs/types.d.ts +1 -1
- package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts +1 -1
- package/dist/types/lib/component/ContextualMenu/common/Item/Item.d.ts +1 -1
- package/dist/types/lib/component/InlineCode/InlineCode.d.ts +1 -1
- package/dist/types/lib/component/KeyboardKey/KeyboardKey.d.ts +1 -1
- package/dist/types/lib/component/Popover/Popover.d.ts +1 -1
- package/dist/types/lib/component/Tabs/Tabs.d.ts +1 -1
- package/dist/types/lib/component/Tabs/types.d.ts +1 -1
- package/dist/types/lib/component/Tooltip/withTooltip.d.ts +3 -0
- package/dist/types/lib/component/Tooltip/withTooltip.d.ts.map +1 -1
- package/dist/types/lib/group/Cards/Cards.d.ts +1 -1
- package/dist/types/lib/group/KeyboardKeys/KeyboardKeys.d.ts +1 -1
- package/dist/types/lib/pattern/Timeline/common/Content/types.d.ts +1 -1
- package/dist/types/lib/pattern/Timeline/common/Event/types.d.ts +1 -1
- package/dist/types/lib/pattern/Timeline/types.d.ts +1 -1
- package/package.json +18 -17
|
@@ -9,7 +9,7 @@ const componentCssClassName = "ds skip-link";
|
|
|
9
9
|
* `SkipLink` should be placed near the top of your document body, before the `<main>` element.
|
|
10
10
|
* The `<main>` element should have a `tabindex` of `-1` to prevent it from receiving focus from the keyboard without using the skip link.
|
|
11
11
|
*
|
|
12
|
-
* @implements ds:
|
|
12
|
+
* @implements ds:global.pattern.skip_link
|
|
13
13
|
*/
|
|
14
14
|
const SkipLink = ({ className, children, mainId = "main", ...props }) => {
|
|
15
15
|
const href = `#${mainId}`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/* Component tokens
|
|
1
|
+
/* Component tokens - sourced from @canonical/design-tokens */
|
|
2
|
+
|
|
2
3
|
:root {
|
|
3
4
|
--skip-link-background: var(--color-background-layer2);
|
|
4
5
|
--skip-link-color: var(--color-text-link);
|
|
@@ -6,12 +7,12 @@
|
|
|
6
7
|
--skip-link-top: -999px;
|
|
7
8
|
--skip-link-outline-offset: calc(
|
|
8
9
|
-1 *
|
|
9
|
-
var(--
|
|
10
|
+
var(--dimension-stroke-thickness-large)
|
|
10
11
|
);
|
|
11
|
-
--skip-link-focus-inset-inline-start: var(--
|
|
12
|
-
--skip-link-focus-padding-block: var(--
|
|
13
|
-
--skip-link-focus-padding-inline: var(--
|
|
14
|
-
--skip-link-focus-top: var(--
|
|
12
|
+
--skip-link-focus-inset-inline-start: var(--space-100);
|
|
13
|
+
--skip-link-focus-padding-block: var(--space-200);
|
|
14
|
+
--skip-link-focus-padding-inline: var(--space-200);
|
|
15
|
+
--skip-link-focus-top: var(--space-100);
|
|
15
16
|
--skip-link-focus-z-index: 999999;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -14,7 +14,7 @@ const componentCssClassName = "ds accordion";
|
|
|
14
14
|
*
|
|
15
15
|
* `import { Accordion } from "@canonical/react-ds-global";`
|
|
16
16
|
*
|
|
17
|
-
* @implements
|
|
17
|
+
* @implements ds:global.component.accordion
|
|
18
18
|
*/
|
|
19
19
|
const Accordion = ({ className, children, ...props }) => (_jsx("div", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: children }));
|
|
20
20
|
Accordion.Item = Item;
|
|
@@ -11,7 +11,7 @@ const componentCssClassName = "ds accordion-item";
|
|
|
11
11
|
* state is required; `expanded`/`onExpandedChange` is an optional controlled
|
|
12
12
|
* overlay on the native `open` attribute.
|
|
13
13
|
*
|
|
14
|
-
* @implements
|
|
14
|
+
* @implements ds:global.subcomponent.accordion-item
|
|
15
15
|
*/
|
|
16
16
|
const Item = ({ heading, children, expanded = false, onExpandedChange, className, ...props }) => {
|
|
17
17
|
const handleToggle = useCallback((event) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Accordion.Item styles
|
|
3
|
-
* @implements
|
|
3
|
+
* @implements ds:global.subcomponent.accordion-item
|
|
4
4
|
*
|
|
5
5
|
* Rendered with native <details>/<summary>. Typography and baseline alignment
|
|
6
6
|
* come from the `.p` class on the heading and content. Tokens follow the Figma
|
|
@@ -15,7 +15,7 @@ const componentCssClassName = "ds breadcrumbs";
|
|
|
15
15
|
*
|
|
16
16
|
* `import { Breadcrumbs } from "@canonical/react-ds-global";`
|
|
17
17
|
*
|
|
18
|
-
* @implements ds:global.
|
|
18
|
+
* @implements ds:global.component.breadcrumbs
|
|
19
19
|
*/
|
|
20
20
|
const Breadcrumbs = ({ items, separator = "/", LinkComponent = "a", className, "aria-label": ariaLabel = "Breadcrumb", ...props }) => (_jsx("nav", { className: [componentCssClassName, className].filter(Boolean).join(" "), "aria-label": ariaLabel, ...props, children: _jsx("ol", { className: "list p", children: items.map((item) => {
|
|
21
21
|
const itemKey = getItemId(item);
|
|
@@ -14,7 +14,7 @@ const componentCssClassName = "ds contextual-menu";
|
|
|
14
14
|
*
|
|
15
15
|
* `import { ContextualMenu } from "@canonical/react-ds-global";`
|
|
16
16
|
*
|
|
17
|
-
* @implements
|
|
17
|
+
* @implements ds:global.component.contextual_menu
|
|
18
18
|
*/
|
|
19
19
|
const ContextualMenu = ({ trigger, groups, label, className, preferredDirections, distance, gutter, maxWidth, autoFit, wrap, onSelect, open, onOpenChange, ...props }) => {
|
|
20
20
|
// A synthetic root holds the groups so the tree is menu -> group -> item.
|
|
@@ -8,7 +8,7 @@ const componentCssClassName = "ds contextual-menu-item";
|
|
|
8
8
|
* the item opts into a custom renderer (`displayItemsType: "custom"` with a
|
|
9
9
|
* `Component`), that component owns the item's content instead.
|
|
10
10
|
*
|
|
11
|
-
* @implements
|
|
11
|
+
* @implements ds:global.subcomponent.contextual-menu-item
|
|
12
12
|
*/
|
|
13
13
|
const Item = ({ item, itemProps, onSelect }) => {
|
|
14
14
|
const { label, disabled, slot, icon, className, displayItemsType, Component, items, } = item;
|
|
@@ -6,7 +6,7 @@ const componentCssClassName = "ds inline-code";
|
|
|
6
6
|
*
|
|
7
7
|
* `import { InlineCode } from "@canonical/react-ds-global";`
|
|
8
8
|
*
|
|
9
|
-
* @implements
|
|
9
|
+
* @implements ds:global.component.inline_code
|
|
10
10
|
*/
|
|
11
11
|
const InlineCode = ({ className, children, ...props }) => {
|
|
12
12
|
return (_jsx("code", { className: [componentCssClassName, "code", className]
|
|
@@ -17,7 +17,7 @@ const componentCssClassName = "ds keyboard-key surface";
|
|
|
17
17
|
*
|
|
18
18
|
* `import { KeyboardKey } from "@canonical/react-ds-global";`
|
|
19
19
|
*
|
|
20
|
-
* @implements
|
|
20
|
+
* @implements ds:global.component.keyboard_key
|
|
21
21
|
*/
|
|
22
22
|
const KeyboardKey = ({ keyValue, className, ...props }) => (_jsx("kbd", { className: [componentCssClassName, "code", className]
|
|
23
23
|
.filter(Boolean)
|
|
@@ -14,7 +14,7 @@ const contentSurfaceClassName = "contrasted";
|
|
|
14
14
|
*
|
|
15
15
|
* `import { Popover } from "@canonical/react-ds-global";`
|
|
16
16
|
*
|
|
17
|
-
* @implements
|
|
17
|
+
* @implements ds:global.component.popover
|
|
18
18
|
*/
|
|
19
19
|
const Popover = ({ trigger, children, className, open, onOpenChange, preferredDirections, distance, gutter, maxWidth, autoFit, closeOnEscape, closeOnOutsideClick, ...props }) => {
|
|
20
20
|
const { isOpen, targetRef, popupRef, popupPositionStyle, popupId, bestPosition, getToggleProps, getContentProps, } = useDisclosure({
|
|
@@ -12,7 +12,7 @@ const componentCssClassName = "ds tabs";
|
|
|
12
12
|
*
|
|
13
13
|
* `import { Tabs } from "@canonical/react-ds-global";`
|
|
14
14
|
*
|
|
15
|
-
* @implements
|
|
15
|
+
* @implements ds:global.component.tabs
|
|
16
16
|
*/
|
|
17
17
|
const Tabs = ({ navigationRoot, LinkComponent = "a", currentUrl, className, listClassName, ...props }) => {
|
|
18
18
|
// Only the root's direct children are rendered (the root is a container).
|
|
@@ -77,5 +77,8 @@ const withTooltip = (Component, Message, popupProps = {}) => {
|
|
|
77
77
|
WrappedComponent.displayName = `withTooltip(${Component.displayName || Component.name || "Component"})`;
|
|
78
78
|
return WrappedComponent;
|
|
79
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* @implements ds:global.component.tooltip_wrapper
|
|
82
|
+
*/
|
|
80
83
|
export default withTooltip;
|
|
81
84
|
//# sourceMappingURL=withTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTooltip.js","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/withTooltip.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,OAAO,MAAM,cAAc,CAAC;AAGnC,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,aAAa,GAAG,CAAC,EACrB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,GAAG,KAAK,EACW,EAAgB,EAAE;IACrC,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe;IACf,6EAA6E;IAC7E,iEAAiE;MAClE,GAAG,aAAa,CAAC;QAChB,QAAQ;QACR,OAAO;QACP,GAAG,KAAK;QACR,MAAM,EAAE,IAAI,IAAI,KAAK,CAAC,MAAM;QAC5B,IAA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,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,UAAU,YAC7C,KAAC,SAAS,OAAK,KAAK,GAAI,GACV,CACjB,CAAC;IACJ,CAAC,CAAC;IAEF,2CAA2C;IAC3C,gBAAgB,CAAC,WAAW,GAAG,eAC7B,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAC7C,GAAG,CAAC;IAEJ,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF;;GAEG;AACH,eAAe,WAAW,CAAC"}
|
|
@@ -32,7 +32,7 @@ const componentCssClassName = "ds cards subgrid";
|
|
|
32
32
|
* </Cards>
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
|
-
* @implements
|
|
35
|
+
* @implements ds:global.group.cards
|
|
36
36
|
* @returns {ReactElement} the Cards group
|
|
37
37
|
*/
|
|
38
38
|
const Cards = ({ className, children, cardSpan = 1, style, ...props }) => {
|
|
@@ -16,7 +16,7 @@ const componentCssClassName = "ds keyboard-keys";
|
|
|
16
16
|
*
|
|
17
17
|
* `import { KeyboardKeys } from "@canonical/react-ds-global";`
|
|
18
18
|
*
|
|
19
|
-
* @implements
|
|
19
|
+
* @implements ds:global.group.keyboard_keys
|
|
20
20
|
*/
|
|
21
21
|
const KeyboardKeys = ({ className, children, ...props }) => {
|
|
22
22
|
return (_jsx("kbd", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: children }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Spinner styles
|
|
3
|
-
* @implements
|
|
3
|
+
* @implements ds:global.subcomponent.spinner
|
|
4
4
|
*
|
|
5
5
|
* The Spinner renders the `spinner` glyph and rotates it continuously. The
|
|
6
6
|
* rotation is a linear, infinite animation so the motion reads as steady
|
|
@@ -9,7 +9,7 @@ import "./styles.css";
|
|
|
9
9
|
* `SkipLink` should be placed near the top of your document body, before the `<main>` element.
|
|
10
10
|
* The `<main>` element should have a `tabindex` of `-1` to prevent it from receiving focus from the keyboard without using the skip link.
|
|
11
11
|
*
|
|
12
|
-
* @implements ds:
|
|
12
|
+
* @implements ds:global.pattern.skip_link
|
|
13
13
|
*/
|
|
14
14
|
declare const SkipLink: ({ className, children, mainId, ...props }: SkipLinkProps) => React.ReactElement;
|
|
15
15
|
export default SkipLink;
|
|
@@ -13,7 +13,7 @@ import "./styles.css";
|
|
|
13
13
|
*
|
|
14
14
|
* `import { Accordion } from "@canonical/react-ds-global";`
|
|
15
15
|
*
|
|
16
|
-
* @implements
|
|
16
|
+
* @implements ds:global.component.accordion
|
|
17
17
|
*/
|
|
18
18
|
declare const Accordion: {
|
|
19
19
|
({ className, children, ...props }: AccordionProps): React.ReactElement;
|
|
@@ -10,7 +10,7 @@ import "./styles.css";
|
|
|
10
10
|
* state is required; `expanded`/`onExpandedChange` is an optional controlled
|
|
11
11
|
* overlay on the native `open` attribute.
|
|
12
12
|
*
|
|
13
|
-
* @implements
|
|
13
|
+
* @implements ds:global.subcomponent.accordion-item
|
|
14
14
|
*/
|
|
15
15
|
declare const Item: {
|
|
16
16
|
({ heading, children, expanded, onExpandedChange, className, ...props }: ItemProps): React.ReactElement;
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes, ReactNode } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* Props for the Accordion.Item subcomponent
|
|
4
4
|
*
|
|
5
|
-
* @implements
|
|
5
|
+
* @implements ds:global.subcomponent.accordion-item
|
|
6
6
|
*
|
|
7
7
|
* Anatomy (from DSL):
|
|
8
8
|
* - layout.type: stack
|
|
@@ -13,7 +13,7 @@ import "./styles.css";
|
|
|
13
13
|
*
|
|
14
14
|
* `import { Breadcrumbs } from "@canonical/react-ds-global";`
|
|
15
15
|
*
|
|
16
|
-
* @implements ds:global.
|
|
16
|
+
* @implements ds:global.component.breadcrumbs
|
|
17
17
|
*/
|
|
18
18
|
declare const Breadcrumbs: {
|
|
19
19
|
({ items, separator, LinkComponent, className, "aria-label": ariaLabel, ...props }: BreadcrumbsProps): React.ReactElement;
|
|
@@ -7,7 +7,7 @@ export type { LinkComponentProps };
|
|
|
7
7
|
*
|
|
8
8
|
* Extends navigation Item (WD405) with breadcrumb-specific props.
|
|
9
9
|
*
|
|
10
|
-
* @implements
|
|
10
|
+
* @implements ds:global.subcomponent.breadcrumbs-item
|
|
11
11
|
*/
|
|
12
12
|
export interface ItemProps extends HTMLAttributes<HTMLLIElement>, Item {
|
|
13
13
|
/**
|
|
@@ -29,7 +29,7 @@ export interface BreadcrumbItem extends Item {
|
|
|
29
29
|
/**
|
|
30
30
|
* Props for the Breadcrumbs component
|
|
31
31
|
*
|
|
32
|
-
* @implements
|
|
32
|
+
* @implements ds:global.component.breadcrumbs
|
|
33
33
|
*/
|
|
34
34
|
export interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {
|
|
35
35
|
/**
|
|
@@ -8,7 +8,7 @@ import "./styles.css";
|
|
|
8
8
|
*
|
|
9
9
|
* `import { ContextualMenu } from "@canonical/react-ds-global";`
|
|
10
10
|
*
|
|
11
|
-
* @implements
|
|
11
|
+
* @implements ds:global.component.contextual_menu
|
|
12
12
|
*/
|
|
13
13
|
declare const ContextualMenu: ({ trigger, groups, label, className, preferredDirections, distance, gutter, maxWidth, autoFit, wrap, onSelect, open, onOpenChange, ...props }: ContextualMenuProps) => React.ReactElement;
|
|
14
14
|
export default ContextualMenu;
|
|
@@ -7,7 +7,7 @@ import "./styles.css";
|
|
|
7
7
|
* the item opts into a custom renderer (`displayItemsType: "custom"` with a
|
|
8
8
|
* `Component`), that component owns the item's content instead.
|
|
9
9
|
*
|
|
10
|
-
* @implements
|
|
10
|
+
* @implements ds:global.subcomponent.contextual-menu-item
|
|
11
11
|
*/
|
|
12
12
|
declare const Item: ({ item, itemProps, onSelect }: ItemProps) => React.ReactElement;
|
|
13
13
|
export default Item;
|
|
@@ -6,7 +6,7 @@ import "./styles.css";
|
|
|
6
6
|
*
|
|
7
7
|
* `import { InlineCode } from "@canonical/react-ds-global";`
|
|
8
8
|
*
|
|
9
|
-
* @implements
|
|
9
|
+
* @implements ds:global.component.inline_code
|
|
10
10
|
*/
|
|
11
11
|
declare const InlineCode: ({ className, children, ...props }: InlineCodeProps) => React.ReactElement;
|
|
12
12
|
export default InlineCode;
|
|
@@ -12,7 +12,7 @@ import "./styles.css";
|
|
|
12
12
|
*
|
|
13
13
|
* `import { KeyboardKey } from "@canonical/react-ds-global";`
|
|
14
14
|
*
|
|
15
|
-
* @implements
|
|
15
|
+
* @implements ds:global.component.keyboard_key
|
|
16
16
|
*/
|
|
17
17
|
declare const KeyboardKey: ({ keyValue, className, ...props }: KeyboardKeyProps) => React.ReactElement;
|
|
18
18
|
export default KeyboardKey;
|
|
@@ -9,7 +9,7 @@ import "./styles.css";
|
|
|
9
9
|
*
|
|
10
10
|
* `import { Popover } from "@canonical/react-ds-global";`
|
|
11
11
|
*
|
|
12
|
-
* @implements
|
|
12
|
+
* @implements ds:global.component.popover
|
|
13
13
|
*/
|
|
14
14
|
declare const Popover: ({ trigger, children, className, open, onOpenChange, preferredDirections, distance, gutter, maxWidth, autoFit, closeOnEscape, closeOnOutsideClick, ...props }: PopoverProps) => React.ReactElement;
|
|
15
15
|
export default Popover;
|
|
@@ -11,7 +11,7 @@ import "./styles.css";
|
|
|
11
11
|
*
|
|
12
12
|
* `import { Tabs } from "@canonical/react-ds-global";`
|
|
13
13
|
*
|
|
14
|
-
* @implements
|
|
14
|
+
* @implements ds:global.component.tabs
|
|
15
15
|
*/
|
|
16
16
|
declare const Tabs: ({ navigationRoot, LinkComponent, currentUrl, className, listClassName, ...props }: TabsProps) => React.ReactElement;
|
|
17
17
|
export default Tabs;
|
|
@@ -12,5 +12,8 @@ import "./styles.css";
|
|
|
12
12
|
* `icon`, `distance`, `autoFit`, `messageElementStyle`, etc.
|
|
13
13
|
*/
|
|
14
14
|
declare const withTooltip: <TProps extends object>(Component: ComponentType<TProps>, Message: ReactNode, popupProps?: WithTooltipOptions) => FC<TProps>;
|
|
15
|
+
/**
|
|
16
|
+
* @implements ds:global.component.tooltip_wrapper
|
|
17
|
+
*/
|
|
15
18
|
export default withTooltip;
|
|
16
19
|
//# sourceMappingURL=withTooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTooltip.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/withTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,EAAE,EAEF,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEzE,OAAO,cAAc,CAAC;AA6HtB;;;;;;;;;GASG;AACH,QAAA,MAAM,WAAW,GAAI,MAAM,SAAS,MAAM,EACxC,WAAW,aAAa,CAAC,MAAM,CAAC,EAChC,SAAS,SAAS,EAClB,aAAY,kBAAuB,KAClC,EAAE,CAAC,MAAM,CAeX,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"withTooltip.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Tooltip/withTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,EAAE,EAEF,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEzE,OAAO,cAAc,CAAC;AA6HtB;;;;;;;;;GASG;AACH,QAAA,MAAM,WAAW,GAAI,MAAM,SAAS,MAAM,EACxC,WAAW,aAAa,CAAC,MAAM,CAAC,EAChC,SAAS,SAAS,EAClB,aAAY,kBAAuB,KAClC,EAAE,CAAC,MAAM,CAeX,CAAC;AAEF;;GAEG;AACH,eAAe,WAAW,CAAC"}
|
|
@@ -32,7 +32,7 @@ import "./styles.css";
|
|
|
32
32
|
* </Cards>
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
|
-
* @implements
|
|
35
|
+
* @implements ds:global.group.cards
|
|
36
36
|
* @returns {ReactElement} the Cards group
|
|
37
37
|
*/
|
|
38
38
|
declare const Cards: ({ className, children, cardSpan, style, ...props }: CardsProps) => ReactElement;
|
|
@@ -16,7 +16,7 @@ import "./styles.css";
|
|
|
16
16
|
*
|
|
17
17
|
* `import { KeyboardKeys } from "@canonical/react-ds-global";`
|
|
18
18
|
*
|
|
19
|
-
* @implements
|
|
19
|
+
* @implements ds:global.group.keyboard_keys
|
|
20
20
|
*/
|
|
21
21
|
declare const KeyboardKeys: ({ className, children, ...props }: KeyboardKeysProps) => React.ReactElement;
|
|
22
22
|
export default KeyboardKeys;
|
|
@@ -3,7 +3,7 @@ import type { EventProps } from "../Event/types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Timeline.Content subcomponent
|
|
5
5
|
*
|
|
6
|
-
* @implements
|
|
6
|
+
* @implements ds:global.subcomponent.timeline-content
|
|
7
7
|
*
|
|
8
8
|
* Anatomy (from DSL):
|
|
9
9
|
* - layout.type: stack
|
|
@@ -3,7 +3,7 @@ import type { HTMLAttributes, ReactNode } from "react";
|
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Timeline.Event subcomponent
|
|
5
5
|
*
|
|
6
|
-
* @implements
|
|
6
|
+
* @implements ds:global.subcomponent.timeline-event
|
|
7
7
|
*
|
|
8
8
|
* Anatomy (from DSL):
|
|
9
9
|
* - layout.type: flow
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/react-ds-global",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,30 +44,31 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@canonical/design-tokens": "0.8.1",
|
|
47
|
-
"@canonical/ds-assets": "^0.
|
|
48
|
-
"@canonical/react-hooks": "^0.
|
|
49
|
-
"@canonical/storybook-config": "^0.
|
|
50
|
-
"@canonical/styles": "^0.
|
|
51
|
-
"@canonical/utils": "^0.
|
|
47
|
+
"@canonical/ds-assets": "^0.35.0",
|
|
48
|
+
"@canonical/react-hooks": "^0.35.0",
|
|
49
|
+
"@canonical/storybook-config": "^0.35.0",
|
|
50
|
+
"@canonical/styles": "^0.35.0",
|
|
51
|
+
"@canonical/utils": "^0.35.0",
|
|
52
52
|
"react": "^19.2.4",
|
|
53
53
|
"react-dom": "^19.2.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@biomejs/biome": "2.4.9",
|
|
57
|
-
"@canonical/biome-config": "^0.
|
|
58
|
-
"@canonical/ds-types": "^0.
|
|
59
|
-
"@canonical/router-core": "^0.
|
|
60
|
-
"@canonical/router-react": "^0.
|
|
61
|
-
"@canonical/storybook-
|
|
62
|
-
"@canonical/
|
|
63
|
-
"@canonical/
|
|
64
|
-
"@canonical/
|
|
57
|
+
"@canonical/biome-config": "^0.35.0",
|
|
58
|
+
"@canonical/ds-types": "^0.35.0",
|
|
59
|
+
"@canonical/router-core": "^0.35.0",
|
|
60
|
+
"@canonical/router-react": "^0.35.0",
|
|
61
|
+
"@canonical/storybook-addon-utils": "^0.35.0",
|
|
62
|
+
"@canonical/storybook-helpers": "^0.35.0",
|
|
63
|
+
"@canonical/typescript-config-react": "^0.35.0",
|
|
64
|
+
"@canonical/vitest-config-react": "^0.35.0",
|
|
65
|
+
"@canonical/webarchitect": "^0.35.0",
|
|
65
66
|
"@chromatic-com/storybook": "^5.0.1",
|
|
66
67
|
"@storybook/addon-docs": "^10.3.1",
|
|
67
68
|
"@storybook/react-vite": "^10.3.1",
|
|
68
|
-
"@testing-library/jest-dom": "^
|
|
69
|
+
"@testing-library/jest-dom": "^7.0.0",
|
|
69
70
|
"@testing-library/react": "^16.3.2",
|
|
70
|
-
"@types/node": "^
|
|
71
|
+
"@types/node": "^26.0.0",
|
|
71
72
|
"@types/react": "^19.2.14",
|
|
72
73
|
"@types/react-dom": "^19.2.3",
|
|
73
74
|
"@vitejs/plugin-react": "^6.0.0",
|
|
@@ -79,5 +80,5 @@
|
|
|
79
80
|
"vite": "^8.0.1",
|
|
80
81
|
"vitest": "^4.0.18"
|
|
81
82
|
},
|
|
82
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "5198c5399ef657959272c0e35924391573d81146"
|
|
83
84
|
}
|