@solibo/solibo-ui 1.0.14 → 1.0.16
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/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index12.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 +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/index3.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/index4.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/index6.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.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 +8 -8
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +11 -11
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.cjs.map +1 -1
- package/dist/components/avatar/index.js +58 -58
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +27 -27
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +14 -14
- 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 +18 -18
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +46 -46
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +7 -7
- 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.cjs.map +1 -1
- package/dist/components/collapsible/index.js +18 -37
- package/dist/components/collapsible/index.js.map +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 +128 -36
- package/dist/components/controls/index.js.map +1 -1
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +181 -181
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +31 -31
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.cjs.map +1 -1
- package/dist/components/dropdown/index.js +113 -110
- 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 +16 -16
- package/dist/components/editor/index.cjs.map +1 -1
- package/dist/components/editor/index.js +197 -197
- 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.cjs.map +1 -1
- package/dist/components/header/index.js +14 -14
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +20 -20
- 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 +11 -11
- 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/message/index.cjs +1 -1
- package/dist/components/message/index.cjs.map +1 -1
- package/dist/components/message/index.js +26 -26
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +20 -20
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +25 -25
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.cjs.map +1 -1
- package/dist/components/popover/index.js +56 -60
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +7 -7
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.cjs.map +1 -1
- package/dist/components/search/index.js +43 -45
- 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/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +74 -74
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.cjs.map +1 -1
- package/dist/components/textarea/index.js +24 -20
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/toasts/index.cjs +1 -1
- package/dist/components/toasts/index.js +4 -4
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +6 -6
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/tooltip/index.cjs +1 -1
- package/dist/components/tooltip/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-BIV5OwVJ.js +76 -0
- package/dist/index-BIV5OwVJ.js.map +1 -0
- package/dist/index-CQNlYa2P.cjs +2 -0
- package/dist/index-CQNlYa2P.cjs.map +1 -0
- package/dist/{index-DwzLUapm.js → index-CgA0NUMD.js} +35 -33
- package/dist/index-CgA0NUMD.js.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 +32 -9
- package/dist/index.js +2 -2
- package/dist/menu-popover-D1ALaiV5.cjs +2 -0
- package/dist/menu-popover-D1ALaiV5.cjs.map +1 -0
- package/dist/menu-popover-DQHDIw-8.js +74 -0
- package/dist/menu-popover-DQHDIw-8.js.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,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Button as
|
|
4
|
-
import '../../assets/
|
|
5
|
-
banner:
|
|
6
|
-
visible:
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Button as s } from "../button/index.js";
|
|
4
|
+
import '../../assets/index27.css';const v = "_banner_1au2i_13", _ = "_visible_1au2i_32", a = {
|
|
5
|
+
banner: v,
|
|
6
|
+
visible: _
|
|
7
7
|
}, m = ({
|
|
8
|
-
button:
|
|
9
|
-
message:
|
|
8
|
+
button: n,
|
|
9
|
+
message: t,
|
|
10
10
|
onClick: e,
|
|
11
|
-
onDismiss:
|
|
11
|
+
onDismiss: r,
|
|
12
12
|
visible: b = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
e == null || e(),
|
|
14
|
+
const i = () => {
|
|
15
|
+
e == null || e(), r == null || r();
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
/* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ l("div", { "aria-live": "assertive", className: c(a.banner, b && a.visible), "data-component": "banner", children: [
|
|
18
|
+
t,
|
|
19
|
+
/* @__PURE__ */ o(s, { onClick: i, children: n })
|
|
20
20
|
] });
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
@@ -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"),u=require("../../classix-5H4IWnMA.cjs"),l=require("../badge/index.cjs"),m=require("../icon/index.cjs"),p="_button_y6cfv_1",g="_simple_y6cfv_29",b="_danger_y6cfv_38",f="_tertiary_y6cfv_47",v="_primary_y6cfv_54",x="_secondary_y6cfv_63",t={button:p,simple:g,danger:b,tertiary:f,primary:v,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:y,variant:_="secondary",...d}){return e.jsxs("button",{className:u.t(t.button,h[_],o),disabled:a,onClick:c,ref:y,type:"button",...d,"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
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as _, jsx as
|
|
1
|
+
import { jsxs as _, jsx as o } 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_y6cfv_1", g = "_simple_y6cfv_29", v = "_danger_y6cfv_38", b = "_tertiary_y6cfv_47", h = "_primary_y6cfv_54", x = "_secondary_y6cfv_63", t = {
|
|
6
6
|
button: u,
|
|
7
7
|
simple: g,
|
|
8
|
-
danger:
|
|
9
|
-
tertiary:
|
|
8
|
+
danger: v,
|
|
9
|
+
tertiary: b,
|
|
10
10
|
primary: h,
|
|
11
|
-
secondary:
|
|
12
|
-
},
|
|
11
|
+
secondary: x
|
|
12
|
+
}, j = {
|
|
13
13
|
danger: t.danger,
|
|
14
14
|
primary: t.primary,
|
|
15
15
|
secondary: t.secondary,
|
|
16
16
|
simple: t.simple,
|
|
17
17
|
tertiary: t.tertiary
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
badge:
|
|
19
|
+
function k({
|
|
20
|
+
badge: a,
|
|
21
21
|
children: r,
|
|
22
|
-
className:
|
|
22
|
+
className: e,
|
|
23
23
|
disabled: s = !1,
|
|
24
|
-
icon:
|
|
24
|
+
icon: n,
|
|
25
25
|
iconSize: i = "small",
|
|
26
|
-
onClick:
|
|
27
|
-
ref:
|
|
28
|
-
variant:
|
|
29
|
-
...
|
|
26
|
+
onClick: c,
|
|
27
|
+
ref: y,
|
|
28
|
+
variant: m = "secondary",
|
|
29
|
+
...p
|
|
30
30
|
}) {
|
|
31
|
-
return /* @__PURE__ */ _("button", { className: d(t.button,
|
|
32
|
-
|
|
31
|
+
return /* @__PURE__ */ _("button", { className: d(t.button, j[m], e), disabled: s, onClick: c, ref: y, type: "button", ...p, "data-component": "button", children: [
|
|
32
|
+
n && /* @__PURE__ */ o(f, { fill: !0, gap: r ? "right" : void 0, name: n, size: i }),
|
|
33
33
|
r,
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ o(l, { variant: "highlight", children: a })
|
|
35
35
|
] });
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
k as Button
|
|
39
39
|
};
|
|
40
40
|
//# 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/index30.css');const n=require("react/jsx-runtime"),d=require("../../classix-5H4IWnMA.cjs"),x=require("../badge/index.cjs"),j=require("../checkbox/index.cjs"),g=require("../figure/index.cjs"),f=require("../icon/index.cjs"),v="_card_133qp_1",w="_head_133qp_28",h="_center_133qp_40",N="_content_133qp_52",y="_preview_133qp_58",b="_margin_133qp_98",T="_clickable_133qp_143",k="_muted_133qp_158",D="_selected_133qp_163",e={card:v,head:w,center:h,content:N,preview:y,"preview-leading":"_preview-leading_133qp_69","preview-trailing":"_preview-trailing_133qp_70","preview-content":"_preview-content_133qp_90",margin:b,clickable:T,muted:k,selected:D,"image-top":"_image-top_133qp_168","image-left":"_image-left_133qp_179"},E=({actions:q,badge:m,checkbox:c,children:p,emphasis:o="default",header:_,icon:u,image:s,imagePosition:r="top",onClick:a,preview:l,variant:i="default"})=>n.jsxs("article",{className:d.t(e.card,o==="muted"&&e.muted,a&&e.clickable,(c==null?void 0:c.checked)&&e.selected),"data-emphasis":o,"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:d.t(e.head,i==="minimal"&&e.center),children:[c&&n.jsx("span",{onClick:t=>t.stopPropagation(),children:n.jsx(j.Checkbox,{...c})}),s&&i!=="minimal"&&r==="left"&&n.jsx(g.Figure,{className:e[`image-${r}`],children:s}),_,m&&n.jsx(x.Badge,{...m}),u&&n.jsx(f.Icon,{name:u,size:"medium"}),q]}),p&&i!=="minimal"&&n.jsx("div",{className:d.t(e.content,!!_&&e.margin),children:p}),l&&i!=="minimal"&&n.jsxs("div",{className:d.t(e.preview,!!_&&e.margin),children:[n.jsx("span",{className:e["preview-leading"],children:l.leading}),n.jsx("span",{className:e["preview-content"],children:l.children}),n.jsx("span",{className:e["preview-trailing"],children:l.trailing})]})]})]});exports.Card=E;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Checkbox as
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { t as p } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Badge as w } from "../badge/index.js";
|
|
4
|
+
import { Checkbox as v } from "../checkbox/index.js";
|
|
5
5
|
import { Figure as f } from "../figure/index.js";
|
|
6
|
-
import { Icon as
|
|
7
|
-
import '../../assets/
|
|
8
|
-
card:
|
|
9
|
-
head:
|
|
10
|
-
center:
|
|
11
|
-
content:
|
|
12
|
-
preview:
|
|
13
|
-
"preview-leading": "_preview-
|
|
14
|
-
"preview-trailing": "_preview-
|
|
15
|
-
"preview-content": "_preview-
|
|
16
|
-
margin:
|
|
17
|
-
clickable:
|
|
18
|
-
muted:
|
|
19
|
-
selected:
|
|
20
|
-
"image-top": "_image-
|
|
21
|
-
"image-left": "_image-
|
|
6
|
+
import { Icon as N } from "../icon/index.js";
|
|
7
|
+
import '../../assets/index30.css';const h = "_card_133qp_1", y = "_head_133qp_28", j = "_center_133qp_40", D = "_content_133qp_52", E = "_preview_133qp_58", I = "_margin_133qp_98", T = "_clickable_133qp_143", $ = "_muted_133qp_158", k = "_selected_133qp_163", e = {
|
|
8
|
+
card: h,
|
|
9
|
+
head: y,
|
|
10
|
+
center: j,
|
|
11
|
+
content: D,
|
|
12
|
+
preview: E,
|
|
13
|
+
"preview-leading": "_preview-leading_133qp_69",
|
|
14
|
+
"preview-trailing": "_preview-trailing_133qp_70",
|
|
15
|
+
"preview-content": "_preview-content_133qp_90",
|
|
16
|
+
margin: I,
|
|
17
|
+
clickable: T,
|
|
18
|
+
muted: $,
|
|
19
|
+
selected: k,
|
|
20
|
+
"image-top": "_image-top_133qp_168",
|
|
21
|
+
"image-left": "_image-left_133qp_179"
|
|
22
22
|
}, G = ({
|
|
23
|
-
actions:
|
|
24
|
-
badge:
|
|
25
|
-
checkbox:
|
|
26
|
-
children:
|
|
23
|
+
actions: q,
|
|
24
|
+
badge: _,
|
|
25
|
+
checkbox: a,
|
|
26
|
+
children: o,
|
|
27
27
|
emphasis: g = "default",
|
|
28
|
-
header:
|
|
28
|
+
header: s,
|
|
29
29
|
icon: u,
|
|
30
|
-
image:
|
|
31
|
-
imagePosition:
|
|
32
|
-
onClick:
|
|
33
|
-
preview:
|
|
34
|
-
variant:
|
|
35
|
-
}) => /* @__PURE__ */ d("article", { className:
|
|
36
|
-
|
|
37
|
-
}, tabIndex:
|
|
38
|
-
|
|
30
|
+
image: i,
|
|
31
|
+
imagePosition: c = "top",
|
|
32
|
+
onClick: l,
|
|
33
|
+
preview: m,
|
|
34
|
+
variant: r = "default"
|
|
35
|
+
}) => /* @__PURE__ */ d("article", { className: p(e.card, g === "muted" && e.muted, l && e.clickable, (a == null ? void 0 : a.checked) && e.selected), "data-emphasis": g, "data-minimal": r === "minimal", onClick: l, onKeyDown: (n) => {
|
|
36
|
+
l && n.currentTarget === document.activeElement && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.currentTarget.click());
|
|
37
|
+
}, tabIndex: l ? 0 : -1, "data-component": "card", children: [
|
|
38
|
+
i && r !== "minimal" && c === "top" && /* @__PURE__ */ t(f, { className: e[`image-${c}`], children: i }),
|
|
39
39
|
/* @__PURE__ */ d("section", { children: [
|
|
40
|
-
/* @__PURE__ */ d("div", { className:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
u && /* @__PURE__ */
|
|
46
|
-
|
|
40
|
+
/* @__PURE__ */ d("div", { className: p(e.head, r === "minimal" && e.center), children: [
|
|
41
|
+
a && /* @__PURE__ */ t("span", { onClick: (n) => n.stopPropagation(), children: /* @__PURE__ */ t(v, { ...a }) }),
|
|
42
|
+
i && r !== "minimal" && c === "left" && /* @__PURE__ */ t(f, { className: e[`image-${c}`], children: i }),
|
|
43
|
+
s,
|
|
44
|
+
_ && /* @__PURE__ */ t(w, { ..._ }),
|
|
45
|
+
u && /* @__PURE__ */ t(N, { name: u, size: "medium" }),
|
|
46
|
+
q
|
|
47
47
|
] }),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
48
|
+
o && r !== "minimal" && /* @__PURE__ */ t("div", { className: p(e.content, !!s && e.margin), children: o }),
|
|
49
|
+
m && r !== "minimal" && /* @__PURE__ */ d("div", { className: p(e.preview, !!s && e.margin), children: [
|
|
50
|
+
/* @__PURE__ */ t("span", { className: e["preview-leading"], children: m.leading }),
|
|
51
|
+
/* @__PURE__ */ t("span", { className: e["preview-content"], children: m.children }),
|
|
52
|
+
/* @__PURE__ */ t("span", { className: e["preview-trailing"], children: m.trailing })
|
|
53
53
|
] })
|
|
54
54
|
] })
|
|
55
55
|
] });
|
|
@@ -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_fv4yk_3",k={checkbox:h},u=({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:[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=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { i as
|
|
3
|
-
import { Loading as
|
|
4
|
-
import '../../assets/
|
|
2
|
+
import { i as k } from "../../icons-Dj0vEOCB.js";
|
|
3
|
+
import { Loading as x } from "../loading/index.js";
|
|
4
|
+
import '../../assets/index31.css';const b = "_checkbox_fv4yk_3", m = {
|
|
5
5
|
checkbox: b
|
|
6
|
-
},
|
|
6
|
+
}, y = ({
|
|
7
7
|
checked: t,
|
|
8
8
|
disabled: s,
|
|
9
9
|
isLoading: c,
|
|
@@ -12,15 +12,15 @@ import '../../assets/index33.css';const b = "_checkbox_1glqu_3", m = {
|
|
|
12
12
|
...i
|
|
13
13
|
}) => {
|
|
14
14
|
const n = {
|
|
15
|
-
"--icon-svg":
|
|
15
|
+
"--icon-svg": k("check")
|
|
16
16
|
};
|
|
17
17
|
return /* @__PURE__ */ h("label", { className: m.checkbox, "data-component": "checkbox", children: [
|
|
18
18
|
/* @__PURE__ */ e("input", { checked: t, disabled: s || c, onChange: r, type: "checkbox", style: n, ...i }),
|
|
19
|
-
c && /* @__PURE__ */ e(
|
|
19
|
+
c && /* @__PURE__ */ e(x, { size: 16, sticky: !0 }),
|
|
20
20
|
o && o
|
|
21
21
|
] });
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
y as Checkbox
|
|
25
25
|
};
|
|
26
26
|
//# 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/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 e=require("react/jsx-runtime"),t=require("../icon/index.cjs"),i="_collapsible_vloyq_6",a="_content_vloyq_17",r="_indicator_vloyq_21",n={collapsible:i,content:a,indicator:r},d=({children:l,disabled:o,open:s,summary:c})=>e.jsxs("details",{className:n.collapsible,open:o||s||void 0,"data-component":"collapsible",children:[e.jsxs("summary",{children:[e.jsx("span",{className:n.content,"data-content":"collapsible-summary",children:c}),!o&&e.jsx("span",{className:n.indicator,"data-content":"collapsible-indicator",children:e.jsx(t.Icon,{name:"chevron",size:"medium"})})]}),l]});exports.Collapsible=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/collapsible/index.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/collapsible/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Icon } from '@/components/icon';\n\nimport styles from './styles.module.css';\n\nexport type CollapsibleProps = {\n children: ReactNode;\n disabled?: boolean;\n open?: boolean;\n summary: ReactNode;\n};\n\nexport const Collapsible = ({ children, disabled, open, summary }: CollapsibleProps) => {\n return (\n <details\n className={styles.collapsible}\n open={disabled || open || undefined}\n >\n <summary>\n <span\n className={styles.content}\n data-content='collapsible-summary'\n >\n {summary}\n </span>\n {!disabled && (\n <span\n className={styles.indicator}\n data-content='collapsible-indicator'\n >\n <Icon\n name='chevron'\n size='medium'\n />\n </span>\n )}\n </summary>\n\n {children}\n </details>\n );\n};\n"],"names":["Collapsible","children","disabled","open","summary","jsxs","styles","collapsible","undefined","jsx","content","indicator","Icon"],"mappings":"mQAaaA,EAAcA,CAAC,CAAEC,SAAAA,EAAUC,SAAAA,EAAUC,KAAAA,EAAMC,QAAAA,CAA0B,IAE9EC,EAAAA,KAAC,UAAA,CACC,UAAWC,EAAOC,YAClB,KAAML,GAAYC,GAAQK,OAAU,iBAAA,cAEpC,SAAA,CAAAH,OAAC,UAAA,CACC,SAAA,CAAAI,MAAC,QACC,UAAWH,EAAOI,QAClB,eAAa,sBAEZN,SAAAA,EACH,EACC,CAACF,GACAO,EAAAA,IAAC,OAAA,CACC,UAAWH,EAAOK,UAClB,eAAa,wBAEb,eAACC,EAAAA,KAAA,CACC,KAAK,UACL,KAAK,SAAQ,CAAA,CAEjB,CAAA,EAEJ,EAECX,CAAAA,EACH"}
|
|
@@ -1,41 +1,22 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Icon as
|
|
3
|
-
import '../../assets/
|
|
4
|
-
collapsible:
|
|
5
|
-
content:
|
|
6
|
-
indicator:
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
summary:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const n = document.startViewTransition(() => e.open = !e.open);
|
|
20
|
-
t = {
|
|
21
|
-
details: e,
|
|
22
|
-
transition: n
|
|
23
|
-
}, n.ready.catch(() => {
|
|
24
|
-
});
|
|
25
|
-
const l = () => {
|
|
26
|
-
(t == null ? void 0 : t.transition) === n && (e.style.removeProperty("view-transition-name"), t = void 0);
|
|
27
|
-
};
|
|
28
|
-
n.finished.then(l, l);
|
|
29
|
-
};
|
|
30
|
-
return /* @__PURE__ */ c("details", { className: i.collapsible, open: s || d || void 0, "data-component": "collapsible", children: [
|
|
31
|
-
/* @__PURE__ */ c("summary", { onClick: p, children: [
|
|
32
|
-
/* @__PURE__ */ o("span", { className: i.content, "data-content": "collapsible-summary", children: m }),
|
|
33
|
-
!s && /* @__PURE__ */ o("span", { className: i.indicator, "data-content": "collapsible-indicator", children: /* @__PURE__ */ o(u, { name: "chevron", size: "small" }) })
|
|
34
|
-
] }),
|
|
35
|
-
r
|
|
36
|
-
] });
|
|
37
|
-
};
|
|
2
|
+
import { Icon as s } from "../icon/index.js";
|
|
3
|
+
import '../../assets/index33.css';const i = "_collapsible_vloyq_6", r = "_content_vloyq_17", m = "_indicator_vloyq_21", l = {
|
|
4
|
+
collapsible: i,
|
|
5
|
+
content: r,
|
|
6
|
+
indicator: m
|
|
7
|
+
}, _ = ({
|
|
8
|
+
children: t,
|
|
9
|
+
disabled: n,
|
|
10
|
+
open: a,
|
|
11
|
+
summary: e
|
|
12
|
+
}) => /* @__PURE__ */ c("details", { className: l.collapsible, open: n || a || void 0, "data-component": "collapsible", children: [
|
|
13
|
+
/* @__PURE__ */ c("summary", { children: [
|
|
14
|
+
/* @__PURE__ */ o("span", { className: l.content, "data-content": "collapsible-summary", children: e }),
|
|
15
|
+
!n && /* @__PURE__ */ o("span", { className: l.indicator, "data-content": "collapsible-indicator", children: /* @__PURE__ */ o(s, { name: "chevron", size: "medium" }) })
|
|
16
|
+
] }),
|
|
17
|
+
t
|
|
18
|
+
] });
|
|
38
19
|
export {
|
|
39
|
-
|
|
20
|
+
_ as Collapsible
|
|
40
21
|
};
|
|
41
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/collapsible/index.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/collapsible/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Icon } from '@/components/icon';\n\nimport styles from './styles.module.css';\n\nexport type CollapsibleProps = {\n children: ReactNode;\n disabled?: boolean;\n open?: boolean;\n summary: ReactNode;\n};\n\nexport const Collapsible = ({ children, disabled, open, summary }: CollapsibleProps) => {\n return (\n <details\n className={styles.collapsible}\n open={disabled || open || undefined}\n >\n <summary>\n <span\n className={styles.content}\n data-content='collapsible-summary'\n >\n {summary}\n </span>\n {!disabled && (\n <span\n className={styles.indicator}\n data-content='collapsible-indicator'\n >\n <Icon\n name='chevron'\n size='medium'\n />\n </span>\n )}\n </summary>\n\n {children}\n </details>\n );\n};\n"],"names":["Collapsible","children","disabled","open","summary","jsxs","styles","collapsible","undefined","jsx","content","indicator","Icon"],"mappings":";;;;;;GAaaA,IAAcA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,UAAAA;AAAAA,EAAUC,MAAAA;AAAAA,EAAMC,SAAAA;AAA0B,MAE9E,gBAAAC,EAAC,WAAA,EACC,WAAWC,EAAOC,aAClB,MAAML,KAAYC,KAAQK,QAAU,kBAAA,eAEpC,UAAA;AAAA,EAAA,gBAAAH,EAAC,WAAA,EACC,UAAA;AAAA,IAAA,gBAAAI,EAAC,UACC,WAAWH,EAAOI,SAClB,gBAAa,uBAEZN,UAAAA,GACH;AAAA,IACC,CAACF,KACA,gBAAAO,EAAC,QAAA,EACC,WAAWH,EAAOK,WAClB,gBAAa,yBAEb,4BAACC,GAAA,EACC,MAAK,WACL,MAAK,UAAQ,EAAA,CAEjB;AAAA,EAAA,GAEJ;AAAA,EAECX;AAAAA,GACH;"}
|
|
@@ -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 b=require("react/jsx-runtime"),U=require("../../classix-5H4IWnMA.cjs"),m=require("react"),X=require("../button/index.cjs"),S=require("../../menu-popover-D1ALaiV5.cjs"),Y="_controls_1bkuq_13",Z="_inline_1bkuq_43",ee="_embedded_1bkuq_48",te="_fixed_1bkuq_49",ne="_adaptive_1bkuq_60",ie="_measurement_1bkuq_65",h={controls:Y,default:"_default_1bkuq_28",inline:Z,embedded:ee,fixed:te,adaptive:ne,measurement:ie,"non-button-content":"_non-button-content_1bkuq_99","overflow-trigger":"_overflow-trigger_1bkuq_128"},re={primary:3,danger:2,secondary:1,tertiary:0,simple:0},oe={default:h.default,embedded:h.embedded,fixed:h.fixed,inline:h.inline},se=s=>re[s.props.variant??"secondary"];function de({buttons:s,menuAccessibleLabel:i,triggerAccessibleLabel:n}){const x=s.map(o=>({button:o,isDanger:o.props.variant==="danger",value:o}));return b.jsx(S.MenuPopover,{triggerAccessibleLabel:n,"data-component":"overflowmenu",children:({close:o,initialFocus:r})=>b.jsx(S.MenuActionList,{actions:x,initialFocus:r,menuAccessibleLabel:i,onSelect:()=>o(),usesMenuSemantics:!0})})}const g=(s,i)=>{const n=Number.parseFloat(String(s[i]));return Number.isFinite(n)?n:0},ce=s=>{if(!s.trim().endsWith("px"))return;const i=Number.parseFloat(s);return Number.isFinite(i)?i:void 0},le=(s,i)=>{const n=s.parentElement;if(!n)return;const x=n.getBoundingClientRect(),o=getComputedStyle(n),r=x.width||n.clientWidth,B=x.left+g(o,"borderLeftWidth")+g(o,"paddingLeft"),E=x.left+r-g(o,"borderRightWidth")-g(o,"paddingRight"),_=Array.from(n.children).slice(0,Array.from(n.children).indexOf(s)),R=_.reduce((f,a)=>Math.max(f,a.getBoundingClientRect().right),B),c=_.length>0?g(o,"columnGap"):0,l=Math.max(0,E-R-c),W=(i==null?void 0:i.parent)===n?Math.max(0,r-i.parentWidth):0;return{availableWidth:W>0?Math.max(l,((i==null?void 0:i.availableWidth)??0)+W):l,parent:n,parentWidth:r}},ae=({children:s,className:i,maxVisibleButtons:n,overflow:x,overflowAccessibleLabel:o="More actions",variant:r="default",...B})=>{const E=m.Children.toArray(s),_=[],R=[];E.forEach(e=>{m.isValidElement(e)&&e.type===X.Button?_.push(e):R.push(e)});const c=_.map((e,d)=>({button:e,index:d,rank:se(e)})).sort((e,d)=>e.rank-d.rank||e.index-d.index).map(({button:e,index:d})=>m.cloneElement(e,{key:e.key??d})),l=r==="embedded"||r==="fixed"&&x==="menu",W=typeof n=="number"&&Number.isFinite(n)?Math.floor(n):0,f=r==="embedded"&&W>0?Math.min(c.length,W):c.length,a=m.useRef(null),A=m.useRef(void 0),N=m.useRef(null),M=m.useRef(null),[j,C]=m.useState(f),p=m.useCallback(()=>{var L,I,T;if(!l){C(f);return}const e=a.current,d=N.current;if(!e||!d)return;const w=Array.from(d.querySelectorAll('[data-component="button"]')),y=w.at(-1);if(!y)return;const v=w.slice(0,c.length).map(t=>t.getBoundingClientRect().width);if(v.length!==c.length)return;const u=getComputedStyle(e),G=g(u,"paddingLeft")+g(u,"paddingRight")+g(u,"borderLeftWidth")+g(u,"borderRightWidth"),$=ce(u.maxWidth),k=r==="embedded"?le(e,A.current):void 0;k&&(A.current=k);const H=(k==null?void 0:k.availableWidth)??((L=e.parentElement)==null?void 0:L.clientWidth)??0,J=((I=window.visualViewport)==null?void 0:I.width)??document.documentElement.clientWidth,F=Math.min(...[$,H,J].filter(t=>typeof t=="number"&&Number.isFinite(t)&&t>0));if(!Number.isFinite(F))return;const O=Math.max(0,F-G),V=((T=M.current)==null?void 0:T.getBoundingClientRect().width)??0,K=v.reduce((t,Q)=>t+Q,0);if(f===c.length&&V+K<=O){C(t=>t===f?t:f);return}let P=V+y.getBoundingClientRect().width,q=0;for(let t=0;t<f&&!(P+v[t]>O);t+=1)P+=v[t],q=t+1;C(t=>t===q?t:q)},[l,c.length,r,f]);if(m.useLayoutEffect(()=>{var d,w,y,v;if(p(),!l)return;const e=typeof ResizeObserver>"u"?void 0:new ResizeObserver(p);return a.current&&(e==null||e.observe(a.current)),(d=a.current)!=null&&d.parentElement&&(e==null||e.observe(a.current.parentElement)),r==="embedded"&&((w=a.current)!=null&&w.parentElement)&&Array.from(a.current.parentElement.children).forEach(u=>{u!==a.current&&(e==null||e.observe(u))}),M.current&&(e==null||e.observe(M.current)),window.addEventListener("resize",p),(y=window.visualViewport)==null||y.addEventListener("resize",p),(v=document.fonts)==null||v.ready.then(p),()=>{var u;e==null||e.disconnect(),window.removeEventListener("resize",p),(u=window.visualViewport)==null||u.removeEventListener("resize",p)}},[l,s,p,r]),E.length===0)return null;const D=l?c.slice(0,j):c,z=l?c.slice(j):[];return b.jsxs("div",{"data-component":"controls","data-dynamic-position":r==="fixed"?!0:void 0,className:U.t(h.controls,oe[r],l&&h.adaptive,i),ref:a,...B,children:[l&&b.jsxs("div",{"aria-hidden":"true",className:h.measurement,ref:N,children:[c.map((e,d)=>m.cloneElement(e,{"aria-hidden":!0,id:void 0,key:`measure-${String(e.key??d)}`,onClick:void 0,ref:void 0,tabIndex:-1})),b.jsx(S.MenuPopover,{triggerAccessibleLabel:o,children:null})]}),r!=="embedded"&&R.length>0&&b.jsx("span",{className:h["non-button-content"],ref:M,children:R}),D,z.length>0&&b.jsx("span",{className:h["overflow-trigger"],children:b.jsx(de,{buttons:z,menuAccessibleLabel:o,triggerAccessibleLabel:o})})]})};exports.Controls=ae;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|