@duskmoon-dev/core 1.1.1 → 1.3.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 (33) hide show
  1. package/dist/components/checkbox.css +231 -0
  2. package/dist/components/collapse.css +208 -8
  3. package/dist/components/datepicker.css +404 -10
  4. package/dist/components/form-group.css +308 -0
  5. package/dist/components/index.css +4598 -816
  6. package/dist/components/multi-select.css +491 -0
  7. package/dist/components/navigation.css +346 -2
  8. package/dist/components/otp-input.css +195 -0
  9. package/dist/components/pin-input.css +184 -0
  10. package/dist/components/radio.css +183 -0
  11. package/dist/components/segment-control.css +186 -0
  12. package/dist/components/select.css +205 -0
  13. package/dist/components/switch.css +150 -193
  14. package/dist/components/textarea.css +202 -0
  15. package/dist/components/time-input.css +252 -0
  16. package/dist/components/tree-select.css +439 -0
  17. package/dist/esm/components/checkbox.js +238 -0
  18. package/dist/esm/components/collapse.js +208 -8
  19. package/dist/esm/components/datepicker.js +404 -10
  20. package/dist/esm/components/form-group.js +315 -0
  21. package/dist/esm/components/multi-select.js +498 -0
  22. package/dist/esm/components/navigation.js +346 -2
  23. package/dist/esm/components/otp-input.js +202 -0
  24. package/dist/esm/components/pin-input.js +191 -0
  25. package/dist/esm/components/radio.js +190 -0
  26. package/dist/esm/components/segment-control.js +193 -0
  27. package/dist/esm/components/select.js +212 -0
  28. package/dist/esm/components/switch.js +150 -193
  29. package/dist/esm/components/textarea.js +209 -0
  30. package/dist/esm/components/time-input.js +259 -0
  31. package/dist/esm/components/tree-select.js +446 -0
  32. package/dist/index.css +4402 -620
  33. package/package.json +56 -1
