@cognite/aura 0.1.7 → 0.2.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 (61) hide show
  1. package/DESIGN.md +34 -92
  2. package/README.md +3 -3
  3. package/dist/colors.css +441 -214
  4. package/dist/components/index.d.ts +15 -1
  5. package/dist/components/index.js +345 -275
  6. package/dist/components/ui/core/accordion/accordion.js +22 -22
  7. package/dist/components/ui/core/alert/alert.d.ts +1 -1
  8. package/dist/components/ui/core/avatar/avatar.js +10 -10
  9. package/dist/components/ui/core/badge/badge.d.ts +2 -2
  10. package/dist/components/ui/core/badge/badge.js +13 -13
  11. package/dist/components/ui/core/banner/banner.d.ts +4 -4
  12. package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +11 -0
  13. package/dist/components/ui/core/breadcrumb/breadcrumb.js +190 -0
  14. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +2 -0
  15. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +9 -0
  16. package/dist/components/ui/core/button/button.d.ts +1 -1
  17. package/dist/components/ui/core/card/card.d.ts +7 -4
  18. package/dist/components/ui/core/card/card.js +131 -87
  19. package/dist/components/ui/core/card/card.metadata.js +1 -1
  20. package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -0
  21. package/dist/components/ui/core/checkbox/checkbox.js +129 -0
  22. package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +2 -0
  23. package/dist/components/ui/core/checkbox/checkbox.metadata.js +8 -0
  24. package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
  25. package/dist/components/ui/core/command/command.d.ts +2 -2
  26. package/dist/components/ui/core/count/count.d.ts +8 -0
  27. package/dist/components/ui/core/count/count.js +32 -0
  28. package/dist/components/ui/core/inline-citation/inline-citation.js +8 -8
  29. package/dist/components/ui/core/input-group/input-group.d.ts +1 -1
  30. package/dist/components/ui/core/kbd/kbd.d.ts +3 -0
  31. package/dist/components/ui/core/kbd/kbd.js +36 -0
  32. package/dist/components/ui/core/kbd/kbd.metadata.d.ts +2 -0
  33. package/dist/components/ui/core/kbd/kbd.metadata.js +9 -0
  34. package/dist/components/ui/core/loader/loader.d.ts +9 -1
  35. package/dist/components/ui/core/loader/loader.js +106 -107
  36. package/dist/components/ui/core/loader/loader.metadata.js +2 -2
  37. package/dist/components/ui/core/popover/popover.d.ts +1 -1
  38. package/dist/components/ui/core/prompt-input/prompt-input.d.ts +1 -1
  39. package/dist/components/ui/core/radio-group/radio-group.d.ts +16 -0
  40. package/dist/components/ui/core/radio-group/radio-group.js +110 -0
  41. package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +2 -0
  42. package/dist/components/ui/core/radio-group/radio-group.metadata.js +9 -0
  43. package/dist/components/ui/core/segmented-control/segmented-control.d.ts +16 -0
  44. package/dist/components/ui/core/segmented-control/segmented-control.js +169 -0
  45. package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +3 -0
  46. package/dist/components/ui/core/sonner-toast/sonner-toast.js +48 -0
  47. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +2 -0
  48. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +9 -0
  49. package/dist/components/ui/core/tabs/tabs.d.ts +23 -0
  50. package/dist/components/ui/core/tabs/tabs.js +222 -0
  51. package/dist/components/ui/core/tabs/tabs.utils.d.ts +2 -0
  52. package/dist/components/ui/core/tabs/tabs.utils.js +9 -0
  53. package/dist/components/ui/core/topbar/topbar.d.ts +30 -0
  54. package/dist/components/ui/core/topbar/topbar.js +190 -0
  55. package/dist/index.d.ts +1 -1
  56. package/dist/index.js +314 -255
  57. package/dist/lib/utils.d.ts +11 -0
  58. package/dist/lib/utils.js +40 -29
  59. package/dist/styles.css +1 -1
  60. package/dist/styles.source.css +66 -7
  61. package/package.json +5 -5
@@ -60,21 +60,21 @@
60
60
  0 1px 3px 0 var(--effect-shadow-md), 0 1px 2px 0 var(--effect-shadow-sm);
61
61
  /* menus; popovers; hover cards */
62
62
  --shadow-md:
63
- 0 4px 6px -1px var(--effect-shadow-md),
64
- 0 2px 4px -1px var(--effect-shadow-sm);
63
+ 0 4px 6px -1px var(--effect-shadow-lg),
64
+ 0 2px 4px -1px var(--effect-shadow-md);
65
65
  /* sonner; temporary elements */
66
66
  --shadow-lg:
67
- 0 10px 15px -3px var(--effect-shadow-lg),
68
- 0 4px 6px -2px var(--effect-shadow-sm);
67
+ 0 10px 15px -3px var(--effect-shadow-xl),
68
+ 0 4px 6px -2px var(--effect-shadow-lg);
69
69
  /* modals; dialogs without backdrop overlay */
70
70
  --shadow-xl:
71
71
  0 20px 25px -5px var(--effect-shadow-xl),
72
72
  0 10px 10px -5px var(--effect-shadow-lg);
73
73
  /* modals; dialogs with backdrop overlay */
