@ryanhelsing/ry-ui 1.0.2 → 1.0.4

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 (59) hide show
  1. package/AGENT.md +460 -0
  2. package/AGENTS.md +57 -0
  3. package/README.md +45 -1
  4. package/dist/components/ry-button-group.d.ts +32 -0
  5. package/dist/components/ry-button-group.d.ts.map +1 -0
  6. package/dist/components/ry-carousel.d.ts +21 -0
  7. package/dist/components/ry-carousel.d.ts.map +1 -0
  8. package/dist/components/ry-feature.d.ts +21 -0
  9. package/dist/components/ry-feature.d.ts.map +1 -0
  10. package/dist/components/ry-field.d.ts +7 -1
  11. package/dist/components/ry-field.d.ts.map +1 -1
  12. package/dist/components/ry-hero.d.ts +16 -0
  13. package/dist/components/ry-hero.d.ts.map +1 -0
  14. package/dist/components/ry-number-select.d.ts.map +1 -1
  15. package/dist/components/ry-pricing.d.ts +21 -0
  16. package/dist/components/ry-pricing.d.ts.map +1 -0
  17. package/dist/components/ry-select.d.ts +8 -1
  18. package/dist/components/ry-select.d.ts.map +1 -1
  19. package/dist/components/ry-split.d.ts +28 -0
  20. package/dist/components/ry-split.d.ts.map +1 -0
  21. package/dist/components/ry-stat.d.ts +17 -0
  22. package/dist/components/ry-stat.d.ts.map +1 -0
  23. package/dist/components/ry-tag-input.d.ts +18 -0
  24. package/dist/components/ry-tag-input.d.ts.map +1 -0
  25. package/dist/components/ry-tag.d.ts +19 -0
  26. package/dist/components/ry-tag.d.ts.map +1 -0
  27. package/dist/core/ry-transform.d.ts.map +1 -1
  28. package/dist/css/ry-structure.css +739 -149
  29. package/dist/css/ry-theme.css +581 -180
  30. package/dist/css/ry-tokens.css +120 -24
  31. package/dist/css/ry-ui.css +4965 -1065
  32. package/dist/ry-ui.d.ts +9 -0
  33. package/dist/ry-ui.d.ts.map +1 -1
  34. package/dist/ry-ui.js +1309 -778
  35. package/dist/ry-ui.js.map +1 -1
  36. package/dist/themes/dark.css +7 -90
  37. package/dist/themes/light.css +6 -35
  38. package/dist/themes/ocean.css +22 -26
  39. package/docs/components/accordion.md +31 -0
  40. package/docs/components/button-group.md +36 -0
  41. package/docs/components/button.md +65 -0
  42. package/docs/components/color.md +84 -0
  43. package/docs/components/display.md +69 -0
  44. package/docs/components/drawer.md +36 -0
  45. package/docs/components/dropdown.md +33 -0
  46. package/docs/components/forms.md +90 -0
  47. package/docs/components/knob.md +42 -0
  48. package/docs/components/layout.md +217 -0
  49. package/docs/components/modal.md +38 -0
  50. package/docs/components/number-select.md +42 -0
  51. package/docs/components/slider.md +48 -0
  52. package/docs/components/tabs.md +30 -0
  53. package/docs/components/theme-toggle.md +36 -0
  54. package/docs/components/toast.md +27 -0
  55. package/docs/components/tooltip.md +14 -0
  56. package/docs/components/tree.md +46 -0
  57. package/docs/theming.md +182 -0
  58. package/package.json +8 -4
  59. package/USING_CDN.md +0 -591
@@ -2,46 +2,134 @@
2
2
  * ry-ui Design Tokens
3
3
  *
4
4
  * These CSS custom properties define the visual language.
5
+ * color-scheme: light dark enables OS preference detection.
6
+ * light-dark() embeds both values — no separate dark.css needed.
5
7
  * Override in your theme file to customize.
6
8
  */
7
9
 
