@solibo/solibo-ui 0.5.9 → 0.5.10
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/assets/index11.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -0
- package/dist/assets/styles.css +1 -1
- package/dist/components/_avatar/index.cjs +1 -1
- package/dist/components/_avatar/index.js +1 -1
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.cjs.map +1 -1
- package/dist/components/_card/index.js +39 -36
- package/dist/components/_card/index.js.map +1 -1
- package/dist/components/_collapsible/index.cjs +1 -1
- package/dist/components/_collapsible/index.js +1 -1
- package/dist/components/_croppable/index.cjs +1 -1
- package/dist/components/_croppable/index.js +1 -1
- package/dist/components/_dropdown/index.cjs +1 -1
- package/dist/components/_dropdown/index.js +3 -3
- package/dist/components/_dropzone/index.cjs +1 -1
- package/dist/components/_dropzone/index.js +1 -1
- package/dist/components/_editor/index.cjs +1 -1
- package/dist/components/_editor/index.js +1 -1
- package/dist/components/_menu/index.cjs +1 -1
- package/dist/components/_menu/index.js +30 -30
- package/dist/components/_messages/index.cjs +1 -1
- package/dist/components/_messages/index.js +1 -1
- package/dist/components/_portal/index.cjs +1 -1
- package/dist/components/_portal/index.js +1 -1
- package/dist/components/_sortable/index.cjs +1 -1
- package/dist/components/_sortable/index.js +1 -1
- package/dist/components/_toasts/index.cjs +1 -1
- package/dist/components/_toasts/index.js +1 -1
- package/dist/components/_widget/index.cjs +1 -1
- package/dist/components/_widget/index.js +1 -1
- package/dist/components/accordion/index.cjs +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.cjs +2 -0
- package/dist/components/button-group/index.cjs.map +1 -0
- package/dist/components/button-group/index.js +33 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +5 -5
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.cjs.map +1 -1
- package/dist/components/popover/index.js +12 -12
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/{index-DXvkoITF.js → index-BDTbPD0V.js} +2 -2
- package/dist/{index-DXvkoITF.js.map → index-BDTbPD0V.js.map} +1 -1
- package/dist/{index-WOhmAd8s.cjs → index-OLuoLabz.cjs} +2 -2
- package/dist/{index-WOhmAd8s.cjs.map → index-OLuoLabz.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +64 -62
- package/dist/index.js.map +1 -1
- package/dist/styles.module-CitJm17A.cjs +2 -0
- package/dist/styles.module-CitJm17A.cjs.map +1 -0
- package/dist/styles.module-Ioe0wPWW.js +9 -0
- package/dist/styles.module-Ioe0wPWW.js.map +1 -0
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/styles.module-BUYR37kC.js +0 -9
- package/dist/styles.module-BUYR37kC.js.map +0 -1
- package/dist/styles.module-DvIhipVo.cjs +0 -2
- package/dist/styles.module-DvIhipVo.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index28.css');const t=require("react/jsx-runtime"),s="_accordion_1vtp0_6",a={accordion:s},d=({children:e,open:c,summary:r})=>{const i=n=>{const o=n.currentTarget.closest("details");!o||!document.startViewTransition||(n.preventDefault(),document.startViewTransition(()=>o.open=!o.open))};return t.jsxs("details",{className:a.accordion,open:c||void 0,"data-component":"accordion",children:[t.jsx("summary",{onClick:i,children:r}),e]})};exports.Accordion=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index29.css');const l=require("react/jsx-runtime"),s=require("../../classix-5H4IWnMA.cjs"),a=require("../link/index.cjs"),t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='24'%20fill='none'%3e%3cpath%20fill='%23000'%20d='M16.705%2012.763c.012-.92.262-1.822.727-2.622a5.5%205.5%200%200%201%201.933-1.954A5.7%205.7%200%200%200%2017.4%206.478a5.8%205.8%200%200%200-2.54-.669c-1.896-.194-3.734%201.107-4.7%201.107-.985%200-2.472-1.088-4.074-1.056a6.1%206.1%200%200%200-2.93.854%205.9%205.9%200%200%200-2.12%202.153c-2.182%203.69-.554%209.114%201.537%2012.097%201.047%201.46%202.27%203.092%203.87%203.035%201.566-.064%202.15-.975%204.04-.975%201.873%200%202.422.974%204.054.938%201.68-.027%202.74-1.468%203.749-2.942A12%2012%200%200%200%2020%2017.612a5.37%205.37%200%200%201-2.395-1.94%205.2%205.2%200%200%201-.9-2.909M13.62%203.847A5.29%205.29%200%200%200%2014.88%200a5.64%205.64%200%200%200-3.621%201.83%205.1%205.1%200%200%200-1.023%201.726%205%205%200%200%200-.268%201.978c.7.007%201.393-.141%202.025-.433a4.6%204.6%200%200%200%201.629-1.254'/%3e%3c/svg%3e",p="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='74'%20height='15'%3e%3cpath%20d='M57.518%2011.41h1.629V.398h-1.629zm14.67-7.045-1.866%204.774h-.056l-1.938-4.774h-1.755l2.906%206.672-1.656%203.712h1.698L74%204.365zm-9.236%205.794c-.534%200-1.278-.269-1.278-.936%200-.849.926-1.175%201.727-1.175.715%200%201.053.156%201.488.369-.127%201.02-.997%201.742-1.937%201.742m.196-6.035c-1.179%200-2.401.524-2.906%201.686l1.446.609c.309-.609.884-.808%201.488-.808.843%200%201.699.51%201.713%201.417v.113c-.295-.17-.926-.425-1.699-.425-1.558%200-3.145.865-3.145%202.48%200%201.473%201.278%202.422%202.71%202.422%201.095%200%201.7-.495%202.078-1.077h.056v.85h1.572V7.17c0-1.954-1.446-3.045-3.313-3.045M53.082%205.705h-2.316V1.931h2.316c1.218%200%201.91%201.017%201.91%201.887%200%20.853-.692%201.887-1.91%201.887M53.04.398h-3.902V11.41h1.628V7.238h2.274c1.805%200%203.58-1.32%203.58-3.42%200-2.101-1.775-3.42-3.58-3.42m-21.282%209.763c-1.125%200-2.067-.95-2.067-2.256%200-1.32.942-2.285%202.067-2.285%201.112%200%201.983.965%201.983%202.285%200%201.305-.871%202.256-1.983%202.256m1.87-5.18h-.056c-.366-.44-1.068-.837-1.954-.837-1.857%200-3.558%201.646-3.558%203.76%200%202.1%201.701%203.733%203.558%203.733.886%200%201.588-.397%201.954-.852h.057v.54c0%201.433-.76%202.2-1.983%202.2-.999%200-1.618-.725-1.87-1.335l-1.421.596c.408.994%201.49%202.214%203.29%202.214%201.913%200%203.53-1.135%203.53-3.902V4.37H33.63zm2.673%206.429h1.631V.397h-1.631zm4.035-3.633c-.042-1.447%201.111-2.185%201.94-2.185.648%200%201.196.326%201.379.794zM45.4%206.528c-.31-.837-1.252-2.384-3.178-2.384-1.913%200-3.501%201.518-3.501%203.747%200%202.1%201.574%203.746%203.683%203.746%201.702%200%202.687-1.05%203.095-1.66l-1.266-.852c-.422.624-.999%201.036-1.829%201.036s-1.42-.384-1.8-1.135l4.964-2.073zM5.85%205.294v1.589h3.768c-.112.894-.407%201.547-.857%202-.549.554-1.407%201.165-2.91%201.165-2.322%200-4.136-1.888-4.136-4.23%200-2.341%201.814-4.228%204.135-4.228%201.252%200%202.166.497%202.84%201.135l1.112-1.121C8.859.696%207.608%200%205.85%200%202.672%200%200%202.612%200%205.819s2.672%205.818%205.85%205.818c1.715%200%203.009-.568%204.021-1.632%201.042-1.05%201.365-2.526%201.365-3.718%200-.37-.028-.71-.085-.993zm9.67%204.867c-1.124%200-2.095-.937-2.095-2.27%200-1.349.97-2.271%202.096-2.271%201.124%200%202.095.922%202.095%202.27%200%201.334-.97%202.27-2.095%202.27m0-6.017c-2.053%200-3.726%201.575-3.726%203.747%200%202.157%201.673%203.746%203.727%203.746s3.726-1.59%203.726-3.746c0-2.172-1.673-3.747-3.726-3.747m8.13%206.017c-1.125%200-2.096-.937-2.096-2.27%200-1.349.97-2.271%202.096-2.271%201.125%200%202.095.922%202.095%202.27%200%201.334-.97%202.27-2.095%202.27m0-6.017c-2.053%200-3.726%201.575-3.726%203.747%200%202.157%201.673%203.746%203.726%203.746s3.726-1.59%203.726-3.746c0-2.172-1.673-3.747-3.726-3.747'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='21'%20height='24'%20fill='none'%3e%3cpath%20fill='%23EA4335'%20d='M9.805%2011.462.09%2022.006l.001.006C.39%2023.158%201.411%2024%202.625%2024c.486%200%20.941-.134%201.332-.37l.03-.018%2010.936-6.453z'/%3e%3cpath%20fill='%23FBBC04'%20d='m19.633%209.666-.009-.006-4.721-2.799-5.32%204.84%205.339%205.457%204.696-2.77A2.7%202.7%200%200%200%2021%2012.022a2.69%202.69%200%200%200-1.367-2.356'/%3e%3cpath%20fill='%234285F4'%20d='M.09%201.993a2.7%202.7%200%200%200-.09.69v18.633q0%20.36.09.69L10.14%2011.73z'/%3e%3cpath%20fill='%2334A853'%20d='m9.877%2012%205.027-5.14L3.982.383A2.6%202.6%200%200%200%202.626%200C1.412%200%20.389.844.09%201.99v.003z'/%3e%3c/svg%3e",i="_apple_zdked_17",h="_google_zdked_49",c={"app-link":"_app-link_zdked_1",apple:i,google:h},n=({label:o,type:e})=>l.jsxs(a.Link,{to:e==="apple"?"https://apps.apple.com/app/6478964287":"https://play.google.com/store/apps/details?id=no.solibo.mobile.home",className:s.t(c["app-link"],c[e]),"data-component":"applink",children:[e==="apple"?l.jsx("img",{src:t,alt:"Apple logo"}):l.jsx("img",{src:g,alt:"Google logo"}),l.jsxs("div",{children:[l.jsx("span",{children:o}),l.jsx("span",{children:e==="google"?l.jsx("img",{src:p,alt:"Google Play logo"}):"App Store"})]})]});exports.AppLink=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { t as a } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Link as s } from "../link/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index29.css';const t = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='24'%20fill='none'%3e%3cpath%20fill='%23000'%20d='M16.705%2012.763c.012-.92.262-1.822.727-2.622a5.5%205.5%200%200%201%201.933-1.954A5.7%205.7%200%200%200%2017.4%206.478a5.8%205.8%200%200%200-2.54-.669c-1.896-.194-3.734%201.107-4.7%201.107-.985%200-2.472-1.088-4.074-1.056a6.1%206.1%200%200%200-2.93.854%205.9%205.9%200%200%200-2.12%202.153c-2.182%203.69-.554%209.114%201.537%2012.097%201.047%201.46%202.27%203.092%203.87%203.035%201.566-.064%202.15-.975%204.04-.975%201.873%200%202.422.974%204.054.938%201.68-.027%202.74-1.468%203.749-2.942A12%2012%200%200%200%2020%2017.612a5.37%205.37%200%200%201-2.395-1.94%205.2%205.2%200%200%201-.9-2.909M13.62%203.847A5.29%205.29%200%200%200%2014.88%200a5.64%205.64%200%200%200-3.621%201.83%205.1%205.1%200%200%200-1.023%201.726%205%205%200%200%200-.268%201.978c.7.007%201.393-.141%202.025-.433a4.6%204.6%200%200%200%201.629-1.254'/%3e%3c/svg%3e", g = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='74'%20height='15'%3e%3cpath%20d='M57.518%2011.41h1.629V.398h-1.629zm14.67-7.045-1.866%204.774h-.056l-1.938-4.774h-1.755l2.906%206.672-1.656%203.712h1.698L74%204.365zm-9.236%205.794c-.534%200-1.278-.269-1.278-.936%200-.849.926-1.175%201.727-1.175.715%200%201.053.156%201.488.369-.127%201.02-.997%201.742-1.937%201.742m.196-6.035c-1.179%200-2.401.524-2.906%201.686l1.446.609c.309-.609.884-.808%201.488-.808.843%200%201.699.51%201.713%201.417v.113c-.295-.17-.926-.425-1.699-.425-1.558%200-3.145.865-3.145%202.48%200%201.473%201.278%202.422%202.71%202.422%201.095%200%201.7-.495%202.078-1.077h.056v.85h1.572V7.17c0-1.954-1.446-3.045-3.313-3.045M53.082%205.705h-2.316V1.931h2.316c1.218%200%201.91%201.017%201.91%201.887%200%20.853-.692%201.887-1.91%201.887M53.04.398h-3.902V11.41h1.628V7.238h2.274c1.805%200%203.58-1.32%203.58-3.42%200-2.101-1.775-3.42-3.58-3.42m-21.282%209.763c-1.125%200-2.067-.95-2.067-2.256%200-1.32.942-2.285%202.067-2.285%201.112%200%201.983.965%201.983%202.285%200%201.305-.871%202.256-1.983%202.256m1.87-5.18h-.056c-.366-.44-1.068-.837-1.954-.837-1.857%200-3.558%201.646-3.558%203.76%200%202.1%201.701%203.733%203.558%203.733.886%200%201.588-.397%201.954-.852h.057v.54c0%201.433-.76%202.2-1.983%202.2-.999%200-1.618-.725-1.87-1.335l-1.421.596c.408.994%201.49%202.214%203.29%202.214%201.913%200%203.53-1.135%203.53-3.902V4.37H33.63zm2.673%206.429h1.631V.397h-1.631zm4.035-3.633c-.042-1.447%201.111-2.185%201.94-2.185.648%200%201.196.326%201.379.794zM45.4%206.528c-.31-.837-1.252-2.384-3.178-2.384-1.913%200-3.501%201.518-3.501%203.747%200%202.1%201.574%203.746%203.683%203.746%201.702%200%202.687-1.05%203.095-1.66l-1.266-.852c-.422.624-.999%201.036-1.829%201.036s-1.42-.384-1.8-1.135l4.964-2.073zM5.85%205.294v1.589h3.768c-.112.894-.407%201.547-.857%202-.549.554-1.407%201.165-2.91%201.165-2.322%200-4.136-1.888-4.136-4.23%200-2.341%201.814-4.228%204.135-4.228%201.252%200%202.166.497%202.84%201.135l1.112-1.121C8.859.696%207.608%200%205.85%200%202.672%200%200%202.612%200%205.819s2.672%205.818%205.85%205.818c1.715%200%203.009-.568%204.021-1.632%201.042-1.05%201.365-2.526%201.365-3.718%200-.37-.028-.71-.085-.993zm9.67%204.867c-1.124%200-2.095-.937-2.095-2.27%200-1.349.97-2.271%202.096-2.271%201.124%200%202.095.922%202.095%202.27%200%201.334-.97%202.27-2.095%202.27m0-6.017c-2.053%200-3.726%201.575-3.726%203.747%200%202.157%201.673%203.746%203.727%203.746s3.726-1.59%203.726-3.746c0-2.172-1.673-3.747-3.726-3.747m8.13%206.017c-1.125%200-2.096-.937-2.096-2.27%200-1.349.97-2.271%202.096-2.271%201.125%200%202.095.922%202.095%202.27%200%201.334-.97%202.27-2.095%202.27m0-6.017c-2.053%200-3.726%201.575-3.726%203.747%200%202.157%201.673%203.746%203.726%203.746s3.726-1.59%203.726-3.746c0-2.172-1.673-3.747-3.726-3.747'/%3e%3c/svg%3e", h = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='21'%20height='24'%20fill='none'%3e%3cpath%20fill='%23EA4335'%20d='M9.805%2011.462.09%2022.006l.001.006C.39%2023.158%201.411%2024%202.625%2024c.486%200%20.941-.134%201.332-.37l.03-.018%2010.936-6.453z'/%3e%3cpath%20fill='%23FBBC04'%20d='m19.633%209.666-.009-.006-4.721-2.799-5.32%204.84%205.339%205.457%204.696-2.77A2.7%202.7%200%200%200%2021%2012.022a2.69%202.69%200%200%200-1.367-2.356'/%3e%3cpath%20fill='%234285F4'%20d='M.09%201.993a2.7%202.7%200%200%200-.09.69v18.633q0%20.36.09.69L10.14%2011.73z'/%3e%3cpath%20fill='%2334A853'%20d='m9.877%2012%205.027-5.14L3.982.383A2.6%202.6%200%200%200%202.626%200C1.412%200%20.389.844.09%201.99v.003z'/%3e%3c/svg%3e", i = "_apple_zdked_17", m = "_google_zdked_49", e = {
|
|
5
5
|
"app-link": "_app-link_zdked_1",
|
|
6
6
|
apple: i,
|
|
7
7
|
google: m
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index30.css');const n=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),d="_aside_mn1ep_1",o="_meta_mn1ep_14",m="_sticky_mn1ep_41",e={aside:d,meta:o,sticky:m},r={default:e.default,meta:e.meta},u=({children:s,className:t,sticky:a=!1,variant:i="default"})=>n.jsx("aside",{className:c.t(t&&t,e.aside,a&&e.sticky,r[i]),"data-component":"aside",children:s});exports.Aside=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { t as n } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index30.css';const o = "_aside_mn1ep_1", c = "_meta_mn1ep_14", d = "_sticky_mn1ep_41", t = {
|
|
4
4
|
aside: o,
|
|
5
5
|
meta: c,
|
|
6
6
|
sticky: d
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const n=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),s=require("../button/index.cjs"),c=require("../icon/index.cjs"),d="_badge_j10be_1",m="_primary_j10be_8",l="_info_j10be_13",e={badge:d,primary:m,info:l},u={default:e.default,info:e.info,primary:e.primary},_=({children:t,deleteAccessibleLabel:i="Remove",onDelete:a,variant:o="default"})=>n.jsxs("span",{className:r.t(e.badge,u[o]),"data-component":"badge",children:[t,a&&n.jsx(s.Button,{"aria-label":i,onClick:a,variant:"minimal",children:n.jsx(c.Icon,{name:"x"})})]});exports.Badge=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as m } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Button as s } from "../button/index.js";
|
|
4
4
|
import { Icon as c } from "../icon/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index31.css';const d = "_badge_j10be_1", f = "_primary_j10be_8", p = "_info_j10be_13", a = {
|
|
6
6
|
badge: d,
|
|
7
7
|
primary: f,
|
|
8
8
|
info: p
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const t=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),b=require("../button/index.cjs"),o="_banner_14108_13",u="_visible_14108_34",r={banner:o,visible:u},d=({button:a,message:s,onClick:e,onDismiss:n,visible:c=!1})=>{const i=()=>{e==null||e(),n==null||n()};return t.jsxs("div",{"aria-live":"assertive",className:l.t(r.banner,c&&r.visible),"data-component":"banner",children:[s,t.jsx(b.Button,{onClick:i,children:a})]})};exports.Banner=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { t as i } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Button as s } from "../button/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index14.css';const v = "_banner_14108_13", _ = "_visible_14108_34", n = {
|
|
5
5
|
banner: v,
|
|
6
6
|
visible: _
|
|
7
7
|
}, m = ({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index32.css');const e=require("react/jsx-runtime"),h=require("../../classix-5H4IWnMA.cjs");function l(a){return`url("data:image/svg+xml, ${encodeURI(a)}")`}const v={logo:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="212.84 265.6 645.02 573.4"><g><path d="m212.84 681.26 8.86-19.64c9.5 6.92 23.67 11.75 37.19 11.75 15.46 0 21.74-5.15 21.74-12.07 0-21.1-65.54-6.6-65.54-48.47 0-19.16 15.46-35.11 47.51-35.11 14.17 0 28.66 3.39 39.13 10l-8.06 19.81c-10.46-6-21.25-8.86-31.24-8.86-15.45 0-21.41 5.8-21.41 12.88 0 20.77 65.54 6.44 65.54 47.82 0 18.84-15.62 34.95-47.83 34.95-17.87 0-35.91-5.32-45.89-13M317.33 636c0-33.5 26.09-58.3 61.68-58.3 35.42 0 61.67 24.64 61.67 58.3s-26.25 58.31-61.68 58.31c-35.59 0-61.68-24.8-61.68-58.29m96.94 0C414.27 614.6 399.14 600 379 600s-35.26 14.6-35.26 36 15.14 36.07 35.27 36.07 35.26-14.66 35.26-36.07m46.04-56.34h26.09v91.46h56.52v21.26h-82.61zm105.3 0h26.09v112.72h-26.09zm156.19 81.96c0 19.48-15.46 30.75-45.08 30.75h-58.3V579.65h55.08c28.18 0 42.67 11.76 42.67 29.31a27.1 27.1 0 0 1-15 24.8c12.56 4 20.61 13.69 20.61 27.86m-77.43-62.32v26.57h25.93c12.72 0 19.64-4.51 19.64-13.36S683 599.3 670.28 599.3Zm51.21 59.58c0-9.5-7.25-14-20.78-14h-30.43v27.86h30.43c13.53 0 20.78-4.19 20.78-13.85M734.51 636c0-33.5 26.09-58.3 61.68-58.3 35.43 0 61.67 24.64 61.67 58.3s-26.24 58.29-61.67 58.29c-35.59 0-61.68-24.8-61.68-58.29m96.94 0c0-21.42-15.13-36.07-35.26-36.07S760.92 614.6 760.92 636s15.14 36.07 35.27 36.07 35.26-14.66 35.26-36.07M535.93 406.9a30.06 30.06 0 1 0-30-30 30.05 30.05 0 0 0 30 30m41.29 72.66v-24.08a41.29 41.29 0 0 0-82.58 0v94.22l28.83-42.58h53.78Z" class="cls-1"/><path d="M675.26 507.22H519.83c-4.07 0 2.55-3.3 2.55-7.36l20-16.14a7.36 7.36 0 0 1 7.36-7.36h94.66a7.37 7.37 0 0 0 7.36-7.36V363.24a7.36 7.36 0 0 0-4-6.55L539 301.09a7.34 7.34 0 0 0-6.72 0L423.74 357a7.37 7.37 0 0 0-4 6.54V469a7.37 7.37 0 0 0 7.37 7.36h29.22v30.86h-60.09a7.37 7.37 0 0 1-7.36-7.36V344.68a7.38 7.38 0 0 1 4-6.55l139.35-71.72a7.37 7.37 0 0 1 6.72 0l139.67 71.4a7.37 7.37 0 0 1 4 6.56v155.5a7.37 7.37 0 0 1-7.36 7.36M380.2 789.7h-53.93v42.19c0 4.76-3.35 5.59-5 5.59s-5-.83-5-5.59v-89.7c0-4.75 3.35-5.59 5-5.59s5 .84 5 5.59v38.29h53.93v-38.29c0-4.75 3.36-5.59 5-5.59s5 .84 5 5.59v89.7c0 4.76-3.35 5.59-5 5.59s-5-.83-5-5.59Zm82.58 49.3c-29.48 0-51.56-21.94-51.56-52s22.08-52 51.56-52 51.56 21.93 51.56 52-22.08 52-51.56 52m0-95.15c-25.43 0-40.94 20.12-40.94 43.17s15.51 43 40.94 43 40.94-20 40.94-43-15.51-43.15-40.94-43.15Zm165.01 93.63c-1.67 0-5-.83-5-5.59v-72.51h-.28l-32.27 73.77a6.53 6.53 0 0 1-12.3 0l-32.3-73.35h-.28v72.09c0 4.76-3.36 5.59-5 5.59s-5-.83-5-5.59v-88.44c0-5.73 4.05-6.85 6.14-6.85s4.75.7 6.85 5.45l35.91 82h.14l35.49-82c2.1-4.75 4.75-5.45 6.85-5.45s6.14 1.12 6.14 6.85v88.44c-.06 4.76-3.41 5.59-5.09 5.59m41.36-48.06v38.14h49c4.2 0 4.89 3.08 4.89 4.48s-.69 4.47-4.89 4.47H665.1c-4.05 0-6-2-6-6v-86.92c0-4.05 2-6 6-6h51.42c4.19 0 4.89 3.07 4.89 4.47s-.7 4.47-4.89 4.47h-47.37v34.1h44c4.2 0 4.89 3.07 4.89 4.33s-.69 4.47-4.89 4.47Z"/></g></svg>'},g="_branding_ganjz_1",i="_white_ganjz_11",c={branding:g,default:"_default_ganjz_7",white:i},r={default:c.default,white:c.white},o=({name:a="logo",size:s=128,variant:t="default"})=>{const n={height:s,maskImage:l(v[a].toString()),width:s};return e.jsx("span",{className:h.t(c.branding,r[t]),style:n,"data-component":"branding"})};exports.Branding=o;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import { t as v } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index32.css';function e(a) {
|
|
4
4
|
return `url("data:image/svg+xml, ${encodeURI(a)}")`;
|
|
5
5
|
}
|
|
6
6
|
const l = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const e=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),c=require("../icon/index.cjs"),d="_button_18vba_1",_="_danger_18vba_23",b="_minimal_18vba_36",p="_primary_18vba_43",t={button:d,danger:_,minimal:b,primary:p},g={danger:t.danger,default:t.default,minimal:t.minimal,primary:t.primary};function y({children:i,className:r,disabled:o=!1,icon:a,onClick:s,ref:m,variant:n="default",...u}){return e.jsxs("button",{className:l.t(t.button,g[n],r),disabled:o,onClick:s,ref:m,type:"button",...u,"data-component":"button",children:[a&&e.jsx(c.Icon,{gap:"right",name:a,size:"small",variant:n==="minimal"||n==="default"?"default":"white"}),i]})}exports.Button=y;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { t as d } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Icon as p } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index33.css';const _ = "_button_18vba_1", b = "_danger_18vba_23", c = "_minimal_18vba_36", f = "_primary_18vba_43", t = {
|
|
5
5
|
button: _,
|
|
6
6
|
danger: b,
|
|
7
7
|
minimal: c,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const i=require("react/jsx-runtime"),u=require("../../classix-5H4IWnMA.cjs"),c=require("react"),l={"button-group":"_button-group_19gda_1"},d={primary:3,danger:2,default:1,minimal:0},p=r=>d[(r==null?void 0:r.props.variant)??"default"],g=({children:r,className:o,...s})=>{const n=r.filter(t=>t!==void 0);if(n.length===0)return null;const a=n.map((t,e)=>({button:t,index:e,rank:p(t)})).sort((t,e)=>t.rank-e.rank||t.index-e.index).map(({button:t,index:e})=>c.cloneElement(t,{key:t.key??e}));return i.jsx("div",{className:u.t(l["button-group"],o),...s,"data-component":"buttongroup",children:a})};exports.ButtonGroup=g;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/button-group/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { cloneElement, type ReactElement } from 'react';\n\nimport { Button, type ButtonProps } from '../button';\nimport styles from './styles.module.css';\n\nconst variantOrder = {\n primary: 3,\n danger: 2,\n default: 1,\n minimal: 0,\n} satisfies Record<NonNullable<ButtonProps['variant']>, number>;\n\ntype ButtonGroupButton = ReactElement<ButtonProps, typeof Button> | undefined;\n\nexport type ButtonGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n children: ButtonGroupButton[];\n};\n\nconst getButtonRank = (button: ButtonGroupButton) =>\n variantOrder[button?.props.variant ?? 'default'];\n\nexport const ButtonGroup = ({ children, className, ...props }: ButtonGroupProps) => {\n const filteredButtons = children.filter((button) => button !== undefined);\n\n if (filteredButtons.length === 0) return null;\n\n const sortedButtons = filteredButtons\n .map((button, index) => ({ button, index, rank: getButtonRank(button) }))\n .sort((a, b) => a.rank - b.rank || a.index - b.index)\n .map(({ button, index }) =>\n cloneElement(button, {\n key: button.key ?? index,\n })\n );\n\n return (\n <div\n className={cx(styles['button-group'], className)}\n {...props}\n >\n {sortedButtons}\n </div>\n );\n};\n"],"names":["variantOrder","primary","danger","default","minimal","getButtonRank","button","props","variant","ButtonGroup","children","className","filteredButtons","filter","undefined","length","sortedButtons","map","index","rank","sort","a","b","cloneElement","key","jsx","cx","styles"],"mappings":"2NAMMA,EAAe,CACnBC,QAAS,EACTC,OAAQ,EACRC,QAAS,EACTC,QAAS,CACX,EAQMC,EAAiBC,GACrBN,GAAaM,GAAAA,YAAAA,EAAQC,MAAMC,UAAW,SAAS,EAEpCC,EAAcA,CAAC,CAAEC,SAAAA,EAAUC,UAAAA,EAAW,GAAGJ,CAAwB,IAAM,CAClF,MAAMK,EAAkBF,EAASG,OAAQP,GAAWA,IAAWQ,MAAS,EAExE,GAAIF,EAAgBG,SAAW,EAAG,OAAO,KAEzC,MAAMC,EAAgBJ,EACnBK,IAAI,CAACX,EAAQY,KAAW,CAAEZ,OAAAA,EAAQY,MAAAA,EAAOC,KAAMd,EAAcC,CAAM,CAAA,EAAI,EACvEc,KAAK,CAACC,EAAGC,IAAMD,EAAEF,KAAOG,EAAEH,MAAQE,EAAEH,MAAQI,EAAEJ,KAAK,EACnDD,IAAI,CAAC,CAAEX,OAAAA,EAAQY,MAAAA,CAAAA,IACdK,EAAAA,aAAajB,EAAQ,CACnBkB,IAAKlB,EAAOkB,KAAON,CAAAA,CACpB,CACH,EAEF,OACEO,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGC,EAAO,cAAc,EAAGhB,CAAS,EAC/C,GAAIJ,EAAM,iBAAA,cAETS,SAAAA,EACH,CAEJ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as p } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { cloneElement as m } from "react";
|
|
4
|
+
import '../../assets/index13.css';const d = {
|
|
5
|
+
"button-group": "_button-group_19gda_1"
|
|
6
|
+
}, l = {
|
|
7
|
+
primary: 3,
|
|
8
|
+
danger: 2,
|
|
9
|
+
default: 1,
|
|
10
|
+
minimal: 0
|
|
11
|
+
}, u = (n) => l[(n == null ? void 0 : n.props.variant) ?? "default"], k = ({
|
|
12
|
+
children: n,
|
|
13
|
+
className: e,
|
|
14
|
+
...a
|
|
15
|
+
}) => {
|
|
16
|
+
const o = n.filter((r) => r !== void 0);
|
|
17
|
+
if (o.length === 0) return null;
|
|
18
|
+
const i = o.map((r, t) => ({
|
|
19
|
+
button: r,
|
|
20
|
+
index: t,
|
|
21
|
+
rank: u(r)
|
|
22
|
+
})).sort((r, t) => r.rank - t.rank || r.index - t.index).map(({
|
|
23
|
+
button: r,
|
|
24
|
+
index: t
|
|
25
|
+
}) => m(r, {
|
|
26
|
+
key: r.key ?? t
|
|
27
|
+
}));
|
|
28
|
+
return /* @__PURE__ */ s("div", { className: p(d["button-group"], e), ...a, "data-component": "buttongroup", children: i });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
k as ButtonGroup
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/button-group/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { cloneElement, type ReactElement } from 'react';\n\nimport { Button, type ButtonProps } from '../button';\nimport styles from './styles.module.css';\n\nconst variantOrder = {\n primary: 3,\n danger: 2,\n default: 1,\n minimal: 0,\n} satisfies Record<NonNullable<ButtonProps['variant']>, number>;\n\ntype ButtonGroupButton = ReactElement<ButtonProps, typeof Button> | undefined;\n\nexport type ButtonGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n children: ButtonGroupButton[];\n};\n\nconst getButtonRank = (button: ButtonGroupButton) =>\n variantOrder[button?.props.variant ?? 'default'];\n\nexport const ButtonGroup = ({ children, className, ...props }: ButtonGroupProps) => {\n const filteredButtons = children.filter((button) => button !== undefined);\n\n if (filteredButtons.length === 0) return null;\n\n const sortedButtons = filteredButtons\n .map((button, index) => ({ button, index, rank: getButtonRank(button) }))\n .sort((a, b) => a.rank - b.rank || a.index - b.index)\n .map(({ button, index }) =>\n cloneElement(button, {\n key: button.key ?? index,\n })\n );\n\n return (\n <div\n className={cx(styles['button-group'], className)}\n {...props}\n >\n {sortedButtons}\n </div>\n );\n};\n"],"names":["variantOrder","primary","danger","default","minimal","getButtonRank","button","props","variant","ButtonGroup","children","className","filteredButtons","filter","undefined","length","sortedButtons","map","index","rank","sort","a","b","cloneElement","key","jsx","cx","styles"],"mappings":";;;;;GAMMA,IAAe;AAAA,EACnBC,SAAS;AAAA,EACTC,QAAQ;AAAA,EACRC,SAAS;AAAA,EACTC,SAAS;AACX,GAQMC,IAAgBA,CAACC,MACrBN,GAAaM,KAAAA,gBAAAA,EAAQC,MAAMC,YAAW,SAAS,GAEpCC,IAAcA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,WAAAA;AAAAA,EAAW,GAAGJ;AAAwB,MAAM;AAClF,QAAMK,IAAkBF,EAASG,OAAQP,CAAAA,MAAWA,MAAWQ,MAAS;AAExE,MAAIF,EAAgBG,WAAW,EAAG,QAAO;AAEzC,QAAMC,IAAgBJ,EACnBK,IAAI,CAACX,GAAQY,OAAW;AAAA,IAAEZ,QAAAA;AAAAA,IAAQY,OAAAA;AAAAA,IAAOC,MAAMd,EAAcC,CAAM;AAAA,EAAA,EAAI,EACvEc,KAAK,CAACC,GAAGC,MAAMD,EAAEF,OAAOG,EAAEH,QAAQE,EAAEH,QAAQI,EAAEJ,KAAK,EACnDD,IAAI,CAAC;AAAA,IAAEX,QAAAA;AAAAA,IAAQY,OAAAA;AAAAA,EAAAA,MACdK,EAAajB,GAAQ;AAAA,IACnBkB,KAAKlB,EAAOkB,OAAON;AAAAA,EAAAA,CACpB,CACH;AAEF,SACE,gBAAAO,EAAC,OAAA,EACC,WAAWC,EAAGC,EAAO,cAAc,GAAGhB,CAAS,GAC/C,GAAIJ,GAAM,kBAAA,eAETS,UAAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index34.css');const e=require("react/jsx-runtime"),x=require("../../icons-o8Z5npPW.cjs"),b=require("../loading/index.cjs"),h="_checkbox_1e5vl_1",k={checkbox:h},l=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:k.checkbox,"data-component":"checkbox",children:[c&&e.jsx(b.Loading,{size:24,sticky:!0}),e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),o&&o]})};exports.Checkbox=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { i as x } from "../../icons-06oXnjRF.js";
|
|
3
3
|
import { Loading as k } from "../loading/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index34.css';const b = "_checkbox_1e5vl_1", m = {
|
|
5
5
|
checkbox: b
|
|
6
6
|
}, d = ({
|
|
7
7
|
checked: t,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const o=require("react/jsx-runtime"),e="_dialog_1qqau_1",s="_wrapper_1qqau_31",r={dialog:e,wrapper:s},c=({children:i,setOpen:a,...l})=>o.jsx("div",{className:r.wrapper,"data-wrapper":!0,onClick:()=>a==null?void 0:a(!1),"data-component":"dialog",children:o.jsx("dialog",{className:r.dialog,onClick:t=>t.stopPropagation(),...l,children:i})});exports.Dialog=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/index11.css';const
|
|
3
|
-
dialog:
|
|
4
|
-
wrapper:
|
|
5
|
-
},
|
|
2
|
+
import '../../assets/index11.css';const c = "_dialog_1qqau_1", d = "_wrapper_1qqau_31", r = {
|
|
3
|
+
dialog: c,
|
|
4
|
+
wrapper: d
|
|
5
|
+
}, s = ({
|
|
6
6
|
children: l,
|
|
7
7
|
setOpen: a,
|
|
8
8
|
...i
|
|
9
9
|
}) => /* @__PURE__ */ o("div", { className: r.wrapper, "data-wrapper": !0, onClick: () => a == null ? void 0 : a(!1), "data-component": "dialog", children: /* @__PURE__ */ o("dialog", { className: r.dialog, onClick: (p) => p.stopPropagation(), ...i, children: l }) });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
s as Dialog
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const s=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),c="_figure_jy92q_1",u="_offset_jy92q_20",r={figure:c,offset:u},f=({accessibleLabel:t,children:i,className:n,offset:e})=>s.jsxs("figure",{className:o.t(r.figure,e&&r.offset,n),style:{...e&&{[`--offset-${e}`]:"calc(var(--utils-tokens-negative-unit) * 2)"}},"data-component":"figure",children:[i,t&&s.jsx("figcaption",{"data-content":"screen-reader",children:t})]});exports.Figure=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { t as n } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index35.css';const c = "_figure_jy92q_1", a = "_offset_jy92q_20", r = {
|
|
4
4
|
figure: c,
|
|
5
5
|
offset: a
|
|
6
6
|
}, m = ({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const r=require("react/jsx-runtime"),m=require("../../classix-5H4IWnMA.cjs"),a="_form_1sine_1",c="_inline_1sine_26",e={form:a,inline:c},l=({animation:o,children:n,className:t,inline:i=!1,...s})=>r.jsx("form",{className:m.t(t,i&&e.inline,e.form),"data-animation":o,...s,"data-component":"form",children:n&&n});exports.Form=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { t as s } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index36.css';const a = "_form_1sine_1", f = "_inline_1sine_26", o = {
|
|
4
4
|
form: a,
|
|
5
5
|
inline: f
|
|
6
6
|
}, _ = ({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index37.css');const r=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),n=require("../../icons-o8Z5npPW.cjs"),l="_icon_1uucz_1",_="_small_1uucz_9",m="_medium_1uucz_14",d="_large_1uucz_19",g="_danger_1uucz_24",p="_primary_1uucz_32",y="_white_1uucz_36",e={icon:l,small:_,medium:m,large:d,danger:g,default:"_default_1uucz_28",primary:p,white:y,"gap-right":"_gap-right_1uucz_40","gap-left":"_gap-left_1uucz_44"},z={large:e.large,medium:e.medium,small:e.small},f={danger:e.danger,default:e.default,primary:e.primary,white:e.white},h=({fill:a,gap:t="none",name:c,size:s="medium",variant:u="default"})=>{const i={maskImage:n.iconSVG(c,a??!1)};return r.jsx("span",{"aria-hidden":"true",className:o.t(t!=="none"&&e[`gap-${t}`],z[s],e.icon,f[u]),style:i,"data-component":"icon"})},w=()=>Object.keys(n.iconPaths);exports.Icon=h;exports.Icons=w;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { t as o } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { i as u, a as m } from "../../icons-06oXnjRF.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index37.css';const _ = "_icon_1uucz_1", l = "_small_1uucz_9", d = "_medium_1uucz_14", g = "_large_1uucz_19", p = "_danger_1uucz_24", f = "_primary_1uucz_32", z = "_white_1uucz_36", a = {
|
|
5
5
|
icon: _,
|
|
6
6
|
small: l,
|
|
7
7
|
medium: d,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("../../classix-5H4IWnMA.cjs"),l=require("react"),P=require("../../icons-o8Z5npPW.cjs"),T=require("../../utils-DBzf7CFq.cjs"),s=require("../../styles.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("../../classix-5H4IWnMA.cjs"),l=require("react"),P=require("../../icons-o8Z5npPW.cjs"),T=require("../../utils-DBzf7CFq.cjs"),s=require("../../styles.module-CitJm17A.cjs");function b({className:C,defaultCountryCode:h="+47",disabled:a=!1,icon:i,label:d,placeholder:m,ref:v,required:c,type:t="text",...e}){const[r,g]=l.useState(""),[o,x]=l.useState(""),{onChange:N,value:j,...q}=e,{touched:S,onBlur:p}=T.useTouched(j===""),f=i&&t!=="radio"&&t!=="datetime-local"?{"--icon-svg":P.iconSVG(i,!0)}:void 0;l.useEffect(()=>{if(typeof e.onChange=="function"&&t==="tel"){const u={name:e.name,value:o?(r||h).split(" ").join("")+o.split(" ").join(""):void 0};e.onChange({target:u,currentTarget:u})}},[r,o]),l.useEffect(()=>{t==="tel"&&!e.value&&(x(""),g(""))},[e.value,t]);const I=n.jsxs(n.Fragment,{children:[n.jsx("input",{disabled:a,hidden:!0,onChange:N,pattern:void 0,placeholder:m,ref:v,type:t,value:j}),n.jsx("input",{type:"text",className:s.inputStyles.input,disabled:a,maxLength:5,onChange:u=>g(u.target.value),placeholder:h,value:r}),n.jsx("input",{type:"tel",className:y.t(s.inputStyles.input,S&&s.inputStyles.touched),"data-icon":i?"true":void 0,disabled:a,maxLength:14,name:void 0,onChange:u=>x(u.target.value),onBlur:p,pattern:e.pattern,required:c,style:f,value:o,...q})]});return n.jsxs("label",{className:s.inputStyles.label,"data-component":"input",children:[d&&n.jsx("span",{"data-required":c||void 0,children:d}),t==="tel"?I:n.jsx("input",{ref:v,className:y.t(s.inputStyles.input,C,S&&s.inputStyles.touched),"data-icon":i?"true":void 0,disabled:a,onBlur:p,placeholder:m,required:c,style:f,type:t,...e})]})}exports.Input=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -3,7 +3,7 @@ import { t as j } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import { useState as S, useEffect as I } from "react";
|
|
4
4
|
import { i as B } from "../../icons-06oXnjRF.js";
|
|
5
5
|
import { u as E } from "../../utils--n2yqjCy.js";
|
|
6
|
-
import { i as a } from "../../styles.module-
|
|
6
|
+
import { i as a } from "../../styles.module-Ioe0wPWW.js";
|
|
7
7
|
function A({
|
|
8
8
|
className: L,
|
|
9
9
|
defaultCountryCode: c = "+47",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const s=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),m="_link_xhd9q_1",o="_primary_xhd9q_7",c="_danger_xhd9q_13",_="_minimal_xhd9q_21",n={link:m,primary:o,danger:c,minimal:_},d=({children:i,className:r,to:e="#",variant:t="primary",...a})=>s.jsx("a",{className:l.t(r,n.link,n[t]),href:e,...a,"data-component":"link",children:i});exports.Link=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index38.css';const s = "_link_xhd9q_1", l = "_primary_xhd9q_7", e = "_danger_xhd9q_13", c = "_minimal_xhd9q_21", n = {
|
|
4
4
|
link: s,
|
|
5
5
|
primary: l,
|
|
6
6
|
danger: e,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const c=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),r=require("../../helpers-BD5fFZi-.cjs"),d="_horizontal_1w5i6_1",w="_list_1w5i6_12",x="_columns_1w5i6_53",s={horizontal:d,list:w,columns:x};function y({children:t,className:a,columns:o=1,horizontal:u,ordered:m,style:h,...l}){const i=Number.isFinite(o)?Math.max(1,Math.floor(o)):1,n=_.t(a,s.list,i>1&&s.columns,u&&s.horizontal),e={...h,"--list-columns":i};return m?c.jsx("ol",{className:n,style:e,...l,"data-component":"list",children:r.wrapChildren(t)}):c.jsx("ul",{className:n,style:e,...l,"data-component":"list",children:r.wrapChildren(t)})}exports.List=y;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { t as u } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { w as r } from "../../helpers-D56OHkFI.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index39.css';const w = "_horizontal_1w5i6_1", f = "_list_1w5i6_12", p = "_columns_1w5i6_53", t = {
|
|
5
5
|
horizontal: w,
|
|
6
6
|
list: f,
|
|
7
7
|
columns: p
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const t=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),d="_loading_2k531_23",l="_spin_2k531_1",_="_ping_2k531_39",r="_sticky_2k531_65",n={loading:d,default:"_default_2k531_28",spin:l,ping:_,sticky:r},g=({variant:o="default",size:s,sticky:a=!1,...e})=>{const c={"--border-size":s?s/8+"px":void 0,"--size":s?s+"px":void 0};return t.jsx("div",{className:i.t(n.loading,a&&n.sticky),"data-component":"loading",children:t.jsx("span",{className:i.t(n.loading,n[o]),style:c,...e})})};exports.Loading=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { t } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index40.css';const l = "_loading_2k531_23", _ = "_spin_2k531_1", p = "_ping_2k531_39", e = "_sticky_2k531_65", o = {
|
|
4
4
|
loading: l,
|
|
5
5
|
default: "_default_2k531_28",
|
|
6
6
|
spin: _,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const s=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),r=require("../icon/index.cjs"),c="_message_1whow_1",m="_preview_1whow_40",t={message:c,preview:m},g=({content:a,id:n,preview:o,type:e="default"})=>s.jsxs("div",{className:i.t(t.message,o&&t.preview),"data-id":n,"data-type":e,"data-component":"message",children:[e=="system"&&s.jsx(r.Icon,{gap:"right",name:"info"}),a]});exports.Message=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { t as i } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Icon as n } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index41.css';const p = "_message_1whow_1", c = "_preview_1whow_40", s = {
|
|
5
5
|
message: p,
|
|
6
6
|
preview: c
|
|
7
7
|
}, _ = ({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const p=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),f=require("react"),v=require("../../icons-o8Z5npPW.cjs"),h="_nav_15tsi_1",b="_horizontal_15tsi_7",g="_tabs_15tsi_17",m="_pills_15tsi_38",t={nav:h,horizontal:b,tabs:g,pills:m},w={default:t.default,pills:t.pills,tabs:t.tabs},q=({animation:i,children:o,className:l,horizontal:e=!1,variant:s="default",...r})=>{const[c,a]=f.useState(!1),u={"--icon-svg":v.iconSVG("chevron")};return p.jsx("nav",{className:_.t(l,e&&t.horizontal,t.nav,w[s]),"data-animation":i,"data-open":c?"true":"false","data-orientation":e?"horizontal":"vertical",onBlurCapture:n=>{if(s!=="pills"||window.innerWidth>960)return;const d=n.relatedTarget;n.currentTarget.contains(d)||a(!1)},onClick:()=>{s!=="pills"||window.innerWidth>960||a(n=>!n)},style:u,...r,"data-component":"nav",children:o})};exports.Nav=q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsx as d } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { useState as m } from "react";
|
|
4
4
|
import { i as u } from "../../icons-06oXnjRF.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index42.css';const v = "_nav_15tsi_1", h = "_horizontal_15tsi_7", b = "_tabs_15tsi_17", w = "_pills_15tsi_38", t = {
|
|
6
6
|
nav: v,
|
|
7
7
|
horizontal: h,
|
|
8
8
|
tabs: b,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const c=require("react/jsx-runtime"),g=require("../../classix-5H4IWnMA.cjs"),o=require("react"),R=require("../button/index.cjs"),x="_popover_ttn4t_1",P="_left_ttn4t_23",k="_right_ttn4t_28",F="_trigger_ttn4t_33",s={popover:x,"popover-panel":"_popover-panel_ttn4t_6",left:P,right:k,trigger:F},b=({children:i,position:_="left",triggerAccessibleLabel:m,triggerAriaHasPopup:y,triggerButtonContent:w})=>{const l=o.useRef(null),u=o.useRef(void 0),p=o.useId(),f=o.useRef(null),[t,d]=o.useState(!1),a=({initialFocus:e}={})=>{u.current=e,d(!0)},n=o.useCallback(({restoreFocus:e=!0}={})=>{var r;d(!1),e&&((r=f.current)==null||r.focus())},[]),h=e=>{t&&e.key==="Escape"&&n()},D=e=>{if(!t){if(e.key==="ArrowDown"){e.preventDefault(),a({initialFocus:"first"});return}e.key==="ArrowUp"&&(e.preventDefault(),a({initialFocus:"last"}))}};return o.useEffect(()=>{if(!t)return;const e=r=>{var v;(v=l.current)!=null&&v.contains(r.target)||n({restoreFocus:!1})};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n,t]),c.jsxs("div",{className:s.popover,onKeyDown:h,onClick:e=>e.stopPropagation(),ref:l,"data-component":"popover",children:[c.jsx(R.Button,{"aria-controls":t?p:void 0,"aria-expanded":t,"aria-haspopup":y,"aria-label":m,className:g.t(s.trigger),onKeyDown:D,onClick:()=>t?n({restoreFocus:!1}):a(),ref:f,variant:"minimal",children:w}),t&&c.jsx("div",{className:g.t(s["popover-panel"],s[_]),id:p,children:typeof i=="function"?i({close:n,initialFocus:u.current,isOpen:t}):i})]})};exports.Popover=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport {\n type AriaAttributes,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { Button } from '@/components/button';\n\nimport styles from './styles.module.css';\n\nexport type PopoverCloseOptions = {\n restoreFocus?: boolean;\n};\n\nexport type PopoverInitialFocus = 'first' | 'last';\n\nexport type PopoverRenderProps = {\n close: (options?: PopoverCloseOptions) => void;\n initialFocus?: PopoverInitialFocus;\n isOpen: boolean;\n};\n\ntype PopoverOpenOptions = {\n initialFocus?: PopoverInitialFocus;\n};\n\nexport type PopoverProps = {\n children: ReactNode | ((props: PopoverRenderProps) => ReactNode);\n position?: 'left' | 'right';\n triggerAccessibleLabel?: string;\n triggerAriaHasPopup?: AriaAttributes['aria-haspopup'];\n triggerButtonContent: ReactNode;\n};\n\nexport const Popover = ({\n children,\n position = 'left',\n triggerAccessibleLabel,\n triggerAriaHasPopup,\n triggerButtonContent,\n}: PopoverProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const initialFocusRef = useRef<PopoverInitialFocus | undefined>(undefined);\n const panelId = useId();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n const openPopover = ({ initialFocus }: PopoverOpenOptions = {}) => {\n initialFocusRef.current = initialFocus;\n setIsOpen(true);\n };\n\n const closePopover = useCallback(({ restoreFocus = true }: PopoverCloseOptions = {}) => {\n setIsOpen(false);\n\n if (restoreFocus) {\n triggerRef.current?.focus();\n }\n }, []);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (isOpen && event.key === 'Escape') {\n closePopover();\n }\n };\n\n const handleTriggerKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (isOpen) {\n return;\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n openPopover({ initialFocus: 'first' });\n return;\n }\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n openPopover({ initialFocus: 'last' });\n }\n };\n\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n const handlePointerDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as Node)) {\n closePopover({ restoreFocus: false });\n }\n };\n\n document.addEventListener('mousedown', handlePointerDown);\n\n return () => {\n document.removeEventListener('mousedown', handlePointerDown);\n };\n }, [closePopover, isOpen]);\n\n return (\n <div\n className={styles.popover}\n onKeyDown={handleKeyDown}\n ref={containerRef}\n >\n <Button\n aria-controls={isOpen ? panelId : undefined}\n aria-expanded={isOpen}\n aria-haspopup={triggerAriaHasPopup}\n aria-label={triggerAccessibleLabel}\n className={cx(styles.trigger)}\n onKeyDown={handleTriggerKeyDown}\n onClick={() => (isOpen ? closePopover({ restoreFocus: false }) : openPopover())}\n ref={triggerRef}\n variant='minimal'\n >\n {triggerButtonContent}\n </Button>\n {isOpen && (\n <div\n className={cx(styles['popover-panel'], styles[position])}\n id={panelId}\n >\n {typeof children === 'function'\n ? children({ close: closePopover, initialFocus: initialFocusRef.current, isOpen })\n : children}\n </div>\n )}\n </div>\n );\n};\n"],"names":["Popover","children","position","triggerAccessibleLabel","triggerAriaHasPopup","triggerButtonContent","containerRef","useRef","initialFocusRef","undefined","panelId","useId","triggerRef","isOpen","setIsOpen","useState","openPopover","initialFocus","current","closePopover","useCallback","restoreFocus","focus","handleKeyDown","event","key","handleTriggerKeyDown","preventDefault","useEffect","handlePointerDown","contains","target","document","addEventListener","removeEventListener","jsxs","styles","popover","jsx","Button","cx","trigger","close"],"mappings":"mXAuCaA,EAAUA,CAAC,CACtBC,SAAAA,EACAC,SAAAA,EAAW,OACXC,uBAAAA,EACAC,oBAAAA,EACAC,qBAAAA,CACY,IAAM,CAClB,MAAMC,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAkBD,EAAAA,OAAwCE,MAAS,EACnEC,EAAUC,EAAAA,MAAAA,EACVC,EAAaL,EAAAA,OAA0B,IAAI,EAC3C,CAACM,EAAQC,CAAS,EAAIC,EAAAA,SAAS,EAAK,EAEpCC,EAAcA,CAAC,CAAEC,aAAAA,CAAAA,EAAqC,KAAO,CACjET,EAAgBU,QAAUD,EAC1BH,EAAU,EAAI,CAChB,EAEMK,EAAeC,EAAAA,YAAY,CAAC,CAAEC,aAAAA,EAAe,EAAA,EAA8B,KAAO,OACtFP,EAAU,EAAK,EAEXO,KACFT,EAAAA,EAAWM,UAAXN,MAAAA,EAAoBU,QAExB,EAAG,CAAA,CAAE,EAECC,EAAiBC,GAA+C,CAChEX,GAAUW,EAAMC,MAAQ,UAC1BN,EAAAA,CAEJ,EAEMO,EAAwBF,GAAkD,CAC9E,GAAIX,CAAAA,EAIJ,IAAIW,EAAMC,MAAQ,YAAa,CAC7BD,EAAMG,eAAAA,EACNX,EAAY,CAAEC,aAAc,OAAA,CAAS,EACrC,MACF,CAEIO,EAAMC,MAAQ,YAChBD,EAAMG,eAAAA,EACNX,EAAY,CAAEC,aAAc,MAAA,CAAQ,GAExC,EAEAW,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAI,CAACf,EACH,OAGF,MAAMgB,EAAqBL,GAAsB,QAC1ClB,EAAAA,EAAaY,UAAbZ,MAAAA,EAAsBwB,SAASN,EAAMO,SACxCZ,EAAa,CAAEE,aAAc,EAAA,CAAO,CAExC,EAEAW,gBAASC,iBAAiB,YAAaJ,CAAiB,EAEjD,IAAM,CACXG,SAASE,oBAAoB,YAAaL,CAAiB,CAC7D,CACF,EAAG,CAACV,EAAcN,CAAM,CAAC,EAGvBsB,EAAAA,KAAC,MAAA,CACC,UAAWC,EAAOC,QAClB,UAAWd,EACX,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport {\n type AriaAttributes,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { Button } from '@/components/button';\n\nimport styles from './styles.module.css';\n\nexport type PopoverCloseOptions = {\n restoreFocus?: boolean;\n};\n\nexport type PopoverInitialFocus = 'first' | 'last';\n\nexport type PopoverRenderProps = {\n close: (options?: PopoverCloseOptions) => void;\n initialFocus?: PopoverInitialFocus;\n isOpen: boolean;\n};\n\ntype PopoverOpenOptions = {\n initialFocus?: PopoverInitialFocus;\n};\n\nexport type PopoverProps = {\n children: ReactNode | ((props: PopoverRenderProps) => ReactNode);\n position?: 'left' | 'right';\n triggerAccessibleLabel?: string;\n triggerAriaHasPopup?: AriaAttributes['aria-haspopup'];\n triggerButtonContent: ReactNode;\n};\n\nexport const Popover = ({\n children,\n position = 'left',\n triggerAccessibleLabel,\n triggerAriaHasPopup,\n triggerButtonContent,\n}: PopoverProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const initialFocusRef = useRef<PopoverInitialFocus | undefined>(undefined);\n const panelId = useId();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n const openPopover = ({ initialFocus }: PopoverOpenOptions = {}) => {\n initialFocusRef.current = initialFocus;\n setIsOpen(true);\n };\n\n const closePopover = useCallback(({ restoreFocus = true }: PopoverCloseOptions = {}) => {\n setIsOpen(false);\n\n if (restoreFocus) {\n triggerRef.current?.focus();\n }\n }, []);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (isOpen && event.key === 'Escape') {\n closePopover();\n }\n };\n\n const handleTriggerKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (isOpen) {\n return;\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n openPopover({ initialFocus: 'first' });\n return;\n }\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n openPopover({ initialFocus: 'last' });\n }\n };\n\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n const handlePointerDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as Node)) {\n closePopover({ restoreFocus: false });\n }\n };\n\n document.addEventListener('mousedown', handlePointerDown);\n\n return () => {\n document.removeEventListener('mousedown', handlePointerDown);\n };\n }, [closePopover, isOpen]);\n\n return (\n <div\n className={styles.popover}\n onKeyDown={handleKeyDown}\n onClick={(e) => e.stopPropagation()}\n ref={containerRef}\n >\n <Button\n aria-controls={isOpen ? panelId : undefined}\n aria-expanded={isOpen}\n aria-haspopup={triggerAriaHasPopup}\n aria-label={triggerAccessibleLabel}\n className={cx(styles.trigger)}\n onKeyDown={handleTriggerKeyDown}\n onClick={() => (isOpen ? closePopover({ restoreFocus: false }) : openPopover())}\n ref={triggerRef}\n variant='minimal'\n >\n {triggerButtonContent}\n </Button>\n {isOpen && (\n <div\n className={cx(styles['popover-panel'], styles[position])}\n id={panelId}\n >\n {typeof children === 'function'\n ? children({ close: closePopover, initialFocus: initialFocusRef.current, isOpen })\n : children}\n </div>\n )}\n </div>\n );\n};\n"],"names":["Popover","children","position","triggerAccessibleLabel","triggerAriaHasPopup","triggerButtonContent","containerRef","useRef","initialFocusRef","undefined","panelId","useId","triggerRef","isOpen","setIsOpen","useState","openPopover","initialFocus","current","closePopover","useCallback","restoreFocus","focus","handleKeyDown","event","key","handleTriggerKeyDown","preventDefault","useEffect","handlePointerDown","contains","target","document","addEventListener","removeEventListener","jsxs","styles","popover","e","stopPropagation","jsx","Button","cx","trigger","close"],"mappings":"mXAuCaA,EAAUA,CAAC,CACtBC,SAAAA,EACAC,SAAAA,EAAW,OACXC,uBAAAA,EACAC,oBAAAA,EACAC,qBAAAA,CACY,IAAM,CAClB,MAAMC,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAkBD,EAAAA,OAAwCE,MAAS,EACnEC,EAAUC,EAAAA,MAAAA,EACVC,EAAaL,EAAAA,OAA0B,IAAI,EAC3C,CAACM,EAAQC,CAAS,EAAIC,EAAAA,SAAS,EAAK,EAEpCC,EAAcA,CAAC,CAAEC,aAAAA,CAAAA,EAAqC,KAAO,CACjET,EAAgBU,QAAUD,EAC1BH,EAAU,EAAI,CAChB,EAEMK,EAAeC,EAAAA,YAAY,CAAC,CAAEC,aAAAA,EAAe,EAAA,EAA8B,KAAO,OACtFP,EAAU,EAAK,EAEXO,KACFT,EAAAA,EAAWM,UAAXN,MAAAA,EAAoBU,QAExB,EAAG,CAAA,CAAE,EAECC,EAAiBC,GAA+C,CAChEX,GAAUW,EAAMC,MAAQ,UAC1BN,EAAAA,CAEJ,EAEMO,EAAwBF,GAAkD,CAC9E,GAAIX,CAAAA,EAIJ,IAAIW,EAAMC,MAAQ,YAAa,CAC7BD,EAAMG,eAAAA,EACNX,EAAY,CAAEC,aAAc,OAAA,CAAS,EACrC,MACF,CAEIO,EAAMC,MAAQ,YAChBD,EAAMG,eAAAA,EACNX,EAAY,CAAEC,aAAc,MAAA,CAAQ,GAExC,EAEAW,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAI,CAACf,EACH,OAGF,MAAMgB,EAAqBL,GAAsB,QAC1ClB,EAAAA,EAAaY,UAAbZ,MAAAA,EAAsBwB,SAASN,EAAMO,SACxCZ,EAAa,CAAEE,aAAc,EAAA,CAAO,CAExC,EAEAW,gBAASC,iBAAiB,YAAaJ,CAAiB,EAEjD,IAAM,CACXG,SAASE,oBAAoB,YAAaL,CAAiB,CAC7D,CACF,EAAG,CAACV,EAAcN,CAAM,CAAC,EAGvBsB,EAAAA,KAAC,MAAA,CACC,UAAWC,EAAOC,QAClB,UAAWd,EACX,QAAUe,GAAMA,EAAEC,kBAClB,IAAKjC,EAAa,iBAAA,UAElB,SAAA,CAAAkC,EAAAA,IAACC,EAAAA,OAAA,CACC,gBAAe5B,EAASH,EAAUD,OAClC,gBAAeI,EACf,gBAAeT,EACf,aAAYD,EACZ,UAAWuC,EAAAA,EAAGN,EAAOO,OAAO,EAC5B,UAAWjB,EACX,QAAS,IAAOb,EAASM,EAAa,CAAEE,aAAc,EAAA,CAAO,EAAIL,EAAAA,EACjE,IAAKJ,EACL,QAAQ,UAEPP,SAAAA,EACH,EACCQ,GACC2B,EAAAA,IAAC,MAAA,CACC,UAAWE,IAAGN,EAAO,eAAe,EAAGA,EAAOlC,CAAQ,CAAC,EACvD,GAAIQ,EAEH,SAAA,OAAOT,GAAa,WACjBA,EAAS,CAAE2C,MAAOzB,EAAcF,aAAcT,EAAgBU,QAASL,OAAAA,CAAAA,CAAQ,EAC/EZ,CAAAA,CACN,CAAA,EAEJ,CAEJ"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as k, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { t as v } from "../../classix-DG18itHa.js";
|
|
3
|
-
import { useRef as a, useId as
|
|
4
|
-
import { Button as
|
|
5
|
-
import '../../assets/
|
|
3
|
+
import { useRef as a, useId as F, useState as P, useCallback as x, useEffect as E } from "react";
|
|
4
|
+
import { Button as K } from "../button/index.js";
|
|
5
|
+
import '../../assets/index43.css';const R = "_popover_ttn4t_1", C = "_left_ttn4t_23", I = "_right_ttn4t_28", N = "_trigger_ttn4t_33", n = {
|
|
6
6
|
popover: R,
|
|
7
7
|
"popover-panel": "_popover-panel_ttn4t_6",
|
|
8
|
-
left:
|
|
9
|
-
right:
|
|
10
|
-
trigger:
|
|
8
|
+
left: C,
|
|
9
|
+
right: I,
|
|
10
|
+
trigger: N
|
|
11
11
|
}, O = ({
|
|
12
12
|
children: s,
|
|
13
13
|
position: g = "left",
|
|
@@ -15,11 +15,11 @@ import '../../assets/index42.css';const R = "_popover_ttn4t_1", I = "_left_ttn4t
|
|
|
15
15
|
triggerAriaHasPopup: w,
|
|
16
16
|
triggerButtonContent: y
|
|
17
17
|
}) => {
|
|
18
|
-
const c = a(null), p = a(void 0), l =
|
|
18
|
+
const c = a(null), p = a(void 0), l = F(), u = a(null), [t, f] = P(!1), i = ({
|
|
19
19
|
initialFocus: e
|
|
20
20
|
} = {}) => {
|
|
21
21
|
p.current = e, f(!0);
|
|
22
|
-
}, o =
|
|
22
|
+
}, o = x(({
|
|
23
23
|
restoreFocus: e = !0
|
|
24
24
|
} = {}) => {
|
|
25
25
|
var r;
|
|
@@ -39,7 +39,7 @@ import '../../assets/index42.css';const R = "_popover_ttn4t_1", I = "_left_ttn4t
|
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return
|
|
42
|
+
return E(() => {
|
|
43
43
|
if (!t)
|
|
44
44
|
return;
|
|
45
45
|
const e = (r) => {
|
|
@@ -51,8 +51,8 @@ import '../../assets/index42.css';const R = "_popover_ttn4t_1", I = "_left_ttn4t
|
|
|
51
51
|
return document.addEventListener("mousedown", e), () => {
|
|
52
52
|
document.removeEventListener("mousedown", e);
|
|
53
53
|
};
|
|
54
|
-
}, [o, t]), /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */ m(
|
|
54
|
+
}, [o, t]), /* @__PURE__ */ k("div", { className: n.popover, onKeyDown: h, onClick: (e) => e.stopPropagation(), ref: c, "data-component": "popover", children: [
|
|
55
|
+
/* @__PURE__ */ m(K, { "aria-controls": t ? l : void 0, "aria-expanded": t, "aria-haspopup": w, "aria-label": _, className: v(n.trigger), onKeyDown: D, onClick: () => t ? o({
|
|
56
56
|
restoreFocus: !1
|
|
57
57
|
}) : i(), ref: u, variant: "minimal", children: y }),
|
|
58
58
|
t && /* @__PURE__ */ m("div", { className: v(n["popover-panel"], n[g]), id: l, children: typeof s == "function" ? s({
|