@solibo/solibo-ui 1.0.14 → 1.0.15
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/index12.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 +0 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -0
- 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 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/menu-popover.css +1 -0
- 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/avatar/index.cjs +1 -1
- package/dist/components/avatar/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/card/index.cjs +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.cjs.map +1 -1
- package/dist/components/chip/index.js +27 -26
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.cjs.map +1 -1
- package/dist/components/controls/index.js +108 -36
- package/dist/components/controls/index.js.map +1 -1
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.cjs.map +1 -1
- package/dist/components/dropdown/index.js +92 -89
- package/dist/components/dropdown/index.js.map +1 -1
- 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 +2 -2
- package/dist/components/empty-state/index.cjs +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/fieldset/index.cjs +1 -1
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.cjs.map +1 -1
- package/dist/components/file/index.js +38 -34
- package/dist/components/file/index.js.map +1 -1
- package/dist/components/footer/index.cjs +1 -1
- package/dist/components/footer/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/index.js +1 -1
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +1 -1
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +2 -2
- package/dist/components/iframe/index.cjs +1 -1
- package/dist/components/iframe/index.js +1 -1
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +3 -3
- 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.cjs.map +1 -1
- package/dist/components/list/index.js +39 -36
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/menu/index.cjs +1 -1
- package/dist/components/menu/index.cjs.map +1 -1
- package/dist/components/menu/index.js +37 -87
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +21 -21
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.cjs.map +1 -1
- package/dist/components/popover/index.js +46 -50
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.cjs.map +1 -1
- package/dist/components/search/index.js +48 -50
- package/dist/components/search/index.js.map +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +3 -3
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.cjs.map +1 -1
- package/dist/components/textarea/index.js +25 -21
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/icons-DaZGJzI0.cjs +2 -0
- package/dist/icons-DaZGJzI0.cjs.map +1 -0
- package/dist/{icons-Bq3diTRm.js → icons-Dj0vEOCB.js} +2 -1
- package/dist/icons-Dj0vEOCB.js.map +1 -0
- package/dist/{index-DwzLUapm.js → index-CgA0NUMD.js} +35 -33
- package/dist/index-CgA0NUMD.js.map +1 -0
- package/dist/index-DE2nzqL5.js +76 -0
- package/dist/index-DE2nzqL5.js.map +1 -0
- package/dist/index-DF8JisYI.cjs +2 -0
- package/dist/index-DF8JisYI.cjs.map +1 -0
- package/dist/index-Dn1v0qm6.cjs +2 -0
- package/dist/index-Dn1v0qm6.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +30 -9
- package/dist/index.js +2 -2
- package/dist/menu-popover-SiOOwab-.js +74 -0
- package/dist/menu-popover-SiOOwab-.js.map +1 -0
- package/dist/menu-popover-jTTxzTGZ.cjs +2 -0
- package/dist/menu-popover-jTTxzTGZ.cjs.map +1 -0
- package/dist/tokens.json +1 -1
- package/dist/use-touched-B999bBr8.js +20 -0
- package/dist/use-touched-B999bBr8.js.map +1 -0
- package/dist/use-touched-Bq5Gjbpz.cjs +2 -0
- package/dist/use-touched-Bq5Gjbpz.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/assets/index52.css +0 -1
- package/dist/icons-Bq3diTRm.js.map +0 -1
- package/dist/icons-ovA21Oao.cjs +0 -2
- package/dist/icons-ovA21Oao.cjs.map +0 -1
- package/dist/index-BcY9DZZ8.cjs +0 -2
- package/dist/index-BcY9DZZ8.cjs.map +0 -1
- package/dist/index-CjI8oRpS.cjs +0 -2
- package/dist/index-CjI8oRpS.cjs.map +0 -1
- package/dist/index-ClZkChEh.js +0 -73
- package/dist/index-ClZkChEh.js.map +0 -1
- package/dist/index-DwzLUapm.js.map +0 -1
- package/dist/use-touched-DXIJVVzz.js +0 -14
- package/dist/use-touched-DXIJVVzz.js.map +0 -1
- package/dist/use-touched-D_TJ8wDc.cjs +0 -2
- package/dist/use-touched-D_TJ8wDc.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/index23.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='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",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",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:p,alt:"Google logo"}),l.jsxs("div",{children:[l.jsx("span",{children:o}),l.jsx("span",{children:e==="google"?l.jsx("img",{src:g,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/index23.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='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", h = "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", 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/index24.css');const s=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),_=require("react"),b=require("../button/index.cjs"),f=require("../icon/index.cjs"),p="_aside_19eaa_3",x="_sidebar_19eaa_9",y="_sticky_19eaa_28",k="_open_19eaa_65",e={aside:p,sidebar:x,sticky:y,open:k},m={default:e.default,sidebar:e.sidebar},g=({children:c,className:n,sticky:d=!1,variant:a="default"})=>{const[t,i]=_.useState(!1);return s.jsxs("aside",{className:l.t(n&&n,t&&e.open,e.aside,d&&e.sticky,m[a]),onClick:u=>{var r;const o=u.target.closest("a[href]");o&&!((r=o.getAttribute("href"))!=null&&r.startsWith("#"))&&i(!1)},"data-component":"aside",children:[a==="sidebar"&&s.jsx(b.Button,{"data-sidebar-toggle":"true",onClick:()=>i(!t),variant:"tertiary",children:s.jsx(f.Icon,{name:t?"x":"menu"})}),c]})};exports.Aside=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -3,7 +3,7 @@ import { t as m } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import { useState as p } from "react";
|
|
4
4
|
import { Button as _ } from "../button/index.js";
|
|
5
5
|
import { Icon as u } from "../icon/index.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index24.css';const b = "_aside_19eaa_3", k = "_sidebar_19eaa_9", y = "_sticky_19eaa_28", h = "_open_19eaa_65", e = {
|
|
7
7
|
aside: b,
|
|
8
8
|
sidebar: k,
|
|
9
9
|
sticky: y,
|
|
@@ -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/index25.css');const e=require("react/jsx-runtime"),g=require("../../classix-5H4IWnMA.cjs"),p=require("../figure/index.cjs"),u=require("../icon/index.cjs"),h=require("../link/index.cjs"),v="_avatar_lcj2e_1",N="_small_lcj2e_10",b="_medium_lcj2e_14",y="_large_lcj2e_18",f="_media_lcj2e_22",k="_details_lcj2e_46",q="_secondary_lcj2e_66",A="_text_lcj2e_74",I="_role_lcj2e_81",L="_initials_lcj2e_106",S="_link_lcj2e_122",l={avatar:v,small:N,medium:b,large:y,media:f,details:k,secondary:q,text:A,role:I,"role-name":"_role-name_lcj2e_82",initials:L,link:S,"color-1":"_color-1_lcj2e_130","color-solibo":"_color-solibo_lcj2e_131","color-2":"_color-2_lcj2e_138","color-board":"_color-board_lcj2e_139","color-3":"_color-3_lcj2e_146","color-owner":"_color-owner_lcj2e_147","color-4":"_color-4_lcj2e_154","color-renter":"_color-renter_lcj2e_155","color-5":"_color-5_lcj2e_162","color-external":"_color-external_lcj2e_163"},$={large:l.large,medium:l.medium,small:l.small},x={large:"large",medium:"medium",small:"medium"},w=i=>{const a=i.trim().split(/\s+/).filter(Boolean),n=Array.from(a[0]??"")[0]??"",t=a.length>1?Array.from(a[a.length-1])[0]:"";return`${n}${t}`.toLocaleUpperCase()},F=({accessibleLabel:i,color:a,icon:n,imageUrl:t,link:_,name:o,role:s,size:c="small",text:r})=>{const m=i||o||"User Avatar",d=o?w(o):"",j=e.jsxs("div",{className:g.t(l.avatar,$[c],a&&l[`color-${a}`]),"data-color":a,"data-size":c,children:[e.jsx("span",{className:l.media,children:e.jsx(p.Figure,{accessibleLabel:m,children:n?e.jsx(u.Icon,{name:n,size:x[c]}):t?e.jsx("img",{src:t,alt:m}):d?e.jsx("span",{"aria-hidden":"true",className:l.initials,children:d}):e.jsx(u.Icon,{name:"user",size:x[c]})})}),(o||s||r)&&e.jsxs("span",{className:l.details,children:[o&&e.jsx("strong",{children:o}),c==="small"&&(r||s)&&e.jsxs("span",{className:l.text,children:[r,r&&s&&" | ",s&&e.jsx("span",{className:l["role-name"],children:s})]}),c==="medium"&&e.jsxs("span",{className:l.secondary,children:[r&&e.jsx("span",{className:l.text,children:r}),s&&e.jsx("span",{className:l.role,children:s})]}),c==="large"&&s&&e.jsx("span",{className:l.role,children:s}),c==="large"&&r&&e.jsx("span",{className:l.text,children:r})]})]});return _?e.jsx(h.Link,{className:l.link,to:_,"data-component":"avatar",children:j}):j};exports.Avatar=F;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -3,7 +3,7 @@ import { t as u } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import { Figure as N } from "../figure/index.js";
|
|
4
4
|
import { Icon as h } from "../icon/index.js";
|
|
5
5
|
import { Link as v } from "../link/index.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index25.css';const f = "_avatar_lcj2e_1", b = "_small_lcj2e_10", y = "_medium_lcj2e_14", k = "_large_lcj2e_18", x = "_media_lcj2e_22", A = "_details_lcj2e_46", I = "_secondary_lcj2e_66", L = "_text_lcj2e_74", $ = "_role_lcj2e_81", w = "_initials_lcj2e_106", F = "_link_lcj2e_122", l = {
|
|
7
7
|
avatar: f,
|
|
8
8
|
small: b,
|
|
9
9
|
medium: y,
|
|
@@ -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/index26.css');const l=require("react/jsx-runtime"),a=require("../../classix-5H4IWnMA.cjs"),s=require("../icon/index.cjs"),t="_badge_v112x_1",i="_highlight_v112x_18",g="_info_v112x_24",x="_primary_v112x_29",u="_success_v112x_34",v="_warning_v112x_39",o={badge:t,highlight:i,info:g,primary:x,success:u,warning:v,"color-1":"_color-1_v112x_44","color-2":"_color-2_v112x_49","color-yellow":"_color-yellow_v112x_50","color-3":"_color-3_v112x_55","color-peach":"_color-peach_v112x_56","color-4":"_color-4_v112x_61","color-magenta":"_color-magenta_v112x_62","color-5":"_color-5_v112x_67","color-purple":"_color-purple_v112x_68","color-6":"_color-6_v112x_73","color-blue":"_color-blue_v112x_74","color-7":"_color-7_v112x_79","color-green":"_color-green_v112x_80"},h={default:o.default,highlight:o.highlight,info:o.info,primary:o.primary,success:o.success,warning:o.warning},m=({color:e,children:_,icon:r,position:c="left",variant:n="default"})=>_===0||_==null?null:l.jsxs("span",{className:a.t(o.badge,h[n],e&&o[`color-${e}`]),"data-component":"badge",children:[r&&c=="left"&&l.jsx(s.Icon,{fill:!0,name:r,size:"small"}),l.jsx("span",{children:_}),r&&c=="right"&&l.jsx(s.Icon,{fill:!0,name:r,size:"small"})]});exports.Badge=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import { t } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Icon as a } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index26.css';const i = "_badge_v112x_1", g = "_highlight_v112x_18", x = "_info_v112x_24", v = "_primary_v112x_29", m = "_success_v112x_34", u = "_warning_v112x_39", o = {
|
|
5
5
|
badge: i,
|
|
6
6
|
highlight: g,
|
|
7
7
|
info: x,
|
|
@@ -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/index27.css');const t=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),b=require("../button/index.cjs"),o="_banner_3qfpn_13",u="_visible_3qfpn_32",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 p } from "../button/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index27.css';const s = "_banner_3qfpn_13", v = "_visible_3qfpn_32", r = {
|
|
5
5
|
banner: s,
|
|
6
6
|
visible: v
|
|
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/index28.css');const e=require("react/jsx-runtime"),h=require("../../classix-5H4IWnMA.cjs"),l="_branding_ganjz_1",v="_white_ganjz_11",c={branding:l,default:"_default_ganjz_7",white:v};function g(a){return`url("data:image/svg+xml, ${encodeURI(a)}")`}const i={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>'},r={default:c.default,white:c.white},o=({name:a="logo",size:s=128,variant:t="default"})=>{const n={height:s,maskImage:g(i[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/index28.css';const e = "_branding_ganjz_1", l = "_white_ganjz_11", c = {
|
|
4
4
|
branding: e,
|
|
5
5
|
default: "_default_ganjz_7",
|
|
6
6
|
white: 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/index29.css');const e=require("react/jsx-runtime"),y=require("../../classix-5H4IWnMA.cjs"),l=require("../badge/index.cjs"),m=require("../icon/index.cjs"),p="_button_15qef_1",g="_simple_15qef_29",b="_danger_15qef_38",f="_tertiary_15qef_47",q="_primary_15qef_54",x="_secondary_15qef_63",t={button:p,simple:g,danger:b,tertiary:f,primary:q,secondary:x},h={danger:t.danger,primary:t.primary,secondary:t.secondary,simple:t.simple,tertiary:t.tertiary};function j({badge:s,children:n,className:o,disabled:a=!1,icon:r,iconSize:i="small",onClick:c,ref:_,variant:d="secondary",...u}){return e.jsxs("button",{className:y.t(t.button,h[d],o),disabled:a,onClick:c,ref:_,type:"button",...u,"data-component":"button",children:[r&&e.jsx(m.Icon,{fill:!0,gap:n?"right":void 0,name:r,size:i}),n,e.jsx(l.Badge,{variant:"highlight",children:s})]})}exports.Button=j;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as _, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as d } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Badge as l } from "../badge/index.js";
|
|
4
4
|
import { Icon as f } from "../icon/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index29.css';const u = "_button_15qef_1", g = "_simple_15qef_29", b = "_danger_15qef_38", q = "_tertiary_15qef_47", h = "_primary_15qef_54", v = "_secondary_15qef_63", t = {
|
|
6
6
|
button: u,
|
|
7
7
|
simple: g,
|
|
8
8
|
danger: 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/index30.css');const n=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),j=require("../badge/index.cjs"),f=require("../checkbox/index.cjs"),g=require("../figure/index.cjs"),v=require("../icon/index.cjs"),w="_card_1nm90_1",h="_head_1nm90_28",N="_center_1nm90_40",q="_content_1nm90_52",y="_preview_1nm90_58",b="_margin_1nm90_98",T="_clickable_1nm90_143",k="_muted_1nm90_158",D="_selected_1nm90_163",e={card:w,head:h,center:N,content:q,preview:y,"preview-leading":"_preview-leading_1nm90_69","preview-trailing":"_preview-trailing_1nm90_70","preview-content":"_preview-content_1nm90_90",margin:b,clickable:T,muted:k,selected:D,"image-top":"_image-top_1nm90_168","image-left":"_image-left_1nm90_179"},E=({actions:x,badge:_,checkbox:c,children:o,emphasis:u="default",header:d,icon:p,image:s,imagePosition:r="top",onClick:a,preview:m,variant:i="default"})=>n.jsxs("article",{className:l.t(e.card,u==="muted"&&e.muted,a&&e.clickable,(c==null?void 0:c.checked)&&e.selected),"data-emphasis":u,"data-minimal":i==="minimal",onClick:a,onKeyDown:t=>{a&&t.currentTarget===document.activeElement&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.currentTarget.click())},tabIndex:a?0:-1,"data-component":"card",children:[s&&i!=="minimal"&&r==="top"&&n.jsx(g.Figure,{className:e[`image-${r}`],children:s}),n.jsxs("section",{children:[n.jsxs("div",{className:l.t(e.head,i==="minimal"&&e.center),children:[c&&n.jsx("span",{onClick:t=>t.stopPropagation(),children:n.jsx(f.Checkbox,{...c})}),s&&i!=="minimal"&&r==="left"&&n.jsx(g.Figure,{className:e[`image-${r}`],children:s}),d,_&&n.jsx(j.Badge,{..._}),p&&n.jsx(v.Icon,{name:p,size:"medium"}),x]}),o&&i!=="minimal"&&n.jsx("div",{className:l.t(e.content,!!d&&e.margin),children:o}),m&&i!=="minimal"&&n.jsxs("div",{className:l.t(e.preview,!!d&&e.margin),children:[n.jsx("span",{className:e["preview-leading"],children:m.leading}),n.jsx("span",{className:e["preview-content"],children:m.children}),n.jsx("span",{className:e["preview-trailing"],children:m.trailing})]})]})]});exports.Card=E;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -4,7 +4,7 @@ import { Badge as v } from "../badge/index.js";
|
|
|
4
4
|
import { Checkbox as N } from "../checkbox/index.js";
|
|
5
5
|
import { Figure as f } from "../figure/index.js";
|
|
6
6
|
import { Icon as h } from "../icon/index.js";
|
|
7
|
-
import '../../assets/
|
|
7
|
+
import '../../assets/index30.css';const y = "_card_1nm90_1", j = "_head_1nm90_28", D = "_center_1nm90_40", E = "_content_1nm90_52", I = "_preview_1nm90_58", T = "_margin_1nm90_98", $ = "_clickable_1nm90_143", k = "_muted_1nm90_158", z = "_selected_1nm90_163", e = {
|
|
8
8
|
card: y,
|
|
9
9
|
head: j,
|
|
10
10
|
center: 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 e=require("react/jsx-runtime"),x=require("../../icons-DaZGJzI0.cjs"),b=require("../loading/index.cjs"),h="_checkbox_1glqu_3",u={checkbox:h},k=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:u.checkbox,"data-component":"checkbox",children:[e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),c&&e.jsx(b.Loading,{size:16,sticky:!0}),o&&o]})};exports.Checkbox=k;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { i as x } from "../../icons-
|
|
2
|
+
import { i as x } from "../../icons-Dj0vEOCB.js";
|
|
3
3
|
import { Loading as k } from "../loading/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index31.css';const b = "_checkbox_1glqu_3", 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/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index32.css');const e=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),p=require("../icon/index.cjs"),d=require("../button/index.cjs"),_=require("../link/index.cjs"),u="_chip_1apyw_3",k="_clickable_1apyw_24",x="_divider_1apyw_45",m="_link_1apyw_53",i={chip:u,clickable:k,delete:"_delete_1apyw_41",divider:x,link:m},h=({accessibleLabel:s,className:o,label:t,link:a,onDelete:l,...r})=>e.jsx(e.Fragment,{children:a?e.jsxs("span",{className:c.t(i.chip,o),...r,children:[e.jsx(_.Link,{className:c.t(i.link,i.clickable),onClick:n=>n.stopPropagation(),to:a,children:t}),e.jsx("span",{"aria-hidden":"true",className:i.divider}),e.jsx(d.Button,{"aria-label":s??`Delete ${t}`,className:c.t(i.delete,i.clickable),icon:"x",onClick:n=>{n.stopPropagation(),l()},variant:"simple"})]}):e.jsxs("button",{...r,"aria-label":s??`Delete ${t}`,className:c.t(i.chip,i.clickable,o),onClick:n=>{n.stopPropagation(),l()},type:"button",children:[t,e.jsx(p.Icon,{name:"x",size:"small"})]})});exports.Chip=h;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/chip/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { Icon } from '@/components/icon';\n\nimport { Button } from '../button';\nimport { Link } from '../link';\nimport styles from './styles.module.css';\n\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/chip/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { Icon } from '@/components/icon';\n\nimport { Button } from '../button';\nimport { Link } from '../link';\nimport styles from './styles.module.css';\n\ntype ChipSharedProps = {\n accessibleLabel?: string;\n label: string;\n onDelete: () => void;\n};\n\ntype LinkedChipProps = Omit<ComponentPropsWithoutRef<'span'>, 'children'> &\n ChipSharedProps & {\n link: string;\n };\n\ntype UnlinkedChipAttributes = Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'onClick'>;\n\ntype UnlinkedChipProps = UnlinkedChipAttributes &\n ChipSharedProps & {\n link?: undefined;\n };\n\nexport type ChipProps = LinkedChipProps | UnlinkedChipProps;\n\nexport const Chip = ({ accessibleLabel, className, label, link, onDelete, ...props }: ChipProps) => {\n return (\n <>\n {link ? (\n <span\n className={cx(styles.chip, className)}\n {...props}\n >\n <Link\n className={cx(styles.link, styles.clickable)}\n onClick={(event) => event.stopPropagation()}\n to={link}\n >\n {label}\n </Link>\n <span\n aria-hidden='true'\n className={styles.divider}\n />\n <Button\n aria-label={accessibleLabel ?? `Delete ${label}`}\n className={cx(styles.delete, styles.clickable)}\n icon='x'\n onClick={(event) => {\n event.stopPropagation();\n onDelete();\n }}\n variant='simple'\n />\n </span>\n ) : (\n <button\n {...(props as UnlinkedChipAttributes)}\n aria-label={accessibleLabel ?? `Delete ${label}`}\n className={cx(styles.chip, styles.clickable, className)}\n onClick={(event) => {\n event.stopPropagation();\n onDelete();\n }}\n type='button'\n >\n {label}\n <Icon\n name='x'\n size='small'\n />\n </button>\n )}\n </>\n );\n};\n"],"names":["Chip","accessibleLabel","className","label","link","onDelete","props","jsx","Fragment","jsxs","cx","styles","chip","Link","clickable","event","stopPropagation","divider","Button","delete","Icon"],"mappings":"iZA6BaA,EAAOA,CAAC,CAAEC,gBAAAA,EAAiBC,UAAAA,EAAWC,MAAAA,EAAOC,KAAAA,EAAMC,SAAAA,EAAU,GAAGC,CAAiB,IAE1FC,EAAAA,IAAAC,EAAAA,SAAA,CACGJ,SAAAA,EACCK,EAAAA,KAAC,OAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,KAAMV,CAAS,EACpC,GAAII,EAEJ,SAAA,CAAAC,MAACM,EAAAA,KAAA,CACC,UAAWH,EAAAA,EAAGC,EAAOP,KAAMO,EAAOG,SAAS,EAC3C,WAAoBC,EAAMC,gBAAAA,EAC1B,GAAIZ,EAEHD,SAAAA,EACH,QACC,OAAA,CACC,cAAY,OACZ,UAAWQ,EAAOM,QAAQ,QAE3BC,EAAAA,OAAA,CACC,aAAYjB,GAAmB,UAAUE,CAAK,GAC9C,UAAWO,EAAAA,EAAGC,EAAOQ,OAAQR,EAAOG,SAAS,EAC7C,KAAK,IACL,QAAUC,GAAU,CAClBA,EAAMC,gBAAAA,EACNX,EAAAA,CACF,EACA,QAAQ,QAAA,CAAQ,CAAA,EAEpB,EAEAI,OAAC,SAAA,IACMH,EACL,aAAYL,GAAmB,UAAUE,CAAK,GAC9C,UAAWO,EAAAA,EAAGC,EAAOC,KAAMD,EAAOG,UAAWZ,CAAS,EACtD,QAAUa,GAAU,CAClBA,EAAMC,gBAAAA,EACNX,EAAAA,CACF,EACA,KAAK,SAEJF,SAAAA,CAAAA,EACDI,EAAAA,IAACa,EAAAA,KAAA,CACC,KAAK,IACL,KAAK,OAAA,CAAO,CAAA,CAAA,CAEhB,CAAA,CAEJ"}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Button as
|
|
1
|
+
import { jsx as t, Fragment as m, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Icon as d } from "../icon/index.js";
|
|
4
|
+
import { Button as _ } from "../button/index.js";
|
|
5
5
|
import { Link as k } from "../link/index.js";
|
|
6
|
-
import '../../assets/
|
|
7
|
-
chip:
|
|
8
|
-
clickable:
|
|
9
|
-
delete: "
|
|
10
|
-
divider:
|
|
11
|
-
link:
|
|
12
|
-
},
|
|
6
|
+
import '../../assets/index32.css';const h = "_chip_1apyw_3", y = "_clickable_1apyw_24", b = "_divider_1apyw_45", f = "_link_1apyw_53", i = {
|
|
7
|
+
chip: h,
|
|
8
|
+
clickable: y,
|
|
9
|
+
delete: "_delete_1apyw_41",
|
|
10
|
+
divider: b,
|
|
11
|
+
link: f
|
|
12
|
+
}, C = ({
|
|
13
13
|
accessibleLabel: o,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
14
|
+
className: n,
|
|
15
|
+
label: a,
|
|
16
|
+
link: l,
|
|
17
|
+
onDelete: r,
|
|
18
|
+
...p
|
|
19
|
+
}) => /* @__PURE__ */ t(m, { children: l ? /* @__PURE__ */ s("span", { className: c(i.chip, n), ...p, children: [
|
|
20
|
+
/* @__PURE__ */ t(k, { className: c(i.link, i.clickable), onClick: (e) => e.stopPropagation(), to: l, children: a }),
|
|
21
|
+
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: i.divider }),
|
|
22
|
+
/* @__PURE__ */ t(_, { "aria-label": o ?? `Delete ${a}`, className: c(i.delete, i.clickable), icon: "x", onClick: (e) => {
|
|
23
|
+
e.stopPropagation(), r();
|
|
23
24
|
}, variant: "simple" })
|
|
24
|
-
] }) : /* @__PURE__ */
|
|
25
|
-
e.stopPropagation(),
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */
|
|
25
|
+
] }) : /* @__PURE__ */ s("button", { ...p, "aria-label": o ?? `Delete ${a}`, className: c(i.chip, i.clickable, n), onClick: (e) => {
|
|
26
|
+
e.stopPropagation(), r();
|
|
27
|
+
}, type: "button", children: [
|
|
28
|
+
a,
|
|
29
|
+
/* @__PURE__ */ t(d, { name: "x", size: "small" })
|
|
29
30
|
] }) });
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
C as Chip
|
|
32
33
|
};
|
|
33
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/chip/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { Icon } from '@/components/icon';\n\nimport { Button } from '../button';\nimport { Link } from '../link';\nimport styles from './styles.module.css';\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/chip/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { Icon } from '@/components/icon';\n\nimport { Button } from '../button';\nimport { Link } from '../link';\nimport styles from './styles.module.css';\n\ntype ChipSharedProps = {\n accessibleLabel?: string;\n label: string;\n onDelete: () => void;\n};\n\ntype LinkedChipProps = Omit<ComponentPropsWithoutRef<'span'>, 'children'> &\n ChipSharedProps & {\n link: string;\n };\n\ntype UnlinkedChipAttributes = Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'onClick'>;\n\ntype UnlinkedChipProps = UnlinkedChipAttributes &\n ChipSharedProps & {\n link?: undefined;\n };\n\nexport type ChipProps = LinkedChipProps | UnlinkedChipProps;\n\nexport const Chip = ({ accessibleLabel, className, label, link, onDelete, ...props }: ChipProps) => {\n return (\n <>\n {link ? (\n <span\n className={cx(styles.chip, className)}\n {...props}\n >\n <Link\n className={cx(styles.link, styles.clickable)}\n onClick={(event) => event.stopPropagation()}\n to={link}\n >\n {label}\n </Link>\n <span\n aria-hidden='true'\n className={styles.divider}\n />\n <Button\n aria-label={accessibleLabel ?? `Delete ${label}`}\n className={cx(styles.delete, styles.clickable)}\n icon='x'\n onClick={(event) => {\n event.stopPropagation();\n onDelete();\n }}\n variant='simple'\n />\n </span>\n ) : (\n <button\n {...(props as UnlinkedChipAttributes)}\n aria-label={accessibleLabel ?? `Delete ${label}`}\n className={cx(styles.chip, styles.clickable, className)}\n onClick={(event) => {\n event.stopPropagation();\n onDelete();\n }}\n type='button'\n >\n {label}\n <Icon\n name='x'\n size='small'\n />\n </button>\n )}\n </>\n );\n};\n"],"names":["Chip","accessibleLabel","className","label","link","onDelete","props","jsx","Fragment","jsxs","cx","styles","chip","Link","clickable","event","stopPropagation","divider","Button","delete","Icon"],"mappings":";;;;;;;;;;;GA6BaA,IAAOA,CAAC;AAAA,EAAEC,iBAAAA;AAAAA,EAAiBC,WAAAA;AAAAA,EAAWC,OAAAA;AAAAA,EAAOC,MAAAA;AAAAA,EAAMC,UAAAA;AAAAA,EAAU,GAAGC;AAAiB,MAE1F,gBAAAC,EAAAC,GAAA,EACGJ,UAAAA,IACC,gBAAAK,EAAC,QAAA,EACC,WAAWC,EAAGC,EAAOC,MAAMV,CAAS,GACpC,GAAII,GAEJ,UAAA;AAAA,EAAA,gBAAAC,EAACM,GAAA,EACC,WAAWH,EAAGC,EAAOP,MAAMO,EAAOG,SAAS,GAC3C,SAAUC,OAAUA,EAAMC,gBAAAA,GAC1B,IAAIZ,GAEHD,UAAAA,GACH;AAAA,oBACC,QAAA,EACC,eAAY,QACZ,WAAWQ,EAAOM,SAAQ;AAAA,oBAE3BC,GAAA,EACC,cAAYjB,KAAmB,UAAUE,CAAK,IAC9C,WAAWO,EAAGC,EAAOQ,QAAQR,EAAOG,SAAS,GAC7C,MAAK,KACL,SAAUC,CAAAA,MAAU;AAClBA,IAAAA,EAAMC,gBAAAA,GACNX,EAAAA;AAAAA,EACF,GACA,SAAQ,SAAA,CAAQ;AAAA,GAEpB,IAEA,gBAAAI,EAAC,UAAA,KACMH,GACL,cAAYL,KAAmB,UAAUE,CAAK,IAC9C,WAAWO,EAAGC,EAAOC,MAAMD,EAAOG,WAAWZ,CAAS,GACtD,SAAUa,CAAAA,MAAU;AAClBA,EAAAA,EAAMC,gBAAAA,GACNX,EAAAA;AACF,GACA,MAAK,UAEJF,UAAAA;AAAAA,EAAAA;AAAAA,EACD,gBAAAI,EAACa,GAAA,EACC,MAAK,KACL,MAAK,QAAA,CAAO;AAAA,EAAA,CAEhB,EAAA,CAEJ;"}
|
|
@@ -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 t=require("react/jsx-runtime"),p=require("../icon/index.cjs"),u="_collapsible_471bm_6",b="_content_471bm_17",y="_indicator_471bm_21",s={collapsible:u,content:b,indicator:y};let e;const _=({children:c,disabled:i,open:r,summary:d})=>{const m=l=>{const n=l.currentTarget.closest("details");if(!n||!document.startViewTransition)return;l.preventDefault(),e==null||e.details.style.removeProperty("view-transition-name"),n.style.viewTransitionName="details-expand";const o=document.startViewTransition(()=>n.open=!n.open);e={details:n,transition:o},o.ready.catch(()=>{});const a=()=>{(e==null?void 0:e.transition)===o&&(n.style.removeProperty("view-transition-name"),e=void 0)};o.finished.then(a,a)};return t.jsxs("details",{className:s.collapsible,open:i||r||void 0,"data-component":"collapsible",children:[t.jsxs("summary",{onClick:m,children:[t.jsx("span",{className:s.content,"data-content":"collapsible-summary",children:d}),!i&&t.jsx("span",{className:s.indicator,"data-content":"collapsible-indicator",children:t.jsx(p.Icon,{name:"chevron",size:"small"})})]}),c]})};exports.Collapsible=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as u } from "../icon/index.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index33.css';const b = "_collapsible_471bm_6", y = "_content_471bm_17", h = "_indicator_471bm_21", i = {
|
|
4
4
|
collapsible: b,
|
|
5
5
|
content: y,
|
|
6
6
|
indicator: h
|
|
@@ -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 l=require("react/jsx-runtime"),G=require("../../classix-5H4IWnMA.cjs"),i=require("react"),H=require("../button/index.cjs"),W=require("../../menu-popover-jTTxzTGZ.cjs"),J="_controls_awevz_13",K="_inline_awevz_43",Q="_fixed_awevz_48",U="_measurement_awevz_68",X="_adaptive_awevz_93",d={controls:J,default:"_default_awevz_28",inline:K,fixed:Q,measurement:U,"non-button-content":"_non-button-content_awevz_79",adaptive:X,"overflow-trigger":"_overflow-trigger_awevz_114"},Y={primary:3,danger:2,secondary:1,tertiary:0,simple:0},Z={default:d.default,fixed:d.fixed,inline:d.inline},ee=o=>Y[o.props.variant??"secondary"];function te({buttons:o,menuAccessibleLabel:p,triggerAccessibleLabel:m}){const v=o.map(r=>({button:r,isDanger:r.props.variant==="danger",value:r}));return l.jsx(W.MenuPopover,{triggerAccessibleLabel:m,"data-component":"overflowmenu",children:({close:r,initialFocus:y})=>l.jsx(W.MenuActionList,{actions:v,initialFocus:y,menuAccessibleLabel:p,onSelect:()=>r(),usesMenuSemantics:!0})})}const _=(o,p)=>{const m=Number.parseFloat(String(o[p]));return Number.isFinite(m)?m:0},ne=({children:o,className:p,overflow:m,overflowAccessibleLabel:v="More actions",variant:r="default",...y})=>{const B=i.Children.toArray(o),E=[],b=[];B.forEach(e=>{i.isValidElement(e)&&e.type===H.Button?E.push(e):b.push(e)});const s=E.map((e,n)=>({button:e,index:n,rank:ee(e)})).sort((e,n)=>e.rank-n.rank||e.index-n.index).map(({button:e,index:n})=>i.cloneElement(e,{key:e.key??n})),a=r==="fixed"&&m==="menu",f=i.useRef(null),k=i.useRef(null),x=i.useRef(null),[j,R]=i.useState(0),c=i.useCallback(()=>{var V,A,F;if(!a){R(0);return}const e=f.current,n=k.current;if(!e||!n)return;const h=Array.from(n.querySelectorAll('[data-component="button"]')),g=h.at(-1);if(!g)return;const u=h.slice(0,s.length).map(t=>t.getBoundingClientRect().width);if(u.length!==s.length)return;const w=getComputedStyle(e),O=_(w,"paddingLeft")+_(w,"paddingRight")+_(w,"borderLeftWidth")+_(w,"borderRightWidth"),P=Number.parseFloat(w.maxWidth),D=((V=e.parentElement)==null?void 0:V.clientWidth)??0,I=((A=window.visualViewport)==null?void 0:A.width)??document.documentElement.clientWidth,M=Math.min(...[P,D,I].filter(t=>Number.isFinite(t)&&t>0));if(!Number.isFinite(M))return;const S=Math.max(0,M-O),L=((F=x.current)==null?void 0:F.getBoundingClientRect().width)??0,T=u.reduce((t,$)=>t+$,0);if(L+T<=S){R(t=>t===0?t:0);return}let N=L+g.getBoundingClientRect().width,z=s.length;for(let t=u.length-1;t>=0&&!(N+u[t]>S);t-=1)N+=u[t],z=t;R(t=>t===z?t:z)},[a,s.length]);if(i.useLayoutEffect(()=>{var n,h,g;if(c(),!a)return;const e=typeof ResizeObserver>"u"?void 0:new ResizeObserver(c);return f.current&&(e==null||e.observe(f.current)),(n=f.current)!=null&&n.parentElement&&(e==null||e.observe(f.current.parentElement)),x.current&&(e==null||e.observe(x.current)),window.addEventListener("resize",c),(h=window.visualViewport)==null||h.addEventListener("resize",c),(g=document.fonts)==null||g.ready.then(c),()=>{var u;e==null||e.disconnect(),window.removeEventListener("resize",c),(u=window.visualViewport)==null||u.removeEventListener("resize",c)}},[a,o,c]),B.length===0)return null;const C=a?s.slice(0,j):[],q=a?s.slice(j):s;return l.jsxs("div",{"data-dynamic-position":r==="fixed"?!0:void 0,className:G.t(d.controls,Z[r],a&&d.adaptive,p),ref:f,...y,"data-component":"controls",children:[a&&l.jsxs("div",{"aria-hidden":"true",className:d.measurement,ref:k,children:[s.map((e,n)=>i.cloneElement(e,{"aria-hidden":!0,id:void 0,key:`measure-${String(e.key??n)}`,onClick:void 0,ref:void 0,tabIndex:-1})),l.jsx(W.MenuPopover,{triggerAccessibleLabel:v,children:null})]}),b.length>0&&l.jsx("span",{className:d["non-button-content"],ref:x,children:b}),q,C.length>0&&l.jsx("span",{className:d["overflow-trigger"],children:l.jsx(te,{buttons:C,menuAccessibleLabel:v,triggerAccessibleLabel:v})})]})};exports.Controls=ne;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/controls/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { Children, cloneElement, isValidElement } from 'react';\n\nimport { Button, type ButtonProps } from '../button';\nimport styles from './styles.module.css';\n\nconst buttonVariantOrder = {\n primary: 3,\n danger: 2,\n secondary: 1,\n tertiary: 0,\n simple: 0,\n} satisfies Record<NonNullable<ButtonProps['variant']>, number>;\n\nconst variants = {\n default: styles.default,\n fixed: styles.fixed,\n inline: styles.inline,\n};\n\nexport type ControlsProps = React.HTMLAttributes<HTMLDivElement> & {\n children?: React.ReactNode;\n variant?: keyof typeof variants;\n};\n\nconst getButtonRank = (button: React.ReactElement<ButtonProps>) =>\n buttonVariantOrder[button.props.variant ?? 'secondary'];\n\nexport const Controls = ({ children, className, variant = 'default', ...props }: ControlsProps) => {\n const childArray = Children.toArray(children);\n const buttons: React.ReactElement<ButtonProps>[] = [];\n const nonButtons: React.ReactNode[] = [];\n\n childArray.forEach((child) => {\n if (isValidElement<ButtonProps>(child) && child.type === Button) {\n buttons.push(child);\n } else {\n nonButtons.push(child);\n }\n });\n\n const sortedButtons = buttons\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 if (childArray.length === 0) {\n return null;\n }\n\n return (\n <div\n data-dynamic-position={variant === 'fixed' ? true : undefined}\n className={cx(styles.controls, variants[variant], className)}\n {...props}\n >\n {nonButtons && <span>{nonButtons}</span>}\n {sortedButtons}\n </div>\n );\n};\n"],"names":["buttonVariantOrder","primary","danger","secondary","tertiary","simple","variants","default","styles","fixed","inline","getButtonRank","button","props","variant","Controls","children","className","childArray","Children","toArray","buttons","nonButtons","forEach","child","isValidElement","type","Button","push","sortedButtons","map","index","rank","sort","a","b","cloneElement","key","length","undefined","cx","controls","jsx"],"mappings":"6UAM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ources":["../../../src/components/controls/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { Button, type ButtonProps } from '../button';\nimport { type MenuAction, MenuActionList } from '../menu/action-list';\nimport { MenuPopover } from '../menu/menu-popover';\nimport styles from './styles.module.css';\n\nconst buttonVariantOrder = {\n primary: 3,\n danger: 2,\n secondary: 1,\n tertiary: 0,\n simple: 0,\n} satisfies Record<NonNullable<ButtonProps['variant']>, number>;\n\nconst variants = {\n default: styles.default,\n fixed: styles.fixed,\n inline: styles.inline,\n};\n\nexport type ControlsProps = React.HTMLAttributes<HTMLDivElement> & {\n children?: React.ReactNode;\n overflow?: 'menu';\n overflowAccessibleLabel?: string;\n variant?: keyof typeof variants;\n};\n\nconst getButtonRank = (button: React.ReactElement<ButtonProps>) =>\n buttonVariantOrder[button.props.variant ?? 'secondary'];\n\nfunction OverflowMenu({\n buttons,\n menuAccessibleLabel,\n triggerAccessibleLabel,\n}: {\n buttons: React.ReactElement<ButtonProps>[];\n menuAccessibleLabel: string;\n triggerAccessibleLabel: string;\n}) {\n const actions: MenuAction<React.ReactElement<ButtonProps>>[] = buttons.map((button) => ({\n button,\n isDanger: button.props.variant === 'danger',\n value: button,\n }));\n\n return (\n <MenuPopover triggerAccessibleLabel={triggerAccessibleLabel}>\n {({ close, initialFocus }) => (\n <MenuActionList\n actions={actions}\n initialFocus={initialFocus}\n menuAccessibleLabel={menuAccessibleLabel}\n onSelect={() => close()}\n usesMenuSemantics\n />\n )}\n </MenuPopover>\n );\n}\n\nconst numericStyle = (style: CSSStyleDeclaration, property: keyof CSSStyleDeclaration) => {\n const value = Number.parseFloat(String(style[property]));\n return Number.isFinite(value) ? value : 0;\n};\n\nexport const Controls = ({\n children,\n className,\n overflow,\n overflowAccessibleLabel = 'More actions',\n variant = 'default',\n ...props\n}: ControlsProps) => {\n const childArray = Children.toArray(children);\n const buttons: React.ReactElement<ButtonProps>[] = [];\n const nonButtons: React.ReactNode[] = [];\n\n childArray.forEach((child) => {\n if (isValidElement<ButtonProps>(child) && child.type === Button) {\n buttons.push(child);\n } else {\n nonButtons.push(child);\n }\n });\n\n const sortedButtons = buttons\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 const adaptive = variant === 'fixed' && overflow === 'menu';\n const controlsRef = useRef<HTMLDivElement>(null);\n const measurementRef = useRef<HTMLDivElement>(null);\n const nonButtonsRef = useRef<HTMLSpanElement>(null);\n const [firstVisibleButton, setFirstVisibleButton] = useState(0);\n\n const updateOverflow = useCallback(() => {\n if (!adaptive) {\n setFirstVisibleButton(0);\n return;\n }\n\n const controls = controlsRef.current;\n const measurement = measurementRef.current;\n if (!controls || !measurement) return;\n\n const measurementButtons = Array.from(\n measurement.querySelectorAll<HTMLElement>('[data-component=\"button\"]')\n );\n const trigger = measurementButtons.at(-1);\n if (!trigger) return;\n\n const buttonWidths = measurementButtons\n .slice(0, sortedButtons.length)\n .map((button) => button.getBoundingClientRect().width);\n if (buttonWidths.length !== sortedButtons.length) return;\n\n const style = getComputedStyle(controls);\n const horizontalChrome =\n numericStyle(style, 'paddingLeft') +\n numericStyle(style, 'paddingRight') +\n numericStyle(style, 'borderLeftWidth') +\n numericStyle(style, 'borderRightWidth');\n const configuredMaxWidth = Number.parseFloat(style.maxWidth);\n const parentWidth = controls.parentElement?.clientWidth ?? 0;\n const viewportWidth = window.visualViewport?.width ?? document.documentElement.clientWidth;\n const outerAvailableWidth = Math.min(\n ...[configuredMaxWidth, parentWidth, viewportWidth].filter(\n (width) => Number.isFinite(width) && width > 0\n )\n );\n if (!Number.isFinite(outerAvailableWidth)) return;\n\n const availableWidth = Math.max(0, outerAvailableWidth - horizontalChrome);\n const prefixWidth = nonButtonsRef.current?.getBoundingClientRect().width ?? 0;\n const actionWidth = buttonWidths.reduce((total, width) => total + width, 0);\n\n if (prefixWidth + actionWidth <= availableWidth) {\n setFirstVisibleButton((current) => (current === 0 ? current : 0));\n return;\n }\n\n let usedWidth = prefixWidth + trigger.getBoundingClientRect().width;\n let nextFirstVisible = sortedButtons.length;\n for (let index = buttonWidths.length - 1; index >= 0; index -= 1) {\n if (usedWidth + buttonWidths[index] > availableWidth) break;\n usedWidth += buttonWidths[index];\n nextFirstVisible = index;\n }\n\n setFirstVisibleButton((current) =>\n current === nextFirstVisible ? current : nextFirstVisible\n );\n }, [adaptive, sortedButtons.length]);\n\n useLayoutEffect(() => {\n updateOverflow();\n\n if (!adaptive) return undefined;\n\n const observer =\n typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(updateOverflow);\n if (controlsRef.current) observer?.observe(controlsRef.current);\n if (controlsRef.current?.parentElement) observer?.observe(controlsRef.current.parentElement);\n if (nonButtonsRef.current) observer?.observe(nonButtonsRef.current);\n\n window.addEventListener('resize', updateOverflow);\n window.visualViewport?.addEventListener('resize', updateOverflow);\n void document.fonts?.ready.then(updateOverflow);\n\n return () => {\n observer?.disconnect();\n window.removeEventListener('resize', updateOverflow);\n window.visualViewport?.removeEventListener('resize', updateOverflow);\n };\n }, [adaptive, children, updateOverflow]);\n\n if (childArray.length === 0) {\n return null;\n }\n\n const overflowedButtons = adaptive ? sortedButtons.slice(0, firstVisibleButton) : [];\n const visibleButtons = adaptive ? sortedButtons.slice(firstVisibleButton) : sortedButtons;\n\n return (\n <div\n data-dynamic-position={variant === 'fixed' ? true : undefined}\n className={cx(styles.controls, variants[variant], adaptive && styles.adaptive, className)}\n ref={controlsRef}\n {...props}\n >\n {adaptive && (\n <div\n aria-hidden='true'\n className={styles.measurement}\n ref={measurementRef}\n >\n {sortedButtons.map((button, index) =>\n cloneElement(button, {\n 'aria-hidden': true,\n id: undefined,\n key: `measure-${String(button.key ?? index)}`,\n onClick: undefined,\n ref: undefined,\n tabIndex: -1,\n })\n )}\n <MenuPopover triggerAccessibleLabel={overflowAccessibleLabel}>{null}</MenuPopover>\n </div>\n )}\n {nonButtons.length > 0 && (\n <span\n className={styles['non-button-content']}\n ref={nonButtonsRef}\n >\n {nonButtons}\n </span>\n )}\n {visibleButtons}\n {overflowedButtons.length > 0 && (\n <span className={styles['overflow-trigger']}>\n <OverflowMenu\n buttons={overflowedButtons}\n menuAccessibleLabel={overflowAccessibleLabel}\n triggerAccessibleLabel={overflowAccessibleLabel}\n />\n </span>\n )}\n </div>\n );\n};\n"],"names":["buttonVariantOrder","primary","danger","secondary","tertiary","simple","variants","default","styles","fixed","inline","getButtonRank","button","props","variant","OverflowMenu","buttons","menuAccessibleLabel","triggerAccessibleLabel","actions","map","isDanger","value","jsx","MenuPopover","close","initialFocus","MenuActionList","numericStyle","style","property","Number","parseFloat","String","isFinite","Controls","children","className","overflow","overflowAccessibleLabel","childArray","Children","toArray","nonButtons","forEach","child","isValidElement","type","Button","push","sortedButtons","index","rank","sort","a","b","cloneElement","key","adaptive","controlsRef","useRef","measurementRef","nonButtonsRef","firstVisibleButton","setFirstVisibleButton","useState","updateOverflow","useCallback","controls","current","measurement","measurementButtons","Array","from","querySelectorAll","trigger","at","buttonWidths","slice","length","getBoundingClientRect","width","getComputedStyle","horizontalChrome","configuredMaxWidth","maxWidth","parentWidth","parentElement","clientWidth","viewportWidth","window","visualViewport","document","documentElement","outerAvailableWidth","Math","min","filter","availableWidth","max","prefixWidth","actionWidth","reduce","total","usedWidth","nextFirstVisible","useLayoutEffect","observer","ResizeObserver","undefined","observe","addEventListener","fonts","ready","then","disconnect","removeEventListener","overflowedButtons","visibleButtons","jsxs","cx","id","onClick","ref","tabIndex"],"mappings":"yiBAgBMA,EAAqB,CACzBC,QAAS,EACTC,OAAQ,EACRC,UAAW,EACXC,SAAU,EACVC,OAAQ,CACV,EAEMC,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,OAAQF,EAAOE,MACjB,EASMC,GAAiBC,GACrBZ,EAAm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