@igne-agency/react-web-ui 0.5.0 → 0.6.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/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSlidingIndicator } from "../../lib/sliding-indicator/use-sliding-indicator.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useRequiredContext } from "../../lib/use-required-context.js";
|
|
3
3
|
import { Tooltip as Tooltip$1 } from "../tooltip/tooltip.js";
|
|
4
4
|
import { NavContext } from "./nav-context.js";
|
|
5
5
|
import { EntryShell, entryAttributes } from "./nav-item-view.js";
|
|
@@ -7,14 +7,18 @@ import nav_module_default from "./nav.module.js";
|
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
|
-
import {
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
import { use, useState } from "react";
|
|
12
12
|
import { Tooltip } from "@base-ui/react/tooltip";
|
|
13
13
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
14
14
|
// src/components/nav/nav.tsx
|
|
15
15
|
var useOrientation = () => use(NavContext)?.orientation ?? "vertical";
|
|
16
|
+
var useNav = () => {
|
|
17
|
+
return useRequiredContext(NavContext, "Nav.Hint must be rendered inside <Nav.Root>.");
|
|
18
|
+
};
|
|
19
|
+
/** The `<nav>`, holding the one hint its entries share. */
|
|
16
20
|
var Root = (t0) => {
|
|
17
|
-
const $ = c(
|
|
21
|
+
const $ = c(18);
|
|
18
22
|
let children;
|
|
19
23
|
let className;
|
|
20
24
|
let props;
|
|
@@ -65,70 +69,201 @@ var Root = (t0) => {
|
|
|
65
69
|
$[14] = t4;
|
|
66
70
|
} else t4 = $[14];
|
|
67
71
|
let t5;
|
|
68
|
-
if ($[15] !==
|
|
69
|
-
t5 = (
|
|
70
|
-
|
|
72
|
+
if ($[15] !== t2 || $[16] !== t4) {
|
|
73
|
+
t5 = /* @__PURE__ */ jsx(NavContext, {
|
|
74
|
+
value: t2,
|
|
75
|
+
children: t4
|
|
76
|
+
});
|
|
77
|
+
$[15] = t2;
|
|
78
|
+
$[16] = t4;
|
|
79
|
+
$[17] = t5;
|
|
80
|
+
} else t5 = $[17];
|
|
81
|
+
return t5;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* The one tooltip every entry with a `label` names itself through, so the hint
|
|
85
|
+
* travels between entries rather than one closing as the next opens. Mount it
|
|
86
|
+
* inside `Root` where the entries show no label, such as a collapsed rail.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* <Nav.Root aria-label="Main">
|
|
90
|
+
* <Nav.List>…</Nav.List>
|
|
91
|
+
* {collapsed ? <Nav.Hint /> : null}
|
|
92
|
+
* </Nav.Root>
|
|
93
|
+
*/
|
|
94
|
+
var Hint = (t0) => {
|
|
95
|
+
const $ = c(6);
|
|
96
|
+
const { className } = t0;
|
|
97
|
+
const { orientation, hint } = useNav();
|
|
98
|
+
let t1;
|
|
99
|
+
if ($[0] !== className || $[1] !== orientation) {
|
|
100
|
+
t1 = (t2) => {
|
|
101
|
+
const { payload } = t2;
|
|
71
102
|
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
72
103
|
side: orientation === "vertical" ? "right" : "bottom",
|
|
73
104
|
className: nav_module_default.hintPositioner,
|
|
74
|
-
children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
|
|
75
|
-
className
|
|
76
|
-
children:
|
|
77
|
-
|
|
105
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
|
|
106
|
+
className,
|
|
107
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
|
|
108
|
+
className: nav_module_default.hintViewport,
|
|
109
|
+
children: payload
|
|
110
|
+
})
|
|
111
|
+
})
|
|
78
112
|
}) });
|
|
79
113
|
};
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
114
|
+
$[0] = className;
|
|
115
|
+
$[1] = orientation;
|
|
116
|
+
$[2] = t1;
|
|
117
|
+
} else t1 = $[2];
|
|
118
|
+
let t2;
|
|
119
|
+
if ($[3] !== hint || $[4] !== t1) {
|
|
120
|
+
t2 = /* @__PURE__ */ jsx(Tooltip$1.Root, {
|
|
86
121
|
handle: hint,
|
|
87
|
-
children:
|
|
88
|
-
});
|
|
89
|
-
$[17] = hint;
|
|
90
|
-
$[18] = t5;
|
|
91
|
-
$[19] = t6;
|
|
92
|
-
} else t6 = $[19];
|
|
93
|
-
let t7;
|
|
94
|
-
if ($[20] !== t2 || $[21] !== t4 || $[22] !== t6) {
|
|
95
|
-
t7 = /* @__PURE__ */ jsxs(NavContext, {
|
|
96
|
-
value: t2,
|
|
97
|
-
children: [t4, t6]
|
|
122
|
+
children: t1
|
|
98
123
|
});
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return t7;
|
|
124
|
+
$[3] = hint;
|
|
125
|
+
$[4] = t1;
|
|
126
|
+
$[5] = t2;
|
|
127
|
+
} else t2 = $[5];
|
|
128
|
+
return t2;
|
|
105
129
|
};
|
|
106
|
-
var ACTIVE_ENTRY = ":scope > li:has(> [aria-current=\"page\"]), :scope > li:has(> [data-active=\"true\"])";
|
|
107
130
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
131
|
+
* Lets a horizontal `List` scroll sideways once it outgrows its room.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* <Nav.Scroller>
|
|
135
|
+
* <Nav.List>…</Nav.List>
|
|
136
|
+
* </Nav.Scroller>
|
|
110
137
|
*/
|
|
138
|
+
var Scroller = (t0) => {
|
|
139
|
+
const $ = c(14);
|
|
140
|
+
let className;
|
|
141
|
+
let props;
|
|
142
|
+
let ref;
|
|
143
|
+
let render;
|
|
144
|
+
if ($[0] !== t0) {
|
|
145
|
+
({render, className, ref, ...props} = t0);
|
|
146
|
+
$[0] = t0;
|
|
147
|
+
$[1] = className;
|
|
148
|
+
$[2] = props;
|
|
149
|
+
$[3] = ref;
|
|
150
|
+
$[4] = render;
|
|
151
|
+
} else {
|
|
152
|
+
className = $[1];
|
|
153
|
+
props = $[2];
|
|
154
|
+
ref = $[3];
|
|
155
|
+
render = $[4];
|
|
156
|
+
}
|
|
157
|
+
let t1;
|
|
158
|
+
if ($[5] !== className) {
|
|
159
|
+
t1 = clsx(nav_module_default.scroller, className);
|
|
160
|
+
$[5] = className;
|
|
161
|
+
$[6] = t1;
|
|
162
|
+
} else t1 = $[6];
|
|
163
|
+
let t2;
|
|
164
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
165
|
+
t2 = {
|
|
166
|
+
...props,
|
|
167
|
+
className: t1
|
|
168
|
+
};
|
|
169
|
+
$[7] = props;
|
|
170
|
+
$[8] = t1;
|
|
171
|
+
$[9] = t2;
|
|
172
|
+
} else t2 = $[9];
|
|
173
|
+
let t3;
|
|
174
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
175
|
+
t3 = {
|
|
176
|
+
defaultTagName: "div",
|
|
177
|
+
render,
|
|
178
|
+
ref,
|
|
179
|
+
props: t2
|
|
180
|
+
};
|
|
181
|
+
$[10] = ref;
|
|
182
|
+
$[11] = render;
|
|
183
|
+
$[12] = t2;
|
|
184
|
+
$[13] = t3;
|
|
185
|
+
} else t3 = $[13];
|
|
186
|
+
return useRender(t3);
|
|
187
|
+
};
|
|
188
|
+
/** The entries, laid out along the nav's orientation. */
|
|
111
189
|
var List = (t0) => {
|
|
112
|
-
const $ = c(
|
|
113
|
-
let children;
|
|
190
|
+
const $ = c(13);
|
|
114
191
|
let className;
|
|
115
192
|
let props;
|
|
116
193
|
let ref;
|
|
117
194
|
if ($[0] !== t0) {
|
|
118
|
-
({className,
|
|
195
|
+
({className, ref, ...props} = t0);
|
|
119
196
|
$[0] = t0;
|
|
120
|
-
$[1] =
|
|
121
|
-
$[2] =
|
|
122
|
-
$[3] =
|
|
123
|
-
$[4] = ref;
|
|
197
|
+
$[1] = className;
|
|
198
|
+
$[2] = props;
|
|
199
|
+
$[3] = ref;
|
|
124
200
|
} else {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
ref = $[4];
|
|
201
|
+
className = $[1];
|
|
202
|
+
props = $[2];
|
|
203
|
+
ref = $[3];
|
|
129
204
|
}
|
|
130
205
|
const orientation = useOrientation();
|
|
131
|
-
|
|
206
|
+
let t1;
|
|
207
|
+
if ($[4] !== className) {
|
|
208
|
+
t1 = clsx(nav_module_default.list, className);
|
|
209
|
+
$[4] = className;
|
|
210
|
+
$[5] = t1;
|
|
211
|
+
} else t1 = $[5];
|
|
212
|
+
let t2;
|
|
213
|
+
if ($[6] !== orientation || $[7] !== props || $[8] !== t1) {
|
|
214
|
+
t2 = {
|
|
215
|
+
"data-orientation": orientation,
|
|
216
|
+
className: t1,
|
|
217
|
+
...props
|
|
218
|
+
};
|
|
219
|
+
$[6] = orientation;
|
|
220
|
+
$[7] = props;
|
|
221
|
+
$[8] = t1;
|
|
222
|
+
$[9] = t2;
|
|
223
|
+
} else t2 = $[9];
|
|
224
|
+
let t3;
|
|
225
|
+
if ($[10] !== ref || $[11] !== t2) {
|
|
226
|
+
t3 = {
|
|
227
|
+
defaultTagName: "ul",
|
|
228
|
+
ref,
|
|
229
|
+
props: t2
|
|
230
|
+
};
|
|
231
|
+
$[10] = ref;
|
|
232
|
+
$[11] = t2;
|
|
233
|
+
$[12] = t3;
|
|
234
|
+
} else t3 = $[12];
|
|
235
|
+
return useRender(t3);
|
|
236
|
+
};
|
|
237
|
+
var ACTIVE_ENTRY = ":scope > li:has(> [aria-current=\"page\"]), :scope > li:has(> [data-active=\"true\"])";
|
|
238
|
+
/**
|
|
239
|
+
* The pill that slides to the entry marked `aria-current="page"` or
|
|
240
|
+
* `data-active="true"`, inside a horizontal `List`.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* <Nav.List>
|
|
244
|
+
* <Nav.Indicator />
|
|
245
|
+
* <Nav.Item>…</Nav.Item>
|
|
246
|
+
* </Nav.List>
|
|
247
|
+
*/
|
|
248
|
+
var Indicator = (t0) => {
|
|
249
|
+
const $ = c(18);
|
|
250
|
+
let className;
|
|
251
|
+
let props;
|
|
252
|
+
let ref;
|
|
253
|
+
let render;
|
|
254
|
+
if ($[0] !== t0) {
|
|
255
|
+
({render, className, ref, ...props} = t0);
|
|
256
|
+
$[0] = t0;
|
|
257
|
+
$[1] = className;
|
|
258
|
+
$[2] = props;
|
|
259
|
+
$[3] = ref;
|
|
260
|
+
$[4] = render;
|
|
261
|
+
} else {
|
|
262
|
+
className = $[1];
|
|
263
|
+
props = $[2];
|
|
264
|
+
ref = $[3];
|
|
265
|
+
render = $[4];
|
|
266
|
+
}
|
|
132
267
|
let t1;
|
|
133
268
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
134
269
|
t1 = {
|
|
@@ -140,66 +275,43 @@ var List = (t0) => {
|
|
|
140
275
|
} else t1 = $[5];
|
|
141
276
|
const indicator = useSlidingIndicator(t1);
|
|
142
277
|
let t2;
|
|
143
|
-
if ($[6] !==
|
|
144
|
-
t2 =
|
|
145
|
-
$[6] =
|
|
146
|
-
$[7] =
|
|
147
|
-
|
|
278
|
+
if ($[6] !== indicator || $[7] !== ref) {
|
|
279
|
+
t2 = ref === void 0 ? indicator : [indicator, ref];
|
|
280
|
+
$[6] = indicator;
|
|
281
|
+
$[7] = ref;
|
|
282
|
+
$[8] = t2;
|
|
283
|
+
} else t2 = $[8];
|
|
148
284
|
let t3;
|
|
149
|
-
if ($[
|
|
150
|
-
t3 =
|
|
151
|
-
|
|
152
|
-
"aria-hidden": "true",
|
|
153
|
-
className: nav_module_default.indicator
|
|
154
|
-
}) : null;
|
|
155
|
-
$[8] = horizontal;
|
|
156
|
-
$[9] = indicator;
|
|
285
|
+
if ($[9] !== className) {
|
|
286
|
+
t3 = clsx(nav_module_default.indicator, className);
|
|
287
|
+
$[9] = className;
|
|
157
288
|
$[10] = t3;
|
|
158
289
|
} else t3 = $[10];
|
|
159
290
|
let t4;
|
|
160
|
-
if ($[11] !==
|
|
161
|
-
t4 =
|
|
162
|
-
|
|
291
|
+
if ($[11] !== props || $[12] !== t3) {
|
|
292
|
+
t4 = {
|
|
293
|
+
"aria-hidden": true,
|
|
294
|
+
...props,
|
|
295
|
+
className: t3
|
|
296
|
+
};
|
|
297
|
+
$[11] = props;
|
|
163
298
|
$[12] = t3;
|
|
164
299
|
$[13] = t4;
|
|
165
300
|
} else t4 = $[13];
|
|
166
301
|
let t5;
|
|
167
|
-
if ($[14] !==
|
|
302
|
+
if ($[14] !== render || $[15] !== t2 || $[16] !== t4) {
|
|
168
303
|
t5 = {
|
|
169
|
-
"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
304
|
+
defaultTagName: "li",
|
|
305
|
+
render,
|
|
306
|
+
ref: t2,
|
|
307
|
+
props: t4
|
|
173
308
|
};
|
|
174
|
-
$[14] =
|
|
175
|
-
$[15] =
|
|
176
|
-
$[16] =
|
|
177
|
-
$[17] =
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
let t6;
|
|
181
|
-
if ($[19] !== ref || $[20] !== t5) {
|
|
182
|
-
t6 = {
|
|
183
|
-
defaultTagName: "ul",
|
|
184
|
-
ref,
|
|
185
|
-
props: t5
|
|
186
|
-
};
|
|
187
|
-
$[19] = ref;
|
|
188
|
-
$[20] = t5;
|
|
189
|
-
$[21] = t6;
|
|
190
|
-
} else t6 = $[21];
|
|
191
|
-
const list = useRender(t6);
|
|
192
|
-
let t7;
|
|
193
|
-
if ($[22] !== horizontal || $[23] !== list) {
|
|
194
|
-
t7 = horizontal ? /* @__PURE__ */ jsx("div", {
|
|
195
|
-
className: nav_module_default.scroller,
|
|
196
|
-
children: list
|
|
197
|
-
}) : list;
|
|
198
|
-
$[22] = horizontal;
|
|
199
|
-
$[23] = list;
|
|
200
|
-
$[24] = t7;
|
|
201
|
-
} else t7 = $[24];
|
|
202
|
-
return t7;
|
|
309
|
+
$[14] = render;
|
|
310
|
+
$[15] = t2;
|
|
311
|
+
$[16] = t4;
|
|
312
|
+
$[17] = t5;
|
|
313
|
+
} else t5 = $[17];
|
|
314
|
+
return useRender(t5);
|
|
203
315
|
};
|
|
204
316
|
var Item = (props) => {
|
|
205
317
|
const $ = c(2);
|
|
@@ -217,74 +329,65 @@ var Item = (props) => {
|
|
|
217
329
|
* `aria-current="page"` marks the current one.
|
|
218
330
|
*/
|
|
219
331
|
var Link = (t0) => {
|
|
220
|
-
const $ = c(
|
|
332
|
+
const $ = c(18);
|
|
221
333
|
let className;
|
|
222
334
|
let label;
|
|
223
|
-
let labelled;
|
|
224
335
|
let layout;
|
|
225
336
|
let props;
|
|
226
337
|
if ($[0] !== t0) {
|
|
227
|
-
({layout,
|
|
338
|
+
({layout, label, className, ...props} = t0);
|
|
228
339
|
$[0] = t0;
|
|
229
340
|
$[1] = className;
|
|
230
341
|
$[2] = label;
|
|
231
|
-
$[3] =
|
|
232
|
-
$[4] =
|
|
233
|
-
$[5] = props;
|
|
342
|
+
$[3] = layout;
|
|
343
|
+
$[4] = props;
|
|
234
344
|
} else {
|
|
235
345
|
className = $[1];
|
|
236
346
|
label = $[2];
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
props = $[5];
|
|
347
|
+
layout = $[3];
|
|
348
|
+
props = $[4];
|
|
240
349
|
}
|
|
241
350
|
const orientation = useOrientation();
|
|
242
351
|
let t1;
|
|
243
|
-
if ($[
|
|
352
|
+
if ($[5] !== label || $[6] !== layout) {
|
|
244
353
|
t1 = entryAttributes({
|
|
245
354
|
layout,
|
|
246
|
-
labelled,
|
|
247
355
|
label
|
|
248
356
|
});
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
|
|
253
|
-
} else t1 = $[9];
|
|
357
|
+
$[5] = label;
|
|
358
|
+
$[6] = layout;
|
|
359
|
+
$[7] = t1;
|
|
360
|
+
} else t1 = $[7];
|
|
254
361
|
const t2 = orientation === "horizontal" ? nav_module_default.tab : nav_module_default.item;
|
|
255
362
|
let t3;
|
|
256
|
-
if ($[
|
|
363
|
+
if ($[8] !== className || $[9] !== t2) {
|
|
257
364
|
t3 = clsx(t2, className);
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
} else t3 = $[
|
|
365
|
+
$[8] = className;
|
|
366
|
+
$[9] = t2;
|
|
367
|
+
$[10] = t3;
|
|
368
|
+
} else t3 = $[10];
|
|
262
369
|
let t4;
|
|
263
|
-
if ($[
|
|
370
|
+
if ($[11] !== props || $[12] !== t1 || $[13] !== t3) {
|
|
264
371
|
t4 = /* @__PURE__ */ jsx("a", {
|
|
265
372
|
...t1,
|
|
266
373
|
className: t3,
|
|
267
374
|
...props
|
|
268
375
|
});
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
} else t4 = $[
|
|
376
|
+
$[11] = props;
|
|
377
|
+
$[12] = t1;
|
|
378
|
+
$[13] = t3;
|
|
379
|
+
$[14] = t4;
|
|
380
|
+
} else t4 = $[14];
|
|
274
381
|
let t5;
|
|
275
|
-
if ($[
|
|
382
|
+
if ($[15] !== label || $[16] !== t4) {
|
|
276
383
|
t5 = /* @__PURE__ */ jsx(EntryShell, {
|
|
277
|
-
layout,
|
|
278
|
-
labelled,
|
|
279
384
|
label,
|
|
280
385
|
element: t4
|
|
281
386
|
});
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
|
|
286
|
-
$[21] = t5;
|
|
287
|
-
} else t5 = $[21];
|
|
387
|
+
$[15] = label;
|
|
388
|
+
$[16] = t4;
|
|
389
|
+
$[17] = t5;
|
|
390
|
+
} else t5 = $[17];
|
|
288
391
|
return t5;
|
|
289
392
|
};
|
|
290
393
|
/**
|
|
@@ -383,55 +486,43 @@ var GroupHeader = (t0) => {
|
|
|
383
486
|
} else t2 = $[7];
|
|
384
487
|
return t2;
|
|
385
488
|
};
|
|
386
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* The trigger that folds the group's subpages open and shut, rendered as the
|
|
491
|
+
* button it is given.
|
|
492
|
+
*
|
|
493
|
+
* @example
|
|
494
|
+
* <Nav.GroupToggle render={<IconButton label="Show subpages" variant="tertiary"><ExpandIcon /></IconButton>} />
|
|
495
|
+
*/
|
|
387
496
|
var GroupToggle = (t0) => {
|
|
388
|
-
const $ = c(
|
|
389
|
-
let children;
|
|
497
|
+
const $ = c(8);
|
|
390
498
|
let className;
|
|
391
|
-
let label;
|
|
392
499
|
let props;
|
|
393
500
|
if ($[0] !== t0) {
|
|
394
|
-
({
|
|
501
|
+
({className, ...props} = t0);
|
|
395
502
|
$[0] = t0;
|
|
396
|
-
$[1] =
|
|
397
|
-
$[2] =
|
|
398
|
-
$[3] = label;
|
|
399
|
-
$[4] = props;
|
|
503
|
+
$[1] = className;
|
|
504
|
+
$[2] = props;
|
|
400
505
|
} else {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
label = $[3];
|
|
404
|
-
props = $[4];
|
|
506
|
+
className = $[1];
|
|
507
|
+
props = $[2];
|
|
405
508
|
}
|
|
406
509
|
let t1;
|
|
407
|
-
if ($[
|
|
510
|
+
if ($[3] !== className) {
|
|
408
511
|
t1 = clsx(nav_module_default.groupToggle, className);
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
} else t1 = $[
|
|
512
|
+
$[3] = className;
|
|
513
|
+
$[4] = t1;
|
|
514
|
+
} else t1 = $[4];
|
|
412
515
|
let t2;
|
|
413
|
-
if ($[
|
|
414
|
-
t2 = /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
415
|
-
$[7] = t2;
|
|
416
|
-
} else t2 = $[7];
|
|
417
|
-
let t3;
|
|
418
|
-
if ($[8] !== children || $[9] !== label || $[10] !== props || $[11] !== t1) {
|
|
419
|
-
t3 = /* @__PURE__ */ jsx(Button, {
|
|
420
|
-
...props,
|
|
421
|
-
variant: "tertiary",
|
|
422
|
-
iconOnly: true,
|
|
516
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
517
|
+
t2 = /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
423
518
|
className: t1,
|
|
424
|
-
|
|
425
|
-
label,
|
|
426
|
-
render: t2
|
|
519
|
+
...props
|
|
427
520
|
});
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
} else t3 = $[12];
|
|
434
|
-
return t3;
|
|
521
|
+
$[5] = props;
|
|
522
|
+
$[6] = t1;
|
|
523
|
+
$[7] = t2;
|
|
524
|
+
} else t2 = $[7];
|
|
525
|
+
return t2;
|
|
435
526
|
};
|
|
436
527
|
/** The fold that opens and shuts the group's `GroupList`. */
|
|
437
528
|
var GroupPanel = (t0) => {
|
|
@@ -498,10 +589,11 @@ var GroupList = (t0) => {
|
|
|
498
589
|
return t2;
|
|
499
590
|
};
|
|
500
591
|
/**
|
|
501
|
-
* Navigation between pages as `nav > ul > li > a`: a horizontal bar of tabs
|
|
502
|
-
*
|
|
503
|
-
* whose destinations with subpages fold them open in a
|
|
504
|
-
*
|
|
592
|
+
* Navigation between pages as `nav > ul > li > a`: a horizontal bar of tabs,
|
|
593
|
+
* in a `Scroller` with an `Indicator` that slides to the current page, or the
|
|
594
|
+
* app's vertical rail, whose destinations with subpages fold them open in a
|
|
595
|
+
* `Group` and whose entries without a visible label are named by the `Hint`.
|
|
596
|
+
* An entry that is not a link is a `NavItemView.Root`.
|
|
505
597
|
*
|
|
506
598
|
* @example
|
|
507
599
|
* const NavLink = createLink(Nav.Link);
|
|
@@ -509,7 +601,7 @@ var GroupList = (t0) => {
|
|
|
509
601
|
* <Nav.Root aria-label="Main">
|
|
510
602
|
* <Nav.List>
|
|
511
603
|
* <Nav.Item>
|
|
512
|
-
* <NavLink to="/"
|
|
604
|
+
* <NavLink to="/" activeOptions={{ exact: true }}>
|
|
513
605
|
* <NavItemView.Icon><HomeIcon /></NavItemView.Icon>
|
|
514
606
|
* <NavItemView.Label>Home</NavItemView.Label>
|
|
515
607
|
* </NavLink>
|
|
@@ -519,7 +611,10 @@ var GroupList = (t0) => {
|
|
|
519
611
|
*/
|
|
520
612
|
var Nav = {
|
|
521
613
|
Root,
|
|
614
|
+
Hint,
|
|
615
|
+
Scroller,
|
|
522
616
|
List,
|
|
617
|
+
Indicator,
|
|
523
618
|
Item,
|
|
524
619
|
Link,
|
|
525
620
|
Group,
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import './nav.css';// src/components/nav/nav.module.scss
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
2
|
+
var root = "_root_1hb8v_3";
|
|
3
|
+
var scroller = "_scroller_1hb8v_9";
|
|
4
|
+
var list = "_list_1hb8v_13";
|
|
5
|
+
var indicator = "_indicator_1hb8v_27";
|
|
6
|
+
var tab = "_tab_1hb8v_65";
|
|
7
|
+
var iconSlot = "_iconSlot_1hb8v_109";
|
|
8
|
+
var item = "_item_1hb8v_116";
|
|
9
|
+
var label = "_label_1hb8v_216";
|
|
10
|
+
var hintPositioner = "_hintPositioner_1hb8v_222";
|
|
11
|
+
var hintViewport = "_hintViewport_1hb8v_231";
|
|
12
|
+
var group = "_group_1hb8v_244";
|
|
13
|
+
var groupHeader = "_groupHeader_1hb8v_248";
|
|
14
|
+
var groupToggle = "_groupToggle_1hb8v_264";
|
|
15
|
+
var groupPanel = "_groupPanel_1hb8v_278";
|
|
16
|
+
var groupList = "_groupList_1hb8v_293";
|
|
16
17
|
var nav_module_default = {
|
|
18
|
+
root,
|
|
17
19
|
scroller,
|
|
18
20
|
list,
|
|
19
21
|
indicator,
|
|
@@ -29,4 +31,4 @@ var nav_module_default = {
|
|
|
29
31
|
groupPanel,
|
|
30
32
|
groupList
|
|
31
33
|
};
|
|
32
|
-
export { nav_module_default as default, group, groupHeader, groupList, groupPanel, groupToggle, hintPositioner, hintViewport, iconSlot, indicator, item, label, list, scroller, tab };
|
|
34
|
+
export { nav_module_default as default, group, groupHeader, groupList, groupPanel, groupToggle, hintPositioner, hintViewport, iconSlot, indicator, item, label, list, root, scroller, tab };
|