74
- --shadow-focus-ring: 0 0 0 2px var(--ring), 0 0 0 4px var(--ring-muted);
75
- /* default focus ring: inner border (2px dark) + outer glow (4px light, 2px visible beyond inner) */
74
+ --shadow-focus-ring: 0 0 0 1px var(--ring), 0 0 0 3px var(--ring-muted);
75
+ /* default focus ring: inner border (1px dark) + outer glow (3px light, 2px visible beyond inner) */
76
76
  --shadow-focus-ring-destructive:
77
- 0 0 0 2px var(--ring-critical), 0 0 0 4px var(--ring-critical-shadow);
77
+ 0 0 0 1px var(--ring-destructive), 0 0 0 3px var(--ring-destructive-muted);
78
78
 
79
79
  --radius-none: 0px;
80
80
  --radius-xs: 2px;
@@ -108,6 +108,12 @@
108
108
  --drawer-max-height: 80vh;
109
109
  /* Maximum height for top/bottom drawers */
110
110
 
111
+ /* Effect tokens are not generated from the Figma colour sync. */
112
+ --effect-shadow-sm: rgba(0, 0, 0, 0.04);
113
+ --effect-shadow-md: rgba(0, 0, 0, 0.05);
114
+ --effect-shadow-lg: rgba(0, 0, 0, 0.06);
115
+ --effect-shadow-xl: rgba(0, 0, 0, 0.1);
116
+
111
117
  /* Gradient tokens */
112
118
  --gradient-nordic: linear-gradient(
113
119
  -100deg,
@@ -155,6 +161,11 @@
155
161
  }
156
162
 
157
163
  .dark {
164
+ --effect-shadow-sm: rgba(0, 0, 0, 0.2);
165
+ --effect-shadow-md: rgba(0, 0, 0, 0.302);
166
+ --effect-shadow-lg: rgba(0, 0, 0, 0.4);
167
+ --effect-shadow-xl: rgba(0, 0, 0, 0.6);
168
+
158
169
  /* Gradient tokens */
159
170
  --gradient-nordic: linear-gradient(
160
171
  -100deg,
@@ -212,6 +223,54 @@
212
223
  }
213
224
 
214
225
  @layer utilities {
226
+ @keyframes aura-loader-rect-1-animation {
227
+ 0% {
228
+ stroke-dashoffset: 172;
229
+ }
230
+
231
+ 50% {
232
+ stroke-dashoffset: 422;
233
+ }
234
+
235
+ 100% {
236
+ stroke-dashoffset: 422;
237
+ }
238
+ }
239
+
240
+ @keyframes aura-loader-rect-2-animation {
241
+ 0% {
242
+ stroke-dashoffset: 422;
243
+ }
244
+
245
+ 50% {
246
+ stroke-dashoffset: 172;
247
+ }
248
+
249
+ 100% {
250
+ stroke-dashoffset: 172;
251
+ }
252
+ }
253
+
254
+ .aura-loader-rect {
255
+ stroke-dasharray: 97.95 152;
256
+ }
257
+
258
+ .aura-loader-rect-1 {
259
+ animation: aura-loader-rect-1-animation 2s ease-in-out infinite;
260
+ stroke-dashoffset: 172;
261
+ }
262
+
263
+ .aura-loader-rect-2 {
264
+ animation: aura-loader-rect-2-animation 2s 0.5s ease-in-out infinite;
265
+ stroke-dashoffset: 422;
266
+ }
267
+
268
+ @media (prefers-reduced-motion: reduce) {
269
+ [data-slot='loader-rect'] {
270
+ animation: none;
271
+ }
272
+ }
273
+
215
274
  [data-state='closed'] {
216
275
  --tw-animation-fill-mode: forwards;
217
276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/aura",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./components": {
@@ -45,13 +45,13 @@
45
45
  "cmdk": "^1.1.1",
46
46
  "framer-motion": "^11.0.3",
47
47
  "shiki": "^3.19.0",
48
+ "sonner": "^2.0.7",
48
49
  "streamdown": "^2.4.0",
49
50
  "tailwind-merge": "^3.4.0",
50
51
  "tw-animate-css": "^1.4.0"
51
52
  },
52
53
  "devDependencies": {
53
54
  "@chromatic-com/storybook": "^5.1.2",
54
- "@google/design.md": "0.1.1",
55
55
  "@storybook/addon-coverage": "^3.0.1",
56
56
  "@storybook/addon-docs": "10.3.5",
57
57
  "@storybook/addon-vitest": "10.3.5",
@@ -63,8 +63,8 @@
63
63
  "@types/react": "18.3.14",
64
64
  "@types/react-dom": "18.3.2",
65
65
  "@vitejs/plugin-react": "^5.1.4",
66
- "@vitest/browser": "^4.0.18",
67
- "@vitest/browser-playwright": "^4.0.18",
66
+ "@vitest/browser": "^4.1.6",
67
+ "@vitest/browser-playwright": "^4.1.6",
68
68
  "eslint-plugin-check-file": "^2.7.1",
69
69
  "react-dom": "^18.3.1",
70
70
  "rollup": "^4.59.0",
@@ -74,7 +74,7 @@
74
74
  "typescript-eslint": "^8.57.1",
75
75
  "vite": "7.3.2",
76
76
  "vite-plugin-dts": "^4.5.4",
77
- "vitest": "^4.0.18"
77
+ "vitest": "^4.1.6"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "eslint": "9.39.4",