@bunnix/components 0.9.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/@types/index.d.ts +269 -0
- package/LICENSE +7 -0
- package/README.md +184 -0
- package/package.json +53 -0
- package/src/components/AccordionGroup.mjs +37 -0
- package/src/components/Badge.mjs +49 -0
- package/src/components/Button.mjs +76 -0
- package/src/components/Checkbox.mjs +36 -0
- package/src/components/ComboBox.mjs +44 -0
- package/src/components/Container.mjs +27 -0
- package/src/components/DatePicker.mjs +251 -0
- package/src/components/Dialog.mjs +166 -0
- package/src/components/DropdownMenu.mjs +110 -0
- package/src/components/Grid.mjs +40 -0
- package/src/components/HStack.mjs +34 -0
- package/src/components/Icon.mjs +32 -0
- package/src/components/InputField.mjs +78 -0
- package/src/components/NavigationBar.mjs +47 -0
- package/src/components/PageHeader.mjs +13 -0
- package/src/components/PageSection.mjs +20 -0
- package/src/components/PopoverMenu.mjs +87 -0
- package/src/components/RadioCheckbox.mjs +36 -0
- package/src/components/SearchBox.mjs +207 -0
- package/src/components/Sidebar.mjs +187 -0
- package/src/components/Table.mjs +254 -0
- package/src/components/Text.mjs +38 -0
- package/src/components/TimePicker.mjs +172 -0
- package/src/components/ToastNotification.mjs +105 -0
- package/src/components/ToggleSwitch.mjs +26 -0
- package/src/components/VStack.mjs +35 -0
- package/src/icons/add-circle.svg +1 -0
- package/src/icons/add.svg +1 -0
- package/src/icons/alt.svg +1 -0
- package/src/icons/archive.svg +1 -0
- package/src/icons/at.svg +1 -0
- package/src/icons/attestation.svg +1 -0
- package/src/icons/bell.svg +4 -0
- package/src/icons/bookmark.svg +1 -0
- package/src/icons/bot.svg +1 -0
- package/src/icons/button.svg +1 -0
- package/src/icons/calculate.svg +1 -0
- package/src/icons/calendar.svg +1 -0
- package/src/icons/chart.svg +1 -0
- package/src/icons/check.svg +1 -0
- package/src/icons/chevron-down.svg +1 -0
- package/src/icons/chevron-left.svg +1 -0
- package/src/icons/chevron-right.svg +1 -0
- package/src/icons/clip.svg +1 -0
- package/src/icons/clock.svg +4 -0
- package/src/icons/close-circle.svg +4 -0
- package/src/icons/close.svg +1 -0
- package/src/icons/cloud-download.svg +1 -0
- package/src/icons/cloud-upload.svg +1 -0
- package/src/icons/cloud.svg +1 -0
- package/src/icons/columns-layout.svg +1 -0
- package/src/icons/command.svg +1 -0
- package/src/icons/cube.svg +1 -0
- package/src/icons/delete.svg +4 -0
- package/src/icons/dollar.svg +4 -0
- package/src/icons/download.svg +1 -0
- package/src/icons/draw.svg +1 -0
- package/src/icons/duplicate.svg +4 -0
- package/src/icons/edit.svg +1 -0
- package/src/icons/exclamation-mark.svg +1 -0
- package/src/icons/eye-open.svg +1 -0
- package/src/icons/eye.svg +1 -0
- package/src/icons/file-html.svg +1 -0
- package/src/icons/file.svg +4 -0
- package/src/icons/finger.svg +1 -0
- package/src/icons/flag.svg +1 -0
- package/src/icons/folder.svg +1 -0
- package/src/icons/function.svg +1 -0
- package/src/icons/gear.svg +1 -0
- package/src/icons/gift.svg +1 -0
- package/src/icons/globe.svg +4 -0
- package/src/icons/grid.svg +1 -0
- package/src/icons/hand.svg +1 -0
- package/src/icons/heart.svg +4 -0
- package/src/icons/home.svg +4 -0
- package/src/icons/image.svg +1 -0
- package/src/icons/inbox.svg +4 -0
- package/src/icons/info.svg +1 -0
- package/src/icons/key.svg +1 -0
- package/src/icons/lamp.svg +1 -0
- package/src/icons/link.svg +1 -0
- package/src/icons/location.svg +1 -0
- package/src/icons/locker.svg +1 -0
- package/src/icons/login.svg +1 -0
- package/src/icons/logout.svg +4 -0
- package/src/icons/mail.svg +4 -0
- package/src/icons/map.svg +4 -0
- package/src/icons/markup.svg +1 -0
- package/src/icons/merge.svg +1 -0
- package/src/icons/more-horizontal.svg +5 -0
- package/src/icons/more-vertical.svg +5 -0
- package/src/icons/mouse.svg +1 -0
- package/src/icons/palette.svg +1 -0
- package/src/icons/password.svg +1 -0
- package/src/icons/pencil.svg +1 -0
- package/src/icons/people.svg +4 -0
- package/src/icons/person-add.svg +1 -0
- package/src/icons/person-remove.svg +1 -0
- package/src/icons/person.svg +5 -0
- package/src/icons/pin.svg +1 -0
- package/src/icons/question-circle.svg +4 -0
- package/src/icons/remove-circle.svg +1 -0
- package/src/icons/return-arrow.svg +2 -0
- package/src/icons/save.svg +1 -0
- package/src/icons/search.svg +1 -0
- package/src/icons/sections.svg +1 -0
- package/src/icons/send.svg +1 -0
- package/src/icons/share.svg +1 -0
- package/src/icons/shine.svg +1 -0
- package/src/icons/sliders.svg +1 -0
- package/src/icons/star.svg +4 -0
- package/src/icons/storage.svg +1 -0
- package/src/icons/success-circle.svg +4 -0
- package/src/icons/swap.svg +1 -0
- package/src/icons/switch.svg +1 -0
- package/src/icons/sync.svg +4 -0
- package/src/icons/table.svg +4 -0
- package/src/icons/tag.svg +4 -0
- package/src/icons/terminal.svg +1 -0
- package/src/icons/text.svg +1 -0
- package/src/icons/thumb-down.svg +1 -0
- package/src/icons/thumb-up.svg +1 -0
- package/src/icons/timer.svg +4 -0
- package/src/icons/toggle.svg +1 -0
- package/src/icons/trash.svg +1 -0
- package/src/icons/update-page.svg +1 -0
- package/src/icons/upload.svg +1 -0
- package/src/icons/video.svg +1 -0
- package/src/icons/wallet.svg +1 -0
- package/src/icons/window.svg +1 -0
- package/src/index.mjs +29 -0
- package/src/styles/accordion.css +70 -0
- package/src/styles/buttons.css +118 -0
- package/src/styles/colors.css +131 -0
- package/src/styles/controls.css +504 -0
- package/src/styles/datepicker.css +140 -0
- package/src/styles/interactable.css +16 -0
- package/src/styles/layout.css +444 -0
- package/src/styles/links.css +38 -0
- package/src/styles/main.css +16 -0
- package/src/styles/media.css +155 -0
- package/src/styles/menu.css +168 -0
- package/src/styles/motion.css +66 -0
- package/src/styles/table.css +78 -0
- package/src/styles/timepicker.css +87 -0
- package/src/styles/typography.css +94 -0
- package/src/styles/variables.css +218 -0
- package/src/styles.css +1 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
hr {
|
|
2
|
+
display: block;
|
|
3
|
+
border: 0;
|
|
4
|
+
border-top: 1px solid var(--border-color);
|
|
5
|
+
margin: 1em 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
height: 0;
|
|
8
|
+
width: 100%;
|
|
9
|
+
box-sizing: content-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.menu-separator {
|
|
13
|
+
margin: var(--base-gap) calc(var(--base-padding) * -1);
|
|
14
|
+
border-top: 1px solid var(--border-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Textual & Select Inputs */
|
|
18
|
+
input[type="text"],
|
|
19
|
+
input[type="number"],
|
|
20
|
+
input[type="email"],
|
|
21
|
+
input[type="password"],
|
|
22
|
+
input[type="search"],
|
|
23
|
+
input[type="tel"],
|
|
24
|
+
input[type="url"],
|
|
25
|
+
input[type="date"],
|
|
26
|
+
input[type="time"],
|
|
27
|
+
input[type="datetime-local"],
|
|
28
|
+
textarea,
|
|
29
|
+
select {
|
|
30
|
+
appearance: none;
|
|
31
|
+
outline: none;
|
|
32
|
+
background-color: var(--background-color);
|
|
33
|
+
border: 1px solid var(--border-color);
|
|
34
|
+
border-radius: var(--min-control-radius);
|
|
35
|
+
color: var(--color-primary);
|
|
36
|
+
font-family: var(--font-family);
|
|
37
|
+
font-size: var(--font-size);
|
|
38
|
+
padding: calc(var(--base-padding) * 0.5) var(--base-padding);
|
|
39
|
+
min-height: var(--min-control-height);
|
|
40
|
+
width: 100%;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
select {
|
|
46
|
+
padding-right: calc(var(--base-padding) * 3) !important;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
background-image: var(--svg-chevron-select);
|
|
49
|
+
background-repeat: no-repeat;
|
|
50
|
+
background-position: right var(--base-padding) center;
|
|
51
|
+
background-size: 1rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.input-search {
|
|
55
|
+
position: relative;
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.input-search .icon {
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: var(--base-padding);
|
|
62
|
+
top: 50%;
|
|
63
|
+
transform: translateY(-50%);
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.input-search input {
|
|
68
|
+
padding-left: calc(var(--base-padding) * 2 + 1rem);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.input-search .input-lg {
|
|
72
|
+
padding-left: calc(var(--base-padding) * 2.25 + 1rem) !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.input-search .input-xl {
|
|
76
|
+
padding-left: calc(var(--base-padding) * 2.5 + 1rem) !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
input:focus,
|
|
80
|
+
textarea:focus,
|
|
81
|
+
select:focus {
|
|
82
|
+
outline: none;
|
|
83
|
+
border-color: var(--accent-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
input:disabled,
|
|
87
|
+
textarea:disabled,
|
|
88
|
+
select:disabled {
|
|
89
|
+
background-color: var(--alternate-background-color);
|
|
90
|
+
color: var(--color-secondary);
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
opacity: 0.7;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
input::placeholder,
|
|
96
|
+
textarea::placeholder {
|
|
97
|
+
color: var(--color-secondary);
|
|
98
|
+
opacity: 0.8;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Badge */
|
|
102
|
+
.badge {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: calc(var(--base-gap) * 0.5);
|
|
106
|
+
font-weight: var(--font-semibold);
|
|
107
|
+
line-height: 1;
|
|
108
|
+
border-radius: calc(var(--base-radius) * 1.5);
|
|
109
|
+
border: 1px solid transparent;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.badge-circle {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
text-align: center;
|
|
118
|
+
aspect-ratio: 1 / 1;
|
|
119
|
+
padding: calc(var(--base-padding) * 0.35) !important;
|
|
120
|
+
line-height: 1;
|
|
121
|
+
margin: 0;
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.badge-circle.badge-xs {
|
|
127
|
+
min-width: 1.125rem;
|
|
128
|
+
font-size: var(--font-size-xs);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.badge-circle.badge-sm {
|
|
132
|
+
min-width: 1.375rem;
|
|
133
|
+
font-size: var(--font-size-sm);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.badge-circle.badge-md {
|
|
137
|
+
min-width: 1.625rem;
|
|
138
|
+
font-size: var(--font-size);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.badge-xs {
|
|
142
|
+
font-size: var(--font-size-xs);
|
|
143
|
+
padding: 2px 6px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.badge-sm {
|
|
147
|
+
font-size: var(--font-size-sm);
|
|
148
|
+
padding: 4px 8px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.badge-md {
|
|
152
|
+
font-size: var(--font-size);
|
|
153
|
+
padding: 6px 10px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.badge-solid.badge-base {
|
|
157
|
+
background-color: var(--highlight-background-color);
|
|
158
|
+
color: var(--color-primary);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.badge-solid.badge-success {
|
|
162
|
+
background-color: var(--color-success);
|
|
163
|
+
color: white;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.badge-solid.badge-info {
|
|
167
|
+
background-color: var(--color-info);
|
|
168
|
+
color: white;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.badge-solid.badge-warning {
|
|
172
|
+
background-color: #f2c94c;
|
|
173
|
+
color: #1a1a1a;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.badge-solid.badge-danger {
|
|
177
|
+
background-color: var(--color-destructive);
|
|
178
|
+
color: white;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.badge-solid.badge-accent {
|
|
182
|
+
background-color: var(--accent-color);
|
|
183
|
+
color: white;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.badge-solid.badge-dimmed {
|
|
187
|
+
background-color: var(--highlight-background-color);
|
|
188
|
+
color: var(--color-secondary);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.badge-soft.badge-base {
|
|
192
|
+
background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
|
193
|
+
color: var(--color-primary);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.badge-soft.badge-success {
|
|
197
|
+
background-color: color-mix(in srgb, var(--color-success) 18%, transparent);
|
|
198
|
+
color: var(--color-success);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.badge-soft.badge-info {
|
|
202
|
+
background-color: color-mix(in srgb, var(--color-info) 18%, transparent);
|
|
203
|
+
color: var(--color-info);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.badge-soft.badge-warning {
|
|
207
|
+
background-color: color-mix(in srgb, #f2c94c 20%, transparent);
|
|
208
|
+
color: #8a6d1d;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.badge-soft.badge-danger {
|
|
212
|
+
background-color: color-mix(in srgb, var(--color-destructive) 15%, transparent);
|
|
213
|
+
color: var(--color-destructive);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.badge-soft.badge-accent {
|
|
217
|
+
background-color: color-mix(in srgb, var(--accent-color) 15%, transparent);
|
|
218
|
+
color: var(--accent-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.badge-soft.badge-dimmed {
|
|
222
|
+
background-color: color-mix(in srgb, var(--color-secondary) 12%, transparent);
|
|
223
|
+
color: var(--color-secondary);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.badge-outline.badge-base {
|
|
227
|
+
background-color: transparent;
|
|
228
|
+
border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
|
|
229
|
+
color: var(--color-primary);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.badge-outline.badge-success {
|
|
233
|
+
background-color: transparent;
|
|
234
|
+
border-color: color-mix(in srgb, var(--color-success) 40%, transparent);
|
|
235
|
+
color: var(--color-success);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.badge-outline.badge-info {
|
|
239
|
+
background-color: transparent;
|
|
240
|
+
border-color: color-mix(in srgb, var(--color-info) 40%, transparent);
|
|
241
|
+
color: var(--color-info);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.badge-outline.badge-warning {
|
|
245
|
+
background-color: transparent;
|
|
246
|
+
border-color: color-mix(in srgb, #f2c94c 40%, transparent);
|
|
247
|
+
color: #8a6d1d;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.badge-outline.badge-danger {
|
|
251
|
+
background-color: transparent;
|
|
252
|
+
border-color: color-mix(in srgb, var(--color-destructive) 40%, transparent);
|
|
253
|
+
color: var(--color-destructive);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.badge-outline.badge-accent {
|
|
257
|
+
background-color: transparent;
|
|
258
|
+
border-color: color-mix(in srgb, var(--accent-color) 40%, transparent);
|
|
259
|
+
color: var(--accent-color);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.badge-outline.badge-dimmed {
|
|
263
|
+
background-color: transparent;
|
|
264
|
+
border-color: color-mix(in srgb, var(--color-secondary) 30%, transparent);
|
|
265
|
+
color: var(--color-secondary);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.badge-overlap {
|
|
269
|
+
position: absolute;
|
|
270
|
+
z-index: 1;
|
|
271
|
+
pointer-events: none;
|
|
272
|
+
position-anchor: --badge-anchor;
|
|
273
|
+
position: fixed;
|
|
274
|
+
top: anchor(--badge-anchor top);
|
|
275
|
+
right: anchor(--badge-anchor right);
|
|
276
|
+
transform: translate(50%, -50%);
|
|
277
|
+
box-shadow: 0 0 0 3px var(--badge-cutout-bg, var(--background-color));
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* Hide native datalist/date/time picker indicators */
|
|
281
|
+
input::-webkit-calendar-picker-indicator {
|
|
282
|
+
display: none !important;
|
|
283
|
+
-webkit-appearance: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
textarea {
|
|
287
|
+
min-height: 100px;
|
|
288
|
+
resize: vertical;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
kbd {
|
|
292
|
+
display: inline-flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: center;
|
|
295
|
+
gap: var(--base-gap);
|
|
296
|
+
padding: calc(var(--base-padding) * 0.25) calc(var(--base-padding) * 0.4);
|
|
297
|
+
border-radius: calc(var(--base-radius) * 0.5);
|
|
298
|
+
background-color: color-mix(in srgb, var(--background-color) 15%, transparent);
|
|
299
|
+
font-size: var(--font-size-xs) !important;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Control Sizes */
|
|
303
|
+
.input-lg {
|
|
304
|
+
padding: calc(var(--base-padding) * 0.75) calc(var(--base-padding) * 1.25) !important;
|
|
305
|
+
font-size: 1.1rem !important;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.input-xl {
|
|
309
|
+
padding: var(--base-padding) calc(var(--base-padding) * 1.5) !important;
|
|
310
|
+
font-size: 1.2rem !important;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* Checkbox & Radio */
|
|
314
|
+
input[type="checkbox"],
|
|
315
|
+
input[type="radio"] {
|
|
316
|
+
appearance: none;
|
|
317
|
+
width: 1.25rem;
|
|
318
|
+
height: 1.25rem;
|
|
319
|
+
border: 1px solid var(--border-color);
|
|
320
|
+
background-color: var(--background-color);
|
|
321
|
+
cursor: pointer;
|
|
322
|
+
display: inline-grid;
|
|
323
|
+
place-content: center;
|
|
324
|
+
transition: border-color 0.2s, background-color 0.2s;
|
|
325
|
+
margin: 0;
|
|
326
|
+
flex-shrink: 0;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
input[type="checkbox"] {
|
|
330
|
+
border-radius: 4px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
input[type="radio"] {
|
|
334
|
+
border-radius: 50%;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
input[type="checkbox"]::before {
|
|
338
|
+
content: "";
|
|
339
|
+
width: 0.8rem;
|
|
340
|
+
height: 0.8rem;
|
|
341
|
+
background-color: var(--background-color);
|
|
342
|
+
-webkit-mask-image: var(--svg-check);
|
|
343
|
+
mask-image: var(--svg-check);
|
|
344
|
+
-webkit-mask-size: contain;
|
|
345
|
+
mask-size: contain;
|
|
346
|
+
-webkit-mask-repeat: no-repeat;
|
|
347
|
+
mask-repeat: no-repeat;
|
|
348
|
+
transform: scale(0);
|
|
349
|
+
transition: 120ms transform ease-in-out;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
input[type="checkbox"].checkbox-lg,
|
|
353
|
+
input[type="radio"].checkbox-lg {
|
|
354
|
+
width: 1.5rem;
|
|
355
|
+
height: 1.5rem;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
input[type="checkbox"].checkbox-lg::before {
|
|
359
|
+
width: 1rem;
|
|
360
|
+
height: 1rem;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
input[type="checkbox"].checkbox-xl,
|
|
364
|
+
input[type="radio"].checkbox-xl {
|
|
365
|
+
width: 1.75rem;
|
|
366
|
+
height: 1.75rem;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
input[type="checkbox"].checkbox-xl::before {
|
|
370
|
+
width: 1.2rem;
|
|
371
|
+
height: 1.2rem;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
input[type="radio"]::before {
|
|
375
|
+
content: "";
|
|
376
|
+
width: 0.65rem;
|
|
377
|
+
height: 0.65rem;
|
|
378
|
+
transform: scale(0);
|
|
379
|
+
transition: 120ms transform ease-in-out;
|
|
380
|
+
box-shadow: inset 1em 1em var(--background-color);
|
|
381
|
+
border-radius: 50%;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
input[type="checkbox"]:checked,
|
|
385
|
+
input[type="radio"]:checked {
|
|
386
|
+
background-color: var(--accent-color);
|
|
387
|
+
border-color: var(--accent-color);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
input[type="checkbox"]:checked::before,
|
|
391
|
+
input[type="radio"]:checked::before {
|
|
392
|
+
transform: scale(1);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
input[type="checkbox"]:focus,
|
|
396
|
+
input[type="radio"]:focus {
|
|
397
|
+
border-color: var(--accent-color);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.selection-control {
|
|
401
|
+
display: flex;
|
|
402
|
+
flex-direction: row;
|
|
403
|
+
align-items: center;
|
|
404
|
+
gap: var(--base-gap);
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/* Switch */
|
|
409
|
+
.switch-control {
|
|
410
|
+
display: inline-flex;
|
|
411
|
+
align-items: center;
|
|
412
|
+
gap: var(--base-gap);
|
|
413
|
+
cursor: pointer;
|
|
414
|
+
position: relative;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.switch-input {
|
|
418
|
+
position: absolute;
|
|
419
|
+
opacity: 0;
|
|
420
|
+
pointer-events: none;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.switch-track {
|
|
424
|
+
position: relative;
|
|
425
|
+
width: var(--switch-track-w);
|
|
426
|
+
height: var(--switch-track-h);
|
|
427
|
+
border-radius: 999px;
|
|
428
|
+
background-color: var(--alternate-background-color);
|
|
429
|
+
box-shadow: inset 0 0 0 1px var(--border-color);
|
|
430
|
+
display: inline-flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
line-height: 0;
|
|
433
|
+
transition: background-color 0.25s ease, box-shadow 0.25s ease;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.switch-lg .switch-track {
|
|
437
|
+
width: var(--switch-track-w-lg);
|
|
438
|
+
height: var(--switch-track-h-lg);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.switch-xl .switch-track {
|
|
442
|
+
width: var(--switch-track-w-xl);
|
|
443
|
+
height: var(--switch-track-h-xl);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.switch-track::after {
|
|
447
|
+
content: "";
|
|
448
|
+
position: absolute;
|
|
449
|
+
top: 50%;
|
|
450
|
+
left: var(--switch-pad);
|
|
451
|
+
width: var(--switch-thumb);
|
|
452
|
+
height: var(--switch-thumb);
|
|
453
|
+
border-radius: 999px;
|
|
454
|
+
background-color: white;
|
|
455
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
456
|
+
transform: translate3d(0, -50%, 0);
|
|
457
|
+
transition: transform 0.35s cubic-bezier(0.44, -0.12, 0.07, 1.15);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.switch-lg .switch-track::after {
|
|
461
|
+
left: var(--switch-pad-lg);
|
|
462
|
+
width: var(--switch-thumb-lg);
|
|
463
|
+
height: var(--switch-thumb-lg);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.switch-xl .switch-track::after {
|
|
467
|
+
left: var(--switch-pad-xl);
|
|
468
|
+
width: var(--switch-thumb-xl);
|
|
469
|
+
height: var(--switch-thumb-xl);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.switch-input:checked + .switch-track {
|
|
473
|
+
background-color: var(--accent-color);
|
|
474
|
+
box-shadow: inset 0 0 0 1px var(--accent-color);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.switch-input:checked + .switch-track::after {
|
|
478
|
+
transform: translate3d(calc(var(--switch-track-w) - var(--switch-thumb) - (var(--switch-pad) * 2)), -50%, 0);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.switch-lg .switch-input:checked + .switch-track::after {
|
|
482
|
+
transform: translate3d(calc(var(--switch-track-w-lg) - var(--switch-thumb-lg) - (var(--switch-pad-lg) * 2)), -50%, 0);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.switch-xl .switch-input:checked + .switch-track::after {
|
|
486
|
+
transform: translate3d(calc(var(--switch-track-w-xl) - var(--switch-thumb-xl) - (var(--switch-pad-xl) * 2)), -50%, 0);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.switch-input:focus-visible + .switch-track {
|
|
490
|
+
box-shadow: 0 0 0 3px var(--accent-color-dimmed);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.switch-input:disabled {
|
|
494
|
+
opacity: 0;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.switch-input:disabled + .switch-track {
|
|
498
|
+
opacity: 0.6;
|
|
499
|
+
cursor: not-allowed;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.switch-control:has(.switch-input:disabled) {
|
|
503
|
+
cursor: not-allowed;
|
|
504
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
.datepicker-wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.datepicker-input {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[popover].datepicker-popover {
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
inset: auto;
|
|
14
|
+
overflow: visible;
|
|
15
|
+
border: none;
|
|
16
|
+
background: transparent;
|
|
17
|
+
|
|
18
|
+
/* Modern CSS Anchor Positioning */
|
|
19
|
+
position-anchor: var(--anchor-id);
|
|
20
|
+
position: fixed;
|
|
21
|
+
top: anchor(var(--anchor-id) bottom);
|
|
22
|
+
left: anchor(var(--anchor-id) left);
|
|
23
|
+
width: auto;
|
|
24
|
+
|
|
25
|
+
/* Fallback for Safari */
|
|
26
|
+
margin-top: var(--base-gap);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@position-try --date-flip-v {
|
|
30
|
+
top: auto;
|
|
31
|
+
bottom: anchor(var(--anchor-id) top);
|
|
32
|
+
left: anchor(var(--anchor-id) left);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[popover].datepicker-popover {
|
|
36
|
+
position-try-fallbacks: --date-flip-v;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.datepicker-card {
|
|
40
|
+
height: auto;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
justify-content: flex-start;
|
|
44
|
+
min-width: 280px;
|
|
45
|
+
align-items: stretch !important; /* Ensure children fill width */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.datepicker-header {
|
|
49
|
+
width: 100%;
|
|
50
|
+
padding: var(--base-padding);
|
|
51
|
+
margin-bottom: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.datepicker-title {
|
|
55
|
+
font-weight: var(--font-semibold);
|
|
56
|
+
flex: 1;
|
|
57
|
+
text-align: center;
|
|
58
|
+
color: var(--color-primary);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.datepicker-nav {
|
|
62
|
+
padding: calc(var(--base-padding) * 0.35);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.datepicker-body {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
gap: calc(var(--base-gap) * 0.75);
|
|
69
|
+
flex: 1;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
padding-bottom: var(--base-padding);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.datepicker-weekdays {
|
|
75
|
+
display: grid;
|
|
76
|
+
grid-template-columns: repeat(7, 1fr);
|
|
77
|
+
gap: calc(var(--base-gap) * 0.5);
|
|
78
|
+
padding: 0 var(--base-padding);
|
|
79
|
+
width: 100%;
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
color: var(--color-secondary);
|
|
82
|
+
font-size: var(--font-size-sm);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.datepicker-weekday {
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.datepicker-grid {
|
|
90
|
+
display: grid;
|
|
91
|
+
grid-template-columns: repeat(7, 1fr);
|
|
92
|
+
gap: calc(var(--base-gap) * 0.5);
|
|
93
|
+
padding: 0 var(--base-padding);
|
|
94
|
+
width: 100%;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.datepicker-cell {
|
|
99
|
+
border: none;
|
|
100
|
+
background: transparent;
|
|
101
|
+
border-radius: var(--base-radius);
|
|
102
|
+
aspect-ratio: 1 / 1;
|
|
103
|
+
width: 100%;
|
|
104
|
+
display: grid;
|
|
105
|
+
place-items: center;
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
font-family: var(--font-family);
|
|
108
|
+
font-size: var(--font-size);
|
|
109
|
+
color: var(--color-primary);
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
transition: background-color 0.2s;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.datepicker-cell:hover {
|
|
115
|
+
background-color: var(--highlight-background-color);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.datepicker-cell.is-outside {
|
|
119
|
+
color: var(--color-primary-dimmed);
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.datepicker-cell.is-selected,
|
|
124
|
+
.datepicker-cell.is-range-start,
|
|
125
|
+
.datepicker-cell.is-range-end {
|
|
126
|
+
background-color: var(--accent-color) !important;
|
|
127
|
+
color: white !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.datepicker-cell.is-in-range {
|
|
131
|
+
background-color: var(--highlight-background-color);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.datepicker-cell.is-today {
|
|
135
|
+
box-shadow: inset 0 0 0 2px var(--accent-color);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.datepicker-action {
|
|
139
|
+
padding: calc(var(--base-padding) * 0.4) var(--base-padding);
|
|
140
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.hoverable {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.hoverable:hover {
|
|
6
|
+
background-color: var(--highlight-background-color);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.selected {
|
|
10
|
+
background-color: var(--accent-color) !important;
|
|
11
|
+
color: white !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.selected a {
|
|
15
|
+
color: white !important;
|
|
16
|
+
}
|