akeyless-client-commons 1.1.82 → 1.1.84

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.
@@ -373,7 +373,6 @@ interface DatePickerProps {
373
373
  fromText?: string;
374
374
  toText?: string;
375
375
  buttonText?: string;
376
- locale?: string;
377
376
  }
378
377
 
379
378
  declare const Version: ({ version, className }: {
@@ -630,7 +629,8 @@ interface ElementsContainerProps extends BaseElementProps {
630
629
  declare const ElementsContainer: React$1.MemoExoticComponent<(props: ElementsContainerProps) => react_jsx_runtime.JSX.Element>;
631
630
 
632
631
  declare const ConfirmForm: ({ onV, onX, headline, direction, containerClassName, buttonsContainerClassName, headlineClassName, cancelButtonClassName, confirmButtonClassName, cancelButtonProps, confirmButtonProps, cancelElement, confirmElement, }: ConfirmFormProps) => react_jsx_runtime.JSX.Element;
633
- declare const DatePicker: ({ submit, formClassName, labelsClassName, inputsClassName, buttonClassName, buttonStyle, defaultFrom, defaultTo, direction, fromText, toText, buttonText, locale, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
632
+ declare const DatePicker: ({ submit, formClassName, labelsClassName, inputsClassName, buttonClassName, buttonStyle, defaultFrom, defaultTo, direction, fromText, toText, buttonText, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
633
+ declare function DatePicker2({ submit, formClassName, labelsClassName, inputsClassName, buttonClassName, buttonStyle, defaultFrom, defaultTo, direction, fromText, toText, buttonText, }: DatePickerProps): react_jsx_runtime.JSX.Element;
634
634
 
635
635
  interface CodeInputProps {
636
636
  codeValue: string;
@@ -641,4 +641,4 @@ interface CodeInputProps {
641
641
  }
642
642
  declare function CodeInput({ codeValue, setCodeValue, className, slotContainerClassName, direction }: CodeInputProps): react_jsx_runtime.JSX.Element;
643
643
 
644
- export { Badge, type BadgeProps, BooleanUi, Button, type ButtonProps, type CheckBoxProps, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, type ElementsContainerProps, ErrorBoundary, ExportToExcel, Filter, type FilterProps, FormElementContainer, FormSeparator, GeoUi, type GeoUiProps, Input, InputContainer, InternationalPhonePicker, LeftToRightDiv, Loader, type LoaderProps, LoginWithGoogleButton, type LoginWithGoogleCallback, MaxRowsLabel, ModularForm, MultiSelect, type MultipleSelectorOption, type MultipleSelectorProps, type MultipleSelectorRef, NumberUI, type NumberUIProps, PhoneUI, ProgressComponent, Search, type SearchSelectOptions, type SearchSelectProps, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, type TableProps, TableProvider, type TableProviderType, TableRow, TextAreaContainer, TimesUI, type UseFilterProps, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
644
+ export { Badge, type BadgeProps, BooleanUi, Button, type ButtonProps, type CheckBoxProps, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DatePicker2, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, type ElementsContainerProps, ErrorBoundary, ExportToExcel, Filter, type FilterProps, FormElementContainer, FormSeparator, GeoUi, type GeoUiProps, Input, InputContainer, InternationalPhonePicker, LeftToRightDiv, Loader, type LoaderProps, LoginWithGoogleButton, type LoginWithGoogleCallback, MaxRowsLabel, ModularForm, MultiSelect, type MultipleSelectorOption, type MultipleSelectorProps, type MultipleSelectorRef, NumberUI, type NumberUIProps, PhoneUI, ProgressComponent, Search, type SearchSelectOptions, type SearchSelectProps, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, type TableProps, TableProvider, type TableProviderType, TableRow, TextAreaContainer, TimesUI, type UseFilterProps, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
@@ -443,6 +443,9 @@ __export(index_exports, {
443
443
  DatePicker: function() {
444
444
  return DatePicker;
445
445
  },
446
+ DatePicker2: function() {
447
+ return DatePicker2;
448
+ },
446
449
  DisplayAllRowsButton: function() {
447
450
  return DisplayAllRowsButton;
448
451
  },
@@ -6945,33 +6948,141 @@ var ModularForm_default = ModularForm;
6945
6948
  // src/components/forms/index.tsx
6946
6949
  var import_react18 = require("react");
6947
6950
  var import_moment2 = __toESM(require("moment"));
6951
+ var import_lucide_react7 = require("lucide-react");
6952
+ var import_react_aria_components3 = require("react-aria-components");
6953
+ // src/components/ui/calendar-rac.tsx
6954
+ var import_date = require("@internationalized/date");
6955
+ var import_lucide_react6 = require("lucide-react");
6956
+ var import_react_aria_components = require("react-aria-components");
6948
6957
  var import_jsx_runtime22 = require("react/jsx-runtime");
6958
+ function CalendarHeader() {
6959
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("header", {
6960
+ className: "flex w-full items-center gap-1 pb-1",
6961
+ children: [
6962
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.Button, {
6963
+ className: "flex size-9 items-center justify-center rounded-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:bg-accent hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50",
6964
+ slot: "previous",
6965
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react6.ChevronLeftIcon, {
6966
+ size: 16
6967
+ })
6968
+ }),
6969
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.Heading, {
6970
+ className: "grow text-center font-medium text-sm"
6971
+ }),
6972
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.Button, {
6973
+ className: "flex size-9 items-center justify-center rounded-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:bg-accent hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50",
6974
+ slot: "next",
6975
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react6.ChevronRightIcon, {
6976
+ size: 16
6977
+ })
6978
+ })
6979
+ ]
6980
+ });
6981
+ }
6982
+ function CalendarGridComponent(param) {
6983
+ var _param_isRange = param.isRange, isRange = _param_isRange === void 0 ? false : _param_isRange;
6984
+ var now = (0, import_date.today)((0, import_date.getLocalTimeZone)());
6985
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_aria_components.CalendarGrid, {
6986
+ children: [
6987
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.CalendarGridHeader, {
6988
+ children: function(day) {
6989
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.CalendarHeaderCell, {
6990
+ className: "size-9 rounded-md p-0 font-medium text-muted-foreground/80 text-xs",
6991
+ children: day
6992
+ });
6993
+ }
6994
+ }),
6995
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.CalendarGridBody, {
6996
+ className: "[&_td]:px-0 [&_td]:py-px",
6997
+ children: function(date) {
6998
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components.CalendarCell, {
6999
+ className: cn("relative flex size-9 items-center justify-center whitespace-nowrap rounded-md p-0 font-normal text-foreground text-sm outline-none duration-150 [transition-property:color,background-color,border-radius,box-shadow] data-disabled:pointer-events-none data-unavailable:pointer-events-none data-focus-visible:z-10 data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground data-selected:text-primary-foreground data-unavailable:line-through data-disabled:opacity-30 data-unavailable:opacity-30 data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50", // Range-specific styles
7000
+ isRange && "data-invalid:data-selection-end:bg-destructive data-invalid:data-selection-start:bg-destructive data-invalid:data-selection-end:text-white data-invalid:data-selection-start:text-white data-selected:rounded-none data-selection-start:rounded-s-md data-selection-end:rounded-e-md data-invalid:bg-red-100 data-selected:bg-accent data-selection-end:bg-primary data-selection-start:bg-primary data-selected:text-foreground data-selection-end:text-primary-foreground data-selection-start:text-primary-foreground", // Today indicator styles
7001
+ date.compare(now) === 0 && cn("after:-translate-x-1/2 after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10 after:size-[3px] after:rounded-full after:bg-primary", isRange ? "data-selection-end:after:bg-background data-selection-start:after:bg-background" : "data-selected:after:bg-background")),
7002
+ date: date
7003
+ });
7004
+ }
7005
+ })
7006
+ ]
7007
+ });
7008
+ }
7009
+ function Calendar(_param) {
7010
+ var className = _param.className, props = _object_without_properties(_param, [
7011
+ "className"
7012
+ ]);
7013
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_aria_components.Calendar, _object_spread_props(_object_spread({}, props), {
7014
+ className: (0, import_react_aria_components.composeRenderProps)(className, function(className2) {
7015
+ return cn("w-fit", className2);
7016
+ }),
7017
+ children: [
7018
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CalendarHeader, {}),
7019
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CalendarGridComponent, {})
7020
+ ]
7021
+ }));
7022
+ }
7023
+ // src/components/ui/datefield-rac.tsx
7024
+ var import_react_aria_components2 = require("react-aria-components");
7025
+ var import_jsx_runtime23 = require("react/jsx-runtime");
7026
+ function DateSegment(_param) {
7027
+ var className = _param.className, props = _object_without_properties(_param, [
7028
+ "className"
7029
+ ]);
7030
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components2.DateSegment, _object_spread_props(_object_spread({
7031
+ className: (0, import_react_aria_components2.composeRenderProps)(className, function(className2) {
7032
+ return cn("inline rounded p-0.5 text-foreground caret-transparent outline-hidden data-invalid:data-focused:bg-destructive data-focused:data-placeholder:text-foreground data-invalid:data-focused:text-white data-invalid:data-placeholder:text-destructive data-disabled:cursor-not-allowed data-focused:bg-accent data-[type=literal]:px-0 data-[type=literal]:text-muted-foreground/70 data-focused:text-foreground data-invalid:data-focused:data-placeholder:text-white data-invalid:text-destructive data-placeholder:text-muted-foreground/70 data-disabled:opacity-50", className2);
7033
+ })
7034
+ }, props), {
7035
+ "data-invalid": true
7036
+ }));
7037
+ }
7038
+ var dateInputStyle = "relative inline-flex h-9 w-full items-center overflow-hidden whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none data-focus-within:border-ring data-focus-within:ring-ring/50 data-focus-within:ring-[3px] data-focus-within:has-aria-invalid:ring-destructive/20 dark:data-focus-within:has-aria-invalid:ring-destructive/40 data-focus-within:has-aria-invalid:border-destructive";
7039
+ function DateInput(_param) {
7040
+ var className = _param.className, _param_unstyled = _param.unstyled, unstyled = _param_unstyled === void 0 ? false : _param_unstyled, props = _object_without_properties(_param, [
7041
+ "className",
7042
+ "unstyled"
7043
+ ]);
7044
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components2.DateInput, _object_spread_props(_object_spread({
7045
+ className: (0, import_react_aria_components2.composeRenderProps)(className, function(className2) {
7046
+ return cn(!unstyled && dateInputStyle, className2);
7047
+ })
7048
+ }, props), {
7049
+ children: function(segment) {
7050
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DateSegment, {
7051
+ segment: segment
7052
+ });
7053
+ }
7054
+ }));
7055
+ }
7056
+ // src/components/forms/index.tsx
7057
+ var import_react_aria_components4 = require("react-aria-components");
7058
+ var import_date2 = require("@internationalized/date");
7059
+ var import_jsx_runtime24 = require("react/jsx-runtime");
6949
7060
  var ConfirmForm = function(param) {
6950
7061
  var onV = param.onV, onX = param.onX, _param_headline = param.headline, headline = _param_headline === void 0 ? "" : _param_headline, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_buttonsContainerClassName = param.buttonsContainerClassName, buttonsContainerClassName = _param_buttonsContainerClassName === void 0 ? "" : _param_buttonsContainerClassName, _param_headlineClassName = param.headlineClassName, headlineClassName = _param_headlineClassName === void 0 ? "" : _param_headlineClassName, _param_cancelButtonClassName = param.cancelButtonClassName, cancelButtonClassName = _param_cancelButtonClassName === void 0 ? "" : _param_cancelButtonClassName, _param_confirmButtonClassName = param.confirmButtonClassName, confirmButtonClassName = _param_confirmButtonClassName === void 0 ? "" : _param_confirmButtonClassName, _param_cancelButtonProps = param.cancelButtonProps, cancelButtonProps = _param_cancelButtonProps === void 0 ? {} : _param_cancelButtonProps, _param_confirmButtonProps = param.confirmButtonProps, confirmButtonProps = _param_confirmButtonProps === void 0 ? {} : _param_confirmButtonProps, cancelElement = param.cancelElement, confirmElement = param.confirmElement;
6951
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", {
7062
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", {
6952
7063
  style: {
6953
7064
  direction: direction,
6954
7065
  padding: "30px"
6955
7066
  },
6956
7067
  className: cn("w-full h-full flex flex-col gap-3", containerClassName),
6957
7068
  children: [
6958
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", {
7069
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", {
6959
7070
  className: cn("text-lg font-bold", headlineClassName),
6960
7071
  children: headline
6961
7072
  }),
