akeyless-client-commons 1.1.97 → 1.1.99
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 +94 -38
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.d.mts +7 -3
- package/dist/components/index.d.ts +7 -3
- package/dist/components/index.js +161 -146
- package/dist/components/index.mjs +160 -145
- package/dist/types/index.d.mts +5 -1
- package/dist/types/index.d.ts +5 -1
- package/package.json +1 -1
|
@@ -5938,7 +5938,7 @@ var FlagComponent = function(param) {
|
|
|
5938
5938
|
});
|
|
5939
5939
|
};
|
|
5940
5940
|
// src/components/forms/ModularForm/formElements.tsx
|
|
5941
|
-
import { Button as
|
|
5941
|
+
import { Button as Button3, DatePicker as RACDatePicker, Dialog as Dialog2, Group, Popover as Popover2 } from "react-aria-components";
|
|
5942
5942
|
// src/components/ui/datefield-rac.tsx
|
|
5943
5943
|
import { composeRenderProps, DateField as DateFieldRac, DateInput as DateInputRac, DateSegment as DateSegmentRac, TimeField as TimeFieldRac } from "react-aria-components";
|
|
5944
5944
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
@@ -5972,10 +5972,89 @@ function DateInput(_param) {
|
|
|
5972
5972
|
}
|
|
5973
5973
|
}));
|
|
5974
5974
|
}
|
|
5975
|
-
// src/components/
|
|
5976
|
-
import {
|
|
5977
|
-
import {
|
|
5975
|
+
// src/components/ui/calendar-rac.tsx
|
|
5976
|
+
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
5977
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
5978
|
+
import { Button as Button2, CalendarCell as CalendarCellRac, CalendarGridBody as CalendarGridBodyRac, CalendarGridHeader as CalendarGridHeaderRac, CalendarGrid as CalendarGridRac, CalendarHeaderCell as CalendarHeaderCellRac, Calendar as CalendarRac, composeRenderProps as composeRenderProps2, Heading as HeadingRac, RangeCalendar as RangeCalendarRac } from "react-aria-components";
|
|
5978
5979
|
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5980
|
+
function CalendarHeader() {
|
|
5981
|
+
return /* @__PURE__ */ jsxs14("header", {
|
|
5982
|
+
className: "flex w-full items-center gap-1 pb-1",
|
|
5983
|
+
children: [
|
|
5984
|
+
/* @__PURE__ */ jsx21(Button2, {
|
|
5985
|
+
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",
|
|
5986
|
+
slot: "previous",
|
|
5987
|
+
children: /* @__PURE__ */ jsx21(ChevronLeftIcon, {
|
|
5988
|
+
size: 16
|
|
5989
|
+
})
|
|
5990
|
+
}),
|
|
5991
|
+
/* @__PURE__ */ jsx21(HeadingRac, {
|
|
5992
|
+
className: "grow text-center font-medium text-sm"
|
|
5993
|
+
}),
|
|
5994
|
+
/* @__PURE__ */ jsx21(Button2, {
|
|
5995
|
+
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",
|
|
5996
|
+
slot: "next",
|
|
5997
|
+
children: /* @__PURE__ */ jsx21(ChevronRightIcon, {
|
|
5998
|
+
size: 16
|
|
5999
|
+
})
|
|
6000
|
+
})
|
|
6001
|
+
]
|
|
6002
|
+
});
|
|
6003
|
+
}
|
|
6004
|
+
function CalendarGridComponent(param) {
|
|
6005
|
+
var _param_isRange = param.isRange, isRange = _param_isRange === void 0 ? false : _param_isRange, selectedDayClassName = param.selectedDayClassName, todayDayClassName = param.todayDayClassName;
|
|
6006
|
+
var now = today(getLocalTimeZone());
|
|
6007
|
+
var resolvedSelectedDayClassName = (selectedDayClassName === null || selectedDayClassName === void 0 ? void 0 : selectedDayClassName.trim()) ? selectedDayClassName : "bg-blue-600 text-white";
|
|
6008
|
+
var resolvedTodayDayClassName = (todayDayClassName === null || todayDayClassName === void 0 ? void 0 : todayDayClassName.trim()) ? todayDayClassName : "bg-sky-200 text-sky-950";
|
|
6009
|
+
return /* @__PURE__ */ jsxs14(CalendarGridRac, {
|
|
6010
|
+
children: [
|
|
6011
|
+
/* @__PURE__ */ jsx21(CalendarGridHeaderRac, {
|
|
6012
|
+
children: function(day) {
|
|
6013
|
+
return /* @__PURE__ */ jsx21(CalendarHeaderCellRac, {
|
|
6014
|
+
className: "size-9 rounded-md p-0 font-medium text-muted-foreground/80 text-xs",
|
|
6015
|
+
children: day
|
|
6016
|
+
});
|
|
6017
|
+
}
|
|
6018
|
+
}),
|
|
6019
|
+
/* @__PURE__ */ jsx21(CalendarGridBodyRac, {
|
|
6020
|
+
className: "[&_td]:px-0 [&_td]:py-px",
|
|
6021
|
+
children: function(date) {
|
|
6022
|
+
return /* @__PURE__ */ jsx21(CalendarCellRac, {
|
|
6023
|
+
className: composeRenderProps2(void 0, function(_className, renderProps) {
|
|
6024
|
+
return 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-[hovered]:text-foreground data-[unavailable]:line-through data-[disabled]:opacity-30 data-[unavailable]:opacity-30 data-[focus-visible]:ring-[3px] data-[focus-visible]:ring-ring/50", // Single date calendar selected/today styles (props-driven)
|
|
6025
|
+
!isRange && (renderProps === null || renderProps === void 0 ? void 0 : renderProps.isSelected) && !(renderProps === null || renderProps === void 0 ? void 0 : renderProps.isDisabled) && resolvedSelectedDayClassName, !isRange && date.compare(now) === 0 && !(renderProps === null || renderProps === void 0 ? void 0 : renderProps.isSelected) && !(renderProps === null || renderProps === void 0 ? void 0 : renderProps.isDisabled) && resolvedTodayDayClassName, // Range-specific styles (fixed Tailwind data-* variant syntax)
|
|
6026
|
+
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");
|
|
6027
|
+
}),
|
|
6028
|
+
date: date
|
|
6029
|
+
});
|
|
6030
|
+
}
|
|
6031
|
+
})
|
|
6032
|
+
]
|
|
6033
|
+
});
|
|
6034
|
+
}
|
|
6035
|
+
function Calendar(_param) {
|
|
6036
|
+
var className = _param.className, selectedDayClassName = _param.selectedDayClassName, todayDayClassName = _param.todayDayClassName, props = _object_without_properties(_param, [
|
|
6037
|
+
"className",
|
|
6038
|
+
"selectedDayClassName",
|
|
6039
|
+
"todayDayClassName"
|
|
6040
|
+
]);
|
|
6041
|
+
return /* @__PURE__ */ jsxs14(CalendarRac, _object_spread_props(_object_spread({}, props), {
|
|
6042
|
+
className: composeRenderProps2(className, function(className2) {
|
|
6043
|
+
return cn("w-fit", className2);
|
|
6044
|
+
}),
|
|
6045
|
+
children: [
|
|
6046
|
+
/* @__PURE__ */ jsx21(CalendarHeader, {}),
|
|
6047
|
+
/* @__PURE__ */ jsx21(CalendarGridComponent, {
|
|
6048
|
+
selectedDayClassName: selectedDayClassName,
|
|
6049
|
+
todayDayClassName: todayDayClassName
|
|
6050
|
+
})
|
|
6051
|
+
]
|
|
6052
|
+
}));
|
|
6053
|
+
}
|
|
6054
|
+
// src/components/forms/ModularForm/formElements.tsx
|
|
6055
|
+
import { CalendarIcon } from "lucide-react";
|
|
6056
|
+
import { parseDate, today as today2, getLocalTimeZone as getLocalTimeZone2 } from "@internationalized/date";
|
|
6057
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5979
6058
|
var defaultFormElementContainerClassName = "flex justify-start items-center gap-3 w-full";
|
|
5980
6059
|
var defaultFormElementBorderClassName = "border-[1px] border-gray-300 hover:border-black rounded-sm";
|
|
5981
6060
|
var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
@@ -6033,8 +6112,8 @@ var InputContainer = function(param) {
|
|
|
6033
6112
|
labelStyle,
|
|
6034
6113
|
elementsCommonClassName
|
|
6035
6114
|
]);
|
|
6036
|
-
return /* @__PURE__ */
|
|
6037
|
-
children: /* @__PURE__ */
|
|
6115
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6116
|
+
children: /* @__PURE__ */ jsx22("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
6038
6117
|
title: title,
|
|
6039
6118
|
minLength: minLength,
|
|
6040
6119
|
placeholder: placeholder,
|
|
@@ -6053,7 +6132,7 @@ var InputContainer = function(param) {
|
|
|
6053
6132
|
}));
|
|
6054
6133
|
};
|
|
6055
6134
|
var DateInputContainer = function(param) {
|
|
6056
|
-
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction, value = param.value, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, elementsCommonClassName = param.elementsCommonClassName, title = param.title, labelStyle = param.labelStyle,
|
|
6135
|
+
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction, value = param.value, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, elementsCommonClassName = param.elementsCommonClassName, title = param.title, labelStyle = param.labelStyle, _param_calendarClassName = param.calendarClassName, calendarClassName = _param_calendarClassName === void 0 ? "" : _param_calendarClassName, _param_inputClassName = param.inputClassName, inputClassName = _param_inputClassName === void 0 ? "" : _param_inputClassName, _param_selectedDayClassName = param.selectedDayClassName, selectedDayClassName = _param_selectedDayClassName === void 0 ? "" : _param_selectedDayClassName, _param_todayDayClassName = param.todayDayClassName, todayDayClassName = _param_todayDayClassName === void 0 ? "" : _param_todayDayClassName;
|
|
6057
6136
|
var containerProps = useMemo9(function() {
|
|
6058
6137
|
return {
|
|
6059
6138
|
containerClassName: containerClassName,
|
|
@@ -6084,10 +6163,10 @@ var DateInputContainer = function(param) {
|
|
|
6084
6163
|
try {
|
|
6085
6164
|
return parseDate(dateStr);
|
|
6086
6165
|
} catch (e) {
|
|
6087
|
-
return
|
|
6166
|
+
return today2(getLocalTimeZone2());
|
|
6088
6167
|
}
|
|
6089
6168
|
}
|
|
6090
|
-
return
|
|
6169
|
+
return today2(getLocalTimeZone2());
|
|
6091
6170
|
};
|
|
6092
6171
|
var handleDateChange = useCallback6(function(date) {
|
|
6093
6172
|
if (!onChange) {
|
|
@@ -6107,10 +6186,11 @@ var DateInputContainer = function(param) {
|
|
|
6107
6186
|
]);
|
|
6108
6187
|
var pickerValue = value ? getDefaultValue(value) : void 0;
|
|
6109
6188
|
var pickerDefaultValue = !pickerValue && defaultValue ? getDefaultValue(defaultValue) : void 0;
|
|
6110
|
-
return /* @__PURE__ */
|
|
6111
|
-
children: /* @__PURE__ */
|
|
6189
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6190
|
+
children: /* @__PURE__ */ jsx22(I18nProvider, {
|
|
6112
6191
|
locale: "en-GB",
|
|
6113
|
-
children: /* @__PURE__ */
|
|
6192
|
+
children: /* @__PURE__ */ jsxs15(RACDatePicker, {
|
|
6193
|
+
placeholderValue: placeholder ? parseDate(placeholder) : void 0,
|
|
6114
6194
|
className: cn("flex items-center gap-2 flex-1", elementClassName),
|
|
6115
6195
|
name: name,
|
|
6116
6196
|
defaultValue: pickerDefaultValue,
|
|
@@ -6118,13 +6198,13 @@ var DateInputContainer = function(param) {
|
|
|
6118
6198
|
onChange: handleDateChange,
|
|
6119
6199
|
onKeyDown: onKeyDown,
|
|
6120
6200
|
children: [
|
|
6121
|
-
/* @__PURE__ */
|
|
6201
|
+
/* @__PURE__ */ jsxs15("div", {
|
|
6122
6202
|
title: title,
|
|
6123
6203
|
className: cn("flex flex-1"),
|
|
6124
6204
|
children: [
|
|
6125
|
-
/* @__PURE__ */
|
|
6205
|
+
/* @__PURE__ */ jsx22(Group, {
|
|
6126
6206
|
className: cn("flex-1 bg-background", defaultFormElementBorderClassName),
|
|
6127
|
-
children: /* @__PURE__ */
|
|
6207
|
+
children: /* @__PURE__ */ jsx22(DateInput, _object_spread_props(_object_spread({}, props), {
|
|
6128
6208
|
unstyled: true,
|
|
6129
6209
|
style: {
|
|
6130
6210
|
direction: "ltr"
|
|
@@ -6132,21 +6212,23 @@ var DateInputContainer = function(param) {
|
|
|
6132
6212
|
className: cn("flex-1 h-9 px-3 py-2 text-sm", direction === "rtl" ? "justify-end text-right" : "justify-start text-left", inputClassName)
|
|
6133
6213
|
}))
|
|
6134
6214
|
}),
|
|
6135
|
-
/* @__PURE__ */
|
|
6215
|
+
/* @__PURE__ */ jsx22(Button3, {
|
|
6136
6216
|
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",
|
|
6137
|
-
children: /* @__PURE__ */
|
|
6217
|
+
children: /* @__PURE__ */ jsx22(CalendarIcon, {
|
|
6138
6218
|
size: 16
|
|
6139
6219
|
})
|
|
6140
6220
|
})
|
|
6141
6221
|
]
|
|
6142
6222
|
}),
|
|
6143
|
-
/* @__PURE__ */
|
|
6223
|
+
/* @__PURE__ */ jsx22(Popover2, {
|
|
6144
6224
|
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",
|
|
6145
6225
|
offset: 4,
|
|
6146
|
-
children: /* @__PURE__ */
|
|
6226
|
+
children: /* @__PURE__ */ jsx22(Dialog2, {
|
|
6147
6227
|
className: "max-h-[inherit] overflow-auto p-2",
|
|
6148
|
-
children: /* @__PURE__ */
|
|
6149
|
-
|
|
6228
|
+
children: /* @__PURE__ */ jsx22(Calendar, {
|
|
6229
|
+
selectedDayClassName: selectedDayClassName,
|
|
6230
|
+
todayDayClassName: todayDayClassName,
|
|
6231
|
+
className: cn("bg-white", calendarClassName)
|
|
6150
6232
|
})
|
|
6151
6233
|
})
|
|
6152
6234
|
})
|
|
@@ -6191,8 +6273,8 @@ var SelectContainer = function(param) {
|
|
|
6191
6273
|
labelStyle,
|
|
6192
6274
|
elementsCommonClassName
|
|
6193
6275
|
]);
|
|
6194
|
-
return /* @__PURE__ */
|
|
6195
|
-
children: /* @__PURE__ */
|
|
6276
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6277
|
+
children: /* @__PURE__ */ jsxs15("div", {
|
|
6196
6278
|
title: title,
|
|
6197
6279
|
style: {
|
|
6198
6280
|
direction: direction
|
|
@@ -6202,21 +6284,21 @@ var SelectContainer = function(param) {
|
|
|
6202
6284
|
return setIsOpen(!isOpen);
|
|
6203
6285
|
},
|
|
6204
6286
|
children: [
|
|
6205
|
-
/* @__PURE__ */
|
|
6287
|
+
/* @__PURE__ */ jsx22("div", {
|
|
6206
6288
|
className: cn("h-9 max-h-9 py-2 px-3 flex items-center justify-center cursor-pointer", defaultFormElementBorderClassName, selectClassName),
|
|
6207
6289
|
children: ((_options_find = options.find(function(opt) {
|
|
6208
6290
|
return opt.value === selectedValue;
|
|
6209
6291
|
})) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
|
|
6210
6292
|
}),
|
|
6211
|
-
isOpen ? /* @__PURE__ */
|
|
6293
|
+
isOpen ? /* @__PURE__ */ jsx22("i", {
|
|
6212
6294
|
className: cn("fa-light fa-chevron-up absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
6213
|
-
}) : /* @__PURE__ */
|
|
6295
|
+
}) : /* @__PURE__ */ jsx22("i", {
|
|
6214
6296
|
className: cn("fa-light fa-chevron-down absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
6215
6297
|
}),
|
|
6216
|
-
isOpen && /* @__PURE__ */
|
|
6298
|
+
isOpen && /* @__PURE__ */ jsx22("div", {
|
|
6217
6299
|
className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
|
|
6218
6300
|
children: sortOptions.map(function(option) {
|
|
6219
|
-
return /* @__PURE__ */
|
|
6301
|
+
return /* @__PURE__ */ jsx22("div", {
|
|
6220
6302
|
className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
|
|
6221
6303
|
onClick: function() {
|
|
6222
6304
|
return handleOptionClick(option.value);
|
|
@@ -6225,7 +6307,7 @@ var SelectContainer = function(param) {
|
|
|
6225
6307
|
}, option.value);
|
|
6226
6308
|
})
|
|
6227
6309
|
}),
|
|
6228
|
-
/* @__PURE__ */
|
|
6310
|
+
/* @__PURE__ */ jsx22("input", {
|
|
6229
6311
|
value: selectedValue,
|
|
6230
6312
|
type: "hidden",
|
|
6231
6313
|
name: name,
|
|
@@ -6264,8 +6346,8 @@ function MultiSelect(param) {
|
|
|
6264
6346
|
labelStyle,
|
|
6265
6347
|
elementsCommonClassName
|
|
6266
6348
|
]);
|
|
6267
|
-
return /* @__PURE__ */
|
|
6268
|
-
children: /* @__PURE__ */
|
|
6349
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6350
|
+
children: /* @__PURE__ */ jsx22(multiselect_default, {
|
|
6269
6351
|
closeDropdownOnSelect: closeDropdownOnSelect,
|
|
6270
6352
|
commandProps: {
|
|
6271
6353
|
label: placeholder
|
|
@@ -6287,7 +6369,7 @@ function MultiSelect(param) {
|
|
|
6287
6369
|
className: cn(defaultFormElementBorderClassName, styles.className),
|
|
6288
6370
|
dropdownClassName: styles.dropdownClassName,
|
|
6289
6371
|
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
6290
|
-
emptyIndicator: emptyOptionsElement || /* @__PURE__ */
|
|
6372
|
+
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx22("p", {
|
|
6291
6373
|
className: "text-center text-sm",
|
|
6292
6374
|
children: "all options selected."
|
|
6293
6375
|
}),
|
|
@@ -6325,8 +6407,8 @@ var SelectWithSearch = function(param) {
|
|
|
6325
6407
|
labelStyle,
|
|
6326
6408
|
elementsCommonClassName
|
|
6327
6409
|
]);
|
|
6328
|
-
return /* @__PURE__ */
|
|
6329
|
-
children: /* @__PURE__ */
|
|
6410
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6411
|
+
children: /* @__PURE__ */ jsx22(SearchSelect, {
|
|
6330
6412
|
direction: direction,
|
|
6331
6413
|
createNewOptionLabel: createNewOptionLabel,
|
|
6332
6414
|
createNewOptionContainerClassName: createNewOptionContainerClassName,
|
|
@@ -6377,8 +6459,8 @@ var TextAreaContainer = function(param) {
|
|
|
6377
6459
|
labelStyle,
|
|
6378
6460
|
elementsCommonClassName
|
|
6379
6461
|
]);
|
|
6380
|
-
return /* @__PURE__ */
|
|
6381
|
-
children: /* @__PURE__ */
|
|
6462
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6463
|
+
children: /* @__PURE__ */ jsx22("textarea", _object_spread_props(_object_spread({}, props), {
|
|
6382
6464
|
defaultValue: value ? void 0 : defaultValue,
|
|
6383
6465
|
value: defaultValue ? void 0 : value,
|
|
6384
6466
|
onChange: onChange,
|
|
@@ -6394,7 +6476,7 @@ var TextAreaContainer = function(param) {
|
|
|
6394
6476
|
};
|
|
6395
6477
|
var FormSeparator = function(param) {
|
|
6396
6478
|
var props = param.props, children = param.children;
|
|
6397
|
-
return /* @__PURE__ */
|
|
6479
|
+
return /* @__PURE__ */ jsx22("div", _object_spread_props(_object_spread({}, props), {
|
|
6398
6480
|
className: cn("border-b-[1px] border-gray-300 h-[1px]", props === null || props === void 0 ? void 0 : props.className),
|
|
6399
6481
|
children: children
|
|
6400
6482
|
}));
|
|
@@ -6426,8 +6508,8 @@ var CheckboxContainer = function(param) {
|
|
|
6426
6508
|
labelStyle,
|
|
6427
6509
|
elementsCommonClassName
|
|
6428
6510
|
]);
|
|
6429
|
-
return /* @__PURE__ */
|
|
6430
|
-
children: /* @__PURE__ */
|
|
6511
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6512
|
+
children: /* @__PURE__ */ jsx22(Checkbox, {
|
|
6431
6513
|
id: id,
|
|
6432
6514
|
name: name,
|
|
6433
6515
|
checked: checked,
|
|
@@ -6491,21 +6573,21 @@ var DurationPicker = function(param) {
|
|
|
6491
6573
|
onChange === null || onChange === void 0 ? void 0 : onChange(durationToSeconds(update));
|
|
6492
6574
|
};
|
|
6493
6575
|
};
|
|
6494
|
-
return /* @__PURE__ */
|
|
6495
|
-
children: /* @__PURE__ */
|
|
6576
|
+
return /* @__PURE__ */ jsx22(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6577
|
+
children: /* @__PURE__ */ jsxs15("div", {
|
|
6496
6578
|
title: title,
|
|
6497
6579
|
className: cn("flex gap-1.5 text-sm", elementClassName),
|
|
6498
6580
|
dir: "ltr",
|
|
6499
6581
|
children: [
|
|
6500
6582
|
Array.from(new Set(options)).map(function(field) {
|
|
6501
|
-
return /* @__PURE__ */
|
|
6583
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
6502
6584
|
className: "flex flex-col border p-0.5 rounded-md",
|
|
6503
6585
|
children: [
|
|
6504
|
-
!hideLabels && /* @__PURE__ */
|
|
6586
|
+
!hideLabels && /* @__PURE__ */ jsx22("label", {
|
|
6505
6587
|
className: "mb-1 ps-1 capitalize text-start border-b-[1px] border-b-gray-300",
|
|
6506
6588
|
children: field.slice(0, 1)
|
|
6507
6589
|
}),
|
|
6508
|
-
/* @__PURE__ */
|
|
6590
|
+
/* @__PURE__ */ jsx22("input", {
|
|
6509
6591
|
type: "number",
|
|
6510
6592
|
inputMode: "numeric",
|
|
6511
6593
|
min: 0,
|
|
@@ -6523,7 +6605,7 @@ var DurationPicker = function(param) {
|
|
|
6523
6605
|
]
|
|
6524
6606
|
}, field);
|
|
6525
6607
|
}),
|
|
6526
|
-
/* @__PURE__ */
|
|
6608
|
+
/* @__PURE__ */ jsx22("input", {
|
|
6527
6609
|
name: name,
|
|
6528
6610
|
type: "hidden",
|
|
6529
6611
|
value: durationToSeconds(duration)
|
|
@@ -6534,10 +6616,10 @@ var DurationPicker = function(param) {
|
|
|
6534
6616
|
};
|
|
6535
6617
|
var FormElementContainer = function(param) {
|
|
6536
6618
|
var containerClassName = param.containerClassName, direction = param.direction, labelClassName = param.labelClassName, labelContent = param.labelContent, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, name = param.name, required = param.required, children = param.children, _param_defaultContainerClassName = param.defaultContainerClassName, defaultContainerClassName = _param_defaultContainerClassName === void 0 ? true : _param_defaultContainerClassName, _param_elementsCommonClassName = param.elementsCommonClassName, elementsCommonClassName = _param_elementsCommonClassName === void 0 ? "" : _param_elementsCommonClassName, labelStyle = param.labelStyle;
|
|
6537
|
-
return /* @__PURE__ */
|
|
6619
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
6538
6620
|
className: cn(defaultContainerClassName ? defaultFormElementContainerClassName : "", containerClassName, elementsCommonClassName),
|
|
6539
6621
|
children: [
|
|
6540
|
-
labelContent && /* @__PURE__ */
|
|
6622
|
+
labelContent && /* @__PURE__ */ jsx22(ElementLabel, {
|
|
6541
6623
|
labelStyle: labelStyle,
|
|
6542
6624
|
labelsCommonClassName: labelsCommonClassName,
|
|
6543
6625
|
withDots: labelWithDots,
|
|
@@ -6553,7 +6635,7 @@ var FormElementContainer = function(param) {
|
|
|
6553
6635
|
};
|
|
6554
6636
|
var ElementLabel = function(param) {
|
|
6555
6637
|
var labelContent = param.labelContent, labelClassName = param.labelClassName, name = param.name, required = param.required, _param_withDots = param.withDots, withDots = _param_withDots === void 0 ? false : _param_withDots, direction = param.direction, labelsCommonClassName = param.labelsCommonClassName, _param_labelStyle = param.labelStyle, labelStyle = _param_labelStyle === void 0 ? {} : _param_labelStyle;
|
|
6556
|
-
return /* @__PURE__ */
|
|
6638
|
+
return /* @__PURE__ */ jsxs15("label", {
|
|
6557
6639
|
style: _object_spread({
|
|
6558
6640
|
direction: direction
|
|
6559
6641
|
}, labelStyle),
|
|
@@ -6562,11 +6644,11 @@ var ElementLabel = function(param) {
|
|
|
6562
6644
|
title: labelContent,
|
|
6563
6645
|
children: [
|
|
6564
6646
|
labelContent,
|
|
6565
|
-
required && /* @__PURE__ */
|
|
6647
|
+
required && /* @__PURE__ */ jsx22("div", {
|
|
6566
6648
|
className: "text-red-500",
|
|
6567
6649
|
children: "*"
|
|
6568
6650
|
}),
|
|
6569
|
-
withDots && /* @__PURE__ */
|
|
6651
|
+
withDots && /* @__PURE__ */ jsx22("div", {
|
|
6570
6652
|
children: ":"
|
|
6571
6653
|
})
|
|
6572
6654
|
]
|
|
@@ -6628,15 +6710,15 @@ var ElementsContainer = memo2(function(props) {
|
|
|
6628
6710
|
containerClassName,
|
|
6629
6711
|
elementProps
|
|
6630
6712
|
]);
|
|
6631
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
6632
6714
|
ref: containerRef,
|
|
6633
6715
|
className: cn("flex flex-col gap-1", className),
|
|
6634
6716
|
children: [
|
|
6635
|
-
headline && /* @__PURE__ */
|
|
6717
|
+
headline && /* @__PURE__ */ jsx22("div", {
|
|
6636
6718
|
className: cn("text-start text-primary font-bold border-b-[1px] border-gray-400 pb-0.5", headlineClassName),
|
|
6637
6719
|
children: headline
|
|
6638
6720
|
}),
|
|
6639
|
-
/* @__PURE__ */
|
|
6721
|
+
/* @__PURE__ */ jsx22("div", {
|
|
6640
6722
|
className: cn("flex flex-col gap-1.5", childrenContainerClassName),
|
|
6641
6723
|
children: enhancedChildren
|
|
6642
6724
|
})
|
|
@@ -6645,7 +6727,7 @@ var ElementsContainer = memo2(function(props) {
|
|
|
6645
6727
|
}, propsAreEqual);
|
|
6646
6728
|
ElementsContainer.displayName = "ElementsContainer";
|
|
6647
6729
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
6648
|
-
import { jsx as
|
|
6730
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6649
6731
|
var ModularForm = function(param) {
|
|
6650
6732
|
var _param_submitFunction = param.submitFunction, submitFunction = _param_submitFunction === void 0 ? /*#__PURE__*/ function() {
|
|
6651
6733
|
var _ref = _async_to_generator(function(form) {
|
|
@@ -6752,7 +6834,7 @@ var ModularForm = function(param) {
|
|
|
6752
6834
|
return _ref.apply(this, arguments);
|
|
6753
6835
|
};
|
|
6754
6836
|
}();
|
|
6755
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ jsxs16("form", {
|
|
6756
6838
|
ref: formRef,
|
|
6757
6839
|
onSubmit: onSubmit,
|
|
6758
6840
|
style: {
|
|
@@ -6760,79 +6842,79 @@ var ModularForm = function(param) {
|
|
|
6760
6842
|
},
|
|
6761
6843
|
className: cn("w-[350px] px-5 py-5 flex flex-col gap-4", className),
|
|
6762
6844
|
children: [
|
|
6763
|
-
headerContent && /* @__PURE__ */
|
|
6845
|
+
headerContent && /* @__PURE__ */ jsx23("div", {
|
|
6764
6846
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
6765
6847
|
children: headerContent
|
|
6766
6848
|
}),
|
|
6767
|
-
/* @__PURE__ */
|
|
6849
|
+
/* @__PURE__ */ jsx23("div", {
|
|
6768
6850
|
className: cn("w-full flex flex-col gap-5", elementsContainerClassName),
|
|
6769
6851
|
children: elements.map(function(element, index2) {
|
|
6770
6852
|
switch(element.type){
|
|
6771
6853
|
case "input":
|
|
6772
|
-
return /* @__PURE__ */
|
|
6854
|
+
return /* @__PURE__ */ jsx23(InputContainer, _object_spread_props(_object_spread({
|
|
6773
6855
|
direction: direction
|
|
6774
6856
|
}, element), {
|
|
6775
6857
|
labelsCommonClassName: labelsCommonClassName,
|
|
6776
6858
|
elementsCommonClassName: elementsCommonClassName
|
|
6777
6859
|
}), index2);
|
|
6778
6860
|
case "dateInput":
|
|
6779
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ jsx23(DateInputContainer, _object_spread_props(_object_spread({
|
|
6780
6862
|
direction: direction
|
|
6781
6863
|
}, element), {
|
|
6782
6864
|
labelsCommonClassName: labelsCommonClassName,
|
|
6783
6865
|
elementsCommonClassName: elementsCommonClassName
|
|
6784
6866
|
}), index2);
|
|
6785
6867
|
case "textarea":
|
|
6786
|
-
return /* @__PURE__ */
|
|
6868
|
+
return /* @__PURE__ */ jsx23(TextAreaContainer, _object_spread_props(_object_spread({
|
|
6787
6869
|
direction: element.direction || direction
|
|
6788
6870
|
}, element), {
|
|
6789
6871
|
labelsCommonClassName: labelsCommonClassName,
|
|
6790
6872
|
elementsCommonClassName: elementsCommonClassName
|
|
6791
6873
|
}), index2);
|
|
6792
6874
|
case "select":
|
|
6793
|
-
return /* @__PURE__ */
|
|
6875
|
+
return /* @__PURE__ */ jsx23(SelectContainer, _object_spread_props(_object_spread({
|
|
6794
6876
|
direction: direction
|
|
6795
6877
|
}, element), {
|
|
6796
6878
|
labelsCommonClassName: labelsCommonClassName,
|
|
6797
6879
|
elementsCommonClassName: elementsCommonClassName
|
|
6798
6880
|
}), index2);
|
|
6799
6881
|
case "checkbox":
|
|
6800
|
-
return /* @__PURE__ */
|
|
6882
|
+
return /* @__PURE__ */ jsx23(CheckboxContainer, _object_spread_props(_object_spread({
|
|
6801
6883
|
direction: direction
|
|
6802
6884
|
}, element), {
|
|
6803
6885
|
labelsCommonClassName: labelsCommonClassName,
|
|
6804
6886
|
elementsCommonClassName: elementsCommonClassName
|
|
6805
6887
|
}), index2);
|
|
6806
6888
|
case "multiSelect":
|
|
6807
|
-
return /* @__PURE__ */
|
|
6889
|
+
return /* @__PURE__ */ jsx23(MultiSelect, _object_spread_props(_object_spread({
|
|
6808
6890
|
direction: direction
|
|
6809
6891
|
}, element), {
|
|
6810
6892
|
labelsCommonClassName: labelsCommonClassName,
|
|
6811
6893
|
elementsCommonClassName: elementsCommonClassName
|
|
6812
6894
|
}), index2);
|
|
6813
6895
|
case "selectWithSearch":
|
|
6814
|
-
return /* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ jsx23(SelectWithSearch, _object_spread_props(_object_spread({
|
|
6815
6897
|
direction: direction
|
|
6816
6898
|
}, element), {
|
|
6817
6899
|
labelsCommonClassName: labelsCommonClassName,
|
|
6818
6900
|
elementsCommonClassName: elementsCommonClassName
|
|
6819
6901
|
}), index2);
|
|
6820
6902
|
case "internationalPhoneInput":
|
|
6821
|
-
return /* @__PURE__ */
|
|
6903
|
+
return /* @__PURE__ */ jsx23(InternationalPhonePicker, _object_spread_props(_object_spread({
|
|
6822
6904
|
direction: direction
|
|
6823
6905
|
}, element), {
|
|
6824
6906
|
labelsCommonClassName: labelsCommonClassName,
|
|
6825
6907
|
elementsCommonClassName: elementsCommonClassName
|
|
6826
6908
|
}), index2);
|
|
6827
6909
|
case "duration":
|
|
6828
|
-
return /* @__PURE__ */
|
|
6910
|
+
return /* @__PURE__ */ jsx23(DurationPicker, _object_spread_props(_object_spread({
|
|
6829
6911
|
direction: direction
|
|
6830
6912
|
}, element), {
|
|
6831
6913
|
labelsCommonClassName: labelsCommonClassName,
|
|
6832
6914
|
elementsCommonClassName: elementsCommonClassName
|
|
6833
6915
|
}), index2);
|
|
6834
6916
|
case "separator":
|
|
6835
|
-
return /* @__PURE__ */
|
|
6917
|
+
return /* @__PURE__ */ jsx23(FormSeparator, _object_spread_props(_object_spread({
|
|
6836
6918
|
direction: direction
|
|
6837
6919
|
}, element), {
|
|
6838
6920
|
children: element.children
|
|
@@ -6847,15 +6929,15 @@ var ModularForm = function(param) {
|
|
|
6847
6929
|
}
|
|
6848
6930
|
})
|
|
6849
6931
|
}),
|
|
6850
|
-
/* @__PURE__ */
|
|
6932
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
6851
6933
|
className: cn("flex justify-between w-full", footerClassName),
|
|
6852
6934
|
children: [
|
|
6853
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ jsx23("div", {
|
|
6854
6936
|
title: errorMsg,
|
|
6855
6937
|
className: cn("text-[#f22] text-[18px] max-w-[80%] ellipsis", errorClassName),
|
|
6856
6938
|
children: errorMsg
|
|
6857
6939
|
}),
|
|
6858
|
-
/* @__PURE__ */
|
|
6940
|
+
/* @__PURE__ */ jsx23("button", {
|
|
6859
6941
|
ref: submitRef,
|
|
6860
6942
|
disabled: isLoading,
|
|
6861
6943
|
onClick: function(e) {
|
|
@@ -6863,7 +6945,7 @@ var ModularForm = function(param) {
|
|
|
6863
6945
|
},
|
|
6864
6946
|
className: cn("bg-[#547f22] px-3 py-1.5 rounded-lg text-white min-w-20", buttonClassName),
|
|
6865
6947
|
type: "submit",
|
|
6866
|
-
children: isLoading ? /* @__PURE__ */
|
|
6948
|
+
children: isLoading ? /* @__PURE__ */ jsx23(Loader, _object_spread({
|
|
6867
6949
|
size: 18,
|
|
6868
6950
|
color: "#fff"
|
|
6869
6951
|
}, loaderProps)) : buttonContent
|
|
@@ -6880,77 +6962,6 @@ import moment3 from "moment";
|
|
|
6880
6962
|
import { CalendarIcon as CalendarIcon2 } from "lucide-react";
|
|
6881
6963
|
import { Button as Button4, DatePicker as RACDatePicker2, Dialog as Dialog3, Group as Group2, Label as Label2, Popover as Popover3 } from "react-aria-components";
|
|
6882
6964
|
import { parseDate as parseDate2, today as today3, getLocalTimeZone as getLocalTimeZone3 } from "@internationalized/date";
|
|
6883
|
-
// src/components/ui/calendar-rac.tsx
|
|
6884
|
-
import { getLocalTimeZone as getLocalTimeZone2, today as today2 } from "@internationalized/date";
|
|
6885
|
-
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
6886
|
-
import { Button as Button3, CalendarCell as CalendarCellRac, CalendarGridBody as CalendarGridBodyRac, CalendarGridHeader as CalendarGridHeaderRac, CalendarGrid as CalendarGridRac, CalendarHeaderCell as CalendarHeaderCellRac, Calendar as CalendarRac, composeRenderProps as composeRenderProps2, Heading as HeadingRac, RangeCalendar as RangeCalendarRac } from "react-aria-components";
|
|
6887
|
-
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6888
|
-
function CalendarHeader() {
|
|
6889
|
-
return /* @__PURE__ */ jsxs16("header", {
|
|
6890
|
-
className: "flex w-full items-center gap-1 pb-1",
|
|
6891
|
-
children: [
|
|
6892
|
-
/* @__PURE__ */ jsx23(Button3, {
|
|
6893
|
-
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",
|
|
6894
|
-
slot: "previous",
|
|
6895
|
-
children: /* @__PURE__ */ jsx23(ChevronLeftIcon, {
|
|
6896
|
-
size: 16
|
|
6897
|
-
})
|
|
6898
|
-
}),
|
|
6899
|
-
/* @__PURE__ */ jsx23(HeadingRac, {
|
|
6900
|
-
className: "grow text-center font-medium text-sm"
|
|
6901
|
-
}),
|
|
6902
|
-
/* @__PURE__ */ jsx23(Button3, {
|
|
6903
|
-
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",
|
|
6904
|
-
slot: "next",
|
|
6905
|
-
children: /* @__PURE__ */ jsx23(ChevronRightIcon, {
|
|
6906
|
-
size: 16
|
|
6907
|
-
})
|
|
6908
|
-
})
|
|
6909
|
-
]
|
|
6910
|
-
});
|
|
6911
|
-
}
|
|
6912
|
-
function CalendarGridComponent(param) {
|
|
6913
|
-
var _param_isRange = param.isRange, isRange = _param_isRange === void 0 ? false : _param_isRange;
|
|
6914
|
-
var now = today2(getLocalTimeZone2());
|
|
6915
|
-
return /* @__PURE__ */ jsxs16(CalendarGridRac, {
|
|
6916
|
-
children: [
|
|
6917
|
-
/* @__PURE__ */ jsx23(CalendarGridHeaderRac, {
|
|
6918
|
-
children: function(day) {
|
|
6919
|
-
return /* @__PURE__ */ jsx23(CalendarHeaderCellRac, {
|
|
6920
|
-
className: "size-9 rounded-md p-0 font-medium text-muted-foreground/80 text-xs",
|
|
6921
|
-
children: day
|
|
6922
|
-
});
|
|
6923
|
-
}
|
|
6924
|
-
}),
|
|
6925
|
-
/* @__PURE__ */ jsx23(CalendarGridBodyRac, {
|
|
6926
|
-
className: "[&_td]:px-0 [&_td]:py-px",
|
|
6927
|
-
children: function(date) {
|
|
6928
|
-
return /* @__PURE__ */ jsx23(CalendarCellRac, {
|
|
6929
|
-
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
|
|
6930
|
-
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
|
|
6931
|
-
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")),
|
|
6932
|
-
date: date
|
|
6933
|
-
});
|
|
6934
|
-
}
|
|
6935
|
-
})
|
|
6936
|
-
]
|
|
6937
|
-
});
|
|
6938
|
-
}
|
|
6939
|
-
function Calendar2(_param) {
|
|
6940
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
6941
|
-
"className"
|
|
6942
|
-
]);
|
|
6943
|
-
return /* @__PURE__ */ jsxs16(CalendarRac, _object_spread_props(_object_spread({}, props), {
|
|
6944
|
-
className: composeRenderProps2(className, function(className2) {
|
|
6945
|
-
return cn("w-fit", className2);
|
|
6946
|
-
}),
|
|
6947
|
-
children: [
|
|
6948
|
-
/* @__PURE__ */ jsx23(CalendarHeader, {}),
|
|
6949
|
-
/* @__PURE__ */ jsx23(CalendarGridComponent, {})
|
|
6950
|
-
]
|
|
6951
|
-
}));
|
|
6952
|
-
}
|
|
6953
|
-
// src/components/forms/index.tsx
|
|
6954
6965
|
import { I18nProvider as I18nProvider2 } from "react-aria-components";
|
|
6955
6966
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6956
6967
|
var ConfirmForm = function(param) {
|
|
@@ -7082,7 +7093,7 @@ function DatePicker2(param) {
|
|
|
7082
7093
|
return function(form) {
|
|
7083
7094
|
return _ref.apply(this, arguments);
|
|
7084
7095
|
};
|
|
7085
|
-
}() : _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_calendarClassName = param.calendarClassName, calendarClassName = _param_calendarClassName === void 0 ? "" : _param_calendarClassName, _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;
|
|
7096
|
+
}() : _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_calendarClassName = param.calendarClassName, calendarClassName = _param_calendarClassName === void 0 ? "" : _param_calendarClassName, _param_selectedDayClassName = param.selectedDayClassName, selectedDayClassName = _param_selectedDayClassName === void 0 ? "" : _param_selectedDayClassName, _param_todayDayClassName = param.todayDayClassName, todayDayClassName = _param_todayDayClassName === void 0 ? "" : _param_todayDayClassName, _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;
|
|
7086
7097
|
var _useState11 = _sliced_to_array(useState11(false), 2), isLoading = _useState11[0], setIsLoading = _useState11[1];
|
|
7087
7098
|
var onSubmit = /*#__PURE__*/ function() {
|
|
7088
7099
|
var _ref = _async_to_generator(function(e) {
|
|
@@ -7161,7 +7172,9 @@ function DatePicker2(param) {
|
|
|
7161
7172
|
offset: 4,
|
|
7162
7173
|
children: /* @__PURE__ */ jsx24(Dialog3, {
|
|
7163
7174
|
className: "max-h-[inherit] overflow-auto p-2",
|
|
7164
|
-
children: /* @__PURE__ */ jsx24(
|
|
7175
|
+
children: /* @__PURE__ */ jsx24(Calendar, {
|
|
7176
|
+
selectedDayClassName: selectedDayClassName,
|
|
7177
|
+
todayDayClassName: todayDayClassName,
|
|
7165
7178
|
className: cn("bg-white", calendarClassName)
|
|
7166
7179
|
})
|
|
7167
7180
|
})
|
|
@@ -7202,7 +7215,9 @@ function DatePicker2(param) {
|
|
|
7202
7215
|
offset: 4,
|
|
7203
7216
|
children: /* @__PURE__ */ jsx24(Dialog3, {
|
|
7204
7217
|
className: "max-h-[inherit] overflow-auto p-2",
|
|
7205
|
-
children: /* @__PURE__ */ jsx24(
|
|
7218
|
+
children: /* @__PURE__ */ jsx24(Calendar, {
|
|
7219
|
+
selectedDayClassName: selectedDayClassName,
|
|
7220
|
+
todayDayClassName: todayDayClassName,
|
|
7206
7221
|
className: cn("bg-white", calendarClassName)
|
|
7207
7222
|
})
|
|
7208
7223
|
})
|