@ctlyst.id/internal-ui 5.0.0 → 5.0.1

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
@@ -924,10 +924,10 @@ import { css } from "@emotion/react";
924
924
  import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
925
925
  import * as React5 from "react";
926
926
 
927
- // src/hooks/useDragOrClick.ts
927
+ // src/hooks/use-drag-threshold/use-drag-or-click.ts
928
928
  import { useRef } from "react";
929
929
 
930
- // src/components/data-table/drag-threshold.ts
930
+ // src/hooks/use-drag-threshold/drag-threshold.ts
931
931
  var DragThreshold = class {
932
932
  constructor() {
933
933
  __publicField(this, "isDrag");
@@ -966,7 +966,7 @@ var DragThreshold = class {
966
966
  }
967
967
  };
968
968
 
969
- // src/hooks/useDragOrClick.ts
969
+ // src/hooks/use-drag-threshold/use-drag-or-click.ts
970
970
  var useDragOrClick = () => {
971
971
  const clickOrDragged = useRef(new DragThreshold());
972
972
  const getDragOrClickProps = ({
@@ -1404,6 +1404,16 @@ var DataTable = React5.forwardRef((props, ref) => {
1404
1404
  });
1405
1405
  var data_table_default = DataTable;
1406
1406
 
1407
+ // src/components/data-table/hook/use-select-table.ts
1408
+ import React6 from "react";
1409
+ var useSelectTable = (intialRowSelection) => {
1410
+ const [rowSelection, onRowSelectionChange] = React6.useState(intialRowSelection != null ? intialRowSelection : {});
1411
+ return {
1412
+ rowSelection,
1413
+ onRowSelectionChange
1414
+ };
1415
+ };
1416
+
1407
1417
  // src/components/datepicker/components/datepicker.tsx
1408
1418
  import { FormControl as FormControl3, FormErrorMessage as FormErrorMessage3, FormHelperText as FormHelperText3, IconButton as IconButton4 } from "@chakra-ui/react";
1409
1419
  import { cx as cx8 } from "@chakra-ui/shared-utils";
@@ -2787,10 +2797,10 @@ var styles_default = Styles;
2787
2797
 
2788
2798
  // src/components/datepicker/components/time-input.tsx
2789
2799
  import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text4 } from "@chakra-ui/react";
2790
- import React6 from "react";
2800
+ import React7 from "react";
2791
2801
  import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
2792
2802
  var TimeInput = ({ value, onChange, label, rightAddon }) => {
2793
- const [time, setTime] = React6.useState(value || "00:00");
2803
+ const [time, setTime] = React7.useState(value || "00:00");
2794
2804
  const handleChange = (e) => {
2795
2805
  var _a, _b;
2796
2806
  setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
@@ -2950,10 +2960,10 @@ var datepicker_default = Datepicker;
2950
2960
  // src/components/datepicker/components/datepicker-month/datepicker-month.tsx
2951
2961
  import { Box as Box12, Input as Input2 } from "@chakra-ui/react";
2952
2962
  import { css as css2 } from "@emotion/react";
2953
- import React7 from "react";
2963
+ import React8 from "react";
2954
2964
  import { jsx as jsx28 } from "react/jsx-runtime";
2955
2965
  var DatePickerMonth = ({ onChange, min, max, ...props }) => {
2956
- const [date, setDate] = React7.useState(null);
2966
+ const [date, setDate] = React8.useState(null);
2957
2967
  return /* @__PURE__ */ jsx28(
2958
2968
  Box12,
2959
2969
  {
@@ -3009,7 +3019,7 @@ var datepicker_month_default = DatePickerMonth;
3009
3019
  // src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
3010
3020
  import { Box as Box13 } from "@chakra-ui/react";
3011
3021
  import styled from "@emotion/styled";
3012
- import React8 from "react";
3022
+ import React9 from "react";
3013
3023
  import { jsx as jsx29, jsxs as jsxs11 } from "react/jsx-runtime";
3014
3024
  var MultiDateWrapper = styled(Box13)`
3015
3025
  display: flex;
@@ -3026,7 +3036,7 @@ var MultiDatePickerMonth = ({
3026
3036
  min = "2020-01-01",
3027
3037
  max = "2020-12-31"
3028
3038
  }) => {
3029
- const [date, setDate] = React8.useState([null, null]);
3039
+ const [date, setDate] = React9.useState([null, null]);
3030
3040
  return /* @__PURE__ */ jsxs11(MultiDateWrapper, { isError, children: [
3031
3041
  /* @__PURE__ */ jsx29(
3032
3042
  datepicker_month_default,
@@ -4125,7 +4135,7 @@ var pagination_detail_default = PaginationDetail;
4125
4135
 
4126
4136
  // src/components/pagination/components/pagination-filter.tsx
4127
4137
  import { Box as Box24, Select, Text as Text12, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
4128
- import * as React9 from "react";
4138
+ import * as React10 from "react";
4129
4139
  import { FiChevronDown } from "react-icons/fi";
4130
4140
  import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
4131
4141
  var PaginationFilter = ({
@@ -4135,7 +4145,7 @@ var PaginationFilter = ({
4135
4145
  onChange,
4136
4146
  ...rest
4137
4147
  }) => {
4138
- const [value, setValue] = React9.useState(limit);
4148
+ const [value, setValue] = React10.useState(limit);
4139
4149
  return /* @__PURE__ */ jsxs22(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
4140
4150
  /* @__PURE__ */ jsx49(Text12, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue6("neutral.900", "white"), ...rest, children: label }),
4141
4151
  /* @__PURE__ */ jsx49(
@@ -8266,6 +8276,7 @@ export {
8266
8276
  useRadio,
8267
8277
  useRadioGroup,
8268
8278
  useRadioGroupContext,
8279
+ useSelectTable,
8269
8280
  useSteps,
8270
8281
  useTab2 as useTab,
8271
8282
  useTabIndicator,