@igne-agency/react-web-ui 0.4.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/base.css +3 -0
- 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/terrazzo/index.d.ts +4 -3
- package/dist/terrazzo/index.js +17 -6
- package/dist/tokens.css +28 -4
- package/package.json +2 -2
- 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,61 +1,61 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
4
|
-
--
|
|
3
|
+
._backdrop_5n47l_3 {
|
|
4
|
+
--_overlay-dim: 0.4;
|
|
5
5
|
--overlay-opacity: 1;
|
|
6
6
|
position: fixed;
|
|
7
7
|
inset: 0;
|
|
8
|
-
background-color: rgb(0, 0, 0, var(--overlay-dim));
|
|
9
|
-
backdrop-filter: blur(1px);
|
|
8
|
+
background-color: var(--overlay-bg, rgb(0, 0, 0, var(--overlay-dim, var(--_overlay-dim))));
|
|
9
|
+
backdrop-filter: var(--overlay-backdrop-filter, blur(1px));
|
|
10
10
|
opacity: var(--overlay-opacity);
|
|
11
11
|
}
|
|
12
12
|
@media not (prefers-reduced-motion) {
|
|
13
|
-
.
|
|
13
|
+
._backdrop_5n47l_3 {
|
|
14
14
|
transition: opacity var(--sys-motion-short) var(--sys-motion-standard);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
html[data-theme="dark"] .
|
|
18
|
-
--
|
|
17
|
+
html[data-theme="dark"] ._backdrop_5n47l_3 {
|
|
18
|
+
--_overlay-dim: 0.6;
|
|
19
19
|
}
|
|
20
20
|
@media (prefers-color-scheme: dark) {
|
|
21
|
-
html:not([data-theme="light"]) .
|
|
22
|
-
--
|
|
21
|
+
html:not([data-theme="light"]) ._backdrop_5n47l_3 {
|
|
22
|
+
--_overlay-dim: 0.6;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
._backdrop_5n47l_3[data-starting-style], ._backdrop_5n47l_3[data-ending-style] {
|
|
26
26
|
opacity: 0;
|
|
27
27
|
}
|
|
28
|
-
.
|
|
29
|
-
--
|
|
28
|
+
._backdrop_5n47l_3 {
|
|
29
|
+
--_overlay-dim: 0.22;
|
|
30
30
|
--overlay-opacity: calc(
|
|
31
31
|
1 - var(--drawer-swipe-progress)
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
@media not (prefers-reduced-motion) {
|
|
35
|
-
.
|
|
35
|
+
._backdrop_5n47l_3 {
|
|
36
36
|
transition-timing-function: var(--sys-motion-emphasized);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
@supports (-webkit-touch-callout: none) {
|
|
40
|
-
.
|
|
40
|
+
._backdrop_5n47l_3 {
|
|
41
41
|
position: absolute;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
html[data-theme="dark"] .
|
|
45
|
-
--
|
|
44
|
+
html[data-theme="dark"] ._backdrop_5n47l_3 {
|
|
45
|
+
--_overlay-dim: 0.4;
|
|
46
46
|
}
|
|
47
47
|
@media (prefers-color-scheme: dark) {
|
|
48
|
-
html:not([data-theme="light"]) .
|
|
49
|
-
--
|
|
48
|
+
html:not([data-theme="light"]) ._backdrop_5n47l_3 {
|
|
49
|
+
--_overlay-dim: 0.4;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
._backdrop_5n47l_3[data-swiping] {
|
|
53
53
|
transition-duration: 0ms;
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
._backdrop_5n47l_3[data-ending-style] {
|
|
56
56
|
transition-duration: calc(var(--drawer-swipe-strength) * 0.2s);
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
._viewport_5n47l_58 {
|
|
59
59
|
--drawer-viewport-padding: 0px;
|
|
60
60
|
position: fixed;
|
|
61
61
|
inset: 0;
|
|
@@ -64,89 +64,88 @@
|
|
|
64
64
|
padding: var(--drawer-viewport-padding);
|
|
65
65
|
}
|
|
66
66
|
@supports (-webkit-touch-callout: none) {
|
|
67
|
-
.
|
|
67
|
+
._viewport_5n47l_58 {
|
|
68
68
|
--drawer-viewport-padding: var(--sys-unit-8);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
._popup_5n47l_71 {
|
|
72
72
|
--drawer-bleed: 3rem;
|
|
73
|
-
--drawer-inset: var(--sys-unit-16);
|
|
74
73
|
position: relative;
|
|
75
74
|
box-sizing: border-box;
|
|
76
|
-
inline-size: calc(33dvw + var(--drawer-bleed));
|
|
77
|
-
min-inline-size: 24rem;
|
|
75
|
+
inline-size: calc(var(--drawer-inline-size, 33dvw) + var(--drawer-bleed));
|
|
76
|
+
min-inline-size: var(--drawer-min-inline-size, 24rem);
|
|
78
77
|
block-size: 100%;
|
|
79
78
|
background: var(--drawer-surface, var(--sys-color-surface));
|
|
80
|
-
padding: var(--drawer-inset);
|
|
81
|
-
padding-right: calc(var(--drawer-inset) + var(--drawer-bleed));
|
|
79
|
+
padding: var(--drawer-inset, var(--sys-unit-16));
|
|
80
|
+
padding-right: calc(var(--drawer-inset, var(--sys-unit-16)) + var(--drawer-bleed));
|
|
82
81
|
margin-right: calc(-1 * var(--drawer-bleed));
|
|
83
|
-
color: var(--sys-color-text);
|
|
82
|
+
color: var(--drawer-fg, var(--sys-color-text));
|
|
84
83
|
overflow-y: auto;
|
|
85
84
|
overscroll-behavior: contain;
|
|
86
85
|
touch-action: auto;
|
|
87
86
|
transform: translateX(var(--drawer-swipe-movement-x));
|
|
88
87
|
}
|
|
89
88
|
@media not (prefers-reduced-motion) {
|
|
90
|
-
.
|
|
89
|
+
._popup_5n47l_71 {
|
|
91
90
|
transition: transform var(--sys-motion-short) var(--sys-motion-emphasized);
|
|
92
91
|
will-change: transform;
|
|
93
92
|
}
|
|
94
93
|
}
|
|
95
|
-
.
|
|
94
|
+
._popup_5n47l_71::before {
|
|
96
95
|
content: "";
|
|
97
96
|
position: absolute;
|
|
98
97
|
inset-inline-start: var(--sys-unit-3);
|
|
99
98
|
inset-block-start: 50%;
|
|
100
|
-
inline-size: var(--sys-unit-2);
|
|
101
|
-
block-size: var(--sys-unit-16);
|
|
102
|
-
border-radius: var(--sys-radius-full);
|
|
103
|
-
background: var(--sys-color-outline);
|
|
99
|
+
inline-size: var(--drawer-handle-thickness, var(--sys-unit-2));
|
|
100
|
+
block-size: var(--drawer-handle-length, var(--sys-unit-16));
|
|
101
|
+
border-radius: var(--drawer-handle-radius, var(--sys-radius-full));
|
|
102
|
+
background: var(--drawer-handle-bg, var(--sys-color-outline));
|
|
104
103
|
translate: 0 -50%;
|
|
105
104
|
}
|
|
106
|
-
.
|
|
105
|
+
._popup_5n47l_71[data-swiping] {
|
|
107
106
|
user-select: none;
|
|
108
107
|
}
|
|
109
|
-
.
|
|
108
|
+
._popup_5n47l_71[data-starting-style], ._popup_5n47l_71[data-ending-style] {
|
|
110
109
|
transform: translateX(calc(100% - var(--drawer-bleed) + var(--drawer-viewport-padding) + 2px));
|
|
111
110
|
}
|
|
112
|
-
.
|
|
111
|
+
._popup_5n47l_71[data-ending-style] {
|
|
113
112
|
transition-duration: calc(var(--drawer-swipe-strength) * 0.2s);
|
|
114
113
|
}
|
|
115
114
|
@supports (-webkit-touch-callout: none) {
|
|
116
|
-
.
|
|
115
|
+
._popup_5n47l_71 {
|
|
117
116
|
--drawer-bleed: 0px;
|
|
118
117
|
margin-right: 0;
|
|
119
|
-
border-radius: var(--sys-radius-lg);
|
|
118
|
+
border-radius: var(--drawer-radius, var(--sys-radius-lg));
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
|
-
.
|
|
121
|
+
._popup_5n47l_71[data-swipe-direction=down] {
|
|
123
122
|
align-self: flex-end;
|
|
124
123
|
inline-size: 100%;
|
|
125
124
|
min-inline-size: 0;
|
|
126
125
|
block-size: var(--drawer-sheet-block-size, auto);
|
|
127
126
|
max-block-size: var(--drawer-sheet-max, 85dvh);
|
|
128
|
-
border-radius: var(--sys-radius-xl) var(--sys-radius-xl) 0 0;
|
|
127
|
+
border-radius: var(--drawer-sheet-radius, var(--sys-radius-xl)) var(--drawer-sheet-radius, var(--sys-radius-xl)) 0 0;
|
|
129
128
|
margin-right: 0;
|
|
130
129
|
margin-bottom: calc(-1 * var(--drawer-bleed));
|
|
131
|
-
padding-top: var(--sys-unit-6);
|
|
132
|
-
padding-right: var(--drawer-inset);
|
|
133
|
-
padding-bottom: calc(var(--drawer-inset) + var(--drawer-bleed) + 1.75rem);
|
|
130
|
+
padding-top: var(--drawer-handle-space, var(--sys-unit-6));
|
|
131
|
+
padding-right: var(--drawer-inset, var(--sys-unit-16));
|
|
132
|
+
padding-bottom: calc(var(--drawer-inset, var(--sys-unit-16)) + var(--drawer-bleed) + 1.75rem);
|
|
134
133
|
transform: translateY(var(--drawer-swipe-movement-y));
|
|
135
134
|
}
|
|
136
|
-
.
|
|
135
|
+
._popup_5n47l_71[data-swipe-direction=down]::before {
|
|
137
136
|
position: static;
|
|
138
137
|
display: block;
|
|
139
138
|
flex-shrink: 0;
|
|
140
|
-
inline-size: var(--sys-unit-16);
|
|
141
|
-
block-size: var(--sys-unit-2);
|
|
139
|
+
inline-size: var(--drawer-handle-length, var(--sys-unit-16));
|
|
140
|
+
block-size: var(--drawer-handle-thickness, var(--sys-unit-2));
|
|
142
141
|
margin-inline: auto;
|
|
143
|
-
margin-block-end: var(--sys-unit-6);
|
|
142
|
+
margin-block-end: var(--drawer-handle-space, var(--sys-unit-6));
|
|
144
143
|
translate: none;
|
|
145
144
|
}
|
|
146
|
-
.
|
|
145
|
+
._popup_5n47l_71[data-swipe-direction=down][data-starting-style], ._popup_5n47l_71[data-swipe-direction=down][data-ending-style] {
|
|
147
146
|
transform: translateY(calc(100% - var(--drawer-bleed) + var(--drawer-viewport-padding) + 2px));
|
|
148
147
|
}
|
|
149
|
-
.
|
|
148
|
+
._filled_5n47l_148 {
|
|
150
149
|
--drawer-sheet-block-size: var(
|
|
151
150
|
--drawer-sheet-max,
|
|
152
151
|
85dvh
|
|
@@ -155,14 +154,14 @@
|
|
|
155
154
|
flex-direction: column;
|
|
156
155
|
overflow: hidden;
|
|
157
156
|
}
|
|
158
|
-
.
|
|
157
|
+
._header_5n47l_157 {
|
|
159
158
|
display: flex;
|
|
160
159
|
align-items: center;
|
|
161
160
|
justify-content: space-between;
|
|
162
|
-
gap: var(--sys-unit-8);
|
|
161
|
+
gap: var(--drawer-header-gap, var(--sys-unit-8));
|
|
163
162
|
}
|
|
164
|
-
.
|
|
165
|
-
color: var(--sys-color-text);
|
|
166
|
-
font: var(--sys-font-heading-small);
|
|
163
|
+
._title_5n47l_163 {
|
|
164
|
+
color: var(--drawer-title-fg, var(--drawer-fg, var(--sys-color-text)));
|
|
165
|
+
font: var(--drawer-title-font, var(--sys-font-heading-small));
|
|
167
166
|
}
|
|
168
167
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
2
2
|
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import { type CloseButtonProps } from "../button/close-button.tsx";
|
|
4
3
|
export type DrawerRootProps<Payload = unknown> = Omit<BaseDrawer.Root.Props<Payload>, "open" | "defaultOpen" | "onOpenChange" | "modal" | "children" | "swipeDirection"> & Readonly<{
|
|
5
4
|
/** Whether the drawer is open. Leave it out for a drawer that keeps its own state. */
|
|
6
5
|
open?: boolean;
|
|
@@ -33,11 +32,8 @@ declare const Popup: ({ className, filled, ...props }: DrawerPopupProps) => Reac
|
|
|
33
32
|
/** The drawer's heading, which names it. */
|
|
34
33
|
declare const Title: ({ className, ...props }: ComponentProps<typeof BaseDrawer.Title>) => ReactNode;
|
|
35
34
|
export type DrawerHeaderProps = ComponentProps<"div">;
|
|
36
|
-
/** The title's line. Put a `Drawer.
|
|
35
|
+
/** The title's line. Put a `Drawer.Close` in it to trail a way out. */
|
|
37
36
|
declare const Header: ({ className, ...props }: DrawerHeaderProps) => ReactNode;
|
|
38
|
-
export type DrawerCloseButtonProps = Pick<CloseButtonProps, "closeLabel" | "icon">;
|
|
39
|
-
/** The icon-only way out, for a header or a footer, drawn with the app's `icon`. */
|
|
40
|
-
declare const CloseButton: ({ closeLabel, icon, }: DrawerCloseButtonProps) => ReactNode;
|
|
41
37
|
export type DrawerSheetProps = DrawerPopupProps & Readonly<{
|
|
42
38
|
/** The element the drawer is portalled into. @default document.body */
|
|
43
39
|
container?: BaseDrawer.Portal.Props["container"];
|
|
@@ -59,7 +55,6 @@ type DrawerParts = Readonly<{
|
|
|
59
55
|
Header: typeof Header;
|
|
60
56
|
Title: typeof Title;
|
|
61
57
|
Close: typeof BaseDrawer.Close;
|
|
62
|
-
CloseButton: typeof CloseButton;
|
|
63
58
|
createHandle: typeof BaseDrawer.createHandle;
|
|
64
59
|
}>;
|
|
65
60
|
/**
|
|
@@ -73,7 +68,13 @@ type DrawerParts = Readonly<{
|
|
|
73
68
|
* <Drawer.Sheet>
|
|
74
69
|
* <Drawer.Header>
|
|
75
70
|
* <Drawer.Title>Filters</Drawer.Title>
|
|
76
|
-
* <Drawer.
|
|
71
|
+
* <Drawer.Close
|
|
72
|
+
* render={
|
|
73
|
+
* <IconButton label="Close" variant="tertiary">
|
|
74
|
+
* <CloseIcon />
|
|
75
|
+
* </IconButton>
|
|
76
|
+
* }
|
|
77
|
+
* />
|
|
77
78
|
* </Drawer.Header>
|
|
78
79
|
* <Drawer.Close>Done</Drawer.Close>
|
|
79
80
|
* </Drawer.Sheet>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CloseButton as CloseButton$1 } from "../button/close-button.js";
|
|
2
1
|
import drawer_module_default from "./drawer.module.js";
|
|
3
2
|
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
@@ -149,7 +148,7 @@ var Title = (t0) => {
|
|
|
149
148
|
} else t2 = $[7];
|
|
150
149
|
return t2;
|
|
151
150
|
};
|
|
152
|
-
/** The title's line. Put a `Drawer.
|
|
151
|
+
/** The title's line. Put a `Drawer.Close` in it to trail a way out. */
|
|
153
152
|
var Header = (t0) => {
|
|
154
153
|
const $ = c(8);
|
|
155
154
|
let className;
|
|
@@ -181,28 +180,6 @@ var Header = (t0) => {
|
|
|
181
180
|
} else t2 = $[7];
|
|
182
181
|
return t2;
|
|
183
182
|
};
|
|
184
|
-
/** The icon-only way out, for a header or a footer, drawn with the app's `icon`. */
|
|
185
|
-
var CloseButton = (t0) => {
|
|
186
|
-
const $ = c(4);
|
|
187
|
-
const { closeLabel, icon } = t0;
|
|
188
|
-
let t1;
|
|
189
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
190
|
-
t1 = /* @__PURE__ */ jsx(Drawer.Close, {});
|
|
191
|
-
$[0] = t1;
|
|
192
|
-
} else t1 = $[0];
|
|
193
|
-
let t2;
|
|
194
|
-
if ($[1] !== closeLabel || $[2] !== icon) {
|
|
195
|
-
t2 = /* @__PURE__ */ jsx(CloseButton$1, {
|
|
196
|
-
closeLabel,
|
|
197
|
-
icon,
|
|
198
|
-
render: t1
|
|
199
|
-
});
|
|
200
|
-
$[1] = closeLabel;
|
|
201
|
-
$[2] = icon;
|
|
202
|
-
$[3] = t2;
|
|
203
|
-
} else t2 = $[3];
|
|
204
|
-
return t2;
|
|
205
|
-
};
|
|
206
183
|
/**
|
|
207
184
|
* `Portal`, `Backdrop`, `Viewport`, `Popup` and `Content` in one: the drawer's
|
|
208
185
|
* surface, above the page, holding its children.
|
|
@@ -267,7 +244,13 @@ var Sheet = (t0) => {
|
|
|
267
244
|
* <Drawer.Sheet>
|
|
268
245
|
* <Drawer.Header>
|
|
269
246
|
* <Drawer.Title>Filters</Drawer.Title>
|
|
270
|
-
* <Drawer.
|
|
247
|
+
* <Drawer.Close
|
|
248
|
+
* render={
|
|
249
|
+
* <IconButton label="Close" variant="tertiary">
|
|
250
|
+
* <CloseIcon />
|
|
251
|
+
* </IconButton>
|
|
252
|
+
* }
|
|
253
|
+
* />
|
|
271
254
|
* </Drawer.Header>
|
|
272
255
|
* <Drawer.Close>Done</Drawer.Close>
|
|
273
256
|
* </Drawer.Sheet>
|
|
@@ -285,7 +268,6 @@ var Drawer$1 = {
|
|
|
285
268
|
Header,
|
|
286
269
|
Title,
|
|
287
270
|
Close: Drawer.Close,
|
|
288
|
-
CloseButton,
|
|
289
271
|
createHandle: Drawer.createHandle
|
|
290
272
|
};
|
|
291
273
|
export { Drawer$1 as Drawer };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './drawer.css';// src/components/drawer/drawer.module.scss
|
|
2
|
-
var backdrop = "
|
|
3
|
-
var viewport = "
|
|
4
|
-
var popup = "
|
|
5
|
-
var filled = "
|
|
6
|
-
var header = "
|
|
7
|
-
var title = "
|
|
2
|
+
var backdrop = "_backdrop_5n47l_3";
|
|
3
|
+
var viewport = "_viewport_5n47l_58";
|
|
4
|
+
var popup = "_popup_5n47l_71";
|
|
5
|
+
var filled = "_filled_5n47l_148";
|
|
6
|
+
var header = "_header_5n47l_157";
|
|
7
|
+
var title = "_title_5n47l_163";
|
|
8
8
|
var drawer_module_default = {
|
|
9
9
|
backdrop,
|
|
10
10
|
viewport,
|
|
@@ -1,67 +1,77 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._field_160cj_3 {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
gap: var(--field-gap, var(--sys-unit-4));
|
|
7
7
|
inline-size: 100%;
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
._field_160cj_3[data-disabled] {
|
|
10
|
+
opacity: var(--field-disabled-opacity, 1);
|
|
11
|
+
}
|
|
12
|
+
._field_160cj_3[data-field-group-member] > * {
|
|
10
13
|
grid-row: extra;
|
|
11
14
|
margin-block-start: var(--field-gap, var(--sys-unit-4));
|
|
12
15
|
}
|
|
13
|
-
.
|
|
16
|
+
._field_160cj_3[data-field-group-member] > :is(._label_160cj_16, ._labelRow_160cj_16) {
|
|
14
17
|
grid-row: label;
|
|
15
18
|
margin-block: 0 var(--field-gap, var(--sys-unit-4));
|
|
16
19
|
}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
20
|
+
._field_160cj_3[data-field-group-member] > :first-child:not(._label_160cj_16, ._labelRow_160cj_16),
|
|
21
|
+
._field_160cj_3[data-field-group-member] > :is(._label_160cj_16, ._labelRow_160cj_16) + * {
|
|
19
22
|
grid-row: control;
|
|
20
23
|
margin-block-start: 0;
|
|
21
24
|
}
|
|
22
|
-
.
|
|
25
|
+
._field_160cj_3[data-field-group-member] > ._description_160cj_25 {
|
|
23
26
|
grid-row: description;
|
|
24
27
|
}
|
|
25
|
-
.
|
|
28
|
+
._field_160cj_3[data-field-group-member] > ._error_160cj_28 {
|
|
26
29
|
grid-row: error;
|
|
27
30
|
}
|
|
28
|
-
.
|
|
29
|
-
color: var(--sys-color-text);
|
|
30
|
-
font: var(--sys-font-label-medium);
|
|
31
|
+
._label_160cj_16 {
|
|
32
|
+
color: var(--field-label-fg, var(--sys-color-text));
|
|
33
|
+
font: var(--field-label-font, var(--sys-font-label-medium));
|
|
31
34
|
cursor: default;
|
|
32
35
|
}
|
|
33
|
-
.
|
|
36
|
+
._labelRow_160cj_16 {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
align-items: var(--field-label-row-align, baseline);
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
gap: var(--field-label-row-gap, var(--sys-unit-4));
|
|
42
|
+
}
|
|
43
|
+
._optional_160cj_43 {
|
|
34
44
|
vertical-align: middle;
|
|
35
|
-
color: var(--sys-color-text-muted);
|
|
36
|
-
font: var(--sys-font-body-small);
|
|
37
|
-
font-size: 0.75rem;
|
|
45
|
+
color: var(--field-optional-fg, var(--sys-color-text-muted));
|
|
46
|
+
font: var(--field-optional-font, var(--sys-font-body-small));
|
|
47
|
+
font-size: var(--field-optional-font-size, 0.75rem);
|
|
38
48
|
}
|
|
39
|
-
.
|
|
49
|
+
._inlineText_160cj_49 {
|
|
40
50
|
grid-area: text;
|
|
41
51
|
}
|
|
42
|
-
.
|
|
52
|
+
._inlineOptional_160cj_52 {
|
|
43
53
|
grid-area: optional;
|
|
44
54
|
}
|
|
45
|
-
.
|
|
55
|
+
._required_160cj_55 {
|
|
46
56
|
display: inline-block;
|
|
47
57
|
vertical-align: middle;
|
|
48
58
|
translate: 0 -1px;
|
|
49
|
-
inline-size: 0.625rem;
|
|
50
|
-
block-size: 0.625rem;
|
|
59
|
+
inline-size: var(--field-required-size, 0.625rem);
|
|
60
|
+
block-size: var(--field-required-size, 0.625rem);
|
|
51
61
|
background-color: var(--field-required-fg, var(--sys-color-primary));
|
|
52
62
|
mask: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='16%2016%2032%2032'%20fill='currentColor'%3e%3cpath%20d='M45.475%2036.291c.377.162.549.477.523.943-.027.469-.35%201.223-.967%202.264-.617%201.072-1.121%201.725-1.51%201.967-.389.24-.744.24-1.066%200l-8.574-6.215%201.129%2010.508c.078.398-.096.707-.525.92-.428.215-1.262.322-2.495.322-1.236%200-2.066-.107-2.496-.322-.43-.213-.604-.521-.523-.92l1.127-10.508-8.533%206.215c-.322.24-.686.24-1.088%200-.402-.242-.912-.895-1.529-1.967-.617-1.041-.934-1.795-.945-2.264-.016-.467.168-.781.543-.943l9.701-4.29-9.701-4.252c-.375-.188-.559-.516-.543-.984.012-.467.328-1.223.945-2.264.617-1.045%201.127-1.686%201.529-1.926s.766-.24%201.088%200l8.533%206.176-1.127-10.467c-.08-.428.094-.748.523-.963s1.26-.321%202.496-.321c1.232%200%202.066.107%202.494.322.43.215.604.535.525.963l-1.129%2010.467%208.574-6.176c.322-.24.678-.24%201.066%200s.893.896%201.51%201.965c.617%201.018.939%201.758.967%202.225.025.469-.146.797-.523.984l-9.701%204.252%209.702%204.289'/%3e%3c/svg%3e") center/contain no-repeat;
|
|
53
63
|
}
|
|
54
|
-
.
|
|
64
|
+
._description_160cj_25 {
|
|
55
65
|
color: var(--field-description-fg, var(--sys-color-text-muted));
|
|
56
66
|
font: var(--field-description-font, var(--sys-font-body-medium));
|
|
57
67
|
}
|
|
58
|
-
.
|
|
68
|
+
._pending_160cj_68 {
|
|
59
69
|
display: inline-flex;
|
|
60
70
|
flex: none;
|
|
61
71
|
align-items: center;
|
|
62
|
-
gap: var(--sys-unit-2);
|
|
63
|
-
color: var(--field-muted-fg);
|
|
64
|
-
font: var(--sys-font-body-medium);
|
|
72
|
+
gap: var(--field-inlay-content-gap, var(--sys-unit-2));
|
|
73
|
+
color: var(--field-inlay-fg, var(--_field-muted-fg));
|
|
74
|
+
font: var(--field-inlay-font, var(--sys-font-body-medium));
|
|
65
75
|
cursor: default;
|
|
66
76
|
pointer-events: none;
|
|
67
77
|
line-height: normal;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Field as BaseField } from "@base-ui/react/field";
|
|
2
|
-
import {
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { type ComponentProps, type ReactElement, type ReactNode } from "react";
|
|
3
4
|
import type { Requiredness } from "./field-state.ts";
|
|
4
5
|
/**
|
|
5
6
|
* The props every field takes, on every tier: the raw compound's root, the
|
|
@@ -28,9 +29,13 @@ export type FieldProps = Readonly<{
|
|
|
28
29
|
* handler. Every `<Control>Field` and its bridge take this one type.
|
|
29
30
|
*/
|
|
30
31
|
export type FieldBlurHandler = () => void;
|
|
31
|
-
/**
|
|
32
|
-
export type
|
|
32
|
+
/** What a requiredness part asserts: its own `requiredness`, or the field's it sits in. */
|
|
33
|
+
export type RequiredMarkProps = Readonly<{
|
|
34
|
+
/** What the label asserts. Left out, it reads the `requiredness` of the field it sits in. */
|
|
33
35
|
requiredness?: Requiredness;
|
|
36
|
+
}>;
|
|
37
|
+
/** The copy and assertion a label carries about requiredness. */
|
|
38
|
+
export type RequirednessProps = RequiredMarkProps & Readonly<{
|
|
34
39
|
/** The word an optional field's label trails, such as "optional". */
|
|
35
40
|
optionalLabel: string;
|
|
36
41
|
}>;
|
|
@@ -39,36 +44,43 @@ export type RequirednessProps = Readonly<{
|
|
|
39
44
|
* control's own `required` tells assistive tech.
|
|
40
45
|
*
|
|
41
46
|
* @example
|
|
42
|
-
* <Field.RequiredMark
|
|
47
|
+
* <Field.Label>Email <Field.RequiredMark /></Field.Label>
|
|
43
48
|
*/
|
|
44
|
-
declare const RequiredMark: ({ requiredness, }:
|
|
45
|
-
requiredness?: Requiredness;
|
|
46
|
-
}>) => ReactNode;
|
|
49
|
+
declare const RequiredMark: ({ requiredness, }: RequiredMarkProps) => ReactNode;
|
|
47
50
|
/**
|
|
48
51
|
* The suffix a label trails: the required mark, or the optional word.
|
|
49
52
|
*
|
|
50
53
|
* @example
|
|
51
|
-
* <Field.Requiredness
|
|
54
|
+
* <Field.Label>Notes <Field.Requiredness optionalLabel="optional" /></Field.Label>
|
|
52
55
|
*/
|
|
53
56
|
declare const FieldRequiredness: ({ requiredness, optionalLabel, }: RequirednessProps) => ReactNode;
|
|
54
|
-
export type InlineLabelTextProps = RequirednessProps & Readonly<{
|
|
55
|
-
label: string;
|
|
56
|
-
/** The label of the field the row sits in, which carries the suffix instead. */
|
|
57
|
-
fieldLabel?: string;
|
|
58
|
-
}>;
|
|
59
57
|
/**
|
|
60
|
-
* The
|
|
61
|
-
*
|
|
58
|
+
* The optional word of a label beside its control, on a row of its own under
|
|
59
|
+
* the label's text. Renders nothing unless the field is optional.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* <Checkbox.Label>
|
|
63
|
+
* <Checkbox.Control>…</Checkbox.Control>
|
|
64
|
+
* <Field.InlineLabelText>Send me a copy <Field.RequiredMark /></Field.InlineLabelText>
|
|
65
|
+
* <Field.InlineOptional optionalLabel="optional" />
|
|
66
|
+
* </Checkbox.Label>
|
|
67
|
+
*/
|
|
68
|
+
declare const InlineOptional: ({ requiredness, optionalLabel, }: RequirednessProps) => ReactNode;
|
|
69
|
+
export type InlineLabelTextProps = ComponentProps<"span">;
|
|
70
|
+
/**
|
|
71
|
+
* The text of a label beside its control, such as a lone checkbox's.
|
|
62
72
|
*
|
|
63
73
|
* @example
|
|
64
74
|
* <Checkbox.Label>
|
|
65
75
|
* <Checkbox.Control><Checkbox.Indicator><CheckIcon /></Checkbox.Indicator></Checkbox.Control>
|
|
66
|
-
* <Field.InlineLabelText
|
|
76
|
+
* <Field.InlineLabelText>I agree to the terms <Field.RequiredMark /></Field.InlineLabelText>
|
|
67
77
|
* </Checkbox.Label>
|
|
68
78
|
*/
|
|
69
|
-
declare const InlineLabelText: ({
|
|
79
|
+
declare const InlineLabelText: ({ className, ...props }: InlineLabelTextProps) => ReactNode;
|
|
70
80
|
export type FieldRootProps = BaseField.Root.Props & Readonly<{
|
|
71
81
|
className?: string;
|
|
82
|
+
/** What the field asserts about being required, which the requiredness parts inside it read. */
|
|
83
|
+
requiredness?: Requiredness;
|
|
72
84
|
}>;
|
|
73
85
|
/**
|
|
74
86
|
* The field frame: label, control, description and error stacked full width.
|
|
@@ -77,28 +89,27 @@ export type FieldRootProps = BaseField.Root.Props & Readonly<{
|
|
|
77
89
|
* @example
|
|
78
90
|
* <Field.Root name="email" invalid={invalid}>…</Field.Root>
|
|
79
91
|
*/
|
|
80
|
-
declare const FieldRoot: ({ className, children, ...props }: FieldRootProps) => ReactNode;
|
|
81
|
-
export type FieldLabelProps = Omit<BaseField.Label.Props, "className"> &
|
|
92
|
+
declare const FieldRoot: ({ className, requiredness, children, ...props }: FieldRootProps) => ReactNode;
|
|
93
|
+
export type FieldLabelProps = Omit<BaseField.Label.Props, "className"> & Readonly<{
|
|
82
94
|
className?: string;
|
|
83
95
|
}>;
|
|
84
96
|
/**
|
|
85
|
-
* The label above a control
|
|
86
|
-
* children.
|
|
97
|
+
* The label above a control. Renders nothing without children.
|
|
87
98
|
*
|
|
88
99
|
* @example
|
|
89
|
-
* <Field.Label
|
|
100
|
+
* <Field.Label>Notes <Field.Requiredness optionalLabel="optional" /></Field.Label>
|
|
90
101
|
*/
|
|
91
|
-
declare const FieldLabel: ({ children,
|
|
92
|
-
export type FieldCaptionProps = ComponentProps<"p"
|
|
102
|
+
declare const FieldLabel: ({ children, className, ...props }: FieldLabelProps) => ReactNode;
|
|
103
|
+
export type FieldCaptionProps = ComponentProps<"p">;
|
|
93
104
|
/**
|
|
94
105
|
* A caption styled like a field label, which names nothing: a paragraph, with
|
|
95
106
|
* no `for` and no `aria-labelledby` of its own. Use it for standing text above
|
|
96
107
|
* a control that already carries its own name. To name something, use `Label`.
|
|
97
108
|
*
|
|
98
109
|
* @example
|
|
99
|
-
* <Field.Caption optionalLabel="optional"
|
|
110
|
+
* <Field.Caption>Theme <Field.Requiredness requiredness="optional" optionalLabel="optional" /></Field.Caption>
|
|
100
111
|
*/
|
|
101
|
-
declare const FieldCaption: ({ children,
|
|
112
|
+
declare const FieldCaption: ({ children, className, ...props }: FieldCaptionProps) => ReactNode;
|
|
102
113
|
/**
|
|
103
114
|
* The help under a control. Renders nothing without children.
|
|
104
115
|
*
|
|
@@ -122,19 +133,29 @@ export type FieldErrorProps = Omit<BaseField.Error.Props, "match" | "render" | "
|
|
|
122
133
|
* <Field.Error>{errors}</Field.Error>
|
|
123
134
|
*/
|
|
124
135
|
declare const FieldError: ({ children: errors, ...props }: FieldErrorProps) => ReactNode;
|
|
125
|
-
export type FieldPendingProps =
|
|
126
|
-
|
|
127
|
-
|
|
136
|
+
export type FieldPendingProps = useRender.ComponentProps<"span">;
|
|
137
|
+
/**
|
|
138
|
+
* The box beside the control that a field's wait shows in, holding what it is
|
|
139
|
+
* given, such as a spinner. The control decides when it is mounted, once the
|
|
140
|
+
* wait is worth showing. It is decoration: the wait reaches assistive tech as
|
|
141
|
+
* the `aria-busy` that `fieldStateAttributes` projects.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* {phase !== "fresh" && <Field.Pending><Spinner size={1} /></Field.Pending>}
|
|
145
|
+
*/
|
|
146
|
+
declare const FieldPending: ({ className, render, ref, ...props }: FieldPendingProps) => ReactElement;
|
|
147
|
+
export type FieldLabelRowProps = useRender.ComponentProps<"div">;
|
|
128
148
|
/**
|
|
129
|
-
*
|
|
130
|
-
* in
|
|
131
|
-
* the wait is worth showing. It is decoration: the wait reaches assistive tech
|
|
132
|
-
* as the `aria-busy` that `fieldStateAttributes` projects.
|
|
149
|
+
* A row holding a field's label and what sits beside it, such as a link or a
|
|
150
|
+
* counter, in place of the bare label.
|
|
133
151
|
*
|
|
134
152
|
* @example
|
|
135
|
-
*
|
|
153
|
+
* <Field.LabelRow>
|
|
154
|
+
* <TextInput.Label>Password</TextInput.Label>
|
|
155
|
+
* <Link href="/reset">Forgot password?</Link>
|
|
156
|
+
* </Field.LabelRow>
|
|
136
157
|
*/
|
|
137
|
-
declare const
|
|
158
|
+
declare const FieldLabelRow: ({ className, render, ref, ...props }: FieldLabelRowProps) => ReactElement;
|
|
138
159
|
/** Stable ids for the parts of one field. */
|
|
139
160
|
export type FieldIds = Readonly<{
|
|
140
161
|
labelId: string;
|
|
@@ -157,6 +178,7 @@ declare const useFieldIds: () => FieldIds;
|
|
|
157
178
|
export type FieldParts = Readonly<{
|
|
158
179
|
Root: typeof FieldRoot;
|
|
159
180
|
Label: typeof FieldLabel;
|
|
181
|
+
LabelRow: typeof FieldLabelRow;
|
|
160
182
|
Caption: typeof FieldCaption;
|
|
161
183
|
Control: typeof BaseField.Control;
|
|
162
184
|
Description: typeof FieldDescription;
|
|
@@ -167,6 +189,7 @@ export type FieldParts = Readonly<{
|
|
|
167
189
|
Requiredness: typeof FieldRequiredness;
|
|
168
190
|
RequiredMark: typeof RequiredMark;
|
|
169
191
|
InlineLabelText: typeof InlineLabelText;
|
|
192
|
+
InlineOptional: typeof InlineOptional;
|
|
170
193
|
useIds: typeof useFieldIds;
|
|
171
194
|
}>;
|
|
172
195
|
/**
|
|
@@ -175,8 +198,8 @@ export type FieldParts = Readonly<{
|
|
|
175
198
|
* before `Error`, the field's only live region.
|
|
176
199
|
*
|
|
177
200
|
* @example
|
|
178
|
-
* <Field.Root name="email" invalid={invalid}>
|
|
179
|
-
* <Field.Label
|
|
201
|
+
* <Field.Root name="email" invalid={invalid} requiredness="required">
|
|
202
|
+
* <Field.Label>Email <Field.Requiredness optionalLabel="optional" /></Field.Label>
|
|
180
203
|
* <Field.Control />
|
|
181
204
|
* <Field.Description>We send the receipt here.</Field.Description>
|
|
182
205
|
* <Field.Error>{errors}</Field.Error>
|