@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,194 +1,269 @@
|
|
|
1
|
-
import { useRequiredContext } from "../../lib/use-required-context.js";
|
|
2
1
|
import { Badge } from "../badge/badge.js";
|
|
3
2
|
import tabs_module_default from "./tabs.module.js";
|
|
4
3
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { createContext } from "react";
|
|
6
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
4
|
import { clsx } from "clsx";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { createContext, use } from "react";
|
|
8
7
|
import { Tabs } from "@base-ui/react/tabs";
|
|
9
8
|
// src/components/tabs/tabs.tsx
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
};
|
|
9
|
+
var InkCopyContext = createContext(false);
|
|
10
|
+
var ListChildrenContext = createContext(null);
|
|
11
|
+
/** The tabs and the panels they open. */
|
|
14
12
|
var Root = (t0) => {
|
|
15
|
-
const $ = c(
|
|
16
|
-
|
|
13
|
+
const $ = c(16);
|
|
14
|
+
let className;
|
|
15
|
+
let defaultValue;
|
|
16
|
+
let onValueChange;
|
|
17
|
+
let props;
|
|
18
|
+
let value;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({value, defaultValue, onValueChange, className, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = className;
|
|
23
|
+
$[2] = defaultValue;
|
|
24
|
+
$[3] = onValueChange;
|
|
25
|
+
$[4] = props;
|
|
26
|
+
$[5] = value;
|
|
27
|
+
} else {
|
|
28
|
+
className = $[1];
|
|
29
|
+
defaultValue = $[2];
|
|
30
|
+
onValueChange = $[3];
|
|
31
|
+
props = $[4];
|
|
32
|
+
value = $[5];
|
|
33
|
+
}
|
|
17
34
|
let t1;
|
|
18
|
-
if ($[
|
|
35
|
+
if ($[6] !== onValueChange) {
|
|
19
36
|
t1 = (next) => {
|
|
20
37
|
if (typeof next === "string") onValueChange?.(next);
|
|
21
38
|
};
|
|
22
|
-
$[
|
|
23
|
-
$[
|
|
24
|
-
} else t1 = $[
|
|
39
|
+
$[6] = onValueChange;
|
|
40
|
+
$[7] = t1;
|
|
41
|
+
} else t1 = $[7];
|
|
25
42
|
let t2;
|
|
26
|
-
if ($[
|
|
43
|
+
if ($[8] !== className) {
|
|
27
44
|
t2 = clsx(tabs_module_default.root, className);
|
|
28
|
-
$[
|
|
29
|
-
$[
|
|
30
|
-
} else t2 = $[
|
|
45
|
+
$[8] = className;
|
|
46
|
+
$[9] = t2;
|
|
47
|
+
} else t2 = $[9];
|
|
31
48
|
let t3;
|
|
32
|
-
if ($[
|
|
49
|
+
if ($[10] !== defaultValue || $[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== value) {
|
|
33
50
|
t3 = /* @__PURE__ */ jsx(Tabs.Root, {
|
|
51
|
+
...props,
|
|
34
52
|
value,
|
|
35
53
|
defaultValue,
|
|
36
54
|
onValueChange: t1,
|
|
37
|
-
className: t2
|
|
38
|
-
children
|
|
55
|
+
className: t2
|
|
39
56
|
});
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
57
|
+
$[10] = defaultValue;
|
|
58
|
+
$[11] = props;
|
|
59
|
+
$[12] = t1;
|
|
60
|
+
$[13] = t2;
|
|
61
|
+
$[14] = value;
|
|
62
|
+
$[15] = t3;
|
|
63
|
+
} else t3 = $[15];
|
|
64
|
+
return t3;
|
|
65
|
+
};
|
|
66
|
+
/** The row of tabs, scrolling sideways when it outgrows its room. */
|
|
67
|
+
var List = (t0) => {
|
|
68
|
+
const $ = c(14);
|
|
69
|
+
let children;
|
|
70
|
+
let className;
|
|
71
|
+
let label;
|
|
72
|
+
let props;
|
|
73
|
+
if ($[0] !== t0) {
|
|
74
|
+
({label, className, children, ...props} = t0);
|
|
75
|
+
$[0] = t0;
|
|
76
|
+
$[1] = children;
|
|
77
|
+
$[2] = className;
|
|
78
|
+
$[3] = label;
|
|
79
|
+
$[4] = props;
|
|
80
|
+
} else {
|
|
81
|
+
children = $[1];
|
|
82
|
+
className = $[2];
|
|
83
|
+
label = $[3];
|
|
84
|
+
props = $[4];
|
|
85
|
+
}
|
|
86
|
+
let t1;
|
|
87
|
+
if ($[5] !== className) {
|
|
88
|
+
t1 = clsx(tabs_module_default.list, className);
|
|
89
|
+
$[5] = className;
|
|
42
90
|
$[6] = t1;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
91
|
+
} else t1 = $[6];
|
|
92
|
+
let t2;
|
|
93
|
+
if ($[7] !== children) {
|
|
94
|
+
t2 = /* @__PURE__ */ jsx(ListChildrenContext, {
|
|
95
|
+
value: children,
|
|
96
|
+
children
|
|
97
|
+
});
|
|
98
|
+
$[7] = children;
|
|
99
|
+
$[8] = t2;
|
|
100
|
+
} else t2 = $[8];
|
|
101
|
+
let t3;
|
|
102
|
+
if ($[9] !== label || $[10] !== props || $[11] !== t1 || $[12] !== t2) {
|
|
103
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
104
|
+
className: tabs_module_default.scroller,
|
|
105
|
+
children: /* @__PURE__ */ jsx(Tabs.List, {
|
|
106
|
+
...props,
|
|
107
|
+
"aria-label": label,
|
|
108
|
+
className: t1,
|
|
109
|
+
children: t2
|
|
110
|
+
})
|
|
52
111
|
});
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
|
|
57
|
-
|
|
112
|
+
$[9] = label;
|
|
113
|
+
$[10] = props;
|
|
114
|
+
$[11] = t1;
|
|
115
|
+
$[12] = t2;
|
|
116
|
+
$[13] = t3;
|
|
117
|
+
} else t3 = $[13];
|
|
118
|
+
return t3;
|
|
58
119
|
};
|
|
59
|
-
|
|
120
|
+
/** One tab: its label, and a `Count` where it has one. */
|
|
121
|
+
var Tab = (t0) => {
|
|
60
122
|
const $ = c(5);
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
123
|
+
let children;
|
|
124
|
+
let className;
|
|
125
|
+
let props;
|
|
126
|
+
let value;
|
|
127
|
+
if ($[0] !== t0) {
|
|
128
|
+
({value, className, children, ...props} = t0);
|
|
129
|
+
$[0] = t0;
|
|
130
|
+
$[1] = children;
|
|
131
|
+
$[2] = className;
|
|
132
|
+
$[3] = props;
|
|
133
|
+
$[4] = value;
|
|
134
|
+
} else {
|
|
135
|
+
children = $[1];
|
|
136
|
+
className = $[2];
|
|
137
|
+
props = $[3];
|
|
138
|
+
value = $[4];
|
|
139
|
+
}
|
|
140
|
+
return use(InkCopyContext) ? /* @__PURE__ */ jsx("span", {
|
|
141
|
+
className: clsx(tabs_module_default.tab, className),
|
|
142
|
+
children
|
|
143
|
+
}) : /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
144
|
+
...props,
|
|
145
|
+
value,
|
|
146
|
+
className: clsx(tabs_module_default.tab, className),
|
|
147
|
+
children
|
|
148
|
+
});
|
|
80
149
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
|
|
150
|
+
/** A count after a tab's label, as a neutral badge. */
|
|
151
|
+
var Count = (t0) => {
|
|
152
|
+
const $ = c(8);
|
|
153
|
+
let props;
|
|
85
154
|
let t1;
|
|
86
|
-
if ($[0] !== className) {
|
|
87
|
-
t1 = clsx(tabs_module_default.scroller, className);
|
|
88
|
-
$[0] = className;
|
|
89
|
-
$[1] = t1;
|
|
90
|
-
} else t1 = $[1];
|
|
91
155
|
let t2;
|
|
92
|
-
if ($[
|
|
93
|
-
t2 =
|
|
94
|
-
$[
|
|
156
|
+
if ($[0] !== t0) {
|
|
157
|
+
({tone: t1, variant: t2, ...props} = t0);
|
|
158
|
+
$[0] = t0;
|
|
159
|
+
$[1] = props;
|
|
160
|
+
$[2] = t1;
|
|
95
161
|
$[3] = t2;
|
|
96
|
-
} else
|
|
162
|
+
} else {
|
|
163
|
+
props = $[1];
|
|
164
|
+
t1 = $[2];
|
|
165
|
+
t2 = $[3];
|
|
166
|
+
}
|
|
167
|
+
const tone = t1 === void 0 ? "neutral" : t1;
|
|
168
|
+
const variant = t2 === void 0 ? "subtle" : t2;
|
|
97
169
|
let t3;
|
|
98
|
-
if ($[4] !==
|
|
99
|
-
t3 =
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
let t4;
|
|
104
|
-
if ($[6] !== t3) {
|
|
105
|
-
t4 = /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
106
|
-
className: tabs_module_default.indicator,
|
|
107
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
108
|
-
className: tabs_module_default.indicatorLabels,
|
|
109
|
-
"aria-hidden": "true",
|
|
110
|
-
children: t3
|
|
111
|
-
})
|
|
170
|
+
if ($[4] !== props || $[5] !== tone || $[6] !== variant) {
|
|
171
|
+
t3 = /* @__PURE__ */ jsx(Badge, {
|
|
172
|
+
tone,
|
|
173
|
+
variant,
|
|
174
|
+
...props
|
|
112
175
|
});
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
className: tabs_module_default.list,
|
|
120
|
-
"aria-label": label,
|
|
121
|
-
children: [t2, t4]
|
|
122
|
-
});
|
|
123
|
-
$[8] = label;
|
|
124
|
-
$[9] = t2;
|
|
125
|
-
$[10] = t4;
|
|
126
|
-
$[11] = t5;
|
|
127
|
-
} else t5 = $[11];
|
|
128
|
-
let t6;
|
|
129
|
-
if ($[12] !== t1 || $[13] !== t5) {
|
|
130
|
-
t6 = /* @__PURE__ */ jsx("div", {
|
|
131
|
-
className: t1,
|
|
132
|
-
children: t5
|
|
133
|
-
});
|
|
134
|
-
$[12] = t1;
|
|
135
|
-
$[13] = t5;
|
|
136
|
-
$[14] = t6;
|
|
137
|
-
} else t6 = $[14];
|
|
138
|
-
return t6;
|
|
176
|
+
$[4] = props;
|
|
177
|
+
$[5] = tone;
|
|
178
|
+
$[6] = variant;
|
|
179
|
+
$[7] = t3;
|
|
180
|
+
} else t3 = $[7];
|
|
181
|
+
return t3;
|
|
139
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* The pill that slides to the open tab, inside the `List`. It holds a copy of
|
|
185
|
+
* the list's tabs, so the open tab's label turns over as the pill arrives.
|
|
186
|
+
*/
|
|
187
|
+
var Indicator = (t0) => {
|
|
188
|
+
const $ = c(3);
|
|
189
|
+
let className;
|
|
190
|
+
let props;
|
|
191
|
+
if ($[0] !== t0) {
|
|
192
|
+
({className, ...props} = t0);
|
|
193
|
+
$[0] = t0;
|
|
194
|
+
$[1] = className;
|
|
195
|
+
$[2] = props;
|
|
196
|
+
} else {
|
|
197
|
+
className = $[1];
|
|
198
|
+
props = $[2];
|
|
199
|
+
}
|
|
200
|
+
const tabs = use(ListChildrenContext);
|
|
201
|
+
return use(InkCopyContext) ? null : /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
202
|
+
...props,
|
|
203
|
+
className: clsx(tabs_module_default.indicator, className),
|
|
204
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
205
|
+
className: tabs_module_default.indicatorLabels,
|
|
206
|
+
"aria-hidden": "true",
|
|
207
|
+
children: /* @__PURE__ */ jsx(InkCopyContext, {
|
|
208
|
+
value: true,
|
|
209
|
+
children: tabs
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
/** What one tab opens. */
|
|
140
215
|
var Panel = (t0) => {
|
|
141
|
-
const $ = c(
|
|
142
|
-
|
|
216
|
+
const $ = c(8);
|
|
217
|
+
let className;
|
|
218
|
+
let props;
|
|
219
|
+
if ($[0] !== t0) {
|
|
220
|
+
({className, ...props} = t0);
|
|
221
|
+
$[0] = t0;
|
|
222
|
+
$[1] = className;
|
|
223
|
+
$[2] = props;
|
|
224
|
+
} else {
|
|
225
|
+
className = $[1];
|
|
226
|
+
props = $[2];
|
|
227
|
+
}
|
|
143
228
|
let t1;
|
|
144
|
-
if ($[
|
|
229
|
+
if ($[3] !== className) {
|
|
145
230
|
t1 = clsx(tabs_module_default.panel, className);
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else t1 = $[
|
|
231
|
+
$[3] = className;
|
|
232
|
+
$[4] = t1;
|
|
233
|
+
} else t1 = $[4];
|
|
149
234
|
let t2;
|
|
150
|
-
if ($[
|
|
235
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
151
236
|
t2 = /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
152
|
-
|
|
153
|
-
className: t1
|
|
154
|
-
children
|
|
237
|
+
...props,
|
|
238
|
+
className: t1
|
|
155
239
|
});
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
|
|
160
|
-
} else t2 = $[5];
|
|
240
|
+
$[5] = props;
|
|
241
|
+
$[6] = t1;
|
|
242
|
+
$[7] = t2;
|
|
243
|
+
} else t2 = $[7];
|
|
161
244
|
return t2;
|
|
162
245
|
};
|
|
163
246
|
/**
|
|
164
|
-
* In-page tabs over base-ui's `Tabs
|
|
165
|
-
*
|
|
166
|
-
* tab opens. Tabs that lead to pages are a horizontal `Nav`.
|
|
247
|
+
* In-page tabs over base-ui's `Tabs`, with a pill that slides to the open tab.
|
|
248
|
+
* Tabs that lead to pages are a horizontal `Nav`.
|
|
167
249
|
*
|
|
168
250
|
* @example
|
|
169
|
-
* <Tabs.Root
|
|
170
|
-
* <Tabs.
|
|
251
|
+
* <Tabs.Root defaultValue="details">
|
|
252
|
+
* <Tabs.List label="Invoice">
|
|
253
|
+
* <Tabs.Tab value="details">Details</Tabs.Tab>
|
|
254
|
+
* <Tabs.Tab value="history">History<Tabs.Count>3</Tabs.Count></Tabs.Tab>
|
|
255
|
+
* <Tabs.Indicator />
|
|
256
|
+
* </Tabs.List>
|
|
171
257
|
* <Tabs.Panel value="details">…</Tabs.Panel>
|
|
172
258
|
* <Tabs.Panel value="history">…</Tabs.Panel>
|
|
173
259
|
* </Tabs.Root>
|
|
174
260
|
*/
|
|
175
261
|
var Tabs$1 = {
|
|
176
262
|
Root,
|
|
177
|
-
|
|
263
|
+
List,
|
|
264
|
+
Tab,
|
|
265
|
+
Count,
|
|
266
|
+
Indicator,
|
|
178
267
|
Panel
|
|
179
268
|
};
|
|
180
|
-
function _temp(tab) {
|
|
181
|
-
return /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
182
|
-
value: tab.value,
|
|
183
|
-
disabled: tab.disabled,
|
|
184
|
-
className: tabs_module_default.tab,
|
|
185
|
-
children: /* @__PURE__ */ jsx(TabContent, { tab })
|
|
186
|
-
}, tab.value);
|
|
187
|
-
}
|
|
188
|
-
function _temp2(tab_0) {
|
|
189
|
-
return /* @__PURE__ */ jsx("span", {
|
|
190
|
-
className: tabs_module_default.tab,
|
|
191
|
-
children: /* @__PURE__ */ jsx(TabContent, { tab: tab_0 })
|
|
192
|
-
}, tab_0.value);
|
|
193
|
-
}
|
|
194
269
|
export { Tabs$1 as Tabs };
|
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._root_10znj_3[data-variant=subtle] {
|
|
4
4
|
--tag-bg: var(--sys-color-neutral-bg);
|
|
5
5
|
--tag-fg: var(--sys-color-neutral-fg);
|
|
6
6
|
--tag-border: transparent;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
._root_10znj_3[data-variant=solid] {
|
|
9
9
|
--tag-bg: var(--sys-color-neutral-fg);
|
|
10
10
|
--tag-fg: var(--sys-color-neutral-bg);
|
|
11
11
|
--tag-border: transparent;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
._root_10znj_3[data-variant=outline] {
|
|
14
14
|
--tag-bg: transparent;
|
|
15
15
|
--tag-fg: var(--sys-color-neutral-fg);
|
|
16
16
|
--tag-border: var(--sys-color-neutral-border);
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
._root_10znj_3[data-tone=info][data-variant=subtle] {
|
|
19
19
|
--tag-bg: var(--sys-color-info-bg);
|
|
20
20
|
--tag-fg: var(--sys-color-info-fg);
|
|
21
21
|
--tag-border: transparent;
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
._root_10znj_3[data-tone=info][data-variant=solid] {
|
|
24
24
|
--tag-bg: var(--sys-color-info-fg);
|
|
25
25
|
--tag-fg: var(--sys-color-info-bg);
|
|
26
26
|
--tag-border: transparent;
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
._root_10znj_3[data-tone=info][data-variant=outline] {
|
|
29
29
|
--tag-bg: transparent;
|
|
30
30
|
--tag-fg: var(--sys-color-info-fg);
|
|
31
31
|
--tag-border: var(
|
|
32
32
|
--sys-color-info-border
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
._root_10znj_3[data-tone=success][data-variant=subtle] {
|
|
36
36
|
--tag-bg: var(--sys-color-success-bg);
|
|
37
37
|
--tag-fg: var(--sys-color-success-fg);
|
|
38
38
|
--tag-border: transparent;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
._root_10znj_3[data-tone=success][data-variant=solid] {
|
|
41
41
|
--tag-bg: var(--sys-color-success-fg);
|
|
42
42
|
--tag-fg: var(--sys-color-success-bg);
|
|
43
43
|
--tag-border: transparent;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
._root_10znj_3[data-tone=success][data-variant=outline] {
|
|
46
46
|
--tag-bg: transparent;
|
|
47
47
|
--tag-fg: var(--sys-color-success-fg);
|
|
48
48
|
--tag-border: var(
|
|
49
49
|
--sys-color-success-border
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
._root_10znj_3[data-tone=warning][data-variant=subtle] {
|
|
53
53
|
--tag-bg: var(--sys-color-warning-bg);
|
|
54
54
|
--tag-fg: var(--sys-color-warning-fg);
|
|
55
55
|
--tag-border: transparent;
|
|
56
56
|
}
|
|
57
|
-
.
|
|
57
|
+
._root_10znj_3[data-tone=warning][data-variant=solid] {
|
|
58
58
|
--tag-bg: var(--sys-color-warning-fg);
|
|
59
59
|
--tag-fg: var(--sys-color-warning-bg);
|
|
60
60
|
--tag-border: transparent;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
._root_10znj_3[data-tone=warning][data-variant=outline] {
|
|
63
63
|
--tag-bg: transparent;
|
|
64
64
|
--tag-fg: var(--sys-color-warning-fg);
|
|
65
65
|
--tag-border: var(
|
|
66
66
|
--sys-color-warning-border
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
.
|
|
69
|
+
._root_10znj_3[data-tone=error][data-variant=subtle] {
|
|
70
70
|
--tag-bg: var(--sys-color-error-bg);
|
|
71
71
|
--tag-fg: var(--sys-color-error-fg);
|
|
72
72
|
--tag-border: transparent;
|
|
73
73
|
}
|
|
74
|
-
.
|
|
74
|
+
._root_10znj_3[data-tone=error][data-variant=solid] {
|
|
75
75
|
--tag-bg: var(--sys-color-error-fg);
|
|
76
76
|
--tag-fg: var(--sys-color-error-bg);
|
|
77
77
|
--tag-border: transparent;
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
._root_10znj_3[data-tone=error][data-variant=outline] {
|
|
80
80
|
--tag-bg: transparent;
|
|
81
81
|
--tag-fg: var(--sys-color-error-fg);
|
|
82
82
|
--tag-border: var(
|
|
83
83
|
--sys-color-error-border
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
|
-
.
|
|
86
|
+
._root_10znj_3 {
|
|
87
87
|
display: inline-flex;
|
|
88
88
|
align-items: center;
|
|
89
89
|
gap: var(--sys-unit-3);
|
|
@@ -96,25 +96,27 @@
|
|
|
96
96
|
color: var(--tag-fg);
|
|
97
97
|
font: var(--sys-font-label-small);
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
._root_10znj_3 {
|
|
100
100
|
outline: 0 solid var(--sys-color-focus-ring);
|
|
101
101
|
outline-offset: var(--sys-focus-ring-offset);
|
|
102
102
|
}
|
|
103
|
-
.
|
|
103
|
+
._root_10znj_3:focus-visible {
|
|
104
104
|
outline-width: var(--sys-focus-ring-width);
|
|
105
105
|
}
|
|
106
|
-
.
|
|
106
|
+
._root_10znj_3[data-focus-visible] {
|
|
107
107
|
outline-width: var(--sys-focus-ring-width);
|
|
108
108
|
}
|
|
109
|
-
.
|
|
109
|
+
._dot_10znj_109 {
|
|
110
110
|
flex-shrink: 0;
|
|
111
111
|
inline-size: var(--sys-unit-3);
|
|
112
112
|
block-size: var(--sys-unit-3);
|
|
113
113
|
border-radius: var(--sys-radius-circle);
|
|
114
114
|
background: currentcolor;
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
._icon_10znj_116 {
|
|
117
|
+
display: inline-flex;
|
|
117
118
|
flex-shrink: 0;
|
|
119
|
+
font-size: var(--tag-icon-size, 1em);
|
|
118
120
|
margin-inline-start: calc(-1 * var(--sys-unit-1));
|
|
119
121
|
}
|
|
120
122
|
}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
3
|
import type { Tone, ToneVariant } from "../../lib/tone.ts";
|
|
3
|
-
|
|
4
|
-
export type TagRootProps = ComponentPropsWithRef<"span"> & Readonly<{
|
|
4
|
+
export type TagRootProps = useRender.ComponentProps<"span"> & Readonly<{
|
|
5
5
|
/** Status colour. @default "neutral" */
|
|
6
6
|
tone?: Tone;
|
|
7
7
|
/** @default "subtle" */
|
|
8
8
|
variant?: ToneVariant;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
/** The pill: a `<span>` in a status `tone` and `variant`. */
|
|
12
|
+
declare const Root: ({ tone, variant, render, className, ref, ...props }: TagRootProps) => ReactElement;
|
|
13
|
+
export type TagDotProps = useRender.ComponentProps<"span">;
|
|
14
|
+
/** A dot in the tag's tone, leading its label. */
|
|
15
|
+
declare const Dot: ({ render, className, ref, ...props }: TagDotProps) => ReactElement;
|
|
16
|
+
export type TagIconProps = useRender.ComponentProps<"span">;
|
|
17
|
+
/**
|
|
18
|
+
* The glyph leading the label: its children, sized to the tag's text and drawn
|
|
19
|
+
* in its ink. Renders nothing without children.
|
|
20
|
+
*/
|
|
21
|
+
declare const TagIcon: ({ render, className, ref, children, ...props }: TagIconProps) => ReactElement | null;
|
|
20
22
|
type TagParts = Readonly<{
|
|
21
23
|
Root: typeof Root;
|
|
22
24
|
Dot: typeof Dot;
|
|
@@ -27,9 +29,9 @@ type TagParts = Readonly<{
|
|
|
27
29
|
* most one indicator: `Dot` or `Icon`. A removable tag is a `TagGroup.Tag`.
|
|
28
30
|
*
|
|
29
31
|
* @example
|
|
30
|
-
* <Tag.Root tone="
|
|
31
|
-
* <Tag.
|
|
32
|
-
*
|
|
32
|
+
* <Tag.Root tone="error">
|
|
33
|
+
* <Tag.Icon><ErrorIcon /></Tag.Icon>
|
|
34
|
+
* Returned
|
|
33
35
|
* </Tag.Root>
|
|
34
36
|
*/
|
|
35
37
|
export declare const Tag: TagParts;
|