@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,40 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import "./TypographySwatch.css";
4
+ const TypographySwatch = ({
5
+ name,
6
+ weight,
7
+ size,
8
+ lineHeight,
9
+ letterSpacing,
10
+ previewStyle,
11
+ className = ""
12
+ }) => {
13
+ const baseClass = "ds-typography-swatch";
14
+ const classes = [baseClass, className].filter(Boolean).join(" ");
15
+ return /* @__PURE__ */ jsxs("div", { className: classes, children: [
16
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__preview`, style: previewStyle, children: name }),
17
+ /* @__PURE__ */ jsx("hr", { className: `${baseClass}__divider` }),
18
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__values`, children: [
19
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__value-item`, children: [
20
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-number`, children: weight }),
21
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-label`, children: "Font weight" })
22
+ ] }),
23
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__value-item`, children: [
24
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-number`, children: size }),
25
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-label`, children: "Font size" })
26
+ ] }),
27
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__value-item`, children: [
28
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-number`, children: lineHeight }),
29
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-label`, children: "Line height" })
30
+ ] }),
31
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__value-item`, children: [
32
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-number`, children: letterSpacing }),
33
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__value-label`, children: "Letter spacing" })
34
+ ] })
35
+ ] })
36
+ ] });
37
+ };
38
+ export {
39
+ TypographySwatch
40
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * COMPONENT REGISTRY — the single source of truth for the public
3
+ * component count.
4
+ *
5
+ * The data lives in registry.json: `components` is the official list of
6
+ * public components (one entry per folder in src/components), and
7
+ * `docOnlyHelpers` names the internal documentation helpers that are
8
+ * deliberately excluded from the public count.
9
+ *
10
+ * scripts/validate-component-registry.mjs compares the registry against
11
+ * the filesystem on every build (library, Storybook, and website), so
12
+ * the registry cannot silently drift from reality.
13
+ *
14
+ * Anywhere a component count is displayed — the Storybook overview,
15
+ * the website mega-nav, case studies — import COMPONENT_COUNT from
16
+ * here. Never hardcode the number.
17
+ */
18
+ export declare const componentRegistry: readonly string[];
19
+ /** The official public component count. */
20
+ export declare const COMPONENT_COUNT: number;
@@ -0,0 +1,7 @@
1
+ import registry from "./registry.json.js";
2
+ const componentRegistry = registry.components;
3
+ const COMPONENT_COUNT = registry.components.length;
4
+ export {
5
+ COMPONENT_COUNT,
6
+ componentRegistry
7
+ };
@@ -0,0 +1,67 @@
1
+ {
2
+ "$comment": "SINGLE SOURCE OF TRUTH for the public component count. Every folder in src/components must appear in exactly one of these lists; scripts/validate-component-registry.mjs enforces this at build time. Import COMPONENT_COUNT from src/components/registry.ts wherever a count is displayed - never hardcode the number.",
3
+ "components": [
4
+ "Accordion",
5
+ "Alert",
6
+ "AlertDialog",
7
+ "AppLayout",
8
+ "AppSidebar",
9
+ "Avatar",
10
+ "Badge",
11
+ "Breadcrumb",
12
+ "Button",
13
+ "ButtonGroup",
14
+ "Card",
15
+ "Carousel",
16
+ "Chart",
17
+ "Checkbox",
18
+ "Chip",
19
+ "CircularButton",
20
+ "CodeBlock",
21
+ "Combobox",
22
+ "CommandPalette",
23
+ "ContactCard",
24
+ "ContributionGraph",
25
+ "DateInput",
26
+ "DatePicker",
27
+ "Dialog",
28
+ "Divider",
29
+ "Drawer",
30
+ "Dropdown",
31
+ "DropdownMenu",
32
+ "EmptyState",
33
+ "EntityCard",
34
+ "Figure",
35
+ "FileInput",
36
+ "Input",
37
+ "Instructions",
38
+ "LinkList",
39
+ "Nav",
40
+ "Pagination",
41
+ "Popover",
42
+ "ProgressBar",
43
+ "Quote",
44
+ "RadioButton",
45
+ "SectionTitle",
46
+ "SegmentedControl",
47
+ "SelectionCard",
48
+ "Skeleton",
49
+ "Slider",
50
+ "Spinner",
51
+ "Stat",
52
+ "Table",
53
+ "Tabs",
54
+ "Textarea",
55
+ "Timeline",
56
+ "Toast",
57
+ "ToggleGroup",
58
+ "ToggleSwitch",
59
+ "Tooltip"
60
+ ],
61
+ "docOnlyHelpers": [
62
+ "ColourSwatch",
63
+ "MotionSwatch",
64
+ "SpacingSwatch",
65
+ "TypographySwatch"
66
+ ]
67
+ }
@@ -0,0 +1,70 @@
1
+ declare const _default: {
2
+ "$comment": "SINGLE SOURCE OF TRUTH for the public component count. Every folder in src/components must appear in exactly one of these lists; scripts/validate-component-registry.mjs enforces this at build time. Import COMPONENT_COUNT from src/components/registry.ts wherever a count is displayed - never hardcode the number.",
3
+ "components": [
4
+ "Accordion",
5
+ "Alert",
6
+ "AlertDialog",
7
+ "AppLayout",
8
+ "AppSidebar",
9
+ "Avatar",
10
+ "Badge",
11
+ "Breadcrumb",
12
+ "Button",
13
+ "ButtonGroup",
14
+ "Card",
15
+ "Carousel",
16
+ "Chart",
17
+ "Checkbox",
18
+ "Chip",
19
+ "CircularButton",
20
+ "CodeBlock",
21
+ "Combobox",
22
+ "CommandPalette",
23
+ "ContactCard",
24
+ "ContributionGraph",
25
+ "DateInput",
26
+ "DatePicker",
27
+ "Dialog",
28
+ "Divider",
29
+ "Drawer",
30
+ "Dropdown",
31
+ "DropdownMenu",
32
+ "EmptyState",
33
+ "EntityCard",
34
+ "Figure",
35
+ "FileInput",
36
+ "Input",
37
+ "Instructions",
38
+ "LinkList",
39
+ "Nav",
40
+ "Pagination",
41
+ "Popover",
42
+ "ProgressBar",
43
+ "Quote",
44
+ "RadioButton",
45
+ "SectionTitle",
46
+ "SegmentedControl",
47
+ "SelectionCard",
48
+ "Skeleton",
49
+ "Slider",
50
+ "Spinner",
51
+ "Stat",
52
+ "Table",
53
+ "Tabs",
54
+ "Textarea",
55
+ "Timeline",
56
+ "Toast",
57
+ "ToggleGroup",
58
+ "ToggleSwitch",
59
+ "Tooltip"
60
+ ],
61
+ "docOnlyHelpers": [
62
+ "ColourSwatch",
63
+ "MotionSwatch",
64
+ "SpacingSwatch",
65
+ "TypographySwatch"
66
+ ]
67
+ }
68
+ ;
69
+
70
+ export default _default;
@@ -0,0 +1,8 @@
1
+ const components = ["Accordion", "Alert", "AlertDialog", "AppLayout", "AppSidebar", "Avatar", "Badge", "Breadcrumb", "Button", "ButtonGroup", "Card", "Carousel", "Chart", "Checkbox", "Chip", "CircularButton", "CodeBlock", "Combobox", "CommandPalette", "ContactCard", "ContributionGraph", "DateInput", "DatePicker", "Dialog", "Divider", "Drawer", "Dropdown", "DropdownMenu", "EmptyState", "EntityCard", "Figure", "FileInput", "Input", "Instructions", "LinkList", "Nav", "Pagination", "Popover", "ProgressBar", "Quote", "RadioButton", "SectionTitle", "SegmentedControl", "SelectionCard", "Skeleton", "Slider", "Spinner", "Stat", "Table", "Tabs", "Textarea", "Timeline", "Toast", "ToggleGroup", "ToggleSwitch", "Tooltip"];
2
+ const registry = {
3
+ components
4
+ };
5
+ export {
6
+ components,
7
+ registry as default
8
+ };
@@ -0,0 +1,94 @@
1
+ /* ============================================
2
+ MATERIAL SYMBOLS — Rounded only
3
+ Variable font with FILL, GRAD, opsz, wght axes
4
+ ============================================ */
5
+
6
+ @font-face {
7
+ font-family: 'Material Symbols Rounded';
8
+ font-style: normal;
9
+ font-weight: 100 700;
10
+ src: url('./MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2') format('woff2');
11
+ font-display: block;
12
+ }
13
+
14
+ /* ============================================
15
+ ICON BASE STYLES
16
+ ============================================ */
17
+
18
+ /*
19
+ Sizing is driven by a single custom property, `--icon-size`, which sets
20
+ the glyph size and the layout box together so they can never desync.
21
+
22
+ This is deliberately a *consumed* variable with a fallback, never a
23
+ declared one: because this class only reads `--icon-size` and never sets
24
+ it, a component that sets `--icon-size` has nothing to compete with.
25
+ Declaring `font-size` here directly (as this file used to) tied on
26
+ specificity with every single-class component rule and — being imported
27
+ later — won, rendering 24px glyphs inside 20px boxes.
28
+
29
+ Use one of the semantic steps: --icon-size-sm | -md | -lg | -xl.
30
+ */
31
+ .material-symbols-rounded {
32
+ font-family: 'Material Symbols Rounded';
33
+ font-weight: normal;
34
+ font-style: normal;
35
+ font-size: var(--icon-size, var(--icon-size-md));
36
+ width: var(--icon-size, var(--icon-size-md));
37
+ height: var(--icon-size, var(--icon-size-md));
38
+ line-height: 1;
39
+ letter-spacing: normal;
40
+ text-transform: none;
41
+ display: inline-block;
42
+ white-space: nowrap;
43
+ word-wrap: normal;
44
+ direction: ltr;
45
+ -webkit-font-smoothing: antialiased;
46
+ -moz-osx-font-smoothing: grayscale;
47
+ text-rendering: optimizeLegibility;
48
+ font-feature-settings: 'liga';
49
+ }
50
+
51
+ /* ============================================
52
+ VARIABLE FONT SETTINGS
53
+ ============================================ */
54
+
55
+ /*
56
+ `opsz` is intentionally ABSENT from font-variation-settings. An explicit
57
+ axis value always overrides `font-optical-sizing: auto`, so listing it
58
+ here would silently pin every icon to one optical size regardless of how
59
+ large it is drawn — which is exactly what this file used to do, via a
60
+ `--material-symbols-size` hook that nothing ever set.
61
+
62
+ With the axis omitted, the browser feeds the used font-size into `opsz`
63
+ automatically, so stroke weight adapts to the rendered size. The font's
64
+ axis range is 20..48; the icon-size scale starts at 20 to stay inside it.
65
+ */
66
+ .material-symbols-rounded {
67
+ font-optical-sizing: auto;
68
+ font-variation-settings:
69
+ 'FILL' var(--material-symbols-fill, 0),
70
+ 'wght' var(--material-symbols-weight, 200),
71
+ 'GRAD' var(--material-symbols-grade, 0);
72
+ }
73
+
74
+ /* ============================================
75
+ DARK THEME — optical grade correction
76
+ Light-on-dark glyphs bloom and read heavier
77
+ than the same strokes on a light background.
78
+ A negative GRAD thins them back without
79
+ changing glyph width or spacing (which is
80
+ what `wght` would do). Material's own
81
+ guidance for inverted surfaces.
82
+ ============================================ */
83
+
84
+ [data-theme="dark"] {
85
+ --material-symbols-grade: -25;
86
+ }
87
+
88
+ /* ============================================
89
+ MODIFIER — filled variant
90
+ ============================================ */
91
+
92
+ .icon-filled {
93
+ --material-symbols-fill: 1;
94
+ }
package/index.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ /**
2
+ * GENERATED FILE — do not edit.
3
+ * Built from src/components/registry.json by scripts/generate-library-barrel.mjs
4
+ * (validate-registry chain). recharts-backed modules live in charts.ts, not here — recharts is an optional peer.
5
+ */
6
+ export * from './components/Accordion/Accordion';
7
+ export * from './components/Alert/Alert';
8
+ export * from './components/AlertDialog/AlertDialog';
9
+ export * from './components/AppLayout/AppLayout';
10
+ export * from './components/AppSidebar/AppSidebar';
11
+ export * from './components/Avatar/Avatar';
12
+ export * from './components/Badge/Badge';
13
+ export * from './components/Breadcrumb/Breadcrumb';
14
+ export * from './components/Button/Button';
15
+ export * from './components/ButtonGroup/ButtonGroup';
16
+ export * from './components/Card/Card';
17
+ export * from './components/Carousel/Carousel';
18
+ export * from './components/Checkbox/Checkbox';
19
+ export * from './components/Chip/Chip';
20
+ export * from './components/CircularButton/CircularButton';
21
+ export * from './components/CodeBlock/CodeBlock';
22
+ export * from './components/Combobox/Combobox';
23
+ export * from './components/CommandPalette/CommandPalette';
24
+ export * from './components/ContactCard/ContactCard';
25
+ export * from './components/ContributionGraph/ContributionGraph';
26
+ export * from './components/DateInput/DateInput';
27
+ export * from './components/DatePicker/DatePicker';
28
+ export * from './components/Dialog/Dialog';
29
+ export * from './components/Divider/Divider';
30
+ export * from './components/Drawer/Drawer';
31
+ export * from './components/Dropdown/Dropdown';
32
+ export * from './components/DropdownMenu/DropdownMenu';
33
+ export * from './components/EmptyState/EmptyState';
34
+ export * from './components/EntityCard/EntityCard';
35
+ export * from './components/Figure/Figure';
36
+ export * from './components/FileInput/FileInput';
37
+ export * from './components/Input/Input';
38
+ export * from './components/Instructions/Instructions';
39
+ export * from './components/LinkList/LinkList';
40
+ export * from './components/Nav/Nav';
41
+ export * from './components/Pagination/Pagination';
42
+ export * from './components/Popover/Popover';
43
+ export * from './components/ProgressBar/ProgressBar';
44
+ export * from './components/Quote/Quote';
45
+ export * from './components/RadioButton/RadioButton';
46
+ export * from './components/SectionTitle/SectionTitle';
47
+ export * from './components/SegmentedControl/SegmentedControl';
48
+ export * from './components/SelectionCard/SelectionCard';
49
+ export * from './components/Skeleton/Skeleton';
50
+ export * from './components/Slider/Slider';
51
+ export * from './components/Spinner/Spinner';
52
+ export * from './components/Stat/Stat';
53
+ export * from './components/Table/Table';
54
+ export * from './components/Tabs/Tabs';
55
+ export * from './components/Textarea/Textarea';
56
+ export * from './components/Timeline/Timeline';
57
+ export * from './components/Toast/Toast';
58
+ export * from './components/ToggleGroup/ToggleGroup';
59
+ export * from './components/ToggleSwitch/ToggleSwitch';
60
+ export * from './components/Tooltip/Tooltip';
61
+ export { componentRegistry, COMPONENT_COUNT } from './components/registry';
62
+ export { tokenRegistry, TOKEN_COUNT, TOKEN_COUNTS } from './tokens/registry';
package/index.js ADDED
@@ -0,0 +1,123 @@
1
+ import { Accordion } from "./components/Accordion/Accordion.js";
2
+ import { Alert } from "./components/Alert/Alert.js";
3
+ import { AlertDialog } from "./components/AlertDialog/AlertDialog.js";
4
+ import { AppLayout } from "./components/AppLayout/AppLayout.js";
5
+ import { AppSidebar } from "./components/AppSidebar/AppSidebar.js";
6
+ import { Avatar } from "./components/Avatar/Avatar.js";
7
+ import { Badge } from "./components/Badge/Badge.js";
8
+ import { Breadcrumb } from "./components/Breadcrumb/Breadcrumb.js";
9
+ import { Button } from "./components/Button/Button.js";
10
+ import { ButtonGroup } from "./components/ButtonGroup/ButtonGroup.js";
11
+ import { Card } from "./components/Card/Card.js";
12
+ import { Carousel } from "./components/Carousel/Carousel.js";
13
+ import { Checkbox, CheckboxGroup } from "./components/Checkbox/Checkbox.js";
14
+ import { Chip } from "./components/Chip/Chip.js";
15
+ import { CircularButton } from "./components/CircularButton/CircularButton.js";
16
+ import { CodeBlock } from "./components/CodeBlock/CodeBlock.js";
17
+ import { Combobox } from "./components/Combobox/Combobox.js";
18
+ import { CommandPalette } from "./components/CommandPalette/CommandPalette.js";
19
+ import { ContactCard } from "./components/ContactCard/ContactCard.js";
20
+ import { ContributionGraph } from "./components/ContributionGraph/ContributionGraph.js";
21
+ import { DateInput } from "./components/DateInput/DateInput.js";
22
+ import { DatePicker } from "./components/DatePicker/DatePicker.js";
23
+ import { Dialog } from "./components/Dialog/Dialog.js";
24
+ import { Divider } from "./components/Divider/Divider.js";
25
+ import { Drawer } from "./components/Drawer/Drawer.js";
26
+ import { Dropdown } from "./components/Dropdown/Dropdown.js";
27
+ import { DropdownMenu } from "./components/DropdownMenu/DropdownMenu.js";
28
+ import { EmptyState } from "./components/EmptyState/EmptyState.js";
29
+ import { EntityCard } from "./components/EntityCard/EntityCard.js";
30
+ import { Figure } from "./components/Figure/Figure.js";
31
+ import { FileInput } from "./components/FileInput/FileInput.js";
32
+ import { Input } from "./components/Input/Input.js";
33
+ import { Instructions } from "./components/Instructions/Instructions.js";
34
+ import { LinkList } from "./components/LinkList/LinkList.js";
35
+ import { Nav } from "./components/Nav/Nav.js";
36
+ import { Pagination } from "./components/Pagination/Pagination.js";
37
+ import { Popover } from "./components/Popover/Popover.js";
38
+ import { ProgressBar } from "./components/ProgressBar/ProgressBar.js";
39
+ import { Quote } from "./components/Quote/Quote.js";
40
+ import { RadioButton, RadioGroup } from "./components/RadioButton/RadioButton.js";
41
+ import { SectionTitle } from "./components/SectionTitle/SectionTitle.js";
42
+ import { SegmentedControl } from "./components/SegmentedControl/SegmentedControl.js";
43
+ import { SelectionCard } from "./components/SelectionCard/SelectionCard.js";
44
+ import { Skeleton } from "./components/Skeleton/Skeleton.js";
45
+ import { Slider } from "./components/Slider/Slider.js";
46
+ import { Spinner } from "./components/Spinner/Spinner.js";
47
+ import { Stat } from "./components/Stat/Stat.js";
48
+ import { Table } from "./components/Table/Table.js";
49
+ import { Tabs } from "./components/Tabs/Tabs.js";
50
+ import { Textarea } from "./components/Textarea/Textarea.js";
51
+ import { Timeline } from "./components/Timeline/Timeline.js";
52
+ import { Toast, ToastProvider, useToast } from "./components/Toast/Toast.js";
53
+ import { ToggleGroup } from "./components/ToggleGroup/ToggleGroup.js";
54
+ import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
55
+ import { Tooltip } from "./components/Tooltip/Tooltip.js";
56
+ import { COMPONENT_COUNT, componentRegistry } from "./components/registry.js";
57
+ import { TOKEN_COUNT, TOKEN_COUNTS, tokenRegistry } from "./tokens/registry.js";
58
+ export {
59
+ Accordion,
60
+ Alert,
61
+ AlertDialog,
62
+ AppLayout,
63
+ AppSidebar,
64
+ Avatar,
65
+ Badge,
66
+ Breadcrumb,
67
+ Button,
68
+ ButtonGroup,
69
+ COMPONENT_COUNT,
70
+ Card,
71
+ Carousel,
72
+ Checkbox,
73
+ CheckboxGroup,
74
+ Chip,
75
+ CircularButton,
76
+ CodeBlock,
77
+ Combobox,
78
+ CommandPalette,
79
+ ContactCard,
80
+ ContributionGraph,
81
+ DateInput,
82
+ DatePicker,
83
+ Dialog,
84
+ Divider,
85
+ Drawer,
86
+ Dropdown,
87
+ DropdownMenu,
88
+ EmptyState,
89
+ EntityCard,
90
+ Figure,
91
+ FileInput,
92
+ Input,
93
+ Instructions,
94
+ LinkList,
95
+ Nav,
96
+ Pagination,
97
+ Popover,
98
+ ProgressBar,
99
+ Quote,
100
+ RadioButton,
101
+ RadioGroup,
102
+ SectionTitle,
103
+ SegmentedControl,
104
+ SelectionCard,
105
+ Skeleton,
106
+ Slider,
107
+ Spinner,
108
+ Stat,
109
+ TOKEN_COUNT,
110
+ TOKEN_COUNTS,
111
+ Table,
112
+ Tabs,
113
+ Textarea,
114
+ Timeline,
115
+ Toast,
116
+ ToastProvider,
117
+ ToggleGroup,
118
+ ToggleSwitch,
119
+ Tooltip,
120
+ componentRegistry,
121
+ tokenRegistry,
122
+ useToast
123
+ };
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@robr0/design-system",
3
+ "version": "0.1.0",
4
+ "description": "A token-driven React design system — accessible components, light/dark theming, and CSS-variable customization.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/robritacca-dotcom/design-system.git"
9
+ },
10
+ "homepage": "https://www.robertritacca.com",
11
+ "keywords": [
12
+ "react",
13
+ "design-system",
14
+ "component-library",
15
+ "design-tokens",
16
+ "css-variables",
17
+ "dark-mode",
18
+ "typescript"
19
+ ],
20
+ "type": "module",
21
+ "sideEffects": [
22
+ "**/*.css"
23
+ ],
24
+ "exports": {
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "import": "./index.js"
28
+ },
29
+ "./charts": {
30
+ "types": "./charts.d.ts",
31
+ "import": "./charts.js"
32
+ },
33
+ "./components/registry": {
34
+ "types": "./components/registry.d.ts",
35
+ "import": "./components/registry.js"
36
+ },
37
+ "./components/Avatar/demoAvatars": {
38
+ "types": "./components/Avatar/demoAvatars.d.ts",
39
+ "import": "./components/Avatar/demoAvatars.js"
40
+ },
41
+ "./tokens/registry": {
42
+ "types": "./tokens/registry.d.ts",
43
+ "import": "./tokens/registry.js"
44
+ },
45
+ "./components/*": {
46
+ "types": "./components/*.d.ts",
47
+ "import": "./components/*.js"
48
+ },
49
+ "./tokens/*.css": "./tokens/*.css",
50
+ "./fonts/*": "./fonts/*",
51
+ "./package.json": "./package.json"
52
+ },
53
+ "peerDependencies": {
54
+ "react": "^19.0.0",
55
+ "react-dom": "^19.0.0",
56
+ "recharts": "^3.0.0"
57
+ },
58
+ "peerDependenciesMeta": {
59
+ "recharts": {
60
+ "optional": true
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * TOKEN REGISTRY — the single source of truth for the semantic-token
3
+ * count.
4
+ *
5
+ * registry.json is GENERATED from the semantic token CSS
6
+ * (tokens-light.css + tokens-typography.css + tokens-motion.css) by
7
+ * scripts/generate-token-registry.mjs, and
8
+ * scripts/validate-token-registry.mjs re-checks it (plus light/dark
9
+ * colour parity) on every build — library, Storybook, and website —
10
+ * so the counts here cannot silently drift from the CSS.
11
+ *
12
+ * Anywhere a token count is displayed — case studies, foundations
13
+ * pages, Storybook docs — import TOKEN_COUNT / TOKEN_COUNTS from here.
14
+ * Never hardcode the number.
15
+ */
16
+ export type TokenCategory = 'colour' | 'typography' | 'spacing' | 'radius' | 'border' | 'shadow' | 'icons' | 'motion';
17
+ /** Semantic token names, grouped by category. */
18
+ export declare const tokenRegistry: Record<TokenCategory, readonly string[]>;
19
+ /** Semantic-token count per category. */
20
+ export declare const TOKEN_COUNTS: Record<TokenCategory, number>;
21
+ /** The official semantic-token count. */
22
+ export declare const TOKEN_COUNT: number;
@@ -0,0 +1,14 @@
1
+ import registry from "./registry.json.js";
2
+ const tokenRegistry = registry.categories;
3
+ const TOKEN_COUNTS = Object.fromEntries(
4
+ Object.entries(tokenRegistry).map(([category, names]) => [category, names.length])
5
+ );
6
+ const TOKEN_COUNT = Object.values(TOKEN_COUNTS).reduce(
7
+ (sum, count) => sum + count,
8
+ 0
9
+ );
10
+ export {
11
+ TOKEN_COUNT,
12
+ TOKEN_COUNTS,
13
+ tokenRegistry
14
+ };