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