@anoki/fse-ui 1.0.0-beta1.48.1 → 1.0.0-beta1.48.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs193.js +1 -1
- package/dist/index.cjs193.js.map +1 -1
- package/dist/index.cjs264.js +1 -1
- package/dist/index.cjs269.js +1 -1
- package/dist/index.cjs277.js +1 -1
- package/dist/index.cjs288.js +1 -1
- package/dist/index.cjs295.js +1 -1
- package/dist/index.cjs302.js +1 -1
- package/dist/index.cjs303.js +1 -1
- package/dist/index.cjs307.js +1 -1
- package/dist/index.cjs316.js +1 -1
- package/dist/index.cjs318.js +1 -1
- package/dist/index.cjs326.js +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs33.js.map +1 -1
- package/dist/index.cjs368.js +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs438.js +1 -1
- package/dist/index.cjs453.js +1 -1
- package/dist/index.cjs454.js +1 -1
- package/dist/index.cjs455.js +2 -0
- package/dist/index.cjs455.js.map +1 -0
- package/dist/index.cjs456.js +1 -1
- package/dist/index.cjs456.js.map +1 -1
- package/dist/index.cjs457.js +1 -1
- package/dist/index.cjs457.js.map +1 -1
- package/dist/index.cjs458.js +1 -1
- package/dist/index.cjs458.js.map +1 -1
- package/dist/index.cjs459.js +1 -1
- package/dist/index.cjs459.js.map +1 -1
- package/dist/index.cjs460.js +1 -1
- package/dist/index.cjs460.js.map +1 -1
- package/dist/index.cjs461.js +1 -1
- package/dist/index.cjs461.js.map +1 -1
- package/dist/index.cjs463.js +1 -1
- package/dist/index.cjs463.js.map +1 -1
- package/dist/{index.cjs467.js → index.cjs464.js} +1 -1
- package/dist/{index.cjs467.js.map → index.cjs464.js.map} +1 -1
- package/dist/{index.cjs468.js → index.cjs465.js} +2 -2
- package/dist/{index.cjs468.js.map → index.cjs465.js.map} +1 -1
- package/dist/index.cjs466.js +1 -1
- package/dist/index.cjs466.js.map +1 -1
- package/dist/index.cjs472.js +1 -1
- package/dist/index.cjs472.js.map +1 -1
- package/dist/index.cjs473.js +1 -1
- package/dist/index.cjs473.js.map +1 -1
- package/dist/index.cjs474.js +1 -1
- package/dist/index.cjs474.js.map +1 -1
- package/dist/index.cjs475.js +1 -1
- package/dist/index.cjs475.js.map +1 -1
- package/dist/index.cjs476.js +1 -1
- package/dist/index.cjs476.js.map +1 -1
- package/dist/index.cjs477.js +2 -0
- package/dist/index.cjs477.js.map +1 -0
- package/dist/index.cjs478.js +2 -0
- package/dist/index.cjs478.js.map +1 -0
- package/dist/index.cjs479.js +2 -0
- package/dist/index.cjs479.js.map +1 -0
- package/dist/index.cjs48.js +1 -1
- package/dist/index.cjs48.js.map +1 -1
- package/dist/index.cjs513.js +1 -1
- package/dist/index.cjs513.js.map +1 -1
- package/dist/index.cjs514.js +2 -1
- package/dist/index.cjs514.js.map +1 -1
- package/dist/index.cjs515.js +1 -1
- package/dist/index.cjs515.js.map +1 -1
- package/dist/index.cjs516.js +1 -2
- package/dist/index.cjs516.js.map +1 -1
- package/dist/index.cjs518.js +1 -1
- package/dist/index.cjs520.js +1 -1
- package/dist/index.cjs521.js +1 -1
- package/dist/index.cjs530.js +1 -1
- package/dist/index.cjs531.js +1 -1
- package/dist/index.cjs537.js +1 -1
- package/dist/index.cjs540.js +1 -1
- package/dist/index.cjs542.js +1 -1
- package/dist/index.cjs545.js +1 -1
- package/dist/index.cjs546.js +1 -1
- package/dist/index.cjs547.js +1 -1
- package/dist/index.cjs554.js +1 -1
- package/dist/index.cjs559.js +1 -1
- package/dist/index.cjs561.js +1 -1
- package/dist/index.cjs570.js +1 -1
- package/dist/index.cjs570.js.map +1 -1
- package/dist/index.cjs571.js +1 -1
- package/dist/index.cjs571.js.map +1 -1
- package/dist/index.cjs572.js +1 -1
- package/dist/index.cjs572.js.map +1 -1
- package/dist/index.cjs573.js +1 -1
- package/dist/index.cjs573.js.map +1 -1
- package/dist/index.cjs574.js +1 -1
- package/dist/index.cjs574.js.map +1 -1
- package/dist/index.cjs585.js +1 -1
- package/dist/index.cjs585.js.map +1 -1
- package/dist/index.cjs586.js +1 -1
- package/dist/index.cjs586.js.map +1 -1
- package/dist/index.cjs587.js +1 -1
- package/dist/index.cjs587.js.map +1 -1
- package/dist/index.cjs588.js +1 -1
- package/dist/index.cjs588.js.map +1 -1
- package/dist/index.es193.js +13 -13
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es264.js +7 -7
- package/dist/index.es269.js +1 -1
- package/dist/index.es277.js +8 -8
- package/dist/index.es288.js +1 -1
- package/dist/index.es295.js +14 -14
- package/dist/index.es302.js +1 -1
- package/dist/index.es303.js +1 -1
- package/dist/index.es307.js +1 -1
- package/dist/index.es316.js +1 -1
- package/dist/index.es318.js +1 -1
- package/dist/index.es326.js +7 -7
- package/dist/index.es33.js +31 -29
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es368.js +4 -4
- package/dist/index.es414.js +1 -1
- package/dist/index.es438.js +1 -1
- package/dist/index.es453.js +1 -1
- package/dist/index.es454.js +1 -1
- package/dist/index.es455.js +10 -0
- package/dist/index.es455.js.map +1 -0
- package/dist/index.es456.js +25 -5
- package/dist/index.es456.js.map +1 -1
- package/dist/index.es457.js +64 -23
- package/dist/index.es457.js.map +1 -1
- package/dist/index.es458.js +27 -65
- package/dist/index.es458.js.map +1 -1
- package/dist/index.es459.js +32 -29
- package/dist/index.es459.js.map +1 -1
- package/dist/index.es460.js +620 -31
- package/dist/index.es460.js.map +1 -1
- package/dist/index.es461.js +10 -621
- package/dist/index.es461.js.map +1 -1
- package/dist/index.es463.js +6 -15
- package/dist/index.es463.js.map +1 -1
- package/dist/{index.es467.js → index.es464.js} +1 -1
- package/dist/{index.es467.js.map → index.es464.js.map} +1 -1
- package/dist/{index.es468.js → index.es465.js} +2 -2
- package/dist/{index.es468.js.map → index.es465.js.map} +1 -1
- package/dist/index.es466.js +15 -6
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es472.js +15 -14
- package/dist/index.es472.js.map +1 -1
- package/dist/index.es473.js +122 -12
- package/dist/index.es473.js.map +1 -1
- package/dist/index.es474.js +134 -8
- package/dist/index.es474.js.map +1 -1
- package/dist/index.es475.js +14 -50
- package/dist/index.es475.js.map +1 -1
- package/dist/index.es476.js +13 -54
- package/dist/index.es476.js.map +1 -1
- package/dist/index.es477.js +12 -0
- package/dist/index.es477.js.map +1 -0
- package/dist/index.es478.js +53 -0
- package/dist/index.es478.js.map +1 -0
- package/dist/index.es479.js +59 -0
- package/dist/index.es479.js.map +1 -0
- package/dist/index.es48.js +25 -23
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es513.js +6 -2
- package/dist/index.es513.js.map +1 -1
- package/dist/index.es514.js +521 -2
- package/dist/index.es514.js.map +1 -1
- package/dist/index.es515.js +2 -6
- package/dist/index.es515.js.map +1 -1
- package/dist/index.es516.js +2 -521
- package/dist/index.es516.js.map +1 -1
- package/dist/index.es518.js +3 -3
- package/dist/index.es520.js +4 -4
- package/dist/index.es521.js +6 -6
- package/dist/index.es530.js +1 -1
- package/dist/index.es531.js +3 -3
- package/dist/index.es537.js +3 -3
- package/dist/index.es540.js +3 -3
- package/dist/index.es542.js +1 -1
- package/dist/index.es545.js +2 -2
- package/dist/index.es546.js +1 -1
- package/dist/index.es547.js +14 -14
- package/dist/index.es554.js +6 -6
- package/dist/index.es559.js +7 -7
- package/dist/index.es561.js +1 -1
- package/dist/index.es570.js +2 -6
- package/dist/index.es570.js.map +1 -1
- package/dist/index.es571.js +2 -16
- package/dist/index.es571.js.map +1 -1
- package/dist/index.es572.js +2 -2
- package/dist/index.es572.js.map +1 -1
- package/dist/index.es573.js +6 -2
- package/dist/index.es573.js.map +1 -1
- package/dist/index.es574.js +16 -2
- package/dist/index.es574.js.map +1 -1
- package/dist/index.es585.js +3 -522
- package/dist/index.es585.js.map +1 -1
- package/dist/index.es586.js +509 -113
- package/dist/index.es586.js.map +1 -1
- package/dist/index.es587.js +121 -123
- package/dist/index.es587.js.map +1 -1
- package/dist/index.es588.js +128 -3
- package/dist/index.es588.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs462.js +0 -2
- package/dist/index.cjs462.js.map +0 -1
- package/dist/index.cjs469.js +0 -2
- package/dist/index.cjs469.js.map +0 -1
- package/dist/index.cjs470.js +0 -2
- package/dist/index.cjs470.js.map +0 -1
- package/dist/index.cjs471.js +0 -2
- package/dist/index.cjs471.js.map +0 -1
- package/dist/index.es462.js +0 -14
- package/dist/index.es462.js.map +0 -1
- package/dist/index.es469.js +0 -18
- package/dist/index.es469.js.map +0 -1
- package/dist/index.es470.js +0 -128
- package/dist/index.es470.js.map +0 -1
- package/dist/index.es471.js +0 -138
- package/dist/index.es471.js.map +0 -1
- /package/dist/components/ui/{ConsentModal/ConsentModalContent/ConsentModalContent.css → DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css} +0 -0
- /package/dist/components/ui/{ConsentModal/ConsentModalFooter/ConsentModalFooter.css → DoctorModal/DoctorModalFooter/DoctorModalFooter.css} +0 -0
package/dist/index.es295.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
import * as s from "react";
|
2
|
-
import { composeEventHandlers as p } from "./index.
|
3
|
-
import { useComposedRefs as C } from "./index.
|
4
|
-
import { createContextScope as B, createContext as H } from "./index.
|
5
|
-
import { useId as x } from "./index.
|
6
|
-
import { useControllableState as V } from "./index.
|
7
|
-
import { DismissableLayer as q } from "./index.
|
8
|
-
import { FocusScope as K } from "./index.
|
9
|
-
import { Portal as U } from "./index.
|
10
|
-
import { Presence as R } from "./index.
|
11
|
-
import { Primitive as m } from "./index.
|
12
|
-
import { useFocusGuards as Y } from "./index.
|
13
|
-
import Z from "./index.
|
14
|
-
import { hideOthers as z } from "./index.
|
15
|
-
import { createSlot as J } from "./index.
|
2
|
+
import { composeEventHandlers as p } from "./index.es455.js";
|
3
|
+
import { useComposedRefs as C } from "./index.es456.js";
|
4
|
+
import { createContextScope as B, createContext as H } from "./index.es457.js";
|
5
|
+
import { useId as x } from "./index.es461.js";
|
6
|
+
import { useControllableState as V } from "./index.es458.js";
|
7
|
+
import { DismissableLayer as q } from "./index.es473.js";
|
8
|
+
import { FocusScope as K } from "./index.es474.js";
|
9
|
+
import { Portal as U } from "./index.es475.js";
|
10
|
+
import { Presence as R } from "./index.es465.js";
|
11
|
+
import { Primitive as m } from "./index.es459.js";
|
12
|
+
import { useFocusGuards as Y } from "./index.es476.js";
|
13
|
+
import Z from "./index.es477.js";
|
14
|
+
import { hideOthers as z } from "./index.es478.js";
|
15
|
+
import { createSlot as J } from "./index.es479.js";
|
16
16
|
import { j as i } from "./index.es243.js";
|
17
17
|
var _ = "Dialog", [N, he] = B(_), [Q, u] = N(_), P = (e) => {
|
18
18
|
const {
|
package/dist/index.es302.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { j as t } from "./index.es243.js";
|
2
|
-
import './components/ui/
|
2
|
+
import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
|
3
3
|
const s = ({ children: o }) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
|
4
4
|
export {
|
5
5
|
s as ConsentModalFooter
|
package/dist/index.es303.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { j as n } from "./index.es243.js";
|
2
2
|
import { clsx as r } from "./index.es244.js";
|
3
|
-
import './components/ui/
|
3
|
+
import './components/ui/DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css';/* empty css */
|
4
4
|
const i = ({
|
5
5
|
overrideClassNames: o,
|
6
6
|
children: t
|
package/dist/index.es307.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { j as t } from "./index.es243.js";
|
2
|
-
import './components/ui/
|
2
|
+
import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
|
3
3
|
const s = ({ children: o }) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
|
4
4
|
export {
|
5
5
|
s as DoctorModalFooter
|
package/dist/index.es316.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { j as r } from "./index.es243.js";
|
2
2
|
import { clsx as m } from "./index.es244.js";
|
3
|
-
import './components/ui/
|
3
|
+
import './components/ui/DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css';/* empty css */
|
4
4
|
const e = ({
|
5
5
|
overrideClassNames: o,
|
6
6
|
children: t
|
package/dist/index.es318.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { j as t } from "./index.es243.js";
|
2
|
-
import './components/ui/
|
2
|
+
import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
|
3
3
|
const s = ({
|
4
4
|
children: o
|
5
5
|
}) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
|
package/dist/index.es326.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as s from "react";
|
2
|
-
import { composeEventHandlers as T } from "./index.
|
3
|
-
import { useComposedRefs as _ } from "./index.
|
4
|
-
import { createContextScope as H } from "./index.
|
5
|
-
import { useControllableState as I } from "./index.
|
6
|
-
import { usePrevious as M } from "./index.
|
7
|
-
import { useSize as N } from "./index.
|
8
|
-
import { Primitive as w } from "./index.
|
2
|
+
import { composeEventHandlers as T } from "./index.es455.js";
|
3
|
+
import { useComposedRefs as _ } from "./index.es456.js";
|
4
|
+
import { createContextScope as H } from "./index.es457.js";
|
5
|
+
import { useControllableState as I } from "./index.es458.js";
|
6
|
+
import { usePrevious as M } from "./index.es463.js";
|
7
|
+
import { useSize as N } from "./index.es464.js";
|
8
|
+
import { Primitive as w } from "./index.es459.js";
|
9
9
|
import { j as p } from "./index.es243.js";
|
10
10
|
var S = "Switch", [B, J] = H(S), [q, z] = B(S), C = s.forwardRef(
|
11
11
|
(e, n) => {
|
package/dist/index.es33.js
CHANGED
@@ -3,59 +3,61 @@ import './components/ui/CardMapDoctorV2/CardMapDoctorV2.css';/* empty css
|
|
3
3
|
import { useRef as j } from "react";
|
4
4
|
import { Root as w, Indicator as b } from "./index.es277.js";
|
5
5
|
import { useClickOutside as N } from "./index.es278.js";
|
6
|
-
import { Row as
|
6
|
+
import { Row as n } from "./index.es9.js";
|
7
7
|
import { CheckIcon as g } from "./index.es212.js";
|
8
|
-
import { Col as
|
8
|
+
import { Col as m } from "./index.es10.js";
|
9
9
|
import { ArrowLink as k } from "./index.es42.js";
|
10
|
-
const
|
11
|
-
titleTag:
|
12
|
-
title:
|
13
|
-
specialization:
|
10
|
+
const E = ({
|
11
|
+
titleTag: x = "h3",
|
12
|
+
title: e,
|
13
|
+
specialization: l,
|
14
14
|
tag: d,
|
15
15
|
officeAddressLabel: f,
|
16
16
|
officeAddress: h,
|
17
17
|
className: u,
|
18
|
-
doctorCode:
|
19
|
-
setSelectedDoctorCode:
|
18
|
+
doctorCode: a,
|
19
|
+
setSelectedDoctorCode: r,
|
20
20
|
keepSelectionOnNavigation: p = !1,
|
21
|
-
ctaTitle:
|
21
|
+
ctaTitle: o,
|
22
22
|
ctaAction: t,
|
23
|
-
isActive:
|
23
|
+
isActive: i
|
24
24
|
}) => {
|
25
|
-
const
|
25
|
+
const c = j(null);
|
26
26
|
return N(
|
27
|
-
|
28
|
-
|
29
|
-
() =>
|
30
|
-
() =>
|
27
|
+
c,
|
28
|
+
i,
|
29
|
+
() => r(void 0),
|
30
|
+
() => r(void 0),
|
31
31
|
p
|
32
32
|
), /* @__PURE__ */ s.jsxs(
|
33
|
-
|
33
|
+
n,
|
34
34
|
{
|
35
35
|
br: "x4",
|
36
36
|
p: "x24",
|
37
37
|
gap: "x16",
|
38
38
|
bg: "white",
|
39
39
|
text: "slate-20",
|
40
|
-
ref:
|
41
|
-
className: `${u} ${
|
40
|
+
ref: c,
|
41
|
+
className: `${u} ${i ? "ui-is-active ui-card-search" : "ui-card-search"} shadow cursor-pointer`,
|
42
42
|
onClick: () => {
|
43
|
-
|
43
|
+
r(a);
|
44
44
|
},
|
45
45
|
children: [
|
46
46
|
/* @__PURE__ */ s.jsx(
|
47
47
|
w,
|
48
48
|
{
|
49
|
-
id:
|
50
|
-
checked:
|
49
|
+
id: a,
|
50
|
+
checked: i,
|
51
51
|
className: "ui-checkbox-filter",
|
52
|
+
title: `Seleziona ${e}`,
|
53
|
+
"aria-label": `Seleziona ${e}`,
|
52
54
|
children: /* @__PURE__ */ s.jsx(b, { children: /* @__PURE__ */ s.jsx(g, { width: 14, height: 14, color: "white" }) })
|
53
55
|
}
|
54
56
|
),
|
55
|
-
/* @__PURE__ */ s.jsxs(
|
56
|
-
/* @__PURE__ */ s.jsxs(
|
57
|
-
/* @__PURE__ */ s.jsx(
|
58
|
-
!!
|
57
|
+
/* @__PURE__ */ s.jsxs(m, { justifyContent: "center", className: "w-full", children: [
|
58
|
+
/* @__PURE__ */ s.jsxs(m, { pb: "x16", children: [
|
59
|
+
/* @__PURE__ */ s.jsx(x, { className: "flex-1 text-decoration-none fs-4 fw-semibold", children: e }),
|
60
|
+
!!l && /* @__PURE__ */ s.jsx("p", { className: "fs-6 fw-regular text-slate-28", children: l }),
|
59
61
|
/* @__PURE__ */ s.jsx(
|
60
62
|
"div",
|
61
63
|
{
|
@@ -64,19 +66,19 @@ const L = ({
|
|
64
66
|
}
|
65
67
|
)
|
66
68
|
] }),
|
67
|
-
/* @__PURE__ */ s.jsxs(
|
69
|
+
/* @__PURE__ */ s.jsxs(n, { justifyContent: "space-between", alignItems: "end", children: [
|
68
70
|
/* @__PURE__ */ s.jsxs("div", { className: "text-slate-28 fs-6", children: [
|
69
71
|
/* @__PURE__ */ s.jsx("div", { className: "fw-bold", children: f }),
|
70
72
|
/* @__PURE__ */ s.jsx("div", { className: "w-full", children: /* @__PURE__ */ s.jsx("p", { className: "fw-regular", children: h }) })
|
71
73
|
] }),
|
72
|
-
|
74
|
+
o && t && /* @__PURE__ */ s.jsx(
|
73
75
|
k,
|
74
76
|
{
|
75
77
|
asButton: !0,
|
76
78
|
onClick: t,
|
77
79
|
arrowVisible: !1,
|
78
80
|
className: "cursor-pointer",
|
79
|
-
children:
|
81
|
+
children: o
|
80
82
|
}
|
81
83
|
)
|
82
84
|
] })
|
@@ -86,6 +88,6 @@ const L = ({
|
|
86
88
|
);
|
87
89
|
};
|
88
90
|
export {
|
89
|
-
|
91
|
+
E as CardMapDoctorV2
|
90
92
|
};
|
91
93
|
//# sourceMappingURL=index.es33.js.map
|
package/dist/index.es33.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es33.js","sources":["../src/components/ui/CardMapDoctorV2/index.tsx"],"sourcesContent":["import \"./CardMapDoctorV2.scss\";\nimport { useRef } from \"react\";\nimport * as CheckboxRadix from \"@radix-ui/react-checkbox\";\nimport { useClickOutside } from \"@/hooks/useClickOutside.ts\";\nimport { ArrowLink, Col, Row } from \"@/components\";\nimport { CheckIcon } from \"@/icons\";\n\ntype HeadingLevel = \"h2\" | \"h3\" | \"h4\";\n\ntype CardMapDoctorProps = {\n doctorCode: string;\n titleTag: HeadingLevel;\n title: string;\n specialization?: string;\n tag?: string;\n officeAddressLabel?: string;\n officeAddress?: string;\n asLink?: \"a\";\n className?: string;\n isActive: boolean;\n setSelectedDoctorCode: (code?: string) => void;\n keepSelectionOnNavigation?: boolean;\n ctaTitle?: string;\n ctaAction?: () => void;\n};\n\nexport const CardMapDoctorV2 = ({\n titleTag: TitleTag = \"h3\",\n title,\n specialization,\n tag,\n officeAddressLabel,\n officeAddress,\n className,\n doctorCode,\n setSelectedDoctorCode,\n keepSelectionOnNavigation = false,\n ctaTitle,\n ctaAction,\n isActive,\n}: CardMapDoctorProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n useClickOutside(\n dropdownRef,\n isActive,\n () => setSelectedDoctorCode(undefined),\n () => setSelectedDoctorCode(undefined),\n keepSelectionOnNavigation,\n );\n\n return (\n <Row\n br={\"x4\"}\n p={\"x24\"}\n gap={\"x16\"}\n bg={\"white\"}\n text={\"slate-20\"}\n ref={dropdownRef}\n className={`${className} ${isActive ? \"ui-is-active ui-card-search\" : \"ui-card-search\"} shadow cursor-pointer`}\n onClick={() => {\n setSelectedDoctorCode(doctorCode);\n }}\n >\n <CheckboxRadix.Root\n id={doctorCode}\n checked={isActive}\n
|
1
|
+
{"version":3,"file":"index.es33.js","sources":["../src/components/ui/CardMapDoctorV2/index.tsx"],"sourcesContent":["import \"./CardMapDoctorV2.scss\";\nimport { useRef } from \"react\";\nimport * as CheckboxRadix from \"@radix-ui/react-checkbox\";\nimport { useClickOutside } from \"@/hooks/useClickOutside.ts\";\nimport { ArrowLink, Col, Row } from \"@/components\";\nimport { CheckIcon } from \"@/icons\";\n\ntype HeadingLevel = \"h2\" | \"h3\" | \"h4\";\n\ntype CardMapDoctorProps = {\n doctorCode: string;\n titleTag: HeadingLevel;\n title: string;\n specialization?: string;\n tag?: string;\n officeAddressLabel?: string;\n officeAddress?: string;\n asLink?: \"a\";\n className?: string;\n isActive: boolean;\n setSelectedDoctorCode: (code?: string) => void;\n keepSelectionOnNavigation?: boolean;\n ctaTitle?: string;\n ctaAction?: () => void;\n};\n\nexport const CardMapDoctorV2 = ({\n titleTag: TitleTag = \"h3\",\n title,\n specialization,\n tag,\n officeAddressLabel,\n officeAddress,\n className,\n doctorCode,\n setSelectedDoctorCode,\n keepSelectionOnNavigation = false,\n ctaTitle,\n ctaAction,\n isActive,\n}: CardMapDoctorProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n useClickOutside(\n dropdownRef,\n isActive,\n () => setSelectedDoctorCode(undefined),\n () => setSelectedDoctorCode(undefined),\n keepSelectionOnNavigation,\n );\n\n return (\n <Row\n br={\"x4\"}\n p={\"x24\"}\n gap={\"x16\"}\n bg={\"white\"}\n text={\"slate-20\"}\n ref={dropdownRef}\n className={`${className} ${isActive ? \"ui-is-active ui-card-search\" : \"ui-card-search\"} shadow cursor-pointer`}\n onClick={() => {\n setSelectedDoctorCode(doctorCode);\n }}\n >\n <CheckboxRadix.Root\n id={doctorCode}\n checked={isActive}\n className={\"ui-checkbox-filter\"}\n title={`Seleziona ${title}`}\n aria-label={`Seleziona ${title}`}\n >\n <CheckboxRadix.Indicator>\n <CheckIcon width={14} height={14} color=\"white\" />\n </CheckboxRadix.Indicator>\n </CheckboxRadix.Root>\n <Col justifyContent={\"center\"} className={`w-full`}>\n <Col pb={\"x16\"}>\n <TitleTag className=\"flex-1 text-decoration-none fs-4 fw-semibold\">\n {title}\n </TitleTag>\n {!!specialization && (\n <p className=\"fs-6 fw-regular text-slate-28\">{specialization}</p>\n )}\n <div\n className={\n \"ui-available-label mt-x4 px-x16 py-x4 bg-status-success text-white rounded fw-semibold fs-7\"\n }\n >\n {tag}\n </div>\n </Col>\n <Row justifyContent={\"space-between\"} alignItems={\"end\"}>\n <div className={\"text-slate-28 fs-6\"}>\n <div className={\"fw-bold\"}>{officeAddressLabel}</div>\n <div className={\"w-full\"}>\n <p className={\"fw-regular\"}>{officeAddress}</p>\n </div>\n </div>\n {ctaTitle && ctaAction && (\n <ArrowLink\n asButton\n onClick={ctaAction}\n arrowVisible={false}\n className={\"cursor-pointer\"}\n >\n {ctaTitle}\n </ArrowLink>\n )}\n </Row>\n </Col>\n </Row>\n );\n};\n"],"names":["CardMapDoctorV2","TitleTag","title","specialization","tag","officeAddressLabel","officeAddress","className","doctorCode","setSelectedDoctorCode","keepSelectionOnNavigation","ctaTitle","ctaAction","isActive","dropdownRef","useRef","useClickOutside","jsxs","Row","jsx","CheckboxRadix.Root","CheckboxRadix.Indicator","CheckIcon","Col","ArrowLink"],"mappings":";;;;;;;;;AA0BO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,UAAUC,IAAW;AAAA,EACrB,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,KAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,2BAAAC,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D,UAAAf;AAAA,cAAA;AAAA,YAAA;AAAA,UACH,GACF;AAAA,UACCa,gBAAAA,EAAA,KAAAC,GAAA,EAAI,gBAAgB,iBAAiB,YAAY,OAChD,UAAA;AAAA,YAACD,gBAAAA,EAAAA,KAAA,OAAA,EAAI,WAAW,sBACd,UAAA;AAAA,cAACE,gBAAAA,EAAA,IAAA,OAAA,EAAI,WAAW,WAAY,UAAmBd,GAAA;AAAA,cAC/Cc,gBAAAA,EAAAA,IAAC,SAAI,WAAW,UACd,gCAAC,KAAE,EAAA,WAAW,cAAe,UAAAb,EAAc,CAAA,EAC7C,CAAA;AAAA,YAAA,GACF;AAAA,YACCK,KAAYC,KACXO,gBAAAA,EAAA;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,UAAQ;AAAA,gBACR,SAASZ;AAAA,gBACT,cAAc;AAAA,gBACd,WAAW;AAAA,gBAEV,UAAAD;AAAA,cAAA;AAAA,YAAA;AAAA,UACH,EAEJ,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
package/dist/index.es368.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as l from "react";
|
2
|
-
import { createContextScope as T } from "./index.
|
3
|
-
import { useComposedRefs as A } from "./index.
|
2
|
+
import { createContextScope as T } from "./index.es457.js";
|
3
|
+
import { useComposedRefs as A } from "./index.es456.js";
|
4
4
|
import { createDialogScope as v, Root as O, Portal as j, Overlay as b, WarningProvider as w, Content as M, Title as I, Description as L, Close as f, Trigger as $ } from "./index.es295.js";
|
5
|
-
import { composeEventHandlers as F } from "./index.
|
6
|
-
import { createSlottable as G } from "./index.
|
5
|
+
import { composeEventHandlers as F } from "./index.es455.js";
|
6
|
+
import { createSlottable as G } from "./index.es479.js";
|
7
7
|
import { j as i } from "./index.es243.js";
|
8
8
|
var D = "AlertDialog", [W, te] = T(D, [
|
9
9
|
v
|
package/dist/index.es414.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { j as t } from "./index.es243.js";
|
2
|
-
import './components/ui/
|
2
|
+
import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
|
3
3
|
const s = ({
|
4
4
|
children: o
|
5
5
|
}) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
|
package/dist/index.es438.js
CHANGED
package/dist/index.es453.js
CHANGED
package/dist/index.es454.js
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
|
2
|
+
return function(s) {
|
3
|
+
if (f == null || f(s), p === !1 || !s.defaultPrevented)
|
4
|
+
return c == null ? void 0 : c(s);
|
5
|
+
};
|
6
|
+
}
|
7
|
+
export {
|
8
|
+
h as composeEventHandlers
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=index.es455.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es455.js","sources":["../node_modules/@radix-ui/primitive/dist/index.mjs"],"sourcesContent":["// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event"],"mappings":"AACA,SAASA,EAAqBC,GAAsBC,GAAiB,EAAE,0BAAAC,IAA2B,GAAM,IAAG,IAAI;AAC7G,SAAO,SAAqBC,GAAO;AAEjC,QADAH,KAAA,QAAAA,EAAuBG,IACnBD,MAA6B,MAAS,CAACC,EAAM;AAC/C,aAAOF,KAAA,gBAAAA,EAAkBE;AAAA,EAE5B;AACH;","x_google_ignoreList":[0]}
|
package/dist/index.es456.js
CHANGED
@@ -1,10 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import * as f from "react";
|
2
|
+
function l(n, o) {
|
3
|
+
if (typeof n == "function")
|
4
|
+
return n(o);
|
5
|
+
n != null && (n.current = o);
|
6
|
+
}
|
7
|
+
function i(...n) {
|
8
|
+
return (o) => {
|
9
|
+
let u = !1;
|
10
|
+
const c = n.map((t) => {
|
11
|
+
const e = l(t, o);
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
13
|
+
});
|
14
|
+
if (u)
|
15
|
+
return () => {
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
17
|
+
const e = c[t];
|
18
|
+
typeof e == "function" ? e() : l(n[t], null);
|
19
|
+
}
|
20
|
+
};
|
5
21
|
};
|
6
22
|
}
|
23
|
+
function s(...n) {
|
24
|
+
return f.useCallback(i(...n), n);
|
25
|
+
}
|
7
26
|
export {
|
8
|
-
|
27
|
+
i as composeRefs,
|
28
|
+
s as useComposedRefs
|
9
29
|
};
|
10
30
|
//# sourceMappingURL=index.es456.js.map
|
package/dist/index.es456.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es456.js","sources":["../node_modules/@radix-ui/
|
1
|
+
{"version":3,"file":"index.es456.js","sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":";AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACb,CAAK;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAS,IAETR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAEhC;AAAA,MACO;AAAA,EAEJ;AACH;AACA,SAASC,KAAmBN,GAAM;AAChC,SAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,GAAGA,CAAI;AACrD;","x_google_ignoreList":[0]}
|
package/dist/index.es457.js
CHANGED
@@ -1,30 +1,71 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import * as u from "react";
|
2
|
+
import { j as h } from "./index.es243.js";
|
3
|
+
function j(e, c) {
|
4
|
+
const o = u.createContext(c), a = (r) => {
|
5
|
+
const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
|
6
|
+
return /* @__PURE__ */ h.jsx(o.Provider, { value: s, children: t });
|
7
|
+
};
|
8
|
+
a.displayName = e + "Provider";
|
9
|
+
function i(r) {
|
10
|
+
const t = u.useContext(o);
|
11
|
+
if (t) return t;
|
12
|
+
if (c !== void 0) return c;
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
14
|
+
}
|
15
|
+
return [a, i];
|
6
16
|
}
|
7
|
-
function
|
8
|
-
|
9
|
-
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
return (
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
function w(e, c = []) {
|
18
|
+
let o = [];
|
19
|
+
function a(r, t) {
|
20
|
+
const n = u.createContext(t), s = o.length;
|
21
|
+
o = [...o, t];
|
22
|
+
const d = (m) => {
|
23
|
+
var S;
|
24
|
+
const { scope: x, children: C, ...p } = m, v = ((S = x == null ? void 0 : x[e]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => p, Object.values(p));
|
25
|
+
return /* @__PURE__ */ h.jsx(v.Provider, { value: P, children: C });
|
26
|
+
};
|
27
|
+
d.displayName = r + "Provider";
|
28
|
+
function f(m, x) {
|
29
|
+
var v;
|
30
|
+
const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, p = u.useContext(C);
|
31
|
+
if (p) return p;
|
32
|
+
if (t !== void 0) return t;
|
33
|
+
throw new Error(`\`${m}\` must be used within \`${r}\``);
|
34
|
+
}
|
35
|
+
return [d, f];
|
36
|
+
}
|
37
|
+
const i = () => {
|
38
|
+
const r = o.map((t) => u.createContext(t));
|
39
|
+
return function(n) {
|
40
|
+
const s = (n == null ? void 0 : n[e]) || r;
|
41
|
+
return u.useMemo(
|
42
|
+
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
43
|
+
[n, s]
|
44
|
+
);
|
45
|
+
};
|
21
46
|
};
|
47
|
+
return i.scopeName = e, [a, l(i, ...c)];
|
22
48
|
}
|
23
|
-
function
|
24
|
-
|
49
|
+
function l(...e) {
|
50
|
+
const c = e[0];
|
51
|
+
if (e.length === 1) return c;
|
52
|
+
const o = () => {
|
53
|
+
const a = e.map((i) => ({
|
54
|
+
useScope: i(),
|
55
|
+
scopeName: i.scopeName
|
56
|
+
}));
|
57
|
+
return function(r) {
|
58
|
+
const t = a.reduce((n, { useScope: s, scopeName: d }) => {
|
59
|
+
const m = s(r)[`__scope${d}`];
|
60
|
+
return { ...n, ...m };
|
61
|
+
}, {});
|
62
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
63
|
+
};
|
64
|
+
};
|
65
|
+
return o.scopeName = c.scopeName, o;
|
25
66
|
}
|
26
67
|
export {
|
27
|
-
|
28
|
-
|
68
|
+
j as createContext,
|
69
|
+
w as createContextScope
|
29
70
|
};
|
30
71
|
//# sourceMappingURL=index.es457.js.map
|
package/dist/index.es457.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es457.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es457.js","sources":["../node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","_a","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentSc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AM,QAAQ,OAAO,EAAE,CAAC,UAAUuB,EAAU,SAAS,EAAE,GAAGI,EAAU,IAAK,CAACA,CAAU,CAAC;AAAA,IAC7F;AAAA,EACF;AACD,SAAAT,EAAY,YAAYK,EAAU,WAC3BL;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es458.js
CHANGED
@@ -1,71 +1,33 @@
|
|
1
|
-
import * as
|
2
|
-
import {
|
3
|
-
function
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
};
|
8
|
-
a.displayName = e + "Provider";
|
9
|
-
function i(r) {
|
10
|
-
const t = u.useContext(o);
|
11
|
-
if (t) return t;
|
12
|
-
if (c !== void 0) return c;
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
1
|
+
import * as l from "react";
|
2
|
+
import { useCallbackRef as f } from "./index.es517.js";
|
3
|
+
function R({
|
4
|
+
prop: t,
|
5
|
+
defaultProp: r,
|
6
|
+
onChange: s = () => {
|
14
7
|
}
|
15
|
-
|
8
|
+
}) {
|
9
|
+
const [e, n] = v({ defaultProp: r, onChange: s }), o = t !== void 0, i = o ? t : e, u = f(s), d = l.useCallback(
|
10
|
+
(c) => {
|
11
|
+
if (o) {
|
12
|
+
const a = typeof c == "function" ? c(t) : c;
|
13
|
+
a !== t && u(a);
|
14
|
+
} else
|
15
|
+
n(c);
|
16
|
+
},
|
17
|
+
[o, t, n, u]
|
18
|
+
);
|
19
|
+
return [i, d];
|
16
20
|
}
|
17
|
-
function
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return /* @__PURE__ */ h.jsx(v.Provider, { value: P, children: C });
|
26
|
-
};
|
27
|
-
d.displayName = r + "Provider";
|
28
|
-
function f(m, x) {
|
29
|
-
var v;
|
30
|
-
const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, p = u.useContext(C);
|
31
|
-
if (p) return p;
|
32
|
-
if (t !== void 0) return t;
|
33
|
-
throw new Error(`\`${m}\` must be used within \`${r}\``);
|
34
|
-
}
|
35
|
-
return [d, f];
|
36
|
-
}
|
37
|
-
const i = () => {
|
38
|
-
const r = o.map((t) => u.createContext(t));
|
39
|
-
return function(n) {
|
40
|
-
const s = (n == null ? void 0 : n[e]) || r;
|
41
|
-
return u.useMemo(
|
42
|
-
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
43
|
-
[n, s]
|
44
|
-
);
|
45
|
-
};
|
46
|
-
};
|
47
|
-
return i.scopeName = e, [a, l(i, ...c)];
|
48
|
-
}
|
49
|
-
function l(...e) {
|
50
|
-
const c = e[0];
|
51
|
-
if (e.length === 1) return c;
|
52
|
-
const o = () => {
|
53
|
-
const a = e.map((i) => ({
|
54
|
-
useScope: i(),
|
55
|
-
scopeName: i.scopeName
|
56
|
-
}));
|
57
|
-
return function(r) {
|
58
|
-
const t = a.reduce((n, { useScope: s, scopeName: d }) => {
|
59
|
-
const m = s(r)[`__scope${d}`];
|
60
|
-
return { ...n, ...m };
|
61
|
-
}, {});
|
62
|
-
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
63
|
-
};
|
64
|
-
};
|
65
|
-
return o.scopeName = c.scopeName, o;
|
21
|
+
function v({
|
22
|
+
defaultProp: t,
|
23
|
+
onChange: r
|
24
|
+
}) {
|
25
|
+
const s = l.useState(t), [e] = s, n = l.useRef(e), o = f(r);
|
26
|
+
return l.useEffect(() => {
|
27
|
+
n.current !== e && (o(e), n.current = e);
|
28
|
+
}, [e, n, o]), s;
|
66
29
|
}
|
67
30
|
export {
|
68
|
-
|
69
|
-
w as createContextScope
|
31
|
+
R as useControllableState
|
70
32
|
};
|
71
33
|
//# sourceMappingURL=index.es458.js.map
|
package/dist/index.es458.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es458.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es458.js","sources":["../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useCallbackRef","setValue","React","nextValue","value2","uncontrolledState","prevValueRef"],"mappings":";;AAGA,SAASA,EAAqB;AAAA,EAC5B,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EACnB;AACA,GAAG;AACD,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAqB,EAAE,aAAAJ,GAAa,UAAAC,GAAU,GACxFI,IAAeN,MAAS,QACxBO,IAAQD,IAAeN,IAAOG,GAC9BK,IAAeC,EAAeP,CAAQ,GACtCQ,IAAWC,EAAM;AAAA,IACrB,CAACC,MAAc;AACb,UAAIN,GAAc;AAEhB,cAAMO,IAAS,OAAOD,KAAc,aADrBA,EACyCZ,CAAI,IAAIY;AAChE,QAAIC,MAAWb,KAAMQ,EAAaK,CAAM;AAAA,MAChD;AACQ,QAAAT,EAAoBQ,CAAS;AAAA,IAEhC;AAAA,IACD,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EACvD;AACD,SAAO,CAACD,GAAOG,CAAQ;AACzB;AACA,SAASL,EAAqB;AAAA,EAC5B,aAAAJ;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAMY,IAAoBH,EAAM,SAASV,CAAW,GAC9C,CAACM,CAAK,IAAIO,GACVC,IAAeJ,EAAM,OAAOJ,CAAK,GACjCC,IAAeC,EAAeP,CAAQ;AAC5C,SAAAS,EAAM,UAAU,MAAM;AACpB,IAAII,EAAa,YAAYR,MAC3BC,EAAaD,CAAK,GAClBQ,EAAa,UAAUR;AAAA,EAE1B,GAAE,CAACA,GAAOQ,GAAcP,CAAY,CAAC,GAC/BM;AACT;","x_google_ignoreList":[0]}
|