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.
- package/dist/components/_internal/FieldLabelContent.cjs +1 -1
- package/dist/components/_internal/FieldLabelContent.js +1 -0
- package/dist/components/data-display/Card/Card.cjs +1 -1
- package/dist/components/data-display/Card/Card.js +30 -25
- package/dist/components/data-display/Card/styled-values.cjs +2 -0
- package/dist/components/data-display/Card/styled-values.d.ts +18 -0
- package/dist/components/data-display/Card/styled-values.js +21 -0
- package/dist/components/feedback/Alert/Alert.cjs +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +11 -4
- package/dist/components/feedback/Alert/Alert.js +1 -1
- package/dist/components/feedback/Result/Result.cjs +1 -1
- package/dist/components/feedback/Result/Result.js +2 -2
- package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
- package/dist/components/form/Dropzone/Dropzone.d.ts +10 -1
- package/dist/components/form/Dropzone/Dropzone.js +40 -40
- package/dist/components/form/Fieldset/Fieldset.cjs +1 -1
- package/dist/components/form/Fieldset/Fieldset.d.ts +9 -2
- package/dist/components/form/Fieldset/Fieldset.js +1 -1
- package/dist/components/form/Fieldset/fieldset.module.cjs +1 -1
- package/dist/components/form/Fieldset/fieldset.module.js +4 -3
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.d.ts +10 -1
- package/dist/components/form/FileUpload/FileUpload.js +27 -27
- package/dist/components/form/Input/Input.cjs +1 -1
- package/dist/components/form/Input/Input.d.ts +6 -0
- package/dist/components/form/Input/Input.js +65 -63
- package/dist/components/form/InputBase/InputBase.cjs +1 -1
- package/dist/components/form/InputBase/InputBase.d.ts +9 -1
- package/dist/components/form/InputBase/InputBase.js +31 -25
- package/dist/components/form/InputBase/input-base.module.cjs +1 -1
- package/dist/components/form/InputBase/input-base.module.js +9 -7
- package/dist/components/form/OtpInput/OtpInput.d.ts +16 -2
- package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
- package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
- package/dist/components/media/Icon/Icon.cjs +1 -1
- package/dist/components/media/Icon/Icon.d.ts +9 -4
- package/dist/components/media/Icon/Icon.js +27 -11
- package/dist/components/media/Icon/icon.module.cjs +1 -1
- package/dist/components/media/Icon/icon.module.js +10 -10
- package/dist/components/media/Image/Image.cjs +1 -1
- package/dist/components/media/Image/Image.js +1 -1
- package/dist/components/typography/Code/code.module.cjs +1 -1
- package/dist/components/typography/Code/code.module.js +1 -1
- package/dist/components/typography/Text/Text.cjs +1 -1
- package/dist/components/typography/Text/Text.d.ts +24 -0
- package/dist/components/typography/Text/Text.js +10 -10
- package/dist/components/typography/Text/text.module.cjs +1 -1
- package/dist/components/typography/Text/text.module.js +12 -10
- package/dist/llms-full.txt +68 -6
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/warn-unstyled-value.cjs +2 -0
- package/dist/utilities/warn-unstyled-value.d.ts +17 -0
- package/dist/utilities/warn-unstyled-value.js +4 -0
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- 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
|
|
4
|
-
import { useMergedRef as
|
|
5
|
-
import { InputBase as
|
|
6
|
-
import { FieldTemplate as
|
|
7
|
-
import
|
|
8
|
-
import { forwardRef as
|
|
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 =
|
|
13
|
-
let { t:
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
let e =
|
|
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 }))) : (
|
|
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
|
-
}))),
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
name:
|
|
28
|
-
onClick: (e) =>
|
|
29
|
-
ariaLabel:
|
|
30
|
-
}),
|
|
31
|
-
name:
|
|
32
|
-
onClick:
|
|
33
|
-
color:
|
|
34
|
-
ariaLabel:
|
|
35
|
-
className:
|
|
36
|
-
rotated:
|
|
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
|
|
39
|
-
return /* @__PURE__ */ d(
|
|
40
|
-
label:
|
|
41
|
-
error:
|
|
42
|
-
required:
|
|
43
|
-
layout:
|
|
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:
|
|
46
|
-
errorId:
|
|
47
|
-
className:
|
|
48
|
-
children: /* @__PURE__ */ d(
|
|
49
|
-
intent:
|
|
45
|
+
htmlFor: X,
|
|
46
|
+
errorId: Z,
|
|
47
|
+
className: m,
|
|
48
|
+
children: /* @__PURE__ */ d(i, {
|
|
49
|
+
intent: J,
|
|
50
50
|
variant: f,
|
|
51
|
-
fullWidth:
|
|
52
|
-
width:
|
|
53
|
-
disabled:
|
|
54
|
-
leftIcon:
|
|
55
|
-
leftIconColor:
|
|
56
|
-
onLeftIconClick:
|
|
57
|
-
rightIcons:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"aria-
|
|
73
|
-
"aria-
|
|
74
|
-
|
|
75
|
-
|
|
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:_=[],
|
|
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 = [],
|
|
10
|
-
let { t:
|
|
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),
|
|
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,
|
|
19
|
-
}) : e),
|
|
20
|
-
|
|
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(),
|
|
23
|
+
e.stopPropagation(), C?.();
|
|
24
24
|
},
|
|
25
|
-
ariaLabel:
|
|
25
|
+
ariaLabel: O
|
|
26
26
|
});
|
|
27
|
-
let
|
|
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,
|
|
30
|
-
style:
|
|
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,
|
|
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,
|
|
38
|
-
"aria-label":
|
|
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:
|
|
42
|
+
color: N(h)
|
|
43
43
|
})
|
|
44
44
|
}) : /* @__PURE__ */ a(t, {
|
|
45
45
|
name: m,
|
|
46
46
|
size: "md",
|
|
47
|
-
color:
|
|
47
|
+
color: N(h)
|
|
48
48
|
})
|
|
49
49
|
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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,
|
|
59
|
-
"aria-label": e.ariaLabel ??
|
|
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:
|
|
69
|
+
color: N(e.color)
|
|
64
70
|
})
|
|
65
71
|
}) : /* @__PURE__ */ a(t, {
|
|
66
72
|
name: e.name,
|
|
67
73
|
size: "md",
|
|
68
|
-
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=`
|
|
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 = "
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
/**
|
|
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=`
|
|
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 = "
|
|
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"),
|
|
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
|
-
/**
|
|
14
|
-
|
|
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 "
|
|
3
|
-
import
|
|
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
|
|
6
|
-
import { jsx as
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 {
|
|
32
|
+
export { s as Icon };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
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 = "
|
|
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-
|
|
6
|
-
"size-sm": "_size-
|
|
7
|
-
"size-md": "_size-
|
|
8
|
-
"size-lg": "_size-
|
|
9
|
-
"size-xl": "_size-
|
|
10
|
-
"size-2xl": "_size-
|
|
11
|
-
"size-3xl": "_size-
|
|
12
|
-
"size-4xl": "_size-
|
|
13
|
-
"size-5xl": "_size-
|
|
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:`
|
|
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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var 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,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`,
|
|
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
|
*/
|