@yarcl/react 0.1.0 → 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 (223) hide show
  1. package/README.md +14 -2
  2. package/{src/apply.ts → dist/apply.d.ts} +4 -23
  3. package/dist/apply.js +37 -0
  4. package/dist/classes.d.ts +13 -0
  5. package/dist/classes.js +22 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +58 -0
  8. package/dist/color.js +49 -32
  9. package/dist/components/Accordion.d.ts +96 -0
  10. package/dist/components/Accordion.js +148 -0
  11. package/dist/components/Alert.d.ts +60 -0
  12. package/dist/components/Alert.js +61 -0
  13. package/dist/components/Avatar.d.ts +100 -0
  14. package/dist/components/Avatar.js +89 -0
  15. package/dist/components/Badge.d.ts +44 -0
  16. package/dist/components/Badge.js +43 -0
  17. package/dist/components/Breadcrumb.d.ts +77 -0
  18. package/dist/components/Breadcrumb.js +126 -0
  19. package/dist/components/Button.d.ts +18 -0
  20. package/dist/components/Button.js +33 -0
  21. package/dist/components/ButtonGroup.d.ts +29 -0
  22. package/dist/components/ButtonGroup.js +37 -0
  23. package/dist/components/Card.d.ts +36 -0
  24. package/dist/components/Card.js +26 -0
  25. package/dist/components/Checkbox.d.ts +28 -0
  26. package/dist/components/Checkbox.js +38 -0
  27. package/dist/components/Combobox.d.ts +75 -0
  28. package/dist/components/Combobox.js +362 -0
  29. package/dist/components/CommandPalette.d.ts +92 -0
  30. package/dist/components/CommandPalette.js +293 -0
  31. package/dist/components/DatePicker.d.ts +157 -0
  32. package/dist/components/DatePicker.js +230 -0
  33. package/dist/components/Dialog.d.ts +25 -0
  34. package/dist/components/Dialog.js +29 -0
  35. package/dist/components/Divider.d.ts +23 -0
  36. package/dist/components/Divider.js +25 -0
  37. package/dist/components/Drawer.d.ts +21 -0
  38. package/dist/components/Drawer.js +25 -0
  39. package/dist/components/EmptyState.d.ts +51 -0
  40. package/dist/components/EmptyState.js +47 -0
  41. package/dist/components/Field.d.ts +27 -0
  42. package/dist/components/Field.js +59 -0
  43. package/dist/components/Heading.d.ts +26 -0
  44. package/dist/components/Heading.js +25 -0
  45. package/dist/components/HoverCard.d.ts +47 -0
  46. package/dist/components/HoverCard.js +53 -0
  47. package/dist/components/IconButton.d.ts +19 -0
  48. package/dist/components/IconButton.js +32 -0
  49. package/dist/components/Inline.d.ts +21 -0
  50. package/dist/components/Inline.js +24 -0
  51. package/dist/components/Input.d.ts +19 -0
  52. package/dist/components/Input.js +25 -0
  53. package/dist/components/Label.d.ts +46 -0
  54. package/dist/components/Label.js +33 -0
  55. package/dist/components/Link.d.ts +27 -0
  56. package/dist/components/Link.js +26 -0
  57. package/dist/components/Menu.d.ts +73 -0
  58. package/dist/components/Menu.js +143 -0
  59. package/dist/components/Modal.d.ts +45 -0
  60. package/dist/components/Modal.js +110 -0
  61. package/dist/components/NumberInput.d.ts +49 -0
  62. package/dist/components/NumberInput.js +130 -0
  63. package/dist/components/Pagination.d.ts +86 -0
  64. package/dist/components/Pagination.js +119 -0
  65. package/dist/components/Popover.d.ts +72 -0
  66. package/dist/components/Popover.js +87 -0
  67. package/dist/components/Progress.d.ts +60 -0
  68. package/dist/components/Progress.js +59 -0
  69. package/dist/components/Radio.d.ts +32 -0
  70. package/dist/components/Radio.js +47 -0
  71. package/dist/components/RadioGroup.d.ts +57 -0
  72. package/dist/components/RadioGroup.js +68 -0
  73. package/dist/components/Select.d.ts +47 -0
  74. package/dist/components/Select.js +138 -0
  75. package/dist/components/Skeleton.d.ts +46 -0
  76. package/dist/components/Skeleton.js +40 -0
  77. package/dist/components/Slider.d.ts +126 -0
  78. package/dist/components/Slider.js +166 -0
  79. package/dist/components/Spinner.d.ts +23 -0
  80. package/dist/components/Spinner.js +23 -0
  81. package/dist/components/Stack.d.ts +35 -0
  82. package/dist/components/Stack.js +24 -0
  83. package/dist/components/Switch.d.ts +27 -0
  84. package/dist/components/Switch.js +33 -0
  85. package/dist/components/Table.d.ts +71 -0
  86. package/dist/components/Table.js +61 -0
  87. package/dist/components/Tabs.d.ts +66 -0
  88. package/dist/components/Tabs.js +109 -0
  89. package/dist/components/Text.d.ts +32 -0
  90. package/dist/components/Text.js +28 -0
  91. package/dist/components/Textarea.d.ts +15 -0
  92. package/dist/components/Textarea.js +24 -0
  93. package/dist/components/Toast.d.ts +90 -0
  94. package/dist/components/Toast.js +156 -0
  95. package/dist/components/ToggleGroup.d.ts +79 -0
  96. package/dist/components/ToggleGroup.js +101 -0
  97. package/dist/components/Tooltip.d.ts +46 -0
  98. package/dist/components/Tooltip.js +62 -0
  99. package/dist/components/VisuallyHidden.d.ts +18 -0
  100. package/dist/components/VisuallyHidden.js +22 -0
  101. package/dist/contrast.d.ts +32 -0
  102. package/dist/css.d.ts +2 -2
  103. package/dist/css.js +193 -157
  104. package/dist/define.d.ts +40 -15
  105. package/dist/define.js +30 -27
  106. package/dist/demo.d.ts +2 -0
  107. package/dist/demo.js +2 -0
  108. package/dist/esbuild.cjs +5 -0
  109. package/dist/esbuild.d.ts +4 -0
  110. package/dist/esbuild.js +6 -0
  111. package/dist/field-context.d.ts +16 -0
  112. package/dist/field-context.js +17 -0
  113. package/dist/floating.d.ts +12 -0
  114. package/dist/floating.js +52 -0
  115. package/dist/hooks.d.ts +1 -0
  116. package/dist/hooks.js +12 -0
  117. package/{src/index.ts → dist/index.d.ts} +11 -33
  118. package/dist/index.js +50 -0
  119. package/dist/init.d.ts +18 -0
  120. package/dist/init.js +224 -0
  121. package/dist/plugin.d.ts +10 -26
  122. package/dist/plugin.js +152 -78
  123. package/dist/reference/DemoYarcl.d.ts +12 -0
  124. package/dist/reference/DemoYarcl.js +312 -0
  125. package/dist/reference/DesignReference.d.ts +24 -0
  126. package/dist/reference/DesignReference.js +403 -0
  127. package/dist/reference/index.js +2 -0
  128. package/dist/rollup.cjs +5 -0
  129. package/dist/rollup.d.ts +4 -0
  130. package/dist/rollup.js +6 -0
  131. package/dist/rspack.cjs +5 -0
  132. package/dist/rspack.d.ts +4 -0
  133. package/dist/rspack.js +6 -0
  134. package/dist/runtime.d.ts +13 -0
  135. package/dist/runtime.js +30 -0
  136. package/dist/setup.d.ts +6 -0
  137. package/dist/setup.js +33 -0
  138. package/{src → dist}/styles.css +224 -106
  139. package/dist/themes/bloom.d.ts +295 -0
  140. package/dist/themes/bloom.js +202 -0
  141. package/dist/themes/brutalist.d.ts +277 -0
  142. package/dist/themes/brutalist.js +199 -0
  143. package/dist/themes/compact.d.ts +274 -0
  144. package/dist/themes/compact.js +200 -0
  145. package/dist/themes/contract.d.ts +23 -0
  146. package/dist/themes/editorial.d.ts +277 -0
  147. package/dist/themes/editorial.js +183 -0
  148. package/dist/themes/index.d.ts +1425 -0
  149. package/dist/themes/index.js +45 -0
  150. package/{src/types.ts → dist/types.d.ts} +40 -37
  151. package/dist/vite.cjs +5 -0
  152. package/dist/vite.d.ts +4 -0
  153. package/dist/vite.js +6 -0
  154. package/dist/webpack.cjs +5 -0
  155. package/dist/webpack.d.ts +4 -0
  156. package/dist/webpack.js +6 -0
  157. package/dist/yarcl.config.d.ts +276 -0
  158. package/dist/yarcl.config.js +273 -0
  159. package/package.json +69 -17
  160. package/src/classes.ts +0 -23
  161. package/src/color.ts +0 -48
  162. package/src/components/Accordion.tsx +0 -274
  163. package/src/components/Alert.tsx +0 -85
  164. package/src/components/Badge.tsx +0 -79
  165. package/src/components/Breadcrumb.tsx +0 -239
  166. package/src/components/Button.tsx +0 -58
  167. package/src/components/ButtonGroup.tsx +0 -61
  168. package/src/components/Card.tsx +0 -50
  169. package/src/components/Checkbox.tsx +0 -49
  170. package/src/components/Combobox.tsx +0 -522
  171. package/src/components/CommandPalette.tsx +0 -452
  172. package/src/components/DatePicker.tsx +0 -432
  173. package/src/components/Dialog.tsx +0 -39
  174. package/src/components/Divider.tsx +0 -34
  175. package/src/components/Drawer.tsx +0 -31
  176. package/src/components/Field.tsx +0 -61
  177. package/src/components/Heading.tsx +0 -40
  178. package/src/components/HoverCard.tsx +0 -108
  179. package/src/components/IconButton.tsx +0 -59
  180. package/src/components/Inline.tsx +0 -42
  181. package/src/components/Input.tsx +0 -28
  182. package/src/components/Label.tsx +0 -58
  183. package/src/components/Link.tsx +0 -41
  184. package/src/components/Menu.tsx +0 -207
  185. package/src/components/Modal.tsx +0 -164
  186. package/src/components/NumberInput.tsx +0 -208
  187. package/src/components/Pagination.tsx +0 -227
  188. package/src/components/Popover.tsx +0 -140
  189. package/src/components/Progress.tsx +0 -122
  190. package/src/components/Radio.tsx +0 -59
  191. package/src/components/RadioGroup.tsx +0 -114
  192. package/src/components/Select.tsx +0 -197
  193. package/src/components/Skeleton.tsx +0 -95
  194. package/src/components/Slider.tsx +0 -315
  195. package/src/components/Spinner.tsx +0 -38
  196. package/src/components/Stack.tsx +0 -57
  197. package/src/components/Switch.tsx +0 -42
  198. package/src/components/Table.tsx +0 -99
  199. package/src/components/Tabs.tsx +0 -159
  200. package/src/components/Text.tsx +0 -67
  201. package/src/components/Textarea.tsx +0 -26
  202. package/src/components/Toast.tsx +0 -190
  203. package/src/components/ToggleGroup.tsx +0 -227
  204. package/src/components/Tooltip.tsx +0 -78
  205. package/src/contrast.ts +0 -82
  206. package/src/css.ts +0 -228
  207. package/src/define.check.ts +0 -259
  208. package/src/define.ts +0 -379
  209. package/src/field-context.ts +0 -31
  210. package/src/floating.tsx +0 -61
  211. package/src/hooks.ts +0 -19
  212. package/src/plugin.ts +0 -94
  213. package/src/reference/DesignReference.tsx +0 -374
  214. package/src/runtime.ts +0 -38
  215. package/src/themes/bloom.ts +0 -72
  216. package/src/themes/brutalist.ts +0 -63
  217. package/src/themes/compact.ts +0 -63
  218. package/src/themes/contract.ts +0 -24
  219. package/src/themes/editorial.ts +0 -55
  220. package/src/themes/index.ts +0 -47
  221. package/src/yarcl.config.ts +0 -104
  222. /package/{src/reference/index.ts → dist/reference/index.d.ts} +0 -0
  223. /package/{src → dist}/reference/reference.css +0 -0
