@canonical/react-ds-global 0.30.0 → 0.31.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.
Files changed (80) hide show
  1. package/dist/esm/lib/component/Accordion/common/Item/styles.css +57 -9
  2. package/dist/esm/lib/component/Badge/styles.css +25 -24
  3. package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js +2 -2
  4. package/dist/esm/lib/component/Breadcrumbs/common/Item/Item.js +12 -2
  5. package/dist/esm/lib/component/Breadcrumbs/common/Item/Item.js.map +1 -1
  6. package/dist/esm/lib/component/Breadcrumbs/common/Item/styles.css +17 -5
  7. package/dist/esm/lib/component/Breadcrumbs/styles.css +3 -0
  8. package/dist/esm/lib/component/Button/Button.js +4 -5
  9. package/dist/esm/lib/component/Button/Button.js.map +1 -1
  10. package/dist/esm/lib/component/Button/styles.css +78 -12
  11. package/dist/esm/lib/component/Card/Card.js +7 -0
  12. package/dist/esm/lib/component/Card/Card.js.map +1 -1
  13. package/dist/esm/lib/component/Card/common/Content/styles.css +7 -3
  14. package/dist/esm/lib/component/Card/common/Footer/Footer.js +1 -1
  15. package/dist/esm/lib/component/Card/common/Footer/styles.css +12 -2
  16. package/dist/esm/lib/component/Card/styles.css +52 -14
  17. package/dist/esm/lib/component/Chip/styles.css +3 -0
  18. package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js +6 -4
  19. package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js.map +1 -1
  20. package/dist/esm/lib/component/ContextualMenu/common/Item/styles.css +31 -3
  21. package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js +24 -5
  22. package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js.map +1 -1
  23. package/dist/esm/lib/component/Tooltip/common/TooltipArea/TooltipArea.js +3 -5
  24. package/dist/esm/lib/component/Tooltip/common/TooltipArea/TooltipArea.js.map +1 -1
  25. package/dist/esm/lib/group/Cards/Cards.js +49 -0
  26. package/dist/esm/lib/group/Cards/Cards.js.map +1 -0
  27. package/dist/esm/lib/group/Cards/index.js +3 -0
  28. package/dist/esm/lib/group/Cards/index.js.map +1 -0
  29. package/dist/esm/lib/group/Cards/styles.css +55 -0
  30. package/dist/esm/lib/group/Cards/types.js +2 -0
  31. package/dist/esm/lib/group/Cards/types.js.map +1 -0
  32. package/dist/esm/lib/group/index.js +1 -0
  33. package/dist/esm/lib/group/index.js.map +1 -1
  34. package/dist/esm/lib/hooks/index.js +1 -0
  35. package/dist/esm/lib/hooks/index.js.map +1 -1
  36. package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js +6 -0
  37. package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js.map +1 -1
  38. package/dist/esm/lib/hooks/useIsMounted/index.js +3 -0
  39. package/dist/esm/lib/hooks/useIsMounted/index.js.map +1 -0
  40. package/dist/esm/lib/hooks/useIsMounted/types.js +2 -0
  41. package/dist/esm/lib/hooks/useIsMounted/types.js.map +1 -0
  42. package/dist/esm/lib/hooks/useIsMounted/useIsMounted.js +21 -0
  43. package/dist/esm/lib/hooks/useIsMounted/useIsMounted.js.map +1 -0
  44. package/dist/types/lib/component/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  45. package/dist/types/lib/component/Breadcrumbs/common/Item/Item.d.ts.map +1 -1
  46. package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts +5 -0
  47. package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts.map +1 -1
  48. package/dist/types/lib/component/Breadcrumbs/types.d.ts +15 -0
  49. package/dist/types/lib/component/Breadcrumbs/types.d.ts.map +1 -1
  50. package/dist/types/lib/component/Button/Button.d.ts.map +1 -1
  51. package/dist/types/lib/component/Button/types.d.ts +7 -5
  52. package/dist/types/lib/component/Button/types.d.ts.map +1 -1
  53. package/dist/types/lib/component/Card/Card.d.ts +7 -0
  54. package/dist/types/lib/component/Card/Card.d.ts.map +1 -1
  55. package/dist/types/lib/component/Card/common/Footer/Footer.d.ts +1 -1
  56. package/dist/types/lib/component/Card/common/Footer/types.d.ts +1 -1
  57. package/dist/types/lib/component/Card/common/Footer/types.d.ts.map +1 -1
  58. package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts.map +1 -1
  59. package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts.map +1 -1
  60. package/dist/types/lib/component/Tooltip/common/TooltipArea/TooltipArea.d.ts +1 -1
  61. package/dist/types/lib/component/Tooltip/common/TooltipArea/TooltipArea.d.ts.map +1 -1
  62. package/dist/types/lib/group/Cards/Cards.d.ts +40 -0
  63. package/dist/types/lib/group/Cards/Cards.d.ts.map +1 -0
  64. package/dist/types/lib/group/Cards/index.d.ts +3 -0
  65. package/dist/types/lib/group/Cards/index.d.ts.map +1 -0
  66. package/dist/types/lib/group/Cards/types.d.ts +14 -0
  67. package/dist/types/lib/group/Cards/types.d.ts.map +1 -0
  68. package/dist/types/lib/group/index.d.ts +1 -0
  69. package/dist/types/lib/group/index.d.ts.map +1 -1
  70. package/dist/types/lib/hooks/index.d.ts +1 -0
  71. package/dist/types/lib/hooks/index.d.ts.map +1 -1
  72. package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts.map +1 -1
  73. package/dist/types/lib/hooks/useIsMounted/index.d.ts +3 -0
  74. package/dist/types/lib/hooks/useIsMounted/index.d.ts.map +1 -0
  75. package/dist/types/lib/hooks/useIsMounted/types.d.ts +6 -0
  76. package/dist/types/lib/hooks/useIsMounted/types.d.ts.map +1 -0
  77. package/dist/types/lib/hooks/useIsMounted/useIsMounted.d.ts +15 -0
  78. package/dist/types/lib/hooks/useIsMounted/useIsMounted.d.ts.map +1 -0
  79. package/dist/types/lib/types/link.d.ts +1 -1
  80. package/package.json +15 -15
