@olympusoss/canvas 2.20.2 → 3.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 (214) hide show
  1. package/README.md +69 -35
  2. package/package.json +45 -177
  3. package/src/cn.ts +3 -0
  4. package/src/index.ts +12 -603
  5. package/src/theme.ts +62 -0
  6. package/src/tokens.ts +11 -0
  7. package/styles/base.css +17 -0
  8. package/styles/canvas.css +77 -52
  9. package/styles/components/alert.css +66 -0
  10. package/styles/components/app-shell.css +46 -0
  11. package/styles/components/avatar.css +22 -0
  12. package/styles/components/badge.css +83 -0
  13. package/styles/components/breadcrumb.css +35 -0
  14. package/styles/components/button-group.css +23 -0
  15. package/styles/components/button.css +107 -0
  16. package/styles/components/calendar.css +73 -0
  17. package/styles/components/card.css +58 -0
  18. package/styles/components/checkbox.css +55 -0
  19. package/styles/components/code-block.css +18 -0
  20. package/styles/components/combobox.css +75 -0
  21. package/styles/components/command.css +94 -0
  22. package/styles/components/data-table.css +142 -0
  23. package/styles/components/dialog.css +72 -0
  24. package/styles/components/dropdown.css +54 -0
  25. package/styles/components/empty-state.css +17 -0
  26. package/styles/components/field.css +27 -0
  27. package/styles/components/filter-panel.css +58 -0
  28. package/styles/components/form.css +27 -0
  29. package/styles/components/icon.css +8 -0
  30. package/styles/components/input-group.css +45 -0
  31. package/styles/components/input.css +56 -0
  32. package/styles/components/kbd.css +15 -0
  33. package/styles/components/page-header.css +52 -0
  34. package/styles/components/pagination.css +48 -0
  35. package/styles/components/popover.css +14 -0
  36. package/styles/components/radio.css +28 -0
  37. package/styles/components/row-menu.css +69 -0
  38. package/styles/components/section-card.css +49 -0
  39. package/styles/components/select.css +57 -0
  40. package/styles/components/separator.css +32 -0
  41. package/styles/components/sheet.css +70 -0
  42. package/styles/components/sidebar.css +146 -0
  43. package/styles/components/skeleton.css +32 -0
  44. package/styles/components/spinner.css +26 -0
  45. package/styles/components/stat-card.css +71 -0
  46. package/styles/components/stepper.css +63 -0
  47. package/styles/components/switch.css +45 -0
  48. package/styles/components/tabs.css +40 -0
  49. package/styles/components/textarea.css +31 -0
  50. package/styles/components/toast.css +95 -0
  51. package/styles/components/tooltip.css +53 -0
  52. package/styles/components/topbar.css +24 -0
  53. package/styles/components/typography.css +105 -0
  54. package/styles/patterns/backdrops.css +35 -0
  55. package/styles/patterns/density.css +66 -0
  56. package/styles/patterns/focus.css +22 -0
  57. package/styles/patterns/glass.css +85 -0
  58. package/styles/patterns/high-contrast.css +70 -0
  59. package/styles/patterns/reduced-motion.css +12 -0
  60. package/styles/patterns/scrollbar.css +10 -0
  61. package/styles/reset.css +89 -0
  62. package/styles/tokens/colors.css +106 -0
  63. package/styles/tokens/motion.css +33 -0
  64. package/styles/tokens/radius.css +10 -0
  65. package/styles/tokens/shadows.css +35 -0
  66. package/styles/tokens/spacing.css +19 -0
  67. package/styles/tokens/typography.css +6 -0
  68. package/styles/tokens/z-index.css +12 -0
  69. package/styles/utilities/display.css +66 -0
  70. package/styles/utilities/flexbox.css +240 -0
  71. package/styles/utilities/gap.css +288 -0
  72. package/styles/utilities/grid.css +138 -0
  73. package/styles/utilities/position.css +78 -0
  74. package/styles/utilities/sizing.css +138 -0
  75. package/tsconfig.json +20 -21
  76. package/src/components/atoms/README.md +0 -11
  77. package/src/components/atoms/aspect-ratio.tsx +0 -32
  78. package/src/components/atoms/avatar.tsx +0 -98
  79. package/src/components/atoms/badge.tsx +0 -44
  80. package/src/components/atoms/brand-mark.tsx +0 -74
  81. package/src/components/atoms/button.tsx +0 -105
  82. package/src/components/atoms/checkbox.tsx +0 -63
  83. package/src/components/atoms/flex-box.tsx +0 -105
  84. package/src/components/atoms/icon.tsx +0 -34
  85. package/src/components/atoms/input.tsx +0 -92
  86. package/src/components/atoms/label.tsx +0 -41
  87. package/src/components/atoms/logo.tsx +0 -89
  88. package/src/components/atoms/progress.tsx +0 -55
  89. package/src/components/atoms/radio-group.tsx +0 -122
  90. package/src/components/atoms/scroll-area.tsx +0 -106
  91. package/src/components/atoms/section.tsx +0 -48
  92. package/src/components/atoms/separator.tsx +0 -45
  93. package/src/components/atoms/skeleton.tsx +0 -17
  94. package/src/components/atoms/slider.tsx +0 -93
  95. package/src/components/atoms/spinner.tsx +0 -47
  96. package/src/components/atoms/switch.tsx +0 -60
  97. package/src/components/atoms/textarea.tsx +0 -78
  98. package/src/components/atoms/toggle.tsx +0 -80
  99. package/src/components/charts/activity-heatmap.tsx +0 -186
  100. package/src/components/charts/axes.tsx +0 -21
  101. package/src/components/charts/chart-container.tsx +0 -254
  102. package/src/components/charts/chart-legend.tsx +0 -67
  103. package/src/components/charts/chart-tooltip.tsx +0 -161
  104. package/src/components/charts/chart-types.tsx +0 -49
  105. package/src/components/charts/containers.tsx +0 -11
  106. package/src/components/charts/data.tsx +0 -16
  107. package/src/components/charts/details.tsx +0 -25
  108. package/src/components/charts/dot-pulse.tsx +0 -61
  109. package/src/components/charts/gauge.tsx +0 -106
  110. package/src/components/charts/grids.tsx +0 -8
  111. package/src/components/charts/index.ts +0 -62
  112. package/src/components/charts/labeled-bar-list.tsx +0 -85
  113. package/src/components/charts/metric-breakdown.tsx +0 -316
  114. package/src/components/charts/references.tsx +0 -8
  115. package/src/components/charts/service-health-list.tsx +0 -85
  116. package/src/components/charts/sparkline-area.tsx +0 -80
  117. package/src/components/charts/sparkline.tsx +0 -52
  118. package/src/components/charts/stacked-bar.tsx +0 -104
  119. package/src/components/charts/text.tsx +0 -10
  120. package/src/components/charts/world-heat-map-inner.tsx +0 -317
  121. package/src/components/charts/world-heat-map.tsx +0 -184
  122. package/src/components/molecules/README.md +0 -12
  123. package/src/components/molecules/action-bar.tsx +0 -73
  124. package/src/components/molecules/activity-item.tsx +0 -74
  125. package/src/components/molecules/alert.tsx +0 -86
  126. package/src/components/molecules/animated-background.tsx +0 -92
  127. package/src/components/molecules/auth-shell.tsx +0 -95
  128. package/src/components/molecules/brand-lockup.tsx +0 -48
  129. package/src/components/molecules/breadcrumb.tsx +0 -157
  130. package/src/components/molecules/button-group.tsx +0 -104
  131. package/src/components/molecules/calendar.tsx +0 -217
  132. package/src/components/molecules/card.tsx +0 -102
  133. package/src/components/molecules/client-brand.tsx +0 -95
  134. package/src/components/molecules/code-block.tsx +0 -86
  135. package/src/components/molecules/countdown-button.tsx +0 -92
  136. package/src/components/molecules/empty-state.tsx +0 -56
  137. package/src/components/molecules/error-state.tsx +0 -42
  138. package/src/components/molecules/field-display.tsx +0 -35
  139. package/src/components/molecules/input-otp.tsx +0 -74
  140. package/src/components/molecules/launcher-card.tsx +0 -152
  141. package/src/components/molecules/loading-state.tsx +0 -36
  142. package/src/components/molecules/notification-item.tsx +0 -67
  143. package/src/components/molecules/notification-list.tsx +0 -45
  144. package/src/components/molecules/number-badge.tsx +0 -53
  145. package/src/components/molecules/or-separator.tsx +0 -38
  146. package/src/components/molecules/page-header.tsx +0 -88
  147. package/src/components/molecules/page-tabs.tsx +0 -94
  148. package/src/components/molecules/pagination.tsx +0 -150
  149. package/src/components/molecules/password-input.tsx +0 -83
  150. package/src/components/molecules/password-strength-meter.tsx +0 -104
  151. package/src/components/molecules/phone-input.tsx +0 -200
  152. package/src/components/molecules/search-bar.tsx +0 -64
  153. package/src/components/molecules/secret-field.tsx +0 -158
  154. package/src/components/molecules/section-card.tsx +0 -91
  155. package/src/components/molecules/social-buttons.tsx +0 -165
  156. package/src/components/molecules/stat-card.tsx +0 -100
  157. package/src/components/molecules/status-badge.tsx +0 -42
  158. package/src/components/molecules/stepper.tsx +0 -96
  159. package/src/components/molecules/table.tsx +0 -157
  160. package/src/components/molecules/terminal.tsx +0 -74
  161. package/src/components/molecules/toggle-group.tsx +0 -145
  162. package/src/components/molecules/tooltip.tsx +0 -155
  163. package/src/components/molecules/user-avatar-chip.tsx +0 -71
  164. package/src/components/organisms/README.md +0 -14
  165. package/src/components/organisms/accordion.tsx +0 -154
  166. package/src/components/organisms/alert-dialog.tsx +0 -277
  167. package/src/components/organisms/carousel.tsx +0 -244
  168. package/src/components/organisms/collapsible.tsx +0 -69
  169. package/src/components/organisms/command.tsx +0 -144
  170. package/src/components/organisms/context-menu.tsx +0 -339
  171. package/src/components/organisms/dashboard-grid.tsx +0 -369
  172. package/src/components/organisms/data-table.tsx +0 -330
  173. package/src/components/organisms/dialog.tsx +0 -312
  174. package/src/components/organisms/drawer.tsx +0 -123
  175. package/src/components/organisms/dropdown-menu.tsx +0 -440
  176. package/src/components/organisms/editors/code-editor.tsx +0 -144
  177. package/src/components/organisms/editors/index.ts +0 -4
  178. package/src/components/organisms/editors/markdown-editor.tsx +0 -153
  179. package/src/components/organisms/editors/markdown-renderer.ts +0 -27
  180. package/src/components/organisms/editors/prose-canvas-classes.ts +0 -45
  181. package/src/components/organisms/editors/rich-text-editor.tsx +0 -126
  182. package/src/components/organisms/editors/toolbar/md-toolbar.tsx +0 -129
  183. package/src/components/organisms/editors/toolbar/rte-toolbar.tsx +0 -211
  184. package/src/components/organisms/editors/toolbar/toolbar-shell.tsx +0 -45
  185. package/src/components/organisms/editors/use-codemirror-theme.ts +0 -61
  186. package/src/components/organisms/error-boundary.tsx +0 -61
  187. package/src/components/organisms/form.tsx +0 -174
  188. package/src/components/organisms/hover-card.tsx +0 -115
  189. package/src/components/organisms/menubar.tsx +0 -498
  190. package/src/components/organisms/navbar.tsx +0 -104
  191. package/src/components/organisms/navigation-menu.tsx +0 -235
  192. package/src/components/organisms/popover.tsx +0 -149
  193. package/src/components/organisms/resizable.tsx +0 -58
  194. package/src/components/organisms/schema-form.tsx +0 -232
  195. package/src/components/organisms/select.tsx +0 -309
  196. package/src/components/organisms/sheet.tsx +0 -265
  197. package/src/components/organisms/sidebar.tsx +0 -1040
  198. package/src/components/organisms/sonner.tsx +0 -96
  199. package/src/components/organisms/tabs.tsx +0 -133
  200. package/src/components/organisms/theme-provider.tsx +0 -101
  201. package/src/hooks/use-mobile.tsx +0 -19
  202. package/src/lib/portal-container.tsx +0 -35
  203. package/src/lib/utils.ts +0 -6
  204. package/src/native.ts +0 -23
  205. package/src/tokens/colors.ts +0 -91
  206. package/src/tokens/index.ts +0 -3
  207. package/src/tokens/spacing.ts +0 -55
  208. package/src/tokens/typography.ts +0 -27
  209. package/styles/dashboard-grid.css +0 -47
  210. package/styles/fonts/Roboto-VariableFont_wdth_wght.ttf +0 -0
  211. package/styles/glass.css +0 -175
  212. package/styles/leaflet.css +0 -13
  213. package/styles/tokens.css +0 -317
  214. package/tailwind.config.ts +0 -70
