@anoki/fse-ui 1.0.0-beta1.48.23 → 1.0.0-beta1.48.26
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.cjs102.js.map +1 -1
- package/dist/index.cjs110.js +1 -1
- package/dist/index.cjs110.js.map +1 -1
- package/dist/index.cjs134.js +1 -1
- package/dist/index.cjs134.js.map +1 -1
- package/dist/index.cjs138.js +1 -1
- package/dist/index.cjs141.js +1 -1
- package/dist/index.cjs142.js +1 -1
- package/dist/index.cjs142.js.map +1 -1
- package/dist/index.cjs143.js +1 -1
- package/dist/index.cjs143.js.map +1 -1
- package/dist/index.cjs144.js +1 -1
- package/dist/index.cjs144.js.map +1 -1
- package/dist/index.cjs145.js +1 -1
- package/dist/index.cjs146.js +1 -1
- package/dist/index.cjs146.js.map +1 -1
- package/dist/index.cjs149.js +1 -1
- package/dist/index.cjs149.js.map +1 -1
- package/dist/index.cjs150.js +1 -1
- package/dist/index.cjs151.js +1 -1
- package/dist/index.cjs205.js +1 -1
- package/dist/index.cjs205.js.map +1 -1
- package/dist/index.cjs206.js +1 -1
- package/dist/index.cjs206.js.map +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs215.js.map +1 -1
- package/dist/index.cjs216.js +1 -1
- package/dist/index.cjs216.js.map +1 -1
- package/dist/index.cjs217.js +1 -1
- package/dist/index.cjs217.js.map +1 -1
- package/dist/index.cjs218.js +1 -1
- package/dist/index.cjs218.js.map +1 -1
- package/dist/index.cjs219.js +1 -1
- package/dist/index.cjs219.js.map +1 -1
- package/dist/index.cjs227.js +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs264.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.cjs30.js.map +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.cjs31.js +1 -1
- package/dist/index.cjs31.js.map +1 -1
- package/dist/index.cjs316.js +1 -1
- package/dist/index.cjs318.js +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs32.js.map +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.cjs34.js +1 -1
- package/dist/index.cjs34.js.map +1 -1
- package/dist/index.cjs36.js +1 -1
- package/dist/index.cjs36.js.map +1 -1
- package/dist/index.cjs368.js +1 -1
- package/dist/index.cjs37.js +1 -1
- package/dist/index.cjs37.js.map +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs420.js +1 -1
- package/dist/index.cjs422.js +1 -1
- package/dist/{index.cjs432.js → index.cjs431.js} +1 -1
- package/dist/index.cjs431.js.map +1 -0
- package/dist/index.cjs438.js +2 -0
- package/dist/index.cjs438.js.map +1 -0
- package/dist/index.cjs442.js +2 -0
- package/dist/index.cjs442.js.map +1 -0
- package/dist/index.cjs443.js +1 -1
- package/dist/index.cjs443.js.map +1 -1
- package/dist/{index.cjs446.js → index.cjs445.js} +1 -1
- package/dist/{index.cjs446.js.map → index.cjs445.js.map} +1 -1
- package/dist/{index.cjs448.js → index.cjs447.js} +1 -1
- package/dist/{index.cjs448.js.map → index.cjs447.js.map} +1 -1
- package/dist/{index.cjs429.js → index.cjs450.js} +1 -1
- package/dist/{index.cjs429.js.map → index.cjs450.js.map} +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.cjs466.js +1 -1
- package/dist/index.cjs466.js.map +1 -1
- package/dist/index.cjs467.js +1 -1
- package/dist/index.cjs467.js.map +1 -1
- package/dist/index.cjs468.js +1 -1
- package/dist/index.cjs468.js.map +1 -1
- package/dist/index.cjs469.js +1 -1
- package/dist/index.cjs469.js.map +1 -1
- package/dist/index.cjs470.js +1 -1
- package/dist/index.cjs470.js.map +1 -1
- package/dist/index.cjs471.js +1 -1
- package/dist/index.cjs471.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.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.cjs49.js +1 -1
- package/dist/index.cjs49.js.map +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/{index.cjs511.js → index.cjs508.js} +2 -2
- package/dist/{index.cjs511.js.map → index.cjs508.js.map} +1 -1
- package/dist/index.cjs509.js +3 -0
- package/dist/index.cjs509.js.map +1 -0
- package/dist/index.cjs512.js +1 -2
- package/dist/index.cjs512.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.cjs523.js +1 -1
- package/dist/index.cjs523.js.map +1 -1
- package/dist/index.cjs524.js +1 -1
- package/dist/index.cjs524.js.map +1 -1
- package/dist/index.cjs53.js +1 -1
- package/dist/index.cjs53.js.map +1 -1
- package/dist/index.cjs530.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.cjs62.js +1 -1
- package/dist/index.cjs62.js.map +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs63.js.map +1 -1
- package/dist/index.cjs68.js.map +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs70.js.map +1 -1
- package/dist/index.cjs73.js +1 -1
- package/dist/index.cjs73.js.map +1 -1
- package/dist/index.d.ts +18 -45
- package/dist/index.es102.js +1 -1
- package/dist/index.es102.js.map +1 -1
- package/dist/index.es110.js +1 -1
- package/dist/index.es110.js.map +1 -1
- package/dist/index.es134.js +1 -1
- package/dist/index.es134.js.map +1 -1
- package/dist/index.es138.js +1 -1
- package/dist/index.es141.js +1 -1
- package/dist/index.es142.js +1 -1
- package/dist/index.es142.js.map +1 -1
- package/dist/index.es143.js +1 -1
- package/dist/index.es143.js.map +1 -1
- package/dist/index.es144.js +1 -1
- package/dist/index.es144.js.map +1 -1
- package/dist/index.es145.js +1 -1
- package/dist/index.es146.js +1 -1
- package/dist/index.es146.js.map +1 -1
- package/dist/index.es149.js +2 -2
- package/dist/index.es149.js.map +1 -1
- package/dist/index.es150.js +2 -2
- package/dist/index.es151.js +1 -1
- package/dist/index.es205.js +8 -8
- package/dist/index.es205.js.map +1 -1
- package/dist/index.es206.js +6 -6
- package/dist/index.es206.js.map +1 -1
- package/dist/index.es215.js +13 -13
- package/dist/index.es215.js.map +1 -1
- package/dist/index.es216.js +5 -5
- package/dist/index.es216.js.map +1 -1
- package/dist/index.es217.js +10 -10
- package/dist/index.es217.js.map +1 -1
- package/dist/index.es218.js +9 -9
- package/dist/index.es218.js.map +1 -1
- package/dist/index.es219.js +10 -10
- package/dist/index.es219.js.map +1 -1
- package/dist/index.es227.js +1 -1
- package/dist/index.es229.js +1 -1
- package/dist/index.es264.js +7 -7
- package/dist/index.es277.js +8 -8
- package/dist/index.es288.js +1 -1
- package/dist/index.es295.js +14 -14
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es302.js +1 -1
- package/dist/index.es303.js +1 -1
- package/dist/index.es307.js +1 -1
- package/dist/index.es31.js +1 -1
- package/dist/index.es31.js.map +1 -1
- package/dist/index.es316.js +1 -1
- package/dist/index.es318.js +1 -1
- package/dist/index.es32.js +1 -1
- package/dist/index.es32.js.map +1 -1
- package/dist/index.es326.js +7 -7
- package/dist/index.es33.js +1 -1
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +1 -1
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es36.js +1 -1
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es368.js +4 -4
- package/dist/index.es37.js +1 -1
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es414.js +1 -1
- package/dist/index.es420.js +1 -1
- package/dist/index.es422.js +1 -1
- package/dist/{index.es432.js → index.es431.js} +1 -1
- package/dist/index.es431.js.map +1 -0
- package/dist/{index.es439.js → index.es438.js} +2 -2
- package/dist/index.es438.js.map +1 -0
- package/dist/index.es442.js +12 -0
- package/dist/index.es442.js.map +1 -0
- package/dist/index.es443.js +188 -8
- package/dist/index.es443.js.map +1 -1
- package/dist/{index.es446.js → index.es445.js} +1 -1
- package/dist/{index.es446.js.map → index.es445.js.map} +1 -1
- package/dist/{index.es448.js → index.es447.js} +1 -1
- package/dist/{index.es448.js.map → index.es447.js.map} +1 -1
- package/dist/{index.es429.js → index.es450.js} +1 -1
- package/dist/{index.es429.js.map → index.es450.js.map} +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.es466.js +5 -14
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es467.js +24 -5
- package/dist/index.es467.js.map +1 -1
- package/dist/index.es468.js +67 -23
- package/dist/index.es468.js.map +1 -1
- package/dist/index.es469.js +120 -64
- package/dist/index.es469.js.map +1 -1
- package/dist/index.es470.js +126 -116
- package/dist/index.es470.js.map +1 -1
- package/dist/index.es471.js +13 -134
- package/dist/index.es471.js.map +1 -1
- package/dist/index.es472.js +14 -13
- package/dist/index.es472.js.map +1 -1
- package/dist/index.es473.js +8 -14
- package/dist/index.es473.js.map +1 -1
- package/dist/index.es474.js +50 -9
- package/dist/index.es474.js.map +1 -1
- package/dist/index.es475.js +55 -49
- package/dist/index.es475.js.map +1 -1
- package/dist/index.es479.js +18 -0
- package/dist/index.es479.js.map +1 -0
- package/dist/index.es48.js +1 -1
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +1 -1
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/{index.es511.js → index.es508.js} +2 -2
- package/dist/{index.es511.js.map → index.es508.js.map} +1 -1
- package/dist/index.es509.js +524 -0
- package/dist/index.es509.js.map +1 -0
- package/dist/index.es512.js +4 -520
- package/dist/index.es512.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.es523.js +14 -2
- package/dist/index.es523.js.map +1 -1
- package/dist/index.es524.js +2 -14
- package/dist/index.es524.js.map +1 -1
- package/dist/index.es53.js +1 -1
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es530.js +1 -1
- 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 +5 -5
- package/dist/index.es559.js +7 -7
- package/dist/index.es561.js +1 -1
- package/dist/index.es570.js +2 -16
- package/dist/index.es570.js.map +1 -1
- package/dist/index.es571.js +2 -6
- 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.es62.js +1 -1
- package/dist/index.es62.js.map +1 -1
- package/dist/index.es63.js +1 -1
- package/dist/index.es63.js.map +1 -1
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es70.js +1 -1
- package/dist/index.es70.js.map +1 -1
- package/dist/index.es73.js +1 -0
- package/dist/index.es73.js.map +1 -1
- package/dist/sections/Login/Login.css +1 -1
- package/package.json +1 -1
- package/dist/index.cjs432.js.map +0 -1
- package/dist/index.cjs439.js +0 -2
- package/dist/index.cjs439.js.map +0 -1
- package/dist/index.cjs444.js +0 -2
- package/dist/index.cjs444.js.map +0 -1
- package/dist/index.cjs462.js +0 -2
- package/dist/index.cjs462.js.map +0 -1
- package/dist/index.cjs476.js +0 -2
- package/dist/index.cjs476.js.map +0 -1
- package/dist/index.cjs510.js +0 -2
- package/dist/index.cjs510.js.map +0 -1
- package/dist/index.es432.js.map +0 -1
- package/dist/index.es439.js.map +0 -1
- package/dist/index.es444.js +0 -192
- package/dist/index.es444.js.map +0 -1
- package/dist/index.es462.js +0 -14
- package/dist/index.es462.js.map +0 -1
- package/dist/index.es476.js +0 -59
- package/dist/index.es476.js.map +0 -1
- package/dist/index.es510.js +0 -8
- package/dist/index.es510.js.map +0 -1
- /package/dist/components/ui/{DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css → ConsentModal/ConsentModalContent/ConsentModalContent.css} +0 -0
- /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
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/ConsentModal/ConsentModalContent/ConsentModalContent.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/ConsentModal/ConsentModalFooter/ConsentModalFooter.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.es32.js
CHANGED
@@ -8,7 +8,7 @@ import { ArrowLink as v } from "./index.es42.js";
|
|
8
8
|
import { Row as f } from "./index.es9.js";
|
9
9
|
import { Col as x } from "./index.es10.js";
|
10
10
|
const B = ({
|
11
|
-
titleTag: h = "
|
11
|
+
titleTag: h = "h1",
|
12
12
|
availableLabel: p = "Disponibile",
|
13
13
|
specialization: l,
|
14
14
|
addressLabel: u,
|
package/dist/index.es32.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es32.js","sources":["../src/components/ui/CardMapDoctor/index.tsx"],"sourcesContent":["import \"./CardMapDoctor.scss\";\nimport { useRef, useState } from \"react\";\nimport { GeneralPractitionerResponse } from \"@anoki/fse-common/dist/types/general-practitioner-service\";\nimport * as CheckboxRadix from \"@radix-ui/react-checkbox\";\nimport { useClickOutside } from \"@/hooks/useClickOutside.ts\";\nimport { ArrowLink, Col, Row } from \"@/components\";\nimport { CheckIcon } from \"@/icons\";\
|
1
|
+
{"version":3,"file":"index.es32.js","sources":["../src/components/ui/CardMapDoctor/index.tsx"],"sourcesContent":["import \"./CardMapDoctor.scss\";\nimport { useRef, useState } from \"react\";\nimport { GeneralPractitionerResponse } from \"@anoki/fse-common/dist/types/general-practitioner-service\";\nimport * as CheckboxRadix from \"@radix-ui/react-checkbox\";\nimport { useClickOutside } from \"@/hooks/useClickOutside.ts\";\nimport { ArrowLink, Col, Row } from \"@/components\";\nimport { CheckIcon } from \"@/icons\";\nimport { HeadingLevel } from \"@/types/headings\";\n\ntype CardMapDoctorProps = {\n titleTag: HeadingLevel;\n availableLabel: string;\n specialization?: string;\n addressLabel?: string;\n className?: string;\n doctor: GeneralPractitionerResponse;\n setSelectedCard?: (id: string) => void;\n keepSelectionOnNavigation?: boolean;\n ctaTitle?: string;\n ctaAction?: () => void;\n};\n\nexport const CardMapDoctor = ({\n titleTag: TitleTag = \"h1\",\n availableLabel = \"Disponibile\",\n specialization,\n addressLabel,\n className,\n doctor,\n setSelectedCard = () => {},\n keepSelectionOnNavigation = false,\n ctaTitle,\n ctaAction,\n}: CardMapDoctorProps) => {\n const [isActive, setIsActive] = useState(false);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const address = doctor?.offices[0];\n useClickOutside(\n dropdownRef,\n isActive,\n () => setIsActive(false),\n () => setSelectedCard(\"\"),\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 setIsActive(true);\n setSelectedCard(doctor?.code);\n }}\n >\n <CheckboxRadix.Root\n id={doctor?.code}\n checked={isActive}\n // onCheckedChange={onChange}\n className={\"ui-checkbox-filter\"}\n // aria-label={labelText}\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 Dott. {doctor?.firstName} {doctor?.lastName}\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 {availableLabel.toUpperCase()}\n </div>\n </Col>\n <Row justifyContent={\"space-between\"} alignItems={\"end\"}>\n <div className={\"text-slate-28 fs-6\"}>\n <div className={\"fw-bold\"}>{addressLabel}</div>\n <div className={\"w-full\"}>\n <p className={\"fw-regular\"}>\n {address?.address\n ? address.address.charAt(0).toUpperCase() +\n address.address.slice(1).toLowerCase()\n : \"\"}\n ,{\" \"}\n {address?.city\n ? address.city.charAt(0).toUpperCase() +\n address.city.slice(1).toLowerCase()\n : \"\"}\n </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":["CardMapDoctor","TitleTag","availableLabel","specialization","addressLabel","className","doctor","setSelectedCard","keepSelectionOnNavigation","ctaTitle","ctaAction","isActive","setIsActive","useState","dropdownRef","useRef","address","useClickOutside","jsxs","Row","jsx","CheckboxRadix.Root","CheckboxRadix.Indicator","CheckIcon","Col","ArrowLink"],"mappings":";;;;;;;;;AAsBO,MAAMA,IAAgB,CAAC;AAAA,EAC5B,UAAUC,IAAW;AAAA,EACrB,gBAAAC,IAAiB;AAAA,EACjB,g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,IAAA;AAAA,EACF;AAEJ;"}
|
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.es466.js";
|
7
|
+
import { useSize as N } from "./index.es467.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
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\";\r\nimport { useRef } from \"react\";\r\nimport * as CheckboxRadix from \"@radix-ui/react-checkbox\";\r\nimport { useClickOutside } from \"@/hooks/useClickOutside.ts\";\r\nimport { ArrowLink, Col, Row } from \"@/components\";\r\nimport { CheckIcon } from \"@/icons\";\r\
|
1
|
+
{"version":3,"file":"index.es33.js","sources":["../src/components/ui/CardMapDoctorV2/index.tsx"],"sourcesContent":["import \"./CardMapDoctorV2.scss\";\r\nimport { useRef } from \"react\";\r\nimport * as CheckboxRadix from \"@radix-ui/react-checkbox\";\r\nimport { useClickOutside } from \"@/hooks/useClickOutside.ts\";\r\nimport { ArrowLink, Col, Row } from \"@/components\";\r\nimport { CheckIcon } from \"@/icons\";\r\nimport { HeadingLevel } from \"@/types/headings\";\r\n\r\ntype CardMapDoctorProps = {\r\n doctorCode: string;\r\n titleTag: HeadingLevel;\r\n title: string;\r\n specialization?: string;\r\n tag?: string;\r\n officeAddressLabel?: string;\r\n officeAddress?: string;\r\n asLink?: \"a\";\r\n className?: string;\r\n isActive: boolean;\r\n setSelectedDoctorCode: (code?: string) => void;\r\n keepSelectionOnNavigation?: boolean;\r\n ctaTitle?: string;\r\n ctaAction?: () => void;\r\n};\r\n\r\nexport const CardMapDoctorV2 = ({\r\n titleTag: TitleTag = \"h1\",\r\n title,\r\n specialization,\r\n tag,\r\n officeAddressLabel,\r\n officeAddress,\r\n className,\r\n doctorCode,\r\n setSelectedDoctorCode,\r\n keepSelectionOnNavigation = false,\r\n ctaTitle,\r\n ctaAction,\r\n isActive,\r\n}: CardMapDoctorProps) => {\r\n const dropdownRef = useRef<HTMLDivElement>(null);\r\n useClickOutside(\r\n dropdownRef,\r\n isActive,\r\n () => setSelectedDoctorCode(undefined),\r\n () => setSelectedDoctorCode(undefined),\r\n keepSelectionOnNavigation,\r\n );\r\n\r\n return (\r\n <Row\r\n br={\"x4\"}\r\n p={\"x24\"}\r\n gap={\"x16\"}\r\n bg={\"white\"}\r\n text={\"slate-20\"}\r\n ref={dropdownRef}\r\n className={`${className} ${isActive ? \"ui-is-active ui-card-search\" : \"ui-card-search\"} shadow cursor-pointer`}\r\n onClick={() => {\r\n setSelectedDoctorCode(doctorCode);\r\n }}\r\n >\r\n <CheckboxRadix.Root\r\n id={doctorCode}\r\n checked={isActive}\r\n className={\"ui-checkbox-filter\"}\r\n title={`Seleziona ${title}`}\r\n aria-label={`Seleziona ${title}`}\r\n >\r\n <CheckboxRadix.Indicator>\r\n <CheckIcon width={14} height={14} color=\"white\" />\r\n </CheckboxRadix.Indicator>\r\n </CheckboxRadix.Root>\r\n <Col justifyContent={\"center\"} className={`w-full`}>\r\n <Col pb={\"x16\"}>\r\n <TitleTag className=\"flex-1 text-decoration-none fs-4 fw-semibold\">\r\n {title}\r\n </TitleTag>\r\n {!!specialization && (\r\n <p className=\"fs-6 fw-regular text-slate-28\">{specialization}</p>\r\n )}\r\n <div\r\n className={\r\n \"ui-available-label mt-x4 px-x16 py-x4 bg-status-success text-white rounded fw-semibold fs-7\"\r\n }\r\n >\r\n {tag}\r\n </div>\r\n </Col>\r\n <Row justifyContent={\"space-between\"} alignItems={\"end\"}>\r\n <div className={\"text-slate-28 fs-6\"}>\r\n <div className={\"fw-bold\"}>{officeAddressLabel}</div>\r\n <div className={\"w-full\"}>\r\n <p className={\"fw-regular\"}>{officeAddress}</p>\r\n </div>\r\n </div>\r\n {ctaTitle && ctaAction && (\r\n <ArrowLink\r\n asButton\r\n onClick={ctaAction}\r\n arrowVisible={false}\r\n className={\"cursor-pointer\"}\r\n >\r\n {ctaTitle}\r\n </ArrowLink>\r\n )}\r\n </Row>\r\n </Col>\r\n </Row>\r\n );\r\n};\r\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":";;;;;;;;;AAyBO,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,IAA4B;AAAA,EAC5B,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,MAA0B;AAClB,QAAAC,IAAcC,EAAuB,IAAI;AAC/C,SAAAC;AAAA,IACEF;AAAA,IACAD;AAAA,IACA,MAAMJ,EAAsB,MAAS;AAA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ACd,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.es34.js
CHANGED
package/dist/index.es34.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es34.js","sources":["../src/components/ui/CardService/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { Ellipse } from \"@/icons\";\nimport { Ellipse2 } from \"@/icons\";\nimport { Ellipse3 } from \"@/icons\";\nimport { ComponentType } from \"react\";\nimport \"./CardService.scss\";\n\nexport type CardServiceProps = {\n title: string;\n href?: string;\n titleTag:
|
1
|
+
{"version":3,"file":"index.es34.js","sources":["../src/components/ui/CardService/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { Ellipse } from \"@/icons\";\nimport { Ellipse2 } from \"@/icons\";\nimport { Ellipse3 } from \"@/icons\";\nimport { ComponentType } from \"react\";\nimport \"./CardService.scss\";\nimport { HeadingLevel } from \"@/types/headings\";\n\nexport type CardServiceProps = {\n title: string;\n href?: string;\n titleTag: HeadingLevel;\n asLink?: \"a\" | ComponentType<any>;\n className?: string;\n iconType?: \"icon1\" | \"icon2\" | \"icon3\";\n};\n\nexport const CardService = ({\n title,\n href,\n titleTag: TitleTag = \"h1\",\n asLink = \"a\",\n className,\n iconType = \"icon1\",\n}: CardServiceProps) => {\n const getIcon = (type: string) => {\n switch (type) {\n case \"icon1\":\n return <Ellipse />;\n case \"icon2\":\n return <Ellipse2 />;\n case \"icon3\":\n return <Ellipse3 />;\n default:\n return null;\n }\n };\n\n const LinkComponent = asLink;\n return (\n <LinkComponent className={\" text-decoration-none\"} href={href}>\n <div\n className={clsx(\n className,\n \"ui-service-card\",\n \"bg-primary br-x4 py-x24 pl-x24 w-full shadow \",\n )}\n >\n <TitleTag className=\"flex-1 h-full base-row align-items-center fs-5 md-fs-4 text-white fw-semibold \">\n {title}\n </TitleTag>\n <div className={clsx(\"ui-service-card-icon\")}>\n <span>{getIcon(iconType)}</span>\n </div>\n </div>\n </LinkComponent>\n );\n};\n"],"names":["CardService","title","href","TitleTag","asLink","className","iconType","getIcon","type","Ellipse","Ellipse2","Ellipse3","LinkComponent","jsx","jsxs","clsx"],"mappings":";;;;;;AAiBO,MAAMA,IAAc,CAAC;AAAA,EAC1B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAUC,IAAW;AAAA,EACrB,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,UAAAC,IAAW;AACb,MAAwB;AAChB,QAAAC,IAAU,CAACC,MAAiB;AAChC,YAAQA,GAAM;AAAA,MACZ,KAAK;AACH,qCAAQC,GAAQ,EAAA;AAAA,MAClB,KAAK;AACH,qCAAQC,GAAS,EAAA;AAAA,MACnB,KAAK;AACH,qCAAQC,GAAS,EAAA;AAAA,MACnB;AACS,eAAA;AAAA,IAAA;AAAA,EAEb,GAEMC,IAAgBR;AACtB,SACGS,gBAAAA,EAAAA,IAAAD,GAAA,EAAc,WAAW,yBAAyB,MAAAV,GACjD,UAAAY,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTV;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA,UAAA;AAAA,QAACQ,gBAAAA,EAAA,IAAAV,GAAA,EAAS,WAAU,kFACjB,UACHF,GAAA;AAAA,QACAY,gBAAAA,EAAAA,IAAC,OAAI,EAAA,WAAWE,EAAK,sBAAsB,GACzC,UAAAF,gBAAAA,EAAAA,IAAC,QAAM,EAAA,UAAAN,EAAQD,CAAQ,EAAE,CAAA,EAC3B,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
package/dist/index.es36.js
CHANGED
package/dist/index.es36.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es36.js","sources":["../src/components/ui/CardOpeningHours/index.tsx"],"sourcesContent":["import \"./CardOpeningHours.scss\";\r\nimport clsx from \"clsx\";\r\nimport { OpeningHours } from \"@anoki/fse-common\";\r\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\r\nimport { DateTime } from \"luxon\";\r\nimport { Col, Row } from \"@/components\";\r\n\r\ntype HeadingLevel = \"h2\" | \"h3\" | \"h4\";\r\ntype WeekDaysMap = Record<keyof OpeningHours, string>;\r\ntype TimeSlot = { from: string; to: string };\r\n\r\ntype CardOpeningHoursProps = {\r\n title: string;\r\n titleTag: HeadingLevel;\r\n openingHours: OpeningHours;\r\n weekDaysMap: WeekDaysMap;\r\n openLabel?: string;\r\n todayLabel?: string;\r\n closeLabel?: string;\r\n open24Label?: string;\r\n opensSoonLabel?: string;\r\n opensAtLabel?: string;\r\n opensTomorrowLabel?: string;\r\n opensOnLabel?: string;\r\n atLabel?: string;\r\n closesAtLabel?: string;\r\n};\r\n\r\nexport const CardOpeningHours = ({\r\n title = \"Orari di apertura\",\r\n titleTag: TitleTag = \"h3\",\r\n openingHours,\r\n weekDaysMap,\r\n openLabel = \"Aperto\",\r\n todayLabel = \"Oggi\",\r\n closeLabel = \"Chiuso\",\r\n open24Label = \"24 ore su 24\",\r\n opensSoonLabel = \"Apre tra poco\",\r\n opensAtLabel = \"Apre alle\",\r\n opensTomorrowLabel = \"Apre domani\",\r\n opensOnLabel = \"Apre\",\r\n atLabel = \"alle\",\r\n closesAtLabel = \"Chiude alle\",\r\n}: CardOpeningHoursProps) => {\r\n const [activeDay, setActiveDay] = useState<number | null>(null);\r\n const [dayLabel, setDayLabel] = useState(\"\");\r\n const [openingHoursText, setOpeningHoursText] = useState(\"\");\r\n const [openingHoursText2, setOpeningHoursText2] = useState(\"\");\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [isOpeningSoon, setIsOpeningSoon] = useState(false);\r\n const [additionalInfo, setAdditionalInfo] = useState(\"\");\r\n\r\n const weekDays = Object.values(weekDaysMap);\r\n const weekKeys = Object.keys(weekDaysMap) as (keyof OpeningHours)[];\r\n\r\n const formatCurrentTime = () => {\r\n return DateTime.now().toFormat(\"HH:mm\");\r\n };\r\n\r\n const parseTimeToMinutes = (timeStr: string): number => {\r\n const [hours, minutes] = timeStr.split(\":\").map(Number);\r\n return hours * 60 + minutes;\r\n };\r\n\r\n const isSlot24Hours = useCallback(\r\n (slot: TimeSlot) => slot.from === \"00:00\" && slot.to === \"00:00\",\r\n [],\r\n );\r\n\r\n const is24HoursDay = useCallback(\r\n (slots: TimeSlot[]) => slots.some(isSlot24Hours),\r\n [isSlot24Hours],\r\n );\r\n\r\n const isCurrentlyOpen = (slots: TimeSlot[], currentTime: string) => {\r\n for (const { from, to } of slots) {\r\n if (currentTime >= from && currentTime <= to) {\r\n return { open: true, closingTime: to };\r\n }\r\n }\r\n return { open: false, closingTime: \"\" };\r\n };\r\n\r\n const getNextOpeningTime = (slots: TimeSlot[], currentTime: string) => {\r\n for (const { from } of slots) {\r\n if (from > currentTime) {\r\n return from;\r\n }\r\n }\r\n return \"\";\r\n };\r\n\r\n const checkIsOpeningSoon = useCallback(\r\n (openingTime: string, currentTime: string) => {\r\n if (!openingTime) return false;\r\n\r\n const openMinutes = parseTimeToMinutes(openingTime);\r\n const currentMinutes = parseTimeToMinutes(currentTime);\r\n const diffMinutes = openMinutes - currentMinutes;\r\n\r\n return diffMinutes > 0 && diffMinutes <= 60;\r\n },\r\n [],\r\n );\r\n\r\n const getNextOpenDay = useCallback(\r\n (currentDayIndex: number) => {\r\n for (let i = 1; i <= 7; i++) {\r\n const nextIndex = (currentDayIndex + i) % 7;\r\n const nextDayKey = weekKeys[nextIndex];\r\n const nextDaySlots = openingHours[nextDayKey];\r\n\r\n if (nextDaySlots && nextDaySlots.length > 0) {\r\n return {\r\n dayName: weekDays[nextIndex].toLowerCase(),\r\n isTomorrow: i === 1,\r\n };\r\n }\r\n }\r\n return null;\r\n },\r\n [weekKeys, openingHours, weekDays],\r\n );\r\n\r\n const generateOpeningHoursText = useMemo(() => {\r\n return (hours: TimeSlot[]) => {\r\n if (hours.length === 0) {\r\n return closeLabel;\r\n }\r\n\r\n if (is24HoursDay(hours)) {\r\n return `${openLabel} ${open24Label}`;\r\n }\r\n\r\n return hours.map(({ from, to }) => `${from} - ${to}`).join(\" | \");\r\n };\r\n }, [closeLabel, is24HoursDay, open24Label, openLabel]);\r\n\r\n useEffect(() => {\r\n const now = DateTime.now();\r\n const todayIndex = now.weekday - 1;\r\n setActiveDay(todayIndex);\r\n setDayLabel(weekDays[todayIndex] || \"\");\r\n\r\n const todayKey = weekKeys[todayIndex];\r\n const todaySlots = openingHours[todayKey];\r\n\r\n if (!todaySlots) {\r\n return;\r\n }\r\n\r\n const currentTime = formatCurrentTime();\r\n\r\n if (is24HoursDay(todaySlots)) {\r\n setOpeningHoursText(openLabel);\r\n setAdditionalInfo(` | ${open24Label}`);\r\n setIsOpen(true);\r\n setIsOpeningSoon(false);\r\n setOpeningHoursText2(`${openLabel} ${open24Label}`);\r\n return;\r\n }\r\n\r\n const { open, closingTime } = isCurrentlyOpen(todaySlots, currentTime);\r\n\r\n if (open) {\r\n setOpeningHoursText(openLabel);\r\n setAdditionalInfo(\r\n closingTime ? ` | ${closesAtLabel} ${closingTime}` : \"\",\r\n );\r\n setIsOpen(true);\r\n setIsOpeningSoon(false);\r\n } else {\r\n const nextOpeningTime = getNextOpeningTime(todaySlots, currentTime);\r\n setIsOpen(false);\r\n\r\n if (nextOpeningTime) {\r\n if (checkIsOpeningSoon(nextOpeningTime, currentTime)) {\r\n setOpeningHoursText(opensSoonLabel);\r\n setAdditionalInfo(` | ${atLabel} ${nextOpeningTime}`);\r\n setIsOpeningSoon(true);\r\n } else {\r\n setOpeningHoursText(closeLabel);\r\n setAdditionalInfo(` | ${opensAtLabel} ${nextOpeningTime}`);\r\n setIsOpeningSoon(false);\r\n }\r\n } else {\r\n setOpeningHoursText(closeLabel);\r\n setIsOpeningSoon(false);\r\n const nextDay = getNextOpenDay(todayIndex);\r\n\r\n if (nextDay) {\r\n setAdditionalInfo(\r\n nextDay.isTomorrow\r\n ? ` | ${opensTomorrowLabel}`\r\n : ` | ${opensOnLabel} ${nextDay.dayName}`,\r\n );\r\n } else {\r\n setAdditionalInfo(\"\");\r\n }\r\n }\r\n }\r\n\r\n setOpeningHoursText2(generateOpeningHoursText(todaySlots));\r\n }, [\r\n atLabel,\r\n checkIsOpeningSoon,\r\n closeLabel,\r\n closesAtLabel,\r\n generateOpeningHoursText,\r\n getNextOpenDay,\r\n is24HoursDay,\r\n open24Label,\r\n openLabel,\r\n openingHours,\r\n opensAtLabel,\r\n opensOnLabel,\r\n opensSoonLabel,\r\n opensTomorrowLabel,\r\n weekDays,\r\n weekKeys,\r\n ]);\r\n\r\n return (\r\n <Col\r\n fs={\"6\"}\r\n fw={\"semibold\"}\r\n className=\"ui-card-opening rounded shadow text-slate-28\"\r\n >\r\n <Col as={\"header\"} className=\"ui-card-header\">\r\n <TitleTag className=\"text-slate-20 fw-semibold fs-4\">{title}</TitleTag>\r\n <Row\r\n justifyContent={\"space-between\"}\r\n alignItems={\"center\"}\r\n style={{ backgroundColor: \"#F7F2FC\" }}\r\n py={\"x16\"}\r\n px={\"x24\"}\r\n fw={\"bold\"}\r\n fs={\"6\"}\r\n className=\"rounded\"\r\n >\r\n <p className=\"text-slate-28\">\r\n {todayLabel}, {dayLabel}\r\n </p>\r\n <p>\r\n <span\r\n className={\r\n isOpen\r\n ? \"text-success\"\r\n : isOpeningSoon\r\n ? \"text-warning\"\r\n : \"text-error\"\r\n }\r\n >\r\n {openingHoursText}\r\n </span>\r\n <span className=\"fw-regular text-grey-black\">{additionalInfo}</span>\r\n </p>\r\n </Row>\r\n </Col>\r\n <Col as={\"main\"} pt={\"x32\"} gap={\"x24\"}>\r\n <Row justifyContent={\"space-around\"} className=\"ui-weekdays-container\">\r\n {weekDays.map((day, index) => (\r\n <Row\r\n justifyContent={\"center\"}\r\n alignItems={\"center\"}\r\n key={index}\r\n className={clsx(\r\n activeDay === index ? \"active-day text-primary\" : \"\",\r\n \"flex-1\",\r\n )}\r\n >\r\n {day.charAt(0).toUpperCase()}\r\n </Row>\r\n ))}\r\n </Row>\r\n <Row\r\n justifyContent={\"space-between\"}\r\n alignItems={\"center\"}\r\n fw={\"regular\"}\r\n >\r\n <p>{dayLabel}</p>\r\n <p>{openingHoursText2}</p>\r\n </Row>\r\n </Col>\r\n </Col>\r\n );\r\n};\r\n"],"names":["CardOpeningHours","title","TitleTag","openingHours","weekDaysMap","openLabel","todayLabel","closeLabel","open24Label","opensSoonLabel","opensAtLabel","opensTomorrowLabel","opensOnLabel","atLabel","closesAtLabel","activeDay","setActiveDay","useState","dayLabel","setDayLabel","openingHoursText","setOpeningHoursText","openingHoursText2","setOpeningHoursText2","isOpen","setIsOpen","isOpeningSoon","setIsOpeningSoon","additionalInfo","setAdditionalInfo","weekDays","weekKeys","formatCurrentTime","DateTime","parseTimeToMinutes","timeStr","hours","minutes","isSlot24Hours","useCallback","slot","is24HoursDay","slots","isCurrentlyOpen","currentTime","from","to","getNextOpeningTime","checkIsOpeningSoon","openingTime","openMinutes","currentMinutes","diffMinutes","getNextOpenDay","currentDayIndex","i","nextIndex","nextDayKey","nextDaySlots","generateOpeningHoursText","useMemo","useEffect","todayIndex","todayKey","todaySlots","open","closingTime","nextOpeningTime","nextDay","jsxs","Col","jsx","Row","day","index","clsx"],"mappings":";;;;;;;;AA4BO,MAAMA,KAAmB,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;AAAA,UAAA;AAAA,QACF,GACF;AAAA,+BACC0C,GAAI,EAAA,IAAI,QAAQ,IAAI,OAAO,KAAK,OAC/B,UAAA;AAAA,UAACC,gBAAAA,EAAAA,IAAAC,GAAA,EAAI,gBAAgB,gBAAgB,WAAU,yBAC5C,UAAS1C,EAAA,IAAI,CAAC2C,GAAKC,MAClBH,gBAAAA,EAAA;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,gBAAgB;AAAA,cAChB,YAAY;AAAA,cAEZ,WAAWG;AAAA,gBACT5D,MAAc2D,IAAQ,4BAA4B;AAAA,gBAClD;AAAA,cACF;AAAA,cAEC,UAAID,EAAA,OAAO,CAAC,EAAE,YAAY;AAAA,YAAA;AAAA,YANtBC;AAAA,UAQR,CAAA,GACH;AAAA,UACAL,gBAAAA,EAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,gBAAgB;AAAA,cAChB,YAAY;AAAA,cACZ,IAAI;AAAA,cAEJ,UAAA;AAAA,gBAAAD,gBAAAA,EAAAA,IAAC,OAAG,UAASrD,EAAA,CAAA;AAAA,gBACbqD,gBAAAA,EAAAA,IAAC,OAAG,UAAkBjD,EAAA,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACxB,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
1
|
+
{"version":3,"file":"index.es36.js","sources":["../src/components/ui/CardOpeningHours/index.tsx"],"sourcesContent":["import \"./CardOpeningHours.scss\";\r\nimport clsx from \"clsx\";\r\nimport { OpeningHours } from \"@anoki/fse-common\";\r\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\r\nimport { DateTime } from \"luxon\";\r\nimport { Col, Row } from \"@/components\";\r\nimport { HeadingLevel } from \"@/types/headings\";\r\n\r\ntype WeekDaysMap = Record<keyof OpeningHours, string>;\r\ntype TimeSlot = { from: string; to: string };\r\n\r\ntype CardOpeningHoursProps = {\r\n title: string;\r\n titleTag: HeadingLevel;\r\n openingHours: OpeningHours;\r\n weekDaysMap: WeekDaysMap;\r\n openLabel?: string;\r\n todayLabel?: string;\r\n closeLabel?: string;\r\n open24Label?: string;\r\n opensSoonLabel?: string;\r\n opensAtLabel?: string;\r\n opensTomorrowLabel?: string;\r\n opensOnLabel?: string;\r\n atLabel?: string;\r\n closesAtLabel?: string;\r\n};\r\n\r\nexport const CardOpeningHours = ({\r\n title = \"Orari di apertura\",\r\n titleTag: TitleTag = \"h1\",\r\n openingHours,\r\n weekDaysMap,\r\n openLabel = \"Aperto\",\r\n todayLabel = \"Oggi\",\r\n closeLabel = \"Chiuso\",\r\n open24Label = \"24 ore su 24\",\r\n opensSoonLabel = \"Apre tra poco\",\r\n opensAtLabel = \"Apre alle\",\r\n opensTomorrowLabel = \"Apre domani\",\r\n opensOnLabel = \"Apre\",\r\n atLabel = \"alle\",\r\n closesAtLabel = \"Chiude alle\",\r\n}: CardOpeningHoursProps) => {\r\n const [activeDay, setActiveDay] = useState<number | null>(null);\r\n const [dayLabel, setDayLabel] = useState(\"\");\r\n const [openingHoursText, setOpeningHoursText] = useState(\"\");\r\n const [openingHoursText2, setOpeningHoursText2] = useState(\"\");\r\n const [isOpen, setIsOpen] = useState(false);\r\n const [isOpeningSoon, setIsOpeningSoon] = useState(false);\r\n const [additionalInfo, setAdditionalInfo] = useState(\"\");\r\n\r\n const weekDays = Object.values(weekDaysMap);\r\n const weekKeys = Object.keys(weekDaysMap) as (keyof OpeningHours)[];\r\n\r\n const formatCurrentTime = () => {\r\n return DateTime.now().toFormat(\"HH:mm\");\r\n };\r\n\r\n const parseTimeToMinutes = (timeStr: string): number => {\r\n const [hours, minutes] = timeStr.split(\":\").map(Number);\r\n return hours * 60 + minutes;\r\n };\r\n\r\n const isSlot24Hours = useCallback(\r\n (slot: TimeSlot) => slot.from === \"00:00\" && slot.to === \"00:00\",\r\n [],\r\n );\r\n\r\n const is24HoursDay = useCallback(\r\n (slots: TimeSlot[]) => slots.some(isSlot24Hours),\r\n [isSlot24Hours],\r\n );\r\n\r\n const isCurrentlyOpen = (slots: TimeSlot[], currentTime: string) => {\r\n for (const { from, to } of slots) {\r\n if (currentTime >= from && currentTime <= to) {\r\n return { open: true, closingTime: to };\r\n }\r\n }\r\n return { open: false, closingTime: \"\" };\r\n };\r\n\r\n const getNextOpeningTime = (slots: TimeSlot[], currentTime: string) => {\r\n for (const { from } of slots) {\r\n if (from > currentTime) {\r\n return from;\r\n }\r\n }\r\n return \"\";\r\n };\r\n\r\n const checkIsOpeningSoon = useCallback(\r\n (openingTime: string, currentTime: string) => {\r\n if (!openingTime) return false;\r\n\r\n const openMinutes = parseTimeToMinutes(openingTime);\r\n const currentMinutes = parseTimeToMinutes(currentTime);\r\n const diffMinutes = openMinutes - currentMinutes;\r\n\r\n return diffMinutes > 0 && diffMinutes <= 60;\r\n },\r\n [],\r\n );\r\n\r\n const getNextOpenDay = useCallback(\r\n (currentDayIndex: number) => {\r\n for (let i = 1; i <= 7; i++) {\r\n const nextIndex = (currentDayIndex + i) % 7;\r\n const nextDayKey = weekKeys[nextIndex];\r\n const nextDaySlots = openingHours[nextDayKey];\r\n\r\n if (nextDaySlots && nextDaySlots.length > 0) {\r\n return {\r\n dayName: weekDays[nextIndex].toLowerCase(),\r\n isTomorrow: i === 1,\r\n };\r\n }\r\n }\r\n return null;\r\n },\r\n [weekKeys, openingHours, weekDays],\r\n );\r\n\r\n const generateOpeningHoursText = useMemo(() => {\r\n return (hours: TimeSlot[]) => {\r\n if (hours.length === 0) {\r\n return closeLabel;\r\n }\r\n\r\n if (is24HoursDay(hours)) {\r\n return `${openLabel} ${open24Label}`;\r\n }\r\n\r\n return hours.map(({ from, to }) => `${from} - ${to}`).join(\" | \");\r\n };\r\n }, [closeLabel, is24HoursDay, open24Label, openLabel]);\r\n\r\n useEffect(() => {\r\n const now = DateTime.now();\r\n const todayIndex = now.weekday - 1;\r\n setActiveDay(todayIndex);\r\n setDayLabel(weekDays[todayIndex] || \"\");\r\n\r\n const todayKey = weekKeys[todayIndex];\r\n const todaySlots = openingHours[todayKey];\r\n\r\n if (!todaySlots) {\r\n return;\r\n }\r\n\r\n const currentTime = formatCurrentTime();\r\n\r\n if (is24HoursDay(todaySlots)) {\r\n setOpeningHoursText(openLabel);\r\n setAdditionalInfo(` | ${open24Label}`);\r\n setIsOpen(true);\r\n setIsOpeningSoon(false);\r\n setOpeningHoursText2(`${openLabel} ${open24Label}`);\r\n return;\r\n }\r\n\r\n const { open, closingTime } = isCurrentlyOpen(todaySlots, currentTime);\r\n\r\n if (open) {\r\n setOpeningHoursText(openLabel);\r\n setAdditionalInfo(\r\n closingTime ? ` | ${closesAtLabel} ${closingTime}` : \"\",\r\n );\r\n setIsOpen(true);\r\n setIsOpeningSoon(false);\r\n } else {\r\n const nextOpeningTime = getNextOpeningTime(todaySlots, currentTime);\r\n setIsOpen(false);\r\n\r\n if (nextOpeningTime) {\r\n if (checkIsOpeningSoon(nextOpeningTime, currentTime)) {\r\n setOpeningHoursText(opensSoonLabel);\r\n setAdditionalInfo(` | ${atLabel} ${nextOpeningTime}`);\r\n setIsOpeningSoon(true);\r\n } else {\r\n setOpeningHoursText(closeLabel);\r\n setAdditionalInfo(` | ${opensAtLabel} ${nextOpeningTime}`);\r\n setIsOpeningSoon(false);\r\n }\r\n } else {\r\n setOpeningHoursText(closeLabel);\r\n setIsOpeningSoon(false);\r\n const nextDay = getNextOpenDay(todayIndex);\r\n\r\n if (nextDay) {\r\n setAdditionalInfo(\r\n nextDay.isTomorrow\r\n ? ` | ${opensTomorrowLabel}`\r\n : ` | ${opensOnLabel} ${nextDay.dayName}`,\r\n );\r\n } else {\r\n setAdditionalInfo(\"\");\r\n }\r\n }\r\n }\r\n\r\n setOpeningHoursText2(generateOpeningHoursText(todaySlots));\r\n }, [\r\n atLabel,\r\n checkIsOpeningSoon,\r\n closeLabel,\r\n closesAtLabel,\r\n generateOpeningHoursText,\r\n getNextOpenDay,\r\n is24HoursDay,\r\n open24Label,\r\n openLabel,\r\n openingHours,\r\n opensAtLabel,\r\n opensOnLabel,\r\n opensSoonLabel,\r\n opensTomorrowLabel,\r\n weekDays,\r\n weekKeys,\r\n ]);\r\n\r\n return (\r\n <Col\r\n fs={\"6\"}\r\n fw={\"semibold\"}\r\n className=\"ui-card-opening rounded shadow text-slate-28\"\r\n >\r\n <Col as={\"header\"} className=\"ui-card-header\">\r\n <TitleTag className=\"text-slate-20 fw-semibold fs-4\">{title}</TitleTag>\r\n <Row\r\n justifyContent={\"space-between\"}\r\n alignItems={\"center\"}\r\n style={{ backgroundColor: \"#F7F2FC\" }}\r\n py={\"x16\"}\r\n px={\"x24\"}\r\n fw={\"bold\"}\r\n fs={\"6\"}\r\n className=\"rounded\"\r\n >\r\n <p className=\"text-slate-28\">\r\n {todayLabel}, {dayLabel}\r\n </p>\r\n <p>\r\n <span\r\n className={\r\n isOpen\r\n ? \"text-success\"\r\n : isOpeningSoon\r\n ? \"text-warning\"\r\n : \"text-error\"\r\n }\r\n >\r\n {openingHoursText}\r\n </span>\r\n <span className=\"fw-regular text-grey-black\">{additionalInfo}</span>\r\n </p>\r\n </Row>\r\n </Col>\r\n <Col as={\"main\"} pt={\"x32\"} gap={\"x24\"}>\r\n <Row justifyContent={\"space-around\"} className=\"ui-weekdays-container\">\r\n {weekDays.map((day, index) => (\r\n <Row\r\n justifyContent={\"center\"}\r\n alignItems={\"center\"}\r\n key={index}\r\n className={clsx(\r\n activeDay === index ? \"active-day text-primary\" : \"\",\r\n \"flex-1\",\r\n )}\r\n >\r\n {day.charAt(0).toUpperCase()}\r\n </Row>\r\n ))}\r\n </Row>\r\n <Row\r\n justifyContent={\"space-between\"}\r\n alignItems={\"center\"}\r\n fw={\"regular\"}\r\n >\r\n <p>{dayLabel}</p>\r\n <p>{openingHoursText2}</p>\r\n </Row>\r\n </Col>\r\n </Col>\r\n );\r\n};\r\n"],"names":["CardOpeningHours","title","TitleTag","openingHours","weekDaysMap","openLabel","todayLabel","closeLabel","open24Label","opensSoonLabel","opensAtLabel","opensTomorrowLabel","opensOnLabel","atLabel","closesAtLabel","activeDay","setActiveDay","useState","dayLabel","setDayLabel","openingHoursText","setOpeningHoursText","openingHoursText2","setOpeningHoursText2","isOpen","setIsOpen","isOpeningSoon","setIsOpeningSoon","additionalInfo","setAdditionalInfo","weekDays","weekKeys","formatCurrentTime","DateTime","parseTimeToMinutes","timeStr","hours","minutes","isSlot24Hours","useCallback","slot","is24HoursDay","slots","isCurrentlyOpen","currentTime","from","to","getNextOpeningTime","checkIsOpeningSoon","openingTime","openMinutes","currentMinutes","diffMinutes","getNextOpenDay","currentDayIndex","i","nextIndex","nextDayKey","nextDaySlots","generateOpeningHoursText","useMemo","useEffect","todayIndex","todayKey","todaySlots","open","closingTime","nextOpeningTime","nextDay","jsxs","Col","jsx","Row","day","index","clsx"],"mappings":";;;;;;;;AA4BO,MAAMA,KAAmB,CAAC;AAAA,EAC/B,OAAAC,IAAQ;AAAA,EACR,UAAUC,IAAW;AAAA,EACrB,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,aAAAC,IAAc;AAAA,EACd,gBAAAC,IAAiB;AAAA,EACjB,cAAAC,IAAe;AAAA,EACf,oBAAAC,IAAqB;AAAA,EACrB,cAAAC,IAAe;AAAA,EACf,SAAAC,IAAU;AAAA,EACV,eAAAC,IAAgB;AAClB,MAA6B;AAC3B,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAwB,IAAI,GACxD,CAACC,GAAUC,CAAW,IAAIF,EAAS,EAAE,GACrC,CAACG,GAAkBC,CAAmB,IAAIJ,EAAS,EAAE,GACrD,CAACK,GAAmBC,CAAoB,IAAIN,EAAS,EAAE,GACvD,CAACO,GAAQC,CAAS,IAAIR,EAAS,EAAK,GACpC,CAACS,GAAeC,CAAgB,IAAIV,EAAS,EAAK,GAClD,CAACW,GAAgBC,CAAiB,IAAIZ,EAAS,EAAE,GAEjDa,IAAW,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,UAAkBjD,EAAA,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACxB,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.es475.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.es37.js
CHANGED
package/dist/index.es37.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es37.js","sources":["../src/components/ui/SupportBanner/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\r\nimport \"./SupportBanner.scss\";\r\nimport { Col } from \"@/components\";\r\nimport { useMemo } from \"react\";\r\nimport { CTA_COMPONENTS, SupportBannerLink } from \"./ctaComponents\";\r\
|
1
|
+
{"version":3,"file":"index.es37.js","sources":["../src/components/ui/SupportBanner/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\r\nimport \"./SupportBanner.scss\";\r\nimport { Col } from \"@/components\";\r\nimport { useMemo } from \"react\";\r\nimport { CTA_COMPONENTS, SupportBannerLink } from \"./ctaComponents\";\r\nimport { HeadingLevel } from \"@/types/headings\";\r\n\r\ntype SupportBannerProps = {\r\n bannerType?: \"filled\" | \"outline\";\r\n title: string;\r\n description?: string;\r\n titleTag?: HeadingLevel;\r\n mainLayout?: \"layout1\" | \"layout2\";\r\n className?: string;\r\n classNameTitle?: string;\r\n classNameDescription?: string;\r\n links?: SupportBannerLink[]; // unified CTA management\r\n};\r\n\r\nexport const SupportBanner = ({\r\n bannerType = \"outline\",\r\n title,\r\n description = \"\",\r\n titleTag: TitleTag = \"h1\",\r\n mainLayout = \"layout1\",\r\n className = \"\",\r\n classNameTitle = \"\",\r\n classNameDescription = \"\",\r\n links = [],\r\n}: SupportBannerProps) => {\r\n const renderCTA = useMemo(() => {\r\n if (!links || links.length === 0) return null;\r\n return links.map((link, index) => {\r\n const variant =\r\n link.variant ?? (link.href ? \"outlineButtonHref\" : \"button\");\r\n const Renderer = CTA_COMPONENTS[variant];\r\n return (\r\n <div key={index} className=\"ui-banner-link\">\r\n {Renderer(link)}\r\n </div>\r\n );\r\n });\r\n }, [links]);\r\n\r\n return (\r\n <Col\r\n br={\"x4\"}\r\n gap={\"x16\"}\r\n className={clsx(\r\n className,\r\n bannerType === \"outline\" ? \"ui-outline\" : \"bg-lightblue-a03\",\r\n \"ui-banner shadow \",\r\n )}\r\n >\r\n <TitleTag\r\n className={clsx(\r\n \"ui-banner-title text-slate-20\",\r\n classNameTitle || \"fs-4 fw-bold\",\r\n )}\r\n >\r\n {title}\r\n </TitleTag>\r\n <main\r\n className={clsx(\r\n mainLayout === \"layout1\"\r\n ? \"ui-banner-content-layout1 fs-6 text-secondary justify-content-between \"\r\n : \"ui-banner-content-layout2\",\r\n \"ui-banner-content fs-6 text-secondary w-100\",\r\n )}\r\n >\r\n <div\r\n className={clsx(\r\n classNameDescription,\r\n mainLayout === \"layout1\" ? \"ui-banner-description\" : \"\",\r\n )}\r\n >\r\n {description}\r\n </div>\r\n\r\n <div className={clsx(\"ui-banner-cta\")}>{renderCTA}</div>\r\n </main>\r\n </Col>\r\n );\r\n};\r\n"],"names":["SupportBanner","bannerType","title","description","TitleTag","mainLayout","className","classNameTitle","classNameDescription","links","renderCTA","useMemo","link","index","variant","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kBACvD;AAAA,kBAEC,UAAAF;AAAA,gBAAA;AAAA,cACH;AAAA,oCAEC,OAAI,EAAA,WAAWgB,EAAK,eAAe,GAAI,UAAUT,EAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACpD;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
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/ConsentModal/ConsentModalFooter/ConsentModalFooter.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.es420.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { j as a } from "./index.es243.js";
|
2
2
|
import './components/ui/Feedback/Rating.css';/* empty css */
|
3
|
-
import { l as o } from "./index.
|
3
|
+
import { l as o } from "./index.es431.js";
|
4
4
|
import { clsx as r } from "./index.es244.js";
|
5
5
|
const i = 5, c = o.range(1, i + 1);
|
6
6
|
function m({ onClick: l, rating: t = 0 }) {
|
package/dist/index.es422.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es431.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./index.es499.js";
|
2
|
-
import { __require as o } from "./index.
|
2
|
+
import { __require as o } from "./index.es508.js";
|
3
3
|
var e = o();
|
4
4
|
const a = /* @__PURE__ */ r(e);
|
5
5
|
export {
|
6
6
|
a as default
|
7
7
|
};
|
8
|
-
//# sourceMappingURL=index.
|
8
|
+
//# sourceMappingURL=index.es438.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es438.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { useState as r, useEffect as c } from "react";
|
2
|
+
function i(e, t = 300) {
|
3
|
+
const [u, o] = r(e);
|
4
|
+
return c(() => {
|
5
|
+
const n = setTimeout(() => o(e), t);
|
6
|
+
return () => clearTimeout(n);
|
7
|
+
}, [e, t]), u;
|
8
|
+
}
|
9
|
+
export {
|
10
|
+
i as useDebouncedValue
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=index.es442.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es442.js","sources":["../src/utils/useDebouncedValue.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\r\n\r\nexport function useDebouncedValue<T>(value: T, delay: number = 300): T {\r\n const [debouncedValue, setDebouncedValue] = useState(value);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => setDebouncedValue(value), delay);\r\n return () => clearTimeout(timer);\r\n }, [value, delay]);\r\n\r\n return debouncedValue;\r\n}\r\n"],"names":["useDebouncedValue","value","delay","debouncedValue","setDebouncedValue","useState","useEffect","timer"],"mappings":";AAEgB,SAAAA,EAAqBC,GAAUC,IAAgB,KAAQ;AACrE,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAASJ,CAAK;AAE1D,SAAAK,EAAU,MAAM;AACd,UAAMC,IAAQ,WAAW,MAAMH,EAAkBH,CAAK,GAAGC,CAAK;AACvD,WAAA,MAAM,aAAaK,CAAK;AAAA,EAAA,GAC9B,CAACN,GAAOC,CAAK,CAAC,GAEVC;AACT;"}
|
package/dist/index.es443.js
CHANGED
@@ -1,12 +1,192 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
import { g as F } from "./index.es525.js";
|
2
|
+
import { c as y } from "./index.es528.js";
|
3
|
+
import { c as K, m as n, h as j } from "./index.es526.js";
|
4
|
+
function Y(P) {
|
5
|
+
let {
|
6
|
+
swiper: i,
|
7
|
+
extendParams: N,
|
8
|
+
on: o
|
9
|
+
} = P;
|
10
|
+
N({
|
11
|
+
a11y: {
|
12
|
+
enabled: !0,
|
13
|
+
notificationClass: "swiper-notification",
|
14
|
+
prevSlideMessage: "Previous slide",
|
15
|
+
nextSlideMessage: "Next slide",
|
16
|
+
firstSlideMessage: "This is the first slide",
|
17
|
+
lastSlideMessage: "This is the last slide",
|
18
|
+
paginationBulletMessage: "Go to slide {{index}}",
|
19
|
+
slideLabelMessage: "{{index}} / {{slidesLength}}",
|
20
|
+
containerMessage: null,
|
21
|
+
containerRoleDescriptionMessage: null,
|
22
|
+
containerRole: null,
|
23
|
+
itemRoleDescriptionMessage: null,
|
24
|
+
slideRole: "group",
|
25
|
+
id: null,
|
26
|
+
scrollOnFocus: !0
|
27
|
+
}
|
28
|
+
}), i.a11y = {
|
29
|
+
clicked: !1
|
30
|
+
};
|
31
|
+
let r = null, p, f, L = (/* @__PURE__ */ new Date()).getTime();
|
32
|
+
function u(e) {
|
33
|
+
const t = r;
|
34
|
+
t.length !== 0 && (t.innerHTML = "", t.innerHTML = e);
|
35
|
+
}
|
36
|
+
function B(e) {
|
37
|
+
const t = () => Math.round(16 * Math.random()).toString(16);
|
38
|
+
return "x".repeat(e).replace(/x/g, t);
|
39
|
+
}
|
40
|
+
function g(e) {
|
41
|
+
e = n(e), e.forEach((t) => {
|
42
|
+
t.setAttribute("tabIndex", "0");
|
43
|
+
});
|
44
|
+
}
|
45
|
+
function x(e) {
|
46
|
+
e = n(e), e.forEach((t) => {
|
47
|
+
t.setAttribute("tabIndex", "-1");
|
48
|
+
});
|
49
|
+
}
|
50
|
+
function m(e, t) {
|
51
|
+
e = n(e), e.forEach((a) => {
|
52
|
+
a.setAttribute("role", t);
|
53
|
+
});
|
54
|
+
}
|
55
|
+
function M(e, t) {
|
56
|
+
e = n(e), e.forEach((a) => {
|
57
|
+
a.setAttribute("aria-roledescription", t);
|
58
|
+
});
|
59
|
+
}
|
60
|
+
function O(e, t) {
|
61
|
+
e = n(e), e.forEach((a) => {
|
62
|
+
a.setAttribute("aria-controls", t);
|
63
|
+
});
|
64
|
+
}
|
65
|
+
function E(e, t) {
|
66
|
+
e = n(e), e.forEach((a) => {
|
67
|
+
a.setAttribute("aria-label", t);
|
68
|
+
});
|
69
|
+
}
|
70
|
+
function H(e, t) {
|
71
|
+
e = n(e), e.forEach((a) => {
|
72
|
+
a.setAttribute("id", t);
|
73
|
+
});
|
74
|
+
}
|
75
|
+
function q(e, t) {
|
76
|
+
e = n(e), e.forEach((a) => {
|
77
|
+
a.setAttribute("aria-live", t);
|
78
|
+
});
|
79
|
+
}
|
80
|
+
function A(e) {
|
81
|
+
e = n(e), e.forEach((t) => {
|
82
|
+
t.setAttribute("aria-disabled", !0);
|
83
|
+
});
|
84
|
+
}
|
85
|
+
function w(e) {
|
86
|
+
e = n(e), e.forEach((t) => {
|
87
|
+
t.setAttribute("aria-disabled", !1);
|
88
|
+
});
|
89
|
+
}
|
90
|
+
function d(e) {
|
91
|
+
if (e.keyCode !== 13 && e.keyCode !== 32) return;
|
92
|
+
const t = i.params.a11y, a = e.target;
|
93
|
+
if (!(i.pagination && i.pagination.el && (a === i.pagination.el || i.pagination.el.contains(e.target)) && !e.target.matches(y(i.params.pagination.bulletClass)))) {
|
94
|
+
if (i.navigation && i.navigation.prevEl && i.navigation.nextEl) {
|
95
|
+
const s = n(i.navigation.prevEl);
|
96
|
+
n(i.navigation.nextEl).includes(a) && (i.isEnd && !i.params.loop || i.slideNext(), i.isEnd ? u(t.lastSlideMessage) : u(t.nextSlideMessage)), s.includes(a) && (i.isBeginning && !i.params.loop || i.slidePrev(), i.isBeginning ? u(t.firstSlideMessage) : u(t.prevSlideMessage));
|
97
|
+
}
|
98
|
+
i.pagination && a.matches(y(i.params.pagination.bulletClass)) && a.click();
|
99
|
+
}
|
100
|
+
}
|
101
|
+
function G() {
|
102
|
+
if (i.params.loop || i.params.rewind || !i.navigation) return;
|
103
|
+
const {
|
104
|
+
nextEl: e,
|
105
|
+
prevEl: t
|
106
|
+
} = i.navigation;
|
107
|
+
t && (i.isBeginning ? (A(t), x(t)) : (w(t), g(t))), e && (i.isEnd ? (A(e), x(e)) : (w(e), g(e)));
|
108
|
+
}
|
109
|
+
function k() {
|
110
|
+
return i.pagination && i.pagination.bullets && i.pagination.bullets.length;
|
111
|
+
}
|
112
|
+
function C() {
|
113
|
+
return k() && i.params.pagination.clickable;
|
114
|
+
}
|
115
|
+
function U() {
|
116
|
+
const e = i.params.a11y;
|
117
|
+
k() && i.pagination.bullets.forEach((t) => {
|
118
|
+
i.params.pagination.clickable && (g(t), i.params.pagination.renderBullet || (m(t, "button"), E(t, e.paginationBulletMessage.replace(/\{\{index\}\}/, j(t) + 1)))), t.matches(y(i.params.pagination.bulletActiveClass)) ? t.setAttribute("aria-current", "true") : t.removeAttribute("aria-current");
|
119
|
+
});
|
120
|
+
}
|
121
|
+
const S = (e, t, a) => {
|
122
|
+
g(e), e.tagName !== "BUTTON" && (m(e, "button"), e.addEventListener("keydown", d)), E(e, a), O(e, t);
|
123
|
+
}, R = (e) => {
|
124
|
+
f && f !== e.target && !f.contains(e.target) && (p = !0), i.a11y.clicked = !0;
|
125
|
+
}, T = () => {
|
126
|
+
p = !1, requestAnimationFrame(() => {
|
127
|
+
requestAnimationFrame(() => {
|
128
|
+
i.destroyed || (i.a11y.clicked = !1);
|
129
|
+
});
|
130
|
+
});
|
131
|
+
}, D = (e) => {
|
132
|
+
L = (/* @__PURE__ */ new Date()).getTime();
|
133
|
+
}, h = (e) => {
|
134
|
+
if (i.a11y.clicked || !i.params.a11y.scrollOnFocus || (/* @__PURE__ */ new Date()).getTime() - L < 100) return;
|
135
|
+
const t = e.target.closest(`.${i.params.slideClass}, swiper-slide`);
|
136
|
+
if (!t || !i.slides.includes(t)) return;
|
137
|
+
f = t;
|
138
|
+
const a = i.slides.indexOf(t) === i.activeIndex, s = i.params.watchSlidesProgress && i.visibleSlides && i.visibleSlides.includes(t);
|
139
|
+
a || s || e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents || (i.isHorizontal() ? i.el.scrollLeft = 0 : i.el.scrollTop = 0, requestAnimationFrame(() => {
|
140
|
+
p || (i.params.loop ? i.slideToLoop(parseInt(t.getAttribute("data-swiper-slide-index")), 0) : i.slideTo(i.slides.indexOf(t), 0), p = !1);
|
141
|
+
}));
|
142
|
+
}, I = () => {
|
143
|
+
const e = i.params.a11y;
|
144
|
+
e.itemRoleDescriptionMessage && M(i.slides, e.itemRoleDescriptionMessage), e.slideRole && m(i.slides, e.slideRole);
|
145
|
+
const t = i.slides.length;
|
146
|
+
e.slideLabelMessage && i.slides.forEach((a, s) => {
|
147
|
+
const l = i.params.loop ? parseInt(a.getAttribute("data-swiper-slide-index"), 10) : s, c = e.slideLabelMessage.replace(/\{\{index\}\}/, l + 1).replace(/\{\{slidesLength\}\}/, t);
|
148
|
+
E(a, c);
|
149
|
+
});
|
150
|
+
}, V = () => {
|
151
|
+
const e = i.params.a11y;
|
152
|
+
i.el.append(r);
|
153
|
+
const t = i.el;
|
154
|
+
e.containerRoleDescriptionMessage && M(t, e.containerRoleDescriptionMessage), e.containerMessage && E(t, e.containerMessage), e.containerRole && m(t, e.containerRole);
|
155
|
+
const a = i.wrapperEl, s = e.id || a.getAttribute("id") || `swiper-wrapper-${B(16)}`, l = i.params.autoplay && i.params.autoplay.enabled ? "off" : "polite";
|
156
|
+
H(a, s), q(a, l), I();
|
157
|
+
let {
|
158
|
+
nextEl: c,
|
159
|
+
prevEl: v
|
160
|
+
} = i.navigation ? i.navigation : {};
|
161
|
+
c = n(c), v = n(v), c && c.forEach((b) => S(b, s, e.nextSlideMessage)), v && v.forEach((b) => S(b, s, e.prevSlideMessage)), C() && n(i.pagination.el).forEach((z) => {
|
162
|
+
z.addEventListener("keydown", d);
|
163
|
+
}), F().addEventListener("visibilitychange", D), i.el.addEventListener("focus", h, !0), i.el.addEventListener("focus", h, !0), i.el.addEventListener("pointerdown", R, !0), i.el.addEventListener("pointerup", T, !0);
|
164
|
+
};
|
165
|
+
function $() {
|
166
|
+
r && r.remove();
|
167
|
+
let {
|
168
|
+
nextEl: e,
|
169
|
+
prevEl: t
|
170
|
+
} = i.navigation ? i.navigation : {};
|
171
|
+
e = n(e), t = n(t), e && e.forEach((s) => s.removeEventListener("keydown", d)), t && t.forEach((s) => s.removeEventListener("keydown", d)), C() && n(i.pagination.el).forEach((l) => {
|
172
|
+
l.removeEventListener("keydown", d);
|
173
|
+
}), F().removeEventListener("visibilitychange", D), i.el && typeof i.el != "string" && (i.el.removeEventListener("focus", h, !0), i.el.removeEventListener("pointerdown", R, !0), i.el.removeEventListener("pointerup", T, !0));
|
174
|
+
}
|
175
|
+
o("beforeInit", () => {
|
176
|
+
r = K("span", i.params.a11y.notificationClass), r.setAttribute("aria-live", "assertive"), r.setAttribute("aria-atomic", "true");
|
177
|
+
}), o("afterInit", () => {
|
178
|
+
i.params.a11y.enabled && V();
|
179
|
+
}), o("slidesLengthChange snapGridLengthChange slidesGridLengthChange", () => {
|
180
|
+
i.params.a11y.enabled && I();
|
181
|
+
}), o("fromEdge toEdge afterInit lock unlock", () => {
|
182
|
+
i.params.a11y.enabled && G();
|
183
|
+
}), o("paginationUpdate", () => {
|
184
|
+
i.params.a11y.enabled && U();
|
185
|
+
}), o("destroy", () => {
|
186
|
+
i.params.a11y.enabled && $();
|
187
|
+
});
|
8
188
|
}
|
9
189
|
export {
|
10
|
-
|
190
|
+
Y as default
|
11
191
|
};
|
12
192
|
//# sourceMappingURL=index.es443.js.map
|