@canonical/react-ds-app 0.27.1-experimental.0 → 0.30.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 (170) hide show
  1. package/LICENSE +166 -0
  2. package/dist/esm/lib/ApplicationLayout/ApplicationLayout.js +15 -0
  3. package/dist/esm/lib/ApplicationLayout/ApplicationLayout.js.map +1 -0
  4. package/dist/esm/lib/ApplicationLayout/index.js +3 -0
  5. package/dist/esm/lib/ApplicationLayout/index.js.map +1 -0
  6. package/dist/esm/lib/ApplicationLayout/styles.css +29 -0
  7. package/dist/esm/lib/ApplicationLayout/types.js +3 -0
  8. package/dist/esm/lib/ApplicationLayout/types.js.map +1 -0
  9. package/dist/esm/lib/ContentLayout/ContentLayout.js +19 -0
  10. package/dist/esm/lib/ContentLayout/ContentLayout.js.map +1 -0
  11. package/dist/esm/lib/ContentLayout/index.js +3 -0
  12. package/dist/esm/lib/ContentLayout/index.js.map +1 -0
  13. package/dist/esm/lib/ContentLayout/styles.css +13 -0
  14. package/dist/esm/lib/ContentLayout/types.js +3 -0
  15. package/dist/esm/lib/ContentLayout/types.js.map +1 -0
  16. package/dist/esm/lib/SideNavigation/SideNavigation.js +46 -0
  17. package/dist/esm/lib/SideNavigation/SideNavigation.js.map +1 -0
  18. package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js +17 -0
  19. package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js.map +1 -0
  20. package/dist/esm/lib/SideNavigation/common/CollapseToggle/index.js +3 -0
  21. package/dist/esm/lib/SideNavigation/common/CollapseToggle/index.js.map +1 -0
  22. package/dist/esm/lib/SideNavigation/common/CollapseToggle/styles.css +5 -0
  23. package/dist/esm/lib/SideNavigation/common/CollapseToggle/types.js +2 -0
  24. package/dist/esm/lib/SideNavigation/common/CollapseToggle/types.js.map +1 -0
  25. package/dist/esm/lib/SideNavigation/common/Content/Content.js +16 -0
  26. package/dist/esm/lib/SideNavigation/common/Content/Content.js.map +1 -0
  27. package/dist/esm/lib/SideNavigation/common/Content/index.js +3 -0
  28. package/dist/esm/lib/SideNavigation/common/Content/index.js.map +1 -0
  29. package/dist/esm/lib/SideNavigation/common/Content/styles.css +33 -0
  30. package/dist/esm/lib/SideNavigation/common/Content/types.js +2 -0
  31. package/dist/esm/lib/SideNavigation/common/Content/types.js.map +1 -0
  32. package/dist/esm/lib/SideNavigation/common/Footer/Footer.js +16 -0
  33. package/dist/esm/lib/SideNavigation/common/Footer/Footer.js.map +1 -0
  34. package/dist/esm/lib/SideNavigation/common/Footer/index.js +3 -0
  35. package/dist/esm/lib/SideNavigation/common/Footer/index.js.map +1 -0
  36. package/dist/esm/lib/SideNavigation/common/Footer/styles.css +6 -0
  37. package/dist/esm/lib/SideNavigation/common/Footer/types.js +2 -0
  38. package/dist/esm/lib/SideNavigation/common/Footer/types.js.map +1 -0
  39. package/dist/esm/lib/SideNavigation/common/Header/Header.js +16 -0
  40. package/dist/esm/lib/SideNavigation/common/Header/Header.js.map +1 -0
  41. package/dist/esm/lib/SideNavigation/common/Header/index.js +3 -0
  42. package/dist/esm/lib/SideNavigation/common/Header/index.js.map +1 -0
  43. package/dist/esm/lib/SideNavigation/common/Header/styles.css +37 -0
  44. package/dist/esm/lib/SideNavigation/common/Header/types.js +2 -0
  45. package/dist/esm/lib/SideNavigation/common/Header/types.js.map +1 -0
  46. package/dist/esm/lib/SideNavigation/common/Item/Item.js +29 -0
  47. package/dist/esm/lib/SideNavigation/common/Item/Item.js.map +1 -0
  48. package/dist/esm/lib/SideNavigation/common/Item/index.js +2 -0
  49. package/dist/esm/lib/SideNavigation/common/Item/index.js.map +1 -0
  50. package/dist/esm/lib/SideNavigation/common/Item/styles.css +54 -0
  51. package/dist/esm/lib/SideNavigation/common/Item/types.js +2 -0
  52. package/dist/esm/lib/SideNavigation/common/Item/types.js.map +1 -0
  53. package/dist/esm/lib/SideNavigation/common/NavTree/NavTree.js +39 -0
  54. package/dist/esm/lib/SideNavigation/common/NavTree/NavTree.js.map +1 -0
  55. package/dist/esm/lib/SideNavigation/common/NavTree/index.js +2 -0
  56. package/dist/esm/lib/SideNavigation/common/NavTree/index.js.map +1 -0
  57. package/dist/esm/lib/SideNavigation/common/NavTree/styles.css +31 -0
  58. package/dist/esm/lib/SideNavigation/common/NavTree/types.js +2 -0
  59. package/dist/esm/lib/SideNavigation/common/NavTree/types.js.map +1 -0
  60. package/dist/esm/lib/SideNavigation/common/index.js +7 -0
  61. package/dist/esm/lib/SideNavigation/common/index.js.map +1 -0
  62. package/dist/esm/lib/SideNavigation/index.js +3 -0
  63. package/dist/esm/lib/SideNavigation/index.js.map +1 -0
  64. package/dist/esm/lib/SideNavigation/styles.css +25 -0
  65. package/dist/esm/lib/SideNavigation/types.js +2 -0
  66. package/dist/esm/lib/SideNavigation/types.js.map +1 -0
  67. package/dist/esm/lib/ViewLayout/ViewLayout.js +15 -0
  68. package/dist/esm/lib/ViewLayout/ViewLayout.js.map +1 -0
  69. package/dist/esm/lib/ViewLayout/index.js +3 -0
  70. package/dist/esm/lib/ViewLayout/index.js.map +1 -0
  71. package/dist/esm/lib/ViewLayout/styles.css +27 -0
  72. package/dist/esm/lib/ViewLayout/types.js +3 -0
  73. package/dist/esm/lib/ViewLayout/types.js.map +1 -0
  74. package/dist/esm/lib/index.js +4 -1
  75. package/dist/esm/lib/index.js.map +1 -1
  76. package/dist/types/lib/ApplicationLayout/ApplicationLayout.d.ts +13 -0
  77. package/dist/types/lib/ApplicationLayout/ApplicationLayout.d.ts.map +1 -0
  78. package/dist/types/lib/ApplicationLayout/index.d.ts +3 -0
  79. package/dist/types/lib/ApplicationLayout/index.d.ts.map +1 -0
  80. package/dist/types/lib/ApplicationLayout/types.d.ts +12 -0
  81. package/dist/types/lib/ApplicationLayout/types.d.ts.map +1 -0
  82. package/dist/types/lib/ContentLayout/ContentLayout.d.ts +15 -0
  83. package/dist/types/lib/ContentLayout/ContentLayout.d.ts.map +1 -0
  84. package/dist/types/lib/ContentLayout/index.d.ts +3 -0
  85. package/dist/types/lib/ContentLayout/index.d.ts.map +1 -0
  86. package/dist/types/lib/ContentLayout/types.d.ts +17 -0
  87. package/dist/types/lib/ContentLayout/types.d.ts.map +1 -0
  88. package/dist/types/lib/SideNavigation/SideNavigation.d.ts +18 -0
  89. package/dist/types/lib/SideNavigation/SideNavigation.d.ts.map +1 -0
  90. package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts +14 -0
  91. package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts.map +1 -0
  92. package/dist/types/lib/SideNavigation/common/CollapseToggle/index.d.ts +3 -0
  93. package/dist/types/lib/SideNavigation/common/CollapseToggle/index.d.ts.map +1 -0
  94. package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts +9 -0
  95. package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts.map +1 -0
  96. package/dist/types/lib/SideNavigation/common/Content/Content.d.ts +13 -0
  97. package/dist/types/lib/SideNavigation/common/Content/Content.d.ts.map +1 -0
  98. package/dist/types/lib/SideNavigation/common/Content/index.d.ts +3 -0
  99. package/dist/types/lib/SideNavigation/common/Content/index.d.ts.map +1 -0
  100. package/dist/types/lib/SideNavigation/common/Content/types.d.ts +14 -0
  101. package/dist/types/lib/SideNavigation/common/Content/types.d.ts.map +1 -0
  102. package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts +13 -0
  103. package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts.map +1 -0
  104. package/dist/types/lib/SideNavigation/common/Footer/index.d.ts +3 -0
  105. package/dist/types/lib/SideNavigation/common/Footer/index.d.ts.map +1 -0
  106. package/dist/types/lib/SideNavigation/common/Footer/types.d.ts +14 -0
  107. package/dist/types/lib/SideNavigation/common/Footer/types.d.ts.map +1 -0
  108. package/dist/types/lib/SideNavigation/common/Header/Header.d.ts +13 -0
  109. package/dist/types/lib/SideNavigation/common/Header/Header.d.ts.map +1 -0
  110. package/dist/types/lib/SideNavigation/common/Header/index.d.ts +3 -0
  111. package/dist/types/lib/SideNavigation/common/Header/index.d.ts.map +1 -0
  112. package/dist/types/lib/SideNavigation/common/Header/types.d.ts +14 -0
  113. package/dist/types/lib/SideNavigation/common/Header/types.d.ts.map +1 -0
  114. package/dist/types/lib/SideNavigation/common/Item/Item.d.ts +21 -0
  115. package/dist/types/lib/SideNavigation/common/Item/Item.d.ts.map +1 -0
  116. package/dist/types/lib/SideNavigation/common/Item/index.d.ts +3 -0
  117. package/dist/types/lib/SideNavigation/common/Item/index.d.ts.map +1 -0
  118. package/dist/types/lib/SideNavigation/common/Item/types.d.ts +17 -0
  119. package/dist/types/lib/SideNavigation/common/Item/types.d.ts.map +1 -0
  120. package/dist/types/lib/SideNavigation/common/NavTree/NavTree.d.ts +20 -0
  121. package/dist/types/lib/SideNavigation/common/NavTree/NavTree.d.ts.map +1 -0
  122. package/dist/types/lib/SideNavigation/common/NavTree/index.d.ts +3 -0
  123. package/dist/types/lib/SideNavigation/common/NavTree/index.d.ts.map +1 -0
  124. package/dist/types/lib/SideNavigation/common/NavTree/types.d.ts +11 -0
  125. package/dist/types/lib/SideNavigation/common/NavTree/types.d.ts.map +1 -0
  126. package/dist/types/lib/SideNavigation/common/index.d.ts +6 -0
  127. package/dist/types/lib/SideNavigation/common/index.d.ts.map +1 -0
  128. package/dist/types/lib/SideNavigation/index.d.ts +3 -0
  129. package/dist/types/lib/SideNavigation/index.d.ts.map +1 -0
  130. package/dist/types/lib/SideNavigation/types.d.ts +53 -0
  131. package/dist/types/lib/SideNavigation/types.d.ts.map +1 -0
  132. package/dist/types/lib/ViewLayout/ViewLayout.d.ts +13 -0
  133. package/dist/types/lib/ViewLayout/ViewLayout.d.ts.map +1 -0
  134. package/dist/types/lib/ViewLayout/index.d.ts +3 -0
  135. package/dist/types/lib/ViewLayout/index.d.ts.map +1 -0
  136. package/dist/types/lib/ViewLayout/types.d.ts +12 -0
  137. package/dist/types/lib/ViewLayout/types.d.ts.map +1 -0
  138. package/dist/types/lib/index.d.ts +4 -1
  139. package/dist/types/lib/index.d.ts.map +1 -1
  140. package/package.json +19 -20
  141. package/dist/esm/lib/Button/Button.js +0 -10
  142. package/dist/esm/lib/Button/Button.js.map +0 -1
  143. package/dist/esm/lib/Button/index.js +0 -2
  144. package/dist/esm/lib/Button/index.js.map +0 -1
  145. package/dist/esm/lib/Button/styles.css +0 -63
  146. package/dist/esm/lib/Button/types.js +0 -12
  147. package/dist/esm/lib/Button/types.js.map +0 -1
  148. package/dist/esm/ui/Button/Button.js +0 -10
  149. package/dist/esm/ui/Button/Button.js.map +0 -1
  150. package/dist/esm/ui/Button/index.js +0 -2
  151. package/dist/esm/ui/Button/index.js.map +0 -1
  152. package/dist/esm/ui/Button/styles.css +0 -63
  153. package/dist/esm/ui/Button/types.js +0 -12
  154. package/dist/esm/ui/Button/types.js.map +0 -1
  155. package/dist/esm/ui/index.js +0 -2
  156. package/dist/esm/ui/index.js.map +0 -1
  157. package/dist/types/lib/Button/Button.d.ts +0 -6
  158. package/dist/types/lib/Button/Button.d.ts.map +0 -1
  159. package/dist/types/lib/Button/index.d.ts +0 -3
  160. package/dist/types/lib/Button/index.d.ts.map +0 -1
  161. package/dist/types/lib/Button/types.d.ts +0 -18
  162. package/dist/types/lib/Button/types.d.ts.map +0 -1
  163. package/dist/types/ui/Button/Button.d.ts +0 -6
  164. package/dist/types/ui/Button/Button.d.ts.map +0 -1
  165. package/dist/types/ui/Button/index.d.ts +0 -3
  166. package/dist/types/ui/Button/index.d.ts.map +0 -1
  167. package/dist/types/ui/Button/types.d.ts +0 -18
  168. package/dist/types/ui/Button/types.d.ts.map +0 -1
  169. package/dist/types/ui/index.d.ts +0 -2
  170. package/dist/types/ui/index.d.ts.map +0 -1
