@solibo/solibo-ui 2.0.1 → 2.0.3

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.
Files changed (35) hide show
  1. package/dist/assets/index13.css +1 -1
  2. package/dist/assets/index16.css +1 -1
  3. package/dist/assets/index21.css +1 -1
  4. package/dist/assets/index48.css +1 -1
  5. package/dist/components/controls/index.cjs +2 -1
  6. package/dist/components/controls/index.cjs.map +1 -1
  7. package/dist/components/controls/index.js +57 -54
  8. package/dist/components/controls/index.js.map +1 -1
  9. package/dist/components/dropdown/index.cjs +1 -1
  10. package/dist/components/dropdown/index.js +1 -1
  11. package/dist/components/editor/index.cjs +1 -1
  12. package/dist/components/editor/index.js +1 -1
  13. package/dist/components/graph/index.cjs +1 -1
  14. package/dist/components/graph/index.js +26 -26
  15. package/dist/components/input/index.cjs +1 -1
  16. package/dist/components/input/index.js +1 -1
  17. package/dist/components/message/index.cjs +1 -1
  18. package/dist/components/message/index.cjs.map +1 -1
  19. package/dist/components/message/index.js +34 -28
  20. package/dist/components/message/index.js.map +1 -1
  21. package/dist/components/nav/index.cjs +1 -1
  22. package/dist/components/nav/index.js +32 -32
  23. package/dist/components/search/index.cjs +1 -1
  24. package/dist/components/search/index.js +1 -1
  25. package/dist/index-DWDp66fp.cjs +2 -0
  26. package/dist/{index-CQlMdqOp.cjs.map → index-DWDp66fp.cjs.map} +1 -1
  27. package/dist/index-Ds-Ocs4L.js +83 -0
  28. package/dist/{index-CbJ2-IPc.js.map → index-Ds-Ocs4L.js.map} +1 -1
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.d.ts +3 -1
  31. package/dist/index.js +1 -1
  32. package/dist/tokens.json +1 -1
  33. package/package.json +1 -1
  34. package/dist/index-CQlMdqOp.cjs +0 -2
  35. package/dist/index-CbJ2-IPc.js +0 -83