6962
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", {
7073
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", {
6963
7074
  className: cn("flex justify-center items-center gap-2 w-full", buttonsContainerClassName),
6964
7075
  children: [
6965
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", {
7076
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", {
6966
7077
  className: cn("disabled:cursor-not-allowed opacity-70", cancelButtonClassName),
6967
7078
  onClick: onX,
6968
- children: cancelElement || /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RedXSvg, {})
7079
+ children: cancelElement || /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RedXSvg, {})
6969
7080
  }),
6970
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", _object_spread_props(_object_spread({
7081
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", _object_spread_props(_object_spread({
6971
7082
  className: cn("disabled:cursor-not-allowed opacity-70", confirmButtonClassName)
6972
7083
  }, confirmButtonProps), {
6973
7084
  onClick: onV,
6974
- children: confirmElement || /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GreenVSvg, {})
7085
+ children: confirmElement || /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(GreenVSvg, {})
6975
7086
  }))
6976
7087
  ]
6977
7088
  })
@@ -6990,7 +7101,7 @@ var DatePicker = function(param) {
6990
7101
  return function(form) {
6991
7102
  return _ref.apply(this, arguments);
6992
7103
  };
6993
- }() : _param_submit, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_labelsClassName = param.labelsClassName, labelsClassName = _param_labelsClassName === void 0 ? "" : _param_labelsClassName, _param_inputsClassName = param.inputsClassName, inputsClassName = _param_inputsClassName === void 0 ? "" : _param_inputsClassName, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, _param_buttonStyle = param.buttonStyle, buttonStyle = _param_buttonStyle === void 0 ? {} : _param_buttonStyle, defaultFrom = param.defaultFrom, defaultTo = param.defaultTo, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_fromText = param.fromText, fromText = _param_fromText === void 0 ? "From date" : _param_fromText, _param_toText = param.toText, toText = _param_toText === void 0 ? "To date" : _param_toText, _param_buttonText = param.buttonText, buttonText = _param_buttonText === void 0 ? "Search" : _param_buttonText, _param_locale = param.locale, locale = _param_locale === void 0 ? "en-US" : _param_locale;
7104
+ }() : _param_submit, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_labelsClassName = param.labelsClassName, labelsClassName = _param_labelsClassName === void 0 ? "" : _param_labelsClassName, _param_inputsClassName = param.inputsClassName, inputsClassName = _param_inputsClassName === void 0 ? "" : _param_inputsClassName, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, _param_buttonStyle = param.buttonStyle, buttonStyle = _param_buttonStyle === void 0 ? {} : _param_buttonStyle, defaultFrom = param.defaultFrom, defaultTo = param.defaultTo, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_fromText = param.fromText, fromText = _param_fromText === void 0 ? "From date" : _param_fromText, _param_toText = param.toText, toText = _param_toText === void 0 ? "To date" : _param_toText, _param_buttonText = param.buttonText, buttonText = _param_buttonText === void 0 ? "Search" : _param_buttonText;
6994
7105
  var _ref = _sliced_to_array((0, import_react18.useState)(false), 2), isLoading = _ref[0], setIsLoading = _ref[1];
