@moduix/react 2.0.0 → 2.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 (88) hide show
  1. package/README.md +100 -172
  2. package/dist/components/accordion/Accordion.css +4 -4
  3. package/dist/components/alert/Alert.css +5 -5
  4. package/dist/components/angle-slider/AngleSlider.css +9 -9
  5. package/dist/components/badge/Badge.css +11 -10
  6. package/dist/components/breadcrumbs/Breadcrumbs.css +8 -7
  7. package/dist/components/button/Button.css +24 -24
  8. package/dist/components/card/Card.css +1 -1
  9. package/dist/components/carousel/Carousel.css +17 -17
  10. package/dist/components/checkbox/Checkbox.css +13 -13
  11. package/dist/components/clipboard/Clipboard.css +10 -10
  12. package/dist/components/close-button/CloseButton.css +7 -7
  13. package/dist/components/collapsible/Collapsible.css +4 -4
  14. package/dist/components/color-picker/ColorPicker.css +31 -24
  15. package/dist/components/combobox/Combobox.css +36 -49
  16. package/dist/components/command-palette/CommandPalette.css +29 -28
  17. package/dist/components/date-input/DateInput.css +5 -4
  18. package/dist/components/date-picker/DatePicker.css +40 -47
  19. package/dist/components/dialog/Dialog.css +5 -4
  20. package/dist/components/drawer/Drawer.css +6 -5
  21. package/dist/components/editable/Editable.css +12 -10
  22. package/dist/components/empty/Empty.css +2 -2
  23. package/dist/components/field/Field.css +6 -4
  24. package/dist/components/file-upload/FileUpload.css +22 -22
  25. package/dist/components/floating-panel/FloatingPanel.css +30 -30
  26. package/dist/components/floating-panel/FloatingPanel.d.ts +1 -1
  27. package/dist/components/highlight/Highlight.css +1 -1
  28. package/dist/components/hover-card/HoverCard.css +5 -5
  29. package/dist/components/image-cropper/ImageCropper.css +15 -11
  30. package/dist/components/input/Input.css +9 -9
  31. package/dist/components/input-group/InputGroup.css +29 -29
  32. package/dist/components/kbd/Kbd.css +2 -2
  33. package/dist/components/lightbox/Lightbox.css +7 -7
  34. package/dist/components/listbox/Listbox.css +34 -32
  35. package/dist/components/menu/Menu.css +40 -37
  36. package/dist/components/native-select/NativeSelect.css +17 -12
  37. package/dist/components/number-input/NumberInput.css +17 -18
  38. package/dist/components/pagination/Pagination.css +11 -11
  39. package/dist/components/password-input/PasswordInput.css +4 -4
  40. package/dist/components/pin-input/PinInput.css +6 -6
  41. package/dist/components/popover/Popover.css +9 -8
  42. package/dist/components/progress-circular/ProgressCircular.css +2 -2
  43. package/dist/components/progress-linear/ProgressLinear.css +1 -1
  44. package/dist/components/qr-code/QrCode.css +7 -7
  45. package/dist/components/radio-group/RadioGroup.css +12 -12
  46. package/dist/components/rating-group/RatingGroup.css +7 -7
  47. package/dist/components/scroll-area/ScrollArea.css +5 -5
  48. package/dist/components/segment-group/SegmentGroup.css +4 -4
  49. package/dist/components/select/Select.css +59 -42
  50. package/dist/components/select/Select.js +1 -1
  51. package/dist/components/separator/Separator.css +6 -6
  52. package/dist/components/sidebar/Sidebar.css +33 -32
  53. package/dist/components/signature-pad/SignaturePad.css +7 -6
  54. package/dist/components/skeleton/Skeleton.css +1 -1
  55. package/dist/components/slider/Slider.css +13 -11
  56. package/dist/components/spinner/Spinner.css +5 -5
  57. package/dist/components/split-button/SplitButton.css +10 -10
  58. package/dist/components/splitter/Splitter.css +6 -6
  59. package/dist/components/steps/Steps.css +20 -19
  60. package/dist/components/switch/Switch.css +15 -15
  61. package/dist/components/tabs/Tabs.css +19 -19
  62. package/dist/components/tag/Tag.css +14 -14
  63. package/dist/components/tags-input/TagsInput.css +17 -16
  64. package/dist/components/textarea/Textarea.css +4 -3
  65. package/dist/components/timer/Timer.css +7 -7
  66. package/dist/components/toast/Toast.css +16 -15
  67. package/dist/components/toggle/Toggle.css +20 -20
  68. package/dist/components/tooltip/Tooltip.css +9 -8
  69. package/dist/components/tour/Tour.css +17 -17
  70. package/dist/components/tree-view/TreeView.css +23 -20
  71. package/dist/components/typeset/Typeset.css +317 -0
  72. package/dist/components/typeset/Typeset.d.ts +7 -0
  73. package/dist/components/typeset/Typeset.js +33 -0
  74. package/dist/components/typeset/Typeset.module.js +8 -0
  75. package/dist/index.d.ts +3 -1
  76. package/dist/index.js +3 -1
  77. package/dist/lib/moduix/presets/contrast.css +65 -0
  78. package/dist/lib/moduix/presets/dense.css +78 -0
  79. package/dist/lib/moduix/presets/soft.css +77 -0
  80. package/dist/lib/moduix/styles/reset.css +33 -0
  81. package/dist/lib/moduix/styles/style.css +17 -4
  82. package/dist/presets/contrast.d.ts +1 -0
  83. package/dist/presets/contrast.js +1 -0
  84. package/dist/presets/dense.d.ts +1 -0
  85. package/dist/presets/dense.js +1 -0
  86. package/dist/presets/soft.d.ts +1 -0
  87. package/dist/presets/soft.js +1 -0
  88. package/package.json +4 -1
