@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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button } from "../button/button.js";
|
|
2
1
|
import { fieldStateAttributes } from "../field/field-state.js";
|
|
3
2
|
import { PhotoInputContext, usePhotoInput } from "./photo-input-context.js";
|
|
4
3
|
import photo_input_module_default from "./photo-input.module.js";
|
|
5
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useId, useRef, useState } from "react";
|
|
@@ -294,59 +294,121 @@ var PhotoInputWell = (t0) => {
|
|
|
294
294
|
} else t9 = $[12];
|
|
295
295
|
return t9;
|
|
296
296
|
};
|
|
297
|
-
/**
|
|
297
|
+
/**
|
|
298
|
+
* The picture inside the well, holding the picked photo's `Image` and the
|
|
299
|
+
* `Fallback` shown until one is picked.
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* <PhotoInput.Face>
|
|
303
|
+
* <PhotoInput.Image alt="Preview" />
|
|
304
|
+
* <PhotoInput.Fallback><Avatar name={user.name} /></PhotoInput.Fallback>
|
|
305
|
+
* </PhotoInput.Face>
|
|
306
|
+
*/
|
|
298
307
|
var PhotoInputFace = (t0) => {
|
|
299
|
-
const $ = c(
|
|
308
|
+
const $ = c(8);
|
|
309
|
+
let className;
|
|
310
|
+
let props;
|
|
311
|
+
if ($[0] !== t0) {
|
|
312
|
+
({className, ...props} = t0);
|
|
313
|
+
$[0] = t0;
|
|
314
|
+
$[1] = className;
|
|
315
|
+
$[2] = props;
|
|
316
|
+
} else {
|
|
317
|
+
className = $[1];
|
|
318
|
+
props = $[2];
|
|
319
|
+
}
|
|
320
|
+
let t1;
|
|
321
|
+
if ($[3] !== className) {
|
|
322
|
+
t1 = clsx(photo_input_module_default.face, className);
|
|
323
|
+
$[3] = className;
|
|
324
|
+
$[4] = t1;
|
|
325
|
+
} else t1 = $[4];
|
|
326
|
+
let t2;
|
|
327
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
328
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
329
|
+
className: t1,
|
|
330
|
+
...props
|
|
331
|
+
});
|
|
332
|
+
$[5] = props;
|
|
333
|
+
$[6] = t1;
|
|
334
|
+
$[7] = t2;
|
|
335
|
+
} else t2 = $[7];
|
|
336
|
+
return t2;
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* The picked photo. Renders nothing until one is picked.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* <PhotoInput.Image alt="Preview" />
|
|
343
|
+
*/
|
|
344
|
+
var PhotoInputImage = (t0) => {
|
|
345
|
+
const $ = c(8);
|
|
346
|
+
let alt;
|
|
347
|
+
let props;
|
|
348
|
+
if ($[0] !== t0) {
|
|
349
|
+
({alt, ...props} = t0);
|
|
350
|
+
$[0] = t0;
|
|
351
|
+
$[1] = alt;
|
|
352
|
+
$[2] = props;
|
|
353
|
+
} else {
|
|
354
|
+
alt = $[1];
|
|
355
|
+
props = $[2];
|
|
356
|
+
}
|
|
357
|
+
const { value } = usePhotoInput();
|
|
358
|
+
const previewSource = usePreviewSource(value);
|
|
359
|
+
let t1;
|
|
360
|
+
if ($[3] !== alt || $[4] !== previewSource || $[5] !== props || $[6] !== value) {
|
|
361
|
+
t1 = value === void 0 ? null : /* @__PURE__ */ jsx("img", {
|
|
362
|
+
ref: previewSource,
|
|
363
|
+
alt,
|
|
364
|
+
...props
|
|
365
|
+
});
|
|
366
|
+
$[3] = alt;
|
|
367
|
+
$[4] = previewSource;
|
|
368
|
+
$[5] = props;
|
|
369
|
+
$[6] = value;
|
|
370
|
+
$[7] = t1;
|
|
371
|
+
} else t1 = $[7];
|
|
372
|
+
return t1;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* What the face shows until a photo is picked, such as a placeholder or the
|
|
376
|
+
* stored photo. Renders nothing once one is picked, or without children.
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* <PhotoInput.Fallback><Avatar name={user.name} /></PhotoInput.Fallback>
|
|
380
|
+
*/
|
|
381
|
+
var PhotoInputFallback = (t0) => {
|
|
382
|
+
const $ = c(9);
|
|
300
383
|
let children;
|
|
301
384
|
let className;
|
|
302
|
-
let previewLabel;
|
|
303
385
|
let props;
|
|
304
386
|
if ($[0] !== t0) {
|
|
305
|
-
({
|
|
387
|
+
({className, children, ...props} = t0);
|
|
306
388
|
$[0] = t0;
|
|
307
389
|
$[1] = children;
|
|
308
390
|
$[2] = className;
|
|
309
|
-
$[3] =
|
|
310
|
-
$[4] = props;
|
|
391
|
+
$[3] = props;
|
|
311
392
|
} else {
|
|
312
393
|
children = $[1];
|
|
313
394
|
className = $[2];
|
|
314
|
-
|
|
315
|
-
props = $[4];
|
|
395
|
+
props = $[3];
|
|
316
396
|
}
|
|
317
397
|
const { value } = usePhotoInput();
|
|
318
|
-
const previewSource = usePreviewSource(value);
|
|
319
398
|
let t1;
|
|
320
|
-
if ($[5] !== className) {
|
|
321
|
-
t1 =
|
|
322
|
-
|
|
323
|
-
$[6] = t1;
|
|
324
|
-
} else t1 = $[6];
|
|
325
|
-
let t2;
|
|
326
|
-
if ($[7] !== children || $[8] !== previewLabel || $[9] !== previewSource || $[10] !== value) {
|
|
327
|
-
t2 = value === void 0 ? children : /* @__PURE__ */ jsx("img", {
|
|
328
|
-
ref: previewSource,
|
|
329
|
-
alt: previewLabel
|
|
330
|
-
});
|
|
331
|
-
$[7] = children;
|
|
332
|
-
$[8] = previewLabel;
|
|
333
|
-
$[9] = previewSource;
|
|
334
|
-
$[10] = value;
|
|
335
|
-
$[11] = t2;
|
|
336
|
-
} else t2 = $[11];
|
|
337
|
-
let t3;
|
|
338
|
-
if ($[12] !== props || $[13] !== t1 || $[14] !== t2) {
|
|
339
|
-
t3 = /* @__PURE__ */ jsx("span", {
|
|
340
|
-
className: t1,
|
|
399
|
+
if ($[4] !== children || $[5] !== className || $[6] !== props || $[7] !== value) {
|
|
400
|
+
t1 = value !== void 0 || children === void 0 || children === null || children === false ? null : /* @__PURE__ */ jsx("span", {
|
|
401
|
+
className: clsx(photo_input_module_default.fallback, className),
|
|
341
402
|
...props,
|
|
342
|
-
children
|
|
403
|
+
children
|
|
343
404
|
});
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
|
|
349
|
-
|
|
405
|
+
$[4] = children;
|
|
406
|
+
$[5] = className;
|
|
407
|
+
$[6] = props;
|
|
408
|
+
$[7] = value;
|
|
409
|
+
$[8] = t1;
|
|
410
|
+
} else t1 = $[8];
|
|
411
|
+
return t1;
|
|
350
412
|
};
|
|
351
413
|
/** The badge on the well's rim. Its children are the icon, such as a camera; without them, or read-only, it renders nothing. */
|
|
352
414
|
var PhotoInputBadge = (t0) => {
|
|
@@ -388,66 +450,82 @@ var PhotoInputBadge = (t0) => {
|
|
|
388
450
|
} else t2 = $[9];
|
|
389
451
|
return t2;
|
|
390
452
|
};
|
|
391
|
-
/**
|
|
453
|
+
/**
|
|
454
|
+
* The button on the rim that removes a picked photo. It renders whichever
|
|
455
|
+
* button it is given, only while a photo is picked.
|
|
456
|
+
*
|
|
457
|
+
* @example
|
|
458
|
+
* <PhotoInput.Remove
|
|
459
|
+
* render={
|
|
460
|
+
* <IconButton label="Remove photo" variant="secondary">
|
|
461
|
+
* <CloseIcon />
|
|
462
|
+
* </IconButton>
|
|
463
|
+
* }
|
|
464
|
+
* />
|
|
465
|
+
*/
|
|
392
466
|
var PhotoInputRemove = (t0) => {
|
|
393
|
-
const $ = c(
|
|
467
|
+
const $ = c(18);
|
|
394
468
|
let className;
|
|
395
|
-
let icon;
|
|
396
|
-
let label;
|
|
397
469
|
let onClick;
|
|
398
470
|
let props;
|
|
471
|
+
let render;
|
|
399
472
|
if ($[0] !== t0) {
|
|
400
|
-
({
|
|
473
|
+
({render, className, onClick, ...props} = t0);
|
|
401
474
|
$[0] = t0;
|
|
402
475
|
$[1] = className;
|
|
403
|
-
$[2] =
|
|
404
|
-
$[3] =
|
|
405
|
-
$[4] =
|
|
406
|
-
$[5] = props;
|
|
476
|
+
$[2] = onClick;
|
|
477
|
+
$[3] = props;
|
|
478
|
+
$[4] = render;
|
|
407
479
|
} else {
|
|
408
480
|
className = $[1];
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
props = $[5];
|
|
481
|
+
onClick = $[2];
|
|
482
|
+
props = $[3];
|
|
483
|
+
render = $[4];
|
|
413
484
|
}
|
|
414
485
|
const { value, readOnly, remove } = usePhotoInput();
|
|
415
|
-
|
|
416
|
-
let t1;
|
|
417
|
-
if ($[6] !== className) {
|
|
418
|
-
t1 = clsx(photo_input_module_default.remove, className);
|
|
419
|
-
$[6] = className;
|
|
420
|
-
$[7] = t1;
|
|
421
|
-
} else t1 = $[7];
|
|
486
|
+
const t1 = !readOnly && value !== void 0;
|
|
422
487
|
let t2;
|
|
423
|
-
if ($[
|
|
424
|
-
t2 = (
|
|
488
|
+
if ($[5] !== className) {
|
|
489
|
+
t2 = clsx(photo_input_module_default.remove, className);
|
|
490
|
+
$[5] = className;
|
|
491
|
+
$[6] = t2;
|
|
492
|
+
} else t2 = $[6];
|
|
493
|
+
let t3;
|
|
494
|
+
if ($[7] !== onClick || $[8] !== remove) {
|
|
495
|
+
t3 = (event) => {
|
|
425
496
|
onClick?.(event);
|
|
426
497
|
remove();
|
|
427
498
|
};
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
$[
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
499
|
+
$[7] = onClick;
|
|
500
|
+
$[8] = remove;
|
|
501
|
+
$[9] = t3;
|
|
502
|
+
} else t3 = $[9];
|
|
503
|
+
let t4;
|
|
504
|
+
if ($[10] !== props || $[11] !== t2 || $[12] !== t3) {
|
|
505
|
+
t4 = {
|
|
506
|
+
type: "button",
|
|
507
|
+
...props,
|
|
508
|
+
className: t2,
|
|
509
|
+
onClick: t3
|
|
510
|
+
};
|
|
511
|
+
$[10] = props;
|
|
512
|
+
$[11] = t2;
|
|
513
|
+
$[12] = t3;
|
|
514
|
+
$[13] = t4;
|
|
515
|
+
} else t4 = $[13];
|
|
516
|
+
let t5;
|
|
517
|
+
if ($[14] !== render || $[15] !== t1 || $[16] !== t4) {
|
|
518
|
+
t5 = {
|
|
519
|
+
render,
|
|
520
|
+
enabled: t1,
|
|
521
|
+
props: t4
|
|
522
|
+
};
|
|
523
|
+
$[14] = render;
|
|
524
|
+
$[15] = t1;
|
|
525
|
+
$[16] = t4;
|
|
526
|
+
$[17] = t5;
|
|
527
|
+
} else t5 = $[17];
|
|
528
|
+
return useRender(t5);
|
|
451
529
|
};
|
|
452
530
|
/** The hidden text that describes the well, saying whether a photo is set. */
|
|
453
531
|
var PhotoInputValueText = (t0) => {
|
|
@@ -502,12 +580,19 @@ var PhotoInputValueText = (t0) => {
|
|
|
502
580
|
* @example
|
|
503
581
|
* <PhotoInput.Root labelledBy={labelId} value={file} onValueChange={setFile}>
|
|
504
582
|
* <PhotoInput.Well>
|
|
505
|
-
* <PhotoInput.Face
|
|
506
|
-
* <
|
|
583
|
+
* <PhotoInput.Face>
|
|
584
|
+
* <PhotoInput.Image alt="Preview" />
|
|
585
|
+
* <PhotoInput.Fallback><Avatar name={user.name} /></PhotoInput.Fallback>
|
|
507
586
|
* </PhotoInput.Face>
|
|
508
587
|
* <PhotoInput.Badge><PhotoCameraIcon /></PhotoInput.Badge>
|
|
509
588
|
* </PhotoInput.Well>
|
|
510
|
-
* <PhotoInput.Remove
|
|
589
|
+
* <PhotoInput.Remove
|
|
590
|
+
* render={
|
|
591
|
+
* <IconButton label="Remove photo" variant="secondary">
|
|
592
|
+
* <CloseIcon />
|
|
593
|
+
* </IconButton>
|
|
594
|
+
* }
|
|
595
|
+
* />
|
|
511
596
|
* <PhotoInput.ValueText photoSetLabel="Photo set" noPhotoLabel="No photo" />
|
|
512
597
|
* </PhotoInput.Root>
|
|
513
598
|
*/
|
|
@@ -515,6 +600,8 @@ var PhotoInput = {
|
|
|
515
600
|
Root: PhotoInputRoot,
|
|
516
601
|
Well: PhotoInputWell,
|
|
517
602
|
Face: PhotoInputFace,
|
|
603
|
+
Image: PhotoInputImage,
|
|
604
|
+
Fallback: PhotoInputFallback,
|
|
518
605
|
Badge: PhotoInputBadge,
|
|
519
606
|
Remove: PhotoInputRemove,
|
|
520
607
|
ValueText: PhotoInputValueText
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import './photo-input.css';// src/components/photo-field/photo-input.module.scss
|
|
2
|
-
var photoInput = "
|
|
3
|
-
var well = "
|
|
4
|
-
var face = "
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
2
|
+
var photoInput = "_photoInput_1l3vc_3";
|
|
3
|
+
var well = "_well_1l3vc_7";
|
|
4
|
+
var face = "_face_1l3vc_82";
|
|
5
|
+
var fallback = "_fallback_1l3vc_104";
|
|
6
|
+
var badge = "_badge_1l3vc_107";
|
|
7
|
+
var remove = "_remove_1l3vc_121";
|
|
8
|
+
var picker = "_picker_1l3vc_127";
|
|
9
|
+
var valueText = "_valueText_1l3vc_128";
|
|
9
10
|
var photo_input_module_default = {
|
|
10
11
|
photoInput,
|
|
11
12
|
well,
|
|
12
13
|
face,
|
|
14
|
+
fallback,
|
|
13
15
|
badge,
|
|
14
16
|
remove,
|
|
15
17
|
picker,
|
|
16
18
|
valueText
|
|
17
19
|
};
|
|
18
|
-
export { badge, photo_input_module_default as default, face, photoInput, picker, remove, valueText, well };
|
|
20
|
+
export { badge, photo_input_module_default as default, face, fallback, photoInput, picker, remove, valueText, well };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._positioner_1yoda_3 {
|
|
4
4
|
--_popup-edge-padding: var(
|
|
5
5
|
--popup-edge-padding,
|
|
6
6
|
var(--sys-unit-16)
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
inherits: false;
|
|
12
12
|
initial-value: 0px;
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
._positioner_1yoda_3 {
|
|
15
15
|
outline: none;
|
|
16
|
-
filter: var(--sys-elevation-1-filter);
|
|
16
|
+
filter: var(--popover-filter, var(--sys-elevation-1-filter));
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
._visuallyHidden_1yoda_18 {
|
|
19
19
|
position: absolute;
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
clip-path: inset(50%);
|
|
@@ -23,98 +23,98 @@
|
|
|
23
23
|
block-size: 1px;
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
._popup_1yoda_26 {
|
|
27
27
|
box-sizing: border-box;
|
|
28
28
|
min-inline-size: min(var(--popover-min-inline-size, 22rem), var(--available-width));
|
|
29
|
-
max-inline-size: min(28rem, var(--available-width));
|
|
29
|
+
max-inline-size: min(var(--popover-max-inline-size, 28rem), var(--available-width));
|
|
30
30
|
border: none;
|
|
31
31
|
border-radius: var(--popover-radius, var(--sys-radius-lg));
|
|
32
32
|
background: var(--popover-surface, var(--sys-color-surface-overlay));
|
|
33
33
|
padding: var(--popover-padding, var(--sys-unit-16));
|
|
34
|
-
color: var(--sys-color-text);
|
|
35
|
-
font: var(--sys-font-body-medium);
|
|
34
|
+
color: var(--popover-fg, var(--sys-color-text));
|
|
35
|
+
font: var(--popover-font, var(--sys-font-body-medium));
|
|
36
36
|
transform-origin: var(--transform-origin);
|
|
37
37
|
}
|
|
38
38
|
@media not (prefers-reduced-motion) {
|
|
39
|
-
.
|
|
39
|
+
._popup_1yoda_26 {
|
|
40
40
|
transition: opacity var(--sys-motion-instant) var(--sys-motion-standard), transform var(--sys-motion-instant) var(--sys-motion-standard);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
._popup_1yoda_26[data-starting-style], ._popup_1yoda_26[data-ending-style] {
|
|
44
44
|
opacity: 0;
|
|
45
45
|
transform: scale(0.96);
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
._arrow_1yoda_47 {
|
|
48
48
|
display: flex;
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
._arrow_1yoda_47[data-side=top] {
|
|
51
51
|
bottom: -8px;
|
|
52
52
|
transform: rotate(180deg);
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
._arrow_1yoda_47[data-side=bottom] {
|
|
55
55
|
top: -8px;
|
|
56
56
|
}
|
|
57
|
-
.
|
|
57
|
+
._arrow_1yoda_47[data-side=left] {
|
|
58
58
|
right: -12px;
|
|
59
59
|
transform: rotate(90deg);
|
|
60
60
|
}
|
|
61
|
-
.
|
|
61
|
+
._arrow_1yoda_47[data-side=right] {
|
|
62
62
|
left: -12px;
|
|
63
63
|
transform: rotate(-90deg);
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
._arrowFill_1yoda_65 {
|
|
66
66
|
fill: var(--popover-surface, var(--sys-color-surface-overlay));
|
|
67
67
|
}
|
|
68
|
-
.
|
|
69
|
-
margin-block-end: var(--sys-unit-8);
|
|
70
|
-
color: var(--sys-color-text);
|
|
71
|
-
font: var(--sys-font-label-large);
|
|
68
|
+
._title_1yoda_68 {
|
|
69
|
+
margin-block-end: var(--popover-title-space, var(--sys-unit-8));
|
|
70
|
+
color: var(--popover-title-fg, var(--popover-fg, var(--sys-color-text)));
|
|
71
|
+
font: var(--popover-title-font, var(--sys-font-label-large));
|
|
72
72
|
}
|
|
73
|
-
.
|
|
74
|
-
.
|
|
73
|
+
._rows_1yoda_73,
|
|
74
|
+
._row_1yoda_73 {
|
|
75
75
|
display: grid;
|
|
76
76
|
grid-template-columns: max-content minmax(0, 1fr);
|
|
77
77
|
align-items: baseline;
|
|
78
|
-
gap: var(--sys-unit-3);
|
|
78
|
+
gap: var(--popover-rows-gap, var(--sys-unit-3));
|
|
79
79
|
}
|
|
80
|
-
.
|
|
81
|
-
padding-block: var(--sys-unit-2);
|
|
80
|
+
._row_1yoda_73 {
|
|
81
|
+
padding-block: var(--popover-row-pad-y, var(--sys-unit-2));
|
|
82
82
|
}
|
|
83
|
-
.
|
|
83
|
+
._rows_1yoda_73 ._row_1yoda_73 {
|
|
84
84
|
display: contents;
|
|
85
85
|
}
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
padding-block: var(--sys-unit-2);
|
|
86
|
+
._rows_1yoda_73 ._rowLabel_1yoda_86,
|
|
87
|
+
._rows_1yoda_73 ._rowValue_1yoda_87 {
|
|
88
|
+
padding-block: var(--popover-row-pad-y, var(--sys-unit-2));
|
|
89
89
|
}
|
|
90
|
-
.
|
|
91
|
-
color: var(--sys-color-text-muted);
|
|
92
|
-
font: var(--sys-font-body-medium);
|
|
90
|
+
._rowLabel_1yoda_86 {
|
|
91
|
+
color: var(--popover-row-label-fg, var(--sys-color-text-muted));
|
|
92
|
+
font: var(--popover-row-label-font, var(--popover-font, var(--sys-font-body-medium)));
|
|
93
93
|
}
|
|
94
|
-
.
|
|
95
|
-
color: var(--sys-color-text);
|
|
96
|
-
font: var(--sys-font-body-medium);
|
|
94
|
+
._rowValue_1yoda_87 {
|
|
95
|
+
color: var(--popover-row-value-fg, var(--popover-fg, var(--sys-color-text)));
|
|
96
|
+
font: var(--popover-row-value-font, var(--popover-font, var(--sys-font-body-medium)));
|
|
97
97
|
}
|
|
98
|
-
.
|
|
98
|
+
._rowValue_1yoda_87[data-numeric] {
|
|
99
99
|
font-variant-numeric: tabular-nums;
|
|
100
100
|
}
|
|
101
|
-
.
|
|
101
|
+
._skeletonText_1yoda_101 {
|
|
102
102
|
position: relative;
|
|
103
103
|
display: inline-block;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
._skeletonTextContent_1yoda_105 {
|
|
106
106
|
visibility: hidden;
|
|
107
107
|
}
|
|
108
|
-
.
|
|
108
|
+
._skeletonTextOverlay_1yoda_108 {
|
|
109
109
|
position: absolute;
|
|
110
110
|
inset-block-start: 50%;
|
|
111
111
|
inset-inline: 0;
|
|
112
112
|
transform: translateY(-50%);
|
|
113
113
|
}
|
|
114
|
-
.
|
|
114
|
+
._title_1yoda_68 ._skeletonText_1yoda_101 {
|
|
115
115
|
min-inline-size: 12ch;
|
|
116
116
|
}
|
|
117
|
-
.
|
|
117
|
+
._rowValue_1yoda_87 ._skeletonText_1yoda_101 {
|
|
118
118
|
min-inline-size: 8ch;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
2
|
-
import {
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { type ComponentProps, type ReactElement, type ReactNode } from "react";
|
|
3
4
|
export type PopoverRootProps<Payload = unknown> = Omit<BasePopover.Root.Props<Payload>, "open" | "defaultOpen" | "onOpenChange" | "modal" | "children"> & Readonly<{
|
|
4
5
|
/** Whether the popover is open. Leave it out for a popover that keeps its own state. */
|
|
5
6
|
open?: boolean;
|
|
@@ -23,24 +24,47 @@ declare const Trigger: ({ onIntent, onPointerEnter, onPointerLeave, onFocus, ...
|
|
|
23
24
|
export type PopoverPositionerProps = Omit<ComponentProps<typeof BasePopover.Positioner>, "ref">;
|
|
24
25
|
/** Places the popup against its trigger, clear of the viewport's edges. */
|
|
25
26
|
declare const Positioner: ({ sideOffset, className, ...props }: PopoverPositionerProps) => ReactNode;
|
|
26
|
-
export type PopoverPopupProps = ComponentProps<typeof BasePopover.Popup> &
|
|
27
|
-
/** Whether the content the popup describes is still in flight. */
|
|
28
|
-
loading
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
export type PopoverPopupProps = ComponentProps<typeof BasePopover.Popup> & Readonly<{
|
|
28
|
+
/** Whether the content the popup describes is still in flight, for its `Status` and `Skeleton`s. */
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* The popover's surface. While `loading`, its `Status` speaks and its
|
|
33
|
+
* `Skeleton`s draw as placeholders.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <Popover.Popup loading={rate.isPending}>…</Popover.Popup>
|
|
37
|
+
*/
|
|
38
|
+
declare const Popup: ({ loading, className, ...props }: PopoverPopupProps) => ReactNode;
|
|
39
|
+
export type PopoverStatusProps = useRender.ComponentProps<"span">;
|
|
40
|
+
/**
|
|
41
|
+
* A hidden live region that announces its children once while the popup is
|
|
42
|
+
* loading, such as "Loading the rate".
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* <Popover.Status>Loading the rate</Popover.Status>
|
|
46
|
+
*/
|
|
47
|
+
declare const Status: ({ render, className, ref, children, ...props }: PopoverStatusProps) => ReactElement;
|
|
48
|
+
export type PopoverSkeletonProps = useRender.ComponentProps<"span">;
|
|
35
49
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
50
|
+
* Text inside a `Title` or a `RowValue` that draws as a placeholder of its
|
|
51
|
+
* width while the popup is loading, and stays readable to assistive tech.
|
|
52
|
+
* Otherwise it renders its children as they are.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <Popover.RowValue numeric><Popover.Skeleton>{rate.data?.base}</Popover.Skeleton></Popover.RowValue>
|
|
56
|
+
*/
|
|
57
|
+
declare const PopoverSkeleton: ({ render, className, ref, children, ...props }: PopoverSkeletonProps) => ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* The arrow pointing from the popup at its trigger: the kit's own shape, or the
|
|
60
|
+
* children given in its place.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* <Popover.Arrow />
|
|
38
64
|
*/
|
|
39
|
-
declare const
|
|
40
|
-
/** The arrow pointing from the popup at its trigger. */
|
|
41
|
-
declare const Arrow: ({ className, ...props }: ComponentProps<typeof BasePopover.Arrow>) => ReactNode;
|
|
65
|
+
declare const Arrow: ({ className, children, ...props }: ComponentProps<typeof BasePopover.Arrow>) => ReactNode;
|
|
42
66
|
/** The popover's heading, which names it. */
|
|
43
|
-
declare const Title: ({ className,
|
|
67
|
+
declare const Title: ({ className, ...props }: ComponentProps<typeof BasePopover.Title>) => ReactNode;
|
|
44
68
|
/** A table of `Row`s whose labels and values line up in two columns. */
|
|
45
69
|
declare const Rows: ({ className, ...props }: ComponentProps<"div">) => ReactNode;
|
|
46
70
|
export type PopoverRowProps = ComponentProps<"div">;
|
|
@@ -53,14 +77,26 @@ export type PopoverRowValueProps = ComponentProps<"span"> & Readonly<{
|
|
|
53
77
|
/** Uses tabular figures for evenly spaced numbers. */
|
|
54
78
|
numeric?: boolean;
|
|
55
79
|
}>;
|
|
56
|
-
/** The row's value, beside its label
|
|
57
|
-
declare const RowValue: ({ numeric, className,
|
|
58
|
-
export type PopoverContentProps = PopoverPopupProps & Readonly<Pick<PopoverPositionerProps, "side" | "sideOffset" | "align" | "alignOffset"> & {
|
|
80
|
+
/** The row's value, beside its label. */
|
|
81
|
+
declare const RowValue: ({ numeric, className, ...props }: PopoverRowValueProps) => ReactNode;
|
|
82
|
+
export type PopoverContentProps = Omit<PopoverPopupProps, "loading"> & Readonly<Pick<PopoverPositionerProps, "side" | "sideOffset" | "align" | "alignOffset"> & {
|
|
59
83
|
/** The element the popover is portalled into. @default document.body */
|
|
60
84
|
container?: BasePopover.Portal.Props["container"];
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
|
|
85
|
+
}> & (Readonly<{
|
|
86
|
+
/** Whether the content the popup describes is still in flight, for its `Skeleton`s. */
|
|
87
|
+
loading: boolean;
|
|
88
|
+
/** Announced once while loading, through a `Status`. */
|
|
89
|
+
loadingLabel: string;
|
|
90
|
+
}> | Readonly<{
|
|
91
|
+
loading?: undefined;
|
|
92
|
+
loadingLabel?: undefined;
|
|
93
|
+
}>);
|
|
94
|
+
/**
|
|
95
|
+
* `Portal`, `Positioner` and `Popup` in one: the popover's surface, placed
|
|
96
|
+
* against its trigger. With a `loadingLabel` it holds the `Status` that
|
|
97
|
+
* announces it.
|
|
98
|
+
*/
|
|
99
|
+
declare const Content: ({ container, side, sideOffset, align, alignOffset, loadingLabel, children, ...props }: PopoverContentProps) => ReactNode;
|
|
64
100
|
type PopoverParts = Readonly<{
|
|
65
101
|
Root: typeof Root;
|
|
66
102
|
Trigger: typeof Trigger;
|
|
@@ -68,6 +104,8 @@ type PopoverParts = Readonly<{
|
|
|
68
104
|
Positioner: typeof Positioner;
|
|
69
105
|
Popup: typeof Popup;
|
|
70
106
|
Content: typeof Content;
|
|
107
|
+
Status: typeof Status;
|
|
108
|
+
Skeleton: typeof PopoverSkeleton;
|
|
71
109
|
Arrow: typeof Arrow;
|
|
72
110
|
Title: typeof Title;
|
|
73
111
|
Rows: typeof Rows;
|
|
@@ -80,8 +118,9 @@ type PopoverParts = Readonly<{
|
|
|
80
118
|
}>;
|
|
81
119
|
/**
|
|
82
120
|
* A rich popover over base-ui's `Popover`, with a `Title` and rows of labelled
|
|
83
|
-
* values. `Content` bundles the portal, positioner and popup
|
|
84
|
-
* parts stay.
|
|
121
|
+
* values. `Content` bundles the portal, positioner and popup, and the `Status`
|
|
122
|
+
* for a `loadingLabel`; the unbundled parts stay. While loading, text wrapped in
|
|
123
|
+
* a `Skeleton` draws as a placeholder.
|
|
85
124
|
*
|
|
86
125
|
* @example
|
|
87
126
|
* <Popover.Root>
|
|
@@ -94,7 +133,9 @@ type PopoverParts = Readonly<{
|
|
|
94
133
|
* <Popover.Rows>
|
|
95
134
|
* <Popover.Row>
|
|
96
135
|
* <Popover.RowLabel>Base</Popover.RowLabel>
|
|
97
|
-
* <Popover.RowValue numeric>
|
|
136
|
+
* <Popover.RowValue numeric>
|
|
137
|
+
* <Popover.Skeleton>{rate.data?.base}</Popover.Skeleton>
|
|
138
|
+
* </Popover.RowValue>
|
|
98
139
|
* </Popover.Row>
|
|
99
140
|
* </Popover.Rows>
|
|
100
141
|
* </Popover.Content>
|