@@ -0,0 +1,209 @@
1
+ // Auto-generated from textarea.css
2
+ export const css = `/**
3
+ * Textarea Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired multi-line text input
5
+ */
6
+
7
+ @layer components {
8
+ /* Base Textarea */
9
+ .textarea {
10
+ display: block;
11
+ width: 100%;
12
+ min-height: 6rem;
13
+ padding: 0.75rem 1rem;
14
+ font-size: 1rem;
15
+ line-height: 1.5rem;
16
+ font-family: inherit;
17
+ color: var(--color-on-surface);
18
+ background-color: var(--color-surface);
19
+ border: 1px solid var(--color-outline);
20
+ border-radius: 0.5rem;
21
+ outline: none;
22
+ resize: vertical;
23
+ transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
24
+ }
25
+
26
+ .textarea::placeholder {
27
+ color: var(--color-on-surface-variant);
28
+ opacity: 0.7;
29
+ }
30
+
31
+ .textarea:hover:not(:disabled) {
32
+ border-color: var(--color-on-surface-variant);
33
+ }
34
+
35
+ .textarea:focus {
36
+ outline: none;
37
+ }
38
+
39
+ .textarea:focus-visible {
40
+ border-color: var(--color-primary);
41
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
42
+ }
43
+
44
+ .textarea:disabled {
45
+ cursor: not-allowed;
46
+ opacity: 0.5;
47
+ background-color: var(--color-surface-container);
48
+ resize: none;
49
+ }
50
+
51
+ .textarea[readonly] {
52
+ background-color: var(--color-surface-container);
53
+ cursor: default;
54
+ }
55
+
56
+ /* Filled Variant */
57
+ .textarea-filled {
58
+ background-color: var(--color-surface-container);
59
+ border: none;
60
+ border-bottom: 2px solid var(--color-outline);
61
+ border-radius: 0.5rem 0.5rem 0 0;
62
+ }
63
+
64
+ .textarea-filled:hover:not(:disabled) {
65
+ background-color: var(--color-surface-container-high);
66
+ border-bottom-color: var(--color-on-surface);
67
+ }
68
+
69
+ .textarea-filled:focus-visible {
70
+ border-bottom-color: var(--color-primary);
71
+ box-shadow: none;
72
+ }
73
+
74
+ /* Outlined Variant (default) */
75
+ .textarea-outlined {
76
+ background-color: transparent;
77
+ border: 1px solid var(--color-outline);
78
+ border-radius: 0.5rem;
79
+ }
80
+
81
+ /* Ghost Variant */
82
+ .textarea-ghost {
83
+ background-color: transparent;
84
+ border-color: transparent;
85
+ }
86
+
87
+ .textarea-ghost:hover:not(:disabled) {
88
+ background-color: var(--color-surface-container);
89
+ border-color: transparent;
90
+ }
91
+
92
+ .textarea-ghost:focus-visible {
93
+ background-color: var(--color-surface-container);
94
+ border-color: transparent;
95
+ box-shadow: none;
96
+ }
97
+
98
+ /* Color Variants */
99
+ .textarea-primary:focus-visible {
100
+ border-color: var(--color-primary);
101
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
102
+ }
103
+
104
+ .textarea-secondary:focus-visible {
105
+ border-color: var(--color-secondary);
106
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
107
+ }
108
+
109
+ .textarea-tertiary:focus-visible {
110
+ border-color: var(--color-tertiary);
111
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
112
+ }
113
+
114
+ /* Semantic Colors */
115
+ .textarea-error {
116
+ border-color: var(--color-error);
117
+ }
118
+
119
+ .textarea-error:focus-visible {
120
+ border-color: var(--color-error);
121
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
122
+ }
123
+
124
+ .textarea-success {
125
+ border-color: var(--color-success);
126
+ }
127
+
128
+ .textarea-success:focus-visible {
129
+ border-color: var(--color-success);
130
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
131
+ }
132
+
133
+ .textarea-warning {
134
+ border-color: var(--color-warning);
135
+ }
136
+
137
+ .textarea-warning:focus-visible {
138
+ border-color: var(--color-warning);
139
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
140
+ }
141
+
142
+ /* Size Variants */
143
+ .textarea-sm {
144
+ min-height: 4rem;
145
+ padding: 0.5rem 0.75rem;
146
+ font-size: 0.875rem;
147
+ line-height: 1.25rem;
148
+ border-radius: 0.375rem;
149
+ }
150
+
151
+ .textarea-lg {
152
+ min-height: 8rem;
153
+ padding: 1rem 1.25rem;
154
+ font-size: 1.125rem;
155
+ line-height: 1.75rem;
156
+ border-radius: 0.625rem;
157
+ }
158
+
159
+ /* Resize Options */
160
+ .textarea-resize-none {
161
+ resize: none;
162
+ }
163
+
164
+ .textarea-resize-horizontal {
165
+ resize: horizontal;
166
+ }
167
+
168
+ .textarea-resize-both {
169
+ resize: both;
170
+ }
171
+
172
+ /* Auto-resize (requires JS) */
173
+ .textarea-autosize {
174
+ resize: none;
175
+ overflow: hidden;
176
+ }
177
+
178
+ /* Character Counter */
179
+ .textarea-wrapper {
180
+ position: relative;
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: 0.25rem;
184
+ }
185
+
186
+ .textarea-counter {
187
+ font-size: 0.75rem;
188
+ line-height: 1rem;
189
+ color: var(--color-on-surface-variant);
190
+ text-align: right;
191
+ }
192
+
193
+ .textarea-counter-error {
194
+ color: var(--color-error);
195
+ }
196
+
197
+ /* Reduce Motion */
198
+ @media (prefers-reduced-motion: reduce) {
199
+ .textarea {
200
+ transition: none;
201
+ }
202
+ }
203
+ }
204
+ `;
205
+
206
+ const sheet = new CSSStyleSheet();
207
+ sheet.replaceSync(css);
208
+ export const styles = sheet;
209
+ export default sheet;
@@ -0,0 +1,259 @@
1
+ // Auto-generated from time-input.css
2
+ export const css = `/**
3
+ * Time Input Component Styles
4
+ * DuskMoonUI - Time selection input component
5
+ */
6
+
7
+ @layer components {
8
+ /* Base Time Input */
9
+ .time-input {
10
+ position: relative;
11
+ display: inline-flex;
12
+ align-items: center;
13
+ width: 100%;
14
+ }
15
+
16
+ .time-input-field {
17
+ display: flex;
18
+ width: 100%;
19
+ padding: 0.75rem 2.5rem 0.75rem 1rem;
20
+ font-size: 1rem;
21
+ line-height: 1.5rem;
22
+ color: var(--color-on-surface);
23
+ background-color: var(--color-surface);
24
+ border: 1px solid var(--color-outline);
25
+ border-radius: 0.5rem;
26
+ outline: none;
27
+ transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
28
+ }
29
+
30
+ .time-input-field:hover:not(:disabled) {
31
+ border-color: var(--color-on-surface-variant);
32
+ }
33
+
34
+ .time-input-field:focus {
35
+ border-color: var(--color-primary);
36
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
37
+ }
38
+
39
+ .time-input-field:disabled {
40
+ cursor: not-allowed;
41
+ opacity: 0.5;
42
+ background-color: var(--color-surface-container);
43
+ }
44
+
45
+ /* Time Icon */
46
+ .time-input-icon {
47
+ position: absolute;
48
+ right: 0.75rem;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ width: 1.25rem;
53
+ height: 1.25rem;
54
+ color: var(--color-on-surface-variant);
55
+ pointer-events: none;
56
+ }
57
+
58
+ /* Time Input Segments (hour:minute:second) */
59
+ .time-input-segments {
60
+ display: inline-flex;
61
+ align-items: center;
62
+ gap: 0.125rem;
63
+ padding: 0.75rem 1rem;
64
+ background-color: var(--color-surface);
65
+ border: 1px solid var(--color-outline);
66
+ border-radius: 0.5rem;
67
+ }
68
+
69
+ .time-input-segment {
70
+ width: 2rem;
71
+ padding: 0.25rem;
72
+ font-size: 1rem;
73
+ font-weight: 500;
74
+ text-align: center;
75
+ color: var(--color-on-surface);
76
+ background-color: transparent;
77
+ border: none;
78
+ border-radius: 0.25rem;
79
+ outline: none;
80
+ transition: background-color 150ms ease-in-out;
81
+ }
82
+
83
+ .time-input-segment:focus {
84
+ background-color: var(--color-primary-container);
85
+ color: var(--color-on-primary-container);
86
+ }
87
+
88
+ .time-input-separator {
89
+ font-size: 1rem;
90
+ font-weight: 500;
91
+ color: var(--color-on-surface-variant);
92
+ }
93
+
94
+ /* AM/PM Toggle */
95
+ .time-input-period {
96
+ display: inline-flex;
97
+ margin-left: 0.5rem;
98
+ background-color: var(--color-surface-container);
99
+ border-radius: 0.375rem;
100
+ padding: 0.125rem;
101
+ }
102
+
103
+ .time-input-period-btn {
104
+ padding: 0.375rem 0.625rem;
105
+ font-size: 0.75rem;
106
+ font-weight: 500;
107
+ color: var(--color-on-surface-variant);
108
+ background-color: transparent;
109
+ border: none;
110
+ border-radius: 0.25rem;
111
+ cursor: pointer;
112
+ transition: background-color 150ms ease-in-out, color 150ms ease-in-out;
113
+ }
114
+
115
+ .time-input-period-btn:hover {
116
+ background-color: var(--color-surface-container-high);
117
+ }
118
+
119
+ .time-input-period-btn-active {
120
+ background-color: var(--color-primary);
121
+ color: var(--color-primary-content);
122
+ }
123
+
124
+ /* Size Variants */
125
+ .time-input-sm .time-input-field {
126
+ padding: 0.5rem 2rem 0.5rem 0.75rem;
127
+ font-size: 0.875rem;
128
+ border-radius: 0.375rem;
129
+ }
130
+
131
+ .time-input-sm .time-input-segment {
132
+ width: 1.75rem;
133
+ font-size: 0.875rem;
134
+ }
135
+
136
+ .time-input-lg .time-input-field {
137
+ padding: 1rem 3rem 1rem 1.25rem;
138
+ font-size: 1.125rem;
139
+ border-radius: 0.625rem;
140
+ }
141
+
142
+ .time-input-lg .time-input-segment {
143
+ width: 2.5rem;
144
+ font-size: 1.125rem;
145
+ }
146
+
147
+ /* Filled Variant */
148
+ .time-input-filled .time-input-field,
149
+ .time-input-filled .time-input-segments {
150
+ background-color: var(--color-surface-container);
151
+ border: none;
152
+ border-bottom: 2px solid var(--color-outline);
153
+ border-radius: 0.5rem 0.5rem 0 0;
154
+ }
155
+
156
+ .time-input-filled .time-input-field:focus,
157
+ .time-input-filled .time-input-segments:focus-within {
158
+ border-bottom-color: var(--color-primary);
159
+ box-shadow: none;
160
+ }
161
+
162
+ /* Color Variants */
163
+ .time-input-primary .time-input-field:focus {
164
+ border-color: var(--color-primary);
165
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
166
+ }
167
+
168
+ .time-input-secondary .time-input-field:focus {
169
+ border-color: var(--color-secondary);
170
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
171
+ }
172
+
173
+ .time-input-tertiary .time-input-field:focus {
174
+ border-color: var(--color-tertiary);
175
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
176
+ }
177
+
178
+ /* Error State */
179
+ .time-input-error .time-input-field,
180
+ .time-input-error .time-input-segments {
181
+ border-color: var(--color-error);
182
+ }
183
+
184
+ .time-input-error .time-input-field:focus {
185
+ border-color: var(--color-error);
186
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
187
+ }
188
+
189
+ /* Time Picker Dropdown */
190
+ .time-picker-dropdown {
191
+ position: absolute;
192
+ top: 100%;
193
+ left: 0;
194
+ z-index: 50;
195
+ display: none;
196
+ min-width: 12rem;
197
+ margin-top: 0.25rem;
198
+ padding: 0.5rem;
199
+ background-color: var(--color-surface);
200
+ border: 1px solid var(--color-outline-variant);
201
+ border-radius: 0.5rem;
202
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
203
+ }
204
+
205
+ .time-picker-dropdown-open {
206
+ display: block;
207
+ }
208
+
209
+ .time-picker-columns {
210
+ display: flex;
211
+ gap: 0.5rem;
212
+ max-height: 12rem;
213
+ }
214
+
215
+ .time-picker-column {
216
+ flex: 1;
217
+ display: flex;
218
+ flex-direction: column;
219
+ gap: 0.125rem;
220
+ overflow-y: auto;
221
+ }
222
+
223
+ .time-picker-option {
224
+ padding: 0.375rem 0.5rem;
225
+ font-size: 0.875rem;
226
+ text-align: center;
227
+ color: var(--color-on-surface);
228
+ background-color: transparent;
229
+ border: none;
230
+ border-radius: 0.25rem;
231
+ cursor: pointer;
232
+ transition: background-color 150ms ease-in-out;
233
+ }
234
+
235
+ .time-picker-option:hover {
236
+ background-color: var(--color-surface-container);
237
+ }
238
+
239
+ .time-picker-option-selected {
240
+ background-color: var(--color-primary-container);
241
+ color: var(--color-on-primary-container);
242
+ }
243
+
244
+ /* Reduce Motion */
245
+ @media (prefers-reduced-motion: reduce) {
246
+ .time-input-field,
247
+ .time-input-segment,
248
+ .time-input-period-btn,
249
+ .time-picker-option {
250
+ transition: none;
251
+ }
252
+ }
253
+ }
254
+ `;
255
+
256
+ const sheet = new CSSStyleSheet();
257
+ sheet.replaceSync(css);
258
+ export const styles = sheet;
259
+ export default sheet;