@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,10 +1,15 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._group_80en2_3 {
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
align-items: stretch;
|
|
6
|
+
min-block-size: var(--textarea-min-block-size, var(--field-min-block-size, calc(1lh + 2 * var(--field-pad-y, var(--sys-unit-6)) + 2 * var(--field-border-width, 1px))));
|
|
7
|
+
border-radius: var(--textarea-radius, var(--field-radius, var(--sys-radius-sm)));
|
|
8
|
+
padding-block: var(--textarea-pad-y, var(--field-pad-y, var(--sys-unit-6)));
|
|
9
|
+
padding-inline: var(--textarea-pad-x, var(--field-pad-start, var(--field-pad-x, var(--sys-unit-6)))) var(--textarea-pad-x, var(--field-pad-end, var(--field-pad-x, var(--sys-unit-6))));
|
|
10
|
+
font: var(--textarea-font, var(--field-font, var(--sys-font-body-medium)));
|
|
6
11
|
}
|
|
7
|
-
.
|
|
12
|
+
._textarea_80en2_12 {
|
|
8
13
|
resize: none;
|
|
9
14
|
overflow-y: auto;
|
|
10
15
|
line-height: inherit;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Field } from "../field/field.js";
|
|
1
2
|
import { TextInput } from "../text-field/text-input.js";
|
|
2
3
|
import { Textarea } from "./textarea.js";
|
|
3
4
|
import textarea_field_module_default from "./textarea-field.module.js";
|
|
5
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
4
6
|
import { c } from "react/compiler-runtime";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
// src/components/textarea-field/textarea-field.tsx
|
|
@@ -19,7 +21,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
19
21
|
* />
|
|
20
22
|
*/
|
|
21
23
|
var TextareaField = (t0) => {
|
|
22
|
-
const $ = c(
|
|
24
|
+
const $ = c(51);
|
|
23
25
|
let className;
|
|
24
26
|
let controlProps;
|
|
25
27
|
let description;
|
|
@@ -80,57 +82,72 @@ var TextareaField = (t0) => {
|
|
|
80
82
|
value = $[18];
|
|
81
83
|
}
|
|
82
84
|
let t1;
|
|
83
|
-
if ($[19] !==
|
|
84
|
-
t1 = /* @__PURE__ */ jsx(
|
|
85
|
-
$[19] =
|
|
85
|
+
if ($[19] !== optionalLabel) {
|
|
86
|
+
t1 = /* @__PURE__ */ jsx(Field.Requiredness, { optionalLabel });
|
|
87
|
+
$[19] = optionalLabel;
|
|
86
88
|
$[20] = t1;
|
|
87
89
|
} else t1 = $[20];
|
|
88
90
|
let t2;
|
|
89
|
-
if ($[21] !==
|
|
90
|
-
t2 = /* @__PURE__ */
|
|
91
|
+
if ($[21] !== label || $[22] !== t1) {
|
|
92
|
+
t2 = /* @__PURE__ */ jsxs(TextInput.Label, { children: [
|
|
93
|
+
label,
|
|
94
|
+
" ",
|
|
95
|
+
t1
|
|
96
|
+
] });
|
|
97
|
+
$[21] = label;
|
|
98
|
+
$[22] = t1;
|
|
99
|
+
$[23] = t2;
|
|
100
|
+
} else t2 = $[23];
|
|
101
|
+
let t3;
|
|
102
|
+
if ($[24] !== controlProps || $[25] !== maxRows || $[26] !== rows) {
|
|
103
|
+
t3 = /* @__PURE__ */ jsx(Textarea, {
|
|
91
104
|
rows,
|
|
92
105
|
maxRows,
|
|
93
106
|
...controlProps
|
|
94
107
|
});
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
} else
|
|
100
|
-
let t3;
|
|
101
|
-
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
102
|
-
t3 = /* @__PURE__ */ jsxs(TextInput.Bar, { children: [/* @__PURE__ */ jsx(TextInput.Counter, {}), /* @__PURE__ */ jsx(TextInput.Pending, {})] });
|
|
103
|
-
$[25] = t3;
|
|
104
|
-
} else t3 = $[25];
|
|
108
|
+
$[24] = controlProps;
|
|
109
|
+
$[25] = maxRows;
|
|
110
|
+
$[26] = rows;
|
|
111
|
+
$[27] = t3;
|
|
112
|
+
} else t3 = $[27];
|
|
105
113
|
let t4;
|
|
106
|
-
if ($[
|
|
107
|
-
t4 = /* @__PURE__ */
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
$[26] = t2;
|
|
112
|
-
$[27] = t4;
|
|
113
|
-
} else t4 = $[27];
|
|
114
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
115
|
+
t4 = /* @__PURE__ */ jsx(TextInput.Counter, {});
|
|
116
|
+
$[28] = t4;
|
|
117
|
+
} else t4 = $[28];
|
|
114
118
|
let t5;
|
|
115
|
-
if ($[
|
|
116
|
-
t5 = /* @__PURE__ */ jsx(TextInput.
|
|
117
|
-
$[28] = description;
|
|
119
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
120
|
+
t5 = /* @__PURE__ */ jsxs(TextInput.Bar, { children: [t4, /* @__PURE__ */ jsx(TextInput.Pending, { children: /* @__PURE__ */ jsx(Spinner, { size: 1 }) })] });
|
|
118
121
|
$[29] = t5;
|
|
119
122
|
} else t5 = $[29];
|
|
120
123
|
let t6;
|
|
121
|
-
if ($[30]
|
|
122
|
-
t6 = /* @__PURE__ */
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
if ($[30] !== t3) {
|
|
125
|
+
t6 = /* @__PURE__ */ jsxs(TextInput.Group, {
|
|
126
|
+
className: textarea_field_module_default.group,
|
|
127
|
+
children: [t3, t5]
|
|
128
|
+
});
|
|
129
|
+
$[30] = t3;
|
|
130
|
+
$[31] = t6;
|
|
131
|
+
} else t6 = $[31];
|
|
125
132
|
let t7;
|
|
126
|
-
if ($[
|
|
127
|
-
t7 = /* @__PURE__ */
|
|
133
|
+
if ($[32] !== description) {
|
|
134
|
+
t7 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
|
|
135
|
+
$[32] = description;
|
|
136
|
+
$[33] = t7;
|
|
137
|
+
} else t7 = $[33];
|
|
138
|
+
let t8;
|
|
139
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
140
|
+
t8 = /* @__PURE__ */ jsx(TextInput.Error, {});
|
|
141
|
+
$[34] = t8;
|
|
142
|
+
} else t8 = $[34];
|
|
143
|
+
let t9;
|
|
144
|
+
if ($[35] !== className || $[36] !== dirty || $[37] !== disabled || $[38] !== errors || $[39] !== maxLength || $[40] !== onValueChange || $[41] !== pending || $[42] !== readOnly || $[43] !== requiredness || $[44] !== state || $[45] !== t2 || $[46] !== t6 || $[47] !== t7 || $[48] !== touched || $[49] !== value) {
|
|
145
|
+
t9 = /* @__PURE__ */ jsxs(TextInput.Root, {
|
|
128
146
|
value,
|
|
129
147
|
onValueChange,
|
|
130
148
|
disabled,
|
|
131
149
|
readOnly,
|
|
132
150
|
requiredness,
|
|
133
|
-
optionalLabel,
|
|
134
151
|
errors,
|
|
135
152
|
dirty,
|
|
136
153
|
touched,
|
|
@@ -139,30 +156,29 @@ var TextareaField = (t0) => {
|
|
|
139
156
|
state,
|
|
140
157
|
className,
|
|
141
158
|
children: [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
159
|
+
t2,
|
|
160
|
+
t6,
|
|
161
|
+
t7,
|
|
162
|
+
t8
|
|
146
163
|
]
|
|
147
164
|
});
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[43] = t4;
|
|
161
|
-
$[44] = t5;
|
|
162
|
-
$[45] = touched;
|
|
163
|
-
$[46] = value;
|
|
165
|
+
$[35] = className;
|
|
166
|
+
$[36] = dirty;
|
|
167
|
+
$[37] = disabled;
|
|
168
|
+
$[38] = errors;
|
|
169
|
+
$[39] = maxLength;
|
|
170
|
+
$[40] = onValueChange;
|
|
171
|
+
$[41] = pending;
|
|
172
|
+
$[42] = readOnly;
|
|
173
|
+
$[43] = requiredness;
|
|
174
|
+
$[44] = state;
|
|
175
|
+
$[45] = t2;
|
|
176
|
+
$[46] = t6;
|
|
164
177
|
$[47] = t7;
|
|
165
|
-
|
|
166
|
-
|
|
178
|
+
$[48] = touched;
|
|
179
|
+
$[49] = value;
|
|
180
|
+
$[50] = t9;
|
|
181
|
+
} else t9 = $[50];
|
|
182
|
+
return t9;
|
|
167
183
|
};
|
|
168
184
|
export { TextareaField };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './textarea-field.css';// src/components/textarea-field/textarea-field.module.scss
|
|
2
|
-
var group = "
|
|
3
|
-
var textarea = "
|
|
2
|
+
var group = "_group_80en2_3";
|
|
3
|
+
var textarea = "_textarea_80en2_12";
|
|
4
4
|
var textarea_field_module_default = {
|
|
5
5
|
group,
|
|
6
6
|
textarea
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
1
2
|
import { isoToTimeOfDay, timeOfDayToIso } from "../../lib/calendar/temporal-value.js";
|
|
3
|
+
import { Field } from "../field/field.js";
|
|
2
4
|
import { useFieldState } from "../field/use-field-state.js";
|
|
3
5
|
import { TimeInput } from "./time-input.js";
|
|
4
6
|
import { c } from "react/compiler-runtime";
|
|
@@ -13,7 +15,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
15
|
* <TimeField label="Start time" optionalLabel="optional" value={startTime} onValueChange={setStartTime} />
|
|
14
16
|
*/
|
|
15
17
|
var TimeField = (t0) => {
|
|
16
|
-
const $ = c(
|
|
18
|
+
const $ = c(62);
|
|
17
19
|
const { label, description, errors, requiredness, optionalLabel, dirty, touched, pending, value, defaultValue, onValueChange, onBlur, name, disabled, readOnly, className } = t0;
|
|
18
20
|
let t1;
|
|
19
21
|
if ($[0] !== value) {
|
|
@@ -48,68 +50,159 @@ var TimeField = (t0) => {
|
|
|
48
50
|
const field = useFieldState(t3);
|
|
49
51
|
const { phase } = field;
|
|
50
52
|
const fieldState = field.state;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
53
|
+
const ids = TimeInput.useIds();
|
|
54
|
+
const t4 = field.invalid;
|
|
55
|
+
const t5 = field.disabled;
|
|
56
|
+
let t6;
|
|
57
|
+
if ($[11] !== optionalLabel) {
|
|
58
|
+
t6 = /* @__PURE__ */ jsx(Field.Requiredness, { optionalLabel });
|
|
59
|
+
$[11] = optionalLabel;
|
|
60
|
+
$[12] = t6;
|
|
61
|
+
} else t6 = $[12];
|
|
62
|
+
let t7;
|
|
63
|
+
if ($[13] !== ids.labelId || $[14] !== label || $[15] !== t6) {
|
|
64
|
+
t7 = /* @__PURE__ */ jsxs(TimeInput.Label, {
|
|
65
|
+
id: ids.labelId,
|
|
66
|
+
children: [
|
|
67
|
+
label,
|
|
68
|
+
" ",
|
|
69
|
+
t6
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
$[13] = ids.labelId;
|
|
73
|
+
$[14] = label;
|
|
74
|
+
$[15] = t6;
|
|
75
|
+
$[16] = t7;
|
|
76
|
+
} else t7 = $[16];
|
|
77
|
+
const t8 = ids.labelId;
|
|
78
|
+
let t9;
|
|
79
|
+
if ($[17] !== description || $[18] !== field.invalid || $[19] !== ids) {
|
|
80
|
+
t9 = ids.describedBy(description !== void 0, field.invalid);
|
|
81
|
+
$[17] = description;
|
|
82
|
+
$[18] = field.invalid;
|
|
83
|
+
$[19] = ids;
|
|
84
|
+
$[20] = t9;
|
|
85
|
+
} else t9 = $[20];
|
|
86
|
+
const t10 = value === void 0 ? void 0 : time;
|
|
87
|
+
let t11;
|
|
88
|
+
if ($[21] !== defaultValue) {
|
|
89
|
+
t11 = isoToTimeOfDay(defaultValue) ?? void 0;
|
|
90
|
+
$[21] = defaultValue;
|
|
91
|
+
$[22] = t11;
|
|
92
|
+
} else t11 = $[22];
|
|
93
|
+
let t12;
|
|
94
|
+
if ($[23] !== onValueChange) {
|
|
95
|
+
t12 = (next) => onValueChange?.(timeOfDayToIso(next));
|
|
96
|
+
$[23] = onValueChange;
|
|
97
|
+
$[24] = t12;
|
|
98
|
+
} else t12 = $[24];
|
|
99
|
+
const t13 = name ?? ids.controlId;
|
|
100
|
+
const t14 = requiredness === "required";
|
|
101
|
+
let t15;
|
|
102
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
103
|
+
t15 = /* @__PURE__ */ jsx(TimeInput.Input, { children: _temp });
|
|
104
|
+
$[25] = t15;
|
|
105
|
+
} else t15 = $[25];
|
|
106
|
+
let t16;
|
|
107
|
+
if ($[26] !== phase) {
|
|
108
|
+
t16 = phase !== "fresh" && /* @__PURE__ */ jsx(TimeInput.Pending, { children: /* @__PURE__ */ jsx(Spinner, { size: 1 }) });
|
|
109
|
+
$[26] = phase;
|
|
110
|
+
$[27] = t16;
|
|
111
|
+
} else t16 = $[27];
|
|
112
|
+
let t17;
|
|
113
|
+
if ($[28] !== fieldState || $[29] !== t16) {
|
|
114
|
+
t17 = /* @__PURE__ */ jsxs(TimeInput.Group, {
|
|
115
|
+
role: "presentation",
|
|
116
|
+
state: fieldState,
|
|
117
|
+
children: [t15, t16]
|
|
118
|
+
});
|
|
119
|
+
$[28] = fieldState;
|
|
120
|
+
$[29] = t16;
|
|
121
|
+
$[30] = t17;
|
|
122
|
+
} else t17 = $[30];
|
|
123
|
+
let t18;
|
|
124
|
+
if ($[31] !== field.disabled || $[32] !== field.invalid || $[33] !== fieldState || $[34] !== ids.labelId || $[35] !== onBlur || $[36] !== readOnly || $[37] !== t10 || $[38] !== t11 || $[39] !== t12 || $[40] !== t13 || $[41] !== t14 || $[42] !== t17 || $[43] !== t9) {
|
|
125
|
+
t18 = /* @__PURE__ */ jsx(TimeInput.Root, {
|
|
126
|
+
state: fieldState,
|
|
127
|
+
"aria-labelledby": t8,
|
|
128
|
+
"aria-describedby": t9,
|
|
129
|
+
value: t10,
|
|
130
|
+
defaultValue: t11,
|
|
131
|
+
onChange: t12,
|
|
132
|
+
onBlur,
|
|
133
|
+
name: t13,
|
|
134
|
+
isDisabled: field.disabled,
|
|
135
|
+
isReadOnly: readOnly,
|
|
136
|
+
isRequired: t14,
|
|
137
|
+
isInvalid: field.invalid,
|
|
138
|
+
children: t17
|
|
139
|
+
});
|
|
140
|
+
$[31] = field.disabled;
|
|
141
|
+
$[32] = field.invalid;
|
|
142
|
+
$[33] = fieldState;
|
|
143
|
+
$[34] = ids.labelId;
|
|
144
|
+
$[35] = onBlur;
|
|
145
|
+
$[36] = readOnly;
|
|
146
|
+
$[37] = t10;
|
|
147
|
+
$[38] = t11;
|
|
148
|
+
$[39] = t12;
|
|
149
|
+
$[40] = t13;
|
|
150
|
+
$[41] = t14;
|
|
151
|
+
$[42] = t17;
|
|
152
|
+
$[43] = t9;
|
|
153
|
+
$[44] = t18;
|
|
154
|
+
} else t18 = $[44];
|
|
155
|
+
let t19;
|
|
156
|
+
if ($[45] !== description || $[46] !== ids.descriptionId) {
|
|
157
|
+
t19 = /* @__PURE__ */ jsx(TimeInput.Description, {
|
|
158
|
+
id: ids.descriptionId,
|
|
159
|
+
children: description
|
|
160
|
+
});
|
|
161
|
+
$[45] = description;
|
|
162
|
+
$[46] = ids.descriptionId;
|
|
163
|
+
$[47] = t19;
|
|
164
|
+
} else t19 = $[47];
|
|
165
|
+
let t20;
|
|
166
|
+
if ($[48] !== errors || $[49] !== ids.errorId) {
|
|
167
|
+
t20 = /* @__PURE__ */ jsx(TimeInput.Error, {
|
|
168
|
+
id: ids.errorId,
|
|
169
|
+
children: errors
|
|
170
|
+
});
|
|
171
|
+
$[48] = errors;
|
|
172
|
+
$[49] = ids.errorId;
|
|
173
|
+
$[50] = t20;
|
|
174
|
+
} else t20 = $[50];
|
|
175
|
+
let t21;
|
|
176
|
+
if ($[51] !== className || $[52] !== dirty || $[53] !== field.disabled || $[54] !== field.invalid || $[55] !== requiredness || $[56] !== t18 || $[57] !== t19 || $[58] !== t20 || $[59] !== t7 || $[60] !== touched) {
|
|
177
|
+
t21 = /* @__PURE__ */ jsxs(Field.Root, {
|
|
178
|
+
className,
|
|
179
|
+
invalid: t4,
|
|
180
|
+
disabled: t5,
|
|
95
181
|
requiredness,
|
|
96
|
-
optionalLabel,
|
|
97
182
|
dirty,
|
|
98
183
|
touched,
|
|
99
|
-
|
|
100
|
-
|
|
184
|
+
children: [
|
|
185
|
+
t7,
|
|
186
|
+
t18,
|
|
187
|
+
t19,
|
|
188
|
+
t20
|
|
189
|
+
]
|
|
101
190
|
});
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
|
|
113
|
-
|
|
191
|
+
$[51] = className;
|
|
192
|
+
$[52] = dirty;
|
|
193
|
+
$[53] = field.disabled;
|
|
194
|
+
$[54] = field.invalid;
|
|
195
|
+
$[55] = requiredness;
|
|
196
|
+
$[56] = t18;
|
|
197
|
+
$[57] = t19;
|
|
198
|
+
$[58] = t20;
|
|
199
|
+
$[59] = t7;
|
|
200
|
+
$[60] = touched;
|
|
201
|
+
$[61] = t21;
|
|
202
|
+
} else t21 = $[61];
|
|
203
|
+
return t21;
|
|
114
204
|
};
|
|
205
|
+
function _temp(segment) {
|
|
206
|
+
return /* @__PURE__ */ jsx(TimeInput.Segment, { segment });
|
|
207
|
+
}
|
|
115
208
|
export { TimeField };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Time } from "@internationalized/date";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import { type TimeFieldProps as AriaTimeFieldProps } from "react-aria-components";
|
|
4
|
-
import {
|
|
4
|
+
import { TemporalGroup, TemporalInput, TemporalLabel, TemporalSegment, type TemporalStateProps } from "../../lib/calendar/temporal.tsx";
|
|
5
5
|
import { Field } from "../field/index.ts";
|
|
6
6
|
export type TimeInputRootProps = AriaTimeFieldProps<Time> & TemporalStateProps;
|
|
7
7
|
/**
|
|
@@ -13,24 +13,35 @@ export type TimeInputRootProps = AriaTimeFieldProps<Time> & TemporalStateProps;
|
|
|
13
13
|
declare const TimeInputRoot: ({ state, ...props }: TimeInputRootProps) => ReactNode;
|
|
14
14
|
/** The parts of a time input. */
|
|
15
15
|
export type TimeInputParts = Readonly<{
|
|
16
|
-
Frame: typeof TemporalFrame;
|
|
17
16
|
Root: typeof TimeInputRoot;
|
|
17
|
+
Label: typeof TemporalLabel;
|
|
18
18
|
Group: typeof TemporalGroup;
|
|
19
19
|
Input: typeof TemporalInput;
|
|
20
20
|
Segment: typeof TemporalSegment;
|
|
21
21
|
Pending: typeof Field.Pending;
|
|
22
|
+
Description: typeof Field.Description;
|
|
23
|
+
Error: typeof Field.Error;
|
|
24
|
+
useIds: typeof Field.useIds;
|
|
22
25
|
}>;
|
|
23
26
|
/**
|
|
24
|
-
* The styled parts of a react-aria `TimeField`,
|
|
25
|
-
*
|
|
26
|
-
* segments and any inlay share. For the
|
|
27
|
+
* The styled parts of a react-aria `TimeField`, following react-aria's own
|
|
28
|
+
* anatomy. It sits in a `Field.Root` and names itself through `Label`'s id.
|
|
29
|
+
* Its `Group` is the bordered box the segments and any inlay share. For the
|
|
30
|
+
* ordinary case, use `TimeField`, which is assembled from exactly these parts.
|
|
27
31
|
*
|
|
28
32
|
* @example
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* </TimeInput.
|
|
33
|
-
*
|
|
33
|
+
* const ids = TimeInput.useIds();
|
|
34
|
+
*
|
|
35
|
+
* <Field.Root>
|
|
36
|
+
* <TimeInput.Label id={ids.labelId}>Start time</TimeInput.Label>
|
|
37
|
+
* <TimeInput.Root aria-labelledby={ids.labelId}>
|
|
38
|
+
* <TimeInput.Group role="presentation">
|
|
39
|
+
* <TimeInput.Input>
|
|
40
|
+
* {segment => <TimeInput.Segment segment={segment} />}
|
|
41
|
+
* </TimeInput.Input>
|
|
42
|
+
* </TimeInput.Group>
|
|
43
|
+
* </TimeInput.Root>
|
|
44
|
+
* </Field.Root>
|
|
34
45
|
*/
|
|
35
46
|
export declare const TimeInput: TimeInputParts;
|
|
36
47
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TemporalGroup, TemporalInput, TemporalLabel, TemporalSegment } from "../../lib/calendar/temporal.js";
|
|
2
2
|
import { Field } from "../field/field.js";
|
|
3
3
|
import { fieldStateAttributes } from "../field/field-state.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -50,23 +50,34 @@ var TimeInputRoot = (t0) => {
|
|
|
50
50
|
return t3;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
|
-
* The styled parts of a react-aria `TimeField`,
|
|
54
|
-
*
|
|
55
|
-
* segments and any inlay share. For the
|
|
53
|
+
* The styled parts of a react-aria `TimeField`, following react-aria's own
|
|
54
|
+
* anatomy. It sits in a `Field.Root` and names itself through `Label`'s id.
|
|
55
|
+
* Its `Group` is the bordered box the segments and any inlay share. For the
|
|
56
|
+
* ordinary case, use `TimeField`, which is assembled from exactly these parts.
|
|
56
57
|
*
|
|
57
58
|
* @example
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* </TimeInput.
|
|
62
|
-
*
|
|
59
|
+
* const ids = TimeInput.useIds();
|
|
60
|
+
*
|
|
61
|
+
* <Field.Root>
|
|
62
|
+
* <TimeInput.Label id={ids.labelId}>Start time</TimeInput.Label>
|
|
63
|
+
* <TimeInput.Root aria-labelledby={ids.labelId}>
|
|
64
|
+
* <TimeInput.Group role="presentation">
|
|
65
|
+
* <TimeInput.Input>
|
|
66
|
+
* {segment => <TimeInput.Segment segment={segment} />}
|
|
67
|
+
* </TimeInput.Input>
|
|
68
|
+
* </TimeInput.Group>
|
|
69
|
+
* </TimeInput.Root>
|
|
70
|
+
* </Field.Root>
|
|
63
71
|
*/
|
|
64
72
|
var TimeInput = {
|
|
65
|
-
Frame: TemporalFrame,
|
|
66
73
|
Root: TimeInputRoot,
|
|
74
|
+
Label: TemporalLabel,
|
|
67
75
|
Group: TemporalGroup,
|
|
68
76
|
Input: TemporalInput,
|
|
69
77
|
Segment: TemporalSegment,
|
|
70
|
-
Pending: Field.Pending
|
|
78
|
+
Pending: Field.Pending,
|
|
79
|
+
Description: Field.Description,
|
|
80
|
+
Error: Field.Error,
|
|
81
|
+
useIds: Field.useIds
|
|
71
82
|
};
|
|
72
83
|
export { TimeInput };
|