@@ -0,0 +1,83 @@
1
+ import { jsxs as g, Fragment as k, jsx as r } from "react/jsx-runtime";
2
+ import { t as m } from "./classix-DG18itHa.js";
3
+ import { useId as A, useState as T, useEffect as V } from "react";
4
+ import { i as D } from "./icons-dUP7sKyt.js";
5
+ import { u as J, c as K } from "./use-touched-B999bBr8.js";
6
+ import './assets/index48.css';function O(n) {
7
+ return n && `${n[0].toLocaleUpperCase()}${n.slice(1)}`;
8
+ }
9
+ function Q(n) {
10
+ const o = O(n);
11
+ return o && !o.endsWith(":") ? `${o}:` : o;
12
+ }
13
+ const R = "_field_w1cmd_3", X = "_input_w1cmd_8", Y = "_touched_w1cmd_48", Z = "_label_w1cmd_57", q = "_inline_w1cmd_78", M = "_error_w1cmd_99", ee = "_code_w1cmd_106", e = {
14
+ field: R,
15
+ input: X,
16
+ touched: Y,
17
+ label: Z,
18
+ inline: q,
19
+ error: M,
20
+ code: ee
21
+ };
22
+ function ae({
23
+ className: n,
24
+ defaultCountryCode: o = "+47",
25
+ disabled: c = !1,
26
+ errorMessage: w,
27
+ icon: I,
28
+ invalid: h = !1,
29
+ label: p,
30
+ onBlur: y,
31
+ placeholder: x,
32
+ ref: B,
33
+ required: _,
34
+ style: N,
35
+ type: t = "text",
36
+ variant: f = "default",
37
+ ...a
38
+ }) {
39
+ const z = A(), [v, L] = T(""), [l, j] = T(""), {
40
+ name: C,
41
+ onChange: s,
42
+ pattern: G,
43
+ value: d,
44
+ ...H
45
+ } = a, {
46
+ touched: E,
47
+ onBlur: U
48
+ } = J(d === ""), u = I && t !== "radio" && t !== "datetime-local" ? I : void 0, $ = p && f === "inline" ? Q(p) : p, b = h && w ? z : void 0, F = [a["aria-describedby"], b].filter(Boolean).join(" ") || void 0, P = u ? {
49
+ ...N,
50
+ "--icon-svg": D(u)
51
+ } : N, S = K(U, y);
52
+ V(() => {
53
+ if (s && t === "tel") {
54
+ const i = {
55
+ name: C,
56
+ value: l ? (v || o).split(" ").join("") + l.split(" ").join("") : void 0
57
+ };
58
+ s({
59
+ target: i,
60
+ currentTarget: i
61
+ });
62
+ }
63
+ }, [v, o, C, s, l, t]), V(() => {
64
+ t === "tel" && !d && (j(""), L(""));
65
+ }, [t, d]);
66
+ const W = /* @__PURE__ */ g(k, { children: [
67
+ /* @__PURE__ */ r("input", { disabled: c, hidden: !0, onChange: s, pattern: void 0, placeholder: x, ref: B, type: t, value: d }),
68
+ /* @__PURE__ */ r("input", { type: "text", className: m(e.code, e.input), disabled: c, maxLength: 5, onChange: (i) => L(i.target.value), placeholder: o, value: v }),
69
+ /* @__PURE__ */ r("input", { ...H, "aria-describedby": F, "aria-invalid": h ? !0 : a["aria-invalid"], type: "tel", className: m(e.input, n, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, maxLength: 14, name: void 0, onChange: (i) => j(i.target.value), onBlur: S, pattern: G, required: _, style: P, value: l })
70
+ ] });
71
+ return /* @__PURE__ */ g("div", { className: e.field, "data-component": "input", children: [
72
+ /* @__PURE__ */ g("label", { className: m(e.label, f === "inline" && e.inline), children: [
73
+ $ && /* @__PURE__ */ r("span", { "data-required": _ && f !== "inline" ? !0 : void 0, children: $ }),
74
+ t === "tel" ? W : /* @__PURE__ */ r("input", { ...a, "aria-describedby": F, "aria-invalid": h ? !0 : a["aria-invalid"], ref: B, className: m(e.input, n, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, onBlur: S, placeholder: x, required: _, style: P, type: t })
75
+ ] }),
76
+ b && /* @__PURE__ */ r("span", { className: e.error, id: b, role: "alert", children: w })
77
+ ] });
78
+ }
79
+ export {
80
+ ae as I,
81
+ Q as f
82
+ };
83
+ //# sourceMappingURL=index-Ds-Ocs4L.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CbJ2-IPc.js","sources":["../src/utils/text.ts","../src/components/input/index.tsx"],"sourcesContent":["export function capitalizeFirstLetter(value: string): string {\n return value ? `${value[0].toLocaleUpperCase()}${value.slice(1)}` : value;\n}\n\nexport function formatInlineLabel(value: string): string {\n const label = capitalizeFirstLetter(value);\n return label && !label.endsWith(':') ? `${label}:` : label;\n}\n","import cx from 'classix';\nimport { useEffect, useId, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { composeEventHandlers } from '@/utils/compose-event-handlers';\nimport { formatInlineLabel } from '@/utils/text';\nimport { useTouched } from '@/utils/use-touched';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n errorMessage?: React.ReactNode;\n icon?: IconName;\n invalid?: boolean;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n variant?: 'default' | 'inline';\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 errorMessage,\n icon,\n invalid = false,\n label,\n onBlur: onBlurProp,\n placeholder,\n ref,\n required,\n style,\n type = 'text',\n variant = 'default',\n ...props\n}: InputProps) {\n const generatedErrorId = useId();\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { name, onChange, pattern, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n const inputIcon = icon && type !== 'radio' && type !== 'datetime-local' ? icon : undefined;\n const displayLabel = label && variant === 'inline' ? formatInlineLabel(label) : label;\n const errorId = invalid && errorMessage ? generatedErrorId : undefined;\n const describedBy = [props['aria-describedby'], errorId].filter(Boolean).join(' ') || undefined;\n\n type withVars =\n | (React.CSSProperties & {\n '--icon-svg'?: string;\n })\n | undefined;\n\n const withVars: withVars = inputIcon\n ? {\n ...style,\n '--icon-svg': iconSVG(inputIcon),\n }\n : style;\n const handleBlur = composeEventHandlers(onBlur, onBlurProp);\n\n useEffect(() => {\n if (onChange && type === 'tel') {\n const target = {\n name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n\n onChange({ target, currentTarget: target } as React.ChangeEvent<HTMLInputElement>);\n }\n }, [countryCode, defaultCountryCode, name, onChange, phoneNumber, type]);\n\n useEffect(() => {\n if (type === 'tel' && !value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [type, value]);\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={cx(styles.code, 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 {...restProps}\n aria-describedby={describedBy}\n aria-invalid={invalid ? true : props['aria-invalid']}\n type='tel'\n className={cx(styles.input, className, touched && styles.touched)}\n data-icon={inputIcon ? 'true' : undefined}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={handleBlur}\n pattern={pattern}\n required={required}\n style={withVars}\n value={phoneNumber}\n />\n </>\n );\n\n return (\n <div className={styles.field}>\n <label className={cx(styles.label, variant === 'inline' && styles.inline)}>\n {displayLabel && (\n <span data-required={required && variant !== 'inline' ? true : undefined}>\n {displayLabel}\n </span>\n )}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n {...props}\n aria-describedby={describedBy}\n aria-invalid={invalid ? true : props['aria-invalid']}\n ref={ref}\n className={cx(styles.input, className, touched && styles.touched)}\n data-icon={inputIcon ? 'true' : undefined}\n disabled={disabled}\n onBlur={handleBlur}\n placeholder={placeholder}\n required={required}\n style={withVars}\n type={type}\n />\n )}\n </label>\n {errorId && (\n <span\n className={styles.error}\n id={errorId}\n role='alert'\n >\n {errorMessage}\n </span>\n )}\n </div>\n );\n}\n"],"names":["capitalizeFirstLetter","value","toLocaleUpperCase","slice","formatInlineLabel","label","endsWith","Input","className","defaultCountryCode","disabled","errorMessage","icon","invalid","onBlur","onBlurProp","placeholder","ref","required","style","type","variant","props","generatedErrorId","useId","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","name","onChange","pattern","restProps","touched","useTouched","inputIcon","undefined","displayLabel","errorId","describedBy","filter","Boolean","join","withVars","iconSVG","handleBlur","composeEventHandlers","useEffect","target","split","currentTarget","telephoneInput","jsxs","Fragment","jsx","cx","styles","code","input","e","field","inline","error"],"mappings":";;;;;AAAO,SAASA,EAAsBC,GAAuB;AAC3D,SAAOA,KAAQ,GAAGA,EAAM,CAAC,EAAEC,mBAAmB,GAAGD,EAAME,MAAM,CAAC,CAAC;AACjE;AAEO,SAASC,EAAkBH,GAAuB;AACvD,QAAMI,IAAQL,EAAsBC,CAAK;AACzC,SAAOI,KAAS,CAACA,EAAMC,SAAS,GAAG,IAAI,GAAGD,CAAK,MAAMA;AACvD;;;;;;;;;;ACyBO,SAASE,GAAM;AAAA,EACpBC,WAAAA;AAAAA,EACAC,oBAAAA,IAAqB;AAAA,EACrBC,UAAAA,IAAW;AAAA,EACXC,cAAAA;AAAAA,EACAC,MAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVR,OAAAA;AAAAA,EACAS,QAAQC;AAAAA,EACRC,aAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACO,GAAG;AACb,QAAMC,IAAmBC,EAAAA,GACnB,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAE,GAC3C,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3C;AAAA,IAAEG,MAAAA;AAAAA,IAAMC,UAAAA;AAAAA,IAAUC,SAAAA;AAAAA,IAAS/B,OAAAA;AAAAA,IAAO,GAAGgC;AAAAA,EAAAA,IAAcX,GACnD;AAAA,IAAEY,SAAAA;AAAAA,IAASpB,QAAAA;AAAAA,EAAAA,IAAWqB,EAAWlC,MAAU,EAAE,GAC7CmC,IAAYxB,KAAQQ,MAAS,WAAWA,MAAS,m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AAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"index-Ds-Ocs4L.js","sources":["../src/utils/text.ts","../src/components/input/index.tsx"],"sourcesContent":["export function capitalizeFirstLetter(value: string): string {\n return value ? `${value[0].toLocaleUpperCase()}${value.slice(1)}` : value;\n}\n\nexport function formatInlineLabel(value: string): string {\n const label = capitalizeFirstLetter(value);\n return label && !label.endsWith(':') ? `${label}:` : label;\n}\n","import cx from 'classix';\nimport { useEffect, useId, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { composeEventHandlers } from '@/utils/compose-event-handlers';\nimport { formatInlineLabel } from '@/utils/text';\nimport { useTouched } from '@/utils/use-touched';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n errorMessage?: React.ReactNode;\n icon?: IconName;\n invalid?: boolean;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n variant?: 'default' | 'inline';\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 errorMessage,\n icon,\n invalid = false,\n label,\n onBlur: onBlurProp,\n placeholder,\n ref,\n required,\n style,\n type = 'text',\n variant = 'default',\n ...props\n}: InputProps) {\n const generatedErrorId = useId();\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { name, onChange, pattern, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n const inputIcon = icon && type !== 'radio' && type !== 'datetime-local' ? icon : undefined;\n const displayLabel = label && variant === 'inline' ? formatInlineLabel(label) : label;\n const errorId = invalid && errorMessage ? generatedErrorId : undefined;\n const describedBy = [props['aria-describedby'], errorId].filter(Boolean).join(' ') || undefined;\n\n type withVars =\n | (React.CSSProperties & {\n '--icon-svg'?: string;\n })\n | undefined;\n\n const withVars: withVars = inputIcon\n ? {\n ...style,\n '--icon-svg': iconSVG(inputIcon),\n }\n : style;\n const handleBlur = composeEventHandlers(onBlur, onBlurProp);\n\n useEffect(() => {\n if (onChange && type === 'tel') {\n const target = {\n name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n\n onChange({ target, currentTarget: target } as React.ChangeEvent<HTMLInputElement>);\n }\n }, [countryCode, defaultCountryCode, name, onChange, phoneNumber, type]);\n\n useEffect(() => {\n if (type === 'tel' && !value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [type, value]);\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={cx(styles.code, 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 {...restProps}\n aria-describedby={describedBy}\n aria-invalid={invalid ? true : props['aria-invalid']}\n type='tel'\n className={cx(styles.input, className, touched && styles.touched)}\n data-icon={inputIcon ? 'true' : undefined}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={handleBlur}\n pattern={pattern}\n required={required}\n style={withVars}\n value={phoneNumber}\n />\n </>\n );\n\n return (\n <div className={styles.field}>\n <label className={cx(styles.label, variant === 'inline' && styles.inline)}>\n {displayLabel && (\n <span data-required={required && variant !== 'inline' ? true : undefined}>\n {displayLabel}\n </span>\n )}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n {...props}\n aria-describedby={describedBy}\n aria-invalid={invalid ? true : props['aria-invalid']}\n ref={ref}\n className={cx(styles.input, className, touched && styles.touched)}\n data-icon={inputIcon ? 'true' : undefined}\n disabled={disabled}\n onBlur={handleBlur}\n placeholder={placeholder}\n required={required}\n style={withVars}\n type={type}\n />\n )}\n </label>\n {errorId && (\n <span\n className={styles.error}\n id={errorId}\n role='alert'\n >\n {errorMessage}\n </span>\n )}\n </div>\n );\n}\n"],"names":["capitalizeFirstLetter","value","toLocaleUpperCase","slice","formatInlineLabel","label","endsWith","Input","className","defaultCountryCode","disabled","errorMessage","icon","invalid","onBlur","onBlurProp","placeholder","ref","required","style","type","variant","props","generatedErrorId","useId","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","name","onChange","pattern","restProps","touched","useTouched","inputIcon","undefined","displayLabel","errorId","describedBy","filter","Boolean","join","withVars","iconSVG","handleBlur","composeEventHandlers","useEffect","target","split","currentTarget","telephoneInput","jsxs","Fragment","jsx","cx","styles","code","input","e","field","inline","error"],"mappings":";;;;;AAAO,SAASA,EAAsBC,GAAuB;AAC3D,SAAOA,KAAQ,GAAGA,EAAM,CAAC,EAAEC,mBAAmB,GAAGD,EAAME,MAAM,CAAC,CAAC;AACjE;AAEO,SAASC,EAAkBH,GAAuB;AACvD,QAAMI,IAAQL,EAAsBC,CAAK;AACzC,SAAOI,KAAS,CAACA,EAAMC,SAAS,GAAG,IAAI,GAAGD,CAAK,MAAMA;AACvD;;;;;;;;;;ACyBO,SAASE,GAAM;AAAA,EACpBC,WAAAA;AAAAA,EACAC,oBAAAA,IAAqB;AAAA,EACrBC,UAAAA,IAAW;AAAA,EACXC,cAAAA;AAAAA,EACAC,MAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVR,OAAAA;AAAAA,EACAS,QAAQC;AAAAA,EACRC,aAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACO,GAAG;AACb,QAAMC,IAAmBC,EAAAA,GACnB,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAE,GAC3C,CAACC,GAAaC,CA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,OAAOnD,GAAW0B,KAAWuB,EAAOvB,OAAO,GAChE,aAAWE,IAAY,SAASC,QAChC,UAAA3B,GACA,QAAQoC,GACR,aAAA9B,GACA,UAAAE,GACA,OAAO0B,GACP,MAAAxB,EAAA,CAAW;AAAA,IAAA,GAGjB;AAAA,IACCmB,KACC,gBAAAgB,EAAC,QAAA,EACC,WAAWE,EAAOM,OAClB,IAAIxB,GACJ,MAAK,SAEJ5B,UAAAA,EAAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const o=require("./components/app-link/index.cjs"),t=require("./components/app-shell/index.cjs"),r=require("./components/aside/index.cjs"),i=require("./components/avatar/index.cjs"),s=require("./components/badge/index.cjs"),c=require("./components/banner/index.cjs"),p=require("./components/branding/index.cjs"),_=require("./components/button/index.cjs"),a=require("./components/card/index.cjs"),d=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),m=require("./components/collapsible/index.cjs"),l=require("./components/controls/index.cjs"),x=require("./components/croppable/index.cjs"),q=require("./components/dialog/index.cjs"),g=require("./components/divider/index.cjs"),b=require("./components/dropdown/index.cjs"),v=require("./components/dropzone/index.cjs"),h=require("./components/editor/index.cjs"),S=require("./components/empty-state/index.cjs"),T=require("./components/fieldset/index.cjs"),L=require("./components/figure/index.cjs"),C=require("./components/file/index.cjs"),I=require("./components/footer/index.cjs"),F=require("./components/form/index.cjs"),f=require("./components/graph/index.cjs"),k=require("./components/group/index.cjs"),y=require("./components/header/index.cjs"),A=require("./components/icon/index.cjs"),B=require("./components/iframe/index.cjs"),D=require("./components/image/index.cjs"),M=require("./index-CQlMdqOp.cjs"),P=require("./components/link/index.cjs"),N=require("./components/list/index.cjs"),O=require("./components/loading/index.cjs"),j=require("./components/menu/index.cjs"),w=require("./components/message/index.cjs"),E=require("./components/messages/index.cjs"),e=require("./components/nav/index.cjs"),G=require("./components/object/index.cjs"),z=require("./components/page-layout/index.cjs"),H=require("./components/popover/index.cjs"),W=require("./components/portal/index.cjs"),J=require("./components/search/index.cjs"),K=require("./index-Bt7vnwji.cjs"),n=require("./components/sortable/index.cjs"),Q=require("./components/table/index.cjs"),R=require("./components/textarea/index.cjs"),U=require("./components/toast/index.cjs"),V=require("./components/toasts/index.cjs"),X=require("./components/toggle/index.cjs"),Y=require("./components/toolbar/index.cjs"),Z=require("./components/tooltip/index.cjs"),$=require("./components/widget/index.cjs");exports.AppLink=o.AppLink;exports.AppShell=t.AppShell;exports.Aside=r.Aside;exports.Avatar=i.Avatar;exports.Badge=s.Badge;exports.Banner=c.Banner;exports.Branding=p.Branding;exports.Button=_.Button;exports.Card=a.Card;exports.Checkbox=d.Checkbox;exports.Chip=u.Chip;exports.Collapsible=m.Collapsible;exports.Controls=l.Controls;exports.Croppable=x.Croppable;exports.Dialog=q.Dialog;exports.Divider=g.Divider;exports.Dropdown=b.Dropdown;exports.Dropzone=v.Dropzone;exports.Editor=h.Editor;exports.EmptyState=S.EmptyState;exports.Fieldset=T.Fieldset;exports.Figure=L.Figure;exports.File=C.File;exports.Footer=I.Footer;exports.Form=F.Form;exports.Graph=f.Graph;exports.Group=k.Group;exports.Header=y.Header;exports.Icon=A.Icon;exports.Iframe=B.Iframe;exports.Image=D.Image;exports.Input=M.Input;exports.Link=P.Link;exports.List=N.List;exports.Loading=O.Loading;exports.Menu=j.Menu;exports.Message=w.Message;exports.Messages=E.Messages;exports.Nav=e.Nav;exports.NavItem=e.NavItem;exports.NavLabel=e.NavLabel;exports.Object=G.Object;exports.PageLayout=z.PageLayout;exports.Popover=H.Popover;exports.Portal=W.Portal;exports.Search=J.Search;exports.Select=K.Select;exports.Sortable=n.Sortable;exports.useOptionalSortableItem=n.useOptionalSortableItem;exports.Table=Q.Table;exports.Textarea=R.Textarea;exports.Toast=U.Toast;exports.Toasts=V.Toasts;exports.Toggle=X.Toggle;exports.Toolbar=Y.Toolbar;exports.Tooltip=Z.Tooltip;exports.Widget=$.Widget;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const o=require("./components/app-link/index.cjs"),t=require("./components/app-shell/index.cjs"),r=require("./components/aside/index.cjs"),i=require("./components/avatar/index.cjs"),s=require("./components/badge/index.cjs"),c=require("./components/banner/index.cjs"),p=require("./components/branding/index.cjs"),_=require("./components/button/index.cjs"),a=require("./components/card/index.cjs"),d=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),m=require("./components/collapsible/index.cjs"),l=require("./components/controls/index.cjs"),x=require("./components/croppable/index.cjs"),q=require("./components/dialog/index.cjs"),g=require("./components/divider/index.cjs"),b=require("./components/dropdown/index.cjs"),v=require("./components/dropzone/index.cjs"),h=require("./components/editor/index.cjs"),S=require("./components/empty-state/index.cjs"),T=require("./components/fieldset/index.cjs"),L=require("./components/figure/index.cjs"),C=require("./components/file/index.cjs"),I=require("./components/footer/index.cjs"),F=require("./components/form/index.cjs"),f=require("./components/graph/index.cjs"),k=require("./components/group/index.cjs"),y=require("./components/header/index.cjs"),A=require("./components/icon/index.cjs"),B=require("./components/iframe/index.cjs"),D=require("./components/image/index.cjs"),M=require("./index-DWDp66fp.cjs"),P=require("./components/link/index.cjs"),N=require("./components/list/index.cjs"),O=require("./components/loading/index.cjs"),j=require("./components/menu/index.cjs"),w=require("./components/message/index.cjs"),E=require("./components/messages/index.cjs"),e=require("./components/nav/index.cjs"),G=require("./components/object/index.cjs"),z=require("./components/page-layout/index.cjs"),H=require("./components/popover/index.cjs"),W=require("./components/portal/index.cjs"),J=require("./components/search/index.cjs"),K=require("./index-Bt7vnwji.cjs"),n=require("./components/sortable/index.cjs"),Q=require("./components/table/index.cjs"),R=require("./components/textarea/index.cjs"),U=require("./components/toast/index.cjs"),V=require("./components/toasts/index.cjs"),X=require("./components/toggle/index.cjs"),Y=require("./components/toolbar/index.cjs"),Z=require("./components/tooltip/index.cjs"),$=require("./components/widget/index.cjs");exports.AppLink=o.AppLink;exports.AppShell=t.AppShell;exports.Aside=r.Aside;exports.Avatar=i.Avatar;exports.Badge=s.Badge;exports.Banner=c.Banner;exports.Branding=p.Branding;exports.Button=_.Button;exports.Card=a.Card;exports.Checkbox=d.Checkbox;exports.Chip=u.Chip;exports.Collapsible=m.Collapsible;exports.Controls=l.Controls;exports.Croppable=x.Croppable;exports.Dialog=q.Dialog;exports.Divider=g.Divider;exports.Dropdown=b.Dropdown;exports.Dropzone=v.Dropzone;exports.Editor=h.Editor;exports.EmptyState=S.EmptyState;exports.Fieldset=T.Fieldset;exports.Figure=L.Figure;exports.File=C.File;exports.Footer=I.Footer;exports.Form=F.Form;exports.Graph=f.Graph;exports.Group=k.Group;exports.Header=y.Header;exports.Icon=A.Icon;exports.Iframe=B.Iframe;exports.Image=D.Image;exports.Input=M.Input;exports.Link=P.Link;exports.List=N.List;exports.Loading=O.Loading;exports.Menu=j.Menu;exports.Message=w.Message;exports.Messages=E.Messages;exports.Nav=e.Nav;exports.NavItem=e.NavItem;exports.NavLabel=e.NavLabel;exports.Object=G.Object;exports.PageLayout=z.PageLayout;exports.Popover=H.Popover;exports.Portal=W.Portal;exports.Search=J.Search;exports.Select=K.Select;exports.Sortable=n.Sortable;exports.useOptionalSortableItem=n.useOptionalSortableItem;exports.Table=Q.Table;exports.Textarea=R.Textarea;exports.Toast=U.Toast;exports.Toasts=V.Toasts;exports.Toggle=X.Toggle;exports.Toolbar=Y.Toolbar;exports.Tooltip=Z.Tooltip;exports.Widget=$.Widget;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -649,11 +649,13 @@ declare type MenuSharedProps = {
649
649
  onItemSelect?: (item: MenuItem) => void;
650
650
  };
651
651
 
652
- export declare const Message: ({ appearance, attachments, author, authorColor, authorImageUrl, authorLink, authorRole, content, iconName, id, preview, timestamp, timestampText, type, }: MessageOptions) => JSX.Element;
652
+ export declare const Message: ({ actions, appearance, attachments, author, authorColor, authorImageUrl, authorLink, authorRole, content, iconName, id, preview, timestamp, timestampText, type, }: MessageOptions) => JSX.Element;
653
653
 
654
654
  declare type MessageItem = MessageOptions;
655
655
 
656
656
  export declare type MessageOptions = {
657
+ /** Controls shown under the message, e.g. a delete button for the author's own message. */
658
+ actions?: React.ReactNode;
657
659
  appearance?: 'default' | 'document' | 'file';
658
660
  attachments?: React.ReactNode;
659
661
  author?: string;
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import { Header as eo } from "./components/header/index.js";
29
29
  import { Icon as po } from "./components/icon/index.js";
30
30
  import { Iframe as xo } from "./components/iframe/index.js";
31
31
  import { Image as ao } from "./components/image/index.js";
32
- import { I as io } from "./index-CbJ2-IPc.js";
32
+ import { I as io } from "./index-Ds-Ocs4L.js";
33
33
  import { Link as no } from "./components/link/index.js";
34
34
  import { List as bo } from "./components/list/index.js";
35
35
  import { Loading as Io } from "./components/loading/index.js";
package/dist/tokens.json CHANGED
@@ -363,7 +363,7 @@
363
363
  },
364
364
  "com.solibo": {
365
365
  "packageName": "@solibo/solibo-ui",
366
- "packageVersion": "2.0.1"
366
+ "packageVersion": "2.0.3"
367
367
  }
368
368
  },
