@igne-agency/react-web-ui 0.3.0 → 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.css +4 -3
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/fieldset/fieldset.module.js +2 -2
- 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
|
@@ -13,13 +13,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* label="Statuses"
|
|
14
14
|
* optionalLabel="optional"
|
|
15
15
|
* items={[{ label: "Open", value: "open" }]}
|
|
16
|
+
* checkIcon={<CheckIcon />}
|
|
16
17
|
* value={statuses}
|
|
17
18
|
* onValueChange={setStatuses}
|
|
18
19
|
* />
|
|
19
20
|
*/
|
|
20
21
|
var CheckboxGroupField = (t0) => {
|
|
21
|
-
const $ = c(
|
|
22
|
-
const { label, description, errors, requiredness, optionalLabel, dirty, touched, pending, items, readOnly, name, onBlur, className, value, defaultValue, onValueChange, disabled } = t0;
|
|
22
|
+
const $ = c(40);
|
|
23
|
+
const { label, description, errors, requiredness, optionalLabel, dirty, touched, pending, items, checkIcon, readOnly, name, onBlur, className, value, defaultValue, onValueChange, disabled } = t0;
|
|
23
24
|
const { controlId } = CheckboxGroup.useIds();
|
|
24
25
|
const prefix = name ?? controlId;
|
|
25
26
|
const t1 = value !== void 0 && value.length > 0;
|
|
@@ -36,31 +37,34 @@ var CheckboxGroupField = (t0) => {
|
|
|
36
37
|
$[3] = t2;
|
|
37
38
|
} else t2 = $[3];
|
|
38
39
|
let t3;
|
|
39
|
-
if ($[4] !==
|
|
40
|
+
if ($[4] !== checkIcon || $[5] !== items || $[6] !== onBlur || $[7] !== prefix || $[8] !== readOnly) {
|
|
40
41
|
let t4;
|
|
41
|
-
if ($[
|
|
42
|
-
t4 = (item) => /* @__PURE__ */ jsxs(CheckboxGroup.Item, { children: [/* @__PURE__ */ jsx(CheckboxGroup.
|
|
42
|
+
if ($[10] !== checkIcon || $[11] !== onBlur || $[12] !== prefix || $[13] !== readOnly) {
|
|
43
|
+
t4 = (item) => /* @__PURE__ */ jsxs(CheckboxGroup.Item, { children: [/* @__PURE__ */ jsx(CheckboxGroup.Control, {
|
|
43
44
|
id: `${prefix}-${item.value}`,
|
|
44
45
|
name: prefix,
|
|
45
46
|
inputRef: detachHiddenInput,
|
|
46
47
|
value: item.value,
|
|
47
48
|
onBlur,
|
|
48
|
-
readOnly
|
|
49
|
+
readOnly,
|
|
50
|
+
children: /* @__PURE__ */ jsx(CheckboxGroup.Indicator, { children: checkIcon })
|
|
49
51
|
}), item.label] }, item.value);
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
|
|
52
|
+
$[10] = checkIcon;
|
|
53
|
+
$[11] = onBlur;
|
|
54
|
+
$[12] = prefix;
|
|
55
|
+
$[13] = readOnly;
|
|
56
|
+
$[14] = t4;
|
|
57
|
+
} else t4 = $[14];
|
|
55
58
|
t3 = items.map(t4);
|
|
56
|
-
$[4] =
|
|
57
|
-
$[5] =
|
|
58
|
-
$[6] =
|
|
59
|
-
$[7] =
|
|
60
|
-
$[8] =
|
|
61
|
-
|
|
59
|
+
$[4] = checkIcon;
|
|
60
|
+
$[5] = items;
|
|
61
|
+
$[6] = onBlur;
|
|
62
|
+
$[7] = prefix;
|
|
63
|
+
$[8] = readOnly;
|
|
64
|
+
$[9] = t3;
|
|
65
|
+
} else t3 = $[9];
|
|
62
66
|
let t4;
|
|
63
|
-
if ($[
|
|
67
|
+
if ($[15] !== defaultValue || $[16] !== disabled || $[17] !== onValueChange || $[18] !== t3 || $[19] !== value) {
|
|
64
68
|
t4 = /* @__PURE__ */ jsx(CheckboxGroup.Group, {
|
|
65
69
|
value,
|
|
66
70
|
defaultValue,
|
|
@@ -68,27 +72,27 @@ var CheckboxGroupField = (t0) => {
|
|
|
68
72
|
disabled,
|
|
69
73
|
children: t3
|
|
70
74
|
});
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
} else t4 = $[
|
|
75
|
+
$[15] = defaultValue;
|
|
76
|
+
$[16] = disabled;
|
|
77
|
+
$[17] = onValueChange;
|
|
78
|
+
$[18] = t3;
|
|
79
|
+
$[19] = value;
|
|
80
|
+
$[20] = t4;
|
|
81
|
+
} else t4 = $[20];
|
|
78
82
|
let t5;
|
|
79
|
-
if ($[
|
|
83
|
+
if ($[21] !== description) {
|
|
80
84
|
t5 = /* @__PURE__ */ jsx(CheckboxGroup.Description, { children: description });
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else t5 = $[
|
|
85
|
+
$[21] = description;
|
|
86
|
+
$[22] = t5;
|
|
87
|
+
} else t5 = $[22];
|
|
84
88
|
let t6;
|
|
85
|
-
if ($[
|
|
89
|
+
if ($[23] !== errors) {
|
|
86
90
|
t6 = /* @__PURE__ */ jsx(CheckboxGroup.Error, { children: errors });
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
} else t6 = $[
|
|
91
|
+
$[23] = errors;
|
|
92
|
+
$[24] = t6;
|
|
93
|
+
} else t6 = $[24];
|
|
90
94
|
let t7;
|
|
91
|
-
if ($[
|
|
95
|
+
if ($[25] !== className || $[26] !== dirty || $[27] !== disabled || $[28] !== errors || $[29] !== name || $[30] !== pending || $[31] !== readOnly || $[32] !== requiredness || $[33] !== t1 || $[34] !== t2 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6 || $[38] !== touched) {
|
|
92
96
|
t7 = /* @__PURE__ */ jsxs(CheckboxGroup.Root, {
|
|
93
97
|
name,
|
|
94
98
|
className,
|
|
@@ -107,22 +111,22 @@ var CheckboxGroupField = (t0) => {
|
|
|
107
111
|
t6
|
|
108
112
|
]
|
|
109
113
|
});
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
} else t7 = $[
|
|
114
|
+
$[25] = className;
|
|
115
|
+
$[26] = dirty;
|
|
116
|
+
$[27] = disabled;
|
|
117
|
+
$[28] = errors;
|
|
118
|
+
$[29] = name;
|
|
119
|
+
$[30] = pending;
|
|
120
|
+
$[31] = readOnly;
|
|
121
|
+
$[32] = requiredness;
|
|
122
|
+
$[33] = t1;
|
|
123
|
+
$[34] = t2;
|
|
124
|
+
$[35] = t4;
|
|
125
|
+
$[36] = t5;
|
|
126
|
+
$[37] = t6;
|
|
127
|
+
$[38] = touched;
|
|
128
|
+
$[39] = t7;
|
|
129
|
+
} else t7 = $[39];
|
|
126
130
|
return t7;
|
|
127
131
|
};
|
|
128
132
|
export { CheckboxGroupField };
|
|
@@ -5,7 +5,9 @@ import { Checkbox } from "../checkbox-field/index.ts";
|
|
|
5
5
|
import { Field } from "../field/index.ts";
|
|
6
6
|
import { FieldsetLegend, FieldsetRoot, type FieldsetRootProps } from "../fieldset/fieldset-root.tsx";
|
|
7
7
|
export type CheckboxGroupRootProps = FieldsetRootProps;
|
|
8
|
+
/** The group of boxes, which holds the array of ticked values. */
|
|
8
9
|
declare const CheckboxGroupGroup: ({ className, ...props }: BaseCheckboxGroup.Props) => ReactNode;
|
|
10
|
+
/** One box's row: a label wrapping its `Control` and its text. */
|
|
9
11
|
declare const CheckboxGroupItem: ({ className, ...props }: BaseField.Item.Props) => ReactNode;
|
|
10
12
|
/** The parts of a checkbox group. */
|
|
11
13
|
export type CheckboxGroupParts = Readonly<{
|
|
@@ -13,7 +15,8 @@ export type CheckboxGroupParts = Readonly<{
|
|
|
13
15
|
Legend: typeof FieldsetLegend;
|
|
14
16
|
Group: typeof CheckboxGroupGroup;
|
|
15
17
|
Item: typeof CheckboxGroupItem;
|
|
16
|
-
|
|
18
|
+
Control: typeof Checkbox.Control;
|
|
19
|
+
Indicator: typeof Checkbox.Indicator;
|
|
17
20
|
Description: typeof Field.Description;
|
|
18
21
|
Error: typeof Field.Error;
|
|
19
22
|
useIds: typeof Field.useIds;
|
|
@@ -28,7 +31,9 @@ export type CheckboxGroupParts = Readonly<{
|
|
|
28
31
|
* <CheckboxGroup.Legend optionalLabel="optional">Statuses</CheckboxGroup.Legend>
|
|
29
32
|
* <CheckboxGroup.Group value={values} onValueChange={setValues}>
|
|
30
33
|
* <CheckboxGroup.Item>
|
|
31
|
-
* <CheckboxGroup.
|
|
34
|
+
* <CheckboxGroup.Control value="open">
|
|
35
|
+
* <CheckboxGroup.Indicator><CheckIcon /></CheckboxGroup.Indicator>
|
|
36
|
+
* </CheckboxGroup.Control>
|
|
32
37
|
* Open
|
|
33
38
|
* </CheckboxGroup.Item>
|
|
34
39
|
* </CheckboxGroup.Group>
|
|
@@ -3,11 +3,12 @@ import { Field as Field$1 } from "../field/field.js";
|
|
|
3
3
|
import { FieldsetLegend, FieldsetRoot } from "../fieldset/fieldset-root.js";
|
|
4
4
|
import checkbox_group_module_default from "./checkbox-group.module.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { Field } from "@base-ui/react/field";
|
|
9
9
|
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
10
10
|
// src/components/checkbox-group-field/checkbox-group.tsx
|
|
11
|
+
/** The group of boxes, which holds the array of ticked values. */
|
|
11
12
|
var CheckboxGroupGroup = (t0) => {
|
|
12
13
|
const $ = c(8);
|
|
13
14
|
let className;
|
|
@@ -39,6 +40,7 @@ var CheckboxGroupGroup = (t0) => {
|
|
|
39
40
|
} else t2 = $[7];
|
|
40
41
|
return t2;
|
|
41
42
|
};
|
|
43
|
+
/** One box's row: a label wrapping its `Control` and its text. */
|
|
42
44
|
var CheckboxGroupItem = (t0) => {
|
|
43
45
|
const $ = c(8);
|
|
44
46
|
let className;
|
|
@@ -83,7 +85,9 @@ var CheckboxGroupItem = (t0) => {
|
|
|
83
85
|
* <CheckboxGroup.Legend optionalLabel="optional">Statuses</CheckboxGroup.Legend>
|
|
84
86
|
* <CheckboxGroup.Group value={values} onValueChange={setValues}>
|
|
85
87
|
* <CheckboxGroup.Item>
|
|
86
|
-
* <CheckboxGroup.
|
|
88
|
+
* <CheckboxGroup.Control value="open">
|
|
89
|
+
* <CheckboxGroup.Indicator><CheckIcon /></CheckboxGroup.Indicator>
|
|
90
|
+
* </CheckboxGroup.Control>
|
|
87
91
|
* Open
|
|
88
92
|
* </CheckboxGroup.Item>
|
|
89
93
|
* </CheckboxGroup.Group>
|
|
@@ -94,7 +98,8 @@ var CheckboxGroup$1 = {
|
|
|
94
98
|
Legend: FieldsetLegend,
|
|
95
99
|
Group: CheckboxGroupGroup,
|
|
96
100
|
Item: CheckboxGroupItem,
|
|
97
|
-
Checkbox,
|
|
101
|
+
Control: Checkbox.Control,
|
|
102
|
+
Indicator: Checkbox.Indicator,
|
|
98
103
|
Description: Field$1.Description,
|
|
99
104
|
Error: Field$1.Error,
|
|
100
105
|
useIds: Field$1.useIds
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._root_1pgip_3 {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
._trigger_1pgip_7 {
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: space-between;
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
text-align: start;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
._trigger_1pgip_7 {
|
|
24
24
|
outline: 0 solid var(--sys-color-focus-ring);
|
|
25
25
|
outline-offset: var(--sys-focus-ring-offset);
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
._trigger_1pgip_7:focus-visible {
|
|
28
28
|
outline-width: var(--sys-focus-ring-width);
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
._trigger_1pgip_7 {
|
|
31
31
|
position: relative;
|
|
32
32
|
isolation: isolate;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
._trigger_1pgip_7::after {
|
|
35
35
|
content: "";
|
|
36
36
|
position: absolute;
|
|
37
37
|
z-index: -1;
|
|
@@ -42,47 +42,52 @@
|
|
|
42
42
|
pointer-events: none;
|
|
43
43
|
}
|
|
44
44
|
@media not (prefers-reduced-motion) {
|
|
45
|
-
.
|
|
45
|
+
._trigger_1pgip_7::after {
|
|
46
46
|
transition: opacity var(--sys-motion-instant) var(--sys-motion-standard);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
._trigger_1pgip_7:hover:not(:disabled, [data-disabled])::after {
|
|
50
50
|
opacity: var(--sys-state-hover);
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
._trigger_1pgip_7:active:not(:disabled, [data-disabled])::after {
|
|
53
53
|
opacity: var(--sys-state-pressed);
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
._trigger_1pgip_7[data-disabled] {
|
|
56
56
|
color: var(--sys-color-disabled-fg);
|
|
57
57
|
cursor: not-allowed;
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
._indicator_1pgip_59 {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
}
|
|
62
62
|
@media not (prefers-reduced-motion) {
|
|
63
|
-
.
|
|
63
|
+
._indicator_1pgip_59 {
|
|
64
64
|
transition: rotate var(--sys-motion-short) var(--sys-motion-standard);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
[data-panel-open] > .
|
|
67
|
+
[data-panel-open] > ._indicator_1pgip_59 {
|
|
68
68
|
rotate: 180deg;
|
|
69
69
|
}
|
|
70
|
-
.
|
|
70
|
+
._indicator_1pgip_59 {
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
color: var(--collapsible-indicator-fg, currentcolor);
|
|
73
|
+
font-size: var(--collapsible-indicator-size, 1.5em);
|
|
74
|
+
}
|
|
75
|
+
._panel_1pgip_75 {
|
|
71
76
|
overflow: hidden;
|
|
72
77
|
}
|
|
73
|
-
.
|
|
78
|
+
._panel_1pgip_75[hidden]:not([hidden=until-found]) {
|
|
74
79
|
display: none;
|
|
75
80
|
}
|
|
76
81
|
@media not (prefers-reduced-motion) {
|
|
77
|
-
.
|
|
82
|
+
._panel_1pgip_75 {
|
|
78
83
|
block-size: var(--collapsible-panel-height);
|
|
79
84
|
transition: block-size var(--sys-motion-short) var(--sys-motion-standard);
|
|
80
85
|
}
|
|
81
|
-
.
|
|
86
|
+
._panel_1pgip_75[data-starting-style], ._panel_1pgip_75[data-ending-style] {
|
|
82
87
|
block-size: 0;
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
|
-
.
|
|
90
|
+
._content_1pgip_90 {
|
|
86
91
|
padding: var(--collapsible-pad-y, var(--sys-unit-4)) var(--collapsible-pad-x, var(--sys-unit-6));
|
|
87
92
|
}
|
|
88
93
|
}
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
3
|
import type { ReactNode } from "react";
|
|
3
4
|
export type CollapsibleRootProps = Omit<BaseCollapsible.Root.Props, "className"> & Readonly<{
|
|
4
5
|
className?: string;
|
|
5
6
|
}>;
|
|
6
7
|
export type CollapsibleTriggerProps = Omit<BaseCollapsible.Trigger.Props, "className" | "children"> & Readonly<{
|
|
7
8
|
className?: string;
|
|
8
|
-
/**
|
|
9
|
+
/** The label naming what the panel holds, then a `Collapsible.Indicator`. */
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
}>;
|
|
12
|
+
export type CollapsibleIndicatorProps = useRender.ComponentProps<"span">;
|
|
11
13
|
export type CollapsiblePanelProps = Omit<BaseCollapsible.Panel.Props, "className"> & Readonly<{
|
|
12
14
|
className?: string;
|
|
13
15
|
}>;
|
|
16
|
+
/** The trigger and its panel. */
|
|
14
17
|
declare const Root: ({ className, ...props }: CollapsibleRootProps) => ReactNode;
|
|
15
|
-
|
|
18
|
+
/** The button that folds the panel open and shut. */
|
|
19
|
+
declare const Trigger: ({ className, ...props }: CollapsibleTriggerProps) => ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The trigger's open-state glyph, such as the app's chevron, turned over while
|
|
22
|
+
* the panel is open. Put it last in the `Trigger`; without children it renders
|
|
23
|
+
* nothing.
|
|
24
|
+
*/
|
|
25
|
+
declare const Indicator: ({ render, className, children, ref, ...props }: CollapsibleIndicatorProps) => ReactNode;
|
|
26
|
+
/** What the trigger folds, along its height. */
|
|
16
27
|
declare const Panel: ({ className, children, ...props }: CollapsiblePanelProps) => ReactNode;
|
|
17
28
|
type CollapsibleNamespace = Readonly<{
|
|
18
29
|
Root: typeof Root;
|
|
19
30
|
Trigger: typeof Trigger;
|
|
31
|
+
Indicator: typeof Indicator;
|
|
20
32
|
Panel: typeof Panel;
|
|
21
33
|
}>;
|
|
22
34
|
/**
|
|
@@ -25,7 +37,10 @@ type CollapsibleNamespace = Readonly<{
|
|
|
25
37
|
*
|
|
26
38
|
* @example
|
|
27
39
|
* <Collapsible.Root>
|
|
28
|
-
* <Collapsible.Trigger>
|
|
40
|
+
* <Collapsible.Trigger>
|
|
41
|
+
* Advanced settings
|
|
42
|
+
* <Collapsible.Indicator><ChevronIcon /></Collapsible.Indicator>
|
|
43
|
+
* </Collapsible.Trigger>
|
|
29
44
|
* <Collapsible.Panel>{settings}</Collapsible.Panel>
|
|
30
45
|
* </Collapsible.Root>
|
|
31
46
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import SvgExpandMore from "../../vendor/@material-design-icons/svg/outlined/expand_more.js";
|
|
2
|
-
import { Icon } from "../icon/icon.js";
|
|
3
1
|
import collapsible_module_default from "./collapsible.module.js";
|
|
4
2
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import {
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
4
|
import { clsx } from "clsx";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
8
7
|
// src/components/collapsible/collapsible.tsx
|
|
8
|
+
/** The trigger and its panel. */
|
|
9
9
|
var Root = (t0) => {
|
|
10
10
|
const $ = c(8);
|
|
11
11
|
let className;
|
|
@@ -37,52 +37,101 @@ var Root = (t0) => {
|
|
|
37
37
|
} else t2 = $[7];
|
|
38
38
|
return t2;
|
|
39
39
|
};
|
|
40
|
+
/** The button that folds the panel open and shut. */
|
|
40
41
|
var Trigger = (t0) => {
|
|
41
|
-
const $ = c(
|
|
42
|
+
const $ = c(8);
|
|
43
|
+
let className;
|
|
44
|
+
let props;
|
|
45
|
+
if ($[0] !== t0) {
|
|
46
|
+
({className, ...props} = t0);
|
|
47
|
+
$[0] = t0;
|
|
48
|
+
$[1] = className;
|
|
49
|
+
$[2] = props;
|
|
50
|
+
} else {
|
|
51
|
+
className = $[1];
|
|
52
|
+
props = $[2];
|
|
53
|
+
}
|
|
54
|
+
let t1;
|
|
55
|
+
if ($[3] !== className) {
|
|
56
|
+
t1 = clsx(collapsible_module_default.trigger, className);
|
|
57
|
+
$[3] = className;
|
|
58
|
+
$[4] = t1;
|
|
59
|
+
} else t1 = $[4];
|
|
60
|
+
let t2;
|
|
61
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
62
|
+
t2 = /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
63
|
+
className: t1,
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
$[5] = props;
|
|
67
|
+
$[6] = t1;
|
|
68
|
+
$[7] = t2;
|
|
69
|
+
} else t2 = $[7];
|
|
70
|
+
return t2;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* The trigger's open-state glyph, such as the app's chevron, turned over while
|
|
74
|
+
* the panel is open. Put it last in the `Trigger`; without children it renders
|
|
75
|
+
* nothing.
|
|
76
|
+
*/
|
|
77
|
+
var Indicator = (t0) => {
|
|
78
|
+
const $ = c(16);
|
|
42
79
|
let children;
|
|
43
80
|
let className;
|
|
44
81
|
let props;
|
|
82
|
+
let ref;
|
|
83
|
+
let render;
|
|
45
84
|
if ($[0] !== t0) {
|
|
46
|
-
({className, children, ...props} = t0);
|
|
85
|
+
({render, className, children, ref, ...props} = t0);
|
|
47
86
|
$[0] = t0;
|
|
48
87
|
$[1] = children;
|
|
49
88
|
$[2] = className;
|
|
50
89
|
$[3] = props;
|
|
90
|
+
$[4] = ref;
|
|
91
|
+
$[5] = render;
|
|
51
92
|
} else {
|
|
52
93
|
children = $[1];
|
|
53
94
|
className = $[2];
|
|
54
95
|
props = $[3];
|
|
96
|
+
ref = $[4];
|
|
97
|
+
render = $[5];
|
|
55
98
|
}
|
|
56
99
|
let t1;
|
|
57
|
-
if ($[
|
|
58
|
-
t1 = clsx(collapsible_module_default.
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
} else t1 = $[
|
|
100
|
+
if ($[6] !== className) {
|
|
101
|
+
t1 = clsx(collapsible_module_default.indicator, className);
|
|
102
|
+
$[6] = className;
|
|
103
|
+
$[7] = t1;
|
|
104
|
+
} else t1 = $[7];
|
|
62
105
|
let t2;
|
|
63
|
-
if ($[
|
|
64
|
-
t2 =
|
|
65
|
-
|
|
66
|
-
label: "",
|
|
67
|
-
size: 1.5,
|
|
68
|
-
className: collapsible_module_default.chevron
|
|
69
|
-
});
|
|
70
|
-
$[6] = t2;
|
|
71
|
-
} else t2 = $[6];
|
|
72
|
-
let t3;
|
|
73
|
-
if ($[7] !== children || $[8] !== props || $[9] !== t1) {
|
|
74
|
-
t3 = /* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
75
|
-
className: t1,
|
|
106
|
+
if ($[8] !== children || $[9] !== props || $[10] !== t1) {
|
|
107
|
+
t2 = {
|
|
108
|
+
"aria-hidden": true,
|
|
76
109
|
...props,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
$[8] =
|
|
81
|
-
$[9] =
|
|
82
|
-
$[10] =
|
|
83
|
-
|
|
84
|
-
|
|
110
|
+
className: t1,
|
|
111
|
+
children
|
|
112
|
+
};
|
|
113
|
+
$[8] = children;
|
|
114
|
+
$[9] = props;
|
|
115
|
+
$[10] = t1;
|
|
116
|
+
$[11] = t2;
|
|
117
|
+
} else t2 = $[11];
|
|
118
|
+
let t3;
|
|
119
|
+
if ($[12] !== ref || $[13] !== render || $[14] !== t2) {
|
|
120
|
+
t3 = {
|
|
121
|
+
defaultTagName: "span",
|
|
122
|
+
render,
|
|
123
|
+
ref,
|
|
124
|
+
props: t2
|
|
125
|
+
};
|
|
126
|
+
$[12] = ref;
|
|
127
|
+
$[13] = render;
|
|
128
|
+
$[14] = t2;
|
|
129
|
+
$[15] = t3;
|
|
130
|
+
} else t3 = $[15];
|
|
131
|
+
const element = useRender(t3);
|
|
132
|
+
return children === void 0 || children === null ? null : element;
|
|
85
133
|
};
|
|
134
|
+
/** What the trigger folds, along its height. */
|
|
86
135
|
var Panel = (t0) => {
|
|
87
136
|
const $ = c(12);
|
|
88
137
|
let children;
|
|
@@ -134,13 +183,17 @@ var Panel = (t0) => {
|
|
|
134
183
|
*
|
|
135
184
|
* @example
|
|
136
185
|
* <Collapsible.Root>
|
|
137
|
-
* <Collapsible.Trigger>
|
|
186
|
+
* <Collapsible.Trigger>
|
|
187
|
+
* Advanced settings
|
|
188
|
+
* <Collapsible.Indicator><ChevronIcon /></Collapsible.Indicator>
|
|
189
|
+
* </Collapsible.Trigger>
|
|
138
190
|
* <Collapsible.Panel>{settings}</Collapsible.Panel>
|
|
139
191
|
* </Collapsible.Root>
|
|
140
192
|
*/
|
|
141
193
|
var Collapsible$1 = {
|
|
142
194
|
Root,
|
|
143
195
|
Trigger,
|
|
196
|
+
Indicator,
|
|
144
197
|
Panel
|
|
145
198
|
};
|
|
146
199
|
export { Collapsible$1 as Collapsible };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import './collapsible.css';// src/components/collapsible/collapsible.module.scss
|
|
2
|
-
var root = "
|
|
3
|
-
var trigger = "
|
|
4
|
-
var
|
|
5
|
-
var panel = "
|
|
6
|
-
var content = "
|
|
2
|
+
var root = "_root_1pgip_3";
|
|
3
|
+
var trigger = "_trigger_1pgip_7";
|
|
4
|
+
var indicator = "_indicator_1pgip_59";
|
|
5
|
+
var panel = "_panel_1pgip_75";
|
|
6
|
+
var content = "_content_1pgip_90";
|
|
7
7
|
var collapsible_module_default = {
|
|
8
8
|
root,
|
|
9
9
|
trigger,
|
|
10
|
-
|
|
10
|
+
indicator,
|
|
11
11
|
panel,
|
|
12
12
|
content
|
|
13
13
|
};
|
|
14
|
-
export {
|
|
14
|
+
export { content, collapsible_module_default as default, indicator, panel, root, trigger };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { QueryKey } from "@tanstack/react-query";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type FieldBlurHandler, type FieldProps } from "../field/index.ts";
|
|
4
|
+
import { type ComboboxPopupLabels } from "./combobox.tsx";
|
|
4
5
|
import { type ComboboxItems, type ItemQuery } from "./combobox-items.ts";
|
|
5
|
-
import { type ComboboxPopupLabels } from "./combobox-popup-body.tsx";
|
|
6
6
|
import { type ComboboxMode } from "./selection.ts";
|
|
7
7
|
import { type ValueStateLabels } from "./value-state.ts";
|
|
8
8
|
/** Everything a combobox field takes besides its items, its value and how it reads them. */
|
|
@@ -21,6 +21,10 @@ export type ComboboxFieldChrome = FieldProps & ComboboxPopupLabels & Readonly<{
|
|
|
21
21
|
searchDelay?: number;
|
|
22
22
|
/** Applied to the field wrapper, so callers can size the control. */
|
|
23
23
|
className?: string;
|
|
24
|
+
/** The chevron at the end of the control, such as an expand icon. */
|
|
25
|
+
icon?: ReactNode;
|
|
26
|
+
/** The mark beside a chosen option, such as a tick. */
|
|
27
|
+
checkIcon: ReactNode;
|
|
24
28
|
}>;
|
|
25
29
|
/** How a combobox field reads its items. */
|
|
26
30
|
export type ComboboxDerivations<TItem> = Readonly<{
|
|
@@ -39,6 +43,8 @@ export type ComboboxItemLookup<TItem, TData = TItem, TKey extends QueryKey = Que
|
|
|
39
43
|
itemQuery?: never;
|
|
40
44
|
}> | (Readonly<{
|
|
41
45
|
itemQuery: ItemQuery<TItem, TData, TKey>;
|
|
46
|
+
/** Marks a value that is no longer available, beside its label. */
|
|
47
|
+
unavailableIcon?: ReactNode;
|
|
42
48
|
}> & ValueStateLabels);
|
|
43
49
|
export type ComboboxFieldProps<TItem, TData = TItem, TKey extends QueryKey = QueryKey> = ComboboxFieldChrome & ComboboxItems<TItem> & ComboboxDerivations<TItem> & ComboboxMode<TItem> & ComboboxItemLookup<TItem, TData, TKey>;
|
|
44
50
|
/**
|
|
@@ -59,6 +65,8 @@ export type ComboboxFieldProps<TItem, TData = TItem, TKey extends QueryKey = Que
|
|
|
59
65
|
* itemToStringLabel={user => user.name}
|
|
60
66
|
* value={reviewer}
|
|
61
67
|
* onValueChange={setReviewer}
|
|
68
|
+
* icon={<ExpandMoreIcon />}
|
|
69
|
+
* checkIcon={<CheckIcon />}
|
|
62
70
|
* {...comboboxCopy}>
|
|
63
71
|
* {user => user.name}
|
|
64
72
|
* </ComboboxField>
|