@igne-agency/react-web-ui 0.5.0 → 0.6.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/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -1,119 +1,168 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._root_1hxbi_3 {
|
|
4
4
|
display: inline-flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
align-items: flex-start;
|
|
7
7
|
gap: var(--checkbox-gap, var(--sys-unit-8));
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
._label_1hxbi_9 {
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
13
|
-
border-color: var(--sys-color-primary);
|
|
12
|
+
._label_1hxbi_9:hover ._control_1hxbi_12 {
|
|
13
|
+
border-color: var(--checkbox-hover-border, var(--sys-color-primary));
|
|
14
14
|
}
|
|
15
|
-
:where([data-readonly], [data-disabled]) .
|
|
15
|
+
:where([data-readonly], [data-disabled]) ._label_1hxbi_9 {
|
|
16
16
|
cursor: default;
|
|
17
17
|
}
|
|
18
|
-
:where([data-readonly], [data-disabled]) .
|
|
19
|
-
border-color: var(--
|
|
18
|
+
:where([data-readonly], [data-disabled]) ._label_1hxbi_9:hover ._control_1hxbi_12:not([data-checked]) {
|
|
19
|
+
border-color: var(--_checkbox-border, var(--checkbox-border, var(--sys-color-border)));
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
._label_1hxbi_9 {
|
|
22
22
|
display: inline-grid;
|
|
23
23
|
grid-template-columns: auto 1fr;
|
|
24
24
|
grid-template-areas: "control text";
|
|
25
25
|
align-items: center;
|
|
26
|
-
gap: var(--sys-unit-1) var(--sys-unit-6);
|
|
26
|
+
gap: var(--checkbox-label-row-gap, var(--sys-unit-1)) var(--checkbox-label-gap, var(--sys-unit-6));
|
|
27
|
+
font: var(--checkbox-label-font, inherit);
|
|
27
28
|
}
|
|
28
|
-
.
|
|
29
|
+
._label_1hxbi_9:has(> [data-optional-suffix]) {
|
|
29
30
|
grid-template-areas: "control text" "control optional";
|
|
30
31
|
}
|
|
31
|
-
.
|
|
32
|
-
--
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
._control_1hxbi_12 {
|
|
33
|
+
--_checkbox-border: var(
|
|
34
|
+
--checkbox-border,
|
|
35
|
+
var(--sys-color-border)
|
|
36
|
+
);
|
|
37
|
+
--_checkbox-bg: var(
|
|
38
|
+
--checkbox-bg,
|
|
39
|
+
var(--sys-color-surface)
|
|
40
|
+
);
|
|
41
|
+
--_checkbox-fg: var(
|
|
42
|
+
--checkbox-fg,
|
|
43
|
+
var(--sys-color-on-primary)
|
|
44
|
+
);
|
|
45
|
+
--_checkbox-checked-bg: var(
|
|
46
|
+
--checkbox-checked-bg,
|
|
47
|
+
var(--sys-color-primary)
|
|
48
|
+
);
|
|
36
49
|
display: grid;
|
|
37
50
|
flex: 0 0 auto;
|
|
38
51
|
place-items: center;
|
|
39
52
|
box-sizing: border-box;
|
|
40
53
|
inline-size: var(--checkbox-size, var(--sys-unit-16));
|
|
41
54
|
block-size: var(--checkbox-size, var(--sys-unit-16));
|
|
42
|
-
border: 1px solid var(--
|
|
43
|
-
border-radius: var(--sys-radius-sm);
|
|
44
|
-
background: var(--
|
|
45
|
-
color: var(--
|
|
55
|
+
border: var(--checkbox-border-width, 1px) solid var(--_checkbox-border);
|
|
56
|
+
border-radius: var(--checkbox-radius, var(--sys-radius-sm));
|
|
57
|
+
background: var(--_checkbox-bg);
|
|
58
|
+
color: var(--_checkbox-fg);
|
|
46
59
|
}
|
|
47
60
|
@media not (prefers-reduced-motion) {
|
|
48
|
-
.
|
|
61
|
+
._control_1hxbi_12 {
|
|
49
62
|
transition: background var(--sys-motion-instant) var(--sys-motion-standard), border-color var(--sys-motion-instant) var(--sys-motion-standard);
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
|
-
.
|
|
53
|
-
border-color: var(--sys-color-primary);
|
|
65
|
+
._control_1hxbi_12:focus-visible {
|
|
66
|
+
border-color: var(--checkbox-focus-border, var(--sys-color-primary));
|
|
54
67
|
}
|
|
55
|
-
.
|
|
68
|
+
._control_1hxbi_12 {
|
|
56
69
|
outline: 0 solid var(--sys-color-focus-ring);
|
|
57
70
|
outline-offset: var(--sys-focus-ring-offset);
|
|
58
71
|
}
|
|
59
|
-
.
|
|
72
|
+
._control_1hxbi_12[data-focus-visible] {
|
|
60
73
|
outline-width: var(--sys-focus-ring-width);
|
|
61
74
|
}
|
|
62
|
-
.
|
|
75
|
+
._control_1hxbi_12 {
|
|
63
76
|
position: relative;
|
|
64
77
|
grid-area: control;
|
|
65
78
|
align-self: center;
|
|
66
79
|
justify-self: center;
|
|
67
80
|
}
|
|
68
|
-
.
|
|
69
|
-
--
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
--
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
--
|
|
88
|
-
|
|
81
|
+
._control_1hxbi_12[data-invalid], ._control_1hxbi_12[aria-invalid=true] {
|
|
82
|
+
--_checkbox-border: var(
|
|
83
|
+
--checkbox-invalid-border,
|
|
84
|
+
var(--sys-color-error-fg)
|
|
85
|
+
);
|
|
86
|
+
--_checkbox-bg: var(
|
|
87
|
+
--checkbox-invalid-bg,
|
|
88
|
+
var(--sys-color-error-bg)
|
|
89
|
+
);
|
|
90
|
+
--_checkbox-checked-bg: var(
|
|
91
|
+
--checkbox-invalid-checked-bg,
|
|
92
|
+
var(--sys-color-error-fg)
|
|
93
|
+
);
|
|
94
|
+
--_checkbox-fg: var(
|
|
95
|
+
--checkbox-invalid-fg,
|
|
96
|
+
var(--sys-color-error-bg)
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
._control_1hxbi_12[data-readonly] {
|
|
100
|
+
--_checkbox-border: var(
|
|
101
|
+
--checkbox-readonly-border,
|
|
102
|
+
var(--sys-color-outline)
|
|
103
|
+
);
|
|
104
|
+
--_checkbox-bg: var(
|
|
105
|
+
--checkbox-readonly-bg,
|
|
106
|
+
var(--sys-color-surface-high)
|
|
107
|
+
);
|
|
108
|
+
--_checkbox-checked-bg: var(
|
|
109
|
+
--checkbox-readonly-checked-bg,
|
|
110
|
+
var(--sys-color-primary-container)
|
|
111
|
+
);
|
|
112
|
+
--_checkbox-fg: var(
|
|
113
|
+
--checkbox-readonly-fg,
|
|
114
|
+
var(--sys-color-on-primary-container)
|
|
115
|
+
);
|
|
116
|
+
border-style: var(--checkbox-readonly-border-style, dashed);
|
|
117
|
+
}
|
|
118
|
+
._control_1hxbi_12[data-checked], ._control_1hxbi_12[data-indeterminate] {
|
|
119
|
+
--_checkbox-border: var(
|
|
120
|
+
--checkbox-checked-border,
|
|
121
|
+
var(--_checkbox-checked-bg)
|
|
122
|
+
);
|
|
123
|
+
--_checkbox-bg: var(--_checkbox-checked-bg);
|
|
124
|
+
}
|
|
125
|
+
._control_1hxbi_12[data-disabled], ._control_1hxbi_12:has(~ :disabled) {
|
|
126
|
+
--_checkbox-bg: var(
|
|
127
|
+
--checkbox-disabled-bg,
|
|
128
|
+
var(--sys-color-disabled-bg)
|
|
129
|
+
);
|
|
130
|
+
--_checkbox-checked-bg: var(
|
|
131
|
+
--checkbox-disabled-checked-bg,
|
|
132
|
+
var(--sys-color-disabled-bg)
|
|
133
|
+
);
|
|
134
|
+
--_checkbox-fg: var(
|
|
135
|
+
--checkbox-disabled-fg,
|
|
136
|
+
var(--sys-color-disabled-fg)
|
|
137
|
+
);
|
|
89
138
|
cursor: not-allowed;
|
|
90
139
|
}
|
|
91
|
-
.
|
|
140
|
+
._indicator_1hxbi_140 {
|
|
92
141
|
display: grid;
|
|
93
142
|
place-items: center;
|
|
94
143
|
}
|
|
95
|
-
.
|
|
96
|
-
inline-size: calc(var(--checkbox-size, var(--sys-unit-16)) * 0.7);
|
|
97
|
-
block-size: calc(var(--checkbox-size, var(--sys-unit-16)) * 0.7);
|
|
144
|
+
._indicator_1hxbi_140 svg {
|
|
145
|
+
inline-size: var(--checkbox-indicator-size, calc(var(--checkbox-size, var(--sys-unit-16)) * 0.7));
|
|
146
|
+
block-size: var(--checkbox-indicator-size, calc(var(--checkbox-size, var(--sys-unit-16)) * 0.7));
|
|
98
147
|
}
|
|
99
|
-
.
|
|
148
|
+
._indicator_1hxbi_140 {
|
|
100
149
|
opacity: 0;
|
|
101
150
|
scale: 0;
|
|
102
151
|
}
|
|
103
152
|
@media not (prefers-reduced-motion) {
|
|
104
|
-
.
|
|
153
|
+
._indicator_1hxbi_140 {
|
|
105
154
|
transition: opacity var(--sys-motion-instant) var(--sys-motion-standard), scale var(--sys-motion-instant) var(--sys-motion-standard);
|
|
106
155
|
}
|
|
107
156
|
}
|
|
108
|
-
.
|
|
109
|
-
font-size: calc(var(--checkbox-size, var(--sys-unit-16)) * 0.7);
|
|
157
|
+
._indicator_1hxbi_140 {
|
|
158
|
+
font-size: var(--checkbox-indicator-size, calc(var(--checkbox-size, var(--sys-unit-16)) * 0.7));
|
|
110
159
|
}
|
|
111
|
-
.
|
|
160
|
+
._indicator_1hxbi_140[data-checked], ._indicator_1hxbi_140[data-indeterminate] {
|
|
112
161
|
opacity: 1;
|
|
113
162
|
scale: 1;
|
|
114
163
|
}
|
|
115
164
|
@media not (prefers-reduced-motion) {
|
|
116
|
-
.
|
|
165
|
+
._indicator_1hxbi_140[data-checked], ._indicator_1hxbi_140[data-indeterminate] {
|
|
117
166
|
transition: opacity var(--sys-motion-instant) var(--sys-motion-standard), scale var(--sys-motion-short) var(--sys-motion-overshoot);
|
|
118
167
|
}
|
|
119
168
|
}
|
|
@@ -44,12 +44,13 @@ export type CheckboxParts = Readonly<{
|
|
|
44
44
|
* `CheckboxField`.
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
|
-
* <Checkbox.Root filled={agreed}>
|
|
47
|
+
* <Checkbox.Root filled={agreed} requiredness="required">
|
|
48
48
|
* <Checkbox.Label>
|
|
49
49
|
* <Checkbox.Control checked={agreed} onCheckedChange={setAgreed}>
|
|
50
50
|
* <Checkbox.Indicator><CheckIcon /></Checkbox.Indicator>
|
|
51
51
|
* </Checkbox.Control>
|
|
52
|
-
* I agree to the terms
|
|
52
|
+
* <Field.InlineLabelText>I agree to the terms <Field.RequiredMark /></Field.InlineLabelText>
|
|
53
|
+
* <Field.InlineOptional optionalLabel="optional" />
|
|
53
54
|
* </Checkbox.Label>
|
|
54
55
|
* </Checkbox.Root>
|
|
55
56
|
*/
|
|
@@ -12,7 +12,7 @@ import { Field } from "@base-ui/react/field";
|
|
|
12
12
|
// src/components/checkbox-field/checkbox.tsx
|
|
13
13
|
/** The field around one checkbox, which projects its state as `data-*` attributes. */
|
|
14
14
|
var CheckboxRoot = (t0) => {
|
|
15
|
-
const $ = c(
|
|
15
|
+
const $ = c(33);
|
|
16
16
|
let className;
|
|
17
17
|
let dirty;
|
|
18
18
|
let disabled;
|
|
@@ -86,11 +86,12 @@ var CheckboxRoot = (t0) => {
|
|
|
86
86
|
$[23] = t5;
|
|
87
87
|
} else t5 = $[23];
|
|
88
88
|
let t6;
|
|
89
|
-
if ($[24] !== dirty || $[25] !== field.disabled || $[26] !== field.invalid || $[27] !== props || $[28] !==
|
|
89
|
+
if ($[24] !== dirty || $[25] !== field.disabled || $[26] !== field.invalid || $[27] !== props || $[28] !== requiredness || $[29] !== t2 || $[30] !== t5 || $[31] !== touched) {
|
|
90
90
|
t6 = /* @__PURE__ */ jsx(Field$1.Root, {
|
|
91
91
|
className: t2,
|
|
92
92
|
disabled: t3,
|
|
93
93
|
invalid: t4,
|
|
94
|
+
requiredness,
|
|
94
95
|
dirty,
|
|
95
96
|
touched,
|
|
96
97
|
...t5,
|
|
@@ -100,11 +101,12 @@ var CheckboxRoot = (t0) => {
|
|
|
100
101
|
$[25] = field.disabled;
|
|
101
102
|
$[26] = field.invalid;
|
|
102
103
|
$[27] = props;
|
|
103
|
-
$[28] =
|
|
104
|
-
$[29] =
|
|
105
|
-
$[30] =
|
|
106
|
-
$[31] =
|
|
107
|
-
|
|
104
|
+
$[28] = requiredness;
|
|
105
|
+
$[29] = t2;
|
|
106
|
+
$[30] = t5;
|
|
107
|
+
$[31] = touched;
|
|
108
|
+
$[32] = t6;
|
|
109
|
+
} else t6 = $[32];
|
|
108
110
|
return t6;
|
|
109
111
|
};
|
|
110
112
|
/** The label beside the box, which wraps the control and its text so the two share one hit area. */
|
|
@@ -235,12 +237,13 @@ var CheckboxIndicator = (t0) => {
|
|
|
235
237
|
* `CheckboxField`.
|
|
236
238
|
*
|
|
237
239
|
* @example
|
|
238
|
-
* <Checkbox.Root filled={agreed}>
|
|
240
|
+
* <Checkbox.Root filled={agreed} requiredness="required">
|
|
239
241
|
* <Checkbox.Label>
|
|
240
242
|
* <Checkbox.Control checked={agreed} onCheckedChange={setAgreed}>
|
|
241
243
|
* <Checkbox.Indicator><CheckIcon /></Checkbox.Indicator>
|
|
242
244
|
* </Checkbox.Control>
|
|
243
|
-
* I agree to the terms
|
|
245
|
+
* <Field.InlineLabelText>I agree to the terms <Field.RequiredMark /></Field.InlineLabelText>
|
|
246
|
+
* <Field.InlineOptional optionalLabel="optional" />
|
|
244
247
|
* </Checkbox.Label>
|
|
245
248
|
* </Checkbox.Root>
|
|
246
249
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './checkbox.css';// src/components/checkbox-field/checkbox.module.scss
|
|
2
|
-
var root = "
|
|
3
|
-
var label = "
|
|
4
|
-
var control = "
|
|
5
|
-
var indicator = "
|
|
2
|
+
var root = "_root_1hxbi_3";
|
|
3
|
+
var label = "_label_1hxbi_9";
|
|
4
|
+
var control = "_control_1hxbi_12";
|
|
5
|
+
var indicator = "_indicator_1hxbi_140";
|
|
6
6
|
var checkbox_module_default = {
|
|
7
7
|
root,
|
|
8
8
|
label,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Field } from "../field/field.js";
|
|
1
2
|
import { detachHiddenInput } from "../field/hidden-input.js";
|
|
2
3
|
import { CheckboxGroup } from "./checkbox-group.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -19,28 +20,33 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
19
20
|
* />
|
|
20
21
|
*/
|
|
21
22
|
var CheckboxGroupField = (t0) => {
|
|
22
|
-
const $ = c(
|
|
23
|
+
const $ = c(41);
|
|
23
24
|
const { label, description, errors, requiredness, optionalLabel, dirty, touched, pending, items, checkIcon, readOnly, name, onBlur, className, value, defaultValue, onValueChange, disabled } = t0;
|
|
24
25
|
const { controlId } = CheckboxGroup.useIds();
|
|
25
26
|
const prefix = name ?? controlId;
|
|
26
27
|
const t1 = value !== void 0 && value.length > 0;
|
|
27
28
|
let t2;
|
|
28
|
-
if ($[0] !==
|
|
29
|
-
t2 = /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
$[0] = label;
|
|
35
|
-
$[1] = optionalLabel;
|
|
36
|
-
$[2] = requiredness;
|
|
37
|
-
$[3] = t2;
|
|
38
|
-
} else t2 = $[3];
|
|
29
|
+
if ($[0] !== optionalLabel) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsx(Field.Requiredness, { optionalLabel });
|
|
31
|
+
$[0] = optionalLabel;
|
|
32
|
+
$[1] = t2;
|
|
33
|
+
} else t2 = $[1];
|
|
39
34
|
let t3;
|
|
40
|
-
if ($[
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
if ($[2] !== label || $[3] !== t2) {
|
|
36
|
+
t3 = /* @__PURE__ */ jsxs(CheckboxGroup.Legend, { children: [
|
|
37
|
+
label,
|
|
38
|
+
" ",
|
|
39
|
+
t2
|
|
40
|
+
] });
|
|
41
|
+
$[2] = label;
|
|
42
|
+
$[3] = t2;
|
|
43
|
+
$[4] = t3;
|
|
44
|
+
} else t3 = $[4];
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[5] !== checkIcon || $[6] !== items || $[7] !== onBlur || $[8] !== prefix || $[9] !== readOnly) {
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[11] !== checkIcon || $[12] !== onBlur || $[13] !== prefix || $[14] !== readOnly) {
|
|
49
|
+
t5 = (item) => /* @__PURE__ */ jsxs(CheckboxGroup.Item, { children: [/* @__PURE__ */ jsx(CheckboxGroup.Control, {
|
|
44
50
|
id: `${prefix}-${item.value}`,
|
|
45
51
|
name: prefix,
|
|
46
52
|
inputRef: detachHiddenInput,
|
|
@@ -49,51 +55,51 @@ var CheckboxGroupField = (t0) => {
|
|
|
49
55
|
readOnly,
|
|
50
56
|
children: /* @__PURE__ */ jsx(CheckboxGroup.Indicator, { children: checkIcon })
|
|
51
57
|
}), item.label] }, item.value);
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
} else
|
|
58
|
-
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
} else
|
|
66
|
-
let
|
|
67
|
-
if ($[
|
|
68
|
-
|
|
58
|
+
$[11] = checkIcon;
|
|
59
|
+
$[12] = onBlur;
|
|
60
|
+
$[13] = prefix;
|
|
61
|
+
$[14] = readOnly;
|
|
62
|
+
$[15] = t5;
|
|
63
|
+
} else t5 = $[15];
|
|
64
|
+
t4 = items.map(t5);
|
|
65
|
+
$[5] = checkIcon;
|
|
66
|
+
$[6] = items;
|
|
67
|
+
$[7] = onBlur;
|
|
68
|
+
$[8] = prefix;
|
|
69
|
+
$[9] = readOnly;
|
|
70
|
+
$[10] = t4;
|
|
71
|
+
} else t4 = $[10];
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[16] !== defaultValue || $[17] !== disabled || $[18] !== onValueChange || $[19] !== t4 || $[20] !== value) {
|
|
74
|
+
t5 = /* @__PURE__ */ jsx(CheckboxGroup.Group, {
|
|
69
75
|
value,
|
|
70
76
|
defaultValue,
|
|
71
77
|
onValueChange,
|
|
72
78
|
disabled,
|
|
73
|
-
children:
|
|
79
|
+
children: t4
|
|
74
80
|
});
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
} else
|
|
82
|
-
let t5;
|
|
83
|
-
if ($[21] !== description) {
|
|
84
|
-
t5 = /* @__PURE__ */ jsx(CheckboxGroup.Description, { children: description });
|
|
85
|
-
$[21] = description;
|
|
86
|
-
$[22] = t5;
|
|
87
|
-
} else t5 = $[22];
|
|
81
|
+
$[16] = defaultValue;
|
|
82
|
+
$[17] = disabled;
|
|
83
|
+
$[18] = onValueChange;
|
|
84
|
+
$[19] = t4;
|
|
85
|
+
$[20] = value;
|
|
86
|
+
$[21] = t5;
|
|
87
|
+
} else t5 = $[21];
|
|
88
88
|
let t6;
|
|
89
|
-
if ($[
|
|
90
|
-
t6 = /* @__PURE__ */ jsx(CheckboxGroup.
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
} else t6 = $[
|
|
89
|
+
if ($[22] !== description) {
|
|
90
|
+
t6 = /* @__PURE__ */ jsx(CheckboxGroup.Description, { children: description });
|
|
91
|
+
$[22] = description;
|
|
92
|
+
$[23] = t6;
|
|
93
|
+
} else t6 = $[23];
|
|
94
94
|
let t7;
|
|
95
|
-
if ($[
|
|
96
|
-
t7 = /* @__PURE__ */
|
|
95
|
+
if ($[24] !== errors) {
|
|
96
|
+
t7 = /* @__PURE__ */ jsx(CheckboxGroup.Error, { children: errors });
|
|
97
|
+
$[24] = errors;
|
|
98
|
+
$[25] = t7;
|
|
99
|
+
} else t7 = $[25];
|
|
100
|
+
let t8;
|
|
101
|
+
if ($[26] !== className || $[27] !== dirty || $[28] !== disabled || $[29] !== errors || $[30] !== name || $[31] !== pending || $[32] !== readOnly || $[33] !== requiredness || $[34] !== t1 || $[35] !== t3 || $[36] !== t5 || $[37] !== t6 || $[38] !== t7 || $[39] !== touched) {
|
|
102
|
+
t8 = /* @__PURE__ */ jsxs(CheckboxGroup.Root, {
|
|
97
103
|
name,
|
|
98
104
|
className,
|
|
99
105
|
disabled,
|
|
@@ -105,28 +111,28 @@ var CheckboxGroupField = (t0) => {
|
|
|
105
111
|
pending,
|
|
106
112
|
filled: t1,
|
|
107
113
|
children: [
|
|
108
|
-
|
|
109
|
-
t4,
|
|
114
|
+
t3,
|
|
110
115
|
t5,
|
|
111
|
-
t6
|
|
116
|
+
t6,
|
|
117
|
+
t7
|
|
112
118
|
]
|
|
113
119
|
});
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[35] = t4;
|
|
120
|
+
$[26] = className;
|
|
121
|
+
$[27] = dirty;
|
|
122
|
+
$[28] = disabled;
|
|
123
|
+
$[29] = errors;
|
|
124
|
+
$[30] = name;
|
|
125
|
+
$[31] = pending;
|
|
126
|
+
$[32] = readOnly;
|
|
127
|
+
$[33] = requiredness;
|
|
128
|
+
$[34] = t1;
|
|
129
|
+
$[35] = t3;
|
|
125
130
|
$[36] = t5;
|
|
126
131
|
$[37] = t6;
|
|
127
|
-
$[38] =
|
|
128
|
-
$[39] =
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
$[38] = t7;
|
|
133
|
+
$[39] = touched;
|
|
134
|
+
$[40] = t8;
|
|
135
|
+
} else t8 = $[40];
|
|
136
|
+
return t8;
|
|
131
137
|
};
|
|
132
138
|
export { CheckboxGroupField };
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._group_42ue7_3 {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
align-items: flex-start;
|
|
7
7
|
gap: var(--checkbox-group-gap, var(--sys-unit-6));
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
._label_42ue7_9 {
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
13
|
-
border-color: var(--sys-color-primary);
|
|
12
|
+
._label_42ue7_9:hover [role=checkbox] {
|
|
13
|
+
border-color: var(--checkbox-hover-border, var(--sys-color-primary));
|
|
14
14
|
}
|
|
15
|
-
:where([data-readonly], [data-disabled]) .
|
|
15
|
+
:where([data-readonly], [data-disabled]) ._label_42ue7_9 {
|
|
16
16
|
cursor: default;
|
|
17
17
|
}
|
|
18
|
-
:where([data-readonly], [data-disabled]) .
|
|
19
|
-
border-color: var(--
|
|
18
|
+
:where([data-readonly], [data-disabled]) ._label_42ue7_9:hover [role=checkbox]:not([data-checked]) {
|
|
19
|
+
border-color: var(--_checkbox-border, var(--checkbox-border, var(--sys-color-border)));
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
._label_42ue7_9 {
|
|
22
22
|
display: inline-grid;
|
|
23
23
|
grid-template-columns: auto 1fr;
|
|
24
24
|
grid-template-areas: "control text";
|
|
25
25
|
align-items: center;
|
|
26
|
-
gap: var(--sys-unit-1) var(--sys-unit-6);
|
|
26
|
+
gap: var(--checkbox-label-row-gap, var(--sys-unit-1)) var(--checkbox-label-gap, var(--sys-unit-6));
|
|
27
|
+
font: var(--checkbox-label-font, inherit);
|
|
27
28
|
}
|
|
28
|
-
.
|
|
29
|
+
._label_42ue7_9:has(> [data-optional-suffix]) {
|
|
29
30
|
grid-template-areas: "control text" "control optional";
|
|
30
31
|
}
|
|
32
|
+
._label_42ue7_9[data-disabled]:not([data-disabled] ._label_42ue7_9) {
|
|
33
|
+
opacity: var(--checkbox-group-item-disabled-opacity, 1);
|
|
34
|
+
}
|
|
31
35
|
}
|
|
@@ -27,8 +27,8 @@ export type CheckboxGroupParts = Readonly<{
|
|
|
27
27
|
* `CheckboxGroupField`.
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
* <CheckboxGroup.Root filled={values.length > 0}>
|
|
31
|
-
* <CheckboxGroup.Legend optionalLabel="optional"
|
|
30
|
+
* <CheckboxGroup.Root filled={values.length > 0} requiredness="optional">
|
|
31
|
+
* <CheckboxGroup.Legend>Statuses <Field.Requiredness optionalLabel="optional" /></CheckboxGroup.Legend>
|
|
32
32
|
* <CheckboxGroup.Group value={values} onValueChange={setValues}>
|
|
33
33
|
* <CheckboxGroup.Item>
|
|
34
34
|
* <CheckboxGroup.Control value="open">
|
|
@@ -81,8 +81,8 @@ var CheckboxGroupItem = (t0) => {
|
|
|
81
81
|
* `CheckboxGroupField`.
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
|
-
* <CheckboxGroup.Root filled={values.length > 0}>
|
|
85
|
-
* <CheckboxGroup.Legend optionalLabel="optional"
|
|
84
|
+
* <CheckboxGroup.Root filled={values.length > 0} requiredness="optional">
|
|
85
|
+
* <CheckboxGroup.Legend>Statuses <Field.Requiredness optionalLabel="optional" /></CheckboxGroup.Legend>
|
|
86
86
|
* <CheckboxGroup.Group value={values} onValueChange={setValues}>
|
|
87
87
|
* <CheckboxGroup.Item>
|
|
88
88
|
* <CheckboxGroup.Control value="open">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './checkbox-group.css';// src/components/checkbox-group-field/checkbox-group.module.scss
|
|
2
|
-
var group = "
|
|
3
|
-
var label = "
|
|
2
|
+
var group = "_group_42ue7_3";
|
|
3
|
+
var label = "_label_42ue7_9";
|
|
4
4
|
var checkbox_group_module_default = {
|
|
5
5
|
group,
|
|
6
6
|
label
|