10
+ /* ═══════════════════════════════════════════════════════════════
11
+ @property — typed custom properties for animation & type safety
12
+ ═══════════════════════════════════════════════════════════════ */
13
+
14
+ @property --ry-color-primary { syntax: "<color>"; inherits: true; initial-value: oklch(0.623 0.188 259.8); }
15
+ @property --ry-color-primary-hover { syntax: "<color>"; inherits: true; initial-value: oklch(0.546 0.215 262.9); }
16
+ @property --ry-color-primary-active { syntax: "<color>"; inherits: true; initial-value: oklch(0.488 0.217 264.4); }
17
+ @property --ry-color-secondary { syntax: "<color>"; inherits: true; initial-value: oklch(0.554 0.041 257.4); }
18
+ @property --ry-color-secondary-hover { syntax: "<color>"; inherits: true; initial-value: oklch(0.446 0.037 257.3); }
19
+ @property --ry-color-secondary-active { syntax: "<color>"; inherits: true; initial-value: oklch(0.372 0.039 257.3); }
20
+ @property --ry-color-accent { syntax: "<color>"; inherits: true; initial-value: oklch(0.627 0.213 303.9); }
21
+ @property --ry-color-accent-hover { syntax: "<color>"; inherits: true; initial-value: oklch(0.557 0.213 303.9); }
22
+ @property --ry-color-accent-active { syntax: "<color>"; inherits: true; initial-value: oklch(0.497 0.213 303.9); }
23
+ @property --ry-color-success { syntax: "<color>"; inherits: true; initial-value: oklch(0.723 0.192 149.6); }
24
+ @property --ry-color-warning { syntax: "<color>"; inherits: true; initial-value: oklch(0.769 0.165 70.1); }
25
+ @property --ry-color-danger { syntax: "<color>"; inherits: true; initial-value: oklch(0.637 0.208 25.3); }
26
+ @property --ry-color-info { syntax: "<color>"; inherits: true; initial-value: oklch(0.715 0.126 215.2); }
27
+ @property --ry-color-text { syntax: "<color>"; inherits: true; initial-value: oklch(0.279 0.037 260); }
28
+ @property --ry-color-text-muted { syntax: "<color>"; inherits: true; initial-value: oklch(0.554 0.041 257.4); }
29
+ @property --ry-color-text-inverse { syntax: "<color>"; inherits: true; initial-value: oklch(1 0 0); }
30
+ @property --ry-color-bg { syntax: "<color>"; inherits: true; initial-value: oklch(1 0 0); }
31
+ @property --ry-color-bg-subtle { syntax: "<color>"; inherits: true; initial-value: oklch(0.984 0.003 248.2); }
32
+ @property --ry-color-bg-muted { syntax: "<color>"; inherits: true; initial-value: oklch(0.968 0.007 248.1); }
33
+ @property --ry-color-border { syntax: "<color>"; inherits: true; initial-value: oklch(0.929 0.013 255.6); }
34
+ @property --ry-color-border-strong { syntax: "<color>"; inherits: true; initial-value: oklch(0.869 0.02 252.9); }
35
+ @property --ry-color-overlay { syntax: "<color>"; inherits: true; initial-value: oklch(0 0 0 / 0.5); }
36
+ @property --ry-shadow-color { syntax: "<color>"; inherits: true; initial-value: oklch(0 0 0 / 0.1); }
37
+ @property --ry-shadow-color-sm { syntax: "<color>"; inherits: true; initial-value: oklch(0 0 0 / 0.05); }
38
+
39
+ @property --ry-duration-fast { syntax: "<time>"; inherits: true; initial-value: 100ms; }
40
+ @property --ry-duration-normal { syntax: "<time>"; inherits: true; initial-value: 200ms; }
41
+ @property --ry-duration-slow { syntax: "<time>"; inherits: true; initial-value: 300ms; }
42
+
43
+ @property --ry-space-1 { syntax: "<length>"; inherits: true; initial-value: 0.25rem; }
44
+ @property --ry-space-2 { syntax: "<length>"; inherits: true; initial-value: 0.5rem; }
45
+ @property --ry-space-3 { syntax: "<length>"; inherits: true; initial-value: 0.75rem; }
46
+ @property --ry-space-4 { syntax: "<length>"; inherits: true; initial-value: 1rem; }
47
+ @property --ry-space-6 { syntax: "<length>"; inherits: true; initial-value: 1.5rem; }
48
+ @property --ry-space-8 { syntax: "<length>"; inherits: true; initial-value: 2rem; }
49
+
50
+ @layer ry-tokens, ry-structure, ry-theme;
51
+
52
+ @layer ry-tokens {
8
53
  :root {
54
+ color-scheme: light dark;
55
+
9
56
  /* ═══════════════════════════════════════════════════════════════
10
57
  COLORS
11
58
  ═══════════════════════════════════════════════════════════════ */
12
59
 
13
60
  /* Primary */
14
- --ry-color-primary: #3b82f6;
15
- --ry-color-primary-hover: #2563eb;
16
- --ry-color-primary-active: #1d4ed8;
61
+ --ry-color-primary: light-dark(oklch(0.623 0.188 259.8), oklch(0.714 0.143 254.6));
62
+ --ry-color-primary-hover: light-dark(oklch(0.546 0.215 262.9), oklch(0.623 0.188 259.8));
63
+ --ry-color-primary-active: light-dark(oklch(0.488 0.217 264.4), oklch(0.546 0.215 262.9));
17
64
 
18
65
  /* Secondary */
19
- --ry-color-secondary: #64748b;
20
- --ry-color-secondary-hover: #475569;
21
- --ry-color-secondary-active: #334155;
66
+ --ry-color-secondary: light-dark(oklch(0.554 0.041 257.4), oklch(0.711 0.035 256.8));
67
+ --ry-color-secondary-hover: light-dark(oklch(0.446 0.037 257.3), oklch(0.869 0.02 252.9));
68
+ --ry-color-secondary-active: light-dark(oklch(0.372 0.039 257.3), oklch(0.929 0.013 255.6));
69
+
70
+ /* Accent */
71
+ --ry-color-accent: light-dark(oklch(0.627 0.213 303.9), oklch(0.714 0.183 303.9));
72
+ --ry-color-accent-hover: light-dark(oklch(0.557 0.213 303.9), oklch(0.627 0.213 303.9));
73
+ --ry-color-accent-active: light-dark(oklch(0.497 0.213 303.9), oklch(0.557 0.213 303.9));
22
74
 
23
75
  /* Semantic */
24
- --ry-color-success: #22c55e;
25
- --ry-color-warning: #f59e0b;
26
- --ry-color-danger: #ef4444;
27
- --ry-color-info: #06b6d4;
76
+ --ry-color-success: oklch(0.723 0.192 149.6);
77
+ --ry-color-warning: oklch(0.769 0.165 70.1);
78
+ --ry-color-danger: oklch(0.637 0.208 25.3);
79
+ --ry-color-danger-hover: oklch(0.577 0.215 27.3);
80
+ --ry-color-info: oklch(0.715 0.126 215.2);
81
+
82
+ /* Semantic backgrounds & text (for alerts, badges) */
83
+ --ry-color-info-bg: light-dark(oklch(0.984 0.019 201.1), oklch(0.398 0.066 227.4));
84
+ --ry-color-info-text: light-dark(oklch(0.52 0.094 223.1), oklch(0.917 0.077 205.1));
85
+ --ry-color-success-bg: light-dark(oklch(0.982 0.018 156.1), oklch(0.393 0.09 152.6));
86
+ --ry-color-success-text: light-dark(oklch(0.527 0.137 150.1), oklch(0.925 0.081 156.1));
87
+ --ry-color-warning-bg: light-dark(oklch(0.987 0.021 95.3), oklch(0.414 0.105 45.9));
88
+ --ry-color-warning-text: light-dark(oklch(0.555 0.145 49), oklch(0.962 0.058 95.6));
89
+ --ry-color-danger-bg: light-dark(oklch(0.971 0.013 17), oklch(0.396 0.133 25.7));
90
+ --ry-color-danger-text: light-dark(oklch(0.505 0.19 27.5), oklch(0.885 0.059 18.3));
28
91
 
29
92
  /* Text */
30
- --ry-color-text: #1e293b;
31
- --ry-color-text-muted: #64748b;
32
- --ry-color-text-inverse: #ffffff;
93
+ --ry-color-text: light-dark(oklch(0.279 0.037 260), oklch(0.968 0.007 248.1));
94
+ --ry-color-text-muted: light-dark(oklch(0.554 0.041 257.4), oklch(0.711 0.035 256.8));
95
+ --ry-color-text-inverse: light-dark(oklch(1 0 0), oklch(0.208 0.04 265.8));
33
96
 
34
97
  /* Background */
35
- --ry-color-bg: #ffffff;
36
- --ry-color-bg-subtle: #f8fafc;
37
- --ry-color-bg-muted: #f1f5f9;
98
+ --ry-color-bg: light-dark(oklch(1 0 0), oklch(0.208 0.04 265.8));
99
+ --ry-color-bg-subtle: light-dark(oklch(0.984 0.003 248.2), oklch(0.279 0.037 260));
100
+ --ry-color-bg-muted: light-dark(oklch(0.968 0.007 248.1), oklch(0.372 0.039 257.3));
38
101
 
39
102
  /* Border */
40
- --ry-color-border: #e2e8f0;
41
- --ry-color-border-strong: #cbd5e1;
103
+ --ry-color-border: light-dark(oklch(0.929 0.013 255.6), oklch(0.372 0.039 257.3));
104
+ --ry-color-border-strong: light-dark(oklch(0.869 0.02 252.9), oklch(0.446 0.037 257.3));
42
105
 
43
106
  /* Overlay */
44
- --ry-color-overlay: rgba(0, 0, 0, 0.5);
107
+ --ry-color-overlay: light-dark(oklch(0 0 0 / 0.5), oklch(0 0 0 / 0.7));
108
+
109
+ /* ═══════════════════════════════════════════════════════════════
110
+ CODE SYNTAX
111
+ ═══════════════════════════════════════════════════════════════ */
112
+
113
+ --ry-code-bg: light-dark(oklch(0.978 0.003 248.2), oklch(0.208 0.04 265.8));
114
+ --ry-code-header-bg: light-dark(oklch(0.947 0.007 248.1), oklch(0.279 0.037 260));
115
+ --ry-code-text-color: light-dark(oklch(0.279 0.013 253.1), oklch(0.968 0.007 248.1));
116
+ --ry-code-title-color: light-dark(oklch(0.485 0.02 251.1), oklch(0.711 0.035 256.8));
117
+ --ry-code-icon-color: light-dark(oklch(0.666 0.018 251), oklch(0.554 0.041 257.4));
118
+ --ry-code-icon-hover-bg: light-dark(oklch(0.876 0.012 248.1), oklch(0.372 0.039 257.3));
119
+ --ry-code-icon-hover-color: light-dark(oklch(0.279 0.013 253.1), oklch(0.968 0.007 248.1));
120
+ --ry-code-line-number-color: light-dark(oklch(0.666 0.018 251 / 0.6), oklch(0.446 0.037 257.3 / 0.6));
121
+ --ry-code-line-border-color: light-dark(oklch(0.876 0.012 248.1), oklch(0.372 0.039 257.3));
122
+ --ry-code-color-preview-border: light-dark(oklch(0.279 0.013 253.1 / 0.3), oklch(0.968 0.007 248.1 / 0.3));
123
+ --ry-code-keyword: light-dark(oklch(0.552 0.205 24.5), oklch(0.637 0.208 25.3));
124
+ --ry-code-property: light-dark(oklch(0.451 0.164 258.2), oklch(0.714 0.143 254.6));
125
+ --ry-code-value: light-dark(oklch(0.321 0.108 259.1), oklch(0.769 0.165 70.1));
126
+ --ry-code-string: light-dark(oklch(0.321 0.108 259.1), oklch(0.723 0.192 149.6));
127
+ --ry-code-number: light-dark(oklch(0.451 0.164 258.2), oklch(0.769 0.165 70.1));
128
+ --ry-code-comment: light-dark(oklch(0.565 0.019 251), oklch(0.711 0.035 256.8));
129
+ --ry-code-selector: light-dark(oklch(0.439 0.118 148.1), oklch(0.715 0.126 215.2));
130
+ --ry-code-punctuation: light-dark(oklch(0.279 0.013 253.1), oklch(0.711 0.035 256.8));
131
+ --ry-code-tag: light-dark(oklch(0.439 0.118 148.1), oklch(0.715 0.126 215.2));
132
+ --ry-code-attribute: light-dark(oklch(0.451 0.164 258.2), oklch(0.714 0.143 254.6));
45
133
 
46
134
  /* ═══════════════════════════════════════════════════════════════
47
135
  TYPOGRAPHY
@@ -107,10 +195,12 @@
107
195
  SHADOWS
108
196
  ═══════════════════════════════════════════════════════════════ */
109
197
 
110
- --ry-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
111
- --ry-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
112
- --ry-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
113
- --ry-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
198
+ --ry-shadow-color: light-dark(oklch(0 0 0 / 0.1), oklch(0 0 0 / 0.4));
199
+ --ry-shadow-color-sm: light-dark(oklch(0 0 0 / 0.05), oklch(0 0 0 / 0.3));
200
+ --ry-shadow-sm: 0 1px 2px 0 var(--ry-shadow-color-sm);
201
+ --ry-shadow-md: 0 4px 6px -1px var(--ry-shadow-color), 0 2px 4px -2px var(--ry-shadow-color);
202
+ --ry-shadow-lg: 0 10px 15px -3px var(--ry-shadow-color), 0 4px 6px -4px var(--ry-shadow-color);
203
+ --ry-shadow-xl: 0 20px 25px -5px var(--ry-shadow-color), 0 8px 10px -6px var(--ry-shadow-color);
114
204
 
115
205
  /* ═══════════════════════════════════════════════════════════════
116
206
  TRANSITIONS
@@ -141,5 +231,11 @@
141
231
  FOCUS
142
232
  ═══════════════════════════════════════════════════════════════ */
143
233
 
144
- --ry-focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.5);
234
+ --ry-focus-ring: 0 0 0 3px light-dark(oklch(0.623 0.188 259.8 / 0.5), oklch(0.714 0.143 254.6 / 0.5));
145
235
  }
236
+
237
+ /* Force light or dark mode */
238
+ [data-ry-theme="light"] { color-scheme: light; }
239
+ [data-ry-theme="dark"] { color-scheme: dark; }
240
+
241
+ } /* @layer ry-tokens */