@povio/ui 5.0.0-rc.3 → 5.0.0-rc.4
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/README.md +6 -2
- package/dist/{Breadcrumbs-CbKzAq1v.js → Breadcrumbs-FF8hMfXd.js} +1 -1
- package/dist/{Calendar-CVSQH-rC.js → Calendar-BTjajO6i.js} +6 -136
- package/dist/{Checkbox-BU0d702K.js → Checkbox-CV1ILXXO.js} +1 -1
- package/dist/{CheckboxCheckmark-usHsolNj.js → CheckboxCheckmark-CpC3wlMs.js} +1 -1
- package/dist/{ComponentGallery-DIFeJqGx.js → ComponentGallery-BWiPGUL8.js} +1343 -206
- package/dist/{DatePicker-D95gDPhg.js → DatePicker-DOLL7mkc.js} +12 -12
- package/dist/{DatePickerInput-CX6NYim4.js → DatePickerInput-BLBcySA2.js} +8 -7
- package/dist/{DateRangePicker-_uTQk_ae.js → DateRangePicker-BF-1CztH.js} +13 -185
- package/dist/{DateTimePicker-BB058Z34.js → DateTimePicker-Cj0qvJUz.js} +12 -12
- package/dist/{FileInput-C0-6bw4w.js → FileInput-Br5DQaGQ.js} +3 -2
- package/dist/{FileTrigger-CDXcQthK.js → FileTrigger-Cthk5_Wp.js} +1 -30
- package/dist/{FileUpload-DDpYMn8f.js → FileUpload--7ub3EZO.js} +3 -2
- package/dist/{FormField-U_-d4V_g.js → FormField-B99dLt8o.js} +1 -1
- package/dist/{FormFieldHeaderTooltip-DXbuu88v.js → FormFieldHeaderTooltip-BV2Ju4oB.js} +1 -1
- package/dist/{InlineTooltipWrapper-Bpmd--e7.js → InlineTooltipWrapper-BpApaGXV.js} +1 -1
- package/dist/{InputItem-D-KuiNSc.js → InputItem-CIxbTxZu.js} +10 -10
- package/dist/{Inputs-j3JmcLWR.js → Inputs-DJSKiaWY.js} +1 -1
- package/dist/NumberFormatter-CLDS_LRZ.js +265 -0
- package/dist/{NumberRangeInput-C-8U05wF.js → NumberRangeInput-B8-LHfg3.js} +6 -5
- package/dist/{RadioGroup-B7_pNwn9.js → RadioGroup-DOw3PRoX.js} +1 -1
- package/dist/{RichTextEditor-D9-B1Cze.js → RichTextEditor-D4yN7Wj7.js} +2 -2
- package/dist/{Select-CkujlTjm.js → Select-UR0ec2Ux.js} +2 -2
- package/dist/{Slider-BHPl0OPy.js → Slider-CzEmKYBF.js} +1 -1
- package/dist/{Table-BDNSuEWc.js → Table-piX1SWvN.js} +1 -1
- package/dist/{TextArea-DqHDiRGJ.js → TextArea-D8WkKsGn.js} +3 -3
- package/dist/{TimePicker-DQ6JCkGB.js → TimePicker-C4taAOFQ.js} +10 -9
- package/dist/{ToggleGroup-DX0VYXwP.js → ToggleGroup-DOk27fgI.js} +5 -66
- package/dist/{Tooltip-B9DKcYvr.js → Tooltip-CpG1nz7Y.js} +2 -2
- package/dist/{TooltipWrapper-DznDgVJB.js → TooltipWrapper-3jyN0Wss.js} +1 -1
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/input.js +4 -4
- package/dist/components/number-field.js +7 -6
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination.js +32 -28
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/config/ui-configurator-theme.js +1 -1
- package/dist/config/ui-configurator.js +1081 -257
- package/dist/config/ui-router.js +1 -1
- package/dist/{datePickerValue.utils-CUzkWie8.js → datePickerValue.utils-DCgoSrP3.js} +5 -5
- package/dist/hooks/use-filters.js +1 -1
- package/dist/index.js +15 -15
- package/dist/numberStatic.utils-BX50PSee.js +421 -0
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-input.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle-group.js +1 -1
- package/dist/rhf.js +15 -15
- package/dist/rich-text-editor.js +1 -1
- package/dist/{router.context-B0jTMtE0.js → router.context-B4FvsTim.js} +2 -2
- package/dist/staticDateTimeSegments-DtU63_dw.js +1764 -0
- package/dist/{staticSelect.utils-BemUyaaA.js → staticSelect.utils-uHa8f_c6.js} +5 -144
- package/dist/styles/configurator.css +731 -218
- package/dist/{table.cva-BikE8qJH.js → table.cva-DlMT-zLD.js} +2 -3
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.js +27 -27
- package/dist/theme-model-DtYPxNvH.js +406 -0
- package/dist/upload-CXU83BJ4.js +30 -0
- package/dist/useControlledState-CzXkZCX8.js +30 -0
- package/dist/{useFieldAccessibility-B4MVL6fz.js → useFieldAccessibility-ScC6Mtd5.js} +2 -2
- package/dist/{useFilters-kkEUFKmQ.js → useFilters-XNH27Md2.js} +1 -1
- package/dist/{useFormAutosave-Mg-tdwMh.js → useFormAutosave-DfuP7drj.js} +1 -1
- package/dist/{useStaticInputHandoff-CvSBPUB3.js → useStaticInputHandoff-NeZVnci-.js} +3 -3
- package/dist/{useTableColumnConfig-gfVame8v.js → useTableColumnConfig-BTGZiluz.js} +3 -3
- package/package.json +1 -1
- package/src/configurator/README.md +3 -3
- package/dist/FocusScope-CO9oJ1sc.js +0 -343
- package/dist/chain-DIXr2VAT.js +0 -10
- package/dist/focusSafely-DCGrr2bb.js +0 -447
- package/dist/getScrollParent-kSR7EtoT.js +0 -47
- package/dist/numberStatic.utils-BMgRzyd3.js +0 -902
- package/dist/openLink-CQhMhfzO.js +0 -121
- package/dist/platform-BXNIIAfU.js +0 -42
- package/dist/staticDateTimeSegments-CsCE9Buo.js +0 -3604
- package/dist/theme-model-C-QMCksE.js +0 -136
- package/dist/useControlledState-DQxX6LMN.js +0 -189
- package/dist/useFocusable-Bd0UsrQ7.js +0 -63
- package/dist/useFormValidationState-D3z-gafz.js +0 -1341
- package/dist/useLayoutEffect-B2-1tbPJ.js +0 -83
- package/dist/useSyncRef-RGMv0rXK.js +0 -338
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/form/useFormValidationState.mjs
|
|
3
|
+
const $fd2148440a13ec26$export$aca958c65c314e6c = {
|
|
4
|
+
badInput: false,
|
|
5
|
+
customError: false,
|
|
6
|
+
patternMismatch: false,
|
|
7
|
+
rangeOverflow: false,
|
|
8
|
+
rangeUnderflow: false,
|
|
9
|
+
stepMismatch: false,
|
|
10
|
+
tooLong: false,
|
|
11
|
+
tooShort: false,
|
|
12
|
+
typeMismatch: false,
|
|
13
|
+
valueMissing: false,
|
|
14
|
+
valid: true
|
|
15
|
+
};
|
|
16
|
+
const $fd2148440a13ec26$var$CUSTOM_VALIDITY_STATE = {
|
|
17
|
+
...$fd2148440a13ec26$export$aca958c65c314e6c,
|
|
18
|
+
customError: true,
|
|
19
|
+
valid: false
|
|
20
|
+
};
|
|
21
|
+
const $fd2148440a13ec26$export$dad6ae84456c676a = {
|
|
22
|
+
isInvalid: false,
|
|
23
|
+
validationDetails: $fd2148440a13ec26$export$aca958c65c314e6c,
|
|
24
|
+
validationErrors: []
|
|
25
|
+
};
|
|
26
|
+
const $fd2148440a13ec26$export$571b5131b7e65c11 = createContext({});
|
|
27
|
+
const $fd2148440a13ec26$export$a763b9476acd3eb = "__reactAriaFormValidationState";
|
|
28
|
+
function $fd2148440a13ec26$export$fc1a364ae1f3ff10(props) {
|
|
29
|
+
if (props["__reactAriaFormValidationState"]) {
|
|
30
|
+
let { realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation } = props[$fd2148440a13ec26$export$a763b9476acd3eb];
|
|
31
|
+
return {
|
|
32
|
+
realtimeValidation,
|
|
33
|
+
displayValidation,
|
|
34
|
+
updateValidation,
|
|
35
|
+
resetValidation,
|
|
36
|
+
commitValidation
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return $fd2148440a13ec26$var$useFormValidationStateImpl(props);
|
|
40
|
+
}
|
|
41
|
+
function $fd2148440a13ec26$var$useFormValidationStateImpl(props) {
|
|
42
|
+
let { isInvalid, validationState, name, value, builtinValidation, validate, validationBehavior = "aria" } = props;
|
|
43
|
+
if (validationState) isInvalid ||= validationState === "invalid";
|
|
44
|
+
let controlledError = isInvalid !== void 0 ? {
|
|
45
|
+
isInvalid,
|
|
46
|
+
validationErrors: [],
|
|
47
|
+
validationDetails: $fd2148440a13ec26$var$CUSTOM_VALIDITY_STATE
|
|
48
|
+
} : null;
|
|
49
|
+
let clientError = useMemo(() => {
|
|
50
|
+
if (!validate || value == null) return null;
|
|
51
|
+
return $fd2148440a13ec26$var$getValidationResult($fd2148440a13ec26$var$runValidate(validate, value));
|
|
52
|
+
}, [validate, value]);
|
|
53
|
+
if (builtinValidation?.validationDetails.valid) builtinValidation = void 0;
|
|
54
|
+
let serverErrors = useContext($fd2148440a13ec26$export$571b5131b7e65c11);
|
|
55
|
+
let serverErrorMessages = useMemo(() => {
|
|
56
|
+
if (name) return Array.isArray(name) ? name.flatMap((name) => $fd2148440a13ec26$var$asArray(serverErrors[name])) : $fd2148440a13ec26$var$asArray(serverErrors[name]);
|
|
57
|
+
return [];
|
|
58
|
+
}, [serverErrors, name]);
|
|
59
|
+
let [lastServerErrors, setLastServerErrors] = useState(serverErrors);
|
|
60
|
+
let [isServerErrorCleared, setServerErrorCleared] = useState(false);
|
|
61
|
+
if (serverErrors !== lastServerErrors) {
|
|
62
|
+
setLastServerErrors(serverErrors);
|
|
63
|
+
setServerErrorCleared(false);
|
|
64
|
+
}
|
|
65
|
+
let serverError = useMemo(() => $fd2148440a13ec26$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [isServerErrorCleared, serverErrorMessages]);
|
|
66
|
+
let nextValidation = useRef($fd2148440a13ec26$export$dad6ae84456c676a);
|
|
67
|
+
let [currentValidity, setCurrentValidity] = useState($fd2148440a13ec26$export$dad6ae84456c676a);
|
|
68
|
+
let lastError = useRef($fd2148440a13ec26$export$dad6ae84456c676a);
|
|
69
|
+
let commitValidation = () => {
|
|
70
|
+
if (!commitQueued) return;
|
|
71
|
+
setCommitQueued(false);
|
|
72
|
+
let error = clientError || builtinValidation || nextValidation.current;
|
|
73
|
+
if (!$fd2148440a13ec26$var$isEqualValidation(error, lastError.current)) {
|
|
74
|
+
lastError.current = error;
|
|
75
|
+
setCurrentValidity(error);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
let [commitQueued, setCommitQueued] = useState(false);
|
|
79
|
+
useEffect(commitValidation);
|
|
80
|
+
return {
|
|
81
|
+
realtimeValidation: controlledError || serverError || clientError || builtinValidation || $fd2148440a13ec26$export$dad6ae84456c676a,
|
|
82
|
+
displayValidation: validationBehavior === "native" ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity,
|
|
83
|
+
updateValidation(value) {
|
|
84
|
+
if (validationBehavior === "aria" && !$fd2148440a13ec26$var$isEqualValidation(currentValidity, value)) setCurrentValidity(value);
|
|
85
|
+
else nextValidation.current = value;
|
|
86
|
+
},
|
|
87
|
+
resetValidation() {
|
|
88
|
+
let error = $fd2148440a13ec26$export$dad6ae84456c676a;
|
|
89
|
+
if (!$fd2148440a13ec26$var$isEqualValidation(error, lastError.current)) {
|
|
90
|
+
lastError.current = error;
|
|
91
|
+
setCurrentValidity(error);
|
|
92
|
+
}
|
|
93
|
+
if (validationBehavior === "native") setCommitQueued(false);
|
|
94
|
+
setServerErrorCleared(true);
|
|
95
|
+
},
|
|
96
|
+
commitValidation() {
|
|
97
|
+
if (validationBehavior === "native") setCommitQueued(true);
|
|
98
|
+
setServerErrorCleared(true);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function $fd2148440a13ec26$var$asArray(v) {
|
|
103
|
+
if (!v) return [];
|
|
104
|
+
return Array.isArray(v) ? v : [v];
|
|
105
|
+
}
|
|
106
|
+
function $fd2148440a13ec26$var$runValidate(validate, value) {
|
|
107
|
+
if (typeof validate === "function") {
|
|
108
|
+
let e = validate(value);
|
|
109
|
+
if (e && typeof e !== "boolean") return $fd2148440a13ec26$var$asArray(e);
|
|
110
|
+
}
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
function $fd2148440a13ec26$var$getValidationResult(errors) {
|
|
114
|
+
return errors.length ? {
|
|
115
|
+
isInvalid: true,
|
|
116
|
+
validationErrors: errors,
|
|
117
|
+
validationDetails: $fd2148440a13ec26$var$CUSTOM_VALIDITY_STATE
|
|
118
|
+
} : null;
|
|
119
|
+
}
|
|
120
|
+
function $fd2148440a13ec26$var$isEqualValidation(a, b) {
|
|
121
|
+
if (a === b) return true;
|
|
122
|
+
return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i) => a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v]) => b.validationDetails[k] === v);
|
|
123
|
+
}
|
|
124
|
+
function $fd2148440a13ec26$export$75ee7c75d68f5b0e(...results) {
|
|
125
|
+
let errors = /* @__PURE__ */ new Set();
|
|
126
|
+
let isInvalid = false;
|
|
127
|
+
let validationDetails = { ...$fd2148440a13ec26$export$aca958c65c314e6c };
|
|
128
|
+
for (let v of results) {
|
|
129
|
+
for (let e of v.validationErrors) errors.add(e);
|
|
130
|
+
isInvalid ||= v.isInvalid;
|
|
131
|
+
for (let key in validationDetails) validationDetails[key] ||= v.validationDetails[key];
|
|
132
|
+
}
|
|
133
|
+
validationDetails.valid = !isInvalid;
|
|
134
|
+
return {
|
|
135
|
+
isInvalid,
|
|
136
|
+
validationErrors: [...errors],
|
|
137
|
+
validationDetails
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region ../../node_modules/.bun/@internationalized+number@3.6.8/node_modules/@internationalized/number/dist/private/NumberFormatter.mjs
|
|
142
|
+
let $1dfb119a85e764e5$var$formatterCache = /* @__PURE__ */ new Map();
|
|
143
|
+
let $1dfb119a85e764e5$var$supportsSignDisplay = false;
|
|
144
|
+
try {
|
|
145
|
+
$1dfb119a85e764e5$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", { signDisplay: "exceptZero" }).resolvedOptions().signDisplay === "exceptZero";
|
|
146
|
+
} catch {}
|
|
147
|
+
let $1dfb119a85e764e5$var$supportsUnit = false;
|
|
148
|
+
try {
|
|
149
|
+
$1dfb119a85e764e5$var$supportsUnit = new Intl.NumberFormat("de-DE", {
|
|
150
|
+
style: "unit",
|
|
151
|
+
unit: "degree"
|
|
152
|
+
}).resolvedOptions().style === "unit";
|
|
153
|
+
} catch {}
|
|
154
|
+
const $1dfb119a85e764e5$var$UNITS = { degree: { narrow: {
|
|
155
|
+
default: "°",
|
|
156
|
+
"ja-JP": " 度",
|
|
157
|
+
"zh-TW": "度",
|
|
158
|
+
"sl-SI": " °"
|
|
159
|
+
} } };
|
|
160
|
+
var $1dfb119a85e764e5$export$cc77c4ff7e8673c5 = class {
|
|
161
|
+
constructor(locale, options = {}) {
|
|
162
|
+
this.numberFormatter = $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options);
|
|
163
|
+
this.options = options;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Formats a number value as a string, according to the locale and options provided to the
|
|
167
|
+
* constructor.
|
|
168
|
+
*/ format(value) {
|
|
169
|
+
let res = "";
|
|
170
|
+
if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) res = $1dfb119a85e764e5$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
|
|
171
|
+
else res = this.numberFormatter.format(value);
|
|
172
|
+
if (this.options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
|
|
173
|
+
let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
|
|
174
|
+
if (!unit) return res;
|
|
175
|
+
let values = $1dfb119a85e764e5$var$UNITS[unit]?.[unitDisplay];
|
|
176
|
+
res += values[locale] || values.default;
|
|
177
|
+
}
|
|
178
|
+
return res;
|
|
179
|
+
}
|
|
180
|
+
/** Formats a number to an array of parts such as separators, digits, punctuation, and more. */ formatToParts(value) {
|
|
181
|
+
return this.numberFormatter.formatToParts(value);
|
|
182
|
+
}
|
|
183
|
+
/** Formats a number range as a string. */ formatRange(start, end) {
|
|
184
|
+
if (typeof this.numberFormatter.formatRange === "function") return this.numberFormatter.formatRange(start, end);
|
|
185
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
186
|
+
return `${this.format(start)} \u{2013} ${this.format(end)}`;
|
|
187
|
+
}
|
|
188
|
+
/** Formats a number range as an array of parts. */ formatRangeToParts(start, end) {
|
|
189
|
+
if (typeof this.numberFormatter.formatRangeToParts === "function") return this.numberFormatter.formatRangeToParts(start, end);
|
|
190
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
191
|
+
let startParts = this.numberFormatter.formatToParts(start);
|
|
192
|
+
let endParts = this.numberFormatter.formatToParts(end);
|
|
193
|
+
return [
|
|
194
|
+
...startParts.map((p) => ({
|
|
195
|
+
...p,
|
|
196
|
+
source: "startRange"
|
|
197
|
+
})),
|
|
198
|
+
{
|
|
199
|
+
type: "literal",
|
|
200
|
+
value: " – ",
|
|
201
|
+
source: "shared"
|
|
202
|
+
},
|
|
203
|
+
...endParts.map((p) => ({
|
|
204
|
+
...p,
|
|
205
|
+
source: "endRange"
|
|
206
|
+
}))
|
|
207
|
+
];
|
|
208
|
+
}
|
|
209
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
|
|
210
|
+
let options = this.numberFormatter.resolvedOptions();
|
|
211
|
+
if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) options = {
|
|
212
|
+
...options,
|
|
213
|
+
signDisplay: this.options.signDisplay
|
|
214
|
+
};
|
|
215
|
+
if (!$1dfb119a85e764e5$var$supportsUnit && this.options.style === "unit") options = {
|
|
216
|
+
...options,
|
|
217
|
+
style: "unit",
|
|
218
|
+
unit: this.options.unit,
|
|
219
|
+
unitDisplay: this.options.unitDisplay
|
|
220
|
+
};
|
|
221
|
+
return options;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
function $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options = {}) {
|
|
225
|
+
let { numberingSystem } = options;
|
|
226
|
+
if (numberingSystem && locale.includes("-nu-")) {
|
|
227
|
+
if (!locale.includes("-u-")) locale += "-u-";
|
|
228
|
+
locale += `-nu-${numberingSystem}`;
|
|
229
|
+
}
|
|
230
|
+
if (options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
|
|
231
|
+
let { unit, unitDisplay = "short" } = options;
|
|
232
|
+
if (!unit) throw new Error("unit option must be provided with style: \"unit\"");
|
|
233
|
+
if (!$1dfb119a85e764e5$var$UNITS[unit]?.[unitDisplay]) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
|
|
234
|
+
options = {
|
|
235
|
+
...options,
|
|
236
|
+
style: "decimal"
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
240
|
+
if ($1dfb119a85e764e5$var$formatterCache.has(cacheKey)) return $1dfb119a85e764e5$var$formatterCache.get(cacheKey);
|
|
241
|
+
let numberFormatter = new Intl.NumberFormat(locale, options);
|
|
242
|
+
$1dfb119a85e764e5$var$formatterCache.set(cacheKey, numberFormatter);
|
|
243
|
+
return numberFormatter;
|
|
244
|
+
}
|
|
245
|
+
function $1dfb119a85e764e5$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
|
|
246
|
+
if (signDisplay === "auto") return numberFormat.format(num);
|
|
247
|
+
else if (signDisplay === "never") return numberFormat.format(Math.abs(num));
|
|
248
|
+
else {
|
|
249
|
+
let needsPositiveSign = false;
|
|
250
|
+
if (signDisplay === "always") needsPositiveSign = num > 0 || Object.is(num, 0);
|
|
251
|
+
else if (signDisplay === "exceptZero") {
|
|
252
|
+
if (Object.is(num, -0) || Object.is(num, 0)) num = Math.abs(num);
|
|
253
|
+
else needsPositiveSign = num > 0;
|
|
254
|
+
}
|
|
255
|
+
if (needsPositiveSign) {
|
|
256
|
+
let negative = numberFormat.format(-num);
|
|
257
|
+
let noSign = numberFormat.format(num);
|
|
258
|
+
let minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
|
|
259
|
+
if ([...minus].length !== 1) console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case");
|
|
260
|
+
return negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
|
|
261
|
+
} else return numberFormat.format(num);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
export { $fd2148440a13ec26$export$fc1a364ae1f3ff10 as i, $fd2148440a13ec26$export$75ee7c75d68f5b0e as n, $fd2148440a13ec26$export$aca958c65c314e6c as r, $1dfb119a85e764e5$export$cc77c4ff7e8673c5 as t };
|
|
@@ -3,16 +3,17 @@ import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
|
3
3
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
4
4
|
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-BsbLZDtC.js";
|
|
5
5
|
import { a as $a3be900807531178$re_export$useLocale } from "./exports-BNrTn8Tj.js";
|
|
6
|
-
import { n as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c, r as $cd2fa56213693c5e$export$23f548e970bdf099, t as getStaticNumberDisplayValue } from "./numberStatic.utils-BMgRzyd3.js";
|
|
7
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
8
7
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
9
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
8
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
10
9
|
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-DJA8ovm_.js";
|
|
11
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
12
|
-
import { i as InputFrame, n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-
|
|
10
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-3jyN0Wss.js";
|
|
11
|
+
import { i as InputFrame, n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-NeZVnci-.js";
|
|
12
|
+
import { n as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c, t as getStaticNumberDisplayValue } from "./numberStatic.utils-BX50PSee.js";
|
|
13
13
|
import { t as IntlUtils } from "./intl.utils-zwAFoZ0U.js";
|
|
14
14
|
import { memo, useEffect, useRef, useState } from "react";
|
|
15
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { useNumberField } from "react-aria";
|
|
16
17
|
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
17
18
|
//#region src/components/inputs/Input/NumberRangeInput/NumberRangeField.tsx
|
|
18
19
|
const NumberRangeValueField = ({ label, value, placeholder, isDisabled, isInvalid, isRequired, formatOptions, hideInnerLabels, autoFocusOnMount, isClearable, isClearableIfDisabled, className, onChange, onClear, onBlur, ...rest }) => {
|
|
@@ -39,7 +40,7 @@ const NumberRangeValueField = ({ label, value, placeholder, isDisabled, isInvali
|
|
|
39
40
|
formatOptions: formatOptions ?? ui.numberField.formatOptions
|
|
40
41
|
};
|
|
41
42
|
const state = $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c(numberProps);
|
|
42
|
-
const { labelProps, inputProps } =
|
|
43
|
+
const { labelProps, inputProps } = useNumberField(numberProps, state, numberFieldRef);
|
|
43
44
|
return /* @__PURE__ */ jsxs("div", {
|
|
44
45
|
className: "min-w-0 flex-1",
|
|
45
46
|
children: [/* @__PURE__ */ jsx(FormFieldLabel, {
|
|
@@ -10,7 +10,7 @@ import { t as uiGroupOutlineClass } from "./outline.clsx-50W_vNDl.js";
|
|
|
10
10
|
import { t as compoundMapper } from "./compoundMapper-Di3SKZnS.js";
|
|
11
11
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
12
12
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
13
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
13
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
14
14
|
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-DJA8ovm_.js";
|
|
15
15
|
import { t as CheckContent } from "./CheckContent-D7sZPmzx.js";
|
|
16
16
|
import $ahdqC$react, { createContext, forwardRef, memo, useContext, useMemo } from "react";
|
|
@@ -17,12 +17,12 @@ import { t as Button } from "./Button-C5rv4Cr2.js";
|
|
|
17
17
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
18
18
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
19
19
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
20
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
20
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
21
21
|
import "./i18n-CX2EjhJI.js";
|
|
22
22
|
import { i as inputSideDefinition, o as useInputCva } from "./input.cva-DJA8ovm_.js";
|
|
23
23
|
import { t as popoverDefinition } from "./popover.cva-Bhud1wnp.js";
|
|
24
24
|
import { Input } from "./components/input.js";
|
|
25
|
-
import { t as Select } from "./Select-
|
|
25
|
+
import { t as Select } from "./Select-UR0ec2Ux.js";
|
|
26
26
|
import { Popover } from "./components/popover.js";
|
|
27
27
|
import $ahdqC$react, { createContext, forwardRef, memo, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
28
28
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -2,10 +2,10 @@ import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
|
|
|
2
2
|
import { r as selectInputTagsContentWrapperDefinition } from "./selectDesktop.cva-CHAMxhfO.js";
|
|
3
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
4
4
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
5
|
-
import { n as StaticSelectTrailingContent, r as SelectBase, t as getStaticSelectValue } from "./staticSelect.utils-
|
|
5
|
+
import { n as StaticSelectTrailingContent, r as SelectBase, t as getStaticSelectValue } from "./staticSelect.utils-uHa8f_c6.js";
|
|
6
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
7
7
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
8
|
-
import { i as InputFrame, n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-
|
|
8
|
+
import { i as InputFrame, n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-NeZVnci-.js";
|
|
9
9
|
import { memo, useRef, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/inputs/Selection/Select/Select.tsx
|
|
@@ -6,7 +6,7 @@ import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
|
6
6
|
import { n as uiOutlineClass } from "./outline.clsx-50W_vNDl.js";
|
|
7
7
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
8
8
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
9
|
-
import { t as FormField } from "./FormField-
|
|
9
|
+
import { t as FormField } from "./FormField-B99dLt8o.js";
|
|
10
10
|
import $ahdqC$react, { createContext, forwardRef, memo, useContext, useRef } from "react";
|
|
11
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { mergeProps } from "react-aria/mergeProps";
|
|
@@ -9,7 +9,7 @@ import { t as IconSlot } from "./IconSlot-DSK7qNxc.js";
|
|
|
9
9
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
10
10
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
11
11
|
import { t as useIntersectionObserver } from "./useIntersectionObserver-DYfHnGGU.js";
|
|
12
|
-
import { a as tableHeaderTextDefinition, i as tableHeadRowDefinition, n as tableDataDefinition, o as tableRowDefinition, r as tableHeadDataDefinition, s as theadDefinition, t as tableCellTextDefinition } from "./table.cva-
|
|
12
|
+
import { a as tableHeaderTextDefinition, i as tableHeadRowDefinition, n as tableDataDefinition, o as tableRowDefinition, r as tableHeadDataDefinition, s as theadDefinition, t as tableCellTextDefinition } from "./table.cva-DlMT-zLD.js";
|
|
13
13
|
import { Suspense, lazy, useCallback, useMemo, useRef, useState } from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { createPaginatedRowModel, createSortedRowModel, flexRender, stockFeatures, tableFeatures, useTable } from "@tanstack/react-table";
|
|
@@ -4,9 +4,9 @@ import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
|
4
4
|
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e } from "./utils-Czcqspm7.js";
|
|
5
5
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
6
6
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
7
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
7
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
8
8
|
import { a as inputSizeDefinition, i as inputSideDefinition, o as useInputCva } from "./input.cva-DJA8ovm_.js";
|
|
9
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
9
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-3jyN0Wss.js";
|
|
10
10
|
import $ahdqC$react, { createContext, forwardRef, memo, useRef } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { mergeProps } from "react-aria/mergeProps";
|
|
@@ -137,7 +137,7 @@ const TextAreaBase = (props) => {
|
|
|
137
137
|
variant,
|
|
138
138
|
as,
|
|
139
139
|
...rest,
|
|
140
|
-
className: clsx("block h-full min-h-8", inputClassName)
|
|
140
|
+
className: clsx("block h-full min-h-8", as !== "inline" && "[textarea&]:rounded-[min(var(--radius-input-rounding-default),1rem)]", inputClassName)
|
|
141
141
|
}),
|
|
142
142
|
ref
|
|
143
143
|
}),
|
|
@@ -2,21 +2,22 @@ import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
|
|
|
2
2
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
3
3
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
4
4
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-D6KlWSFL.js";
|
|
5
|
-
import { r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-DQxX6LMN.js";
|
|
6
|
-
import { a as getStaticTimeSegments, c as useFirefoxDateSegmentSelectionGuard, d as $8e7461aabf74661f$export$60e84778edff6d26, i as getStaticDateTimeFocusTarget, l as DateSegmentItem, o as DateTimeDialogFooter, s as DateTimeDialog, y as $7541913c0284d84b$export$4c842f6a241dc825 } from "./staticDateTimeSegments-CsCE9Buo.js";
|
|
7
5
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
8
6
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
9
7
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
10
8
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
11
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
9
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
12
10
|
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-DJA8ovm_.js";
|
|
13
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
14
|
-
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-
|
|
15
|
-
import {
|
|
11
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-3jyN0Wss.js";
|
|
12
|
+
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-NeZVnci-.js";
|
|
13
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CzXkZCX8.js";
|
|
14
|
+
import { a as getStaticTimeSegments, c as useFirefoxDateSegmentSelectionGuard, d as $8e7461aabf74661f$export$60e84778edff6d26, i as getStaticDateTimeFocusTarget, l as DateSegmentItem, o as DateTimeDialogFooter, s as DateTimeDialog } from "./staticDateTimeSegments-DtU63_dw.js";
|
|
15
|
+
import { n as TimePickerForm, t as normalizeDatePickerValue } from "./datePickerValue.utils-DCgoSrP3.js";
|
|
16
16
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
17
17
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
import { GregorianCalendar, Time, getLocalTimeZone, now, toCalendarDateTime, toTime, toZoned, today } from "@internationalized/date";
|
|
20
|
+
import { useLocale, useTimeField } from "react-aria";
|
|
20
21
|
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
21
22
|
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/datepicker/useTimeFieldState.mjs
|
|
22
23
|
function $b822555cf9fe955c$export$fd53cef0cc796101(props) {
|
|
@@ -192,7 +193,7 @@ const TimePickerBase = (props) => {
|
|
|
192
193
|
};
|
|
193
194
|
const [isOpen, setIsOpen] = useState(false);
|
|
194
195
|
const initialDateEmitRef = useRef(true);
|
|
195
|
-
const { locale } =
|
|
196
|
+
const { locale } = useLocale();
|
|
196
197
|
const normalizedValue = value ?? null;
|
|
197
198
|
const dialogState = $b822555cf9fe955c$export$fd53cef0cc796101({
|
|
198
199
|
...rest,
|
|
@@ -221,7 +222,7 @@ const TimePickerBase = (props) => {
|
|
|
221
222
|
if (state.timeValue) onChange?.(state.timeValue);
|
|
222
223
|
}, [rest.date]);
|
|
223
224
|
const timeFieldRef = useRef(null);
|
|
224
|
-
const { labelProps, fieldProps } =
|
|
225
|
+
const { labelProps, fieldProps } = useTimeField({
|
|
225
226
|
...rest,
|
|
226
227
|
label,
|
|
227
228
|
isReadOnly: disableManualEntry,
|
|
@@ -312,7 +313,7 @@ const TimePickerInner = ({ renderStaticInput, isFormControlDisabled, ...props })
|
|
|
312
313
|
const timeZone = props.timeZone ?? ui.dateInput.timeZone;
|
|
313
314
|
let effectiveTimeZone = getLocalTimeZone();
|
|
314
315
|
if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
|
|
315
|
-
const { locale } =
|
|
316
|
+
const { locale } = useLocale();
|
|
316
317
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
317
318
|
const inputRef = useRef(null);
|
|
318
319
|
const { renderRealInput, replayStaticInputPress } = useStaticInputHandoff({
|
|
@@ -2,77 +2,16 @@ import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
3
3
|
import { t as IconSlot } from "./IconSlot-DSK7qNxc.js";
|
|
4
4
|
import { n as $bc25b811ec97a172$export$40258cc1d95ff477, t as $75afe627ae0cc0fa$export$d2b052e7b4be1756 } from "./ToggleButton-BW1ensey.js";
|
|
5
|
-
import { i as $23f2114a1b82827e$export$e58f029f0fbfdb29, n as $23f2114a1b82827e$export$4282f70798064fe0, r as $23f2114a1b82827e$export$cd4e5573fbe2b576, t as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
6
|
-
import { n as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-DQxX6LMN.js";
|
|
7
|
-
import { n as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-CO9oJ1sc.js";
|
|
8
5
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
9
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
10
7
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
11
|
-
import { t as FormField } from "./FormField-
|
|
8
|
+
import { t as FormField } from "./FormField-B99dLt8o.js";
|
|
9
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CzXkZCX8.js";
|
|
12
10
|
import { n as toggleGroupItemDefinition, t as toggleGroupDefinition } from "./toggleGroup.cva-MbpaEBg1.js";
|
|
13
|
-
import { Fragment, useMemo, useRef
|
|
11
|
+
import { Fragment, useMemo, useRef } from "react";
|
|
14
12
|
import { c } from "react/compiler-runtime";
|
|
15
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
function $afa781ff67c1cd08$export$fa142eb1681c520(props, ref) {
|
|
18
|
-
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, orientation = "horizontal" } = props;
|
|
19
|
-
let [isInToolbar, setInToolbar] = useState(false);
|
|
20
|
-
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
21
|
-
setInToolbar(!!(ref.current && ref.current.parentElement?.closest("[role=\"toolbar\"]")));
|
|
22
|
-
});
|
|
23
|
-
const { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
24
|
-
const shouldReverse = direction === "rtl" && orientation === "horizontal";
|
|
25
|
-
let focusManager = $535772f9d2c1f38d$export$c5251b9e124bf29(ref);
|
|
26
|
-
const onKeyDown = (e) => {
|
|
27
|
-
if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
|
|
28
|
-
if (orientation === "horizontal" && e.key === "ArrowRight" || orientation === "vertical" && e.key === "ArrowDown") {
|
|
29
|
-
if (shouldReverse) focusManager.focusPrevious();
|
|
30
|
-
else focusManager.focusNext();
|
|
31
|
-
} else if (orientation === "horizontal" && e.key === "ArrowLeft" || orientation === "vertical" && e.key === "ArrowUp") {
|
|
32
|
-
if (shouldReverse) focusManager.focusNext();
|
|
33
|
-
else focusManager.focusPrevious();
|
|
34
|
-
} else if (e.key === "Tab") {
|
|
35
|
-
lastFocused.current = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
36
|
-
if (e.shiftKey) focusManager.focusFirst();
|
|
37
|
-
else focusManager.focusLast();
|
|
38
|
-
return;
|
|
39
|
-
} else return;
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
e.preventDefault();
|
|
42
|
-
};
|
|
43
|
-
const lastFocused = useRef(null);
|
|
44
|
-
const onBlur = (e) => {
|
|
45
|
-
if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, e.relatedTarget) && !lastFocused.current) lastFocused.current = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
46
|
-
};
|
|
47
|
-
const onFocus = (e) => {
|
|
48
|
-
if (lastFocused.current && !$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, e.relatedTarget) && $23f2114a1b82827e$export$4282f70798064fe0(ref.current, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) {
|
|
49
|
-
lastFocused.current?.focus();
|
|
50
|
-
lastFocused.current = null;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
return { toolbarProps: {
|
|
54
|
-
...$8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true }),
|
|
55
|
-
role: !isInToolbar ? "toolbar" : "group",
|
|
56
|
-
"aria-orientation": orientation,
|
|
57
|
-
"aria-label": ariaLabel,
|
|
58
|
-
"aria-labelledby": ariaLabel == null ? ariaLabelledBy : void 0,
|
|
59
|
-
onKeyDownCapture: !isInToolbar ? onKeyDown : void 0,
|
|
60
|
-
onFocusCapture: !isInToolbar ? onFocus : void 0,
|
|
61
|
-
onBlurCapture: !isInToolbar ? onBlur : void 0
|
|
62
|
-
} };
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/button/useToggleButtonGroup.mjs
|
|
66
|
-
function $162557ba4d6f08dd$export$dd5580ae642f110f(props, state, ref) {
|
|
67
|
-
let { isDisabled } = props;
|
|
68
|
-
let { toolbarProps } = $afa781ff67c1cd08$export$fa142eb1681c520(props, ref);
|
|
69
|
-
return { groupProps: {
|
|
70
|
-
...toolbarProps,
|
|
71
|
-
role: state.selectionMode === "single" ? "radiogroup" : toolbarProps.role,
|
|
72
|
-
"aria-disabled": isDisabled
|
|
73
|
-
} };
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
14
|
+
import { useToggleButtonGroup } from "react-aria";
|
|
76
15
|
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/toggle/useToggleGroupState.mjs
|
|
77
16
|
function $3d8ad31c4c1725e9$export$8deac67f4addf270(props) {
|
|
78
17
|
let { selectionMode = "single", disallowEmptySelection, isDisabled = false } = props;
|
|
@@ -232,7 +171,7 @@ const ToggleGroupBase = (t0) => {
|
|
|
232
171
|
const props = t3;
|
|
233
172
|
const buttonGroupRef = useRef(null);
|
|
234
173
|
const state = $3d8ad31c4c1725e9$export$8deac67f4addf270(props);
|
|
235
|
-
const { groupProps } =
|
|
174
|
+
const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
|
|
236
175
|
const toggleGroupCva = UIOverrides.useCva("toggleGroup.cva", toggleGroupDefinition);
|
|
237
176
|
let t4;
|
|
238
177
|
if ($[17] !== error || $[18] !== props.isDisabled) {
|
|
@@ -4,7 +4,6 @@ import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
|
4
4
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
5
5
|
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "./utils-Czcqspm7.js";
|
|
6
6
|
import { n as $4fcfe18fac72dabd$export$746d02f47f4d381, t as $4fcfe18fac72dabd$export$2de4954e8ae13b9f } from "./OverlayArrow-D8z7cCsw.js";
|
|
7
|
-
import { t as $d1116acdf220c2da$export$4c014de7c8940b4c } from "./useFocusable-Bd0UsrQ7.js";
|
|
8
7
|
import { i as tooltipTextDefinition, n as tooltipPointerHorizontalDefinition, r as tooltipPointerVerticalDefinition, t as tooltipDefinition } from "./tooltip.cva-BIzlOXHH.js";
|
|
9
8
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
10
9
|
import $ahdqC$react, { Fragment, createContext, forwardRef, useContext, useRef } from "react";
|
|
@@ -18,6 +17,7 @@ import { useTooltipTriggerState } from "react-stately/useTooltipTriggerState";
|
|
|
18
17
|
import { useOverlayPosition } from "react-aria/useOverlayPosition";
|
|
19
18
|
import { OverlayContainer } from "react-aria/private/overlays/useModal";
|
|
20
19
|
import { useTooltip, useTooltipTrigger } from "react-aria/useTooltipTrigger";
|
|
20
|
+
import { useFocusable } from "react-aria";
|
|
21
21
|
//#region ../../node_modules/.bun/react-aria-components@1.21.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Tooltip.mjs
|
|
22
22
|
const $05a50f7d78b03ad9$export$7a7623236eec67fa = /*#__PURE__*/ createContext(null);
|
|
23
23
|
const $05a50f7d78b03ad9$export$39ae08fa83328b12 = /*#__PURE__*/ createContext(null);
|
|
@@ -106,7 +106,7 @@ const CustomTrigger = (t0) => {
|
|
|
106
106
|
t1 = {};
|
|
107
107
|
$[0] = t1;
|
|
108
108
|
} else t1 = $[0];
|
|
109
|
-
const { focusableProps } =
|
|
109
|
+
const { focusableProps } = useFocusable(t1, ref);
|
|
110
110
|
const t2 = tabIndex ?? 0;
|
|
111
111
|
let t3;
|
|
112
112
|
if ($[1] !== className) {
|
|
@@ -46,7 +46,7 @@ const InputClearButton = ({ onClear, className, style }) => {
|
|
|
46
46
|
};
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/components/inputs/shared/TooltipWrapper.tsx
|
|
49
|
-
const InlineTooltipWrapper = lazy(() => import("./InlineTooltipWrapper-
|
|
49
|
+
const InlineTooltipWrapper = lazy(() => import("./InlineTooltipWrapper-BpApaGXV.js"));
|
|
50
50
|
const TooltipWrapper = (props) => {
|
|
51
51
|
if (props.as !== "inline") return props.children;
|
|
52
52
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
@@ -2,10 +2,10 @@ import { t as UIConfig } from "../uiConfig.context-BS3r_kTS.js";
|
|
|
2
2
|
import { r as selectInputTagsContentWrapperDefinition } from "../selectDesktop.cva-CHAMxhfO.js";
|
|
3
3
|
import { t as clsx } from "../clsx-CnD0nOiA.js";
|
|
4
4
|
import { t as UIOverrides } from "../uiOverrides.context-BTCH9y5a.js";
|
|
5
|
-
import { n as StaticSelectTrailingContent, r as SelectBase, t as getStaticSelectValue } from "../staticSelect.utils-
|
|
5
|
+
import { n as StaticSelectTrailingContent, r as SelectBase, t as getStaticSelectValue } from "../staticSelect.utils-uHa8f_c6.js";
|
|
6
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-BE0r63d8.js";
|
|
7
7
|
import { t as FieldController } from "../form.binding-CG1RPv6o.js";
|
|
8
|
-
import { i as InputFrame, n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "../useStaticInputHandoff-
|
|
8
|
+
import { i as InputFrame, n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "../useStaticInputHandoff-NeZVnci-.js";
|
|
9
9
|
import { memo, useRef, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/inputs/Selection/Autocomplete/Autocomplete.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Breadcrumbs } from "../Breadcrumbs-
|
|
1
|
+
import { t as Breadcrumbs } from "../Breadcrumbs-FF8hMfXd.js";
|
|
2
2
|
export { Breadcrumbs };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as UIConfig } from "../uiConfig.context-BS3r_kTS.js";
|
|
2
|
-
import { i as checkboxContentWrapperDefinition, o as checkboxGroupLabelDefinition, r as checkboxContentRowDefinition } from "../CheckboxCheckmark-
|
|
2
|
+
import { i as checkboxContentWrapperDefinition, o as checkboxGroupLabelDefinition, r as checkboxContentRowDefinition } from "../CheckboxCheckmark-CpC3wlMs.js";
|
|
3
3
|
import { t as clsx } from "../clsx-CnD0nOiA.js";
|
|
4
4
|
import { t as UIOverrides } from "../uiOverrides.context-BTCH9y5a.js";
|
|
5
|
-
import { n as CheckboxBase, r as $ed8ccb2e23e76301$export$4aa08d5625cb8ead } from "../Checkbox-
|
|
5
|
+
import { n as CheckboxBase, r as $ed8ccb2e23e76301$export$4aa08d5625cb8ead } from "../Checkbox-CV1ILXXO.js";
|
|
6
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-BE0r63d8.js";
|
|
7
7
|
import { t as FieldController } from "../form.binding-CG1RPv6o.js";
|
|
8
|
-
import { r as FormFieldLabel, t as FormField } from "../FormField-
|
|
8
|
+
import { r as FormFieldLabel, t as FormField } from "../FormField-B99dLt8o.js";
|
|
9
9
|
import { a as inputSizeDefinition, t as inputBaseDefinition } from "../input.cva-DJA8ovm_.js";
|
|
10
10
|
import { memo } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CheckboxBase, t as Checkbox } from "../Checkbox-
|
|
1
|
+
import { n as CheckboxBase, t as Checkbox } from "../Checkbox-CV1ILXXO.js";
|
|
2
2
|
export { Checkbox, CheckboxBase };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DatePicker } from "../DatePicker-
|
|
1
|
+
import { t as DatePicker } from "../DatePicker-DOLL7mkc.js";
|
|
2
2
|
export { DatePicker };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isDateRangePresetValue, c as resolveDateRangePreset, i as hydrateRelativeDateRangeValue, n as dateRangePresetValues, o as isRelativeDateRangeValue, r as getDateRangePreset, s as isStoredRelativeDateRangeValue, t as DateRangePicker } from "../DateRangePicker-
|
|
1
|
+
import { a as isDateRangePresetValue, c as resolveDateRangePreset, i as hydrateRelativeDateRangeValue, n as dateRangePresetValues, o as isRelativeDateRangeValue, r as getDateRangePreset, s as isStoredRelativeDateRangeValue, t as DateRangePicker } from "../DateRangePicker-BF-1CztH.js";
|
|
2
2
|
export { DateRangePicker, dateRangePresetValues, getDateRangePreset, hydrateRelativeDateRangeValue, isDateRangePresetValue, isRelativeDateRangeValue, isStoredRelativeDateRangeValue, resolveDateRangePreset };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DateTimePicker } from "../DateTimePicker-
|
|
1
|
+
import { t as DateTimePicker } from "../DateTimePicker-Cj0qvJUz.js";
|
|
2
2
|
export { DateTimePicker };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FileInput } from "../FileInput-
|
|
1
|
+
import { t as FileInput } from "../FileInput-Br5DQaGQ.js";
|
|
2
2
|
export { FileInput };
|