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.
- package/dist/components/index.css +115 -0
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +306 -23
- package/dist/components/index.mjs +303 -24
- package/dist/types/index.d.mts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/package.json +3 -1
|
@@ -6723,33 +6723,141 @@ var ModularForm_default = ModularForm;
|
|
|
6723
6723
|
// src/components/forms/index.tsx
|
|
6724
6724
|
import { useState as useState11 } from "react";
|
|
6725
6725
|
import moment3 from "moment";
|
|
6726
|
+
import { CalendarIcon } from "lucide-react";
|
|
6727
|
+
import { Button as Button3, DatePicker as RACDatePicker, Dialog as Dialog2, Group, Popover as Popover2 } from "react-aria-components";
|
|
6728
|
+
// src/components/ui/calendar-rac.tsx
|
|
6729
|
+
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
6730
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
6731
|
+
import { Button as Button2, CalendarCell as CalendarCellRac, CalendarGridBody as CalendarGridBodyRac, CalendarGridHeader as CalendarGridHeaderRac, CalendarGrid as CalendarGridRac, CalendarHeaderCell as CalendarHeaderCellRac, Calendar as CalendarRac, composeRenderProps, Heading as HeadingRac, RangeCalendar as RangeCalendarRac } from "react-aria-components";
|
|
6726
6732
|
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6733
|
+
function CalendarHeader() {
|
|
6734
|
+
return /* @__PURE__ */ jsxs16("header", {
|
|
6735
|
+
className: "flex w-full items-center gap-1 pb-1",
|
|
6736
|
+
children: [
|
|
6737
|
+
/* @__PURE__ */ jsx22(Button2, {
|
|
6738
|
+
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",
|
|
6739
|
+
slot: "previous",
|
|
6740
|
+
children: /* @__PURE__ */ jsx22(ChevronLeftIcon, {
|
|
6741
|
+
size: 16
|
|
6742
|
+
})
|
|
6743
|
+
}),
|
|
6744
|
+
/* @__PURE__ */ jsx22(HeadingRac, {
|
|
6745
|
+
className: "grow text-center font-medium text-sm"
|
|
6746
|
+
}),
|
|
6747
|
+
/* @__PURE__ */ jsx22(Button2, {
|
|
6748
|
+
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",
|
|
6749
|
+
slot: "next",
|
|
6750
|
+
children: /* @__PURE__ */ jsx22(ChevronRightIcon, {
|
|
6751
|
+
size: 16
|
|
6752
|
+
})
|
|
6753
|
+
})
|
|
6754
|
+
]
|
|
6755
|
+
});
|
|
6756
|
+
}
|
|
6757
|
+
function CalendarGridComponent(param) {
|
|
6758
|
+
var _param_isRange = param.isRange, isRange = _param_isRange === void 0 ? false : _param_isRange;
|
|
6759
|
+
var now = today(getLocalTimeZone());
|
|
6760
|
+
return /* @__PURE__ */ jsxs16(CalendarGridRac, {
|
|
6761
|
+
children: [
|
|
6762
|
+
/* @__PURE__ */ jsx22(CalendarGridHeaderRac, {
|
|
6763
|
+
children: function(day) {
|
|
6764
|
+
return /* @__PURE__ */ jsx22(CalendarHeaderCellRac, {
|
|
6765
|
+
className: "size-9 rounded-md p-0 font-medium text-muted-foreground/80 text-xs",
|
|
6766
|
+
children: day
|
|
6767
|
+
});
|
|
6768
|
+
}
|
|
6769
|
+
}),
|
|
6770
|
+
/* @__PURE__ */ jsx22(CalendarGridBodyRac, {
|
|
6771
|
+
className: "[&_td]:px-0 [&_td]:py-px",
|
|
6772
|
+
children: function(date) {
|
|
6773
|
+
return /* @__PURE__ */ jsx22(CalendarCellRac, {
|
|
6774
|
+
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
|
|
6775
|
+
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
|
|
6776
|
+
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")),
|
|
6777
|
+
date: date
|
|
6778
|
+
});
|
|
6779
|
+
}
|
|
6780
|
+
})
|
|
6781
|
+
]
|
|
6782
|
+
});
|
|
6783
|
+
}
|
|
6784
|
+
function Calendar(_param) {
|
|
6785
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
6786
|
+
"className"
|
|
6787
|
+
]);
|
|
6788
|
+
return /* @__PURE__ */ jsxs16(CalendarRac, _object_spread_props(_object_spread({}, props), {
|
|
6789
|
+
className: composeRenderProps(className, function(className2) {
|
|
6790
|
+
return cn("w-fit", className2);
|
|
6791
|
+
}),
|
|
6792
|
+
children: [
|
|
6793
|
+
/* @__PURE__ */ jsx22(CalendarHeader, {}),
|
|
6794
|
+
/* @__PURE__ */ jsx22(CalendarGridComponent, {})
|
|
6795
|
+
]
|
|
6796
|
+
}));
|
|
6797
|
+
}
|
|
6798
|
+
// src/components/ui/datefield-rac.tsx
|
|
6799
|
+
import { composeRenderProps as composeRenderProps2, DateField as DateFieldRac, DateInput as DateInputRac, DateSegment as DateSegmentRac, TimeField as TimeFieldRac } from "react-aria-components";
|
|
6800
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
6801
|
+
function DateSegment(_param) {
|
|
6802
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
6803
|
+
"className"
|
|
6804
|
+
]);
|
|
6805
|
+
return /* @__PURE__ */ jsx23(DateSegmentRac, _object_spread_props(_object_spread({
|
|
6806
|
+
className: composeRenderProps2(className, function(className2) {
|
|
6807
|
+
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);
|
|
6808
|
+
})
|
|
6809
|
+
}, props), {
|
|
6810
|
+
"data-invalid": true
|
|
6811
|
+
}));
|
|
6812
|
+
}
|
|
6813
|
+
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";
|
|
6814
|
+
function DateInput(_param) {
|
|
6815
|
+
var className = _param.className, _param_unstyled = _param.unstyled, unstyled = _param_unstyled === void 0 ? false : _param_unstyled, props = _object_without_properties(_param, [
|
|
6816
|
+
"className",
|
|
6817
|
+
"unstyled"
|
|
6818
|
+
]);
|
|
6819
|
+
return /* @__PURE__ */ jsx23(DateInputRac, _object_spread_props(_object_spread({
|
|
6820
|
+
className: composeRenderProps2(className, function(className2) {
|
|
6821
|
+
return cn(!unstyled && dateInputStyle, className2);
|
|
6822
|
+
})
|
|
6823
|
+
}, props), {
|
|
6824
|
+
children: function(segment) {
|
|
6825
|
+
return /* @__PURE__ */ jsx23(DateSegment, {
|
|
6826
|
+
segment: segment
|
|
6827
|
+
});
|
|
6828
|
+
}
|
|
6829
|
+
}));
|
|
6830
|
+
}
|
|
6831
|
+
// src/components/forms/index.tsx
|
|
6832
|
+
import { I18nProvider } from "react-aria-components";
|
|
6833
|
+
import { parseDate } from "@internationalized/date";
|
|
6834
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6727
6835
|
var ConfirmForm = function(param) {
|
|
6728
6836
|
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;
|
|
6729
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ jsxs17("div", {
|
|
6730
6838
|
style: {
|
|
6731
6839
|
direction: direction,
|
|
6732
6840
|
padding: "30px"
|
|
6733
6841
|
},
|
|
6734
6842
|
className: cn("w-full h-full flex flex-col gap-3", containerClassName),
|
|
6735
6843
|
children: [
|
|
6736
|
-
/* @__PURE__ */
|
|
6844
|
+
/* @__PURE__ */ jsx24("div", {
|
|
6737
6845
|
className: cn("text-lg font-bold", headlineClassName),
|
|
6738
6846
|
children: headline
|
|
6739
6847
|
}),
|
|
6740
|
-
/* @__PURE__ */
|
|
6848
|
+
/* @__PURE__ */ jsxs17("div", {
|
|
6741
6849
|
className: cn("flex justify-center items-center gap-2 w-full", buttonsContainerClassName),
|
|
6742
6850
|
children: [
|
|
6743
|
-
/* @__PURE__ */
|
|
6851
|
+
/* @__PURE__ */ jsx24("button", {
|
|
6744
6852
|
className: cn("disabled:cursor-not-allowed opacity-70", cancelButtonClassName),
|
|
6745
6853
|
onClick: onX,
|
|
6746
|
-
children: cancelElement || /* @__PURE__ */
|
|
6854
|
+
children: cancelElement || /* @__PURE__ */ jsx24(RedXSvg, {})
|
|
6747
6855
|
}),
|
|
6748
|
-
/* @__PURE__ */
|
|
6856
|
+
/* @__PURE__ */ jsx24("button", _object_spread_props(_object_spread({
|
|
6749
6857
|
className: cn("disabled:cursor-not-allowed opacity-70", confirmButtonClassName)
|
|
6750
6858
|
}, confirmButtonProps), {
|
|
6751
6859
|
onClick: onV,
|
|
6752
|
-
children: confirmElement || /* @__PURE__ */
|
|
6860
|
+
children: confirmElement || /* @__PURE__ */ jsx24(GreenVSvg, {})
|
|
6753
6861
|
}))
|
|
6754
6862
|
]
|
|
6755
6863
|
})
|
|
@@ -6768,7 +6876,7 @@ var DatePicker = function(param) {
|
|
|
6768
6876
|
return function(form) {
|
|
6769
6877
|
return _ref.apply(this, arguments);
|
|
6770
6878
|
};
|
|
6771
|
-
}() : _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
|
|
6879
|
+
}() : _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;
|
|
6772
6880
|
var _useState11 = _sliced_to_array(useState11(false), 2), isLoading = _useState11[0], setIsLoading = _useState11[1];
|
|
6773
6881
|
var onSubmit = /*#__PURE__*/ function() {
|
|
6774
6882
|
var _ref = _async_to_generator(function(e) {
|
|
@@ -6794,33 +6902,32 @@ var DatePicker = function(param) {
|
|
|
6794
6902
|
return _ref.apply(this, arguments);
|
|
6795
6903
|
};
|
|
6796
6904
|
}();
|
|
6797
|
-
return /* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ jsxs17("form", {
|
|
6798
6906
|
style: {
|
|
6799
6907
|
direction: direction
|
|
6800
6908
|
},
|
|
6801
6909
|
onSubmit: onSubmit,
|
|
6802
6910
|
className: cn("w-full h-10 flex justify-start gap-3 items-center ", formClassName),
|
|
6803
6911
|
children: [
|
|
6804
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsxs17("label", {
|
|
6805
6913
|
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
6806
6914
|
htmlFor: "from",
|
|
6807
6915
|
children: [
|
|
6808
6916
|
fromText,
|
|
6809
|
-
/* @__PURE__ */
|
|
6917
|
+
/* @__PURE__ */ jsx24("input", {
|
|
6810
6918
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
6811
6919
|
type: "date",
|
|
6812
6920
|
name: "from",
|
|
6813
|
-
lang: locale,
|
|
6814
6921
|
defaultValue: defaultFrom || moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD")
|
|
6815
6922
|
})
|
|
6816
6923
|
]
|
|
6817
6924
|
}),
|
|
6818
|
-
/* @__PURE__ */
|
|
6925
|
+
/* @__PURE__ */ jsxs17("label", {
|
|
6819
6926
|
className: cn("center text-[14px] relative gap-2 ", labelsClassName),
|
|
6820
6927
|
htmlFor: "to",
|
|
6821
6928
|
children: [
|
|
6822
6929
|
toText,
|
|
6823
|
-
/* @__PURE__ */
|
|
6930
|
+
/* @__PURE__ */ jsx24("input", {
|
|
6824
6931
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
6825
6932
|
type: "date",
|
|
6826
6933
|
name: "to",
|
|
@@ -6828,12 +6935,12 @@ var DatePicker = function(param) {
|
|
|
6828
6935
|
})
|
|
6829
6936
|
]
|
|
6830
6937
|
}),
|
|
6831
|
-
/* @__PURE__ */
|
|
6938
|
+
/* @__PURE__ */ jsx24("button", {
|
|
6832
6939
|
disabled: isLoading,
|
|
6833
6940
|
style: buttonStyle,
|
|
6834
6941
|
className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
|
|
6835
6942
|
type: "submit",
|
|
6836
|
-
children: isLoading ? /* @__PURE__ */
|
|
6943
|
+
children: isLoading ? /* @__PURE__ */ jsx24(Loader, {
|
|
6837
6944
|
className: "pt-[2px]",
|
|
6838
6945
|
size: 20,
|
|
6839
6946
|
color: "#fff"
|
|
@@ -6842,10 +6949,182 @@ var DatePicker = function(param) {
|
|
|
6842
6949
|
]
|
|
6843
6950
|
});
|
|
6844
6951
|
};
|
|
6952
|
+
function DatePicker2(param) {
|
|
6953
|
+
var _param_submit = param.submit, submit = _param_submit === void 0 ? /*#__PURE__*/ function() {
|
|
6954
|
+
var _ref = _async_to_generator(function(form) {
|
|
6955
|
+
return _ts_generator(this, function(_state) {
|
|
6956
|
+
return [
|
|
6957
|
+
2
|
|
6958
|
+
];
|
|
6959
|
+
});
|
|
6960
|
+
});
|
|
6961
|
+
return function(form) {
|
|
6962
|
+
return _ref.apply(this, arguments);
|
|
6963
|
+
};
|
|
6964
|
+
}() : _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;
|
|
6965
|
+
var _useState11 = _sliced_to_array(useState11(false), 2), isLoading = _useState11[0], setIsLoading = _useState11[1];
|
|
6966
|
+
var _useState111 = _sliced_to_array(useState11(function() {
|
|
6967
|
+
if (defaultFrom) {
|
|
6968
|
+
try {
|
|
6969
|
+
return parseDate(defaultFrom);
|
|
6970
|
+
} catch (e) {
|
|
6971
|
+
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6972
|
+
}
|
|
6973
|
+
}
|
|
6974
|
+
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6975
|
+
}), 2), fromDate = _useState111[0], setFromDate = _useState111[1];
|
|
6976
|
+
var _useState112 = _sliced_to_array(useState11(function() {
|
|
6977
|
+
if (defaultTo) {
|
|
6978
|
+
try {
|
|
6979
|
+
return parseDate(defaultTo);
|
|
6980
|
+
} catch (e) {
|
|
6981
|
+
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6982
|
+
}
|
|
6983
|
+
}
|
|
6984
|
+
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6985
|
+
}), 2), toDate = _useState112[0], setToDate = _useState112[1];
|
|
6986
|
+
var formatDateValue = function(date) {
|
|
6987
|
+
if (!date) return "";
|
|
6988
|
+
return "".concat(date.year, "-").concat(String(date.month).padStart(2, "0"), "-").concat(String(date.day).padStart(2, "0"));
|
|
6989
|
+
};
|
|
6990
|
+
var onSubmit = /*#__PURE__*/ function() {
|
|
6991
|
+
var _ref = _async_to_generator(function(e) {
|
|
6992
|
+
return _ts_generator(this, function(_state) {
|
|
6993
|
+
switch(_state.label){
|
|
6994
|
+
case 0:
|
|
6995
|
+
e.preventDefault();
|
|
6996
|
+
setIsLoading(true);
|
|
6997
|
+
return [
|
|
6998
|
+
4,
|
|
6999
|
+
submit(e)
|
|
7000
|
+
];
|
|
7001
|
+
case 1:
|
|
7002
|
+
_state.sent();
|
|
7003
|
+
setIsLoading(false);
|
|
7004
|
+
return [
|
|
7005
|
+
2
|
|
7006
|
+
];
|
|
7007
|
+
}
|
|
7008
|
+
});
|
|
7009
|
+
});
|
|
7010
|
+
return function onSubmit(e) {
|
|
7011
|
+
return _ref.apply(this, arguments);
|
|
7012
|
+
};
|
|
7013
|
+
}();
|
|
7014
|
+
return /* @__PURE__ */ jsx24(I18nProvider, {
|
|
7015
|
+
locale: direction === "rtl" ? "he-IL" : "en-US",
|
|
7016
|
+
children: /* @__PURE__ */ jsxs17("form", {
|
|
7017
|
+
style: {
|
|
7018
|
+
direction: direction
|
|
7019
|
+
},
|
|
7020
|
+
onSubmit: onSubmit,
|
|
7021
|
+
className: cn("w-full h-10 flex justify-start gap-3 items-center", formClassName),
|
|
7022
|
+
children: [
|
|
7023
|
+
/* @__PURE__ */ jsx24("input", {
|
|
7024
|
+
type: "hidden",
|
|
7025
|
+
name: "from",
|
|
7026
|
+
value: formatDateValue(fromDate)
|
|
7027
|
+
}),
|
|
7028
|
+
/* @__PURE__ */ jsx24("input", {
|
|
7029
|
+
type: "hidden",
|
|
7030
|
+
name: "to",
|
|
7031
|
+
value: formatDateValue(toDate)
|
|
7032
|
+
}),
|
|
7033
|
+
/* @__PURE__ */ jsxs17("label", {
|
|
7034
|
+
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
7035
|
+
children: [
|
|
7036
|
+
fromText,
|
|
7037
|
+
/* @__PURE__ */ jsxs17(RACDatePicker, {
|
|
7038
|
+
value: fromDate,
|
|
7039
|
+
onChange: setFromDate,
|
|
7040
|
+
children: [
|
|
7041
|
+
/* @__PURE__ */ jsxs17("div", {
|
|
7042
|
+
className: "flex",
|
|
7043
|
+
children: [
|
|
7044
|
+
/* @__PURE__ */ jsx24(Group, {
|
|
7045
|
+
className: "w-[125px]",
|
|
7046
|
+
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7047
|
+
className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
|
|
7048
|
+
unstyled: true
|
|
7049
|
+
})
|
|
7050
|
+
}),
|
|
7051
|
+
/* @__PURE__ */ jsx24(Button3, {
|
|
7052
|
+
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",
|
|
7053
|
+
children: /* @__PURE__ */ jsx24(CalendarIcon, {
|
|
7054
|
+
size: 16
|
|
7055
|
+
})
|
|
7056
|
+
})
|
|
7057
|
+
]
|
|
7058
|
+
}),
|
|
7059
|
+
/* @__PURE__ */ jsx24(Popover2, {
|
|
7060
|
+
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",
|
|
7061
|
+
offset: 4,
|
|
7062
|
+
children: /* @__PURE__ */ jsx24(Dialog2, {
|
|
7063
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
7064
|
+
children: /* @__PURE__ */ jsx24(Calendar, {})
|
|
7065
|
+
})
|
|
7066
|
+
})
|
|
7067
|
+
]
|
|
7068
|
+
})
|
|
7069
|
+
]
|
|
7070
|
+
}),
|
|
7071
|
+
/* @__PURE__ */ jsxs17("label", {
|
|
7072
|
+
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
7073
|
+
children: [
|
|
7074
|
+
toText,
|
|
7075
|
+
/* @__PURE__ */ jsxs17(RACDatePicker, {
|
|
7076
|
+
value: toDate,
|
|
7077
|
+
onChange: setToDate,
|
|
7078
|
+
children: [
|
|
7079
|
+
/* @__PURE__ */ jsxs17("div", {
|
|
7080
|
+
className: "flex",
|
|
7081
|
+
children: [
|
|
7082
|
+
/* @__PURE__ */ jsx24(Group, {
|
|
7083
|
+
className: "w-[125px]",
|
|
7084
|
+
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7085
|
+
className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
|
|
7086
|
+
unstyled: true
|
|
7087
|
+
})
|
|
7088
|
+
}),
|
|
7089
|
+
/* @__PURE__ */ jsx24(Button3, {
|
|
7090
|
+
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",
|
|
7091
|
+
children: /* @__PURE__ */ jsx24(CalendarIcon, {
|
|
7092
|
+
size: 16
|
|
7093
|
+
})
|
|
7094
|
+
})
|
|
7095
|
+
]
|
|
7096
|
+
}),
|
|
7097
|
+
/* @__PURE__ */ jsx24(Popover2, {
|
|
7098
|
+
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",
|
|
7099
|
+
offset: 4,
|
|
7100
|
+
children: /* @__PURE__ */ jsx24(Dialog2, {
|
|
7101
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
7102
|
+
children: /* @__PURE__ */ jsx24(Calendar, {})
|
|
7103
|
+
})
|
|
7104
|
+
})
|
|
7105
|
+
]
|
|
7106
|
+
})
|
|
7107
|
+
]
|
|
7108
|
+
}),
|
|
7109
|
+
/* @__PURE__ */ jsx24("button", {
|
|
7110
|
+
disabled: isLoading,
|
|
7111
|
+
style: buttonStyle,
|
|
7112
|
+
className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
|
|
7113
|
+
type: "submit",
|
|
7114
|
+
children: isLoading ? /* @__PURE__ */ jsx24(Loader, {
|
|
7115
|
+
className: "pt-[2px]",
|
|
7116
|
+
size: 20,
|
|
7117
|
+
color: "#fff"
|
|
7118
|
+
}) : buttonText
|
|
7119
|
+
})
|
|
7120
|
+
]
|
|
7121
|
+
})
|
|
7122
|
+
});
|
|
7123
|
+
}
|
|
6845
7124
|
// src/components/CodeInput.tsx
|
|
6846
7125
|
import { OTPInput } from "input-otp";
|
|
6847
7126
|
import { useEffect as useEffect11, useRef as useRef9 } from "react";
|
|
6848
|
-
import { jsx as
|
|
7127
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
6849
7128
|
function CodeInput(param) {
|
|
6850
7129
|
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;
|
|
6851
7130
|
var firstInputRef = useRef9(null);
|
|
@@ -6854,12 +7133,12 @@ function CodeInput(param) {
|
|
|
6854
7133
|
firstInputRef.current.focus();
|
|
6855
7134
|
}
|
|
6856
7135
|
}, []);
|
|
6857
|
-
return /* @__PURE__ */
|
|
7136
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
6858
7137
|
style: {
|
|
6859
7138
|
direction: direction
|
|
6860
7139
|
},
|
|
6861
7140
|
className: cn("space-y-2 flex justify-center items-center", className),
|
|
6862
|
-
children: /* @__PURE__ */
|
|
7141
|
+
children: /* @__PURE__ */ jsx25(OTPInput, {
|
|
6863
7142
|
ref: firstInputRef,
|
|
6864
7143
|
value: codeValue,
|
|
6865
7144
|
onChange: function(newVal) {
|
|
@@ -6869,10 +7148,10 @@ function CodeInput(param) {
|
|
|
6869
7148
|
maxLength: 6,
|
|
6870
7149
|
render: function(param) {
|
|
6871
7150
|
var slots = param.slots;
|
|
6872
|
-
return /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
6873
7152
|
className: cn("flex gap-5", slotContainerClassName),
|
|
6874
7153
|
children: slots.map(function(slot, idx) {
|
|
6875
|
-
return /* @__PURE__ */
|
|
7154
|
+
return /* @__PURE__ */ jsx25(Slot2, _object_spread({}, slot), idx);
|
|
6876
7155
|
})
|
|
6877
7156
|
});
|
|
6878
7157
|
}
|
|
@@ -6880,14 +7159,14 @@ function CodeInput(param) {
|
|
|
6880
7159
|
});
|
|
6881
7160
|
}
|
|
6882
7161
|
function Slot2(props) {
|
|
6883
|
-
return /* @__PURE__ */
|
|
7162
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
6884
7163
|
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", {
|
|
6885
7164
|
"z-10 border border-ring ring-[3px] ring-ring/20": props.isActive
|
|
6886
7165
|
}),
|
|
6887
|
-
children: props.char !== null && /* @__PURE__ */
|
|
7166
|
+
children: props.char !== null && /* @__PURE__ */ jsx25("div", {
|
|
6888
7167
|
children: props.char
|
|
6889
7168
|
})
|
|
6890
7169
|
});
|
|
6891
7170
|
}
|
|
6892
|
-
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, LeftToRightDiv, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
7171
|
+
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DatePicker2, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, LeftToRightDiv, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
6893
7172
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.d.mts
CHANGED
|
@@ -346,7 +346,6 @@ interface DatePickerProps {
|
|
|
346
346
|
fromText?: string;
|
|
347
347
|
toText?: string;
|
|
348
348
|
buttonText?: string;
|
|
349
|
-
locale?: string;
|
|
350
349
|
}
|
|
351
350
|
|
|
352
351
|
export type { AppName, BaseElementProps, CheckboxContainerProps, ConfirmFormProps, CustomElementProps, DatePickerProps, Direction, DurationInputOption, DurationInputProps, DurationValues, FormElement, FormSeparatorProps, InputContainerProps, InputElement, InternationalInputProps, LoginOption, ModularFormProps, ModularPopUp, MultiSelectProps, OnSnapshotCallback, OnSnapshotConfig, OnSnapshotConfigDocument, OnSnapshotParsers, SelectContainerProps, SelectElement, SelectWithSearchProps, SetState, Snapshot, SnapshotDocument, SnapshotResult, TextAreaContainerProps, TextAreaElement, WhereCondition };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -346,7 +346,6 @@ interface DatePickerProps {
|
|
|
346
346
|
fromText?: string;
|
|
347
347
|
toText?: string;
|
|
348
348
|
buttonText?: string;
|
|
349
|
-
locale?: string;
|
|
350
349
|
}
|
|
351
350
|
|
|
352
351
|
export type { AppName, BaseElementProps, CheckboxContainerProps, ConfirmFormProps, CustomElementProps, DatePickerProps, Direction, DurationInputOption, DurationInputProps, DurationValues, FormElement, FormSeparatorProps, InputContainerProps, InputElement, InternationalInputProps, LoginOption, ModularFormProps, ModularPopUp, MultiSelectProps, OnSnapshotCallback, OnSnapshotConfig, OnSnapshotConfigDocument, OnSnapshotParsers, SelectContainerProps, SelectElement, SelectWithSearchProps, SetState, Snapshot, SnapshotDocument, SnapshotResult, TextAreaContainerProps, TextAreaElement, WhereCondition };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akeyless-client-commons",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.84",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "tsup",
|
|
6
6
|
"deploy": "npm run build && npm version patch --no-git-tag-version && npm publish",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@internationalized/date": "^3.10.0",
|
|
14
15
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
15
16
|
"@radix-ui/react-label": "^2.1.2",
|
|
16
17
|
"@radix-ui/react-popover": "^1.1.6",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"moment": "^2.30.1",
|
|
34
35
|
"moment-timezone": "^0.5.46",
|
|
35
36
|
"react": "^18.3.1",
|
|
37
|
+
"react-aria-components": "^1.13.0",
|
|
36
38
|
"react-dom": "^18.3.1",
|
|
37
39
|
"react-phone-number-input": "^3.4.10",
|
|
38
40
|
"react-spinners": "^0.14.1",
|