@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.mjs CHANGED
@@ -461,22 +461,16 @@ import { Box as Box5, Checkbox, forwardRef as forwardRef7, Text as Text2, useChe
461
461
  import * as Icon from "@ctlyst.id/internal-icon";
462
462
  import { jsx as jsx16, jsxs as jsxs2 } from "react/jsx-runtime";
463
463
  var CheckboxComponent = forwardRef7(
464
- ({ isError = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {
464
+ ({ isError = false, animated = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {
465
465
  const { state } = useCheckbox(rest);
466
466
  const variant = isError ? "errors" : "unstyled";
467
+ const renderIcon2 = () => {
468
+ if (state.isChecked) return /* @__PURE__ */ jsx16(Icon.Check, { size: 3, color: "inherit" });
469
+ if (state.isIndeterminate) return /* @__PURE__ */ jsx16(Icon.MinusLine, { size: 3, color: "inherit" });
470
+ return void 0;
471
+ };
467
472
  return /* @__PURE__ */ jsxs2(Box5, { children: [
468
- /* @__PURE__ */ jsx16(Box5, { display: "flex", ...boxProps, children: /* @__PURE__ */ jsx16(
469
- Checkbox,
470
- {
471
- variant,
472
- ref,
473
- ...rest,
474
- isDisabled,
475
- color: "white",
476
- icon: state.isIndeterminate ? /* @__PURE__ */ jsx16(Icon.MinusLine, { size: 3, color: "inherit" }) : /* @__PURE__ */ jsx16(Icon.Check, { size: 3, color: "inherit" }),
477
- children: children && /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children })
478
- }
479
- ) }),
473
+ /* @__PURE__ */ jsx16(Box5, { display: "flex", ...boxProps, children: /* @__PURE__ */ jsx16(Checkbox, { variant, ref, ...rest, isDisabled, color: "white", icon: renderIcon2(), children: children && /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
480
474
  (isError && errorText || helpText) && /* @__PURE__ */ jsx16(Box5, { mt: "1", ml: "6", children: isError ? /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
481
475
  ] });
482
476
  }
@@ -7415,12 +7409,12 @@ var variantSimple = definePartsStyle10((props) => {
7415
7409
  th: {
7416
7410
  color: "black.high",
7417
7411
  borderBottom: "1px",
7418
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7412
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7419
7413
  ...numericStyles
7420
7414
  },
7421
7415
  td: {
7422
7416
  borderBottom: "1px",
7423
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7417
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7424
7418
  ...numericStyles
7425
7419
  },
7426
7420
  caption: {
@@ -7441,12 +7435,12 @@ var variantStripe = definePartsStyle10((props) => {
7441
7435
  th: {
7442
7436
  color: "black.high",
7443
7437
  borderBottom: "1px",
7444
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7438
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7445
7439
  ...numericStyles
7446
7440
  },
7447
7441
  td: {
7448
7442
  borderBottom: "1px",
7449
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7443
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7450
7444
  ...numericStyles
7451
7445
  },
7452
7446
  caption: {
@@ -7543,7 +7537,7 @@ var tableTheme = defineMultiStyleConfig10({
7543
7537
  defaultProps: {
7544
7538
  variant: "simple",
7545
7539
  size: "md",
7546
- colorScheme: "gray"
7540
+ colorScheme: "neutral"
7547
7541
  }
7548
7542
  });
7549
7543
  var table_default = tableTheme;