@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,40 +1,41 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
label: string;
|
|
21
|
-
}>;
|
|
22
|
-
declare const Root: ({ className, children, }: DetailListRootProps) => ReactNode;
|
|
23
|
-
declare const Row: ({ term, action, className, children, }: DetailListRowProps) => ReactNode;
|
|
24
|
-
declare const IconRow: ({ svg, label, action, className, children, }: DetailListIconRowProps) => ReactNode;
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export type DetailListRootProps = ComponentPropsWithRef<"dl">;
|
|
3
|
+
export type DetailListRowProps = ComponentPropsWithRef<"div">;
|
|
4
|
+
export type DetailListIconRowProps = ComponentPropsWithRef<"div">;
|
|
5
|
+
export type DetailListTermProps = ComponentPropsWithRef<"dt">;
|
|
6
|
+
export type DetailListDetailProps = ComponentPropsWithRef<"dd">;
|
|
7
|
+
export type DetailListActionProps = ComponentPropsWithRef<"dd">;
|
|
8
|
+
/** The list: a `<dl>` of rows. */
|
|
9
|
+
declare const Root: ({ className, ...props }: DetailListRootProps) => ReactNode;
|
|
10
|
+
/** One row: a `Term`, its `Detail`, and an optional `Action`. The term takes a third of the row. */
|
|
11
|
+
declare const Row: ({ className, ...props }: DetailListRowProps) => ReactNode;
|
|
12
|
+
/** A row whose `Term` is a pictogram, which takes only its own width. */
|
|
13
|
+
declare const IconRow: ({ className, ...props }: DetailListIconRowProps) => ReactNode;
|
|
14
|
+
/** What the detail is, such as "Phone number", or a pictogram with that as its accessible name. */
|
|
15
|
+
declare const Term: ({ className, ...props }: DetailListTermProps) => ReactNode;
|
|
16
|
+
/** The stored information that answers the term. */
|
|
17
|
+
declare const Detail: ({ className, ...props }: DetailListDetailProps) => ReactNode;
|
|
18
|
+
/** A control at the row's end, whose label names the term it acts on. */
|
|
19
|
+
declare const Action: ({ className, ...props }: DetailListActionProps) => ReactNode;
|
|
25
20
|
type DetailListNamespace = Readonly<{
|
|
26
21
|
Root: typeof Root;
|
|
27
22
|
Row: typeof Row;
|
|
28
23
|
IconRow: typeof IconRow;
|
|
24
|
+
Term: typeof Term;
|
|
25
|
+
Detail: typeof Detail;
|
|
26
|
+
Action: typeof Action;
|
|
29
27
|
}>;
|
|
30
28
|
/**
|
|
31
29
|
* Stored information, as the terms that name it and the details that answer
|
|
32
|
-
* them, in a description list.
|
|
33
|
-
*
|
|
30
|
+
* them, in a description list. Each row groups a `Term`, its `Detail` and an
|
|
31
|
+
* optional `Action`; an `IconRow` is a row whose term is a pictogram.
|
|
34
32
|
*
|
|
35
33
|
* @example
|
|
36
34
|
* <DetailList.Root>
|
|
37
|
-
* <DetailList.Row
|
|
35
|
+
* <DetailList.Row>
|
|
36
|
+
* <DetailList.Term>Phone number</DetailList.Term>
|
|
37
|
+
* <DetailList.Detail>{client.phone}</DetailList.Detail>
|
|
38
|
+
* </DetailList.Row>
|
|
38
39
|
* </DetailList.Root>
|
|
39
40
|
*/
|
|
40
41
|
export declare const DetailList: DetailListNamespace;
|
|
@@ -1,163 +1,219 @@
|
|
|
1
|
-
import { Icon } from "../icon/icon.js";
|
|
2
1
|
import detail_list_module_default from "./detail-list.module.js";
|
|
3
2
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
3
|
import { clsx } from "clsx";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
// src/components/detail-list/detail-list.tsx
|
|
6
|
+
/** The list: a `<dl>` of rows. */
|
|
7
7
|
var Root = (t0) => {
|
|
8
|
-
const $ = c(
|
|
9
|
-
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
10
20
|
let t1;
|
|
11
|
-
if ($[
|
|
21
|
+
if ($[3] !== className) {
|
|
12
22
|
t1 = clsx(detail_list_module_default.list, className);
|
|
13
|
-
$[
|
|
14
|
-
$[
|
|
15
|
-
} else t1 = $[
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
16
26
|
let t2;
|
|
17
|
-
if ($[
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
18
28
|
t2 = /* @__PURE__ */ jsx("dl", {
|
|
19
29
|
className: t1,
|
|
20
|
-
|
|
30
|
+
...props
|
|
21
31
|
});
|
|
22
|
-
$[
|
|
23
|
-
$[
|
|
24
|
-
$[
|
|
25
|
-
} else t2 = $[
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t1;
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
26
36
|
return t2;
|
|
27
37
|
};
|
|
28
|
-
|
|
29
|
-
const $ = c(2);
|
|
30
|
-
const { action } = t0;
|
|
31
|
-
let t1;
|
|
32
|
-
if ($[0] !== action) {
|
|
33
|
-
t1 = action === void 0 ? null : /* @__PURE__ */ jsx("dd", {
|
|
34
|
-
className: detail_list_module_default.action,
|
|
35
|
-
children: action
|
|
36
|
-
});
|
|
37
|
-
$[0] = action;
|
|
38
|
-
$[1] = t1;
|
|
39
|
-
} else t1 = $[1];
|
|
40
|
-
return t1;
|
|
41
|
-
};
|
|
38
|
+
/** One row: a `Term`, its `Detail`, and an optional `Action`. The term takes a third of the row. */
|
|
42
39
|
var Row = (t0) => {
|
|
43
|
-
const $ = c(
|
|
44
|
-
|
|
40
|
+
const $ = c(8);
|
|
41
|
+
let className;
|
|
42
|
+
let props;
|
|
43
|
+
if ($[0] !== t0) {
|
|
44
|
+
({className, ...props} = t0);
|
|
45
|
+
$[0] = t0;
|
|
46
|
+
$[1] = className;
|
|
47
|
+
$[2] = props;
|
|
48
|
+
} else {
|
|
49
|
+
className = $[1];
|
|
50
|
+
props = $[2];
|
|
51
|
+
}
|
|
45
52
|
let t1;
|
|
46
|
-
if ($[
|
|
53
|
+
if ($[3] !== className) {
|
|
47
54
|
t1 = clsx(detail_list_module_default.row, className);
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
} else t1 = $[
|
|
55
|
+
$[3] = className;
|
|
56
|
+
$[4] = t1;
|
|
57
|
+
} else t1 = $[4];
|
|
51
58
|
let t2;
|
|
52
|
-
if ($[
|
|
53
|
-
t2 = /* @__PURE__ */ jsx("
|
|
54
|
-
className: detail_list_module_default.term,
|
|
55
|
-
children: term
|
|
56
|
-
});
|
|
57
|
-
$[2] = term;
|
|
58
|
-
$[3] = t2;
|
|
59
|
-
} else t2 = $[3];
|
|
60
|
-
let t3;
|
|
61
|
-
if ($[4] !== children) {
|
|
62
|
-
t3 = /* @__PURE__ */ jsx("dd", {
|
|
63
|
-
className: detail_list_module_default.detail,
|
|
64
|
-
children
|
|
65
|
-
});
|
|
66
|
-
$[4] = children;
|
|
67
|
-
$[5] = t3;
|
|
68
|
-
} else t3 = $[5];
|
|
69
|
-
let t4;
|
|
70
|
-
if ($[6] !== action) {
|
|
71
|
-
t4 = /* @__PURE__ */ jsx(ActionSlot, { action });
|
|
72
|
-
$[6] = action;
|
|
73
|
-
$[7] = t4;
|
|
74
|
-
} else t4 = $[7];
|
|
75
|
-
let t5;
|
|
76
|
-
if ($[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
|
|
77
|
-
t5 = /* @__PURE__ */ jsxs("div", {
|
|
59
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
60
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
78
61
|
className: t1,
|
|
79
|
-
|
|
80
|
-
t2,
|
|
81
|
-
t3,
|
|
82
|
-
t4
|
|
83
|
-
]
|
|
62
|
+
...props
|
|
84
63
|
});
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
} else t5 = $[12];
|
|
91
|
-
return t5;
|
|
64
|
+
$[5] = props;
|
|
65
|
+
$[6] = t1;
|
|
66
|
+
$[7] = t2;
|
|
67
|
+
} else t2 = $[7];
|
|
68
|
+
return t2;
|
|
92
69
|
};
|
|
70
|
+
/** A row whose `Term` is a pictogram, which takes only its own width. */
|
|
93
71
|
var IconRow = (t0) => {
|
|
94
|
-
const $ = c(
|
|
95
|
-
|
|
72
|
+
const $ = c(8);
|
|
73
|
+
let className;
|
|
74
|
+
let props;
|
|
75
|
+
if ($[0] !== t0) {
|
|
76
|
+
({className, ...props} = t0);
|
|
77
|
+
$[0] = t0;
|
|
78
|
+
$[1] = className;
|
|
79
|
+
$[2] = props;
|
|
80
|
+
} else {
|
|
81
|
+
className = $[1];
|
|
82
|
+
props = $[2];
|
|
83
|
+
}
|
|
96
84
|
let t1;
|
|
97
|
-
if ($[
|
|
85
|
+
if ($[3] !== className) {
|
|
98
86
|
t1 = clsx(detail_list_module_default.iconRow, className);
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
} else t1 = $[
|
|
87
|
+
$[3] = className;
|
|
88
|
+
$[4] = t1;
|
|
89
|
+
} else t1 = $[4];
|
|
90
|
+
let t2;
|
|
91
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
92
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: t1,
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
96
|
+
$[5] = props;
|
|
97
|
+
$[6] = t1;
|
|
98
|
+
$[7] = t2;
|
|
99
|
+
} else t2 = $[7];
|
|
100
|
+
return t2;
|
|
101
|
+
};
|
|
102
|
+
/** What the detail is, such as "Phone number", or a pictogram with that as its accessible name. */
|
|
103
|
+
var Term = (t0) => {
|
|
104
|
+
const $ = c(8);
|
|
105
|
+
let className;
|
|
106
|
+
let props;
|
|
107
|
+
if ($[0] !== t0) {
|
|
108
|
+
({className, ...props} = t0);
|
|
109
|
+
$[0] = t0;
|
|
110
|
+
$[1] = className;
|
|
111
|
+
$[2] = props;
|
|
112
|
+
} else {
|
|
113
|
+
className = $[1];
|
|
114
|
+
props = $[2];
|
|
115
|
+
}
|
|
116
|
+
let t1;
|
|
117
|
+
if ($[3] !== className) {
|
|
118
|
+
t1 = clsx(detail_list_module_default.term, className);
|
|
119
|
+
$[3] = className;
|
|
120
|
+
$[4] = t1;
|
|
121
|
+
} else t1 = $[4];
|
|
102
122
|
let t2;
|
|
103
|
-
if ($[
|
|
123
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
104
124
|
t2 = /* @__PURE__ */ jsx("dt", {
|
|
105
|
-
className:
|
|
106
|
-
|
|
107
|
-
svg,
|
|
108
|
-
label
|
|
109
|
-
})
|
|
125
|
+
className: t1,
|
|
126
|
+
...props
|
|
110
127
|
});
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
} else t2 = $[
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
$[5] = props;
|
|
129
|
+
$[6] = t1;
|
|
130
|
+
$[7] = t2;
|
|
131
|
+
} else t2 = $[7];
|
|
132
|
+
return t2;
|
|
133
|
+
};
|
|
134
|
+
/** The stored information that answers the term. */
|
|
135
|
+
var Detail = (t0) => {
|
|
136
|
+
const $ = c(8);
|
|
137
|
+
let className;
|
|
138
|
+
let props;
|
|
139
|
+
if ($[0] !== t0) {
|
|
140
|
+
({className, ...props} = t0);
|
|
141
|
+
$[0] = t0;
|
|
142
|
+
$[1] = className;
|
|
143
|
+
$[2] = props;
|
|
144
|
+
} else {
|
|
145
|
+
className = $[1];
|
|
146
|
+
props = $[2];
|
|
147
|
+
}
|
|
148
|
+
let t1;
|
|
149
|
+
if ($[3] !== className) {
|
|
150
|
+
t1 = clsx(detail_list_module_default.detail, className);
|
|
151
|
+
$[3] = className;
|
|
152
|
+
$[4] = t1;
|
|
153
|
+
} else t1 = $[4];
|
|
154
|
+
let t2;
|
|
155
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
156
|
+
t2 = /* @__PURE__ */ jsx("dd", {
|
|
157
|
+
className: t1,
|
|
158
|
+
...props
|
|
120
159
|
});
|
|
121
|
-
$[5] =
|
|
122
|
-
$[6] =
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
let
|
|
131
|
-
|
|
132
|
-
|
|
160
|
+
$[5] = props;
|
|
161
|
+
$[6] = t1;
|
|
162
|
+
$[7] = t2;
|
|
163
|
+
} else t2 = $[7];
|
|
164
|
+
return t2;
|
|
165
|
+
};
|
|
166
|
+
/** A control at the row's end, whose label names the term it acts on. */
|
|
167
|
+
var Action = (t0) => {
|
|
168
|
+
const $ = c(8);
|
|
169
|
+
let className;
|
|
170
|
+
let props;
|
|
171
|
+
if ($[0] !== t0) {
|
|
172
|
+
({className, ...props} = t0);
|
|
173
|
+
$[0] = t0;
|
|
174
|
+
$[1] = className;
|
|
175
|
+
$[2] = props;
|
|
176
|
+
} else {
|
|
177
|
+
className = $[1];
|
|
178
|
+
props = $[2];
|
|
179
|
+
}
|
|
180
|
+
let t1;
|
|
181
|
+
if ($[3] !== className) {
|
|
182
|
+
t1 = clsx(detail_list_module_default.action, className);
|
|
183
|
+
$[3] = className;
|
|
184
|
+
$[4] = t1;
|
|
185
|
+
} else t1 = $[4];
|
|
186
|
+
let t2;
|
|
187
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
188
|
+
t2 = /* @__PURE__ */ jsx("dd", {
|
|
133
189
|
className: t1,
|
|
134
|
-
|
|
135
|
-
t2,
|
|
136
|
-
t3,
|
|
137
|
-
t4
|
|
138
|
-
]
|
|
190
|
+
...props
|
|
139
191
|
});
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
} else t5 = $[13];
|
|
146
|
-
return t5;
|
|
192
|
+
$[5] = props;
|
|
193
|
+
$[6] = t1;
|
|
194
|
+
$[7] = t2;
|
|
195
|
+
} else t2 = $[7];
|
|
196
|
+
return t2;
|
|
147
197
|
};
|
|
148
198
|
/**
|
|
149
199
|
* Stored information, as the terms that name it and the details that answer
|
|
150
|
-
* them, in a description list.
|
|
151
|
-
*
|
|
200
|
+
* them, in a description list. Each row groups a `Term`, its `Detail` and an
|
|
201
|
+
* optional `Action`; an `IconRow` is a row whose term is a pictogram.
|
|
152
202
|
*
|
|
153
203
|
* @example
|
|
154
204
|
* <DetailList.Root>
|
|
155
|
-
* <DetailList.Row
|
|
205
|
+
* <DetailList.Row>
|
|
206
|
+
* <DetailList.Term>Phone number</DetailList.Term>
|
|
207
|
+
* <DetailList.Detail>{client.phone}</DetailList.Detail>
|
|
208
|
+
* </DetailList.Row>
|
|
156
209
|
* </DetailList.Root>
|
|
157
210
|
*/
|
|
158
211
|
var DetailList = {
|
|
159
212
|
Root,
|
|
160
213
|
Row,
|
|
161
|
-
IconRow
|
|
214
|
+
IconRow,
|
|
215
|
+
Term,
|
|
216
|
+
Detail,
|
|
217
|
+
Action
|
|
162
218
|
};
|
|
163
219
|
export { DetailList };
|
|
@@ -1,26 +1,49 @@
|
|
|
1
1
|
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
2
2
|
import type { ComponentProps, ReactNode } from "react";
|
|
3
3
|
import { type CloseButtonProps } from "../button/close-button.tsx";
|
|
4
|
+
export type DialogRootProps<Payload = unknown> = Omit<BaseDialog.Root.Props<Payload>, "open" | "defaultOpen" | "onOpenChange" | "modal" | "children"> & Readonly<{
|
|
5
|
+
/** Whether the dialog is open. Leave it out for a dialog that keeps its own state. */
|
|
6
|
+
open?: boolean;
|
|
7
|
+
/** Whether the dialog starts open, when it keeps its own state. @default false */
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
/** Called with the new open state when the dialog opens or closes. */
|
|
10
|
+
onOpenChange?: BaseDialog.Root.Props<Payload>["onOpenChange"];
|
|
11
|
+
/** Whether focus stays inside the dialog and the page behind it is inert while it is open. @default true */
|
|
12
|
+
modal?: BaseDialog.Root.Props<Payload>["modal"];
|
|
13
|
+
/** The trigger and the dialog's content. */
|
|
14
|
+
children?: BaseDialog.Root.Props<Payload>["children"];
|
|
15
|
+
}>;
|
|
16
|
+
/** Holds the dialog's open state for its parts. It renders no element of its own. */
|
|
17
|
+
declare const Root: <Payload>(props: DialogRootProps<Payload>) => ReactNode;
|
|
18
|
+
/** The dimmed layer behind a modal dialog. */
|
|
4
19
|
declare const Backdrop: ({ className, ...props }: ComponentProps<typeof BaseDialog.Backdrop>) => ReactNode;
|
|
20
|
+
/** The dialog's surface. */
|
|
5
21
|
declare const Popup: ({ className, ...props }: ComponentProps<typeof BaseDialog.Popup>) => ReactNode;
|
|
22
|
+
/** The dialog's heading, which names it. */
|
|
6
23
|
declare const Title: ({ className, ...props }: ComponentProps<typeof BaseDialog.Title>) => ReactNode;
|
|
7
|
-
export type DialogHeaderProps =
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
className?: string;
|
|
10
|
-
}>;
|
|
24
|
+
export type DialogHeaderProps = ComponentProps<"div">;
|
|
11
25
|
/** The title's line. Put a `Dialog.CloseButton` in it to trail a way out. */
|
|
12
|
-
declare const Header: ({
|
|
13
|
-
export type DialogCloseButtonProps = Pick<CloseButtonProps, "closeLabel">;
|
|
14
|
-
/** The icon-only way out, for a header or a footer
|
|
15
|
-
declare const CloseButton: ({ closeLabel, }: DialogCloseButtonProps) => ReactNode;
|
|
26
|
+
declare const Header: ({ className, ...props }: DialogHeaderProps) => ReactNode;
|
|
27
|
+
export type DialogCloseButtonProps = Pick<CloseButtonProps, "closeLabel" | "icon">;
|
|
28
|
+
/** The icon-only way out, for a header or a footer, drawn with the app's `icon`. */
|
|
29
|
+
declare const CloseButton: ({ closeLabel, icon, }: DialogCloseButtonProps) => ReactNode;
|
|
30
|
+
export type DialogContentProps = ComponentProps<typeof BaseDialog.Popup> & Readonly<{
|
|
31
|
+
/** The element the dialog is portalled into. @default document.body */
|
|
32
|
+
container?: BaseDialog.Portal.Props["container"];
|
|
33
|
+
}>;
|
|
34
|
+
/** `Portal`, `Backdrop` and `Popup` in one: the dialog's surface, above the page. */
|
|
35
|
+
declare const Content: ({ container, ...props }: DialogContentProps) => ReactNode;
|
|
36
|
+
/** The dialog's content, scrolling when it outgrows the surface. */
|
|
16
37
|
declare const Body: ({ className, ...props }: ComponentProps<"div">) => ReactNode;
|
|
38
|
+
/** The row the dialog's actions sit on. */
|
|
17
39
|
declare const Footer: ({ className, ...props }: ComponentProps<"div">) => ReactNode;
|
|
18
40
|
type DialogParts = Readonly<{
|
|
19
|
-
Root: typeof
|
|
41
|
+
Root: typeof Root;
|
|
20
42
|
Trigger: typeof BaseDialog.Trigger;
|
|
21
43
|
Portal: typeof BaseDialog.Portal;
|
|
22
44
|
Backdrop: typeof Backdrop;
|
|
23
45
|
Popup: typeof Popup;
|
|
46
|
+
Content: typeof Content;
|
|
24
47
|
Title: typeof Title;
|
|
25
48
|
Description: typeof BaseDialog.Description;
|
|
26
49
|
Close: typeof BaseDialog.Close;
|
|
@@ -31,28 +54,25 @@ type DialogParts = Readonly<{
|
|
|
31
54
|
createHandle: typeof BaseDialog.createHandle;
|
|
32
55
|
}>;
|
|
33
56
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
57
|
+
* A dialog over base-ui's `Dialog`, in `Header`, `Body` and `Footer` regions.
|
|
58
|
+
* `Content` bundles the portal, backdrop and popup; the unbundled parts stay.
|
|
36
59
|
*
|
|
37
60
|
* @example
|
|
38
61
|
* <Dialog.Root>
|
|
39
62
|
* <Dialog.Trigger>Edit</Dialog.Trigger>
|
|
40
|
-
* <Dialog.
|
|
41
|
-
* <Dialog.
|
|
42
|
-
*
|
|
43
|
-
* <Dialog.
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* </Dialog.
|
|
50
|
-
* <
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* </Dialog.Footer>
|
|
54
|
-
* </Dialog.Popup>
|
|
55
|
-
* </Dialog.Portal>
|
|
63
|
+
* <Dialog.Content>
|
|
64
|
+
* <Dialog.Header>
|
|
65
|
+
* <Dialog.Title>Discard changes?</Dialog.Title>
|
|
66
|
+
* <Dialog.CloseButton closeLabel="Close" icon={<CloseIcon />} />
|
|
67
|
+
* </Dialog.Header>
|
|
68
|
+
* <Dialog.Body>
|
|
69
|
+
* <Dialog.Description>Your edits will be lost.</Dialog.Description>
|
|
70
|
+
* </Dialog.Body>
|
|
71
|
+
* <Dialog.Footer>
|
|
72
|
+
* <Dialog.Close>Keep editing</Dialog.Close>
|
|
73
|
+
* <button onClick={discard}>Discard</button>
|
|
74
|
+
* </Dialog.Footer>
|
|
75
|
+
* </Dialog.Content>
|
|
56
76
|
* </Dialog.Root>
|
|
57
77
|
*/
|
|
58
78
|
export declare const Dialog: DialogParts;
|