package/README.md CHANGED
@@ -1,60 +1,94 @@
1
1
  # @olympusoss/canvas
2
2
 
3
- The Olympus design system a React + Tailwind component library used by every Olympus app (Athena, Hera, Daedalus, …). Built on top of Radix primitives, Lucide icons, and Tailwind v4.
4
-
5
- **Source-only package.** Ships TypeScript source via `main: ./src/index.ts` rather than a built bundle, so consumers tree-shake what they actually use and get accurate types from the source.
3
+ CSS-first design system for the Olympus platform.
6
4
 
7
5
  ## Install
8
6
 
9
- ```sh
7
+ ```bash
10
8
  npm install @olympusoss/canvas
11
- # peers
12
- npm install react react-dom
13
9
  ```
14
10
 
15
- Optional peers (only install if you use the related components):
11
+ ## Quick Start
12
+
13
+ Import all styles:
16
14
 
17
- ```sh
18
- npm install @rjsf/core @rjsf/utils @rjsf/validator-ajv8 # SchemaForm
19
- npm install libphonenumber-js # PhoneInput
15
+ ```css
16
+ @import "@olympusoss/canvas/styles/canvas.css";
20
17
  ```
21
18
 
22
- ## Quick start
19
+ Or import selectively:
23
20
 
24
- ```tsx
25
- import "@olympusoss/canvas/styles/tokens.css";
26
- import { Button, Icon } from "@olympusoss/canvas";
21
+ ```css
22
+ @layer canvas.reset, canvas.tokens, canvas.base, canvas.components, canvas.patterns;
27
23
 