@@ -0,0 +1,274 @@
1
+ /** Dense and businesslike: teal on cool gray, small 28px controls, tight spacing, 13px text, compact tables, nearly flat. */
2
+ export declare const compact: {
3
+ readonly colors: {
4
+ readonly primary: {
5
+ readonly light: "#0f766e";
6
+ readonly dark: "#2dd4bf";
7
+ };
8
+ readonly neutral: {
9
+ readonly light: "#52606d";
10
+ readonly dark: "#9aa5b1";
11
+ };
12
+ readonly success: {
13
+ readonly light: "#15803d";
14
+ readonly dark: "#4ade80";
15
+ };
16
+ readonly warning: {
17
+ readonly light: "#a16207";
18
+ readonly dark: "#facc15";
19
+ };
20
+ readonly danger: {
21
+ readonly light: "#b91c1c";
22
+ readonly dark: "#f87171";
23
+ };
24
+ readonly info: {
25
+ readonly light: "#1d4ed8";
26
+ readonly dark: "#60a5fa";
27
+ };
28
+ };
29
+ readonly neutrals: {
30
+ readonly bg: {
31
+ readonly light: "#eef1f4";
32
+ readonly dark: "#0b0f14";
33
+ };
34
+ readonly surface: {
35
+ readonly light: "#ffffff";
36
+ readonly dark: "#141a21";
37
+ };
38
+ readonly text: {
39
+ readonly light: "#1f2933";
40
+ readonly dark: "#e4e7eb";
41
+ };
42
+ readonly muted: {
43
+ readonly light: "#52606d";
44
+ readonly dark: "#9aa5b1";
45
+ };
46
+ readonly border: {
47
+ readonly light: "#cbd2d9";
48
+ readonly dark: "#2a333d";
49
+ };
50
+ };
51
+ readonly sizes: {
52
+ readonly xs: {
53
+ readonly height: "1.25rem";
54
+ readonly paddingX: "0.375rem";
55
+ readonly fontSize: "0.6875rem";
56
+ readonly iconSize: "0.75rem";
57
+ };
58
+ readonly sm: {
59
+ readonly height: "1.5rem";
60
+ readonly paddingX: "0.5rem";
61
+ readonly fontSize: "0.75rem";
62
+ readonly iconSize: "0.75rem";
63
+ };
64
+ readonly md: {
65
+ readonly height: "1.75rem";
66
+ readonly paddingX: "0.625rem";
67
+ readonly fontSize: "0.8125rem";
68
+ readonly iconSize: "0.875rem";
69
+ };
70
+ readonly lg: {
71
+ readonly height: "2.25rem";
72
+ readonly paddingX: "0.875rem";
73
+ readonly fontSize: "0.875rem";
74
+ readonly iconSize: "1rem";
75
+ };
76
+ readonly xl: {
77
+ readonly height: "2.75rem";
78
+ readonly paddingX: "1rem";
79
+ readonly fontSize: "1rem";
80
+ readonly iconSize: "1.125rem";
81
+ };
82
+ };
83
+ readonly radii: {
84
+ readonly square: "0";
85
+ readonly sm: "2px";
86
+ readonly md: "3px";
87
+ readonly lg: "4px";
88
+ readonly xl: "6px";
89
+ readonly rounded: "9999px";
90
+ };
91
+ readonly variants: {
92
+ readonly outline: {
93
+ readonly background: "none";
94
+ readonly border: "neutral";
95
+ readonly text: "neutral";
96
+ };
97
+ readonly solid: {
98
+ readonly background: "fill";
99
+ readonly border: "color";
100
+ readonly text: "on";
101
+ };
102
+ readonly soft: {
103
+ readonly background: "tint";
104
+ readonly border: "none";
105
+ readonly text: "color";
106
+ };
107
+ readonly ghost: {
108
+ readonly background: "none";
109
+ readonly border: "none";
110
+ readonly text: "color";
111
+ };
112
+ };
113
+ readonly spacing: {
114
+ readonly xs: "0.125rem";
115
+ readonly sm: "0.25rem";
116
+ readonly md: "0.5rem";
117
+ readonly lg: "0.75rem";
118
+ readonly xl: "1rem";
119
+ };
120
+ readonly shadows: {
121
+ readonly sm: "0 1px 0 light-dark(rgb(15 23 42 / 0.05), rgb(0 0 0 / 0.4))";
122
+ readonly md: "0 2px 8px light-dark(rgb(15 23 42 / 0.14), rgb(0 0 0 / 0.55))";
123
+ readonly lg: "0 8px 24px light-dark(rgb(15 23 42 / 0.18), rgb(0 0 0 / 0.6))";
124
+ };
125
+ readonly density: {
126
+ readonly compact: {
127
+ readonly paddingX: "0.5rem";
128
+ readonly paddingY: "0.25rem";
129
+ readonly fontSize: "0.75rem";
130
+ };
131
+ readonly comfortable: {
132
+ readonly paddingX: "0.625rem";
133
+ readonly paddingY: "0.375rem";
134
+ readonly fontSize: "0.8125rem";
135
+ };
136
+ };
137
+ readonly typography: {
138
+ readonly families: {
139
+ readonly sans: "\"IBM Plex Sans\", \"Segoe UI\", system-ui, -apple-system, sans-serif";
140
+ readonly mono: "\"IBM Plex Mono\", ui-monospace, Menlo, Consolas, monospace";
141
+ };
142
+ readonly styles: {
143
+ readonly display: {
144
+ readonly family: "sans";
145
+ readonly size: "1.5rem";
146
+ readonly weight: 600;
147
+ readonly lineHeight: 1.25;
148
+ };
149
+ readonly heading: {
150
+ readonly family: "sans";
151
+ readonly size: "1.125rem";
152
+ readonly weight: 600;
153
+ readonly lineHeight: 1.3;
154
+ };
155
+ readonly subheading: {
156
+ readonly family: "sans";
157
+ readonly size: "0.9375rem";
158
+ readonly weight: 600;
159
+ readonly lineHeight: 1.35;
160
+ };
161
+ readonly body: {
162
+ readonly family: "sans";
163
+ readonly size: "0.8125rem";
164
+ readonly weight: 400;
165
+ readonly lineHeight: 1.45;
166
+ };
167
+ readonly caption: {
168
+ readonly family: "sans";
169
+ readonly size: "0.75rem";
170
+ readonly weight: 400;
171
+ readonly lineHeight: 1.4;
172
+ };
173
+ readonly code: {
174
+ readonly family: "mono";
175
+ readonly size: "0.75rem";
176
+ readonly weight: 400;
177
+ readonly lineHeight: 1.45;
178
+ };
179
+ readonly label: {
180
+ readonly family: "sans";
181
+ readonly size: "0.75rem";
182
+ readonly weight: 600;
183
+ readonly lineHeight: 1.35;
184
+ readonly letterSpacing: "0.02em";
185
+ };
186
+ };
187
+ readonly headings: {
188
+ readonly h1: "display";
189
+ readonly h2: "heading";
190
+ readonly h3: "heading";
191
+ readonly h4: "subheading";
192
+ readonly h5: "subheading";
193
+ readonly h6: "label";
194
+ };
195
+ };
196
+ readonly focusRing: {
197
+ readonly width: "2px";
198
+ readonly offset: "1px";
199
+ readonly color: "info";
200
+ };
201
+ readonly defaults: {
202
+ readonly radius: "sm";
203
+ readonly padding: "lg";
204
+ readonly gap: "md";
205
+ readonly density: "compact";
206
+ readonly size: "md";
207
+ readonly color: "primary";
208
+ readonly variant: "solid";
209
+ readonly errorColor: "danger";
210
+ readonly textStyle: "body";
211
+ readonly labelStyle: "label";
212
+ readonly helperStyle: "caption";
213
+ readonly floatingShadow: "md";
214
+ readonly softVariant: "soft";
215
+ readonly modalSize: "md";
216
+ };
217
+ readonly modalSizes: {
218
+ readonly sm: "24rem";
219
+ readonly md: "32rem";
220
+ readonly lg: "48rem";
221
+ readonly xl: "64rem";
222
+ readonly full: "100vw";
223
+ };
224
+ readonly zIndex: {
225
+ readonly dropdown: 1000;
226
+ readonly tooltip: 1100;
227
+ readonly dialog: 1200;
228
+ readonly toast: 1300;
229
+ };
230
+ readonly motion: {
231
+ readonly fast: "120ms";
232
+ readonly base: "200ms";
233
+ readonly easing: "cubic-bezier(0.2, 0, 0, 1)";
234
+ };
235
+ readonly timing: {
236
+ readonly tooltipDelay: 400;
237
+ readonly hoverOpenDelay: 300;
238
+ readonly hoverCloseDelay: 150;
239
+ readonly toastDuration: 5000;
240
+ };
241
+ readonly borders: {
242
+ readonly width: "1px";
243
+ };
244
+ readonly components: {
245
+ readonly Avatar: {
246
+ readonly radius: "rounded";
247
+ };
248
+ readonly EmptyState: {
249
+ readonly color: "neutral";
250
+ readonly gap: "sm";
251
+ readonly padding: "lg";
252
+ readonly textStyle: "body";
253
+ };
254
+ readonly Alert: {
255
+ readonly gap: "sm";
256
+ readonly padding: "md";
257
+ readonly textStyle: "label";
258
+ };
259
+ readonly Drawer: {
260
+ readonly size: "sm";
261
+ };
262
+ readonly Tooltip: {
263
+ readonly radius: "md";
264
+ readonly padding: "sm";
265
+ readonly textStyle: "caption";
266
+ };
267
+ readonly Toast: {
268
+ readonly radius: "lg";
269
+ readonly gap: "sm";
270
+ readonly padding: "md";
271
+ readonly textStyle: "label";
272
+ };
273
+ };
274
+ };
@@ -0,0 +1,200 @@
1
+ import { defineConfig } from "../define.js";
2
+ import yarcl_config_default from "../yarcl.config.js";
3
+ //#region src/themes/compact.ts
4
+ /** Dense and businesslike: teal on cool gray, small 28px controls, tight spacing, 13px text, compact tables, nearly flat. */
5
+ var compact = defineConfig({
6
+ ...yarcl_config_default,
7
+ colors: {
8
+ primary: {
9
+ light: "#0f766e",
10
+ dark: "#2dd4bf"
11
+ },
12
+ neutral: {
13
+ light: "#52606d",
14
+ dark: "#9aa5b1"
15
+ },
16
+ success: {
17
+ light: "#15803d",
18
+ dark: "#4ade80"
19
+ },
20
+ warning: {
21
+ light: "#a16207",
22
+ dark: "#facc15"
23
+ },
24
+ danger: {
25
+ light: "#b91c1c",
26
+ dark: "#f87171"
27
+ },
28
+ info: {
29
+ light: "#1d4ed8",
30
+ dark: "#60a5fa"
31
+ }
32
+ },
33
+ neutrals: {
34
+ bg: {
35
+ light: "#eef1f4",
36
+ dark: "#0b0f14"
37
+ },
38
+ surface: {
39
+ light: "#ffffff",
40
+ dark: "#141a21"
41
+ },
42
+ text: {
43
+ light: "#1f2933",
44
+ dark: "#e4e7eb"
45
+ },
46
+ muted: {
47
+ light: "#52606d",
48
+ dark: "#9aa5b1"
49
+ },
50
+ border: {
51
+ light: "#cbd2d9",
52
+ dark: "#2a333d"
53
+ }
54
+ },
55
+ sizes: {
56
+ xs: {
57
+ height: "1.25rem",
58
+ paddingX: "0.375rem",
59
+ fontSize: "0.6875rem",
60
+ iconSize: "0.75rem"
61
+ },
62
+ sm: {
63
+ height: "1.5rem",
64
+ paddingX: "0.5rem",
65
+ fontSize: "0.75rem",
66
+ iconSize: "0.75rem"
67
+ },
68
+ md: {
69
+ height: "1.75rem",
70
+ paddingX: "0.625rem",
71
+ fontSize: "0.8125rem",
72
+ iconSize: "0.875rem"
73
+ },
74
+ lg: {
75
+ height: "2.25rem",
76
+ paddingX: "0.875rem",
77
+ fontSize: "0.875rem",
78
+ iconSize: "1rem"
79
+ },
80
+ xl: {
81
+ height: "2.75rem",
82
+ paddingX: "1rem",
83
+ fontSize: "1rem",
84
+ iconSize: "1.125rem"
85
+ }
86
+ },
87
+ radii: {
88
+ square: "0",
89
+ sm: "2px",
90
+ md: "3px",
91
+ lg: "4px",
92
+ xl: "6px",
93
+ rounded: "9999px"
94
+ },
95
+ variants: {
96
+ ...yarcl_config_default.variants,
97
+ outline: {
98
+ background: "none",
99
+ border: "neutral",
100
+ text: "neutral"
101
+ }
102
+ },
103
+ spacing: {
104
+ xs: "0.125rem",
105
+ sm: "0.25rem",
106
+ md: "0.5rem",
107
+ lg: "0.75rem",
108
+ xl: "1rem"
109
+ },
110
+ shadows: {
111
+ sm: "0 1px 0 light-dark(rgb(15 23 42 / 0.05), rgb(0 0 0 / 0.4))",
112
+ md: "0 2px 8px light-dark(rgb(15 23 42 / 0.14), rgb(0 0 0 / 0.55))",
113
+ lg: "0 8px 24px light-dark(rgb(15 23 42 / 0.18), rgb(0 0 0 / 0.6))"
114
+ },
115
+ density: {
116
+ compact: {
117
+ paddingX: "0.5rem",
118
+ paddingY: "0.25rem",
119
+ fontSize: "0.75rem"
120
+ },
121
+ comfortable: {
122
+ paddingX: "0.625rem",
123
+ paddingY: "0.375rem",
124
+ fontSize: "0.8125rem"
125
+ }
126
+ },
127
+ typography: {
128
+ families: {
129
+ sans: "\"IBM Plex Sans\", \"Segoe UI\", system-ui, -apple-system, sans-serif",
130
+ mono: "\"IBM Plex Mono\", ui-monospace, Menlo, Consolas, monospace"
131
+ },
132
+ styles: {
133
+ display: {
134
+ family: "sans",
135
+ size: "1.5rem",
136
+ weight: 600,
137
+ lineHeight: 1.25
138
+ },
139
+ heading: {
140
+ family: "sans",
141
+ size: "1.125rem",
142
+ weight: 600,
143
+ lineHeight: 1.3
144
+ },
145
+ subheading: {
146
+ family: "sans",
147
+ size: "0.9375rem",
148
+ weight: 600,
149
+ lineHeight: 1.35
150
+ },
151
+ body: {
152
+ family: "sans",
153
+ size: "0.8125rem",
154
+ weight: 400,
155
+ lineHeight: 1.45
156
+ },
157
+ caption: {
158
+ family: "sans",
159
+ size: "0.75rem",
160
+ weight: 400,
161
+ lineHeight: 1.4
162
+ },
163
+ code: {
164
+ family: "mono",
165
+ size: "0.75rem",
166
+ weight: 400,
167
+ lineHeight: 1.45
168
+ },
169
+ label: {
170
+ family: "sans",
171
+ size: "0.75rem",
172
+ weight: 600,
173
+ lineHeight: 1.35,
174
+ letterSpacing: "0.02em"
175
+ }
176
+ },
177
+ headings: {
178
+ h1: "display",
179
+ h2: "heading",
180
+ h3: "heading",
181
+ h4: "subheading",
182
+ h5: "subheading",
183
+ h6: "label"
184
+ }
185
+ },
186
+ focusRing: {
187
+ width: "2px",
188
+ offset: "1px",
189
+ color: "info"
190
+ },
191
+ defaults: {
192
+ ...yarcl_config_default.defaults,
193
+ radius: "sm",
194
+ padding: "lg",
195
+ gap: "md",
196
+ density: "compact"
197
+ }
198
+ });
199
+ //#endregion
200
+ export { compact };
@@ -0,0 +1,23 @@
1
+ import type { ColorToken, DensityToken, SizeToken, TextStyleToken, VariantToken } from '../define';
2
+ import type defaults from '../yarcl.config';
3
+ type Defaults = typeof defaults;
4
+ /**
5
+ * The keys every bundled theme defines: the same keys as the library defaults.
6
+ * Apps written against these keys work with any theme that satisfies the contract.
7
+ * Values are free; extra keys are allowed.
8
+ */
9
+ export interface ThemeContract {
10
+ colors: Record<keyof Defaults['colors'], ColorToken>;
11
+ sizes: Record<keyof Defaults['sizes'], SizeToken>;
12
+ radii: Record<keyof Defaults['radii'], string>;
13
+ variants: Record<keyof Defaults['variants'], VariantToken>;
14
+ spacing: Record<keyof Defaults['spacing'], string>;
15
+ shadows: Record<keyof Defaults['shadows'], string>;
16
+ density: Record<keyof Defaults['density'], DensityToken>;
17
+ modalSizes: Record<keyof Defaults['modalSizes'], string>;
18
+ typography: {
19
+ families: Record<keyof Defaults['typography']['families'], string>;
20
+ styles: Record<keyof Defaults['typography']['styles'], TextStyleToken>;
21
+ };
22
+ }
23
+ export {};