@igne-agency/react-web-ui 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -1
- package/dist/components/accordion/accordion.css +24 -19
- package/dist/components/accordion/accordion.d.ts +19 -3
- package/dist/components/accordion/accordion.js +86 -32
- package/dist/components/accordion/accordion.module.js +8 -8
- package/dist/components/active-filters/active-filter-describers.d.ts +1 -1
- package/dist/components/active-filters/active-filter-describers.js +1 -1
- package/dist/components/active-filters/active-filters.d.ts +35 -2
- package/dist/components/active-filters/active-filters.js +57 -52
- package/dist/components/active-filters/index.js +2 -2
- package/dist/components/attachment-tile/attachment-preview.d.ts +11 -9
- package/dist/components/attachment-tile/attachment-preview.js +102 -68
- package/dist/components/attachment-tile/attachment-tile.css +22 -13
- package/dist/components/attachment-tile/attachment-tile.d.ts +51 -6
- package/dist/components/attachment-tile/attachment-tile.js +209 -85
- package/dist/components/attachment-tile/attachment-tile.module.js +10 -10
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/attachment-tile/index.js +2 -2
- package/dist/components/avatar/avatar.d.ts +5 -5
- package/dist/components/avatar/avatar.js +64 -37
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +22 -7
- package/dist/components/breadcrumbs/breadcrumbs.js +189 -170
- package/dist/components/button/button.d.ts +2 -3
- package/dist/components/button/button.js +58 -77
- package/dist/components/button/close-button.d.ts +4 -2
- package/dist/components/button/close-button.js +9 -9
- package/dist/components/checkbox-field/checkbox-field.d.ts +17 -3
- package/dist/components/checkbox-field/checkbox-field.js +108 -131
- package/dist/components/checkbox-field/checkbox.css +26 -34
- package/dist/components/checkbox-field/checkbox.d.ts +51 -8
- package/dist/components/checkbox-field/checkbox.js +221 -57
- package/dist/components/checkbox-field/checkbox.module.js +6 -8
- package/dist/components/checkbox-field/index.d.ts +0 -1
- package/dist/components/checkbox-field/index.js +1 -2
- package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +4 -1
- package/dist/components/checkbox-group-field/checkbox-group-field.js +54 -50
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +7 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +8 -3
- package/dist/components/collapsible/collapsible.css +23 -18
- package/dist/components/collapsible/collapsible.d.ts +18 -3
- package/dist/components/collapsible/collapsible.js +85 -32
- package/dist/components/collapsible/collapsible.module.js +7 -7
- package/dist/components/combobox-field/combobox-field.d.ts +9 -1
- package/dist/components/combobox-field/combobox-field.js +195 -175
- package/dist/components/combobox-field/combobox-items.d.ts +2 -2
- package/dist/components/combobox-field/combobox-items.js +4 -4
- package/dist/components/combobox-field/combobox.css +99 -96
- package/dist/components/combobox-field/combobox.d.ts +94 -15
- package/dist/components/combobox-field/combobox.js +484 -159
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/index.d.ts +0 -1
- package/dist/components/combobox-field/selection.d.ts +4 -1
- package/dist/components/combobox-field/value-state-view.css +7 -3
- package/dist/components/combobox-field/value-state-view.d.ts +4 -2
- package/dist/components/combobox-field/value-state-view.js +15 -15
- package/dist/components/combobox-field/value-state-view.module.js +6 -4
- package/dist/components/composer/composer-attachments.d.ts +11 -3
- package/dist/components/composer/composer-attachments.js +61 -47
- package/dist/components/composer/composer-editor.d.ts +2 -1
- package/dist/components/composer/composer-editor.js +79 -71
- package/dist/components/composer/composer-mentions.js +2 -2
- package/dist/components/composer/composer.d.ts +42 -21
- package/dist/components/composer/composer.js +201 -58
- package/dist/components/composer/mention-text.js +3 -3
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +8 -7
- package/dist/components/confirm-dialog/confirm-dialog.js +10 -9
- package/dist/components/conversation/conversation.context.d.ts +0 -5
- package/dist/components/conversation/conversation.d.ts +63 -29
- package/dist/components/conversation/conversation.js +193 -82
- package/dist/components/conversation/index.d.ts +1 -1
- package/dist/components/date-field/date-field.d.ts +10 -4
- package/dist/components/date-field/date-field.js +57 -43
- package/dist/components/date-field/date-input.d.ts +20 -3
- package/dist/components/date-field/date-input.js +28 -13
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.js +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +8 -4
- package/dist/components/date-range-field/date-range-field.js +57 -45
- package/dist/components/date-range-field/date-range-input.d.ts +20 -3
- package/dist/components/date-range-field/date-range-input.js +27 -12
- package/dist/components/date-range-field/tsf-date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/tsf-date-range-field.js +1 -1
- package/dist/components/detail-list/detail-list.d.ts +28 -27
- package/dist/components/detail-list/detail-list.js +177 -121
- package/dist/components/dialog/dialog.d.ts +47 -27
- package/dist/components/dialog/dialog.js +101 -38
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.d.ts +48 -30
- package/dist/components/drawer/drawer.js +113 -41
- package/dist/components/email-field/email-field.d.ts +5 -3
- package/dist/components/email-field/email-field.js +1 -3
- package/dist/components/email-field/tsf-email-field.d.ts +3 -2
- package/dist/components/empty-message/empty-message.d.ts +3 -3
- package/dist/components/empty-message/empty-message.js +3 -3
- package/dist/components/error-boundary/error-boundary.d.ts +5 -2
- package/dist/components/error-boundary/error-boundary.js +2 -3
- package/dist/components/error-message/error-message.d.ts +1 -1
- package/dist/components/error-message/error-message.js +1 -1
- package/dist/components/error-text/error-text.js +3 -3
- package/dist/components/field/field.d.ts +5 -5
- package/dist/components/field/field.js +9 -9
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/input-parts.js +1 -1
- package/dist/components/field-placeholder/field-placeholder.d.ts +4 -1
- package/dist/components/field-placeholder/field-placeholder.js +41 -26
- package/dist/components/fieldset/field-group.js +1 -1
- package/dist/components/fieldset/fieldset-root.js +1 -1
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/file-field/file-field.css +19 -15
- package/dist/components/file-field/file-field.d.ts +10 -1
- package/dist/components/file-field/file-field.js +130 -109
- package/dist/components/file-field/file-field.module.js +6 -4
- package/dist/components/file-field/file-input.d.ts +32 -9
- package/dist/components/file-field/file-input.js +94 -74
- package/dist/components/filter-bar/filter-bar.d.ts +79 -51
- package/dist/components/filter-bar/filter-bar.js +552 -216
- package/dist/components/form/form.d.ts +4 -6
- package/dist/components/form/form.js +6 -8
- package/dist/components/icon/icon.d.ts +5 -10
- package/dist/components/icon/icon.js +4 -6
- package/dist/components/link/link.js +1 -1
- package/dist/components/link-button/link-button.d.ts +1 -2
- package/dist/components/link-button/link-button.js +12 -22
- package/dist/components/loading-message/loading-message.d.ts +2 -2
- package/dist/components/loading-message/loading-message.js +1 -1
- package/dist/components/locale-provider/locale-provider.js +1 -1
- package/dist/components/menu/menu.d.ts +40 -22
- package/dist/components/menu/menu.js +100 -40
- package/dist/components/nav/nav-context.d.ts +0 -1
- package/dist/components/nav/nav-context.js +1 -2
- package/dist/components/nav/nav-item-view.d.ts +7 -7
- package/dist/components/nav/nav-item-view.js +27 -51
- package/dist/components/nav/nav.css +72 -60
- package/dist/components/nav/nav.d.ts +15 -8
- package/dist/components/nav/nav.js +105 -52
- package/dist/components/nav/nav.module.js +14 -14
- package/dist/components/number-field/number-field.d.ts +7 -1
- package/dist/components/number-field/number-field.js +98 -82
- package/dist/components/number-field/number-input.d.ts +53 -4
- package/dist/components/number-field/number-input.js +68 -21
- package/dist/components/number-field/tsf-number-field.d.ts +1 -1
- package/dist/components/number-field/tsf-number-field.js +1 -1
- package/dist/components/otp-field/otp-input.d.ts +25 -0
- package/dist/components/otp-field/otp-input.js +26 -1
- package/dist/components/pagination/pagination.d.ts +82 -23
- package/dist/components/pagination/pagination.js +656 -229
- package/dist/components/password-field/password-field.d.ts +7 -1
- package/dist/components/password-field/password-field.js +117 -126
- package/dist/components/password-field/password-strength.js +1 -1
- package/dist/components/password-field/tsf-password-field.d.ts +1 -1
- package/dist/components/password-field/tsf-password-field.js +1 -1
- package/dist/components/photo-field/photo-field.d.ts +17 -3
- package/dist/components/photo-field/photo-field.js +168 -89
- package/dist/components/photo-field/photo-input-context.d.ts +25 -0
- package/dist/components/photo-field/photo-input-context.js +14 -0
- package/dist/components/photo-field/photo-input.d.ts +58 -23
- package/dist/components/photo-field/photo-input.js +459 -261
- package/dist/components/popover/popover.d.ts +55 -23
- package/dist/components/popover/popover.js +205 -61
- package/dist/components/radio-group-field/radio-group.js +1 -1
- package/dist/components/search-field/search-field.d.ts +7 -5
- package/dist/components/search-field/search-field.js +4 -6
- package/dist/components/search-field/tsf-search-field.d.ts +1 -1
- package/dist/components/search-field/tsf-search-field.js +1 -1
- package/dist/components/segmented-control-field/segmented-control.js +1 -1
- package/dist/components/select-field/select-field.d.ts +7 -1
- package/dist/components/select-field/select-field.js +151 -139
- package/dist/components/select-field/select.d.ts +28 -6
- package/dist/components/select-field/select.js +234 -149
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/spinner/spinner.css +47 -1
- package/dist/components/spinner/spinner.js +28 -11
- package/dist/components/spinner/spinner.module.js +18 -3
- package/dist/components/stale/stale.d.ts +17 -21
- package/dist/components/stale/stale.js +307 -129
- package/dist/components/status-message/status-message.css +22 -21
- package/dist/components/status-message/status-message.d.ts +10 -5
- package/dist/components/status-message/status-message.js +20 -24
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/status-message/status-preset.d.ts +4 -5
- package/dist/components/status-message/status-preset.js +3 -3
- package/dist/components/switch-field/switch.js +1 -1
- package/dist/components/tabs/tabs.d.ts +51 -28
- package/dist/components/tabs/tabs.js +219 -144
- package/dist/components/tag/tag.css +23 -21
- package/dist/components/tag/tag.d.ts +17 -15
- package/dist/components/tag/tag.js +140 -65
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +30 -27
- package/dist/components/tag-group/tag-group.d.ts +10 -4
- package/dist/components/tag-group/tag-group.js +47 -35
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.d.ts +14 -3
- package/dist/components/text-field/text-field.js +154 -133
- package/dist/components/text-field/text-input.d.ts +89 -3
- package/dist/components/text-field/text-input.js +184 -70
- package/dist/components/textarea-field/textarea.js +1 -1
- package/dist/components/time-field/time-input.d.ts +6 -0
- package/dist/components/time-field/time-input.js +6 -0
- package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-provider.css +38 -34
- package/dist/components/toast/toast-provider.d.ts +65 -3
- package/dist/components/toast/toast-provider.js +313 -148
- package/dist/components/toast/toast-provider.module.js +11 -17
- package/dist/components/toast/toast.d.ts +5 -1
- package/dist/components/toast/toast.js +2 -1
- package/dist/components/toggle-group-field/toggle-group.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +6 -6
- package/dist/components/tooltip/tooltip.js +7 -7
- package/dist/data-table/data-table-content.d.ts +18 -10
- package/dist/data-table/data-table-content.js +145 -290
- package/dist/data-table/data-table-context.d.ts +4 -2
- package/dist/data-table/data-table-context.js +1 -1
- package/dist/data-table/data-table-parts.d.ts +99 -0
- package/dist/data-table/data-table-parts.js +1182 -0
- package/dist/data-table/data-table-selection.d.ts +7 -3
- package/dist/data-table/data-table-selection.js +62 -37
- package/dist/data-table/data-table.css +100 -95
- package/dist/data-table/data-table.d.ts +49 -25
- package/dist/data-table/data-table.js +95 -83
- package/dist/data-table/data-table.module.js +34 -34
- package/dist/data-table/index.d.ts +2 -1
- package/dist/data-table/index.js +2 -1
- package/dist/data-view/use-data-view.d.ts +2 -2
- package/dist/data-view/use-data-view.js +2 -2
- package/dist/index.js +7 -8
- package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
- package/dist/lib/calendar/calendar-navigation.js +72 -73
- package/dist/lib/calendar/calendar-year.d.ts +4 -3
- package/dist/lib/calendar/calendar-year.js +137 -156
- package/dist/lib/calendar/temporal.d.ts +18 -12
- package/dist/lib/calendar/temporal.js +191 -147
- package/dist/lib/table-storage.d.ts +2 -2
- package/dist/lib/table-storage.js +2 -2
- package/dist/lib/unsaved-changes/leave-guard.js +1 -1
- package/dist/terrazzo/index.d.ts +16 -0
- package/dist/terrazzo/index.js +94 -2
- package/dist/tokens.css +71 -69
- package/package.json +3 -2
- package/tokens/ref.tokens.json +0 -30
- package/tokens/sys.tokens.json +0 -7
- package/dist/assets/spinner.js +0 -28
- package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
- package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
- package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
- package/dist/components/combobox-field/combobox-popup-body.js +0 -142
- package/dist/components/conversation/conversation.context.js +0 -4
- package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
|
@@ -5,8 +5,8 @@ import { OPTIONS_LOADED } from "../field/options-load.js";
|
|
|
5
5
|
import { Select } from "./select.js";
|
|
6
6
|
import select_module_default from "./select.module.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
|
-
import { useRef } from "react";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useRef } from "react";
|
|
10
10
|
// src/components/select-field/select-field.tsx
|
|
11
11
|
/**
|
|
12
12
|
* The assembled select: a labelled trigger over the shared popup surface, then
|
|
@@ -17,6 +17,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
* label="Status"
|
|
18
18
|
* optionalLabel="optional"
|
|
19
19
|
* options={statusOptions}
|
|
20
|
+
* icon={<ExpandMoreIcon />}
|
|
21
|
+
* checkIcon={<CheckIcon />}
|
|
20
22
|
* value={status}
|
|
21
23
|
* onValueChange={setStatus}
|
|
22
24
|
* loadingLabel="Loading options…"
|
|
@@ -27,11 +29,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
27
29
|
* />
|
|
28
30
|
*/
|
|
29
31
|
var SelectField = (t0) => {
|
|
30
|
-
const $ = c(
|
|
32
|
+
const $ = c(91);
|
|
33
|
+
let checkIcon;
|
|
31
34
|
let className;
|
|
32
35
|
let description;
|
|
33
36
|
let dirty;
|
|
34
37
|
let errors;
|
|
38
|
+
let icon;
|
|
35
39
|
let label;
|
|
36
40
|
let loadBrokenLabel;
|
|
37
41
|
let loadFailedLabel;
|
|
@@ -49,49 +53,53 @@ var SelectField = (t0) => {
|
|
|
49
53
|
let t2;
|
|
50
54
|
let touched;
|
|
51
55
|
if ($[0] !== t0) {
|
|
52
|
-
({label, description, errors, requiredness, optionalLabel, dirty, touched, pending: t1, placeholder, load: t2, loadingLabel, loadFailedLabel, loadBrokenLabel, retryLabel, noOptionsLabel, onBlur, className, onOpenChange, onOpenChangeComplete, ...rootProps} = t0);
|
|
56
|
+
({label, description, errors, requiredness, optionalLabel, dirty, touched, pending: t1, placeholder, icon, checkIcon, load: t2, loadingLabel, loadFailedLabel, loadBrokenLabel, retryLabel, noOptionsLabel, onBlur, className, onOpenChange, onOpenChangeComplete, ...rootProps} = t0);
|
|
53
57
|
$[0] = t0;
|
|
54
|
-
$[1] =
|
|
55
|
-
$[2] =
|
|
56
|
-
$[3] =
|
|
57
|
-
$[4] =
|
|
58
|
-
$[5] =
|
|
59
|
-
$[6] =
|
|
60
|
-
$[7] =
|
|
61
|
-
$[8] =
|
|
62
|
-
$[9] =
|
|
63
|
-
$[10] =
|
|
64
|
-
$[11] =
|
|
65
|
-
$[12] =
|
|
66
|
-
$[13] =
|
|
67
|
-
$[14] =
|
|
68
|
-
$[15] =
|
|
69
|
-
$[16] =
|
|
70
|
-
$[17] =
|
|
71
|
-
$[18] =
|
|
72
|
-
$[19] =
|
|
73
|
-
$[20] =
|
|
58
|
+
$[1] = checkIcon;
|
|
59
|
+
$[2] = className;
|
|
60
|
+
$[3] = description;
|
|
61
|
+
$[4] = dirty;
|
|
62
|
+
$[5] = errors;
|
|
63
|
+
$[6] = icon;
|
|
64
|
+
$[7] = label;
|
|
65
|
+
$[8] = loadBrokenLabel;
|
|
66
|
+
$[9] = loadFailedLabel;
|
|
67
|
+
$[10] = loadingLabel;
|
|
68
|
+
$[11] = noOptionsLabel;
|
|
69
|
+
$[12] = onBlur;
|
|
70
|
+
$[13] = onOpenChange;
|
|
71
|
+
$[14] = onOpenChangeComplete;
|
|
72
|
+
$[15] = optionalLabel;
|
|
73
|
+
$[16] = placeholder;
|
|
74
|
+
$[17] = requiredness;
|
|
75
|
+
$[18] = retryLabel;
|
|
76
|
+
$[19] = rootProps;
|
|
77
|
+
$[20] = t1;
|
|
78
|
+
$[21] = t2;
|
|
79
|
+
$[22] = touched;
|
|
74
80
|
} else {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
checkIcon = $[1];
|
|
82
|
+
className = $[2];
|
|
83
|
+
description = $[3];
|
|
84
|
+
dirty = $[4];
|
|
85
|
+
errors = $[5];
|
|
86
|
+
icon = $[6];
|
|
87
|
+
label = $[7];
|
|
88
|
+
loadBrokenLabel = $[8];
|
|
89
|
+
loadFailedLabel = $[9];
|
|
90
|
+
loadingLabel = $[10];
|
|
91
|
+
noOptionsLabel = $[11];
|
|
92
|
+
onBlur = $[12];
|
|
93
|
+
onOpenChange = $[13];
|
|
94
|
+
onOpenChangeComplete = $[14];
|
|
95
|
+
optionalLabel = $[15];
|
|
96
|
+
placeholder = $[16];
|
|
97
|
+
requiredness = $[17];
|
|
98
|
+
retryLabel = $[18];
|
|
99
|
+
rootProps = $[19];
|
|
100
|
+
t1 = $[20];
|
|
101
|
+
t2 = $[21];
|
|
102
|
+
touched = $[22];
|
|
95
103
|
}
|
|
96
104
|
const pending = t1 === void 0 ? false : t1;
|
|
97
105
|
const load = t2 === void 0 ? OPTIONS_LOADED : t2;
|
|
@@ -101,7 +109,7 @@ var SelectField = (t0) => {
|
|
|
101
109
|
const inside = useRef(false);
|
|
102
110
|
const t3 = rootProps.value !== void 0 && rootProps.value !== null && rootProps.value !== "";
|
|
103
111
|
let t4;
|
|
104
|
-
if ($[
|
|
112
|
+
if ($[23] !== dirty || $[24] !== errors || $[25] !== pending || $[26] !== requiredness || $[27] !== rootProps.disabled || $[28] !== rootProps.readOnly || $[29] !== t3 || $[30] !== touched) {
|
|
105
113
|
t4 = {
|
|
106
114
|
errors,
|
|
107
115
|
requiredness,
|
|
@@ -112,113 +120,115 @@ var SelectField = (t0) => {
|
|
|
112
120
|
readOnly: rootProps.readOnly,
|
|
113
121
|
filled: t3
|
|
114
122
|
};
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
} else t4 = $[
|
|
123
|
+
$[23] = dirty;
|
|
124
|
+
$[24] = errors;
|
|
125
|
+
$[25] = pending;
|
|
126
|
+
$[26] = requiredness;
|
|
127
|
+
$[27] = rootProps.disabled;
|
|
128
|
+
$[28] = rootProps.readOnly;
|
|
129
|
+
$[29] = t3;
|
|
130
|
+
$[30] = touched;
|
|
131
|
+
$[31] = t4;
|
|
132
|
+
} else t4 = $[31];
|
|
125
133
|
const field = useFieldState(t4);
|
|
126
134
|
const t5 = field.state.pending === true || load.status === "pending";
|
|
127
135
|
let t6;
|
|
128
|
-
if ($[
|
|
136
|
+
if ($[32] !== field.state || $[33] !== t5) {
|
|
129
137
|
t6 = {
|
|
130
138
|
...field.state,
|
|
131
139
|
pending: t5
|
|
132
140
|
};
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
} else t6 = $[
|
|
141
|
+
$[32] = field.state;
|
|
142
|
+
$[33] = t5;
|
|
143
|
+
$[34] = t6;
|
|
144
|
+
} else t6 = $[34];
|
|
137
145
|
const fieldState = t6;
|
|
138
146
|
let t7;
|
|
139
|
-
if ($[
|
|
147
|
+
if ($[35] !== description || $[36] !== field.invalid || $[37] !== ids) {
|
|
140
148
|
t7 = ids.describedBy(description !== void 0, field.invalid);
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
} else t7 = $[
|
|
149
|
+
$[35] = description;
|
|
150
|
+
$[36] = field.invalid;
|
|
151
|
+
$[37] = ids;
|
|
152
|
+
$[38] = t7;
|
|
153
|
+
} else t7 = $[38];
|
|
146
154
|
const describedBy = t7;
|
|
147
155
|
let t8;
|
|
148
|
-
if ($[
|
|
156
|
+
if ($[39] !== onBlur) {
|
|
149
157
|
t8 = () => {
|
|
150
158
|
if (inside.current && !open.current && !focused.current) {
|
|
151
159
|
inside.current = false;
|
|
152
160
|
onBlur?.();
|
|
153
161
|
}
|
|
154
162
|
};
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
} else t8 = $[
|
|
163
|
+
$[39] = onBlur;
|
|
164
|
+
$[40] = t8;
|
|
165
|
+
} else t8 = $[40];
|
|
158
166
|
const leave = t8;
|
|
159
167
|
const t9 = requiredness === "required";
|
|
160
168
|
let t10;
|
|
161
|
-
if ($[
|
|
169
|
+
if ($[41] !== onOpenChange) {
|
|
162
170
|
t10 = (next, details) => {
|
|
163
171
|
open.current = next;
|
|
164
172
|
if (next) inside.current = true;
|
|
165
173
|
onOpenChange?.(next, details);
|
|
166
174
|
};
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
} else t10 = $[
|
|
175
|
+
$[41] = onOpenChange;
|
|
176
|
+
$[42] = t10;
|
|
177
|
+
} else t10 = $[42];
|
|
170
178
|
let t11;
|
|
171
|
-
if ($[
|
|
179
|
+
if ($[43] !== leave || $[44] !== onOpenChangeComplete) {
|
|
172
180
|
t11 = (next_0) => {
|
|
173
181
|
onOpenChangeComplete?.(next_0);
|
|
174
182
|
if (!next_0) requestAnimationFrame(leave);
|
|
175
183
|
};
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
} else t11 = $[
|
|
184
|
+
$[43] = leave;
|
|
185
|
+
$[44] = onOpenChangeComplete;
|
|
186
|
+
$[45] = t11;
|
|
187
|
+
} else t11 = $[45];
|
|
180
188
|
let t12;
|
|
181
|
-
if ($[
|
|
189
|
+
if ($[46] !== optionalLabel || $[47] !== requiredness) {
|
|
182
190
|
t12 = /* @__PURE__ */ jsx(Field.Requiredness, {
|
|
183
191
|
requiredness,
|
|
184
192
|
optionalLabel
|
|
185
193
|
});
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
} else t12 = $[
|
|
194
|
+
$[46] = optionalLabel;
|
|
195
|
+
$[47] = requiredness;
|
|
196
|
+
$[48] = t12;
|
|
197
|
+
} else t12 = $[48];
|
|
190
198
|
let t13;
|
|
191
|
-
if ($[
|
|
199
|
+
if ($[49] !== label || $[50] !== t12) {
|
|
192
200
|
t13 = /* @__PURE__ */ jsxs(Select.Label, { children: [
|
|
193
201
|
label,
|
|
194
202
|
" ",
|
|
195
203
|
t12
|
|
196
204
|
] });
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
} else t13 = $[
|
|
205
|
+
$[49] = label;
|
|
206
|
+
$[50] = t12;
|
|
207
|
+
$[51] = t13;
|
|
208
|
+
} else t13 = $[51];
|
|
201
209
|
let t14;
|
|
202
|
-
if ($[
|
|
210
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
203
211
|
t14 = () => {
|
|
204
212
|
focused.current = true;
|
|
205
213
|
inside.current = true;
|
|
206
214
|
};
|
|
207
|
-
$[
|
|
208
|
-
} else t14 = $[
|
|
215
|
+
$[52] = t14;
|
|
216
|
+
} else t14 = $[52];
|
|
209
217
|
let t15;
|
|
210
|
-
if ($[
|
|
218
|
+
if ($[53] !== leave) {
|
|
211
219
|
t15 = () => {
|
|
212
220
|
focused.current = false;
|
|
213
221
|
leave();
|
|
214
222
|
};
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else t15 = $[
|
|
223
|
+
$[53] = leave;
|
|
224
|
+
$[54] = t15;
|
|
225
|
+
} else t15 = $[54];
|
|
218
226
|
let t16;
|
|
219
|
-
if ($[
|
|
227
|
+
if ($[55] !== checkIcon || $[56] !== className || $[57] !== describedBy || $[58] !== fieldState || $[59] !== icon || $[60] !== load || $[61] !== loadBrokenLabel || $[62] !== loadFailedLabel || $[63] !== loadingLabel || $[64] !== noOptionsLabel || $[65] !== placeholder || $[66] !== retryLabel || $[67] !== t15) {
|
|
220
228
|
t16 = /* @__PURE__ */ jsx(Select.Control, {
|
|
221
229
|
placeholder,
|
|
230
|
+
icon,
|
|
231
|
+
checkIcon,
|
|
222
232
|
load,
|
|
223
233
|
loadingLabel,
|
|
224
234
|
loadFailedLabel,
|
|
@@ -231,21 +241,23 @@ var SelectField = (t0) => {
|
|
|
231
241
|
onFocus: t14,
|
|
232
242
|
onBlur: t15
|
|
233
243
|
});
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
|
|
244
|
+
$[55] = checkIcon;
|
|
245
|
+
$[56] = className;
|
|
246
|
+
$[57] = describedBy;
|
|
247
|
+
$[58] = fieldState;
|
|
248
|
+
$[59] = icon;
|
|
249
|
+
$[60] = load;
|
|
250
|
+
$[61] = loadBrokenLabel;
|
|
251
|
+
$[62] = loadFailedLabel;
|
|
252
|
+
$[63] = loadingLabel;
|
|
253
|
+
$[64] = noOptionsLabel;
|
|
254
|
+
$[65] = placeholder;
|
|
255
|
+
$[66] = retryLabel;
|
|
256
|
+
$[67] = t15;
|
|
257
|
+
$[68] = t16;
|
|
258
|
+
} else t16 = $[68];
|
|
247
259
|
let t17;
|
|
248
|
-
if ($[
|
|
260
|
+
if ($[69] !== field.disabled || $[70] !== ids.controlId || $[71] !== rootProps || $[72] !== t10 || $[73] !== t11 || $[74] !== t13 || $[75] !== t16 || $[76] !== t9) {
|
|
249
261
|
t17 = /* @__PURE__ */ jsxs(Select.Root, {
|
|
250
262
|
name: ids.controlId,
|
|
251
263
|
inputRef: detachHiddenInput,
|
|
@@ -256,38 +268,38 @@ var SelectField = (t0) => {
|
|
|
256
268
|
onOpenChangeComplete: t11,
|
|
257
269
|
children: [t13, t16]
|
|
258
270
|
});
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else t17 = $[
|
|
271
|
+
$[69] = field.disabled;
|
|
272
|
+
$[70] = ids.controlId;
|
|
273
|
+
$[71] = rootProps;
|
|
274
|
+
$[72] = t10;
|
|
275
|
+
$[73] = t11;
|
|
276
|
+
$[74] = t13;
|
|
277
|
+
$[75] = t16;
|
|
278
|
+
$[76] = t9;
|
|
279
|
+
$[77] = t17;
|
|
280
|
+
} else t17 = $[77];
|
|
269
281
|
let t18;
|
|
270
|
-
if ($[
|
|
282
|
+
if ($[78] !== description || $[79] !== ids.descriptionId) {
|
|
271
283
|
t18 = /* @__PURE__ */ jsx(Select.Description, {
|
|
272
284
|
id: ids.descriptionId,
|
|
273
285
|
children: description
|
|
274
286
|
});
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
} else t18 = $[
|
|
287
|
+
$[78] = description;
|
|
288
|
+
$[79] = ids.descriptionId;
|
|
289
|
+
$[80] = t18;
|
|
290
|
+
} else t18 = $[80];
|
|
279
291
|
let t19;
|
|
280
|
-
if ($[
|
|
292
|
+
if ($[81] !== errors || $[82] !== ids.errorId) {
|
|
281
293
|
t19 = /* @__PURE__ */ jsx(Select.Error, {
|
|
282
294
|
id: ids.errorId,
|
|
283
295
|
children: errors
|
|
284
296
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
} else t19 = $[
|
|
297
|
+
$[81] = errors;
|
|
298
|
+
$[82] = ids.errorId;
|
|
299
|
+
$[83] = t19;
|
|
300
|
+
} else t19 = $[83];
|
|
289
301
|
let t20;
|
|
290
|
-
if ($[
|
|
302
|
+
if ($[84] !== dirty || $[85] !== field.invalid || $[86] !== t17 || $[87] !== t18 || $[88] !== t19 || $[89] !== touched) {
|
|
291
303
|
t20 = /* @__PURE__ */ jsxs(Field.Root, {
|
|
292
304
|
className: select_module_default.field,
|
|
293
305
|
invalid: field.invalid,
|
|
@@ -299,14 +311,14 @@ var SelectField = (t0) => {
|
|
|
299
311
|
t19
|
|
300
312
|
]
|
|
301
313
|
});
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
} else t20 = $[
|
|
314
|
+
$[84] = dirty;
|
|
315
|
+
$[85] = field.invalid;
|
|
316
|
+
$[86] = t17;
|
|
317
|
+
$[87] = t18;
|
|
318
|
+
$[88] = t19;
|
|
319
|
+
$[89] = touched;
|
|
320
|
+
$[90] = t20;
|
|
321
|
+
} else t20 = $[90];
|
|
310
322
|
return t20;
|
|
311
323
|
};
|
|
312
324
|
export { SelectField };
|
|
@@ -8,25 +8,43 @@ export type SelectRootProps<T extends string> = Omit<BaseSelect.Root.Props<T>, "
|
|
|
8
8
|
options: readonly SelectOption<T>[];
|
|
9
9
|
onValueChange?: (value: T) => void;
|
|
10
10
|
}>;
|
|
11
|
+
/** The select's state, holding the options every part below it reads. */
|
|
11
12
|
declare const SelectRoot: <T extends string>({ options, onValueChange, ...props }: SelectRootProps<T>) => ReactNode;
|
|
13
|
+
/** The label that names the trigger. */
|
|
12
14
|
declare const SelectLabel: ({ className, ...props }: BaseSelect.Label.Props) => ReactNode;
|
|
13
15
|
export type SelectTriggerProps = BaseSelect.Trigger.Props & Readonly<{
|
|
14
16
|
/** Shown while nothing is selected. */
|
|
15
17
|
placeholder?: string;
|
|
16
18
|
/** The states projected onto the trigger as `data-*` attributes. */
|
|
17
19
|
state?: FieldState;
|
|
20
|
+
/** The chevron after the value, such as an expand icon. */
|
|
21
|
+
icon?: ReactNode;
|
|
18
22
|
}>;
|
|
19
|
-
|
|
23
|
+
/** The chevron after the trigger's value. Its children are the icon; without them it renders nothing. */
|
|
24
|
+
declare const SelectIcon: ({ className, children, ...props }: BaseSelect.Icon.Props) => ReactNode;
|
|
25
|
+
/** The button that opens the list. Without children it shows the value, the pending mark and `icon`. */
|
|
26
|
+
declare const SelectTrigger: ({ placeholder, state, icon, className, children, ...props }: SelectTriggerProps) => ReactNode;
|
|
27
|
+
/** Places the popup against the trigger. */
|
|
20
28
|
declare const SelectPositioner: ({ className, sideOffset, alignItemWithTrigger, ...props }: BaseSelect.Positioner.Props) => ReactNode;
|
|
29
|
+
/** The shared popup surface the list sits on. */
|
|
21
30
|
declare const SelectPopup: ({ className, ...props }: BaseSelect.Popup.Props) => ReactNode;
|
|
22
31
|
export type SelectItemProps = BaseSelect.Item.Props;
|
|
23
|
-
|
|
32
|
+
/** One option's row, holding its `ItemText` and `ItemIndicator`. */
|
|
33
|
+
declare const SelectItem: ({ className, ...props }: SelectItemProps) => ReactNode;
|
|
34
|
+
/** An option's text, which the trigger shows once it is chosen. */
|
|
35
|
+
declare const SelectItemText: ({ className, ...props }: BaseSelect.ItemText.Props) => ReactNode;
|
|
36
|
+
/** The mark beside the chosen option. Its children are the mark, such as a tick. */
|
|
37
|
+
declare const SelectItemIndicator: ({ className, ...props }: BaseSelect.ItemIndicator.Props) => ReactNode;
|
|
38
|
+
export type SelectItemsProps = Readonly<{
|
|
39
|
+
/** The mark beside the chosen option, such as a tick. */
|
|
40
|
+
checkIcon: ReactNode;
|
|
41
|
+
}>;
|
|
24
42
|
/**
|
|
25
43
|
* Every option of the enclosing `Select.Root`, in the order it was given them.
|
|
26
44
|
* Compose the parts directly instead where a row is more than its label.
|
|
27
45
|
*/
|
|
28
|
-
declare const SelectItems: () => ReactNode;
|
|
29
|
-
export type SelectControlProps = Omit<SelectTriggerProps, "children"> & OptionsLoadLabels & Readonly<{
|
|
46
|
+
declare const SelectItems: ({ checkIcon, }: SelectItemsProps) => ReactNode;
|
|
47
|
+
export type SelectControlProps = Omit<SelectTriggerProps, "children"> & OptionsLoadLabels & SelectItemsProps & Readonly<{
|
|
30
48
|
/** How far the options have loaded, when they come from a query. */
|
|
31
49
|
load?: OptionsLoad;
|
|
32
50
|
}>;
|
|
@@ -34,19 +52,21 @@ export type SelectControlProps = Omit<SelectTriggerProps, "children"> & OptionsL
|
|
|
34
52
|
* The trigger over the portalled list of every option: the shape almost every
|
|
35
53
|
* select takes. Reach for the parts where the list needs anything else.
|
|
36
54
|
*/
|
|
37
|
-
declare const SelectControl: ({ load, loadingLabel, loadFailedLabel, loadBrokenLabel, retryLabel, noOptionsLabel, ...props }: SelectControlProps) => ReactNode;
|
|
55
|
+
declare const SelectControl: ({ load, loadingLabel, loadFailedLabel, loadBrokenLabel, retryLabel, noOptionsLabel, checkIcon, ...props }: SelectControlProps) => ReactNode;
|
|
38
56
|
/** The parts of a select. */
|
|
39
57
|
export type SelectParts = Readonly<{
|
|
40
58
|
Root: typeof SelectRoot;
|
|
41
59
|
Label: typeof SelectLabel;
|
|
42
60
|
Trigger: typeof SelectTrigger;
|
|
43
61
|
Value: typeof BaseSelect.Value;
|
|
44
|
-
Icon: typeof
|
|
62
|
+
Icon: typeof SelectIcon;
|
|
45
63
|
Portal: typeof BaseSelect.Portal;
|
|
46
64
|
Positioner: typeof SelectPositioner;
|
|
47
65
|
Popup: typeof SelectPopup;
|
|
48
66
|
List: typeof BaseSelect.List;
|
|
49
67
|
Item: typeof SelectItem;
|
|
68
|
+
ItemText: typeof SelectItemText;
|
|
69
|
+
ItemIndicator: typeof SelectItemIndicator;
|
|
50
70
|
Items: typeof SelectItems;
|
|
51
71
|
Group: typeof BaseSelect.Group;
|
|
52
72
|
GroupLabel: typeof BaseSelect.GroupLabel;
|
|
@@ -67,6 +87,8 @@ export type SelectParts = Readonly<{
|
|
|
67
87
|
* <Select.Root options={options} value={value} onValueChange={setValue}>
|
|
68
88
|
* <Select.Label>Status</Select.Label>
|
|
69
89
|
* <Select.Control
|
|
90
|
+
* icon={<ExpandMoreIcon />}
|
|
91
|
+
* checkIcon={<CheckIcon />}
|
|
70
92
|
* loadingLabel="Loading options…"
|
|
71
93
|
* loadFailedLabel="Options could not be loaded."
|
|
72
94
|
* loadBrokenLabel="Options could not be loaded, and trying again won't help."
|