369
369
  "$name": "TEST Solibo UI Tokens (Copy)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "pnpm run tokens:build && vite build --watch",
@@ -1,2 +0,0 @@
1
- "use strict";require('./assets/index48.css');const e=require("react/jsx-runtime"),_=require("./classix-5H4IWnMA.cjs"),r=require("react"),U=require("./icons-Dv_p0bUF.cjs"),F=require("./use-touched-Bq5Gjbpz.cjs");function W(n){return n&&`${n[0].toLocaleUpperCase()}${n.slice(1)}`}function P(n){const o=W(n);return o&&!o.endsWith(":")?`${o}:`:o}const k="_field_yagit_3",A="_input_yagit_8",D="_touched_yagit_48",J="_label_yagit_57",K="_inline_yagit_78",O="_error_yagit_99",Q="_code_yagit_106",t={field:k,input:A,touched:D,label:J,inline:K,error:O,code:Q};function X({className:n,defaultCountryCode:o="+47",disabled:c=!1,errorMessage:b,icon:j,invalid:g=!1,label:m,onBlur:R,placeholder:I,ref:y,required:f,style:B,type:i="text",variant:p="default",...s}){const V=r.useId(),[v,L]=r.useState(""),[l,N]=r.useState(""),{name:q,onChange:u,pattern:w,value:d,...z}=s,{touched:E,onBlur:G}=F.useTouched(d===""),h=j&&i!=="radio"&&i!=="datetime-local"?j:void 0,C=m&&p==="inline"?P(m):m,x=g&&b?V:void 0,S=[s["aria-describedby"],x].filter(Boolean).join(" ")||void 0,T=h?{...B,"--icon-svg":U.iconSVG(h)}:B,$=F.composeEventHandlers(G,R);r.useEffect(()=>{if(u&&i==="tel"){const a={name:q,value:l?(v||o).split(" ").join("")+l.split(" ").join(""):void 0};u({target:a,currentTarget:a})}},[v,o,q,u,l,i]),r.useEffect(()=>{i==="tel"&&!d&&(N(""),L(""))},[i,d]);const H=e.jsxs(e.Fragment,{children:[e.jsx("input",{disabled:c,hidden:!0,onChange:u,pattern:void 0,placeholder:I,ref:y,type:i,value:d}),e.jsx("input",{type:"text",className:_.t(t.code,t.input),disabled:c,maxLength:5,onChange:a=>L(a.target.value),placeholder:o,value:v}),e.jsx("input",{...z,"aria-describedby":S,"aria-invalid":g?!0:s["aria-invalid"],type:"tel",className:_.t(t.input,n,E&&t.touched),"data-icon":h?"true":void 0,disabled:c,maxLength:14,name:void 0,onChange:a=>N(a.target.value),onBlur:$,pattern:w,required:f,style:T,value:l})]});return e.jsxs("div",{className:t.field,"data-component":"input",children:[e.jsxs("label",{className:_.t(t.label,p==="inline"&&t.inline),children:[C&&e.jsx("span",{"data-required":f&&p!=="inline"?!0:void 0,children:C}),i==="tel"?H:e.jsx("input",{...s,"aria-describedby":S,"aria-invalid":g?!0:s["aria-invalid"],ref:y,className:_.t(t.input,n,E&&t.touched),"data-icon":h?"true":void 0,disabled:c,onBlur:$,placeholder:I,required:f,style:T,type:i})]}),x&&e.jsx("span",{className:t.error,id:x,role:"alert",children:b})]})}exports.Input=X;exports.formatInlineLabel=P;
2
- //# sourceMappingURL=index-CQlMdqOp.cjs.map
@@ -1,83 +0,0 @@
1
- import { jsxs as b, Fragment as k, jsx as a } from "react/jsx-runtime";
2
- import { t as m } from "./classix-DG18itHa.js";
3
- import { useId as A, useState as T, useEffect as V } from "react";
4
- import { i as D } from "./icons-dUP7sKyt.js";
5
- import { u as J, c as K } from "./use-touched-B999bBr8.js";
6
- import './assets/index48.css';function O(t) {
7
- return t && `${t[0].toLocaleUpperCase()}${t.slice(1)}`;
8
- }
9
- function Q(t) {
10
- const i = O(t);
11
- return i && !i.endsWith(":") ? `${i}:` : i;
12
- }
13
- const R = "_field_yagit_3", X = "_input_yagit_8", Y = "_touched_yagit_48", Z = "_label_yagit_57", q = "_inline_yagit_78", M = "_error_yagit_99", ee = "_code_yagit_106", e = {
14
- field: R,
15
- input: X,
16
- touched: Y,
17
- label: Z,
18
- inline: q,
19
- error: M,
20
- code: ee
21
- };
22
- function re({
23
- className: t,
24
- defaultCountryCode: i = "+47",
25
- disabled: c = !1,
26
- errorMessage: y,
27
- icon: I,
28
- invalid: h = !1,
29
- label: p,
30
- onBlur: w,
31
- placeholder: x,
32
- ref: B,
33
- required: _,
34
- style: N,
35
- type: n = "text",
36
- variant: f = "default",
37
- ...r
38
- }) {
39
- const z = A(), [g, L] = T(""), [l, j] = T(""), {
40
- name: C,
41
- onChange: s,
42
- pattern: G,
43
- value: d,
44
- ...H
45
- } = r, {
46
- touched: E,
47
- onBlur: U
48
- } = J(d === ""), u = I && n !== "radio" && n !== "datetime-local" ? I : void 0, $ = p && f === "inline" ? Q(p) : p, v = h && y ? z : void 0, F = [r["aria-describedby"], v].filter(Boolean).join(" ") || void 0, P = u ? {
49
- ...N,
50
- "--icon-svg": D(u)
51
- } : N, S = K(U, w);
52
- V(() => {
53
- if (s && n === "tel") {
54
- const o = {
55
- name: C,
56
- value: l ? (g || i).split(" ").join("") + l.split(" ").join("") : void 0
57
- };
58
- s({
59
- target: o,
60
- currentTarget: o
61
- });
62
- }
63
- }, [g, i, C, s, l, n]), V(() => {
64
- n === "tel" && !d && (j(""), L(""));
65
- }, [n, d]);
66
- const W = /* @__PURE__ */ b(k, { children: [
67
- /* @__PURE__ */ a("input", { disabled: c, hidden: !0, onChange: s, pattern: void 0, placeholder: x, ref: B, type: n, value: d }),
68
- /* @__PURE__ */ a("input", { type: "text", className: m(e.code, e.input), disabled: c, maxLength: 5, onChange: (o) => L(o.target.value), placeholder: i, value: g }),
69
- /* @__PURE__ */ a("input", { ...H, "aria-describedby": F, "aria-invalid": h ? !0 : r["aria-invalid"], type: "tel", className: m(e.input, t, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, maxLength: 14, name: void 0, onChange: (o) => j(o.target.value), onBlur: S, pattern: G, required: _, style: P, value: l })
70
- ] });
71
- return /* @__PURE__ */ b("div", { className: e.field, "data-component": "input", children: [
72
- /* @__PURE__ */ b("label", { className: m(e.label, f === "inline" && e.inline), children: [
73
- $ && /* @__PURE__ */ a("span", { "data-required": _ && f !== "inline" ? !0 : void 0, children: $ }),
74
- n === "tel" ? W : /* @__PURE__ */ a("input", { ...r, "aria-describedby": F, "aria-invalid": h ? !0 : r["aria-invalid"], ref: B, className: m(e.input, t, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, onBlur: S, placeholder: x, required: _, style: P, type: n })
75
- ] }),
76
- v && /* @__PURE__ */ a("span", { className: e.error, id: v, role: "alert", children: y })
77
- ] });
78
- }
79
- export {
80
- re as I,
81
- Q as f
82
- };
83
- //# sourceMappingURL=index-CbJ2-IPc.js.map