@trackunit/react-components 0.0.1-alpha-59a0a75488.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 +22 -0
- package/common/CommonProps.d.ts +12 -0
- package/common/LegacyComponentStory.d.ts +7 -0
- package/common/StorybookProps.d.ts +6 -0
- package/common/index.d.ts +3 -0
- package/common/useContainerProps.d.ts +16 -0
- package/components/ActionButton/ActionButton.d.ts +30 -0
- package/components/ActionButton/index.d.ts +1 -0
- package/components/Alert/Alert.d.ts +53 -0
- package/components/Alert/index.d.ts +1 -0
- package/components/Badge/Badge.d.ts +47 -0
- package/components/Badge/index.d.ts +1 -0
- package/components/BaseInput/BaseInput.d.ts +62 -0
- package/components/BaseInput/index.d.ts +1 -0
- package/components/Card/Card.d.ts +45 -0
- package/components/Card/CardBody.d.ts +32 -0
- package/components/Card/CardFooter.d.ts +21 -0
- package/components/Card/CardHeader.d.ts +43 -0
- package/components/Card/DensityContainer.d.ts +30 -0
- package/components/Card/index.d.ts +5 -0
- package/components/Chart/Chart.d.ts +81 -0
- package/components/Chart/index.d.ts +1 -0
- package/components/Checkbox/CheckIcon.d.ts +12 -0
- package/components/Checkbox/Checkbox.d.ts +40 -0
- package/components/Checkbox/IndeterminateIcon.d.ts +10 -0
- package/components/Checkbox/index.d.ts +1 -0
- package/components/Collapse/Collapse.d.ts +28 -0
- package/components/Collapse/index.d.ts +1 -0
- package/components/CopyableText/CopyableText.d.ts +21 -0
- package/components/CopyableText/index.d.ts +1 -0
- package/components/DateField/DateField.d.ts +19 -0
- package/components/DateInput/DateInput.d.ts +28 -0
- package/components/DayPicker/DayPicker.d.ts +28 -0
- package/components/DayPicker/DayPickerPopover.d.ts +23 -0
- package/components/DayPicker/DayRangePicker.d.ts +18 -0
- package/components/DayPicker/index.d.ts +21 -0
- package/components/DayPicker/useLocale.d.ts +8 -0
- package/components/EmailInput/EmailInput.d.ts +20 -0
- package/components/FormGroup/FormGroup.d.ts +38 -0
- package/components/Heading/Heading.d.ts +28 -0
- package/components/Heading/index.d.ts +1 -0
- package/components/Icon/Icon.d.ts +51 -0
- package/components/Indicator/Indicator.d.ts +42 -0
- package/components/Indicator/index.d.ts +1 -0
- package/components/Label/Label.d.ts +34 -0
- package/components/Label/index.d.ts +1 -0
- package/components/LegendItem/LegendItem.d.ts +17 -0
- package/components/LegendItem/index.d.ts +1 -0
- package/components/Menu/MenuItem.d.ts +58 -0
- package/components/Menu/MenuList.d.ts +34 -0
- package/components/Menu/index.d.ts +2 -0
- package/components/Modal/Modal.d.ts +32 -0
- package/components/Modal/ModalBackdrop.d.ts +13 -0
- package/components/Modal/index.d.ts +3 -0
- package/components/Modal/useModal.d.ts +21 -0
- package/components/NumberField/NumberField.d.ts +19 -0
- package/components/NumberInput/NumberInput.d.ts +12 -0
- package/components/PageHeader/PageHeader.d.ts +47 -0
- package/components/PageHeader/index.d.ts +1 -0
- package/components/Pagination/Pagination.d.ts +71 -0
- package/components/PhoneInput/PhoneInput.d.ts +20 -0
- package/components/Popover/AnimatedPopover.d.ts +43 -0
- package/components/Popover/PopoverList.d.ts +12 -0
- package/components/Popover/PopoverListItem.d.ts +30 -0
- package/components/Popover/PopoverTitle.d.ts +20 -0
- package/components/Popover/index.d.ts +5 -0
- package/components/Popover/usePopover.d.ts +42 -0
- package/components/Prompt/Prompt.d.ts +20 -0
- package/components/Prompt/index.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.d.ts +57 -0
- package/components/RadioGroup/RadioGroupContext.d.ts +11 -0
- package/components/RadioGroup/RadioItem.d.ts +24 -0
- package/components/RadioGroup/index.d.ts +2 -0
- package/components/SectionHeader/SectionHeader.d.ts +24 -0
- package/components/SectionHeader/index.d.ts +1 -0
- package/components/Select/CreatableSelect.d.ts +38 -0
- package/components/Select/FieldContainer.d.ts +20 -0
- package/components/Select/Select.d.ts +18 -0
- package/components/Select/SelectMenuItem/SelectMenuItem.d.ts +49 -0
- package/components/Select/TagWithWidth.d.ts +17 -0
- package/components/Select/TagsContainer.d.ts +45 -0
- package/components/Select/index.d.ts +7 -0
- package/components/Select/shared.d.ts +15 -0
- package/components/Select/useCustomComponents.d.ts +19 -0
- package/components/Select/useCustomStyles.d.ts +14 -0
- package/components/Select/useSelect.d.ts +143 -0
- package/components/SkeletonLines/SkeletonLines.d.ts +25 -0
- package/components/SkeletonLines/index.d.ts +1 -0
- package/components/Spacer/Spacer.d.ts +20 -0
- package/components/Spacer/index.d.ts +1 -0
- package/components/Spinner/Spinner.d.ts +37 -0
- package/components/Spinner/index.d.ts +1 -0
- package/components/Tag/Tag.d.ts +39 -0
- package/components/Tag/index.d.ts +1 -0
- package/components/Text/Text.d.ts +58 -0
- package/components/Text/index.d.ts +1 -0
- package/components/TextArea/TextArea.d.ts +30 -0
- package/components/TextArea/index.d.ts +1 -0
- package/components/TextAreaField/TextAreaField.d.ts +19 -0
- package/components/TextAreaField/index.d.ts +1 -0
- package/components/TextField/TextField.d.ts +24 -0
- package/components/TextField/TextLenghtIndicator.d.ts +19 -0
- package/components/TextField/index.d.ts +1 -0
- package/components/TextInput/TextInput.d.ts +12 -0
- package/components/Timeline/Timeline.d.ts +30 -0
- package/components/Tip/Tip.d.ts +34 -0
- package/components/Tip/index.d.ts +1 -0
- package/components/Toggle/Toggle.d.ts +57 -0
- package/components/Toggle/index.d.ts +1 -0
- package/components/Tooltip/Tooltip.d.ts +48 -0
- package/components/Tooltip/index.d.ts +1 -0
- package/components/ValueBar/ValueBar.d.ts +44 -0
- package/components/ValueBar/ValueBarHelper.d.ts +35 -0
- package/components/ValueBar/ValueBarTypes.d.ts +9 -0
- package/components/ValueBar/index.d.ts +3 -0
- package/components/buttons/Button/Button.d.ts +48 -0
- package/components/buttons/IconButton/IconButton.d.ts +25 -0
- package/components/buttons/StarButton/StarButton.d.ts +13 -0
- package/components/buttons/index.d.ts +4 -0
- package/components/buttons/shared/ButtonProps.d.ts +40 -0
- package/components/buttons/shared/helpers.d.ts +20 -0
- package/components/index.d.ts +44 -0
- package/components/theme/DefaultTheme.d.ts +2 -0
- package/components/theme/index.d.ts +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/useDebounce.d.ts +8 -0
- package/hooks/useLocalStorage.d.ts +9 -0
- package/hooks/useTimeout.d.ts +15 -0
- package/index.css +488 -0
- package/index.d.ts +4 -0
- package/index.js +5553 -0
- package/layout/helper/MinTopFullContentLayout.d.ts +18 -0
- package/layout/index.d.ts +7 -0
- package/layout/responsive/FilterListMapLayout.d.ts +22 -0
- package/layout/responsive/FullWidthRepeatingLayout.d.ts +19 -0
- package/layout/responsive/GridArea.d.ts +13 -0
- package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +30 -0
- package/layout/responsive/TitleNavContentLayout.d.ts +12 -0
- package/layout/responsive/TwoColumnLayout.d.ts +12 -0
- package/package.json +31 -0
- package/test-config/jest.setup.d.ts +1 -0
- package/test-utils/hooks.d.ts +4 -0
- package/test-utils/test-utils.d.ts +5 -0
package/index.css
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
/* CSS related to the Button component */
|
|
2
|
+
|
|
3
|
+
.tu-button {
|
|
4
|
+
@apply flex-row
|
|
5
|
+
inline-flex
|
|
6
|
+
gap-2
|
|
7
|
+
box-border
|
|
8
|
+
justify-center
|
|
9
|
+
items-center
|
|
10
|
+
whitespace-nowrap
|
|
11
|
+
max-w-full
|
|
12
|
+
outline-0
|
|
13
|
+
outline-current
|
|
14
|
+
transition-all
|
|
15
|
+
ease-in-out
|
|
16
|
+
rounded-lg
|
|
17
|
+
cursor-pointer
|
|
18
|
+
flex-none
|
|
19
|
+
py-1.5
|
|
20
|
+
px-2.5
|
|
21
|
+
h-min
|
|
22
|
+
w-min
|
|
23
|
+
max-h-8
|
|
24
|
+
focus:ring
|
|
25
|
+
focus:ring-offset-1
|
|
26
|
+
focus:outline-none
|
|
27
|
+
disabled:cursor-not-allowed
|
|
28
|
+
text-sm
|
|
29
|
+
font-medium
|
|
30
|
+
align-middle;
|
|
31
|
+
|
|
32
|
+
&__spinner {
|
|
33
|
+
@apply !w-[1em]
|
|
34
|
+
!h-[1em];
|
|
35
|
+
|
|
36
|
+
&--full-width {
|
|
37
|
+
@apply !w-auto;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--rounded {
|
|
42
|
+
@apply !rounded-full;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--square {
|
|
46
|
+
@apply aspect-square;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--full-width {
|
|
50
|
+
@apply w-full
|
|
51
|
+
flex-auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--small {
|
|
55
|
+
@apply py-1
|
|
56
|
+
px-2
|
|
57
|
+
max-h-7;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--large {
|
|
61
|
+
@apply py-2
|
|
62
|
+
px-4
|
|
63
|
+
max-h-9;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&--primary {
|
|
67
|
+
@apply bg-primary-600
|
|
68
|
+
text-white
|
|
69
|
+
hover:bg-primary-800
|
|
70
|
+
active:bg-primary-700
|
|
71
|
+
focus:ring-primary-300
|
|
72
|
+
disabled:hover:bg-slate-400
|
|
73
|
+
disabled:bg-slate-400
|
|
74
|
+
disabled:text-slate-200;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--secondary {
|
|
78
|
+
@apply bg-slate-200
|
|
79
|
+
text-slate-600
|
|
80
|
+
hover:bg-slate-400
|
|
81
|
+
hover:text-slate-800
|
|
82
|
+
active:text-slate-700
|
|
83
|
+
active:bg-slate-300
|
|
84
|
+
focus:ring-slate-300
|
|
85
|
+
disabled:bg-slate-200
|
|
86
|
+
disabled:hover:bg-slate-200
|
|
87
|
+
disabled:text-slate-400;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&--danger {
|
|
91
|
+
@apply bg-danger-600
|
|
92
|
+
text-white
|
|
93
|
+
hover:bg-danger-800
|
|
94
|
+
active:bg-danger-700
|
|
95
|
+
focus:ring-danger-300
|
|
96
|
+
disabled:bg-slate-200
|
|
97
|
+
disabled:hover:bg-slate-200
|
|
98
|
+
disabled:text-slate-400;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--warning {
|
|
102
|
+
@apply bg-warning-50
|
|
103
|
+
text-warning-600
|
|
104
|
+
hover:bg-warning-200
|
|
105
|
+
hover:text-warning-800
|
|
106
|
+
active:text-warning-700
|
|
107
|
+
active:bg-warning-100
|
|
108
|
+
focus:ring-warning-300
|
|
109
|
+
disabled:bg-warning-50
|
|
110
|
+
disabled:hover:bg-warning-50
|
|
111
|
+
disabled:text-slate-400;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--tertiary {
|
|
115
|
+
@apply bg-white border
|
|
116
|
+
text-slate-600
|
|
117
|
+
active:bg-slate-100
|
|
118
|
+
active:text-slate-700
|
|
119
|
+
focus:ring-slate-300
|
|
120
|
+
hover:bg-slate-200
|
|
121
|
+
hover:text-slate-800
|
|
122
|
+
border-slate-300
|
|
123
|
+
disabled:bg-slate-200
|
|
124
|
+
disabled:hover:bg-slate-200
|
|
125
|
+
disabled:text-slate-400;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&--transparent-primary {
|
|
129
|
+
@apply text-primary-600
|
|
130
|
+
hover:text-primary-700
|
|
131
|
+
active:bg-primary-700
|
|
132
|
+
focus:ring-primary-300
|
|
133
|
+
hover:bg-primary-500/10
|
|
134
|
+
disabled:hover:bg-transparent;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&--transparent-secondary {
|
|
138
|
+
@apply text-neutral-600
|
|
139
|
+
hover:text-neutral-800
|
|
140
|
+
active:text-neutral-700
|
|
141
|
+
active:bg-black/10
|
|
142
|
+
focus:ring-neutral-300
|
|
143
|
+
hover:bg-black/5
|
|
144
|
+
disabled:hover:bg-transparent;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&--transparent-danger {
|
|
148
|
+
@apply text-danger-600
|
|
149
|
+
active:bg-danger-600/10
|
|
150
|
+
focus:ring-danger-300
|
|
151
|
+
hover:bg-danger-600/10
|
|
152
|
+
disabled:hover:bg-transparent;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&--transparent-warning {
|
|
156
|
+
@apply text-warning-600
|
|
157
|
+
active:bg-warning-500/20
|
|
158
|
+
focus:ring-warning-300
|
|
159
|
+
hover:bg-warning-500/10
|
|
160
|
+
disabled:hover:bg-transparent;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&--transparent-tertiary {
|
|
164
|
+
@apply text-slate-600
|
|
165
|
+
active:bg-slate-200/20
|
|
166
|
+
focus:ring-slate-300
|
|
167
|
+
hover:bg-slate-600/10
|
|
168
|
+
disabled:hover:bg-transparent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&__container {
|
|
172
|
+
@apply w-5
|
|
173
|
+
h-5
|
|
174
|
+
flex
|
|
175
|
+
justify-center
|
|
176
|
+
items-center
|
|
177
|
+
box-border;
|
|
178
|
+
|
|
179
|
+
&--small {
|
|
180
|
+
@apply w-4
|
|
181
|
+
h-4
|
|
182
|
+
flex
|
|
183
|
+
justify-center
|
|
184
|
+
items-center
|
|
185
|
+
box-border;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* CSS related to the LAbel component */
|
|
191
|
+
|
|
192
|
+
.tu-label {
|
|
193
|
+
@apply leading-none
|
|
194
|
+
text-base
|
|
195
|
+
text-slate-700
|
|
196
|
+
whitespace-nowrap
|
|
197
|
+
text-ellipsis
|
|
198
|
+
items-center
|
|
199
|
+
grid
|
|
200
|
+
gap-2
|
|
201
|
+
hover:text-slate-800
|
|
202
|
+
group-hover:text-slate-800
|
|
203
|
+
active:text-slate-800
|
|
204
|
+
group-active:text-slate-800;
|
|
205
|
+
|
|
206
|
+
&--invalid {
|
|
207
|
+
@apply text-red-600
|
|
208
|
+
hover:text-red-700
|
|
209
|
+
group-hover:text-red-700
|
|
210
|
+
active:text-red-700
|
|
211
|
+
group-active:text-red-700;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&--disabled {
|
|
215
|
+
@apply text-slate-400
|
|
216
|
+
hover:text-slate-400
|
|
217
|
+
group-hover:text-slate-400;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* CSS related to the RadioGroup component */
|
|
222
|
+
.tu-radiogroup {
|
|
223
|
+
@apply flex
|
|
224
|
+
gap-2
|
|
225
|
+
w-fit
|
|
226
|
+
flex-col
|
|
227
|
+
items-start;
|
|
228
|
+
|
|
229
|
+
&--inline {
|
|
230
|
+
@apply flex
|
|
231
|
+
gap-3
|
|
232
|
+
flex-row
|
|
233
|
+
items-center;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.tu-radioitem {
|
|
238
|
+
@apply w-4
|
|
239
|
+
h-4
|
|
240
|
+
appearance-none
|
|
241
|
+
rounded-3xl
|
|
242
|
+
bg-white
|
|
243
|
+
border-solid
|
|
244
|
+
border
|
|
245
|
+
border-slate-300
|
|
246
|
+
shadow-sm
|
|
247
|
+
shrink-0
|
|
248
|
+
transition
|
|
249
|
+
box-border
|
|
250
|
+
hover:cursor-pointer
|
|
251
|
+
hover:bg-slate-100
|
|
252
|
+
focus:ring-2
|
|
253
|
+
focus:ring-offset-2
|
|
254
|
+
focus:ring-blue-700;
|
|
255
|
+
|
|
256
|
+
&__wrapper {
|
|
257
|
+
@apply flex
|
|
258
|
+
gap-2;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&--checked {
|
|
262
|
+
@apply border-solid
|
|
263
|
+
border-4
|
|
264
|
+
border-blue-600
|
|
265
|
+
bg-white
|
|
266
|
+
hover:bg-slate-100
|
|
267
|
+
hover:cursor-pointer
|
|
268
|
+
outline-0
|
|
269
|
+
active:bg-slate-200
|
|
270
|
+
active:ring-2
|
|
271
|
+
active:ring-offset-2
|
|
272
|
+
active:ring-blue-700
|
|
273
|
+
focus:bg-slate-200
|
|
274
|
+
focus:ring-2
|
|
275
|
+
focus:ring-offset-2
|
|
276
|
+
focus:ring-blue-700
|
|
277
|
+
group-active:ring-2
|
|
278
|
+
group-active:ring-offset-2
|
|
279
|
+
group-active:ring-blue-700;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&--invalid {
|
|
283
|
+
@apply border-red-600
|
|
284
|
+
active:ring-red-700
|
|
285
|
+
focus:ring-red-700
|
|
286
|
+
group-focus:ring-2
|
|
287
|
+
group-focus:ring-offset-2;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&--disabled {
|
|
291
|
+
@apply bg-slate-400
|
|
292
|
+
border-slate-300
|
|
293
|
+
cursor-not-allowed
|
|
294
|
+
group-hover:bg-slate-400
|
|
295
|
+
group-focus:bg-slate-400
|
|
296
|
+
hover:bg-slate-400
|
|
297
|
+
focus:bg-slate-400
|
|
298
|
+
active:bg-slate-400
|
|
299
|
+
focus:ring-0
|
|
300
|
+
focus:ring-offset-0
|
|
301
|
+
group-active:ring-0
|
|
302
|
+
group-active:ring-offset-0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&--disabled.tu-radioitem--checked {
|
|
306
|
+
@apply bg-white;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
&__label-container {
|
|
311
|
+
@apply gap-y-1
|
|
312
|
+
grid;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&__description {
|
|
316
|
+
@apply text-sm
|
|
317
|
+
font-normal
|
|
318
|
+
text-slate-500
|
|
319
|
+
text-left
|
|
320
|
+
whitespace-nowrap
|
|
321
|
+
text-ellipsis
|
|
322
|
+
overflow-hidden;
|
|
323
|
+
|
|
324
|
+
&--disabled {
|
|
325
|
+
@apply text-slate-400
|
|
326
|
+
hover:text-slate-400
|
|
327
|
+
group-hover:text-slate-400;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.tu-section-header {
|
|
333
|
+
@apply w-full;
|
|
334
|
+
|
|
335
|
+
&__flex {
|
|
336
|
+
@apply flex
|
|
337
|
+
items-center
|
|
338
|
+
flex-wrap-reverse
|
|
339
|
+
gap-2;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.tu-textarea {
|
|
344
|
+
@apply tu-input-base
|
|
345
|
+
block
|
|
346
|
+
overflow-auto
|
|
347
|
+
appearance-none
|
|
348
|
+
px-3
|
|
349
|
+
py-2
|
|
350
|
+
bg-transparent
|
|
351
|
+
text-base
|
|
352
|
+
text-slate-900
|
|
353
|
+
placeholder-slate-400
|
|
354
|
+
focus-visible:outline-none
|
|
355
|
+
w-full
|
|
356
|
+
h-20
|
|
357
|
+
transition;
|
|
358
|
+
|
|
359
|
+
&--invalid {
|
|
360
|
+
@apply tu-input--invalid;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&--disabled {
|
|
364
|
+
@apply tu-input--disabled;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* CSS related to the toggle component */
|
|
369
|
+
.tu-toggle {
|
|
370
|
+
@apply rounded-full
|
|
371
|
+
bg-white
|
|
372
|
+
h-full
|
|
373
|
+
aspect-square
|
|
374
|
+
translate-x-0
|
|
375
|
+
transition-all;
|
|
376
|
+
|
|
377
|
+
&__wrapper {
|
|
378
|
+
@apply flex
|
|
379
|
+
gap-2;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
&__input-container {
|
|
383
|
+
@apply flex
|
|
384
|
+
self-start
|
|
385
|
+
w-fit
|
|
386
|
+
active:shadow
|
|
387
|
+
rounded-full
|
|
388
|
+
cursor-pointer
|
|
389
|
+
focus-within:ring
|
|
390
|
+
focus-within:ring-offset-2
|
|
391
|
+
focus-within:ring-blue-700;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
&__input {
|
|
395
|
+
@apply absolute
|
|
396
|
+
opacity-0
|
|
397
|
+
-z-10;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
&__switch-container {
|
|
401
|
+
@apply flex
|
|
402
|
+
items-center
|
|
403
|
+
p-1
|
|
404
|
+
cursor-pointer
|
|
405
|
+
rounded-full
|
|
406
|
+
bg-slate-300
|
|
407
|
+
focus:bg-slate-400
|
|
408
|
+
hover:bg-slate-400
|
|
409
|
+
active:bg-slate-500;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
&__switch {
|
|
413
|
+
@apply bg-white
|
|
414
|
+
rounded-full
|
|
415
|
+
h-full
|
|
416
|
+
w-5/12
|
|
417
|
+
aspect-square
|
|
418
|
+
translate-x-4
|
|
419
|
+
transition-all;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
&--medium {
|
|
423
|
+
@apply flex
|
|
424
|
+
items-center
|
|
425
|
+
p-1
|
|
426
|
+
cursor-pointer
|
|
427
|
+
w-9
|
|
428
|
+
h-5;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
&--small {
|
|
432
|
+
@apply flex
|
|
433
|
+
items-center
|
|
434
|
+
p-1
|
|
435
|
+
cursor-pointer
|
|
436
|
+
w-8
|
|
437
|
+
h-4;
|
|
438
|
+
|
|
439
|
+
.tu-toggle__switch {
|
|
440
|
+
@apply w-4/12;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
&--toggled {
|
|
445
|
+
@apply flex
|
|
446
|
+
items-center
|
|
447
|
+
p-1
|
|
448
|
+
cursor-pointer
|
|
449
|
+
bg-blue-600
|
|
450
|
+
focus:bg-blue-700
|
|
451
|
+
hover:bg-blue-700
|
|
452
|
+
active:bg-blue-800;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
&--disabled {
|
|
456
|
+
@apply flex
|
|
457
|
+
items-center
|
|
458
|
+
p-1
|
|
459
|
+
cursor-not-allowed
|
|
460
|
+
pointer-events-none
|
|
461
|
+
bg-slate-200;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
&--disabled.tu-toggle--toggled {
|
|
465
|
+
@apply bg-slate-400;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
&__label-container {
|
|
469
|
+
@apply gap-y-1
|
|
470
|
+
grid;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
&__description {
|
|
474
|
+
@apply text-sm
|
|
475
|
+
font-normal
|
|
476
|
+
text-slate-500
|
|
477
|
+
text-left
|
|
478
|
+
whitespace-nowrap
|
|
479
|
+
text-ellipsis
|
|
480
|
+
overflow-hidden;
|
|
481
|
+
|
|
482
|
+
&--disabled {
|
|
483
|
+
@apply text-slate-400
|
|
484
|
+
hover:text-slate-400
|
|
485
|
+
group-hover:text-slate-400;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
package/index.d.ts
ADDED