@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
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import SvgRestartAlt from "../../vendor/@material-design-icons/svg/outlined/restart_alt.js";
|
|
2
1
|
import { Button } from "../button/button.js";
|
|
3
2
|
import { ErrorMessage } from "../error-message/error-message.js";
|
|
4
3
|
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { ErrorBoundary } from "react-error-boundary";
|
|
7
6
|
// src/components/error-boundary/error-boundary.tsx
|
|
8
|
-
var defaultFallback = ({ title, description, icon, retryLabel }) => ({ resetErrorBoundary }) => /* @__PURE__ */ jsx(ErrorMessage, {
|
|
7
|
+
var defaultFallback = ({ title, description, icon, retryLabel, retryIcon }) => ({ resetErrorBoundary }) => /* @__PURE__ */ jsx(ErrorMessage, {
|
|
9
8
|
title,
|
|
10
9
|
description,
|
|
11
10
|
icon,
|
|
12
11
|
action: retryLabel === void 0 ? void 0 : /* @__PURE__ */ jsx(Button, {
|
|
13
12
|
variant: "primary",
|
|
14
|
-
icon:
|
|
13
|
+
icon: retryIcon,
|
|
15
14
|
onClick: () => resetErrorBoundary(),
|
|
16
15
|
children: retryLabel
|
|
17
16
|
})
|
|
@@ -7,7 +7,7 @@ export type ErrorMessageProps = StatusPresetProps;
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* <ErrorMessage
|
|
10
|
-
* title="The
|
|
10
|
+
* title="The invoices could not be loaded"
|
|
11
11
|
* description="Check your connection and try again."
|
|
12
12
|
* action={<Button onClick={refetch}>Try again</Button>}
|
|
13
13
|
* />
|
|
@@ -8,7 +8,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* <ErrorMessage
|
|
11
|
-
* title="The
|
|
11
|
+
* title="The invoices could not be loaded"
|
|
12
12
|
* description="Check your connection and try again."
|
|
13
13
|
* action={<Button onClick={refetch}>Try again</Button>}
|
|
14
14
|
* />
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useErrorCascade } from "./error-cascade.js";
|
|
2
2
|
import error_text_module_default from "./error-text.module.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { Children } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Children } from "react";
|
|
8
8
|
// src/components/error-text/error-text.tsx
|
|
9
9
|
var messagesOf = (children) => (Array.isArray(children) ? children : [children]).filter((message) => message !== null && message !== void 0 && message !== false && message !== "");
|
|
10
10
|
/**
|
|
@@ -61,10 +61,10 @@ export type InlineLabelTextProps = RequirednessProps & Readonly<{
|
|
|
61
61
|
* `fieldLabel` above the row would otherwise carry.
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* <
|
|
65
|
-
* <Checkbox
|
|
64
|
+
* <Checkbox.Label>
|
|
65
|
+
* <Checkbox.Control><Checkbox.Indicator><CheckIcon /></Checkbox.Indicator></Checkbox.Control>
|
|
66
66
|
* <Field.InlineLabelText label={label} requiredness="optional" optionalLabel="optional" />
|
|
67
|
-
* </
|
|
67
|
+
* </Checkbox.Label>
|
|
68
68
|
*/
|
|
69
69
|
declare const InlineLabelText: ({ label, fieldLabel, requiredness, optionalLabel, }: InlineLabelTextProps) => ReactNode;
|
|
70
70
|
export type FieldRootProps = BaseField.Root.Props & Readonly<{
|
|
@@ -150,9 +150,9 @@ export type FieldIds = Readonly<{
|
|
|
150
150
|
* wire `aria-labelledby` and `aria-describedby` themselves.
|
|
151
151
|
*
|
|
152
152
|
* @example
|
|
153
|
-
* const { labelId, errorId } =
|
|
153
|
+
* const { labelId, errorId } = Field.useIds();
|
|
154
154
|
*/
|
|
155
|
-
|
|
155
|
+
declare const useFieldIds: () => FieldIds;
|
|
156
156
|
/** The parts of a field. */
|
|
157
157
|
export type FieldParts = Readonly<{
|
|
158
158
|
Root: typeof FieldRoot;
|
|
@@ -4,9 +4,9 @@ import { Spinner } from "../spinner/spinner.js";
|
|
|
4
4
|
import { FieldRowContext, useFieldGroupLineIds } from "./field-group-context.js";
|
|
5
5
|
import field_module_default from "./field.module.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
-
import { useContext, useId } from "react";
|
|
8
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
7
|
import { clsx } from "clsx";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useContext, useId } from "react";
|
|
10
10
|
import { Field } from "@base-ui/react/field";
|
|
11
11
|
// src/components/field/field.tsx
|
|
12
12
|
var isEmpty = (children) => children === void 0 || children === null || children === false || children === "";
|
|
@@ -57,17 +57,17 @@ var FieldRequiredness = (t0) => {
|
|
|
57
57
|
* `fieldLabel` above the row would otherwise carry.
|
|
58
58
|
*
|
|
59
59
|
* @example
|
|
60
|
-
* <
|
|
61
|
-
* <Checkbox
|
|
60
|
+
* <Checkbox.Label>
|
|
61
|
+
* <Checkbox.Control><Checkbox.Indicator><CheckIcon /></Checkbox.Indicator></Checkbox.Control>
|
|
62
62
|
* <Field.InlineLabelText label={label} requiredness="optional" optionalLabel="optional" />
|
|
63
|
-
* </
|
|
63
|
+
* </Checkbox.Label>
|
|
64
64
|
*/
|
|
65
65
|
var InlineLabelText = (t0) => {
|
|
66
66
|
const $ = c(13);
|
|
67
67
|
const { label, fieldLabel, requiredness, optionalLabel } = t0;
|
|
68
68
|
let t1;
|
|
69
69
|
if ($[0] !== fieldLabel || $[1] !== requiredness) {
|
|
70
|
-
t1 = fieldLabel === void 0 && requiredness === "required" && /* @__PURE__ */ jsxs(Fragment
|
|
70
|
+
t1 = fieldLabel === void 0 && requiredness === "required" && /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx(RequiredMark, { requiredness })] });
|
|
71
71
|
$[0] = fieldLabel;
|
|
72
72
|
$[1] = requiredness;
|
|
73
73
|
$[2] = t1;
|
|
@@ -96,7 +96,7 @@ var InlineLabelText = (t0) => {
|
|
|
96
96
|
} else t3 = $[9];
|
|
97
97
|
let t4;
|
|
98
98
|
if ($[10] !== t2 || $[11] !== t3) {
|
|
99
|
-
t4 = /* @__PURE__ */ jsxs(Fragment
|
|
99
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
100
100
|
$[10] = t2;
|
|
101
101
|
$[11] = t3;
|
|
102
102
|
$[12] = t4;
|
|
@@ -400,7 +400,7 @@ var FieldPending = (t0) => {
|
|
|
400
400
|
* wire `aria-labelledby` and `aria-describedby` themselves.
|
|
401
401
|
*
|
|
402
402
|
* @example
|
|
403
|
-
* const { labelId, errorId } =
|
|
403
|
+
* const { labelId, errorId } = Field.useIds();
|
|
404
404
|
*/
|
|
405
405
|
var useFieldIds = () => {
|
|
406
406
|
const $ = c(10);
|
|
@@ -474,4 +474,4 @@ function _temp(lineId) {
|
|
|
474
474
|
function _temp2(part) {
|
|
475
475
|
return part !== "";
|
|
476
476
|
}
|
|
477
|
-
export { Field$1 as Field
|
|
477
|
+
export { Field$1 as Field };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Field
|
|
1
|
+
import { Field } from "./field.js";
|
|
2
2
|
import { fieldStateAttributes } from "./field-state.js";
|
|
3
3
|
import { optionsLoad } from "./options-load.js";
|
|
4
4
|
import { useFieldFocus } from "./use-field-focus.js";
|
|
5
5
|
import { useFieldState } from "./use-field-state.js";
|
|
6
|
-
export { Field, fieldStateAttributes, optionsLoad, useFieldFocus,
|
|
6
|
+
export { Field, fieldStateAttributes, optionsLoad, useFieldFocus, useFieldState };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRequiredContext } from "../../lib/use-required-context.js";
|
|
2
2
|
import { Field } from "./field.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { createContext } from "react";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { createContext } from "react";
|
|
6
6
|
// src/components/field/input-parts.tsx
|
|
7
7
|
/** The context a raw input's `Root` provides its shared parts. */
|
|
8
8
|
var InputPartsContext = createContext(null);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
export type FieldPlaceholderProps = Readonly<{
|
|
3
|
+
className?: string;
|
|
4
|
+
}>;
|
|
2
5
|
/**
|
|
3
6
|
* A field-shaped placeholder, standing in for a control whose code is still on
|
|
4
7
|
* its way. Holds the label and control heights so the form does not jump when
|
|
@@ -7,4 +10,4 @@ import { type ReactNode } from "react";
|
|
|
7
10
|
* @example
|
|
8
11
|
* <Suspense fallback={<FieldPlaceholder />}>{field}</Suspense>
|
|
9
12
|
*/
|
|
10
|
-
export declare const FieldPlaceholder: () => ReactNode;
|
|
13
|
+
export declare const FieldPlaceholder: ({ className, }: FieldPlaceholderProps) => ReactNode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Skeleton } from "../skeleton/skeleton.js";
|
|
2
2
|
import field_placeholder_module_default from "./field-placeholder.module.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useId } from "react";
|
|
6
7
|
// src/components/field-placeholder/field-placeholder.tsx
|
|
7
8
|
var SHAPES = ["single", "split"];
|
|
8
9
|
var shapeIndex = (seed, count) => {
|
|
@@ -18,37 +19,51 @@ var shapeIndex = (seed, count) => {
|
|
|
18
19
|
* @example
|
|
19
20
|
* <Suspense fallback={<FieldPlaceholder />}>{field}</Suspense>
|
|
20
21
|
*/
|
|
21
|
-
var FieldPlaceholder = () => {
|
|
22
|
-
const $ = c(
|
|
22
|
+
var FieldPlaceholder = (t0) => {
|
|
23
|
+
const $ = c(11);
|
|
24
|
+
const { className } = t0;
|
|
23
25
|
const shape = SHAPES[shapeIndex(useId(), SHAPES.length)] ?? "single";
|
|
24
|
-
let t0;
|
|
25
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
26
|
-
t0 = /* @__PURE__ */ jsx(Skeleton, { className: field_placeholder_module_default.label });
|
|
27
|
-
$[0] = t0;
|
|
28
|
-
} else t0 = $[0];
|
|
29
26
|
let t1;
|
|
30
|
-
if ($[
|
|
31
|
-
t1 =
|
|
27
|
+
if ($[0] !== className) {
|
|
28
|
+
t1 = clsx(field_placeholder_module_default.placeholder, className);
|
|
29
|
+
$[0] = className;
|
|
32
30
|
$[1] = t1;
|
|
33
31
|
} else t1 = $[1];
|
|
34
32
|
let t2;
|
|
35
|
-
if ($[2]
|
|
36
|
-
t2 =
|
|
37
|
-
$[2] =
|
|
38
|
-
|
|
39
|
-
} else t2 = $[3];
|
|
33
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
+
t2 = /* @__PURE__ */ jsx(Skeleton, { className: field_placeholder_module_default.label });
|
|
35
|
+
$[2] = t2;
|
|
36
|
+
} else t2 = $[2];
|
|
40
37
|
let t3;
|
|
41
|
-
if ($[
|
|
42
|
-
t3 = /* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
|
+
t3 = /* @__PURE__ */ jsx(Skeleton, { className: field_placeholder_module_default.control });
|
|
40
|
+
$[3] = t3;
|
|
41
|
+
} else t3 = $[3];
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[4] !== shape) {
|
|
44
|
+
t4 = shape === "split" && /* @__PURE__ */ jsx(Skeleton, { className: field_placeholder_module_default.control });
|
|
45
|
+
$[4] = shape;
|
|
46
|
+
$[5] = t4;
|
|
47
|
+
} else t4 = $[5];
|
|
48
|
+
let t5;
|
|
49
|
+
if ($[6] !== t4) {
|
|
50
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: field_placeholder_module_default.controls,
|
|
52
|
+
children: [t3, t4]
|
|
53
|
+
});
|
|
54
|
+
$[6] = t4;
|
|
55
|
+
$[7] = t5;
|
|
56
|
+
} else t5 = $[7];
|
|
57
|
+
let t6;
|
|
58
|
+
if ($[8] !== t1 || $[9] !== t5) {
|
|
59
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: t1,
|
|
61
|
+
children: [t2, t5]
|
|
48
62
|
});
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
|
|
52
|
-
|
|
63
|
+
$[8] = t1;
|
|
64
|
+
$[9] = t5;
|
|
65
|
+
$[10] = t6;
|
|
66
|
+
} else t6 = $[10];
|
|
67
|
+
return t6;
|
|
53
68
|
};
|
|
54
69
|
export { FieldPlaceholder };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeFieldErrors } from "../../lib/forms/errors.js";
|
|
2
2
|
import { Fieldset } from "./fieldset.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useId } from "react";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useId } from "react";
|
|
6
6
|
// src/components/fieldset/field-group.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Related fields side by side under one legend, with one error for all of
|
|
@@ -5,8 +5,8 @@ import { FieldGroupContext } from "../field/field-group-context.js";
|
|
|
5
5
|
import { fieldStateAttributes } from "../field/field-state.js";
|
|
6
6
|
import { useFieldState } from "../field/use-field-state.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
|
-
import { createContext, useContext, useId, useState } from "react";
|
|
9
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { createContext, useContext, useId, useState } from "react";
|
|
10
10
|
import { Fieldset } from "@base-ui/react/fieldset";
|
|
11
11
|
// src/components/fieldset/fieldset-root.tsx
|
|
12
12
|
var FieldsetContext = createContext(null);
|
|
@@ -3,8 +3,8 @@ import { FieldRowContext } from "../field/field-group-context.js";
|
|
|
3
3
|
import { FieldsetLegend, FieldsetRoot, useFieldsetContext } from "./fieldset-root.js";
|
|
4
4
|
import fieldset_module_default from "./fieldset.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
|
// src/components/fieldset/fieldset.tsx
|
|
9
9
|
var FieldsetDescription = (t0) => {
|
|
10
10
|
const $ = c(8);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._dropTarget_1ap1m_3 {
|
|
4
4
|
--field-fg: var(--sys-color-text);
|
|
5
5
|
--field-muted-fg: var(--sys-color-text-muted);
|
|
6
6
|
--field-placeholder-fg: var(--sys-color-text-placeholder);
|
|
@@ -14,33 +14,33 @@
|
|
|
14
14
|
color: var(--field-fg);
|
|
15
15
|
font: var(--sys-font-body-medium);
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
._dropTarget_1ap1m_3 {
|
|
18
18
|
outline: 0 solid var(--sys-color-focus-ring);
|
|
19
19
|
outline-offset: var(--sys-focus-ring-offset);
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
._dropTarget_1ap1m_3[data-focus-visible] {
|
|
22
22
|
outline-width: var(--sys-focus-ring-width);
|
|
23
23
|
}
|
|
24
24
|
@media not (prefers-reduced-motion) {
|
|
25
|
-
.
|
|
25
|
+
._dropTarget_1ap1m_3 {
|
|
26
26
|
transition: border-color var(--sys-motion-instant) var(--sys-motion-standard), background var(--sys-motion-instant) var(--sys-motion-standard);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
._dropTarget_1ap1m_3:hover:not([data-disabled], [data-readonly]), ._dropTarget_1ap1m_3[data-focused], ._dropTarget_1ap1m_3[data-popup-open] {
|
|
30
30
|
border-color: var(--sys-color-primary);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
._dropTarget_1ap1m_3[data-readonly] {
|
|
33
33
|
--field-fg: var(--sys-color-text);
|
|
34
34
|
border-style: dashed;
|
|
35
35
|
border-color: var(--sys-color-outline);
|
|
36
36
|
background: var(--sys-color-surface-high);
|
|
37
37
|
color: var(--field-fg);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
._dropTarget_1ap1m_3[data-pending] {
|
|
40
40
|
cursor: progress;
|
|
41
41
|
caret-color: var(--sys-color-text-muted);
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
._dropTarget_1ap1m_3[data-invalid] {
|
|
44
44
|
--field-fg: var(--sys-color-error-fg);
|
|
45
45
|
--field-muted-fg: var(--sys-color-error-fg);
|
|
46
46
|
--field-placeholder-fg: var(--sys-color-error-fg);
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
background-color: var(--sys-color-error-bg);
|
|
49
49
|
color: var(--field-fg);
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
._dropTarget_1ap1m_3[data-disabled] {
|
|
52
52
|
--field-fg: var(--sys-color-disabled-fg);
|
|
53
53
|
--field-muted-fg: var(--sys-color-disabled-fg);
|
|
54
54
|
--field-placeholder-fg: var(--sys-color-disabled-fg);
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
cursor: not-allowed;
|
|
57
57
|
background: var(--sys-color-disabled-bg);
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
._dropTarget_1ap1m_3 {
|
|
60
60
|
position: relative;
|
|
61
61
|
display: flex;
|
|
62
62
|
gap: var(--sys-unit-4);
|
|
63
63
|
}
|
|
64
|
-
.
|
|
64
|
+
._dropTarget_1ap1m_3 {
|
|
65
65
|
flex-direction: column;
|
|
66
66
|
justify-content: center;
|
|
67
67
|
gap: var(--file-field-gap, var(--sys-unit-8));
|
|
@@ -70,16 +70,16 @@
|
|
|
70
70
|
text-align: center;
|
|
71
71
|
cursor: pointer;
|
|
72
72
|
}
|
|
73
|
-
.
|
|
73
|
+
._dropTarget_1ap1m_3[data-readonly] {
|
|
74
74
|
cursor: default;
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
._dropTarget_1ap1m_3[data-drop-target] {
|
|
77
77
|
border-style: dashed;
|
|
78
78
|
border-color: var(--file-field-drop-border, var(--sys-color-primary));
|
|
79
79
|
background: var(--file-field-drop-bg, var(--sys-color-primary-container));
|
|
80
80
|
color: var(--file-field-drop-fg, var(--sys-color-on-primary-container));
|
|
81
81
|
}
|
|
82
|
-
.
|
|
82
|
+
._hint_1ap1m_82 {
|
|
83
83
|
display: inline-flex;
|
|
84
84
|
flex-direction: column;
|
|
85
85
|
align-items: center;
|
|
@@ -89,7 +89,11 @@
|
|
|
89
89
|
overflow-wrap: normal;
|
|
90
90
|
hyphens: auto;
|
|
91
91
|
}
|
|
92
|
-
.
|
|
92
|
+
._hintIcon_1ap1m_92 {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
font-size: var(--file-field-hint-icon-size, 1.5em);
|
|
95
|
+
}
|
|
96
|
+
._list_1ap1m_96 {
|
|
93
97
|
display: flex;
|
|
94
98
|
flex-direction: row;
|
|
95
99
|
flex-wrap: wrap;
|
|
@@ -18,12 +18,20 @@ export type FileFieldProps = FieldProps & Readonly<{
|
|
|
18
18
|
dropTargetLabel: string;
|
|
19
19
|
/** The prompt inside the drop target, such as "Drag files here". */
|
|
20
20
|
dropHint: string;
|
|
21
|
+
/** Drawn above `dropHint`, such as an upload icon. */
|
|
22
|
+
dropIcon?: ReactNode;
|
|
21
23
|
/** The picker button's text, such as "Choose files". */
|
|
22
24
|
chooseLabel: string;
|
|
25
|
+
/** Drawn before `chooseLabel`, such as an attach icon. */
|
|
26
|
+
chooseIcon?: ReactNode;
|
|
23
27
|
/** Accessible name of the staged files, such as "Files for attachments". */
|
|
24
28
|
filesLabel: string;
|
|
25
29
|
/** Accessible name of a tile's remove button, such as "Remove". */
|
|
26
30
|
removeLabel: string;
|
|
31
|
+
/** A tile's remove button icon, such as a cross. */
|
|
32
|
+
removeIcon: ReactNode;
|
|
33
|
+
/** Drawn on a tile that has no image preview, such as a file icon. */
|
|
34
|
+
fileIcon?: ReactNode;
|
|
27
35
|
/** A tile's tooltip, such as `` (name, size) => `${name} (${size})` ``. */
|
|
28
36
|
fileHint: (name: string, size: string) => string;
|
|
29
37
|
/** The error for a file over `maxFileSize`, given its name and the limit. */
|
|
@@ -51,9 +59,10 @@ export type FileFieldProps = FieldProps & Readonly<{
|
|
|
51
59
|
* chooseLabel="Choose files"
|
|
52
60
|
* filesLabel="Files for attachments"
|
|
53
61
|
* removeLabel="Remove"
|
|
62
|
+
* removeIcon={<CloseIcon />}
|
|
54
63
|
* fileHint={(name, size) => `${name} (${size})`}
|
|
55
64
|
* tooLargeError={(name, maxSize) => `${name} is larger than ${maxSize}.`}
|
|
56
65
|
* wrongTypeError={name => `${name} is not an accepted file type.`}
|
|
57
66
|
* />
|
|
58
67
|
*/
|
|
59
|
-
export declare const FileField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, value, onValueChange, onBlur, maxFileSize, accept, multiple, disabled, readOnly, dropTargetLabel, dropHint, chooseLabel, filesLabel, removeLabel, fileHint, tooLargeError, wrongTypeError, className, }: FileFieldProps) => ReactNode;
|
|
68
|
+
export declare const FileField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, value, onValueChange, onBlur, maxFileSize, accept, multiple, disabled, readOnly, dropTargetLabel, dropHint, dropIcon, chooseLabel, chooseIcon, filesLabel, removeLabel, removeIcon, fileIcon, fileHint, tooLargeError, wrongTypeError, className, }: FileFieldProps) => ReactNode;
|