28
- export default function App() {
29
- return (
30
- <Button variant="default" size="sm">
31
- <Icon name="Plus" />
32
- New identity
33
- </Button>
34
- );
35
- }
24
+ @import "@olympusoss/canvas/styles/reset.css";
25
+ @import "@olympusoss/canvas/styles/tokens/colors.css";
26
+ @import "@olympusoss/canvas/styles/tokens/typography.css";
27
+ @import "@olympusoss/canvas/styles/base.css";
28
+ @import "@olympusoss/canvas/styles/components/button.css";
36
29
  ```
37
30
 
38
- Tailwind v4 setup (in your app's CSS entrypoint):
31
+ Use component classes in your HTML:
39
32
 
40
- ```css
41
- @import "tailwindcss";
42
- @source "../node_modules/@olympusoss/canvas/src/**/*.{ts,tsx}";
33
+ ```html
34
+ <button class="btn btn-default">Save</button>
35
+ <button class="btn btn-outline btn-sm">Cancel</button>
36
+ <input class="input" placeholder="Search..." />
43
37
  ```
44
38
 
45
- That `@source` directive tells Tailwind to scan Canvas's source files so utility classes used by Canvas components are included in your build.
39
+ ## Theming
40
+
41
+ Toggle themes with HTML attributes:
42
+
43
+ ```html
44
+ <!-- Dark mode -->
45
+ <html class="dark">
46
+
47
+ <!-- Glass surface -->
48
+ <html data-surface="glass">
49
+
50
+ <!-- Compact density -->
51
+ <html data-density="compact">
52
+ ```
53
+
54
+ Or use the JS utilities:
55
+
56
+ ```js
57
+ import { setTheme, toggleTheme, setSurface, setDensity } from "@olympusoss/canvas";
58
+
59
+ toggleTheme(); // switches between light/dark
60
+ setSurface("glass"); // enables glass surface
61
+ setDensity("compact"); // switches to compact density
62
+ ```
63
+
64
+ ## What's Included
65
+
66
+ - **62 CSS files**: tokens, components, and patterns
67
+ - **4 JS utilities**: theme switching, token access, class composition
68
+ - **5 cascade layers**: reset, tokens, base, components, patterns
69
+ - **45 component styles**: buttons, cards, tables, forms, dialogs, and more
70
+ - **Light/dark mode**, glass surface, compact/comfy density
71
+ - **WCAG AA** color contrast compliance
72
+ - **prefers-reduced-motion** and **prefers-contrast** support
73
+
74
+ ## Documentation
46
75
 
