@solibo/solibo-ui 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -0
- package/dist/assets/styles.css +1 -1
- package/dist/components/_avatar/index.cjs +1 -1
- package/dist/components/_avatar/index.js +1 -1
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.cjs.map +1 -1
- package/dist/components/_card/index.js +39 -36
- package/dist/components/_card/index.js.map +1 -1
- package/dist/components/_collapsible/index.cjs +1 -1
- package/dist/components/_collapsible/index.js +1 -1
- package/dist/components/_croppable/index.cjs +1 -1
- package/dist/components/_croppable/index.js +1 -1
- package/dist/components/_dropdown/index.cjs +1 -1
- package/dist/components/_dropdown/index.js +3 -3
- package/dist/components/_dropzone/index.cjs +1 -1
- package/dist/components/_dropzone/index.js +1 -1
- package/dist/components/_editor/index.cjs +1 -1
- package/dist/components/_editor/index.js +1 -1
- package/dist/components/_menu/index.cjs +1 -1
- package/dist/components/_menu/index.js +30 -30
- package/dist/components/_messages/index.cjs +1 -1
- package/dist/components/_messages/index.js +1 -1
- package/dist/components/_portal/index.cjs +1 -1
- package/dist/components/_portal/index.js +1 -1
- package/dist/components/_sortable/index.cjs +1 -1
- package/dist/components/_sortable/index.js +1 -1
- package/dist/components/_toasts/index.cjs +1 -1
- package/dist/components/_toasts/index.js +1 -1
- package/dist/components/_widget/index.cjs +1 -1
- package/dist/components/_widget/index.js +1 -1
- package/dist/components/accordion/index.cjs +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.cjs +2 -0
- package/dist/components/button-group/index.cjs.map +1 -0
- package/dist/components/button-group/index.js +33 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +5 -5
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.cjs.map +1 -1
- package/dist/components/popover/index.js +12 -12
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +8 -8
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/{index-DXvkoITF.js → index-BDTbPD0V.js} +2 -2
- package/dist/{index-DXvkoITF.js.map → index-BDTbPD0V.js.map} +1 -1
- package/dist/{index-WOhmAd8s.cjs → index-OLuoLabz.cjs} +2 -2
- package/dist/{index-WOhmAd8s.cjs.map → index-OLuoLabz.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +64 -62
- package/dist/index.js.map +1 -1
- package/dist/styles.module-CitJm17A.cjs +2 -0
- package/dist/styles.module-CitJm17A.cjs.map +1 -0
- package/dist/styles.module-Ioe0wPWW.js +9 -0
- package/dist/styles.module-Ioe0wPWW.js.map +1 -0
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/styles.module-BUYR37kC.js +0 -9
- package/dist/styles.module-BUYR37kC.js.map +0 -1
- package/dist/styles.module-DvIhipVo.cjs +0 -2
- package/dist/styles.module-DvIhipVo.cjs.map +0 -1
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Checkbox as
|
|
5
|
-
import { Figure as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import '../../assets/
|
|
8
|
-
card:
|
|
9
|
-
head:
|
|
10
|
-
center:
|
|
11
|
-
content:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"image-
|
|
15
|
-
"image-
|
|
16
|
-
image:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Badge as f } from "../badge/index.js";
|
|
4
|
+
import { Checkbox as j } from "../checkbox/index.js";
|
|
5
|
+
import { Figure as v } from "../figure/index.js";
|
|
6
|
+
import { Icon as u } from "../icon/index.js";
|
|
7
|
+
import '../../assets/index16.css';const h = "_card_1vjtr_1", y = "_head_1vjtr_30", N = "_center_1vjtr_43", D = "_content_1vjtr_55", E = "_margin_1vjtr_61", I = "_clickable_1vjtr_97", T = "_image_1vjtr_112", k = "_selected_1vjtr_140", t = {
|
|
8
|
+
card: h,
|
|
9
|
+
head: y,
|
|
10
|
+
center: N,
|
|
11
|
+
content: D,
|
|
12
|
+
margin: E,
|
|
13
|
+
clickable: I,
|
|
14
|
+
"image-top": "_image-top_1vjtr_112",
|
|
15
|
+
"image-left": "_image-left_1vjtr_122",
|
|
16
|
+
"image-right": "_image-right_1vjtr_123",
|
|
17
|
+
image: T,
|
|
18
|
+
selected: k
|
|
19
|
+
}, q = ({
|
|
20
|
+
actions: p,
|
|
21
|
+
badge: _,
|
|
22
|
+
checkbox: a,
|
|
21
23
|
children: l,
|
|
22
|
-
header:
|
|
23
|
-
icon:
|
|
24
|
-
image:
|
|
25
|
-
imagePosition:
|
|
24
|
+
header: o,
|
|
25
|
+
icon: s,
|
|
26
|
+
image: d,
|
|
27
|
+
imagePosition: g = "top",
|
|
26
28
|
onClick: n,
|
|
27
|
-
variant:
|
|
28
|
-
}) => /* @__PURE__ */
|
|
29
|
-
n &&
|
|
29
|
+
variant: i = "default"
|
|
30
|
+
}) => /* @__PURE__ */ m("article", { className: c(t.card, g && t[`image-${g}`], n && t.clickable, (a == null ? void 0 : a.checked) && t.selected), "data-minimal": i === "minimal", onClick: n, onKeyDown: (e) => {
|
|
31
|
+
n && e.currentTarget === document.activeElement && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
30
32
|
}, tabIndex: n ? 0 : -1, "data-component": "card", children: [
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
d && i !== "minimal" && /* @__PURE__ */ r(v, { className: t.image, children: d }),
|
|
34
|
+
/* @__PURE__ */ m("section", { children: [
|
|
35
|
+
/* @__PURE__ */ m("div", { className: c(t.head, i === "minimal" && t.center), children: [
|
|
36
|
+
a && /* @__PURE__ */ r("span", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ r(j, { ...a }) }),
|
|
37
|
+
o,
|
|
38
|
+
_ && /* @__PURE__ */ r(f, { ..._ }),
|
|
39
|
+
s && /* @__PURE__ */ r(u, { name: s, size: "medium" }),
|
|
40
|
+
p
|
|
38
41
|
] }),
|
|
39
|
-
l && /* @__PURE__ */
|
|
42
|
+
l && /* @__PURE__ */ r("div", { className: c(t.content, !!o && t.margin), children: l })
|
|
40
43
|
] })
|
|
41
44
|
] });
|
|
42
45
|
export {
|
|
43
|
-
|
|
46
|
+
q as Card
|
|
44
47
|
};
|
|
45
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/_card/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Badge, BadgeProps } from '@/components/badge';\nimport { Checkbox, CheckboxProps } from '@/components/checkbox';\nimport { Figure } from '@/components/figure';\nimport { Icon } from '@/components/icon';\nimport { IconName } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\ntype BaseCardProps = {\n badge?: BadgeProps;\n checkbox?: CheckboxProps;\n icon?: IconName;\n onClick?: React.MouseEventHandler<HTMLElement>;\n};\n\ntype DefaultCardProps = BaseCardProps & {\n children?: React.ReactNode;\n header?: React.ReactNode;\n image?: React.ReactNode;\n imagePosition?: 'top' | 'left' | 'right';\n variant?: 'default';\n};\n\ntype MinimalCardProps = BaseCardProps & {\n children?: never;\n header: React.ReactNode;\n image?: never;\n imagePosition?: never;\n variant: 'minimal';\n};\n\nexport type CardProps = DefaultCardProps | MinimalCardProps;\n\nexport const Card = ({\n badge,\n checkbox,\n children,\n header,\n icon,\n image,\n imagePosition = 'top',\n onClick,\n variant = 'default',\n}: CardProps) => {\n return (\n <article\n className={cx(\n styles.card,\n imagePosition && styles[`image-${imagePosition}`],\n onClick && styles.clickable,\n checkbox?.checked && styles.selected\n )}\n data-minimal={variant === 'minimal'}\n onClick={onClick}\n onKeyDown={(e) => {\n if (!onClick) return;\n\n if (e.currentTarget !== document.activeElement) {\n return;\n }\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.click();\n }\n }}\n tabIndex={onClick ? 0 : -1}\n >\n {image && variant !== 'minimal' && <Figure className={styles.image}>{image}</Figure>}\n <section>\n <div className={cx(styles.head, variant === 'minimal' && styles.center)}>\n {checkbox && (\n <span onClick={(e) => e.stopPropagation()}>\n <Checkbox {...checkbox} />\n </span>\n )}\n {header}\n {badge && <Badge {...badge} />}\n {icon && (\n <Icon\n name={icon}\n size='medium'\n />\n )}\n </div>\n {children && <div className={styles.content}>{children}</div
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/_card/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Badge, BadgeProps } from '@/components/badge';\nimport { Checkbox, CheckboxProps } from '@/components/checkbox';\nimport { Figure } from '@/components/figure';\nimport { Icon } from '@/components/icon';\nimport { IconName } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\ntype BaseCardProps = {\n actions?: React.ReactNode;\n badge?: BadgeProps;\n checkbox?: CheckboxProps;\n icon?: IconName;\n onClick?: React.MouseEventHandler<HTMLElement>;\n};\n\ntype DefaultCardProps = BaseCardProps & {\n children?: React.ReactNode;\n header?: React.ReactNode;\n image?: React.ReactNode;\n imagePosition?: 'top' | 'left' | 'right';\n variant?: 'default';\n};\n\ntype MinimalCardProps = BaseCardProps & {\n children?: never;\n header: React.ReactNode;\n image?: never;\n imagePosition?: never;\n variant: 'minimal';\n};\n\nexport type CardProps = DefaultCardProps | MinimalCardProps;\n\nexport const Card = ({\n actions,\n badge,\n checkbox,\n children,\n header,\n icon,\n image,\n imagePosition = 'top',\n onClick,\n variant = 'default',\n}: CardProps) => {\n return (\n <article\n className={cx(\n styles.card,\n imagePosition && styles[`image-${imagePosition}`],\n onClick && styles.clickable,\n checkbox?.checked && styles.selected\n )}\n data-minimal={variant === 'minimal'}\n onClick={onClick}\n onKeyDown={(e) => {\n if (!onClick) return;\n\n if (e.currentTarget !== document.activeElement) {\n return;\n }\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.click();\n }\n }}\n tabIndex={onClick ? 0 : -1}\n >\n {image && variant !== 'minimal' && <Figure className={styles.image}>{image}</Figure>}\n <section>\n <div className={cx(styles.head, variant === 'minimal' && styles.center)}>\n {checkbox && (\n <span onClick={(e) => e.stopPropagation()}>\n <Checkbox {...checkbox} />\n </span>\n )}\n {header}\n {badge && <Badge {...badge} />}\n {icon && (\n <Icon\n name={icon}\n size='medium'\n />\n )}\n {actions}\n </div>\n {children && (\n <div className={cx(styles.content, !!header && styles.margin)}>{children}</div>\n )}\n </section>\n </article>\n );\n};\n"],"names":["Card","actions","badge","checkbox","children","header","icon","image","imagePosition","onClick","variant","jsxs","cx","styles","card","clickable","checked","selected","e","currentTarget","document","activeElement","key","preventDefault","click","jsx","Figure","head","center","stopPropagation","Checkbox","Badge","Icon","content","margin"],"mappings":";;;;;;;;;;;;;;;;;;GAoCaA,IAAOA,CAAC;AAAA,EACnBC,SAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,SAAAA;AAAAA,EACAC,SAAAA,IAAU;AACD,MAEP,gBAAAC,EAAC,WAAA,EACC,WAAWC,EACTC,EAAOC,MACPN,KAAiBK,EAAO,SAASL,CAAa,EAAE,GAChDC,KAAWI,EAAOE,YAClBZ,KAAAA,gBAAAA,EAAUa,YAAWH,EAAOI,QAC9B,GACA,gBAAcP,MAAY,WAC1B,SAAAD,GACA,WAAYS,CAAAA,MAAM;AAChB,EAAKT,KAEDS,EAAEC,kBAAkBC,SAASC,kBAI7BH,EAAEI,QAAQ,WAAWJ,EAAEI,QAAQ,SACjCJ,EAAEK,eAAAA,GACFL,EAAEC,cAAcK,MAAAA;AAEpB,GACA,UAAUf,IAAU,IAAI,IAAG,kBAAA,QAE1BF,UAAAA;AAAAA,EAAAA,KAASG,MAAY,aAAa,gBAAAe,EAACC,KAAO,WAAWb,EAAON,OAAQA,UAAAA,EAAAA,CAAM;AAAA,oBAC1E,WAAA,EACC,UAAA;AAAA,IAAA,gBAAAI,EAAC,OAAA,EAAI,WAAWC,EAAGC,EAAOc,MAAMjB,MAAY,aAAaG,EAAOe,MAAM,GACnEzB,UAAAA;AAAAA,MAAAA,KACC,gBAAAsB,EAAC,QAAA,EAAK,SAAUP,CAAAA,MAAMA,EAAEW,gBAAAA,GACtB,UAAA,gBAAAJ,EAACK,GAAA,EAAS,GAAI3B,EAAAA,CAAS,GACzB;AAAA,MAEDE;AAAAA,MACAH,KAAS,gBAAAuB,EAACM,GAAA,EAAM,GAAI7B,EAAAA,CAAM;AAAA,MAC1BI,KACC,gBAAAmB,EAACO,GAAA,EACC,MAAM1B,GACN,MAAK,UAAQ;AAAA,MAGhBL;AAAAA,IAAAA,GACH;AAAA,IACCG,KACC,gBAAAqB,EAAC,OAAA,EAAI,WAAWb,EAAGC,EAAOoB,SAAS,CAAC,CAAC5B,KAAUQ,EAAOqB,MAAM,GAAI9B,UAAAA,EAAAA,CAAS;AAAA,EAAA,EAAA,CAE7E;AAAA,GACF;"}
|
|
@@ -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/index17.css');const r=require("react/jsx-runtime"),s=require("../../icons-o8Z5npPW.cjs"),n=require("../../utils-DBzf7CFq.cjs"),i="_collapsible_7flaz_1",a={collapsible:i},p=({children:c,disabled:o,label:e})=>{const l=n.resolveColor("--color-primary"),t=o?void 0:{"--icon-svg":s.iconSVG("chevron").replace("currentColor",l),"--icon-svg-open":s.iconSVG("chevron").replace("%3Cpath","%3Cpath transform='rotate(180 12 12)'").replace("currentColor",l)};return r.jsxs("details",{className:a.collapsible,open:o||void 0,"data-component":"collapsible",children:[r.jsx("summary",{style:t,children:e&&e}),c]})};exports.Collapsible=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { i as e } from "../../icons-06oXnjRF.js";
|
|
3
3
|
import { r as n } from "../../utils--n2yqjCy.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index17.css';const i = "_collapsible_7flaz_1", p = {
|
|
5
5
|
collapsible: i
|
|
6
6
|
}, C = ({
|
|
7
7
|
children: s,
|
|
@@ -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/index18.css');const d=require("react/jsx-runtime"),tt=require("../../classix-5H4IWnMA.cjs"),c=require("react"),mt=require("../button/index.cjs"),pt=require("../figure/index.cjs"),gt=require("../icon/index.cjs"),Ot="_croppable_2wdo8_1",St="_empty_2wdo8_14",Ut="_media_2wdo8_22",It="_overlay_2wdo8_33",Pt="_viewport_2wdo8_41",Yt="_draggable_2wdo8_53",Xt="_dragging_2wdo8_57",At="_inner_2wdo8_61",Dt="_standalone_2wdo8_77",z={croppable:Ot,empty:St,media:Ut,overlay:It,viewport:Pt,draggable:Yt,dragging:Xt,inner:At,standalone:Dt},Wt=192,B={offset:{x:0,y:0},zoom:1},wt="Select image",S=10,W=.1,Ht=.92,m=(h,w,R)=>Math.min(R,Math.max(w,h)),Zt=h=>new Promise((w,R)=>{const f=URL.createObjectURL(h),a=new globalThis.Image;a.onload=()=>{URL.revokeObjectURL(f),w(a)},a.onerror=()=>{URL.revokeObjectURL(f),R(new Error("croppable-image-load-failed"))},a.src=f}),kt=async({file:h,fill:w,transform:R,viewport:f})=>{const a=await Zt(h),U=f.width/a.naturalWidth,M=f.height/a.naturalHeight,y=Math.max(U,M),H=a.naturalWidth*y,E=a.naturalHeight*y,Q=w==="width"?Math.max(W,U/y):w==="height"?Math.max(W,M/y):W,j=m(R.zoom,Q,S),x=y*j,b=H*j,N=E*j,p=(f.width-b)/2+R.offset.x,L=(f.height-N)/2+R.offset.y,I=m((0-p)/x,0,a.naturalWidth),T=m((0-L)/x,0,a.naturalHeight),v=m(f.width/x,1,Math.max(1,a.naturalWidth-I)),s=m(f.height/x,1,Math.max(1,a.naturalHeight-T)),_=document.createElement("canvas"),u=_.getContext("2d");if(!u)throw new Error("croppable-image-context-missing");_.width=Math.max(1,Math.round(v)),_.height=Math.max(1,Math.round(s)),u.drawImage(a,I,T,v,s,0,0,_.width,_.height);const P=h.type.startsWith("image/")?h.type:"image/jpeg",Y=await new Promise(q=>{_.toBlob(q,P,Ht)});if(!Y)throw new Error("croppable-image-export-failed");return new globalThis.File([Y],h.name,{lastModified:Date.now(),type:Y.type||P})},Bt=({children:h,fill:w="none",height:R,image:f,label:a,onCroppableChange:U,onFileChange:M,onImageChange:y,onTransformChange:H,transform:E,standalone:Q})=>{const j=c.useRef(null),x=c.useRef(null),b=c.useRef(null),N=c.useRef(null),p=c.useRef(y),L=c.useRef(null),I=c.useRef(null),T=c.useRef(null),v=c.useRef(new Map),s=c.useRef(B),_=c.useRef(null),[u,P]=c.useState(null),[Y,q]=c.useState(null),[et,V]=c.useState(!1),[xt,nt]=c.useState(B),[F,ot]=c.useState(null),[g,yt]=c.useState({width:0,height:0}),Z=(()=>{const t=g.width,n=g.height;if(!t||!n)return{width:0,height:0,minZoom:W};if(!u)return{width:t,height:n,minZoom:W};const o=t/u.width,e=n/u.height,r=Math.max(o,e),i=w==="width"?o/r:w==="height"?e/r:0;return{width:u.width*r,height:u.height*r,minZoom:Math.max(W,i)}})(),X=Z.minZoom,k=E??xt,A=m(k.zoom,X,S),$=Y??f??null,rt=!h&&!!f&&!Y&&!F,G=!rt,ct=h??($?d.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&P({width:n.naturalWidth,height:n.naturalHeight})},src:$}):null),D=ct==null,J=(t,n)=>{const{maxX:o,maxY:e}=it(n);return{x:m(t.x,-o,o),y:m(t.y,-e,e)}},st=(t,n)=>{const o=_.current;if(!o)return null;const e=o.getBoundingClientRect(),r=t-e.left-e.width/2,i=n-e.top-e.height/2;return{x:r,y:i}},bt=(t,n,o,e)=>{const r=m(n,X,S),i=m(o,X,S);if(r===0)return t;const l=i/r;return{x:(1-l)*e.x+l*t.x,y:(1-l)*e.y+l*t.y}},_t=(t,n,o)=>{const e=s.current.zoom,r=m(t,X,S),i=s.current.offset,l=o?bt(i,e,r,o):n,O=J(l,r);s.current={zoom:r,offset:O},E||nt({zoom:r,offset:O}),H==null||H({zoom:r,offset:O})},K=(t,n,o)=>{I.current={zoom:t,offset:n,anchor:o??null},x.current==null&&(x.current=window.requestAnimationFrame(()=>{x.current=null;const e=I.current;I.current=null;const r=(e==null?void 0:e.zoom)??s.current.zoom,i=(e==null?void 0:e.offset)??s.current.offset,l=(e==null?void 0:e.anchor)??null;_t(r,i,l)}))},zt=t=>{if(D||!G)return;const n=t.ctrlKey?.001:25e-5,o=s.current.zoom*Math.exp(-t.deltaY*n),e=st(t.clientX,t.clientY);K(o,s.current.offset,e)},it=t=>{const n=g.width,o=g.height;if(!n||!o)return{maxX:0,maxY:0};const e=m(t,X,S),r=Z.width*e,i=Z.height*e,l=Math.max(0,(r-n)/2),O=Math.max(0,(i-o)/2);return{maxX:l,maxY:O}},Rt=t=>{var r;const n=t.target,o=((r=n.files)==null?void 0:r[0])??null;if(L.current&&(URL.revokeObjectURL(L.current),L.current=null),!o){q(null),ot(null),M==null||M(null),n.value="";return}const e=URL.createObjectURL(o);L.current=e,q(e),P(null),ot(o),K(B.zoom,B.offset),s.current=B,M==null||M(o),n.value=""},Mt=t=>{if(!(D||!G||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=v.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){b.current=null,j.current=null,V(!1);const[o,e]=Array.from(n.values());T.current=Math.hypot(o.x-e.x,o.y-e.y);return}}j.current=t.pointerId,b.current={x:t.clientX,y:t.clientY,originX:s.current.offset.x,originY:s.current.offset.y}}},Et=t=>{if(D||!G)return;if(t.pointerType==="touch"){const r=v.current;if(!r.has(t.pointerId))return;if(r.set(t.pointerId,{x:t.clientX,y:t.clientY}),r.size===2){const[i,l]=Array.from(r.values()),O=i.x-l.x,jt=i.y-l.y,ht=Math.hypot(O,jt),ft={x:(i.x+l.x)/2,y:(i.y+l.y)/2};if(T.current){const Lt=ht/T.current,Tt=s.current.zoom*Lt,vt=st(ft.x,ft.y);K(Tt,s.current.offset,vt)}T.current=ht;return}}if(j.current!==t.pointerId||!b.current||!C)return;const n=t.clientX-b.current.x,o=t.clientY-b.current.y,e=Math.abs(n)+Math.abs(o);!et&&e>2&&V(!0),!(e<=1)&&K(s.current.zoom,{x:b.current.originX+n,y:b.current.originY+o})},at=t=>{t.pointerType==="touch"&&(v.current.delete(t.pointerId),v.current.size<2&&(T.current=null)),j.current===t.pointerId&&(j.current=null,b.current=null,V(!1))};c.useEffect(()=>{if(!E)return;const t=m(E.zoom,X,S);s.current={zoom:t,offset:J(E.offset,t)}},[E,g.width,g.height,u==null?void 0:u.width,u==null?void 0:u.height]),c.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]),c.useEffect(()=>{const t=_.current;if(!t)return;const n=()=>{const r=t.getBoundingClientRect();yt(i=>i.width===r.width&&i.height===r.height?i:{width:r.width,height:r.height}),U&&U(r)};n();const o=()=>n();if(window.addEventListener("scroll",o,!0),typeof ResizeObserver>"u"){const r=()=>n();return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",o,!0)}},[U]),c.useEffect(()=>{if(E)return;const t=s.current.offset,n=J(t,A);t.x===n.x&&t.y===n.y||(s.current={zoom:s.current.zoom,offset:n},nt(o=>({...o,offset:n})))},[A,u,g.width,g.height]),c.useEffect(()=>{$||P(null)},[$]),c.useEffect(()=>{p.current=y},[y]),c.useEffect(()=>{var o;if(!y)return;if(!F||!g.width||!g.height||h){(o=p.current)==null||o.call(p,null);return}let t=!0;const n=window.setTimeout(()=>{kt({file:F,fill:w,transform:{zoom:A,offset:k.offset},viewport:g}).then(e=>{var r;t&&((r=p.current)==null||r.call(p,e))}).catch(()=>{var e;t&&((e=p.current)==null||e.call(p,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[h,A,k.offset,w,F,g]),c.useEffect(()=>()=>{x.current!=null&&(window.cancelAnimationFrame(x.current),x.current=null)},[]);const ut=it(A),C=!D&&G&&(ut.maxX>0||ut.maxY>0),lt=()=>{var t;return(t=N.current)==null?void 0:t.click()},dt=t=>{t.preventDefault(),t.stopPropagation(),lt()};return d.jsxs("div",{className:tt.t(z.croppable,Q&&z.standalone),onClick:()=>{D&<()},"data-component":"croppable",children:[d.jsx("input",{accept:"image/*",onChange:Rt,ref:N,type:"file"}),d.jsx("div",{className:z.viewport,ref:_,onDragStart:t=>t.preventDefault(),onPointerDown:Mt,onPointerMove:Et,onPointerUp:at,onPointerCancel:at,onWheel:zt,style:{"--croppable-height":`${R??Wt}px`,"--croppable-zoom":A,"--croppable-x":`${k.offset.x}px`,"--croppable-y":`${k.offset.y}px`,...u?{"--croppable-image-width":`${Z.width}px`,"--croppable-image-height":`${Z.height}px`}:null},children:D?d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??wt})]}):d.jsxs("div",{className:tt.t(z.media,C&&z.draggable,C&&et&&z.dragging),children:[d.jsx("div",{className:tt.t(z.inner),children:ct}),rt&&d.jsx("div",{className:z.overlay,children:d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??wt})]})})]})})]})};exports.Croppable=Bt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -4,7 +4,7 @@ import { useRef as x, useState as Z, useEffect as U } from "react";
|
|
|
4
4
|
import { Button as wt } from "../button/index.js";
|
|
5
5
|
import { Figure as xt } from "../figure/index.js";
|
|
6
6
|
import { Icon as yt } from "../icon/index.js";
|
|
7
|
-
import '../../assets/
|
|
7
|
+
import '../../assets/index18.css';const Yt = "_croppable_2wdo8_1", Xt = "_empty_2wdo8_14", At = "_media_2wdo8_22", Dt = "_overlay_2wdo8_33", Wt = "_viewport_2wdo8_41", Ht = "_draggable_2wdo8_53", St = "_dragging_2wdo8_57", Zt = "_inner_2wdo8_61", jt = "_standalone_2wdo8_77", M = {
|
|
8
8
|
croppable: Yt,
|
|
9
9
|
empty: Xt,
|
|
10
10
|
media: At,
|
|
@@ -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/index19.css');const i=require("react/jsx-runtime"),E=require("../../classix-5H4IWnMA.cjs"),o=require("react"),W=require("../button/index.cjs"),U=require("../../icons-o8Z5npPW.cjs"),X=require("../input/index.cjs"),Y=require("../../styles.module-CitJm17A.cjs"),Z=require("../list/index.cjs"),k=require("../../index-OLuoLabz.cjs"),M=require("../../utils-DBzf7CFq.cjs"),ee="_dropdown_1dsxx_1",te="_empty_1dsxx_4",ne="_group_1dsxx_5",re="_placeholder_1dsxx_6",se="_filter_1dsxx_14",oe="_native_1dsxx_25",le="_option_1dsxx_35",ie="_options_1dsxx_57",ce="_panel_1dsxx_81",ae="_selected_1dsxx_104",ue="_text_1dsxx_108",de="_trigger_1dsxx_117",pe="_minimal_1dsxx_133",c={dropdown:ee,empty:te,group:ne,placeholder:re,filter:se,native:oe,option:le,options:ie,panel:ce,selected:ae,text:ue,trigger:de,minimal:pe};function Q(e,r){return{"--icon-svg":U.iconSVG(e).replace("currentColor",r)}}function N(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(N).join(" "):o.isValidElement(e)?N(e.props.children):""}function fe(e){return o.isValidElement(e)&&e.type==="option"}function me(e){return o.isValidElement(e)&&e.type==="optgroup"}function xe(e){return o.isValidElement(e)&&e.type===o.Fragment}function he(e){return o.isValidElement(e)&&e.type===k.Select}function V(e,r,s=!1){const l=[];return o.Children.forEach(e,t=>{if(xe(t)){l.push(...V(t.props.children,r,s));return}if(fe(t)){const d=N(t.props.children).trim(),p=t.props.value!=null?String(t.props.value):d;l.push({disabled:s||!!t.props.disabled,groupLabel:r,hidden:!!t.props.hidden,isPlaceholder:!!(t.props.hidden&&p===""),label:t.props.children,selected:!!t.props.selected,text:d,value:p});return}me(t)&&l.push(...V(t.props.children,t.props.label,s||!!t.props.disabled))}),l}function _e(e){const r=e.trim();if(!r)return null;const l=[.../[*?]/.test(r)?r:`*${r}*`].map(t=>t==="*"?".*":t==="?"?".":t.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${l}$`,"i")}function ge(e,r){const s=_e(r),l=e.filter(t=>!t.hidden&&!t.isPlaceholder);return s?l.filter(t=>s.test([t.groupLabel,t.text,t.value].filter(Boolean).join(" "))):l}function ve(e,r){return e.find(s=>s.value===r)??e.find(s=>s.isPlaceholder)??e[0]}function ye(e,r,s){var t;if(r!=null)return String(r);if(s!=null)return String(s);const l=e.find(d=>d.selected);return l?l.value:((t=e[0])==null?void 0:t.value)??""}function be(e){if(he(e)){const{children:r,placeholder:s,...l}=e.props;return{children:i.jsxs(i.Fragment,{children:[s&&i.jsx("option",{hidden:!0,value:"",children:s}),r]}),props:l}}return{children:e.props.children,props:e.props}}const we=({children:e,className:r,emptyLabel:s="No matches found",searchPlaceholder:l="Filter",variant:t="default",...d})=>{const p=be(e),{defaultValue:z,onChange:_,value:g,...T}=p.props,q=k.sanitizeSelectProps(T),C=o.useRef(null),R=o.useRef(null),O=o.useRef(null),P=o.useRef(null),x=V(p.children),h=g!=null,v=ye(x,g,z),[y,b]=o.useState(()=>v),[u,w]=o.useState(!1),[B,$]=o.useState(""),S=h?String(g):y,I={default:M.resolveColor("--colors-semantic-content-secondary"),white:M.resolveColor("--color-white","white")},L=t==="minimal"?I.white:I.default,f=ve(x,S),A=Q("chevron",L),G=Q("search",L),D=ge(x,B);o.useEffect(()=>{!h&&!x.some(n=>n.value===y)&&b(v)},[v,y,h,x]),o.useEffect(()=>{var n;if(!u){$("");return}(n=P.current)==null||n.focus()},[u]),o.useEffect(()=>{if(!u)return;const n=a=>{var m;(m=R.current)!=null&&m.contains(a.target)||w(!1)};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[u]);const K=n=>{h||b(n.target.value),_==null||_(n)},j=()=>{var n;w(!1),(n=C.current)==null||n.focus()},H=n=>{var F;h||b(n);const a=O.current;if(!a){j();return}const m=(F=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:F.set;m==null||m.call(a,n),a.dispatchEvent(new Event("change",{bubbles:!0})),j()},J=n=>{n.key==="Escape"&&j()};return i.jsxs("div",{className:E.t(c.dropdown,t==="minimal"&&c.minimal,r),onKeyDown:J,ref:R,...d,"data-component":"dropdown",children:[i.jsx("select",{...q,"aria-hidden":"true",className:c.native,onChange:K,ref:O,tabIndex:-1,value:S,children:p.children}),i.jsx(W.Button,{"aria-expanded":u,"aria-haspopup":"dialog",className:E.t(t==="default"&&Y.inputStyles.input,c.trigger,(f==null?void 0:f.isPlaceholder)&&c.placeholder),"data-open":u?"true":void 0,disabled:q.disabled,onClick:()=>w(n=>!n),ref:C,style:A,variant:"minimal",children:i.jsx("span",{className:c.text,children:(f==null?void 0:f.label)??"Select an option"})}),u&&i.jsxs("div",{className:c.panel,children:[i.jsx(X.Input,{"aria-label":"Filter",className:c.filter,icon:"search",onChange:n=>$(n.target.value),placeholder:l,ref:P,style:G,type:"search",value:B}),i.jsx(Z.List,{"aria-label":"Dropdown",className:c.options,children:D.length>0?D.map(n=>{const a=n.value===S;return i.jsx("li",{"data-component":"dropdown",children:i.jsxs(W.Button,{"aria-label":a?`${n.text}, selected`:n.text,className:E.t(c.option,a&&c.selected),disabled:n.disabled,onClick:()=>H(n.value),variant:"minimal",children:[i.jsx("span",{className:c.text,children:n.label}),n.groupLabel&&i.jsx("small",{className:c.group,children:n.groupLabel})]})},`${n.groupLabel??"root"}-${n.value}`)}):i.jsx("li",{className:c.empty,children:s})})]})]})};exports.Dropdown=we;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -4,11 +4,11 @@ import ee, { useRef as g, useState as O, useEffect as P, Children as te, isValid
|
|
|
4
4
|
import { Button as A } from "../button/index.js";
|
|
5
5
|
import { i as ne } from "../../icons-06oXnjRF.js";
|
|
6
6
|
import { Input as re } from "../input/index.js";
|
|
7
|
-
import { i as oe } from "../../styles.module-
|
|
7
|
+
import { i as oe } from "../../styles.module-Ioe0wPWW.js";
|
|
8
8
|
import { List as se } from "../list/index.js";
|
|
9
|
-
import { s as le, S as ie } from "../../index-
|
|
9
|
+
import { s as le, S as ie } from "../../index-BDTbPD0V.js";
|
|
10
10
|
import { r as G } from "../../utils--n2yqjCy.js";
|
|
11
|
-
import '../../assets/
|
|
11
|
+
import '../../assets/index19.css';const ae = "_dropdown_1dsxx_1", ce = "_empty_1dsxx_4", pe = "_group_1dsxx_5", ue = "_placeholder_1dsxx_6", de = "_filter_1dsxx_14", fe = "_native_1dsxx_25", me = "_option_1dsxx_35", he = "_options_1dsxx_57", xe = "_panel_1dsxx_81", ge = "_selected_1dsxx_104", _e = "_text_1dsxx_108", ve = "_trigger_1dsxx_117", ye = "_minimal_1dsxx_133", l = {
|
|
12
12
|
dropdown: ae,
|
|
13
13
|
empty: ce,
|
|
14
14
|
group: pe,
|
|
@@ -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/index20.css');const i=require("react/jsx-runtime"),b=require("../../classix-5H4IWnMA.cjs"),z=require("react"),q=require("../button/index.cjs"),I=require("../icon/index.cjs"),R="_dropzone_1rpsf_1",T="_dragging_1rpsf_19",S="_minimal_1rpsf_23",g={dropzone:R,dragging:T,minimal:S},k=({accepts:F,label:D="Select files",maxFileSize:m,multiple:d=!1,onChange:n,onValidation:a,variant:p="default",...y})=>{const f=z.useRef(null),[x,l]=z.useState(!1),c=e=>{e.preventDefault(),e.stopPropagation()},_=e=>{const t=f.current;if(!t)return;const s=new DataTransfer;for(const r of e)s.items.add(r);t.files=s.files,n==null||n({target:t,currentTarget:t})},v=e=>{const{validFiles:t,emptyFiles:s,oversizedFiles:r}=e.reduce((u,o)=>(o.size===0?u.emptyFiles.push(o):m&&o.size>m?u.oversizedFiles.push(o):u.validFiles.push(o),u),{validFiles:[],emptyFiles:[],oversizedFiles:[]});return(s.length>0||r.length>0)&&(a==null||a(s,r)),t},j=e=>{c(e),l(!1);const t=Array.from(e.dataTransfer.files??[]),s=v(t);if(s.length===0)return;const r=d?s:s.slice(0,1);_(r)},h=e=>{const t=Array.from(e.target.files??[]),s=v(t);if(s.length===t.length){n==null||n(e);return}const r=d?s:s.slice(0,1);_(r)};return i.jsx("div",{className:b.t(g.dropzone,g[p],x&&g.dragging),onDragEnter:e=>{c(e),l(!0)},onDragOver:e=>{c(e),l(!0)},onDragLeave:e=>{c(e),l(!1)},onDrop:j,...y,"data-component":"dropzone",children:i.jsxs("label",{children:[i.jsx("input",{accept:F,hidden:!0,multiple:d,onChange:h,ref:f,type:"file"}),i.jsx(I.Icon,{name:"upload",size:p==="minimal"?"medium":"large"}),i.jsx("br",{}),p!=="minimal"&&i.jsx(q.Button,{onClick:()=>{var e;return(e=f.current)==null?void 0:e.click()},type:"button",children:D})]})})};exports.Dropzone=k;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -3,7 +3,7 @@ import { t as T } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import { useRef as j, useState as k } from "react";
|
|
4
4
|
import { Button as x } from "../button/index.js";
|
|
5
5
|
import { Icon as A } from "../icon/index.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index20.css';const R = "_dropzone_1rpsf_1", w = "_dragging_1rpsf_19", B = "_minimal_1rpsf_23", m = {
|
|
7
7
|
dropzone: R,
|
|
8
8
|
dragging: w,
|
|
9
9
|
minimal: B
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require('../../assets/
|
|
1
|
+
"use strict";require('../../assets/index21.css');var p0=Object.defineProperty;var g0=(n,e,t)=>e in n?p0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var mn=(n,e,t)=>g0(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react/jsx-runtime"),z=require("react"),Fs=require("react-dom"),js=require("../../classix-5H4IWnMA.cjs"),Ke=require("../button/index.cjs"),Je=require("../icon/index.cjs"),qs=require("../input/index.cjs"),m0=require("../toolbar/index.cjs");function b0(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Ru=b0(z);function fn(n){return{}}const du={},y0={},ka={},It={},Yt={},Ln={},en={},hu={},ei={},Dn={},Mn={},$e={},Wi={},$i={},_0={},Na={},x0={},Aa={},v0={},Oa={},Ia={},Fr={},w0={},Pa={},La={},Da={},S0={},T0={},C0={},Us={},Ma={},E0={},Ra={},Ba={},k0={},pu={},Hi={},ti={},N0={},A0={},hr={},pr={},O0={},I0={},P0={},Be=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,L0=Be&&"documentMode"in document?document.documentMode:null,Pe=Be&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),_t=Be&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),jr=!(!Be||!("InputEvent"in window)||L0)&&"getTargetRanges"in new window.InputEvent("input"),gu=Be&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Kn=Be&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,D0=Be&&/Android/.test(navigator.userAgent),Fa=Be&&/^(?=.*Chrome).*/i.test(navigator.userAgent),M0=Be&&D0&&Fa,Vi=Be&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Fa,Jn=1,wt=3,Lt=0,ja=1,rn=2,R0=0,B0=1,F0=2,qr=4,Ur=8,Gi=128,j0=112|(3|qr|Ur)|Gi,Ki=1,Ji=2,Xi=3,Zi=4,Qi=5,Yi=6,mu=gu||Kn||Vi?" ":"",rt=`
|
|
2
2
|
|
|
3
3
|
`,q0=_t?" ":mu,qa="֑-߿יִ-﷽ﹰ-ﻼ",Ua="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",U0=new RegExp("^[^"+Ua+"]*["+qa+"]"),z0=new RegExp("^[^"+qa+"]*["+Ua+"]"),Dt={bold:1,code:16,highlight:Gi,italic:2,strikethrough:qr,subscript:32,superscript:64,underline:Ur},W0={directionless:1,unmergeable:2},zs={center:Ji,end:Yi,justify:Zi,left:Ki,right:Xi,start:Qi},$0={[Ji]:"center",[Yi]:"end",[Zi]:"justify",[Ki]:"left",[Xi]:"right",[Qi]:"start"},H0={normal:0,segmented:2,token:1},V0={[R0]:"normal",[F0]:"segmented",[B0]:"token"};function G0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var M=G0(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function zr(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const K0=100;let ni=!1,es=0;function J0(n){es=n.timeStamp}function Bu(n,e,t){const r=n.nodeName==="BR",u=e.__lexicalLineBreak;return u&&(n===u||r&&n.previousSibling===u)||r&&yu(n,t)!==void 0}function X0(n,e,t){const r=Ne(t._window);let u=null,i=null;r!==null&&r.anchorNode===n&&(u=r.anchorOffset,i=r.focusOffset);const s=n.nodeValue;s!==null&&is(e,s,u,i,!1)}function Z0(n,e,t){if(P(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return e.nodeType===wt&&t.isAttached()}function Q0(n,e,t,r){for(let u=n;u&&!hf(u);u=Zn(u)){const i=yu(u,e);if(i!==void 0){const s=ae(i,t);if(s)return ne(s)?void 0:[u,s]}else if(u===r)return[r,Xa(t)]}}function za(n,e,t){ni=!0;const r=performance.now()-es>K0;try{Se(n,()=>{const u=j()||function(c){return c.getEditorState().read(()=>{const d=j();return d!==null?d.clone():null})}(n),i=new Map,s=n.getRootElement(),o=n._editorState,a=n._blockCursorElement;let l=!1,f="";for(let c=0;c<e.length;c++){const d=e[c],p=d.type,m=d.target,g=Q0(m,n,o,s);if(!g)continue;const[y,b]=g;if(p==="characterData")r&&D(b)&&Z0(u,m,b)&&X0(m,b,n);else if(p==="childList"){l=!0;const x=d.addedNodes;for(let S=0;S<x.length;S++){const I=x[S],C=Ka(I),L=I.parentNode;if(L!=null&&I!==a&&C===null&&!Bu(I,L,n)){if(_t){const U=I.innerText||I.nodeValue;U&&(f+=U)}L.removeChild(I)}}const w=d.removedNodes,T=w.length;if(T>0){let S=0;for(let I=0;I<T;I++){const C=w[I];(Bu(C,m,n)||a===C)&&(m.appendChild(C),S++)}T!==S&&i.set(y,b)}}}if(i.size>0)for(const[c,d]of i)d.reconcileObservedMutation(c,n);const h=t.takeRecords();if(h.length>0){for(let c=0;c<h.length;c++){const d=h[c],p=d.addedNodes,m=d.target;for(let g=0;g<p.length;g++){const y=p[g],b=y.parentNode;b==null||y.nodeName!=="BR"||Bu(y,m,n)||b.removeChild(y)}}t.takeRecords()}u!==null&&(l&&(u.dirty=!0,ke(u)),_t&&el(n)&&u.insertRawText(f))})}finally{ni=!1}}function Wa(n){const e=n._observer;e!==null&&za(n,e.takeRecords(),e)}function $a(n){(function(e){es===0&&xu(e).addEventListener("textInput",J0,!0)})(n),n._observer=new MutationObserver((e,t)=>{za(n,e,t)})}function Ws(n,e){const t=n.__mode,r=n.__format,u=n.__style,i=e.__mode,s=e.__format,o=e.__style;return!(t!==null&&t!==i||r!==null&&r!==s||u!==null&&u!==o)}function $s(n,e){const t=n.mergeWithSibling(e),r=ue()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Hs(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&D(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Ws(e,r)){r=$s(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&D(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ws(r,t)){r=$s(r,t);break}break}t.remove()}}else r.remove()}function Ha(n){return Vs(n.anchor),Vs(n.focus),n}function Vs(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,u;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),u=!0):(r=e.getChildAtIndex(t),u=!1),D(r)){n.set(r.__key,u?r.getTextContentSize():0,"text");break}if(!E(r))break;n.set(r.__key,u?r.getChildrenSize():0,"element")}}let Y0=1;const ef=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function ts(n){const e=document.activeElement;if(e===null)return!1;const t=e.nodeName;return ne(un(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&bu(e)==null)}function Xn(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!ts(e)&&Va(e)===n}catch{return!1}}function ns(n){return n instanceof Cu}function Va(n){let e=n;for(;e!=null;){const t=bu(e);if(ns(t))return t;e=Zn(e)}return null}function bu(n){return n?n.__lexicalEditor:null}function At(n){return n.isToken()||n.isSegmented()}function tf(n){return n.nodeType===wt}function Wr(n){let e=n;for(;e!=null;){if(tf(e))return e;e=e.firstChild}return null}function $r(n,e,t){const r=Dt[e];if(t!==null&&(n&r)==(t&r))return n;let u=n^r;return e==="subscript"?u&=-65:e==="superscript"&&(u&=-33),u}function Ga(n){return D(n)||xt(n)||ne(n)}function nf(n,e){if(e!=null)return void(n.__key=e);ye(),xl();const t=ue(),r=ot(),u=""+Y0++;r._nodeMap.set(u,n),E(n)?t._dirtyElements.set(u,!0):t._dirtyLeaves.add(u),t._cloneNotNeeded.add(u),t._dirtyType=ja,n.__key=u}function Pt(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),u=n.getPreviousSibling(),i=n.getNextSibling();if(u===null)if(i!==null){const s=i.getWritable();r.__first=i.__key,s.__prev=null}else r.__first=null;else{const s=u.getWritable();if(i!==null){const o=i.getWritable();o.__prev=s.__key,s.__next=o.__key}else s.__next=null;t.__prev=null}if(i===null)if(u!==null){const s=u.getWritable();r.__last=u.__key,s.__next=null}else r.__last=null;else{const s=i.getWritable();if(u!==null){const o=u.getWritable();o.__next=s.__key,s.__prev=o.__key}else s.__prev=null;t.__next=null}r.__size--,t.__parent=null}}function Hr(n){xl();const e=n.getLatest(),t=e.__parent,r=ot(),u=ue(),i=r._nodeMap,s=u._dirtyElements;t!==null&&function(a,l,f){let h=a;for(;h!==null;){if(f.has(h))return;const c=l.get(h);if(c===void 0)break;f.set(h,!1),h=c.__parent}}(t,i,s);const o=e.__key;u._dirtyType=ja,E(n)?s.set(o,!0):u._dirtyLeaves.add(o)}function fe(n){ye();const e=ue(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=ae(t);r!==null&&r.getWritable()}if(n!==null){const r=ae(n);r!==null&&r.getWritable()}}}function gt(){return nr()?null:ue()._compositionKey}function ae(n,e){const t=(e||ot())._nodeMap.get(n);return t===void 0?null:t}function Ka(n,e){const t=yu(n,ue());return t!==void 0?ae(t,e):null}function yu(n,e){return n[`__lexicalKey_${e._key}`]}function un(n,e){let t=n;for(;t!=null;){const r=Ka(t,e);if(r!==null)return r;t=Zn(t)}return null}function Ja(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function Gs(n){return n.read(()=>ie().getTextContent())}function ie(){return Xa(ot())}function Xa(n){return n._nodeMap.get("root")}function ke(n){ye();const e=ot();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function Zt(n){const e=ue(),t=function(r,u){let i=r;for(;i!=null;){const s=yu(i,u);if(s!==void 0)return s;i=Zn(i)}return null}(n,e);return t===null?n===e.getRootElement()?ae("root"):null:ae(t)}function Ks(n,e){return e?n.getTextContentSize():0}function Za(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function rs(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function Qa(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ya(n){return n.nodeType===wt?n.nodeValue:null}function us(n,e,t){const r=Ne(e._window);if(r===null)return;const u=r.anchorNode;let{anchorOffset:i,focusOffset:s}=r;if(u!==null){let o=Ya(u);const a=un(u);if(o!==null&&D(a)){if(o===mu&&t){const l=t.length;o=t,i=l,s=l}o!==null&&is(a,o,i,s,n)}}}function is(n,e,t,r,u){let i=n;if(i.isAttached()&&(u||!i.isDirty())){const s=i.isComposing();let o=e;(s||u)&&e[e.length-1]===mu&&(o=e.slice(0,-1));const a=i.getTextContent();if(u||o!==a){if(o===""){if(fe(null),gu||Kn||Vi)i.remove();else{const m=ue();setTimeout(()=>{m.update(()=>{i.isAttached()&&i.remove()})},20)}return}const l=i.getParent(),f=tr(),h=i.getTextContentSize(),c=gt(),d=i.getKey();if(i.isToken()||c!==null&&d===c&&!s||P(f)&&(l!==null&&!l.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===n.__key&&f.anchor.offset===0&&!i.canInsertTextBefore()&&!s||f.focus.key===n.__key&&f.focus.offset===h&&!i.canInsertTextAfter()&&!s))return void i.markDirty();const p=j();if(!P(p)||t===null||r===null)return void i.setTextContent(o);if(p.setTextNodeRange(i,t,i,r),i.isSegmented()){const m=se(i.getTextContent());i.replace(m),i=m}i.setTextContent(o)}}}function rf(n,e){if(e.isSegmented())return!0;if(!n.isCollapsed())return!1;const t=n.anchor.offset,r=e.getParentOrThrow(),u=e.isToken();return t===0?!e.canInsertTextBefore()||!r.canInsertTextBefore()&&!e.isComposing()||u||function(i){const s=i.getPreviousSibling();return(D(s)||E(s)&&s.isInline())&&!s.canInsertTextAfter()}(e):t===e.getTextContentSize()&&(!e.canInsertTextAfter()||!r.canInsertTextAfter()&&!e.isComposing()||u)}function Js(n){return n==="ArrowLeft"}function Xs(n){return n==="ArrowRight"}function Tn(n,e){return Pe?n:e}function Zs(n){return n==="Enter"}function bn(n){return n==="Backspace"}function yn(n){return n==="Delete"}function Qs(n,e,t){return n.toLowerCase()==="a"&&Tn(e,t)}function uf(){const n=ie();ke(Ha(n.select(0,n.getChildrenSize())))}function En(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const u=n[e];if(typeof u=="string"){const i=zr(u);return t[e]=i,i}return u}function ss(n,e,t,r,u){if(t.size===0)return;const i=r.__type,s=r.__key,o=e.get(i);o===void 0&&M(33,i);const a=o.klass;let l=n.get(a);l===void 0&&(l=new Map,n.set(a,l));const f=l.get(s),h=f==="destroyed"&&u==="created";(f===void 0||h)&&l.set(s,h?"updated":u)}function Ys(n,e,t){const r=n.getParent();let u=t,i=n;return r!==null&&(e&&t===0?(u=i.getIndexWithinParent(),i=r):e||t!==i.getChildrenSize()||(u=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(e?u-1:u)}function Rn(n,e){const t=n.offset;if(n.type==="element")return Ys(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const u=e?r.getPreviousSibling():r.getNextSibling();return u===null?Ys(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):u}}return null}function el(n){const e=xu(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function F(n,e,t){return Sl(n,e,t)}function _u(n){return!he(n)&&!n.isLastChild()&&!n.isInline()}function Vr(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&M(75,e),t}function Zn(n){const e=n.assignedSlot||n.parentElement;return e!==null&&e.nodeType===11?e.host:e}function kn(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function xu(n){const e=n._window;return e===null&&M(78),e}function sf(n){let e=n.getParentOrThrow();for(;e!==null;){if(ut(e))return e;e=e.getParentOrThrow()}return e}function ut(n){return he(n)||E(n)&&n.isShadowRoot()}function St(n){const e=ue(),t=n.constructor.getType(),r=e._nodes.get(t);r===void 0&&M(200,n.constructor.name,t);const{replace:u,replaceWithKlass:i}=r;if(u!==null){const s=u(n),o=s.constructor;return i!==null?s instanceof i||M(201,i.name,i.getType(),o.name,o.getType(),n.constructor.name,t):s instanceof n.constructor&&o!==n.constructor||M(202,o.name,o.getType(),n.constructor.name,t),s.__key===n.__key&&M(203,n.constructor.name,t,o.name,o.getType()),s}return n}function Fu(n,e){!he(n.getParent())||E(e)||ne(e)||M(99)}function ju(n){return(ne(n)||E(n)&&!n.canBeEmpty())&&!n.isInline()}function os(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function of(n,e,t){let r=n._blockCursorElement;if(P(t)&&t.isCollapsed()&&t.anchor.type==="element"&&e.contains(document.activeElement)){const u=t.anchor,i=u.getNode(),s=u.offset;let o=!1,a=null;if(s===i.getChildrenSize())ju(i.getChildAtIndex(s-1))&&(o=!0);else{const l=i.getChildAtIndex(s);if(l!==null&&ju(l)){const f=l.getPreviousSibling();(f===null||ju(f))&&(o=!0,a=n.getElementByKey(l.__key))}}if(o){const l=n.getElementByKey(i.__key);return r===null&&(n._blockCursorElement=r=function(f){const h=f.theme,c=document.createElement("div");c.contentEditable="false",c.setAttribute("data-lexical-cursor","true");let d=h.blockCursor;if(d!==void 0){if(typeof d=="string"){const p=zr(d);d=h.blockCursor=p}d!==void 0&&c.classList.add(...d)}return c}(n._config)),e.style.caretColor="transparent",void(a===null?l.appendChild(r):l.insertBefore(r,a))}}r!==null&&os(r,n,e)}function Ne(n){return Be?(n||window).getSelection():null}function af(n){return Ut(n)&&n.tagName==="A"}function Ut(n){return n.nodeType===1}function eo(n){return n.nodeType===11}function ri(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function Gr(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function ht(n){if(ne(n)&&!n.isInline())return!0;if(!E(n)||ut(n))return!1;const e=n.getFirstChild(),t=e===null||xt(e)||D(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function _n(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function lf(){return ue()}const to=new WeakMap,cf=new Map;function ff(n){if(!n._readOnly&&n.isEmpty())return cf;n._readOnly||M(192);let e=to.get(n);if(!e){e=new Map,to.set(n,e);for(const[t,r]of n._nodeMap){const u=r.__type;let i=e.get(u);i||(i=new Map,e.set(u,i)),i.set(t,r)}}return e}function as(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function df(n,e){const t=(parseInt(n.style.paddingInlineStart,10)||0)/40;e.setIndent(t)}function hf(n){return n.__lexicalUnmanaged===!0}function tl(n,e,t,r,u,i){let s=n.getFirstChild();for(;s!==null;){const o=s.__key;s.__parent===e&&(E(s)&&tl(s,o,t,r,u,i),t.has(o)||i.delete(o),u.push(o)),s=s.getNextSibling()}}let vt,pe,Bn,vu,ui,ii,Mt,Re,si,Fn,oe="",de="",qe=null,Le="",et="",nl=!1,jn=!1,Ir=null;function Kr(n,e){const t=Mt.get(n);if(e!==null){const r=li(n);r.parentNode===e&&e.removeChild(r)}if(Re.has(n)||pe._keyToDOMMap.delete(n),E(t)){const r=Xr(t,Mt);oi(r,0,r.length-1,null)}t!==void 0&&ss(Fn,Bn,vu,t,"destroyed")}function oi(n,e,t,r){let u=e;for(;u<=t;++u){const i=n[u];i!==void 0&&Kr(i,r)}}function Nt(n,e){n.setProperty("text-align",e)}const pf="40px";function rl(n,e){const t=vt.theme.indent;if(typeof t=="string"){const u=n.classList.contains(t);e>0&&!u?n.classList.add(t):e<1&&u&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||pf;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function ul(n,e){const t=n.style;e===0?Nt(t,""):e===Ki?Nt(t,"left"):e===Ji?Nt(t,"center"):e===Xi?Nt(t,"right"):e===Zi?Nt(t,"justify"):e===Qi?Nt(t,"start"):e===Yi&&Nt(t,"end")}function Jr(n,e){const t=Re.get(n);t===void 0&&M(60);const r=t.createDOM(vt,pe);if(function(u,i,s){const o=s._keyToDOMMap;(function(a,l,f){a[`__lexicalKey_${l._key}`]=f})(i,s,u),o.set(u,i)}(n,r,pe),D(t)?r.setAttribute("data-lexical-text","true"):ne(t)&&r.setAttribute("data-lexical-decorator","true"),E(t)){const u=t.__indent,i=t.__size;if(u!==0&&rl(r,u),i!==0){const o=i-1;(function(a,l,f,h){const c=de;de="",ai(a,f,0,l,f.getDOMSlot(h)),sl(f,h),de=c})(Xr(t,Re),o,t,r)}const s=t.__format;s!==0&&ul(r,s),t.isInline()||il(null,t,r),_u(t)&&(oe+=rt,et+=rt)}else{const u=t.getTextContent();if(ne(t)){const i=t.decorate(pe,vt);i!==null&&ol(n,i),r.contentEditable="false"}else D(t)&&(t.isDirectionless()||(de+=u));oe+=u,et+=u}return e!==null&&e.insertChild(r),ss(Fn,Bn,vu,t,"created"),r}function ai(n,e,t,r,u){const i=oe;oe="";let s=t;for(;s<=r;++s){Jr(n[s],u);const o=Re.get(n[s]);o!==null&&D(o)&&(qe===null&&(qe=o.getFormat()),Le===""&&(Le=o.getStyle()))}_u(e)&&(oe+=rt),u.element.__lexicalTextContent=oe,oe=i+oe}function no(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return xt(r)?"line-break":ne(r)&&r.isInline()?"decorator":null}return"empty"}return null}function il(n,e,t){const r=no(n,Mt),u=no(e,Re);r!==u&&e.getDOMSlot(t).setManagedLineBreak(u)}function sl(n,e){const t=e.__lexicalDirTextContent||"",r=e.__lexicalDir||"";if(t!==de||r!==Ir){const i=de==="",s=i?Ir:(u=de,U0.test(u)?"rtl":z0.test(u)?"ltr":null);if(s!==r){const o=e.classList,a=vt.theme;let l=r!==null?a[r]:void 0,f=s!==null?a[s]:void 0;if(l!==void 0){if(typeof l=="string"){const h=zr(l);l=a[r]=h}o.remove(...l)}if(s===null||i&&s==="ltr")e.removeAttribute("dir");else{if(f!==void 0){if(typeof f=="string"){const h=zr(f);f=a[s]=h}f!==void 0&&o.add(...f)}e.dir=s}jn||(n.getWritable().__dir=s)}Ir=s,e.__lexicalDirTextContent=de,e.__lexicalDir=s}var u}function gf(n,e,t){const r=de;var u;de="",qe=null,Le="",function(i,s,o){const a=oe,l=i.__size,f=s.__size;oe="";const h=o.element;if(l===1&&f===1){const c=i.__first,d=s.__first;if(c===d)Cn(c,h);else{const m=li(c),g=Jr(d,null);try{h.replaceChild(g,m)}catch(y){if(typeof y=="object"&&y!=null){const b=`${y.toString()} Parent: ${h.tagName}, new child: {tag: ${g.tagName} key: ${d}}, old child: {tag: ${m.tagName}, key: ${c}}.`;throw new Error(b)}throw y}Kr(c,null)}const p=Re.get(d);D(p)&&(qe===null&&(qe=p.getFormat()),Le===""&&(Le=p.getStyle()))}else{const c=Xr(i,Mt),d=Xr(s,Re);if(c.length!==l&&M(227),d.length!==f&&M(228),l===0)f!==0&&ai(d,s,0,f-1,o);else if(f===0){if(l!==0){const p=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;oi(c,0,l-1,p?null:h),p&&(h.textContent="")}}else(function(p,m,g,y,b,x){const w=y-1,T=b-1;let S,I,C=x.getFirstChild(),L=0,U=0;for(;L<=w&&U<=T;){const A=m[L],B=g[U];if(A===B)C=qu(Cn(B,x.element)),L++,U++;else{S===void 0&&(S=new Set(m)),I===void 0&&(I=new Set(g));const O=I.has(A),N=S.has(B);if(O)if(N){const q=Vr(pe,B);q===C?C=qu(Cn(B,x.element)):(x.withBefore(C).insertChild(q),Cn(B,x.element)),L++,U++}else Jr(B,x.withBefore(C)),U++;else C=qu(li(A)),Kr(A,x.element),L++}const _=Re.get(B);_!==null&&D(_)&&(qe===null&&(qe=_.getFormat()),Le===""&&(Le=_.getStyle()))}const v=L>w,k=U>T;if(v&&!k){const A=g[T+1],B=A===void 0?null:pe.getElementByKey(A);ai(g,p,U,T,x.withBefore(B))}else k&&!v&&oi(m,L,w,x.element)})(s,c,d,l,f,o)}_u(s)&&(oe+=rt),h.__lexicalTextContent=oe,oe=a+oe}(n,e,e.getDOMSlot(t)),sl(e,t),Bt(u=e)&&qe!=null&&qe!==u.__textFormat&&!jn&&(u.setTextFormat(qe),u.setTextStyle(Le)),function(i){Bt(i)&&Le!==""&&Le!==i.__textStyle&&!jn&&i.setTextStyle(Le)}(e),de=r}function Xr(n,e){const t=[];let r=n.__first;for(;r!==null;){const u=e.get(r);u===void 0&&M(101),t.push(r),r=u.__next}return t}function Cn(n,e){const t=Mt.get(n);let r=Re.get(n);t!==void 0&&r!==void 0||M(61);const u=nl||ii.has(n)||ui.has(n),i=Vr(pe,n);if(t===r&&!u){if(E(t)){const s=i.__lexicalTextContent;s!==void 0&&(oe+=s,et+=s);const o=i.__lexicalDirTextContent;o!==void 0&&(de+=o)}else{const s=t.getTextContent();D(t)&&!t.isDirectionless()&&(de+=s),et+=s,oe+=s}return i}if(t!==r&&u&&ss(Fn,Bn,vu,r,"updated"),r.updateDOM(t,i,vt)){const s=Jr(n,null);return e===null&&M(62),e.replaceChild(s,i),Kr(n,null),s}if(E(t)&&E(r)){const s=r.__indent;s!==t.__indent&&rl(i,s);const o=r.__format;o!==t.__format&&ul(i,o),u&&(gf(t,r,i),he(r)||r.isInline()||il(t,r,i)),_u(r)&&(oe+=rt,et+=rt)}else{const s=r.getTextContent();if(ne(r)){const o=r.decorate(pe,vt);o!==null&&ol(n,o)}else D(r)&&!r.isDirectionless()&&(de+=s);oe+=s,et+=s}if(!jn&&he(r)&&r.__cachedText!==et){const s=r.getWritable();s.__cachedText=et,r=s}return i}function ol(n,e){let t=pe._pendingDecorators;const r=pe._decorators;if(t===null){if(r[n]===e)return;t=Ja(pe)}t[n]=e}function qu(n){let e=n.nextSibling;return e!==null&&e===pe._blockCursorElement&&(e=e.nextSibling),e}function mf(n,e,t,r,u,i){oe="",et="",de="",nl=r===rn,Ir=null,pe=t,vt=t._config,Bn=t._nodes,vu=pe._listeners.mutation,ui=u,ii=i,Mt=n._nodeMap,Re=e._nodeMap,jn=e._readOnly,si=new Map(t._keyToDOMMap);const s=new Map;return Fn=s,Cn("root",null),pe=void 0,Bn=void 0,ui=void 0,ii=void 0,Mt=void 0,Re=void 0,vt=void 0,si=void 0,Fn=void 0,s}function li(n){const e=si.get(n);return e===void 0&&M(75,n),e}const Xe=Object.freeze({}),ci=30,fi=[["keydown",function(n,e){if(Nn=n.timeStamp,al=n.key,e.isComposing())return;const{key:t,shiftKey:r,ctrlKey:u,metaKey:i,altKey:s}=n;if(!F(e,_0,n)&&t!=null){if(function(o,a,l,f){return Xs(o)&&!a&&!f&&!l}(t,u,s,i))F(e,Na,n);else if(function(o,a,l,f,h){return Xs(o)&&!f&&!l&&(a||h)}(t,u,r,s,i))F(e,x0,n);else if(function(o,a,l,f){return Js(o)&&!a&&!f&&!l}(t,u,s,i))F(e,Aa,n);else if(function(o,a,l,f,h){return Js(o)&&!f&&!l&&(a||h)}(t,u,r,s,i))F(e,v0,n);else if(function(o,a,l){return function(f){return f==="ArrowUp"}(o)&&!a&&!l}(t,u,i))F(e,Oa,n);else if(function(o,a,l){return function(f){return f==="ArrowDown"}(o)&&!a&&!l}(t,u,i))F(e,Ia,n);else if(function(o,a){return Zs(o)&&a}(t,r))An=!0,F(e,Fr,n);else if(function(o){return o===" "}(t))F(e,w0,n);else if(function(o,a){return Pe&&a&&o.toLowerCase()==="o"}(t,u))n.preventDefault(),An=!0,F(e,Yt,!0);else if(function(o,a){return Zs(o)&&!a}(t,r))An=!1,F(e,Fr,n);else if(function(o,a,l,f){return Pe?!a&&!l&&(bn(o)||o.toLowerCase()==="h"&&f):!(f||a||l)&&bn(o)}(t,s,i,u))bn(t)?F(e,Pa,n):(n.preventDefault(),F(e,It,!0));else if(function(o){return o==="Escape"}(t))F(e,La,n);else if(function(o,a,l,f,h){return Pe?!(l||f||h)&&(yn(o)||o.toLowerCase()==="d"&&a):!(a||f||h)&&yn(o)}(t,u,r,s,i))yn(t)?F(e,Da,n):(n.preventDefault(),F(e,It,!1));else if(function(o,a,l){return bn(o)&&(Pe?a:l)}(t,s,u))n.preventDefault(),F(e,Dn,!0);else if(function(o,a,l){return yn(o)&&(Pe?a:l)}(t,s,u))n.preventDefault(),F(e,Dn,!1);else if(function(o,a){return Pe&&a&&bn(o)}(t,i))n.preventDefault(),F(e,Mn,!0);else if(function(o,a){return Pe&&a&&yn(o)}(t,i))n.preventDefault(),F(e,Mn,!1);else if(function(o,a,l,f){return o.toLowerCase()==="b"&&!a&&Tn(l,f)}(t,s,i,u))n.preventDefault(),F(e,$e,"bold");else if(function(o,a,l,f){return o.toLowerCase()==="u"&&!a&&Tn(l,f)}(t,s,i,u))n.preventDefault(),F(e,$e,"underline");else if(function(o,a,l,f){return o.toLowerCase()==="i"&&!a&&Tn(l,f)}(t,s,i,u))n.preventDefault(),F(e,$e,"italic");else if(function(o,a,l,f){return o==="Tab"&&!a&&!l&&!f}(t,s,u,i))F(e,S0,n);else if(function(o,a,l,f){return o.toLowerCase()==="z"&&!a&&Tn(l,f)}(t,r,i,u))n.preventDefault(),F(e,Wi,void 0);else if(function(o,a,l,f){return Pe?o.toLowerCase()==="z"&&l&&a:o.toLowerCase()==="y"&&f||o.toLowerCase()==="z"&&f&&a}(t,r,i,u))n.preventDefault(),F(e,$i,void 0);else{const o=e._editorState._selection;o===null||P(o)?!_t&&Qs(t,i,u)&&(n.preventDefault(),F(e,ti,n)):function(a,l,f,h){return!l&&a.toLowerCase()==="c"&&(Pe?f:h)}(t,r,i,u)?(n.preventDefault(),F(e,pu,n)):function(a,l,f,h){return!l&&a.toLowerCase()==="x"&&(Pe?f:h)}(t,r,i,u)?(n.preventDefault(),F(e,Hi,n)):Qs(t,i,u)&&(n.preventDefault(),F(e,ti,n))}(function(o,a,l,f){return o||a||l||f})(u,r,s,i)&&F(e,P0,n)}}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;t instanceof Node&&r!=="touch"&&Se(e,()=>{ne(un(t))||(hi=!0)})}],["compositionstart",function(n,e){Se(e,()=>{const t=j();if(P(t)&&!e.isComposing()){const r=t.anchor,u=t.anchor.getNode();fe(r.key),(n.timeStamp<Nn+ci||r.type==="element"||!t.isCollapsed()||u.getFormat()!==t.format||D(u)&&u.getStyle()!==t.style)&&F(e,en,q0)}})}],["compositionend",function(n,e){_t?xn=!0:Se(e,()=>{Uu(e,n.data)})}],["input",function(n,e){n.stopPropagation(),Se(e,()=>{const t=j(),r=n.data,u=dl(n);if(r!=null&&P(t)&&fl(t,u,r,n.timeStamp,!1)){xn&&(Uu(e,r),xn=!1);const i=t.anchor.getNode(),s=Ne(e._window);if(s===null)return;const o=t.isBackward(),a=o?t.anchor.offset:t.focus.offset,l=o?t.focus.offset:t.anchor.offset;jr&&!t.isCollapsed()&&D(i)&&s.anchorNode!==null&&i.getTextContent().slice(0,a)+r+i.getTextContent().slice(a+l)===Ya(s.anchorNode)||F(e,en,r);const f=r.length;_t&&f>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=f),gu||Kn||Vi||!e.isComposing()||(Nn=0,fe(null))}else us(!1,e,r!==null?r:void 0),xn&&(Uu(e,r||void 0),xn=!1);ye(),Wa(ue())}),Kt=null}],["click",function(n,e){Se(e,()=>{const t=j(),r=Ne(e._window),u=tr();if(r){if(P(t)){const i=t.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!he(s)&&ie().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&u!==null&&t.is(u)?(r.removeAllRanges(),t.dirty=!0):n.detail===3&&!t.isCollapsed()&&s!==t.focus.getNode()&&(E(s)?s.select(0):s.getParentOrThrow().select(0))}else if(n.pointerType==="touch"){const i=r.anchorNode;if(i!==null){const s=i.nodeType;(s===Jn||s===wt)&&ke(cs(u,r,e,n))}}}F(e,ka,n)})}],["cut",Xe],["copy",Xe],["dragstart",Xe],["dragover",Xe],["dragend",Xe],["paste",Xe],["focus",Xe],["blur",Xe],["drop",Xe]];jr&&fi.push(["beforeinput",(n,e)=>function(t,r){const u=t.inputType,i=dl(t);u==="deleteCompositionText"||_t&&el(r)||u!=="insertCompositionText"&&Se(r,()=>{const s=j();if(u==="deleteContentBackward"){if(s===null){const d=tr();if(!P(d))return;ke(d.clone())}if(P(s)){const d=s.anchor.key===s.focus.key;if(o=t.timeStamp,al==="MediaLast"&&o<Nn+ci&&r.isComposing()&&d){if(fe(null),Nn=0,setTimeout(()=>{Se(r,()=>{fe(null)})},ci),P(s)){const p=s.anchor.getNode();p.markDirty(),s.format=p.getFormat(),D(p)||M(142),s.style=p.getStyle()}}else{fe(null),t.preventDefault();const p=s.anchor.getNode(),m=p.getTextContent(),g=p.canInsertTextAfter(),y=s.anchor.offset===0&&s.focus.offset===m.length;M0&&d&&!y&&g||F(r,It,!0)}return}}var o;if(!P(s))return;const a=t.data;Kt!==null&&us(!1,r,Kt),s.dirty&&Kt===null||!s.isCollapsed()||he(s.anchor.getNode())||i===null||s.applyDOMRange(i),Kt=null;const l=s.anchor,f=s.focus,h=l.getNode(),c=f.getNode();if(u!=="insertText"&&u!=="insertTranspose")switch(t.preventDefault(),u){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":F(r,en,t);break;case"insertFromComposition":fe(null),F(r,en,t);break;case"insertLineBreak":fe(null),F(r,Yt,!1);break;case"insertParagraph":fe(null),An&&!Kn?(An=!1,F(r,Yt,!1)):F(r,Ln,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":F(r,hu,t);break;case"deleteByComposition":(function(d,p){return d!==p||E(d)||E(p)||!d.isToken()||!p.isToken()})(h,c)&&F(r,ei,t);break;case"deleteByDrag":case"deleteByCut":F(r,ei,t);break;case"deleteContent":F(r,It,!1);break;case"deleteWordBackward":F(r,Dn,!0);break;case"deleteWordForward":F(r,Dn,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":F(r,Mn,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":F(r,Mn,!1);break;case"formatStrikeThrough":F(r,$e,"strikethrough");break;case"formatBold":F(r,$e,"bold");break;case"formatItalic":F(r,$e,"italic");break;case"formatUnderline":F(r,$e,"underline");break;case"historyUndo":F(r,Wi,void 0);break;case"historyRedo":F(r,$i,void 0)}else{if(a===`
|
|
4
4
|
`)t.preventDefault(),F(r,Yt,!1);else if(a===rt)t.preventDefault(),F(r,Ln,void 0);else if(a==null&&t.dataTransfer){const d=t.dataTransfer.getData("text/plain");t.preventDefault(),s.insertRawText(d)}else a!=null&&fl(s,i,a,t.timeStamp,!0)?(t.preventDefault(),F(r,en,a)):Kt=a;ll=t.timeStamp}})}(n,e)]);let Nn=0,al=null,ll=0,Kt=null;const Zr=new WeakMap;let di=!1,hi=!1,An=!1,xn=!1,cl=[0,"",0,"root",0];function fl(n,e,t,r,u){const i=n.anchor,s=n.focus,o=i.getNode(),a=ue(),l=Ne(a._window),f=l!==null?l.anchorNode:null,h=i.key,c=a.getElementByKey(h),d=t.length;return h!==s.key||!D(o)||(!u&&(!jr||ll<r+50)||o.isDirty()&&d<2||Za(t))&&i.offset!==s.offset&&!o.isComposing()||At(o)||o.isDirty()&&d>1||(u||!jr)&&c!==null&&!o.isComposing()&&f!==Wr(c)||l!==null&&e!==null&&(!e.collapsed||e.startContainer!==l.anchorNode||e.startOffset!==l.anchorOffset)||o.getFormat()!==n.format||o.getStyle()!==n.style||rf(n,o)}function ro(n,e){return n!==null&&n.nodeValue!==null&&n.nodeType===wt&&e!==0&&e!==n.nodeValue.length}function uo(n,e,t){const{anchorNode:r,anchorOffset:u,focusNode:i,focusOffset:s}=n;di&&(di=!1,ro(r,u)&&ro(i,s))||Se(e,()=>{if(!t)return void ke(null);if(!Xn(e,r,i))return;const o=j();if(P(o)){const a=o.anchor,l=a.getNode();if(o.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(o.dirty=!0);const f=xu(e).event,h=f?f.timeStamp:performance.now(),[c,d,p,m,g]=cl,y=ie(),b=e.isComposing()===!1&&y.getTextContent()==="";if(h<g+200&&a.offset===p&&a.key===m)o.format=c,o.style=d;else if(a.type==="text")D(l)||M(141),o.format=l.getFormat(),o.style=l.getStyle();else if(a.type==="element"&&!b){const x=a.getNode();o.style="",x instanceof dn&&x.getChildrenSize()===0?(o.format=x.getTextFormat(),o.style=x.getTextStyle()):o.format=0}}else{const f=a.key,h=o.focus.key,c=o.getNodes(),d=c.length,p=o.isBackward(),m=p?s:u,g=p?u:s,y=p?h:f,b=p?f:h;let x=j0,w=!1;for(let T=0;T<d;T++){const S=c[T],I=S.getTextContentSize();if(D(S)&&I!==0&&!(T===0&&S.__key===y&&m===I||T===d-1&&S.__key===b&&g===0)&&(w=!0,x&=S.getFormat(),x===0))break}o.format=w?x:0}}F(e,du,void 0)})}function dl(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Uu(n,e){const t=n._compositionKey;if(fe(null),t!==null&&e!=null){if(e===""){const r=ae(t),u=Wr(n.getElementByKey(t));return void(u!==null&&u.nodeValue!==null&&D(r)&&is(r,u.nodeValue,null,null,!0))}if(e[e.length-1]===`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../assets/
|
|
1
|
+
import '../../assets/index21.css';var v0 = Object.defineProperty;
|
|
2
2
|
var w0 = (n, e, t) => e in n ? v0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var xn = (n, e, t) => w0(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { jsx as H, jsxs as Lt, Fragment as Wr } from "react/jsx-runtime";
|
|
@@ -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/index22.css');const s=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),d=require("react"),b=require("../button/index.cjs"),p=require("../icon/index.cjs"),h=require("../list/index.cjs"),y=require("../popover/index.cjs"),j="_list_1rny2_1",D="_item_1rny2_13",q="_danger_1rny2_41",f={list:j,item:D,danger:q};function k(o){return o.filter(t=>!!(t&&!t.disabled))}const w=({close:o,initialFocus:t,items:i,menuAccessibleLabel:u,onItemSelect:a})=>{const l=d.useRef([]),r=d.useCallback(e=>{const n=k(l.current);if(n.length===0)return;if(e==="first"){n[0].focus();return}if(e==="last"){n[n.length-1].focus();return}const c=n.indexOf(document.activeElement),x=e==="next"?(c+1)%n.length:(c-1+n.length)%n.length;n[x].focus()},[]);d.useEffect(()=>{r(t??"first")},[r,t]);const g=e=>{if(e.key==="ArrowDown"){e.preventDefault(),r("next");return}if(e.key==="ArrowUp"){e.preventDefault(),r("previous");return}if(e.key==="Home"){e.preventDefault(),r("first");return}e.key==="End"&&(e.preventDefault(),r("last"))},m=e=>{var n;(n=e.onSelect)==null||n.call(e),a==null||a(e),o()};return s.jsx(h.List,{"aria-label":u,className:f.list,onKeyDown:g,role:"menu","data-component":"menupanel",children:i.map((e,n)=>s.jsx("li",{role:"none",children:s.jsxs(b.Button,{"aria-label":e.accessibleLabel,className:_.t(f.item,e.isDanger&&f.danger),disabled:e.disabled,onClick:()=>m(e),ref:c=>{l.current[n]=c},role:"menuitem",variant:"minimal",children:[e.icon&&s.jsx(p.Icon,{gap:"right",name:e.icon,size:"small",variant:e.isDanger?"danger":"default"}),s.jsx("span",{children:e.label})]})},e.id??n))})},M=({items:o,menuAccessibleLabel:t="Menu",onItemSelect:i,position:u="left",triggerAccessibleLabel:a="Open menu"})=>s.jsx(y.Popover,{position:u,triggerAccessibleLabel:a,triggerAriaHasPopup:"menu",triggerButtonContent:s.jsx(p.Icon,{name:"dots",size:"medium"}),"data-component":"menu",children:({close:l,initialFocus:r})=>s.jsx(w,{close:l,initialFocus:r,items:o,menuAccessibleLabel:t,onItemSelect:i})});exports.Menu=M;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { t as b } from "../../classix-DG18itHa.js";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Icon as
|
|
3
|
+
import { useRef as y, useCallback as D, useEffect as _ } from "react";
|
|
4
|
+
import { Button as x } from "../button/index.js";
|
|
5
|
+
import { Icon as d } from "../icon/index.js";
|
|
6
6
|
import { List as k } from "../list/index.js";
|
|
7
7
|
import { Popover as w } from "../popover/index.js";
|
|
8
|
-
import '../../assets/
|
|
8
|
+
import '../../assets/index22.css';const A = "_list_1rny2_1", B = "_item_1rny2_13", C = "_danger_1rny2_41", f = {
|
|
9
9
|
list: A,
|
|
10
10
|
item: B,
|
|
11
11
|
danger: C
|
|
@@ -20,55 +20,55 @@ const I = ({
|
|
|
20
20
|
menuAccessibleLabel: c,
|
|
21
21
|
onItemSelect: a
|
|
22
22
|
}) => {
|
|
23
|
-
const l =
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
23
|
+
const l = y([]), r = D((n) => {
|
|
24
|
+
const e = E(l.current);
|
|
25
|
+
if (e.length === 0)
|
|
26
26
|
return;
|
|
27
|
-
if (
|
|
28
|
-
|
|
27
|
+
if (n === "first") {
|
|
28
|
+
e[0].focus();
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
if (
|
|
32
|
-
|
|
31
|
+
if (n === "last") {
|
|
32
|
+
e[e.length - 1].focus();
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
const i =
|
|
36
|
-
|
|
35
|
+
const i = e.indexOf(document.activeElement), g = n === "next" ? (i + 1) % e.length : (i - 1 + e.length) % e.length;
|
|
36
|
+
e[g].focus();
|
|
37
37
|
}, []);
|
|
38
38
|
_(() => {
|
|
39
39
|
r(t ?? "first");
|
|
40
40
|
}, [r, t]);
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
|
|
41
|
+
const m = (n) => {
|
|
42
|
+
if (n.key === "ArrowDown") {
|
|
43
|
+
n.preventDefault(), r("next");
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
if (
|
|
47
|
-
|
|
46
|
+
if (n.key === "ArrowUp") {
|
|
47
|
+
n.preventDefault(), r("previous");
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
if (
|
|
51
|
-
|
|
50
|
+
if (n.key === "Home") {
|
|
51
|
+
n.preventDefault(), r("first");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
}, p = (
|
|
56
|
-
var
|
|
57
|
-
(
|
|
54
|
+
n.key === "End" && (n.preventDefault(), r("last"));
|
|
55
|
+
}, p = (n) => {
|
|
56
|
+
var e;
|
|
57
|
+
(e = n.onSelect) == null || e.call(n), a == null || a(n), s();
|
|
58
58
|
};
|
|
59
|
-
return /* @__PURE__ */ o(k, { "aria-label": c, className: f.list, onKeyDown:
|
|
60
|
-
l.current[
|
|
59
|
+
return /* @__PURE__ */ o(k, { "aria-label": c, className: f.list, onKeyDown: m, role: "menu", "data-component": "menupanel", children: u.map((n, e) => /* @__PURE__ */ o("li", { role: "none", children: /* @__PURE__ */ h(x, { "aria-label": n.accessibleLabel, className: b(f.item, n.isDanger && f.danger), disabled: n.disabled, onClick: () => p(n), ref: (i) => {
|
|
60
|
+
l.current[e] = i;
|
|
61
61
|
}, role: "menuitem", variant: "minimal", children: [
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */ o("span", { children:
|
|
64
|
-
] }) },
|
|
62
|
+
n.icon && /* @__PURE__ */ o(d, { gap: "right", name: n.icon, size: "small", variant: n.isDanger ? "danger" : "default" }),
|
|
63
|
+
/* @__PURE__ */ o("span", { children: n.label })
|
|
64
|
+
] }) }, n.id ?? e)) });
|
|
65
65
|
}, L = ({
|
|
66
66
|
items: s,
|
|
67
67
|
menuAccessibleLabel: t = "Menu",
|
|
68
68
|
onItemSelect: u,
|
|
69
69
|
position: c = "left",
|
|
70
70
|
triggerAccessibleLabel: a = "Open menu"
|
|
71
|
-
}) => /* @__PURE__ */ o(w, { position: c, triggerAccessibleLabel: a, triggerAriaHasPopup: "menu", triggerButtonContent: /* @__PURE__ */ o(
|
|
71
|
+
}) => /* @__PURE__ */ o(w, { position: c, triggerAccessibleLabel: a, triggerAriaHasPopup: "menu", triggerButtonContent: /* @__PURE__ */ o(d, { name: "dots", size: "medium" }), "data-component": "menu", children: ({
|
|
72
72
|
close: l,
|
|
73
73
|
initialFocus: r
|
|
74
74
|
}) => /* @__PURE__ */ o(I, { close: l, initialFocus: r, items: s, menuAccessibleLabel: t, onItemSelect: u }) });
|
|
@@ -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 e=require("react/jsx-runtime"),m=require("../_dropzone/index.cjs"),u=require("../button/index.cjs"),d=require("../form/index.cjs"),_=require("../icon/index.cjs"),x=require("../list/index.cjs"),p=require("../textarea/index.cjs"),j=require("../message/index.cjs"),g="_messages_143n4_1",b="_controls_143n4_23",t={messages:g,controls:b},q=({handleUpload:r,message:s,messages:o,onChange:i,onSubmit:a,placeholder:c,sending:l})=>e.jsxs("div",{className:t.messages,"data-component":"messages",children:[e.jsx(x.List,{children:o.map(n=>e.jsx(j.Message,{...n},n.id))}),e.jsxs(d.Form,{onSubmit:n=>{n.preventDefault(),a()},children:[e.jsx(p.Textarea,{onChange:i,placeholder:c,value:s}),e.jsxs("div",{className:t.controls,children:[e.jsx(m.Dropzone,{label:"",multiple:!0,onChange:n=>{n.currentTarget.files&&r(n.currentTarget.files)},variant:"minimal"}),e.jsx(u.Button,{"aria-label":"Send message",disabled:l||!(s!=null&&s.trim()),type:"submit",variant:"primary",children:e.jsx(_.Icon,{fill:!0,name:"plane",variant:"white"})})]})]})]});exports.Messages=q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -6,7 +6,7 @@ import { Icon as u } from "../icon/index.js";
|
|
|
6
6
|
import { List as h } from "../list/index.js";
|
|
7
7
|
import { Textarea as v } from "../textarea/index.js";
|
|
8
8
|
import { Message as _ } from "../message/index.js";
|
|
9
|
-
import '../../assets/
|
|
9
|
+
import '../../assets/index23.css';const b = "_messages_143n4_1", g = "_controls_143n4_23", i = {
|
|
10
10
|
messages: b,
|
|
11
11
|
controls: g
|
|
12
12
|
}, w = ({
|
|
@@ -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 e=require("react/jsx-runtime"),i=require("../aside/index.cjs"),a=require("../branding/index.cjs"),c=require("../figure/index.cjs"),u=require("../icon/index.cjs"),l=require("../nav/index.cjs"),m="_menu_1q9tu_29",d="_portal_1q9tu_55",o={menu:m,portal:d},_=({accessibleLabel:t="Show menu",children:n,portals:r,open:s=!0})=>e.jsxs("details",{className:o.menu,open:s||void 0,"data-component":"portal",children:[e.jsx("summary",{"aria-label":t,children:e.jsx(u.Icon,{name:"menu",size:"large",variant:"primary"})}),e.jsxs(i.Aside,{className:o.portal,children:[e.jsx(c.Figure,{children:e.jsx(a.Branding,{name:"logo",size:86,variant:"white"})}),r&&e.jsx(l.Nav,{horizontal:!0,children:r}),n&&n]})]});exports.Portal=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -4,7 +4,7 @@ import { Branding as l } from "../branding/index.js";
|
|
|
4
4
|
import { Figure as s } from "../figure/index.js";
|
|
5
5
|
import { Icon as p } from "../icon/index.js";
|
|
6
6
|
import { Nav as u } from "../nav/index.js";
|
|
7
|
-
import '../../assets/
|
|
7
|
+
import '../../assets/index24.css';const c = "_menu_1q9tu_29", d = "_portal_1q9tu_55", a = {
|
|
8
8
|
menu: c,
|
|
9
9
|
portal: d
|
|
10
10
|
}, 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 y=require("react/jsx-runtime"),T=require("../../classix-5H4IWnMA.cjs"),o=require("react"),A=require("../../icons-o8Z5npPW.cjs"),H=require("../list/index.cjs"),M="_sortable_c1ptl_5",V="_dragging_c1ptl_35",z="_dropping_c1ptl_50",B="_columns_c1ptl_63",N="_pseudo_c1ptl_73",c={sortable:M,dragging:V,dropping:z,columns:B,pseudo:N,"target-above":"_target-above_c1ptl_88","target-below":"_target-below_c1ptl_89"};function k({children:h,className:I,columns:g=1,isRearranging:d=!1,onChangeOrder:f,...b}){const x=Number.isFinite(g)?Math.max(1,Math.floor(g)):1,v=o.useMemo(()=>o.Children.toArray(h),[h]),n=o.useRef(-1),[p,q]=o.useState({height:0,width:0}),[a,m]=o.useState(null),[E,S]=o.useState(null),$={...b.style,"--icon-svg":A.iconSVG("sort",!0),"--height":`calc(${p.height}px - var(--scale-16))`,"--width":x>1?`calc(${p.width}px - var(--scale-16))`:`${p.width}px`},w=()=>{n.current=-1,m(null)};return o.useEffect(()=>{d||S(null)},[d]),y.jsx(H.List,{className:T.t(I,c.sortable,x>1&&c.columns),columns:g,ordered:!0,style:$,...b,"data-component":"sortable",children:v.map((_,t)=>{const j=o.isValidElement(_)?_.key:null;return y.jsx("li",{className:T.t(a!==null&&a>t-10&&a<t+10&&c.pseudo,a===t&&n.current<t&&c["target-below"],a===t&&n.current>t&&c["target-above"],n.current===t&&c.dragging,E===t&&d&&c.dropping),draggable:!d,onDragEnd:()=>w(),onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move";const r=n.current;if(r<0||r===t)return;const s=e.currentTarget.getBoundingClientRect(),l=t===r+1?p.height:s.height,u=e.clientY>s.top+l/2?t+1:t,i=u>r?u-1:u;m(i)},onDragStart:e=>{n.current=t,q({height:e.currentTarget.offsetHeight,width:e.currentTarget.offsetWidth}),e.dataTransfer.setData("text/plain",""),e.dataTransfer.effectAllowed="move",m(t)},onDrop:e=>{e.preventDefault();const r=n.current,s=a;if(r<0||s===null||r===s)return;S(s);const l=v.slice(),[D]=l.splice(r,1);l.splice(s,0,D),f==null||f(l.map((u,i)=>({id:String(o.isValidElement(u)?u.props["data-id"]??`idx-${i}`:`idx-${i}`),weight:l.length-1-i}))),w()},"data-component":"sortable",children:_},j??t)})})}exports.Sortable=k;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -3,7 +3,7 @@ import { t as T } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import _, { useMemo as z, useRef as B, useState as h, useEffect as M } from "react";
|
|
4
4
|
import { i as N } from "../../icons-06oXnjRF.js";
|
|
5
5
|
import { List as k } from "../list/index.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index25.css';const j = "_sortable_c1ptl_5", F = "_dragging_c1ptl_35", G = "_dropping_c1ptl_50", L = "_columns_c1ptl_63", W = "_pseudo_c1ptl_73", s = {
|
|
7
7
|
sortable: j,
|
|
8
8
|
dragging: F,
|
|
9
9
|
dropping: G,
|
|
@@ -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 u=require("react/jsx-runtime"),i=require("react"),w=require("../toast/index.cjs"),p="_toasts_19qwq_1",h={toasts:p},T=({defaultDurationMs:r=5e3,onRemove:m,toasts:n})=>{const d=i.useRef(new Map),[c,l]=i.useState(new Set),a=i.useCallback(e=>{l(s=>s.has(e)?s:new Set(s).add(e))},[]);return i.useEffect(()=>{const e=d.current,s=new Set(n.map(t=>t.id));l(t=>{const o=new Set([...t].filter(f=>s.has(f)));return o.size===t.size?t:o});for(const t of n){if(c.has(t.id)||e.has(t.id))continue;const o=t.durationMs??r;e.set(t.id,window.setTimeout(()=>{a(t.id)},o))}for(const[t,o]of e)s.has(t)&&!c.has(t)||(window.clearTimeout(o),e.delete(t))},[c,r,a,n]),i.useEffect(()=>{const e=d.current;return()=>{for(const s of e.values())window.clearTimeout(s);e.clear()}},[]),n.length?u.jsx("div",{className:h.toasts,"data-component":"toasts",children:n.map(e=>u.jsx(w.Toast,{label:e.label,onClick:()=>a(e.id),onExitComplete:()=>m(e.id),open:!c.has(e.id),type:e.type},e.id))}):null};exports.Toasts=T;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as p, useState as w, useCallback as h, useEffect as m } from "react";
|
|
3
3
|
import { Toast as T } from "../toast/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index26.css';const v = "_toasts_19qwq_1", S = {
|
|
5
5
|
toasts: v
|
|
6
6
|
}, g = ({
|
|
7
7
|
defaultDurationMs: c = 5e3,
|
|
@@ -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 e=require("react/jsx-runtime"),d=require("../_card/index.cjs"),n="_widget_lea1t_1",s={widget:n},o=({children:t,...i})=>e.jsx("div",{className:s.widget,...i,"data-component":"widget",children:e.jsx(d.Card,{children:t})});exports.Widget=o;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Card as i } from "../_card/index.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index27.css';const o = "_widget_lea1t_1", r = {
|
|
4
4
|
widget: o
|
|
5
5
|
}, a = ({
|
|
6
6
|
children: e,
|