@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.cjs229.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";const c=require("./index.cjs230.js"),h=require("./index.
|
1
|
+
"use strict";const c=require("./index.cjs230.js"),h=require("./index.cjs450.js"),d=require("./index.cjs4.js"),l=require("./index.cjs224.js"),I=require("./index.cjs238.js");let T={};function W(n,e={}){const t=JSON.stringify([n,e]);let s=T[t];return s||(s=new Intl.ListFormat(n,e),T[t]=s),s}const g=new Map;function p(n,e={}){const t=JSON.stringify([n,e]);let s=g.get(t);return s===void 0&&(s=new Intl.DateTimeFormat(n,e),g.set(t,s)),s}const C=new Map;function v(n,e={}){const t=JSON.stringify([n,e]);let s=C.get(t);return s===void 0&&(s=new Intl.NumberFormat(n,e),C.set(t,s)),s}const k=new Map;function D(n,e={}){const{base:t,...s}=e,i=JSON.stringify([n,s]);let r=k.get(i);return r===void 0&&(r=new Intl.RelativeTimeFormat(n,e),k.set(i,r)),r}let m=null;function x(){return m||(m=new Intl.DateTimeFormat().resolvedOptions().locale,m)}const w=new Map;function N(n){let e=w.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),w.set(n,e)),e}const b=new Map;function Z(n){let e=b.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...S,...e}),b.set(n,e)}return e}function L(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let s,i;try{s=p(n).resolvedOptions(),i=n}catch{const u=n.substring(0,t);s=p(u).resolvedOptions(),i=u}const{numberingSystem:r,calendar:a}=s;return[i,r,a]}}function M(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function R(n){const e=[];for(let t=1;t<=12;t++){const s=l.default.utc(2009,t,1);e.push(n(s))}return e}function E(n){const e=[];for(let t=1;t<=7;t++){const s=l.default.utc(2016,11,13+t);e.push(n(s))}return e}function y(n,e,t,s){const i=n.listingMode();return i==="error"?null:i==="en"?t(e):s(e)}function P(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||N(n.locale).numberingSystem==="latn"}class z{constructor(e,t,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:i,floor:r,...a}=s;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...s};s.padTo>0&&(o.minimumIntegerDigits=s.padTo),this.inf=v(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):c.roundTo(e,3);return c.padStart(t,this.padTo)}}}class ${constructor(e,t,s){this.opts=s,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&I.create(o).valid?(i=o,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r={...this.opts};r.timeZone=r.timeZone||i,this.dtf=p(t,r)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:s}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class q{constructor(e,t,s){this.opts={style:"long",...s},!t&&c.hasRelative()&&(this.rtf=D(e,s))}format(e,t){return this.rtf?this.rtf.format(e,t):h.formatRelativeTime(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const S={firstDay:1,minimalDays:4,weekend:[6,7]};class f{static fromOpts(e){return f.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,s,i,r=!1){const a=e||d.defaultLocale,o=a||(r?"en-US":x()),u=t||d.defaultNumberingSystem,O=s||d.defaultOutputCalendar,F=c.validateWeekSettings(i)||d.defaultWeekSettings;return new f(o,u,O,F,a)}static resetCache(){m=null,g.clear(),C.clear(),k.clear(),w.clear(),b.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:s,weekSettings:i}={}){return f.create(e,t,s,i)}constructor(e,t,s,i,r){const[a,o,u]=L(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=s||u||null,this.weekSettings=i,this.intl=M(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=P(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:f.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,c.validateWeekSettings(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return y(this,e,h.months,()=>{const s=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=R(r=>this.extract(r,s,"month"))),this.monthsCache[i][e]})}weekdays(e,t=!1){return y(this,e,h.weekdays,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=E(r=>this.extract(r,s,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return y(this,void 0,()=>h.meridiems,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[l.default.utc(2016,11,13,9),l.default.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return y(this,e,h.eras,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[l.default.utc(-40,1,1),l.default.utc(2017,1,1)].map(s=>this.extract(s,t,"era"))),this.eraCache[e]})}extract(e,t,s){const i=this.dtFormatter(e,t),r=i.formatToParts(),a=r.find(o=>o.type.toLowerCase()===s);return a?a.value:null}numberFormatter(e={}){return new z(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new $(e,this.intl,t)}relFormatter(e={}){return new q(this.intl,this.isEnglish(),e)}listFormatter(e={}){return W(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||N(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:c.hasLocaleWeekInfo()?Z(this.locale):S}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}module.exports=f;
|
2
2
|
//# sourceMappingURL=index.cjs229.js.map
|
package/dist/index.cjs264.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),x=require("./index.
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),x=require("./index.cjs455.js"),L=require("./index.cjs456.js"),$=require("./index.cjs457.js"),H=require("./index.cjs458.js"),K=require("./index.cjs459.js"),p=require("./index.cjs460.js"),b=require("./index.cjs461.js"),a=require("./index.cjs243.js");function U(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const d=U(q);var D="DropdownMenu",[B,F]=$.createContextScope(D,[p.createMenuScope]),s=p.createMenuScope(),[W,h]=B(D),f=e=>{const{__scopeDropdownMenu:n,children:o,dir:r,open:t,defaultOpen:i,onOpenChange:w,modal:u=!0}=e,c=s(n),M=d.useRef(null),[l=!1,m]=H.useControllableState({prop:t,defaultProp:i,onChange:w});return a.jsxRuntimeExports.jsx(W,{scope:n,triggerId:b.useId(),triggerRef:M,contentId:b.useId(),open:l,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(k=>!k),[m]),modal:u,children:a.jsxRuntimeExports.jsx(p.Root,{...c,open:l,onOpenChange:m,dir:r,modal:u,children:o})})};f.displayName=D;var I="DropdownMenuTrigger",g=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,disabled:r=!1,...t}=e,i=h(I,o),w=s(o);return a.jsxRuntimeExports.jsx(p.Anchor,{asChild:!0,...w,children:a.jsxRuntimeExports.jsx(K.Primitive.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...t,ref:L.composeRefs(n,i.triggerRef),onPointerDown:x.composeEventHandlers(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:x.composeEventHandlers(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});g.displayName=I;var z="DropdownMenuPortal",v=e=>{const{__scopeDropdownMenu:n,...o}=e,r=s(n);return a.jsxRuntimeExports.jsx(p.Portal,{...r,...o})};v.displayName=z;var S="DropdownMenuContent",R=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=h(S,o),i=s(o),w=d.useRef(!1);return a.jsxRuntimeExports.jsx(p.Content,{id:t.contentId,"aria-labelledby":t.triggerId,...i,...r,ref:n,onCloseAutoFocus:x.composeEventHandlers(e.onCloseAutoFocus,u=>{var c;w.current||(c=t.triggerRef.current)==null||c.focus(),w.current=!1,u.preventDefault()}),onInteractOutside:x.composeEventHandlers(e.onInteractOutside,u=>{const c=u.detail.originalEvent,M=c.button===0&&c.ctrlKey===!0,l=c.button===2||M;(!t.modal||l)&&(w.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});R.displayName=S;var X="DropdownMenuGroup",_=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.Group,{...t,...r,ref:n})});_.displayName=X;var J="DropdownMenuLabel",j=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.Label,{...t,...r,ref:n})});j.displayName=J;var Q="DropdownMenuItem",E=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.Item,{...t,...r,ref:n})});E.displayName=Q;var V="DropdownMenuCheckboxItem",N=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.CheckboxItem,{...t,...r,ref:n})});N.displayName=V;var Y="DropdownMenuRadioGroup",C=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.RadioGroup,{...t,...r,ref:n})});C.displayName=Y;var Z="DropdownMenuRadioItem",P=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.RadioItem,{...t,...r,ref:n})});P.displayName=Z;var ee="DropdownMenuItemIndicator",y=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.ItemIndicator,{...t,...r,ref:n})});y.displayName=ee;var oe="DropdownMenuSeparator",A=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.Separator,{...t,...r,ref:n})});A.displayName=oe;var re="DropdownMenuArrow",O=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.Arrow,{...t,...r,ref:n})});O.displayName=re;var ne="DropdownMenuSubTrigger",T=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.SubTrigger,{...t,...r,ref:n})});T.displayName=ne;var te="DropdownMenuSubContent",G=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:o,...r}=e,t=s(o);return a.jsxRuntimeExports.jsx(p.SubContent,{...t,...r,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});G.displayName=te;var ae=f,pe=g,de=v,ue=R,se=_,ie=E;exports.Content=ue;exports.DropdownMenu=f;exports.DropdownMenuArrow=O;exports.DropdownMenuCheckboxItem=N;exports.DropdownMenuContent=R;exports.DropdownMenuGroup=_;exports.DropdownMenuItem=E;exports.DropdownMenuItemIndicator=y;exports.DropdownMenuLabel=j;exports.DropdownMenuPortal=v;exports.DropdownMenuRadioGroup=C;exports.DropdownMenuRadioItem=P;exports.DropdownMenuSeparator=A;exports.DropdownMenuSubContent=G;exports.DropdownMenuSubTrigger=T;exports.DropdownMenuTrigger=g;exports.Group=se;exports.Item=ie;exports.Portal=de;exports.Root=ae;exports.Trigger=pe;exports.createDropdownMenuScope=F;
|
2
2
|
//# sourceMappingURL=index.cjs264.js.map
|
package/dist/index.cjs277.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),D=require("./index.
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),D=require("./index.cjs456.js"),$=require("./index.cjs457.js"),S=require("./index.cjs455.js"),M=require("./index.cjs458.js"),N=require("./index.cjs466.js"),H=require("./index.cjs467.js"),T=require("./index.cjs468.js"),q=require("./index.cjs459.js"),f=require("./index.cjs243.js");function z(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const s=z(_);var y="Checkbox",[A,B]=$.createContextScope(y),[K,L]=A(y),j=s.forwardRef((e,r)=>{const{__scopeCheckbox:t,name:c,checked:p,defaultChecked:n,required:x,disabled:u,value:h="on",onCheckedChange:m,form:d,...C}=e,[i,k]=s.useState(null),v=D.useComposedRefs(r,o=>k(o)),R=s.useRef(!1),g=i?d||!!i.closest("form"):!0,[l=!1,E]=M.useControllableState({prop:p,defaultProp:n,onChange:m}),w=s.useRef(l);return s.useEffect(()=>{const o=i==null?void 0:i.form;if(o){const b=()=>E(w.current);return o.addEventListener("reset",b),()=>o.removeEventListener("reset",b)}},[i,E]),f.jsxRuntimeExports.jsxs(K,{scope:t,state:l,disabled:u,children:[f.jsxRuntimeExports.jsx(q.Primitive.button,{type:"button",role:"checkbox","aria-checked":a(l)?"mixed":l,"aria-required":x,"data-state":O(l),"data-disabled":u?"":void 0,disabled:u,value:h,...C,ref:v,onKeyDown:S.composeEventHandlers(e.onKeyDown,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:S.composeEventHandlers(e.onClick,o=>{E(b=>a(b)?!0:!b),g&&(R.current=o.isPropagationStopped(),R.current||o.stopPropagation())})}),g&&f.jsxRuntimeExports.jsx(X,{control:i,bubbles:!R.current,name:c,value:h,checked:l,required:x,disabled:u,form:d,style:{transform:"translateX(-100%)"},defaultChecked:a(n)?!1:n})]})});j.displayName=y;var I="CheckboxIndicator",P=s.forwardRef((e,r)=>{const{__scopeCheckbox:t,forceMount:c,...p}=e,n=L(I,t);return f.jsxRuntimeExports.jsx(T.Presence,{present:c||a(n.state)||n.state===!0,children:f.jsxRuntimeExports.jsx(q.Primitive.span,{"data-state":O(n.state),"data-disabled":n.disabled?"":void 0,...p,ref:r,style:{pointerEvents:"none",...e.style}})})});P.displayName=I;var X=e=>{const{control:r,checked:t,bubbles:c=!0,defaultChecked:p,...n}=e,x=s.useRef(null),u=N.usePrevious(t),h=H.useSize(r);s.useEffect(()=>{const d=x.current,C=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(C,"checked").set;if(u!==t&&k){const v=new Event("click",{bubbles:c});d.indeterminate=a(t),k.call(d,a(t)?!1:t),d.dispatchEvent(v)}},[u,t,c]);const m=s.useRef(a(t)?!1:t);return f.jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:p??m.current,...n,tabIndex:-1,ref:x,style:{...e.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function a(e){return e==="indeterminate"}function O(e){return a(e)?"indeterminate":e?"checked":"unchecked"}var F=j,G=P;exports.Checkbox=j;exports.CheckboxIndicator=P;exports.Indicator=G;exports.Root=F;exports.createCheckboxScope=B;
|
2
2
|
//# sourceMappingURL=index.cjs277.js.map
|
package/dist/index.cjs288.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index.
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index.cjs479.js"),s=require("react"),p=()=>{const[o,t]=c.useCopyToClipboard(),[r,e]=s.useState(!1);return{isCopied:r,copiedText:o,copyToClipboard:()=>{if(typeof window>"u")return;const i=window.location.href;t(i).then(()=>{e(()=>!0),setTimeout(()=>{e(!1)},1500)}).catch(n=>{console.debug("Failed to copy!",n)})}}};exports.useCopyToClipboardCurrentPage=p;
|
2
2
|
//# sourceMappingURL=index.cjs288.js.map
|
package/dist/index.cjs295.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),p=require("./index.
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),p=require("./index.cjs455.js"),v=require("./index.cjs456.js"),M=require("./index.cjs457.js"),R=require("./index.cjs461.js"),B=require("./index.cjs458.js"),V=require("./index.cjs469.js"),z=require("./index.cjs470.js"),K=require("./index.cjs471.js"),E=require("./index.cjs468.js"),x=require("./index.cjs459.js"),U=require("./index.cjs472.js"),Y=require("./index.cjs473.js"),Z=require("./index.cjs474.js"),J=require("./index.cjs475.js"),s=require("./index.cjs243.js");function Q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=Q(H);var j="Dialog",[S,X]=M.createContextScope(j),[ee,u]=S(j),C=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:c=!0}=e,l=a.useRef(null),d=a.useRef(null),[f=!1,D]=B.useControllableState({prop:r,defaultProp:i,onChange:o});return s.jsxRuntimeExports.jsx(ee,{scope:t,triggerRef:l,contentRef:d,contentId:R.useId(),titleId:R.useId(),descriptionId:R.useId(),open:f,onOpenChange:D,onOpenToggle:a.useCallback(()=>D(L=>!L),[D]),modal:c,children:n})};C.displayName=j;var w="DialogTrigger",P=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=u(w,n),o=v.useComposedRefs(t,i.triggerRef);return s.jsxRuntimeExports.jsx(x.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A(i.open),...r,ref:o,onClick:p.composeEventHandlers(e.onClick,i.onOpenToggle)})});P.displayName=w;var _="DialogPortal",[te,F]=S(_,{forceMount:void 0}),y=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=u(_,t);return s.jsxRuntimeExports.jsx(te,{scope:t,forceMount:n,children:a.Children.map(r,c=>s.jsxRuntimeExports.jsx(E.Presence,{present:n||o.open,children:s.jsxRuntimeExports.jsx(K.Portal,{asChild:!0,container:i,children:c})}))})};y.displayName=_;var m="DialogOverlay",O=a.forwardRef((e,t)=>{const n=F(m,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=u(m,e.__scopeDialog);return o.modal?s.jsxRuntimeExports.jsx(E.Presence,{present:r||o.open,children:s.jsxRuntimeExports.jsx(ne,{...i,ref:t})}):null});O.displayName=m;var oe=J.createSlot("DialogOverlay.RemoveScroll"),ne=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=u(m,n);return s.jsxRuntimeExports.jsx(Y,{as:oe,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsxRuntimeExports.jsx(x.Primitive.div,{"data-state":A(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),g="DialogContent",h=a.forwardRef((e,t)=>{const n=F(g,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=u(g,e.__scopeDialog);return s.jsxRuntimeExports.jsx(E.Presence,{present:r||o.open,children:o.modal?s.jsxRuntimeExports.jsx(re,{...i,ref:t}):s.jsxRuntimeExports.jsx(ie,{...i,ref:t})})});h.displayName=g;var re=a.forwardRef((e,t)=>{const n=u(g,e.__scopeDialog),r=a.useRef(null),i=v.useComposedRefs(t,n.contentRef,r);return a.useEffect(()=>{const o=r.current;if(o)return Z.hideOthers(o)},[]),s.jsxRuntimeExports.jsx(q,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p.composeEventHandlers(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:p.composeEventHandlers(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&o.preventDefault()}),onFocusOutside:p.composeEventHandlers(e.onFocusOutside,o=>o.preventDefault())})}),ie=a.forwardRef((e,t)=>{const n=u(g,e.__scopeDialog),r=a.useRef(!1),i=a.useRef(!1);return s.jsxRuntimeExports.jsx(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),q=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...c}=e,l=u(g,n),d=a.useRef(null),f=v.useComposedRefs(t,d);return U.useFocusGuards(),s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(z.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:s.jsxRuntimeExports.jsx(V.DismissableLayer,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":A(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ae,{titleId:l.titleId}),s.jsxRuntimeExports.jsx(le,{contentRef:d,descriptionId:l.descriptionId})]})]})}),N="DialogTitle",b=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=u(N,n);return s.jsxRuntimeExports.jsx(x.Primitive.h2,{id:i.titleId,...r,ref:t})});b.displayName=N;var $="DialogDescription",I=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=u($,n);return s.jsxRuntimeExports.jsx(x.Primitive.p,{id:i.descriptionId,...r,ref:t})});I.displayName=$;var W="DialogClose",T=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=u(W,n);return s.jsxRuntimeExports.jsx(x.Primitive.button,{type:"button",...r,ref:t,onClick:p.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))})});T.displayName=W;function A(e){return e?"open":"closed"}var k="DialogTitleWarning",[se,G]=M.createContext(k,{contentName:g,titleName:N,docsSlug:"dialog"}),ae=({titleId:e})=>{const t=G(k),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
2
2
|
|
3
3
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
4
4
|
|
package/dist/index.cjs30.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs30.js","sources":["../src/components/ui/CardCategory/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\r\nimport { ExternalLink } from \"@/icons\";\r\nimport { ArrowLink } from \"@/components/ui/ArrowLink\";\r\nimport \"./CardCategory.scss\";\r\nimport { Col, Row } from \"@/components\";\r\nimport { ComponentType, MouseEvent, ReactNode } from \"react\";\r\n\r\ntype Image = {\r\n alt: string;\r\n src: string;\r\n title: string;\r\n};\r\n\r\ntype
|
1
|
+
{"version":3,"file":"index.cjs30.js","sources":["../src/components/ui/CardCategory/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\r\nimport { ExternalLink } from \"@/icons\";\r\nimport { ArrowLink } from \"@/components/ui/ArrowLink\";\r\nimport \"./CardCategory.scss\";\r\nimport { Col, Row } from \"@/components\";\r\nimport { ComponentType, MouseEvent, ReactNode } from \"react\";\r\nimport { HeadingLevel } from \"@/types/headings\";\r\n\r\ntype Image = {\r\n alt: string;\r\n src: string;\r\n title: string;\r\n};\r\n\r\ntype CardCategoryProps = {\r\n image?: Image;\r\n title: string;\r\n titleTag?: HeadingLevel;\r\n href?: string;\r\n description?: string | ReactNode;\r\n description2?: string;\r\n isExternal?: boolean;\r\n showIcon?: boolean;\r\n goToLabel?: string;\r\n asImage?: \"img\";\r\n asLink?: \"a\" | ComponentType<any>;\r\n className?: string;\r\n classNameTitle?: string;\r\n classNameDescription?: string;\r\n classNameDescriptionTitle?: string;\r\n handleOnClick?: (e: MouseEvent<HTMLAnchorElement>) => void;\r\n};\r\n\r\nexport const CardCategory = ({\r\n image,\r\n title,\r\n titleTag: TitleTag = \"h1\",\r\n href,\r\n description,\r\n description2,\r\n isExternal = false,\r\n showIcon = false,\r\n goToLabel,\r\n asLink = \"a\",\r\n asImage = \"img\",\r\n className,\r\n classNameTitle,\r\n classNameDescription,\r\n classNameDescriptionTitle,\r\n handleOnClick,\r\n}: CardCategoryProps) => {\r\n const ImageComponent = asImage;\r\n const LinkComponent = asLink;\r\n return (\r\n <LinkComponent\r\n className={clsx(\r\n \"ui-card-category shadow br-x4 bg-white\",\r\n className,\r\n handleOnClick && \"cursor-pointer\",\r\n )}\r\n href={href}\r\n target={isExternal ? \"_blank\" : undefined}\r\n rel={isExternal ? \"noreferrer noopener\" : undefined}\r\n onClick={handleOnClick ?? undefined}\r\n >\r\n {image?.src && (\r\n <header className=\"ui-card-category-header\">\r\n <ImageComponent\r\n src={image?.src}\r\n alt={image?.alt}\r\n title={image?.title}\r\n />\r\n </header>\r\n )}\r\n\r\n <Col\r\n className={clsx(\r\n image?.src\r\n ? \"ui-card-category-content-with-image ui-mt-negative\"\r\n : \"ui-card-category-content\",\r\n \"gap-x8 br-x4 bg-white\",\r\n )}\r\n >\r\n <Row alignItems={\"center\"} justifyContent={\"space-between\"} gap={\"x4\"}>\r\n <TitleTag\r\n className={clsx(\r\n \"flex-1 cursor-pointer hover-underline\",\r\n classNameTitle\r\n ? classNameTitle\r\n : \"text-primary fs-5 md-fs-custom-2\",\r\n )}\r\n >\r\n {title}\r\n {isExternal && (\r\n <span className=\"visually-hidden\">\r\n (si apre in una nuova finestra)\r\n </span>\r\n )}\r\n </TitleTag>\r\n\r\n {showIcon && (\r\n <span>\r\n <ExternalLink\r\n width={24}\r\n height={24}\r\n color=\"primary\"\r\n className=\"ui-external-link\"\r\n />\r\n </span>\r\n )}\r\n </Row>\r\n <div className={clsx(classNameDescription)}>\r\n <p\r\n className={clsx(\r\n classNameDescriptionTitle\r\n ? classNameDescriptionTitle\r\n : \"fs-6 md-fs-custom text-slate-20\",\r\n )}\r\n >\r\n {description}\r\n </p>\r\n <p className=\"fs-6 md-fs-custom fw-regular text-slate-28\">\r\n {description2}\r\n </p>\r\n </div>\r\n </Col>\r\n {goToLabel && href && (\r\n <footer className=\"ui-card-category-footer bg-white\">\r\n <ArrowLink href={href ?? \"#\"} isExternal={isExternal}>\r\n {goToLabel?.toUpperCase()}\r\n </ArrowLink>\r\n </footer>\r\n )}\r\n </LinkComponent>\r\n );\r\n};\r\n"],"names":["CardCategory","image","title","TitleTag","href","description","description2","isExternal","showIcon","goToLabel","asLink","asImage","className","classNameTitle","classNameDescription","classNameDescriptionTitle","handleOnClick","ImageComponent","LinkComponent","jsxs","clsx","jsx","Col","Row","ExternalLink","ArrowLink"],"mappings":"+SAiCaA,EAAe,CAAC,CAC3B,MAAAC,EACA,MAAAC,EACA,SAAUC,EAAW,KACrB,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,WAAAC,EAAa,GACb,SAAAC,EAAW,GACX,UAAAC,EACA,OAAAC,EAAS,IACT,QAAAC,EAAU,MACV,UAAAC,EACA,eAAAC,EACA,qBAAAC,EACA,0BAAAC,EACA,cAAAC,CACF,IAAyB,CACvB,MAAMC,EAAiBN,EACjBO,EAAgBR,EAEpB,OAAAS,EAAA,kBAAA,KAACD,EAAA,CACC,UAAWE,EAAA,KACT,yCACAR,EACAI,GAAiB,gBACnB,EACA,KAAAZ,EACA,OAAQG,EAAa,SAAW,OAChC,IAAKA,EAAa,sBAAwB,OAC1C,QAASS,GAAiB,OAEzB,SAAA,EAAAf,GAAA,YAAAA,EAAO,MACNoB,wBAAC,SAAO,CAAA,UAAU,0BAChB,SAAAA,EAAA,kBAAA,IAACJ,EAAA,CACC,IAAKhB,GAAA,YAAAA,EAAO,IACZ,IAAKA,GAAA,YAAAA,EAAO,IACZ,MAAOA,GAAA,YAAAA,EAAO,KAAA,CAAA,EAElB,EAGFkB,EAAA,kBAAA,KAACG,EAAA,IAAA,CACC,UAAWF,EAAA,KACTnB,GAAA,MAAAA,EAAO,IACH,qDACA,2BACJ,uBACF,EAEA,SAAA,CAAAkB,yBAACI,EAAAA,KAAI,WAAY,SAAU,eAAgB,gBAAiB,IAAK,KAC/D,SAAA,CAAAJ,EAAA,kBAAA,KAAChB,EAAA,CACC,UAAWiB,EAAA,KACT,wCACAP,GAEI,kCACN,EAEC,SAAA,CAAAX,EACAK,GACCc,EAAA,kBAAA,IAAC,OAAK,CAAA,UAAU,kBAAkB,SAElC,iCAAA,CAAA,CAAA,CAAA,CAEJ,EAECb,2BACE,OACC,CAAA,SAAAa,EAAA,kBAAA,IAACG,EAAA,aAAA,CACC,MAAO,GACP,OAAQ,GACR,MAAM,UACN,UAAU,kBAAA,CAAA,CAEd,CAAA,CAAA,EAEJ,EACCL,EAAA,kBAAA,KAAA,MAAA,CAAI,UAAWC,EAAAA,KAAKN,CAAoB,EACvC,SAAA,CAAAO,EAAA,kBAAA,IAAC,IAAA,CACC,UAAWD,EAAA,KACTL,GAEI,iCACN,EAEC,SAAAV,CAAA,CACH,EACCgB,EAAA,kBAAA,IAAA,IAAA,CAAE,UAAU,6CACV,SACHf,CAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,EACCG,GAAaL,GACXiB,EAAAA,kBAAAA,IAAA,SAAA,CAAO,UAAU,mCAChB,SAAAA,wBAACI,EAAAA,UAAU,CAAA,KAAMrB,GAAQ,IAAK,WAAAG,EAC3B,SAAWE,GAAA,YAAAA,EAAA,cACd,CACF,CAAA,CAAA,CAAA,CAEJ,CAEJ"}
|
package/dist/index.cjs302.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css');const o=require("./index.cjs243.js");;/* empty css */const t=({children:e})=>o.jsxRuntimeExports.jsx("footer",{className:"ui-consent-modal-footer bg-white shadow",children:e});exports.ConsentModalFooter=t;
|
2
2
|
//# sourceMappingURL=index.cjs302.js.map
|
package/dist/index.cjs303.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/ConsentModal/ConsentModalContent/ConsentModalContent.css');const n=require("./index.cjs243.js"),o=require("./index.cjs244.js");;/* empty css */const s=({overrideClassNames:e,children:t})=>n.jsxRuntimeExports.jsx("div",{className:o.clsx("ui-consent-modal-body",e),children:t});exports.ContentModalContent=s;
|
2
2
|
//# sourceMappingURL=index.cjs303.js.map
|
package/dist/index.cjs307.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css');const e=require("./index.cjs243.js");;/* empty css */const t=({children:o})=>e.jsxRuntimeExports.jsx("footer",{className:"ui-consent-modal-footer bg-white shadow",children:o});exports.DoctorModalFooter=t;
|
2
2
|
//# sourceMappingURL=index.cjs307.js.map
|
package/dist/index.cjs31.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapStructure/CardMap.css');const e=require("./index.cjs243.js");;/* empty css */const n=require("react"),o=require("./index.cjs10.js"),w=({id:u,title:l,titleTag:x="
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapStructure/CardMap.css');const e=require("./index.cjs243.js");;/* empty css */const n=require("react"),o=require("./index.cjs10.js"),w=({id:u,title:l,titleTag:x="h1",href:d,description:m,isExternal:i=!1,asLink:f="a",className:p,plainAddress:c,setSelectedCard:j=()=>{},addressLabel:h="Indirizzo"})=>{const v=f,[s,a]=n.useState(!1),t=n.useRef(null);return n.useEffect(()=>{const r=R=>{t.current&&!t.current.contains(R.target)&&a(!1)};return s?document.addEventListener("mousedown",r):document.removeEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[s]),e.jsxRuntimeExports.jsxs(o.Col,{as:"div",justifyContent:"center",ref:t,br:"x4",p:"x24",bg:"white",className:`${p} ${s?"ui-is-active":"ui-card-search"} shadow cursor-pointer text-slate-28`,onClick:()=>{a(!0),j(u)},children:[e.jsxRuntimeExports.jsxs(o.Col,{pb:"x24",children:[e.jsxRuntimeExports.jsx(x,{className:"flex-1",children:e.jsxRuntimeExports.jsx(v,{className:"text-decoration-none fs-4 text-primary fw-semibold",href:d,target:i?"_blank":void 0,rel:i?"noreferrer noopener":void 0,children:l})}),e.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-regular",children:m})]}),c&&e.jsxRuntimeExports.jsxs(o.Col,{as:"footer",gap:"x8",bg:"white",children:[e.jsxRuntimeExports.jsx("h5",{className:"fw-semibold fs-6",children:h}),e.jsxRuntimeExports.jsx("p",{className:"fw-regular",children:c})]})]})};exports.CardMap=w;
|
2
2
|
//# sourceMappingURL=index.cjs31.js.map
|
package/dist/index.cjs31.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs31.js","sources":["../src/components/ui/CardMapStructure/index.tsx"],"sourcesContent":["import \"./CardMap.scss\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\nimport { Col } from \"@/components\";\r\
|
1
|
+
{"version":3,"file":"index.cjs31.js","sources":["../src/components/ui/CardMapStructure/index.tsx"],"sourcesContent":["import \"./CardMap.scss\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\nimport { Col } from \"@/components\";\r\nimport { HeadingLevel } from \"@/types/headings\";\r\n\r\ntype CardMapProps = {\r\n id: string;\r\n title: string;\r\n titleTag: HeadingLevel;\r\n href?: string;\r\n description?: string;\r\n isExternal?: boolean;\r\n showIcon?: boolean;\r\n asLink?: \"a\";\r\n className?: string;\r\n plainAddress?: string;\r\n setSelectedCard?: (id: string) => void;\r\n addressLabel?: string;\r\n};\r\nexport const CardMap = ({\r\n id,\r\n title,\r\n titleTag: TitleTag = \"h1\",\r\n href,\r\n description,\r\n isExternal = false,\r\n asLink = \"a\",\r\n className,\r\n plainAddress,\r\n setSelectedCard = () => {},\r\n addressLabel = \"Indirizzo\",\r\n}: CardMapProps) => {\r\n const LinkComponent = asLink;\r\n const [isActive, setIsActive] = useState(false);\r\n const dropdownRef = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const handleClickOutside = (event: MouseEvent) => {\r\n if (\r\n dropdownRef.current &&\r\n !dropdownRef.current.contains(event.target as Node)\r\n ) {\r\n setIsActive(false);\r\n }\r\n };\r\n\r\n if (isActive) {\r\n document.addEventListener(\"mousedown\", handleClickOutside);\r\n } else {\r\n document.removeEventListener(\"mousedown\", handleClickOutside);\r\n }\r\n\r\n return () => {\r\n document.removeEventListener(\"mousedown\", handleClickOutside);\r\n };\r\n }, [isActive]);\r\n return (\r\n <Col\r\n as={\"div\"}\r\n justifyContent={\"center\"}\r\n ref={dropdownRef}\r\n br={\"x4\"}\r\n p={\"x24\"}\r\n bg={\"white\"}\r\n className={`${className} ${isActive ? \"ui-is-active\" : \"ui-card-search\"} shadow cursor-pointer text-slate-28`}\r\n onClick={() => {\r\n setIsActive(true);\r\n setSelectedCard(id);\r\n }}\r\n >\r\n <Col pb={\"x24\"}>\r\n <TitleTag className=\"flex-1\">\r\n <LinkComponent\r\n className={\"text-decoration-none fs-4 text-primary fw-semibold\"}\r\n href={href}\r\n target={isExternal ? \"_blank\" : undefined}\r\n rel={isExternal ? \"noreferrer noopener\" : undefined}\r\n >\r\n {title}\r\n </LinkComponent>\r\n </TitleTag>\r\n <p className=\"fs-6 fw-regular\">{description}</p>\r\n </Col>\r\n\r\n {plainAddress && (\r\n <Col as={\"footer\"} gap={\"x8\"} bg={\"white\"}>\r\n <h5 className={\"fw-semibold fs-6\"}>{addressLabel}</h5>\r\n <p className={\"fw-regular\"}>{plainAddress}</p>\r\n </Col>\r\n )}\r\n </Col>\r\n );\r\n};\r\n"],"names":["CardMap","id","title","TitleTag","href","description","isExternal","asLink","className","plainAddress","setSelectedCard","addressLabel","LinkComponent","isActive","setIsActive","useState","dropdownRef","useRef","useEffect","handleClickOutside","event","jsxs","Col","jsx"],"mappings":"yMAmBaA,EAAU,CAAC,CACtB,GAAAC,EACA,MAAAC,EACA,SAAUC,EAAW,KACrB,KAAAC,EACA,YAAAC,EACA,WAAAC,EAAa,GACb,OAAAC,EAAS,IACT,UAAAC,EACA,aAAAC,EACA,gBAAAC,EAAkB,IAAM,CAAC,EACzB,aAAAC,EAAe,WACjB,IAAoB,CAClB,MAAMC,EAAgBL,EAChB,CAACM,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAK,EACxCC,EAAcC,SAAuB,IAAI,EAE/CC,OAAAA,EAAAA,UAAU,IAAM,CACR,MAAAC,EAAsBC,GAAsB,CAE9CJ,EAAY,SACZ,CAACA,EAAY,QAAQ,SAASI,EAAM,MAAc,GAElDN,EAAY,EAAK,CAErB,EAEA,OAAID,EACO,SAAA,iBAAiB,YAAaM,CAAkB,EAEhD,SAAA,oBAAoB,YAAaA,CAAkB,EAGvD,IAAM,CACF,SAAA,oBAAoB,YAAaA,CAAkB,CAC9D,CAAA,EACC,CAACN,CAAQ,CAAC,EAEXQ,EAAA,kBAAA,KAACC,EAAA,IAAA,CACC,GAAI,MACJ,eAAgB,SAChB,IAAKN,EACL,GAAI,KACJ,EAAG,MACH,GAAI,QACJ,UAAW,GAAGR,CAAS,IAAIK,EAAW,eAAiB,gBAAgB,uCACvE,QAAS,IAAM,CACbC,EAAY,EAAI,EAChBJ,EAAgBT,CAAE,CACpB,EAEA,SAAA,CAACoB,EAAAA,kBAAAA,KAAAC,EAAAA,IAAA,CAAI,GAAI,MACP,SAAA,CAACC,EAAAA,kBAAAA,IAAApB,EAAA,CAAS,UAAU,SAClB,SAAAoB,EAAA,kBAAA,IAACX,EAAA,CACC,UAAW,qDACX,KAAAR,EACA,OAAQE,EAAa,SAAW,OAChC,IAAKA,EAAa,sBAAwB,OAEzC,SAAAJ,CAAA,CAAA,EAEL,EACCqB,EAAA,kBAAA,IAAA,IAAA,CAAE,UAAU,kBAAmB,SAAYlB,CAAA,CAAA,CAAA,EAC9C,EAECI,4BACEa,MAAI,CAAA,GAAI,SAAU,IAAK,KAAM,GAAI,QAChC,SAAA,CAACC,EAAA,kBAAA,IAAA,KAAA,CAAG,UAAW,mBAAqB,SAAaZ,EAAA,EAChDY,EAAA,kBAAA,IAAA,IAAA,CAAE,UAAW,aAAe,SAAad,CAAA,CAAA,CAAA,CAC5C,CAAA,CAAA,CAAA,CAEJ,CAEJ"}
|
package/dist/index.cjs316.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/ConsentModal/ConsentModalContent/ConsentModalContent.css');const t=require("./index.cjs243.js"),r=require("./index.cjs244.js");;/* empty css */const n=({overrideClassNames:o,children:e})=>t.jsxRuntimeExports.jsx("div",{className:r.clsx("ui-consent-modal-body",o),children:e});exports.DoctorConfirmModalContent=n;
|
2
2
|
//# sourceMappingURL=index.cjs316.js.map
|
package/dist/index.cjs318.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css');const e=require("./index.cjs243.js");;/* empty css */const t=({children:o})=>e.jsxRuntimeExports.jsx("footer",{className:"ui-consent-modal-footer bg-white shadow",children:o});exports.DoctorConfirmModalFooter=t;
|
2
2
|
//# sourceMappingURL=index.cjs318.js.map
|
package/dist/index.cjs32.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapDoctorV2/CardMapDoctorV2.css');const s=require("./index.cjs243.js");;/* empty css */const c=require("react"),p=require("./index.cjs277.js"),w=require("./index.cjs278.js"),b=require("./index.cjs212.js"),C=require("./index.cjs42.js"),j=require("./index.cjs9.js"),m=require("./index.cjs10.js"),E=({titleTag:h="
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapDoctorV2/CardMapDoctorV2.css');const s=require("./index.cjs243.js");;/* empty css */const c=require("react"),p=require("./index.cjs277.js"),w=require("./index.cjs278.js"),b=require("./index.cjs212.js"),C=require("./index.cjs42.js"),j=require("./index.cjs9.js"),m=require("./index.cjs10.js"),E=({titleTag:h="h1",availableLabel:o="Disponibile",specialization:n,addressLabel:f,className:R,doctor:e,setSelectedCard:r=()=>{},keepSelectionOnNavigation:d=!1,ctaTitle:x,ctaAction:a})=>{const[t,l]=c.useState(!1),u=c.useRef(null),i=e==null?void 0:e.offices[0];return w.useClickOutside(u,t,()=>l(!1),()=>r(""),d),s.jsxRuntimeExports.jsxs(j.Row,{br:"x4",p:"x24",gap:"x16",bg:"white",text:"slate-20",ref:u,className:`${R} ${t?"ui-is-active ui-card-search":"ui-card-search"} shadow cursor-pointer`,onClick:()=>{l(!0),r(e==null?void 0:e.code)},children:[s.jsxRuntimeExports.jsx(p.Root,{id:e==null?void 0:e.code,checked:t,className:"ui-checkbox-filter",children:s.jsxRuntimeExports.jsx(p.Indicator,{children:s.jsxRuntimeExports.jsx(b.CheckIcon,{width:14,height:14,color:"white"})})}),s.jsxRuntimeExports.jsxs(m.Col,{justifyContent:"center",className:"w-full",children:[s.jsxRuntimeExports.jsxs(m.Col,{pb:"x16",children:[s.jsxRuntimeExports.jsxs(h,{className:"flex-1 text-decoration-none fs-4 fw-semibold",children:["Dott. ",e==null?void 0:e.firstName," ",e==null?void 0:e.lastName]}),!!n&&s.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-regular text-slate-28",children:n}),s.jsxRuntimeExports.jsx("div",{className:"ui-available-label mt-x4 px-x16 py-x4 bg-status-success text-white rounded fw-semibold fs-7",children:o.toUpperCase()})]}),s.jsxRuntimeExports.jsxs(j.Row,{justifyContent:"space-between",alignItems:"end",children:[s.jsxRuntimeExports.jsxs("div",{className:"text-slate-28 fs-6",children:[s.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:f}),s.jsxRuntimeExports.jsx("div",{className:"w-full",children:s.jsxRuntimeExports.jsxs("p",{className:"fw-regular",children:[i!=null&&i.address?i.address.charAt(0).toUpperCase()+i.address.slice(1).toLowerCase():"",","," ",i!=null&&i.city?i.city.charAt(0).toUpperCase()+i.city.slice(1).toLowerCase():""]})})]}),x&&a&&s.jsxRuntimeExports.jsx(C.ArrowLink,{asButton:!0,onClick:a,arrowVisible:!1,className:"cursor-pointer",children:x})]})]})]})};exports.CardMapDoctor=E;
|
2
2
|
//# sourceMappingURL=index.cjs32.js.map
|
package/dist/index.cjs32.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs32.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.cjs32.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":"iWAsBaA,EAAgB,CAAC,CAC5B,SAAUC,EAAW,KACrB,eAAAC,EAAiB,cACjB,eAAAC,EACA,aAAAC,EACA,UAAAC,EACA,OAAAC,EACA,gBAAAC,EAAkB,IAAM,CAAC,EACzB,0BAAAC,EAA4B,GAC5B,SAAAC,EACA,UAAAC,CACF,IAA0B,CACxB,KAAM,CAACC,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAK,EACxCC,EAAcC,SAAuB,IAAI,EACzCC,EAAUV,GAAA,YAAAA,EAAQ,QAAQ,GAChCW,OAAAA,EAAA,gBACEH,EACAH,EACA,IAAMC,EAAY,EAAK,EACvB,IAAML,EAAgB,EA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ACX,SAAA,CAAAF,GAAA,MAAAA,EAAS,QACNA,EAAQ,QAAQ,OAAO,CAAC,EAAE,YAC1B,EAAAA,EAAQ,QAAQ,MAAM,CAAC,EAAE,YACzB,EAAA,GAAG,IACL,IACDA,GAAA,MAAAA,EAAS,KACNA,EAAQ,KAAK,OAAO,CAAC,EAAE,YAAY,EACnCA,EAAQ,KAAK,MAAM,CAAC,EAAE,cACtB,EAAA,CAAA,CACN,CACF,CAAA,CAAA,EACF,EACCP,GAAYC,GACXU,EAAA,kBAAA,IAACK,EAAA,UAAA,CACC,SAAQ,GACR,QAASf,EACT,aAAc,GACd,UAAW,iBAEV,SAAAD,CAAA,CAAA,CACH,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,CAEJ"}
|
package/dist/index.cjs326.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),T=require("./index.
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),T=require("./index.cjs455.js"),_=require("./index.cjs456.js"),O=require("./index.cjs457.js"),M=require("./index.cjs458.js"),$=require("./index.cjs466.js"),N=require("./index.cjs467.js"),C=require("./index.cjs459.js"),d=require("./index.cjs243.js");function H(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=H(q);var S="Switch",[I,z]=O.createContextScope(S),[B,D]=I(S),v=s.forwardRef((e,o)=>{const{__scopeSwitch:t,name:r,checked:n,defaultChecked:p,required:i,disabled:c,value:a="on",onCheckedChange:b,form:m,...l}=e,[u,R]=s.useState(null),g=_.useComposedRefs(o,f=>R(f)),x=s.useRef(!1),k=u?m||!!u.closest("form"):!0,[h=!1,y]=M.useControllableState({prop:n,defaultProp:p,onChange:b});return d.jsxRuntimeExports.jsxs(B,{scope:t,checked:h,disabled:c,children:[d.jsxRuntimeExports.jsx(C.Primitive.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":P(h),"data-disabled":c?"":void 0,disabled:c,value:a,...l,ref:g,onClick:T.composeEventHandlers(e.onClick,f=>{y(E=>!E),k&&(x.current=f.isPropagationStopped(),x.current||f.stopPropagation())})}),k&&d.jsxRuntimeExports.jsx(A,{control:u,bubbles:!x.current,name:r,value:a,checked:h,required:i,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});v.displayName=S;var j="SwitchThumb",w=s.forwardRef((e,o)=>{const{__scopeSwitch:t,...r}=e,n=D(j,t);return d.jsxRuntimeExports.jsx(C.Primitive.span,{"data-state":P(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:o})});w.displayName=j;var A=e=>{const{control:o,checked:t,bubbles:r=!0,...n}=e,p=s.useRef(null),i=$.usePrevious(t),c=N.useSize(o);return s.useEffect(()=>{const a=p.current,b=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(b,"checked").set;if(i!==t&&l){const u=new Event("click",{bubbles:r});l.call(a,t),a.dispatchEvent(u)}},[i,t,r]),d.jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...n,tabIndex:-1,ref:p,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function P(e){return e?"checked":"unchecked"}var F=v,L=w;exports.Root=F;exports.Switch=v;exports.SwitchThumb=w;exports.Thumb=L;exports.createSwitchScope=z;
|
2
2
|
//# sourceMappingURL=index.cjs326.js.map
|
package/dist/index.cjs33.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapDoctorV2/CardMapDoctorV2.css');const e=require("./index.cjs243.js");;/* empty css */const f=require("react"),a=require("./index.cjs277.js"),w=require("./index.cjs278.js"),c=require("./index.cjs9.js"),b=require("./index.cjs212.js"),u=require("./index.cjs10.js"),E=require("./index.cjs42.js"),N=({titleTag:d="
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapDoctorV2/CardMapDoctorV2.css');const e=require("./index.cjs243.js");;/* empty css */const f=require("react"),a=require("./index.cjs277.js"),w=require("./index.cjs278.js"),c=require("./index.cjs9.js"),b=require("./index.cjs212.js"),u=require("./index.cjs10.js"),E=require("./index.cjs42.js"),N=({titleTag:d="h1",title:s,specialization:t,tag:j,officeAddressLabel:m,officeAddress:p,className:h,doctorCode:n,setSelectedDoctorCode:r,keepSelectionOnNavigation:R=!1,ctaTitle:x,ctaAction:l,isActive:i})=>{const o=f.useRef(null);return w.useClickOutside(o,i,()=>r(void 0),()=>r(void 0),R),e.jsxRuntimeExports.jsxs(c.Row,{br:"x4",p:"x24",gap:"x16",bg:"white",text:"slate-20",ref:o,className:`${h} ${i?"ui-is-active ui-card-search":"ui-card-search"} shadow cursor-pointer`,onClick:()=>{r(n)},children:[e.jsxRuntimeExports.jsx(a.Root,{id:n,checked:i,className:"ui-checkbox-filter",title:`Seleziona ${s}`,"aria-label":`Seleziona ${s}`,children:e.jsxRuntimeExports.jsx(a.Indicator,{children:e.jsxRuntimeExports.jsx(b.CheckIcon,{width:14,height:14,color:"white"})})}),e.jsxRuntimeExports.jsxs(u.Col,{justifyContent:"center",className:"w-full",children:[e.jsxRuntimeExports.jsxs(u.Col,{pb:"x16",children:[e.jsxRuntimeExports.jsx(d,{className:"flex-1 text-decoration-none fs-4 fw-semibold",children:s}),!!t&&e.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-regular text-slate-28",children:t}),e.jsxRuntimeExports.jsx("div",{className:"ui-available-label mt-x4 px-x16 py-x4 bg-status-success text-white rounded fw-semibold fs-7",children:j})]}),e.jsxRuntimeExports.jsxs(c.Row,{justifyContent:"space-between",alignItems:"end",children:[e.jsxRuntimeExports.jsxs("div",{className:"text-slate-28 fs-6",children:[e.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:m}),e.jsxRuntimeExports.jsx("div",{className:"w-full",children:e.jsxRuntimeExports.jsx("p",{className:"fw-regular",children:p})})]}),x&&l&&e.jsxRuntimeExports.jsx(E.ArrowLink,{asButton:!0,onClick:l,arrowVisible:!1,className:"cursor-pointer",children:x})]})]})]})};exports.CardMapDoctorV2=N;
|
2
2
|
//# sourceMappingURL=index.cjs33.js.map
|
package/dist/index.cjs33.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs33.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.cjs33.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":"iWAyBaA,EAAkB,CAAC,CAC9B,SAAUC,EAAW,KACrB,MAAAC,EACA,eAAAC,EACA,IAAAC,EACA,mBAAAC,EACA,cAAAC,EACA,UAAAC,EACA,WAAAC,EACA,sBAAAC,EACA,0BAAAC,EAA4B,GAC5B,SAAAC,EACA,UAAAC,EACA,SAAAC,CACF,IAA0B,CAClB,MAAAC,EAAcC,SAAuB,IAAI,EAC/CC,OAAAA,EAAA,gBACEF,EACAD,EACA,IAAMJ,EAAsB,MAAS,EACrC,IAAMA,EAAsB,MAAS,EACrCC,CACF,EAGEO,EAAA,kBAAA,KAACC,EAAA,IAAA,CACC,GAAI,KACJ,EAAG,MACH,IAAK,MACL,GAAI,QACJ,KAAM,WACN,IAAKJ,EACL,UAAW,GAAGP,CAAS,IAAIM,EAAW,8BAAgC,gBAAgB,yBACtF,QAAS,IAAM,CACbJ,EAAsBD,CAAU,CAClC,EAEA,SAAA,CAAAW,EAAA,kBAAA,IAACC,EAAc,KAAd,CACC,GAAIZ,EACJ,QAASK,EACT,UAAW,qBACX,MAAO,aAAaX,CAAK,GACzB,aAAY,aAAaA,CAAK,GAE9B,SAACiB,EAAAA,kBAAAA,IAAAE,EAAAA,UAAA,CACC,SAACF,EAAA,kBAAA,IAAAG,EAAA,UAAA,CAAU,MAAO,GAAI,OAAQ,GAAI,MAAM,OAAQ,CAAA,CAClD,CAAA,CAAA,CACF,EACCL,yBAAAM,EAAAA,IAAA,CAAI,eAAgB,SAAU,UAAW,SACxC,SAAA,CAACN,EAAAA,kBAAAA,KAAAM,EAAAA,IAAA,CAAI,GAAI,MACP,SAAA,CAACJ,EAAA,kBAAA,IAAAlB,EAAA,CAAS,UAAU,+CACjB,SACHC,EAAA,EACC,CAAC,CAACC,2BACA,IAAE,CAAA,UAAU,gCAAiC,SAAeA,EAAA,EAE/DgB,EAAA,kBAAA,IAAC,MAAA,CACC,UACE,8FAGD,SAAAf,CAAA,CAAA,CACH,EACF,EACCa,EAAA,kBAAA,KAAAC,EAAA,IAAA,CAAI,eAAgB,gBAAiB,WAAY,MAChD,SAAA,CAACD,EAAAA,kBAAAA,KAAA,MAAA,CAAI,UAAW,qBACd,SAAA,CAACE,EAAA,kBAAA,IAAA,MAAA,CAAI,UAAW,UAAY,SAAmBd,EAAA,EAC/Cc,EAAAA,kBAAAA,IAAC,OAAI,UAAW,SACd,iCAAC,IAAE,CAAA,UAAW,aAAe,SAAAb,CAAc,CAAA,CAC7C,CAAA,CAAA,EACF,EACCK,GAAYC,GACXO,EAAA,kBAAA,IAACK,EAAA,UAAA,CACC,SAAQ,GACR,QAASZ,EACT,aAAc,GACd,UAAW,iBAEV,SAAAD,CAAA,CAAA,CACH,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,CAEJ"}
|
package/dist/index.cjs34.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardService/CardService.css');const e=require("./index.cjs243.js"),s=require("./index.cjs244.js");;/* empty css */const a=require("./index.cjs163.js"),d=require("./index.cjs162.js"),m=require("./index.cjs161.js"),j=({title:r,href:i,titleTag:t="
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardService/CardService.css');const e=require("./index.cjs243.js"),s=require("./index.cjs244.js");;/* empty css */const a=require("./index.cjs163.js"),d=require("./index.cjs162.js"),m=require("./index.cjs161.js"),j=({title:r,href:i,titleTag:t="h1",asLink:n="a",className:c,iconType:x="icon1"})=>{const o=u=>{switch(u){case"icon1":return e.jsxRuntimeExports.jsx(m.Ellipse,{});case"icon2":return e.jsxRuntimeExports.jsx(d.Ellipse2,{});case"icon3":return e.jsxRuntimeExports.jsx(a.Ellipse3,{});default:return null}},l=n;return e.jsxRuntimeExports.jsx(l,{className:" text-decoration-none",href:i,children:e.jsxRuntimeExports.jsxs("div",{className:s.clsx(c,"ui-service-card","bg-primary br-x4 py-x24 pl-x24 w-full shadow "),children:[e.jsxRuntimeExports.jsx(t,{className:"flex-1 h-full base-row align-items-center fs-5 md-fs-4 text-white fw-semibold ",children:r}),e.jsxRuntimeExports.jsx("div",{className:s.clsx("ui-service-card-icon"),children:e.jsxRuntimeExports.jsx("span",{children:o(x)})})]})})};exports.CardService=j;
|
2
2
|
//# sourceMappingURL=index.cjs34.js.map
|
package/dist/index.cjs34.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs34.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.cjs34.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":"oRAiBaA,EAAc,CAAC,CAC1B,MAAAC,EACA,KAAAC,EACA,SAAUC,EAAW,KACrB,OAAAC,EAAS,IACT,UAAAC,EACA,SAAAC,EAAW,OACb,IAAwB,CAChB,MAAAC,EAAWC,GAAiB,CAChC,OAAQA,EAAM,CACZ,IAAK,QACH,+BAAQC,EAAQ,QAAA,EAAA,EAClB,IAAK,QACH,+BAAQC,EAAS,SAAA,EAAA,EACnB,IAAK,QACH,+BAAQC,EAAS,SAAA,EAAA,EACnB,QACS,OAAA,IAAA,CAEb,EAEMC,EAAgBR,EACtB,OACGS,EAAAA,kBAAAA,IAAAD,EAAA,CAAc,UAAW,wBAAyB,KAAAV,EACjD,SAAAY,EAAA,kBAAA,KAAC,MAAA,CACC,UAAWC,EAAA,KACTV,EACA,kBACA,+CACF,EAEA,SAAA,CAACQ,EAAA,kBAAA,IAAAV,EAAA,CAAS,UAAU,iFACjB,SACHF,EAAA,EACAY,EAAAA,kBAAAA,IAAC,MAAI,CAAA,UAAWE,EAAK,KAAA,sBAAsB,EACzC,SAAAF,EAAAA,kBAAAA,IAAC,OAAM,CAAA,SAAAN,EAAQD,CAAQ,CAAE,CAAA,CAC3B,CAAA,CAAA,CAAA,CAAA,EAEJ,CAEJ"}
|
package/dist/index.cjs36.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardOpeningHours/CardOpeningHours.css');const n=require("./index.cjs243.js");;/* empty css */const L=require("./index.cjs244.js"),r=require("react"),F=require("./index.cjs224.js");require("./index.cjs3.js");const C=require("./index.cjs10.js"),g=require("./index.cjs9.js"),ee=({title:K="Orari di apertura",titleTag:P="
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardOpeningHours/CardOpeningHours.css');const n=require("./index.cjs243.js");;/* empty css */const L=require("./index.cjs244.js"),r=require("react"),F=require("./index.cjs224.js");require("./index.cjs3.js");const C=require("./index.cjs10.js"),g=require("./index.cjs9.js"),ee=({title:K="Orari di apertura",titleTag:P="h1",openingHours:f,weekDaysMap:R,openLabel:a="Aperto",todayLabel:U="Oggi",closeLabel:u="Chiuso",open24Label:x="24 ore su 24",opensSoonLabel:O="Apre tra poco",opensAtLabel:$="Apre alle",opensTomorrowLabel:E="Apre domani",opensOnLabel:T="Apre",atLabel:N="alle",closesAtLabel:S="Chiude alle"})=>{const[z,B]=r.useState(null),[k,G]=r.useState(""),[J,l]=r.useState(""),[Q,I]=r.useState(""),[V,h]=r.useState(!1),[W,m]=r.useState(!1),[X,c]=r.useState(""),d=Object.values(R),p=Object.keys(R),Y=()=>F.default.now().toFormat("HH:mm"),q=t=>{const[e,s]=t.split(":").map(Number);return e*60+s},D=r.useCallback(t=>t.from==="00:00"&&t.to==="00:00",[]),j=r.useCallback(t=>t.some(D),[D]),Z=(t,e)=>{for(const{from:s,to:o}of t)if(e>=s&&e<=o)return{open:!0,closingTime:o};return{open:!1,closingTime:""}},_=(t,e)=>{for(const{from:s}of t)if(s>e)return s;return""},H=r.useCallback((t,e)=>{if(!t)return!1;const s=q(t),o=q(e),i=s-o;return i>0&&i<=60},[]),A=r.useCallback(t=>{for(let e=1;e<=7;e++){const s=(t+e)%7,o=p[s],i=f[o];if(i&&i.length>0)return{dayName:d[s].toLowerCase(),isTomorrow:e===1}}return null},[p,f,d]),v=r.useMemo(()=>t=>t.length===0?u:j(t)?`${a} ${x}`:t.map(({from:e,to:s})=>`${e} - ${s}`).join(" | "),[u,j,x,a]);return r.useEffect(()=>{const e=F.default.now().weekday-1;B(e),G(d[e]||"");const s=p[e],o=f[s];if(!o)return;const i=Y();if(j(o)){l(a),c(` | ${x}`),h(!0),m(!1),I(`${a} ${x}`);return}const{open:b,closingTime:M}=Z(o,i);if(b)l(a),c(M?` | ${S} ${M}`:""),h(!0),m(!1);else{const y=_(o,i);if(h(!1),y)H(y,i)?(l(O),c(` | ${N} ${y}`),m(!0)):(l(u),c(` | ${$} ${y}`),m(!1));else{l(u),m(!1);const w=A(e);c(w?w.isTomorrow?` | ${E}`:` | ${T} ${w.dayName}`:"")}}I(v(o))},[N,H,u,S,v,A,j,x,a,f,$,T,O,E,d,p]),n.jsxRuntimeExports.jsxs(C.Col,{fs:"6",fw:"semibold",className:"ui-card-opening rounded shadow text-slate-28",children:[n.jsxRuntimeExports.jsxs(C.Col,{as:"header",className:"ui-card-header",children:[n.jsxRuntimeExports.jsx(P,{className:"text-slate-20 fw-semibold fs-4",children:K}),n.jsxRuntimeExports.jsxs(g.Row,{justifyContent:"space-between",alignItems:"center",style:{backgroundColor:"#F7F2FC"},py:"x16",px:"x24",fw:"bold",fs:"6",className:"rounded",children:[n.jsxRuntimeExports.jsxs("p",{className:"text-slate-28",children:[U,", ",k]}),n.jsxRuntimeExports.jsxs("p",{children:[n.jsxRuntimeExports.jsx("span",{className:V?"text-success":W?"text-warning":"text-error",children:J}),n.jsxRuntimeExports.jsx("span",{className:"fw-regular text-grey-black",children:X})]})]})]}),n.jsxRuntimeExports.jsxs(C.Col,{as:"main",pt:"x32",gap:"x24",children:[n.jsxRuntimeExports.jsx(g.Row,{justifyContent:"space-around",className:"ui-weekdays-container",children:d.map((t,e)=>n.jsxRuntimeExports.jsx(g.Row,{justifyContent:"center",alignItems:"center",className:L.clsx(z===e?"active-day text-primary":"","flex-1"),children:t.charAt(0).toUpperCase()},e))}),n.jsxRuntimeExports.jsxs(g.Row,{justifyContent:"space-between",alignItems:"center",fw:"regular",children:[n.jsxRuntimeExports.jsx("p",{children:k}),n.jsxRuntimeExports.jsx("p",{children:Q})]})]})]})};exports.CardOpeningHours=ee;
|
2
2
|
//# sourceMappingURL=index.cjs36.js.map
|
package/dist/index.cjs36.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs36.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":"qUA4BaA,GAAmB,CAAC,CAC/B,MAAAC,EAAQ,oBACR,SAAUC,EAAW,KACrB,aAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,SACZ,WAAAC,EAAa,OACb,WAAAC,EAAa,SACb,YAAAC,EAAc,eACd,eAAAC,EAAiB,gBACjB,aAAAC,EAAe,YACf,mBAAAC,EAAqB,cACrB,aAAAC,EAAe,OACf,QAAAC,EAAU,OACV,cAAAC,EAAgB,aAClB,IAA6B,CAC3B,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAwB,IAAI,EACxD,CAACC,EAAUC,CAAW,EAAIF,EAAAA,SAAS,EAAE,EACrC,CAACG,EAAkBC,CAAmB,EAAIJ,EAAAA,SAAS,EAAE,EACrD,CAACK,EAAmBC,CAAoB,EAAIN,EAAAA,SAAS,EAAE,EACvD,CAACO,EAAQC,CAAS,EAAIR,EAAAA,SAAS,EAAK,EACpC,CAACS,EAAeC,CAAgB,EAAIV,EAAAA,SAAS,EAAK,EAClD,CAACW,EAAgBC,CAAiB,EAAIZ,EAAAA,SAAS,EAAE,EAEjDa,EAAW,OAAO,OAAO1B,CAAW,EACpC2B,EAAW,OAAO,KAAK3B,CAAW,EAElC4B,EAAoB,IACjBC,UAAS,MAAM,SAAS,OAAO,EAGlCC,EAAsBC,GAA4B,CAChD,KAAA,CAACC,EAAOC,CAAO,EAAIF,EAAQ,MAAM,GAAG,EAAE,IAAI,MAAM,EACtD,OAAOC,EAAQ,GAAKC,CACtB,EAEMC,EAAgBC,EAAA,YACnBC,GAAmBA,EAAK,OAAS,SAAWA,EAAK,KA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GAClD,QACF,EAEC,SAAID,EAAA,OAAO,CAAC,EAAE,YAAY,CAAA,EANtBC,CAQR,CAAA,EACH,EACAL,EAAA,kBAAA,KAACG,EAAA,IAAA,CACC,eAAgB,gBAChB,WAAY,SACZ,GAAI,UAEJ,SAAA,CAAAD,EAAAA,kBAAAA,IAAC,KAAG,SAASrD,CAAA,CAAA,EACbqD,EAAAA,kBAAAA,IAAC,KAAG,SAAkBjD,CAAA,CAAA,CAAA,CAAA,CAAA,CACxB,CACF,CAAA,CAAA,CAAA,CACF,CAEJ"}
|
1
|
+
{"version":3,"file":"index.cjs36.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","cl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,EAAAA,kBAAAA,IAAC,KAAG,SAAkBjD,CAAA,CAAA,CAAA,CAAA,CAAA,CACxB,CACF,CAAA,CAAA,CAAA,CACF,CAEJ"}
|
package/dist/index.cjs368.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),T=require("./index.
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),T=require("./index.cjs457.js"),E=require("./index.cjs456.js"),n=require("./index.cjs295.js"),h=require("./index.cjs455.js"),w=require("./index.cjs475.js"),i=require("./index.cjs243.js");function M(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const l=M(b);var j="AlertDialog",[q,I]=T.createContextScope(j,[n.createDialogScope]),s=n.createDialogScope(),d=e=>{const{__scopeAlertDialog:o,...t}=e,r=s(o);return i.jsxRuntimeExports.jsx(n.Root,{...r,...t,modal:!0})};d.displayName=j;var $="AlertDialogTrigger",_=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,...r}=e,a=s(t);return i.jsxRuntimeExports.jsx(n.Trigger,{...a,...r,ref:o})});_.displayName=$;var L="AlertDialogPortal",A=e=>{const{__scopeAlertDialog:o,...t}=e,r=s(o);return i.jsxRuntimeExports.jsx(n.Portal,{...r,...t})};A.displayName=L;var F="AlertDialogOverlay",D=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,...r}=e,a=s(t);return i.jsxRuntimeExports.jsx(n.Overlay,{...a,...r,ref:o})});D.displayName=F;var c="AlertDialogContent",[G,W]=q(c),Y=w.createSlottable("AlertDialogContent"),v=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,children:r,...a}=e,u=s(t),g=l.useRef(null),P=E.useComposedRefs(o,g),R=l.useRef(null);return i.jsxRuntimeExports.jsx(n.WarningProvider,{contentName:c,titleName:C,docsSlug:"alert-dialog",children:i.jsxRuntimeExports.jsx(G,{scope:t,cancelRef:R,children:i.jsxRuntimeExports.jsxs(n.Content,{role:"alertdialog",...u,...a,ref:P,onOpenAutoFocus:h.composeEventHandlers(a.onOpenAutoFocus,p=>{var y;p.preventDefault(),(y=R.current)==null||y.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[i.jsxRuntimeExports.jsx(Y,{children:r}),i.jsxRuntimeExports.jsx(z,{contentRef:g})]})})})});v.displayName=c;var C="AlertDialogTitle",f=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,...r}=e,a=s(t);return i.jsxRuntimeExports.jsx(n.Title,{...a,...r,ref:o})});f.displayName=C;var N="AlertDialogDescription",x=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,...r}=e,a=s(t);return i.jsxRuntimeExports.jsx(n.Description,{...a,...r,ref:o})});x.displayName=N;var k="AlertDialogAction",S=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,...r}=e,a=s(t);return i.jsxRuntimeExports.jsx(n.Close,{...a,...r,ref:o})});S.displayName=k;var O="AlertDialogCancel",m=l.forwardRef((e,o)=>{const{__scopeAlertDialog:t,...r}=e,{cancelRef:a}=W(O,t),u=s(t),g=E.useComposedRefs(o,a);return i.jsxRuntimeExports.jsx(n.Close,{...u,...r,ref:g})});m.displayName=O;var z=({contentRef:e})=>{const o=`\`${c}\` requires a description for the component to be accessible for screen reader users.
|
2
2
|
|
3
3
|
You can add a description to the \`${c}\` by passing a \`${N}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
4
4
|
|
package/dist/index.cjs37.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/SupportBanner/SupportBanner.css');const e=require("./index.cjs243.js"),t=require("./index.cjs244.js");;/* empty css */const p=require("react"),h=require("./index.cjs284.js"),f=require("./index.cjs10.js"),y=({bannerType:u="outline",title:i,description:o="",titleTag:a="
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/SupportBanner/SupportBanner.css');const e=require("./index.cjs243.js"),t=require("./index.cjs244.js");;/* empty css */const p=require("react"),h=require("./index.cjs284.js"),f=require("./index.cjs10.js"),y=({bannerType:u="outline",title:i,description:o="",titleTag:a="h1",mainLayout:s="layout1",className:c="",classNameTitle:l="",classNameDescription:x="",links:n=[]})=>{const d=p.useMemo(()=>!n||n.length===0?null:n.map((r,m)=>{const b=r.variant??(r.href?"outlineButtonHref":"button"),j=h.CTA_COMPONENTS[b];return e.jsxRuntimeExports.jsx("div",{className:"ui-banner-link",children:j(r)},m)}),[n]);return e.jsxRuntimeExports.jsxs(f.Col,{br:"x4",gap:"x16",className:t.clsx(c,u==="outline"?"ui-outline":"bg-lightblue-a03","ui-banner shadow "),children:[e.jsxRuntimeExports.jsx(a,{className:t.clsx("ui-banner-title text-slate-20",l||"fs-4 fw-bold"),children:i}),e.jsxRuntimeExports.jsxs("main",{className:t.clsx(s==="layout1"?"ui-banner-content-layout1 fs-6 text-secondary justify-content-between ":"ui-banner-content-layout2","ui-banner-content fs-6 text-secondary w-100"),children:[e.jsxRuntimeExports.jsx("div",{className:t.clsx(x,s==="layout1"?"ui-banner-description":""),children:o}),e.jsxRuntimeExports.jsx("div",{className:t.clsx("ui-banner-cta"),children:d})]})]})};exports.SupportBanner=y;
|
2
2
|
//# sourceMappingURL=index.cjs37.js.map
|
package/dist/index.cjs37.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs37.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.cjs37.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","Renderer","CTA_COMPONENTS","jsxs","Col","clsx","jsx"],"mappings":"uQAmBaA,EAAgB,CAAC,CAC5B,WAAAC,EAAa,UACb,MAAAC,EACA,YAAAC,EAAc,GACd,SAAUC,EAAW,KACrB,WAAAC,EAAa,UACb,UAAAC,EAAY,GACZ,eAAAC,EAAiB,GACjB,qBAAAC,EAAuB,GACvB,MAAAC,EAAQ,CAAA,CACV,IAA0B,CAClB,MAAAC,EAAYC,EAAAA,QAAQ,IACpB,CAACF,GAASA,EAAM,SAAW,EAAU,KAClCA,EAAM,IAAI,CAACG,EAAMC,IAAU,CAChC,MAAMC,EACJF,EAAK,UAAYA,EAAK,KAAO,oBAAsB,UAC/CG,EAAWC,iBAAeF,CAAO,EACvC,+BACG,MAAgB,CAAA,UAAU,iBACxB,SAASC,EAAAH,CAAI,GADNC,CAEV,CAAA,CAEH,EACA,CAACJ,CAAK,CAAC,EAGR,OAAAQ,EAAA,kBAAA,KAACC,EAAA,IAAA,CACC,GAAI,KACJ,IAAK,MACL,UAAWC,EAAA,KACTb,EACAL,IAAe,UAAY,aAAe,mBAC1C,mBACF,EAEA,SAAA,CAAAmB,EAAA,kBAAA,IAAChB,EAAA,CACC,UAAWe,EAAA,KACT,gCACAZ,GAAkB,cACpB,EAEC,SAAAL,CAAA,CACH,EACAe,EAAA,kBAAA,KAAC,OAAA,CACC,UAAWE,EAAA,KACTd,IAAe,UACX,yEACA,4BACJ,6CACF,EAEA,SAAA,CAAAe,EAAA,kBAAA,IAAC,MAAA,CACC,UAAWD,EAAA,KACTX,EACAH,IAAe,UAAY,wBAA0B,EACvD,EAEC,SAAAF,CAAA,CACH,0BAEC,MAAI,CAAA,UAAWgB,EAAK,KAAA,eAAe,EAAI,SAAUT,CAAA,CAAA,CAAA,CAAA,CAAA,CACpD,CAAA,CACF,CAEJ"}
|
package/dist/index.cjs414.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css');const o=require("./index.cjs243.js");;/* empty css */const t=({children:e})=>o.jsxRuntimeExports.jsx("footer",{className:"ui-consent-modal-footer bg-white shadow",children:e});exports.CreateReservationModalFooter=t;
|
2
2
|
//# sourceMappingURL=index.cjs414.js.map
|