wimui 0.6.1 → 0.7.0

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 (57) hide show
  1. package/dist/components/_internal/FieldLabelContent.cjs +1 -1
  2. package/dist/components/_internal/FieldLabelContent.js +1 -0
  3. package/dist/components/data-display/Card/Card.cjs +1 -1
  4. package/dist/components/data-display/Card/Card.js +30 -25
  5. package/dist/components/data-display/Card/styled-values.cjs +2 -0
  6. package/dist/components/data-display/Card/styled-values.d.ts +18 -0
  7. package/dist/components/data-display/Card/styled-values.js +21 -0
  8. package/dist/components/feedback/Alert/Alert.cjs +1 -1
  9. package/dist/components/feedback/Alert/Alert.d.ts +11 -4
  10. package/dist/components/feedback/Alert/Alert.js +1 -1
  11. package/dist/components/feedback/Result/Result.cjs +1 -1
  12. package/dist/components/feedback/Result/Result.js +2 -2
  13. package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
  14. package/dist/components/form/Dropzone/Dropzone.d.ts +10 -1
  15. package/dist/components/form/Dropzone/Dropzone.js +40 -40
  16. package/dist/components/form/Fieldset/Fieldset.cjs +1 -1
  17. package/dist/components/form/Fieldset/Fieldset.d.ts +9 -2
  18. package/dist/components/form/Fieldset/Fieldset.js +1 -1
  19. package/dist/components/form/Fieldset/fieldset.module.cjs +1 -1
  20. package/dist/components/form/Fieldset/fieldset.module.js +4 -3
  21. package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
  22. package/dist/components/form/FileUpload/FileUpload.d.ts +10 -1
  23. package/dist/components/form/FileUpload/FileUpload.js +27 -27
  24. package/dist/components/form/Input/Input.cjs +1 -1
  25. package/dist/components/form/Input/Input.d.ts +6 -0
  26. package/dist/components/form/Input/Input.js +65 -63
  27. package/dist/components/form/InputBase/InputBase.cjs +1 -1
  28. package/dist/components/form/InputBase/InputBase.d.ts +9 -1
  29. package/dist/components/form/InputBase/InputBase.js +31 -25
  30. package/dist/components/form/InputBase/input-base.module.cjs +1 -1
  31. package/dist/components/form/InputBase/input-base.module.js +9 -7
  32. package/dist/components/form/OtpInput/OtpInput.d.ts +16 -2
  33. package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
  34. package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
  35. package/dist/components/media/Icon/Icon.cjs +1 -1
  36. package/dist/components/media/Icon/Icon.d.ts +9 -4
  37. package/dist/components/media/Icon/Icon.js +27 -11
  38. package/dist/components/media/Icon/icon.module.cjs +1 -1
  39. package/dist/components/media/Icon/icon.module.js +10 -10
  40. package/dist/components/media/Image/Image.cjs +1 -1
  41. package/dist/components/media/Image/Image.js +1 -1
  42. package/dist/components/typography/Code/code.module.cjs +1 -1
  43. package/dist/components/typography/Code/code.module.js +1 -1
  44. package/dist/components/typography/Text/Text.cjs +1 -1
  45. package/dist/components/typography/Text/Text.d.ts +24 -0
  46. package/dist/components/typography/Text/Text.js +10 -10
  47. package/dist/components/typography/Text/text.module.cjs +1 -1
  48. package/dist/components/typography/Text/text.module.js +12 -10
  49. package/dist/llms-full.txt +68 -6
  50. package/dist/llms.txt +1 -1
  51. package/dist/styles.css +1 -1
  52. package/dist/utilities/warn-unstyled-value.cjs +2 -0
  53. package/dist/utilities/warn-unstyled-value.d.ts +17 -0
  54. package/dist/utilities/warn-unstyled-value.js +4 -0
  55. package/dist/wimui.umd.css +1 -1
  56. package/dist/wimui.umd.js +5 -5
  57. package/package.json +1 -1
@@ -1,78 +1,80 @@
1
1
  "use client";
2
2
  import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react-slot/dist/index.js";
3
- import { useWimTranslation as ee } from "../../../i18n/useWimTranslation.js";
4
- import { useMergedRef as n } from "../../../hooks/useMergedRef.js";
5
- import { InputBase as r } from "../InputBase/InputBase.js";
6
- import { FieldTemplate as i } from "../FieldTemplate/FieldTemplate.js";
7
- import a from "./input.module.js";
8
- import { forwardRef as o, useId as s, useRef as c, useState as l } from "react";
3
+ import { useWimTranslation as n } from "../../../i18n/useWimTranslation.js";
4
+ import { useMergedRef as r } from "../../../hooks/useMergedRef.js";
5
+ import { InputBase as i } from "../InputBase/InputBase.js";
6
+ import { FieldTemplate as a } from "../FieldTemplate/FieldTemplate.js";
7
+ import o from "./input.module.js";
8
+ import { forwardRef as s, useId as ee, useRef as c, useState as l } from "react";
9
9
  import u from "classnames";
10
10
  import { jsx as d } from "react/jsx-runtime";
11
11
  //#region src/components/form/Input/Input.tsx
