akeyless-client-commons 1.1.94 → 1.1.95
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.map +1 -1
- package/dist/components/index.d.mts +15 -2
- package/dist/components/index.d.ts +15 -2
- package/dist/components/index.js +248 -129
- package/dist/components/index.mjs +234 -119
- package/dist/types/index.d.mts +14 -2
- package/dist/types/index.d.ts +14 -2
- package/package.json +1 -1
|
@@ -5747,6 +5747,7 @@ function useDeepCompareEffect(effect, dependencies) {
|
|
|
5747
5747
|
}
|
|
5748
5748
|
// src/components/forms/ModularForm/formElements.tsx
|
|
5749
5749
|
import { Children, cloneElement, isValidElement, memo as memo2, useCallback as useCallback6, useMemo as useMemo9, useRef as useRef7, useState as useState9 } from "react";
|
|
5750
|
+
import { I18nProvider } from "react-aria-components";
|
|
5750
5751
|
// src/components/forms/ModularForm/InternationalPhonePicker.tsx
|
|
5751
5752
|
import { ChevronDown, Phone } from "lucide-react";
|
|
5752
5753
|
import { forwardRef as forwardRef7, useEffect as useEffect9, useMemo as useMemo8, useRef as useRef6, useState as useState8 } from "react";
|
|
@@ -5937,7 +5938,44 @@ var FlagComponent = function(param) {
|
|
|
5937
5938
|
});
|
|
5938
5939
|
};
|
|
5939
5940
|
// src/components/forms/ModularForm/formElements.tsx
|
|
5940
|
-
import {
|
|
5941
|
+
import { Button as Button2, DatePicker as RACDatePicker, Dialog as Dialog2, Group, Popover as Popover2 } from "react-aria-components";
|
|
5942
|
+
// src/components/ui/datefield-rac.tsx
|
|
5943
|
+
import { composeRenderProps, DateField as DateFieldRac, DateInput as DateInputRac, DateSegment as DateSegmentRac, TimeField as TimeFieldRac } from "react-aria-components";
|
|
5944
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
5945
|
+
function DateSegment(_param) {
|
|
5946
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
5947
|
+
"className"
|
|
5948
|
+
]);
|
|
5949
|
+
return /* @__PURE__ */ jsx20(DateSegmentRac, _object_spread_props(_object_spread({
|
|
5950
|
+
className: composeRenderProps(className, function(className2) {
|
|
5951
|
+
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);
|
|
5952
|
+
})
|
|
5953
|
+
}, props), {
|
|
5954
|
+
"data-invalid": true
|
|
5955
|
+
}));
|
|
5956
|
+
}
|
|
5957
|
+
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";
|
|
5958
|
+
function DateInput(_param) {
|
|
5959
|
+
var className = _param.className, _param_unstyled = _param.unstyled, unstyled = _param_unstyled === void 0 ? false : _param_unstyled, props = _object_without_properties(_param, [
|
|
5960
|
+
"className",
|
|
5961
|
+
"unstyled"
|
|
5962
|
+
]);
|
|
5963
|
+
return /* @__PURE__ */ jsx20(DateInputRac, _object_spread_props(_object_spread({
|
|
5964
|
+
className: composeRenderProps(className, function(className2) {
|
|
5965
|
+
return cn(!unstyled && dateInputStyle, className2);
|
|
5966
|
+
})
|
|
5967
|
+
}, props), {
|
|
5968
|
+
children: function(segment) {
|
|
5969
|
+
return /* @__PURE__ */ jsx20(DateSegment, {
|
|
5970
|
+
segment: segment
|
|
5971
|
+
});
|
|
5972
|
+
}
|
|
5973
|
+
}));
|
|
5974
|
+
}
|
|
5975
|
+
// src/components/forms/ModularForm/formElements.tsx
|
|
5976
|
+
import { Calendar, CalendarIcon } from "lucide-react";
|
|
5977
|
+
import { parseDate, today, getLocalTimeZone } from "@internationalized/date";
|
|
5978
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5941
5979
|
var defaultFormElementContainerClassName = "flex justify-start items-center gap-3 w-full";
|
|
5942
5980
|
var defaultFormElementBorderClassName = "border-[1px] border-gray-300 hover:border-black rounded-sm";
|
|
5943
5981
|
var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
@@ -5995,8 +6033,8 @@ var InputContainer = function(param) {
|
|
|
5995
6033
|
labelStyle,
|
|
5996
6034
|
elementsCommonClassName
|
|
5997
6035
|
]);
|
|
5998
|
-
return /* @__PURE__ */
|
|
5999
|
-
children: /* @__PURE__ */
|
|
6036
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6037
|
+
children: /* @__PURE__ */ jsx21("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
6000
6038
|
title: title,
|
|
6001
6039
|
minLength: minLength,
|
|
6002
6040
|
placeholder: placeholder,
|
|
@@ -6014,6 +6052,109 @@ var InputContainer = function(param) {
|
|
|
6014
6052
|
}))
|
|
6015
6053
|
}));
|
|
6016
6054
|
};
|
|
6055
|
+
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, _param_calendarIconClassName = param.calendarIconClassName, calendarIconClassName = _param_calendarIconClassName === void 0 ? "" : _param_calendarIconClassName;
|
|
6057
|
+
var containerProps = useMemo9(function() {
|
|
6058
|
+
return {
|
|
6059
|
+
containerClassName: containerClassName,
|
|
6060
|
+
direction: direction,
|
|
6061
|
+
labelClassName: labelClassName,
|
|
6062
|
+
labelContent: labelContent,
|
|
6063
|
+
labelWithDots: labelWithDots,
|
|
6064
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
6065
|
+
name: name,
|
|
6066
|
+
required: required,
|
|
6067
|
+
labelStyle: labelStyle,
|
|
6068
|
+
elementsCommonClassName: elementsCommonClassName
|
|
6069
|
+
};
|
|
6070
|
+
}, [
|
|
6071
|
+
containerClassName,
|
|
6072
|
+
direction,
|
|
6073
|
+
labelClassName,
|
|
6074
|
+
labelContent,
|
|
6075
|
+
labelWithDots,
|
|
6076
|
+
labelsCommonClassName,
|
|
6077
|
+
name,
|
|
6078
|
+
required,
|
|
6079
|
+
labelStyle,
|
|
6080
|
+
elementsCommonClassName
|
|
6081
|
+
]);
|
|
6082
|
+
var getDefaultValue = function(dateStr) {
|
|
6083
|
+
if (dateStr) {
|
|
6084
|
+
try {
|
|
6085
|
+
return parseDate(dateStr);
|
|
6086
|
+
} catch (e) {
|
|
6087
|
+
return today(getLocalTimeZone());
|
|
6088
|
+
}
|
|
6089
|
+
}
|
|
6090
|
+
return today(getLocalTimeZone());
|
|
6091
|
+
};
|
|
6092
|
+
var handleDateChange = useCallback6(function(date) {
|
|
6093
|
+
if (!onChange) {
|
|
6094
|
+
return;
|
|
6095
|
+
}
|
|
6096
|
+
var valueStr = date ? date.toString() : "";
|
|
6097
|
+
var syntheticEvent = {
|
|
6098
|
+
target: {
|
|
6099
|
+
name: name,
|
|
6100
|
+
value: valueStr
|
|
6101
|
+
}
|
|
6102
|
+
};
|
|
6103
|
+
onChange(syntheticEvent);
|
|
6104
|
+
}, [
|
|
6105
|
+
onChange,
|
|
6106
|
+
name
|
|
6107
|
+
]);
|
|
6108
|
+
var pickerValue = value ? getDefaultValue(value) : void 0;
|
|
6109
|
+
var pickerDefaultValue = !pickerValue && defaultValue ? getDefaultValue(defaultValue) : void 0;
|
|
6110
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6111
|
+
children: /* @__PURE__ */ jsx21(I18nProvider, {
|
|
6112
|
+
locale: "en-GB",
|
|
6113
|
+
children: /* @__PURE__ */ jsxs14(RACDatePicker, {
|
|
6114
|
+
className: cn("flex items-center gap-2"),
|
|
6115
|
+
name: name,
|
|
6116
|
+
defaultValue: pickerDefaultValue,
|
|
6117
|
+
value: pickerValue,
|
|
6118
|
+
onChange: handleDateChange,
|
|
6119
|
+
onKeyDown: onKeyDown,
|
|
6120
|
+
children: [
|
|
6121
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
6122
|
+
title: title,
|
|
6123
|
+
className: "flex flex-1",
|
|
6124
|
+
children: [
|
|
6125
|
+
/* @__PURE__ */ jsx21(Group, {
|
|
6126
|
+
className: cn("flex-1 bg-background", defaultFormElementBorderClassName, elementClassName),
|
|
6127
|
+
children: /* @__PURE__ */ jsx21(DateInput, _object_spread_props(_object_spread({}, props), {
|
|
6128
|
+
unstyled: true,
|
|
6129
|
+
style: {
|
|
6130
|
+
direction: "ltr"
|
|
6131
|
+
},
|
|
6132
|
+
className: cn("flex-1 h-9 px-3 py-2 text-sm", direction === "rtl" ? "justify-end text-right" : "justify-start text-left")
|
|
6133
|
+
}))
|
|
6134
|
+
}),
|
|
6135
|
+
/* @__PURE__ */ jsx21(Button2, {
|
|
6136
|
+
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__ */ jsx21(CalendarIcon, {
|
|
6138
|
+
size: 16
|
|
6139
|
+
})
|
|
6140
|
+
})
|
|
6141
|
+
]
|
|
6142
|
+
}),
|
|
6143
|
+
/* @__PURE__ */ jsx21(Popover2, {
|
|
6144
|
+
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
|
+
offset: 4,
|
|
6146
|
+
children: /* @__PURE__ */ jsx21(Dialog2, {
|
|
6147
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
6148
|
+
children: /* @__PURE__ */ jsx21(Calendar, {
|
|
6149
|
+
className: cn("bg-white", calendarIconClassName)
|
|
6150
|
+
})
|
|
6151
|
+
})
|
|
6152
|
+
})
|
|
6153
|
+
]
|
|
6154
|
+
})
|
|
6155
|
+
})
|
|
6156
|
+
}));
|
|
6157
|
+
};
|
|
6017
6158
|
var SelectContainer = function(param) {
|
|
6018
6159
|
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_optionClassName = param.optionClassName, optionClassName = _param_optionClassName === void 0 ? "" : _param_optionClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_selectClassName = param.selectClassName, selectClassName = _param_selectClassName === void 0 ? "" : _param_selectClassName, _param_optionsContainerClassName = param.optionsContainerClassName, optionsContainerClassName = _param_optionsContainerClassName === void 0 ? "" : _param_optionsContainerClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, onChange = param.onChange, labelWithDots = param.labelWithDots, iconClassName = param.iconClassName, labelsCommonClassName = param.labelsCommonClassName, elementsCommonClassName = param.elementsCommonClassName, title = param.title, labelStyle = param.labelStyle;
|
|
6019
6160
|
var _sortOptions_, _options_find;
|
|
@@ -6050,7 +6191,7 @@ var SelectContainer = function(param) {
|
|
|
6050
6191
|
labelStyle,
|
|
6051
6192
|
elementsCommonClassName
|
|
6052
6193
|
]);
|
|
6053
|
-
return /* @__PURE__ */
|
|
6194
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6054
6195
|
children: /* @__PURE__ */ jsxs14("div", {
|
|
6055
6196
|
title: title,
|
|
6056
6197
|
style: {
|
|
@@ -6061,21 +6202,21 @@ var SelectContainer = function(param) {
|
|
|
6061
6202
|
return setIsOpen(!isOpen);
|
|
6062
6203
|
},
|
|
6063
6204
|
children: [
|
|
6064
|
-
/* @__PURE__ */
|
|
6205
|
+
/* @__PURE__ */ jsx21("div", {
|
|
6065
6206
|
className: cn("h-9 max-h-9 py-2 px-3 flex items-center justify-center cursor-pointer", defaultFormElementBorderClassName, selectClassName),
|
|
6066
6207
|
children: ((_options_find = options.find(function(opt) {
|
|
6067
6208
|
return opt.value === selectedValue;
|
|
6068
6209
|
})) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
|
|
6069
6210
|
}),
|
|
6070
|
-
isOpen ? /* @__PURE__ */
|
|
6211
|
+
isOpen ? /* @__PURE__ */ jsx21("i", {
|
|
6071
6212
|
className: cn("fa-light fa-chevron-up absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
6072
|
-
}) : /* @__PURE__ */
|
|
6213
|
+
}) : /* @__PURE__ */ jsx21("i", {
|
|
6073
6214
|
className: cn("fa-light fa-chevron-down absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
6074
6215
|
}),
|
|
6075
|
-
isOpen && /* @__PURE__ */
|
|
6216
|
+
isOpen && /* @__PURE__ */ jsx21("div", {
|
|
6076
6217
|
className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
|
|
6077
6218
|
children: sortOptions.map(function(option) {
|
|
6078
|
-
return /* @__PURE__ */
|
|
6219
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
6079
6220
|
className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
|
|
6080
6221
|
onClick: function() {
|
|
6081
6222
|
return handleOptionClick(option.value);
|
|
@@ -6084,7 +6225,7 @@ var SelectContainer = function(param) {
|
|
|
6084
6225
|
}, option.value);
|
|
6085
6226
|
})
|
|
6086
6227
|
}),
|
|
6087
|
-
/* @__PURE__ */
|
|
6228
|
+
/* @__PURE__ */ jsx21("input", {
|
|
6088
6229
|
value: selectedValue,
|
|
6089
6230
|
type: "hidden",
|
|
6090
6231
|
name: name,
|
|
@@ -6123,8 +6264,8 @@ function MultiSelect(param) {
|
|
|
6123
6264
|
labelStyle,
|
|
6124
6265
|
elementsCommonClassName
|
|
6125
6266
|
]);
|
|
6126
|
-
return /* @__PURE__ */
|
|
6127
|
-
children: /* @__PURE__ */
|
|
6267
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6268
|
+
children: /* @__PURE__ */ jsx21(multiselect_default, {
|
|
6128
6269
|
closeDropdownOnSelect: closeDropdownOnSelect,
|
|
6129
6270
|
commandProps: {
|
|
6130
6271
|
label: placeholder
|
|
@@ -6146,7 +6287,7 @@ function MultiSelect(param) {
|
|
|
6146
6287
|
className: cn(defaultFormElementBorderClassName, styles.className),
|
|
6147
6288
|
dropdownClassName: styles.dropdownClassName,
|
|
6148
6289
|
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
6149
|
-
emptyIndicator: emptyOptionsElement || /* @__PURE__ */
|
|
6290
|
+
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx21("p", {
|
|
6150
6291
|
className: "text-center text-sm",
|
|
6151
6292
|
children: "all options selected."
|
|
6152
6293
|
}),
|
|
@@ -6184,8 +6325,8 @@ var SelectWithSearch = function(param) {
|
|
|
6184
6325
|
labelStyle,
|
|
6185
6326
|
elementsCommonClassName
|
|
6186
6327
|
]);
|
|
6187
|
-
return /* @__PURE__ */
|
|
6188
|
-
children: /* @__PURE__ */
|
|
6328
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6329
|
+
children: /* @__PURE__ */ jsx21(SearchSelect, {
|
|
6189
6330
|
direction: direction,
|
|
6190
6331
|
createNewOptionLabel: createNewOptionLabel,
|
|
6191
6332
|
createNewOptionContainerClassName: createNewOptionContainerClassName,
|
|
@@ -6236,8 +6377,8 @@ var TextAreaContainer = function(param) {
|
|
|
6236
6377
|
labelStyle,
|
|
6237
6378
|
elementsCommonClassName
|
|
6238
6379
|
]);
|
|
6239
|
-
return /* @__PURE__ */
|
|
6240
|
-
children: /* @__PURE__ */
|
|
6380
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6381
|
+
children: /* @__PURE__ */ jsx21("textarea", _object_spread_props(_object_spread({}, props), {
|
|
6241
6382
|
defaultValue: value ? void 0 : defaultValue,
|
|
6242
6383
|
value: defaultValue ? void 0 : value,
|
|
6243
6384
|
onChange: onChange,
|
|
@@ -6253,7 +6394,7 @@ var TextAreaContainer = function(param) {
|
|
|
6253
6394
|
};
|
|
6254
6395
|
var FormSeparator = function(param) {
|
|
6255
6396
|
var props = param.props, children = param.children;
|
|
6256
|
-
return /* @__PURE__ */
|
|
6397
|
+
return /* @__PURE__ */ jsx21("div", _object_spread_props(_object_spread({}, props), {
|
|
6257
6398
|
className: cn("border-b-[1px] border-gray-300 h-[1px]", props === null || props === void 0 ? void 0 : props.className),
|
|
6258
6399
|
children: children
|
|
6259
6400
|
}));
|
|
@@ -6285,8 +6426,8 @@ var CheckboxContainer = function(param) {
|
|
|
6285
6426
|
labelStyle,
|
|
6286
6427
|
elementsCommonClassName
|
|
6287
6428
|
]);
|
|
6288
|
-
return /* @__PURE__ */
|
|
6289
|
-
children: /* @__PURE__ */
|
|
6429
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6430
|
+
children: /* @__PURE__ */ jsx21(Checkbox, {
|
|
6290
6431
|
id: id,
|
|
6291
6432
|
name: name,
|
|
6292
6433
|
checked: checked,
|
|
@@ -6350,7 +6491,7 @@ var DurationPicker = function(param) {
|
|
|
6350
6491
|
onChange === null || onChange === void 0 ? void 0 : onChange(durationToSeconds(update));
|
|
6351
6492
|
};
|
|
6352
6493
|
};
|
|
6353
|
-
return /* @__PURE__ */
|
|
6494
|
+
return /* @__PURE__ */ jsx21(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
6354
6495
|
children: /* @__PURE__ */ jsxs14("div", {
|
|
6355
6496
|
title: title,
|
|
6356
6497
|
className: cn("flex gap-1.5 text-sm", elementClassName),
|
|
@@ -6360,11 +6501,11 @@ var DurationPicker = function(param) {
|
|
|
6360
6501
|
return /* @__PURE__ */ jsxs14("div", {
|
|
6361
6502
|
className: "flex flex-col border p-0.5 rounded-md",
|
|
6362
6503
|
children: [
|
|
6363
|
-
!hideLabels && /* @__PURE__ */
|
|
6504
|
+
!hideLabels && /* @__PURE__ */ jsx21("label", {
|
|
6364
6505
|
className: "mb-1 ps-1 capitalize text-start border-b-[1px] border-b-gray-300",
|
|
6365
6506
|
children: field.slice(0, 1)
|
|
6366
6507
|
}),
|
|
6367
|
-
/* @__PURE__ */
|
|
6508
|
+
/* @__PURE__ */ jsx21("input", {
|
|
6368
6509
|
type: "number",
|
|
6369
6510
|
inputMode: "numeric",
|
|
6370
6511
|
min: 0,
|
|
@@ -6382,7 +6523,7 @@ var DurationPicker = function(param) {
|
|
|
6382
6523
|
]
|
|
6383
6524
|
}, field);
|
|
6384
6525
|
}),
|
|
6385
|
-
/* @__PURE__ */
|
|
6526
|
+
/* @__PURE__ */ jsx21("input", {
|
|
6386
6527
|
name: name,
|
|
6387
6528
|
type: "hidden",
|
|
6388
6529
|
value: durationToSeconds(duration)
|
|
@@ -6396,7 +6537,7 @@ var FormElementContainer = function(param) {
|
|
|
6396
6537
|
return /* @__PURE__ */ jsxs14("div", {
|
|
6397
6538
|
className: cn(defaultContainerClassName ? defaultFormElementContainerClassName : "", containerClassName, elementsCommonClassName),
|
|
6398
6539
|
children: [
|
|
6399
|
-
labelContent && /* @__PURE__ */
|
|
6540
|
+
labelContent && /* @__PURE__ */ jsx21(ElementLabel, {
|
|
6400
6541
|
labelStyle: labelStyle,
|
|
6401
6542
|
labelsCommonClassName: labelsCommonClassName,
|
|
6402
6543
|
withDots: labelWithDots,
|
|
@@ -6421,11 +6562,11 @@ var ElementLabel = function(param) {
|
|
|
6421
6562
|
title: labelContent,
|
|
6422
6563
|
children: [
|
|
6423
6564
|
labelContent,
|
|
6424
|
-
required && /* @__PURE__ */
|
|
6565
|
+
required && /* @__PURE__ */ jsx21("div", {
|
|
6425
6566
|
className: "text-red-500",
|
|
6426
6567
|
children: "*"
|
|
6427
6568
|
}),
|
|
6428
|
-
withDots && /* @__PURE__ */
|
|
6569
|
+
withDots && /* @__PURE__ */ jsx21("div", {
|
|
6429
6570
|
children: ":"
|
|
6430
6571
|
})
|
|
6431
6572
|
]
|
|
@@ -6491,11 +6632,11 @@ var ElementsContainer = memo2(function(props) {
|
|
|
6491
6632
|
ref: containerRef,
|
|
6492
6633
|
className: cn("flex flex-col gap-1", className),
|
|
6493
6634
|
children: [
|
|
6494
|
-
headline && /* @__PURE__ */
|
|
6635
|
+
headline && /* @__PURE__ */ jsx21("div", {
|
|
6495
6636
|
className: cn("text-start text-primary font-bold border-b-[1px] border-gray-400 pb-0.5", headlineClassName),
|
|
6496
6637
|
children: headline
|
|
6497
6638
|
}),
|
|
6498
|
-
/* @__PURE__ */
|
|
6639
|
+
/* @__PURE__ */ jsx21("div", {
|
|
6499
6640
|
className: cn("flex flex-col gap-1.5", childrenContainerClassName),
|
|
6500
6641
|
children: enhancedChildren
|
|
6501
6642
|
})
|
|
@@ -6504,7 +6645,7 @@ var ElementsContainer = memo2(function(props) {
|
|
|
6504
6645
|
}, propsAreEqual);
|
|
6505
6646
|
ElementsContainer.displayName = "ElementsContainer";
|
|
6506
6647
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
6507
|
-
import { jsx as
|
|
6648
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
6508
6649
|
var ModularForm = function(param) {
|
|
6509
6650
|
var _param_submitFunction = param.submitFunction, submitFunction = _param_submitFunction === void 0 ? /*#__PURE__*/ function() {
|
|
6510
6651
|
var _ref = _async_to_generator(function(form) {
|
|
@@ -6619,72 +6760,79 @@ var ModularForm = function(param) {
|
|
|
6619
6760
|
},
|
|
6620
6761
|
className: cn("w-[350px] px-5 py-5 flex flex-col gap-4", className),
|
|
6621
6762
|
children: [
|
|
6622
|
-
headerContent && /* @__PURE__ */
|
|
6763
|
+
headerContent && /* @__PURE__ */ jsx22("div", {
|
|
6623
6764
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
6624
6765
|
children: headerContent
|
|
6625
6766
|
}),
|
|
6626
|
-
/* @__PURE__ */
|
|
6767
|
+
/* @__PURE__ */ jsx22("div", {
|
|
6627
6768
|
className: cn("w-full flex flex-col gap-5", elementsContainerClassName),
|
|
6628
6769
|
children: elements.map(function(element, index2) {
|
|
6629
6770
|
switch(element.type){
|
|
6630
6771
|
case "input":
|
|
6631
|
-
return /* @__PURE__ */
|
|
6772
|
+
return /* @__PURE__ */ jsx22(InputContainer, _object_spread_props(_object_spread({
|
|
6773
|
+
direction: direction
|
|
6774
|
+
}, element), {
|
|
6775
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
6776
|
+
elementsCommonClassName: elementsCommonClassName
|
|
6777
|
+
}), index2);
|
|
6778
|
+
case "dateInput":
|
|
6779
|
+
return /* @__PURE__ */ jsx22(DateInputContainer, _object_spread_props(_object_spread({
|
|
6632
6780
|
direction: direction
|
|
6633
6781
|
}, element), {
|
|
6634
6782
|
labelsCommonClassName: labelsCommonClassName,
|
|
6635
6783
|
elementsCommonClassName: elementsCommonClassName
|
|
6636
6784
|
}), index2);
|
|
6637
6785
|
case "textarea":
|
|
6638
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ jsx22(TextAreaContainer, _object_spread_props(_object_spread({
|
|
6639
6787
|
direction: element.direction || direction
|
|
6640
6788
|
}, element), {
|
|
6641
6789
|
labelsCommonClassName: labelsCommonClassName,
|
|
6642
6790
|
elementsCommonClassName: elementsCommonClassName
|
|
6643
6791
|
}), index2);
|
|
6644
6792
|
case "select":
|
|
6645
|
-
return /* @__PURE__ */
|
|
6793
|
+
return /* @__PURE__ */ jsx22(SelectContainer, _object_spread_props(_object_spread({
|
|
6646
6794
|
direction: direction
|
|
6647
6795
|
}, element), {
|
|
6648
6796
|
labelsCommonClassName: labelsCommonClassName,
|
|
6649
6797
|
elementsCommonClassName: elementsCommonClassName
|
|
6650
6798
|
}), index2);
|
|
6651
6799
|
case "checkbox":
|
|
6652
|
-
return /* @__PURE__ */
|
|
6800
|
+
return /* @__PURE__ */ jsx22(CheckboxContainer, _object_spread_props(_object_spread({
|
|
6653
6801
|
direction: direction
|
|
6654
6802
|
}, element), {
|
|
6655
6803
|
labelsCommonClassName: labelsCommonClassName,
|
|
6656
6804
|
elementsCommonClassName: elementsCommonClassName
|
|
6657
6805
|
}), index2);
|
|
6658
6806
|
case "multiSelect":
|
|
6659
|
-
return /* @__PURE__ */
|
|
6807
|
+
return /* @__PURE__ */ jsx22(MultiSelect, _object_spread_props(_object_spread({
|
|
6660
6808
|
direction: direction
|
|
6661
6809
|
}, element), {
|
|
6662
6810
|
labelsCommonClassName: labelsCommonClassName,
|
|
6663
6811
|
elementsCommonClassName: elementsCommonClassName
|
|
6664
6812
|
}), index2);
|
|
6665
6813
|
case "selectWithSearch":
|
|
6666
|
-
return /* @__PURE__ */
|
|
6814
|
+
return /* @__PURE__ */ jsx22(SelectWithSearch, _object_spread_props(_object_spread({
|
|
6667
6815
|
direction: direction
|
|
6668
6816
|
}, element), {
|
|
6669
6817
|
labelsCommonClassName: labelsCommonClassName,
|
|
6670
6818
|
elementsCommonClassName: elementsCommonClassName
|
|
6671
6819
|
}), index2);
|
|
6672
6820
|
case "internationalPhoneInput":
|
|
6673
|
-
return /* @__PURE__ */
|
|
6821
|
+
return /* @__PURE__ */ jsx22(InternationalPhonePicker, _object_spread_props(_object_spread({
|
|
6674
6822
|
direction: direction
|
|
6675
6823
|
}, element), {
|
|
6676
6824
|
labelsCommonClassName: labelsCommonClassName,
|
|
6677
6825
|
elementsCommonClassName: elementsCommonClassName
|
|
6678
6826
|
}), index2);
|
|
6679
6827
|
case "duration":
|
|
6680
|
-
return /* @__PURE__ */
|
|
6828
|
+
return /* @__PURE__ */ jsx22(DurationPicker, _object_spread_props(_object_spread({
|
|
6681
6829
|
direction: direction
|
|
6682
6830
|
}, element), {
|
|
6683
6831
|
labelsCommonClassName: labelsCommonClassName,
|
|
6684
6832
|
elementsCommonClassName: elementsCommonClassName
|
|
6685
6833
|
}), index2);
|
|
6686
6834
|
case "separator":
|
|
6687
|
-
return /* @__PURE__ */
|
|
6835
|
+
return /* @__PURE__ */ jsx22(FormSeparator, _object_spread_props(_object_spread({
|
|
6688
6836
|
direction: direction
|
|
6689
6837
|
}, element), {
|
|
6690
6838
|
children: element.children
|
|
@@ -6702,12 +6850,12 @@ var ModularForm = function(param) {
|
|
|
6702
6850
|
/* @__PURE__ */ jsxs15("div", {
|
|
6703
6851
|
className: cn("flex justify-between w-full", footerClassName),
|
|
6704
6852
|
children: [
|
|
6705
|
-
/* @__PURE__ */
|
|
6853
|
+
/* @__PURE__ */ jsx22("div", {
|
|
6706
6854
|
title: errorMsg,
|
|
6707
6855
|
className: cn("text-[#f22] text-[18px] max-w-[80%] ellipsis", errorClassName),
|
|
6708
6856
|
children: errorMsg
|
|
6709
6857
|
}),
|
|
6710
|
-
/* @__PURE__ */
|
|
6858
|
+
/* @__PURE__ */ jsx22("button", {
|
|
6711
6859
|
ref: submitRef,
|
|
6712
6860
|
disabled: isLoading,
|
|
6713
6861
|
onClick: function(e) {
|
|
@@ -6715,7 +6863,7 @@ var ModularForm = function(param) {
|
|
|
6715
6863
|
},
|
|
6716
6864
|
className: cn("bg-[#547f22] px-3 py-1.5 rounded-lg text-white min-w-20", buttonClassName),
|
|
6717
6865
|
type: "submit",
|
|
6718
|
-
children: isLoading ? /* @__PURE__ */
|
|
6866
|
+
children: isLoading ? /* @__PURE__ */ jsx22(Loader, _object_spread({
|
|
6719
6867
|
size: 18,
|
|
6720
6868
|
color: "#fff"
|
|
6721
6869
|
}, loaderProps)) : buttonContent
|
|
@@ -6729,32 +6877,32 @@ var ModularForm_default = ModularForm;
|
|
|
6729
6877
|
// src/components/forms/index.tsx
|
|
6730
6878
|
import { useState as useState11 } from "react";
|
|
6731
6879
|
import moment3 from "moment";
|
|
6732
|
-
import { CalendarIcon } from "lucide-react";
|
|
6733
|
-
import { Button as
|
|
6734
|
-
import { parseDate, today as
|
|
6880
|
+
import { CalendarIcon as CalendarIcon2 } from "lucide-react";
|
|
6881
|
+
import { Button as Button4, DatePicker as RACDatePicker2, Dialog as Dialog3, Group as Group2, Label as Label2, Popover as Popover3 } from "react-aria-components";
|
|
6882
|
+
import { parseDate as parseDate2, today as today3, getLocalTimeZone as getLocalTimeZone3 } from "@internationalized/date";
|
|
6735
6883
|
// src/components/ui/calendar-rac.tsx
|
|
6736
|
-
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
6884
|
+
import { getLocalTimeZone as getLocalTimeZone2, today as today2 } from "@internationalized/date";
|
|
6737
6885
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
6738
|
-
import { Button as
|
|
6739
|
-
import { jsx as
|
|
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";
|
|
6740
6888
|
function CalendarHeader() {
|
|
6741
6889
|
return /* @__PURE__ */ jsxs16("header", {
|
|
6742
6890
|
className: "flex w-full items-center gap-1 pb-1",
|
|
6743
6891
|
children: [
|
|
6744
|
-
/* @__PURE__ */
|
|
6892
|
+
/* @__PURE__ */ jsx23(Button3, {
|
|
6745
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",
|
|
6746
6894
|
slot: "previous",
|
|
6747
|
-
children: /* @__PURE__ */
|
|
6895
|
+
children: /* @__PURE__ */ jsx23(ChevronLeftIcon, {
|
|
6748
6896
|
size: 16
|
|
6749
6897
|
})
|
|
6750
6898
|
}),
|
|
6751
|
-
/* @__PURE__ */
|
|
6899
|
+
/* @__PURE__ */ jsx23(HeadingRac, {
|
|
6752
6900
|
className: "grow text-center font-medium text-sm"
|
|
6753
6901
|
}),
|
|
6754
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsx23(Button3, {
|
|
6755
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",
|
|
6756
6904
|
slot: "next",
|
|
6757
|
-
children: /* @__PURE__ */
|
|
6905
|
+
children: /* @__PURE__ */ jsx23(ChevronRightIcon, {
|
|
6758
6906
|
size: 16
|
|
6759
6907
|
})
|
|
6760
6908
|
})
|
|
@@ -6763,21 +6911,21 @@ function CalendarHeader() {
|
|
|
6763
6911
|
}
|
|
6764
6912
|
function CalendarGridComponent(param) {
|
|
6765
6913
|
var _param_isRange = param.isRange, isRange = _param_isRange === void 0 ? false : _param_isRange;
|
|
6766
|
-
var now =
|
|
6914
|
+
var now = today2(getLocalTimeZone2());
|
|
6767
6915
|
return /* @__PURE__ */ jsxs16(CalendarGridRac, {
|
|
6768
6916
|
children: [
|
|
6769
|
-
/* @__PURE__ */
|
|
6917
|
+
/* @__PURE__ */ jsx23(CalendarGridHeaderRac, {
|
|
6770
6918
|
children: function(day) {
|
|
6771
|
-
return /* @__PURE__ */
|
|
6919
|
+
return /* @__PURE__ */ jsx23(CalendarHeaderCellRac, {
|
|
6772
6920
|
className: "size-9 rounded-md p-0 font-medium text-muted-foreground/80 text-xs",
|
|
6773
6921
|
children: day
|
|
6774
6922
|
});
|
|
6775
6923
|
}
|
|
6776
6924
|
}),
|
|
6777
|
-
/* @__PURE__ */
|
|
6925
|
+
/* @__PURE__ */ jsx23(CalendarGridBodyRac, {
|
|
6778
6926
|
className: "[&_td]:px-0 [&_td]:py-px",
|
|
6779
6927
|
children: function(date) {
|
|
6780
|
-
return /* @__PURE__ */
|
|
6928
|
+
return /* @__PURE__ */ jsx23(CalendarCellRac, {
|
|
6781
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
|
|
6782
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
|
|
6783
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")),
|
|
@@ -6788,55 +6936,22 @@ function CalendarGridComponent(param) {
|
|
|
6788
6936
|
]
|
|
6789
6937
|
});
|
|
6790
6938
|
}
|
|
6791
|
-
function
|
|
6939
|
+
function Calendar2(_param) {
|
|
6792
6940
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6793
6941
|
"className"
|
|
6794
6942
|
]);
|
|
6795
6943
|
return /* @__PURE__ */ jsxs16(CalendarRac, _object_spread_props(_object_spread({}, props), {
|
|
6796
|
-
className:
|
|
6944
|
+
className: composeRenderProps2(className, function(className2) {
|
|
6797
6945
|
return cn("w-fit", className2);
|
|
6798
6946
|
}),
|
|
6799
6947
|
children: [
|
|
6800
|
-
/* @__PURE__ */
|
|
6801
|
-
/* @__PURE__ */
|
|
6948
|
+
/* @__PURE__ */ jsx23(CalendarHeader, {}),
|
|
6949
|
+
/* @__PURE__ */ jsx23(CalendarGridComponent, {})
|
|
6802
6950
|
]
|
|
6803
6951
|
}));
|
|
6804
6952
|
}
|
|
6805
|
-
// src/components/ui/datefield-rac.tsx
|
|
6806
|
-
import { composeRenderProps as composeRenderProps2, DateField as DateFieldRac, DateInput as DateInputRac, DateSegment as DateSegmentRac, TimeField as TimeFieldRac } from "react-aria-components";
|
|
6807
|
-
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
6808
|
-
function DateSegment(_param) {
|
|
6809
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
6810
|
-
"className"
|
|
6811
|
-
]);
|
|
6812
|
-
return /* @__PURE__ */ jsx23(DateSegmentRac, _object_spread_props(_object_spread({
|
|
6813
|
-
className: composeRenderProps2(className, function(className2) {
|
|
6814
|
-
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);
|
|
6815
|
-
})
|
|
6816
|
-
}, props), {
|
|
6817
|
-
"data-invalid": true
|
|
6818
|
-
}));
|
|
6819
|
-
}
|
|
6820
|
-
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";
|
|
6821
|
-
function DateInput(_param) {
|
|
6822
|
-
var className = _param.className, _param_unstyled = _param.unstyled, unstyled = _param_unstyled === void 0 ? false : _param_unstyled, props = _object_without_properties(_param, [
|
|
6823
|
-
"className",
|
|
6824
|
-
"unstyled"
|
|
6825
|
-
]);
|
|
6826
|
-
return /* @__PURE__ */ jsx23(DateInputRac, _object_spread_props(_object_spread({
|
|
6827
|
-
className: composeRenderProps2(className, function(className2) {
|
|
6828
|
-
return cn(!unstyled && dateInputStyle, className2);
|
|
6829
|
-
})
|
|
6830
|
-
}, props), {
|
|
6831
|
-
children: function(segment) {
|
|
6832
|
-
return /* @__PURE__ */ jsx23(DateSegment, {
|
|
6833
|
-
segment: segment
|
|
6834
|
-
});
|
|
6835
|
-
}
|
|
6836
|
-
}));
|
|
6837
|
-
}
|
|
6838
6953
|
// src/components/forms/index.tsx
|
|
6839
|
-
import { I18nProvider } from "react-aria-components";
|
|
6954
|
+
import { I18nProvider as I18nProvider2 } from "react-aria-components";
|
|
6840
6955
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6841
6956
|
var ConfirmForm = function(param) {
|
|
6842
6957
|
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;
|
|
@@ -6996,14 +7111,14 @@ function DatePicker2(param) {
|
|
|
6996
7111
|
var getDefaultValue = function(dateStr) {
|
|
6997
7112
|
if (dateStr) {
|
|
6998
7113
|
try {
|
|
6999
|
-
return
|
|
7114
|
+
return parseDate2(dateStr);
|
|
7000
7115
|
} catch (e) {
|
|
7001
|
-
return
|
|
7116
|
+
return today3(getLocalTimeZone3());
|
|
7002
7117
|
}
|
|
7003
7118
|
}
|
|
7004
|
-
return
|
|
7119
|
+
return today3(getLocalTimeZone3());
|
|
7005
7120
|
};
|
|
7006
|
-
return /* @__PURE__ */ jsx24(
|
|
7121
|
+
return /* @__PURE__ */ jsx24(I18nProvider2, {
|
|
7007
7122
|
locale: "en-GB",
|
|
7008
7123
|
children: /* @__PURE__ */ jsxs17("form", {
|
|
7009
7124
|
style: {
|
|
@@ -7012,19 +7127,19 @@ function DatePicker2(param) {
|
|
|
7012
7127
|
onSubmit: onSubmit,
|
|
7013
7128
|
className: cn("w-full h-10 flex justify-start gap-3 items-center", formClassName),
|
|
7014
7129
|
children: [
|
|
7015
|
-
/* @__PURE__ */ jsxs17(
|
|
7130
|
+
/* @__PURE__ */ jsxs17(RACDatePicker2, {
|
|
7016
7131
|
className: cn("flex items-center gap-2", labelsClassName),
|
|
7017
7132
|
name: "from",
|
|
7018
7133
|
defaultValue: getDefaultValue(defaultFrom),
|
|
7019
7134
|
children: [
|
|
7020
|
-
fromText && /* @__PURE__ */ jsx24(
|
|
7135
|
+
fromText && /* @__PURE__ */ jsx24(Label2, {
|
|
7021
7136
|
className: "font-medium text-foreground text-sm whitespace-nowrap",
|
|
7022
7137
|
children: fromText
|
|
7023
7138
|
}),
|
|
7024
7139
|
/* @__PURE__ */ jsxs17("div", {
|
|
7025
7140
|
className: "flex",
|
|
7026
7141
|
children: [
|
|
7027
|
-
/* @__PURE__ */ jsx24(
|
|
7142
|
+
/* @__PURE__ */ jsx24(Group2, {
|
|
7028
7143
|
className: cn("w-32 border rounded-md bg-background ", inputsClassName),
|
|
7029
7144
|
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7030
7145
|
style: {
|
|
@@ -7033,39 +7148,39 @@ function DatePicker2(param) {
|
|
|
7033
7148
|
className: cn("px-2 py-1", direction === "rtl" ? "justify-end" : "justify-start")
|
|
7034
7149
|
})
|
|
7035
7150
|
}),
|
|
7036
|
-
/* @__PURE__ */ jsx24(
|
|
7151
|
+
/* @__PURE__ */ jsx24(Button4, {
|
|
7037
7152
|
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",
|
|
7038
|
-
children: /* @__PURE__ */ jsx24(
|
|
7153
|
+
children: /* @__PURE__ */ jsx24(CalendarIcon2, {
|
|
7039
7154
|
size: 16
|
|
7040
7155
|
})
|
|
7041
7156
|
})
|
|
7042
7157
|
]
|
|
7043
7158
|
}),
|
|
7044
|
-
/* @__PURE__ */ jsx24(
|
|
7159
|
+
/* @__PURE__ */ jsx24(Popover3, {
|
|
7045
7160
|
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",
|
|
7046
7161
|
offset: 4,
|
|
7047
|
-
children: /* @__PURE__ */ jsx24(
|
|
7162
|
+
children: /* @__PURE__ */ jsx24(Dialog3, {
|
|
7048
7163
|
className: "max-h-[inherit] overflow-auto p-2",
|
|
7049
|
-
children: /* @__PURE__ */ jsx24(
|
|
7164
|
+
children: /* @__PURE__ */ jsx24(Calendar2, {
|
|
7050
7165
|
className: cn("bg-white", calendarClassName)
|
|
7051
7166
|
})
|
|
7052
7167
|
})
|
|
7053
7168
|
})
|
|
7054
7169
|
]
|
|
7055
7170
|
}),
|
|
7056
|
-
/* @__PURE__ */ jsxs17(
|
|
7171
|
+
/* @__PURE__ */ jsxs17(RACDatePicker2, {
|
|
7057
7172
|
className: cn("flex items-center gap-2", labelsClassName),
|
|
7058
7173
|
name: "to",
|
|
7059
7174
|
defaultValue: getDefaultValue(defaultTo),
|
|
7060
7175
|
children: [
|
|
7061
|
-
toText && /* @__PURE__ */ jsx24(
|
|
7176
|
+
toText && /* @__PURE__ */ jsx24(Label2, {
|
|
7062
7177
|
className: "font-medium text-foreground text-sm whitespace-nowrap",
|
|
7063
7178
|
children: toText
|
|
7064
7179
|
}),
|
|
7065
7180
|
/* @__PURE__ */ jsxs17("div", {
|
|
7066
7181
|
className: "flex",
|
|
7067
7182
|
children: [
|
|
7068
|
-
/* @__PURE__ */ jsx24(
|
|
7183
|
+
/* @__PURE__ */ jsx24(Group2, {
|
|
7069
7184
|
className: cn("w-32 border rounded-md bg-background", inputsClassName),
|
|
7070
7185
|
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7071
7186
|
style: {
|
|
@@ -7074,20 +7189,20 @@ function DatePicker2(param) {
|
|
|
7074
7189
|
className: cn("px-2 py-1", direction === "rtl" ? "justify-end" : "justify-start")
|
|
7075
7190
|
})
|
|
7076
7191
|
}),
|
|
7077
|
-
/* @__PURE__ */ jsx24(
|
|
7192
|
+
/* @__PURE__ */ jsx24(Button4, {
|
|
7078
7193
|
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",
|
|
7079
|
-
children: /* @__PURE__ */ jsx24(
|
|
7194
|
+
children: /* @__PURE__ */ jsx24(CalendarIcon2, {
|
|
7080
7195
|
size: 16
|
|
7081
7196
|
})
|
|
7082
7197
|
})
|
|
7083
7198
|
]
|
|
7084
7199
|
}),
|
|
7085
|
-
/* @__PURE__ */ jsx24(
|
|
7200
|
+
/* @__PURE__ */ jsx24(Popover3, {
|
|
7086
7201
|
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",
|
|
7087
7202
|
offset: 4,
|
|
7088
|
-
children: /* @__PURE__ */ jsx24(
|
|
7203
|
+
children: /* @__PURE__ */ jsx24(Dialog3, {
|
|
7089
7204
|
className: "max-h-[inherit] overflow-auto p-2",
|
|
7090
|
-
children: /* @__PURE__ */ jsx24(
|
|
7205
|
+
children: /* @__PURE__ */ jsx24(Calendar2, {
|
|
7091
7206
|
className: cn("bg-white", calendarClassName)
|
|
7092
7207
|
})
|
|
7093
7208
|
})
|
|
@@ -7156,5 +7271,5 @@ function Slot2(props) {
|
|
|
7156
7271
|
})
|
|
7157
7272
|
});
|
|
7158
7273
|
}
|
|
7159
|
-
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 };
|
|
7274
|
+
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DateInputContainer, 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 };
|
|
7160
7275
|
//# sourceMappingURL=index.mjs.map
|