@@ -0,0 +1,21 @@
1
+ import type React from "react";
2
+ import type { ItemProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * SideNavigation.Item — the default renderer for a single navigation item.
6
+ *
7
+ * A flat leaf row, NOT recursive: traversal lives in NavTree's two loops. The
8
+ * row is `[icon] [label] [end]` over a shared grid template (so the icon aligns
9
+ * with the header logo). An item with a `url` renders as a link via
10
+ * `LinkComponent` (default `"a"`); otherwise a non-navigable label.
11
+ *
12
+ * End slot is derived, not authored:
13
+ * - has subitems → a disclosure caret (static affordance in PR1; expand/collapse
14
+ * behaviour is deferred);
15
+ * - leaf → the optional `slot` (a badge, count, …), or nothing.
16
+ *
17
+ * @implements ds:apps.subcomponent.side-navigation-item
18
+ */
19
+ declare const Item: ({ url, label, icon, slot, disabled, active, LinkComponent, key: _key, items, className, ...props }: ItemProps) => React.ReactElement;
20
+ export default Item;
21
+ //# sourceMappingURL=Item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Item/Item.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,IAAI,GAAI,oGAaX,SAAS,KAAG,KAAK,CAAC,YAyCpB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Item } from "./Item.js";
2
+ export type { ItemProps } from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ComponentType } from "react";
2
+ import type { LinkComponentProps, NavItem } from "../../types.js";
3
+ /**
4
+ * Props for the default SideNavigation item renderer — a flat leaf row.
5
+ *
6
+ * Spreads the NavItem fields directly (url, key, label, disabled, icon, slot,
7
+ * items, …) plus presentational extras. The item is NOT recursive: traversal
8
+ * lives in NavTree's two loops. The end slot is derived — an item with subitems
9
+ * shows a disclosure caret; a leaf shows its optional `slot`.
10
+ */
11
+ export interface ItemProps extends NavItem {
12
+ /** Whether this item is the active (current) page. */
13
+ active?: boolean;
14
+ /** Component used to render navigable items. Defaults to `"a"`. */
15
+ LinkComponent?: ComponentType<LinkComponentProps> | "a";
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Item/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,WAAW,SAAU,SAAQ,OAAO;IACxC,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;CACzD"}
@@ -0,0 +1,20 @@
1
+ import type React from "react";
2
+ import type { NavTreeProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Internal: renders a navigation tree with two explicit loops (no recursion),
6
+ * deriving active state from useNavigationTree. Shared by Content and Footer —
7
+ * each region drives its own hook instance over its own root.
8
+ *
9
+ * Loop 1 — level-1 groups: each direct child of the root is a group; its
10
+ * label renders as a header (omitted when absent), wrapping its items.
11
+ * Loop 2 — level-2 items: each child of a group maps to a (flat) Item.
12
+ *
13
+ * The hook is generic over NavItem, so `icon`/`slot` survive typed onto the
14
+ * annotated nodes. `currentUrl` seeds initial selection and re-syncs it on
15
+ * navigation (the hook's `initialUrl` is mount-only), so the active item stays
16
+ * in sync with the consumer's router.
17
+ */
18
+ declare const NavTree: ({ root, currentUrl, LinkComponent, }: NavTreeProps) => React.ReactElement;
19
+ export default NavTree;
20
+ //# sourceMappingURL=NavTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/NavTree/NavTree.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,OAAO,GAAI,sCAId,YAAY,KAAG,KAAK,CAAC,YAuCvB,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as NavTree } from "./NavTree.js";
2
+ export type { NavTreeProps } from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/NavTree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ComponentType } from "react";
2
+ import type { LinkComponentProps, NavItem } from "../../types.js";
3
+ export interface NavTreeProps {
4
+ /** Root NavItem whose direct children (level-1 groups) are rendered. */
5
+ root: NavItem;
6
+ /** Live current location; resolves and keeps the active item in sync. */
7
+ currentUrl?: string;
8
+ /** Component used to render navigable items. Defaults to `"a"`. */
9
+ LinkComponent?: ComponentType<LinkComponentProps> | "a";
10
+ }
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/NavTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,IAAI,EAAE,OAAO,CAAC;IACd,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;CACzD"}
@@ -0,0 +1,6 @@
1
+ export * from "./CollapseToggle/index.js";
2
+ export * from "./Content/index.js";
3
+ export * from "./Footer/index.js";
4
+ export * from "./Header/index.js";
5
+ export * from "./Item/index.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/SideNavigation/common/index.ts"],"names":[],"mappings":"AAEA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as SideNavigation } from "./SideNavigation.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/SideNavigation/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { IconName } from "@canonical/ds-assets";
2
+ import type { Item } from "@canonical/ds-types";
3
+ import type { LinkComponentProps } from "@canonical/react-ds-global";
4
+ import type { ComponentType, HTMLAttributes, ReactNode } from "react";
5
+ export type { LinkComponentProps };
6
+ /**
7
+ * The SideNavigation item — the WD405 `Item` enhanced with the presentational
8
+ * extras this component understands:
9
+ *
10
+ * - `icon` — a leading icon (start slot), by ds-assets icon name.
11
+ * - `slot` — trailing content for **leaf** items (end slot): a badge, count,
12
+ * etc. Ignored when the item has subitems — those show a disclosure caret
13
+ * automatically (`end = hasSubitems ? caret : slot`).
14
+ *
15
+ * No discriminated union to author: the caret-vs-slot choice is structural,
16
+ * derived from whether the item has `items`.
17
+ */
18
+ export interface NavItem extends Omit<Item, "items"> {
19
+ /** Leading icon (start slot), by ds-assets icon name. */
20
+ icon?: IconName;
21
+ /** Trailing content for leaf items (end slot). Ignored if the item has subitems. */
22
+ slot?: ReactNode;
23
+ /** Subitems. Presence drives the disclosure caret (vs the leaf `slot`). */
24
+ items?: NavItem[];
25
+ /** CSS class name applied to this item's row, in addition to the base classes. */
26
+ className?: string;
27
+ }
28
+ export interface SideNavigationProps extends HTMLAttributes<HTMLDivElement> {
29
+ /** Brand content (logo/wordmark) rendered in the header. */
30
+ brand?: ReactNode;
31
+ /** Optional application name/wordmark shown beside the brand in the header. */
32
+ applicationName?: ReactNode;
33
+ /** Main navigation, as a root NavItem. Its direct children are rendered. */
34
+ root?: NavItem;
35
+ /** Footer navigation, as a root NavItem. Pinned to the bottom. */
36
+ footerRoot?: NavItem;
37
+ /**
38
+ * Component used to render navigable items (those with a `url`). Receives
39
+ * `LinkComponentProps`. Defaults to `"a"`. Pass a router `Link` (e.g.
40
+ * `@canonical/router-react`) to integrate with client-side navigation.
41
+ */
42
+ LinkComponent?: ComponentType<LinkComponentProps> | "a";
43
+ /**
44
+ * Live current location, used to resolve which item is active. The matching
45
+ * item is marked `aria-current` and its ancestor groups expanded. Keep it in
46
+ * sync with the consumer's router (e.g. `useRoute().pathname`) so the active
47
+ * state updates on navigation.
48
+ */
49
+ currentUrl?: string;
50
+ /** Initial expanded (rail) state when uncontrolled. Defaults to `true`. */
51
+ defaultExpanded?: boolean;
52
+ }
53
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,OAAQ,SAAQ,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;IAClD,yDAAyD;IACzD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,oFAAoF;IACpF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACzE,4DAA4D;IAC5D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kEAAkE;IAClE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;IACxD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
@@ -0,0 +1,13 @@
1
+ import type React from "react";
2
+ import type { ViewLayoutProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * ViewLayout — a single view within the application shell.
6
+ *
7
+ * Divides its space between the view content (default slot, `1fr`) and an
8
+ * optional contextual aside (named slot, `min-content`), per the ontology
9
+ * instance `apps.layout.view_layout`.
10
+ */
11
+ declare const ViewLayout: ({ className, children, aside, ...props }: ViewLayoutProps) => React.ReactElement;
12
+ export default ViewLayout;
13
+ //# sourceMappingURL=ViewLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewLayout.d.ts","sourceRoot":"","sources":["../../../../src/lib/ViewLayout/ViewLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,UAAU,GAAI,0CAKjB,eAAe,KAAG,KAAK,CAAC,YAU1B,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type * from "./types.js";
2
+ export { default as ViewLayout } from "./ViewLayout.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ViewLayout/index.ts"],"names":[],"mappings":"AAEA,mBAAmB,YAAY,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export interface ViewLayoutProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** View content (default slot). Typically a ContentLayout. */
4
+ children?: ReactNode;
5
+ /**
6
+ * Contextual aside (named slot), rendered in the trailing `min-content`
7
+ * column — a detail panel, filters, help. Slot-agnostic: pass any
8
+ * ReactNode; the slot owns its inline size.
9
+ */
10
+ aside?: ReactNode;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/ViewLayout/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACrE,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB"}
@@ -1,2 +1,5 @@
1
- export * from "./Button/index.js";
1
+ export * from "./ApplicationLayout/index.js";
2
+ export * from "./ContentLayout/index.js";
3
+ export * from "./SideNavigation/index.js";
4
+ export * from "./ViewLayout/index.js";
2
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-app",
3
- "version": "0.27.1-experimental.0",
3
+ "version": "0.30.0",
4
4
  "type": "module",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
7
- "imports": {
8
- "#storybook/*": "./src/storybook/*"
9
- },
10
7
  "files": [
11
8
  "dist"
12
9
  ],
@@ -42,13 +39,13 @@
42
39
  "test:vitest:watch": "vitest"
43
40
  },
