@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
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import SvgAdd from "../../vendor/@material-design-icons/svg/outlined/add.js";
|
|
2
|
-
import SvgRemove from "../../vendor/@material-design-icons/svg/outlined/remove.js";
|
|
3
1
|
import { Button } from "../button/button.js";
|
|
4
2
|
import { Field } from "../field/field.js";
|
|
5
3
|
import { fieldStateAttributes } from "../field/field-state.js";
|
|
@@ -11,10 +9,17 @@ import { InputError, InputLabel, InputPartsContext, InputPending, useInputPartsC
|
|
|
11
9
|
import { useLocale } from "../locale-provider/locale-provider.js";
|
|
12
10
|
import number_field_module_default from "./number-field.module.js";
|
|
13
11
|
import { c } from "react/compiler-runtime";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
12
|
import { clsx } from "clsx";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
14
|
import { NumberField } from "@base-ui/react/number-field";
|
|
17
15
|
// src/components/number-field/number-input.tsx
|
|
16
|
+
/**
|
|
17
|
+
* The field frame around a number input, holding its value, format and bounds
|
|
18
|
+
* and projecting its state onto every part.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <NumberInput.Root value={hours} onValueChange={setHours} optionalLabel="optional">…</NumberInput.Root>
|
|
22
|
+
*/
|
|
18
23
|
var NumberInputRoot = (t0) => {
|
|
19
24
|
const $ = c(44);
|
|
20
25
|
const { value, onValueChange, format, min, max, step, disabled, readOnly, requiredness, optionalLabel, errors, dirty, touched, pending: t1, state, name, id, className, children } = t0;
|
|
@@ -143,6 +148,12 @@ var NumberInputRoot = (t0) => {
|
|
|
143
148
|
} else t13 = $[43];
|
|
144
149
|
return t13;
|
|
145
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* The bordered box holding the control, its stepper buttons and its inlays.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* <NumberInput.Group><NumberInput.Input /></NumberInput.Group>
|
|
156
|
+
*/
|
|
146
157
|
var NumberInputGroup = (t0) => {
|
|
147
158
|
const $ = c(15);
|
|
148
159
|
let children;
|
|
@@ -193,6 +204,12 @@ var NumberInputGroup = (t0) => {
|
|
|
193
204
|
} else t3 = $[14];
|
|
194
205
|
return t3;
|
|
195
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* A slot beside the control inside the group, such as an icon.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* <NumberInput.Inlay aria-hidden="true"><EuroIcon /></NumberInput.Inlay>
|
|
212
|
+
*/
|
|
196
213
|
var NumberInputInlay = (t0) => {
|
|
197
214
|
const $ = c(8);
|
|
198
215
|
let className;
|
|
@@ -224,6 +241,12 @@ var NumberInputInlay = (t0) => {
|
|
|
224
241
|
} else t2 = $[7];
|
|
225
242
|
return t2;
|
|
226
243
|
};
|
|
244
|
+
/**
|
|
245
|
+
* Static text beside the control, such as a unit. Decoration only.
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* <NumberInput.Affix>kg</NumberInput.Affix>
|
|
249
|
+
*/
|
|
227
250
|
var NumberInputAffix = (t0) => {
|
|
228
251
|
const $ = c(8);
|
|
229
252
|
let className;
|
|
@@ -256,6 +279,12 @@ var NumberInputAffix = (t0) => {
|
|
|
256
279
|
} else t2 = $[7];
|
|
257
280
|
return t2;
|
|
258
281
|
};
|
|
282
|
+
/**
|
|
283
|
+
* The bare control, formatting and parsing `Root`'s value.
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* <NumberInput.Input aria-roledescription="Number field" />
|
|
287
|
+
*/
|
|
259
288
|
var NumberInputInput = (t0) => {
|
|
260
289
|
const $ = c(8);
|
|
261
290
|
let className;
|
|
@@ -287,9 +316,15 @@ var NumberInputInput = (t0) => {
|
|
|
287
316
|
} else t2 = $[7];
|
|
288
317
|
return t2;
|
|
289
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* The icon-only button that steps the value down.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* <NumberInput.Decrement label="Decrease"><RemoveIcon /></NumberInput.Decrement>
|
|
324
|
+
*/
|
|
290
325
|
var NumberInputDecrement = (t0) => {
|
|
291
|
-
const $ = c(
|
|
292
|
-
const { label, className } = t0;
|
|
326
|
+
const $ = c(7);
|
|
327
|
+
const { label, className, children } = t0;
|
|
293
328
|
let t1;
|
|
294
329
|
if ($[0] !== className) {
|
|
295
330
|
t1 = clsx(number_field_module_default.action, className);
|
|
@@ -302,25 +337,32 @@ var NumberInputDecrement = (t0) => {
|
|
|
302
337
|
$[2] = t2;
|
|
303
338
|
} else t2 = $[2];
|
|
304
339
|
let t3;
|
|
305
|
-
if ($[3] !==
|
|
340
|
+
if ($[3] !== children || $[4] !== label || $[5] !== t1) {
|
|
306
341
|
t3 = /* @__PURE__ */ jsx(Button, {
|
|
307
342
|
iconOnly: true,
|
|
308
|
-
icon:
|
|
343
|
+
icon: children,
|
|
309
344
|
label,
|
|
310
345
|
variant: "tertiary",
|
|
311
346
|
size: "sm",
|
|
312
347
|
className: t1,
|
|
313
348
|
render: t2
|
|
314
349
|
});
|
|
315
|
-
$[3] =
|
|
316
|
-
$[4] =
|
|
317
|
-
$[5] =
|
|
318
|
-
|
|
350
|
+
$[3] = children;
|
|
351
|
+
$[4] = label;
|
|
352
|
+
$[5] = t1;
|
|
353
|
+
$[6] = t3;
|
|
354
|
+
} else t3 = $[6];
|
|
319
355
|
return t3;
|
|
320
356
|
};
|
|
357
|
+
/**
|
|
358
|
+
* The icon-only button that steps the value up.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* <NumberInput.Increment label="Increase"><AddIcon /></NumberInput.Increment>
|
|
362
|
+
*/
|
|
321
363
|
var NumberInputIncrement = (t0) => {
|
|
322
|
-
const $ = c(
|
|
323
|
-
const { label, className } = t0;
|
|
364
|
+
const $ = c(7);
|
|
365
|
+
const { label, className, children } = t0;
|
|
324
366
|
let t1;
|
|
325
367
|
if ($[0] !== className) {
|
|
326
368
|
t1 = clsx(number_field_module_default.action, className);
|
|
@@ -333,20 +375,21 @@ var NumberInputIncrement = (t0) => {
|
|
|
333
375
|
$[2] = t2;
|
|
334
376
|
} else t2 = $[2];
|
|
335
377
|
let t3;
|
|
336
|
-
if ($[3] !==
|
|
378
|
+
if ($[3] !== children || $[4] !== label || $[5] !== t1) {
|
|
337
379
|
t3 = /* @__PURE__ */ jsx(Button, {
|
|
338
380
|
iconOnly: true,
|
|
339
|
-
icon:
|
|
381
|
+
icon: children,
|
|
340
382
|
label,
|
|
341
383
|
variant: "tertiary",
|
|
342
384
|
size: "sm",
|
|
343
385
|
className: t1,
|
|
344
386
|
render: t2
|
|
345
387
|
});
|
|
346
|
-
$[3] =
|
|
347
|
-
$[4] =
|
|
348
|
-
$[5] =
|
|
349
|
-
|
|
388
|
+
$[3] = children;
|
|
389
|
+
$[4] = label;
|
|
390
|
+
$[5] = t1;
|
|
391
|
+
$[6] = t3;
|
|
392
|
+
} else t3 = $[6];
|
|
350
393
|
return t3;
|
|
351
394
|
};
|
|
352
395
|
/**
|
|
@@ -360,9 +403,13 @@ var NumberInputIncrement = (t0) => {
|
|
|
360
403
|
* <NumberInput.Root value={hours} onValueChange={setHours} optionalLabel="optional">
|
|
361
404
|
* <NumberInput.Label>Hours</NumberInput.Label>
|
|
362
405
|
* <NumberInput.Group>
|
|
363
|
-
* <NumberInput.Decrement label="Decrease"
|
|
406
|
+
* <NumberInput.Decrement label="Decrease">
|
|
407
|
+
* <RemoveIcon />
|
|
408
|
+
* </NumberInput.Decrement>
|
|
364
409
|
* <NumberInput.Input aria-roledescription="Number field" />
|
|
365
|
-
* <NumberInput.Increment label="Increase"
|
|
410
|
+
* <NumberInput.Increment label="Increase">
|
|
411
|
+
* <AddIcon />
|
|
412
|
+
* </NumberInput.Increment>
|
|
366
413
|
* </NumberInput.Group>
|
|
367
414
|
* <NumberInput.Error />
|
|
368
415
|
* </NumberInput.Root>
|
|
@@ -8,7 +8,7 @@ export type TSFNumberFieldProps = Omit<NumberFieldProps, keyof ConnectedFieldPro
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* <form.AppField name="hours">
|
|
11
|
-
* {field => <field.NumberField label="Hours" optionalLabel="optional" decrementLabel="Decrease" incrementLabel="Increase" roleDescription="Number field" />}
|
|
11
|
+
* {field => <field.NumberField label="Hours" optionalLabel="optional" decrementLabel="Decrease" incrementLabel="Increase" decrementIcon={<RemoveIcon />} incrementIcon={<AddIcon />} roleDescription="Number field" />}
|
|
12
12
|
* </form.AppField>
|
|
13
13
|
*/
|
|
14
14
|
export declare const TSFNumberField: (props: TSFNumberFieldProps) => ReactNode;
|
|
@@ -9,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* <form.AppField name="hours">
|
|
12
|
-
* {field => <field.NumberField label="Hours" optionalLabel="optional" decrementLabel="Decrease" incrementLabel="Increase" roleDescription="Number field" />}
|
|
12
|
+
* {field => <field.NumberField label="Hours" optionalLabel="optional" decrementLabel="Decrease" incrementLabel="Increase" decrementIcon={<RemoveIcon />} incrementIcon={<AddIcon />} roleDescription="Number field" />}
|
|
13
13
|
* </form.AppField>
|
|
14
14
|
*/
|
|
15
15
|
var TSFNumberField = (props) => {
|
|
@@ -14,19 +14,44 @@ export type OtpInputRootProps = Omit<FieldProps, "label" | "description"> & OtpI
|
|
|
14
14
|
className?: string;
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
}>;
|
|
17
|
+
/**
|
|
18
|
+
* The field frame around an OTP input, holding its value and length and
|
|
19
|
+
* projecting its state onto every part.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <OtpInput.Root value={code} onValueChange={setCode} optionalLabel="optional">…</OtpInput.Root>
|
|
23
|
+
*/
|
|
17
24
|
declare const OtpInputRoot: ({ length, requiredness, optionalLabel, errors, dirty, touched, pending, state, className, children, ...base }: OtpInputRootProps) => ReactNode;
|
|
18
25
|
export type OtpInputLabelProps = InputLabelProps;
|
|
19
26
|
export type OtpInputGroupProps = Omit<BaseOTPField.Root.Props, keyof OtpInputBaseProps | "className" | "value" | "defaultValue" | "onValueChange" | "length"> & Readonly<{
|
|
20
27
|
className?: string;
|
|
21
28
|
}>;
|
|
29
|
+
/**
|
|
30
|
+
* The row of character slots, bound to `Root`'s value.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* <OtpInput.Group><OtpInput.Slots slotLabel={slotLabel} /></OtpInput.Group>
|
|
34
|
+
*/
|
|
22
35
|
declare const OtpInputGroup: ({ className, ...props }: OtpInputGroupProps) => ReactNode;
|
|
23
36
|
export type OtpInputInputProps = Omit<BaseOTPField.Input.Props, "className"> & Readonly<{
|
|
24
37
|
className?: string;
|
|
25
38
|
}>;
|
|
39
|
+
/**
|
|
40
|
+
* One character slot.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <OtpInput.Input aria-label="character 2 of 6" />
|
|
44
|
+
*/
|
|
26
45
|
declare const OtpInputInput: ({ className, ...props }: OtpInputInputProps) => ReactNode;
|
|
27
46
|
export type OtpInputSeparatorProps = Omit<BaseOTPField.Separator.Props, "className"> & Readonly<{
|
|
28
47
|
className?: string;
|
|
29
48
|
}>;
|
|
49
|
+
/**
|
|
50
|
+
* A divider between groups of slots.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* <OtpInput.Separator />
|
|
54
|
+
*/
|
|
30
55
|
declare const OtpInputSeparator: ({ className, ...props }: OtpInputSeparatorProps) => ReactNode;
|
|
31
56
|
/** Names a slot past the first by its 1-based position, such as "character 2 of 6". */
|
|
32
57
|
export type OtpSlotLabel = (index: number, total: number) => string;
|
|
@@ -6,11 +6,18 @@ import { InputError, InputLabel, InputPartsContext, InputPending } from "../fiel
|
|
|
6
6
|
import { OtpInputContext, useOtpInputContext } from "./otp-input-context.js";
|
|
7
7
|
import otp_field_module_default from "./otp-field.module.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
9
|
import { clsx } from "clsx";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
import { OTPField } from "@base-ui/react/otp-field";
|
|
12
12
|
// src/components/otp-field/otp-input.tsx
|
|
13
13
|
var DEFAULT_LENGTH = 6;
|
|
14
|
+
/**
|
|
15
|
+
* The field frame around an OTP input, holding its value and length and
|
|
16
|
+
* projecting its state onto every part.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <OtpInput.Root value={code} onValueChange={setCode} optionalLabel="optional">…</OtpInput.Root>
|
|
20
|
+
*/
|
|
14
21
|
var OtpInputRoot = (t0) => {
|
|
15
22
|
const $ = c(53);
|
|
16
23
|
let base;
|
|
@@ -173,6 +180,12 @@ var OtpInputRoot = (t0) => {
|
|
|
173
180
|
} else t14 = $[52];
|
|
174
181
|
return t14;
|
|
175
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* The row of character slots, bound to `Root`'s value.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* <OtpInput.Group><OtpInput.Slots slotLabel={slotLabel} /></OtpInput.Group>
|
|
188
|
+
*/
|
|
176
189
|
var OtpInputGroup = (t0) => {
|
|
177
190
|
const $ = c(12);
|
|
178
191
|
let className;
|
|
@@ -215,6 +228,12 @@ var OtpInputGroup = (t0) => {
|
|
|
215
228
|
} else t3 = $[11];
|
|
216
229
|
return t3;
|
|
217
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* One character slot.
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* <OtpInput.Input aria-label="character 2 of 6" />
|
|
236
|
+
*/
|
|
218
237
|
var OtpInputInput = (t0) => {
|
|
219
238
|
const $ = c(13);
|
|
220
239
|
let className;
|
|
@@ -259,6 +278,12 @@ var OtpInputInput = (t0) => {
|
|
|
259
278
|
} else t3 = $[12];
|
|
260
279
|
return t3;
|
|
261
280
|
};
|
|
281
|
+
/**
|
|
282
|
+
* A divider between groups of slots.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* <OtpInput.Separator />
|
|
286
|
+
*/
|
|
262
287
|
var OtpInputSeparator = (t0) => {
|
|
263
288
|
const $ = c(8);
|
|
264
289
|
let className;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
3
|
import { type PaginationPage } from "./pagination-context.ts";
|
|
3
4
|
export type { PaginationPage };
|
|
4
|
-
export type PaginationRootProps =
|
|
5
|
+
export type PaginationRootProps = useRender.ComponentProps<"div"> & PaginationPage & Readonly<{
|
|
5
6
|
/** The page sizes on offer. The current `pageSize` is offered alongside them when it is not one of them. */
|
|
6
7
|
pageSizes: readonly number[];
|
|
7
8
|
/** Called with the page to show, counted from 0. */
|
|
@@ -9,18 +10,39 @@ export type PaginationRootProps = ComponentPropsWithRef<"div"> & PaginationPage
|
|
|
9
10
|
/** Called with the page size picked. */
|
|
10
11
|
onPageSizeChange: (pageSize: number) => void;
|
|
11
12
|
}>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
/** Where the list stands, for the parts inside it, laid out in a row. */
|
|
14
|
+
declare const PaginationRoot: ({ pageIndex, pageCount, pageSize, pageSizes, onPageIndexChange, onPageSizeChange, render, className, ref, ...props }: PaginationRootProps) => ReactNode;
|
|
15
|
+
export type PaginationPageSizeProps = useRender.ComponentProps<"div"> & Readonly<{
|
|
16
|
+
/** The `Select` parts that pick the size, such as `Select.Label`, `Select.Trigger` and the portalled list of `Select.Items`. */
|
|
17
|
+
children: ReactNode;
|
|
16
18
|
}>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* A `Select.Root` over the page sizes, holding the `Select` parts it is given
|
|
21
|
+
* in a row. The size in effect is always on offer.
|
|
22
|
+
*/
|
|
23
|
+
declare const PaginationPageSize: ({ render, className, ref, ...props }: PaginationPageSizeProps) => ReactNode;
|
|
24
|
+
export type PaginationIndexProps = Omit<useRender.ComponentProps<"span">, "children"> & Readonly<{
|
|
19
25
|
/** What the index says, such as `Page 3 of 12`, from where the list stands. */
|
|
20
26
|
label: (page: PaginationPage) => string;
|
|
21
27
|
}>;
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
/** Which page is on screen, as a polite live region. */
|
|
29
|
+
declare const PaginationIndex: ({ label, render, className, ref, ...props }: PaginationIndexProps) => ReactElement;
|
|
30
|
+
export type PaginationStepProps = Omit<ComponentProps<"button">, "ref" | "children"> & Readonly<{
|
|
31
|
+
/** The button's name and tooltip, such as "Next page". */
|
|
32
|
+
label: string;
|
|
33
|
+
/** The glyph, such as a chevron. */
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
}>;
|
|
36
|
+
/** Goes to the first page; marked `aria-disabled`, and kept in the tab order, on the first page. */
|
|
37
|
+
declare const PaginationFirst: (props: PaginationStepProps) => ReactNode;
|
|
38
|
+
/** Goes back a page; marked `aria-disabled`, and kept in the tab order, on the first page. */
|
|
39
|
+
declare const PaginationPrevious: (props: PaginationStepProps) => ReactNode;
|
|
40
|
+
/** Goes on a page; marked `aria-disabled`, and kept in the tab order, on the last page. */
|
|
41
|
+
declare const PaginationNext: (props: PaginationStepProps) => ReactNode;
|
|
42
|
+
/** Goes to the last page; marked `aria-disabled`, and kept in the tab order, on the last page. */
|
|
43
|
+
declare const PaginationLast: (props: PaginationStepProps) => ReactNode;
|
|
44
|
+
/** The step buttons' names and glyphs. */
|
|
45
|
+
export type PaginationStepLabels = Readonly<{
|
|
24
46
|
/** The first-page button's name, such as "First page". */
|
|
25
47
|
firstLabel: string;
|
|
26
48
|
/** The previous-page button's name, such as "Previous page". */
|
|
@@ -29,32 +51,69 @@ export type PaginationControlsProps = Readonly<{
|
|
|
29
51
|
nextLabel: string;
|
|
30
52
|
/** The last-page button's name, such as "Last page". */
|
|
31
53
|
lastLabel: string;
|
|
54
|
+
/** The first-page button's glyph. */
|
|
55
|
+
firstIcon: ReactNode;
|
|
56
|
+
/** The previous-page button's glyph. */
|
|
57
|
+
previousIcon: ReactNode;
|
|
58
|
+
/** The next-page button's glyph. */
|
|
59
|
+
nextIcon: ReactNode;
|
|
60
|
+
/** The last-page button's glyph. */
|
|
61
|
+
lastIcon: ReactNode;
|
|
62
|
+
}>;
|
|
63
|
+
export type PaginationControlsProps = Omit<useRender.ComponentProps<"div">, "children"> & PaginationStepLabels;
|
|
64
|
+
/** `First`, `Previous`, `Next` and `Last` in a row. */
|
|
65
|
+
declare const PaginationControls: ({ firstLabel, previousLabel, nextLabel, lastLabel, firstIcon, previousIcon, nextIcon, lastIcon, render, className, ref, ...props }: PaginationControlsProps) => ReactElement;
|
|
66
|
+
/** What the ready-made pager says and shows, besides where the list stands. */
|
|
67
|
+
export type PaginationContentProps = PaginationStepLabels & Readonly<{
|
|
68
|
+
/** The page-size field's label, such as "Rows per page". */
|
|
69
|
+
pageSizeLabel: string;
|
|
70
|
+
/** What the index says, such as `Page 3 of 12`, from where the list stands. */
|
|
71
|
+
indexLabel: (page: PaginationPage) => string;
|
|
72
|
+
/** The mark beside the page size in effect, in the open list. */
|
|
73
|
+
checkIcon: ReactNode;
|
|
74
|
+
/** The chevron after the page size. Left out, none shows. */
|
|
75
|
+
expandIcon?: ReactNode;
|
|
32
76
|
}>;
|
|
33
|
-
|
|
34
|
-
/** The
|
|
35
|
-
|
|
77
|
+
export type PaginationProps = Omit<PaginationRootProps, "children"> & PaginationContentProps;
|
|
78
|
+
/** The page size, the index and the four step buttons, in a `Root`. */
|
|
79
|
+
declare const Prefab: ({ pageSizeLabel, indexLabel, checkIcon, expandIcon, firstLabel, previousLabel, nextLabel, lastLabel, firstIcon, previousIcon, nextIcon, lastIcon, ...props }: PaginationProps) => ReactNode;
|
|
80
|
+
/** The parts of a pagination, hanging off its prefab. */
|
|
81
|
+
export type PaginationParts = typeof Prefab & Readonly<{
|
|
36
82
|
Root: typeof PaginationRoot;
|
|
37
83
|
PageSize: typeof PaginationPageSize;
|
|
38
84
|
Index: typeof PaginationIndex;
|
|
39
85
|
Controls: typeof PaginationControls;
|
|
86
|
+
First: typeof PaginationFirst;
|
|
87
|
+
Previous: typeof PaginationPrevious;
|
|
88
|
+
Next: typeof PaginationNext;
|
|
89
|
+
Last: typeof PaginationLast;
|
|
40
90
|
}>;
|
|
41
91
|
/**
|
|
42
|
-
* The pager for a paged list, over any source:
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
92
|
+
* The pager for a paged list, over any source: the page size, which page is on
|
|
93
|
+
* screen, and buttons to the first, previous, next and last page. Its parts
|
|
94
|
+
* compose another pager: `Root` holds where the list stands, `PageSize` picks
|
|
95
|
+
* rows per page, `Index` says which page is on screen, and `Controls`, or
|
|
96
|
+
* `First`, `Previous`, `Next` and `Last` on their own, step through the pages.
|
|
46
97
|
*
|
|
47
98
|
* @example
|
|
48
|
-
* <Pagination
|
|
99
|
+
* <Pagination
|
|
49
100
|
* pageIndex={pageIndex}
|
|
50
101
|
* pageCount={pageCount}
|
|
51
102
|
* pageSize={pageSize}
|
|
52
103
|
* pageSizes={[10, 20, 50]}
|
|
53
104
|
* onPageIndexChange={setPageIndex}
|
|
54
|
-
* onPageSizeChange={setPageSize}
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
105
|
+
* onPageSizeChange={setPageSize}
|
|
106
|
+
* pageSizeLabel="Rows per page"
|
|
107
|
+
* indexLabel={page => `Page ${page.pageIndex + 1} of ${page.pageCount}`}
|
|
108
|
+
* firstLabel="First page"
|
|
109
|
+
* previousLabel="Previous page"
|
|
110
|
+
* nextLabel="Next page"
|
|
111
|
+
* lastLabel="Last page"
|
|
112
|
+
* firstIcon={<FirstPageIcon />}
|
|
113
|
+
* previousIcon={<ChevronLeftIcon />}
|
|
114
|
+
* nextIcon={<ChevronRightIcon />}
|
|
115
|
+
* lastIcon={<LastPageIcon />}
|
|
116
|
+
* checkIcon={<CheckIcon />}
|
|
117
|
+
* />
|
|
59
118
|
*/
|
|
60
119
|
export declare const Pagination: PaginationParts;
|