@duskmoon-dev/core 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.
- package/README.md +366 -78
- package/dist/components/accordion.css +244 -0
- package/dist/components/alert.css +199 -0
- package/dist/components/appbar.css +493 -0
- package/dist/components/autocomplete.css +269 -0
- package/dist/components/avatar.css +167 -0
- package/dist/components/badge.css +178 -0
- package/dist/components/bottom-navigation.css +263 -0
- package/dist/components/bottomsheet.css +334 -0
- package/dist/components/button.css +475 -0
- package/dist/components/card.css +220 -0
- package/dist/components/cascader.css +418 -0
- package/dist/components/checkbox.css +231 -0
- package/dist/components/chip.css +211 -0
- package/dist/components/collapse.css +454 -0
- package/dist/components/datepicker.css +741 -0
- package/dist/components/dialog.css +173 -0
- package/dist/components/divider.css +284 -0
- package/dist/components/drawer.css +371 -0
- package/dist/components/file-upload.css +321 -0
- package/dist/components/form-group.css +308 -0
- package/dist/components/form.css +441 -0
- package/dist/components/index.css +14951 -0
- package/dist/components/input.css +240 -0
- package/dist/components/list.css +188 -0
- package/dist/components/markdown-body.css +405 -0
- package/dist/components/modal.css +291 -0
- package/dist/components/multi-select.css +491 -0
- package/dist/components/navigation.css +736 -0
- package/dist/components/otp-input.css +195 -0
- package/dist/components/pin-input.css +184 -0
- package/dist/components/popover.css +392 -0
- package/dist/components/progress.css +238 -0
- package/dist/components/radio.css +183 -0
- package/dist/components/rating.css +230 -0
- package/dist/components/segment-control.css +186 -0
- package/dist/components/select.css +205 -0
- package/dist/components/skeleton.css +216 -0
- package/dist/components/slider.css +327 -0
- package/dist/components/snackbar.css +311 -0
- package/dist/components/stepper.css +313 -0
- package/dist/components/switch.css +234 -0
- package/dist/components/table.css +199 -0
- package/dist/components/textarea.css +398 -0
- package/dist/components/time-input.css +252 -0
- package/dist/components/timeline.css +353 -0
- package/dist/components/toast.css +251 -0
- package/dist/components/tooltip.css +284 -0
- package/dist/components/tree-select.css +472 -0
- package/dist/esm/components/accordion.js +251 -0
- package/dist/esm/components/alert.js +206 -0
- package/dist/esm/components/appbar.js +500 -0
- package/dist/esm/components/autocomplete.js +276 -0
- package/dist/esm/components/avatar.js +174 -0
- package/dist/esm/components/badge.js +185 -0
- package/dist/esm/components/bottom-navigation.js +270 -0
- package/dist/esm/components/bottomsheet.js +341 -0
- package/dist/esm/components/button.js +482 -0
- package/dist/esm/components/card.js +227 -0
- package/dist/esm/components/cascader.js +425 -0
- package/dist/esm/components/checkbox.js +238 -0
- package/dist/esm/components/chip.js +218 -0
- package/dist/esm/components/collapse.js +461 -0
- package/dist/esm/components/datepicker.js +748 -0
- package/dist/esm/components/dialog.js +180 -0
- package/dist/esm/components/divider.js +291 -0
- package/dist/esm/components/drawer.js +378 -0
- package/dist/esm/components/file-upload.js +328 -0
- package/dist/esm/components/form-group.js +315 -0
- package/dist/esm/components/form.js +448 -0
- package/dist/esm/components/input.js +247 -0
- package/dist/esm/components/list.js +195 -0
- package/dist/esm/components/markdown-body.js +412 -0
- package/dist/esm/components/modal.js +298 -0
- package/dist/esm/components/multi-select.js +498 -0
- package/dist/esm/components/navigation.js +743 -0
- package/dist/esm/components/otp-input.js +202 -0
- package/dist/esm/components/pin-input.js +191 -0
- package/dist/esm/components/popover.js +399 -0
- package/dist/esm/components/progress.js +245 -0
- package/dist/esm/components/radio.js +190 -0
- package/dist/esm/components/rating.js +237 -0
- package/dist/esm/components/segment-control.js +193 -0
- package/dist/esm/components/select.js +212 -0
- package/dist/esm/components/skeleton.js +223 -0
- package/dist/esm/components/slider.js +334 -0
- package/dist/esm/components/snackbar.js +318 -0
- package/dist/esm/components/stepper.js +320 -0
- package/dist/esm/components/switch.js +241 -0
- package/dist/esm/components/table.js +206 -0
- package/dist/esm/components/textarea.js +405 -0
- package/dist/esm/components/time-input.js +259 -0
- package/dist/esm/components/timeline.js +360 -0
- package/dist/esm/components/toast.js +258 -0
- package/dist/esm/components/tooltip.js +291 -0
- package/dist/esm/components/tree-select.js +479 -0
- package/dist/index.css +15866 -0
- package/dist/themes/moonlight.css +253 -0
- package/dist/themes/sunshine.css +250 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +69 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/theme.d.ts +202 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/package.json +262 -18
- package/dist/index.cjs +0 -243
- package/dist/index.cjs.map +0 -15
- package/dist/index.js +0 -211
- package/dist/index.js.map +0 -15
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// Auto-generated from otp-input.css
|
|
2
|
+
export const css = `/**
|
|
3
|
+
* OTP Input Component Styles
|
|
4
|
+
* DuskMoonUI - One-Time Password input for verification codes
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
/* Base OTP Container */
|
|
9
|
+
.otp-input {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 0.5rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* OTP Input Field */
|
|
16
|
+
.otp-input-field {
|
|
17
|
+
width: 3rem;
|
|
18
|
+
height: 3.5rem;
|
|
19
|
+
padding: 0;
|
|
20
|
+
font-size: 1.5rem;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
text-align: center;
|
|
23
|
+
color: var(--color-on-surface);
|
|
24
|
+
background-color: var(--color-surface);
|
|
25
|
+
border: 2px solid var(--color-outline);
|
|
26
|
+
border-radius: 0.5rem;
|
|
27
|
+
outline: none;
|
|
28
|
+
transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
|
|
29
|
+
caret-color: var(--color-primary);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.otp-input-field::placeholder {
|
|
33
|
+
color: var(--color-on-surface-variant);
|
|
34
|
+
opacity: 0.5;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.otp-input-field:hover:not(:disabled):not(:focus) {
|
|
38
|
+
border-color: var(--color-on-surface-variant);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.otp-input-field:focus {
|
|
42
|
+
border-color: var(--color-primary);
|
|
43
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.otp-input-field:disabled {
|
|
47
|
+
opacity: 0.38;
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
background-color: var(--color-surface-container);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Filled State */
|
|
53
|
+
.otp-input-field-filled {
|
|
54
|
+
background-color: var(--color-surface-container);
|
|
55
|
+
border-color: var(--color-primary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Separator */
|
|
59
|
+
.otp-separator {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: 1rem;
|
|
64
|
+
height: 0.25rem;
|
|
65
|
+
background-color: var(--color-outline);
|
|
66
|
+
border-radius: 0.125rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Size Variants */
|
|
70
|
+
.otp-input-sm .otp-input-field {
|
|
71
|
+
width: 2.5rem;
|
|
72
|
+
height: 3rem;
|
|
73
|
+
font-size: 1.25rem;
|
|
74
|
+
border-radius: 0.375rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.otp-input-lg .otp-input-field {
|
|
78
|
+
width: 3.5rem;
|
|
79
|
+
height: 4rem;
|
|
80
|
+
font-size: 1.75rem;
|
|
81
|
+
border-radius: 0.625rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Compact Gap */
|
|
85
|
+
.otp-input-compact {
|
|
86
|
+
gap: 0.25rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Wide Gap */
|
|
90
|
+
.otp-input-wide {
|
|
91
|
+
gap: 1rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Filled Variant */
|
|
95
|
+
.otp-input-filled .otp-input-field {
|
|
96
|
+
background-color: var(--color-surface-container);
|
|
97
|
+
border: none;
|
|
98
|
+
border-bottom: 2px solid var(--color-outline);
|
|
99
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.otp-input-filled .otp-input-field:focus {
|
|
103
|
+
border-bottom-color: var(--color-primary);
|
|
104
|
+
box-shadow: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Outlined Variant (default) */
|
|
108
|
+
.otp-input-outlined .otp-input-field {
|
|
109
|
+
background-color: transparent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Underline Variant */
|
|
113
|
+
.otp-input-underline .otp-input-field {
|
|
114
|
+
background-color: transparent;
|
|
115
|
+
border: none;
|
|
116
|
+
border-bottom: 2px solid var(--color-outline);
|
|
117
|
+
border-radius: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.otp-input-underline .otp-input-field:focus {
|
|
121
|
+
border-bottom-color: var(--color-primary);
|
|
122
|
+
box-shadow: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Color Variants */
|
|
126
|
+
.otp-input-primary .otp-input-field:focus {
|
|
127
|
+
border-color: var(--color-primary);
|
|
128
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.otp-input-secondary .otp-input-field:focus {
|
|
132
|
+
border-color: var(--color-secondary);
|
|
133
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.otp-input-tertiary .otp-input-field:focus {
|
|
137
|
+
border-color: var(--color-tertiary);
|
|
138
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Error State */
|
|
142
|
+
.otp-input-error .otp-input-field {
|
|
143
|
+
border-color: var(--color-error);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.otp-input-error .otp-input-field:focus {
|
|
147
|
+
border-color: var(--color-error);
|
|
148
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Success State */
|
|
152
|
+
.otp-input-success .otp-input-field {
|
|
153
|
+
border-color: var(--color-success);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.otp-input-success .otp-input-field:focus {
|
|
157
|
+
border-color: var(--color-success);
|
|
158
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Masked Input (dots) */
|
|
162
|
+
.otp-input-masked .otp-input-field {
|
|
163
|
+
-webkit-text-security: disc;
|
|
164
|
+
font-family: text-security-disc;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* OTP Group with Label */
|
|
168
|
+
.otp-group {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
gap: 0.5rem;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.otp-label {
|
|
175
|
+
font-size: 0.875rem;
|
|
176
|
+
font-weight: 500;
|
|
177
|
+
color: var(--color-on-surface);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.otp-helper {
|
|
181
|
+
font-size: 0.75rem;
|
|
182
|
+
color: var(--color-on-surface-variant);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.otp-error-message {
|
|
186
|
+
font-size: 0.75rem;
|
|
187
|
+
color: var(--color-error);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Reduce Motion */
|
|
191
|
+
@media (prefers-reduced-motion: reduce) {
|
|
192
|
+
.otp-input-field {
|
|
193
|
+
transition: none;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
`;
|
|
198
|
+
|
|
199
|
+
const sheet = new CSSStyleSheet();
|
|
200
|
+
sheet.replaceSync(css);
|
|
201
|
+
export const styles = sheet;
|
|
202
|
+
export default sheet;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// Auto-generated from pin-input.css
|
|
2
|
+
export const css = `/**
|
|
3
|
+
* PIN Input Component Styles
|
|
4
|
+
* DuskMoonUI - Secure PIN/password entry input
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
/* Base PIN Container */
|
|
9
|
+
.pin-input {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 0.5rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* PIN Input Field */
|
|
16
|
+
.pin-input-field {
|
|
17
|
+
width: 3rem;
|
|
18
|
+
height: 3.5rem;
|
|
19
|
+
padding: 0;
|
|
20
|
+
font-size: 1.5rem;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
text-align: center;
|
|
23
|
+
color: var(--color-on-surface);
|
|
24
|
+
background-color: var(--color-surface);
|
|
25
|
+
border: 2px solid var(--color-outline);
|
|
26
|
+
border-radius: 0.5rem;
|
|
27
|
+
outline: none;
|
|
28
|
+
transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
|
|
29
|
+
caret-color: var(--color-primary);
|
|
30
|
+
-webkit-text-security: disc;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pin-input-field::placeholder {
|
|
34
|
+
color: var(--color-on-surface-variant);
|
|
35
|
+
opacity: 0.3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.pin-input-field:hover:not(:disabled):not(:focus) {
|
|
39
|
+
border-color: var(--color-on-surface-variant);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pin-input-field:focus {
|
|
43
|
+
border-color: var(--color-primary);
|
|
44
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pin-input-field:disabled {
|
|
48
|
+
opacity: 0.38;
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
background-color: var(--color-surface-container);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Show PIN (toggle visibility) */
|
|
54
|
+
.pin-input-visible .pin-input-field {
|
|
55
|
+
-webkit-text-security: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Size Variants */
|
|
59
|
+
.pin-input-sm .pin-input-field {
|
|
60
|
+
width: 2.5rem;
|
|
61
|
+
height: 3rem;
|
|
62
|
+
font-size: 1.25rem;
|
|
63
|
+
border-radius: 0.375rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pin-input-lg .pin-input-field {
|
|
67
|
+
width: 3.5rem;
|
|
68
|
+
height: 4rem;
|
|
69
|
+
font-size: 1.75rem;
|
|
70
|
+
border-radius: 0.625rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Compact Gap */
|
|
74
|
+
.pin-input-compact {
|
|
75
|
+
gap: 0.25rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Filled Variant */
|
|
79
|
+
.pin-input-filled .pin-input-field {
|
|
80
|
+
background-color: var(--color-surface-container);
|
|
81
|
+
border: none;
|
|
82
|
+
border-bottom: 2px solid var(--color-outline);
|
|
83
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.pin-input-filled .pin-input-field:focus {
|
|
87
|
+
border-bottom-color: var(--color-primary);
|
|
88
|
+
box-shadow: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Circle Variant */
|
|
92
|
+
.pin-input-circle .pin-input-field {
|
|
93
|
+
width: 3rem;
|
|
94
|
+
height: 3rem;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.pin-input-circle.pin-input-sm .pin-input-field {
|
|
99
|
+
width: 2.5rem;
|
|
100
|
+
height: 2.5rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.pin-input-circle.pin-input-lg .pin-input-field {
|
|
104
|
+
width: 3.5rem;
|
|
105
|
+
height: 3.5rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Dot Display (shows dots instead of numbers) */
|
|
109
|
+
.pin-input-dots .pin-input-field {
|
|
110
|
+
font-size: 2rem;
|
|
111
|
+
letter-spacing: -0.25rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Color Variants */
|
|
115
|
+
.pin-input-primary .pin-input-field:focus {
|
|
116
|
+
border-color: var(--color-primary);
|
|
117
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.pin-input-secondary .pin-input-field:focus {
|
|
121
|
+
border-color: var(--color-secondary);
|
|
122
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.pin-input-tertiary .pin-input-field:focus {
|
|
126
|
+
border-color: var(--color-tertiary);
|
|
127
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Error State */
|
|
131
|
+
.pin-input-error .pin-input-field {
|
|
132
|
+
border-color: var(--color-error);
|
|
133
|
+
animation: pin-shake 300ms ease-in-out;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.pin-input-error .pin-input-field:focus {
|
|
137
|
+
border-color: var(--color-error);
|
|
138
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@keyframes pin-shake {
|
|
142
|
+
0%, 100% { transform: translateX(0); }
|
|
143
|
+
20%, 60% { transform: translateX(-4px); }
|
|
144
|
+
40%, 80% { transform: translateX(4px); }
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Success State */
|
|
148
|
+
.pin-input-success .pin-input-field {
|
|
149
|
+
border-color: var(--color-success);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* PIN Group with Label */
|
|
153
|
+
.pin-group {
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
gap: 0.5rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.pin-label {
|
|
160
|
+
font-size: 0.875rem;
|
|
161
|
+
font-weight: 500;
|
|
162
|
+
color: var(--color-on-surface);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.pin-helper {
|
|
166
|
+
font-size: 0.75rem;
|
|
167
|
+
color: var(--color-on-surface-variant);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.pin-error-message {
|
|
171
|
+
font-size: 0.75rem;
|
|
172
|
+
color: var(--color-error);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Reduce Motion */
|
|
176
|
+
@media (prefers-reduced-motion: reduce) {
|
|
177
|
+
.pin-input-field {
|
|
178
|
+
transition: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.pin-input-error .pin-input-field {
|
|
182
|
+
animation: none;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
`;
|
|
187
|
+
|
|
188
|
+
const sheet = new CSSStyleSheet();
|
|
189
|
+
sheet.replaceSync(css);
|
|
190
|
+
export const styles = sheet;
|
|
191
|
+
export default sheet;
|