44
41
  "dependencies": {
45
- "@canonical/ds-assets": "^0.27.1-experimental.0",
46
- "@canonical/ds-types": "^0.27.1-experimental.0",
47
- "@canonical/react-ds-global": "^0.27.1-experimental.0",
48
- "@canonical/react-hooks": "^0.27.1-experimental.0",
49
- "@canonical/storybook-config": "^0.27.1-experimental.0",
50
- "@canonical/styles": "^0.27.1-experimental.0",
51
- "@canonical/utils": "^0.27.1-experimental.0",
42
+ "@canonical/ds-assets": "^0.30.0",
43
+ "@canonical/ds-types": "^0.30.0",
44
+ "@canonical/react-ds-global": "^0.30.0",
45
+ "@canonical/react-hooks": "^0.30.0",
46
+ "@canonical/storybook-config": "^0.30.0",
47
+ "@canonical/styles": "^0.30.0",
48
+ "@canonical/utils": "^0.30.0",
52
49
  "react": "^19.2.4",
53
50
  "react-dom": "^19.2.4"
54
51
  },
@@ -66,14 +63,15 @@
66
63
  },
67
64
  "devDependencies": {
68
65
  "@biomejs/biome": "2.4.9",
69
- "@canonical/biome-config": "^0.27.1-experimental.0",
70
- "@canonical/design-tokens": "^0.6.0",
71
- "@canonical/router-core": "^0.27.1-experimental.0",
72
- "@canonical/router-react": "^0.27.1-experimental.0",
73
- "@canonical/storybook-addon-utils": "^0.27.1-experimental.0",
74
- "@canonical/storybook-helpers": "^0.27.1-experimental.0",
75
- "@canonical/typescript-config-react": "^0.27.1-experimental.0",
76
- "@canonical/webarchitect": "^0.27.1-experimental.0",
66
+ "@canonical/biome-config": "^0.30.0",
67
+ "@canonical/design-tokens": "0.6.2-contrasted.0",
68
+ "@canonical/router-core": "^0.30.0",
69
+ "@canonical/router-react": "^0.30.0",
70
+ "@canonical/storybook-addon-utils": "^0.30.0",
71
+ "@canonical/storybook-helpers": "^0.30.0",
72
+ "@canonical/typescript-config-react": "^0.30.0",
73
+ "@canonical/vitest-config-react": "^0.30.0",
74
+ "@canonical/webarchitect": "^0.30.0",
77
75
  "@chromatic-com/storybook": "^5.0.1",
78
76
  "@storybook/addon-docs": "^10.3.1",
79
77
  "@storybook/react-vite": "^10.3.1",
@@ -90,5 +88,6 @@
90
88
  "typescript": "^5.9.3",
91
89
  "vite": "^8.0.1",
92
90
  "vitest": "^4.0.18"
93
- }
91
+ },
92
+ "gitHead": "40fe86ac955473536ac14f074812a9821f5b65c0"
94
93
  }
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import "./styles.css";
3
- /** Buttons are clickable elements used to perform an action. */
4
- const Button = ({ id, className, children, style, appearance, ...props }) => {
5
- return (_jsx("button", { id: id, className: ["ds", "button", appearance, className]
6
- .filter(Boolean)
7
- .join(" "), style: style, "aria-label": props["aria-label"] || children?.toString(), ...props, children: children }));
8
- };
9
- export default Button;
10
- //# sourceMappingURL=Button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/lib/Button/Button.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,MAAM,MAAM,GAAG,CAAC,EACd,EAAE,EACF,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,GAAG,KAAK,EACF,EAAsB,EAAE;IAC9B,OAAO,CACL,iBACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,KAAK,gBAIA,KAAK,CAAC,YAAY,CAAC,IAAI,QAAQ,EAAE,QAAQ,EAAE,KACnD,KAAK,YAER,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as Button } from "./Button.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -1,63 +0,0 @@
1
- /* component styles */
2
-
3
- /* component variables
4
- --button-color-background: background color of the button
5
- --button-color-background-hover: background color of the button on hover
6
- --button-color-background-active: background color of the button on active
7
- --button-color-text: text color of the button
8
- --button-color-border: border color of the button
9
- --button-color-border-hover: border color of the button on hover
10
- --button-color-border-active: border color of the button on active
11
-
12
- --button-margin-left: left margin of the button
13
- --button-margin-bottom: bottom margin of the button
14
- --button-padding-vertical: vertical padding of the button
15
- --button-padding-horizontal: horizontal padding of the button
16
- --button-border-width: border width of the button
17
- --button-font-size: font size of the button
18
- --button-font-weight: font weight of the button
19
- --button-line-height: line height of the button
20
- */
21
- .ds.button {
22
- display: inline-block;
23
- cursor: pointer;
24
-
25
- color: var(--modifier-color-text, var(--button-color-text));
26
- background-color: var(--modifier-color, var(--button-color-background));
27
- border-color: var(--modifier-color-border, var(--button-color-border));
28
- border-style: solid;
29
- border-width: var(--button-border-width);
30
- font-size: var(--button-font-size);
31
- font-weight: var(--button-font-weight);
32
- line-height: var(--button-line-height);
33
- margin-block-end: var(--button-margin-bottom);
34
- margin-inline-end: var(--button-margin-left);
35
- padding-block: var(--button-padding-vertical);
36
- padding-inline: var(--button-padding-horizontal);
37
-
38
- text-align: left;
39
- text-decoration: none;
40
-
41
- /* component states */
42
- &:hover {
43
- background-color: var(
44
- --modifier-color-hover,
45
- var(--button-color-background-hover)
46
- );
47
- border-color: var(
48
- --modifier-color-border-hover,
49
- var(--button-color-border-hover)
50
- );
51
- }
52
-
53
- &:active {
54
- background-color: var(
55
- --modifier-color-active,
56
- var(--button-color-background-active)
57
- );
58
- border-color: var(
59
- --modifier-color-border-active,
60
- var(--button-color-border-active)
61
- );
62
- }
63
- }
@@ -1,12 +0,0 @@
1
- // TODO: this is how appearance could work as enum
2
- //
3
- // export enum ButtonAppearance {
4
- // DEFAULT = "default",
5
- // BASE = "base",
6
- // POSITIVE = "positive",
7
- // NEGATIVE = "negative",
8
- // LINK = "link",
9
- // }
10
- //
11
- export {};
12
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/Button/types.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,iCAAiC;AACjC,yBAAyB;AACzB,mBAAmB;AACnB,2BAA2B;AAC3B,2BAA2B;AAC3B,mBAAmB;AACnB,IAAI;AACJ,EAAE"}
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import "./styles.css";
3
- /** Buttons are clickable elements used to perform an action. */
4
- const Button = ({ id, className, children, style, appearance, ...props }) => {
5
- return (_jsx("button", { id: id, className: ["ds", "button", appearance, className]
6
- .filter(Boolean)
7
- .join(" "), style: style, "aria-label": props["aria-label"] || children?.toString(), ...props, children: children }));
8
- };
9
- export default Button;
10
- //# sourceMappingURL=Button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/ui/Button/Button.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,MAAM,MAAM,GAAG,CAAC,EACd,EAAE,EACF,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,GAAG,KAAK,EACF,EAAsB,EAAE;IAC9B,OAAO,CACL,iBACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,KAAK,gBAIA,KAAK,CAAC,YAAY,CAAC,IAAI,QAAQ,EAAE,QAAQ,EAAE,KACnD,KAAK,YAER,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as Button } from "./Button.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -1,63 +0,0 @@
1
- /* component styles */
2
-
3
- /* component variables
4
- --button-color-background: background color of the button
5
- --button-color-background-hover: background color of the button on hover
6
- --button-color-background-active: background color of the button on active
7
- --button-color-text: text color of the button
8
- --button-color-border: border color of the button
9
- --button-color-border-hover: border color of the button on hover
10
- --button-color-border-active: border color of the button on active
11
-
12
- --button-margin-left: left margin of the button
13
- --button-margin-bottom: bottom margin of the button
14
- --button-padding-vertical: vertical padding of the button
15
- --button-padding-horizontal: horizontal padding of the button
16
- --button-border-width: border width of the button
17
- --button-font-size: font size of the button
18
- --button-font-weight: font weight of the button
19
- --button-line-height: line height of the button
20
- */
21
- .ds.button {
22
- display: inline-block;
23
- cursor: pointer;
24
-
25
- color: var(--modifier-color-text, var(--button-color-text));
26
- background-color: var(--modifier-color, var(--button-color-background));
27
- border-color: var(--modifier-color-border, var(--button-color-border));
28
- border-style: solid;
29
- border-width: var(--button-border-width);
30
- font-size: var(--button-font-size);
31
- font-weight: var(--button-font-weight);
32
- line-height: var(--button-line-height);
33
- margin-block-end: var(--button-margin-bottom);
34
- margin-inline-end: var(--button-margin-left);
35
- padding-block: var(--button-padding-vertical);
36
- padding-inline: var(--button-padding-horizontal);
37
-
38
- text-align: left;
39
- text-decoration: none;
40
-
41
- /* component states */
42
- &:hover {
43
- background-color: var(
44
- --modifier-color-hover,
45
- var(--button-color-background-hover)
46
- );
47
- border-color: var(
48
- --modifier-color-border-hover,
49
- var(--button-color-border-hover)
50
- );
51
- }
52
-
53
- &:active {
54
- background-color: var(
55
- --modifier-color-active,
56
- var(--button-color-background-active)
57
- );
58
- border-color: var(
59
- --modifier-color-border-active,
60
- var(--button-color-border-active)
61
- );
62
- }
63
- }
@@ -1,12 +0,0 @@
1
- // TODO: this is how appearance could work as enum
2
- //
3
- // export enum ButtonAppearance {
4
- // DEFAULT = "default",
5
- // BASE = "base",
6
- // POSITIVE = "positive",
7
- // NEGATIVE = "negative",
8
- // LINK = "link",
9
- // }
10
- //
11
- export {};
12
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/Button/types.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,iCAAiC;AACjC,yBAAyB;AACzB,mBAAmB;AACnB,2BAA2B;AAC3B,2BAA2B;AAC3B,mBAAmB;AACnB,IAAI;AACJ,EAAE"}
@@ -1,2 +0,0 @@
1
- export * from "./Button/index.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1,6 +0,0 @@
1
- import type Props from "./types.js";
2
- import "./styles.css";
3
- /** Buttons are clickable elements used to perform an action. */
4
- declare const Button: ({ id, className, children, style, appearance, ...props }: Props) => React.ReactElement;
5
- export default Button;
6
- //# sourceMappingURL=Button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,QAAA,MAAM,MAAM,GAAI,0DAOb,KAAK,KAAG,KAAK,CAAC,YAiBhB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default as Button } from "./Button.js";
2
- export type { BaseProps as ButtonBaseProps, default as ButtonProps, } from "./types.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,SAAS,IAAI,eAAe,EAC5B,OAAO,IAAI,WAAW,GACvB,MAAM,YAAY,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from "react";
2
- export interface BaseProps {
3
- id?: string;
4
- /** Additional CSS classes */
5
- className?: string;
6
- /**
7
- * Button contents.
8
- * This will also be used for the `aria-label`.
9
- * If this contains anything other than a string literal (such as a <p> element), you should specify an
10
- * `aria-label` prop to ensure that the button label is applied properly. Otherwise, the label will be set to [object Object].
11
- * */
12
- children: ReactNode;
13
- /** The visual style of the button */
14
- appearance?: "neutral" | "base" | "positive" | "negative" | "link";
15
- }
16
- type Props = BaseProps & ButtonHTMLAttributes<HTMLButtonElement>;
17
- export default Props;
18
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/types.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,WAAW,SAAS;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;SAKK;IACL,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;CACpE;AAED,KAAK,KAAK,GAAG,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEjE,eAAe,KAAK,CAAC"}
@@ -1,6 +0,0 @@
1
- import type Props from "./types.js";
2
- import "./styles.css";
3
- /** Buttons are clickable elements used to perform an action. */
4
- declare const Button: ({ id, className, children, style, appearance, ...props }: Props) => React.ReactElement;
5
- export default Button;
6
- //# sourceMappingURL=Button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/ui/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,QAAA,MAAM,MAAM,GAAI,0DAOb,KAAK,KAAG,KAAK,CAAC,YAiBhB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default as Button } from "./Button.js";
2
- export type { BaseProps as ButtonBaseProps, default as ButtonProps, } from "./types.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,SAAS,IAAI,eAAe,EAC5B,OAAO,IAAI,WAAW,GACvB,MAAM,YAAY,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from "react";
2
- export interface BaseProps {
3
- id?: string;
4
- /** Additional CSS classes */
5
- className?: string;
6
- /**
7
- * Button contents.
8
- * This will also be used for the `aria-label`.
9
- * If this contains anything other than a string literal (such as a <p> element), you should specify an
10
- * `aria-label` prop to ensure that the button label is applied properly. Otherwise, the label will be set to [object Object].
11
- * */
12
- children: ReactNode;
13
- /** The visual style of the button */
14
- appearance?: "neutral" | "base" | "positive" | "negative" | "link";
15
- }
16
- type Props = BaseProps & ButtonHTMLAttributes<HTMLButtonElement>;
17
- export default Props;
18
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/Button/types.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,WAAW,SAAS;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;SAKK;IACL,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;CACpE;AAED,KAAK,KAAK,GAAG,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEjE,eAAe,KAAK,CAAC"}