47
- ## Components
76
+ - [Token Reference](docs/tokens.md)
77
+ - [Component Catalog](docs/components.md)
78
+ - [Theming Guide](docs/theming.md)
79
+ - [Migration Guide (v2 to v3)](docs/migration.md)
80
+ - [Consumer Integration](docs/integration.md)
81
+ - [Browser Support](docs/browser-support.md)
48
82
 
49
- - **Atoms** — Button, Input, Badge, Icon, Avatar, Switch, Slider, …
50
- - **Molecules** — PageHeader, StatCard, SectionCard, StatusBadge, FieldDisplay, EmptyState, DataTable's pieces, …
51
- - **Organisms** — DashboardGrid, DataTable, Sidebar, Dialog, Sheet, Drawer, Popover, Form, Tabs, CodeEditor, MarkdownEditor, RichTextEditor, …
52
- - **Charts** — Theme-aware Recharts wrappers + extras: Sparkline, Gauge, ActivityHeatmap, LabeledBarList, ServiceHealthList, StackedBar, WorldHeatMap, …
83
+ ## Framework Packages
53
84
 
54
- Browse the live docs for usage, props, and interactive examples for every component:
85
+ Canvas provides the CSS foundation. Framework-specific components live in dedicated packages:
55
86
 
56
- **https://olympusoss.github.io/canvas/**
87
+ - `@olympusoss/canvas-react`: React components for web
88
+ - `@olympusoss/canvas-react-native`: React Native components
89
+ - `@olympusoss/canvas-vue`: Vue components
90
+ - `@olympusoss/canvas-flux`: Flux components
57
91
 
