@igne-agency/react-web-ui 0.4.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/base.css +3 -0
- 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/terrazzo/index.d.ts +4 -3
- package/dist/terrazzo/index.js +17 -6
- package/dist/tokens.css +28 -4
- package/package.json +2 -2
- 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
|
@@ -4,6 +4,7 @@ import { useIntent } from "../../lib/use-intent.js";
|
|
|
4
4
|
import { Skeleton } from "../skeleton/skeleton.js";
|
|
5
5
|
import popover_module_default from "./popover.module.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
8
|
import { clsx } from "clsx";
|
|
8
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { createContext, useContext } from "react";
|
|
@@ -112,145 +113,266 @@ var Positioner = (t0) => {
|
|
|
112
113
|
} else t4 = $[10];
|
|
113
114
|
return t4;
|
|
114
115
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
/**
|
|
117
|
+
* The popover's surface. While `loading`, its `Status` speaks and its
|
|
118
|
+
* `Skeleton`s draw as placeholders.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* <Popover.Popup loading={rate.isPending}>…</Popover.Popup>
|
|
122
|
+
*/
|
|
123
|
+
var Popup = (t0) => {
|
|
124
|
+
const $ = c(14);
|
|
125
|
+
let className;
|
|
126
|
+
let props;
|
|
118
127
|
let t1;
|
|
119
|
-
if ($[0] !==
|
|
120
|
-
t1 =
|
|
121
|
-
$[0] =
|
|
122
|
-
$[1] =
|
|
123
|
-
|
|
128
|
+
if ($[0] !== t0) {
|
|
129
|
+
({loading: t1, className, ...props} = t0);
|
|
130
|
+
$[0] = t0;
|
|
131
|
+
$[1] = className;
|
|
132
|
+
$[2] = props;
|
|
133
|
+
$[3] = t1;
|
|
134
|
+
} else {
|
|
135
|
+
className = $[1];
|
|
136
|
+
props = $[2];
|
|
137
|
+
t1 = $[3];
|
|
138
|
+
}
|
|
139
|
+
const loading = t1 === void 0 ? false : t1;
|
|
124
140
|
let t2;
|
|
125
|
-
if ($[
|
|
126
|
-
t2 =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
} else t2 = $[
|
|
141
|
+
if ($[4] !== loading) {
|
|
142
|
+
t2 = {
|
|
143
|
+
busy: loading,
|
|
144
|
+
busyAfter: 0
|
|
145
|
+
};
|
|
146
|
+
$[4] = loading;
|
|
147
|
+
$[5] = t2;
|
|
148
|
+
} else t2 = $[5];
|
|
149
|
+
const busy = useBusyPhase(t2) !== "fresh";
|
|
133
150
|
let t3;
|
|
134
|
-
if ($[
|
|
135
|
-
t3 =
|
|
136
|
-
$[
|
|
137
|
-
|
|
151
|
+
if ($[6] !== className) {
|
|
152
|
+
t3 = clsx(popover_module_default.popup, className);
|
|
153
|
+
$[6] = className;
|
|
154
|
+
$[7] = t3;
|
|
155
|
+
} else t3 = $[7];
|
|
138
156
|
let t4;
|
|
139
|
-
if ($[
|
|
140
|
-
t4 = /* @__PURE__ */
|
|
141
|
-
className:
|
|
142
|
-
|
|
157
|
+
if ($[8] !== props || $[9] !== t3) {
|
|
158
|
+
t4 = /* @__PURE__ */ jsx(Popover.Popup, {
|
|
159
|
+
className: t3,
|
|
160
|
+
...props
|
|
143
161
|
});
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
} else t4 = $[
|
|
148
|
-
|
|
162
|
+
$[8] = props;
|
|
163
|
+
$[9] = t3;
|
|
164
|
+
$[10] = t4;
|
|
165
|
+
} else t4 = $[10];
|
|
166
|
+
let t5;
|
|
167
|
+
if ($[11] !== busy || $[12] !== t4) {
|
|
168
|
+
t5 = /* @__PURE__ */ jsx(LoadingContext, {
|
|
169
|
+
value: busy,
|
|
170
|
+
children: t4
|
|
171
|
+
});
|
|
172
|
+
$[11] = busy;
|
|
173
|
+
$[12] = t4;
|
|
174
|
+
$[13] = t5;
|
|
175
|
+
} else t5 = $[13];
|
|
176
|
+
return t5;
|
|
149
177
|
};
|
|
150
178
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
179
|
+
* A hidden live region that announces its children once while the popup is
|
|
180
|
+
* loading, such as "Loading the rate".
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* <Popover.Status>Loading the rate</Popover.Status>
|
|
153
184
|
*/
|
|
154
|
-
var
|
|
155
|
-
const $ = c(
|
|
185
|
+
var Status = (t0) => {
|
|
186
|
+
const $ = c(16);
|
|
156
187
|
let children;
|
|
157
188
|
let className;
|
|
158
|
-
let loadingLabel;
|
|
159
189
|
let props;
|
|
190
|
+
let ref;
|
|
191
|
+
let render;
|
|
192
|
+
if ($[0] !== t0) {
|
|
193
|
+
({render, className, ref, children, ...props} = t0);
|
|
194
|
+
$[0] = t0;
|
|
195
|
+
$[1] = children;
|
|
196
|
+
$[2] = className;
|
|
197
|
+
$[3] = props;
|
|
198
|
+
$[4] = ref;
|
|
199
|
+
$[5] = render;
|
|
200
|
+
} else {
|
|
201
|
+
children = $[1];
|
|
202
|
+
className = $[2];
|
|
203
|
+
props = $[3];
|
|
204
|
+
ref = $[4];
|
|
205
|
+
render = $[5];
|
|
206
|
+
}
|
|
207
|
+
const loading = useContext(LoadingContext);
|
|
160
208
|
let t1;
|
|
209
|
+
if ($[6] !== className) {
|
|
210
|
+
t1 = clsx(popover_module_default.visuallyHidden, className);
|
|
211
|
+
$[6] = className;
|
|
212
|
+
$[7] = t1;
|
|
213
|
+
} else t1 = $[7];
|
|
214
|
+
const t2 = loading ? children : null;
|
|
215
|
+
let t3;
|
|
216
|
+
if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
|
|
217
|
+
t3 = {
|
|
218
|
+
role: "status",
|
|
219
|
+
...props,
|
|
220
|
+
className: t1,
|
|
221
|
+
children: t2
|
|
222
|
+
};
|
|
223
|
+
$[8] = props;
|
|
224
|
+
$[9] = t1;
|
|
225
|
+
$[10] = t2;
|
|
226
|
+
$[11] = t3;
|
|
227
|
+
} else t3 = $[11];
|
|
228
|
+
let t4;
|
|
229
|
+
if ($[12] !== ref || $[13] !== render || $[14] !== t3) {
|
|
230
|
+
t4 = {
|
|
231
|
+
defaultTagName: "span",
|
|
232
|
+
render,
|
|
233
|
+
ref,
|
|
234
|
+
props: t3
|
|
235
|
+
};
|
|
236
|
+
$[12] = ref;
|
|
237
|
+
$[13] = render;
|
|
238
|
+
$[14] = t3;
|
|
239
|
+
$[15] = t4;
|
|
240
|
+
} else t4 = $[15];
|
|
241
|
+
return useRender(t4);
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Text inside a `Title` or a `RowValue` that draws as a placeholder of its
|
|
245
|
+
* width while the popup is loading, and stays readable to assistive tech.
|
|
246
|
+
* Otherwise it renders its children as they are.
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* <Popover.RowValue numeric><Popover.Skeleton>{rate.data?.base}</Popover.Skeleton></Popover.RowValue>
|
|
250
|
+
*/
|
|
251
|
+
var PopoverSkeleton = (t0) => {
|
|
252
|
+
const $ = c(25);
|
|
253
|
+
let children;
|
|
254
|
+
let className;
|
|
255
|
+
let props;
|
|
256
|
+
let ref;
|
|
257
|
+
let render;
|
|
161
258
|
if ($[0] !== t0) {
|
|
162
|
-
({
|
|
259
|
+
({render, className, ref, children, ...props} = t0);
|
|
163
260
|
$[0] = t0;
|
|
164
261
|
$[1] = children;
|
|
165
262
|
$[2] = className;
|
|
166
|
-
$[3] =
|
|
167
|
-
$[4] =
|
|
168
|
-
$[5] =
|
|
263
|
+
$[3] = props;
|
|
264
|
+
$[4] = ref;
|
|
265
|
+
$[5] = render;
|
|
169
266
|
} else {
|
|
170
267
|
children = $[1];
|
|
171
268
|
className = $[2];
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
269
|
+
props = $[3];
|
|
270
|
+
ref = $[4];
|
|
271
|
+
render = $[5];
|
|
175
272
|
}
|
|
176
|
-
const loading =
|
|
273
|
+
const loading = useContext(LoadingContext);
|
|
274
|
+
let t1;
|
|
275
|
+
if ($[6] !== className) {
|
|
276
|
+
t1 = clsx(popover_module_default.skeletonText, className);
|
|
277
|
+
$[6] = className;
|
|
278
|
+
$[7] = t1;
|
|
279
|
+
} else t1 = $[7];
|
|
177
280
|
let t2;
|
|
178
|
-
if ($[
|
|
179
|
-
t2 = {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
};
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
} else t2 = $[
|
|
186
|
-
const busy = useBusyPhase(t2) !== "fresh";
|
|
281
|
+
if ($[8] !== children) {
|
|
282
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
283
|
+
className: popover_module_default.skeletonTextContent,
|
|
284
|
+
children
|
|
285
|
+
});
|
|
286
|
+
$[8] = children;
|
|
287
|
+
$[9] = t2;
|
|
288
|
+
} else t2 = $[9];
|
|
187
289
|
let t3;
|
|
188
|
-
if ($[
|
|
189
|
-
t3 =
|
|
190
|
-
$[
|
|
191
|
-
|
|
192
|
-
} else t3 = $[9];
|
|
290
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
291
|
+
t3 = /* @__PURE__ */ jsx(Skeleton, { className: popover_module_default.skeletonTextOverlay });
|
|
292
|
+
$[10] = t3;
|
|
293
|
+
} else t3 = $[10];
|
|
193
294
|
let t4;
|
|
194
|
-
if ($[
|
|
195
|
-
t4 =
|
|
196
|
-
|
|
197
|
-
children
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
})
|
|
201
|
-
}) : null;
|
|
202
|
-
$[10] = busy;
|
|
203
|
-
$[11] = loadingLabel;
|
|
295
|
+
if ($[11] !== children) {
|
|
296
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
297
|
+
className: popover_module_default.visuallyHidden,
|
|
298
|
+
children
|
|
299
|
+
});
|
|
300
|
+
$[11] = children;
|
|
204
301
|
$[12] = t4;
|
|
205
302
|
} else t4 = $[12];
|
|
206
303
|
let t5;
|
|
207
|
-
if ($[13] !==
|
|
208
|
-
t5 = /* @__PURE__ */
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
$[
|
|
304
|
+
if ($[13] !== t2 || $[14] !== t4) {
|
|
305
|
+
t5 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
306
|
+
t2,
|
|
307
|
+
t3,
|
|
308
|
+
t4
|
|
309
|
+
] });
|
|
310
|
+
$[13] = t2;
|
|
311
|
+
$[14] = t4;
|
|
214
312
|
$[15] = t5;
|
|
215
313
|
} else t5 = $[15];
|
|
216
314
|
let t6;
|
|
217
|
-
if ($[16] !== props || $[17] !==
|
|
218
|
-
t6 =
|
|
219
|
-
className: t3,
|
|
315
|
+
if ($[16] !== props || $[17] !== t1 || $[18] !== t5) {
|
|
316
|
+
t6 = {
|
|
220
317
|
...props,
|
|
221
|
-
|
|
222
|
-
|
|
318
|
+
className: t1,
|
|
319
|
+
children: t5
|
|
320
|
+
};
|
|
223
321
|
$[16] = props;
|
|
224
|
-
$[17] =
|
|
225
|
-
$[18] =
|
|
226
|
-
$[19] =
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
322
|
+
$[17] = t1;
|
|
323
|
+
$[18] = t5;
|
|
324
|
+
$[19] = t6;
|
|
325
|
+
} else t6 = $[19];
|
|
326
|
+
let t7;
|
|
327
|
+
if ($[20] !== loading || $[21] !== ref || $[22] !== render || $[23] !== t6) {
|
|
328
|
+
t7 = {
|
|
329
|
+
defaultTagName: "span",
|
|
330
|
+
render,
|
|
331
|
+
ref,
|
|
332
|
+
enabled: loading,
|
|
333
|
+
props: t6
|
|
334
|
+
};
|
|
335
|
+
$[20] = loading;
|
|
336
|
+
$[21] = ref;
|
|
337
|
+
$[22] = render;
|
|
338
|
+
$[23] = t6;
|
|
339
|
+
$[24] = t7;
|
|
340
|
+
} else t7 = $[24];
|
|
341
|
+
const element = useRender(t7);
|
|
342
|
+
return loading ? element : children;
|
|
230
343
|
};
|
|
231
|
-
/**
|
|
344
|
+
/**
|
|
345
|
+
* The arrow pointing from the popup at its trigger: the kit's own shape, or the
|
|
346
|
+
* children given in its place.
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* <Popover.Arrow />
|
|
350
|
+
*/
|
|
232
351
|
var Arrow = (t0) => {
|
|
233
|
-
const $ = c(
|
|
352
|
+
const $ = c(12);
|
|
353
|
+
let children;
|
|
234
354
|
let className;
|
|
235
355
|
let props;
|
|
236
356
|
if ($[0] !== t0) {
|
|
237
|
-
({className, ...props} = t0);
|
|
357
|
+
({className, children, ...props} = t0);
|
|
238
358
|
$[0] = t0;
|
|
239
|
-
$[1] =
|
|
240
|
-
$[2] =
|
|
359
|
+
$[1] = children;
|
|
360
|
+
$[2] = className;
|
|
361
|
+
$[3] = props;
|
|
241
362
|
} else {
|
|
242
|
-
|
|
243
|
-
|
|
363
|
+
children = $[1];
|
|
364
|
+
className = $[2];
|
|
365
|
+
props = $[3];
|
|
244
366
|
}
|
|
245
367
|
let t1;
|
|
246
|
-
if ($[
|
|
368
|
+
if ($[4] !== className) {
|
|
247
369
|
t1 = clsx(popover_module_default.arrow, className);
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
} else t1 = $[
|
|
370
|
+
$[4] = className;
|
|
371
|
+
$[5] = t1;
|
|
372
|
+
} else t1 = $[5];
|
|
251
373
|
let t2;
|
|
252
|
-
if ($[
|
|
253
|
-
t2 = /* @__PURE__ */ jsx("svg", {
|
|
374
|
+
if ($[6] !== children) {
|
|
375
|
+
t2 = children ?? /* @__PURE__ */ jsx("svg", {
|
|
254
376
|
width: "16",
|
|
255
377
|
height: "8",
|
|
256
378
|
viewBox: "0 0 16 8",
|
|
@@ -260,71 +382,54 @@ var Arrow = (t0) => {
|
|
|
260
382
|
d: "M0 9 V8 L8 0 L16 8 V9 Z"
|
|
261
383
|
})
|
|
262
384
|
});
|
|
263
|
-
$[
|
|
264
|
-
|
|
385
|
+
$[6] = children;
|
|
386
|
+
$[7] = t2;
|
|
387
|
+
} else t2 = $[7];
|
|
265
388
|
let t3;
|
|
266
|
-
if ($[
|
|
389
|
+
if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
|
|
267
390
|
t3 = /* @__PURE__ */ jsx(Popover.Arrow, {
|
|
268
391
|
className: t1,
|
|
269
392
|
...props,
|
|
270
393
|
children: t2
|
|
271
394
|
});
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
|
|
395
|
+
$[8] = props;
|
|
396
|
+
$[9] = t1;
|
|
397
|
+
$[10] = t2;
|
|
398
|
+
$[11] = t3;
|
|
399
|
+
} else t3 = $[11];
|
|
276
400
|
return t3;
|
|
277
401
|
};
|
|
278
402
|
/** The popover's heading, which names it. */
|
|
279
403
|
var Title = (t0) => {
|
|
280
|
-
const $ = c(
|
|
281
|
-
let children;
|
|
404
|
+
const $ = c(8);
|
|
282
405
|
let className;
|
|
283
406
|
let props;
|
|
284
407
|
if ($[0] !== t0) {
|
|
285
|
-
({className,
|
|
408
|
+
({className, ...props} = t0);
|
|
286
409
|
$[0] = t0;
|
|
287
|
-
$[1] =
|
|
288
|
-
$[2] =
|
|
289
|
-
$[3] = props;
|
|
410
|
+
$[1] = className;
|
|
411
|
+
$[2] = props;
|
|
290
412
|
} else {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
props = $[3];
|
|
413
|
+
className = $[1];
|
|
414
|
+
props = $[2];
|
|
294
415
|
}
|
|
295
|
-
const loading = useContext(LoadingContext);
|
|
296
416
|
let t1;
|
|
297
|
-
if ($[
|
|
417
|
+
if ($[3] !== className) {
|
|
298
418
|
t1 = clsx(popover_module_default.title, className);
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
} else t1 = $[
|
|
419
|
+
$[3] = className;
|
|
420
|
+
$[4] = t1;
|
|
421
|
+
} else t1 = $[4];
|
|
302
422
|
let t2;
|
|
303
|
-
if ($[
|
|
304
|
-
t2 =
|
|
305
|
-
className: popover_module_default.titleSkeleton,
|
|
306
|
-
children
|
|
307
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
308
|
-
className: popover_module_default.visuallyHidden,
|
|
309
|
-
children
|
|
310
|
-
})] }) : children;
|
|
311
|
-
$[6] = children;
|
|
312
|
-
$[7] = loading;
|
|
313
|
-
$[8] = t2;
|
|
314
|
-
} else t2 = $[8];
|
|
315
|
-
let t3;
|
|
316
|
-
if ($[9] !== props || $[10] !== t1 || $[11] !== t2) {
|
|
317
|
-
t3 = /* @__PURE__ */ jsx(Popover.Title, {
|
|
423
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
424
|
+
t2 = /* @__PURE__ */ jsx(Popover.Title, {
|
|
318
425
|
className: t1,
|
|
319
|
-
...props
|
|
320
|
-
children: t2
|
|
426
|
+
...props
|
|
321
427
|
});
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
return t3;
|
|
428
|
+
$[5] = props;
|
|
429
|
+
$[6] = t1;
|
|
430
|
+
$[7] = t2;
|
|
431
|
+
} else t2 = $[7];
|
|
432
|
+
return t2;
|
|
328
433
|
};
|
|
329
434
|
/** A table of `Row`s whose labels and values line up in two columns. */
|
|
330
435
|
var Rows = (t0) => {
|
|
@@ -422,124 +527,130 @@ var RowLabel = (t0) => {
|
|
|
422
527
|
} else t2 = $[7];
|
|
423
528
|
return t2;
|
|
424
529
|
};
|
|
425
|
-
/** The row's value, beside its label
|
|
530
|
+
/** The row's value, beside its label. */
|
|
426
531
|
var RowValue = (t0) => {
|
|
427
|
-
const $ = c(
|
|
428
|
-
let children;
|
|
532
|
+
const $ = c(10);
|
|
429
533
|
let className;
|
|
430
534
|
let numeric;
|
|
431
535
|
let props;
|
|
432
536
|
if ($[0] !== t0) {
|
|
433
|
-
({numeric, className,
|
|
537
|
+
({numeric, className, ...props} = t0);
|
|
434
538
|
$[0] = t0;
|
|
435
|
-
$[1] =
|
|
436
|
-
$[2] =
|
|
437
|
-
$[3] =
|
|
438
|
-
$[4] = props;
|
|
539
|
+
$[1] = className;
|
|
540
|
+
$[2] = numeric;
|
|
541
|
+
$[3] = props;
|
|
439
542
|
} else {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
props = $[4];
|
|
543
|
+
className = $[1];
|
|
544
|
+
numeric = $[2];
|
|
545
|
+
props = $[3];
|
|
444
546
|
}
|
|
445
|
-
const loading = useContext(LoadingContext);
|
|
446
547
|
let t1;
|
|
447
|
-
if ($[
|
|
548
|
+
if ($[4] !== className) {
|
|
448
549
|
t1 = clsx(popover_module_default.rowValue, className);
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
} else t1 = $[
|
|
550
|
+
$[4] = className;
|
|
551
|
+
$[5] = t1;
|
|
552
|
+
} else t1 = $[5];
|
|
452
553
|
const t2 = numeric || void 0;
|
|
453
554
|
let t3;
|
|
454
|
-
if ($[7] !==
|
|
455
|
-
t3 =
|
|
456
|
-
className: popover_module_default.valueSkeleton,
|
|
457
|
-
children
|
|
458
|
-
}) : children;
|
|
459
|
-
$[7] = children;
|
|
460
|
-
$[8] = loading;
|
|
461
|
-
$[9] = t3;
|
|
462
|
-
} else t3 = $[9];
|
|
463
|
-
let t4;
|
|
464
|
-
if ($[10] !== props || $[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
|
|
465
|
-
t4 = /* @__PURE__ */ jsx("span", {
|
|
555
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== t2) {
|
|
556
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
466
557
|
className: t1,
|
|
467
558
|
"data-numeric": t2,
|
|
468
|
-
...props
|
|
469
|
-
children: t3
|
|
559
|
+
...props
|
|
470
560
|
});
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
return t4;
|
|
561
|
+
$[6] = props;
|
|
562
|
+
$[7] = t1;
|
|
563
|
+
$[8] = t2;
|
|
564
|
+
$[9] = t3;
|
|
565
|
+
} else t3 = $[9];
|
|
566
|
+
return t3;
|
|
478
567
|
};
|
|
479
|
-
/**
|
|
568
|
+
/**
|
|
569
|
+
* `Portal`, `Positioner` and `Popup` in one: the popover's surface, placed
|
|
570
|
+
* against its trigger. With a `loadingLabel` it holds the `Status` that
|
|
571
|
+
* announces it.
|
|
572
|
+
*/
|
|
480
573
|
var Content = (t0) => {
|
|
481
|
-
const $ = c(
|
|
574
|
+
const $ = c(24);
|
|
482
575
|
let align;
|
|
483
576
|
let alignOffset;
|
|
577
|
+
let children;
|
|
484
578
|
let container;
|
|
579
|
+
let loadingLabel;
|
|
485
580
|
let props;
|
|
486
581
|
let side;
|
|
487
582
|
let sideOffset;
|
|
488
583
|
if ($[0] !== t0) {
|
|
489
|
-
({container, side, sideOffset, align, alignOffset, ...props} = t0);
|
|
584
|
+
({container, side, sideOffset, align, alignOffset, loadingLabel, children, ...props} = t0);
|
|
490
585
|
$[0] = t0;
|
|
491
586
|
$[1] = align;
|
|
492
587
|
$[2] = alignOffset;
|
|
493
|
-
$[3] =
|
|
494
|
-
$[4] =
|
|
495
|
-
$[5] =
|
|
496
|
-
$[6] =
|
|
588
|
+
$[3] = children;
|
|
589
|
+
$[4] = container;
|
|
590
|
+
$[5] = loadingLabel;
|
|
591
|
+
$[6] = props;
|
|
592
|
+
$[7] = side;
|
|
593
|
+
$[8] = sideOffset;
|
|
497
594
|
} else {
|
|
498
595
|
align = $[1];
|
|
499
596
|
alignOffset = $[2];
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
597
|
+
children = $[3];
|
|
598
|
+
container = $[4];
|
|
599
|
+
loadingLabel = $[5];
|
|
600
|
+
props = $[6];
|
|
601
|
+
side = $[7];
|
|
602
|
+
sideOffset = $[8];
|
|
504
603
|
}
|
|
505
604
|
let t1;
|
|
506
|
-
if ($[
|
|
507
|
-
t1 = /* @__PURE__ */ jsx(
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
} else t1 = $[
|
|
605
|
+
if ($[9] !== loadingLabel) {
|
|
606
|
+
t1 = loadingLabel === void 0 ? null : /* @__PURE__ */ jsx(Status, { children: loadingLabel });
|
|
607
|
+
$[9] = loadingLabel;
|
|
608
|
+
$[10] = t1;
|
|
609
|
+
} else t1 = $[10];
|
|
511
610
|
let t2;
|
|
512
|
-
if ($[
|
|
513
|
-
t2 = /* @__PURE__ */
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
align,
|
|
517
|
-
alignOffset,
|
|
518
|
-
children: t1
|
|
611
|
+
if ($[11] !== children || $[12] !== props || $[13] !== t1) {
|
|
612
|
+
t2 = /* @__PURE__ */ jsxs(Popup, {
|
|
613
|
+
...props,
|
|
614
|
+
children: [t1, children]
|
|
519
615
|
});
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[11] = side;
|
|
523
|
-
$[12] = sideOffset;
|
|
616
|
+
$[11] = children;
|
|
617
|
+
$[12] = props;
|
|
524
618
|
$[13] = t1;
|
|
525
619
|
$[14] = t2;
|
|
526
620
|
} else t2 = $[14];
|
|
527
621
|
let t3;
|
|
528
|
-
if ($[15] !==
|
|
529
|
-
t3 = /* @__PURE__ */ jsx(
|
|
530
|
-
|
|
622
|
+
if ($[15] !== align || $[16] !== alignOffset || $[17] !== side || $[18] !== sideOffset || $[19] !== t2) {
|
|
623
|
+
t3 = /* @__PURE__ */ jsx(Positioner, {
|
|
624
|
+
side,
|
|
625
|
+
sideOffset,
|
|
626
|
+
align,
|
|
627
|
+
alignOffset,
|
|
531
628
|
children: t2
|
|
532
629
|
});
|
|
533
|
-
$[15] =
|
|
534
|
-
$[16] =
|
|
535
|
-
$[17] =
|
|
536
|
-
|
|
537
|
-
|
|
630
|
+
$[15] = align;
|
|
631
|
+
$[16] = alignOffset;
|
|
632
|
+
$[17] = side;
|
|
633
|
+
$[18] = sideOffset;
|
|
634
|
+
$[19] = t2;
|
|
635
|
+
$[20] = t3;
|
|
636
|
+
} else t3 = $[20];
|
|
637
|
+
let t4;
|
|
638
|
+
if ($[21] !== container || $[22] !== t3) {
|
|
639
|
+
t4 = /* @__PURE__ */ jsx(Popover.Portal, {
|
|
640
|
+
container,
|
|
641
|
+
children: t3
|
|
642
|
+
});
|
|
643
|
+
$[21] = container;
|
|
644
|
+
$[22] = t3;
|
|
645
|
+
$[23] = t4;
|
|
646
|
+
} else t4 = $[23];
|
|
647
|
+
return t4;
|
|
538
648
|
};
|
|
539
649
|
/**
|
|
540
650
|
* A rich popover over base-ui's `Popover`, with a `Title` and rows of labelled
|
|
541
|
-
* values. `Content` bundles the portal, positioner and popup
|
|
542
|
-
* parts stay.
|
|
651
|
+
* values. `Content` bundles the portal, positioner and popup, and the `Status`
|
|
652
|
+
* for a `loadingLabel`; the unbundled parts stay. While loading, text wrapped in
|
|
653
|
+
* a `Skeleton` draws as a placeholder.
|
|
543
654
|
*
|
|
544
655
|
* @example
|
|
545
656
|
* <Popover.Root>
|
|
@@ -552,7 +663,9 @@ var Content = (t0) => {
|
|
|
552
663
|
* <Popover.Rows>
|
|
553
664
|
* <Popover.Row>
|
|
554
665
|
* <Popover.RowLabel>Base</Popover.RowLabel>
|
|
555
|
-
* <Popover.RowValue numeric>
|
|
666
|
+
* <Popover.RowValue numeric>
|
|
667
|
+
* <Popover.Skeleton>{rate.data?.base}</Popover.Skeleton>
|
|
668
|
+
* </Popover.RowValue>
|
|
556
669
|
* </Popover.Row>
|
|
557
670
|
* </Popover.Rows>
|
|
558
671
|
* </Popover.Content>
|
|
@@ -565,6 +678,8 @@ var Popover$1 = {
|
|
|
565
678
|
Positioner,
|
|
566
679
|
Popup,
|
|
567
680
|
Content,
|
|
681
|
+
Status,
|
|
682
|
+
Skeleton: PopoverSkeleton,
|
|
568
683
|
Arrow,
|
|
569
684
|
Title,
|
|
570
685
|
Rows,
|