@@ -8,6 +8,13 @@ import "./styles.css";
8
8
  * predictable structure that allows the user to compare attributes across data
9
9
  * objects.
10
10
  *
11
+ * A Card is always a grid participant: `.ds.card` is a ROW SUBGRID that spans
12
+ * four fixed section tracks (image / header / content / footer), inheriting them
13
+ * from its parent grid. Standalone (wrapped in a `.grid`) it lays its own
14
+ * sections out on those tracks; inside a `Cards` group it shares the group's
15
+ * tracks so the same sections line up across every card in the row. See the
16
+ * `Cards` group component for the full layout model.
17
+ *
11
18
  * `import { Card } from "@canonical/react-ds-global";`
12
19
  *
13
20
  * @implements ds:global.component.card
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,cAAc,CAAC;AAQtB;;;;;;;;;;GAUG;AACH,QAAA,MAAM,IAAI;wCAIP,SAAS,GAAG,KAAK,CAAC,YAAY;;;;;;;;;;;;;;;;;CAOhC,CAAC;AAOF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,cAAc,CAAC;AAQtB;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,IAAI;wCAIP,SAAS,GAAG,KAAK,CAAC,YAAY;;;;;;;;;;;;;;;;;CAOhC,CAAC;AAOF,eAAe,IAAI,CAAC"}
@@ -3,7 +3,7 @@ import type { FooterProps } from "./types.js";
3
3
  import "./styles.css";
4
4
  /**
5
5
  * Footer component for Card. A padded content-bearing section pinned to the
6
- * bottom of the card, for actions or supplementary information.
6
+ * bottom of the card, for tags and labels.
7
7
  *
8
8
  * @implements ds:global.subcomponent.card-footer
9
9
  */
@@ -5,7 +5,7 @@ import type { HTMLAttributes, ReactNode } from "react";
5
5
  * @implements ds:global.subcomponent.card-footer
6
6
  */
7
7
  export interface FooterProps extends HTMLAttributes<HTMLDivElement> {
8
- /** Required child contents */
8
+ /** Required child contents: tags and labels (e.g. `Chip`), not CTAs or links */
9
9
  children: ReactNode;
10
10
  }