58
92
  ## License
59
93
 
60
- MIT — see [LICENSE](./LICENSE) (or the `license` field in `package.json`).
94
+ MIT
package/package.json CHANGED
@@ -1,179 +1,47 @@
1
1
  {
2
- "name": "@olympusoss/canvas",
3
- "version": "2.20.2",
4
- "type": "module",
5
- "main": "./src/index.ts",
6
- "types": "./src/index.ts",
7
- "exports": {
8
- ".": {
9
- "react-native": "./src/native.ts",
10
- "types": "./src/index.ts",
11
- "default": "./src/index.ts"
12
- },
13
- "./tokens": {
14
- "types": "./src/tokens/index.ts",
15
- "default": "./src/tokens/index.ts"
16
- },
17
- "./styles/*": "./styles/*"
18
- },
19
- "files": [
20
- "src",
21
- "styles",
22
- "package.json",
23
- "tsconfig.json",
24
- "tailwind.config.ts"
25
- ],
26
- "sideEffects": [
27
- "*.css",
28
- "**/sonner.tsx",
29
- "**/theme-provider.tsx"
30
- ],
31
- "scripts": {
32
- "typecheck": "tsc --noEmit",
33
- "lint": "biome check",
34
- "lint:fix": "biome check --write",
35
- "format": "biome format --write .",
36
- "ci": "biome ci && tsc --noEmit && vitest run",
37
- "test": "vitest run",
38
- "test:watch": "vitest",
39
- "test:ui": "vitest --ui",
40
- "test:coverage": "vitest run --coverage",
41
- "snapshot-coverage": "node scripts/check-snapshot-coverage.mjs",
42
- "size": "size-limit",
43
- "size:why": "size-limit --why",
44
- "changeset": "changeset",
45
- "version-packages": "changeset version",
46
- "release": "changeset publish",
47
- "prepare": "husky"
48
- },
49
- "lint-staged": {
50
- "*.{ts,tsx,js,jsx,mjs,cjs,json,jsonc,md,css}": "biome check --write --no-errors-on-unmatched"
51
- },
52
- "publishConfig": {
53
- "registry": "https://registry.npmjs.org",
54
- "access": "public"
55
- },
56
- "peerDependencies": {
57
- "react": ">=18.0.0",
58
- "react-dom": ">=18.0.0",
59
- "@rjsf/core": "^6.0.0",
60
- "@rjsf/utils": "^6.0.0",
61
- "@rjsf/validator-ajv8": "^6.0.0",
62
- "libphonenumber-js": "^1.12.0"
63
- },
64
- "peerDependenciesMeta": {
65
- "@rjsf/core": {
66
- "optional": true
67
- },
68
- "@rjsf/utils": {
69
- "optional": true
70
- },
71
- "@rjsf/validator-ajv8": {
72
- "optional": true
73
- },
74
- "libphonenumber-js": {
75
- "optional": true
76
- }
77
- },
78
- "dependencies": {
79
- "@codemirror/commands": "^6.7.0",
80
- "@codemirror/lang-css": "^6.3.0",
81
- "@codemirror/lang-html": "^6.4.9",
82
- "@codemirror/lang-javascript": "^6.2.2",
83
- "@codemirror/lang-json": "^6.0.1",
84
- "@codemirror/lang-markdown": "^6.3.0",
85
- "@codemirror/language": "^6.10.3",
86
- "@codemirror/state": "^6.4.1",
87
- "@codemirror/view": "^6.34.1",
88
- "@hookform/resolvers": "^5.2.2",
89
- "@radix-ui/react-accordion": "^1.2.12",
90
- "@radix-ui/react-alert-dialog": "^1.1.15",
91
- "@radix-ui/react-aspect-ratio": "^1.1.8",
92
- "@radix-ui/react-avatar": "^1.1.11",
93
- "@radix-ui/react-checkbox": "^1.3.3",
94
- "@radix-ui/react-collapsible": "^1.1.12",
95
- "@radix-ui/react-context-menu": "^2.2.16",
96
- "@radix-ui/react-dialog": "^1.1.15",
97
- "@radix-ui/react-dropdown-menu": "^2.1.16",
98
- "@radix-ui/react-hover-card": "^1.1.15",
99
- "@radix-ui/react-label": "^2.1.8",
100
- "@radix-ui/react-menubar": "^1.1.16",
101
- "@radix-ui/react-navigation-menu": "^1.2.14",
102
- "@radix-ui/react-popover": "^1.1.15",
103
- "@radix-ui/react-progress": "^1.1.8",
104
- "@radix-ui/react-radio-group": "^1.3.8",
105
- "@radix-ui/react-scroll-area": "^1.2.10",
106
- "@radix-ui/react-select": "^2.2.6",
107
- "@radix-ui/react-separator": "^1.1.8",
108
- "@radix-ui/react-slider": "^1.3.6",
109
- "@radix-ui/react-slot": "^1.2.4",
110
- "@radix-ui/react-switch": "^1.2.6",
111
- "@radix-ui/react-tabs": "^1.1.13",
112
- "@radix-ui/react-toggle": "^1.1.10",
113
- "@radix-ui/react-toggle-group": "^1.1.11",
114
- "@radix-ui/react-tooltip": "^1.2.8",
115
- "@tanstack/react-table": "^8.21.3",
116
- "@tiptap/core": "^2.10.0",
117
- "@tiptap/extension-link": "^2.10.0",
118
- "@tiptap/extension-placeholder": "^2.10.0",
119
- "@tiptap/react": "^2.10.0",
120
- "@tiptap/starter-kit": "^2.10.0",
121
- "class-variance-authority": "^0.7.1",
122
- "clsx": "^2.1.1",
123
- "cmdk": "^1.1.1",
124
- "codemirror": "^6.0.1",
125
- "d3-geo": "^3.1.1",
126
- "date-fns": "^4.1.0",
127
- "dompurify": "^3.2.0",
128
- "embla-carousel-react": "^8.6.0",
129
- "input-otp": "^1.4.2",
130
- "leaflet": "^1.9.4",
131
- "lucide-react": "^1.8.0",
132
- "marked": "^15.0.0",
133
- "next-themes": "^0.4.6",
134
- "react-day-picker": "^9.14.0",
135
- "react-grid-layout": "1.5.3",
136
- "react-hook-form": "^7.72.1",
137
- "react-leaflet": "^5.0.0",
138
- "react-resizable-panels": "^4.10.0",
139
- "react-simple-maps": "^3.0.0",
140
- "recharts": "2.15.4",
141
- "sonner": "^2.0.7",
142
- "tailwind-merge": "^3.0.2",
143
- "vaul": "^1.1.2",
144
- "zod": "^4.3.6"
145
- },
146
- "devDependencies": {
147
- "@biomejs/biome": "^2.4.10",
148
- "@changesets/cli": "^2.31.0",
149
- "@rjsf/core": "^6.4.1",
150
- "@rjsf/utils": "^6.4.1",
151
- "@rjsf/validator-ajv8": "^6.3.1",
152
- "@size-limit/esbuild": "^12.1.0",
153
- "@size-limit/file": "^12.1.0",
154
- "@testing-library/jest-dom": "^6.9.1",
155
- "@testing-library/react": "^16.3.2",
156
- "@types/d3-geo": "^3.1.0",
157
- "@types/dompurify": "^3.0.5",
158
- "@types/leaflet": "^1.9.0",
159
- "@types/react": "^19.1.0",
160
- "@types/react-dom": "^19.1.0",
161
- "@types/react-grid-layout": "1.3.6",
162
- "@types/react-simple-maps": "^3.0.6",
163
- "@vitejs/plugin-react": "^6.0.1",
164
- "@vitest/coverage-v8": "^4.1.4",
165
- "@vitest/ui": "^4.1.4",
166
- "husky": "^9.1.7",
167
- "jsdom": "^29.0.2",
168
- "libphonenumber-js": "^1.12.0",
169
- "lint-staged": "^16.4.0",
170
- "react": "^19.1.0",
171
- "react-docgen-typescript": "^2.4.0",
172
- "react-dom": "^19.1.0",
173
- "size-limit": "^12.1.0",
174
- "tailwindcss": "^4.1.4",
175
- "typescript": "^5.8.3",
176
- "vitest": "^4.1.4",
177
- "vitest-axe": "^0.1.0"
178
- }
2
+ "name": "@olympusoss/canvas",
3
+ "version": "3.1.0",
4
+ "type": "module",
5
+ "description": "CSS-first design system for the Olympus platform",
6
+ "main": "./src/index.ts",
7
+ "types": "./src/index.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./src/index.ts",
11
+ "default": "./src/index.ts"
12
+ },
13
+ "./styles/*": "./styles/*"
14
+ },
15
+ "files": [
16
+ "src",
17
+ "styles",
18
+ "package.json",
19
+ "tsconfig.json"
20
+ ],
21
+ "sideEffects": [
22
+ "*.css"
23
+ ],
24
+ "scripts": {
25
+ "typecheck": "tsc --noEmit",
26
+ "generate-utilities": "bun scripts/generate-utilities.ts",
27
+ "validate-tokens": "bun scripts/validate-tokens.ts",
28
+ "check-size": "bun scripts/check-size.ts",
29
+ "check-duplicates": "bun scripts/check-duplicates.ts",
30
+ "check-contrast": "bun scripts/check-contrast.ts",
31
+ "screenshots": "bun scripts/capture-screenshots.ts",
32
+ "changeset": "changeset",
33
+ "version-packages": "changeset version",
34
+ "release": "changeset publish",
35
+ "docs:dev": "cd docs && npx vite",
36
+ "docs:build": "cd docs && npx vite build"
37
+ },
38
+ "publishConfig": {
39
+ "registry": "https://registry.npmjs.org",
40
+ "access": "public"
41
+ },
42
+ "devDependencies": {
43
+ "@changesets/cli": "^2.31.0",
44
+ "@playwright/test": "^1.60.0",
45
+ "typescript": "^5.8.3"
46
+ }
179
47
  }
package/src/cn.ts ADDED
@@ -0,0 +1,3 @@
1
+ export function cn(...inputs: (string | false | null | undefined)[]): string {
2
+ return inputs.filter(Boolean).join(" ");
3
+ }