@robr0/design-system 0.1.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 (223) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +127 -0
  3. package/charts.d.ts +14 -0
  4. package/charts.js +20 -0
  5. package/components/Accordion/Accordion.css +119 -0
  6. package/components/Accordion/Accordion.d.ts +24 -0
  7. package/components/Accordion/Accordion.js +76 -0
  8. package/components/Alert/Alert.css +252 -0
  9. package/components/Alert/Alert.d.ts +24 -0
  10. package/components/Alert/Alert.js +53 -0
  11. package/components/AlertDialog/AlertDialog.css +131 -0
  12. package/components/AlertDialog/AlertDialog.d.ts +29 -0
  13. package/components/AlertDialog/AlertDialog.js +143 -0
  14. package/components/AppLayout/AppLayout.css +52 -0
  15. package/components/AppLayout/AppLayout.d.ts +27 -0
  16. package/components/AppLayout/AppLayout.js +45 -0
  17. package/components/AppSidebar/AppSidebar.css +434 -0
  18. package/components/AppSidebar/AppSidebar.d.ts +67 -0
  19. package/components/AppSidebar/AppSidebar.js +272 -0
  20. package/components/Avatar/Avatar.css +133 -0
  21. package/components/Avatar/Avatar.d.ts +20 -0
  22. package/components/Avatar/Avatar.js +56 -0
  23. package/components/Avatar/demoAvatars.d.ts +14 -0
  24. package/components/Avatar/demoAvatars.js +16 -0
  25. package/components/Badge/Badge.css +68 -0
  26. package/components/Badge/Badge.d.ts +13 -0
  27. package/components/Badge/Badge.js +15 -0
  28. package/components/Breadcrumb/Breadcrumb.css +92 -0
  29. package/components/Breadcrumb/Breadcrumb.d.ts +19 -0
  30. package/components/Breadcrumb/Breadcrumb.js +39 -0
  31. package/components/Button/Button.css +381 -0
  32. package/components/Button/Button.d.ts +39 -0
  33. package/components/Button/Button.js +71 -0
  34. package/components/ButtonGroup/ButtonGroup.css +39 -0
  35. package/components/ButtonGroup/ButtonGroup.d.ts +13 -0
  36. package/components/ButtonGroup/ButtonGroup.js +37 -0
  37. package/components/Card/Card.css +169 -0
  38. package/components/Card/Card.d.ts +30 -0
  39. package/components/Card/Card.js +90 -0
  40. package/components/Carousel/Carousel.css +112 -0
  41. package/components/Carousel/Carousel.d.ts +25 -0
  42. package/components/Carousel/Carousel.js +126 -0
  43. package/components/Chart/AreaChart.d.ts +36 -0
  44. package/components/Chart/AreaChart.js +99 -0
  45. package/components/Chart/BarChart.d.ts +34 -0
  46. package/components/Chart/BarChart.js +107 -0
  47. package/components/Chart/Chart.css +176 -0
  48. package/components/Chart/LineChart.d.ts +34 -0
  49. package/components/Chart/LineChart.js +90 -0
  50. package/components/Chart/PieChart.d.ts +34 -0
  51. package/components/Chart/PieChart.js +106 -0
  52. package/components/Chart/RadarChart.d.ts +34 -0
  53. package/components/Chart/RadarChart.js +91 -0
  54. package/components/Chart/RadialChart.d.ts +37 -0
  55. package/components/Chart/RadialChart.js +119 -0
  56. package/components/Chart/ScatterChart.d.ts +36 -0
  57. package/components/Chart/ScatterChart.js +109 -0
  58. package/components/Chart/StackedBarChart.d.ts +34 -0
  59. package/components/Chart/StackedBarChart.js +111 -0
  60. package/components/Chart/Treemap.d.ts +33 -0
  61. package/components/Chart/Treemap.js +109 -0
  62. package/components/Checkbox/Checkbox.css +164 -0
  63. package/components/Checkbox/Checkbox.d.ts +45 -0
  64. package/components/Checkbox/Checkbox.js +125 -0
  65. package/components/Chip/Chip.css +195 -0
  66. package/components/Chip/Chip.d.ts +27 -0
  67. package/components/Chip/Chip.js +80 -0
  68. package/components/CircularButton/CircularButton.css +206 -0
  69. package/components/CircularButton/CircularButton.d.ts +30 -0
  70. package/components/CircularButton/CircularButton.js +54 -0
  71. package/components/CodeBlock/CodeBlock.css +180 -0
  72. package/components/CodeBlock/CodeBlock.d.ts +23 -0
  73. package/components/CodeBlock/CodeBlock.js +85 -0
  74. package/components/ColourSwatch/ColourSwatch.css +88 -0
  75. package/components/ColourSwatch/ColourSwatch.d.ts +34 -0
  76. package/components/ColourSwatch/ColourSwatch.js +42 -0
  77. package/components/Combobox/Combobox.css +411 -0
  78. package/components/Combobox/Combobox.d.ts +73 -0
  79. package/components/Combobox/Combobox.js +312 -0
  80. package/components/CommandPalette/CommandPalette.css +310 -0
  81. package/components/CommandPalette/CommandPalette.d.ts +60 -0
  82. package/components/CommandPalette/CommandPalette.js +263 -0
  83. package/components/ContactCard/ContactCard.css +123 -0
  84. package/components/ContactCard/ContactCard.d.ts +23 -0
  85. package/components/ContactCard/ContactCard.js +78 -0
  86. package/components/ContributionGraph/ContributionGraph.css +142 -0
  87. package/components/ContributionGraph/ContributionGraph.d.ts +26 -0
  88. package/components/ContributionGraph/ContributionGraph.js +125 -0
  89. package/components/DateInput/DateInput.css +163 -0
  90. package/components/DateInput/DateInput.d.ts +43 -0
  91. package/components/DateInput/DateInput.js +69 -0
  92. package/components/DatePicker/DatePicker.css +198 -0
  93. package/components/DatePicker/DatePicker.d.ts +22 -0
  94. package/components/DatePicker/DatePicker.js +170 -0
  95. package/components/Dialog/Dialog.css +176 -0
  96. package/components/Dialog/Dialog.d.ts +28 -0
  97. package/components/Dialog/Dialog.js +132 -0
  98. package/components/Divider/Divider.css +100 -0
  99. package/components/Divider/Divider.d.ts +18 -0
  100. package/components/Divider/Divider.js +31 -0
  101. package/components/Drawer/Drawer.css +262 -0
  102. package/components/Drawer/Drawer.d.ts +30 -0
  103. package/components/Drawer/Drawer.js +134 -0
  104. package/components/Dropdown/Dropdown.css +300 -0
  105. package/components/Dropdown/Dropdown.d.ts +48 -0
  106. package/components/Dropdown/Dropdown.js +196 -0
  107. package/components/DropdownMenu/DropdownMenu.css +303 -0
  108. package/components/DropdownMenu/DropdownMenu.d.ts +42 -0
  109. package/components/DropdownMenu/DropdownMenu.js +322 -0
  110. package/components/EmptyState/EmptyState.css +115 -0
  111. package/components/EmptyState/EmptyState.d.ts +27 -0
  112. package/components/EmptyState/EmptyState.js +32 -0
  113. package/components/EntityCard/EntityCard.css +69 -0
  114. package/components/EntityCard/EntityCard.d.ts +18 -0
  115. package/components/EntityCard/EntityCard.js +26 -0
  116. package/components/Figure/Figure.css +61 -0
  117. package/components/Figure/Figure.d.ts +17 -0
  118. package/components/Figure/Figure.js +35 -0
  119. package/components/FileInput/FileInput.css +308 -0
  120. package/components/FileInput/FileInput.d.ts +54 -0
  121. package/components/FileInput/FileInput.js +177 -0
  122. package/components/Input/Input.css +193 -0
  123. package/components/Input/Input.d.ts +40 -0
  124. package/components/Input/Input.js +71 -0
  125. package/components/Instructions/Instructions.css +216 -0
  126. package/components/Instructions/Instructions.d.ts +28 -0
  127. package/components/Instructions/Instructions.js +32 -0
  128. package/components/LinkList/LinkList.css +71 -0
  129. package/components/LinkList/LinkList.d.ts +20 -0
  130. package/components/LinkList/LinkList.js +41 -0
  131. package/components/MotionSwatch/MotionSwatch.css +176 -0
  132. package/components/MotionSwatch/MotionSwatch.d.ts +25 -0
  133. package/components/MotionSwatch/MotionSwatch.js +74 -0
  134. package/components/Nav/Nav.css +51 -0
  135. package/components/Nav/Nav.d.ts +19 -0
  136. package/components/Nav/Nav.js +26 -0
  137. package/components/Pagination/Pagination.css +126 -0
  138. package/components/Pagination/Pagination.d.ts +22 -0
  139. package/components/Pagination/Pagination.js +83 -0
  140. package/components/Popover/Popover.css +99 -0
  141. package/components/Popover/Popover.d.ts +28 -0
  142. package/components/Popover/Popover.js +102 -0
  143. package/components/ProgressBar/ProgressBar.css +60 -0
  144. package/components/ProgressBar/ProgressBar.d.ts +16 -0
  145. package/components/ProgressBar/ProgressBar.js +27 -0
  146. package/components/Quote/Quote.css +79 -0
  147. package/components/Quote/Quote.d.ts +18 -0
  148. package/components/Quote/Quote.js +26 -0
  149. package/components/RadioButton/RadioButton.css +132 -0
  150. package/components/RadioButton/RadioButton.d.ts +43 -0
  151. package/components/RadioButton/RadioButton.js +77 -0
  152. package/components/SectionTitle/SectionTitle.css +37 -0
  153. package/components/SectionTitle/SectionTitle.d.ts +10 -0
  154. package/components/SectionTitle/SectionTitle.js +17 -0
  155. package/components/SegmentedControl/SegmentedControl.css +129 -0
  156. package/components/SegmentedControl/SegmentedControl.d.ts +33 -0
  157. package/components/SegmentedControl/SegmentedControl.js +91 -0
  158. package/components/SelectionCard/SelectionCard.css +251 -0
  159. package/components/SelectionCard/SelectionCard.d.ts +26 -0
  160. package/components/SelectionCard/SelectionCard.js +85 -0
  161. package/components/Skeleton/Skeleton.css +79 -0
  162. package/components/Skeleton/Skeleton.d.ts +16 -0
  163. package/components/Skeleton/Skeleton.js +30 -0
  164. package/components/Slider/Slider.css +86 -0
  165. package/components/Slider/Slider.d.ts +25 -0
  166. package/components/Slider/Slider.js +46 -0
  167. package/components/SpacingSwatch/SpacingSwatch.css +108 -0
  168. package/components/SpacingSwatch/SpacingSwatch.d.ts +20 -0
  169. package/components/SpacingSwatch/SpacingSwatch.js +50 -0
  170. package/components/Spinner/Spinner.css +73 -0
  171. package/components/Spinner/Spinner.d.ts +14 -0
  172. package/components/Spinner/Spinner.js +42 -0
  173. package/components/Stat/Stat.css +78 -0
  174. package/components/Stat/Stat.d.ts +19 -0
  175. package/components/Stat/Stat.js +30 -0
  176. package/components/Table/Table.css +186 -0
  177. package/components/Table/Table.d.ts +45 -0
  178. package/components/Table/Table.js +65 -0
  179. package/components/Tabs/Tabs.css +140 -0
  180. package/components/Tabs/Tabs.d.ts +28 -0
  181. package/components/Tabs/Tabs.js +77 -0
  182. package/components/Textarea/Textarea.css +152 -0
  183. package/components/Textarea/Textarea.d.ts +40 -0
  184. package/components/Textarea/Textarea.js +74 -0
  185. package/components/Timeline/Timeline.css +339 -0
  186. package/components/Timeline/Timeline.d.ts +63 -0
  187. package/components/Timeline/Timeline.js +69 -0
  188. package/components/Toast/Toast.css +342 -0
  189. package/components/Toast/Toast.d.ts +63 -0
  190. package/components/Toast/Toast.js +213 -0
  191. package/components/ToggleGroup/ToggleGroup.css +84 -0
  192. package/components/ToggleGroup/ToggleGroup.d.ts +30 -0
  193. package/components/ToggleGroup/ToggleGroup.js +53 -0
  194. package/components/ToggleSwitch/ToggleSwitch.css +139 -0
  195. package/components/ToggleSwitch/ToggleSwitch.d.ts +23 -0
  196. package/components/ToggleSwitch/ToggleSwitch.js +50 -0
  197. package/components/Tooltip/Tooltip.css +122 -0
  198. package/components/Tooltip/Tooltip.d.ts +21 -0
  199. package/components/Tooltip/Tooltip.js +63 -0
  200. package/components/TypographySwatch/TypographySwatch.css +81 -0
  201. package/components/TypographySwatch/TypographySwatch.d.ts +24 -0
  202. package/components/TypographySwatch/TypographySwatch.js +40 -0
  203. package/components/registry.d.ts +20 -0
  204. package/components/registry.js +7 -0
  205. package/components/registry.json +67 -0
  206. package/components/registry.json.d.ts +70 -0
  207. package/components/registry.json.js +8 -0
  208. package/fonts/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2 +0 -0
  209. package/fonts/material-symbols.css +94 -0
  210. package/index.d.ts +62 -0
  211. package/index.js +123 -0
  212. package/package.json +63 -0
  213. package/tokens/registry.d.ts +22 -0
  214. package/tokens/registry.js +14 -0
  215. package/tokens/registry.json +203 -0
  216. package/tokens/registry.json.d.ts +206 -0
  217. package/tokens/registry.json.js +8 -0
  218. package/tokens/tokens-dark.css +119 -0
  219. package/tokens/tokens-light.css +159 -0
  220. package/tokens/tokens-motion.css +68 -0
  221. package/tokens/tokens-primitives.css +176 -0
  222. package/tokens/tokens-typography.css +116 -0
  223. package/tokens/tokens.css +11 -0
