@ctlyst.id/internal-ui 4.0.2 → 4.0.3

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/index.mjs CHANGED
@@ -4731,12 +4731,20 @@ var InputOption = ({
4731
4731
  (data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx57(
4732
4732
  Checkbox3,
4733
4733
  {
4734
+ onClick: (e) => e.stopPropagation(),
4734
4735
  isChecked: checkedState === CHECKBOX_STATE.CHECKED,
4735
4736
  isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
4736
4737
  isDisabled,
4737
4738
  "data-test-id": "CT_component_select-checkbox_select-all-option"
4738
4739
  }
4739
- ) : /* @__PURE__ */ jsx57(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
4740
+ ) : /* @__PURE__ */ jsx57(
4741
+ Checkbox3,
4742
+ {
4743
+ onClick: (e) => e.stopPropagation(),
4744
+ isChecked: isSelected,
4745
+ "data-test-id": "CT_component_select-checkbox_option-checkbox"
4746
+ }
4747
+ ),
4740
4748
  /* @__PURE__ */ jsx57(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
4741
4749
  ]
4742
4750
  }
@@ -5475,7 +5483,8 @@ var TimeInput2 = forwardRef12(
5475
5483
  );
5476
5484
 
5477
5485
  // src/components/toast/components/toast.tsx
5478
- import { chakra as chakra7, Flex as Flex18, Link as Link6, useToken } from "@chakra-ui/react";
5486
+ import { Box as Box30, chakra as chakra7, Flex as Flex18, Link as Link6, useToken } from "@chakra-ui/react";
5487
+ import { Close as Close6 } from "@ctlyst.id/internal-icon";
5479
5488
  import { Bounce, toast } from "react-toastify";
5480
5489
 
5481
5490
  // src/components/toast/components/styles.tsx
@@ -5515,6 +5524,10 @@ var styles_default2 = Styles2;
5515
5524
 
5516
5525
  // src/components/toast/components/toast.tsx
5517
5526
  import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs30 } from "react/jsx-runtime";
5527
+ var CustomCloseButton = (props) => {
5528
+ const { closeToast } = props;
5529
+ return /* @__PURE__ */ jsx65(Box30, { p: 2, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: closeToast, children: /* @__PURE__ */ jsx65(Close6, { size: 4, color: "white" }) });
5530
+ };
5518
5531
  var DEFAULT_OPTIONS = {
5519
5532
  position: "top-right",
5520
5533
  autoClose: 5e3,
@@ -5524,7 +5537,7 @@ var DEFAULT_OPTIONS = {
5524
5537
  draggable: true,
5525
5538
  icon: false,
5526
5539
  theme: "colored",
5527
- closeButton: true,
5540
+ closeButton: CustomCloseButton,
5528
5541
  className: "container-toast",
5529
5542
  transition: Bounce
5530
5543
  };
@@ -5633,7 +5646,7 @@ import { ToastContainer } from "react-toastify";
5633
5646
 
5634
5647
  // src/components/uploader/components/uploader.tsx
5635
5648
  import {
5636
- Box as Box30,
5649
+ Box as Box31,
5637
5650
  Button as Button7,
5638
5651
  Flex as Flex19,
5639
5652
  FormControl as FormControl4,
@@ -5828,7 +5841,7 @@ var Uploader = ({
5828
5841
  }
5829
5842
  return helperText;
5830
5843
  };
5831
- const renderErrorText = (text2) => /* @__PURE__ */ jsx66(Box30, { mb: 2, children: /* @__PURE__ */ jsx66(Text18, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
5844
+ const renderErrorText = (text2) => /* @__PURE__ */ jsx66(Box31, { mb: 2, children: /* @__PURE__ */ jsx66(Text18, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
5832
5845
  const handleRemove = (e) => {
5833
5846
  e.stopPropagation();
5834
5847
  setFilePreview(void 0);
@@ -5877,7 +5890,7 @@ var Uploader = ({
5877
5890
  ...props,
5878
5891
  ...getRootProps(),
5879
5892
  children: [
5880
- filePreview && isShowCloseButton && /* @__PURE__ */ jsx66(Box30, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ jsx66(
5893
+ filePreview && isShowCloseButton && /* @__PURE__ */ jsx66(Box31, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ jsx66(
5881
5894
  Button7,
5882
5895
  {
5883
5896
  "data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
@@ -5895,7 +5908,7 @@ var Uploader = ({
5895
5908
  children: /* @__PURE__ */ jsx66(X, { size: 3, color: "white" })
5896
5909
  }
5897
5910
  ) }),
5898
- filePreview && /* @__PURE__ */ jsx66(Box30, { w: "full", children: /* @__PURE__ */ jsx66(
5911
+ filePreview && /* @__PURE__ */ jsx66(Box31, { w: "full", children: /* @__PURE__ */ jsx66(
5899
5912
  Flex19,
5900
5913
  {
5901
5914
  position: "relative",
@@ -5915,7 +5928,7 @@ var Uploader = ({
5915
5928
  ) }),
5916
5929
  !filePreview && /* @__PURE__ */ jsx66(Fragment12, { children: isDragActive ? /* @__PURE__ */ jsx66(Text18, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs31(Flex19, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
5917
5930
  size2 === "sm" && /* @__PURE__ */ jsx66(Plus, { size: 6, color }),
5918
- /* @__PURE__ */ jsxs31(Box30, { children: [
5931
+ /* @__PURE__ */ jsxs31(Box31, { children: [
5919
5932
  !filePreview && /* @__PURE__ */ jsx66(
5920
5933
  Heading2,
5921
5934
  {