@ctlyst.id/internal-ui 3.3.13 → 3.3.15

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.d.mts CHANGED
@@ -726,7 +726,7 @@ declare class Time {
726
726
  }
727
727
  interface TimeInputProps {
728
728
  config?: TimeOptions;
729
- value?: string;
729
+ value?: Time;
730
730
  seconds?: boolean;
731
731
  onChangeTime?: (time: Time) => void;
732
732
  isDisabled?: boolean;
package/dist/index.d.ts CHANGED
@@ -726,7 +726,7 @@ declare class Time {
726
726
  }
727
727
  interface TimeInputProps {
728
728
  config?: TimeOptions;
729
- value?: string;
729
+ value?: Time;
730
730
  seconds?: boolean;
731
731
  onChangeTime?: (time: Time) => void;
732
732
  isDisabled?: boolean;
package/dist/index.js CHANGED
@@ -1424,16 +1424,25 @@ var DataTable = React5.forwardRef((props, ref) => {
1424
1424
  w: "full",
1425
1425
  ...container,
1426
1426
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react28.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
1427
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Th, { colSpan: header.colSpan, width: header.getSize(), ...styles == null ? void 0 : styles.tableColumnHeader, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1428
- import_react28.Flex,
1427
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1428
+ import_react28.Th,
1429
1429
  {
1430
- "data-test-id": "CT_component_data-table_loader",
1431
- textTransform: "capitalize",
1432
- align: "center",
1433
- gap: 2,
1434
- children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext())
1435
- }
1436
- ) }, header.id)) }, headerGroup.id)) }),
1430
+ colSpan: header.colSpan,
1431
+ width: `${header.getSize()}px`,
1432
+ ...styles == null ? void 0 : styles.tableColumnHeader,
1433
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1434
+ import_react28.Flex,
1435
+ {
1436
+ "data-test-id": "CT_component_data-table_loader",
1437
+ textTransform: "capitalize",
1438
+ align: "center",
1439
+ gap: 2,
1440
+ children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext())
1441
+ }
1442
+ )
1443
+ },
1444
+ header.id
1445
+ )) }, headerGroup.id)) }),
1437
1446
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Td, { width: 210, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i) }, i)) }, num)) })
1438
1447
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react28.Table, { ...styles == null ? void 0 : styles.table, children: [
1439
1448
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
@@ -1448,7 +1457,7 @@ var DataTable = React5.forwardRef((props, ref) => {
1448
1457
  {
1449
1458
  colSpan: header.colSpan,
1450
1459
  sx: getCommonPinningStyles(header.column),
1451
- width: header.getSize(),
1460
+ width: `${header.getSize()}px`,
1452
1461
  ...styles == null ? void 0 : styles.tableColumnHeader,
1453
1462
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1454
1463
  import_react28.Flex,
@@ -4889,7 +4898,8 @@ var InputTimeArea = (0, import_react84.forwardRef)((props, ref) => {
4889
4898
  px: "2px",
4890
4899
  py: 0,
4891
4900
  sx: {
4892
- fontVariantNumeric: "tabular-nums"
4901
+ fontVariantNumeric: "tabular-nums",
4902
+ fontSize: 12
4893
4903
  },
4894
4904
  ...props
4895
4905
  }
@@ -4910,10 +4920,12 @@ var TimeInput2 = (0, import_react84.forwardRef)(
4910
4920
  isSuccess,
4911
4921
  onChangeTime
4912
4922
  }, ref) => {
4913
- const dateVal = value != null ? value : config2 == null ? void 0 : config2.date;
4923
+ const timeVal = value != null ? value : new Time(0, 0, 0);
4924
+ const dateVal = /* @__PURE__ */ new Date();
4925
+ dateVal.setHours(timeVal.hours, timeVal.minutes, timeVal.seconds, 0);
4914
4926
  const defaultDate = /* @__PURE__ */ new Date();
4915
4927
  defaultDate.setHours(0, 0, 0, 0);
4916
- const date = dateVal ? new Date(dateVal) : defaultDate;
4928
+ const date = dateVal || defaultDate;
4917
4929
  const timeValue = new Time();
4918
4930
  const { getRootProps, getInputProps, options, update, _manager } = useTimescape({
4919
4931
  date,
@@ -5279,7 +5291,16 @@ var Uploader = ({
5279
5291
  });
5280
5292
  const renderHelperText = () => {
5281
5293
  if (Array.isArray(helperText)) {
5282
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.UnorderedList, { pl: 2, fontSize: 12, color: "gray.600", "data-test-id": "CT_component_base-image-uploader_helperText", children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.ListItem, { children: text2 }, text2)) });
5294
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5295
+ import_react88.UnorderedList,
5296
+ {
5297
+ pl: 2,
5298
+ fontSize: 12,
5299
+ color: "black.medium",
5300
+ "data-test-id": "CT_component_base-image-uploader_helperText",
5301
+ children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.ListItem, { children: text2 }, text2))
5302
+ }
5303
+ );
5283
5304
  }
5284
5305
  return helperText;
5285
5306
  };
@@ -5306,7 +5327,6 @@ var Uploader = ({
5306
5327
  const color = isDisabled ? "neutral.500" : "primary.500";
5307
5328
  const containerHeight = !isSmall ? "160px" : "120px";
5308
5329
  const cursorType = filePreview ? "initial" : "pointer";
5309
- console.log(isDragActive);
5310
5330
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.FormControl, { isRequired, children: [
5311
5331
  label && typeof label === "string" ? (
5312
5332
  // eslint-disable-next-line react/jsx-no-useless-fragment