11
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Card/common/Footer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,8BAA8B;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Card/common/Footer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;CACrB"}
@@ -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;AAM/B,OAAO,KAAK,EAAE,mBAAmB,EAAY,MAAM,YAAY,CAAC;AAChE,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,QAAA,MAAM,cAAc,GAAI,+IAerB,mBAAmB,KAAG,KAAK,CAAC,YA8I9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
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,+IAerB,mBAAmB,KAAG,KAAK,CAAC,YAqJ9B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -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,EAA+B,MAAM,OAAO,CAAC;AAGvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C;;;;;;GAMG;AACH,QAAA,MAAM,OAAO,GAAI,UAAU;IAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;CAAE,KAAG,YActD,CAAC;AA8HF,eAAe,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;AAO9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C;;;;;;GAMG;AACH,QAAA,MAAM,OAAO,GAAI,UAAU;IAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;CAAE,KAAG,YActD,CAAC;AAkJF,eAAe,OAAO,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type ReactElement } from "react";
1
+ import type { ReactElement } from "react";
2
2
  import type { TooltipAreaProps } from "./types.js";
3
3
  import "./styles.css";
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipArea.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/TooltipArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAGlB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,cAAc,CAAC;AAItB;;;GAGG;AACH,QAAA,MAAM,WAAW,GAAI,4MAgBlB,gBAAgB,KAAG,YAiGrB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"TooltipArea.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/TooltipArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,cAAc,CAAC;AAItB;;;GAGG;AACH,QAAA,MAAM,WAAW,GAAI,4MAgBlB,gBAAgB,KAAG,YAgGrB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { ReactElement } from "react";
2
+ import type { CardsProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Cards — lays out a set of `Card`s on a shared grid so that not only the cards
6
+ * themselves, but each card's SECTIONS (image, header, content, footer) line up
7
+ * across the row.
8
+ *
9
+ * @remarks
10
+ * **Requires a top-level grid.** `Cards` is a `.subgrid`: it inherits the column
11
+ * tracks of the nearest parent `.grid` rather than defining its own. Wrap it in
12
+ * a `.grid` (e.g. the `grid()` storybook decorator or the `grid` addon param,
13
+ * the same way Accordion or a form field opts in). Outside a grid it degrades to
14
+ * a plain block — still renders, just without column alignment.
15
+ *
16
+ * **Two-level subgrid.** The parent grid supplies the columns; `Cards` inherits
17
+ * them and defines the shared section ROW tracks; each `Card` spans `cardSpan`
18
+ * columns and is itself a row-subgrid, so its sections snap to the shared
19
+ * tracks. See `styles.css` for the full model.
20
+ *
21
+ * **`cardSpan`** is the number of master columns each card spans (not a pixel
22
+ * width) — use multiples of 2/4 so cards tile evenly into the 4/8/12-column
23
+ * responsive grid.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * // inside a `.grid` context (decorator/addon)
28
+ * <Cards cardSpan={4}>
29
+ * <Card>…</Card>
30
+ * <Card>…</Card>
31
+ * <Card>…</Card>
32
+ * </Cards>
33
+ * ```
34
+ *
35
+ * @implements dso:global.group.cards
36
+ * @returns {ReactElement} the Cards group
37
+ */
38
+ declare const Cards: ({ className, children, cardSpan, style, ...props }: CardsProps) => ReactElement;
39
+ export default Cards;
40
+ //# sourceMappingURL=Cards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cards.d.ts","sourceRoot":"","sources":["../../../../../src/lib/group/Cards/Cards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,KAAK,GAAI,oDAMZ,UAAU,KAAG,YAmBf,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Cards } from "./Cards.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/group/Cards/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export interface CardsProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** The `Card` elements to lay out. */
4
+ children?: ReactNode;
5
+ /**
6
+ * How many master-grid columns each card spans (NOT a pixel width). Fed to the
7
+ * `--card-span` CSS custom property. Larger spans mean fewer, wider cards per
8
+ * row on the 4/8/12-column responsive grid — e.g. on a 12-column grid `1` = 12
9
+ * per row, `2` = 6, `4` = 3.
10
+ * @default 1
11
+ */
12
+ cardSpan?: number;
13
+ }
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +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,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,sCAAsC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,2 +1,3 @@
1
+ export * from "./Cards/index.js";
1
2
  export * from "./KeyboardKeys/index.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/group/index.ts"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/group/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export * from "./useContextualMenu/index.js";
2
2
  export * from "./useDelayedToggle/index.js";
3
3
  export * from "./useDisclosure/index.js";
4
+ export * from "./useIsMounted/index.js";
4
5
  export * from "./useResizeObserver/index.js";
5
6
  export * from "./useWindowDimensions/index.js";
6
7
  export * from "./useWindowFitment/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useContextualMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useContextualMenu/useContextualMenu.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAEV,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,iBAAiB,GAAI,4CAKxB,sBAAsB,KAAG,uBA0M3B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"useContextualMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useContextualMenu/useContextualMenu.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAEV,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,iBAAiB,GAAI,4CAKxB,sBAAsB,KAAG,uBAgN3B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./types.js";
2
+ export { default as useIsMounted } from "./useIsMounted.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useIsMounted/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Result of the `useIsMounted` hook: `false` during server rendering and the
3
+ * initial client render, `true` once the component has mounted.
4
+ */
5
+ export type UseIsMountedResult = boolean;
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useIsMounted/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { UseIsMountedResult } from "./types.js";
2
+ /**
3
+ * Reports whether the component has mounted on the client.
4
+ *
5
+ * Returns `false` during server rendering and the initial client render, then
6
+ * `true` after the mount effect runs. Gate client-only output — portals in
7
+ * particular — on this so the server-rendered HTML and the first client render
8
+ * are identical and hydration does not mismatch.
9
+ *
10
+ * @returns `false` until mounted, then `true`.
11
+ * @note Impure — schedules a mount effect that updates component state.
12
+ */
13
+ declare const useIsMounted: () => UseIsMountedResult;
14
+ export default useIsMounted;
15
+ //# sourceMappingURL=useIsMounted.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsMounted.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useIsMounted/useIsMounted.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,YAAY,QAAO,kBAQxB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -3,7 +3,7 @@ import type { ComponentType, HTMLAttributes, ReactNode } from "react";
3
3
  * Props passed to a custom `LinkComponent` for router integration.
4
4
  *
5
5
  * The single, shared contract for every component that injects one link
6
- * renderer for its navigable items (Breadcrumbs, SideNavigation, Tabs, …).
6
+ * renderer for its navigable items (Breadcrumbs, SideNavigation, Tabs, ...).
7
7
  * Deliberately narrow — only these four props are forwarded, not the full
8
8
  * anchor attribute set — so the same router `Link` (e.g.
9
9
  * `@canonical/router-react`, Next.js, React Router) works across all of them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-global",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -44,24 +44,24 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@canonical/design-tokens": "0.6.2-contrasted.0",
47
- "@canonical/ds-assets": "^0.30.0",
48
- "@canonical/react-hooks": "^0.30.0",
49
- "@canonical/storybook-config": "^0.30.0",
50
- "@canonical/styles": "^0.30.0",
51
- "@canonical/utils": "^0.30.0",
47
+ "@canonical/ds-assets": "^0.31.0",
48
+ "@canonical/react-hooks": "^0.31.0",
49
+ "@canonical/storybook-config": "^0.31.0",
50
+ "@canonical/styles": "^0.31.0",
51
+ "@canonical/utils": "^0.31.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.30.0",
58
- "@canonical/ds-types": "^0.30.0",
59
- "@canonical/router-core": "^0.30.0",
60
- "@canonical/router-react": "^0.30.0",
61
- "@canonical/storybook-helpers": "^0.30.0",
62
- "@canonical/typescript-config-react": "^0.30.0",
63
- "@canonical/vitest-config-react": "^0.30.0",
64
- "@canonical/webarchitect": "^0.30.0",
57
+ "@canonical/biome-config": "^0.31.0",
58
+ "@canonical/ds-types": "^0.31.0",
59
+ "@canonical/router-core": "^0.31.0",
60
+ "@canonical/router-react": "^0.31.0",
61
+ "@canonical/storybook-helpers": "^0.31.0",
62
+ "@canonical/typescript-config-react": "^0.31.0",
63
+ "@canonical/vitest-config-react": "^0.31.0",
64
+ "@canonical/webarchitect": "^0.31.0",
65
65
  "@chromatic-com/storybook": "^5.0.1",
66
66
  "@storybook/addon-docs": "^10.3.1",
67
67
  "@storybook/react-vite": "^10.3.1",
@@ -79,5 +79,5 @@
79
79
  "vite": "^8.0.1",
80
80
  "vitest": "^4.0.18"
81
81
  },
82
- "gitHead": "40fe86ac955473536ac14f074812a9821f5b65c0"
82
+ "gitHead": "d4a67ebe42e62b8cf3de77f42f537309ca88d672"
83
83
  }