@ctlyst.id/internal-ui 4.2.5 → 4.2.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
@@ -161,6 +161,7 @@ interface CheckboxComponentProps extends CheckboxProps, PropsWithChildren {
|
|
161
161
|
helpText?: string;
|
162
162
|
errorText?: string;
|
163
163
|
boxProps?: BoxProps;
|
164
|
+
animated?: boolean;
|
164
165
|
}
|
165
166
|
declare const CheckboxComponent: _chakra_ui_react.ComponentWithAs<"input", CheckboxComponentProps>;
|
166
167
|
|
package/dist/index.d.ts
CHANGED
@@ -161,6 +161,7 @@ interface CheckboxComponentProps extends CheckboxProps, PropsWithChildren {
|
|
161
161
|
helpText?: string;
|
162
162
|
errorText?: string;
|
163
163
|
boxProps?: BoxProps;
|
164
|
+
animated?: boolean;
|
164
165
|
}
|
165
166
|
declare const CheckboxComponent: _chakra_ui_react.ComponentWithAs<"input", CheckboxComponentProps>;
|
166
167
|
|
package/dist/index.js
CHANGED
@@ -840,22 +840,16 @@ var import_react13 = require("@chakra-ui/react");
|
|
840
840
|
var Icon = __toESM(require("@ctlyst.id/internal-icon"));
|
841
841
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
842
842
|
var CheckboxComponent = (0, import_react13.forwardRef)(
|
843
|
-
({ isError = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {
|
843
|
+
({ isError = false, animated = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {
|
844
844
|
const { state } = (0, import_react13.useCheckbox)(rest);
|
845
845
|
const variant = isError ? "errors" : "unstyled";
|
846
|
+
const renderIcon2 = () => {
|
847
|
+
if (state.isChecked) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon.Check, { size: 3, color: "inherit" });
|
848
|
+
if (state.isIndeterminate) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon.MinusLine, { size: 3, color: "inherit" });
|
849
|
+
return void 0;
|
850
|
+
};
|
846
851
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react13.Box, { children: [
|
847
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Box, { display: "flex", ...boxProps, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
848
|
-
import_react13.Checkbox,
|
849
|
-
{
|
850
|
-
variant,
|
851
|
-
ref,
|
852
|
-
...rest,
|
853
|
-
isDisabled,
|
854
|
-
color: "white",
|
855
|
-
icon: state.isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon.MinusLine, { size: 3, color: "inherit" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon.Check, { size: 3, color: "inherit" }),
|
856
|
-
children: children && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children })
|
857
|
-
}
|
858
|
-
) }),
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Box, { display: "flex", ...boxProps, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Checkbox, { variant, ref, ...rest, isDisabled, color: "white", icon: renderIcon2(), children: children && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
859
853
|
(isError && errorText || helpText) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Box, { mt: "1", ml: "6", children: isError ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
860
854
|
] });
|
861
855
|
}
|
@@ -7495,12 +7489,12 @@ var variantSimple = definePartsStyle10((props) => {
|
|
7495
7489
|
th: {
|
7496
7490
|
color: "black.high",
|
7497
7491
|
borderBottom: "1px",
|
7498
|
-
borderColor: (0, import_theme_tools3.mode)(`${c}.
|
7492
|
+
borderColor: (0, import_theme_tools3.mode)(`${c}.300`, `${c}.700`)(props),
|
7499
7493
|
...numericStyles
|
7500
7494
|
},
|
7501
7495
|
td: {
|
7502
7496
|
borderBottom: "1px",
|
7503
|
-
borderColor: (0, import_theme_tools3.mode)(`${c}.
|
7497
|
+
borderColor: (0, import_theme_tools3.mode)(`${c}.300`, `${c}.700`)(props),
|
7504
7498
|
...numericStyles
|
7505
7499
|
},
|
7506
7500
|
caption: {
|
@@ -7521,12 +7515,12 @@ var variantStripe = definePartsStyle10((props) => {
|
|
7521
7515
|
th: {
|
7522
7516
|
color: "black.high",
|
7523
7517
|
borderBottom: "1px",
|
7524
|
-
borderColor: (0, import_theme_tools3.mode)(`${c}.
|
7518
|
+
borderColor: (0, import_theme_tools3.mode)(`${c}.300`, `${c}.700`)(props),
|
7525
7519
|
...numericStyles
|
7526
7520
|
},
|
7527
7521
|
td: {
|
7528
7522
|
borderBottom: "1px",
|
7529
|
-
borderColor: (0, import_theme_tools3.mode)(`${c}.
|
7523
|
+
borderColor: (0, import_theme_tools3.mode)(`${c}.300`, `${c}.700`)(props),
|
7530
7524
|
...numericStyles
|
7531
7525
|
},
|
7532
7526
|
caption: {
|
@@ -7623,7 +7617,7 @@ var tableTheme = defineMultiStyleConfig10({
|
|
7623
7617
|
defaultProps: {
|
7624
7618
|
variant: "simple",
|
7625
7619
|
size: "md",
|
7626
|
-
colorScheme: "
|
7620
|
+
colorScheme: "neutral"
|
7627
7621
|
}
|
7628
7622
|
});
|
7629
7623
|
var table_default = tableTheme;
|