@solibo/solibo-ui 0.4.7 → 0.4.8
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/index16.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.js +13 -13
- package/dist/components/_dropdown/index.cjs +1 -1
- package/dist/components/_dropdown/index.cjs.map +1 -1
- package/dist/components/_dropdown/index.js +49 -49
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.cjs.map +1 -1
- package/dist/components/badge/index.js +20 -14
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.cjs.map +1 -1
- package/dist/components/button/index.js +11 -11
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +10 -10
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +7 -7
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.cjs.map +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.cjs.map +1 -1
- package/dist/components/layout/index.js +14 -12
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +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.cjs.map +1 -1
- package/dist/components/textarea/index.js +20 -21
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/helpers-BD5fFZi-.cjs +2 -0
- package/dist/helpers-BD5fFZi-.cjs.map +1 -0
- package/dist/{helpers-Dbey5Ztb.js → helpers-D56OHkFI.js} +8 -8
- package/dist/helpers-D56OHkFI.js.map +1 -0
- package/dist/index-BpUboRfJ.cjs +2 -0
- package/dist/{index-D0Nzihh-.cjs.map → index-BpUboRfJ.cjs.map} +1 -1
- package/dist/{index-s_TTRzH8.js → index-ChKhFyp8.js} +24 -25
- package/dist/{index-s_TTRzH8.js.map → index-ChKhFyp8.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/styles.module-DZXAP_eP.js +8 -0
- package/dist/styles.module-DZXAP_eP.js.map +1 -0
- package/dist/styles.module-Vt6mmlsz.cjs +2 -0
- package/dist/styles.module-Vt6mmlsz.cjs.map +1 -0
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/helpers-Dbey5Ztb.js.map +0 -1
- package/dist/helpers-fOobx0tS.cjs +0 -2
- package/dist/helpers-fOobx0tS.cjs.map +0 -1
- package/dist/index-D0Nzihh-.cjs +0 -2
- package/dist/styles.module-C_Z8FrR5.js +0 -9
- package/dist/styles.module-C_Z8FrR5.js.map +0 -1
- package/dist/styles.module-CwroCNAt.cjs +0 -2
- package/dist/styles.module-CwroCNAt.cjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/index33.css';const
|
|
5
|
-
button:
|
|
6
|
-
danger:
|
|
1
|
+
import { jsxs as s, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Icon as d } from "../icon/index.js";
|
|
4
|
+
import '../../assets/index33.css';const p = "_button_1cw1v_1", _ = "_danger_1cw1v_19", f = "_minimal_1cw1v_32", b = "_primary_1cw1v_39", t = {
|
|
5
|
+
button: p,
|
|
6
|
+
danger: _,
|
|
7
7
|
minimal: f,
|
|
8
8
|
primary: b
|
|
9
9
|
}, g = {
|
|
@@ -16,14 +16,14 @@ function h({
|
|
|
16
16
|
children: m,
|
|
17
17
|
className: r,
|
|
18
18
|
disabled: i = !1,
|
|
19
|
-
icon:
|
|
19
|
+
icon: a,
|
|
20
20
|
onClick: o,
|
|
21
21
|
ref: e,
|
|
22
|
-
variant:
|
|
23
|
-
...
|
|
22
|
+
variant: n = "default",
|
|
23
|
+
...l
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
25
|
+
return /* @__PURE__ */ s("button", { className: c(t.button, g[n], r), disabled: i, onClick: o, ref: e, type: "button", ...l, "data-component": "button", children: [
|
|
26
|
+
a && /* @__PURE__ */ u(d, { gap: "right", name: a, size: "small", variant: n === "minimal" || n === "default" ? "default" : "white" }),
|
|
27
27
|
m
|
|
28
28
|
] });
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/button/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Icon } from '../icon';\nimport { IconName } from '../icon/icons';\nimport styles from './styles.module.css';\n\nconst variants = {\n danger: styles.danger,\n default: styles.default,\n minimal: styles.minimal,\n primary: styles.primary,\n};\n\nexport type ButtonProps = React.ComponentPropsWithRef<'button'> & {\n children: React.ReactNode;\n className?: string;\n disabled?: boolean;\n icon?: IconName;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n variant?: keyof typeof variants;\n};\n\nexport function Button({\n children,\n className,\n disabled = false,\n icon,\n onClick,\n ref,\n variant = 'default',\n ...props\n}: ButtonProps) {\n return (\n <button\n className={cx(styles.button, variants[variant], className)}\n disabled={disabled}\n onClick={onClick}\n ref={ref}\n type='button'\n {...props}\n >\n {icon && (\n <Icon\n gap='right'\n name={icon}\n size='small'\n variant={variant === 'minimal' ? 'default' : 'white'}\n />\n )}\n {children}\n </button>\n );\n}\n"],"names":["variants","danger","styles","default","minimal","primary","Button","children","className","disabled","icon","onClick","ref","variant","props","cx","button","jsx","Icon"],"mappings":";;;;;;;;GAMMA,IAAW;AAAA,EACfC,QAAQC,EAAOD;AAAAA,EACfE,SAASD,EAAOC;AAAAA,EAChBC,SAASF,EAAOE;AAAAA,EAChBC,SAASH,EAAOG;AAClB;AAWO,SAASC,EAAO;AAAA,EACrBC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,MAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACQ,GAAG;AACd,2BACG,UAAA,EACC,WAAWC,EAAGb,EAAOc,QAAQhB,EAASa,CAAO,GAAGL,CAAS,GACzD,UAAAC,GACA,SAAAE,GACA,KAAAC,GACA,MAAK,UACL,GAAIE,GAAM,kBAAA,UAETJ,UAAAA;AAAAA,IAAAA,KACC,gBAAAO,EAACC,GAAA,EACC,KAAI,SACJ,MAAMR,GACN,MAAK,SACL,SAASG,MAAY,YAAY,YAAY,SAAQ;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/button/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Icon } from '../icon';\nimport { IconName } from '../icon/icons';\nimport styles from './styles.module.css';\n\nconst variants = {\n danger: styles.danger,\n default: styles.default,\n minimal: styles.minimal,\n primary: styles.primary,\n};\n\nexport type ButtonProps = React.ComponentPropsWithRef<'button'> & {\n children: React.ReactNode;\n className?: string;\n disabled?: boolean;\n icon?: IconName;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n variant?: keyof typeof variants;\n};\n\nexport function Button({\n children,\n className,\n disabled = false,\n icon,\n onClick,\n ref,\n variant = 'default',\n ...props\n}: ButtonProps) {\n return (\n <button\n className={cx(styles.button, variants[variant], className)}\n disabled={disabled}\n onClick={onClick}\n ref={ref}\n type='button'\n {...props}\n >\n {icon && (\n <Icon\n gap='right'\n name={icon}\n size='small'\n variant={variant === 'minimal' || variant === 'default' ? 'default' : 'white'}\n />\n )}\n {children}\n </button>\n );\n}\n"],"names":["variants","danger","styles","default","minimal","primary","Button","children","className","disabled","icon","onClick","ref","variant","props","cx","button","jsx","Icon"],"mappings":";;;;;;;;GAMMA,IAAW;AAAA,EACfC,QAAQC,EAAOD;AAAAA,EACfE,SAASD,EAAOC;AAAAA,EAChBC,SAASF,EAAOE;AAAAA,EAChBC,SAASH,EAAOG;AAClB;AAWO,SAASC,EAAO;AAAA,EACrBC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,MAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACQ,GAAG;AACd,2BACG,UAAA,EACC,WAAWC,EAAGb,EAAOc,QAAQhB,EAASa,CAAO,GAAGL,CAAS,GACzD,UAAAC,GACA,SAAAE,GACA,KAAAC,GACA,MAAK,UACL,GAAIE,GAAM,kBAAA,UAETJ,UAAAA;AAAAA,IAAAA,KACC,gBAAAO,EAACC,GAAA,EACC,KAAI,SACJ,MAAMR,GACN,MAAK,SACL,SAASG,MAAY,aAAaA,MAAY,YAAY,YAAY,SAAQ;AAAA,IAGjFN;AAAAA,EAAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const r=require("react/jsx-runtime"),n=require("../../helpers-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const r=require("react/jsx-runtime"),n=require("../../helpers-BD5fFZi-.cjs"),o="_controls_u02jm_15",a="_wrapper_u02jm_29",e={controls:o,wrapper:a},c=({children:s,...t})=>r.jsx(r.Fragment,{children:r.jsx("div",{className:e.wrapper,"data-wrapper":!0,children:r.jsx("div",{className:e.controls,children:r.jsx("menu",{"data-animation":"stagger",...t,children:n.wrapChildren(s)})})})});exports.Controls=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, Fragment as e } from "react/jsx-runtime";
|
|
2
|
-
import { w as n } from "../../helpers-
|
|
2
|
+
import { w as n } from "../../helpers-D56OHkFI.js";
|
|
3
3
|
import '../../assets/index12.css';const s = "_controls_u02jm_15", c = "_wrapper_u02jm_29", o = {
|
|
4
4
|
controls: s,
|
|
5
5
|
wrapper: c
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const i=require("react/jsx-runtime"),a=require("../../classix-5H4IWnMA.cjs"),m="_form_fapts_1",c="_inline_fapts_26",t={form:m,inline:c},l=({animation:e,children:n,className:o,inline:s=!1,...r})=>i.jsx("form",{className:a.t(o,s&&t.inline,t.form),"data-animation":e,...r,"data-component":"form",children:n&&n});exports.Form=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import '../../assets/index35.css';const
|
|
4
|
-
form:
|
|
5
|
-
inline:
|
|
6
|
-
},
|
|
7
|
-
animation:
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as a } from "../../classix-DG18itHa.js";
|
|
3
|
+
import '../../assets/index35.css';const f = "_form_fapts_1", e = "_inline_fapts_26", n = {
|
|
4
|
+
form: f,
|
|
5
|
+
inline: e
|
|
6
|
+
}, p = ({
|
|
7
|
+
animation: t,
|
|
8
8
|
children: o,
|
|
9
9
|
className: m,
|
|
10
|
-
inline:
|
|
10
|
+
inline: r = !1,
|
|
11
11
|
...i
|
|
12
|
-
}) => /* @__PURE__ */
|
|
12
|
+
}) => /* @__PURE__ */ s("form", { className: a(m, r && n.inline, n.form), "data-animation": t, ...i, "data-component": "form", children: o && o });
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
p as Form
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const r=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),s="_header_1q87f_1",u="_jumbo_1q87f_67",e={header:s,jumbo:u},d={default:e.default,jumbo:e.jumbo},n=({children:t,variant:a="default"})=>r.jsx("header",{className:o.t(e.header,d[a]),"data-component":"header",children:t});exports.Header=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/index6.css';const
|
|
4
|
-
header:
|
|
5
|
-
jumbo:
|
|
6
|
-
},
|
|
3
|
+
import '../../assets/index6.css';const d = "_header_1q87f_1", m = "_jumbo_1q87f_67", e = {
|
|
4
|
+
header: d,
|
|
5
|
+
jumbo: m
|
|
6
|
+
}, s = {
|
|
7
7
|
default: e.default,
|
|
8
8
|
jumbo: e.jumbo
|
|
9
9
|
}, c = ({
|
|
10
|
-
children:
|
|
11
|
-
variant:
|
|
12
|
-
}) => /* @__PURE__ */ a("header", { className: r(e.header,
|
|
10
|
+
children: o,
|
|
11
|
+
variant: t = "default"
|
|
12
|
+
}) => /* @__PURE__ */ a("header", { className: r(e.header, s[t]), "data-component": "header", children: o });
|
|
13
13
|
export {
|
|
14
14
|
c as Header
|
|
15
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),c=require("react"),I=require("../../icons-C_cX1FYp.cjs"),P=require("../../utils-DBzf7CFq.cjs"),s=require("../../styles.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),c=require("react"),I=require("../../icons-C_cX1FYp.cjs"),P=require("../../utils-DBzf7CFq.cjs"),s=require("../../styles.module-Vt6mmlsz.cjs");function T({className:p,defaultCountryCode:d="+47",disabled:a=!1,icon:i,label:h,placeholder:m,ref:v,type:t="text",...e}){const[l,g]=c.useState(""),[o,x]=c.useState(""),{onChange:y,value:j,...N}=e,{touched:S,onBlur:f}=P.useTouched(j===""),q=i&&t!=="radio"&&t!=="datetime-local"?{"--icon-svg":I.iconSVG(i,!0)}:void 0;c.useEffect(()=>{if(typeof e.onChange=="function"&&t==="tel"){const u={name:e.name,value:o?(l||d).split(" ").join("")+o.split(" ").join(""):void 0};e.onChange({target:u,currentTarget:u})}},[l,o]),c.useEffect(()=>{t==="tel"&&!e.value&&(x(""),g(""))},[e.value,t]);const C=n.jsxs(n.Fragment,{children:[n.jsx("input",{disabled:a,hidden:!0,onChange:y,pattern:void 0,placeholder:m,ref:v,type:t,value:j}),n.jsx("input",{type:"text",className:s.inputStyles.input,disabled:a,maxLength:5,onChange:u=>g(u.target.value),placeholder:d,value:l}),n.jsx("input",{type:"tel",className:r.t(s.inputStyles.input,S&&"touched"),"data-icon":i?"true":void 0,disabled:a,maxLength:14,name:void 0,onChange:u=>x(u.target.value),onBlur:f,pattern:e.pattern,style:q,value:o,...N})]});return n.jsxs("label",{className:s.inputStyles.label,"data-component":"input",children:[h&&n.jsx("span",{className:r.t(e.required&&s.inputStyles.required),children:h}),t==="tel"?C:n.jsx("input",{ref:v,className:r.t(s.inputStyles.input,p,S&&"touched"),"data-icon":i?"true":void 0,disabled:a,onBlur:f,placeholder:m,style:q,type:t,...e})]})}exports.Input=T;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n icon?: IconName;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n type
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n icon?: IconName;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n type?:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'radio'\n | 'search'\n | 'tel'\n | 'text';\n};\n\nexport function Input({\n className,\n defaultCountryCode = '+47',\n disabled = false,\n icon,\n label,\n placeholder,\n ref,\n type = 'text',\n ...props\n}: InputProps) {\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { onChange, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n\n type withVars =\n | (React.CSSProperties & {\n '--icon-svg'?: string;\n })\n | undefined;\n\n const withVars: withVars =\n icon && type !== 'radio' && type !== 'datetime-local'\n ? {\n '--icon-svg': iconSVG(icon, true),\n }\n : undefined;\n\n useEffect(() => {\n if (typeof props.onChange === 'function' && type === 'tel') {\n const target = {\n name: props.name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n // eslint-disable-next-line\n (props.onChange as any)({ target, currentTarget: target });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [countryCode, phoneNumber]);\n\n useEffect(() => {\n if (type === 'tel' && !props.value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [props.value, type]);\n\n const telephoneInput = (\n <>\n <input\n disabled={disabled}\n hidden\n onChange={onChange}\n pattern={undefined}\n placeholder={placeholder}\n ref={ref}\n type={type}\n value={value}\n />\n <input\n type='text'\n className={styles.input}\n disabled={disabled}\n maxLength={5}\n onChange={(e) => setCountryCode(e.target.value)}\n placeholder={defaultCountryCode}\n value={countryCode}\n />\n <input\n type='tel'\n className={cx(styles.input, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={onBlur}\n pattern={props.pattern}\n style={withVars}\n value={phoneNumber}\n {...restProps}\n />\n </>\n );\n\n return (\n <label className={styles.label}>\n {label && <span className={cx(props.required && styles.required)}>{label}</span>}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n ref={ref}\n className={cx(styles.input, className, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n onBlur={onBlur}\n placeholder={placeholder}\n style={withVars}\n type={type}\n {...props}\n />\n )}\n </label>\n );\n}\n"],"names":["Input","className","defaultCountryCode","disabled","icon","label","placeholder","ref","type","props","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","onChange","value","restProps","touched","onBlur","useTouched","withVars","iconSVG","undefined","useEffect","target","name","split","join","currentTarget","telephoneInput","jsxs","Fragment","jsx","styles","input","e","cx","pattern","required"],"mappings":"0SA2BO,SAASA,EAAM,CACpBC,UAAAA,EACAC,mBAAAA,EAAqB,MACrBC,SAAAA,EAAW,GACXC,KAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,IAAAA,EACAC,KAAAA,EAAO,OACP,GAAGC,CACO,EAAG,CACb,KAAM,CAACC,EAAaC,CAAc,EAAIC,EAAAA,SAAS,EAAE,EAC3C,CAACC,EAAaC,CAAc,EAAIF,EAAAA,SAAS,EAAE,EAC3C,CAAEG,SAAAA,EAAUC,MAAAA,EAAO,GAAGC,CAAAA,EAAcR,EACpC,CAAES,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAQ7CK,EACJjB,GAAQI,IAAS,SAAWA,IAAS,iBACjC,CACE,aAAcc,EAAAA,QAAQlB,EAAM,EAAI,CAAA,EAElCmB,OAENC,EAAAA,UAAU,IAAM,CACd,GAAI,OAAOf,EAAMM,UAAa,YAAcP,IAAS,MAAO,CAC1D,MAAMiB,EAAS,CACbC,KAAMjB,EAAMiB,KACZV,MAAOH,GACFH,GAAeR,GAAoByB,MAAM,GAAG,EAAEC,KAAK,EAAE,EACtDf,EAAYc,MAAM,GAAG,EAAEC,KAAK,EAAE,EAC9BL,MAAAA,EAGLd,EAAMM,SAAiB,CAAEU,OAAAA,EAAQI,cAAeJ,CAAAA,CAAQ,CAC3D,CAEF,EAAG,CAACf,EAAaG,CAAW,CAAC,EAE7BW,EAAAA,UAAU,IAAM,CACVhB,IAAS,OAAS,CAACC,EAAMO,QAC3BF,EAAe,EAAE,EACjBH,EAAe,EAAE,EAErB,EAAG,CAACF,EAAMO,MAAOR,CAAI,CAAC,EAEtB,MAAMsB,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAC,EAAAA,IAAC,QAAA,CACC,SAAA9B,EACA,OAAM,GACN,SAAAY,EACA,QAASQ,OACT,YAAAjB,EACA,IAAAC,EACA,KAAAC,EACA,MAAAQ,CAAA,CAAa,EAEfiB,MAAC,SACC,KAAK,OACL,UAAWC,EAAAA,YAAOC,MAClB,SAAAhC,EACA,UAAW,EACX,SAAWiC,GAAMzB,EAAeyB,EAAEX,OAAOT,KAAK,EAC9C,YAAad,EACb,MAAOQ,EAAY,QAEpB,QAAA,CACC,KAAK,MACL,UAAW2B,EAAAA,EAAGH,EAAAA,YAAOC,MAAOjB,GAAW,SAAS,EAChD,YAAWd,EAAO,OAASmB,OAC3B,SAAApB,EACA,UAAW,GACX,KAAMoB,OACN,SAAWa,GAAMtB,EAAesB,EAAEX,OAAOT,KAAK,EAC9C,OAAAG,EACA,QAASV,EAAM6B,QACf,MAAOjB,EACP,MAAOR,EACP,GAAII,CAAAA,CAAU,CAAA,EAElB,EAGF,cACG,QAAA,CAAM,UAAWiB,EAAAA,YAAO7B,MAAM,iBAAA,QAC5BA,SAAAA,CAAAA,GAAS4B,EAAAA,IAAC,QAAK,UAAWI,EAAAA,EAAG5B,EAAM8B,UAAYL,EAAAA,YAAOK,QAAQ,EAAIlC,SAAAA,CAAAA,CAAM,EACxEG,IAAS,MACRsB,EAEAG,EAAAA,IAAC,QAAA,CACC,IAAA1B,EACA,UAAW8B,EAAAA,EAAGH,EAAAA,YAAOC,MAAOlC,EAAWiB,GAAW,SAAS,EAC3D,YAAWd,EAAO,OAASmB,OAC3B,SAAApB,EACA,OAAAgB,EACA,YAAAb,EACA,MAAOe,EACP,KAAAb,EACA,GAAIC,CAAAA,CAAM,CAAA,EAGhB,CAEJ"}
|
|
@@ -3,7 +3,7 @@ import { t as s } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import { useState as j, useEffect as S } from "react";
|
|
4
4
|
import { i as V } from "../../icons-DfmpRbxE.js";
|
|
5
5
|
import { u as w } from "../../utils--n2yqjCy.js";
|
|
6
|
-
import { i as o } from "../../styles.module-
|
|
6
|
+
import { i as o } from "../../styles.module-DZXAP_eP.js";
|
|
7
7
|
function y({
|
|
8
8
|
className: q,
|
|
9
9
|
defaultCountryCode: c = "+47",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n icon?: IconName;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n type
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useEffect, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n icon?: IconName;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n type?:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'radio'\n | 'search'\n | 'tel'\n | 'text';\n};\n\nexport function Input({\n className,\n defaultCountryCode = '+47',\n disabled = false,\n icon,\n label,\n placeholder,\n ref,\n type = 'text',\n ...props\n}: InputProps) {\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { onChange, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n\n type withVars =\n | (React.CSSProperties & {\n '--icon-svg'?: string;\n })\n | undefined;\n\n const withVars: withVars =\n icon && type !== 'radio' && type !== 'datetime-local'\n ? {\n '--icon-svg': iconSVG(icon, true),\n }\n : undefined;\n\n useEffect(() => {\n if (typeof props.onChange === 'function' && type === 'tel') {\n const target = {\n name: props.name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n // eslint-disable-next-line\n (props.onChange as any)({ target, currentTarget: target });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [countryCode, phoneNumber]);\n\n useEffect(() => {\n if (type === 'tel' && !props.value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [props.value, type]);\n\n const telephoneInput = (\n <>\n <input\n disabled={disabled}\n hidden\n onChange={onChange}\n pattern={undefined}\n placeholder={placeholder}\n ref={ref}\n type={type}\n value={value}\n />\n <input\n type='text'\n className={styles.input}\n disabled={disabled}\n maxLength={5}\n onChange={(e) => setCountryCode(e.target.value)}\n placeholder={defaultCountryCode}\n value={countryCode}\n />\n <input\n type='tel'\n className={cx(styles.input, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={onBlur}\n pattern={props.pattern}\n style={withVars}\n value={phoneNumber}\n {...restProps}\n />\n </>\n );\n\n return (\n <label className={styles.label}>\n {label && <span className={cx(props.required && styles.required)}>{label}</span>}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n ref={ref}\n className={cx(styles.input, className, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n onBlur={onBlur}\n placeholder={placeholder}\n style={withVars}\n type={type}\n {...props}\n />\n )}\n </label>\n );\n}\n"],"names":["Input","className","defaultCountryCode","disabled","icon","label","placeholder","ref","type","props","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","onChange","value","restProps","touched","onBlur","useTouched","withVars","iconSVG","undefined","useEffect","target","name","split","join","currentTarget","telephoneInput","jsxs","Fragment","jsx","styles","input","e","cx","pattern","required"],"mappings":";;;;;;AA2BO,SAASA,EAAM;AAAA,EACpBC,WAAAA;AAAAA,EACAC,oBAAAA,IAAqB;AAAA,EACrBC,UAAAA,IAAW;AAAA,EACXC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACP,GAAGC;AACO,GAAG;AACb,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAE,GAC3C,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3C;AAAA,IAAEG,UAAAA;AAAAA,IAAUC,OAAAA;AAAAA,IAAO,GAAGC;AAAAA,EAAAA,IAAcR,GACpC;AAAA,IAAES,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE,GAQ7CK,IACJjB,KAAQI,MAAS,WAAWA,MAAS,mBACjC;AAAA,IACE,cAAcc,EAAQlB,GAAM,EAAI;AAAA,EAAA,IAElCmB;AAENC,EAAAA,EAAU,MAAM;AACd,QAAI,OAAOf,EAAMM,YAAa,cAAcP,MAAS,OAAO;AAC1D,YAAMiB,IAAS;AAAA,QACbC,MAAMjB,EAAMiB;AAAAA,QACZV,OAAOH,KACFH,KAAeR,GAAoByB,MAAM,GAAG,EAAEC,KAAK,EAAE,IACtDf,EAAYc,MAAM,GAAG,EAAEC,KAAK,EAAE,IAC9BL;AAAAA,MAAAA;AAGLd,MAAAA,EAAMM,SAAiB;AAAA,QAAEU,QAAAA;AAAAA,QAAQI,eAAeJ;AAAAA,MAAAA,CAAQ;AAAA,IAC3D;AAAA,EAEF,GAAG,CAACf,GAAaG,CAAW,CAAC,GAE7BW,EAAU,MAAM;AACd,IAAIhB,MAAS,SAAS,CAACC,EAAMO,UAC3BF,EAAe,EAAE,GACjBH,EAAe,EAAE;AAAA,EAErB,GAAG,CAACF,EAAMO,OAAOR,CAAI,CAAC;AAEtB,QAAMsB,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAA,EACC,UAAA9B,GACA,QAAM,IACN,UAAAY,GACA,SAASQ,QACT,aAAAjB,GACA,KAAAC,GACA,MAAAC,GACA,OAAAQ,EAAA,CAAa;AAAA,IAEf,gBAAAiB,EAAC,WACC,MAAK,QACL,WAAWC,EAAOC,OAClB,UAAAhC,GACA,WAAW,GACX,UAAWiC,CAAAA,MAAMzB,EAAeyB,EAAEX,OAAOT,KAAK,GAC9C,aAAad,GACb,OAAOQ,GAAY;AAAA,sBAEpB,SAAA,EACC,MAAK,OACL,WAAW2B,EAAGH,EAAOC,OAAOjB,KAAW,SAAS,GAChD,aAAWd,IAAO,SAASmB,QAC3B,UAAApB,GACA,WAAW,IACX,MAAMoB,QACN,UAAWa,CAAAA,MAAMtB,EAAesB,EAAEX,OAAOT,KAAK,GAC9C,QAAAG,GACA,SAASV,EAAM6B,SACf,OAAOjB,GACP,OAAOR,GACP,GAAII,EAAAA,CAAU;AAAA,EAAA,GAElB;AAGF,2BACG,SAAA,EAAM,WAAWiB,EAAO7B,OAAM,kBAAA,SAC5BA,UAAAA;AAAAA,IAAAA,KAAS,gBAAA4B,EAAC,UAAK,WAAWI,EAAG5B,EAAM8B,YAAYL,EAAOK,QAAQ,GAAIlC,UAAAA,EAAAA,CAAM;AAAA,IACxEG,MAAS,QACRsB,IAEA,gBAAAG,EAAC,SAAA,EACC,KAAA1B,GACA,WAAW8B,EAAGH,EAAOC,OAAOlC,GAAWiB,KAAW,SAAS,GAC3D,aAAWd,IAAO,SAASmB,QAC3B,UAAApB,GACA,QAAAgB,GACA,aAAAb,GACA,OAAOe,GACP,MAAAb,GACA,GAAIC,EAAAA,CAAM;AAAA,EAAA,GAGhB;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index4.css');const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index4.css');const n=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),_="_layout_1hk16_16",c="_dashboard_1hk16_30",u="_settings_1hk16_34",i="_settlements_1hk16_51",r="_home_1hk16_92",t={layout:_,dashboard:c,settings:u,settlements:i,home:r},h=({children:s,isLoading:e=!1,feature:o,...a})=>n.jsx("main",{className:l.t(t.layout,t[o],e&&"is-loading"),...a,"data-component":"layout",children:s});exports.Layout=h;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: string;\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: string;\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":"uUAUaA,EAASA,CAAC,CAAEC,SAAAA,EAAUC,UAAAA,EAAY,GAAOC,QAAAA,EAAS,GAAGC,CAAmB,UAEhF,OAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,OAAQD,EAAOH,CAAO,EAAGD,GAAa,YAAY,EACvE,GAAIE,EAAM,iBAAA,SAETH,SAAAA,EACH"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { t as
|
|
3
|
-
import '../../assets/index4.css';const
|
|
4
|
-
layout:
|
|
5
|
-
dashboard:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
|
+
import '../../assets/index4.css';const m = "_layout_1hk16_16", l = "_dashboard_1hk16_30", h = "_settings_1hk16_34", r = "_settlements_1hk16_51", c = "_home_1hk16_92", t = {
|
|
4
|
+
layout: m,
|
|
5
|
+
dashboard: l,
|
|
6
|
+
settings: h,
|
|
7
|
+
settlements: r,
|
|
8
|
+
home: c
|
|
9
|
+
}, u = ({
|
|
10
|
+
children: s,
|
|
11
|
+
isLoading: o = !1,
|
|
12
|
+
feature: e,
|
|
13
|
+
...a
|
|
14
|
+
}) => /* @__PURE__ */ n("main", { className: _(t.layout, t[e], o && "is-loading"), ...a, "data-component": "layout", children: s });
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
u as Layout
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: string;\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: string;\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":";;;;;;;;GAUaA,IAASA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,WAAAA,IAAY;AAAA,EAAOC,SAAAA;AAAAA,EAAS,GAAGC;AAAmB,wBAEhF,QAAA,EACC,WAAWC,EAAGC,EAAOC,QAAQD,EAAOH,CAAO,GAAGD,KAAa,YAAY,GACvE,GAAIE,GAAM,kBAAA,UAETH,UAAAA,GACH;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const a=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),c=require("../../helpers-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const a=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),c=require("../../helpers-BD5fFZi-.cjs"),d="_horizontal_ham8z_1",z="_list_ham8z_12",x="_columns_ham8z_51",s={horizontal:d,list:z,columns:x};function y({children:t,className:r,columns:o=1,horizontal:m,ordered:u,style:h,...l}){const n=Number.isFinite(o)?Math.max(1,Math.floor(o)):1,e=_.t(r,s.list,n>1&&s.columns,m&&s.horizontal),i={...h,"--list-columns":n};return u?a.jsx("ol",{className:e,style:i,...l,"data-component":"list",children:c.wrapChildren(t)}):a.jsx("ul",{className:e,style:i,...l,"data-component":"list",children:c.wrapChildren(t)})}exports.List=y;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { t as u } from "../../classix-DG18itHa.js";
|
|
3
|
-
import { w as m } from "../../helpers-
|
|
3
|
+
import { w as m } from "../../helpers-D56OHkFI.js";
|
|
4
4
|
import '../../assets/index38.css';const z = "_horizontal_ham8z_1", f = "_list_ham8z_12", p = "_columns_ham8z_51", t = {
|
|
5
5
|
horizontal: z,
|
|
6
6
|
list: f,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-C_cX1FYp.cjs");require("../../utils-DBzf7CFq.cjs");const e=require("../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-C_cX1FYp.cjs");require("../../utils-DBzf7CFq.cjs");const e=require("../../index-BpUboRfJ.cjs");exports.Select=e.Select;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../../classix-DG18itHa.js";
|
|
3
3
|
import "../../icons-DfmpRbxE.js";
|
|
4
4
|
import "../../utils--n2yqjCy.js";
|
|
5
|
-
import { S as e } from "../../index-
|
|
5
|
+
import { S as e } from "../../index-ChKhFyp8.js";
|
|
6
6
|
export {
|
|
7
7
|
e as Select
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const e=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),x=require("../../utils-DBzf7CFq.cjs"),l=require("../../styles.module-Vt6mmlsz.cjs"),d="_textarea_b5yys_5",y={textarea:d},m=({label:t,maxRows:r=12,minRows:a=3,required:n,value:s,...o})=>{const{touched:c,onBlur:u}=x.useTouched(s==="");return e.jsxs("label",{"data-component":"textarea",children:[t&&e.jsx("span",{children:t}),e.jsx("textarea",{className:i.t(l.inputStyles.input,y.textarea,c&&"touched"),onBlur:u,...o,required:n,style:{"--min-rows":a,"--max-rows":r},value:s})]})};exports.Textarea=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n required={required}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n />\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","inputStyles","input","styles","textarea"],"mappings":"sRAaaA,EAAWA,CAAC,CACvBC,MAAAA,EACAC,QAAAA,EAAU,GACVC,QAAAA,EAAU,EACVC,SAAAA,EACAC,MAAAA,EACA,GAAGC,CACU,IAAM,CACnB,KAAM,CAAEC,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAEnD,OACEK,EAAAA,KAAC,QAAA,CAAK,iBAAA,WACHT,SAAAA,CAAAA,GAASU,EAAAA,IAAC,QAAMV,SAAAA,CAAAA,CAAM,EACvBU,EAAAA,IAAC,WAAA,CACC,UAAWC,EAAAA,EAAGC,EAAAA,YAAYC,MAAOC,EAAOC,SAAUT,GAAW,SAAS,EACtE,OAAAC,KACIF,EACJ,SAAAF,EACA,MACE,CACE,aAAcD,EACd,aAAcD,CAAAA,EAGlB,MAAAG,CAAA,CAAa,CAAA,EAEjB,CAEJ"}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { u } from "../../utils--n2yqjCy.js";
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/index42.css';const
|
|
6
|
-
|
|
7
|
-
textarea: b
|
|
1
|
+
import { jsxs as x, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { t as i } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { u as p } from "../../utils--n2yqjCy.js";
|
|
4
|
+
import { i as u } from "../../styles.module-DZXAP_eP.js";
|
|
5
|
+
import '../../assets/index42.css';const d = "_textarea_b5yys_5", l = {
|
|
6
|
+
textarea: d
|
|
8
7
|
}, j = ({
|
|
9
8
|
label: t,
|
|
10
|
-
maxRows:
|
|
11
|
-
minRows:
|
|
12
|
-
required:
|
|
13
|
-
value:
|
|
14
|
-
...
|
|
9
|
+
maxRows: a = 12,
|
|
10
|
+
minRows: o = 3,
|
|
11
|
+
required: s,
|
|
12
|
+
value: e,
|
|
13
|
+
...n
|
|
15
14
|
}) => {
|
|
16
15
|
const {
|
|
17
|
-
touched:
|
|
18
|
-
onBlur:
|
|
19
|
-
} =
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
t && /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
"--min-rows":
|
|
24
|
-
"--max-rows":
|
|
25
|
-
}, value:
|
|
16
|
+
touched: m,
|
|
17
|
+
onBlur: c
|
|
18
|
+
} = p(e === "");
|
|
19
|
+
return /* @__PURE__ */ x("label", { "data-component": "textarea", children: [
|
|
20
|
+
t && /* @__PURE__ */ r("span", { children: t }),
|
|
21
|
+
/* @__PURE__ */ r("textarea", { className: i(u.input, l.textarea, m && "touched"), onBlur: c, ...n, required: s, style: {
|
|
22
|
+
"--min-rows": o,
|
|
23
|
+
"--max-rows": a
|
|
24
|
+
}, value: e })
|
|
26
25
|
] });
|
|
27
26
|
};
|
|
28
27
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n required={required}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n />\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","inputStyles","input","styles","textarea"],"mappings":";;;;;;GAaaA,IAAWA,CAAC;AAAA,EACvBC,OAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVC,SAAAA,IAAU;AAAA,EACVC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACA,GAAGC;AACU,MAAM;AACnB,QAAM;AAAA,IAAEC,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE;AAEnD,SACE,gBAAAK,EAAC,SAAA,EAAK,kBAAA,YACHT,UAAAA;AAAAA,IAAAA,KAAS,gBAAAU,EAAC,UAAMV,UAAAA,EAAAA,CAAM;AAAA,IACvB,gBAAAU,EAAC,YAAA,EACC,WAAWC,EAAGC,EAAYC,OAAOC,EAAOC,UAAUT,KAAW,SAAS,GACtE,QAAAC,MACIF,GACJ,UAAAF,GACA,OACE;AAAA,MACE,cAAcD;AAAAA,MACd,cAAcD;AAAAA,IAAAA,GAGlB,OAAAG,EAAA,CAAa;AAAA,EAAA,GAEjB;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const r=require("react");function u(t){return r.isValidElement(t)&&t.type===r.Fragment}function i(t,n=[]){return r.Children.forEach(t,l=>{u(l)?i(l.props.children,n):n.push(l)}),n}function f(t,{wrapper:n="li"}={}){return i(t).filter(e=>e!==null).map((e,a)=>{if(r.isValidElement(e)&&e.type===n)return e;const s=r.isValidElement(e)&&e.key!=null?e.key:a;return r.createElement(n,{key:s},e)})}exports.wrapChildren=f;
|
|
2
|
+
//# sourceMappingURL=helpers-BD5fFZi-.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers-BD5fFZi-.cjs","sources":["../src/lib/helpers.tsx"],"sourcesContent":["import React, { JSX } from 'react';\n\ntype WrapOptions<T extends keyof JSX.IntrinsicElements = 'li'> = {\n wrapper?: T;\n};\n\nfunction isFragmentElement(\n node: React.ReactNode\n): node is React.ReactElement<{ children?: React.ReactNode }> {\n return React.isValidElement(node) && node.type === React.Fragment;\n}\n\nfunction flattenChildren(children: React.ReactNode, out: React.ReactNode[] = []) {\n React.Children.forEach(children, (child) => {\n if (isFragmentElement(child)) {\n flattenChildren(child.props.children, out);\n } else {\n out.push(child);\n }\n });\n return out;\n}\n\nexport function wrapChildren<T extends keyof JSX.IntrinsicElements = 'li'>(\n children: React.ReactNode,\n { wrapper = 'li' as T }: WrapOptions<T> = {}\n) {\n const flat = flattenChildren(children);\n\n const filterNull = flat.filter((child) => child !== null);\n\n return filterNull.map((child, i) => {\n if (React.isValidElement(child) && child.type === wrapper) {\n return child;\n }\n\n const key = React.isValidElement(child) && child.key != null ? child.key : i;\n\n return React.createElement(wrapper, { key }, child);\n });\n}\n"],"names":["isFragmentElement","node","React","isValidElement","type","Fragment","flattenChildren","children","out","Children","forEach","child","props","push","wrapChildren","wrapper","filter","map","i","key","createElement"],"mappings":"sCAMA,SAASA,EACPC,EAC4D,CAC5D,OAAOC,EAAMC,eAAeF,CAAI,GAAKA,EAAKG,OAASF,EAAMG,QAC3D,CAEA,SAASC,EAAgBC,EAA2BC,EAAyB,GAAI,CAC/EN,OAAAA,EAAMO,SAASC,QAAQH,EAAWI,GAAU,CACtCX,EAAkBW,CAAK,EACzBL,EAAgBK,EAAMC,MAAML,SAAUC,CAAG,EAEzCA,EAAIK,KAAKF,CAAK,CAElB,CAAC,EACMH,CACT,CAEO,SAASM,EACdP,EACA,CAAEQ,QAAAA,EAAU,IAA0B,EAAI,GAC1C,CAKA,OAJaT,EAAgBC,CAAQ,EAEbS,OAAQL,GAAUA,IAAU,IAAI,EAEtCM,IAAI,CAACN,EAAOO,IAAM,CAClC,GAAIhB,EAAMC,eAAeQ,CAAK,GAAKA,EAAMP,OAASW,EAChD,OAAOJ,EAGT,MAAMQ,EAAMjB,EAAMC,eAAeQ,CAAK,GAAKA,EAAMQ,KAAO,KAAOR,EAAMQ,IAAMD,EAE3E,OAAOhB,EAAMkB,cAAcL,EAAS,CAAEI,IAAAA,CAAAA,EAAOR,CAAK,CACpD,CAAC,CACH"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
function
|
|
2
|
+
function u(t) {
|
|
3
3
|
return r.isValidElement(t) && t.type === r.Fragment;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return r.Children.forEach(t, (
|
|
7
|
-
|
|
5
|
+
function a(t, n = []) {
|
|
6
|
+
return r.Children.forEach(t, (l) => {
|
|
7
|
+
u(l) ? a(l.props.children, n) : n.push(l);
|
|
8
8
|
}), n;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function o(t, {
|
|
11
11
|
wrapper: n = "li"
|
|
12
12
|
} = {}) {
|
|
13
|
-
return
|
|
13
|
+
return a(t).filter((e) => e !== null).map((e, f) => {
|
|
14
14
|
if (r.isValidElement(e) && e.type === n)
|
|
15
15
|
return e;
|
|
16
16
|
const i = r.isValidElement(e) && e.key != null ? e.key : f;
|
|
@@ -20,6 +20,6 @@ function u(t, {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
o as w
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=helpers-
|
|
25
|
+
//# sourceMappingURL=helpers-D56OHkFI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers-D56OHkFI.js","sources":["../src/lib/helpers.tsx"],"sourcesContent":["import React, { JSX } from 'react';\n\ntype WrapOptions<T extends keyof JSX.IntrinsicElements = 'li'> = {\n wrapper?: T;\n};\n\nfunction isFragmentElement(\n node: React.ReactNode\n): node is React.ReactElement<{ children?: React.ReactNode }> {\n return React.isValidElement(node) && node.type === React.Fragment;\n}\n\nfunction flattenChildren(children: React.ReactNode, out: React.ReactNode[] = []) {\n React.Children.forEach(children, (child) => {\n if (isFragmentElement(child)) {\n flattenChildren(child.props.children, out);\n } else {\n out.push(child);\n }\n });\n return out;\n}\n\nexport function wrapChildren<T extends keyof JSX.IntrinsicElements = 'li'>(\n children: React.ReactNode,\n { wrapper = 'li' as T }: WrapOptions<T> = {}\n) {\n const flat = flattenChildren(children);\n\n const filterNull = flat.filter((child) => child !== null);\n\n return filterNull.map((child, i) => {\n if (React.isValidElement(child) && child.type === wrapper) {\n return child;\n }\n\n const key = React.isValidElement(child) && child.key != null ? child.key : i;\n\n return React.createElement(wrapper, { key }, child);\n });\n}\n"],"names":["isFragmentElement","node","React","isValidElement","type","Fragment","flattenChildren","children","out","Children","forEach","child","props","push","wrapChildren","wrapper","filter","map","i","key","createElement"],"mappings":";AAMA,SAASA,EACPC,GAC4D;AAC5D,SAAOC,EAAMC,eAAeF,CAAI,KAAKA,EAAKG,SAASF,EAAMG;AAC3D;AAEA,SAASC,EAAgBC,GAA2BC,IAAyB,IAAI;AAC/EN,SAAAA,EAAMO,SAASC,QAAQH,GAAWI,CAAAA,MAAU;AAC1C,IAAIX,EAAkBW,CAAK,IACzBL,EAAgBK,EAAMC,MAAML,UAAUC,CAAG,IAEzCA,EAAIK,KAAKF,CAAK;AAAA,EAElB,CAAC,GACMH;AACT;AAEO,SAASM,EACdP,GACA;AAAA,EAAEQ,SAAAA,IAAU;AAA0B,IAAI,IAC1C;AAKA,SAJaT,EAAgBC,CAAQ,EAEbS,OAAQL,CAAAA,MAAUA,MAAU,IAAI,EAEtCM,IAAI,CAACN,GAAOO,MAAM;AAClC,QAAIhB,EAAMC,eAAeQ,CAAK,KAAKA,EAAMP,SAASW;AAChD,aAAOJ;AAGT,UAAMQ,IAAMjB,EAAMC,eAAeQ,CAAK,KAAKA,EAAMQ,OAAO,OAAOR,EAAMQ,MAAMD;AAE3E,WAAOhB,EAAMkB,cAAcL,GAAS;AAAA,MAAEI,KAAAA;AAAAA,IAAAA,GAAOR,CAAK;AAAA,EACpD,CAAC;AACH;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";require('./assets/index41.css');const t=require("react/jsx-runtime"),m=require("./classix-5H4IWnMA.cjs"),v=require("./icons-C_cX1FYp.cjs"),n=require("./utils-DBzf7CFq.cjs"),y=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function l(s){return Object.fromEntries(Object.entries(s).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||y.has(e)))}const f="_select_sotfn_1",x="_label_sotfn_24",i={select:f,label:x},j=({children:s,label:e,placeholder:a,...r})=>{const{touched:c,onBlur:u}=n.useTouched(r.value===""),d=l(r),{style:p,...h}=d,b={...p,"--icon-svg":v.iconSVG("chevron").replace("currentColor",n.resolveColor("--color-icon"))},o=t.jsxs("select",{className:m.t(i.select,c&&"touched"),onBlur:u,style:b,...h,children:[a&&t.jsx("option",{value:"",hidden:!0,children:a},"placeholder"),s]});return e?t.jsxs("label",{"data-component":"select",children:[t.jsx("span",{className:i.label,children:e}),o]}):o};exports.Select=j;exports.sanitizeSelectProps=l;
|
|
2
|
+
//# sourceMappingURL=index-BpUboRfJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BpUboRfJ.cjs","sources":["../src/components/select/sanitizeSelectProps.ts","../src/components/select/index.tsx"],"sourcesContent":["const selectKeys = new Set([\n 'aria-activedescendant',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-controls',\n 'aria-describedby',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-owns',\n 'aria-required',\n 'aria-roledescription',\n 'autoComplete',\n 'autoFocus',\n 'className',\n 'defaultValue',\n 'dir',\n 'disabled',\n 'form',\n 'id',\n 'multiple',\n 'name',\n 'onBlur',\n 'onChange',\n 'onClick',\n 'onFocus',\n 'onInput',\n 'onInvalid',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerUp',\n 'required',\n 'role',\n 'size',\n 'style',\n 'tabIndex',\n 'title',\n 'value',\n]);\n\nexport function sanitizeSelectProps<T extends Record<string, unknown>>(props: T) {\n return Object.fromEntries(\n Object.entries(props).filter(\n ([key]) => key.startsWith('data-') || key.startsWith('aria-') || selectKeys.has(key)\n )\n ) as Partial<T>;\n}\n","import cx from 'classix';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { resolveColor, useTouched } from '@/utils.ts';\n\nimport { sanitizeSelectProps } from './sanitizeSelectProps';\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\ntype withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n const selectProps = sanitizeSelectProps(props);\n const { style, ...restSelectProps } = selectProps;\n const withVars = {\n ...style,\n '--icon-svg': iconSVG('chevron').replace('currentColor', resolveColor('--color-icon')),\n } satisfies withVars;\n\n const selectElement = (\n <select\n className={cx(styles.select, touched && 'touched')}\n onBlur={onBlur}\n style={withVars}\n {...restSelectProps}\n >\n {placeholder && (\n <option\n key='placeholder'\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span className={styles.label}>{label}</span>\n {selectElement}\n </label>\n );\n};\n"],"names":["selectKeys","Set","sanitizeSelectProps","props","Object","fromEntries","entries","filter","key","startsWith","has","Select","children","label","placeholder","touched","onBlur","useTouched","value","selectProps","style","restSelectProps","withVars","iconSVG","replace","resolveColor","selectElement","jsxs","cx","styles","select","jsx"],"mappings":"0JAAMA,EAAa,IAAIC,IAAI,CACzB,wBACA,oBACA,YACA,gBACA,mBACA,eACA,gBACA,oBACA,gBACA,gBACA,cACA,eACA,oBACA,aACA,kBACA,YACA,YACA,gBACA,uBACA,eACA,YACA,YACA,eACA,MACA,WACA,OACA,KACA,WACA,OACA,SACA,WACA,UACA,UACA,UACA,YACA,YACA,UACA,cACA,YACA,gBACA,cACA,WACA,OACA,OACA,QACA,WACA,QACA,OAAO,CACR,EAEM,SAASC,EAAuDC,EAAU,CAC/E,OAAOC,OAAOC,YACZD,OAAOE,QAAQH,CAAK,EAAEI,OACpB,CAAC,CAACC,CAAG,IAAMA,EAAIC,WAAW,OAAO,GAAKD,EAAIC,WAAW,OAAO,GAAKT,EAAWU,IAAIF,CAAG,CACrF,CACF,CACF,oECvCaG,EAASA,CAAC,CAAEC,SAAAA,EAAUC,MAAAA,EAAOC,YAAAA,EAAa,GAAGX,CAAmB,IAAM,CACjF,KAAM,CAAEY,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,aAAWd,EAAMe,QAAU,EAAE,EACnDC,EAAcjB,EAAoBC,CAAK,EACvC,CAAEiB,MAAAA,EAAO,GAAGC,CAAAA,EAAoBF,EAChCG,EAAW,CACf,GAAGF,EACH,aAAcG,EAAAA,QAAQ,SAAS,EAAEC,QAAQ,eAAgBC,EAAAA,aAAa,cAAc,CAAC,CAAA,EAGjFC,EACJC,EAAAA,KAAC,SAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,OAAQf,GAAW,SAAS,EACjD,OAAAC,EACA,MAAOM,EACP,GAAID,EAEHP,SAAAA,CAAAA,SACE,SAAA,CAEC,MAAO,GACP,OAAM,GAELA,YAJG,aAKN,EAEDF,CAAAA,EACH,EAGF,OAAKC,EAKHc,EAAAA,KAAC,QAAA,CAAK,iBAAA,SACJ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CAAK,UAAWF,EAAOhB,MAAQA,SAAAA,EAAM,EACrCa,CAAAA,EACH,EAPOA,CASX"}
|
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { t as h } from "./classix-DG18itHa.js";
|
|
3
3
|
import { i as b } from "./icons-DfmpRbxE.js";
|
|
4
4
|
import { u as f, r as v } from "./utils--n2yqjCy.js";
|
|
5
5
|
import './assets/index41.css';const y = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
|
|
6
|
-
function
|
|
6
|
+
function w(a) {
|
|
7
7
|
return Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || y.has(e)));
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
select:
|
|
11
|
-
label:
|
|
12
|
-
|
|
13
|
-
}, j = ({
|
|
9
|
+
const S = "_select_sotfn_1", _ = "_label_sotfn_24", i = {
|
|
10
|
+
select: S,
|
|
11
|
+
label: _
|
|
12
|
+
}, g = ({
|
|
14
13
|
children: a,
|
|
15
14
|
label: e,
|
|
16
|
-
placeholder:
|
|
17
|
-
...
|
|
15
|
+
placeholder: t,
|
|
16
|
+
...o
|
|
18
17
|
}) => {
|
|
19
18
|
const {
|
|
20
|
-
touched:
|
|
21
|
-
onBlur:
|
|
22
|
-
} = f(
|
|
23
|
-
style:
|
|
19
|
+
touched: l,
|
|
20
|
+
onBlur: c
|
|
21
|
+
} = f(o.value === ""), d = w(o), {
|
|
22
|
+
style: u,
|
|
24
23
|
...p
|
|
25
|
-
} = d,
|
|
26
|
-
...
|
|
24
|
+
} = d, m = {
|
|
25
|
+
...u,
|
|
27
26
|
"--icon-svg": b("chevron").replace("currentColor", v("--color-icon"))
|
|
28
|
-
},
|
|
29
|
-
|
|
27
|
+
}, r = /* @__PURE__ */ s("select", { className: h(i.select, l && "touched"), onBlur: c, style: m, ...p, children: [
|
|
28
|
+
t && /* @__PURE__ */ n("option", { value: "", hidden: !0, children: t }, "placeholder"),
|
|
30
29
|
a
|
|
31
30
|
] });
|
|
32
|
-
return e ? /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */ n("span", { className:
|
|
34
|
-
|
|
35
|
-
] }) :
|
|
31
|
+
return e ? /* @__PURE__ */ s("label", { "data-component": "select", children: [
|
|
32
|
+
/* @__PURE__ */ n("span", { className: i.label, children: e }),
|
|
33
|
+
r
|
|
34
|
+
] }) : r;
|
|
36
35
|
};
|
|
37
36
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
g as S,
|
|
38
|
+
w as s
|
|
40
39
|
};
|
|
41
|
-
//# sourceMappingURL=index-
|
|
40
|
+
//# sourceMappingURL=index-ChKhFyp8.js.map
|