@editora/ui-core 0.1.25 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/dist/accordion.cjs.js +13 -12
- package/dist/accordion.esm.js +13 -12
- package/dist/alert-dialog.cjs.js +76 -45
- package/dist/alert-dialog.esm.js +179 -135
- package/dist/alert.cjs.js +41 -32
- package/dist/alert.esm.js +79 -70
- package/dist/animated-beam.cjs.js +42 -50
- package/dist/animated-beam.esm.js +47 -55
- package/dist/animated-list.cjs.js +11 -27
- package/dist/animated-list.esm.js +12 -28
- package/dist/animated-text.cjs.js +4 -4
- package/dist/animated-text.esm.js +4 -4
- package/dist/app-header.cjs.js +5 -5
- package/dist/app-header.esm.js +6 -6
- package/dist/aspect-ratio.cjs.js +10 -12
- package/dist/aspect-ratio.esm.js +11 -13
- package/dist/avatar.cjs.js +13 -17
- package/dist/avatar.esm.js +13 -17
- package/dist/badge.cjs.js +27 -22
- package/dist/badge.esm.js +32 -27
- package/dist/block-controls.cjs.js +11 -12
- package/dist/block-controls.esm.js +8 -9
- package/dist/box.cjs.js +2 -3
- package/dist/box.esm.js +2 -3
- package/dist/breadcrumb.cjs.js +12 -18
- package/dist/breadcrumb.esm.js +11 -17
- package/dist/button.cjs.js +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/{calendar-B3PUKHQm.mjs → calendar-DmxiZrR7.mjs} +126 -117
- package/dist/{calendar-D-mXMgqc.js → calendar-o273O28D.js} +53 -44
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/card.cjs.js +6 -7
- package/dist/card.esm.js +5 -6
- package/dist/chart.cjs.js +52 -52
- package/dist/chart.esm.js +95 -95
- package/dist/checkbox.cjs.js +19 -15
- package/dist/checkbox.esm.js +19 -15
- package/dist/collapsible.cjs.js +7 -11
- package/dist/collapsible.esm.js +7 -11
- package/dist/color-picker.cjs.js +36 -17
- package/dist/color-picker.esm.js +132 -113
- package/dist/combobox.cjs.js +57 -54
- package/dist/combobox.esm.js +62 -58
- package/dist/command-palette.cjs.js +1 -0
- package/dist/command-palette.esm.js +1 -0
- package/dist/command.cjs.js +32 -14
- package/dist/command.esm.js +46 -28
- package/dist/components/date-time-utils.d.ts.map +1 -1
- package/dist/components/ui-accordion.d.ts.map +1 -1
- package/dist/components/ui-alert-dialog.d.ts +2 -0
- package/dist/components/ui-alert-dialog.d.ts.map +1 -1
- package/dist/components/ui-alert.d.ts.map +1 -1
- package/dist/components/ui-animated-beam.d.ts.map +1 -1
- package/dist/components/ui-animated-list.d.ts.map +1 -1
- package/dist/components/ui-aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui-avatar.d.ts.map +1 -1
- package/dist/components/ui-badge.d.ts.map +1 -1
- package/dist/components/ui-block-controls.d.ts.map +1 -1
- package/dist/components/ui-box.d.ts.map +1 -1
- package/dist/components/ui-breadcrumb.d.ts.map +1 -1
- package/dist/components/ui-button.d.ts.map +1 -1
- package/dist/components/ui-calendar.d.ts.map +1 -1
- package/dist/components/ui-card.d.ts.map +1 -1
- package/dist/components/ui-checkbox.d.ts.map +1 -1
- package/dist/components/ui-collapsible.d.ts.map +1 -1
- package/dist/components/ui-color-picker.d.ts.map +1 -1
- package/dist/components/ui-combobox.d.ts.map +1 -1
- package/dist/components/ui-command-palette.d.ts.map +1 -1
- package/dist/components/ui-command.d.ts.map +1 -1
- package/dist/components/ui-container.d.ts.map +1 -1
- package/dist/components/ui-context-menu.d.ts.map +1 -1
- package/dist/components/ui-data-table.d.ts +7 -0
- package/dist/components/ui-data-table.d.ts.map +1 -1
- package/dist/components/ui-date-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
- package/dist/components/ui-date-time-picker.d.ts.map +1 -1
- package/dist/components/ui-dialog.d.ts +2 -0
- package/dist/components/ui-dialog.d.ts.map +1 -1
- package/dist/components/ui-dock.d.ts.map +1 -1
- package/dist/components/ui-drawer.d.ts.map +1 -1
- package/dist/components/ui-dropdown.d.ts.map +1 -1
- package/dist/components/ui-empty-state.d.ts.map +1 -1
- package/dist/components/ui-field.d.ts.map +1 -1
- package/dist/components/ui-fieldset.d.ts.map +1 -1
- package/dist/components/ui-file-upload.d.ts.map +1 -1
- package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
- package/dist/components/ui-form.d.ts.map +1 -1
- package/dist/components/ui-icon-cloud.d.ts.map +1 -1
- package/dist/components/ui-inline-edit.d.ts.map +1 -1
- package/dist/components/ui-input.d.ts.map +1 -1
- package/dist/components/ui-marquee.d.ts.map +1 -1
- package/dist/components/ui-menu.d.ts.map +1 -1
- package/dist/components/ui-menubar.d.ts.map +1 -1
- package/dist/components/ui-meter.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-number-field.d.ts.map +1 -1
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-pagination.d.ts.map +1 -1
- package/dist/components/ui-password-field.d.ts.map +1 -1
- package/dist/components/ui-pin-input.d.ts.map +1 -1
- package/dist/components/ui-popover.d.ts.map +1 -1
- package/dist/components/ui-progress.d.ts.map +1 -1
- package/dist/components/ui-radio-group.d.ts.map +1 -1
- package/dist/components/ui-radio.d.ts.map +1 -1
- package/dist/components/ui-rating.d.ts +1 -0
- package/dist/components/ui-rating.d.ts.map +1 -1
- package/dist/components/ui-scroll-area.d.ts.map +1 -1
- package/dist/components/ui-section.d.ts.map +1 -1
- package/dist/components/ui-select.d.ts.map +1 -1
- package/dist/components/ui-selection-popup.d.ts.map +1 -1
- package/dist/components/ui-slider.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-spinning-text.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-splitter.d.ts.map +1 -1
- package/dist/components/ui-stepper.d.ts.map +1 -1
- package/dist/components/ui-switch.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-tags-input.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/components/ui-toggle-group.d.ts +2 -0
- package/dist/components/ui-toggle-group.d.ts.map +1 -1
- package/dist/components/ui-toggle.d.ts.map +1 -1
- package/dist/components/ui-toolbar.d.ts +2 -0
- package/dist/components/ui-toolbar.d.ts.map +1 -1
- package/dist/components/ui-tooltip.d.ts.map +1 -1
- package/dist/components/ui-transfer-list.d.ts.map +1 -1
- package/dist/components/ui-tree-item.d.ts.map +1 -1
- package/dist/components/ui-tree.d.ts.map +1 -1
- package/dist/components/ui-wizard.d.ts.map +1 -1
- package/dist/container.cjs.js +6 -12
- package/dist/container.esm.js +8 -14
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +42 -41
- package/dist/data-table.cjs.js +18 -15
- package/dist/data-table.esm.js +207 -187
- package/dist/date-field.cjs.js +8 -8
- package/dist/date-field.esm.js +7 -7
- package/dist/date-picker.cjs.js +27 -18
- package/dist/date-picker.esm.js +57 -48
- package/dist/date-range-picker.cjs.js +22 -17
- package/dist/date-range-picker.esm.js +31 -26
- package/dist/date-range-time-picker.cjs.js +26 -19
- package/dist/date-range-time-picker.esm.js +23 -16
- package/dist/date-time-picker.cjs.js +23 -16
- package/dist/date-time-picker.esm.js +88 -81
- package/dist/{date-time-utils-BTlxnz5j.mjs → date-time-utils-B4hAkt36.mjs} +75 -68
- package/dist/date-time-utils-DdigV4hs.js +1 -0
- package/dist/dialog.cjs.js +57 -41
- package/dist/dialog.esm.js +84 -51
- package/dist/dock.cjs.js +16 -30
- package/dist/dock.esm.js +26 -40
- package/dist/drawer.cjs.js +8 -12
- package/dist/drawer.esm.js +6 -10
- package/dist/dropdown.cjs.js +8 -6
- package/dist/dropdown.esm.js +33 -30
- package/dist/empty-state.cjs.js +17 -15
- package/dist/empty-state.esm.js +13 -11
- package/dist/field.cjs.js +22 -13
- package/dist/field.esm.js +54 -45
- package/dist/fieldset.cjs.js +18 -11
- package/dist/fieldset.esm.js +20 -13
- package/dist/file-upload.cjs.js +77 -35
- package/dist/file-upload.esm.js +152 -110
- package/dist/floating-toolbar.cjs.js +6 -7
- package/dist/floating-toolbar.esm.js +8 -9
- package/dist/form.cjs.js +20 -23
- package/dist/form.esm.js +20 -23
- package/dist/gantt.cjs.js +6 -6
- package/dist/gantt.esm.js +6 -6
- package/dist/hover-card.cjs.js +7 -7
- package/dist/hover-card.esm.js +7 -7
- package/dist/icon-cloud.cjs.js +19 -36
- package/dist/icon-cloud.esm.js +41 -58
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +108 -104
- package/dist/inline-edit.cjs.js +47 -19
- package/dist/inline-edit.esm.js +66 -38
- package/dist/input.cjs.js +44 -37
- package/dist/input.esm.js +59 -52
- package/dist/layout.cjs.js +3 -3
- package/dist/layout.esm.js +3 -3
- package/dist/marquee.cjs.js +7 -10
- package/dist/marquee.esm.js +7 -10
- package/dist/menu.cjs.js +8 -24
- package/dist/menu.esm.js +52 -72
- package/dist/menubar.cjs.js +9 -31
- package/dist/menubar.esm.js +127 -153
- package/dist/meter.cjs.js +4 -9
- package/dist/meter.esm.js +6 -11
- package/dist/multi-select.cjs.js +48 -35
- package/dist/multi-select.esm.js +67 -53
- package/dist/navigation-menu.cjs.js +10 -10
- package/dist/navigation-menu.esm.js +33 -33
- package/dist/number-field.cjs.js +27 -16
- package/dist/number-field.esm.js +36 -25
- package/dist/odometer.cjs.js +5 -5
- package/dist/odometer.esm.js +3 -3
- package/dist/orbiter.cjs.js +11 -28
- package/dist/orbiter.esm.js +28 -45
- package/dist/overlay-motion-B56x1GoY.js +49 -0
- package/dist/overlay-motion-BX3dPLay.mjs +120 -0
- package/dist/pagination.cjs.js +28 -25
- package/dist/pagination.esm.js +54 -51
- package/dist/password-field.cjs.js +38 -33
- package/dist/password-field.esm.js +62 -57
- package/dist/pin-input.cjs.js +17 -13
- package/dist/pin-input.esm.js +23 -19
- package/dist/plugin-panel.cjs.js +1 -1
- package/dist/plugin-panel.esm.js +1 -1
- package/dist/popover.cjs.js +16 -28
- package/dist/popover.esm.js +29 -45
- package/dist/portal-DeaM1tYY.mjs +121 -0
- package/dist/portal-XbYR3m_q.js +1 -0
- package/dist/portal.d.ts +3 -1
- package/dist/portal.d.ts.map +1 -1
- package/dist/{positioner-D0VGxtYU.mjs → positioner-BE8Nbho2.mjs} +5 -3
- package/dist/{positioner-D_fqyx_j.js → positioner-DZ1FW6A9.js} +1 -1
- package/dist/positioner.cjs.js +1 -1
- package/dist/positioner.esm.js +1 -1
- package/dist/primitives/overlay-motion.d.ts +47 -0
- package/dist/primitives/overlay-motion.d.ts.map +1 -0
- package/dist/primitives/positioner.d.ts.map +1 -1
- package/dist/progress.cjs.js +11 -16
- package/dist/progress.esm.js +37 -42
- package/dist/quick-actions.cjs.js +13 -13
- package/dist/quick-actions.esm.js +11 -11
- package/dist/radio-group.cjs.js +50 -26
- package/dist/radio-group.esm.js +53 -29
- package/dist/radio.cjs.js +15 -12
- package/dist/radio.esm.js +15 -12
- package/dist/rating.cjs.js +11 -15
- package/dist/rating.esm.js +48 -50
- package/dist/{runtime-CFnK53iC.mjs → runtime-CQM6wZOc.mjs} +498 -514
- package/dist/runtime-DxCl0A5q.js +5 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.esm.js +36 -32
- package/dist/scroll-area.cjs.js +3 -4
- package/dist/scroll-area.esm.js +3 -4
- package/dist/section.cjs.js +2 -4
- package/dist/section.esm.js +2 -4
- package/dist/select.cjs.js +40 -73
- package/dist/select.esm.js +55 -87
- package/dist/selection-popup.cjs.js +3 -4
- package/dist/selection-popup.esm.js +3 -4
- package/dist/semantic-tokens.d.ts +17 -0
- package/dist/semantic-tokens.d.ts.map +1 -0
- package/dist/sidebar.cjs.js +22 -22
- package/dist/sidebar.esm.js +25 -25
- package/dist/skeleton.cjs.js +2 -2
- package/dist/skeleton.esm.js +2 -2
- package/dist/slider.cjs.js +22 -26
- package/dist/slider.esm.js +25 -29
- package/dist/sortable.cjs.js +4 -5
- package/dist/sortable.esm.js +4 -5
- package/dist/spinning-text.cjs.js +4 -13
- package/dist/spinning-text.esm.js +4 -13
- package/dist/split-button.cjs.js +5 -5
- package/dist/split-button.esm.js +15 -14
- package/dist/splitter.cjs.js +52 -10
- package/dist/splitter.esm.js +55 -13
- package/dist/stepper.cjs.js +31 -65
- package/dist/stepper.esm.js +32 -66
- package/dist/switch.cjs.js +20 -22
- package/dist/switch.esm.js +20 -22
- package/dist/table.cjs.js +5 -5
- package/dist/table.esm.js +20 -20
- package/dist/tabs.cjs.js +91 -21
- package/dist/tabs.esm.js +182 -112
- package/dist/tags-input.cjs.js +41 -15
- package/dist/tags-input.esm.js +73 -47
- package/dist/textarea.cjs.js +32 -33
- package/dist/textarea.esm.js +38 -39
- package/dist/theme.d.ts +25 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/time-field.cjs.js +7 -7
- package/dist/time-field.esm.js +6 -6
- package/dist/time-picker.cjs.js +16 -13
- package/dist/time-picker.esm.js +27 -24
- package/dist/timeline.cjs.js +10 -10
- package/dist/timeline.esm.js +7 -7
- package/dist/toggle-group.cjs.js +13 -13
- package/dist/toggle-group.esm.js +66 -61
- package/dist/toggle.cjs.js +52 -34
- package/dist/toggle.esm.js +80 -62
- package/dist/toolbar.cjs.js +14 -14
- package/dist/toolbar.esm.js +41 -33
- package/dist/tooltip.cjs.js +3 -3
- package/dist/tooltip.esm.js +39 -33
- package/dist/transfer-list.cjs.js +28 -29
- package/dist/transfer-list.esm.js +28 -29
- package/dist/{tree-B_oQput6.mjs → tree-33fVNnaf.mjs} +6 -5
- package/dist/{tree-SivHxcAy.js → tree-Dc02MChE.js} +6 -5
- package/dist/tree-item.cjs.js +9 -8
- package/dist/tree-item.esm.js +13 -12
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +1 -1
- package/dist/{ui-button-Co8Sid6t.mjs → ui-button-C3OmI7Sn.mjs} +152 -154
- package/dist/{ui-button-BPrzJScZ.js → ui-button-CnLwXBnx.js} +107 -109
- package/dist/wizard.cjs.js +39 -36
- package/dist/wizard.esm.js +39 -36
- package/package.json +1 -1
- package/dist/date-time-utils-y3AvNvGe.js +0 -1
- package/dist/portal-DgpQ3Jo1.js +0 -1
- package/dist/portal-bR42gHvG.mjs +0 -118
- package/dist/runtime-DwE-tizc.js +0 -1
package/dist/popover.esm.js
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import { b as h } from "./portal-
|
|
1
|
+
import { E as d } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
|
+
import { b as h } from "./portal-DeaM1tYY.mjs";
|
|
3
3
|
import { c as f } from "./dismissable-layer-BmPIoK80.mjs";
|
|
4
|
-
import { e as b } from "./positioner-
|
|
5
|
-
|
|
4
|
+
import { e as b } from "./positioner-BE8Nbho2.mjs";
|
|
5
|
+
import { O as g, r as m, a as _, o as x } from "./overlay-motion-BX3dPLay.mjs";
|
|
6
|
+
const w = `
|
|
7
|
+
${g}
|
|
8
|
+
|
|
6
9
|
.popover-shell {
|
|
7
10
|
--ui-popover-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
|
|
8
|
-
--ui-popover-bg:
|
|
9
|
-
linear-gradient(
|
|
10
|
-
180deg,
|
|
11
|
-
color-mix(in srgb, var(--ui-color-surface, #ffffff) 98%, transparent) 0%,
|
|
12
|
-
color-mix(in srgb, var(--ui-color-surface-elevated, #f8fafc) 24%, var(--ui-color-surface, #ffffff)) 100%
|
|
13
|
-
);
|
|
11
|
+
--ui-popover-bg: var(--color-panel-solid, var(--ui-color-surface-elevated, var(--ui-color-surface, #ffffff)));
|
|
14
12
|
--ui-popover-text: var(--ui-color-text, #0f172a);
|
|
15
13
|
--ui-popover-muted: var(--ui-color-muted, #526175);
|
|
16
|
-
--ui-popover-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 70%, transparent);
|
|
14
|
+
--ui-popover-border-color: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 70%, transparent));
|
|
17
15
|
--ui-popover-border: 1px solid var(--ui-popover-border-color);
|
|
18
|
-
--ui-popover-shadow:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
--ui-popover-radius: 14px;
|
|
22
|
-
--ui-popover-padding: 14px;
|
|
16
|
+
--ui-popover-shadow: var(--shadow-5, 0 8px 24px rgba(15, 23, 42, 0.12));
|
|
17
|
+
--ui-popover-radius: calc(var(--ui-radius, 6px) + 2px);
|
|
18
|
+
--ui-popover-padding: 16px;
|
|
23
19
|
--ui-popover-backdrop: none;
|
|
24
20
|
--ui-popover-font-size: var(--ui-default-font-size, var(--font-size-2, var(--ui-font-size-md, 14px)));
|
|
25
21
|
--ui-popover-line-height: var(--ui-default-line-height, var(--line-height-2, 20px));
|
|
@@ -28,22 +24,22 @@ const g = `
|
|
|
28
24
|
|
|
29
25
|
.popover-shell[data-size="sm"],
|
|
30
26
|
.popover-shell[data-size="1"] {
|
|
31
|
-
--ui-popover-radius:
|
|
32
|
-
--ui-popover-padding:
|
|
27
|
+
--ui-popover-radius: var(--ui-radius, 6px);
|
|
28
|
+
--ui-popover-padding: 12px;
|
|
33
29
|
--ui-popover-font-size: 13px;
|
|
34
30
|
--ui-popover-line-height: 18px;
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
.popover-shell[data-size="md"],
|
|
38
34
|
.popover-shell[data-size="2"] {
|
|
39
|
-
--ui-popover-radius:
|
|
40
|
-
--ui-popover-padding:
|
|
35
|
+
--ui-popover-radius: calc(var(--ui-radius, 6px) + 2px);
|
|
36
|
+
--ui-popover-padding: 16px;
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
.popover-shell[data-size="lg"],
|
|
44
40
|
.popover-shell[data-size="3"] {
|
|
45
|
-
--ui-popover-radius:
|
|
46
|
-
--ui-popover-padding:
|
|
41
|
+
--ui-popover-radius: calc(var(--ui-radius, 6px) + 4px);
|
|
42
|
+
--ui-popover-padding: 20px;
|
|
47
43
|
--ui-popover-font-size: 15px;
|
|
48
44
|
--ui-popover-line-height: 22px;
|
|
49
45
|
}
|
|
@@ -150,16 +146,12 @@ const g = `
|
|
|
150
146
|
padding: var(--ui-popover-padding);
|
|
151
147
|
box-shadow: var(--ui-popover-shadow);
|
|
152
148
|
backdrop-filter: var(--ui-popover-backdrop);
|
|
153
|
-
font:
|
|
149
|
+
font: 400 var(--ui-popover-font-size)/var(--ui-popover-line-height) var(--ui-font-family, system-ui, sans-serif);
|
|
154
150
|
letter-spacing: var(--ui-popover-letter-spacing);
|
|
155
|
-
opacity: 0;
|
|
156
|
-
transform: translateY(6px) scale(0.99);
|
|
157
|
-
transition: opacity var(--ui-motion-base, 200ms) var(--ui-motion-easing, ease), transform var(--ui-motion-base, 200ms) var(--ui-motion-easing, ease);
|
|
158
151
|
position: relative;
|
|
159
152
|
min-inline-size: min(180px, calc(100vw - 24px));
|
|
160
153
|
max-inline-size: min(360px, calc(100vw - 24px));
|
|
161
154
|
}
|
|
162
|
-
.panel.show { opacity: 1; transform: translateY(0) scale(1); }
|
|
163
155
|
|
|
164
156
|
.content {
|
|
165
157
|
display: grid;
|
|
@@ -253,9 +245,6 @@ const g = `
|
|
|
253
245
|
transform: rotate(-90deg);
|
|
254
246
|
}
|
|
255
247
|
|
|
256
|
-
@media (prefers-reduced-motion: reduce) {
|
|
257
|
-
.panel { transition: none !important; transform: none !important; }
|
|
258
|
-
}
|
|
259
248
|
|
|
260
249
|
@media (prefers-contrast: more) {
|
|
261
250
|
.panel {
|
|
@@ -288,7 +277,7 @@ const g = `
|
|
|
288
277
|
}
|
|
289
278
|
}
|
|
290
279
|
`;
|
|
291
|
-
class
|
|
280
|
+
class y extends d {
|
|
292
281
|
constructor() {
|
|
293
282
|
super(), this._portalEl = null, this._panelEl = null, this._positioner = null, this._layer = null, this._isOpen = !1, this._restoreFocusEl = null, this._contentObserver = null, this._hostObserver = null, this._syncPortalScheduled = !1, this._onHostClick = this._handleHostClick.bind(this);
|
|
294
283
|
}
|
|
@@ -357,11 +346,11 @@ class m extends v {
|
|
|
357
346
|
a && (e.dataset.elevation = a);
|
|
358
347
|
const s = this.getAttribute("radius");
|
|
359
348
|
if (s && s.trim()) {
|
|
360
|
-
const p = s.trim(),
|
|
361
|
-
e.style.setProperty("--ui-popover-radius",
|
|
349
|
+
const p = s.trim(), v = /^-?\d+(\.\d+)?$/.test(p) ? `${p}px` : p;
|
|
350
|
+
e.style.setProperty("--ui-popover-radius", v);
|
|
362
351
|
}
|
|
363
352
|
const l = document.createElement("style");
|
|
364
|
-
l.textContent =
|
|
353
|
+
l.textContent = w, e.appendChild(l);
|
|
365
354
|
const i = document.createElement("div");
|
|
366
355
|
i.className = "panel show", this._panelEl = i;
|
|
367
356
|
const c = document.createElement("div");
|
|
@@ -396,13 +385,8 @@ class m extends v {
|
|
|
396
385
|
onDismiss: () => this.close()
|
|
397
386
|
}));
|
|
398
387
|
}
|
|
399
|
-
_teardownPortal() {
|
|
400
|
-
|
|
401
|
-
try {
|
|
402
|
-
this._portalEl.parentElement.removeChild(this._portalEl);
|
|
403
|
-
} catch {
|
|
404
|
-
}
|
|
405
|
-
this._portalEl = null;
|
|
388
|
+
_teardownPortal(e = !1) {
|
|
389
|
+
this._contentObserver?.disconnect(), this._contentObserver = null, this._layer?.destroy(), this._layer = null, this._positioner?.destroy(), this._positioner = null, this._panelEl = null, e ? m(this._portalEl) : _(this._portalEl), this._portalEl = null;
|
|
406
390
|
}
|
|
407
391
|
_schedulePortalSync() {
|
|
408
392
|
this._syncPortalScheduled || !this._isOpen || (this._syncPortalScheduled = !0, queueMicrotask(() => {
|
|
@@ -438,7 +422,7 @@ class m extends v {
|
|
|
438
422
|
shift: this.getAttribute("shift") !== "false",
|
|
439
423
|
flip: this.getAttribute("flip") !== "false",
|
|
440
424
|
arrow: this._portalEl.querySelector(".arrow")
|
|
441
|
-
}), this._syncDismissableLayer());
|
|
425
|
+
}), x(this._portalEl), this._syncDismissableLayer());
|
|
442
426
|
}
|
|
443
427
|
_syncOpenState() {
|
|
444
428
|
const e = this.hasAttribute("open");
|
|
@@ -450,7 +434,7 @@ class m extends v {
|
|
|
450
434
|
this._restoreFocusEl = document.activeElement instanceof HTMLElement ? document.activeElement : null, this._mountPortal(), this.dispatchEvent(new CustomEvent("open", { bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("open-change", { detail: { open: !0 }, bubbles: !0, composed: !0 }));
|
|
451
435
|
return;
|
|
452
436
|
}
|
|
453
|
-
this._teardownPortal(), this.dispatchEvent(new CustomEvent("close", { bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("open-change", { detail: { open: !1 }, bubbles: !0, composed: !0 }));
|
|
437
|
+
this._teardownPortal(!0), this.dispatchEvent(new CustomEvent("close", { bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("open-change", { detail: { open: !1 }, bubbles: !0, composed: !0 }));
|
|
454
438
|
const t = this._getTrigger(), r = this._restoreFocusEl;
|
|
455
439
|
this._restoreFocusEl = null;
|
|
456
440
|
const o = (t && t.isConnected ? t : r) || null;
|
|
@@ -467,7 +451,7 @@ class m extends v {
|
|
|
467
451
|
return !1;
|
|
468
452
|
}
|
|
469
453
|
}
|
|
470
|
-
typeof customElements < "u" && !customElements.get("ui-popover") && customElements.define("ui-popover",
|
|
454
|
+
typeof customElements < "u" && !customElements.get("ui-popover") && customElements.define("ui-popover", y);
|
|
471
455
|
export {
|
|
472
|
-
|
|
456
|
+
y as UIPopover
|
|
473
457
|
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { a as M, c as W } from "./positioner-BE8Nbho2.mjs";
|
|
2
|
+
function D(o = "ui-portal-root") {
|
|
3
|
+
if (typeof document > "u") return null;
|
|
4
|
+
let e = document.getElementById(o);
|
|
5
|
+
return e || (e = document.createElement("div"), e.id = o, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", e.style.width = "100%", e.style.height = "0", e.style.pointerEvents = "none", e.style.zIndex = "var(--ui-portal-z, 1600)", document.body.appendChild(e)), e.style.zIndex || (e.style.zIndex = "var(--ui-portal-z, 1600)"), e;
|
|
6
|
+
}
|
|
7
|
+
function v(o, e, i = "top") {
|
|
8
|
+
const t = typeof i == "string" ? { placement: i } : i, f = e instanceof HTMLElement ? e : typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : e, n = W(o, f, {
|
|
9
|
+
placement: t.placement || "top",
|
|
10
|
+
strategy: t.strategy || "fixed",
|
|
11
|
+
offset: typeof t.offset == "number" ? t.offset : 8,
|
|
12
|
+
flip: t.flip,
|
|
13
|
+
shift: t.shift,
|
|
14
|
+
arrow: t.arrow ?? null,
|
|
15
|
+
boundary: t.boundary ?? null,
|
|
16
|
+
boundaryPadding: t.boundaryPadding,
|
|
17
|
+
dir: t.dir,
|
|
18
|
+
autoPlacement: t.autoPlacement,
|
|
19
|
+
allowedPlacements: t.allowedPlacements,
|
|
20
|
+
fallbackPlacements: t.fallbackPlacements,
|
|
21
|
+
inline: t.inline,
|
|
22
|
+
hideWhenDetached: t.hideWhenDetached
|
|
23
|
+
}), l = o.getBoundingClientRect(), g = n.middlewareData?.arrow?.x ?? Math.round(l.left + l.width / 2 - n.x), b = n.middlewareData?.arrow?.y ?? Math.round(l.top + l.height / 2 - n.y);
|
|
24
|
+
return {
|
|
25
|
+
top: n.y,
|
|
26
|
+
left: n.x,
|
|
27
|
+
placement: n.placement,
|
|
28
|
+
x: g,
|
|
29
|
+
y: b,
|
|
30
|
+
strategy: n.strategy,
|
|
31
|
+
availableWidth: n.availableWidth,
|
|
32
|
+
availableHeight: n.availableHeight,
|
|
33
|
+
middlewareData: n.middlewareData,
|
|
34
|
+
referenceHidden: n.referenceHidden,
|
|
35
|
+
escaped: n.escaped
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function R(o, e, i, t = {}) {
|
|
39
|
+
return M(o, e, i, t);
|
|
40
|
+
}
|
|
41
|
+
function S(o, e, i = "top") {
|
|
42
|
+
const t = typeof i == "string" ? { placement: i } : i, f = t.placement || "top", n = typeof t.offset == "number" ? t.offset : 8, l = t.flip !== !1, g = !!t.shift, b = D();
|
|
43
|
+
if (!b) return;
|
|
44
|
+
e.style.position = "absolute", e.style.pointerEvents = "auto", b.appendChild(e);
|
|
45
|
+
let w = () => {
|
|
46
|
+
};
|
|
47
|
+
function C(s, h, c) {
|
|
48
|
+
const a = t.arrow || e.querySelector(".arrow");
|
|
49
|
+
if (!a) return;
|
|
50
|
+
const p = o.getBoundingClientRect(), P = p.left + p.width / 2, d = p.top + p.height / 2;
|
|
51
|
+
if (c === "top" || c === "bottom") {
|
|
52
|
+
const u = P - h, m = 8, y = e.offsetWidth - 8, r = Math.max(m, Math.min(y, u));
|
|
53
|
+
a.style.left = `${Math.round(r)}px`, a.style.top = "";
|
|
54
|
+
} else {
|
|
55
|
+
const u = d - s, m = 8, y = e.offsetHeight - 8, r = Math.max(m, Math.min(y, u));
|
|
56
|
+
a.style.top = `${Math.round(r)}px`, a.style.left = "";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function x() {
|
|
60
|
+
if (o && typeof o.getBoundingClientRect == "function" && o instanceof HTMLElement) {
|
|
61
|
+
const d = o, u = d.getRootNode?.(), m = u instanceof ShadowRoot ? u.host : null, y = d.isConnected || document.body.contains(d) || (m ? document.body.contains(m) : !1), r = window.getComputedStyle(d), H = r.display !== "none" && r.visibility !== "hidden" && parseFloat(r.opacity || "1") > 0;
|
|
62
|
+
if (!y || !H) {
|
|
63
|
+
try {
|
|
64
|
+
e.parentElement && e.parentElement.removeChild(e);
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
w();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const s = v(o, e, {
|
|
72
|
+
placement: f,
|
|
73
|
+
offset: n,
|
|
74
|
+
flip: l,
|
|
75
|
+
shift: g,
|
|
76
|
+
strategy: t.strategy || "fixed",
|
|
77
|
+
boundary: t.boundary ?? null,
|
|
78
|
+
boundaryPadding: t.boundaryPadding,
|
|
79
|
+
dir: t.dir,
|
|
80
|
+
autoPlacement: t.autoPlacement,
|
|
81
|
+
allowedPlacements: t.allowedPlacements,
|
|
82
|
+
fallbackPlacements: t.fallbackPlacements,
|
|
83
|
+
inline: t.inline,
|
|
84
|
+
hideWhenDetached: t.hideWhenDetached,
|
|
85
|
+
arrow: t.arrow ?? null
|
|
86
|
+
}), h = window.innerWidth || document.documentElement.clientWidth, c = window.innerHeight || document.documentElement.clientHeight;
|
|
87
|
+
let a = s;
|
|
88
|
+
l && (s.top < 0 && f === "top" || s.top + e.offsetHeight > c && f === "bottom") && (a = v(o, e, {
|
|
89
|
+
placement: f === "top" ? "bottom" : "top",
|
|
90
|
+
offset: n,
|
|
91
|
+
flip: l,
|
|
92
|
+
shift: g,
|
|
93
|
+
strategy: t.strategy || "fixed",
|
|
94
|
+
boundary: t.boundary ?? null,
|
|
95
|
+
boundaryPadding: t.boundaryPadding,
|
|
96
|
+
dir: t.dir,
|
|
97
|
+
autoPlacement: t.autoPlacement,
|
|
98
|
+
allowedPlacements: t.allowedPlacements,
|
|
99
|
+
fallbackPlacements: t.fallbackPlacements,
|
|
100
|
+
inline: t.inline,
|
|
101
|
+
hideWhenDetached: t.hideWhenDetached,
|
|
102
|
+
arrow: t.arrow ?? null
|
|
103
|
+
})), a.left < 4 && (a.left = 4), a.left + e.offsetWidth > h - 4 && (a.left = h - e.offsetWidth - 4), a.top < 4 && (a.top = 4), a.top + e.offsetHeight > c - 4 && (a.top = c - e.offsetHeight - 4), e.style.top = `${Math.round(a.top)}px`, e.style.left = `${Math.round(a.left)}px`, C(a.top, a.left, a.placement), e.setAttribute("data-placement", a.placement);
|
|
104
|
+
const [p, P] = String(a.placement).split("-");
|
|
105
|
+
e.setAttribute("data-side", p || "bottom"), e.setAttribute("data-align", P || "center");
|
|
106
|
+
}
|
|
107
|
+
return x(), w = R(o, e, x), (s) => {
|
|
108
|
+
if (s?.remove !== !1)
|
|
109
|
+
try {
|
|
110
|
+
e.parentElement && e.parentElement.removeChild(e);
|
|
111
|
+
} catch {
|
|
112
|
+
}
|
|
113
|
+
w();
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export {
|
|
117
|
+
R as a,
|
|
118
|
+
D as b,
|
|
119
|
+
v as c,
|
|
120
|
+
S as s
|
|
121
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const C=require("./positioner-DZ1FW6A9.js");function H(a="ui-portal-root"){if(typeof document>"u")return null;let e=document.getElementById(a);return e||(e=document.createElement("div"),e.id=a,e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="0",e.style.pointerEvents="none",e.style.zIndex="var(--ui-portal-z, 1600)",document.body.appendChild(e)),e.style.zIndex||(e.style.zIndex="var(--ui-portal-z, 1600)"),e}function x(a,e,i="top"){const t=typeof i=="string"?{placement:i}:i,f=e instanceof HTMLElement?e:typeof e.getBoundingClientRect=="function"?e.getBoundingClientRect():e,n=C.computePositionState(a,f,{placement:t.placement||"top",strategy:t.strategy||"fixed",offset:typeof t.offset=="number"?t.offset:8,flip:t.flip,shift:t.shift,arrow:t.arrow??null,boundary:t.boundary??null,boundaryPadding:t.boundaryPadding,dir:t.dir,autoPlacement:t.autoPlacement,allowedPlacements:t.allowedPlacements,fallbackPlacements:t.fallbackPlacements,inline:t.inline,hideWhenDetached:t.hideWhenDetached}),l=a.getBoundingClientRect(),g=n.middlewareData?.arrow?.x??Math.round(l.left+l.width/2-n.x),b=n.middlewareData?.arrow?.y??Math.round(l.top+l.height/2-n.y);return{top:n.y,left:n.x,placement:n.placement,x:g,y:b,strategy:n.strategy,availableWidth:n.availableWidth,availableHeight:n.availableHeight,middlewareData:n.middlewareData,referenceHidden:n.referenceHidden,escaped:n.escaped}}function M(a,e,i,t={}){return C.autoUpdatePositioner(a,e,i,t)}function R(a,e,i="top"){const t=typeof i=="string"?{placement:i}:i,f=t.placement||"top",n=typeof t.offset=="number"?t.offset:8,l=t.flip!==!1,g=!!t.shift,b=H();if(!b)return;e.style.position="absolute",e.style.pointerEvents="auto",b.appendChild(e);let w=()=>{};function W(s,h,c){const o=t.arrow||e.querySelector(".arrow");if(!o)return;const u=a.getBoundingClientRect(),P=u.left+u.width/2,d=u.top+u.height/2;if(c==="top"||c==="bottom"){const p=P-h,m=8,y=e.offsetWidth-8,r=Math.max(m,Math.min(y,p));o.style.left=`${Math.round(r)}px`,o.style.top=""}else{const p=d-s,m=8,y=e.offsetHeight-8,r=Math.max(m,Math.min(y,p));o.style.top=`${Math.round(r)}px`,o.style.left=""}}function v(){if(a&&typeof a.getBoundingClientRect=="function"&&a instanceof HTMLElement){const d=a,p=d.getRootNode?.(),m=p instanceof ShadowRoot?p.host:null,y=d.isConnected||document.body.contains(d)||(m?document.body.contains(m):!1),r=window.getComputedStyle(d),D=r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity||"1")>0;if(!y||!D){try{e.parentElement&&e.parentElement.removeChild(e)}catch{}w();return}}const s=x(a,e,{placement:f,offset:n,flip:l,shift:g,strategy:t.strategy||"fixed",boundary:t.boundary??null,boundaryPadding:t.boundaryPadding,dir:t.dir,autoPlacement:t.autoPlacement,allowedPlacements:t.allowedPlacements,fallbackPlacements:t.fallbackPlacements,inline:t.inline,hideWhenDetached:t.hideWhenDetached,arrow:t.arrow??null}),h=window.innerWidth||document.documentElement.clientWidth,c=window.innerHeight||document.documentElement.clientHeight;let o=s;l&&(s.top<0&&f==="top"||s.top+e.offsetHeight>c&&f==="bottom")&&(o=x(a,e,{placement:f==="top"?"bottom":"top",offset:n,flip:l,shift:g,strategy:t.strategy||"fixed",boundary:t.boundary??null,boundaryPadding:t.boundaryPadding,dir:t.dir,autoPlacement:t.autoPlacement,allowedPlacements:t.allowedPlacements,fallbackPlacements:t.fallbackPlacements,inline:t.inline,hideWhenDetached:t.hideWhenDetached,arrow:t.arrow??null})),o.left<4&&(o.left=4),o.left+e.offsetWidth>h-4&&(o.left=h-e.offsetWidth-4),o.top<4&&(o.top=4),o.top+e.offsetHeight>c-4&&(o.top=c-e.offsetHeight-4),e.style.top=`${Math.round(o.top)}px`,e.style.left=`${Math.round(o.left)}px`,W(o.top,o.left,o.placement),e.setAttribute("data-placement",o.placement);const[u,P]=String(o.placement).split("-");e.setAttribute("data-side",u||"bottom"),e.setAttribute("data-align",P||"center")}return v(),w=M(a,e,v),s=>{if(s?.remove!==!1)try{e.parentElement&&e.parentElement.removeChild(e)}catch{}w()}}exports.autoUpdatePosition=M;exports.computePosition=x;exports.createPortalContainer=H;exports.showPortalFor=R;
|
package/dist/portal.d.ts
CHANGED
|
@@ -50,5 +50,7 @@ export type ShowPortalOptions = {
|
|
|
50
50
|
hideWhenDetached?: boolean;
|
|
51
51
|
arrow?: HTMLElement | null;
|
|
52
52
|
};
|
|
53
|
-
export declare function showPortalFor(anchor: HTMLElement | VirtualElement, contentEl: HTMLElement, placementOrOptions?: Placement | ShowPortalOptions): ((
|
|
53
|
+
export declare function showPortalFor(anchor: HTMLElement | VirtualElement, contentEl: HTMLElement, placementOrOptions?: Placement | ShowPortalOptions): ((options?: {
|
|
54
|
+
remove?: boolean;
|
|
55
|
+
}) => void) | undefined;
|
|
54
56
|
//# sourceMappingURL=portal.d.ts.map
|
package/dist/portal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../src/portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,qBAAqB,CAAC,EAAE,SAAmB,yBAiB1D;AAED,MAAM,MAAM,SAAS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AAE,WAAW,EAAE,kBAAkB,GAAE,SAAS,GAAG,iBAAyB,eA0HjI;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,uBAMvC"}
|
|
@@ -505,10 +505,12 @@ function ae(e, t) {
|
|
|
505
505
|
}
|
|
506
506
|
function de(e, t, n, r) {
|
|
507
507
|
if (e.style.position = n, e.style.left = `${Math.round(t.x)}px`, e.style.top = `${Math.round(t.y)}px`, e.style.setProperty("--ui-positioner-x", `${Math.round(t.x)}px`), e.style.setProperty("--ui-positioner-y", `${Math.round(t.y)}px`), r.matchWidth) {
|
|
508
|
-
const
|
|
509
|
-
e.style.width = `${Math.round(
|
|
508
|
+
const c = x(r.anchor);
|
|
509
|
+
e.style.width = `${Math.round(c.width)}px`;
|
|
510
510
|
}
|
|
511
|
-
r.fitViewport && (e.style.maxWidth = `${Math.round(t.availableWidth)}px`, e.style.maxHeight = `${Math.round(t.availableHeight)}px`), e.setAttribute("data-placement", t.placement)
|
|
511
|
+
r.fitViewport && (e.style.maxWidth = `${Math.round(t.availableWidth)}px`, e.style.maxHeight = `${Math.round(t.availableHeight)}px`), e.setAttribute("data-placement", t.placement);
|
|
512
|
+
const [i, o] = String(t.placement).split("-");
|
|
513
|
+
e.setAttribute("data-side", i || "bottom"), e.setAttribute("data-align", o || "center"), typeof t.referenceHidden == "boolean" || typeof t.escaped == "boolean" ? (e.setAttribute("data-reference-hidden", t.referenceHidden ? "true" : "false"), e.setAttribute("data-escaped", t.escaped ? "true" : "false")) : (e.removeAttribute("data-reference-hidden"), e.removeAttribute("data-escaped")), r.arrow instanceof HTMLElement && (t.middlewareData?.arrow ? ae(r.arrow, t) : le(r.arrow, t, x(r.anchor), e.getBoundingClientRect()));
|
|
512
514
|
}
|
|
513
515
|
function me(e) {
|
|
514
516
|
if (!(e.floating instanceof HTMLElement))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const X=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"];function z(e){return e instanceof HTMLElement}function Y(e){return!!e&&typeof e.top=="number"&&typeof e.left=="number"}function $(e){return!!e&&typeof e.getBoundingClientRect=="function"}function C(e){const t=e.x??0,n=e.y??0;return typeof DOMRect.fromRect=="function"?DOMRect.fromRect({x:t,y:n,width:e.width,height:e.height}):new DOMRect(t,n,e.width,e.height)}function p(e){return e instanceof DOMRect?e:C({x:e.x??e.left,y:e.y??e.top,width:e.width,height:e.height})}function w(e){return z(e)?e.getBoundingClientRect():Y(e)?p(e):p(e.getBoundingClientRect())}function _(e,t){const n=t?.getClientRects?.(e);if(n)return Array.from(n).map(i=>p(i)).filter(i=>i.width>0||i.height>0);const r=(z(e)||$(e))&&typeof e.getClientRects=="function"?e.getClientRects():null;return r?Array.from(r).map(i=>p(i)).filter(i=>i.width>0||i.height>0):[]}function j(e,t,n,r){if(!n)return w(e);const i=_(e,r);if(i.length===0)return w(e);const{side:o}=x(t);return o==="bottom"||o==="right"?i[i.length-1]||w(e):i[0]||w(e)}function H(e){return z(e)?e:$(e)&&e.contextElement instanceof HTMLElement?e.contextElement:null}function G(e,t,n){if(n)return n;const r=H(e)||(t instanceof HTMLElement?t:null);return r&&window.getComputedStyle(r).direction==="rtl"?"rtl":"ltr"}function J(e,t,n){return{getBoundingClientRect:()=>C({x:e,y:t,width:0,height:0}),contextElement:n}}function K(e,t){const n=C({x:e.x??e.left,y:e.y??e.top,width:e.width,height:e.height});return{getBoundingClientRect:()=>n,contextElement:t}}function Q(e,t){return{getBoundingClientRect:()=>p(e.getBoundingClientRect()),getClientRects:()=>e.getClientRects(),contextElement:t}}function Z(){const e=window.innerWidth||document.documentElement.clientWidth||0,t=window.innerHeight||document.documentElement.clientHeight||0;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function L(e){return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function ee(e,t){const n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return{top:r,left:n,right:i,bottom:o,width:Math.max(0,i-n),height:Math.max(0,o-r)}}function te(e){const t=window.getComputedStyle(e),n=`${t.overflow}${t.overflowX}${t.overflowY}`;return/(auto|scroll|overlay|hidden|clip)/.test(n)}function R(e){const t=[];let n=e?.parentElement??null;for(;n&&n!==document.body&&n!==document.documentElement;)te(n)&&t.push(n),n=n.parentElement;return t.push(window),t}function ne(e,t,n){let r=n instanceof HTMLElement?L(n.getBoundingClientRect()):Z();if(n instanceof HTMLElement)return r;const i=new Set,o=H(e);return o&&R(o).forEach(c=>{c instanceof Element&&i.add(c)}),t instanceof HTMLElement&&R(t).forEach(c=>{c instanceof Element&&i.add(c)}),i.forEach(c=>{r=ee(r,L(c.getBoundingClientRect()))}),r}function x(e){const[t,n]=e.split("-");return{side:t,align:n||"center"}}function re(e){return e==="top"?"bottom":e==="bottom"?"top":e==="left"?"right":"left"}function ie(e){const{side:t,align:n}=x(e);return`${re(t)}${n==="center"?"":`-${n}`}`}function O(e,t,n,r=0,i=0,o=!1){const{side:c,align:a}=x(n);let l=0,d=0;return c==="top"||c==="bottom"?(a==="start"?l=o?e.right-t.width:e.left:a==="end"?l=o?e.left:e.right-t.width:l=e.left+(e.width-t.width)/2,d=c==="top"?e.top-t.height-r:e.bottom+r,l+=i):(a==="start"?d=e.top:a==="end"?d=e.bottom-t.height:d=e.top+(e.height-t.height)/2,l=c==="left"?e.left-t.width-r:e.right+r,d+=i),{x:l,y:d}}function E(e,t,n){return Math.min(n,Math.max(t,e))}function P(e){return Math.max(0,e.top)+Math.max(0,e.right)+Math.max(0,e.bottom)+Math.max(0,e.left)}function D(e,t){const{side:n}=x(e);return Math.max(0,t[n])}function oe(e,t){const{side:n}=x(e);return n==="top"||n==="bottom"?Math.max(0,t.left)+Math.max(0,t.right):Math.max(0,t.top)+Math.max(0,t.bottom)}function b(e,t={}){const n=t.padding??e.padding,r=t.elementContext==="reference"?{x:e.rects.reference.left,y:e.rects.reference.top,width:e.rects.reference.width,height:e.rects.reference.height}:{x:e.x,y:e.y,width:e.rects.floating.width,height:e.rects.floating.height};return{top:e.boundary.top+n-r.y,right:r.x+r.width-(e.boundary.right-n),bottom:r.y+r.height-(e.boundary.bottom-n),left:e.boundary.left+n-r.x}}function F(e=0){return{name:"offset",options:e,fn(t){const n=typeof e=="number"?{mainAxis:e,crossAxis:0}:{mainAxis:e.mainAxis??0,crossAxis:e.crossAxis??0},r=O(t.rects.reference,t.rects.floating,t.placement,n.mainAxis,n.crossAxis,t.rtl);return{x:r.x,y:r.y,data:{x:r.x-t.x,y:r.y-t.y}}}}}function V(e={}){return{name:"flip",options:e,fn(t){const n=e.fallbackPlacements?.length?e.fallbackPlacements:[ie(t.initialPlacement)],i=[t.placement,...n].map(l=>{const d=t.getAnchorRect(l),f=t.getCoords(l,d),s=b({...t,x:f.x,y:f.y,rects:{...t.rects,reference:d}},{padding:e.padding??t.padding});return{placement:l,overflow:s,coords:f,reference:d}}),o=i[0];if(!o||D(t.placement,o.overflow)<=0)return{data:{overflows:i.map(({placement:l,overflow:d})=>({placement:l,overflow:d}))}};const a=i.find(({placement:l,overflow:d})=>D(l,d)<=0&&oe(l,d)<=0)||i.reduce((l,d)=>P(d.overflow)<P(l.overflow)?d:l,o);return a.placement===t.placement?{data:{overflows:i.map(({placement:l,overflow:d})=>({placement:l,overflow:d}))}}:{x:a.coords.x,y:a.coords.y,placement:a.placement,data:{overflows:i.map(({placement:l,overflow:d})=>({placement:l,overflow:d}))}}}}}function T(e={}){return{name:"autoPlacement",options:e,fn(t){const n=e.allowedPlacements?.length?e.allowedPlacements:X,r=n.map(o=>{const c=t.getAnchorRect(o),a=t.getCoords(o,c),l=b({...t,x:a.x,y:a.y,rects:{...t.rects,reference:c}},{padding:e.padding??t.padding});return{placement:o,overflow:l,coords:a,reference:c}}),i=r.reduce((o,c)=>{const a=P(c.overflow),l=P(o.overflow);if(a!==l)return a<l?c:o;const d=Math.max(0,t.boundary.right-c.coords.x)*Math.max(0,t.boundary.bottom-c.coords.y),f=Math.max(0,t.boundary.right-o.coords.x)*Math.max(0,t.boundary.bottom-o.coords.y);return d>f?c:o},r[0]);if(i)return{x:i.coords.x,y:i.coords.y,placement:i.placement,data:{index:n.indexOf(i.placement),overflows:r.map(({placement:o,overflow:c})=>({placement:o,overflow:c}))}}}}}function B(e={}){return{name:"shift",options:e,fn(t){const n=e.mainAxis??!0,r=e.crossAxis??!0,{side:i}=x(t.placement),o=b(t,{padding:e.padding??t.padding});let c=t.x,a=t.y;return i==="top"||i==="bottom"?(r&&(c+=Math.max(0,o.left)-Math.max(0,o.right)),n&&(a+=i==="top"?Math.max(0,o.top):-Math.max(0,o.bottom))):(r&&(a+=Math.max(0,o.top)-Math.max(0,o.bottom)),n&&(c+=i==="left"?Math.max(0,o.left):-Math.max(0,o.right))),{x:c,y:a,data:{x:c-t.x,y:a-t.y}}}}}function I(e={}){return{name:"size",options:e,fn(t){const n=e.padding??t.padding,r=Math.max(0,t.boundary.right-t.x-n),i=Math.max(0,t.boundary.bottom-t.y-n);return e.apply?.({availableWidth:r,availableHeight:i,rects:t.rects,elements:t.elements}),{data:{availableWidth:r,availableHeight:i}}}}}function k(e={}){return{name:"arrow",options:e,fn(t){const{side:n}=x(t.placement),r=e.padding??8,i=e.element?.getBoundingClientRect(),o=i?.width||e.element?.offsetWidth||0,c=i?.height||e.element?.offsetHeight||0,a=t.rects.reference.left+t.rects.reference.width/2,l=t.rects.reference.top+t.rects.reference.height/2;if(n==="top"||n==="bottom"){const u=o/2,y=r,v=Math.max(y,t.rects.floating.width-r-o),M=a-t.x-u,A=E(M,y,v);return{data:{x:A,centerOffset:M-A}}}const d=c/2,f=r,s=Math.max(f,t.rects.floating.height-r-c),g=l-t.y-d,m=E(g,f,s);return{data:{y:m,centerOffset:g-m}}}}}function q(e={}){return{name:"hide",options:e,fn(t){const n=e.padding??t.padding,r=b(t,{elementContext:"reference",padding:n}),i=b(t,{padding:n}),o=Object.values(r).some(a=>a>0),c=Object.values(i).some(a=>a>0);return{data:{referenceHidden:o,escaped:c,referenceHiddenOffsets:r,escapedOffsets:i}}}}}function ce(e){const t=typeof e.boundaryPadding=="number"?e.boundaryPadding:4,n=[];return e.autoPlacement?n.push(T({padding:t,allowedPlacements:e.allowedPlacements})):e.flip&&n.push(V({padding:t,fallbackPlacements:e.fallbackPlacements})),n.push(F({mainAxis:typeof e.offset=="number"?e.offset:8,crossAxis:typeof e.crossOffset=="number"?e.crossOffset:0})),(e.shift||e.fitViewport)&&n.push(B({padding:t})),(e.matchWidth||e.fitViewport)&&n.push(I({padding:t})),e.arrow&&n.push(k({element:e.arrow,padding:e.arrowPadding})),e.hideWhenDetached&&n.push(q({padding:t})),e.middleware?.length&&n.push(...e.middleware),n}function le(e,t,n){if(!n)return;typeof n.x=="number"&&(e.x=n.x),typeof n.y=="number"&&(e.y=n.y);const i=(typeof n.reset=="object"?n.reset.placement:void 0)||n.placement;if(i&&i!==e.placement){e.placement=i,e.rects=e.getRects(i);const o=e.getCoords(i,e.rects.reference);e.x=typeof n.x=="number"?n.x:o.x,e.y=typeof n.y=="number"?n.y:o.y}typeof n.x=="number"&&(e.x=n.x),typeof n.y=="number"&&(e.y=n.y),n.data!==void 0&&(e.middlewareData[t.name]=n.data)}function S(e,t,n={}){const r=z(t)?t.getBoundingClientRect():t,i=n.placement||"bottom",o=n.strategy||"fixed",c=typeof n.boundaryPadding=="number"?n.boundaryPadding:4,a=G(e,t,n.dir)==="rtl",l=h=>n.platform?.getElementRects?.({anchor:e,floating:t,placement:h,inline:!!n.inline})??{reference:j(e,h,!!n.inline,n.platform),floating:r},d=h=>l(h).reference,f=l(i),s=O(f.reference,f.floating,i,0,0,a),g={},m=n.platform?.getClippingRect?.({anchor:e,floating:t,boundary:n.boundary??null})??ne(e,t,n.boundary??null),u={x:s.x,y:s.y,initialPlacement:i,placement:i,strategy:o,rects:f,elements:{anchor:e,floating:t},boundary:m,padding:c,rtl:a,middlewareData:g,getRects:l,getAnchorRect:d,getCoords:(h,U=d(h))=>O(U,u.rects.floating,h,0,0,a)};ce(n).forEach(h=>{le(u,h,h.fn(u))});const y=g.size,v=g.hide,M=y?.availableWidth??Math.max(0,u.boundary.right-u.x-c),A=y?.availableHeight??Math.max(0,u.boundary.bottom-u.y-c);return{x:u.x,y:u.y,placement:u.placement,strategy:o,availableWidth:M,availableHeight:A,middlewareData:g,referenceHidden:v?.referenceHidden,escaped:v?.escaped,rects:u.rects}}function W(e,t){return t!=="absolute"?e:{...e,x:e.x+window.scrollX,y:e.y+window.scrollY}}function ae(e,t){if(typeof IntersectionObserver>"u")return()=>{};let n=()=>{};return(()=>{n();const i=e.getBoundingClientRect(),o=document.documentElement,c=`${-Math.floor(i.top)}px ${-Math.floor(o.clientWidth-i.right)}px ${-Math.floor(o.clientHeight-i.bottom)}px ${-Math.floor(i.left)}px`,a=new IntersectionObserver(()=>t(),{rootMargin:c,threshold:1});a.observe(e),n=()=>a.disconnect()})(),()=>n()}function de(e,t,n,r){let i=0,o=0,c=null,a=null,l=null;const d=[],f=H(e),s=()=>{i||(i=requestAnimationFrame(()=>{i=0,n()}))};if(r.observeWindowResize&&(window.addEventListener("resize",s),d.push(()=>window.removeEventListener("resize",s))),r.observeScroll&&(window.addEventListener("scroll",s,{passive:!0,capture:!0}),d.push(()=>window.removeEventListener("scroll",s,!0))),(r.observeAncestorScroll||r.observeAncestorResize?new Set([...f?R(f):[],...R(t)]):new Set).forEach(m=>{m!==window&&(r.observeAncestorScroll&&(m.addEventListener("scroll",s,{passive:!0}),d.push(()=>m.removeEventListener("scroll",s))),r.observeAncestorResize&&(m.addEventListener("resize",s),d.push(()=>m.removeEventListener("resize",s))))}),f&&r.observeLayoutShift&&d.push(ae(f,s)),typeof ResizeObserver<"u"&&(r.observeAnchorResize&&f&&(a=new ResizeObserver(s),a.observe(f)),r.observeFloatingResize&&(l=new ResizeObserver(s),l.observe(t))),r.animationFrame){c=w(e);const m=()=>{const u=w(e);c&&(c.top!==u.top||c.left!==u.left||c.width!==u.width||c.height!==u.height)&&s(),c=u,o=requestAnimationFrame(m)};o=requestAnimationFrame(m)}return()=>{d.forEach(m=>m()),a&&a.disconnect(),l&&l.disconnect(),i&&cancelAnimationFrame(i),o&&cancelAnimationFrame(o)}}function N(e,t,n,r={}){return de(e,t,n,{observeWindowResize:r.observeWindowResize??!0,observeScroll:r.observeScroll??!0,observeAncestorScroll:r.observeAncestorScroll??!0,observeAncestorResize:r.observeAncestorResize??!0,observeLayoutShift:r.observeLayoutShift??!0,observeAnchorResize:r.observeAnchorResize??!0,observeFloatingResize:r.observeFloatingResize??!0,animationFrame:r.animationFrame??!1})}function fe(e,t,n,r){const{side:i}=x(t.placement),o=n.left+n.width/2,c=n.top+n.height/2;if(i==="top"||i==="bottom"){const l=Math.max(8,r.width-8),d=E(o-t.x,8,l);e.style.left=`${Math.round(d)}px`}else{const l=Math.max(8,r.height-8),d=E(c-t.y,8,l);e.style.top=`${Math.round(d)}px`}}function se(e,t){const n=t.middlewareData?.arrow;n&&(typeof n.x=="number"&&(e.style.left=`${Math.round(n.x)}px`),typeof n.y=="number"&&(e.style.top=`${Math.round(n.y)}px`))}function ue(e,t,n,r){if(e.style.position=n,e.style.left=`${Math.round(t.x)}px`,e.style.top=`${Math.round(t.y)}px`,e.style.setProperty("--ui-positioner-x",`${Math.round(t.x)}px`),e.style.setProperty("--ui-positioner-y",`${Math.round(t.y)}px`),r.matchWidth){const i=w(r.anchor);e.style.width=`${Math.round(i.width)}px`}r.fitViewport&&(e.style.maxWidth=`${Math.round(t.availableWidth)}px`,e.style.maxHeight=`${Math.round(t.availableHeight)}px`),e.setAttribute("data-placement",t.placement),typeof t.referenceHidden=="boolean"||typeof t.escaped=="boolean"?(e.setAttribute("data-reference-hidden",t.referenceHidden?"true":"false"),e.setAttribute("data-escaped",t.escaped?"true":"false")):(e.removeAttribute("data-reference-hidden"),e.removeAttribute("data-escaped")),r.arrow instanceof HTMLElement&&(t.middlewareData?.arrow?se(r.arrow,t):fe(r.arrow,t,w(r.anchor),e.getBoundingClientRect()))}function me(e){if(!(e.floating instanceof HTMLElement))throw new Error("createPositioner requires a valid floating HTMLElement");const t=e.strategy||"fixed",n=e.floating;let r=W(S(e.anchor,n,e),t);const i=N(e.anchor,n,o,{observeWindowResize:e.observeWindowResize??!0,observeScroll:e.observeScroll??!0,observeAncestorScroll:e.observeAncestorScroll??!0,observeAncestorResize:e.observeAncestorResize??!0,observeLayoutShift:e.observeLayoutShift??!0,observeAnchorResize:e.observeAnchorResize??!0,observeFloatingResize:e.observeFloatingResize??!(e.fitViewport||e.matchWidth),animationFrame:e.animationFrame??!1});function o(){const c=W(S(e.anchor,n,e),t);return r=c,ue(n,c,t,e),e.onUpdate?.(c),r}return o(),{update:o,destroy(){i()}}}exports.arrowMiddleware=k;exports.autoPlacementMiddleware=T;exports.autoUpdatePositioner=N;exports.computePositionState=S;exports.createPositioner=me;exports.createVirtualPoint=J;exports.createVirtualRange=Q;exports.createVirtualRect=K;exports.detectPositionerOverflow=b;exports.flipMiddleware=V;exports.hideMiddleware=q;exports.offsetMiddleware=F;exports.shiftMiddleware=B;exports.sizeMiddleware=I;
|
|
1
|
+
"use strict";const X=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"];function z(e){return e instanceof HTMLElement}function Y(e){return!!e&&typeof e.top=="number"&&typeof e.left=="number"}function $(e){return!!e&&typeof e.getBoundingClientRect=="function"}function C(e){const t=e.x??0,n=e.y??0;return typeof DOMRect.fromRect=="function"?DOMRect.fromRect({x:t,y:n,width:e.width,height:e.height}):new DOMRect(t,n,e.width,e.height)}function p(e){return e instanceof DOMRect?e:C({x:e.x??e.left,y:e.y??e.top,width:e.width,height:e.height})}function w(e){return z(e)?e.getBoundingClientRect():Y(e)?p(e):p(e.getBoundingClientRect())}function _(e,t){const n=t?.getClientRects?.(e);if(n)return Array.from(n).map(i=>p(i)).filter(i=>i.width>0||i.height>0);const r=(z(e)||$(e))&&typeof e.getClientRects=="function"?e.getClientRects():null;return r?Array.from(r).map(i=>p(i)).filter(i=>i.width>0||i.height>0):[]}function j(e,t,n,r){if(!n)return w(e);const i=_(e,r);if(i.length===0)return w(e);const{side:o}=x(t);return o==="bottom"||o==="right"?i[i.length-1]||w(e):i[0]||w(e)}function H(e){return z(e)?e:$(e)&&e.contextElement instanceof HTMLElement?e.contextElement:null}function G(e,t,n){if(n)return n;const r=H(e)||(t instanceof HTMLElement?t:null);return r&&window.getComputedStyle(r).direction==="rtl"?"rtl":"ltr"}function J(e,t,n){return{getBoundingClientRect:()=>C({x:e,y:t,width:0,height:0}),contextElement:n}}function K(e,t){const n=C({x:e.x??e.left,y:e.y??e.top,width:e.width,height:e.height});return{getBoundingClientRect:()=>n,contextElement:t}}function Q(e,t){return{getBoundingClientRect:()=>p(e.getBoundingClientRect()),getClientRects:()=>e.getClientRects(),contextElement:t}}function Z(){const e=window.innerWidth||document.documentElement.clientWidth||0,t=window.innerHeight||document.documentElement.clientHeight||0;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function L(e){return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function ee(e,t){const n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return{top:r,left:n,right:i,bottom:o,width:Math.max(0,i-n),height:Math.max(0,o-r)}}function te(e){const t=window.getComputedStyle(e),n=`${t.overflow}${t.overflowX}${t.overflowY}`;return/(auto|scroll|overlay|hidden|clip)/.test(n)}function R(e){const t=[];let n=e?.parentElement??null;for(;n&&n!==document.body&&n!==document.documentElement;)te(n)&&t.push(n),n=n.parentElement;return t.push(window),t}function ne(e,t,n){let r=n instanceof HTMLElement?L(n.getBoundingClientRect()):Z();if(n instanceof HTMLElement)return r;const i=new Set,o=H(e);return o&&R(o).forEach(c=>{c instanceof Element&&i.add(c)}),t instanceof HTMLElement&&R(t).forEach(c=>{c instanceof Element&&i.add(c)}),i.forEach(c=>{r=ee(r,L(c.getBoundingClientRect()))}),r}function x(e){const[t,n]=e.split("-");return{side:t,align:n||"center"}}function re(e){return e==="top"?"bottom":e==="bottom"?"top":e==="left"?"right":"left"}function ie(e){const{side:t,align:n}=x(e);return`${re(t)}${n==="center"?"":`-${n}`}`}function O(e,t,n,r=0,i=0,o=!1){const{side:c,align:a}=x(n);let l=0,d=0;return c==="top"||c==="bottom"?(a==="start"?l=o?e.right-t.width:e.left:a==="end"?l=o?e.left:e.right-t.width:l=e.left+(e.width-t.width)/2,d=c==="top"?e.top-t.height-r:e.bottom+r,l+=i):(a==="start"?d=e.top:a==="end"?d=e.bottom-t.height:d=e.top+(e.height-t.height)/2,l=c==="left"?e.left-t.width-r:e.right+r,d+=i),{x:l,y:d}}function E(e,t,n){return Math.min(n,Math.max(t,e))}function P(e){return Math.max(0,e.top)+Math.max(0,e.right)+Math.max(0,e.bottom)+Math.max(0,e.left)}function D(e,t){const{side:n}=x(e);return Math.max(0,t[n])}function oe(e,t){const{side:n}=x(e);return n==="top"||n==="bottom"?Math.max(0,t.left)+Math.max(0,t.right):Math.max(0,t.top)+Math.max(0,t.bottom)}function b(e,t={}){const n=t.padding??e.padding,r=t.elementContext==="reference"?{x:e.rects.reference.left,y:e.rects.reference.top,width:e.rects.reference.width,height:e.rects.reference.height}:{x:e.x,y:e.y,width:e.rects.floating.width,height:e.rects.floating.height};return{top:e.boundary.top+n-r.y,right:r.x+r.width-(e.boundary.right-n),bottom:r.y+r.height-(e.boundary.bottom-n),left:e.boundary.left+n-r.x}}function F(e=0){return{name:"offset",options:e,fn(t){const n=typeof e=="number"?{mainAxis:e,crossAxis:0}:{mainAxis:e.mainAxis??0,crossAxis:e.crossAxis??0},r=O(t.rects.reference,t.rects.floating,t.placement,n.mainAxis,n.crossAxis,t.rtl);return{x:r.x,y:r.y,data:{x:r.x-t.x,y:r.y-t.y}}}}}function V(e={}){return{name:"flip",options:e,fn(t){const n=e.fallbackPlacements?.length?e.fallbackPlacements:[ie(t.initialPlacement)],i=[t.placement,...n].map(l=>{const d=t.getAnchorRect(l),f=t.getCoords(l,d),s=b({...t,x:f.x,y:f.y,rects:{...t.rects,reference:d}},{padding:e.padding??t.padding});return{placement:l,overflow:s,coords:f,reference:d}}),o=i[0];if(!o||D(t.placement,o.overflow)<=0)return{data:{overflows:i.map(({placement:l,overflow:d})=>({placement:l,overflow:d}))}};const a=i.find(({placement:l,overflow:d})=>D(l,d)<=0&&oe(l,d)<=0)||i.reduce((l,d)=>P(d.overflow)<P(l.overflow)?d:l,o);return a.placement===t.placement?{data:{overflows:i.map(({placement:l,overflow:d})=>({placement:l,overflow:d}))}}:{x:a.coords.x,y:a.coords.y,placement:a.placement,data:{overflows:i.map(({placement:l,overflow:d})=>({placement:l,overflow:d}))}}}}}function T(e={}){return{name:"autoPlacement",options:e,fn(t){const n=e.allowedPlacements?.length?e.allowedPlacements:X,r=n.map(o=>{const c=t.getAnchorRect(o),a=t.getCoords(o,c),l=b({...t,x:a.x,y:a.y,rects:{...t.rects,reference:c}},{padding:e.padding??t.padding});return{placement:o,overflow:l,coords:a,reference:c}}),i=r.reduce((o,c)=>{const a=P(c.overflow),l=P(o.overflow);if(a!==l)return a<l?c:o;const d=Math.max(0,t.boundary.right-c.coords.x)*Math.max(0,t.boundary.bottom-c.coords.y),f=Math.max(0,t.boundary.right-o.coords.x)*Math.max(0,t.boundary.bottom-o.coords.y);return d>f?c:o},r[0]);if(i)return{x:i.coords.x,y:i.coords.y,placement:i.placement,data:{index:n.indexOf(i.placement),overflows:r.map(({placement:o,overflow:c})=>({placement:o,overflow:c}))}}}}}function B(e={}){return{name:"shift",options:e,fn(t){const n=e.mainAxis??!0,r=e.crossAxis??!0,{side:i}=x(t.placement),o=b(t,{padding:e.padding??t.padding});let c=t.x,a=t.y;return i==="top"||i==="bottom"?(r&&(c+=Math.max(0,o.left)-Math.max(0,o.right)),n&&(a+=i==="top"?Math.max(0,o.top):-Math.max(0,o.bottom))):(r&&(a+=Math.max(0,o.top)-Math.max(0,o.bottom)),n&&(c+=i==="left"?Math.max(0,o.left):-Math.max(0,o.right))),{x:c,y:a,data:{x:c-t.x,y:a-t.y}}}}}function I(e={}){return{name:"size",options:e,fn(t){const n=e.padding??t.padding,r=Math.max(0,t.boundary.right-t.x-n),i=Math.max(0,t.boundary.bottom-t.y-n);return e.apply?.({availableWidth:r,availableHeight:i,rects:t.rects,elements:t.elements}),{data:{availableWidth:r,availableHeight:i}}}}}function k(e={}){return{name:"arrow",options:e,fn(t){const{side:n}=x(t.placement),r=e.padding??8,i=e.element?.getBoundingClientRect(),o=i?.width||e.element?.offsetWidth||0,c=i?.height||e.element?.offsetHeight||0,a=t.rects.reference.left+t.rects.reference.width/2,l=t.rects.reference.top+t.rects.reference.height/2;if(n==="top"||n==="bottom"){const u=o/2,y=r,v=Math.max(y,t.rects.floating.width-r-o),M=a-t.x-u,A=E(M,y,v);return{data:{x:A,centerOffset:M-A}}}const d=c/2,f=r,s=Math.max(f,t.rects.floating.height-r-c),g=l-t.y-d,m=E(g,f,s);return{data:{y:m,centerOffset:g-m}}}}}function q(e={}){return{name:"hide",options:e,fn(t){const n=e.padding??t.padding,r=b(t,{elementContext:"reference",padding:n}),i=b(t,{padding:n}),o=Object.values(r).some(a=>a>0),c=Object.values(i).some(a=>a>0);return{data:{referenceHidden:o,escaped:c,referenceHiddenOffsets:r,escapedOffsets:i}}}}}function ce(e){const t=typeof e.boundaryPadding=="number"?e.boundaryPadding:4,n=[];return e.autoPlacement?n.push(T({padding:t,allowedPlacements:e.allowedPlacements})):e.flip&&n.push(V({padding:t,fallbackPlacements:e.fallbackPlacements})),n.push(F({mainAxis:typeof e.offset=="number"?e.offset:8,crossAxis:typeof e.crossOffset=="number"?e.crossOffset:0})),(e.shift||e.fitViewport)&&n.push(B({padding:t})),(e.matchWidth||e.fitViewport)&&n.push(I({padding:t})),e.arrow&&n.push(k({element:e.arrow,padding:e.arrowPadding})),e.hideWhenDetached&&n.push(q({padding:t})),e.middleware?.length&&n.push(...e.middleware),n}function le(e,t,n){if(!n)return;typeof n.x=="number"&&(e.x=n.x),typeof n.y=="number"&&(e.y=n.y);const i=(typeof n.reset=="object"?n.reset.placement:void 0)||n.placement;if(i&&i!==e.placement){e.placement=i,e.rects=e.getRects(i);const o=e.getCoords(i,e.rects.reference);e.x=typeof n.x=="number"?n.x:o.x,e.y=typeof n.y=="number"?n.y:o.y}typeof n.x=="number"&&(e.x=n.x),typeof n.y=="number"&&(e.y=n.y),n.data!==void 0&&(e.middlewareData[t.name]=n.data)}function S(e,t,n={}){const r=z(t)?t.getBoundingClientRect():t,i=n.placement||"bottom",o=n.strategy||"fixed",c=typeof n.boundaryPadding=="number"?n.boundaryPadding:4,a=G(e,t,n.dir)==="rtl",l=h=>n.platform?.getElementRects?.({anchor:e,floating:t,placement:h,inline:!!n.inline})??{reference:j(e,h,!!n.inline,n.platform),floating:r},d=h=>l(h).reference,f=l(i),s=O(f.reference,f.floating,i,0,0,a),g={},m=n.platform?.getClippingRect?.({anchor:e,floating:t,boundary:n.boundary??null})??ne(e,t,n.boundary??null),u={x:s.x,y:s.y,initialPlacement:i,placement:i,strategy:o,rects:f,elements:{anchor:e,floating:t},boundary:m,padding:c,rtl:a,middlewareData:g,getRects:l,getAnchorRect:d,getCoords:(h,U=d(h))=>O(U,u.rects.floating,h,0,0,a)};ce(n).forEach(h=>{le(u,h,h.fn(u))});const y=g.size,v=g.hide,M=y?.availableWidth??Math.max(0,u.boundary.right-u.x-c),A=y?.availableHeight??Math.max(0,u.boundary.bottom-u.y-c);return{x:u.x,y:u.y,placement:u.placement,strategy:o,availableWidth:M,availableHeight:A,middlewareData:g,referenceHidden:v?.referenceHidden,escaped:v?.escaped,rects:u.rects}}function W(e,t){return t!=="absolute"?e:{...e,x:e.x+window.scrollX,y:e.y+window.scrollY}}function ae(e,t){if(typeof IntersectionObserver>"u")return()=>{};let n=()=>{};return(()=>{n();const i=e.getBoundingClientRect(),o=document.documentElement,c=`${-Math.floor(i.top)}px ${-Math.floor(o.clientWidth-i.right)}px ${-Math.floor(o.clientHeight-i.bottom)}px ${-Math.floor(i.left)}px`,a=new IntersectionObserver(()=>t(),{rootMargin:c,threshold:1});a.observe(e),n=()=>a.disconnect()})(),()=>n()}function de(e,t,n,r){let i=0,o=0,c=null,a=null,l=null;const d=[],f=H(e),s=()=>{i||(i=requestAnimationFrame(()=>{i=0,n()}))};if(r.observeWindowResize&&(window.addEventListener("resize",s),d.push(()=>window.removeEventListener("resize",s))),r.observeScroll&&(window.addEventListener("scroll",s,{passive:!0,capture:!0}),d.push(()=>window.removeEventListener("scroll",s,!0))),(r.observeAncestorScroll||r.observeAncestorResize?new Set([...f?R(f):[],...R(t)]):new Set).forEach(m=>{m!==window&&(r.observeAncestorScroll&&(m.addEventListener("scroll",s,{passive:!0}),d.push(()=>m.removeEventListener("scroll",s))),r.observeAncestorResize&&(m.addEventListener("resize",s),d.push(()=>m.removeEventListener("resize",s))))}),f&&r.observeLayoutShift&&d.push(ae(f,s)),typeof ResizeObserver<"u"&&(r.observeAnchorResize&&f&&(a=new ResizeObserver(s),a.observe(f)),r.observeFloatingResize&&(l=new ResizeObserver(s),l.observe(t))),r.animationFrame){c=w(e);const m=()=>{const u=w(e);c&&(c.top!==u.top||c.left!==u.left||c.width!==u.width||c.height!==u.height)&&s(),c=u,o=requestAnimationFrame(m)};o=requestAnimationFrame(m)}return()=>{d.forEach(m=>m()),a&&a.disconnect(),l&&l.disconnect(),i&&cancelAnimationFrame(i),o&&cancelAnimationFrame(o)}}function N(e,t,n,r={}){return de(e,t,n,{observeWindowResize:r.observeWindowResize??!0,observeScroll:r.observeScroll??!0,observeAncestorScroll:r.observeAncestorScroll??!0,observeAncestorResize:r.observeAncestorResize??!0,observeLayoutShift:r.observeLayoutShift??!0,observeAnchorResize:r.observeAnchorResize??!0,observeFloatingResize:r.observeFloatingResize??!0,animationFrame:r.animationFrame??!1})}function fe(e,t,n,r){const{side:i}=x(t.placement),o=n.left+n.width/2,c=n.top+n.height/2;if(i==="top"||i==="bottom"){const l=Math.max(8,r.width-8),d=E(o-t.x,8,l);e.style.left=`${Math.round(d)}px`}else{const l=Math.max(8,r.height-8),d=E(c-t.y,8,l);e.style.top=`${Math.round(d)}px`}}function se(e,t){const n=t.middlewareData?.arrow;n&&(typeof n.x=="number"&&(e.style.left=`${Math.round(n.x)}px`),typeof n.y=="number"&&(e.style.top=`${Math.round(n.y)}px`))}function ue(e,t,n,r){if(e.style.position=n,e.style.left=`${Math.round(t.x)}px`,e.style.top=`${Math.round(t.y)}px`,e.style.setProperty("--ui-positioner-x",`${Math.round(t.x)}px`),e.style.setProperty("--ui-positioner-y",`${Math.round(t.y)}px`),r.matchWidth){const c=w(r.anchor);e.style.width=`${Math.round(c.width)}px`}r.fitViewport&&(e.style.maxWidth=`${Math.round(t.availableWidth)}px`,e.style.maxHeight=`${Math.round(t.availableHeight)}px`),e.setAttribute("data-placement",t.placement);const[i,o]=String(t.placement).split("-");e.setAttribute("data-side",i||"bottom"),e.setAttribute("data-align",o||"center"),typeof t.referenceHidden=="boolean"||typeof t.escaped=="boolean"?(e.setAttribute("data-reference-hidden",t.referenceHidden?"true":"false"),e.setAttribute("data-escaped",t.escaped?"true":"false")):(e.removeAttribute("data-reference-hidden"),e.removeAttribute("data-escaped")),r.arrow instanceof HTMLElement&&(t.middlewareData?.arrow?se(r.arrow,t):fe(r.arrow,t,w(r.anchor),e.getBoundingClientRect()))}function me(e){if(!(e.floating instanceof HTMLElement))throw new Error("createPositioner requires a valid floating HTMLElement");const t=e.strategy||"fixed",n=e.floating;let r=W(S(e.anchor,n,e),t);const i=N(e.anchor,n,o,{observeWindowResize:e.observeWindowResize??!0,observeScroll:e.observeScroll??!0,observeAncestorScroll:e.observeAncestorScroll??!0,observeAncestorResize:e.observeAncestorResize??!0,observeLayoutShift:e.observeLayoutShift??!0,observeAnchorResize:e.observeAnchorResize??!0,observeFloatingResize:e.observeFloatingResize??!(e.fitViewport||e.matchWidth),animationFrame:e.animationFrame??!1});function o(){const c=W(S(e.anchor,n,e),t);return r=c,ue(n,c,t,e),e.onUpdate?.(c),r}return o(),{update:o,destroy(){i()}}}exports.arrowMiddleware=k;exports.autoPlacementMiddleware=T;exports.autoUpdatePositioner=N;exports.computePositionState=S;exports.createPositioner=me;exports.createVirtualPoint=J;exports.createVirtualRange=Q;exports.createVirtualRect=K;exports.detectPositionerOverflow=b;exports.flipMiddleware=V;exports.hideMiddleware=q;exports.offsetMiddleware=F;exports.shiftMiddleware=B;exports.sizeMiddleware=I;
|
package/dist/positioner.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-DxbvhLJs.js"),h=require("./positioner-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-DxbvhLJs.js"),h=require("./positioner-DZ1FW6A9.js"),a=require("./selector-BvAh35ve.js"),d=`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
color-scheme: light dark;
|
package/dist/positioner.esm.js
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open and close motion, state hooks and top-layer promotion for floating surfaces
|
|
3
|
+
* (popovers, menus, dialogs...). The surface carries:
|
|
4
|
+
*
|
|
5
|
+
* data-ui-overlay marks it so the shared CSS applies
|
|
6
|
+
* data-state="open|closed" what it is doing (also what Radix exposes)
|
|
7
|
+
* data-side / data-align set by the positioner, used to slide in from the right edge
|
|
8
|
+
*
|
|
9
|
+
* Opening plays an enter animation. Closing plays an exit animation and only then removes the
|
|
10
|
+
* surface, so it does not vanish with a pop. With reduced motion, or without CSS animation
|
|
11
|
+
* support (jsdom), closing is immediate, so callers can treat `closeOverlay` as synchronous there.
|
|
12
|
+
*/
|
|
13
|
+
/** Put this in the shadow or portal stylesheet of every surface that uses the helpers below. */
|
|
14
|
+
export declare const OVERLAY_MOTION_CSS = "\n [data-ui-overlay] {\n --ui-overlay-shift: 4px;\n --ui-overlay-from: translate3d(0, 0, 0);\n --ui-overlay-ox: center;\n --ui-overlay-oy: center;\n transform-origin: var(--ui-overlay-ox) var(--ui-overlay-oy);\n }\n\n [data-ui-overlay][data-side=\"top\"] { --ui-overlay-from: translate3d(0, var(--ui-overlay-shift), 0); --ui-overlay-oy: bottom; }\n [data-ui-overlay][data-side=\"bottom\"] { --ui-overlay-from: translate3d(0, calc(var(--ui-overlay-shift) * -1), 0); --ui-overlay-oy: top; }\n [data-ui-overlay][data-side=\"left\"] { --ui-overlay-from: translate3d(var(--ui-overlay-shift), 0, 0); --ui-overlay-ox: right; }\n [data-ui-overlay][data-side=\"right\"] { --ui-overlay-from: translate3d(calc(var(--ui-overlay-shift) * -1), 0, 0); --ui-overlay-ox: left; }\n [data-ui-overlay][data-align=\"start\"][data-side=\"top\"],\n [data-ui-overlay][data-align=\"start\"][data-side=\"bottom\"] { --ui-overlay-ox: left; }\n [data-ui-overlay][data-align=\"end\"][data-side=\"top\"],\n [data-ui-overlay][data-align=\"end\"][data-side=\"bottom\"] { --ui-overlay-ox: right; }\n [data-ui-overlay][data-align=\"start\"][data-side=\"left\"],\n [data-ui-overlay][data-align=\"start\"][data-side=\"right\"] { --ui-overlay-oy: top; }\n [data-ui-overlay][data-align=\"end\"][data-side=\"left\"],\n [data-ui-overlay][data-align=\"end\"][data-side=\"right\"] { --ui-overlay-oy: bottom; }\n\n [data-ui-overlay][data-state=\"open\"] {\n animation: ui-overlay-in var(--ui-overlay-in-duration, 150ms) var(--ui-motion-enter-easing, cubic-bezier(0.16, 1, 0.3, 1)) backwards;\n }\n\n [data-ui-overlay][data-instant][data-state=\"open\"] {\n animation: none;\n }\n\n [data-ui-overlay][data-state=\"closed\"] {\n animation: ui-overlay-out var(--ui-overlay-out-duration, 100ms) var(--ui-motion-exit-easing, cubic-bezier(0.4, 0, 1, 1)) both;\n pointer-events: none;\n }\n\n @keyframes ui-overlay-in {\n from { opacity: 0; transform: var(--ui-overlay-from) scale(0.96); }\n to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }\n }\n\n @keyframes ui-overlay-out {\n from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }\n to { opacity: 0; transform: var(--ui-overlay-from) scale(0.96); }\n }\n\n @media (prefers-reduced-motion: reduce) {\n [data-ui-overlay][data-state] { animation: none !important; }\n }\n";
|
|
15
|
+
/**
|
|
16
|
+
* Promote the surface to the browser's top layer, above every z-index on the page. The surface
|
|
17
|
+
* must already be in the document. Browsers without the Popover API keep their z-index stacking.
|
|
18
|
+
* `popover="manual"` adds no light dismiss or Escape handling; the component keeps its own.
|
|
19
|
+
*/
|
|
20
|
+
export declare function liftToTopLayer(el: HTMLElement, options?: {
|
|
21
|
+
resetBox?: boolean;
|
|
22
|
+
}): void;
|
|
23
|
+
export declare function openOverlay(el: HTMLElement, options?: {
|
|
24
|
+
topLayer?: boolean;
|
|
25
|
+
animate?: boolean;
|
|
26
|
+
}): void;
|
|
27
|
+
/**
|
|
28
|
+
* Play the exit, then call `done` once (normally to remove the surface). Returns a function that
|
|
29
|
+
* finishes straight away. Without an exit animation `done` runs before this returns.
|
|
30
|
+
*/
|
|
31
|
+
export declare function closeOverlay(el: HTMLElement, done: () => void): () => void;
|
|
32
|
+
/** Remove a surface now, with no exit animation (for example when its owner is removed). */
|
|
33
|
+
export declare function removeOverlay(el: HTMLElement | null | undefined): void;
|
|
34
|
+
/** Play the exit and remove the surface afterwards. */
|
|
35
|
+
export declare function retireOverlay(el: HTMLElement | null | undefined): void;
|
|
36
|
+
/** `bottom-start` -> { side: 'bottom', align: 'start' }. */
|
|
37
|
+
export declare function splitPlacement(placement: string): {
|
|
38
|
+
side: string;
|
|
39
|
+
align: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Show or hide a panel that stays in its owner's shadow tree and is toggled with `hidden`
|
|
43
|
+
* (select, dropdown, combobox...). Safe to call on every render: it only acts on a change.
|
|
44
|
+
* Hiding plays the exit first, so `hidden` becomes true a moment later, or at once without animation.
|
|
45
|
+
*/
|
|
46
|
+
export declare function setPanelOpen(panel: HTMLElement, open: boolean, side?: string): void;
|
|
47
|
+
//# sourceMappingURL=overlay-motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-motion.d.ts","sourceRoot":"","sources":["../../src/primitives/overlay-motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,4zEAgD9B,CAAC;AAKF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,IAAI,CAoB1F;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,IAAI,CAM1G;AAgBD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAyB1E;AAED,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAOtE;AAED,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAGtE;AAED,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAGjF;AAID;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MA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Ae,CAiEjB;AA4HD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,MAAM,IAAI,EAClB,OAAO,GAAE,2BAAgC,GACxC,MAAM,IAAI,CAWZ;AA+ED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CA4C7E"}
|
package/dist/progress.cjs.js
CHANGED
|
@@ -2,22 +2,17 @@
|
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
width: 100%;
|
|
5
|
-
--ui-progress-bg: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 45%, transparent);
|
|
5
|
+
--ui-progress-bg: var(--ui-color-fill-active, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 45%, transparent));
|
|
6
6
|
--ui-progress-fill: var(--ui-color-primary, #2563eb);
|
|
7
|
-
--ui-progress-fill-soft:
|
|
8
|
-
linear-gradient(
|
|
9
|
-
90deg,
|
|
10
|
-
color-mix(in srgb, var(--ui-progress-fill, #2563eb) 82%, white 18%),
|
|
11
|
-
var(--ui-progress-fill, #2563eb)
|
|
12
|
-
);
|
|
7
|
+
--ui-progress-fill-soft: var(--ui-progress-fill, #2563eb);
|
|
13
8
|
--ui-progress-buffer: color-mix(in srgb, var(--ui-progress-fill, #2563eb) 24%, transparent);
|
|
14
|
-
--ui-progress-height:
|
|
9
|
+
--ui-progress-height: 6px;
|
|
15
10
|
--ui-progress-radius: 999px;
|
|
16
11
|
--ui-progress-shadow: none;
|
|
17
|
-
--ui-progress-label: #334155;
|
|
12
|
+
--ui-progress-label: var(--ui-color-text-secondary, #334155);
|
|
18
13
|
--ui-progress-duration: 220ms;
|
|
19
14
|
--ui-progress-easing: cubic-bezier(0.2, 0.9, 0.24, 1);
|
|
20
|
-
--ui-progress-track-border:
|
|
15
|
+
--ui-progress-track-border: 0;
|
|
21
16
|
--ui-progress-circle-size: 72px;
|
|
22
17
|
--ui-progress-circle-thickness: 8px;
|
|
23
18
|
--ui-progress-circle-track: color-mix(in srgb, var(--ui-progress-bg) 82%, transparent);
|
|
@@ -35,7 +30,7 @@
|
|
|
35
30
|
align-items: baseline;
|
|
36
31
|
justify-content: space-between;
|
|
37
32
|
gap: 8px;
|
|
38
|
-
font:
|
|
33
|
+
font: 500 12px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
|
|
39
34
|
color: var(--ui-progress-label);
|
|
40
35
|
letter-spacing: 0.01em;
|
|
41
36
|
min-height: 16px;
|
|
@@ -217,9 +212,9 @@
|
|
|
217
212
|
:host([shape="round"]) { --ui-progress-radius: 10px; }
|
|
218
213
|
:host([shape="pill"]) { --ui-progress-radius: 999px; }
|
|
219
214
|
|
|
220
|
-
:host([size="xs"]) { --ui-progress-height:
|
|
221
|
-
:host([size="sm"]) { --ui-progress-height:
|
|
222
|
-
:host([size="lg"]) { --ui-progress-height:
|
|
215
|
+
:host([size="xs"]) { --ui-progress-height: 3px; }
|
|
216
|
+
:host([size="sm"]) { --ui-progress-height: 4px; }
|
|
217
|
+
:host([size="lg"]) { --ui-progress-height: 8px; }
|
|
223
218
|
|
|
224
219
|
:host([striped]) .value {
|
|
225
220
|
background-image:
|
|
@@ -311,7 +306,7 @@
|
|
|
311
306
|
border-width: 2px;
|
|
312
307
|
}
|
|
313
308
|
}
|
|
314
|
-
`;function u(e,r
|
|
309
|
+
`;function u(e,t,r){return Number.isNaN(e)||e<t?t:e>r?r:e}function v(e,t){if(e==null)return t;const r=String(e).toLowerCase();return r!=="false"&&r!=="0"}function c(e,t){if(e==null||e==="")return t;const r=Number(e);return Number.isFinite(r)?r:t}function _(e){return e==="xs"||e==="sm"||e==="lg"?e:"md"}function x(e){return e==="solid"||e==="soft"||e==="line"||e==="glass"||e==="contrast"?e:"default"}function E(e){return e==="success"||e==="warning"||e==="danger"||e==="info"||e==="neutral"?e:"brand"}function k(e){return e==="square"||e==="round"?e:"pill"}function A(e){return e==="circle"||e==="radial"?"circle":"line"}class p extends b.ElementBase{constructor(){super(),this._value=0,this._buffer=0,this._max=100,this._min=0,this._percent=0,this._bufferPercent=0,this._indeterminate=!1,this._domReady=!1,this._metaEl=null,this._trackEl=null,this._bufferEl=null,this._valueEl=null,this._radialWrapEl=null,this._radialBufferEl=null,this._radialValueEl=null,this._radialCenterEl=null,this._lastEmitted="",this._completeFired=!1}static get observedAttributes(){return["value","buffer","max","min","indeterminate","size","variant","tone","shape","mode","striped","animated","show-label","label","aria-label","format","precision","headless"]}connectedCallback(){this._syncFromAttributes(),super.connectedCallback(),this._emitState()}attributeChangedCallback(t,r,i){r!==i&&(this._syncFromAttributes(),this.isConnected&&this.render(),(t==="value"||t==="buffer"||t==="max"||t==="min"||t==="indeterminate")&&this._emitState())}setValue(t){this.setAttribute("value",String(t))}setBuffer(t){this.setAttribute("buffer",String(t))}increment(t=1){this.setValue(this._value+t)}reset(){this.setValue(this._min)}_syncFromAttributes(){const t=c(this.getAttribute("min"),0),r=c(this.getAttribute("max"),100),i=r>t?r:t+1,s=c(this.getAttribute("value"),t),o=c(this.getAttribute("buffer"),s),d=this.hasAttribute("indeterminate"),l=u(s,t,i),a=u(o,t,i),n=Math.max(1e-6,i-t);this._min=t,this._max=i,this._value=l,this._buffer=a,this._indeterminate=d,this._percent=u((l-t)/n*100,0,100),this._bufferPercent=u((a-t)/n*100,0,100)}_formatLabel(t){const r=(this.getAttribute("format")||"percent").toLowerCase(),i=u(Math.round(c(this.getAttribute("precision"),0)),0,3);if(r==="value")return`${this._value.toFixed(i)} / ${this._max.toFixed(i)}`;if(r==="fraction"){const s=Math.max(1,this._max-this._min);return`${Math.max(0,this._value-this._min).toFixed(i)}/${s.toFixed(i)}`}return`${t.toFixed(i)}%`}_emitState(){if(this._indeterminate)return;const t=`${this._value}|${this._buffer}|${this._max}|${this._min}`;t!==this._lastEmitted&&(this._lastEmitted=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:this._value,buffer:this._buffer,max:this._max,min:this._min,percent:this._percent,bufferPercent:this._bufferPercent},bubbles:!0})),this._value>=this._max?this._completeFired||(this.dispatchEvent(new CustomEvent("complete",{detail:{value:this._value,max:this._max},bubbles:!0})),this._completeFired=!0):this._completeFired=!1)}_ensureDom(){this._domReady||(this.setContent(`
|
|
315
310
|
<style>${m}</style>
|
|
316
311
|
<div class="root" part="root">
|
|
317
312
|
<div class="meta" part="label"></div>
|
|
@@ -326,4 +321,4 @@
|
|
|
326
321
|
<div class="radial-center" part="radial-label"></div>
|
|
327
322
|
</div>
|
|
328
323
|
</div>
|
|
329
|
-
`),this._metaEl=this.root.querySelector(".meta"),this._trackEl=this.root.querySelector(".track"),this._bufferEl=this.root.querySelector(".buffer"),this._valueEl=this.root.querySelector(".value"),this._radialWrapEl=this.root.querySelector(".radial-wrap"),this._radialBufferEl=this.root.querySelector(".radial-buffer"),this._radialValueEl=this.root.querySelector(".radial-value"),this._radialCenterEl=this.root.querySelector(".radial-center"),this._domReady=!0)}render(){this._ensureDom();const
|
|
324
|
+
`),this._metaEl=this.root.querySelector(".meta"),this._trackEl=this.root.querySelector(".track"),this._bufferEl=this.root.querySelector(".buffer"),this._valueEl=this.root.querySelector(".value"),this._radialWrapEl=this.root.querySelector(".radial-wrap"),this._radialBufferEl=this.root.querySelector(".radial-buffer"),this._radialValueEl=this.root.querySelector(".radial-value"),this._radialCenterEl=this.root.querySelector(".radial-center"),this._domReady=!0)}render(){this._ensureDom();const t=v(this.getAttribute("show-label"),!1),r=this.getAttribute("label"),i=r!=null&&r!==""?r:this._indeterminate?"Loading...":this._formatLabel(this._percent),s=_(this.getAttribute("size")),o=x(this.getAttribute("variant")),d=E(this.getAttribute("tone")),l=k(this.getAttribute("shape")),a=A(this.getAttribute("mode")),n=t&&a==="circle",h=t&&a!=="circle",f=(this.getAttribute("aria-label")||"").trim()||(r||"").trim()||"Progress";for(const g of[this._trackEl,this._radialWrapEl])g?.setAttribute("aria-label",f);this._metaEl&&(this._metaEl.textContent=h?i:"",this._metaEl.setAttribute("aria-hidden",h?"false":"true")),this._trackEl&&(this._trackEl.dataset.size=s,this._trackEl.dataset.variant=o,this._trackEl.dataset.tone=d,this._trackEl.dataset.shape=l,a==="line"?(this._trackEl.setAttribute("aria-valuemin",String(this._min)),this._trackEl.setAttribute("aria-valuemax",String(this._max)),this._trackEl.setAttribute("aria-busy",this._indeterminate?"true":"false"),this._trackEl.setAttribute("role","progressbar"),this._indeterminate?(this._trackEl.removeAttribute("aria-valuenow"),this._trackEl.setAttribute("aria-valuetext","Loading")):(this._trackEl.removeAttribute("aria-valuetext"),this._trackEl.setAttribute("aria-valuenow",String(this._value)))):(this._trackEl.removeAttribute("role"),this._trackEl.removeAttribute("aria-valuemin"),this._trackEl.removeAttribute("aria-valuemax"),this._trackEl.removeAttribute("aria-valuenow"),this._trackEl.removeAttribute("aria-valuetext"),this._trackEl.removeAttribute("aria-busy"))),this._bufferEl&&(this._bufferEl.style.width=`${this._indeterminate?0:this._bufferPercent}%`),this._valueEl&&(this._valueEl.style.width=`${this._indeterminate?38:this._percent}%`),this._radialWrapEl&&(this._radialWrapEl.dataset.size=s,this._radialWrapEl.dataset.variant=o,this._radialWrapEl.dataset.tone=d,this._radialWrapEl.dataset.shape=l,a==="circle"?(this._radialWrapEl.setAttribute("aria-valuemin",String(this._min)),this._radialWrapEl.setAttribute("aria-valuemax",String(this._max)),this._radialWrapEl.setAttribute("aria-busy",this._indeterminate?"true":"false"),this._radialWrapEl.setAttribute("role","progressbar"),this._indeterminate?(this._radialWrapEl.removeAttribute("aria-valuenow"),this._radialWrapEl.setAttribute("aria-valuetext","Loading")):(this._radialWrapEl.removeAttribute("aria-valuetext"),this._radialWrapEl.setAttribute("aria-valuenow",String(this._value)))):(this._radialWrapEl.removeAttribute("role"),this._radialWrapEl.removeAttribute("aria-valuemin"),this._radialWrapEl.removeAttribute("aria-valuemax"),this._radialWrapEl.removeAttribute("aria-valuenow"),this._radialWrapEl.removeAttribute("aria-valuetext"),this._radialWrapEl.removeAttribute("aria-busy"))),this._radialBufferEl&&this._radialBufferEl.style.setProperty("--ui-radial-buffer",String(this._indeterminate?0:this._bufferPercent)),this._radialValueEl&&this._radialValueEl.style.setProperty("--ui-radial-value",String(this._indeterminate?24:this._percent)),this._radialCenterEl&&(this._radialCenterEl.textContent=n?i:"",this._radialCenterEl.setAttribute("aria-hidden",n?"false":"true"))}}typeof customElements<"u"&&!customElements.get("ui-progress")&&customElements.define("ui-progress",p);exports.UIProgress=p;
|