6995
7106
  var onSubmit = /*#__PURE__*/ function() {
6996
7107
  var _ref = _async_to_generator(function(e) {
@@ -7016,33 +7127,32 @@ var DatePicker = function(param) {
7016
7127
  return _ref.apply(this, arguments);
7017
7128
  };
7018
7129
  }();
7019
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("form", {
7130
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("form", {
7020
7131
  style: {
7021
7132
  direction: direction
7022
7133
  },
7023
7134
  onSubmit: onSubmit,
7024
7135
  className: cn("w-full h-10 flex justify-start gap-3 items-center ", formClassName),
7025
7136
  children: [
7026
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", {
7137
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", {
7027
7138
  className: cn("center text-[14px] relative gap-2", labelsClassName),
7028
7139
  htmlFor: "from",
7029
7140
  children: [
7030
7141
  fromText,
7031
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("input", {
7142
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", {
7032
7143
  className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
7033
7144
  type: "date",
7034
7145
  name: "from",
7035
- lang: locale,
7036
7146
  defaultValue: defaultFrom || (0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD")
7037
7147
  })
7038
7148
  ]
7039
7149
  }),
7040
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", {
7150
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", {
7041
7151
  className: cn("center text-[14px] relative gap-2 ", labelsClassName),
7042
7152
  htmlFor: "to",
7043
7153
  children: [
7044
7154
  toText,
7045
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("input", {
7155
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", {
7046
7156
  className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
7047
7157
  type: "date",
7048
7158
  name: "to",
@@ -7050,12 +7160,12 @@ var DatePicker = function(param) {
7050
7160
  })
7051
7161
  ]
7052
7162
  }),
7053
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", {
7163
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", {
7054
7164
  disabled: isLoading,
7055
7165
  style: buttonStyle,
7056
7166
  className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
7057
7167
  type: "submit",
7058
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loader, {
7168
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Loader, {
7059
7169
  className: "pt-[2px]",
7060
7170
  size: 20,
7061
7171
  color: "#fff"
@@ -7064,10 +7174,182 @@ var DatePicker = function(param) {
7064
7174
  ]
7065
7175
  });
7066
7176
  };
7177
+ function DatePicker2(param) {
7178
+ var _param_submit = param.submit, submit = _param_submit === void 0 ? /*#__PURE__*/ function() {
7179
+ var _ref = _async_to_generator(function(form) {
7180
+ return _ts_generator(this, function(_state) {
7181
+ return [
7182
+ 2
7183
+ ];
7184
+ });
7185
+ });
7186
+ return function(form) {
7187
+ return _ref.apply(this, arguments);
7188
+ };
7189
+ }() : _param_submit, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_labelsClassName = param.labelsClassName, labelsClassName = _param_labelsClassName === void 0 ? "" : _param_labelsClassName, _param_inputsClassName = param.inputsClassName, inputsClassName = _param_inputsClassName === void 0 ? "" : _param_inputsClassName, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, _param_buttonStyle = param.buttonStyle, buttonStyle = _param_buttonStyle === void 0 ? {} : _param_buttonStyle, defaultFrom = param.defaultFrom, defaultTo = param.defaultTo, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_fromText = param.fromText, fromText = _param_fromText === void 0 ? "From date" : _param_fromText, _param_toText = param.toText, toText = _param_toText === void 0 ? "To date" : _param_toText, _param_buttonText = param.buttonText, buttonText = _param_buttonText === void 0 ? "Search" : _param_buttonText;
7190
+ var _ref = _sliced_to_array((0, import_react18.useState)(false), 2), isLoading = _ref[0], setIsLoading = _ref[1];
7191
+ var _ref1 = _sliced_to_array((0, import_react18.useState)(function() {
7192
+ if (defaultFrom) {
7193
+ try {
7194
+ return (0, import_date2.parseDate)(defaultFrom);
7195
+ } catch (e) {
7196
+ return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
7197
+ }
7198
+ }
7199
+ return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
7200
+ }), 2), fromDate = _ref1[0], setFromDate = _ref1[1];
7201
+ var _ref2 = _sliced_to_array((0, import_react18.useState)(function() {
7202
+ if (defaultTo) {
7203
+ try {
7204
+ return (0, import_date2.parseDate)(defaultTo);
7205
+ } catch (e) {
7206
+ return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
7207
+ }
7208
+ }
7209
+ return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
7210
+ }), 2), toDate = _ref2[0], setToDate = _ref2[1];
7211
+ var formatDateValue = function(date) {
7212
+ if (!date) return "";
7213
+ return "".concat(date.year, "-").concat(String(date.month).padStart(2, "0"), "-").concat(String(date.day).padStart(2, "0"));
7214
+ };
7215
+ var onSubmit = /*#__PURE__*/ function() {
7216
+ var _ref = _async_to_generator(function(e) {
7217
+ return _ts_generator(this, function(_state) {
7218
+ switch(_state.label){
7219
+ case 0:
7220
+ e.preventDefault();
7221
+ setIsLoading(true);
7222
+ return [
7223
+ 4,
7224
+ submit(e)
7225
+ ];
7226
+ case 1:
7227
+ _state.sent();
7228
+ setIsLoading(false);
7229
+ return [
7230
+ 2
7231
+ ];
7232
+ }
7233
+ });
7234
+ });
7235
+ return function onSubmit(e) {
7236
+ return _ref.apply(this, arguments);
7237
+ };
7238
+ }();
7239
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components4.I18nProvider, {
7240
+ locale: direction === "rtl" ? "he-IL" : "en-US",
7241
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("form", {
7242
+ style: {
7243
+ direction: direction
7244
+ },
7245
+ onSubmit: onSubmit,
7246
+ className: cn("w-full h-10 flex justify-start gap-3 items-center", formClassName),
7247
+ children: [
7248
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", {
7249
+ type: "hidden",
7250
+ name: "from",
7251
+ value: formatDateValue(fromDate)
7252
+ }),
7253
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", {
7254
+ type: "hidden",
7255
+ name: "to",
7256
+ value: formatDateValue(toDate)
7257
+ }),
7258
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", {
7259
+ className: cn("center text-[14px] relative gap-2", labelsClassName),
7260
+ children: [
7261
+ fromText,
7262
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components3.DatePicker, {
7263
+ value: fromDate,
7264
+ onChange: setFromDate,
7265
+ children: [
7266
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", {
7267
+ className: "flex",
7268
+ children: [
7269
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Group, {
7270
+ className: "w-[125px]",
7271
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DateInput, {
7272
+ className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
7273
+ unstyled: true
7274
+ })
7275
+ }),
7276
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Button, {
7277
+ className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
7278
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CalendarIcon, {
7279
+ size: 16
7280
+ })
7281
+ })
7282
+ ]
7283
+ }),
7284
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Popover, {
7285
+ className: "data-[entering]:fade-in-0 data-[entering]:zoom-in-95 data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 z-50 rounded-lg border bg-background text-popover-foreground shadow-lg outline-hidden data-entering:animate-in data-exiting:animate-out",
7286
+ offset: 4,
7287
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Dialog, {
7288
+ className: "max-h-[inherit] overflow-auto p-2",
7289
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Calendar, {})
7290
+ })
7291
+ })
7292
+ ]
7293
+ })
7294
+ ]
7295
+ }),
7296
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", {
7297
+ className: cn("center text-[14px] relative gap-2", labelsClassName),
7298
+ children: [
7299
+ toText,
7300
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components3.DatePicker, {
7301
+ value: toDate,
7302
+ onChange: setToDate,
7303
+ children: [
7304
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", {
7305
+ className: "flex",
7306
+ children: [
7307
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Group, {
7308
+ className: "w-[125px]",
7309
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DateInput, {
7310
+ className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
7311
+ unstyled: true
7312
+ })
7313
+ }),
7314
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Button, {
7315
+ className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
7316
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CalendarIcon, {
7317
+ size: 16
7318
+ })
7319
+ })
7320
+ ]
7321
+ }),
7322
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Popover, {
7323
+ className: "data-[entering]:fade-in-0 data-[entering]:zoom-in-95 data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 z-50 rounded-lg border bg-background text-popover-foreground shadow-lg outline-hidden data-entering:animate-in data-exiting:animate-out",
7324
+ offset: 4,
7325
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Dialog, {
7326
+ className: "max-h-[inherit] overflow-auto p-2",
7327
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Calendar, {})
7328
+ })
7329
+ })
7330
+ ]
7331
+ })
7332
+ ]
7333
+ }),
7334
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", {
7335
+ disabled: isLoading,
7336
+ style: buttonStyle,
7337
+ className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
7338
+ type: "submit",
7339
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Loader, {
7340
+ className: "pt-[2px]",
7341
+ size: 20,
7342
+ color: "#fff"
7343
+ }) : buttonText
7344
+ })
7345
+ ]
7346
+ })
7347
+ });
7348
+ }
7067
7349
  // src/components/CodeInput.tsx
