@moduix/react 2.0.0 → 2.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.
- package/README.md +100 -173
- package/dist/components/accordion/Accordion.css +47 -47
- package/dist/components/alert/Alert.css +62 -46
- package/dist/components/angle-slider/AngleSlider.css +65 -64
- package/dist/components/aspect-ratio/AspectRatio.css +2 -2
- package/dist/components/avatar/Avatar.css +26 -26
- package/dist/components/badge/Badge.css +34 -33
- package/dist/components/bleed/Bleed.css +13 -13
- package/dist/components/breadcrumbs/Breadcrumbs.css +29 -28
- package/dist/components/button/Button.css +81 -78
- package/dist/components/card/Card.css +46 -46
- package/dist/components/carousel/Carousel.css +57 -57
- package/dist/components/checkbox/Checkbox.css +40 -40
- package/dist/components/clipboard/Clipboard.css +68 -59
- package/dist/components/close-button/CloseButton.css +17 -17
- package/dist/components/collapsible/Collapsible.css +40 -38
- package/dist/components/color-picker/ColorPicker.css +162 -151
- package/dist/components/combobox/Combobox.css +120 -130
- package/dist/components/command-palette/CommandPalette.css +173 -177
- package/dist/components/command-palette/CommandPalette.module.js +0 -1
- package/dist/components/container/Container.css +12 -12
- package/dist/components/date-input/DateInput.css +41 -39
- package/dist/components/date-picker/DatePicker.css +181 -186
- package/dist/components/dialog/Dialog.css +84 -78
- package/dist/components/drawer/Drawer.css +126 -107
- package/dist/components/editable/Editable.css +64 -60
- package/dist/components/empty/Empty.css +25 -25
- package/dist/components/field/Field.css +46 -44
- package/dist/components/fieldset/Fieldset.css +22 -22
- package/dist/components/file-upload/FileUpload.css +128 -125
- package/dist/components/floating-panel/FloatingPanel.css +114 -110
- package/dist/components/floating-panel/FloatingPanel.d.ts +1 -1
- package/dist/components/heading/Heading.css +26 -26
- package/dist/components/highlight/Highlight.css +8 -8
- package/dist/components/hover-card/HoverCard.css +49 -47
- package/dist/components/image/Image.css +2 -2
- package/dist/components/image-cropper/ImageCropper.css +63 -56
- package/dist/components/input/Input.css +47 -46
- package/dist/components/input-group/InputGroup.css +71 -70
- package/dist/components/kbd/Kbd.css +16 -16
- package/dist/components/lightbox/Lightbox.css +80 -77
- package/dist/components/list/List.css +32 -32
- package/dist/components/listbox/Listbox.css +121 -116
- package/dist/components/marquee/Marquee.css +16 -16
- package/dist/components/menu/Menu.css +122 -118
- package/dist/components/native-select/NativeSelect.css +48 -42
- package/dist/components/number-input/NumberInput.css +62 -60
- package/dist/components/pagination/Pagination.css +35 -34
- package/dist/components/password-input/PasswordInput.css +60 -59
- package/dist/components/pin-input/PinInput.css +35 -35
- package/dist/components/popover/Popover.css +81 -76
- package/dist/components/progress-circular/ProgressCircular.css +20 -20
- package/dist/components/progress-linear/ProgressLinear.css +29 -28
- package/dist/components/qr-code/QrCode.css +39 -35
- package/dist/components/radio-group/RadioGroup.css +48 -48
- package/dist/components/rating-group/RatingGroup.css +30 -30
- package/dist/components/scroll-area/ScrollArea.css +34 -34
- package/dist/components/segment-group/SegmentGroup.css +37 -37
- package/dist/components/select/Select.css +137 -128
- package/dist/components/select/Select.d.ts +0 -5
- package/dist/components/select/Select.js +1 -9
- package/dist/components/select/Select.module.js +0 -1
- package/dist/components/separator/Separator.css +13 -13
- package/dist/components/sidebar/Sidebar.css +143 -142
- package/dist/components/signature-pad/SignaturePad.css +51 -50
- package/dist/components/skeleton/Skeleton.css +7 -5
- package/dist/components/slider/Slider.css +61 -59
- package/dist/components/spinner/Spinner.css +12 -12
- package/dist/components/split-button/SplitButton.css +12 -12
- package/dist/components/splitter/Splitter.css +63 -62
- package/dist/components/splitter/Splitter.js +2 -2
- package/dist/components/stack/Stack.css +4 -4
- package/dist/components/stack/Stack.js +3 -3
- package/dist/components/steps/Steps.css +89 -88
- package/dist/components/swap/Swap.css +7 -7
- package/dist/components/switch/Switch.css +59 -57
- package/dist/components/table/Table.css +58 -56
- package/dist/components/tabs/Tabs.css +64 -62
- package/dist/components/tag/Tag.css +45 -45
- package/dist/components/tags-input/TagsInput.css +93 -86
- package/dist/components/text/Text.css +23 -23
- package/dist/components/text/Text.js +1 -1
- package/dist/components/textarea/Textarea.css +27 -25
- package/dist/components/timer/Timer.css +38 -37
- package/dist/components/toast/Toast.css +94 -78
- package/dist/components/toggle/Toggle.css +66 -66
- package/dist/components/toggle-group/ToggleGroup.css +16 -16
- package/dist/components/tooltip/Tooltip.css +56 -52
- package/dist/components/tour/Tour.css +121 -117
- package/dist/components/tree-view/TreeView.css +91 -86
- package/dist/components/typeset/Typeset.css +317 -0
- package/dist/components/typeset/Typeset.d.ts +7 -0
- package/dist/components/typeset/Typeset.js +33 -0
- package/dist/components/typeset/Typeset.module.js +8 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/lib/moduix/presets/contrast.css +64 -0
- package/dist/lib/moduix/presets/dense.css +77 -0
- package/dist/lib/moduix/presets/soft.css +76 -0
- package/dist/lib/moduix/styles/reset.css +34 -1
- package/dist/lib/moduix/styles/style.css +230 -213
- package/dist/presets/contrast.d.ts +1 -0
- package/dist/presets/contrast.js +1 -0
- package/dist/presets/dense.d.ts +1 -0
- package/dist/presets/dense.js +1 -0
- package/dist/presets/soft.d.ts +1 -0
- package/dist/presets/soft.js +1 -0
- package/package.json +4 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer moduix.components {
|
|
2
2
|
.-ZBX5W_root {
|
|
3
3
|
box-sizing: border-box;
|
|
4
|
-
width: var(--tree-view-width, 20rem);
|
|
5
|
-
max-width: var(--tree-view-max-width, 100%);
|
|
6
|
-
gap: var(--tree-view-root-gap, var(--spacing-2));
|
|
4
|
+
width: var(--moduix-tree-view-width, 20rem);
|
|
5
|
+
max-width: var(--moduix-tree-view-max-width, 100%);
|
|
6
|
+
gap: var(--moduix-tree-view-root-gap, var(--moduix-spacing-2));
|
|
7
7
|
min-width: 0;
|
|
8
|
-
color: var(--tree-view-color, var(--color-foreground));
|
|
8
|
+
color: var(--moduix-tree-view-color, var(--moduix-color-foreground));
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
display: flex;
|
|
11
11
|
|
|
12
12
|
&[data-disabled] {
|
|
13
|
-
opacity: var(--tree-view-disabled-opacity, var(--opacity-disabled));
|
|
13
|
+
opacity: var(--moduix-tree-view-disabled-opacity, var(--moduix-opacity-disabled));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.-ZBX5W_label {
|
|
18
|
-
color: var(--tree-view-label-color, var(--tree-view-color, var(--color-foreground)));
|
|
19
|
-
font-size: var(--tree-view-label-font-size, var(--text-sm));
|
|
20
|
-
font-weight: var(--tree-view-label-font-weight, var(--weight-medium));
|
|
21
|
-
line-height: var(--tree-view-label-line-height, var(--line-height-text-sm));
|
|
18
|
+
color: var(--moduix-tree-view-label-color, var(--moduix-tree-view-color, var(--moduix-color-foreground)));
|
|
19
|
+
font-size: var(--moduix-tree-view-label-font-size, var(--moduix-text-sm));
|
|
20
|
+
font-weight: var(--moduix-tree-view-label-font-weight, var(--moduix-weight-medium));
|
|
21
|
+
line-height: var(--moduix-tree-view-label-line-height, var(--moduix-line-height-text-sm));
|
|
22
22
|
user-select: none;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.-ZBX5W_tree {
|
|
26
26
|
min-width: 0;
|
|
27
|
-
color: var(--tree-view-color, var(--color-foreground));
|
|
28
|
-
font-size: var(--tree-view-item-font-size, var(--text-sm));
|
|
29
|
-
line-height: var(--tree-view-item-line-height, var(--line-height-text-sm));
|
|
27
|
+
color: var(--moduix-tree-view-color, var(--moduix-color-foreground));
|
|
28
|
+
font-size: var(--moduix-tree-view-item-font-size, var(--moduix-text-sm));
|
|
29
|
+
line-height: var(--moduix-tree-view-item-line-height, var(--moduix-line-height-text-sm));
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
display: flex;
|
|
32
32
|
}
|
|
@@ -40,69 +40,71 @@
|
|
|
40
40
|
box-sizing: border-box;
|
|
41
41
|
width: 100%;
|
|
42
42
|
min-width: 0;
|
|
43
|
-
min-height: var(--tree-view-item-min-height,
|
|
43
|
+
min-height: var(--moduix-tree-view-item-min-height, var(--moduix-size-sm));
|
|
44
44
|
align-items: center;
|
|
45
|
-
gap: var(--tree-view-item-gap, var(--spacing-2));
|
|
46
|
-
border: var(--tree-view-item-border-width, 0) solid
|
|
47
|
-
var(--tree-view-item-border-color, transparent);
|
|
48
|
-
border-radius: var(--tree-view-item-radius, var(--radius-sm));
|
|
49
|
-
padding-block: var(--tree-view-item-padding-y, var(--spacing-1));
|
|
50
|
-
background-color: var(--tree-view-item-bg, transparent);
|
|
51
|
-
color: var(--tree-view-item-color, var(--tree-view-color, var(--color-foreground)));
|
|
45
|
+
gap: var(--moduix-tree-view-item-gap, var(--moduix-spacing-2));
|
|
46
|
+
border: var(--moduix-tree-view-item-border-width, 0) solid
|
|
47
|
+
var(--moduix-tree-view-item-border-color, transparent);
|
|
48
|
+
border-radius: var(--moduix-tree-view-item-radius, var(--moduix-radius-sm));
|
|
49
|
+
padding-block: var(--moduix-tree-view-item-padding-y, var(--moduix-spacing-1));
|
|
50
|
+
background-color: var(--moduix-tree-view-item-bg, transparent);
|
|
51
|
+
color: var(--moduix-tree-view-item-color, var(--moduix-tree-view-color, var(--moduix-color-foreground)));
|
|
52
52
|
cursor: pointer;
|
|
53
53
|
font: inherit;
|
|
54
|
-
outline: var(--tree-view-focus-ring-width, var(--border-width-sm))
|
|
55
|
-
|
|
54
|
+
outline: var(--moduix-tree-view-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm)))
|
|
55
|
+
solid transparent;
|
|
56
|
+
outline-offset: calc(var(--moduix-tree-view-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm))) *
|
|
57
|
+
-1);
|
|
56
58
|
text-align: start;
|
|
57
|
-
transition: background-color var(--tree-view-transition, var(--transition-default)),
|
|
58
|
-
color var(--tree-view-transition, var(--transition-default)),
|
|
59
|
-
outline-color var(--tree-view-transition, var(--transition-default)),
|
|
60
|
-
opacity var(--tree-view-transition, var(--transition-default));
|
|
59
|
+
transition: background-color var(--moduix-tree-view-transition, var(--moduix-transition-default)),
|
|
60
|
+
color var(--moduix-tree-view-transition, var(--moduix-transition-default)),
|
|
61
|
+
outline-color var(--moduix-tree-view-transition, var(--moduix-transition-default)),
|
|
62
|
+
opacity var(--moduix-tree-view-transition, var(--moduix-transition-default));
|
|
61
63
|
user-select: none;
|
|
62
|
-
padding-inline-start: calc(var(--tree-view-item-padding-x, var(--spacing-2)) +
|
|
63
|
-
((var(--depth, 1) - 1) * var(--tree-view-indent, 1rem)));
|
|
64
|
-
padding-inline-end: var(--tree-view-item-padding-x, var(--spacing-2));
|
|
64
|
+
padding-inline-start: calc(var(--moduix-tree-view-item-padding-x, var(--moduix-spacing-2)) +
|
|
65
|
+
((var(--depth, 1) - 1) * var(--moduix-tree-view-indent, 1rem)));
|
|
66
|
+
padding-inline-end: var(--moduix-tree-view-item-padding-x, var(--moduix-spacing-2));
|
|
65
67
|
text-decoration: none;
|
|
66
68
|
display: flex;
|
|
67
69
|
|
|
68
70
|
&:hover {
|
|
69
|
-
background-color: var(--tree-view-item-hover-bg, var(--color-accent));
|
|
70
|
-
color: var(--tree-view-item-hover-color, var(--color-accent-foreground));
|
|
71
|
+
background-color: var(--moduix-tree-view-item-hover-bg, var(--moduix-color-accent));
|
|
72
|
+
color: var(--moduix-tree-view-item-hover-color, var(--moduix-color-accent-foreground));
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
&:focus-visible, &[data-focus] {
|
|
74
|
-
outline-color: var(--tree-view-focus-ring-color, var(--color-ring));
|
|
76
|
+
outline-color: var(--moduix-tree-view-focus-ring-color, var(--moduix-color-ring));
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
&[data-selected] {
|
|
78
|
-
background-color: var(--tree-view-item-selected-bg, var(--color-accent));
|
|
79
|
-
color: var(--tree-view-item-selected-color, var(--color-accent-foreground));
|
|
80
|
+
background-color: var(--moduix-tree-view-item-selected-bg, var(--moduix-color-accent));
|
|
81
|
+
color: var(--moduix-tree-view-item-selected-color, var(--moduix-color-accent-foreground));
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
&[data-disabled] {
|
|
83
|
-
color: var(--tree-view-item-disabled-color, var(--color-muted-foreground));
|
|
85
|
+
color: var(--moduix-tree-view-item-disabled-color, var(--moduix-color-muted-foreground));
|
|
84
86
|
cursor: default;
|
|
85
|
-
opacity: var(--tree-view-disabled-opacity, var(--opacity-disabled));
|
|
87
|
+
opacity: var(--moduix-tree-view-disabled-opacity, var(--moduix-opacity-disabled));
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
.-ZBX5W_branchTrigger, .-ZBX5W_branchIndicator, .-ZBX5W_itemIndicator {
|
|
90
|
-
width: var(--tree-view-indicator-size,
|
|
91
|
-
height: var(--tree-view-indicator-size,
|
|
92
|
-
flex: 0 0 var(--tree-view-indicator-size,
|
|
93
|
-
color: var(--tree-view-indicator-color, currentColor);
|
|
92
|
+
width: var(--moduix-tree-view-indicator-size, var(--moduix-spacing-4));
|
|
93
|
+
height: var(--moduix-tree-view-indicator-size, var(--moduix-spacing-4));
|
|
94
|
+
flex: 0 0 var(--moduix-tree-view-indicator-size, var(--moduix-spacing-4));
|
|
95
|
+
color: var(--moduix-tree-view-indicator-color, currentColor);
|
|
94
96
|
justify-content: center;
|
|
95
97
|
align-items: center;
|
|
96
98
|
display: inline-flex;
|
|
97
99
|
|
|
98
100
|
& svg {
|
|
99
|
-
width: var(--tree-view-indicator-icon-size,
|
|
100
|
-
height: var(--tree-view-indicator-icon-size,
|
|
101
|
+
width: var(--moduix-tree-view-indicator-icon-size, var(--moduix-spacing-3-5));
|
|
102
|
+
height: var(--moduix-tree-view-indicator-icon-size, var(--moduix-spacing-3-5));
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
.-ZBX5W_branchTrigger, .-ZBX5W_branchIndicator {
|
|
105
|
-
transition: transform var(--tree-view-transition, var(--transition-default));
|
|
107
|
+
transition: transform var(--moduix-tree-view-transition, var(--moduix-transition-default));
|
|
106
108
|
|
|
107
109
|
&[data-state="open"] {
|
|
108
110
|
transform: rotate(90deg);
|
|
@@ -111,7 +113,7 @@
|
|
|
111
113
|
|
|
112
114
|
.-ZBX5W_branchText, .-ZBX5W_itemText {
|
|
113
115
|
align-items: center;
|
|
114
|
-
gap: var(--tree-view-item-text-gap, var(--spacing-2));
|
|
116
|
+
gap: var(--moduix-tree-view-item-text-gap, var(--moduix-spacing-2));
|
|
115
117
|
text-overflow: ellipsis;
|
|
116
118
|
white-space: nowrap;
|
|
117
119
|
flex: 1;
|
|
@@ -120,9 +122,9 @@
|
|
|
120
122
|
overflow: hidden;
|
|
121
123
|
|
|
122
124
|
& svg {
|
|
123
|
-
width: var(--tree-view-node-icon-size,
|
|
124
|
-
height: var(--tree-view-node-icon-size,
|
|
125
|
-
flex: 0 0 var(--tree-view-node-icon-size,
|
|
125
|
+
width: var(--moduix-tree-view-node-icon-size, var(--moduix-spacing-4));
|
|
126
|
+
height: var(--moduix-tree-view-node-icon-size, var(--moduix-spacing-4));
|
|
127
|
+
flex: 0 0 var(--moduix-tree-view-node-icon-size, var(--moduix-spacing-4));
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
@@ -132,64 +134,65 @@
|
|
|
132
134
|
overflow: hidden;
|
|
133
135
|
|
|
134
136
|
&[data-state="open"] {
|
|
135
|
-
animation: -ZBX5W_tree-view-slide-down var(--tree-view-content-transition-duration, .15s) ease-out,
|
|
136
|
-
-ZBX5W_tree-view-fade-in var(--tree-view-content-transition-duration, .15s) ease-out;
|
|
137
|
+
animation: -ZBX5W_tree-view-slide-down var(--moduix-tree-view-content-transition-duration, .15s) ease-out,
|
|
138
|
+
-ZBX5W_tree-view-fade-in var(--moduix-tree-view-content-transition-duration, .15s) ease-out;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
&[data-state="closed"] {
|
|
140
|
-
animation: -ZBX5W_tree-view-slide-up var(--tree-view-content-transition-duration, .15s) ease-out,
|
|
141
|
-
-ZBX5W_tree-view-fade-out var(--tree-view-content-transition-duration, .15s) ease-out;
|
|
142
|
+
animation: -ZBX5W_tree-view-slide-up var(--moduix-tree-view-content-transition-duration, .15s) ease-out,
|
|
143
|
+
-ZBX5W_tree-view-fade-out var(--moduix-tree-view-content-transition-duration, .15s) ease-out;
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
.-ZBX5W_branchIndentGuide {
|
|
146
148
|
z-index: 1;
|
|
147
|
-
width: var(--tree-view-indent-guide-width, var(--border-width-sm));
|
|
148
|
-
background-color: var(--tree-view-indent-guide-color, var(--color-border));
|
|
149
|
+
width: var(--moduix-tree-view-indent-guide-width, var(--moduix-border-width-sm));
|
|
150
|
+
background-color: var(--moduix-tree-view-indent-guide-color, var(--moduix-color-border));
|
|
149
151
|
top: 0;
|
|
150
152
|
bottom: 0;
|
|
151
153
|
position: absolute;
|
|
152
|
-
inset-inline-start: calc(var(--tree-view-item-padding-x, var(--spacing-2)) +
|
|
153
|
-
((var(--depth, 1) - 1) * var(--tree-view-indent, 1rem)) +
|
|
154
|
-
(var(--tree-view-indicator-size,
|
|
154
|
+
inset-inline-start: calc(var(--moduix-tree-view-item-padding-x, var(--moduix-spacing-2)) +
|
|
155
|
+
((var(--depth, 1) - 1) * var(--moduix-tree-view-indent, 1rem)) +
|
|
156
|
+
(var(--moduix-tree-view-indicator-size, var(--moduix-spacing-4)) / 2));
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
.-ZBX5W_nodeCheckbox {
|
|
158
160
|
box-sizing: border-box;
|
|
159
|
-
width: var(--tree-view-checkbox-size,
|
|
160
|
-
height: var(--tree-view-checkbox-size,
|
|
161
|
-
flex: 0 0 var(--tree-view-checkbox-size,
|
|
162
|
-
border: var(--tree-view-checkbox-border-width, var(--border-width-sm)) solid
|
|
163
|
-
var(--tree-view-checkbox-border-color, var(--color-border));
|
|
164
|
-
border-radius: var(--tree-view-checkbox-radius, var(--radius-xs));
|
|
165
|
-
background-color: var(--tree-view-checkbox-bg, var(--color-background));
|
|
166
|
-
color: var(--tree-view-checkbox-color, var(--color-primary-foreground));
|
|
167
|
-
outline: var(--tree-view-focus-ring-width, var(--border-width-sm))
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
width: var(--moduix-tree-view-checkbox-size, var(--moduix-spacing-4));
|
|
162
|
+
height: var(--moduix-tree-view-checkbox-size, var(--moduix-spacing-4));
|
|
163
|
+
flex: 0 0 var(--moduix-tree-view-checkbox-size, var(--moduix-spacing-4));
|
|
164
|
+
border: var(--moduix-tree-view-checkbox-border-width, var(--moduix-border-width-sm)) solid
|
|
165
|
+
var(--moduix-tree-view-checkbox-border-color, var(--moduix-color-border));
|
|
166
|
+
border-radius: var(--moduix-tree-view-checkbox-radius, var(--moduix-radius-xs));
|
|
167
|
+
background-color: var(--moduix-tree-view-checkbox-bg, var(--moduix-color-background));
|
|
168
|
+
color: var(--moduix-tree-view-checkbox-color, var(--moduix-color-primary-foreground));
|
|
169
|
+
outline: var(--moduix-tree-view-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm)))
|
|
170
|
+
solid transparent;
|
|
171
|
+
outline-offset: var(--moduix-tree-view-checkbox-focus-ring-offset, var(--moduix-border-width-sm));
|
|
172
|
+
transition: background-color var(--moduix-tree-view-transition, var(--moduix-transition-default)),
|
|
173
|
+
border-color var(--moduix-tree-view-transition, var(--moduix-transition-default)),
|
|
174
|
+
outline-color var(--moduix-tree-view-transition, var(--moduix-transition-default));
|
|
172
175
|
justify-content: center;
|
|
173
176
|
align-items: center;
|
|
174
177
|
display: inline-flex;
|
|
175
178
|
|
|
176
179
|
&[data-state="checked"], &[data-state="indeterminate"] {
|
|
177
|
-
border-color: var(--tree-view-checkbox-checked-bg, var(--color-primary));
|
|
178
|
-
background-color: var(--tree-view-checkbox-checked-bg, var(--color-primary));
|
|
180
|
+
border-color: var(--moduix-tree-view-checkbox-checked-bg, var(--moduix-color-primary));
|
|
181
|
+
background-color: var(--moduix-tree-view-checkbox-checked-bg, var(--moduix-color-primary));
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
&:focus-visible {
|
|
182
|
-
outline-color: var(--tree-view-focus-ring-color, var(--color-ring));
|
|
185
|
+
outline-color: var(--moduix-tree-view-focus-ring-color, var(--moduix-color-ring));
|
|
183
186
|
}
|
|
184
187
|
|
|
185
188
|
&[data-disabled] {
|
|
186
189
|
cursor: default;
|
|
187
|
-
opacity: var(--tree-view-disabled-opacity, var(--opacity-disabled));
|
|
190
|
+
opacity: var(--moduix-tree-view-disabled-opacity, var(--moduix-opacity-disabled));
|
|
188
191
|
}
|
|
189
192
|
|
|
190
193
|
& svg {
|
|
191
|
-
width: var(--tree-view-checkbox-icon-size,
|
|
192
|
-
height: var(--tree-view-checkbox-icon-size,
|
|
194
|
+
width: var(--moduix-tree-view-checkbox-icon-size, var(--moduix-spacing-3));
|
|
195
|
+
height: var(--moduix-tree-view-checkbox-icon-size, var(--moduix-spacing-3));
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
198
|
|
|
@@ -201,21 +204,23 @@
|
|
|
201
204
|
|
|
202
205
|
.-ZBX5W_nodeRenameInput {
|
|
203
206
|
box-sizing: border-box;
|
|
204
|
-
border: var(--tree-view-rename-input-border-width, var(--border-width-sm)) solid
|
|
205
|
-
var(--tree-view-rename-input-border-color, var(--color-ring));
|
|
206
|
-
border-radius: var(--tree-view-rename-input-radius, var(--radius-xs));
|
|
207
|
+
border: var(--moduix-tree-view-rename-input-border-width, var(--moduix-border-width-sm)) solid
|
|
208
|
+
var(--moduix-tree-view-rename-input-border-color, var(--moduix-color-ring));
|
|
209
|
+
border-radius: var(--moduix-tree-view-rename-input-radius, var(--moduix-radius-xs));
|
|
207
210
|
min-width: 0;
|
|
208
|
-
padding-block: var(--tree-view-rename-input-padding-y, 0);
|
|
209
|
-
padding-inline: var(--tree-view-rename-input-padding-x, var(--spacing-1));
|
|
210
|
-
background-color: var(--tree-view-rename-input-bg, var(--color-background));
|
|
211
|
-
color: var(--tree-view-rename-input-color, var(--color-foreground));
|
|
211
|
+
padding-block: var(--moduix-tree-view-rename-input-padding-y, 0);
|
|
212
|
+
padding-inline: var(--moduix-tree-view-rename-input-padding-x, var(--moduix-spacing-1));
|
|
213
|
+
background-color: var(--moduix-tree-view-rename-input-bg, var(--moduix-color-background));
|
|
214
|
+
color: var(--moduix-tree-view-rename-input-color, var(--moduix-color-foreground));
|
|
212
215
|
font: inherit;
|
|
213
|
-
outline: var(--tree-view-focus-ring-width, var(--border-width-sm))
|
|
214
|
-
|
|
216
|
+
outline: var(--moduix-tree-view-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm)))
|
|
217
|
+
solid transparent;
|
|
218
|
+
outline-offset: calc(var(--moduix-tree-view-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm))) *
|
|
219
|
+
-1);
|
|
215
220
|
flex: 1;
|
|
216
221
|
|
|
217
222
|
&:focus-visible {
|
|
218
|
-
outline-color: var(--tree-view-focus-ring-color, var(--color-ring));
|
|
223
|
+
outline-color: var(--moduix-tree-view-focus-ring-color, var(--moduix-color-ring));
|
|
219
224
|
}
|
|
220
225
|
}
|
|
221
226
|
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
@layer moduix.components {
|
|
2
|
+
._3-ErqG_root {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
color: var(--moduix-color-foreground);
|
|
5
|
+
font-family: var(--moduix-typeset-font-body, inherit);
|
|
6
|
+
font-size: calc(var(--moduix-typeset-size, 1em) * 1.125);
|
|
7
|
+
line-height: var(--moduix-typeset-leading, 1.75);
|
|
8
|
+
overflow-wrap: break-word;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media (width >= 48rem), print {
|
|
12
|
+
._3-ErqG_root {
|
|
13
|
+
font-size: var(--moduix-typeset-size, 1em);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
._3-ErqG_root {
|
|
18
|
+
& :not(:where(.not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] *)) {
|
|
19
|
+
&:where(p) {
|
|
20
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:where(h1, h2, h3, h4, h5, h6) {
|
|
24
|
+
color: var(--moduix-color-foreground);
|
|
25
|
+
font-family: var(--moduix-typeset-font-heading, var(--moduix-font-sans));
|
|
26
|
+
font-weight: var(--moduix-weight-semibold);
|
|
27
|
+
letter-spacing: -.02em;
|
|
28
|
+
margin-block-end: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:where(h1) {
|
|
32
|
+
margin-block-start: var(--moduix-typeset-flow, 1.25em);
|
|
33
|
+
font-size: 1.75em;
|
|
34
|
+
line-height: 1.3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:where(h2) {
|
|
38
|
+
margin-block-start: calc(var(--moduix-typeset-flow, 1.25em) * 1.4);
|
|
39
|
+
font-size: 1.25em;
|
|
40
|
+
line-height: 1.4;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:where(h3) {
|
|
44
|
+
margin-block-start: var(--moduix-typeset-flow, 1.25em);
|
|
45
|
+
font-size: 1.125em;
|
|
46
|
+
line-height: 1.45;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:where(h4) {
|
|
50
|
+
margin-block-start: var(--moduix-typeset-flow, 1.25em);
|
|
51
|
+
font-size: 1em;
|
|
52
|
+
line-height: 1.5;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:where(h5) {
|
|
56
|
+
color: var(--moduix-color-muted-foreground);
|
|
57
|
+
font-size: .875em;
|
|
58
|
+
font-weight: var(--moduix-weight-medium);
|
|
59
|
+
margin-block-start: calc(var(--moduix-typeset-flow, 1.25em) / .875);
|
|
60
|
+
line-height: 1.5;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:where(h6) {
|
|
64
|
+
color: var(--moduix-color-muted-foreground);
|
|
65
|
+
font-size: .8125em;
|
|
66
|
+
font-weight: var(--moduix-weight-medium);
|
|
67
|
+
letter-spacing: .08em;
|
|
68
|
+
text-transform: uppercase;
|
|
69
|
+
margin-block-start: calc(var(--moduix-typeset-flow, 1.25em) / .8125);
|
|
70
|
+
line-height: 1.5;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:where([id]) {
|
|
74
|
+
scroll-margin-block-start: var(--moduix-typeset-flow, 1.25em);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {
|
|
78
|
+
margin-block-start: 1em;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:where(a) {
|
|
82
|
+
color: var(--moduix-color-primary);
|
|
83
|
+
text-underline-offset: .15em;
|
|
84
|
+
text-decoration: underline .08em;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:where(ul, ol) {
|
|
88
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
89
|
+
padding-inline-start: 1.5em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:where(ul) {
|
|
93
|
+
list-style: outside;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:where(ol) {
|
|
97
|
+
list-style: decimal;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:where(ul ul) {
|
|
101
|
+
list-style: circle;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:where(ul ul ul) {
|
|
105
|
+
list-style: square;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:where(ol ol) {
|
|
109
|
+
list-style: lower-alpha;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:where(ol ol ol) {
|
|
113
|
+
list-style: lower-roman;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:where(li)::marker {
|
|
117
|
+
color: var(--moduix-color-muted-foreground);
|
|
118
|
+
font-weight: var(--moduix-weight-semibold);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:where(li + li) {
|
|
122
|
+
margin-block-start: .25em;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:where(li > ul, li > ol) {
|
|
126
|
+
margin-block-start: .5em;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:where(ul.contains-task-list) {
|
|
130
|
+
padding-inline-start: .25em;
|
|
131
|
+
list-style: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:where(li.task-list-item > input[type="checkbox"]) {
|
|
135
|
+
vertical-align: -.1em;
|
|
136
|
+
accent-color: var(--moduix-color-primary);
|
|
137
|
+
margin-inline-end: .5em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:where(blockquote) {
|
|
141
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
142
|
+
border-inline-start: var(--moduix-border-width-md) solid var(--moduix-color-border);
|
|
143
|
+
color: var(--moduix-color-muted-foreground);
|
|
144
|
+
margin-inline: 0;
|
|
145
|
+
padding-inline-start: 1em;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:where(:not(pre) > code) {
|
|
149
|
+
border-radius: var(--moduix-radius-sm);
|
|
150
|
+
background: var(--moduix-color-muted);
|
|
151
|
+
color: var(--moduix-color-foreground);
|
|
152
|
+
font-family: var(--moduix-typeset-font-mono, var(--moduix-font-mono));
|
|
153
|
+
padding: .1em .3em;
|
|
154
|
+
font-size: .875em;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:where(pre) {
|
|
158
|
+
max-width: 100%;
|
|
159
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
160
|
+
border: var(--moduix-border-width-sm) solid var(--moduix-color-border);
|
|
161
|
+
border-radius: var(--moduix-radius-md);
|
|
162
|
+
background: var(--moduix-color-muted);
|
|
163
|
+
color: var(--moduix-color-foreground);
|
|
164
|
+
font-family: var(--moduix-typeset-font-mono, var(--moduix-font-mono));
|
|
165
|
+
padding: 1em;
|
|
166
|
+
font-size: .875em;
|
|
167
|
+
line-height: 1.6;
|
|
168
|
+
overflow-x: auto;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&:where(pre > code) {
|
|
172
|
+
color: inherit;
|
|
173
|
+
font: inherit;
|
|
174
|
+
background: none;
|
|
175
|
+
border-radius: 0;
|
|
176
|
+
padding: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:where(hr) {
|
|
180
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
181
|
+
border: 0;
|
|
182
|
+
border-block-start: var(--moduix-border-width-sm) solid var(--moduix-color-border);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:where(table) {
|
|
186
|
+
width: 100%;
|
|
187
|
+
max-width: 100%;
|
|
188
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
189
|
+
border-collapse: separate;
|
|
190
|
+
border-spacing: 0;
|
|
191
|
+
border-block-end: var(--moduix-border-width-sm) solid var(--moduix-color-border);
|
|
192
|
+
font-variant-numeric: tabular-nums;
|
|
193
|
+
font-size: 1em;
|
|
194
|
+
line-height: 1.5;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:where(thead th) {
|
|
198
|
+
font-weight: var(--moduix-weight-medium);
|
|
199
|
+
text-align: start;
|
|
200
|
+
white-space: nowrap;
|
|
201
|
+
padding: .65em 1em;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&:where(:is(tbody, tfoot) :is(td, th)) {
|
|
205
|
+
border-block-start: var(--moduix-border-width-sm) solid var(--moduix-color-border);
|
|
206
|
+
text-align: start;
|
|
207
|
+
vertical-align: top;
|
|
208
|
+
padding: .75em 1em;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&:where(tbody th, tfoot th) {
|
|
212
|
+
font-weight: var(--moduix-weight-medium);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:where(th:first-child, td:first-child) {
|
|
216
|
+
padding-inline-start: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:where(th[align="center"], td[align="center"]) {
|
|
220
|
+
text-align: center;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&:where(th[align="right"], td[align="right"]) {
|
|
224
|
+
text-align: end;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&:where(img, video) {
|
|
228
|
+
max-width: 100%;
|
|
229
|
+
height: auto;
|
|
230
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
231
|
+
border-radius: var(--moduix-radius-md);
|
|
232
|
+
display: block;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:where(p img) {
|
|
236
|
+
margin-block-start: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&:where(figure) {
|
|
240
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
241
|
+
margin-inline: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
&:where(figcaption, caption) {
|
|
245
|
+
color: var(--moduix-color-muted-foreground);
|
|
246
|
+
text-align: center;
|
|
247
|
+
margin-block-start: .75em;
|
|
248
|
+
font-size: .875em;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&:where(caption) {
|
|
252
|
+
caption-side: bottom;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:where(details) {
|
|
256
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&:where(summary) {
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
font-weight: var(--moduix-weight-medium);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&:where(summary)::marker {
|
|
265
|
+
color: var(--moduix-color-muted-foreground);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&:where(dl) {
|
|
269
|
+
margin-block: var(--moduix-typeset-flow, 1.25em) 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
&:where(dt) {
|
|
273
|
+
font-weight: var(--moduix-weight-medium);
|
|
274
|
+
margin-block-start: 1em;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&:where(dt + dt) {
|
|
278
|
+
margin-block-start: .25em;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&:where(dd) {
|
|
282
|
+
color: var(--moduix-color-muted-foreground);
|
|
283
|
+
margin-block-start: .25em;
|
|
284
|
+
margin-inline-start: 0;
|
|
285
|
+
padding-inline-start: 1em;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&:where(.footnotes, [data-footnotes]) {
|
|
289
|
+
margin-block: calc(var(--moduix-typeset-flow, 1.25em) * 2) 0;
|
|
290
|
+
border-block-start: var(--moduix-border-width-sm) solid var(--moduix-color-border);
|
|
291
|
+
color: var(--moduix-color-muted-foreground);
|
|
292
|
+
padding-block-start: var(--moduix-typeset-flow, 1.25em);
|
|
293
|
+
font-size: .875em;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
._3-ErqG_root > :where(:first-child):not(:where(.not-typeset, [data-not-typeset])), ._3-ErqG_root :where(li > :first-child, blockquote > :first-child, td > :first-child, th > :first-child, dd > :first-child, figure > :first-child, figure > picture > img):not(:where(.not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] *)) {
|
|
299
|
+
margin-block-start: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
._3-ErqG_scroll {
|
|
303
|
+
max-width: 100%;
|
|
304
|
+
overscroll-behavior-inline: contain;
|
|
305
|
+
margin-block-start: var(--moduix-typeset-flow, 1.25em);
|
|
306
|
+
overflow-x: auto;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
._3-ErqG_root > ._3-ErqG_scroll:first-child, ._3-ErqG_root ._3-ErqG_scroll > * {
|
|
310
|
+
margin-block-start: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
._3-ErqG_root ._3-ErqG_scroll table {
|
|
314
|
+
width: max-content;
|
|
315
|
+
max-width: none;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/components/typeset/Typeset.d.ts
|
|
2
|
+
declare const Typeset: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
Scroll: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Typeset };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import Typeset_module_default from "./Typeset.module.js";
|
|
3
|
+
import { ark } from "@ark-ui/react/factory";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/typeset/Typeset.tsx
|
|
8
|
+
const TypesetRoot = forwardRef(function TypesetRoot({ className, ...props }, ref) {
|
|
9
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
10
|
+
ref,
|
|
11
|
+
"data-scope": "typeset",
|
|
12
|
+
"data-part": "root",
|
|
13
|
+
"data-slot": "typeset",
|
|
14
|
+
className: clsx(Typeset_module_default.root, normalizeClassName(className)),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
const TypesetScroll = forwardRef(function TypesetScroll({ className, ...props }, ref) {
|
|
19
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
20
|
+
ref,
|
|
21
|
+
"data-scope": "typeset",
|
|
22
|
+
"data-part": "scroll",
|
|
23
|
+
"data-slot": "typeset-scroll",
|
|
24
|
+
className: clsx(Typeset_module_default.scroll, normalizeClassName(className)),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const Typeset = Object.assign(TypesetRoot, {
|
|
29
|
+
Root: TypesetRoot,
|
|
30
|
+
Scroll: TypesetScroll
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Typeset };
|