12
- var f = o(({ intent: o = "default", variant: f = "outline", fullWidth: te = !1, className: ne, disabled: re, leftIcon: ie, rightIcon: p, leftIconColor: m, rightIconColor: h, onLeftIconClick: ae, onRightIconClick: g, allowClear: _ = !1, showPasswordToggle: v = !0, rightIconClassName: y, rightIconRotated: oe, width: se, value: b, defaultValue: x, onChange: S, type: C, label: w, error: T, required: E, layout: D, id: O, inputClassName: k, showPasswordAriaLabel: A, hidePasswordAriaLabel: j, rightIconAriaLabel: M, styles: N, asChild: P = !1, children: F, ...I }, L) => {
13
- let { t: R } = ee("common"), z = A ?? R("a11y.show_password"), ce = j ?? R("a11y.hide_password"), B = M ?? R("a11y.right_icon_action"), [V, H] = l(x ?? ""), [U, W] = l(!1), G = c(null), le = n(L, G), K = b !== void 0, q = K ? b : V, J = re, ue = (e) => {
14
- K || H(e.target.value), S?.(e);
15
- }, de = () => {
16
- let e = G.current;
12
+ var f = s(({ intent: s = "default", variant: f = "outline", fullWidth: p = !1, className: m, disabled: h, leftIcon: g, rightIcon: _, leftIconColor: te, rightIconColor: ne, onLeftIconClick: re, onRightIconClick: ie, allowClear: ae = !1, showPasswordToggle: oe = !0, rightIconClassName: se, rightIconRotated: ce, width: le, value: v, defaultValue: ue, onChange: y, type: b, label: x, error: S, required: C, layout: w, id: T, inputClassName: E, showPasswordAriaLabel: D, hidePasswordAriaLabel: O, rightIconAriaLabel: k, suffix: A, styles: j, asChild: M = !1, children: N, ...P }, F) => {
13
+ let { t: I } = n("common"), L = D ?? I("a11y.show_password"), R = O ?? I("a11y.hide_password"), de = k ?? I("a11y.right_icon_action"), [z, B] = l(ue ?? ""), [V, H] = l(!1), U = c(null), fe = r(F, U), W = v !== void 0, G = W ? v : z, K = h, pe = (e) => {
14
+ W || B(e.target.value), y?.(e);
15
+ }, me = () => {
16
+ let e = U.current;
17
17
  if (!e) return;
18
18
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
19
- t ? (t.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }))) : (K || H(""), S && (e.value = "", S({
19
+ t ? (t.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }))) : (W || B(""), y && (e.value = "", y({
20
20
  target: e,
21
21
  currentTarget: e
22
- }))), K || H("");
23
- }, fe = () => {
24
- W((e) => !e);
25
- }, pe = C === "password" && v, Y = [];
26
- pe && Y.push({
27
- name: U ? "EyeOffIcon" : "EyeIcon",
28
- onClick: (e) => fe(),
29
- ariaLabel: U ? ce : z
30
- }), p && (Y.some((e) => e.name === p) || Y.push({
31
- name: p,
32
- onClick: g,
33
- color: h,
34
- ariaLabel: B,
35
- className: y,
36
- rotated: oe
22
+ }))), W || B("");
23
+ }, he = () => {
24
+ H((e) => !e);
25
+ }, ge = b === "password" && oe, q = [];
26
+ ge && q.push({
27
+ name: V ? "EyeOffIcon" : "EyeIcon",
28
+ onClick: (e) => he(),
29
+ ariaLabel: V ? R : L
30
+ }), _ && (q.some((e) => e.name === _) || q.push({
31
+ name: _,
32
+ onClick: ie,
33
+ color: ne,
34
+ ariaLabel: de,
35
+ className: se,
36
+ rotated: ce
37
37
  }));
38
- let me = C === "password" && U ? "text" : C, X = T ? "danger" : o, he = s(), Z = O || `wim-input-${he}`, Q = T ? `${Z}-error` : void 0, $ = w ? `${Z}-label` : void 0;
39
- return /* @__PURE__ */ d(i, {
40
- label: w,
41
- error: T,
42
- required: E,
43
- layout: D,
38
+ let _e = b === "password" && V ? "text" : b, J = S ? "danger" : s, Y = ee(), X = T || `wim-input-${Y}`, Z = S ? `${X}-error` : void 0, Q = A != null && A !== "" ? `${X}-suffix` : void 0, ve = [Z, Q].filter(Boolean).join(" ") || void 0, $ = x ? `${X}-label` : void 0;
39
+ return /* @__PURE__ */ d(a, {
40
+ label: x,
41
+ error: S,
42
+ required: C,
43
+ layout: w,
44
44
  labelId: $,
45
- htmlFor: Z,
46
- errorId: Q,
47
- className: ne,
48
- children: /* @__PURE__ */ d(r, {
49
- intent: X,
45
+ htmlFor: X,
46
+ errorId: Z,
47
+ className: m,
48
+ children: /* @__PURE__ */ d(i, {
49
+ intent: J,
50
50
  variant: f,
51
- fullWidth: te,
52
- width: se,
53
- disabled: J,
54
- leftIcon: ie,
55
- leftIconColor: m,
56
- onLeftIconClick: ae,
57
- rightIcons: Y,
58
- allowClear: _,
59
- hasValue: !!q,
60
- onClear: de,
61
- styles: N,
62
- children: /* @__PURE__ */ d(P ? e : "input", {
63
- id: Z,
64
- ref: le,
65
- className: u("wim-input", a.root, a[X], J && a.disabled, a[f], k),
66
- disabled: J,
67
- value: q,
68
- onChange: ue,
69
- type: me,
70
- "aria-invalid": X === "danger",
71
- "aria-describedby": Q,
72
- "aria-labelledby": w ? $ : void 0,
73
- "aria-required": E,
74
- ...I,
75
- children: P ? /* @__PURE__ */ d(t, { children: F }) : null
51
+ fullWidth: p,
52
+ width: le,
53
+ disabled: K,
54
+ leftIcon: g,
55
+ leftIconColor: te,
56
+ onLeftIconClick: re,
57
+ rightIcons: q,
58
+ suffix: A,
59
+ suffixId: Q,
60
+ allowClear: ae,
61
+ hasValue: !!G,
62
+ onClear: me,
63
+ styles: j,
64
+ children: /* @__PURE__ */ d(M ? e : "input", {
65
+ id: X,
66
+ ref: fe,
67
+ className: u("wim-input", o.root, o[J], K && o.disabled, o[f], E),
68
+ disabled: K,
69
+ value: G,
70
+ onChange: pe,
71
+ type: _e,
72
+ "aria-invalid": J === "danger",
73
+ "aria-describedby": ve,
74
+ "aria-labelledby": x ? $ : void 0,
75
+ "aria-required": C,
76
+ ...P,
77
+ children: M ? /* @__PURE__ */ d(t, { children: N }) : null
76
78
  })
77
79
  })
78
80
  });
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../media/Icon/Icon.cjs"),r=require("./input-base.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=({children:e,intent:s=`default`,variant:c=`outline`,fullWidth:l=!1,width:u,className:d,disabled:f,leftIcon:p,leftIconColor:m,onLeftIconClick:h,leftIconAriaLabel:g,rightIcons:_=[],allowClear:v,hasValue:y,onClear:b,clearAriaLabel:x,styles:S})=>{let{t:C}=t.useWimTranslation(`common`),w=g??C(`a11y.left_icon_action`),T=x??C(`a11y.clear_input`),E=typeof u==`string`&&[`xs`,`sm`,`md`,`lg`,`xl`].includes(u),D=i.default.Children.map(e,e=>i.default.isValidElement(e)?i.default.cloneElement(e,{disabled:f?!0:e.props.disabled,className:(0,a.default)(e.props.className,r.default.inner,S?.inner)}):e),O=u!==void 0&&!E&&!l,k=E&&!l?u:void 0,A=e=>f?`disabled`:e||(s===`danger`?`danger`:s===`warning`?`warning`:s===`success`?`success`:`secondary`),j=[..._];v&&y&&!f&&j.push({name:`CloseIcon`,onClick:e=>{e.stopPropagation(),b?.()},ariaLabel:T});let M=k?r.default[`width${k.charAt(0).toUpperCase()}${k.slice(1)}`]:void 0;return(0,o.jsxs)(`div`,{className:(0,a.default)(`wim-input-base`,r.default.root,s&&r.default[s],f&&r.default.disabled,r.default[c],l&&r.default.fullWidth,O&&r.default.hasCustomWidth,M,p&&r.default.hasLeftIcon,(j.length>0||v)&&r.default.hasRightIcon,(j.length>=2||_.length>=1&&v)&&r.default.hasMultipleRightIcons,d,S?.root),style:O?{"--wim-input-width":typeof u==`number`?`${u}px`:u}:void 0,children:[p&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icon,r.default.left,h&&r.default.clickable,S?.icon),children:h?(0,o.jsx)(`button`,{type:`button`,onClick:h,className:(0,a.default)(r.default.iconButton,S?.iconButton),"aria-label":w,children:(0,o.jsx)(n.Icon,{name:p,size:`md`,color:A(m)})}):(0,o.jsx)(n.Icon,{name:p,size:`md`,color:A(m)})}),D,j.length>0&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icons,r.default.right,S?.icons),children:j.map((e,t)=>(0,o.jsx)(`div`,{className:(0,a.default)(r.default.iconItem,e.onClick&&r.default.clickable,e.rotated&&r.default.rotated,e.className,S?.iconItem),children:e.onClick?(0,o.jsx)(`button`,{type:`button`,onClick:e.onClick,className:(0,a.default)(r.default.iconButton,S?.iconButton),"aria-label":e.ariaLabel??C(`a11y.right_icon_action`),children:(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:A(e.color)})}):(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:A(e.color)})},`${e.name}-${t}`))})]})};exports.InputBase=s;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../media/Icon/Icon.cjs"),r=require("./input-base.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=({children:e,intent:s=`default`,variant:c=`outline`,fullWidth:l=!1,width:u,className:d,disabled:f,leftIcon:p,leftIconColor:m,onLeftIconClick:h,leftIconAriaLabel:g,rightIcons:_=[],suffix:v,suffixId:y,allowClear:b,hasValue:x,onClear:S,clearAriaLabel:C,styles:w})=>{let{t:T}=t.useWimTranslation(`common`),E=g??T(`a11y.left_icon_action`),D=C??T(`a11y.clear_input`),O=typeof u==`string`&&[`xs`,`sm`,`md`,`lg`,`xl`].includes(u),k=i.default.Children.map(e,e=>i.default.isValidElement(e)?i.default.cloneElement(e,{disabled:f?!0:e.props.disabled,className:(0,a.default)(e.props.className,r.default.inner,w?.inner)}):e),A=u!==void 0&&!O&&!l,j=O&&!l?u:void 0,M=e=>f?`disabled`:e||(s===`danger`?`danger`:s===`warning`?`warning`:s===`success`?`success`:`secondary`),N=[..._];b&&x&&!f&&N.push({name:`CloseIcon`,onClick:e=>{e.stopPropagation(),S?.()},ariaLabel:D});let P=j?r.default[`width${j.charAt(0).toUpperCase()}${j.slice(1)}`]:void 0;return(0,o.jsxs)(`div`,{className:(0,a.default)(`wim-input-base`,r.default.root,s&&r.default[s],f&&r.default.disabled,r.default[c],l&&r.default.fullWidth,A&&r.default.hasCustomWidth,P,p&&r.default.hasLeftIcon,(N.length>0||b)&&r.default.hasRightIcon,(N.length>=2||_.length>=1&&b)&&r.default.hasMultipleRightIcons,d,w?.root),style:A?{"--wim-input-width":typeof u==`number`?`${u}px`:u}:void 0,children:[p&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icon,r.default.left,h&&r.default.clickable,w?.icon),children:h?(0,o.jsx)(`button`,{type:`button`,onClick:h,className:(0,a.default)(r.default.iconButton,w?.iconButton),"aria-label":E,children:(0,o.jsx)(n.Icon,{name:p,size:`md`,color:M(m)})}):(0,o.jsx)(n.Icon,{name:p,size:`md`,color:M(m)})}),k,v!=null&&v!==``&&(0,o.jsx)(`span`,{id:y,className:(0,a.default)(r.default.suffix,N.length>0&&r.default.suffixClearsIcons),"data-testid":`input-suffix`,children:v}),N.length>0&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icons,r.default.right,w?.icons),children:N.map((e,t)=>(0,o.jsx)(`div`,{className:(0,a.default)(r.default.iconItem,e.onClick&&r.default.clickable,e.rotated&&r.default.rotated,e.className,w?.iconItem),children:e.onClick?(0,o.jsx)(`button`,{type:`button`,onClick:e.onClick,className:(0,a.default)(r.default.iconButton,w?.iconButton),"aria-label":e.ariaLabel??T(`a11y.right_icon_action`),children:(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:M(e.color)})}):(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:M(e.color)})},`${e.name}-${t}`))})]})};exports.InputBase=s;
@@ -35,6 +35,14 @@ export type InputBaseProps = {
35
35
  leftIconAriaLabel?: string;
36
36
  /** Icons to display on the right side */
37
37
  rightIcons?: InputBaseIcon[];
38
+ /**
39
+ * Static text shown after the control, inside the same shell — a unit such
40
+ * as `kg`, `%` or `円`. It sits in the flex flow, so the control shrinks to
41
+ * make room rather than running underneath it.
42
+ */
43
+ suffix?: React.ReactNode;
44
+ /** `id` for the suffix, so the control can point `aria-describedby` at it */
45
+ suffixId?: string;
38
46
  /** Whether to show a clear button when value is present */
39
47
  allowClear?: boolean;
40
48
  /** Whether the field currently has a value (controls clear button visibility) */
@@ -57,4 +65,4 @@ export type InputBaseProps = {
57
65
  * フォーム入力コンポーネント(Input, SearchInput, Select等)の外殻となる共用語コンポーネント。
58
66
  * prefix/suffix(アイコン)や clearable(クリアボタン)の配置とレイアウトを統一します。
59
67
  */
60
- export declare const InputBase: ({ children, intent, variant, fullWidth, width, className, disabled: isDisabled, leftIcon, leftIconColor, onLeftIconClick, leftIconAriaLabel, rightIcons, allowClear, hasValue, onClear, clearAriaLabel, styles: stylesProp, }: InputBaseProps) => React.JSX.Element;
68
+ export declare const InputBase: ({ children, intent, variant, fullWidth, width, className, disabled: isDisabled, leftIcon, leftIconColor, onLeftIconClick, leftIconAriaLabel, rightIcons, suffix, suffixId, allowClear, hasValue, onClear, clearAriaLabel, styles: stylesProp, }: InputBaseProps) => React.JSX.Element;
@@ -6,66 +6,72 @@ import r from "react";
6
6
  import i from "classnames";
7
7
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
8
  //#region src/components/form/InputBase/InputBase.tsx
9
- var s = ({ children: s, intent: c = "default", variant: l = "outline", fullWidth: u = !1, width: d, className: f, disabled: p, leftIcon: m, leftIconColor: h, onLeftIconClick: g, leftIconAriaLabel: _, rightIcons: v = [], allowClear: y, hasValue: b, onClear: x, clearAriaLabel: S, styles: C }) => {
10
- let { t: w } = e("common"), T = _ ?? w("a11y.left_icon_action"), E = S ?? w("a11y.clear_input"), D = typeof d == "string" && [
9
+ var s = ({ children: s, intent: c = "default", variant: l = "outline", fullWidth: u = !1, width: d, className: f, disabled: p, leftIcon: m, leftIconColor: h, onLeftIconClick: g, leftIconAriaLabel: _, rightIcons: v = [], suffix: y, suffixId: b, allowClear: x, hasValue: S, onClear: C, clearAriaLabel: w, styles: T }) => {
10
+ let { t: E } = e("common"), D = _ ?? E("a11y.left_icon_action"), O = w ?? E("a11y.clear_input"), k = typeof d == "string" && [
11
11
  "xs",
12
12
  "sm",
13
13
  "md",
14
14
  "lg",
15
15
  "xl"
16
- ].includes(d), O = r.Children.map(s, (e) => r.isValidElement(e) ? r.cloneElement(e, {
16
+ ].includes(d), A = r.Children.map(s, (e) => r.isValidElement(e) ? r.cloneElement(e, {
17
17
  disabled: p ? !0 : e.props.disabled,
18
- className: i(e.props.className, n.inner, C?.inner)
19
- }) : e), k = d !== void 0 && !D && !u, A = D && !u ? d : void 0, j = (e) => p ? "disabled" : e || (c === "danger" ? "danger" : c === "warning" ? "warning" : c === "success" ? "success" : "secondary"), M = [...v];
20
- y && b && !p && M.push({
18
+ className: i(e.props.className, n.inner, T?.inner)
19
+ }) : e), j = d !== void 0 && !k && !u, M = k && !u ? d : void 0, N = (e) => p ? "disabled" : e || (c === "danger" ? "danger" : c === "warning" ? "warning" : c === "success" ? "success" : "secondary"), P = [...v];
20
+ x && S && !p && P.push({
21
21
  name: "CloseIcon",
22
22
  onClick: (e) => {
23
- e.stopPropagation(), x?.();
23
+ e.stopPropagation(), C?.();
24
24
  },
25
- ariaLabel: E
25
+ ariaLabel: O
26
26
  });
27
- let N = A ? n[`width${A.charAt(0).toUpperCase()}${A.slice(1)}`] : void 0;
27
+ let F = M ? n[`width${M.charAt(0).toUpperCase()}${M.slice(1)}`] : void 0;
28
28
  return /* @__PURE__ */ o("div", {
29
- className: i("wim-input-base", n.root, c && n[c], p && n.disabled, n[l], u && n.fullWidth, k && n.hasCustomWidth, N, m && n.hasLeftIcon, (M.length > 0 || y) && n.hasRightIcon, (M.length >= 2 || v.length >= 1 && y) && n.hasMultipleRightIcons, f, C?.root),
30
- style: k ? { "--wim-input-width": typeof d == "number" ? `${d}px` : d } : void 0,
29
+ className: i("wim-input-base", n.root, c && n[c], p && n.disabled, n[l], u && n.fullWidth, j && n.hasCustomWidth, F, m && n.hasLeftIcon, (P.length > 0 || x) && n.hasRightIcon, (P.length >= 2 || v.length >= 1 && x) && n.hasMultipleRightIcons, f, T?.root),
30
+ style: j ? { "--wim-input-width": typeof d == "number" ? `${d}px` : d } : void 0,
31
31
  children: [
32
32
  m && /* @__PURE__ */ a("div", {
33
- className: i(n.icon, n.left, g && n.clickable, C?.icon),
33
+ className: i(n.icon, n.left, g && n.clickable, T?.icon),
34
34
  children: g ? /* @__PURE__ */ a("button", {
35
35
  type: "button",
36
36
  onClick: g,
37
- className: i(n.iconButton, C?.iconButton),
38
- "aria-label": T,
37
+ className: i(n.iconButton, T?.iconButton),
38
+ "aria-label": D,
39
39
  children: /* @__PURE__ */ a(t, {
40
40
  name: m,
41
41
  size: "md",
42
- color: j(h)
42
+ color: N(h)
43
43
  })
44
44
  }) : /* @__PURE__ */ a(t, {
45
45
  name: m,
46
46
  size: "md",
47
- color: j(h)
47
+ color: N(h)
48
48
  })
49
49
  }),
50
- O,
51
- M.length > 0 && /* @__PURE__ */ a("div", {
52
- className: i(n.icons, n.right, C?.icons),
53
- children: M.map((e, r) => /* @__PURE__ */ a("div", {
54
- className: i(n.iconItem, e.onClick && n.clickable, e.rotated && n.rotated, e.className, C?.iconItem),
50
+ A,
51
+ y != null && y !== "" && /* @__PURE__ */ a("span", {
52
+ id: b,
53
+ className: i(n.suffix, P.length > 0 && n.suffixClearsIcons),
54
+ "data-testid": "input-suffix",
55
+ children: y
56
+ }),
57
+ P.length > 0 && /* @__PURE__ */ a("div", {
58
+ className: i(n.icons, n.right, T?.icons),
59
+ children: P.map((e, r) => /* @__PURE__ */ a("div", {
60
+ className: i(n.iconItem, e.onClick && n.clickable, e.rotated && n.rotated, e.className, T?.iconItem),
55
61
  children: e.onClick ? /* @__PURE__ */ a("button", {
56
62
  type: "button",
57
63
  onClick: e.onClick,
58
- className: i(n.iconButton, C?.iconButton),
59
- "aria-label": e.ariaLabel ?? w("a11y.right_icon_action"),
64
+ className: i(n.iconButton, T?.iconButton),
65
+ "aria-label": e.ariaLabel ?? E("a11y.right_icon_action"),
60
66
  children: /* @__PURE__ */ a(t, {
61
67
  name: e.name,
62
68
  size: "md",
63
- color: j(e.color)
69
+ color: N(e.color)
64
70
  })
65
71
  }) : /* @__PURE__ */ a(t, {
66
72
  name: e.name,
67
73
  size: "md",
68
- color: j(e.color)
74
+ color: N(e.color)
69
75
  })
70
76
  }, `${e.name}-${r}`))
71
77
  })
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_m3clw_16`,t=`_ghost_m3clw_32`,n=`_disabled_m3clw_36`,r=`_icon_m3clw_45`,i=`_iconItem_m3clw_45`,a=`_danger_m3clw_7`,o=`_warning_m3clw_61`,s=`_success_m3clw_64`,c=`_hasLeftIcon_m3clw_83`,l=`_hasRightIcon_m3clw_86`,u=`_hasMultipleRightIcons_m3clw_89`,d=`_widthXs_m3clw_92`,f=`_widthSm_m3clw_95`,p=`_widthMd_m3clw_98`,m=`_widthLg_m3clw_101`,h=`_widthXl_m3clw_104`,g=`_hasCustomWidth_m3clw_107`,_=`_fullWidth_m3clw_112`,v=`_clickable_m3clw_128`,y=`_left_m3clw_131`,b=`_icons_m3clw_134`,x=`_right_m3clw_145`,S=`_rotated_m3clw_157`,C=`_iconButton_m3clw_160`,w=`_inner_m3clw_178`,T={root:e,ghost:t,disabled:n,icon:r,iconItem:i,danger:a,warning:o,success:s,hasLeftIcon:c,hasRightIcon:l,hasMultipleRightIcons:u,widthXs:d,widthSm:f,widthMd:p,widthLg:m,widthXl:h,hasCustomWidth:g,fullWidth:_,clickable:v,left:y,icons:b,right:x,rotated:S,iconButton:C,inner:w};exports.clickable=v,exports.danger=a,exports.default=T,exports.disabled=n,exports.fullWidth=_,exports.ghost=t,exports.hasCustomWidth=g,exports.hasLeftIcon=c,exports.hasMultipleRightIcons=u,exports.hasRightIcon=l,exports.icon=r,exports.iconButton=C,exports.iconItem=i,exports.icons=b,exports.inner=w,exports.left=y,exports.right=x,exports.root=e,exports.rotated=S,exports.success=s,exports.warning=o,exports.widthLg=m,exports.widthMd=p,exports.widthSm=f,exports.widthXl=h,exports.widthXs=d;
2
+ var e=`_root_mrju8_16`,t=`_ghost_mrju8_32`,n=`_disabled_mrju8_36`,r=`_icon_mrju8_45`,i=`_iconItem_mrju8_45`,a=`_danger_mrju8_7`,o=`_warning_mrju8_61`,s=`_success_mrju8_64`,c=`_hasLeftIcon_mrju8_83`,l=`_hasRightIcon_mrju8_86`,u=`_hasMultipleRightIcons_mrju8_89`,d=`_widthXs_mrju8_92`,f=`_widthSm_mrju8_95`,p=`_widthMd_mrju8_98`,m=`_widthLg_mrju8_101`,h=`_widthXl_mrju8_104`,g=`_hasCustomWidth_mrju8_107`,_=`_fullWidth_mrju8_112`,v=`_clickable_mrju8_128`,y=`_left_mrju8_131`,b=`_suffix_mrju8_134`,x=`_suffixClearsIcons_mrju8_142`,S=`_icons_mrju8_145`,C=`_right_mrju8_156`,w=`_rotated_mrju8_168`,T=`_iconButton_mrju8_171`,E=`_inner_mrju8_189`,D={root:e,ghost:t,disabled:n,icon:r,iconItem:i,danger:a,warning:o,success:s,hasLeftIcon:c,hasRightIcon:l,hasMultipleRightIcons:u,widthXs:d,widthSm:f,widthMd:p,widthLg:m,widthXl:h,hasCustomWidth:g,fullWidth:_,clickable:v,left:y,suffix:b,suffixClearsIcons:x,icons:S,right:C,rotated:w,iconButton:T,inner:E};exports.clickable=v,exports.danger=a,exports.default=D,exports.disabled=n,exports.fullWidth=_,exports.ghost=t,exports.hasCustomWidth=g,exports.hasLeftIcon=c,exports.hasMultipleRightIcons=u,exports.hasRightIcon=l,exports.icon=r,exports.iconButton=T,exports.iconItem=i,exports.icons=S,exports.inner=E,exports.left=y,exports.right=C,exports.root=e,exports.rotated=w,exports.success=s,exports.suffix=b,exports.suffixClearsIcons=x,exports.warning=o,exports.widthLg=m,exports.widthMd=p,exports.widthSm=f,exports.widthXl=h,exports.widthXs=d;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/form/InputBase/input-base.module.scss
3
- var e = "_root_m3clw_16", t = "_ghost_m3clw_32", n = "_disabled_m3clw_36", r = "_icon_m3clw_45", i = "_iconItem_m3clw_45", a = "_danger_m3clw_7", o = "_warning_m3clw_61", s = "_success_m3clw_64", c = "_hasLeftIcon_m3clw_83", l = "_hasRightIcon_m3clw_86", u = "_hasMultipleRightIcons_m3clw_89", d = "_widthXs_m3clw_92", f = "_widthSm_m3clw_95", p = "_widthMd_m3clw_98", m = "_widthLg_m3clw_101", h = "_widthXl_m3clw_104", g = "_hasCustomWidth_m3clw_107", _ = "_fullWidth_m3clw_112", v = "_clickable_m3clw_128", y = "_left_m3clw_131", b = "_icons_m3clw_134", x = "_right_m3clw_145", S = "_rotated_m3clw_157", C = "_iconButton_m3clw_160", w = "_inner_m3clw_178", T = {
3
+ var e = "_root_mrju8_16", t = "_ghost_mrju8_32", n = "_disabled_mrju8_36", r = "_icon_mrju8_45", i = "_iconItem_mrju8_45", a = "_danger_mrju8_7", o = "_warning_mrju8_61", s = "_success_mrju8_64", c = "_hasLeftIcon_mrju8_83", l = "_hasRightIcon_mrju8_86", u = "_hasMultipleRightIcons_mrju8_89", d = "_widthXs_mrju8_92", f = "_widthSm_mrju8_95", p = "_widthMd_mrju8_98", m = "_widthLg_mrju8_101", h = "_widthXl_mrju8_104", g = "_hasCustomWidth_mrju8_107", _ = "_fullWidth_mrju8_112", v = "_clickable_mrju8_128", y = "_left_mrju8_131", b = "_suffix_mrju8_134", x = "_suffixClearsIcons_mrju8_142", S = "_icons_mrju8_145", C = "_right_mrju8_156", w = "_rotated_mrju8_168", T = "_iconButton_mrju8_171", E = "_inner_mrju8_189", D = {
4
4
  root: e,
5
5
  ghost: t,
6
6
  disabled: n,
@@ -21,11 +21,13 @@ var e = "_root_m3clw_16", t = "_ghost_m3clw_32", n = "_disabled_m3clw_36", r = "
21
21
  fullWidth: _,
22
22
  clickable: v,
23
23
  left: y,
24
- icons: b,
25
- right: x,
26
- rotated: S,
27
- iconButton: C,
28
- inner: w
24
+ suffix: b,
25
+ suffixClearsIcons: x,
26
+ icons: S,
27
+ right: C,
28
+ rotated: w,
29
+ iconButton: T,
30
+ inner: E
29
31
  };
30
32
  //#endregion
31
- export { v as clickable, a as danger, T as default, n as disabled, _ as fullWidth, t as ghost, g as hasCustomWidth, c as hasLeftIcon, u as hasMultipleRightIcons, l as hasRightIcon, r as icon, C as iconButton, i as iconItem, b as icons, w as inner, y as left, x as right, e as root, S as rotated, s as success, o as warning, m as widthLg, p as widthMd, f as widthSm, h as widthXl, d as widthXs };
33
+ export { v as clickable, a as danger, D as default, n as disabled, _ as fullWidth, t as ghost, g as hasCustomWidth, c as hasLeftIcon, u as hasMultipleRightIcons, l as hasRightIcon, r as icon, T as iconButton, i as iconItem, S as icons, E as inner, y as left, C as right, e as root, w as rotated, s as success, b as suffix, x as suffixClearsIcons, o as warning, m as widthLg, p as widthMd, f as widthSm, h as widthXl, d as widthXs };
@@ -1,6 +1,17 @@
1
1
  import { default as React } from 'react';
2
2
  export type OtpInputLabels = {
3
- digitAriaLabel?: (index: number) => string;
3
+ /**
4
+ * Accessible name for one digit box.
5
+ *
6
+ * `position` is **1-based**: the first box is `1`, and the last is `length`.
7
+ * It is meant to be read aloud ("Digit 3 of 6"), so it counts the way a person
8
+ * would. Treating it as a 0-based index and adding one yields "Digit 2" for the
9
+ * first box.
10
+ *
11
+ * @param position 1-based position of the box, from `1` to `length`
12
+ * @default (position) => `Digit ${position}`
13
+ */
14
+ digitAriaLabel?: (position: number) => string;
4
15
  };
5
16
  export interface OtpInputProps extends Omit<React.ComponentPropsWithoutRef<"div">, "onChange" | "value" | "defaultValue"> {
6
17
  /** Number of digits */
@@ -19,7 +30,10 @@ export interface OtpInputProps extends Omit<React.ComponentPropsWithoutRef<"div"
19
30
  label?: React.ReactNode;
20
31
  /** Layout direction of label and field */
21
32
  layout?: "vertical" | "horizontal";
22
- /** Labels for internationalization */
33
+ /**
34
+ * Labels for internationalization. `digitAriaLabel(position)` names one digit
35
+ * box and receives a **1-based** position — the first box is `1`, not `0`.
36
+ */
23
37
  labels?: OtpInputLabels;
24
38
  /** Whether to render as a child element. */
25
39
  asChild?: boolean;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_kpg4k_22`,t=`_fullWidth_kpg4k_36`,n=`_danger_kpg4k_13`,r=`_sm_kpg4k_43`,i=`_item_kpg4k_46`,a=`_iconOnly_kpg4k_51`,o=`_icon_kpg4k_51`,s=`_md_kpg4k_61`,c=`_lg_kpg4k_79`,l=`_slider_kpg4k_97`,u=`_ready_kpg4k_111`,d=`_active_kpg4k_148`,f=`_label_kpg4k_155`,p={root:e,fullWidth:t,danger:n,sm:r,item:i,iconOnly:a,icon:o,md:s,lg:c,slider:l,ready:u,active:d,label:f};exports.active=d,exports.danger=n,exports.default=p,exports.fullWidth=t,exports.icon=o,exports.iconOnly=a,exports.item=i,exports.label=f,exports.lg=c,exports.md=s,exports.ready=u,exports.root=e,exports.slider=l,exports.sm=r;
2
+ var e=`_root_o619x_22`,t=`_fullWidth_o619x_37`,n=`_danger_o619x_13`,r=`_sm_o619x_44`,i=`_item_o619x_47`,a=`_iconOnly_o619x_52`,o=`_icon_o619x_52`,s=`_md_o619x_62`,c=`_lg_o619x_80`,l=`_slider_o619x_98`,u=`_ready_o619x_112`,d=`_active_o619x_149`,f=`_label_o619x_156`,p={root:e,fullWidth:t,danger:n,sm:r,item:i,iconOnly:a,icon:o,md:s,lg:c,slider:l,ready:u,active:d,label:f};exports.active=d,exports.danger=n,exports.default=p,exports.fullWidth=t,exports.icon=o,exports.iconOnly=a,exports.item=i,exports.label=f,exports.lg=c,exports.md=s,exports.ready=u,exports.root=e,exports.slider=l,exports.sm=r;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/form/SegmentedControl/segmented-control.module.scss
3
- var e = "_root_kpg4k_22", t = "_fullWidth_kpg4k_36", n = "_danger_kpg4k_13", r = "_sm_kpg4k_43", i = "_item_kpg4k_46", a = "_iconOnly_kpg4k_51", o = "_icon_kpg4k_51", s = "_md_kpg4k_61", c = "_lg_kpg4k_79", l = "_slider_kpg4k_97", u = "_ready_kpg4k_111", d = "_active_kpg4k_148", f = "_label_kpg4k_155", p = {
3
+ var e = "_root_o619x_22", t = "_fullWidth_o619x_37", n = "_danger_o619x_13", r = "_sm_o619x_44", i = "_item_o619x_47", a = "_iconOnly_o619x_52", o = "_icon_o619x_52", s = "_md_o619x_62", c = "_lg_o619x_80", l = "_slider_o619x_98", u = "_ready_o619x_112", d = "_active_o619x_149", f = "_label_o619x_156", p = {
4
4
  root: e,
5
5
  fullWidth: t,
6
6
  danger: n,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./icon.module.cjs"),n=require("../../../icon/registry.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=({name:e,component:r,size:o=`md`,color:s,spin:c,className:l,...u})=>{let d=r||(e?n.registeredIcons[e]:null);return d?(0,a.jsx)(d,{className:(0,i.default)(`wim-icon`,t.default.root,o&&t.default[`size-${o}`],s&&t.default[s],(c||e&&(e===`LoadingIcon`||e===`SpinnerIcon`))&&t.default.loading,l),...u}):(e&&n.warnUnregisteredIcon(e),null)};exports.Icon=o;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/style-utils.cjs"),n=require("./icon.module.cjs"),r=require("../../../icon/registry.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=[`danger`,`success`,`warning`,`info`,`primary`,`secondary`,`tertiary`,`disabled`],c=({name:e,component:i,size:c=`md`,color:l,spin:u,className:d,style:f,...p})=>{let m=i||(e?r.registeredIcons[e]:null);if(!m)return e&&r.warnUnregisteredIcon(e),null;let h=typeof l==`string`&&s.includes(l);return(0,o.jsx)(m,{style:!h&&l?{color:t.getColorValue(l),...f}:f,className:(0,a.default)(`wim-icon`,n.default.root,c&&n.default[`size-${c}`],h&&n.default[l],(u||e&&(e===`LoadingIcon`||e===`SpinnerIcon`))&&n.default.loading,d),...p})};exports.Icon=c;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ComponentSize } from '../../../types/tokens';
2
+ import { ComponentSize, WimColor } from '../../../types/tokens';
3
3
  import { IconName } from '../../../icon';
4
4
  type IconProps = Omit<React.SVGProps<SVGSVGElement>, "name"> & {
5
5
  /** Icon name. Requires `import "wimui/icons"` once at the app entry to register icons. */
@@ -10,8 +10,13 @@ type IconProps = Omit<React.SVGProps<SVGSVGElement>, "name"> & {
10
10
  size?: ComponentSize;
11
11
  /** Apply the loading rotation animation */
12
12
  spin?: boolean;
13
- /** Semantic color of the icon */
14
- color?: "danger" | "success" | "warning" | "info" | "primary" | "secondary" | "tertiary" | "disabled";
13
+ /**
14
+ * Colour of the icon. Takes the semantic names `"danger"`, `"success"`,
15
+ * `"warning"`, `"info"`, `"primary"`, `"secondary"`, `"tertiary"`,
16
+ * `"disabled"` — and, like `Text`, any design token colour name such as
17
+ * `"text-tertiary"`, or any CSS colour value.
18
+ */
19
+ color?: WimColor;
15
20
  };
16
- export declare const Icon: ({ name, component, size, color, spin, className, ...props }: IconProps) => React.JSX.Element | null;
21
+ export declare const Icon: ({ name, component, size, color, spin, className, style, ...props }: IconProps) => React.JSX.Element | null;
17
22
  export {};
@@ -1,16 +1,32 @@
1
1
  "use client";
2
- import e from "./icon.module.js";
3
- import { registeredIcons as t, warnUnregisteredIcon as n } from "../../../icon/registry.js";
2
+ import { getColorValue as e } from "../../../utilities/style-utils.js";
3
+ import t from "./icon.module.js";
4
+ import { registeredIcons as n, warnUnregisteredIcon as r } from "../../../icon/registry.js";
4
5
  import "react";
5
- import r from "classnames";
6
- import { jsx as i } from "react/jsx-runtime";
6
+ import i from "classnames";
7
+ import { jsx as a } from "react/jsx-runtime";
7
8
  //#region src/components/media/Icon/Icon.tsx
8
- var a = ({ name: a, component: o, size: s = "md", color: c, spin: l, className: u, ...d }) => {
9
- let f = o || (a ? t[a] : null);
10
- return f ? /* @__PURE__ */ i(f, {
11
- className: r("wim-icon", e.root, s && e[`size-${s}`], c && e[c], (l || a && (a === "LoadingIcon" || a === "SpinnerIcon")) && e.loading, u),
12
- ...d
13
- }) : (a && n(a), null);
9
+ var o = [
10
+ "danger",
11
+ "success",
12
+ "warning",
13
+ "info",
14
+ "primary",
15
+ "secondary",
16
+ "tertiary",
17
+ "disabled"
18
+ ], s = ({ name: s, component: c, size: l = "md", color: u, spin: d, className: f, style: p, ...m }) => {
19
+ let h = c || (s ? n[s] : null);
20
+ if (!h) return s && r(s), null;
21
+ let g = typeof u == "string" && o.includes(u);
22
+ return /* @__PURE__ */ a(h, {
23
+ style: !g && u ? {
24
+ color: e(u),
25
+ ...p
26
+ } : p,
27
+ className: i("wim-icon", t.root, l && t[`size-${l}`], g && t[u], (d || s && (s === "LoadingIcon" || s === "SpinnerIcon")) && t.loading, f),
28
+ ...m
29
+ });
14
30
  };
15
31
  //#endregion
16
- export { a as Icon };
32
+ export { s as Icon };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1ccaa_3`,t=`_danger_1ccaa_62`,n=`_success_1ccaa_65`,r=`_warning_1ccaa_68`,i=`_primary_1ccaa_71`,a=`_secondary_1ccaa_74`,o=`_tertiary_1ccaa_77`,s=`_disabled_1ccaa_80`,c=`_info_1ccaa_83`,l=`_loading_1ccaa_86`,u=`_rotate_1ccaa_1`,d={root:e,"size-xs":`_size-xs_1ccaa_35`,"size-sm":`_size-sm_1ccaa_38`,"size-md":`_size-md_1ccaa_41`,"size-lg":`_size-lg_1ccaa_44`,"size-xl":`_size-xl_1ccaa_47`,"size-2xl":`_size-2xl_1ccaa_50`,"size-3xl":`_size-3xl_1ccaa_53`,"size-4xl":`_size-4xl_1ccaa_56`,"size-5xl":`_size-5xl_1ccaa_59`,danger:t,success:n,warning:r,primary:i,secondary:a,tertiary:o,disabled:s,info:c,loading:l,rotate:u};exports.danger=t,exports.default=d,exports.disabled=s,exports.info=c,exports.loading=l,exports.primary=i,exports.root=e,exports.rotate=u,exports.secondary=a,exports.success=n,exports.tertiary=o,exports.warning=r;
2
+ var e=`_root_1kkcf_3`,t=`_danger_1kkcf_62`,n=`_success_1kkcf_65`,r=`_warning_1kkcf_68`,i=`_primary_1kkcf_71`,a=`_secondary_1kkcf_74`,o=`_tertiary_1kkcf_77`,s=`_disabled_1kkcf_80`,c=`_info_1kkcf_83`,l=`_loading_1kkcf_86`,u=`_rotate_1kkcf_1`,d={root:e,"size-xs":`_size-xs_1kkcf_35`,"size-sm":`_size-sm_1kkcf_38`,"size-md":`_size-md_1kkcf_41`,"size-lg":`_size-lg_1kkcf_44`,"size-xl":`_size-xl_1kkcf_47`,"size-2xl":`_size-2xl_1kkcf_50`,"size-3xl":`_size-3xl_1kkcf_53`,"size-4xl":`_size-4xl_1kkcf_56`,"size-5xl":`_size-5xl_1kkcf_59`,danger:t,success:n,warning:r,primary:i,secondary:a,tertiary:o,disabled:s,info:c,loading:l,rotate:u};exports.danger=t,exports.default=d,exports.disabled=s,exports.info=c,exports.loading=l,exports.primary=i,exports.root=e,exports.rotate=u,exports.secondary=a,exports.success=n,exports.tertiary=o,exports.warning=r;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  //#region src/components/media/Icon/icon.module.scss
3
- var e = "_root_1ccaa_3", t = "_danger_1ccaa_62", n = "_success_1ccaa_65", r = "_warning_1ccaa_68", i = "_primary_1ccaa_71", a = "_secondary_1ccaa_74", o = "_tertiary_1ccaa_77", s = "_disabled_1ccaa_80", c = "_info_1ccaa_83", l = "_loading_1ccaa_86", u = "_rotate_1ccaa_1", d = {
3
+ var e = "_root_1kkcf_3", t = "_danger_1kkcf_62", n = "_success_1kkcf_65", r = "_warning_1kkcf_68", i = "_primary_1kkcf_71", a = "_secondary_1kkcf_74", o = "_tertiary_1kkcf_77", s = "_disabled_1kkcf_80", c = "_info_1kkcf_83", l = "_loading_1kkcf_86", u = "_rotate_1kkcf_1", d = {
4
4
  root: e,
5
- "size-xs": "_size-xs_1ccaa_35",
6
- "size-sm": "_size-sm_1ccaa_38",
7
- "size-md": "_size-md_1ccaa_41",
8
- "size-lg": "_size-lg_1ccaa_44",
9
- "size-xl": "_size-xl_1ccaa_47",
10
- "size-2xl": "_size-2xl_1ccaa_50",
11
- "size-3xl": "_size-3xl_1ccaa_53",
12
- "size-4xl": "_size-4xl_1ccaa_56",
13
- "size-5xl": "_size-5xl_1ccaa_59",
5
+ "size-xs": "_size-xs_1kkcf_35",
6
+ "size-sm": "_size-sm_1kkcf_38",
7
+ "size-md": "_size-md_1kkcf_41",
8
+ "size-lg": "_size-lg_1kkcf_44",
9
+ "size-xl": "_size-xl_1kkcf_47",
10
+ "size-2xl": "_size-2xl_1kkcf_50",
11
+ "size-3xl": "_size-3xl_1kkcf_53",
12
+ "size-4xl": "_size-4xl_1kkcf_56",
13
+ "size-5xl": "_size-5xl_1kkcf_59",
14
14
  danger: t,
15
15
  success: n,
16
16
  warning: r,
@@ -4,4 +4,4 @@ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i
4
4
  ${e.g-t.g} 0 0 0 ${t.g}
5
5
  ${e.b-t.b} 0 0 0 ${t.b}
6
6
  0 0 0 1 0
7
- `},[T]),Q={width:`100%`,height:f||`auto`,objectFit:g,...I},$=p===`none`?null:i.default[`radius${p.charAt(0).toUpperCase()+p.slice(1)}`];return(0,s.jsxs)(`figure`,{ref:B,className:(0,o.default)(`wim-image`,i.default.root,F),"data-testid":`image-root`,style:{maxWidth:d||`100%`,width:`100%`,...X,...G},onMouseMove:J,onMouseLeave:Y,children:[T&&(0,s.jsx)(`svg`,{style:{position:`absolute`,width:0,height:0},children:(0,s.jsx)(`filter`,{id:q,colorInterpolationFilters:`sRGB`,children:(0,s.jsx)(`feColorMatrix`,{type:`matrix`,values:Z||``})})}),(0,s.jsxs)(`div`,{className:(0,o.default)(i.default.inner,$,m&&i.default.shadow,h&&i.default.border,(x||S)&&i.default.hasBackdrop,w&&w!==`none`&&i.default.hasNoise,E&&i.default.hasOverlay,D&&i.default.zoomable,k&&i.default.fadeIn,k&&V&&i.default.isLoaded,W&&k&&i.default.loading),style:f===void 0?void 0:{height:f},"data-testid":`image-inner`,children:[H&&!R&&(0,s.jsx)(`img`,{src:e,alt:c,onLoad:U,onError:()=>z(!0),className:(0,o.default)(i.default.image,(y||b||T)&&i.default.hasFilter),style:Q,loading:_,fetchPriority:N?`high`:void 0,"data-testid":`image-element`,...L}),R&&(0,s.jsx)(`div`,{className:i.default.fallback,"data-testid":`image-fallback`,children:P||(0,s.jsxs)(`div`,{className:i.default.defaultFallback,children:[(0,s.jsx)(n.Icon,{component:t.default,size:`lg`,color:`secondary`}),c&&(0,s.jsx)(`span`,{className:i.default.fallbackText,children:c})]})})]}),v&&(0,s.jsx)(`figcaption`,{className:i.default.caption,"data-testid":`image-caption`,children:v})]})};exports.Image=d;
7
+ `},[T]),Q={width:`100%`,height:f||`auto`,objectFit:g,...I},$=p===`none`?null:i.default[`radius${p.charAt(0).toUpperCase()+p.slice(1)}`];return(0,s.jsxs)(`figure`,{ref:B,className:(0,o.default)(`wim-image`,i.default.root,F),"data-testid":`image-root`,style:{maxWidth:d||`100%`,width:`100%`,...X,...G},onMouseMove:J,onMouseLeave:Y,children:[T&&(0,s.jsx)(`svg`,{style:{position:`absolute`,width:0,height:0},children:(0,s.jsx)(`filter`,{id:q,colorInterpolationFilters:`sRGB`,children:(0,s.jsx)(`feColorMatrix`,{type:`matrix`,values:Z||``})})}),(0,s.jsxs)(`div`,{className:(0,o.default)(i.default.inner,$,m&&i.default.shadow,h&&i.default.border,(x||S)&&i.default.hasBackdrop,w&&w!==`none`&&i.default.hasNoise,E&&i.default.hasOverlay,D&&i.default.zoomable,k&&i.default.fadeIn,k&&V&&i.default.isLoaded,W&&k&&i.default.loading),style:f===void 0?void 0:{height:f},"data-testid":`image-inner`,children:[H&&!R&&(0,s.jsx)(`img`,{src:e,alt:c,onLoad:U,onError:()=>z(!0),className:(0,o.default)(i.default.image,(y||b||T)&&i.default.hasFilter),style:Q,loading:_,fetchPriority:N?`high`:void 0,"data-testid":`image-element`,...L}),R&&(0,s.jsx)(`div`,{className:i.default.fallback,"data-testid":`image-fallback`,children:P||(0,s.jsxs)(`div`,{className:i.default.defaultFallback,children:[(0,s.jsx)(n.Icon,{component:t.default,size:`lg`,color:`tertiary`}),c&&(0,s.jsx)(`span`,{className:i.default.fallbackText,children:c})]})})]}),v&&(0,s.jsx)(`figcaption`,{className:i.default.caption,"data-testid":`image-caption`,children:v})]})};exports.Image=d;
@@ -210,7 +210,7 @@ var c = (e, t) => {
210
210
  children: [/* @__PURE__ */ o(t, {
211
211
  component: e,
212
212
  size: "lg",
213
- color: "secondary"
213
+ color: "tertiary"
214
214
  }), d && /* @__PURE__ */ o("span", {
215
215
  className: r.fallbackText,
216
216
  children: d
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_3r8s2_2`,t=`_inline_3r8s2_8`,n=`_block_3r8s2_13`,r={root:e,inline:t,block:n};exports.block=n,exports.default=r,exports.inline=t,exports.root=e;
2
+ var e=`_root_1qdym_2`,t=`_inline_1qdym_8`,n=`_block_1qdym_16`,r={root:e,inline:t,block:n};exports.block=n,exports.default=r,exports.inline=t,exports.root=e;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/typography/Code/code.module.scss
3
- var e = "_root_3r8s2_2", t = "_inline_3r8s2_8", n = "_block_3r8s2_13", r = {
3
+ var e = "_root_1qdym_2", t = "_inline_1qdym_8", n = "_block_1qdym_16", r = {
4
4
  root: e,
5
5
  inline: t,
6
6
  block: n
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/style-utils.cjs"),r=require("./text.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=i.default.forwardRef(({asChild:e=!1,size:i=`md`,content:s,color:c,weight:l=`normal`,lineHeight:u,fontStyle:d=`normal`,decoration:f=`none`,className:p,style:m,children:h,...g},_)=>{let v=e?h:s??h,y=!e&&f!==`none`?(0,o.jsx)(`span`,{className:r.default[f],children:(0,o.jsx)(t.Slottable,{children:v})}):(0,o.jsx)(t.Slottable,{children:v}),b=typeof c==`string`&&[`danger`,`primary`,`success`,`warning`,`info`,`secondary`].includes(c);return(0,o.jsx)(e?t.Root:`p`,{ref:_,className:(0,a.default)(`wim-text`,r.default.root,r.default[i],l===`bold`&&r.default.bold,d===`italic`&&r.default.italic,b&&r.default[c],e&&f!==`none`&&r.default[f],p),style:{color:b?void 0:n.getColorValue(c),fontSize:n.getFontSizeValue(i),lineHeight:n.getLineHeightValue(u),fontWeight:n.getFontWeightValue(l),...m},...g,children:y})});s.displayName=`Text`,exports.Text=s;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/style-utils.cjs"),r=require("./text.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=i.default.forwardRef(({asChild:e=!1,size:i=`md`,content:s,color:c,weight:l=`normal`,lineHeight:u,fontStyle:d=`normal`,decoration:f=`none`,nowrap:p=!1,truncate:m=!1,className:h,style:g,children:_,...v},y)=>{let b=e?_:s??_,x=!e&&f!==`none`?(0,o.jsx)(`span`,{className:r.default[f],children:(0,o.jsx)(t.Slottable,{children:b})}):(0,o.jsx)(t.Slottable,{children:b}),S=typeof c==`string`&&[`danger`,`primary`,`success`,`warning`,`info`,`secondary`].includes(c);return(0,o.jsx)(e?t.Root:`p`,{ref:y,className:(0,a.default)(`wim-text`,r.default.root,r.default[i],l===`bold`&&r.default.bold,d===`italic`&&r.default.italic,S&&r.default[c],e&&f!==`none`&&r.default[f],(p||m)&&r.default.nowrap,m&&r.default.truncate,h),style:{color:S?void 0:n.getColorValue(c),fontSize:n.getFontSizeValue(i),lineHeight:n.getLineHeightValue(u),fontWeight:n.getFontWeightValue(l),...g},...v,children:x})});s.displayName=`Text`,exports.Text=s;
@@ -33,6 +33,18 @@ export type TextProps = Omit<React.ComponentPropsWithoutRef<"p">, "content"> & {
33
33
  * @default "none"
34
34
  */
35
35
  decoration?: "line-through" | "underline" | "highlight" | "none";
36
+ /**
37
+ * Keep the text on one line instead of wrapping. Overflow is left visible —
38
+ * use `truncate` to clip it with an ellipsis.
39
+ * @default false
40
+ */
41
+ nowrap?: boolean;
42
+ /**
43
+ * Keep the text on one line and clip the overflow with an ellipsis.
44
+ * Implies `nowrap`.
45
+ * @default false
46
+ */
47
+ truncate?: boolean;
36
48
  /**
37
49
  * Content of the text. Alternative to children (children take precedence only with asChild).
38
50
  */
@@ -71,6 +83,18 @@ export declare const Text: React.ForwardRefExoticComponent<Omit<Omit<React.Detai
71
83
  * @default "none"
72
84
  */
73
85
  decoration?: "line-through" | "underline" | "highlight" | "none";
86
+ /**
87
+ * Keep the text on one line instead of wrapping. Overflow is left visible —
88
+ * use `truncate` to clip it with an ellipsis.
89
+ * @default false
90
+ */
91
+ nowrap?: boolean;
92
+ /**
93
+ * Keep the text on one line and clip the overflow with an ellipsis.
94
+ * Implies `nowrap`.
95
+ * @default false
96
+ */
97
+ truncate?: boolean;
74
98
  /**
75
99
  * Content of the text. Alternative to children (children take precedence only with asChild).
76
100
  */