@bitrise/bitkit-v2 0.3.277 → 0.3.278
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/AGENTS.md +6 -0
- package/dist/components/BitkitTextInput/BitkitTextInput.d.ts +8 -0
- package/dist/components/BitkitTextInput/BitkitTextInput.js +66 -18
- package/dist/components/BitkitTextInput/BitkitTextInput.js.map +1 -1
- package/dist/theme/common/InputAndTextarea.common.d.ts +55 -9
- package/dist/theme/common/InputAndTextarea.common.js +28 -15
- package/dist/theme/common/InputAndTextarea.common.js.map +1 -1
- package/dist/theme/recipes/InputAddon.recipe.d.ts +25 -0
- package/dist/theme/recipes/InputAddon.recipe.js +54 -0
- package/dist/theme/recipes/InputAddon.recipe.js.map +1 -0
- package/dist/theme/recipes/index.d.ts +24 -0
- package/dist/theme/recipes/index.js +2 -0
- package/dist/theme/recipes/index.js.map +1 -1
- package/dist/theme/slot-recipes/TextInput.recipe.d.ts +25 -0
- package/dist/theme/slot-recipes/TextInput.recipe.js +78 -0
- package/dist/theme/slot-recipes/TextInput.recipe.js.map +1 -0
- package/dist/theme/slot-recipes/index.d.ts +24 -0
- package/dist/theme/slot-recipes/index.js +2 -0
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -113,6 +113,12 @@ Bitkit components use consistent prop names across the library:
|
|
|
113
113
|
<BitkitActionMenu.Item href="https://example.com" isExternal value="docs">Open docs</BitkitActionMenu.Item>
|
|
114
114
|
```
|
|
115
115
|
- **Form components are flat** — `BitkitTextInput`, `BitkitSelect`, `BitkitCombobox`, etc. expose `label`, `errorText`, `helperText`, etc. directly as props. No need to wrap in a separate field component.
|
|
116
|
+
- **`BitkitTextInput` in-field slots** — all four slots take a `ReactNode`, not just icons/strings: `startElement` / `endElement` render inside the field (an icon, badge, text, or an interactive control like a reveal/clear button), and `startAddon` / `endAddon` render as a bordered, attached box outside the field (a text label like `$` / `USD`, or a component such as a `select` / button). These match the Figma slot names. The validation status icon (error/warning) is added automatically and sits left of `endElement`. For a component addon that brings its own styling, pass `startAddonProps={{ unstyled: true }}` (or `endAddonProps`) to drop the default grey box:
|
|
117
|
+
```tsx
|
|
118
|
+
<BitkitTextInput startElement={<IconSearch />} endElement={<BitkitBadge>New</BitkitBadge>} />
|
|
119
|
+
<BitkitTextInput startAddon="$" endAddon="USD" />
|
|
120
|
+
<BitkitTextInput startAddon={<BitkitButton variant="secondary">USD</BitkitButton>} startAddonProps={{ unstyled: true }} />
|
|
121
|
+
```
|
|
116
122
|
- **Three dialog components, one shell** — pick by intent, never reach for low-level dialog primitives (there are none exported):
|
|
117
123
|
- `BitkitDialog` — header (title + close) + body (`children`) + footer. The body is the dialog's `children`. The footer is two slot props: `footerButtons` (action buttons, auto-wrapped in the standard right-aligned row — no manual wrapper) and `footerContent` (arbitrary content rendered raw, e.g. an inline `BitkitAlert`). Both can be combined (content first, then buttons); omit both for a passive dialog with no footer.
|
|
118
124
|
- `BitkitFormDialog` — same API as `BitkitDialog`, but the whole content is a `<form>`, so a `type="submit"` button in `footerButtons` submits natively. Accepts form props (`onSubmit`, `method`, …).
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { InputProps } from '@chakra-ui/react/input';
|
|
2
|
+
import { InputAddonProps } from '@chakra-ui/react/input-addon';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
2
4
|
import { BitkitFieldProps } from '../BitkitField/BitkitField';
|
|
3
5
|
export interface BitkitTextInputProps extends Omit<BitkitFieldProps, 'children' | 'state'> {
|
|
4
6
|
counter?: boolean;
|
|
7
|
+
endAddon?: ReactNode;
|
|
8
|
+
endAddonProps?: InputAddonProps;
|
|
9
|
+
endElement?: ReactNode;
|
|
5
10
|
inputProps?: InputProps;
|
|
6
11
|
maxLength?: HTMLInputElement['maxLength'];
|
|
7
12
|
placeholder?: string;
|
|
8
13
|
size?: 'md' | 'lg';
|
|
14
|
+
startAddon?: ReactNode;
|
|
15
|
+
startAddonProps?: InputAddonProps;
|
|
16
|
+
startElement?: ReactNode;
|
|
9
17
|
state?: 'disabled' | 'error' | 'readOnly' | 'warning';
|
|
10
18
|
}
|
|
11
19
|
declare const BitkitTextInput: import('react').ForwardRefExoticComponent<BitkitTextInputProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,37 +1,85 @@
|
|
|
1
1
|
import IconErrorCircleFilled from "../../icons/IconErrorCircleFilled.js";
|
|
2
2
|
import IconWarningYellow from "../../icons/IconWarningYellow.js";
|
|
3
|
-
import { rem } from "../../theme/themeUtils.js";
|
|
4
3
|
import BitkitField from "../BitkitField/BitkitField.js";
|
|
4
|
+
import { Box } from "@chakra-ui/react/box";
|
|
5
|
+
import { useSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
5
6
|
import { forwardRef } from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { Input } from "@chakra-ui/react/input";
|
|
8
|
-
import {
|
|
9
|
+
import { Group } from "@chakra-ui/react/group";
|
|
10
|
+
import { InputAddon } from "@chakra-ui/react/input-addon";
|
|
9
11
|
//#region lib/components/BitkitTextInput/BitkitTextInput.tsx
|
|
10
12
|
var BitkitTextInput = forwardRef((props, ref) => {
|
|
11
|
-
const { counter, inputProps, maxLength, placeholder, size, state, ...fieldProps } = props;
|
|
13
|
+
const { counter, endAddon, endAddonProps, endElement, inputProps, maxLength, placeholder, size = "lg", startAddon, startAddonProps, startElement, state, ...fieldProps } = props;
|
|
14
|
+
const styles = useSlotRecipe({ key: "textInput" })({ size });
|
|
15
|
+
const iconSize = size === "md" ? "16" : "24";
|
|
16
|
+
const addonSize = size === "md" ? "md" : "lg";
|
|
12
17
|
const hasWarning = state === "warning" || !!fieldProps.warningText;
|
|
13
18
|
const isInvalid = state === "error" || !!fieldProps.errorText;
|
|
14
|
-
let statusIcon =
|
|
19
|
+
let statusIcon = null;
|
|
15
20
|
if (isInvalid) statusIcon = /* @__PURE__ */ jsx(IconErrorCircleFilled, {
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
color: "icon/negative",
|
|
22
|
+
size: iconSize
|
|
18
23
|
});
|
|
19
|
-
else if (hasWarning) statusIcon = /* @__PURE__ */ jsx(IconWarningYellow, { size:
|
|
24
|
+
else if (hasWarning) statusIcon = /* @__PURE__ */ jsx(IconWarningYellow, { size: iconSize });
|
|
25
|
+
const counterText = counter && maxLength && inputProps?.value !== void 0 ? `${inputProps.value.toString().length}/${maxLength}` : void 0;
|
|
26
|
+
const stateAttrs = {
|
|
27
|
+
"data-disabled": state === "disabled" ? "" : void 0,
|
|
28
|
+
"data-invalid": isInvalid ? "" : void 0,
|
|
29
|
+
"data-readonly": state === "readOnly" ? "" : void 0
|
|
30
|
+
};
|
|
20
31
|
return /* @__PURE__ */ jsx(BitkitField, {
|
|
21
|
-
counterText
|
|
32
|
+
counterText,
|
|
22
33
|
ref,
|
|
23
34
|
state,
|
|
24
35
|
...fieldProps,
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
endElementProps: { marginInlineEnd: size === "lg" ? rem(15) : rem(11) },
|
|
36
|
+
children: /* @__PURE__ */ jsxs(Group, {
|
|
37
|
+
attached: true,
|
|
28
38
|
width: "100%",
|
|
29
|
-
children:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
children: [
|
|
40
|
+
startAddon != null && /* @__PURE__ */ jsx(InputAddon, {
|
|
41
|
+
position: "start",
|
|
42
|
+
size: addonSize,
|
|
43
|
+
...stateAttrs,
|
|
44
|
+
...startAddonProps,
|
|
45
|
+
children: startAddon
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
48
|
+
css: styles.field,
|
|
49
|
+
...stateAttrs,
|
|
50
|
+
children: [
|
|
51
|
+
startElement != null && /* @__PURE__ */ jsx(Box, {
|
|
52
|
+
css: styles.element,
|
|
53
|
+
...stateAttrs,
|
|
54
|
+
children: startElement
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx(Input, {
|
|
57
|
+
css: styles.input,
|
|
58
|
+
maxLength,
|
|
59
|
+
placeholder,
|
|
60
|
+
...inputProps,
|
|
61
|
+
unstyled: true
|
|
62
|
+
}),
|
|
63
|
+
statusIcon != null && /* @__PURE__ */ jsx(Box, {
|
|
64
|
+
css: styles.element,
|
|
65
|
+
...stateAttrs,
|
|
66
|
+
children: statusIcon
|
|
67
|
+
}),
|
|
68
|
+
endElement != null && /* @__PURE__ */ jsx(Box, {
|
|
69
|
+
css: styles.element,
|
|
70
|
+
...stateAttrs,
|
|
71
|
+
children: endElement
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
endAddon != null && /* @__PURE__ */ jsx(InputAddon, {
|
|
76
|
+
position: "end",
|
|
77
|
+
size: addonSize,
|
|
78
|
+
...stateAttrs,
|
|
79
|
+
...endAddonProps,
|
|
80
|
+
children: endAddon
|
|
81
|
+
})
|
|
82
|
+
]
|
|
35
83
|
})
|
|
36
84
|
});
|
|
37
85
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTextInput.js","names":[],"sources":["../../../lib/components/BitkitTextInput/BitkitTextInput.tsx"],"sourcesContent":["import { Input, type InputProps } from '@chakra-ui/react/input';\nimport {
|
|
1
|
+
{"version":3,"file":"BitkitTextInput.js","names":[],"sources":["../../../lib/components/BitkitTextInput/BitkitTextInput.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Group } from '@chakra-ui/react/group';\nimport { Input, type InputProps } from '@chakra-ui/react/input';\nimport { InputAddon, type InputAddonProps } from '@chakra-ui/react/input-addon';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\n\nexport interface BitkitTextInputProps extends Omit<BitkitFieldProps, 'children' | 'state'> {\n counter?: boolean;\n endAddon?: ReactNode;\n endAddonProps?: InputAddonProps;\n endElement?: ReactNode;\n inputProps?: InputProps;\n maxLength?: HTMLInputElement['maxLength'];\n placeholder?: string;\n size?: 'md' | 'lg';\n startAddon?: ReactNode;\n startAddonProps?: InputAddonProps;\n startElement?: ReactNode;\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n}\n\nconst BitkitTextInput = forwardRef<HTMLDivElement, BitkitTextInputProps>((props, ref) => {\n const {\n counter,\n endAddon,\n endAddonProps,\n endElement,\n inputProps,\n maxLength,\n placeholder,\n size = 'lg',\n startAddon,\n startAddonProps,\n startElement,\n state,\n ...fieldProps\n } = props;\n\n const recipe = useSlotRecipe({ key: 'textInput' });\n const styles = recipe({ size });\n\n const iconSize = size === 'md' ? '16' : '24';\n const addonSize = size === 'md' ? 'md' : 'lg';\n\n const hasWarning = state === 'warning' || !!fieldProps.warningText;\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n\n let statusIcon: ReactNode = null;\n if (isInvalid) {\n statusIcon = <IconErrorCircleFilled color=\"icon/negative\" size={iconSize} />;\n } else if (hasWarning) {\n statusIcon = <IconWarningYellow size={iconSize} />;\n }\n\n const counterText =\n counter && maxLength && inputProps?.value !== undefined\n ? `${inputProps.value.toString().length}/${maxLength}`\n : undefined;\n\n const stateAttrs = {\n 'data-disabled': state === 'disabled' ? '' : undefined,\n 'data-invalid': isInvalid ? '' : undefined,\n 'data-readonly': state === 'readOnly' ? '' : undefined,\n };\n\n return (\n <BitkitField counterText={counterText} ref={ref} state={state} {...fieldProps}>\n <Group attached width=\"100%\">\n {startAddon != null && (\n <InputAddon position=\"start\" size={addonSize} {...stateAttrs} {...startAddonProps}>\n {startAddon}\n </InputAddon>\n )}\n <Box css={styles.field} {...stateAttrs}>\n {startElement != null && (\n <Box css={styles.element} {...stateAttrs}>\n {startElement}\n </Box>\n )}\n <Input css={styles.input} maxLength={maxLength} placeholder={placeholder} {...inputProps} unstyled />\n {statusIcon != null && (\n <Box css={styles.element} {...stateAttrs}>\n {statusIcon}\n </Box>\n )}\n {endElement != null && (\n <Box css={styles.element} {...stateAttrs}>\n {endElement}\n </Box>\n )}\n </Box>\n {endAddon != null && (\n <InputAddon position=\"end\" size={addonSize} {...stateAttrs} {...endAddonProps}>\n {endAddon}\n </InputAddon>\n )}\n </Group>\n </BitkitField>\n );\n});\n\nBitkitTextInput.displayName = 'BitkitTextInput';\n\nexport default BitkitTextInput;\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,kBAAkB,YAAkD,OAAO,QAAQ;CACvF,MAAM,EACJ,SACA,UACA,eACA,YACA,YACA,WACA,aACA,OAAO,MACP,YACA,iBACA,cACA,OACA,GAAG,eACD;CAGJ,MAAM,SADS,cAAc,EAAE,KAAK,YAAY,CACjC,EAAO,EAAE,KAAK,CAAC;CAE9B,MAAM,WAAW,SAAS,OAAO,OAAO;CACxC,MAAM,YAAY,SAAS,OAAO,OAAO;CAEzC,MAAM,aAAa,UAAU,aAAa,CAAC,CAAC,WAAW;CACvD,MAAM,YAAY,UAAU,WAAW,CAAC,CAAC,WAAW;CAEpD,IAAI,aAAwB;CAC5B,IAAI,WACF,aAAa,oBAAC,uBAAD;EAAuB,OAAM;EAAgB,MAAM;CAAW,CAAA;MACtE,IAAI,YACT,aAAa,oBAAC,mBAAD,EAAmB,MAAM,SAAW,CAAA;CAGnD,MAAM,cACJ,WAAW,aAAa,YAAY,UAAU,KAAA,IAC1C,GAAG,WAAW,MAAM,SAAS,EAAE,OAAO,GAAG,cACzC,KAAA;CAEN,MAAM,aAAa;EACjB,iBAAiB,UAAU,aAAa,KAAK,KAAA;EAC7C,gBAAgB,YAAY,KAAK,KAAA;EACjC,iBAAiB,UAAU,aAAa,KAAK,KAAA;CAC/C;CAEA,OACE,oBAAC,aAAD;EAA0B;EAAkB;EAAY;EAAO,GAAI;YACjE,qBAAC,OAAD;GAAO,UAAA;GAAS,OAAM;aAAtB;IACG,cAAc,QACb,oBAAC,YAAD;KAAY,UAAS;KAAQ,MAAM;KAAW,GAAI;KAAY,GAAI;eAC/D;IACS,CAAA;IAEd,qBAAC,KAAD;KAAK,KAAK,OAAO;KAAO,GAAI;eAA5B;MACG,gBAAgB,QACf,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI;iBAC3B;MACE,CAAA;MAEP,oBAAC,OAAD;OAAO,KAAK,OAAO;OAAkB;OAAwB;OAAa,GAAI;OAAY,UAAA;MAAU,CAAA;MACnG,cAAc,QACb,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI;iBAC3B;MACE,CAAA;MAEN,cAAc,QACb,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI;iBAC3B;MACE,CAAA;KAEJ;;IACJ,YAAY,QACX,oBAAC,YAAD;KAAY,UAAS;KAAM,MAAM;KAAW,GAAI;KAAY,GAAI;eAC7D;IACS,CAAA;GAET;;CACI,CAAA;AAEjB,CAAC;AAED,gBAAgB,cAAc"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
appearance: "none";
|
|
1
|
+
export declare const frame: {
|
|
3
2
|
background: "background/primary";
|
|
4
3
|
borderColor: "border/regular";
|
|
5
4
|
borderRadius: "4";
|
|
6
5
|
borderWidth: "1";
|
|
7
|
-
color: "input/text/inputValue";
|
|
8
|
-
textStyle: "body/lg/regular";
|
|
9
|
-
width: "100%";
|
|
10
6
|
boxShadow: "inset/field";
|
|
11
7
|
transition: "border 200ms";
|
|
12
|
-
_placeholder: {
|
|
13
|
-
color: "input/text/placeholder";
|
|
14
|
-
};
|
|
15
8
|
_hover: {
|
|
16
9
|
borderColor: "border/hover";
|
|
17
10
|
};
|
|
@@ -21,22 +14,75 @@ export declare const base: {
|
|
|
21
14
|
borderColor: "border/error";
|
|
22
15
|
};
|
|
23
16
|
};
|
|
17
|
+
_readOnly: {
|
|
18
|
+
background: "background/disabled";
|
|
19
|
+
_hover: {
|
|
20
|
+
borderColor: "border/regular";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
24
23
|
_disabled: {
|
|
24
|
+
background: "background/disabled";
|
|
25
|
+
borderColor: "border/disabled";
|
|
26
|
+
cursor: "not-allowed";
|
|
25
27
|
_hover: {
|
|
26
28
|
borderColor: "border/disabled";
|
|
27
29
|
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const text: {
|
|
33
|
+
appearance: "none";
|
|
34
|
+
color: "input/text/inputValue";
|
|
35
|
+
textStyle: "body/lg/regular";
|
|
36
|
+
_placeholder: {
|
|
37
|
+
color: "input/text/placeholder";
|
|
38
|
+
};
|
|
39
|
+
_disabled: {
|
|
40
|
+
color: "text/disabled";
|
|
28
41
|
_placeholder: {
|
|
29
42
|
color: "text/disabled";
|
|
30
43
|
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const base: {
|
|
47
|
+
width: "100%";
|
|
48
|
+
_disabled: {
|
|
31
49
|
color: "text/disabled";
|
|
50
|
+
_placeholder: {
|
|
51
|
+
color: "text/disabled";
|
|
52
|
+
};
|
|
32
53
|
background: "background/disabled";
|
|
54
|
+
borderColor: "border/disabled";
|
|
33
55
|
cursor: "not-allowed";
|
|
56
|
+
_hover: {
|
|
57
|
+
borderColor: "border/disabled";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
appearance: "none";
|
|
61
|
+
color: "input/text/inputValue";
|
|
62
|
+
textStyle: "body/lg/regular";
|
|
63
|
+
_placeholder: {
|
|
64
|
+
color: "input/text/placeholder";
|
|
65
|
+
};
|
|
66
|
+
background: "background/primary";
|
|
67
|
+
borderColor: "border/regular";
|
|
68
|
+
borderRadius: "4";
|
|
69
|
+
borderWidth: "1";
|
|
70
|
+
boxShadow: "inset/field";
|
|
71
|
+
transition: "border 200ms";
|
|
72
|
+
_hover: {
|
|
73
|
+
borderColor: "border/hover";
|
|
74
|
+
};
|
|
75
|
+
_invalid: {
|
|
76
|
+
borderColor: "border/error";
|
|
77
|
+
_hover: {
|
|
78
|
+
borderColor: "border/error";
|
|
79
|
+
};
|
|
34
80
|
};
|
|
35
81
|
_readOnly: {
|
|
82
|
+
background: "background/disabled";
|
|
36
83
|
_hover: {
|
|
37
84
|
borderColor: "border/regular";
|
|
38
85
|
};
|
|
39
|
-
background: "background/disabled";
|
|
40
86
|
};
|
|
41
87
|
};
|
|
42
88
|
export declare const variants: {
|
|
@@ -1,32 +1,45 @@
|
|
|
1
1
|
import { rem } from "../themeUtils.js";
|
|
2
2
|
//#region lib/theme/common/InputAndTextarea.common.ts
|
|
3
|
-
var
|
|
4
|
-
appearance: "none",
|
|
3
|
+
var frame = {
|
|
5
4
|
background: "background/primary",
|
|
6
5
|
borderColor: "border/regular",
|
|
7
6
|
borderRadius: "4",
|
|
8
7
|
borderWidth: "1",
|
|
9
|
-
color: "input/text/inputValue",
|
|
10
|
-
textStyle: "body/lg/regular",
|
|
11
|
-
width: "100%",
|
|
12
8
|
boxShadow: "inset/field",
|
|
13
9
|
transition: "border 200ms",
|
|
14
|
-
_placeholder: { color: "input/text/placeholder" },
|
|
15
10
|
_hover: { borderColor: "border/hover" },
|
|
16
11
|
_invalid: {
|
|
17
12
|
borderColor: "border/error",
|
|
18
13
|
_hover: { borderColor: "border/error" }
|
|
19
14
|
},
|
|
20
|
-
|
|
21
|
-
_hover: { borderColor: "border/disabled" },
|
|
22
|
-
_placeholder: { color: "text/disabled" },
|
|
23
|
-
color: "text/disabled",
|
|
15
|
+
_readOnly: {
|
|
24
16
|
background: "background/disabled",
|
|
25
|
-
|
|
17
|
+
_hover: { borderColor: "border/regular" }
|
|
26
18
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
_disabled: {
|
|
20
|
+
background: "background/disabled",
|
|
21
|
+
borderColor: "border/disabled",
|
|
22
|
+
cursor: "not-allowed",
|
|
23
|
+
_hover: { borderColor: "border/disabled" }
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var text = {
|
|
27
|
+
appearance: "none",
|
|
28
|
+
color: "input/text/inputValue",
|
|
29
|
+
textStyle: "body/lg/regular",
|
|
30
|
+
_placeholder: { color: "input/text/placeholder" },
|
|
31
|
+
_disabled: {
|
|
32
|
+
color: "text/disabled",
|
|
33
|
+
_placeholder: { color: "text/disabled" }
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var base = {
|
|
37
|
+
...frame,
|
|
38
|
+
...text,
|
|
39
|
+
width: "100%",
|
|
40
|
+
_disabled: {
|
|
41
|
+
...frame._disabled,
|
|
42
|
+
...text._disabled
|
|
30
43
|
}
|
|
31
44
|
};
|
|
32
45
|
var variants = { size: {
|
|
@@ -52,6 +65,6 @@ var defaultVariants = { size: "lg" };
|
|
|
52
65
|
*/
|
|
53
66
|
var singleLineInputOverrides = { lineHeight: "normal" };
|
|
54
67
|
//#endregion
|
|
55
|
-
export { base, defaultVariants, singleLineInputOverrides, variants };
|
|
68
|
+
export { base, defaultVariants, frame, singleLineInputOverrides, text, variants };
|
|
56
69
|
|
|
57
70
|
//# 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
|
|
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(11),\n paddingBlock: rem(9),\n textStyle: 'body/md/regular',\n '--input-height': rem(40),\n },\n lg: {\n paddingInline: rem(15),\n paddingBlock: rem(11),\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;AAEA,IAAa,WAAW,EACtB,MAAM;CACJ,IAAI;EACF,eAAe,IAAI,EAAE;EACrB,cAAc,IAAI,CAAC;EACnB,WAAW;EACX,kBAAkB,IAAI,EAAE;CAC1B;CACA,IAAI;EACF,eAAe,IAAI,EAAE;EACrB,cAAc,IAAI,EAAE;EACpB,WAAW;EACX,kBAAkB,IAAI,EAAE;CAC1B;AACF,EACF;AAEA,IAAa,kBAA+C,EAC1D,MAAM,KACR;;;;;;;AAQA,IAAa,2BAA2B,EACtC,YAAY,SACd"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const inputAddonRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
2
|
+
position: {
|
|
3
|
+
start: {
|
|
4
|
+
borderInlineStartWidth: "1";
|
|
5
|
+
borderStartStartRadius: "4";
|
|
6
|
+
borderEndStartRadius: "4";
|
|
7
|
+
};
|
|
8
|
+
end: {
|
|
9
|
+
borderInlineWidth: "1";
|
|
10
|
+
borderStartEndRadius: "4";
|
|
11
|
+
borderEndEndRadius: "4";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
md: {
|
|
16
|
+
paddingInline: string;
|
|
17
|
+
textStyle: "body/md/regular";
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
paddingInline: string;
|
|
21
|
+
textStyle: "body/lg/regular";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
export default inputAddonRecipe;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
2
|
+
import { defineRecipe } from "@chakra-ui/react/styled-system";
|
|
3
|
+
//#region lib/theme/recipes/InputAddon.recipe.ts
|
|
4
|
+
var inputAddonRecipe = defineRecipe({
|
|
5
|
+
className: "input-addon",
|
|
6
|
+
base: {
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
alignSelf: "stretch",
|
|
9
|
+
background: "background/secondary",
|
|
10
|
+
borderBlockWidth: "1",
|
|
11
|
+
borderColor: "border/regular",
|
|
12
|
+
borderStyle: "solid",
|
|
13
|
+
color: "text/body",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexShrink: 0,
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
whiteSpace: "nowrap",
|
|
18
|
+
_readOnly: { background: "background/disabled" },
|
|
19
|
+
_disabled: {
|
|
20
|
+
background: "background/disabled",
|
|
21
|
+
borderColor: "border/disabled",
|
|
22
|
+
color: "text/disabled"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
position: {
|
|
27
|
+
start: {
|
|
28
|
+
borderInlineStartWidth: "1",
|
|
29
|
+
borderStartStartRadius: "4",
|
|
30
|
+
borderEndStartRadius: "4"
|
|
31
|
+
},
|
|
32
|
+
end: {
|
|
33
|
+
borderInlineWidth: "1",
|
|
34
|
+
borderStartEndRadius: "4",
|
|
35
|
+
borderEndEndRadius: "4"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
md: {
|
|
40
|
+
paddingInline: rem(11),
|
|
41
|
+
textStyle: "body/md/regular"
|
|
42
|
+
},
|
|
43
|
+
lg: {
|
|
44
|
+
paddingInline: rem(15),
|
|
45
|
+
textStyle: "body/lg/regular"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: { size: "lg" }
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { inputAddonRecipe as default };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=InputAddon.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputAddon.recipe.js","names":[],"sources":["../../../lib/theme/recipes/InputAddon.recipe.ts"],"sourcesContent":["import { defineRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst inputAddonRecipe = defineRecipe({\n className: 'input-addon',\n base: {\n alignItems: 'center',\n alignSelf: 'stretch',\n background: 'background/secondary',\n borderBlockWidth: '1',\n borderColor: 'border/regular',\n borderStyle: 'solid',\n color: 'text/body',\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n whiteSpace: 'nowrap',\n _readOnly: {\n background: 'background/disabled',\n },\n _disabled: {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n color: 'text/disabled',\n },\n },\n variants: {\n position: {\n start: {\n borderInlineStartWidth: '1',\n borderStartStartRadius: '4',\n borderEndStartRadius: '4',\n },\n end: {\n borderInlineWidth: '1',\n borderStartEndRadius: '4',\n borderEndEndRadius: '4',\n },\n },\n size: {\n md: { paddingInline: rem(11), textStyle: 'body/md/regular' },\n lg: { paddingInline: rem(15), textStyle: 'body/lg/regular' },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default inputAddonRecipe;\n"],"mappings":";;;AAIA,IAAM,mBAAmB,aAAa;CACpC,WAAW;CACX,MAAM;EACJ,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,aAAa;EACb,OAAO;EACP,SAAS;EACT,YAAY;EACZ,gBAAgB;EAChB,YAAY;EACZ,WAAW,EACT,YAAY,sBACd;EACA,WAAW;GACT,YAAY;GACZ,aAAa;GACb,OAAO;EACT;CACF;CACA,UAAU;EACR,UAAU;GACR,OAAO;IACL,wBAAwB;IACxB,wBAAwB;IACxB,sBAAsB;GACxB;GACA,KAAK;IACH,mBAAmB;IACnB,sBAAsB;IACtB,oBAAoB;GACtB;EACF;EACA,MAAM;GACJ,IAAI;IAAE,eAAe,IAAI,EAAE;IAAG,WAAW;GAAkB;GAC3D,IAAI;IAAE,eAAe,IAAI,EAAE;IAAG,WAAW;GAAkB;EAC7D;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
@@ -373,6 +373,30 @@ declare const recipes: {
|
|
|
373
373
|
};
|
|
374
374
|
};
|
|
375
375
|
}>;
|
|
376
|
+
inputAddon: import('@chakra-ui/react').RecipeDefinition<{
|
|
377
|
+
position: {
|
|
378
|
+
start: {
|
|
379
|
+
borderInlineStartWidth: "1";
|
|
380
|
+
borderStartStartRadius: "4";
|
|
381
|
+
borderEndStartRadius: "4";
|
|
382
|
+
};
|
|
383
|
+
end: {
|
|
384
|
+
borderInlineWidth: "1";
|
|
385
|
+
borderStartEndRadius: "4";
|
|
386
|
+
borderEndEndRadius: "4";
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
size: {
|
|
390
|
+
md: {
|
|
391
|
+
paddingInline: string;
|
|
392
|
+
textStyle: "body/md/regular";
|
|
393
|
+
};
|
|
394
|
+
lg: {
|
|
395
|
+
paddingInline: string;
|
|
396
|
+
textStyle: "body/lg/regular";
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
}>;
|
|
376
400
|
link: import('@chakra-ui/react').RecipeDefinition<{
|
|
377
401
|
colorVariant: {
|
|
378
402
|
purple: {
|
|
@@ -6,6 +6,7 @@ import closeButtonRecipe from "./CloseButton.recipe.js";
|
|
|
6
6
|
import controlButtonRecipe from "./ControlButton.recipe.js";
|
|
7
7
|
import definitionTooltipRecipe from "./DefinitionTooltip.recipe.js";
|
|
8
8
|
import iconRecipe from "./Icon.recipe.js";
|
|
9
|
+
import inputAddonRecipe from "./InputAddon.recipe.js";
|
|
9
10
|
import linkRecipe from "./Link.recipe.js";
|
|
10
11
|
import linkButtonRecipe from "./LinkButton.recipe.js";
|
|
11
12
|
import selectableTagRecipe from "./SelectableTag.recipe.js";
|
|
@@ -24,6 +25,7 @@ var recipes = {
|
|
|
24
25
|
definitionTooltip: definitionTooltipRecipe,
|
|
25
26
|
icon: iconRecipe,
|
|
26
27
|
input: inputRecipe,
|
|
28
|
+
inputAddon: inputAddonRecipe,
|
|
27
29
|
link: linkRecipe,
|
|
28
30
|
linkButton: linkButtonRecipe,
|
|
29
31
|
selectableTag: selectableTagRecipe,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../lib/theme/recipes/index.ts"],"sourcesContent":["import badgeRecipe from './Badge.recipe';\nimport buttonRecipe from './Button.recipe';\nimport closeButtonRecipe from './CloseButton.recipe';\nimport colorButtonRecipe from './ColorButton.recipe';\nimport controlButtonRecipe from './ControlButton.recipe';\nimport definitionTooltipRecipe from './DefinitionTooltip.recipe';\nimport iconRecipe from './Icon.recipe';\nimport inputRecipe from './Input.recipe';\nimport linkRecipe from './Link.recipe';\nimport linkButtonRecipe from './LinkButton.recipe';\nimport selectableTagRecipe from './SelectableTag.recipe';\nimport separatorRecipe from './Separator.recipe';\nimport skeletonRecipe from './Skeleton.recipe';\nimport spinnerRecipe from './Spinner.recipe';\nimport textareaRecipe from './Textarea.recipe';\nimport toggleButtonRecipe from './ToggleButton.recipe';\n\nconst recipes = {\n badge: badgeRecipe,\n button: buttonRecipe,\n closeButton: closeButtonRecipe,\n controlButton: controlButtonRecipe,\n colorButton: colorButtonRecipe,\n definitionTooltip: definitionTooltipRecipe,\n icon: iconRecipe,\n input: inputRecipe,\n link: linkRecipe,\n linkButton: linkButtonRecipe,\n selectableTag: selectableTagRecipe,\n separator: separatorRecipe,\n skeleton: skeletonRecipe,\n spinner: spinnerRecipe,\n textarea: textareaRecipe,\n toggleButton: toggleButtonRecipe,\n};\n\nexport default recipes;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../lib/theme/recipes/index.ts"],"sourcesContent":["import badgeRecipe from './Badge.recipe';\nimport buttonRecipe from './Button.recipe';\nimport closeButtonRecipe from './CloseButton.recipe';\nimport colorButtonRecipe from './ColorButton.recipe';\nimport controlButtonRecipe from './ControlButton.recipe';\nimport definitionTooltipRecipe from './DefinitionTooltip.recipe';\nimport iconRecipe from './Icon.recipe';\nimport inputRecipe from './Input.recipe';\nimport inputAddonRecipe from './InputAddon.recipe';\nimport linkRecipe from './Link.recipe';\nimport linkButtonRecipe from './LinkButton.recipe';\nimport selectableTagRecipe from './SelectableTag.recipe';\nimport separatorRecipe from './Separator.recipe';\nimport skeletonRecipe from './Skeleton.recipe';\nimport spinnerRecipe from './Spinner.recipe';\nimport textareaRecipe from './Textarea.recipe';\nimport toggleButtonRecipe from './ToggleButton.recipe';\n\nconst recipes = {\n badge: badgeRecipe,\n button: buttonRecipe,\n closeButton: closeButtonRecipe,\n controlButton: controlButtonRecipe,\n colorButton: colorButtonRecipe,\n definitionTooltip: definitionTooltipRecipe,\n icon: iconRecipe,\n input: inputRecipe,\n inputAddon: inputAddonRecipe,\n link: linkRecipe,\n linkButton: linkButtonRecipe,\n selectableTag: selectableTagRecipe,\n separator: separatorRecipe,\n skeleton: skeletonRecipe,\n spinner: spinnerRecipe,\n textarea: textareaRecipe,\n toggleButton: toggleButtonRecipe,\n};\n\nexport default recipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAM,UAAU;CACd,OAAO;CACP,QAAQ;CACR,aAAa;CACb,eAAe;CACf,aAAa;CACb,mBAAmB;CACnB,MAAM;CACN,OAAO;CACP,YAAY;CACZ,MAAM;CACN,YAAY;CACZ,eAAe;CACf,WAAW;CACX,UAAU;CACV,SAAS;CACT,UAAU;CACV,cAAc;AAChB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const textInputSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"input" | "field" | "element", {
|
|
2
|
+
size: {
|
|
3
|
+
md: {
|
|
4
|
+
field: {
|
|
5
|
+
gap: "8";
|
|
6
|
+
paddingInline: string;
|
|
7
|
+
'--input-height': string;
|
|
8
|
+
};
|
|
9
|
+
input: {
|
|
10
|
+
textStyle: "body/md/regular";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
field: {
|
|
15
|
+
gap: "8";
|
|
16
|
+
paddingInline: string;
|
|
17
|
+
'--input-height': string;
|
|
18
|
+
};
|
|
19
|
+
input: {
|
|
20
|
+
textStyle: "body/lg/regular";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
export default textInputSlotRecipe;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { frame, text, variants } from "../common/InputAndTextarea.common.js";
|
|
2
|
+
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
3
|
+
//#region lib/theme/slot-recipes/TextInput.recipe.ts
|
|
4
|
+
var textInputSlotRecipe = defineSlotRecipe({
|
|
5
|
+
className: "bitkit-text-input",
|
|
6
|
+
slots: [
|
|
7
|
+
"field",
|
|
8
|
+
"input",
|
|
9
|
+
"element"
|
|
10
|
+
],
|
|
11
|
+
base: {
|
|
12
|
+
field: {
|
|
13
|
+
...frame,
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
color: "input/text/inputValue",
|
|
16
|
+
display: "flex",
|
|
17
|
+
flex: "1",
|
|
18
|
+
height: "var(--input-height)",
|
|
19
|
+
minWidth: 0,
|
|
20
|
+
"&:has(input:focus-visible)": { boxShadow: "0 0 0 0.125rem var(--focus-ring-color) inset" },
|
|
21
|
+
_invalid: {
|
|
22
|
+
...frame._invalid,
|
|
23
|
+
zIndex: 1
|
|
24
|
+
},
|
|
25
|
+
_disabled: {
|
|
26
|
+
...frame._disabled,
|
|
27
|
+
boxShadow: "none"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
input: {
|
|
31
|
+
...text,
|
|
32
|
+
background: "transparent",
|
|
33
|
+
borderWidth: 0,
|
|
34
|
+
flex: "1",
|
|
35
|
+
focusVisibleRing: "none",
|
|
36
|
+
height: "100%",
|
|
37
|
+
lineHeight: "normal",
|
|
38
|
+
minWidth: 0,
|
|
39
|
+
padding: 0,
|
|
40
|
+
width: "100%",
|
|
41
|
+
_invalid: { color: "input/text/error" },
|
|
42
|
+
_disabled: {
|
|
43
|
+
...text._disabled,
|
|
44
|
+
cursor: "not-allowed"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
element: {
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
color: "icon/tertiary",
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexShrink: "0",
|
|
52
|
+
_disabled: { color: "icon/disabled" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
variants: { size: {
|
|
56
|
+
md: {
|
|
57
|
+
field: {
|
|
58
|
+
gap: "8",
|
|
59
|
+
paddingInline: variants.size.md.paddingInline,
|
|
60
|
+
"--input-height": variants.size.md["--input-height"]
|
|
61
|
+
},
|
|
62
|
+
input: { textStyle: variants.size.md.textStyle }
|
|
63
|
+
},
|
|
64
|
+
lg: {
|
|
65
|
+
field: {
|
|
66
|
+
gap: "8",
|
|
67
|
+
paddingInline: variants.size.lg.paddingInline,
|
|
68
|
+
"--input-height": variants.size.lg["--input-height"]
|
|
69
|
+
},
|
|
70
|
+
input: { textStyle: variants.size.lg.textStyle }
|
|
71
|
+
}
|
|
72
|
+
} },
|
|
73
|
+
defaultVariants: { size: "lg" }
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { textInputSlotRecipe as default };
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=TextInput.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/TextInput.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { frame, text, variants as inputVariants } from '../common/InputAndTextarea.common';\n\nconst textInputSlotRecipe = defineSlotRecipe({\n className: 'bitkit-text-input',\n slots: ['field', 'input', 'element'],\n base: {\n field: {\n ...frame,\n alignItems: 'center',\n color: 'input/text/inputValue',\n display: 'flex',\n flex: '1',\n height: 'var(--input-height)',\n minWidth: 0,\n '&:has(input:focus-visible)': {\n boxShadow: '0 0 0 0.125rem var(--focus-ring-color) inset',\n },\n _invalid: {\n ...frame._invalid,\n zIndex: 1,\n },\n _disabled: {\n ...frame._disabled,\n boxShadow: 'none',\n },\n },\n input: {\n ...text,\n background: 'transparent',\n borderWidth: 0,\n flex: '1',\n focusVisibleRing: 'none',\n height: '100%',\n lineHeight: 'normal',\n minWidth: 0,\n padding: 0,\n width: '100%',\n _invalid: {\n color: 'input/text/error',\n },\n _disabled: {\n ...text._disabled,\n cursor: 'not-allowed',\n },\n },\n element: {\n alignItems: 'center',\n color: 'icon/tertiary',\n display: 'flex',\n flexShrink: '0',\n _disabled: {\n color: 'icon/disabled',\n },\n },\n },\n variants: {\n size: {\n md: {\n field: {\n gap: '8',\n paddingInline: inputVariants.size.md.paddingInline,\n '--input-height': inputVariants.size.md['--input-height'],\n },\n input: {\n textStyle: inputVariants.size.md.textStyle,\n },\n },\n lg: {\n field: {\n gap: '8',\n paddingInline: inputVariants.size.lg.paddingInline,\n '--input-height': inputVariants.size.lg['--input-height'],\n },\n input: {\n textStyle: inputVariants.size.lg.textStyle,\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default textInputSlotRecipe;\n"],"mappings":";;;AAIA,IAAM,sBAAsB,iBAAiB;CAC3C,WAAW;CACX,OAAO;EAAC;EAAS;EAAS;CAAS;CACnC,MAAM;EACJ,OAAO;GACL,GAAG;GACH,YAAY;GACZ,OAAO;GACP,SAAS;GACT,MAAM;GACN,QAAQ;GACR,UAAU;GACV,8BAA8B,EAC5B,WAAW,+CACb;GACA,UAAU;IACR,GAAG,MAAM;IACT,QAAQ;GACV;GACA,WAAW;IACT,GAAG,MAAM;IACT,WAAW;GACb;EACF;EACA,OAAO;GACL,GAAG;GACH,YAAY;GACZ,aAAa;GACb,MAAM;GACN,kBAAkB;GAClB,QAAQ;GACR,YAAY;GACZ,UAAU;GACV,SAAS;GACT,OAAO;GACP,UAAU,EACR,OAAO,mBACT;GACA,WAAW;IACT,GAAG,KAAK;IACR,QAAQ;GACV;EACF;EACA,SAAS;GACP,YAAY;GACZ,OAAO;GACP,SAAS;GACT,YAAY;GACZ,WAAW,EACT,OAAO,gBACT;EACF;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,OAAO;IACL,KAAK;IACL,eAAe,SAAc,KAAK,GAAG;IACrC,kBAAkB,SAAc,KAAK,GAAG;GAC1C;GACA,OAAO,EACL,WAAW,SAAc,KAAK,GAAG,UACnC;EACF;EACA,IAAI;GACF,OAAO;IACL,KAAK;IACL,eAAe,SAAc,KAAK,GAAG;IACrC,kBAAkB,SAAc,KAAK,GAAG;GAC1C;GACA,OAAO,EACL,WAAW,SAAc,KAAK,GAAG,UACnC;EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
@@ -2394,6 +2394,30 @@ declare const slotRecipes: {
|
|
|
2394
2394
|
};
|
|
2395
2395
|
};
|
|
2396
2396
|
}>;
|
|
2397
|
+
textInput: import('@chakra-ui/react').SlotRecipeDefinition<"input" | "field" | "element", {
|
|
2398
|
+
size: {
|
|
2399
|
+
md: {
|
|
2400
|
+
field: {
|
|
2401
|
+
gap: "8";
|
|
2402
|
+
paddingInline: string;
|
|
2403
|
+
'--input-height': string;
|
|
2404
|
+
};
|
|
2405
|
+
input: {
|
|
2406
|
+
textStyle: "body/md/regular";
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
lg: {
|
|
2410
|
+
field: {
|
|
2411
|
+
gap: "8";
|
|
2412
|
+
paddingInline: string;
|
|
2413
|
+
'--input-height': string;
|
|
2414
|
+
};
|
|
2415
|
+
input: {
|
|
2416
|
+
textStyle: "body/lg/regular";
|
|
2417
|
+
};
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
}>;
|
|
2397
2421
|
toast: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "title" | "icon" | "root" | "closeTrigger" | "indicator" | "description" | "timestamp" | "actionTrigger", {
|
|
2398
2422
|
variant: {
|
|
2399
2423
|
[k: string]: {
|
|
@@ -52,6 +52,7 @@ import tableSlotRecipe from "./Table.recipe.js";
|
|
|
52
52
|
import tabsSlotRecipe from "./Tabs.recipe.js";
|
|
53
53
|
import tagSlotRecipe from "./Tag.recipe.js";
|
|
54
54
|
import tagsInputSlotRecipe from "./TagsInput.recipe.js";
|
|
55
|
+
import textInputSlotRecipe from "./TextInput.recipe.js";
|
|
55
56
|
import toastSlotRecipe from "./Toast.recipe.js";
|
|
56
57
|
import tooltipSlotRecipe from "./Tooltip.recipe.js";
|
|
57
58
|
import treeViewSlotRecipe from "./TreeView.recipe.js";
|
|
@@ -111,6 +112,7 @@ var slotRecipes = {
|
|
|
111
112
|
tabs: tabsSlotRecipe,
|
|
112
113
|
tag: tagSlotRecipe,
|
|
113
114
|
tagsInput: tagsInputSlotRecipe,
|
|
115
|
+
textInput: textInputSlotRecipe,
|
|
114
116
|
toast: toastSlotRecipe,
|
|
115
117
|
tooltip: tooltipSlotRecipe,
|
|
116
118
|
treeView: treeViewSlotRecipe
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport sidebarSlotRecipe from './Sidebar.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n sidebar: sidebarSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n toast: toastSlotRecipe,\n tooltip: tooltipSlotRecipe,\n treeView: treeViewSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport sidebarSlotRecipe from './Sidebar.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n sidebar: sidebarSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n tooltip: tooltipSlotRecipe,\n treeView: treeViewSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAM,cAAc;CAClB,WAAW;CACX,WAAW;CACX,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,aAAa;CACb,aAAa;CACb,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,QAAQ;CACR,eAAe;CACf,QAAQ;CACR,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,cAAc;CACd,UAAU;CACV,YAAY;CACZ,cAAc;CACd,eAAe;CACf,MAAM;CACN,UAAU;CACV,cAAc;CACd,MAAM;CACN,aAAa;CACb,UAAU;CACV,cAAc;CACd,aAAa;CACb,iBAAiB;CACjB,YAAY;CACZ,YAAY;CACZ,oBAAoB;CACpB,SAAS;CACT,YAAY;CACZ,QAAQ;CACR,gBAAgB;CAChB,aAAa;CACb,cAAc;CACd,SAAS;CACT,QAAQ;CACR,cAAc;CACd,aAAa;CACb,MAAM;CACN,WAAW;CACX,OAAO;CACP,QAAQ;CACR,OAAO;CACP,MAAM;CACN,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,SAAS;CACT,UAAU;AACZ"}
|