@@ -0,0 +1,92 @@
1
+ /* ============================================
2
+ BREADCRUMB COMPONENT
3
+ Hierarchical navigation trail
4
+ ============================================ */
5
+
6
+ .ds-breadcrumb {
7
+ width: 100%;
8
+ }
9
+
10
+ /* ============================================
11
+ LIST
12
+ ============================================ */
13
+
14
+ .ds-breadcrumb__list {
15
+ display: flex;
16
+ align-items: center;
17
+ flex-wrap: wrap;
18
+ gap: var(--gap-xxs);
19
+ list-style: none;
20
+ margin: 0;
21
+ padding: 0;
22
+ }
23
+
24
+ /* ============================================
25
+ ITEM
26
+ ============================================ */
27
+
28
+ .ds-breadcrumb__item {
29
+ display: flex;
30
+ align-items: center;
31
+ gap: var(--gap-xxs);
32
+ }
33
+
34
+ /* ============================================
35
+ LINK
36
+ ============================================ */
37
+
38
+ .ds-breadcrumb__link {
39
+ font-family: var(--font-paragraph-sm-family);
40
+ font-size: var(--font-paragraph-sm-size);
41
+ font-weight: var(--font-paragraph-sm-weight);
42
+ line-height: var(--font-paragraph-sm-line-height);
43
+ letter-spacing: var(--font-paragraph-sm-letter-spacing);
44
+ color: var(--color-text-secondary);
45
+ text-decoration: none;
46
+ transition: color var(--motion-duration-fast) var(--motion-ease-standard);
47
+ }
48
+
49
+ .ds-breadcrumb__link:hover {
50
+ color: var(--color-text-primary);
51
+ text-decoration: underline;
52
+ }
53
+
54
+ .ds-breadcrumb__link:focus-visible {
55
+ outline: 2px solid var(--color-action-primary-bg);
56
+ outline-offset: 2px;
57
+ border-radius: var(--radius-sm);
58
+ }
59
+
60
+ /* ============================================
61
+ CURRENT (last item)
62
+ ============================================ */
63
+
64
+ .ds-breadcrumb__current {
65
+ font-family: var(--font-paragraph-sm-em-family);
66
+ font-size: var(--font-paragraph-sm-em-size);
67
+ font-weight: var(--font-paragraph-sm-em-weight);
68
+ line-height: var(--font-paragraph-sm-em-line-height);
69
+ letter-spacing: var(--font-paragraph-sm-em-letter-spacing);
70
+ color: var(--color-text-primary);
71
+ }
72
+
73
+ /* ============================================
74
+ SEPARATOR
75
+ ============================================ */
76
+
77
+ .ds-breadcrumb__separator {
78
+ font-size: 18px;
79
+ color: var(--color-text-tertiary);
80
+ user-select: none;
81
+ }
82
+
83
+ /* ============================================
84
+ ELLIPSIS
85
+ ============================================ */
86
+
87
+ .ds-breadcrumb__ellipsis {
88
+ font-family: var(--font-paragraph-sm-family);
89
+ font-size: var(--font-paragraph-sm-size);
90
+ color: var(--color-text-tertiary);
91
+ user-select: none;
92
+ }
@@ -0,0 +1,19 @@
1
+ export interface BreadcrumbItem {
2
+ /** Display label */
3
+ label: string;
4
+ /** Link href — omit for the current / last item */
5
+ href?: string;
6
+ }
7
+ export interface BreadcrumbProps {
8
+ /** Ordered list of breadcrumb items */
9
+ items: BreadcrumbItem[];
10
+ /** Maximum visible items before collapsing (min 2: first + last) */
11
+ maxItems?: number;
12
+ /** Additional CSS classes */
13
+ className?: string;
14
+ }
15
+ /**
16
+ * Breadcrumb shows the user's location within a page hierarchy.
17
+ * Supports automatic collapsing of middle items when the list exceeds maxItems.
18
+ */
19
+ export declare const Breadcrumb: ({ items, maxItems, className, }: BreadcrumbProps) => import("react").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "./Breadcrumb.css";
3
+ import "../../fonts/material-symbols.css";
4
+ const Breadcrumb = ({
5
+ items,
6
+ maxItems,
7
+ className = ""
8
+ }) => {
9
+ const baseClass = "ds-breadcrumb";
10
+ const classes = [baseClass, className].filter(Boolean).join(" ");
11
+ const shouldCollapse = maxItems !== void 0 && maxItems >= 2 && items.length > maxItems;
12
+ let visibleItems;
13
+ if (shouldCollapse) {
14
+ const tailCount = maxItems - 1;
15
+ visibleItems = [
16
+ items[0],
17
+ "ellipsis",
18
+ ...items.slice(-tailCount)
19
+ ];
20
+ } else {
21
+ visibleItems = [...items];
22
+ }
23
+ return /* @__PURE__ */ jsx("nav", { className: classes, "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: `${baseClass}__list`, children: visibleItems.map((item, index) => {
24
+ const isLast = index === visibleItems.length - 1;
25
+ if (item === "ellipsis") {
26
+ return /* @__PURE__ */ jsxs("li", { className: `${baseClass}__item`, "aria-hidden": "true", children: [
27
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__separator material-symbols-rounded`, children: "chevron_right" }),
28
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__ellipsis`, children: "…" })
29
+ ] }, "ellipsis");
30
+ }
31
+ return /* @__PURE__ */ jsxs("li", { className: `${baseClass}__item`, children: [
32
+ index > 0 && /* @__PURE__ */ jsx("span", { className: `${baseClass}__separator material-symbols-rounded`, "aria-hidden": "true", children: "chevron_right" }),
33
+ isLast || !item.href ? /* @__PURE__ */ jsx("span", { className: `${baseClass}__current`, "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsx("a", { href: item.href, className: `${baseClass}__link`, children: item.label })
34
+ ] }, index);
35
+ }) }) });
36
+ };
37
+ export {
38
+ Breadcrumb
39
+ };
@@ -0,0 +1,381 @@
1
+ /* ============================================
2
+ BUTTON COMPONENT
3
+ Figma design system button component
4
+ ============================================ */
5
+
6
+ .ds-button {
7
+ /* Layout */
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ gap: var(--gap-sm); /* Figma: --radius/sm (8px) */
12
+
13
+ /* Spacing */
14
+ padding: var(--padding-sm) var(--padding-lg); /* Figma: --padding/sm (8px) & --radius/lg (16px) */
15
+
16
+ /* Border radius */
17
+ border-radius: var(--radius-full); /* Figma: --radius/full (999px) */
18
+
19
+ /* Typography - Using paragraph em (medium weight) for clickable controls */
20
+ font-family: var(--font-paragraph-em-family);
21
+ font-weight: var(--font-paragraph-em-weight);
22
+ font-size: var(--font-paragraph-em-size);
23
+ line-height: var(--font-paragraph-em-line-height);
24
+ letter-spacing: var(--font-paragraph-em-letter-spacing);
25
+ text-align: center;
26
+
27
+ /* Transitions */
28
+ transition: background-color var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), opacity var(--motion-duration-base) var(--motion-ease-standard);
29
+
30
+ /* Reset */
31
+ cursor: pointer;
32
+ border: none;
33
+ overflow: hidden;
34
+ text-decoration: none;
35
+ color: inherit;
36
+ }
37
+
38
+ /* ============================================
39
+ SIZE — DEFAULT (no overrides needed, base styles apply)
40
+ ============================================ */
41
+
42
+ .ds-button--default {
43
+ /* Base padding & typography inherited from .ds-button */
44
+ }
45
+
46
+ /* ============================================
47
+ SIZE — COMPACT
48
+ ============================================ */
49
+
50
+ .ds-button--compact {
51
+ padding: var(--padding-xs) var(--padding-sm-md); /* 6px 12px */
52
+ font-size: var(--font-paragraph-sm-em-size);
53
+ line-height: var(--font-paragraph-sm-em-line-height);
54
+ letter-spacing: var(--font-paragraph-sm-em-letter-spacing);
55
+ }
56
+
57
+ .ds-button--compact .ds-button__icon {
58
+ --icon-size: var(--icon-size-sm);
59
+ /* Figma: compact icons are 20px (vs 24px default) */
60
+ }
61
+
62
+ /* Scale any child SVG to fit the compact icon slot */
63
+ .ds-button--compact .ds-button__icon svg {
64
+ width: 20px;
65
+ height: 20px;
66
+ }
67
+
68
+ /* ============================================
69
+ PRIMARY BUTTON (SOLID)
70
+ ============================================ */
71
+
72
+ .ds-button--primary {
73
+ background-color: var(--color-action-primary-bg);
74
+ border: none;
75
+ }
76
+
77
+ .ds-button--primary .ds-button__text {
78
+ color: var(--color-action-primary-text);
79
+ }
80
+
81
+ .ds-button--primary.ds-button--hover {
82
+ background-color: var(--color-action-primary-bg-hover);
83
+ }
84
+
85
+ .ds-button--primary.ds-button--hover .ds-button__text {
86
+ color: var(--color-action-primary-text-active);
87
+ }
88
+
89
+ .ds-button--primary.ds-button--active {
90
+ background-color: var(--color-action-primary-bg-active);
91
+ }
92
+
93
+ .ds-button--primary.ds-button--active .ds-button__text {
94
+ color: var(--color-action-primary-text-active);
95
+ }
96
+
97
+ .ds-button--primary.ds-button--disabled {
98
+ background-color: var(--color-action-primary-bg);
99
+ opacity: 0.4;
100
+ cursor: not-allowed;
101
+ }
102
+
103
+ /* ============================================
104
+ SECONDARY BUTTON (OUTLINED)
105
+ ============================================ */
106
+
107
+ .ds-button--secondary {
108
+ /* Figma: --action/primary/border/primary (#0a4e66) - 1px border */
109
+ border: var(--border-xs) solid var(--color-action-primary-border);
110
+ background-color: transparent;
111
+ }
112
+
113
+ .ds-button--secondary .ds-button__text {
114
+ /* Figma: --text/primary */
115
+ color: var(--color-text-primary);
116
+ }
117
+
118
+ .ds-button--secondary.ds-button--default {
119
+ border: var(--border-xs) solid var(--color-action-primary-border);
120
+ background-color: transparent;
121
+ }
122
+
123
+ .ds-button--secondary.ds-button--hover {
124
+ /* Figma: hover state - 1px border */
125
+ border: var(--border-xs) solid var(--color-action-primary-border);
126
+ background-color: var(--color-action-primary-bg-hover);
127
+ }
128
+
129
+ .ds-button--secondary.ds-button--hover .ds-button__text {
130
+ color: var(--color-action-primary-text-active);
131
+ }
132
+
133
+ .ds-button--secondary.ds-button--active {
134
+ /* Figma: --action/primary/background/active (#0a4e66) - 1px border */
135
+ background-color: var(--color-action-primary-bg-active);
136
+ border: var(--border-xs) solid var(--color-action-primary-border);
137
+ }
138
+
139
+ .ds-button--secondary.ds-button--active .ds-button__text {
140
+ color: var(--color-action-primary-text-active);
141
+ }
142
+
143
+ .ds-button--secondary.ds-button--disabled {
144
+ border: var(--border-xs) solid var(--color-action-primary-border);
145
+ background-color: transparent;
146
+ opacity: 0.4;
147
+ cursor: not-allowed;
148
+ }
149
+
150
+ /* ============================================
151
+ TERTIARY BUTTON (PASSIVE / GHOST)
152
+ ============================================ */
153
+
154
+ .ds-button--tertiary {
155
+ /* Figma: --action/passive/background/primary (rgba(241, 241, 241, 0.01)) */
156
+ background-color: var(--color-action-passive-bg);
157
+ border: none;
158
+ }
159
+
160
+ .ds-button--tertiary .ds-button__text {
161
+ /* Figma: --action/passive/text/primary (#050505) */
162
+ color: var(--color-action-passive-text);
163
+ }
164
+
165
+ .ds-button--tertiary.ds-button--default {
166
+ background-color: var(--color-action-passive-bg);
167
+ }
168
+
169
+ .ds-button--tertiary.ds-button--hover {
170
+ /* Figma: hover background (#d6d6d6) */
171
+ background-color: var(--color-action-passive-bg-hover);
172
+ }
173
+
174
+ .ds-button--tertiary.ds-button--active {
175
+ /* Figma: --action/passive/background/active (#bcbcbc) */
176
+ background-color: var(--color-action-passive-bg-active);
177
+ }
178
+
179
+ .ds-button--tertiary.ds-button--disabled {
180
+ background-color: var(--color-action-passive-bg);
181
+ opacity: 0.4;
182
+ cursor: not-allowed;
183
+ }
184
+
185
+ /* ============================================
186
+ DESTRUCTIVE BUTTON
187
+ For dangerous actions: delete, remove, etc.
188
+ Uses accent-coral as the border / fill colour.
189
+ ============================================ */
190
+
191
+ .ds-button--destructive {
192
+ border: var(--border-xs) solid var(--color-core-accent-coral);
193
+ background-color: transparent;
194
+ }
195
+
196
+ .ds-button--destructive .ds-button__text {
197
+ color: var(--color-core-accent-coral);
198
+ }
199
+
200
+ .ds-button--destructive.ds-button--default {
201
+ border: var(--border-xs) solid var(--color-core-accent-coral);
202
+ background-color: transparent;
203
+ }
204
+
205
+ .ds-button--destructive.ds-button--hover {
206
+ border: var(--border-xs) solid var(--color-core-accent-coral);
207
+ background-color: var(--color-core-accent-coral);
208
+ }
209
+
210
+ .ds-button--destructive.ds-button--hover .ds-button__text {
211
+ color: var(--color-status-error-bg);
212
+ }
213
+
214
+ .ds-button--destructive.ds-button--active {
215
+ border: var(--border-xs) solid var(--color-core-accent-coral);
216
+ background-color: var(--color-core-accent-coral);
217
+ }
218
+
219
+ .ds-button--destructive.ds-button--active .ds-button__text {
220
+ color: var(--color-status-error-bg);
221
+ }
222
+
223
+ .ds-button--destructive.ds-button--disabled {
224
+ border: var(--border-xs) solid var(--color-core-accent-coral);
225
+ background-color: transparent;
226
+ opacity: 0.4;
227
+ cursor: not-allowed;
228
+ }
229
+
230
+ /* ============================================
231
+ ICON
232
+ ============================================ */
233
+
234
+ .ds-button__icon {
235
+ flex-shrink: 0;
236
+ --icon-size: var(--icon-size-md);
237
+ /* Figma: default icons are 24px */
238
+ line-height: 1;
239
+ }
240
+
241
+ /* Scale any child SVG to fit the icon slot */
242
+ .ds-button__icon svg {
243
+ width: 24px;
244
+ height: 24px;
245
+ }
246
+
247
+ .ds-button--primary .ds-button__icon {
248
+ color: var(--color-action-primary-text);
249
+ }
250
+
251
+ .ds-button--primary.ds-button--active .ds-button__icon,
252
+ .ds-button--primary.ds-button--hover .ds-button__icon {
253
+ color: var(--color-action-primary-text-active);
254
+ }
255
+
256
+ .ds-button--secondary .ds-button__icon {
257
+ color: var(--color-action-icon-default);
258
+ }
259
+
260
+ .ds-button--secondary.ds-button--active .ds-button__icon,
261
+ .ds-button--secondary.ds-button--hover .ds-button__icon {
262
+ color: var(--color-action-icon-active);
263
+ }
264
+
265
+ .ds-button--tertiary .ds-button__icon {
266
+ color: var(--color-icon-primary);
267
+ }
268
+
269
+ .ds-button--destructive .ds-button__icon {
270
+ color: var(--color-core-accent-coral);
271
+ }
272
+
273
+ .ds-button--destructive.ds-button--hover .ds-button__icon,
274
+ .ds-button--destructive.ds-button--active .ds-button__icon {
275
+ color: var(--color-status-error-bg);
276
+ }
277
+
278
+ /* ============================================
279
+ TEXT
280
+ ============================================ */
281
+
282
+ .ds-button__text {
283
+ flex-shrink: 0;
284
+ }
285
+
286
+ /* ============================================
287
+ HOVER STATES (for interactive use)
288
+ ============================================ */
289
+
290
+ .ds-button--primary:not(.ds-button--disabled):hover {
291
+ background-color: var(--color-action-primary-bg-hover);
292
+ }
293
+
294
+ .ds-button--primary:not(.ds-button--disabled):hover .ds-button__text {
295
+ color: var(--color-action-primary-text-active);
296
+ }
297
+
298
+ .ds-button--primary:not(.ds-button--disabled):hover .ds-button__icon {
299
+ color: var(--color-action-primary-text-active);
300
+ }
301
+
302
+ .ds-button--secondary:not(.ds-button--disabled):hover {
303
+ background-color: var(--color-action-primary-bg-hover);
304
+ }
305
+
306
+ .ds-button--secondary:not(.ds-button--disabled):hover .ds-button__text {
307
+ color: var(--color-action-primary-text-active);
308
+ }
309
+
310
+ .ds-button--secondary:not(.ds-button--disabled):hover .ds-button__icon {
311
+ color: var(--color-action-icon-active);
312
+ }
313
+
314
+ .ds-button--tertiary:not(.ds-button--disabled):hover {
315
+ background-color: var(--color-action-passive-bg-hover);
316
+ }
317
+
318
+ .ds-button--destructive:not(.ds-button--disabled):hover {
319
+ background-color: var(--color-core-accent-coral);
320
+ }
321
+
322
+ .ds-button--destructive:not(.ds-button--disabled):hover .ds-button__text {
323
+ color: var(--color-status-error-bg);
324
+ }
325
+
326
+ .ds-button--destructive:not(.ds-button--disabled):hover .ds-button__icon {
327
+ color: var(--color-status-error-bg);
328
+ }
329
+
330
+ /* ============================================
331
+ ACTIVE STATES (for interactive use)
332
+ ============================================ */
333
+
334
+ .ds-button--primary:not(.ds-button--disabled):active {
335
+ background-color: var(--color-action-primary-bg-active);
336
+ }
337
+
338
+ .ds-button--primary:not(.ds-button--disabled):active .ds-button__text {
339
+ color: var(--color-action-primary-text-active);
340
+ }
341
+
342
+ .ds-button--primary:not(.ds-button--disabled):active .ds-button__icon {
343
+ color: var(--color-action-primary-text-active);
344
+ }
345
+
346
+ .ds-button--secondary:not(.ds-button--disabled):active {
347
+ background-color: var(--color-action-primary-bg-active);
348
+ }
349
+
350
+ .ds-button--secondary:not(.ds-button--disabled):active .ds-button__text {
351
+ color: var(--color-action-primary-text-active);
352
+ }
353
+
354
+ .ds-button--secondary:not(.ds-button--disabled):active .ds-button__icon {
355
+ color: var(--color-action-icon-active);
356
+ }
357
+
358
+ .ds-button--tertiary:not(.ds-button--disabled):active {
359
+ background-color: var(--color-action-passive-bg-active);
360
+ }
361
+
362
+ .ds-button--destructive:not(.ds-button--disabled):active {
363
+ background-color: var(--color-core-accent-coral);
364
+ }
365
+
366
+ .ds-button--destructive:not(.ds-button--disabled):active .ds-button__text {
367
+ color: var(--color-status-error-bg);
368
+ }
369
+
370
+ .ds-button--destructive:not(.ds-button--disabled):active .ds-button__icon {
371
+ color: var(--color-status-error-bg);
372
+ }
373
+
374
+ /* ============================================
375
+ FOCUS
376
+ ============================================ */
377
+
378
+ .ds-button:focus-visible {
379
+ outline: 2px solid var(--color-action-primary-bg);
380
+ outline-offset: 2px;
381
+ }
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+ export interface ButtonProps {
3
+ /** Button text content */
4
+ label?: string;
5
+ /** Icon for left side — Material Symbol name (string) or custom element (ReactNode) */
6
+ iconLeft?: string | React.ReactNode;
7
+ /** Icon for right side — Material Symbol name (string) or custom element (ReactNode) */
8
+ iconRight?: string | React.ReactNode;
9
+ /** Button priority/variant */
10
+ priority?: 'primary' | 'secondary' | 'tertiary' | 'destructive';
11
+ /** Button state */
12
+ state?: 'default' | 'hover' | 'active' | 'disabled';
13
+ /** Button size */
14
+ size?: 'default' | 'compact';
15
+ /** Show text label */
16
+ text?: boolean;
17
+ /** Optional click handler */
18
+ onClick?: () => void;
19
+ /** Optional href — renders as <a> instead of <button> */
20
+ href?: string;
21
+ /** Optional target attribute for links */
22
+ target?: string;
23
+ /** Optional rel attribute for links */
24
+ rel?: string;
25
+ /** Marks this link as the current page (adds aria-current="page") */
26
+ ariaCurrent?: boolean;
27
+ /** Id of an element describing this button — set automatically by Tooltip */
28
+ 'aria-describedby'?: string;
29
+ /** Additional CSS classes */
30
+ className?: string;
31
+ /** @deprecated Use iconLeft instead */
32
+ icon?: string;
33
+ }
34
+ /**
35
+ * Button component from Figma design system
36
+ * Supports primary and secondary variants with multiple states
37
+ * Icons can be placed on the left and/or right side of the text
38
+ */
39
+ export declare const Button: ({ label, iconLeft, iconRight, priority, state, size, text, onClick, href, target, rel, ariaCurrent, "aria-describedby": ariaDescribedby, className, icon, }: ButtonProps) => React.JSX.Element;
@@ -0,0 +1,71 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import "react";
3
+ import "./Button.css";
4
+ import "../../fonts/material-symbols.css";
5
+ const Button = ({
6
+ label = "Button",
7
+ iconLeft,
8
+ iconRight,
9
+ priority = "primary",
10
+ state = "default",
11
+ size = "default",
12
+ text = true,
13
+ onClick,
14
+ href,
15
+ target,
16
+ rel,
17
+ ariaCurrent,
18
+ "aria-describedby": ariaDescribedby,
19
+ className = "",
20
+ icon
21
+ // deprecated, maps to iconLeft for backwards compatibility
22
+ }) => {
23
+ const baseClass = "ds-button";
24
+ const variantClass = `${baseClass}--${priority}`;
25
+ const stateClass = `${baseClass}--${state}`;
26
+ const sizeClass = `${baseClass}--${size}`;
27
+ const classes = [baseClass, variantClass, stateClass, sizeClass, className].filter(Boolean).join(" ");
28
+ const isDisabled = state === "disabled";
29
+ const iconClass = "material-symbols-rounded";
30
+ const leftIcon = iconLeft || icon;
31
+ const renderIcon = (iconProp) => {
32
+ if (typeof iconProp === "string") {
33
+ return /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon ${iconClass}`, "aria-hidden": "true", children: iconProp });
34
+ }
35
+ return /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon`, "aria-hidden": "true", children: iconProp });
36
+ };
37
+ const children = /* @__PURE__ */ jsxs(Fragment, { children: [
38
+ leftIcon && renderIcon(leftIcon),
39
+ text && /* @__PURE__ */ jsx("span", { className: `${baseClass}__text`, children: label }),
40
+ iconRight && renderIcon(iconRight)
41
+ ] });
42
+ if (href && !isDisabled) {
43
+ return /* @__PURE__ */ jsx(
44
+ "a",
45
+ {
46
+ className: classes,
47
+ href,
48
+ target,
49
+ rel,
50
+ "aria-current": ariaCurrent ? "page" : void 0,
51
+ "aria-describedby": ariaDescribedby,
52
+ onClick,
53
+ children
54
+ }
55
+ );
56
+ }
57
+ return /* @__PURE__ */ jsx(
58
+ "button",
59
+ {
60
+ type: "button",
61
+ className: classes,
62
+ onClick,
63
+ disabled: isDisabled,
64
+ "aria-describedby": ariaDescribedby,
65
+ children
66
+ }
67
+ );
68
+ };
69
+ export {
70
+ Button
71
+ };
@@ -0,0 +1,39 @@
1
+ /* ============================================
2
+ BUTTON GROUP COMPONENT
3
+ Container for grouped buttons in nav/subnav
4
+ ============================================ */
5
+
6
+ .ds-button-group {
7
+ /* Layout */
8
+ display: inline-flex; /* Hug content instead of stretch */
9
+ width: auto; /* Don't stretch to full width */
10
+ overflow: hidden;
11
+ }
12
+
13
+ /* ============================================
14
+ HORIZONTAL ORIENTATION
15
+ Default for top navigation
16
+ ============================================ */
17
+
18
+ .ds-button-group--horizontal {
19
+ flex-direction: row;
20
+ gap: var(--gap-lg); /* Figma: --gap/lg (20px) */
21
+ align-items: flex-start;
22
+ }
23
+
24
+ /* ============================================
25
+ VERTICAL ORIENTATION
26
+ For subnav/mobile navigation
27
+ ============================================ */
28
+
29
+ .ds-button-group--vertical {
30
+ flex-direction: column;
31
+ gap: var(--gap-xxs); /* 2px */
32
+ align-items: flex-start; /* Left-aligned, hug content */
33
+ }
34
+
35
+ /* Vertical buttons hug their content by default */
36
+ .ds-button-group--vertical .ds-button {
37
+ width: auto; /* Hug content instead of stretch */
38
+ display: inline-flex; /* Hug content */
39
+ }
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '../Button/Button';
3
+ export interface ButtonGroupProps {
4
+ /** Orientation of the button group */
5
+ orientation?: 'horizontal' | 'vertical';
6
+ /** Array of button configurations */
7
+ buttons: Array<ButtonProps>;
8
+ /** Accessible label for the group */
9
+ ariaLabel?: string;
10
+ /** Additional CSS class */
11
+ className?: string;
12
+ }
13
+ export declare const ButtonGroup: React.FC<ButtonGroupProps>;