@bitrise/bitkit-v2 0.3.318 → 0.3.319
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/BitkitTextArea/BitkitTextArea.d.ts +2 -1
- package/dist/components/BitkitTextArea/BitkitTextArea.js +34 -9
- package/dist/components/BitkitTextArea/BitkitTextArea.js.map +1 -1
- package/dist/theme/common/InputAndTextarea.common.d.ts +10 -0
- package/dist/theme/common/InputAndTextarea.common.js +15 -5
- package/dist/theme/common/InputAndTextarea.common.js.map +1 -1
- package/dist/theme/recipes/Textarea.recipe.d.ts +15 -0
- package/dist/theme/recipes/Textarea.recipe.js +32 -4
- package/dist/theme/recipes/Textarea.recipe.js.map +1 -1
- package/dist/theme/recipes/index.d.ts +3 -0
- package/dist/theme/recipes/index.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@ import { BitkitFieldProps } from '../BitkitField/BitkitField';
|
|
|
3
3
|
export interface BitkitTextAreaProps extends Omit<BitkitFieldProps, 'children' | 'state'> {
|
|
4
4
|
autoresize?: boolean;
|
|
5
5
|
placeholder?: string;
|
|
6
|
-
resize?: 'none' | '
|
|
6
|
+
resize?: 'none' | 'vertical';
|
|
7
|
+
rows?: number;
|
|
7
8
|
size?: 'md' | 'lg';
|
|
8
9
|
state?: 'disabled' | 'error' | 'readOnly' | 'warning';
|
|
9
10
|
textareaProps?: TextareaProps;
|
|
@@ -1,20 +1,45 @@
|
|
|
1
|
+
import IconErrorCircleFilled from "../../icons/IconErrorCircleFilled.js";
|
|
2
|
+
import IconWarningYellow from "../../icons/IconWarningYellow.js";
|
|
1
3
|
import BitkitField from "../BitkitField/BitkitField.js";
|
|
4
|
+
import { textareaStatusIcon } from "../../theme/recipes/Textarea.recipe.js";
|
|
5
|
+
import { Box } from "@chakra-ui/react/box";
|
|
2
6
|
import { forwardRef } from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
8
|
import { Textarea } from "@chakra-ui/react/textarea";
|
|
5
9
|
//#region lib/components/BitkitTextArea/BitkitTextArea.tsx
|
|
6
10
|
var BitkitTextArea = forwardRef((props, ref) => {
|
|
7
|
-
const { autoresize, placeholder, resize, size, state, textareaProps, ...fieldProps } = props;
|
|
11
|
+
const { autoresize, placeholder, resize, rows = 3, size = "lg", state, textareaProps, ...fieldProps } = props;
|
|
12
|
+
const isInvalid = state === "error" || !!fieldProps.errorText;
|
|
13
|
+
const hasWarning = state === "warning" || !!fieldProps.warningText;
|
|
14
|
+
const iconSize = size === "md" ? "16" : "24";
|
|
15
|
+
const { paddingInlineEnd, ...iconInset } = textareaStatusIcon[size];
|
|
16
|
+
const statusIcon = isInvalid ? /* @__PURE__ */ jsx(IconErrorCircleFilled, {
|
|
17
|
+
color: "icon/negative",
|
|
18
|
+
position: "absolute",
|
|
19
|
+
size: iconSize,
|
|
20
|
+
...iconInset
|
|
21
|
+
}) : hasWarning ? /* @__PURE__ */ jsx(IconWarningYellow, {
|
|
22
|
+
position: "absolute",
|
|
23
|
+
size: iconSize,
|
|
24
|
+
...iconInset
|
|
25
|
+
}) : null;
|
|
26
|
+
const { css: consumerCss, ...restTextareaProps } = textareaProps ?? {};
|
|
27
|
+
const textareaCss = statusIcon != null ? [{ paddingInlineEnd }, consumerCss] : consumerCss;
|
|
8
28
|
return /* @__PURE__ */ jsx(BitkitField, {
|
|
9
29
|
state,
|
|
10
30
|
...fieldProps,
|
|
11
|
-
children: /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
children: /* @__PURE__ */ jsxs(Box, {
|
|
32
|
+
position: "relative",
|
|
33
|
+
children: [/* @__PURE__ */ jsx(Textarea, {
|
|
34
|
+
ref,
|
|
35
|
+
autoresize,
|
|
36
|
+
css: textareaCss,
|
|
37
|
+
placeholder,
|
|
38
|
+
resize,
|
|
39
|
+
rows,
|
|
40
|
+
size,
|
|
41
|
+
...restTextareaProps
|
|
42
|
+
}), statusIcon]
|
|
18
43
|
})
|
|
19
44
|
});
|
|
20
45
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTextArea.js","names":[],"sources":["../../../lib/components/BitkitTextArea/BitkitTextArea.tsx"],"sourcesContent":["import { Textarea, type TextareaProps } from '@chakra-ui/react/textarea';\nimport { forwardRef } from 'react';\n\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\n\nexport interface BitkitTextAreaProps extends Omit<BitkitFieldProps, 'children' | 'state'> {\n autoresize?: boolean;\n placeholder?: string;\n resize?: 'none' | '
|
|
1
|
+
{"version":3,"file":"BitkitTextArea.js","names":[],"sources":["../../../lib/components/BitkitTextArea/BitkitTextArea.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Textarea, type TextareaProps } from '@chakra-ui/react/textarea';\nimport { forwardRef } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport { textareaStatusIcon } from '../../theme/recipes/Textarea.recipe';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\n\nexport interface BitkitTextAreaProps extends Omit<BitkitFieldProps, 'children' | 'state'> {\n autoresize?: boolean;\n placeholder?: string;\n resize?: 'none' | 'vertical';\n rows?: number;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n textareaProps?: TextareaProps;\n}\n\nconst BitkitTextArea = forwardRef<HTMLTextAreaElement, BitkitTextAreaProps>((props, ref) => {\n const { autoresize, placeholder, resize, rows = 3, size = 'lg', state, textareaProps, ...fieldProps } = props;\n\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n const hasWarning = state === 'warning' || !!fieldProps.warningText;\n const iconSize = size === 'md' ? '16' : '24';\n\n const { paddingInlineEnd, ...iconInset } = textareaStatusIcon[size];\n const statusIcon = isInvalid ? (\n <IconErrorCircleFilled color=\"icon/negative\" position=\"absolute\" size={iconSize} {...iconInset} />\n ) : hasWarning ? (\n <IconWarningYellow position=\"absolute\" size={iconSize} {...iconInset} />\n ) : null;\n\n const { css: consumerCss, ...restTextareaProps } = textareaProps ?? {};\n const textareaCss = statusIcon != null ? [{ paddingInlineEnd }, consumerCss] : consumerCss;\n\n return (\n <BitkitField state={state} {...fieldProps}>\n <Box position=\"relative\">\n <Textarea\n ref={ref}\n autoresize={autoresize}\n css={textareaCss}\n placeholder={placeholder}\n resize={resize}\n rows={rows}\n size={size}\n {...restTextareaProps}\n />\n {statusIcon}\n </Box>\n </BitkitField>\n );\n});\n\nBitkitTextArea.displayName = 'BitkitTextArea';\n\nexport default BitkitTextArea;\n"],"mappings":";;;;;;;;;AAkBA,IAAM,iBAAiB,YAAsD,OAAO,QAAQ;CAC1F,MAAM,EAAE,YAAY,aAAa,QAAQ,OAAO,GAAG,OAAO,MAAM,OAAO,eAAe,GAAG,eAAe;CAExG,MAAM,YAAY,UAAU,WAAW,CAAC,CAAC,WAAW;CACpD,MAAM,aAAa,UAAU,aAAa,CAAC,CAAC,WAAW;CACvD,MAAM,WAAW,SAAS,OAAO,OAAO;CAExC,MAAM,EAAE,kBAAkB,GAAG,cAAc,mBAAmB;CAC9D,MAAM,aAAa,YACjB,oBAAC,uBAAD;EAAuB,OAAM;EAAgB,UAAS;EAAW,MAAM;EAAU,GAAI;CAAY,CAAA,IAC/F,aACF,oBAAC,mBAAD;EAAmB,UAAS;EAAW,MAAM;EAAU,GAAI;CAAY,CAAA,IACrE;CAEJ,MAAM,EAAE,KAAK,aAAa,GAAG,sBAAsB,iBAAiB,CAAC;CACrE,MAAM,cAAc,cAAc,OAAO,CAAC,EAAE,iBAAiB,GAAG,WAAW,IAAI;CAE/E,OACE,oBAAC,aAAD;EAAoB;EAAO,GAAI;YAC7B,qBAAC,KAAD;GAAK,UAAS;aAAd,CACE,oBAAC,UAAD;IACO;IACO;IACZ,KAAK;IACQ;IACL;IACF;IACA;IACN,GAAI;GACL,CAAA,GACA,UACE;;CACM,CAAA;AAEjB,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -85,6 +85,16 @@ export declare const base: {
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
+
export declare const sizePadding: {
|
|
89
|
+
readonly md: {
|
|
90
|
+
readonly inline: 11;
|
|
91
|
+
readonly block: 7;
|
|
92
|
+
};
|
|
93
|
+
readonly lg: {
|
|
94
|
+
readonly inline: 15;
|
|
95
|
+
readonly block: 11;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
88
98
|
export declare const variants: {
|
|
89
99
|
size: {
|
|
90
100
|
md: {
|
|
@@ -42,16 +42,26 @@ var base = {
|
|
|
42
42
|
...text._disabled
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
var sizePadding = {
|
|
46
|
+
md: {
|
|
47
|
+
inline: 11,
|
|
48
|
+
block: 7
|
|
49
|
+
},
|
|
50
|
+
lg: {
|
|
51
|
+
inline: 15,
|
|
52
|
+
block: 11
|
|
53
|
+
}
|
|
54
|
+
};
|
|
45
55
|
var variants = { size: {
|
|
46
56
|
md: {
|
|
47
|
-
paddingInline: rem(
|
|
48
|
-
paddingBlock: rem(
|
|
57
|
+
paddingInline: rem(sizePadding.md.inline),
|
|
58
|
+
paddingBlock: rem(sizePadding.md.block),
|
|
49
59
|
textStyle: "body/md/regular",
|
|
50
60
|
"--input-height": rem(40)
|
|
51
61
|
},
|
|
52
62
|
lg: {
|
|
53
|
-
paddingInline: rem(
|
|
54
|
-
paddingBlock: rem(
|
|
63
|
+
paddingInline: rem(sizePadding.lg.inline),
|
|
64
|
+
paddingBlock: rem(sizePadding.lg.block),
|
|
55
65
|
textStyle: "body/lg/regular",
|
|
56
66
|
"--input-height": rem(48)
|
|
57
67
|
}
|
|
@@ -65,6 +75,6 @@ var defaultVariants = { size: "lg" };
|
|
|
65
75
|
*/
|
|
66
76
|
var singleLineInputOverrides = { lineHeight: "normal" };
|
|
67
77
|
//#endregion
|
|
68
|
-
export { base, defaultVariants, frame, singleLineInputOverrides, text, variants };
|
|
78
|
+
export { base, defaultVariants, frame, singleLineInputOverrides, sizePadding, text, variants };
|
|
69
79
|
|
|
70
80
|
//# sourceMappingURL=InputAndTextarea.common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputAndTextarea.common.js","names":[],"sources":["../../../lib/theme/common/InputAndTextarea.common.ts"],"sourcesContent":["import { type SystemStyleObject } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nexport const frame = {\n background: 'background/primary',\n borderColor: 'border/regular',\n borderRadius: '4',\n borderWidth: '1',\n boxShadow: 'inset/field',\n transition: 'border 200ms',\n _hover: {\n borderColor: 'border/hover',\n },\n _invalid: {\n borderColor: 'border/error',\n _hover: {\n borderColor: 'border/error',\n },\n },\n _readOnly: {\n background: 'background/disabled',\n _hover: {\n borderColor: 'border/regular',\n },\n },\n _disabled: {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n cursor: 'not-allowed',\n _hover: {\n borderColor: 'border/disabled',\n },\n },\n} satisfies SystemStyleObject;\n\nexport const text = {\n appearance: 'none',\n color: 'input/text/inputValue',\n textStyle: 'body/lg/regular',\n _placeholder: {\n color: 'input/text/placeholder',\n },\n _disabled: {\n color: 'text/disabled',\n _placeholder: {\n color: 'text/disabled',\n },\n },\n} satisfies SystemStyleObject;\n\nexport const base = {\n ...frame,\n ...text,\n width: '100%',\n _disabled: {\n ...frame._disabled,\n ...text._disabled,\n },\n} satisfies SystemStyleObject;\n\nexport const variants = {\n size: {\n md: {\n paddingInline: rem(
|
|
1
|
+
{"version":3,"file":"InputAndTextarea.common.js","names":[],"sources":["../../../lib/theme/common/InputAndTextarea.common.ts"],"sourcesContent":["import { type SystemStyleObject } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nexport const frame = {\n background: 'background/primary',\n borderColor: 'border/regular',\n borderRadius: '4',\n borderWidth: '1',\n boxShadow: 'inset/field',\n transition: 'border 200ms',\n _hover: {\n borderColor: 'border/hover',\n },\n _invalid: {\n borderColor: 'border/error',\n _hover: {\n borderColor: 'border/error',\n },\n },\n _readOnly: {\n background: 'background/disabled',\n _hover: {\n borderColor: 'border/regular',\n },\n },\n _disabled: {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n cursor: 'not-allowed',\n _hover: {\n borderColor: 'border/disabled',\n },\n },\n} satisfies SystemStyleObject;\n\nexport const text = {\n appearance: 'none',\n color: 'input/text/inputValue',\n textStyle: 'body/lg/regular',\n _placeholder: {\n color: 'input/text/placeholder',\n },\n _disabled: {\n color: 'text/disabled',\n _placeholder: {\n color: 'text/disabled',\n },\n },\n} satisfies SystemStyleObject;\n\nexport const base = {\n ...frame,\n ...text,\n width: '100%',\n _disabled: {\n ...frame._disabled,\n ...text._disabled,\n },\n} satisfies SystemStyleObject;\n\n// Text padding per size, in px. Single source of truth: the `variants` below derive their\n// paddingInline/paddingBlock from these, and the textarea recipe reuses them to align the\n// status icon with the text (see Textarea.recipe.ts).\nexport const sizePadding = {\n md: { inline: 11, block: 7 },\n lg: { inline: 15, block: 11 },\n} as const;\n\nexport const variants = {\n size: {\n md: {\n paddingInline: rem(sizePadding.md.inline),\n paddingBlock: rem(sizePadding.md.block),\n textStyle: 'body/md/regular',\n '--input-height': rem(40),\n },\n lg: {\n paddingInline: rem(sizePadding.lg.inline),\n paddingBlock: rem(sizePadding.lg.block),\n textStyle: 'body/lg/regular',\n '--input-height': rem(48),\n },\n },\n} satisfies Record<'size', Record<'md' | 'lg', SystemStyleObject>>;\n\nexport const defaultVariants: Record<'size', 'md' | 'lg'> = {\n size: 'lg',\n};\n\n/**\n * Additional styles for single-line `<input>` elements to opt out of the textStyle's explicit\n * line-height. With this override the caret follows the font's natural metrics (~font-size ×\n * 1.15) instead of the 20/24px line-height, so it no longer visually extends past sibling icons\n * in input groups. Textarea should NOT use this — multi-line text needs the textStyle line-height.\n */\nexport const singleLineInputOverrides = {\n lineHeight: 'normal',\n} satisfies SystemStyleObject;\n"],"mappings":";;AAIA,IAAa,QAAQ;CACnB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,QAAQ,EACN,aAAa,eACf;CACA,UAAU;EACR,aAAa;EACb,QAAQ,EACN,aAAa,eACf;CACF;CACA,WAAW;EACT,YAAY;EACZ,QAAQ,EACN,aAAa,iBACf;CACF;CACA,WAAW;EACT,YAAY;EACZ,aAAa;EACb,QAAQ;EACR,QAAQ,EACN,aAAa,kBACf;CACF;AACF;AAEA,IAAa,OAAO;CAClB,YAAY;CACZ,OAAO;CACP,WAAW;CACX,cAAc,EACZ,OAAO,yBACT;CACA,WAAW;EACT,OAAO;EACP,cAAc,EACZ,OAAO,gBACT;CACF;AACF;AAEA,IAAa,OAAO;CAClB,GAAG;CACH,GAAG;CACH,OAAO;CACP,WAAW;EACT,GAAG,MAAM;EACT,GAAG,KAAK;CACV;AACF;AAKA,IAAa,cAAc;CACzB,IAAI;EAAE,QAAQ;EAAI,OAAO;CAAE;CAC3B,IAAI;EAAE,QAAQ;EAAI,OAAO;CAAG;AAC9B;AAEA,IAAa,WAAW,EACtB,MAAM;CACJ,IAAI;EACF,eAAe,IAAI,YAAY,GAAG,MAAM;EACxC,cAAc,IAAI,YAAY,GAAG,KAAK;EACtC,WAAW;EACX,kBAAkB,IAAI,EAAE;CAC1B;CACA,IAAI;EACF,eAAe,IAAI,YAAY,GAAG,MAAM;EACxC,cAAc,IAAI,YAAY,GAAG,KAAK;EACtC,WAAW;EACX,kBAAkB,IAAI,EAAE;CAC1B;AACF,EACF;AAEA,IAAa,kBAA+C,EAC1D,MAAM,KACR;;;;;;;AAQA,IAAa,2BAA2B,EACtC,YAAY,SACd"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
declare const textareaRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
2
2
|
size: {
|
|
3
3
|
md: {
|
|
4
|
+
'&[rows="1"]': {
|
|
5
|
+
paddingBlock: string;
|
|
6
|
+
};
|
|
4
7
|
paddingInline: string;
|
|
5
8
|
paddingBlock: string;
|
|
6
9
|
textStyle: "body/md/regular";
|
|
@@ -14,4 +17,16 @@ declare const textareaRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
|
14
17
|
};
|
|
15
18
|
};
|
|
16
19
|
}>;
|
|
20
|
+
export declare const textareaStatusIcon: {
|
|
21
|
+
md: {
|
|
22
|
+
insetBlockStart: string;
|
|
23
|
+
insetInlineEnd: string;
|
|
24
|
+
paddingInlineEnd: string;
|
|
25
|
+
};
|
|
26
|
+
lg: {
|
|
27
|
+
insetBlockStart: string;
|
|
28
|
+
insetInlineEnd: string;
|
|
29
|
+
paddingInlineEnd: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
17
32
|
export default textareaRecipe;
|
|
@@ -1,13 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
2
|
+
import { base, defaultVariants, sizePadding, variants } from "../common/InputAndTextarea.common.js";
|
|
2
3
|
import { defineRecipe } from "@chakra-ui/react/styled-system";
|
|
3
4
|
//#region lib/theme/recipes/Textarea.recipe.ts
|
|
4
5
|
var textareaRecipe = defineRecipe({
|
|
5
6
|
className: "textarea",
|
|
6
|
-
base
|
|
7
|
-
|
|
7
|
+
base: {
|
|
8
|
+
...base,
|
|
9
|
+
display: "block",
|
|
10
|
+
minBlockSize: "var(--input-height)"
|
|
11
|
+
},
|
|
12
|
+
variants: { size: {
|
|
13
|
+
md: {
|
|
14
|
+
...variants.size.md,
|
|
15
|
+
"&[rows=\"1\"]": { paddingBlock: rem(9) }
|
|
16
|
+
},
|
|
17
|
+
lg: variants.size.lg
|
|
18
|
+
} },
|
|
8
19
|
defaultVariants
|
|
9
20
|
});
|
|
21
|
+
var ICON_GAP = 8;
|
|
22
|
+
var iconSize = {
|
|
23
|
+
md: 16,
|
|
24
|
+
lg: 24
|
|
25
|
+
};
|
|
26
|
+
var textareaStatusIcon = {
|
|
27
|
+
md: {
|
|
28
|
+
insetBlockStart: rem(sizePadding.md.block),
|
|
29
|
+
insetInlineEnd: rem(sizePadding.md.inline),
|
|
30
|
+
paddingInlineEnd: rem(sizePadding.md.inline + iconSize.md + ICON_GAP)
|
|
31
|
+
},
|
|
32
|
+
lg: {
|
|
33
|
+
insetBlockStart: rem(sizePadding.lg.block),
|
|
34
|
+
insetInlineEnd: rem(sizePadding.lg.inline),
|
|
35
|
+
paddingInlineEnd: rem(sizePadding.lg.inline + iconSize.lg + ICON_GAP)
|
|
36
|
+
}
|
|
37
|
+
};
|
|
10
38
|
//#endregion
|
|
11
|
-
export { textareaRecipe as default };
|
|
39
|
+
export { textareaRecipe as default, textareaStatusIcon };
|
|
12
40
|
|
|
13
41
|
//# sourceMappingURL=Textarea.recipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.recipe.js","names":[],"sources":["../../../lib/theme/recipes/Textarea.recipe.ts"],"sourcesContent":["import { defineRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, defaultVariants, variants } from '../common/InputAndTextarea.common';\n\nconst textareaRecipe = defineRecipe({\n className: 'textarea',\n base,\n variants,\n defaultVariants,\n});\n\nexport default textareaRecipe;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Textarea.recipe.js","names":[],"sources":["../../../lib/theme/recipes/Textarea.recipe.ts"],"sourcesContent":["import { defineRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, defaultVariants, sizePadding, variants } from '../common/InputAndTextarea.common';\nimport { rem } from '../themeUtils';\n\n// Single recipe shared by the raw <Textarea> atom and BitkitTextArea (both get it via Chakra's\n// `<Textarea>`, which applies the `textarea` recipe by key).\nconst textareaRecipe = defineRecipe({\n className: 'textarea',\n base: {\n ...base,\n // A raw <textarea> is inline-block with baseline alignment, which reserves\n // descender space below it and inflates the gap to the helper text. Block\n // layout removes that phantom space.\n display: 'block',\n minBlockSize: 'var(--input-height)',\n },\n variants: {\n size: {\n md: {\n ...variants.size.md,\n '&[rows=\"1\"]': { paddingBlock: rem(9) },\n },\n lg: variants.size.lg,\n },\n },\n defaultVariants,\n});\n\n// Placement for the status icon (error/warning) that BitkitTextArea overlays on the textarea.\n// Derived from the text padding (`sizePadding`) so the icon aligns with the first line of text,\n// and paddingInlineEnd reserves room for it: text padding + icon size + gap.\nconst ICON_GAP = 8;\nconst iconSize = { md: 16, lg: 24 } as const;\n\nexport const textareaStatusIcon = {\n md: {\n insetBlockStart: rem(sizePadding.md.block),\n insetInlineEnd: rem(sizePadding.md.inline),\n paddingInlineEnd: rem(sizePadding.md.inline + iconSize.md + ICON_GAP),\n },\n lg: {\n insetBlockStart: rem(sizePadding.lg.block),\n insetInlineEnd: rem(sizePadding.lg.inline),\n paddingInlineEnd: rem(sizePadding.lg.inline + iconSize.lg + ICON_GAP),\n },\n};\n\nexport default textareaRecipe;\n"],"mappings":";;;;AAOA,IAAM,iBAAiB,aAAa;CAClC,WAAW;CACX,MAAM;EACJ,GAAG;EAIH,SAAS;EACT,cAAc;CAChB;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,GAAG,SAAS,KAAK;GACjB,iBAAe,EAAE,cAAc,IAAI,CAAC,EAAE;EACxC;EACA,IAAI,SAAS,KAAK;CACpB,EACF;CACA;AACF,CAAC;AAKD,IAAM,WAAW;AACjB,IAAM,WAAW;CAAE,IAAI;CAAI,IAAI;AAAG;AAElC,IAAa,qBAAqB;CAChC,IAAI;EACF,iBAAiB,IAAI,YAAY,GAAG,KAAK;EACzC,gBAAgB,IAAI,YAAY,GAAG,MAAM;EACzC,kBAAkB,IAAI,YAAY,GAAG,SAAS,SAAS,KAAK,QAAQ;CACtE;CACA,IAAI;EACF,iBAAiB,IAAI,YAAY,GAAG,KAAK;EACzC,gBAAgB,IAAI,YAAY,GAAG,MAAM;EACzC,kBAAkB,IAAI,YAAY,GAAG,SAAS,SAAS,KAAK,QAAQ;CACtE;AACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import colorButtonRecipe from "./ColorButton.recipe.js";
|
|
2
2
|
import inputRecipe from "./Input.recipe.js";
|
|
3
|
+
import textareaRecipe from "./Textarea.recipe.js";
|
|
3
4
|
import badgeRecipe from "./Badge.recipe.js";
|
|
4
5
|
import buttonRecipe from "./Button.recipe.js";
|
|
5
6
|
import closeButtonRecipe from "./CloseButton.recipe.js";
|
|
@@ -13,7 +14,6 @@ import selectableTagRecipe from "./SelectableTag.recipe.js";
|
|
|
13
14
|
import separatorRecipe from "./Separator.recipe.js";
|
|
14
15
|
import skeletonRecipe from "./Skeleton.recipe.js";
|
|
15
16
|
import spinnerRecipe from "./Spinner.recipe.js";
|
|
16
|
-
import textareaRecipe from "./Textarea.recipe.js";
|
|
17
17
|
import toggleButtonRecipe from "./ToggleButton.recipe.js";
|
|
18
18
|
//#region lib/theme/recipes/index.ts
|
|
19
19
|
var recipes = {
|