@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,84 +1,201 @@
|
|
|
1
|
-
import SvgClose from "../../vendor/@material-design-icons/svg/outlined/close.js";
|
|
2
1
|
import { Button as Button$1 } from "../button/button.js";
|
|
3
2
|
import { AttachmentPreview, useAttachmentPreview } from "./attachment-preview.js";
|
|
4
3
|
import attachment_tile_module_default from "./attachment-tile.module.js";
|
|
5
4
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
6
|
import { clsx } from "clsx";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useId } from "react";
|
|
9
9
|
import { Button, Tag } from "react-aria-components";
|
|
10
10
|
// src/components/attachment-tile/attachment-tile.tsx
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* remove button in the corner. Removal is owned by the surrounding `TagGroup`.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* <AttachmentTile id={id} file={file} hint={hint} removeLabel={label} invalid={false} disabled={false} />
|
|
12
|
+
* The square frame of a tile. Render it as react-aria's `Tag` inside a
|
|
13
|
+
* `TagList` for a staged file, or as an `<a>` for a download.
|
|
18
14
|
*/
|
|
19
|
-
var
|
|
20
|
-
const $ = c(
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
var Root = (t0) => {
|
|
16
|
+
const $ = c(16);
|
|
17
|
+
let className;
|
|
18
|
+
let props;
|
|
19
|
+
let ref;
|
|
20
|
+
let render;
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({invalid: t1, className, render, ref, ...props} = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = className;
|
|
26
|
+
$[2] = props;
|
|
27
|
+
$[3] = ref;
|
|
28
|
+
$[4] = render;
|
|
29
|
+
$[5] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
className = $[1];
|
|
32
|
+
props = $[2];
|
|
33
|
+
ref = $[3];
|
|
34
|
+
render = $[4];
|
|
35
|
+
t1 = $[5];
|
|
36
|
+
}
|
|
37
|
+
const invalid = t1 === void 0 ? false : t1;
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[6] !== className) {
|
|
40
|
+
t2 = clsx(attachment_tile_module_default.tile, className);
|
|
41
|
+
$[6] = className;
|
|
42
|
+
$[7] = t2;
|
|
43
|
+
} else t2 = $[7];
|
|
44
|
+
const t3 = invalid || void 0;
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[8] !== props || $[9] !== t2 || $[10] !== t3) {
|
|
47
|
+
t4 = {
|
|
48
|
+
...props,
|
|
49
|
+
className: t2,
|
|
50
|
+
"data-invalid": t3
|
|
51
|
+
};
|
|
52
|
+
$[8] = props;
|
|
53
|
+
$[9] = t2;
|
|
54
|
+
$[10] = t3;
|
|
55
|
+
$[11] = t4;
|
|
56
|
+
} else t4 = $[11];
|
|
57
|
+
let t5;
|
|
58
|
+
if ($[12] !== ref || $[13] !== render || $[14] !== t4) {
|
|
59
|
+
t5 = {
|
|
60
|
+
defaultTagName: "span",
|
|
61
|
+
render,
|
|
62
|
+
ref,
|
|
63
|
+
props: t4
|
|
64
|
+
};
|
|
65
|
+
$[12] = ref;
|
|
66
|
+
$[13] = render;
|
|
67
|
+
$[14] = t4;
|
|
68
|
+
$[15] = t5;
|
|
69
|
+
} else t5 = $[15];
|
|
70
|
+
return useRender(t5);
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* The pointer-only remove button in a staged tile's corner, its children the
|
|
74
|
+
* glyph. The surrounding `TagGroup` owns the removal, and the keyboard removes
|
|
75
|
+
* with Delete.
|
|
76
|
+
*/
|
|
77
|
+
var Remove = (t0) => {
|
|
78
|
+
const $ = c(11);
|
|
79
|
+
const { label, children, className } = t0;
|
|
23
80
|
const removeId = useId();
|
|
24
|
-
|
|
81
|
+
let t1;
|
|
82
|
+
if ($[0] !== className) {
|
|
83
|
+
t1 = clsx(attachment_tile_module_default.remove, className);
|
|
84
|
+
$[0] = className;
|
|
85
|
+
$[1] = t1;
|
|
86
|
+
} else t1 = $[1];
|
|
25
87
|
let t2;
|
|
26
|
-
if ($[
|
|
27
|
-
t2 = /* @__PURE__ */ jsx(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
88
|
+
if ($[2] !== removeId) {
|
|
89
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
90
|
+
slot: "remove",
|
|
91
|
+
id: removeId,
|
|
92
|
+
"aria-labelledby": removeId,
|
|
93
|
+
excludeFromTabOrder: true
|
|
32
94
|
});
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
|
|
36
|
-
$[3] = preview.src;
|
|
37
|
-
$[4] = t2;
|
|
38
|
-
} else t2 = $[4];
|
|
95
|
+
$[2] = removeId;
|
|
96
|
+
$[3] = t2;
|
|
97
|
+
} else t2 = $[3];
|
|
39
98
|
let t3;
|
|
40
|
-
if ($[5] !==
|
|
41
|
-
t3 =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
label: removeLabel,
|
|
49
|
-
render: /* @__PURE__ */ jsx(Button, {
|
|
50
|
-
slot: "remove",
|
|
51
|
-
id: removeId,
|
|
52
|
-
"aria-labelledby": removeId,
|
|
53
|
-
excludeFromTabOrder: true
|
|
54
|
-
})
|
|
55
|
-
})
|
|
99
|
+
if ($[4] !== children || $[5] !== label || $[6] !== t2) {
|
|
100
|
+
t3 = /* @__PURE__ */ jsx(Button$1, {
|
|
101
|
+
variant: "tertiary",
|
|
102
|
+
size: "sm",
|
|
103
|
+
iconOnly: true,
|
|
104
|
+
icon: children,
|
|
105
|
+
label,
|
|
106
|
+
render: t2
|
|
56
107
|
});
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
108
|
+
$[4] = children;
|
|
109
|
+
$[5] = label;
|
|
110
|
+
$[6] = t2;
|
|
59
111
|
$[7] = t3;
|
|
60
112
|
} else t3 = $[7];
|
|
61
113
|
let t4;
|
|
62
|
-
if ($[8] !==
|
|
63
|
-
t4 = /* @__PURE__ */
|
|
114
|
+
if ($[8] !== t1 || $[9] !== t3) {
|
|
115
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
116
|
+
className: t1,
|
|
117
|
+
children: t3
|
|
118
|
+
});
|
|
119
|
+
$[8] = t1;
|
|
120
|
+
$[9] = t3;
|
|
121
|
+
$[10] = t4;
|
|
122
|
+
} else t4 = $[10];
|
|
123
|
+
return t4;
|
|
124
|
+
};
|
|
125
|
+
var Prefab = (t0) => {
|
|
126
|
+
const $ = c(19);
|
|
127
|
+
const { id, file, hint, removeLabel, removeIcon, invalid, disabled, icon, className } = t0;
|
|
128
|
+
const preview = useAttachmentPreview(file);
|
|
129
|
+
let t1;
|
|
130
|
+
if ($[0] !== disabled || $[1] !== file.name || $[2] !== id) {
|
|
131
|
+
t1 = /* @__PURE__ */ jsx(Tag, {
|
|
64
132
|
id,
|
|
65
133
|
textValue: file.name,
|
|
66
|
-
isDisabled: disabled
|
|
67
|
-
|
|
68
|
-
|
|
134
|
+
isDisabled: disabled
|
|
135
|
+
});
|
|
136
|
+
$[0] = disabled;
|
|
137
|
+
$[1] = file.name;
|
|
138
|
+
$[2] = id;
|
|
139
|
+
$[3] = t1;
|
|
140
|
+
} else t1 = $[3];
|
|
141
|
+
let t2;
|
|
142
|
+
if ($[4] !== file.name || $[5] !== hint || $[6] !== icon || $[7] !== preview.pending || $[8] !== preview.src) {
|
|
143
|
+
t2 = /* @__PURE__ */ jsx(AttachmentPreview, {
|
|
144
|
+
name: file.name,
|
|
145
|
+
hint,
|
|
146
|
+
src: preview.src,
|
|
147
|
+
pending: preview.pending,
|
|
148
|
+
icon
|
|
149
|
+
});
|
|
150
|
+
$[4] = file.name;
|
|
151
|
+
$[5] = hint;
|
|
152
|
+
$[6] = icon;
|
|
153
|
+
$[7] = preview.pending;
|
|
154
|
+
$[8] = preview.src;
|
|
155
|
+
$[9] = t2;
|
|
156
|
+
} else t2 = $[9];
|
|
157
|
+
let t3;
|
|
158
|
+
if ($[10] !== removeIcon || $[11] !== removeLabel) {
|
|
159
|
+
t3 = removeLabel === void 0 ? null : /* @__PURE__ */ jsx(Remove, {
|
|
160
|
+
label: removeLabel,
|
|
161
|
+
children: removeIcon
|
|
162
|
+
});
|
|
163
|
+
$[10] = removeIcon;
|
|
164
|
+
$[11] = removeLabel;
|
|
165
|
+
$[12] = t3;
|
|
166
|
+
} else t3 = $[12];
|
|
167
|
+
let t4;
|
|
168
|
+
if ($[13] !== className || $[14] !== invalid || $[15] !== t1 || $[16] !== t2 || $[17] !== t3) {
|
|
169
|
+
t4 = /* @__PURE__ */ jsxs(Root, {
|
|
170
|
+
invalid,
|
|
171
|
+
className,
|
|
172
|
+
render: t1,
|
|
69
173
|
children: [t2, t3]
|
|
70
174
|
});
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
|
|
78
|
-
} else t4 = $[14];
|
|
175
|
+
$[13] = className;
|
|
176
|
+
$[14] = invalid;
|
|
177
|
+
$[15] = t1;
|
|
178
|
+
$[16] = t2;
|
|
179
|
+
$[17] = t3;
|
|
180
|
+
$[18] = t4;
|
|
181
|
+
} else t4 = $[18];
|
|
79
182
|
return t4;
|
|
80
183
|
};
|
|
81
184
|
/**
|
|
185
|
+
* A single staged attachment as a square thumbnail inside a `TagList`: an image
|
|
186
|
+
* preview where the file is one, its extension otherwise, and a pointer-only
|
|
187
|
+
* remove button in the corner. Removal is owned by the surrounding `TagGroup`.
|
|
188
|
+
* The parts hanging off it compose a tile by hand.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* <AttachmentTile id={id} file={file} hint={hint} removeLabel="Remove" removeIcon={<CloseIcon />} invalid={false} disabled={false} />
|
|
192
|
+
*/
|
|
193
|
+
var AttachmentTile = Object.assign(Prefab, {
|
|
194
|
+
Root,
|
|
195
|
+
Preview: AttachmentPreview,
|
|
196
|
+
Remove
|
|
197
|
+
});
|
|
198
|
+
/**
|
|
82
199
|
* An attachment on a message that has been sent: the tile the composer stages,
|
|
83
200
|
* without the remove button, and as a download of the stored file once there is
|
|
84
201
|
* one.
|
|
@@ -87,40 +204,47 @@ var AttachmentTile = (t0) => {
|
|
|
87
204
|
* <SentAttachmentTile name="nota.pdf" hint="nota.pdf (12 kB)" src={url} href={url} label="Download nota.pdf" />
|
|
88
205
|
*/
|
|
89
206
|
var SentAttachmentTile = (props) => {
|
|
90
|
-
const $ = c(
|
|
207
|
+
const $ = c(14);
|
|
91
208
|
let t0;
|
|
92
|
-
if ($[0] !== props.
|
|
93
|
-
t0 = /* @__PURE__ */ jsx(
|
|
209
|
+
if ($[0] !== props.href || $[1] !== props.label || $[2] !== props.name) {
|
|
210
|
+
t0 = props.href === void 0 ? void 0 : /* @__PURE__ */ jsx("a", {
|
|
211
|
+
href: props.href,
|
|
212
|
+
download: props.name,
|
|
213
|
+
"aria-label": props.label
|
|
214
|
+
});
|
|
215
|
+
$[0] = props.href;
|
|
216
|
+
$[1] = props.label;
|
|
217
|
+
$[2] = props.name;
|
|
218
|
+
$[3] = t0;
|
|
219
|
+
} else t0 = $[3];
|
|
220
|
+
let t1;
|
|
221
|
+
if ($[4] !== props.hint || $[5] !== props.icon || $[6] !== props.name || $[7] !== props.pending || $[8] !== props.src) {
|
|
222
|
+
t1 = /* @__PURE__ */ jsx(AttachmentPreview, {
|
|
94
223
|
name: props.name,
|
|
95
224
|
hint: props.hint,
|
|
96
225
|
src: props.src,
|
|
97
|
-
pending: props.pending
|
|
226
|
+
pending: props.pending,
|
|
227
|
+
icon: props.icon
|
|
98
228
|
});
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
} else t0 = $[4];
|
|
105
|
-
const preview = t0;
|
|
106
|
-
let t1;
|
|
107
|
-
if ($[5] !== preview || $[6] !== props.href || $[7] !== props.label || $[8] !== props.name) {
|
|
108
|
-
t1 = props.href === void 0 ? /* @__PURE__ */ jsx("span", {
|
|
109
|
-
className: attachment_tile_module_default.tile,
|
|
110
|
-
children: preview
|
|
111
|
-
}) : /* @__PURE__ */ jsx("a", {
|
|
112
|
-
className: clsx(attachment_tile_module_default.tile, attachment_tile_module_default.link),
|
|
113
|
-
href: props.href,
|
|
114
|
-
download: props.name,
|
|
115
|
-
"aria-label": props.label,
|
|
116
|
-
children: preview
|
|
117
|
-
});
|
|
118
|
-
$[5] = preview;
|
|
119
|
-
$[6] = props.href;
|
|
120
|
-
$[7] = props.label;
|
|
121
|
-
$[8] = props.name;
|
|
229
|
+
$[4] = props.hint;
|
|
230
|
+
$[5] = props.icon;
|
|
231
|
+
$[6] = props.name;
|
|
232
|
+
$[7] = props.pending;
|
|
233
|
+
$[8] = props.src;
|
|
122
234
|
$[9] = t1;
|
|
123
235
|
} else t1 = $[9];
|
|
124
|
-
|
|
236
|
+
let t2;
|
|
237
|
+
if ($[10] !== props.className || $[11] !== t0 || $[12] !== t1) {
|
|
238
|
+
t2 = /* @__PURE__ */ jsx(Root, {
|
|
239
|
+
className: props.className,
|
|
240
|
+
render: t0,
|
|
241
|
+
children: t1
|
|
242
|
+
});
|
|
243
|
+
$[10] = props.className;
|
|
244
|
+
$[11] = t0;
|
|
245
|
+
$[12] = t1;
|
|
246
|
+
$[13] = t2;
|
|
247
|
+
} else t2 = $[13];
|
|
248
|
+
return t2;
|
|
125
249
|
};
|
|
126
250
|
export { AttachmentTile, SentAttachmentTile };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import './attachment-tile.css';// src/components/attachment-tile/attachment-tile.module.scss
|
|
2
|
-
var tile = "
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var extension = "
|
|
8
|
-
var name = "
|
|
9
|
-
var remove = "
|
|
2
|
+
var tile = "_tile_gqsrq_3";
|
|
3
|
+
var preview = "_preview_gqsrq_48";
|
|
4
|
+
var image = "_image_gqsrq_59";
|
|
5
|
+
var imageSkeleton = "_imageSkeleton_gqsrq_64";
|
|
6
|
+
var icon = "_icon_gqsrq_71";
|
|
7
|
+
var extension = "_extension_gqsrq_80";
|
|
8
|
+
var name = "_name_gqsrq_84";
|
|
9
|
+
var remove = "_remove_gqsrq_92";
|
|
10
10
|
var attachment_tile_module_default = {
|
|
11
11
|
tile,
|
|
12
|
-
link,
|
|
13
12
|
preview,
|
|
14
13
|
image,
|
|
15
14
|
imageSkeleton,
|
|
15
|
+
icon,
|
|
16
16
|
extension,
|
|
17
17
|
name,
|
|
18
18
|
remove
|
|
19
19
|
};
|
|
20
|
-
export { attachment_tile_module_default as default, extension, image, imageSkeleton,
|
|
20
|
+
export { attachment_tile_module_default as default, extension, icon, image, imageSkeleton, name, preview, remove, tile };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { type AttachmentPreviewProps, type AttachmentPreviewSource, useAttachmentPreview, } from "./attachment-preview.tsx";
|
|
2
2
|
export * from "./attachment-tile.tsx";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAttachmentPreview } from "./attachment-preview.js";
|
|
2
2
|
import { AttachmentTile, SentAttachmentTile } from "./attachment-tile.js";
|
|
3
|
-
export {
|
|
3
|
+
export { AttachmentTile, SentAttachmentTile, useAttachmentPreview };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
export type AvatarProps = Readonly<{
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export type AvatarProps = Omit<ComponentPropsWithRef<"span">, "children"> & Readonly<{
|
|
3
3
|
/** Display name; drives the initials and the (stable) tone. */
|
|
4
4
|
name: string;
|
|
5
5
|
/** Portrait to show in place of the initials, where there is one. */
|
|
6
6
|
src?: string;
|
|
7
7
|
/** Diameter relative to the surrounding font size (in `em`). @default 2.5 */
|
|
8
8
|
size?: number;
|
|
9
|
-
className?: string;
|
|
10
9
|
}>;
|
|
11
10
|
/**
|
|
12
11
|
* A small circular avatar: the portrait at `src`, falling back to initials over
|
|
13
12
|
* a colour that stays the same for the same name. Decorative: the name it
|
|
14
|
-
* stands for is always beside it, so it is not announced.
|
|
13
|
+
* stands for is always beside it, so it is not announced. Other props go to
|
|
14
|
+
* the `<span>`.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* <Avatar name="Ada Lovelace" src={colleague.portraitUrl} />
|
|
18
18
|
*/
|
|
19
|
-
export declare const Avatar: ({ name, src, size, className, }: AvatarProps) => ReactNode;
|
|
19
|
+
export declare const Avatar: ({ name, src, size, className, style: inlineStyle, ...props }: AvatarProps) => ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import avatar_module_default from "./avatar.module.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Avatar } from "@base-ui/react/avatar";
|
|
6
6
|
// src/components/avatar/avatar.tsx
|
|
7
7
|
var TONE_COUNT = 5;
|
|
@@ -20,79 +20,106 @@ var toneOf = (name) => {
|
|
|
20
20
|
/**
|
|
21
21
|
* A small circular avatar: the portrait at `src`, falling back to initials over
|
|
22
22
|
* a colour that stays the same for the same name. Decorative: the name it
|
|
23
|
-
* stands for is always beside it, so it is not announced.
|
|
23
|
+
* stands for is always beside it, so it is not announced. Other props go to
|
|
24
|
+
* the `<span>`.
|
|
24
25
|
*
|
|
25
26
|
* @example
|
|
26
27
|
* <Avatar name="Ada Lovelace" src={colleague.portraitUrl} />
|
|
27
28
|
*/
|
|
28
29
|
var Avatar$1 = (t0) => {
|
|
29
|
-
const $ = c(
|
|
30
|
-
|
|
30
|
+
const $ = c(27);
|
|
31
|
+
let className;
|
|
32
|
+
let inlineStyle;
|
|
33
|
+
let name;
|
|
34
|
+
let props;
|
|
35
|
+
let src;
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[0] !== t0) {
|
|
38
|
+
({name, src, size: t1, className, style: inlineStyle, ...props} = t0);
|
|
39
|
+
$[0] = t0;
|
|
40
|
+
$[1] = className;
|
|
41
|
+
$[2] = inlineStyle;
|
|
42
|
+
$[3] = name;
|
|
43
|
+
$[4] = props;
|
|
44
|
+
$[5] = src;
|
|
45
|
+
$[6] = t1;
|
|
46
|
+
} else {
|
|
47
|
+
className = $[1];
|
|
48
|
+
inlineStyle = $[2];
|
|
49
|
+
name = $[3];
|
|
50
|
+
props = $[4];
|
|
51
|
+
src = $[5];
|
|
52
|
+
t1 = $[6];
|
|
53
|
+
}
|
|
31
54
|
const size = t1 === void 0 ? 2.5 : t1;
|
|
32
55
|
let t2;
|
|
33
|
-
if ($[
|
|
56
|
+
if ($[7] !== className) {
|
|
34
57
|
t2 = clsx(avatar_module_default.avatar, className);
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
} else t2 = $[
|
|
58
|
+
$[7] = className;
|
|
59
|
+
$[8] = t2;
|
|
60
|
+
} else t2 = $[8];
|
|
38
61
|
const t3 = `${size * INITIALS_RATIO}em`;
|
|
39
62
|
let t4;
|
|
40
|
-
if ($[
|
|
63
|
+
if ($[9] !== inlineStyle || $[10] !== t3) {
|
|
41
64
|
t4 = {
|
|
42
65
|
fontSize: t3,
|
|
43
66
|
inlineSize: `${1 / INITIALS_RATIO}em`,
|
|
44
|
-
blockSize: `${1 / INITIALS_RATIO}em
|
|
67
|
+
blockSize: `${1 / INITIALS_RATIO}em`,
|
|
68
|
+
...inlineStyle
|
|
45
69
|
};
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
|
|
70
|
+
$[9] = inlineStyle;
|
|
71
|
+
$[10] = t3;
|
|
72
|
+
$[11] = t4;
|
|
73
|
+
} else t4 = $[11];
|
|
49
74
|
let t5;
|
|
50
|
-
if ($[
|
|
75
|
+
if ($[12] !== name) {
|
|
51
76
|
t5 = toneOf(name);
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
} else t5 = $[
|
|
77
|
+
$[12] = name;
|
|
78
|
+
$[13] = t5;
|
|
79
|
+
} else t5 = $[13];
|
|
55
80
|
let t6;
|
|
56
|
-
if ($[
|
|
81
|
+
if ($[14] !== src) {
|
|
57
82
|
t6 = src === void 0 ? null : /* @__PURE__ */ jsx(Avatar.Image, {
|
|
58
83
|
src,
|
|
59
84
|
alt: "",
|
|
60
85
|
className: avatar_module_default.image
|
|
61
86
|
});
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
} else t6 = $[
|
|
87
|
+
$[14] = src;
|
|
88
|
+
$[15] = t6;
|
|
89
|
+
} else t6 = $[15];
|
|
65
90
|
let t7;
|
|
66
|
-
if ($[
|
|
91
|
+
if ($[16] !== name) {
|
|
67
92
|
t7 = initialsOf(name);
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
} else t7 = $[
|
|
93
|
+
$[16] = name;
|
|
94
|
+
$[17] = t7;
|
|
95
|
+
} else t7 = $[17];
|
|
71
96
|
let t8;
|
|
72
|
-
if ($[
|
|
97
|
+
if ($[18] !== t7) {
|
|
73
98
|
t8 = /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
74
99
|
className: avatar_module_default.fallback,
|
|
75
100
|
children: t7
|
|
76
101
|
});
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
} else t8 = $[
|
|
102
|
+
$[18] = t7;
|
|
103
|
+
$[19] = t8;
|
|
104
|
+
} else t8 = $[19];
|
|
80
105
|
let t9;
|
|
81
|
-
if ($[
|
|
106
|
+
if ($[20] !== props || $[21] !== t2 || $[22] !== t4 || $[23] !== t5 || $[24] !== t6 || $[25] !== t8) {
|
|
82
107
|
t9 = /* @__PURE__ */ jsxs(Avatar.Root, {
|
|
108
|
+
...props,
|
|
83
109
|
className: t2,
|
|
84
110
|
style: t4,
|
|
85
111
|
"data-tone": t5,
|
|
86
112
|
"aria-hidden": "true",
|
|
87
113
|
children: [t6, t8]
|
|
88
114
|
});
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
|
|
115
|
+
$[20] = props;
|
|
116
|
+
$[21] = t2;
|
|
117
|
+
$[22] = t4;
|
|
118
|
+
$[23] = t5;
|
|
119
|
+
$[24] = t6;
|
|
120
|
+
$[25] = t8;
|
|
121
|
+
$[26] = t9;
|
|
122
|
+
} else t9 = $[26];
|
|
96
123
|
return t9;
|
|
97
124
|
};
|
|
98
125
|
export { Avatar$1 as Avatar };
|
|
@@ -4,9 +4,9 @@ import { Popover } from "../popover/popover.js";
|
|
|
4
4
|
import { AvatarGroupContext, useAvatarGroup } from "./avatar-group-context.js";
|
|
5
5
|
import avatar_group_module_default from "./avatar-group.module.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { clsx } from "clsx";
|
|
9
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
// src/components/avatar-group/avatar-group.tsx
|
|
11
11
|
var LIST_AVATAR_SIZE = 1.5;
|
|
12
12
|
/** The stack: a named group of avatars, overlapping, with no control of its own. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import badge_module_default from "./badge.module.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
// src/components/badge/badge.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Small styled leaf for counts and short status labels. Coloured by
|
|
@@ -29,28 +29,37 @@ export type BreadcrumbsPageProps = ComponentPropsWithRef<"span">;
|
|
|
29
29
|
*/
|
|
30
30
|
declare const Page: ({ className, children, ...props }: BreadcrumbsPageProps) => ReactNode;
|
|
31
31
|
export type BreadcrumbsSeparatorProps = useRender.ComponentProps<"li">;
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* The decorative space between two crumbs, holding the app's mark, such as a
|
|
34
|
+
* chevron, given as `children`. Without one it is spacing alone.
|
|
35
|
+
*/
|
|
36
|
+
declare const Separator: ({ render, className, ref, ...props }: BreadcrumbsSeparatorProps) => ReactElement;
|
|
34
37
|
export type BreadcrumbsOverflowProps = Readonly<{
|
|
35
38
|
/** Accessible name of the button, such as "Show more", surfaced as its tooltip. */
|
|
36
39
|
label: string;
|
|
40
|
+
/** The button's glyph, such as the app's ellipsis. */
|
|
41
|
+
icon: ReactNode;
|
|
37
42
|
/** The folded crumbs, each a `Menu.LinkItem`. */
|
|
38
43
|
children: ReactNode;
|
|
39
44
|
}>;
|
|
40
45
|
/** A button that opens a menu of the crumbs the trail has no room for. */
|
|
41
|
-
declare const Overflow: ({ label, children, }: BreadcrumbsOverflowProps) => ReactNode;
|
|
46
|
+
declare const Overflow: ({ label, icon, children, }: BreadcrumbsOverflowProps) => ReactNode;
|
|
42
47
|
export type BreadcrumbsGaugeProps = Readonly<{
|
|
43
48
|
/** Every crumb's label, outermost first. */
|
|
44
49
|
labels: readonly ReactNode[];
|
|
45
50
|
/** The `Overflow` button's label, so the copy measures the same. */
|
|
46
51
|
overflowLabel: string;
|
|
52
|
+
/** The `Overflow` button's glyph, so the copy measures the same. */
|
|
53
|
+
overflowIcon: ReactNode;
|
|
54
|
+
/** The mark between crumbs, so the copy measures the same. */
|
|
55
|
+
separator?: ReactNode;
|
|
47
56
|
ref: Ref<HTMLOListElement>;
|
|
48
57
|
}>;
|
|
49
58
|
/**
|
|
50
59
|
* A hidden copy of the whole trail at its full length, with one separator and
|
|
51
60
|
* the overflow button, for `useFold` to measure.
|
|
52
61
|
*/
|
|
53
|
-
declare const Gauge: ({ labels, overflowLabel, ref, }: BreadcrumbsGaugeProps) => ReactNode;
|
|
62
|
+
declare const Gauge: ({ labels, overflowLabel, overflowIcon, separator, ref, }: BreadcrumbsGaugeProps) => ReactNode;
|
|
54
63
|
/** One crumb of a trail: its label and, above the current page, the link it renders as. */
|
|
55
64
|
export type Crumb = Readonly<{
|
|
56
65
|
/** Stable key, such as the route id. */
|
|
@@ -66,6 +75,10 @@ export type BreadcrumbsProps = Readonly<{
|
|
|
66
75
|
label: string;
|
|
67
76
|
/** The overflow button's name, such as "Show more". */
|
|
68
77
|
overflowLabel: string;
|
|
78
|
+
/** The overflow button's glyph, such as the app's ellipsis. */
|
|
79
|
+
overflowIcon: ReactNode;
|
|
80
|
+
/** The mark between crumbs, such as the app's chevron; without one, crumbs are kept apart by spacing alone. */
|
|
81
|
+
separator?: ReactNode;
|
|
69
82
|
/** The trail, outermost first; the last crumb is the current page. */
|
|
70
83
|
crumbs: readonly Crumb[];
|
|
71
84
|
className?: string;
|
|
@@ -75,7 +88,7 @@ export type BreadcrumbsProps = Readonly<{
|
|
|
75
88
|
* first fold into an overflow menu, one by one, until it fits. The first crumb
|
|
76
89
|
* and the current page stay. Renders nothing for a trail of one.
|
|
77
90
|
*/
|
|
78
|
-
declare const Trail: ({ label, overflowLabel, crumbs, className, }: BreadcrumbsProps) => ReactNode;
|
|
91
|
+
declare const Trail: ({ label, overflowLabel, overflowIcon, separator, crumbs, className, }: BreadcrumbsProps) => ReactNode;
|
|
79
92
|
type BreadcrumbsParts = typeof Trail & Readonly<{
|
|
80
93
|
Root: typeof Root;
|
|
81
94
|
List: typeof List;
|
|
@@ -94,10 +107,12 @@ type BreadcrumbsParts = typeof Trail & Readonly<{
|
|
|
94
107
|
* <Breadcrumbs
|
|
95
108
|
* label="Breadcrumbs"
|
|
96
109
|
* overflowLabel="Show more"
|
|
110
|
+
* overflowIcon={<MoreIcon />}
|
|
111
|
+
* separator={<ChevronIcon />}
|
|
97
112
|
* crumbs={[
|
|
98
113
|
* { id: "home", label: "Home", render: <Link to="/" /> },
|
|
99
|
-
* { id: "
|
|
100
|
-
* { id: "
|
|
114
|
+
* { id: "invoices", label: "Invoices", render: <Link to="/invoices" /> },
|
|
115
|
+
* { id: "invoice", label: "Invoice 2041" },
|
|
101
116
|
* ]}
|
|
102
117
|
* />
|
|
103
118
|
*/
|