@@ -0,0 +1,78 @@
1
+ [data-moduix-theme="dense"] {
2
+ color-scheme: light;
3
+ --background: oklch(98.5% .004 255);
4
+ --foreground: oklch(18.5% .014 255);
5
+ --card: oklch(99.8% .002 255);
6
+ --card-foreground: oklch(18.5% .014 255);
7
+ --popover: oklch(99.8% .002 255);
8
+ --popover-foreground: oklch(18.5% .014 255);
9
+ --primary: oklch(48% .16 255);
10
+ --primary-foreground: oklch(99% .002 255);
11
+ --secondary: oklch(95.8% .009 255);
12
+ --secondary-foreground: oklch(24% .02 255);
13
+ --muted: oklch(95.2% .008 255);
14
+ --muted-foreground: oklch(47% .02 255);
15
+ --accent: oklch(92.5% .02 255);
16
+ --accent-foreground: oklch(22% .025 255);
17
+ --border: oklch(88% .015 255);
18
+ --input: oklch(84% .018 255);
19
+ --ring: oklch(56% .14 255);
20
+ --overlay: oklch(16% .02 255 / .24);
21
+ --overlay-foreground: oklch(16% .02 255 / .08);
22
+ --sidebar: oklch(97.2% .007 255);
23
+ --sidebar-foreground: oklch(18.5% .014 255);
24
+ --sidebar-primary: oklch(48% .16 255);
25
+ --sidebar-primary-foreground: oklch(99% .002 255);
26
+ --sidebar-accent: oklch(92.5% .02 255);
27
+ --sidebar-accent-foreground: oklch(22% .025 255);
28
+ --sidebar-border: oklch(88% .015 255);
29
+ --sidebar-ring: oklch(56% .14 255);
30
+ --radius: .45rem;
31
+ --spacing-1: 3px;
32
+ --spacing-2: 6px;
33
+ --spacing-3: 10px;
34
+ --spacing-4: 14px;
35
+ --spacing-5: 18px;
36
+ --spacing-6: 22px;
37
+ --spacing-8: 28px;
38
+ --spacing-10: 36px;
39
+ --size-xs: 22px;
40
+ --size-sm: 30px;
41
+ --size-md: 34px;
42
+ --size-lg: 38px;
43
+ --size-xl: 44px;
44
+ --shadow-sm: 0 1px 2px #0f172a14;
45
+ --shadow-md: 0 3px 8px #0f172a1a;
46
+ --shadow-lg: 0 12px 24px #0f172a1f;
47
+
48
+ & .dark, &.dark {
49
+ color-scheme: dark;
50
+ --background: oklch(16% .014 255);
51
+ --foreground: oklch(97% .003 255);
52
+ --card: oklch(20.5% .016 255);
53
+ --card-foreground: oklch(97% .003 255);
54
+ --popover: oklch(20.5% .016 255);
55
+ --popover-foreground: oklch(97% .003 255);
56
+ --primary: oklch(76% .13 255);
57
+ --primary-foreground: oklch(17% .018 255);
58
+ --secondary: oklch(25.5% .018 255);
59
+ --secondary-foreground: oklch(97% .003 255);
60
+ --muted: oklch(25% .016 255);
61
+ --muted-foreground: oklch(71% .018 255);
62
+ --accent: oklch(31% .03 255);
63
+ --accent-foreground: oklch(97% .003 255);
64
+ --border: oklch(72% .02 255 / .25);
65
+ --input: oklch(76% .02 255 / .32);
66
+ --ring: oklch(70% .12 255);
67
+ --overlay: oklch(10% .02 255 / .78);
68
+ --overlay-foreground: oklch(97% .003 255 / .09);
69
+ --sidebar: oklch(19% .016 255);
70
+ --sidebar-foreground: oklch(97% .003 255);
71
+ --sidebar-primary: oklch(76% .13 255);
72
+ --sidebar-primary-foreground: oklch(17% .018 255);
73
+ --sidebar-accent: oklch(31% .03 255);
74
+ --sidebar-accent-foreground: oklch(97% .003 255);
75
+ --sidebar-border: oklch(72% .02 255 / .25);
76
+ --sidebar-ring: oklch(70% .12 255);
77
+ }
78
+ }
@@ -0,0 +1,77 @@
1
+ [data-moduix-theme="soft"] {
2
+ color-scheme: light;
3
+ --background: oklch(98.5% .012 320);
4
+ --foreground: oklch(22.5% .024 315);
5
+ --card: oklch(99.8% .004 320);
6
+ --card-foreground: oklch(22.5% .024 315);
7
+ --popover: oklch(99.8% .004 320);
8
+ --popover-foreground: oklch(22.5% .024 315);
9
+ --primary: oklch(54% .18 305);
10
+ --primary-foreground: oklch(99% .004 320);
11
+ --secondary: oklch(95.8% .018 320);
12
+ --secondary-foreground: oklch(30% .04 310);
13
+ --muted: oklch(95% .016 320);
14
+ --muted-foreground: oklch(50% .035 315);
15
+ --accent: oklch(92% .04 315);
16
+ --accent-foreground: oklch(29% .05 305);
17
+ --border: oklch(88% .025 320);
18
+ --input: oklch(84% .03 320);
19
+ --ring: oklch(61% .15 305);
20
+ --overlay: oklch(22% .035 310 / .22);
21
+ --overlay-foreground: oklch(22% .035 310 / .08);
22
+ --sidebar: oklch(97.5% .014 320);
23
+ --sidebar-foreground: oklch(22.5% .024 315);
24
+ --sidebar-primary: oklch(54% .18 305);
25
+ --sidebar-primary-foreground: oklch(99% .004 320);
26
+ --sidebar-accent: oklch(92% .04 315);
27
+ --sidebar-accent-foreground: oklch(29% .05 305);
28
+ --sidebar-border: oklch(88% .025 320);
29
+ --sidebar-ring: oklch(61% .15 305);
30
+ --radius: 1rem;
31
+ --spacing-2: 9px;
32
+ --spacing-3: 14px;
33
+ --spacing-4: 18px;
34
+ --spacing-5: 22px;
35
+ --spacing-6: 28px;
36
+ --spacing-8: 36px;
37
+ --spacing-10: 44px;
38
+ --size-xs: 26px;
39
+ --size-sm: 34px;
40
+ --size-md: 40px;
41
+ --size-lg: 44px;
42
+ --size-xl: 52px;
43
+ --shadow-sm: 0 2px 6px #61236b14;
44
+ --shadow-md: 0 8px 18px #61236b1f;
45
+ --shadow-lg: 0 18px 38px #61236b29;
46
+
47
+ & .dark, &.dark {
48
+ color-scheme: dark;
49
+ --background: oklch(17% .018 315);
50
+ --foreground: oklch(97.2% .006 320);
51
+ --card: oklch(22% .022 315);
52
+ --card-foreground: oklch(97.2% .006 320);
53
+ --popover: oklch(22% .022 315);
54
+ --popover-foreground: oklch(97.2% .006 320);
55
+ --primary: oklch(78% .13 305);
56
+ --primary-foreground: oklch(23% .026 315);
57
+ --secondary: oklch(28.5% .03 315);
58
+ --secondary-foreground: oklch(97.2% .006 320);
59
+ --muted: oklch(27.5% .026 315);
60
+ --muted-foreground: oklch(74% .03 320);
61
+ --accent: oklch(34% .06 310);
62
+ --accent-foreground: oklch(97.2% .006 320);
63
+ --border: oklch(76% .035 320 / .24);
64
+ --input: oklch(76% .035 320 / .3);
65
+ --ring: oklch(74% .11 305);
66
+ --overlay: oklch(10% .02 315 / .8);
67
+ --overlay-foreground: oklch(97.2% .006 320 / .1);
68
+ --sidebar: oklch(20% .022 315);
69
+ --sidebar-foreground: oklch(97.2% .006 320);
70
+ --sidebar-primary: oklch(78% .13 305);
71
+ --sidebar-primary-foreground: oklch(23% .026 315);
72
+ --sidebar-accent: oklch(34% .06 310);
73
+ --sidebar-accent-foreground: oklch(97.2% .006 320);
74
+ --sidebar-border: oklch(76% .035 320 / .24);
75
+ --sidebar-ring: oklch(74% .11 305);
76
+ }
77
+ }
@@ -1,3 +1,36 @@
1
+ /*!
2
+ * moduix reset.css
3
+ *
4
+ * Portions of this file are derived from:
5
+ * - @unocss/reset tailwind-v4.css
6
+ * Copyright (c) 2021-PRESENT Anthony Fu <https://github.com/antfu>
7
+ * https://github.com/unocss/unocss/blob/main/packages-presets/reset/tailwind-v4.css
8
+ * - Tailwind CSS Preflight
9
+ * Copyright (c) Tailwind Labs, Inc.
10
+ * https://github.com/tailwindlabs/tailwindcss/blob/main/packages/tailwindcss/preflight.css
11
+ *
12
+ * Modifications Copyright (c) 2026 Blinks44
13
+ *
14
+ * MIT License
15
+ *
16
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ * of this software and associated documentation files (the "Software"), to deal
18
+ * in the Software without restriction, including without limitation the rights
19
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ * copies of the Software, and to permit persons to whom the Software is
21
+ * furnished to do so, subject to the following conditions:
22
+ *
23
+ * The above copyright notice and this permission notice shall be included in all
24
+ * copies or substantial portions of the Software.
25
+ *
26
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ * SOFTWARE.
33
+ */
1
34
  @layer ui.reset {
2
35
  *, :after, :before, ::backdrop, ::file-selector-button {
3
36
  box-sizing: border-box;
@@ -67,6 +67,10 @@
67
67
  --border-width-sm: 1px;
68
68
  --border-width-md: 2px;
69
69
  --border-width-lg: 4px;
70
+ --focus-ring-width: var(--border-width-md);
71
+ --focus-ring-inset-width: var(--border-width-sm);
72
+ --focus-ring-offset: var(--spacing-0-5);
73
+ --focus-ring-inset-offset: calc(var(--border-width-sm) * -1);
70
74
  }
71
75
 
72
76
  :root {
@@ -86,6 +90,7 @@
86
90
  --accent: oklch(95% .01 285);
87
91
  --accent-foreground: oklch(23.5% .016 285);
88
92
  --destructive: oklch(56.5% .235 22);
93
+ --destructive-foreground: var(--primary-foreground);
89
94
  --success: oklch(62.7% .194 149.214);
90
95
  --warning: oklch(79.5% .184 86.047);
91
96
  --border: oklch(90.5% .008 285);
@@ -124,6 +129,7 @@
124
129
  --accent: oklch(29% .015 285);
125
130
  --accent-foreground: oklch(96.8% .003 285);
126
131
  --destructive: oklch(69% .185 18);
132
+ --destructive-foreground: var(--primary-foreground);
127
133
  --success: oklch(62.7% .194 149.214);
128
134
  --warning: oklch(79.5% .184 86.047);
129
135
  --border: oklch(100% .004 285 / .13);
@@ -161,6 +167,7 @@
161
167
  --color-accent: var(--accent);
162
168
  --color-accent-foreground: var(--accent-foreground);
163
169
  --color-destructive: var(--destructive);
170
+ --color-destructive-foreground: var(--destructive-foreground);
164
171
  --color-success: var(--success);
165
172
  --color-warning: var(--warning);
166
173
  --color-border: var(--border);
@@ -205,11 +212,17 @@
205
212
  --size-xl: 48px;
206
213
  --spacing-0: 0px;
207
214
  --spacing-1: 4px;
215
+ --spacing-0-5: calc((var(--spacing-0) + var(--spacing-1)) / 2);
208
216
  --spacing-2: 8px;
217
+ --spacing-1-5: calc((var(--spacing-1) + var(--spacing-2)) / 2);
209
218
  --spacing-3: 12px;
219
+ --spacing-2-5: calc((var(--spacing-2) + var(--spacing-3)) / 2);
210
220
  --spacing-4: 16px;
221
+ --spacing-3-5: calc((var(--spacing-3) + var(--spacing-4)) / 2);
211
222
  --spacing-5: 20px;
223
+ --spacing-4-5: calc((var(--spacing-4) + var(--spacing-5)) / 2);
212
224
  --spacing-6: 24px;
225
+ --spacing-7: calc((var(--spacing-6) + var(--spacing-8)) / 2);
213
226
  --spacing-8: 32px;
214
227
  --spacing-10: 40px;
215
228
  --spacing-xs: var(--spacing-1);
@@ -256,18 +269,18 @@
256
269
  --weight-medium: 500;
257
270
  --weight-semibold: 600;
258
271
  --weight-bold: 700;
259
- --text-xs: 11px;
272
+ --text-xs: 12px;
260
273
  --text-sm: 14px;
261
274
  --text-md: 16px;
262
275
  --text-lg: 18px;
263
276
  --text-xl: 20px;
264
277
  --text-2xl: 24px;
265
278
  --text-3xl: 30px;
266
- --line-height-text-xs: 14px;
267
- --line-height-text-sm: 22px;
279
+ --line-height-text-xs: 16px;
280
+ --line-height-text-sm: 20px;
268
281
  --line-height-text-md: 24px;
269
282
  --line-height-text-lg: 28px;
270
- --line-height-text-xl: 32px;
283
+ --line-height-text-xl: 28px;
271
284
  --line-height-text-2xl: 32px;
272
285
  --line-height-text-3xl: 36px;
273
286
  --tracking-text-sm: -.01em;
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "../lib/moduix/presets/contrast.css";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "../lib/moduix/presets/dense.css";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "../lib/moduix/presets/soft.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moduix/react",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "React implementation of the moduix component system, built on Ark UI primitives.",
5
5
  "keywords": [
6
6
  "accessible",
@@ -38,6 +38,9 @@
38
38
  },
39
39
  "./style.css": "./dist/lib/moduix/styles/style.css",
40
40
  "./reset.css": "./dist/lib/moduix/styles/reset.css",
41
+ "./presets/contrast.css": "./dist/lib/moduix/presets/contrast.css",
42
+ "./presets/dense.css": "./dist/lib/moduix/presets/dense.css",
43
+ "./presets/soft.css": "./dist/lib/moduix/presets/soft.css",
41
44
  "./package.json": "./package.json"
42
45
  },
43
46
  "publishConfig": {