@purpur/library 9.6.0 → 9.7.1
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/CHANGELOG.json +57 -0
- package/CHANGELOG.md +26 -1
- package/dist/LICENSE.txt +7 -7
- package/dist/ThemeProvider-D7oXcAde.js +2 -0
- package/dist/{ThemeProvider-Dy771oix.js.map → ThemeProvider-D7oXcAde.js.map} +1 -1
- package/dist/ThemeProvider-DiDBfyFA.mjs +348 -0
- package/dist/{ThemeProvider-CkX-BNWN.mjs.map → ThemeProvider-DiDBfyFA.mjs.map} +1 -1
- package/dist/carousel-BIKcwvYz.mjs +1658 -0
- package/dist/carousel-BIKcwvYz.mjs.map +1 -0
- package/dist/carousel-DnSaLDZf.js +2 -0
- package/dist/carousel-DnSaLDZf.js.map +1 -0
- package/dist/carousel.cjs.js +1 -1
- package/dist/carousel.es.js +1 -1
- package/dist/{comparison-table-Nhp5W6Yc.js → comparison-table-0UDB2BTU.js} +2 -2
- package/dist/{comparison-table-Nhp5W6Yc.js.map → comparison-table-0UDB2BTU.js.map} +1 -1
- package/dist/{comparison-table-CZMKl1TX.mjs → comparison-table-CjTE-fHN.mjs} +48 -48
- package/dist/{comparison-table-CZMKl1TX.mjs.map → comparison-table-CjTE-fHN.mjs.map} +1 -1
- package/dist/comparison-table.cjs.js +1 -1
- package/dist/comparison-table.es.js +1 -1
- package/dist/components/button/src/button.d.ts +1 -1
- package/dist/components/button/src/button.visual.fixtures.d.ts +43 -0
- package/dist/components/button/src/button.visual.fixtures.d.ts.map +1 -0
- package/dist/components/carousel/src/carousel.d.ts.map +1 -1
- package/dist/components/date-picker/src/date-picker.d.ts +8 -0
- package/dist/components/date-picker/src/date-picker.d.ts.map +1 -1
- package/dist/components/drawer/src/drawer-content.d.ts +21 -0
- package/dist/components/drawer/src/drawer-content.d.ts.map +1 -1
- package/dist/components/hero-banner/src/hero-banner.visual.fixtures.d.ts +14 -0
- package/dist/components/hero-banner/src/hero-banner.visual.fixtures.d.ts.map +1 -0
- package/dist/components/modal/src/modal-content.d.ts +21 -0
- package/dist/components/modal/src/modal-content.d.ts.map +1 -1
- package/dist/components/modal/src/modal.d.ts +2 -0
- package/dist/components/modal/src/modal.d.ts.map +1 -1
- package/dist/components/popover/src/popover-content.d.ts +14 -0
- package/dist/components/popover/src/popover-content.d.ts.map +1 -1
- package/dist/components/radio-card-group/src/is-radio-card-item.d.ts +4 -0
- package/dist/components/radio-card-group/src/is-radio-card-item.d.ts.map +1 -0
- package/dist/components/radio-card-group/src/radio-card-group.constants.d.ts +5 -0
- package/dist/components/radio-card-group/src/radio-card-group.constants.d.ts.map +1 -0
- package/dist/components/radio-card-group/src/radio-card-group.d.ts +5 -6
- package/dist/components/radio-card-group/src/radio-card-group.d.ts.map +1 -1
- package/dist/components/radio-card-group/src/radio-card-item.d.ts +1 -2
- package/dist/components/radio-card-group/src/radio-card-item.d.ts.map +1 -1
- package/dist/components/search-field/src/search-field-autocomplete.d.ts +6 -3
- package/dist/components/search-field/src/search-field-autocomplete.d.ts.map +1 -1
- package/dist/components/search-field/src/search-field-base.d.ts +10 -3
- package/dist/components/search-field/src/search-field-base.d.ts.map +1 -1
- package/dist/components/search-field/src/search-field-button.d.ts +3 -1
- package/dist/components/search-field/src/search-field-button.d.ts.map +1 -1
- package/dist/components/search-field/src/search-field.d.ts +12 -6
- package/dist/components/search-field/src/search-field.d.ts.map +1 -1
- package/dist/components/table/src/drag-indicator-circle.d.ts +8 -1
- package/dist/components/table/src/drag-indicator-circle.d.ts.map +1 -1
- package/dist/components/table/src/table.d.ts.map +1 -1
- package/dist/components/tooltip/src/tooltip.d.ts +21 -0
- package/dist/components/tooltip/src/tooltip.d.ts.map +1 -1
- package/dist/components-metadata.js +0 -2
- package/dist/date-picker-CIizn3Pv.js +2 -0
- package/dist/{date-picker-uyPKJulK.js.map → date-picker-CIizn3Pv.js.map} +1 -1
- package/dist/date-picker-DixxW60s.mjs +1617 -0
- package/dist/{date-picker-CzxhZxsw.mjs.map → date-picker-DixxW60s.mjs.map} +1 -1
- package/dist/date-picker.cjs.js +1 -1
- package/dist/date-picker.es.js +1 -1
- package/dist/drawer-BzkRd9F0.mjs +577 -0
- package/dist/drawer-BzkRd9F0.mjs.map +1 -0
- package/dist/drawer-DyhsP34o.js +2 -0
- package/dist/drawer-DyhsP34o.js.map +1 -0
- package/dist/drawer.cjs.js +1 -1
- package/dist/drawer.es.js +1 -1
- package/dist/{footer-D9AcPwlH.js → footer-3Y-664-8.js} +2 -2
- package/dist/{footer-D9AcPwlH.js.map → footer-3Y-664-8.js.map} +1 -1
- package/dist/{footer-BLPlXaZK.mjs → footer-DenAcikt.mjs} +3 -3
- package/dist/{footer-BLPlXaZK.mjs.map → footer-DenAcikt.mjs.map} +1 -1
- package/dist/footer.cjs.js +1 -1
- package/dist/footer.es.js +1 -1
- package/dist/{hero-banner-DkC_BqM7.mjs → hero-banner-B7xrDfzN.mjs} +2 -2
- package/dist/{hero-banner-DkC_BqM7.mjs.map → hero-banner-B7xrDfzN.mjs.map} +1 -1
- package/dist/{hero-banner-D1A-_qou.js → hero-banner-DthITuQ7.js} +2 -2
- package/dist/{hero-banner-D1A-_qou.js.map → hero-banner-DthITuQ7.js.map} +1 -1
- package/dist/hero-banner.cjs.js +1 -1
- package/dist/hero-banner.es.js +1 -1
- package/dist/libraries/theme/src/ThemeProvider.d.ts.map +1 -1
- package/dist/libraries/theme/src/theme.d.ts +1 -0
- package/dist/libraries/theme/src/theme.d.ts.map +1 -1
- package/dist/libraries/theme/src/types.d.ts +7 -0
- package/dist/libraries/theme/src/types.d.ts.map +1 -1
- package/dist/libraries/theme/src/useThemePortalContainer.d.ts +12 -0
- package/dist/libraries/theme/src/useThemePortalContainer.d.ts.map +1 -0
- package/dist/library.cjs.js +1 -1
- package/dist/library.es.js +469 -469
- package/dist/library.es.js.map +1 -1
- package/dist/modal-DJn9idcw.js +2 -0
- package/dist/modal-DJn9idcw.js.map +1 -0
- package/dist/{modal-fp37VbrH.mjs → modal-EIP36327.mjs} +83 -80
- package/dist/modal-EIP36327.mjs.map +1 -0
- package/dist/modal.cjs.js +1 -1
- package/dist/modal.es.js +1 -1
- package/dist/{popover-I26xNbTz.mjs → popover-DERrvReO.mjs} +328 -325
- package/dist/popover-DERrvReO.mjs.map +1 -0
- package/dist/popover-DnGgzfQr.js +2 -0
- package/dist/popover-DnGgzfQr.js.map +1 -0
- package/dist/popover.cjs.js +1 -1
- package/dist/popover.es.js +1 -1
- package/dist/{promotion-card-BiHnQvhn.mjs → promotion-card-BnzIVNQ4.mjs} +2 -2
- package/dist/{promotion-card-BiHnQvhn.mjs.map → promotion-card-BnzIVNQ4.mjs.map} +1 -1
- package/dist/{promotion-card-Bag64gqP.js → promotion-card-DKc2Cx1h.js} +2 -2
- package/dist/{promotion-card-Bag64gqP.js.map → promotion-card-DKc2Cx1h.js.map} +1 -1
- package/dist/promotion-card.cjs.js +1 -1
- package/dist/promotion-card.es.js +1 -1
- package/dist/purpur.css +1 -1
- package/dist/radio-card-group-ZBXjYcQs.mjs +166 -0
- package/dist/radio-card-group-ZBXjYcQs.mjs.map +1 -0
- package/dist/radio-card-group-nrDi5EPK.js +2 -0
- package/dist/radio-card-group-nrDi5EPK.js.map +1 -0
- package/dist/radio-card-group.cjs.js +1 -1
- package/dist/radio-card-group.es.js +3 -5
- package/dist/search-field-2vdDbiT0.js +2 -0
- package/dist/search-field-2vdDbiT0.js.map +1 -0
- package/dist/search-field-DKyNh7pE.mjs +167 -0
- package/dist/search-field-DKyNh7pE.mjs.map +1 -0
- package/dist/search-field.cjs.js +1 -1
- package/dist/search-field.es.js +1 -1
- package/dist/{stepper-CWR2vGPj.mjs → stepper-BDsSa6yr.mjs} +2 -2
- package/dist/{stepper-CWR2vGPj.mjs.map → stepper-BDsSa6yr.mjs.map} +1 -1
- package/dist/{stepper-Df4X7DDR.js → stepper-DpauItjx.js} +2 -2
- package/dist/{stepper-Df4X7DDR.js.map → stepper-DpauItjx.js.map} +1 -1
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.es.js +1 -1
- package/dist/{table-gnGUejtb.js → table-BOCcBzSO.js} +4 -4
- package/dist/table-BOCcBzSO.js.map +1 -0
- package/dist/{table-g_n68i4s.mjs → table-i1Gs9e0e.mjs} +440 -440
- package/dist/table-i1Gs9e0e.mjs.map +1 -0
- package/dist/table.cjs.js +1 -1
- package/dist/table.es.js +1 -1
- package/dist/{text-area-peNKG7g4.js → text-area-D0truMT1.js} +2 -2
- package/dist/{text-area-peNKG7g4.js.map → text-area-D0truMT1.js.map} +1 -1
- package/dist/{text-area-kJvg6cFp.mjs → text-area-IVH-k4MM.mjs} +3 -3
- package/dist/{text-area-kJvg6cFp.mjs.map → text-area-IVH-k4MM.mjs.map} +1 -1
- package/dist/text-area.cjs.js +1 -1
- package/dist/text-area.es.js +1 -1
- package/dist/theme.cjs.js +1 -1
- package/dist/theme.es.js +8 -6
- package/dist/theme.es.js.map +1 -1
- package/dist/tooltip-CJGmJDFQ.js +2 -0
- package/dist/{tooltip-C8Zxnqdb.js.map → tooltip-CJGmJDFQ.js.map} +1 -1
- package/dist/{tooltip-LU2Cy-QC.mjs → tooltip-RA-03bKs.mjs} +277 -274
- package/dist/{tooltip-LU2Cy-QC.mjs.map → tooltip-RA-03bKs.mjs.map} +1 -1
- package/dist/tooltip.cjs.js +1 -1
- package/dist/tooltip.es.js +1 -1
- package/dist/{useColorScheme-tAkY9LHt.mjs → useColorScheme-B9DWd-LN.mjs} +2 -2
- package/dist/{useColorScheme-tAkY9LHt.mjs.map → useColorScheme-B9DWd-LN.mjs.map} +1 -1
- package/dist/useColorScheme-DbTQjxNB.js +2 -0
- package/dist/{useColorScheme-DNyjsWX9.js.map → useColorScheme-DbTQjxNB.js.map} +1 -1
- package/dist/useThemePortalContainer-D9BYjEvT.js +2 -0
- package/dist/useThemePortalContainer-D9BYjEvT.js.map +1 -0
- package/dist/useThemePortalContainer-tFLTaYKN.mjs +9 -0
- package/dist/useThemePortalContainer-tFLTaYKN.mjs.map +1 -0
- package/package.json +29 -29
- package/scripts/generate.mts +62 -3
- package/src/library.ts +2 -71
- package/dist/ThemeProvider-CkX-BNWN.mjs +0 -337
- package/dist/ThemeProvider-Dy771oix.js +0 -2
- package/dist/carousel-DLkTL9sj.mjs +0 -1633
- package/dist/carousel-DLkTL9sj.mjs.map +0 -1
- package/dist/carousel-DXrtxRz5.js +0 -2
- package/dist/carousel-DXrtxRz5.js.map +0 -1
- package/dist/date-picker-CzxhZxsw.mjs +0 -1611
- package/dist/date-picker-uyPKJulK.js +0 -2
- package/dist/drawer-8Acg4wkV.mjs +0 -574
- package/dist/drawer-8Acg4wkV.mjs.map +0 -1
- package/dist/drawer-BLHgcEqb.js +0 -2
- package/dist/drawer-BLHgcEqb.js.map +0 -1
- package/dist/modal-Baisuc6m.js +0 -2
- package/dist/modal-Baisuc6m.js.map +0 -1
- package/dist/modal-fp37VbrH.mjs.map +0 -1
- package/dist/popover-B0XJZ5mj.js +0 -2
- package/dist/popover-B0XJZ5mj.js.map +0 -1
- package/dist/popover-I26xNbTz.mjs.map +0 -1
- package/dist/radio-card-group-CneOprGY.mjs +0 -168
- package/dist/radio-card-group-CneOprGY.mjs.map +0 -1
- package/dist/radio-card-group-Ctuvg61o.js +0 -2
- package/dist/radio-card-group-Ctuvg61o.js.map +0 -1
- package/dist/search-field-CpkHGIYi.mjs +0 -151
- package/dist/search-field-CpkHGIYi.mjs.map +0 -1
- package/dist/search-field-Z0PqDARl.js +0 -2
- package/dist/search-field-Z0PqDARl.js.map +0 -1
- package/dist/table-g_n68i4s.mjs.map +0 -1
- package/dist/table-gnGUejtb.js.map +0 -1
- package/dist/tooltip-C8Zxnqdb.js +0 -2
- package/dist/useColorScheme-DNyjsWX9.js +0 -2
- package/tokens/_dark.scss +0 -9
- package/tokens/_index.scss +0 -9
- package/tokens/border/variables.css +0 -13
- package/tokens/border/variables.d.ts +0 -10
- package/tokens/border/variables.dark.css +0 -12
- package/tokens/border/variables.dark.d.ts +0 -10
- package/tokens/border/variables.dark.js +0 -10
- package/tokens/border/variables.dark.json +0 -18
- package/tokens/border/variables.dark.scss +0 -10
- package/tokens/border/variables.js +0 -10
- package/tokens/border/variables.json +0 -18
- package/tokens/border/variables.scss +0 -10
- package/tokens/breakpoint/variables.css +0 -11
- package/tokens/breakpoint/variables.d.ts +0 -8
- package/tokens/breakpoint/variables.dark.css +0 -10
- package/tokens/breakpoint/variables.dark.d.ts +0 -8
- package/tokens/breakpoint/variables.dark.js +0 -8
- package/tokens/breakpoint/variables.dark.json +0 -14
- package/tokens/breakpoint/variables.dark.scss +0 -8
- package/tokens/breakpoint/variables.js +0 -8
- package/tokens/breakpoint/variables.json +0 -14
- package/tokens/breakpoint/variables.scss +0 -8
- package/tokens/color/variables.css +0 -262
- package/tokens/color/variables.d.ts +0 -253
- package/tokens/color/variables.dark.css +0 -262
- package/tokens/color/variables.dark.d.ts +0 -252
- package/tokens/color/variables.dark.js +0 -252
- package/tokens/color/variables.dark.json +0 -306
- package/tokens/color/variables.dark.scss +0 -252
- package/tokens/color/variables.js +0 -253
- package/tokens/color/variables.json +0 -307
- package/tokens/color/variables.scss +0 -253
- package/tokens/dark.css +0 -9
- package/tokens/dark.d.ts +0 -9
- package/tokens/dark.js +0 -9
- package/tokens/filter/variables.css +0 -4
- package/tokens/filter/variables.d.ts +0 -1
- package/tokens/filter/variables.dark.css +0 -3
- package/tokens/filter/variables.dark.d.ts +0 -1
- package/tokens/filter/variables.dark.js +0 -1
- package/tokens/filter/variables.dark.json +0 -7
- package/tokens/filter/variables.dark.scss +0 -1
- package/tokens/filter/variables.js +0 -1
- package/tokens/filter/variables.json +0 -7
- package/tokens/filter/variables.scss +0 -1
- package/tokens/gradient/variables.css +0 -53
- package/tokens/gradient/variables.d.ts +0 -9
- package/tokens/gradient/variables.dark.css +0 -51
- package/tokens/gradient/variables.dark.d.ts +0 -9
- package/tokens/gradient/variables.dark.js +0 -18
- package/tokens/gradient/variables.dark.json +0 -27
- package/tokens/gradient/variables.dark.scss +0 -36
- package/tokens/gradient/variables.js +0 -18
- package/tokens/gradient/variables.json +0 -27
- package/tokens/gradient/variables.scss +0 -42
- package/tokens/index.css +0 -18
- package/tokens/index.d.ts +0 -9
- package/tokens/index.js +0 -9
- package/tokens/motion/variables.css +0 -14
- package/tokens/motion/variables.d.ts +0 -11
- package/tokens/motion/variables.dark.css +0 -13
- package/tokens/motion/variables.dark.d.ts +0 -11
- package/tokens/motion/variables.dark.js +0 -11
- package/tokens/motion/variables.dark.json +0 -19
- package/tokens/motion/variables.dark.scss +0 -11
- package/tokens/motion/variables.js +0 -11
- package/tokens/motion/variables.json +0 -19
- package/tokens/motion/variables.scss +0 -11
- package/tokens/shadow/variables.css +0 -11
- package/tokens/shadow/variables.d.ts +0 -4
- package/tokens/shadow/variables.dark.css +0 -10
- package/tokens/shadow/variables.dark.d.ts +0 -4
- package/tokens/shadow/variables.dark.js +0 -4
- package/tokens/shadow/variables.dark.json +0 -8
- package/tokens/shadow/variables.dark.scss +0 -4
- package/tokens/shadow/variables.js +0 -4
- package/tokens/shadow/variables.json +0 -8
- package/tokens/shadow/variables.scss +0 -4
- package/tokens/spacing/variables.css +0 -26
- package/tokens/spacing/variables.d.ts +0 -23
- package/tokens/spacing/variables.dark.css +0 -17
- package/tokens/spacing/variables.dark.d.ts +0 -15
- package/tokens/spacing/variables.dark.js +0 -15
- package/tokens/spacing/variables.dark.json +0 -19
- package/tokens/spacing/variables.dark.scss +0 -15
- package/tokens/spacing/variables.js +0 -23
- package/tokens/spacing/variables.json +0 -31
- package/tokens/spacing/variables.scss +0 -23
- package/tokens/typography/variables.css +0 -30
- package/tokens/typography/variables.d.ts +0 -26
- package/tokens/typography/variables.dark.css +0 -29
- package/tokens/typography/variables.dark.d.ts +0 -26
- package/tokens/typography/variables.dark.js +0 -28
- package/tokens/typography/variables.dark.json +0 -38
- package/tokens/typography/variables.dark.scss +0 -26
- package/tokens/typography/variables.js +0 -28
- package/tokens/typography/variables.json +0 -38
- package/tokens/typography/variables.scss +0 -26
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { jsx as a, Fragment as
|
|
2
|
-
import { b as
|
|
3
|
-
import * as
|
|
4
|
-
import { createContext as
|
|
1
|
+
import { jsx as a, Fragment as Re, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { b as V } from "./button-4-yWOgtD.mjs";
|
|
3
|
+
import * as h from "react";
|
|
4
|
+
import { createContext as ae, useContext as Z, useState as D, useCallback as O, useMemo as Pt, useEffect as M, forwardRef as pe, useRef as I } from "react";
|
|
5
5
|
import { a as Ct } from "./variables-DkCN2x27.mjs";
|
|
6
|
-
import { P as
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
6
|
+
import { P as z, c as B, a as St, u as xt } from "./index-DCcK_d4W.mjs";
|
|
7
|
+
import { u as Q } from "./index-DLcqcWxM.mjs";
|
|
8
|
+
import { c as be, u as yt, b as ye } from "./index-DOfn3ixy.mjs";
|
|
9
9
|
import { P as Ot, h as At, R as Rt, u as bt, F as Nt, D as Ft } from "./index-CLMd7NJE.mjs";
|
|
10
10
|
import { u as Tt } from "./index-CEQ35j8b.mjs";
|
|
11
11
|
import { u as Et, o as kt, s as Mt, l as Dt, n as It, p as jt, q as $t, k as Ht, m as Bt } from "./floating-ui.react-dom-EredA301.mjs";
|
|
12
12
|
import { u as zt } from "./index-DPxjTK4w.mjs";
|
|
13
|
-
import { P as
|
|
13
|
+
import { P as Ne } from "./index-DDrLXRUs.mjs";
|
|
14
14
|
import { r as Wt } from "./close.es-BPmk2wkU.mjs";
|
|
15
|
-
import { P as
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
import { P as Fe } from "./paragraph-DSxXmX_0.mjs";
|
|
16
|
+
import "./ThemeProvider-DiDBfyFA.mjs";
|
|
17
|
+
import { u as Lt } from "./useThemePortalContainer-tFLTaYKN.mjs";
|
|
18
|
+
import { c as W } from "./bind-CU-R61T-.mjs";
|
|
19
|
+
import { H as Yt } from "./heading-xwBuT_-9.mjs";
|
|
20
|
+
const ce = ae(null), le = () => {
|
|
21
|
+
const e = Z(ce);
|
|
20
22
|
if (!e)
|
|
21
23
|
throw new Error("usePopoverFlow must be used within a PopoverFlow provider");
|
|
22
24
|
return e;
|
|
23
|
-
},
|
|
25
|
+
}, L = () => Z(ce), Xt = ({
|
|
24
26
|
children: e,
|
|
25
27
|
initialStep: t = 1,
|
|
26
28
|
onComplete: o,
|
|
@@ -32,34 +34,34 @@ const ie = ne(null), ae = () => {
|
|
|
32
34
|
finishLabel: c,
|
|
33
35
|
openDelay: l = 0
|
|
34
36
|
}) => {
|
|
35
|
-
const [g, u] = D(t), [
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
return
|
|
37
|
+
const [g, u] = D(t), [d, w] = D(/* @__PURE__ */ new Set()), _ = O((m) => {
|
|
38
|
+
w((y) => {
|
|
39
|
+
const x = new Set(y);
|
|
40
|
+
return x.add(m), x;
|
|
39
41
|
});
|
|
40
|
-
}, []),
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
return
|
|
42
|
+
}, []), P = O((m) => {
|
|
43
|
+
w((y) => {
|
|
44
|
+
const x = new Set(y);
|
|
45
|
+
return x.delete(m), x;
|
|
44
46
|
});
|
|
45
|
-
}, []),
|
|
46
|
-
u((
|
|
47
|
-
const
|
|
48
|
-
return
|
|
47
|
+
}, []), f = O(() => {
|
|
48
|
+
u((m) => {
|
|
49
|
+
const y = m + 1;
|
|
50
|
+
return y > d.size ? (o?.(), m) : y;
|
|
49
51
|
});
|
|
50
|
-
}, [
|
|
51
|
-
u((
|
|
52
|
-
}, []),
|
|
52
|
+
}, [d.size, o]), S = O(() => {
|
|
53
|
+
u((m) => Math.max(1, m - 1));
|
|
54
|
+
}, []), R = O(() => {
|
|
53
55
|
u(0), n?.();
|
|
54
56
|
}, [n]), F = Pt(
|
|
55
57
|
() => ({
|
|
56
58
|
currentStep: g,
|
|
57
|
-
totalSteps:
|
|
58
|
-
next:
|
|
59
|
-
back:
|
|
60
|
-
dismiss:
|
|
61
|
-
registerStep:
|
|
62
|
-
unregisterStep:
|
|
59
|
+
totalSteps: d.size,
|
|
60
|
+
next: f,
|
|
61
|
+
back: S,
|
|
62
|
+
dismiss: R,
|
|
63
|
+
registerStep: _,
|
|
64
|
+
unregisterStep: P,
|
|
63
65
|
separatorText: r,
|
|
64
66
|
stepText: s,
|
|
65
67
|
backLabel: i,
|
|
@@ -69,12 +71,12 @@ const ie = ne(null), ae = () => {
|
|
|
69
71
|
}),
|
|
70
72
|
[
|
|
71
73
|
g,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
d.size,
|
|
75
|
+
f,
|
|
76
|
+
S,
|
|
77
|
+
R,
|
|
78
|
+
_,
|
|
79
|
+
P,
|
|
78
80
|
r,
|
|
79
81
|
s,
|
|
80
82
|
i,
|
|
@@ -83,31 +85,31 @@ const ie = ne(null), ae = () => {
|
|
|
83
85
|
l
|
|
84
86
|
]
|
|
85
87
|
);
|
|
86
|
-
return /* @__PURE__ */ a(
|
|
87
|
-
},
|
|
88
|
+
return /* @__PURE__ */ a(ce.Provider, { value: F, children: e });
|
|
89
|
+
}, ue = ae(null), J = () => Z(ue), Te = ae({ negative: !1 }), de = () => Z(Te), Kt = 150, Oe = {
|
|
88
90
|
MAX_MD: `(max-width: ${Ct})`
|
|
89
|
-
},
|
|
90
|
-
const e = window.matchMedia(
|
|
91
|
+
}, he = () => {
|
|
92
|
+
const e = window.matchMedia(Oe.MAX_MD);
|
|
91
93
|
function t() {
|
|
92
94
|
n(e.matches);
|
|
93
95
|
}
|
|
94
|
-
const [o, n] = D(() => typeof window > "u" ? !1 : window.matchMedia(
|
|
96
|
+
const [o, n] = D(() => typeof window > "u" ? !1 : window.matchMedia(Oe.MAX_MD).matches), r = O(() => {
|
|
95
97
|
let s;
|
|
96
98
|
return () => {
|
|
97
|
-
clearTimeout(s), s = setTimeout(() => t(),
|
|
99
|
+
clearTimeout(s), s = setTimeout(() => t(), Kt);
|
|
98
100
|
};
|
|
99
101
|
}, [t]);
|
|
100
102
|
return M(() => {
|
|
101
103
|
if (!(typeof window > "u"))
|
|
102
104
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
103
105
|
}, [r]), { isMdOrSmaller: o };
|
|
104
|
-
},
|
|
106
|
+
}, fe = ({
|
|
105
107
|
children: e,
|
|
106
108
|
onClick: t
|
|
107
109
|
}) => {
|
|
108
|
-
const { back: o } =
|
|
110
|
+
const { back: o } = le(), { negative: n } = de(), { isMdOrSmaller: r } = he();
|
|
109
111
|
return /* @__PURE__ */ a(
|
|
110
|
-
|
|
112
|
+
V,
|
|
111
113
|
{
|
|
112
114
|
size: "sm",
|
|
113
115
|
variant: "secondary",
|
|
@@ -120,11 +122,11 @@ const ie = ne(null), ae = () => {
|
|
|
120
122
|
}
|
|
121
123
|
);
|
|
122
124
|
};
|
|
123
|
-
|
|
124
|
-
var
|
|
125
|
+
fe.displayName = "PopoverBack";
|
|
126
|
+
var Ut = "Arrow", Ee = h.forwardRef((e, t) => {
|
|
125
127
|
const { children: o, width: n = 10, height: r = 5, ...s } = e;
|
|
126
128
|
return /* @__PURE__ */ a(
|
|
127
|
-
|
|
129
|
+
z.svg,
|
|
128
130
|
{
|
|
129
131
|
...s,
|
|
130
132
|
ref: t,
|
|
@@ -136,23 +138,23 @@ var Kt = "Arrow", Fe = f.forwardRef((e, t) => {
|
|
|
136
138
|
}
|
|
137
139
|
);
|
|
138
140
|
});
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
const { __scopePopper: t, children: o } = e, [n, r] =
|
|
142
|
-
return /* @__PURE__ */ a(
|
|
141
|
+
Ee.displayName = Ut;
|
|
142
|
+
var qt = Ee, ge = "Popper", [ke, Me] = be(ge), [Gt, De] = ke(ge), Ie = (e) => {
|
|
143
|
+
const { __scopePopper: t, children: o } = e, [n, r] = h.useState(null);
|
|
144
|
+
return /* @__PURE__ */ a(Gt, { scope: t, anchor: n, onAnchorChange: r, children: o });
|
|
143
145
|
};
|
|
144
|
-
|
|
145
|
-
var
|
|
146
|
+
Ie.displayName = ge;
|
|
147
|
+
var je = "PopperAnchor", $e = h.forwardRef(
|
|
146
148
|
(e, t) => {
|
|
147
|
-
const { __scopePopper: o, virtualRef: n, ...r } = e, s =
|
|
148
|
-
return
|
|
149
|
+
const { __scopePopper: o, virtualRef: n, ...r } = e, s = De(je, o), i = h.useRef(null), p = Q(t, i), c = h.useRef(null);
|
|
150
|
+
return h.useEffect(() => {
|
|
149
151
|
const l = c.current;
|
|
150
152
|
c.current = n?.current || i.current, l !== c.current && s.onAnchorChange(c.current);
|
|
151
|
-
}), n ? null : /* @__PURE__ */ a(
|
|
153
|
+
}), n ? null : /* @__PURE__ */ a(z.div, { ...r, ref: p });
|
|
152
154
|
}
|
|
153
155
|
);
|
|
154
|
-
|
|
155
|
-
var
|
|
156
|
+
$e.displayName = je;
|
|
157
|
+
var ve = "PopperContent", [Vt, Zt] = ke(ve), He = h.forwardRef(
|
|
156
158
|
(e, t) => {
|
|
157
159
|
const {
|
|
158
160
|
__scopePopper: o,
|
|
@@ -165,27 +167,27 @@ var he = "PopperContent", [Gt, Vt] = Te(he), je = f.forwardRef(
|
|
|
165
167
|
collisionBoundary: l = [],
|
|
166
168
|
collisionPadding: g = 0,
|
|
167
169
|
sticky: u = "partial",
|
|
168
|
-
hideWhenDetached:
|
|
169
|
-
updatePositionStrategy:
|
|
170
|
-
onPlaced:
|
|
171
|
-
...
|
|
172
|
-
} = e,
|
|
173
|
-
padding:
|
|
174
|
-
boundary:
|
|
170
|
+
hideWhenDetached: d = !1,
|
|
171
|
+
updatePositionStrategy: w = "optimized",
|
|
172
|
+
onPlaced: _,
|
|
173
|
+
...P
|
|
174
|
+
} = e, f = De(ve, o), [S, R] = h.useState(null), F = Q(t, (H) => R(H)), [m, y] = h.useState(null), x = zt(m), te = x?.width ?? 0, $ = x?.height ?? 0, oe = n + (s !== "center" ? "-" + s : ""), re = typeof g == "number" ? g : { top: 0, right: 0, bottom: 0, left: 0, ...g }, K = Array.isArray(l) ? l : [l], ne = K.length > 0, T = {
|
|
175
|
+
padding: re,
|
|
176
|
+
boundary: K.filter(Jt),
|
|
175
177
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
176
|
-
altBoundary:
|
|
177
|
-
}, { refs:
|
|
178
|
+
altBoundary: ne
|
|
179
|
+
}, { refs: v, floatingStyles: C, placement: U, isPositioned: q, middlewareData: E } = Et({
|
|
178
180
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
179
181
|
strategy: "fixed",
|
|
180
|
-
placement:
|
|
181
|
-
whileElementsMounted: (
|
|
182
|
-
animationFrame:
|
|
182
|
+
placement: oe,
|
|
183
|
+
whileElementsMounted: (...H) => Ht(...H, {
|
|
184
|
+
animationFrame: w === "always"
|
|
183
185
|
}),
|
|
184
186
|
elements: {
|
|
185
|
-
reference:
|
|
187
|
+
reference: f.anchor
|
|
186
188
|
},
|
|
187
189
|
middleware: [
|
|
188
|
-
kt({ mainAxis: r +
|
|
190
|
+
kt({ mainAxis: r + $, alignmentAxis: i }),
|
|
189
191
|
c && Mt({
|
|
190
192
|
mainAxis: !0,
|
|
191
193
|
crossAxis: !1,
|
|
@@ -195,30 +197,30 @@ var he = "PopperContent", [Gt, Vt] = Te(he), je = f.forwardRef(
|
|
|
195
197
|
c && Dt({ ...T }),
|
|
196
198
|
It({
|
|
197
199
|
...T,
|
|
198
|
-
apply: ({ elements:
|
|
199
|
-
const { width: _t, height: wt } =
|
|
200
|
-
|
|
200
|
+
apply: ({ elements: H, rects: xe, availableWidth: vt, availableHeight: mt }) => {
|
|
201
|
+
const { width: _t, height: wt } = xe.reference, G = H.floating.style;
|
|
202
|
+
G.setProperty("--radix-popper-available-width", `${vt}px`), G.setProperty("--radix-popper-available-height", `${mt}px`), G.setProperty("--radix-popper-anchor-width", `${_t}px`), G.setProperty("--radix-popper-anchor-height", `${wt}px`);
|
|
201
203
|
}
|
|
202
204
|
}),
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
m && jt({ element: m, padding: p }),
|
|
206
|
+
eo({ arrowWidth: te, arrowHeight: $ }),
|
|
207
|
+
d && $t({ strategy: "referenceHidden", ...T })
|
|
206
208
|
]
|
|
207
|
-
}), [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}, [
|
|
211
|
-
const ut = E.arrow?.x, dt = E.arrow?.y, ht = E.arrow?.centerOffset !== 0, [ft, gt] =
|
|
212
|
-
return
|
|
213
|
-
|
|
214
|
-
}, [
|
|
209
|
+
}), [Ce, lt] = We(U), Se = yt(_);
|
|
210
|
+
ye(() => {
|
|
211
|
+
q && Se?.();
|
|
212
|
+
}, [q, Se]);
|
|
213
|
+
const ut = E.arrow?.x, dt = E.arrow?.y, ht = E.arrow?.centerOffset !== 0, [ft, gt] = h.useState();
|
|
214
|
+
return ye(() => {
|
|
215
|
+
S && gt(window.getComputedStyle(S).zIndex);
|
|
216
|
+
}, [S]), /* @__PURE__ */ a(
|
|
215
217
|
"div",
|
|
216
218
|
{
|
|
217
|
-
ref:
|
|
219
|
+
ref: v.setFloating,
|
|
218
220
|
"data-radix-popper-content-wrapper": "",
|
|
219
221
|
style: {
|
|
220
|
-
...
|
|
221
|
-
transform:
|
|
222
|
+
...C,
|
|
223
|
+
transform: q ? C.transform : "translate(0, -200%)",
|
|
222
224
|
// keep off the page when measuring
|
|
223
225
|
minWidth: "max-content",
|
|
224
226
|
zIndex: ft,
|
|
@@ -236,26 +238,26 @@ var he = "PopperContent", [Gt, Vt] = Te(he), je = f.forwardRef(
|
|
|
236
238
|
},
|
|
237
239
|
dir: e.dir,
|
|
238
240
|
children: /* @__PURE__ */ a(
|
|
239
|
-
|
|
241
|
+
Vt,
|
|
240
242
|
{
|
|
241
243
|
scope: o,
|
|
242
|
-
placedSide:
|
|
243
|
-
onArrowChange:
|
|
244
|
+
placedSide: Ce,
|
|
245
|
+
onArrowChange: y,
|
|
244
246
|
arrowX: ut,
|
|
245
247
|
arrowY: dt,
|
|
246
248
|
shouldHideArrow: ht,
|
|
247
249
|
children: /* @__PURE__ */ a(
|
|
248
|
-
|
|
250
|
+
z.div,
|
|
249
251
|
{
|
|
250
|
-
"data-side":
|
|
252
|
+
"data-side": Ce,
|
|
251
253
|
"data-align": lt,
|
|
252
|
-
...
|
|
254
|
+
...P,
|
|
253
255
|
ref: F,
|
|
254
256
|
style: {
|
|
255
|
-
...
|
|
257
|
+
...P.style,
|
|
256
258
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
257
259
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
258
|
-
animation:
|
|
260
|
+
animation: q ? void 0 : "none"
|
|
259
261
|
}
|
|
260
262
|
}
|
|
261
263
|
)
|
|
@@ -265,14 +267,14 @@ var he = "PopperContent", [Gt, Vt] = Te(he), je = f.forwardRef(
|
|
|
265
267
|
);
|
|
266
268
|
}
|
|
267
269
|
);
|
|
268
|
-
|
|
269
|
-
var
|
|
270
|
+
He.displayName = ve;
|
|
271
|
+
var Be = "PopperArrow", Qt = {
|
|
270
272
|
top: "bottom",
|
|
271
273
|
right: "left",
|
|
272
274
|
bottom: "top",
|
|
273
275
|
left: "right"
|
|
274
|
-
},
|
|
275
|
-
const { __scopePopper: n, ...r } = t, s =
|
|
276
|
+
}, ze = h.forwardRef(function(t, o) {
|
|
277
|
+
const { __scopePopper: n, ...r } = t, s = Zt(Be, n), i = Qt[s.placedSide];
|
|
276
278
|
return (
|
|
277
279
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
278
280
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -301,7 +303,7 @@ var $e = "PopperArrow", Zt = {
|
|
|
301
303
|
visibility: s.shouldHideArrow ? "hidden" : void 0
|
|
302
304
|
},
|
|
303
305
|
children: /* @__PURE__ */ a(
|
|
304
|
-
|
|
306
|
+
qt,
|
|
305
307
|
{
|
|
306
308
|
...r,
|
|
307
309
|
ref: o,
|
|
@@ -316,26 +318,26 @@ var $e = "PopperArrow", Zt = {
|
|
|
316
318
|
)
|
|
317
319
|
);
|
|
318
320
|
});
|
|
319
|
-
|
|
320
|
-
function
|
|
321
|
+
ze.displayName = Be;
|
|
322
|
+
function Jt(e) {
|
|
321
323
|
return e !== null;
|
|
322
324
|
}
|
|
323
|
-
var
|
|
325
|
+
var eo = (e) => ({
|
|
324
326
|
name: "transformOrigin",
|
|
325
327
|
options: e,
|
|
326
328
|
fn(t) {
|
|
327
|
-
const { placement: o, rects: n, middlewareData: r } = t, i = r.arrow?.centerOffset !== 0, p = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [l, g] =
|
|
328
|
-
let
|
|
329
|
-
return l === "bottom" ? (
|
|
329
|
+
const { placement: o, rects: n, middlewareData: r } = t, i = r.arrow?.centerOffset !== 0, p = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [l, g] = We(o), u = { start: "0%", center: "50%", end: "100%" }[g], d = (r.arrow?.x ?? 0) + p / 2, w = (r.arrow?.y ?? 0) + c / 2;
|
|
330
|
+
let _ = "", P = "";
|
|
331
|
+
return l === "bottom" ? (_ = i ? u : `${d}px`, P = `${-c}px`) : l === "top" ? (_ = i ? u : `${d}px`, P = `${n.floating.height + c}px`) : l === "right" ? (_ = `${-c}px`, P = i ? u : `${w}px`) : l === "left" && (_ = `${n.floating.width + c}px`, P = i ? u : `${w}px`), { data: { x: _, y: P } };
|
|
330
332
|
}
|
|
331
333
|
});
|
|
332
|
-
function
|
|
334
|
+
function We(e) {
|
|
333
335
|
const [t, o = "center"] = e.split("-");
|
|
334
336
|
return [t, o];
|
|
335
337
|
}
|
|
336
|
-
var
|
|
337
|
-
|
|
338
|
-
]),
|
|
338
|
+
var to = Ie, Le = $e, oo = He, ro = ze, ee = "Popover", [Ye] = be(ee, [
|
|
339
|
+
Me
|
|
340
|
+
]), Y = Me(), [no, b] = Ye(ee), Xe = (e) => {
|
|
339
341
|
const {
|
|
340
342
|
__scopePopover: t,
|
|
341
343
|
children: o,
|
|
@@ -343,87 +345,87 @@ var eo = Me, ze = Ie, to = je, oo = He, Q = "Popover", [We] = Ae(Q, [
|
|
|
343
345
|
defaultOpen: r,
|
|
344
346
|
onOpenChange: s,
|
|
345
347
|
modal: i = !1
|
|
346
|
-
} = e, p =
|
|
348
|
+
} = e, p = Y(t), c = h.useRef(null), [l, g] = h.useState(!1), [u, d] = xt({
|
|
347
349
|
prop: n,
|
|
348
350
|
defaultProp: r ?? !1,
|
|
349
351
|
onChange: s,
|
|
350
|
-
caller:
|
|
352
|
+
caller: ee
|
|
351
353
|
});
|
|
352
|
-
return /* @__PURE__ */ a(
|
|
353
|
-
|
|
354
|
+
return /* @__PURE__ */ a(to, { ...p, children: /* @__PURE__ */ a(
|
|
355
|
+
no,
|
|
354
356
|
{
|
|
355
357
|
scope: t,
|
|
356
358
|
contentId: Tt(),
|
|
357
359
|
triggerRef: c,
|
|
358
360
|
open: u,
|
|
359
|
-
onOpenChange:
|
|
360
|
-
onOpenToggle:
|
|
361
|
+
onOpenChange: d,
|
|
362
|
+
onOpenToggle: h.useCallback(() => d((w) => !w), [d]),
|
|
361
363
|
hasCustomAnchor: l,
|
|
362
|
-
onCustomAnchorAdd:
|
|
363
|
-
onCustomAnchorRemove:
|
|
364
|
+
onCustomAnchorAdd: h.useCallback(() => g(!0), []),
|
|
365
|
+
onCustomAnchorRemove: h.useCallback(() => g(!1), []),
|
|
364
366
|
modal: i,
|
|
365
367
|
children: o
|
|
366
368
|
}
|
|
367
369
|
) });
|
|
368
370
|
};
|
|
369
|
-
|
|
370
|
-
var
|
|
371
|
+
Xe.displayName = ee;
|
|
372
|
+
var Ke = "PopoverAnchor", so = h.forwardRef(
|
|
371
373
|
(e, t) => {
|
|
372
|
-
const { __scopePopover: o, ...n } = e, r =
|
|
373
|
-
return
|
|
374
|
+
const { __scopePopover: o, ...n } = e, r = b(Ke, o), s = Y(o), { onCustomAnchorAdd: i, onCustomAnchorRemove: p } = r;
|
|
375
|
+
return h.useEffect(() => (i(), () => p()), [i, p]), /* @__PURE__ */ a(Le, { ...s, ...n, ref: t });
|
|
374
376
|
}
|
|
375
377
|
);
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
+
so.displayName = Ke;
|
|
379
|
+
var Ue = "PopoverTrigger", qe = h.forwardRef(
|
|
378
380
|
(e, t) => {
|
|
379
|
-
const { __scopePopover: o, ...n } = e, r =
|
|
380
|
-
|
|
381
|
+
const { __scopePopover: o, ...n } = e, r = b(Ue, o), s = Y(o), i = Q(t, r.triggerRef), p = /* @__PURE__ */ a(
|
|
382
|
+
z.button,
|
|
381
383
|
{
|
|
382
384
|
type: "button",
|
|
383
385
|
"aria-haspopup": "dialog",
|
|
384
386
|
"aria-expanded": r.open,
|
|
385
387
|
"aria-controls": r.contentId,
|
|
386
|
-
"data-state":
|
|
388
|
+
"data-state": tt(r.open),
|
|
387
389
|
...n,
|
|
388
390
|
ref: i,
|
|
389
|
-
onClick:
|
|
391
|
+
onClick: B(e.onClick, r.onOpenToggle)
|
|
390
392
|
}
|
|
391
393
|
);
|
|
392
|
-
return r.hasCustomAnchor ? p : /* @__PURE__ */ a(
|
|
394
|
+
return r.hasCustomAnchor ? p : /* @__PURE__ */ a(Le, { asChild: !0, ...s, children: p });
|
|
393
395
|
}
|
|
394
396
|
);
|
|
395
|
-
|
|
396
|
-
var
|
|
397
|
+
qe.displayName = Ue;
|
|
398
|
+
var me = "PopoverPortal", [io, ao] = Ye(me, {
|
|
397
399
|
forceMount: void 0
|
|
398
|
-
}),
|
|
399
|
-
const { __scopePopover: t, forceMount: o, children: n, container: r } = e, s =
|
|
400
|
-
return /* @__PURE__ */ a(
|
|
400
|
+
}), Ge = (e) => {
|
|
401
|
+
const { __scopePopover: t, forceMount: o, children: n, container: r } = e, s = b(me, t);
|
|
402
|
+
return /* @__PURE__ */ a(io, { scope: t, forceMount: o, children: /* @__PURE__ */ a(Ne, { present: o || s.open, children: /* @__PURE__ */ a(Ot, { asChild: !0, container: r, children: n }) }) });
|
|
401
403
|
};
|
|
402
|
-
|
|
403
|
-
var j = "PopoverContent",
|
|
404
|
+
Ge.displayName = me;
|
|
405
|
+
var j = "PopoverContent", Ve = h.forwardRef(
|
|
404
406
|
(e, t) => {
|
|
405
|
-
const o =
|
|
406
|
-
return /* @__PURE__ */ a(
|
|
407
|
+
const o = ao(j, e.__scopePopover), { forceMount: n = o.forceMount, ...r } = e, s = b(j, e.__scopePopover);
|
|
408
|
+
return /* @__PURE__ */ a(Ne, { present: n || s.open, children: s.modal ? /* @__PURE__ */ a(co, { ...r, ref: t }) : /* @__PURE__ */ a(lo, { ...r, ref: t }) });
|
|
407
409
|
}
|
|
408
410
|
);
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
+
Ve.displayName = j;
|
|
412
|
+
var po = St("PopoverContent.RemoveScroll"), co = h.forwardRef(
|
|
411
413
|
(e, t) => {
|
|
412
|
-
const o =
|
|
413
|
-
return
|
|
414
|
+
const o = b(j, e.__scopePopover), n = h.useRef(null), r = Q(t, n), s = h.useRef(!1);
|
|
415
|
+
return h.useEffect(() => {
|
|
414
416
|
const i = n.current;
|
|
415
417
|
if (i) return At(i);
|
|
416
|
-
}, []), /* @__PURE__ */ a(Rt, { as:
|
|
417
|
-
|
|
418
|
+
}, []), /* @__PURE__ */ a(Rt, { as: po, allowPinchZoom: !0, children: /* @__PURE__ */ a(
|
|
419
|
+
Ze,
|
|
418
420
|
{
|
|
419
421
|
...e,
|
|
420
422
|
ref: r,
|
|
421
423
|
trapFocus: o.open,
|
|
422
424
|
disableOutsidePointerEvents: !0,
|
|
423
|
-
onCloseAutoFocus:
|
|
425
|
+
onCloseAutoFocus: B(e.onCloseAutoFocus, (i) => {
|
|
424
426
|
i.preventDefault(), s.current || o.triggerRef.current?.focus();
|
|
425
427
|
}),
|
|
426
|
-
onPointerDownOutside:
|
|
428
|
+
onPointerDownOutside: B(
|
|
427
429
|
e.onPointerDownOutside,
|
|
428
430
|
(i) => {
|
|
429
431
|
const p = i.detail.originalEvent, c = p.button === 0 && p.ctrlKey === !0, l = p.button === 2 || c;
|
|
@@ -431,7 +433,7 @@ var ao = St("PopoverContent.RemoveScroll"), po = f.forwardRef(
|
|
|
431
433
|
},
|
|
432
434
|
{ checkForDefaultPrevented: !1 }
|
|
433
435
|
),
|
|
434
|
-
onFocusOutside:
|
|
436
|
+
onFocusOutside: B(
|
|
435
437
|
e.onFocusOutside,
|
|
436
438
|
(i) => i.preventDefault(),
|
|
437
439
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -439,11 +441,11 @@ var ao = St("PopoverContent.RemoveScroll"), po = f.forwardRef(
|
|
|
439
441
|
}
|
|
440
442
|
) });
|
|
441
443
|
}
|
|
442
|
-
),
|
|
444
|
+
), lo = h.forwardRef(
|
|
443
445
|
(e, t) => {
|
|
444
|
-
const o =
|
|
446
|
+
const o = b(j, e.__scopePopover), n = h.useRef(!1), r = h.useRef(!1);
|
|
445
447
|
return /* @__PURE__ */ a(
|
|
446
|
-
|
|
448
|
+
Ze,
|
|
447
449
|
{
|
|
448
450
|
...e,
|
|
449
451
|
ref: t,
|
|
@@ -460,7 +462,7 @@ var ao = St("PopoverContent.RemoveScroll"), po = f.forwardRef(
|
|
|
460
462
|
}
|
|
461
463
|
);
|
|
462
464
|
}
|
|
463
|
-
),
|
|
465
|
+
), Ze = h.forwardRef(
|
|
464
466
|
(e, t) => {
|
|
465
467
|
const {
|
|
466
468
|
__scopePopover: o,
|
|
@@ -473,7 +475,7 @@ var ao = St("PopoverContent.RemoveScroll"), po = f.forwardRef(
|
|
|
473
475
|
onFocusOutside: l,
|
|
474
476
|
onInteractOutside: g,
|
|
475
477
|
...u
|
|
476
|
-
} = e,
|
|
478
|
+
} = e, d = b(j, o), w = Y(o);
|
|
477
479
|
return bt(), /* @__PURE__ */ a(
|
|
478
480
|
Nt,
|
|
479
481
|
{
|
|
@@ -491,14 +493,14 @@ var ao = St("PopoverContent.RemoveScroll"), po = f.forwardRef(
|
|
|
491
493
|
onEscapeKeyDown: p,
|
|
492
494
|
onPointerDownOutside: c,
|
|
493
495
|
onFocusOutside: l,
|
|
494
|
-
onDismiss: () =>
|
|
496
|
+
onDismiss: () => d.onOpenChange(!1),
|
|
495
497
|
children: /* @__PURE__ */ a(
|
|
496
|
-
|
|
498
|
+
oo,
|
|
497
499
|
{
|
|
498
|
-
"data-state":
|
|
500
|
+
"data-state": tt(d.open),
|
|
499
501
|
role: "dialog",
|
|
500
|
-
id:
|
|
501
|
-
...
|
|
502
|
+
id: d.contentId,
|
|
503
|
+
...w,
|
|
502
504
|
...u,
|
|
503
505
|
ref: t,
|
|
504
506
|
style: {
|
|
@@ -516,33 +518,33 @@ var ao = St("PopoverContent.RemoveScroll"), po = f.forwardRef(
|
|
|
516
518
|
}
|
|
517
519
|
);
|
|
518
520
|
}
|
|
519
|
-
),
|
|
521
|
+
), Qe = "PopoverClose", Je = h.forwardRef(
|
|
520
522
|
(e, t) => {
|
|
521
|
-
const { __scopePopover: o, ...n } = e, r =
|
|
523
|
+
const { __scopePopover: o, ...n } = e, r = b(Qe, o);
|
|
522
524
|
return /* @__PURE__ */ a(
|
|
523
|
-
|
|
525
|
+
z.button,
|
|
524
526
|
{
|
|
525
527
|
type: "button",
|
|
526
528
|
...n,
|
|
527
529
|
ref: t,
|
|
528
|
-
onClick:
|
|
530
|
+
onClick: B(e.onClick, () => r.onOpenChange(!1))
|
|
529
531
|
}
|
|
530
532
|
);
|
|
531
533
|
}
|
|
532
534
|
);
|
|
533
|
-
|
|
534
|
-
var
|
|
535
|
+
Je.displayName = Qe;
|
|
536
|
+
var uo = "PopoverArrow", et = h.forwardRef(
|
|
535
537
|
(e, t) => {
|
|
536
|
-
const { __scopePopover: o, ...n } = e, r =
|
|
537
|
-
return /* @__PURE__ */ a(
|
|
538
|
+
const { __scopePopover: o, ...n } = e, r = Y(o);
|
|
539
|
+
return /* @__PURE__ */ a(ro, { ...r, ...n, ref: t });
|
|
538
540
|
}
|
|
539
541
|
);
|
|
540
|
-
|
|
541
|
-
function
|
|
542
|
+
et.displayName = uo;
|
|
543
|
+
function tt(e) {
|
|
542
544
|
return e ? "open" : "closed";
|
|
543
545
|
}
|
|
544
|
-
var
|
|
545
|
-
const
|
|
546
|
+
var ot = Xe, ho = qe, fo = Ge, go = Ve, rt = Je, vo = et;
|
|
547
|
+
const _e = ({
|
|
546
548
|
children: e,
|
|
547
549
|
asChild: t,
|
|
548
550
|
onClick: o,
|
|
@@ -550,8 +552,8 @@ const ge = ({
|
|
|
550
552
|
dismiss: r = !0,
|
|
551
553
|
fullWidth: s
|
|
552
554
|
}) => {
|
|
553
|
-
const i =
|
|
554
|
-
|
|
555
|
+
const i = L(), { isMdOrSmaller: p } = he(), { negative: c } = de(), d = t ? e : /* @__PURE__ */ a(
|
|
556
|
+
V,
|
|
555
557
|
{
|
|
556
558
|
variant: n,
|
|
557
559
|
size: "sm",
|
|
@@ -563,28 +565,28 @@ const ge = ({
|
|
|
563
565
|
children: e
|
|
564
566
|
}
|
|
565
567
|
);
|
|
566
|
-
return r ? /* @__PURE__ */ a(
|
|
568
|
+
return r ? /* @__PURE__ */ a(rt, { asChild: !0, children: d }) : d;
|
|
567
569
|
};
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
+
_e.displayName = "PopoverButton";
|
|
571
|
+
const mo = "_highlightState1_1w9je_1", _o = "_fadeIn_1w9je_1", wo = "_slideFromTop_1w9je_1", Po = "_slideFromBottom_1w9je_1", Co = "_slideFromLeft_1w9je_1", So = "_slideFromRight_1w9je_1", xo = "_fadeOut_1w9je_1", yo = "_slideToTop_1w9je_1", Oo = "_slideToBottom_1w9je_1", Ao = "_slideToLeft_1w9je_1", Ro = "_slideToRight_1w9je_1", X = {
|
|
570
572
|
"purpur-popover__trigger": "_purpur-popover__trigger_1w9je_1",
|
|
571
573
|
"purpur-popover__trigger-highlight": "_purpur-popover__trigger-highlight_1w9je_5",
|
|
572
574
|
"purpur-popover__trigger-highlight--state1": "_purpur-popover__trigger-highlight--state1_1w9je_14",
|
|
573
|
-
highlightState1:
|
|
575
|
+
highlightState1: mo,
|
|
574
576
|
"purpur-popover__trigger-highlight--negative": "_purpur-popover__trigger-highlight--negative_1w9je_29",
|
|
575
577
|
"purpur-popover__trigger-highlight--state2": "_purpur-popover__trigger-highlight--state2_1w9je_33",
|
|
576
578
|
"purpur-popover__inner": "_purpur-popover__inner_1w9je_45",
|
|
577
579
|
"purpur-popover__content": "_purpur-popover__content_1w9je_52",
|
|
578
|
-
fadeIn:
|
|
579
|
-
slideFromTop:
|
|
580
|
-
slideFromBottom:
|
|
581
|
-
slideFromLeft:
|
|
582
|
-
slideFromRight:
|
|
583
|
-
fadeOut:
|
|
584
|
-
slideToTop:
|
|
585
|
-
slideToBottom:
|
|
586
|
-
slideToLeft:
|
|
587
|
-
slideToRight:
|
|
580
|
+
fadeIn: _o,
|
|
581
|
+
slideFromTop: wo,
|
|
582
|
+
slideFromBottom: Po,
|
|
583
|
+
slideFromLeft: Co,
|
|
584
|
+
slideFromRight: So,
|
|
585
|
+
fadeOut: xo,
|
|
586
|
+
slideToTop: yo,
|
|
587
|
+
slideToBottom: Oo,
|
|
588
|
+
slideToLeft: Ao,
|
|
589
|
+
slideToRight: Ro,
|
|
588
590
|
"purpur-popover__arrow": "_purpur-popover__arrow_1w9je_103",
|
|
589
591
|
"purpur-popover__body": "_purpur-popover__body_1w9je_106",
|
|
590
592
|
"purpur-popover__icon": "_purpur-popover__icon_1w9je_107",
|
|
@@ -595,12 +597,12 @@ const vo = "_highlightState1_1w9je_1", mo = "_fadeIn_1w9je_1", _o = "_slideFromT
|
|
|
595
597
|
"purpur-popover__close": "_purpur-popover__close_1w9je_137",
|
|
596
598
|
"purpur-popover__footer": "_purpur-popover__footer_1w9je_142",
|
|
597
599
|
"purpur-popover__footer-button-group": "_purpur-popover__footer-button-group_1w9je_155"
|
|
598
|
-
},
|
|
599
|
-
const e =
|
|
600
|
-
return /* @__PURE__ */ a(
|
|
601
|
-
|
|
600
|
+
}, bo = W.bind(X), nt = () => {
|
|
601
|
+
const e = le(), o = J()?.walkthroughStep || e.currentStep, { totalSteps: n, separatorText: r, stepText: s } = e;
|
|
602
|
+
return /* @__PURE__ */ a(Re, { children: /* @__PURE__ */ A(
|
|
603
|
+
Fe,
|
|
602
604
|
{
|
|
603
|
-
className:
|
|
605
|
+
className: bo("purpur-popover__steps"),
|
|
604
606
|
role: "status",
|
|
605
607
|
"aria-live": "polite",
|
|
606
608
|
"aria-atomic": "true",
|
|
@@ -616,38 +618,38 @@ const vo = "_highlightState1_1w9je_1", mo = "_fadeIn_1w9je_1", _o = "_slideFromT
|
|
|
616
618
|
}
|
|
617
619
|
) });
|
|
618
620
|
};
|
|
619
|
-
|
|
620
|
-
const
|
|
621
|
-
const o =
|
|
622
|
-
return /* @__PURE__ */ A("div", { className:
|
|
623
|
-
r && /* @__PURE__ */ a(
|
|
624
|
-
/* @__PURE__ */ a("div", { className:
|
|
621
|
+
nt.displayName = "PopoverSteps";
|
|
622
|
+
const Ae = W.bind(X), we = ({ children: e, className: t }) => {
|
|
623
|
+
const o = L(), n = J(), r = o && n && n.walkthroughStep > 0;
|
|
624
|
+
return /* @__PURE__ */ A("div", { className: Ae("purpur-popover__footer", t), children: [
|
|
625
|
+
r && /* @__PURE__ */ a(nt, {}),
|
|
626
|
+
/* @__PURE__ */ a("div", { className: Ae("purpur-popover__footer-button-group"), children: e })
|
|
625
627
|
] });
|
|
626
628
|
};
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
({ title: e, icon: t }, o) => /* @__PURE__ */ A("div", { ref: o, className:
|
|
630
|
-
t && /* @__PURE__ */ a("span", { className:
|
|
629
|
+
we.displayName = "PopoverFooter";
|
|
630
|
+
const se = W.bind(X), st = pe(
|
|
631
|
+
({ title: e, icon: t }, o) => /* @__PURE__ */ A("div", { ref: o, className: se("purpur-popover__header-content"), children: [
|
|
632
|
+
t && /* @__PURE__ */ a("span", { className: se("purpur-popover__icon"), children: t }),
|
|
631
633
|
/* @__PURE__ */ a(
|
|
632
|
-
|
|
634
|
+
Yt,
|
|
633
635
|
{
|
|
634
636
|
tag: "h2",
|
|
635
637
|
variant: "title-100",
|
|
636
|
-
className:
|
|
638
|
+
className: se("purpur-popover__title"),
|
|
637
639
|
id: "popover-heading",
|
|
638
640
|
children: e
|
|
639
641
|
}
|
|
640
642
|
)
|
|
641
643
|
] })
|
|
642
644
|
);
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
+
st.displayName = "PopoverHeader";
|
|
646
|
+
const Pe = ({
|
|
645
647
|
children: e,
|
|
646
648
|
onClick: t
|
|
647
649
|
}) => {
|
|
648
|
-
const { next: o } =
|
|
650
|
+
const { next: o } = le(), { negative: n } = de(), { isMdOrSmaller: r } = he();
|
|
649
651
|
return /* @__PURE__ */ a(
|
|
650
|
-
|
|
652
|
+
V,
|
|
651
653
|
{
|
|
652
654
|
size: "sm",
|
|
653
655
|
variant: "primary",
|
|
@@ -660,8 +662,8 @@ const me = ({
|
|
|
660
662
|
}
|
|
661
663
|
);
|
|
662
664
|
};
|
|
663
|
-
|
|
664
|
-
const k =
|
|
665
|
+
Pe.displayName = "PopoverNext";
|
|
666
|
+
const k = W.bind(X), it = pe(
|
|
665
667
|
({
|
|
666
668
|
children: e,
|
|
667
669
|
className: t,
|
|
@@ -676,98 +678,99 @@ const k = z.bind(Y), nt = se(
|
|
|
676
678
|
icon: l,
|
|
677
679
|
body: g,
|
|
678
680
|
onAction: u,
|
|
679
|
-
zIndex:
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
zIndex: d = 210,
|
|
682
|
+
container: w,
|
|
683
|
+
..._
|
|
684
|
+
}, P) => {
|
|
685
|
+
const f = L(), S = J(), R = I(null), F = Lt(), m = w === void 0 ? F : w ?? void 0, x = {
|
|
683
686
|
up: "bottom",
|
|
684
687
|
right: "left",
|
|
685
688
|
down: "top",
|
|
686
689
|
left: "right",
|
|
687
690
|
none: "bottom"
|
|
688
691
|
// Default position when no arrow
|
|
689
|
-
}[o],
|
|
690
|
-
let
|
|
691
|
-
if (
|
|
692
|
-
const v =
|
|
693
|
-
|
|
694
|
-
!
|
|
695
|
-
|
|
696
|
-
|
|
692
|
+
}[o], te = o !== "none";
|
|
693
|
+
let $ = e;
|
|
694
|
+
if (f && !e) {
|
|
695
|
+
const v = S?.walkthroughStep || f.currentStep, C = v === 1, U = v === f.totalSteps;
|
|
696
|
+
$ = /* @__PURE__ */ A(we, { children: [
|
|
697
|
+
!C && /* @__PURE__ */ a(fe, { onClick: () => u?.({ type: "back", step: v }), children: f.backLabel }),
|
|
698
|
+
U ? /* @__PURE__ */ a(
|
|
699
|
+
_e,
|
|
697
700
|
{
|
|
698
701
|
onClick: () => u?.({ type: "finish", step: v }),
|
|
699
702
|
dismiss: !0,
|
|
700
|
-
children:
|
|
703
|
+
children: f.finishLabel
|
|
701
704
|
}
|
|
702
|
-
) : /* @__PURE__ */ a(
|
|
705
|
+
) : /* @__PURE__ */ a(Pe, { onClick: () => u?.({ type: "next", step: v }), children: f.nextLabel })
|
|
703
706
|
] });
|
|
704
707
|
}
|
|
705
|
-
const
|
|
706
|
-
if (v.preventDefault(),
|
|
707
|
-
const
|
|
708
|
+
const oe = (v) => {
|
|
709
|
+
if (v.preventDefault(), f) {
|
|
710
|
+
const C = v.currentTarget;
|
|
708
711
|
setTimeout(() => {
|
|
709
|
-
|
|
712
|
+
C.setAttribute("tabindex", "-1"), C.focus();
|
|
710
713
|
}, 0);
|
|
711
714
|
}
|
|
712
|
-
|
|
713
|
-
},
|
|
714
|
-
|
|
715
|
-
},
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
u?.({ type: "dismiss", step:
|
|
719
|
-
}, 200)) : (u?.({ type: "dismiss", step:
|
|
720
|
-
},
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
u?.({ type: "dismiss", step:
|
|
724
|
-
}, 200)) : (u?.({ type: "dismiss", step:
|
|
725
|
-
},
|
|
726
|
-
if (
|
|
715
|
+
_.onOpenAutoFocus?.(v);
|
|
716
|
+
}, re = (v) => {
|
|
717
|
+
f && v.preventDefault(), _.onCloseAutoFocus?.(v);
|
|
718
|
+
}, K = (v) => {
|
|
719
|
+
const C = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
720
|
+
f && !C ? (v.preventDefault(), setTimeout(() => {
|
|
721
|
+
u?.({ type: "dismiss", step: f.currentStep }), f.dismiss();
|
|
722
|
+
}, 200)) : (u?.({ type: "dismiss", step: f?.currentStep }), f?.dismiss());
|
|
723
|
+
}, ne = (v) => {
|
|
724
|
+
const C = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
725
|
+
f && !C ? (v.preventDefault(), setTimeout(() => {
|
|
726
|
+
u?.({ type: "dismiss", step: f.currentStep }), f.dismiss();
|
|
727
|
+
}, 200)) : (u?.({ type: "dismiss", step: f?.currentStep }), f?.dismiss());
|
|
728
|
+
}, T = (v) => {
|
|
729
|
+
if (S?.disableClickOutside) {
|
|
727
730
|
v.preventDefault();
|
|
728
731
|
return;
|
|
729
732
|
}
|
|
730
|
-
if (
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
|
|
733
|
+
if (f) {
|
|
734
|
+
const C = v.target;
|
|
735
|
+
C.closest("[role='dialog']") || C.closest(".purpur-popover__trigger") || C.closest("button[aria-haspopup='dialog']") || (u?.({ type: "dismiss", step: f.currentStep }), setTimeout(() => {
|
|
736
|
+
f.dismiss();
|
|
734
737
|
}, 0));
|
|
735
738
|
}
|
|
736
739
|
};
|
|
737
|
-
return /* @__PURE__ */ a(
|
|
738
|
-
|
|
740
|
+
return /* @__PURE__ */ a(fo, { container: m, children: /* @__PURE__ */ A(
|
|
741
|
+
go,
|
|
739
742
|
{
|
|
740
743
|
"data-testid": "popover-content",
|
|
741
744
|
role: "dialog",
|
|
742
745
|
"aria-modal": "true",
|
|
743
|
-
"aria-labelledby":
|
|
744
|
-
ref:
|
|
745
|
-
side:
|
|
746
|
+
"aria-labelledby": _["aria-label"] ? void 0 : "popover-heading",
|
|
747
|
+
ref: P,
|
|
748
|
+
side: x,
|
|
746
749
|
sideOffset: s,
|
|
747
750
|
align: n,
|
|
748
751
|
alignOffset: r,
|
|
749
752
|
style: {
|
|
750
|
-
"--popover-z-index":
|
|
753
|
+
"--popover-z-index": d
|
|
751
754
|
},
|
|
752
755
|
className: k(
|
|
753
756
|
"purpur-popover__content",
|
|
754
757
|
{ "purpur-popover__content--negative": i },
|
|
755
758
|
t
|
|
756
759
|
),
|
|
757
|
-
onOpenAutoFocus:
|
|
758
|
-
onCloseAutoFocus:
|
|
759
|
-
onEscapeKeyDown:
|
|
760
|
-
onInteractOutside:
|
|
761
|
-
...
|
|
760
|
+
onOpenAutoFocus: oe,
|
|
761
|
+
onCloseAutoFocus: re,
|
|
762
|
+
onEscapeKeyDown: ne,
|
|
763
|
+
onInteractOutside: T,
|
|
764
|
+
..._,
|
|
762
765
|
children: [
|
|
763
|
-
/* @__PURE__ */ A(
|
|
766
|
+
/* @__PURE__ */ A(Te.Provider, { value: { negative: i }, children: [
|
|
764
767
|
/* @__PURE__ */ A("div", { className: k("purpur-popover__inner"), children: [
|
|
765
|
-
/* @__PURE__ */ a(
|
|
766
|
-
/* @__PURE__ */ a(
|
|
768
|
+
/* @__PURE__ */ a(st, { ref: R, title: c, icon: l }),
|
|
769
|
+
/* @__PURE__ */ a(Fe, { className: k("purpur-popover__body"), children: g })
|
|
767
770
|
] }),
|
|
768
|
-
|
|
769
|
-
/* @__PURE__ */ a(
|
|
770
|
-
|
|
771
|
+
$,
|
|
772
|
+
/* @__PURE__ */ a(rt, { asChild: !0, onClick: K, children: /* @__PURE__ */ a(
|
|
773
|
+
V,
|
|
771
774
|
{
|
|
772
775
|
variant: i ? "text" : "tertiary-purple",
|
|
773
776
|
size: "sm",
|
|
@@ -779,8 +782,8 @@ const k = z.bind(Y), nt = se(
|
|
|
779
782
|
}
|
|
780
783
|
) })
|
|
781
784
|
] }),
|
|
782
|
-
|
|
783
|
-
|
|
785
|
+
te && /* @__PURE__ */ a(
|
|
786
|
+
vo,
|
|
784
787
|
{
|
|
785
788
|
className: k("purpur-popover__arrow"),
|
|
786
789
|
"aria-hidden": "true",
|
|
@@ -792,8 +795,8 @@ const k = z.bind(Y), nt = se(
|
|
|
792
795
|
) });
|
|
793
796
|
}
|
|
794
797
|
);
|
|
795
|
-
|
|
796
|
-
const
|
|
798
|
+
it.displayName = "PopoverContent";
|
|
799
|
+
const at = ({
|
|
797
800
|
children: e,
|
|
798
801
|
open: t,
|
|
799
802
|
defaultOpen: o = !1,
|
|
@@ -802,10 +805,10 @@ const st = ({
|
|
|
802
805
|
...s
|
|
803
806
|
}) => {
|
|
804
807
|
const [i, p] = D(o), c = t !== void 0, l = c ? t : i;
|
|
805
|
-
return /* @__PURE__ */ a(
|
|
808
|
+
return /* @__PURE__ */ a(ot, { open: l, onOpenChange: (u) => {
|
|
806
809
|
c || p(u), n?.(u);
|
|
807
810
|
}, ...s, children: /* @__PURE__ */ a(
|
|
808
|
-
|
|
811
|
+
ue.Provider,
|
|
809
812
|
{
|
|
810
813
|
value: {
|
|
811
814
|
isOpen: l,
|
|
@@ -816,31 +819,31 @@ const st = ({
|
|
|
816
819
|
}
|
|
817
820
|
) });
|
|
818
821
|
};
|
|
819
|
-
|
|
820
|
-
const
|
|
821
|
-
const t = I(null), o =
|
|
822
|
+
at.displayName = "PopoverStandalone";
|
|
823
|
+
const No = (e) => {
|
|
824
|
+
const t = I(null), o = O(() => {
|
|
822
825
|
t.current && (cancelAnimationFrame(t.current), t.current = null);
|
|
823
826
|
}, []);
|
|
824
|
-
return { scrollToElement:
|
|
827
|
+
return { scrollToElement: O(
|
|
825
828
|
(r, s = 600) => {
|
|
826
829
|
const i = window.matchMedia("(prefers-reduced-motion: reduce)").matches, p = r.getBoundingClientRect(), c = p.top + window.pageYOffset, l = p.height, g = window.innerHeight;
|
|
827
830
|
let u = c - g / 2 + l / 2;
|
|
828
|
-
const
|
|
829
|
-
if (u = Math.max(0, Math.min(u,
|
|
831
|
+
const d = document.documentElement.scrollHeight, w = Math.max(0, d - g);
|
|
832
|
+
if (u = Math.max(0, Math.min(u, w)), i) {
|
|
830
833
|
window.scrollTo(0, u), e?.();
|
|
831
834
|
return;
|
|
832
835
|
}
|
|
833
|
-
const
|
|
834
|
-
const F =
|
|
835
|
-
window.scrollTo(0,
|
|
836
|
+
const _ = window.pageYOffset, P = u - _, f = performance.now(), S = (R) => {
|
|
837
|
+
const F = R - f, m = Math.min(F / s, 1), y = m < 0.5 ? 2 * m * m : 1 - Math.pow(-2 * m + 2, 2) / 2, x = _ + P * y;
|
|
838
|
+
window.scrollTo(0, x), m < 1 ? t.current = requestAnimationFrame(S) : (t.current = null, e?.());
|
|
836
839
|
};
|
|
837
|
-
o(), t.current = requestAnimationFrame(
|
|
840
|
+
o(), t.current = requestAnimationFrame(S);
|
|
838
841
|
},
|
|
839
842
|
[e, o]
|
|
840
843
|
), cancelScroll: o };
|
|
841
844
|
};
|
|
842
|
-
function
|
|
843
|
-
const t = I(null), o =
|
|
845
|
+
function Fo(e) {
|
|
846
|
+
const t = I(null), o = J(), n = L(), r = I(!1), { scrollToElement: s, cancelScroll: i } = No(o?.onScrollComplete);
|
|
844
847
|
return M(() => {
|
|
845
848
|
typeof e == "function" ? e(t.current) : e && (e.current = t.current);
|
|
846
849
|
}, [e]), M(() => {
|
|
@@ -850,23 +853,23 @@ function No(e) {
|
|
|
850
853
|
} else n?.currentStep !== o?.walkthroughStep && (r.current = !1, i());
|
|
851
854
|
}, [n?.currentStep, o?.walkthroughStep, n, s, i, o]), M(() => i, [i]), { triggerRef: t, context: o };
|
|
852
855
|
}
|
|
853
|
-
const
|
|
856
|
+
const ie = W.bind(X), pt = pe(
|
|
854
857
|
({ children: e, className: t, highlight: o = !0, negative: n = !1, ...r }, s) => {
|
|
855
|
-
const { triggerRef: i, context: p } =
|
|
858
|
+
const { triggerRef: i, context: p } = Fo(s);
|
|
856
859
|
return /* @__PURE__ */ A(
|
|
857
860
|
"div",
|
|
858
861
|
{
|
|
859
|
-
className:
|
|
862
|
+
className: ie(
|
|
860
863
|
"purpur-popover__trigger",
|
|
861
864
|
{ "purpur-popover__trigger--highlight": p?.isOpen && o },
|
|
862
865
|
t
|
|
863
866
|
),
|
|
864
867
|
children: [
|
|
865
|
-
p?.isOpen && o && /* @__PURE__ */ A(
|
|
868
|
+
p?.isOpen && o && /* @__PURE__ */ A(Re, { children: [
|
|
866
869
|
/* @__PURE__ */ a(
|
|
867
870
|
"div",
|
|
868
871
|
{
|
|
869
|
-
className:
|
|
872
|
+
className: ie(
|
|
870
873
|
"purpur-popover__trigger-highlight",
|
|
871
874
|
"purpur-popover__trigger-highlight--state1",
|
|
872
875
|
{ "purpur-popover__trigger-highlight--negative": n }
|
|
@@ -877,7 +880,7 @@ const re = z.bind(Y), it = se(
|
|
|
877
880
|
/* @__PURE__ */ a(
|
|
878
881
|
"div",
|
|
879
882
|
{
|
|
880
|
-
className:
|
|
883
|
+
className: ie(
|
|
881
884
|
"purpur-popover__trigger-highlight",
|
|
882
885
|
"purpur-popover__trigger-highlight--state2",
|
|
883
886
|
{ "purpur-popover__trigger-highlight--negative": n }
|
|
@@ -887,7 +890,7 @@ const re = z.bind(Y), it = se(
|
|
|
887
890
|
)
|
|
888
891
|
] }),
|
|
889
892
|
/* @__PURE__ */ a(
|
|
890
|
-
|
|
893
|
+
ho,
|
|
891
894
|
{
|
|
892
895
|
ref: i,
|
|
893
896
|
asChild: !0,
|
|
@@ -902,28 +905,28 @@ const re = z.bind(Y), it = se(
|
|
|
902
905
|
);
|
|
903
906
|
}
|
|
904
907
|
);
|
|
905
|
-
|
|
906
|
-
function
|
|
907
|
-
const t =
|
|
908
|
+
pt.displayName = "PopoverTrigger";
|
|
909
|
+
function To(e) {
|
|
910
|
+
const t = L(), [o, n] = D(!1), [r, s] = D(!1), i = I(null), p = I(0);
|
|
908
911
|
M(() => t ? (t.registerStep(e), () => t.unregisterStep(e)) : () => {
|
|
909
912
|
}, [t, e]);
|
|
910
|
-
const c = t?.currentStep === e, l =
|
|
913
|
+
const c = t?.currentStep === e, l = O(() => {
|
|
911
914
|
s(!0);
|
|
912
|
-
}, []), g =
|
|
915
|
+
}, []), g = O(() => {
|
|
913
916
|
if (s(!1), c) {
|
|
914
|
-
const
|
|
917
|
+
const d = t.openDelay;
|
|
915
918
|
i.current = window.setTimeout(() => {
|
|
916
919
|
n(!0), p.current = Date.now();
|
|
917
|
-
},
|
|
920
|
+
}, d);
|
|
918
921
|
}
|
|
919
922
|
}, [c, t]);
|
|
920
923
|
M(() => {
|
|
921
924
|
if (i.current && (clearTimeout(i.current), i.current = null), c) {
|
|
922
925
|
if (!r) {
|
|
923
|
-
const
|
|
926
|
+
const d = t.openDelay;
|
|
924
927
|
i.current = window.setTimeout(() => {
|
|
925
928
|
n(!0), p.current = Date.now();
|
|
926
|
-
},
|
|
929
|
+
}, d);
|
|
927
930
|
}
|
|
928
931
|
} else
|
|
929
932
|
n(!1), s(!1), p.current = 0;
|
|
@@ -931,9 +934,9 @@ function Fo(e) {
|
|
|
931
934
|
i.current && (clearTimeout(i.current), i.current = null);
|
|
932
935
|
};
|
|
933
936
|
}, [c, r, t]);
|
|
934
|
-
const u =
|
|
935
|
-
(
|
|
936
|
-
if (
|
|
937
|
+
const u = O(
|
|
938
|
+
(d, w) => {
|
|
939
|
+
if (w?.(d), !d && o && t && t.currentStep === e) {
|
|
937
940
|
if (Date.now() - p.current < 10 || i.current !== null)
|
|
938
941
|
return;
|
|
939
942
|
t.dismiss();
|
|
@@ -948,22 +951,22 @@ function Fo(e) {
|
|
|
948
951
|
handleOpenChange: u
|
|
949
952
|
};
|
|
950
953
|
}
|
|
951
|
-
const
|
|
954
|
+
const ct = ({
|
|
952
955
|
children: e,
|
|
953
956
|
step: t,
|
|
954
957
|
onOpenChange: o,
|
|
955
958
|
disableClickOutside: n = !0,
|
|
956
959
|
...r
|
|
957
960
|
}) => {
|
|
958
|
-
const { actuallyOpen: s, onScrollStart: i, onScrollComplete: p, handleOpenChange: c } =
|
|
961
|
+
const { actuallyOpen: s, onScrollStart: i, onScrollComplete: p, handleOpenChange: c } = To(t);
|
|
959
962
|
return /* @__PURE__ */ a(
|
|
960
|
-
|
|
963
|
+
ot,
|
|
961
964
|
{
|
|
962
965
|
open: s,
|
|
963
966
|
onOpenChange: (l) => c(l, o),
|
|
964
967
|
...r,
|
|
965
968
|
children: /* @__PURE__ */ a(
|
|
966
|
-
|
|
969
|
+
ue.Provider,
|
|
967
970
|
{
|
|
968
971
|
value: {
|
|
969
972
|
isOpen: s,
|
|
@@ -978,32 +981,32 @@ const at = ({
|
|
|
978
981
|
}
|
|
979
982
|
);
|
|
980
983
|
};
|
|
981
|
-
|
|
982
|
-
const
|
|
984
|
+
ct.displayName = "PopoverWalkthrough";
|
|
985
|
+
const N = (e) => {
|
|
983
986
|
const { multistep: t = !1, disableClickOutside: o, ...n } = e;
|
|
984
987
|
return t ? /* @__PURE__ */ a(
|
|
985
|
-
|
|
988
|
+
ct,
|
|
986
989
|
{
|
|
987
990
|
...n,
|
|
988
991
|
disableClickOutside: o ?? !0
|
|
989
992
|
}
|
|
990
993
|
) : /* @__PURE__ */ a(
|
|
991
|
-
|
|
994
|
+
at,
|
|
992
995
|
{
|
|
993
996
|
...n,
|
|
994
997
|
disableClickOutside: o
|
|
995
998
|
}
|
|
996
999
|
);
|
|
997
1000
|
};
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1001
|
+
N.Back = fe;
|
|
1002
|
+
N.Button = _e;
|
|
1003
|
+
N.Content = it;
|
|
1004
|
+
N.Flow = Xt;
|
|
1005
|
+
N.Footer = we;
|
|
1006
|
+
N.Next = Pe;
|
|
1007
|
+
N.Trigger = pt;
|
|
1008
|
+
N.displayName = "Popover";
|
|
1006
1009
|
export {
|
|
1007
|
-
|
|
1010
|
+
N as P
|
|
1008
1011
|
};
|
|
1009
|
-
//# sourceMappingURL=popover-
|
|
1012
|
+
//# sourceMappingURL=popover-DERrvReO.mjs.map
|