7068
7350
  var import_input_otp = require("input-otp");
7069
7351
  var import_react19 = require("react");
7070
- var import_jsx_runtime23 = require("react/jsx-runtime");
7352
+ var import_jsx_runtime25 = require("react/jsx-runtime");
7071
7353
  function CodeInput(param) {
7072
7354
  var codeValue = param.codeValue, setCodeValue = param.setCodeValue, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_slotContainerClassName = param.slotContainerClassName, slotContainerClassName = _param_slotContainerClassName === void 0 ? "" : _param_slotContainerClassName, _param_direction = param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction;
7073
7355
  var firstInputRef = (0, import_react19.useRef)(null);
@@ -7076,12 +7358,12 @@ function CodeInput(param) {
7076
7358
  firstInputRef.current.focus();
7077
7359
  }
7078
7360
  }, []);
7079
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {
7361
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", {
7080
7362
  style: {
7081
7363
  direction: direction
7082
7364
  },
7083
7365
  className: cn("space-y-2 flex justify-center items-center", className),
7084
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_input_otp.OTPInput, {
7366
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_input_otp.OTPInput, {
7085
7367
  ref: firstInputRef,
7086
7368
  value: codeValue,
7087
7369
  onChange: function(newVal) {
@@ -7091,10 +7373,10 @@ function CodeInput(param) {
7091
7373
  maxLength: 6,
7092
7374
  render: function(param) {
7093
7375
  var slots = param.slots;
7094
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {
7376
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", {
7095
7377
  className: cn("flex gap-5", slotContainerClassName),
7096
7378
  children: slots.map(function(slot, idx) {
7097
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Slot2, _object_spread({}, slot), idx);
7379
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Slot2, _object_spread({}, slot), idx);
7098
7380
  })
7099
7381
  });
7100
7382
  }
@@ -7102,11 +7384,11 @@ function CodeInput(param) {
7102
7384
  });
7103
7385
  }
7104
7386
  function Slot2(props) {
7105
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {
7387
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", {
7106
7388
  className: cn("flex size-9 items-center justify-center rounded-lg border border-input bg-background font-medium text-foreground shadow-sm shadow-black/5 transition-shadow", {
7107
7389
  "z-10 border border-ring ring-[3px] ring-ring/20": props.isActive
7108
7390
  }),
7109
- children: props.char !== null && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {
7391
+ children: props.char !== null && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", {
7110
7392
  children: props.char
7111
7393
  })
7112
7394
  });
@@ -7121,6 +7403,7 @@ function Slot2(props) {
7121
7403
  CodeInput: CodeInput,
7122
7404
  ConfirmForm: ConfirmForm,
7123
7405
  DatePicker: DatePicker,
7406
+ DatePicker2: DatePicker2,
7124
7407
  DisplayAllRowsButton: DisplayAllRowsButton,
7125
7408
  DurationPicker: DurationPicker,
7126
7409
  DurationUI: DurationUI,