@orchidui/dashboard 1.8.1-93 → 1.8.1-96
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/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
- package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
- package/dist/Collection-COudIl-A.js +55 -0
- package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
- package/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/Charts/BarChart/OcBarChart.js +1 -1
- package/dist/Dashboard/Charts/BarRaceChart/OcBarRaceChart.js +1 -1
- package/dist/Dashboard/Charts/LineChart/OcLineChart.js +1 -1
- package/dist/Dashboard/Charts/PieChart/OcPieChart.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
- package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
- package/dist/DialogPortal-zAvO8zt4.js +23 -0
- package/dist/DialogTrigger-BIF1A4hk.js +72 -0
- package/dist/DismissableLayer-C7IJliOb.js +151 -0
- package/dist/FocusScope--pJ6bboI.js +121 -0
- package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
- package/dist/ListboxItem-CjMk-mEX.js +417 -0
- package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
- package/dist/{OcBarChart-CgKo9rAM.js → OcBarChart-DFnF2-u0.js} +2 -2
- package/dist/{OcBarRaceChart-D_XrqdiO.js → OcBarRaceChart-B6S4Rrlq.js} +3 -3
- package/dist/{OcCard-BpqC7suH.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/OcCodeBlock-CBdVqav7.js +37 -0
- package/dist/{OcLineChart-dAL6sRiP.js → OcLineChart-CTDLgo1v.js} +2 -2
- package/dist/OcLottieAnimation-DeMoIDaX.js +7747 -0
- package/dist/{OcPieChart-Kn-CkXip.js → OcPieChart-NSv6CW-L.js} +4 -4
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
- package/dist/PopperContent-BT3Svcc3.js +1465 -0
- package/dist/Presence-CxfTrw6l.js +133 -0
- package/dist/Primitive-B3twiLO1.js +44 -0
- package/dist/QuillEditor-hFQ0MJZO.js +9529 -0
- package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
- package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
- package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
- package/dist/Separator-DRam5i7g.js +54 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
- package/dist/Teleport-DnUewq5H.js +25 -0
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
- package/dist/VisuallyHidden-DMAU4heD.js +41 -0
- package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-CqVTtuYm.js +6 -0
- package/dist/arrays-4jDZqbdb.js +20 -0
- package/dist/check-C2tzJ0Gk.js +11 -0
- package/dist/chevron-down-CnpAlizg.js +13 -0
- package/dist/chevron-left-BOwFasou.js +13 -0
- package/dist/chevron-right-D308801z.js +13 -0
- package/dist/circle-A-6NpYiX.js +13 -0
- package/dist/clamp-BL1Rb24G.js +22 -0
- package/dist/constant-CuDQlTIy.js +3433 -0
- package/dist/createContext-CZEfaSVa.js +17 -0
- package/dist/createLucideIcon-eXqDwUWj.js +71 -0
- package/dist/ellipsis-CEG9G7eN.js +15 -0
- package/dist/getActiveElement-B-HWdUIb.js +11 -0
- package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
- package/dist/index-B3LW8uSH.js +133 -0
- package/dist/index-BIlpXuWX.js +3430 -0
- package/dist/index-BlGEiPHj.js +1246 -0
- package/dist/index-BwPb_idr.js +574 -0
- package/dist/index-C9julNQm.js +173 -0
- package/dist/index-C_aI-Wfj.js +34 -0
- package/dist/index-CumjCvqB.js +5703 -0
- package/dist/index-LqWMCtOd.js +809 -0
- package/dist/index-OpE2oGce.js +110 -0
- package/dist/index.js +14 -14
- package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/dist/nullish-CjWwlQS3.js +6 -0
- package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
- package/dist/plus-CgluTYQY.js +14 -0
- package/dist/text-zwICaAnx.js +743 -0
- package/dist/ui/accordion/index.js +7 -0
- package/dist/ui/alert/index.js +64 -0
- package/dist/ui/alert-dialog/index.js +356 -0
- package/dist/ui/aspect-ratio/index.js +50 -0
- package/dist/ui/auto-form/constant.js +5 -0
- package/dist/ui/auto-form/dependencies.js +61 -0
- package/dist/ui/auto-form/index.js +227 -0
- package/dist/ui/auto-form/interface.js +4 -0
- package/dist/ui/auto-form/utils.js +89 -0
- package/dist/ui/avatar/index.js +189 -0
- package/dist/ui/badge/index.js +37 -0
- package/dist/ui/breadcrumb/index.js +126 -0
- package/dist/ui/button/index.js +55 -0
- package/dist/ui/calendar/index.js +15 -0
- package/dist/ui/card/index.js +38 -0
- package/dist/ui/carousel/index.js +174 -0
- package/dist/ui/carousel/interface.js +1 -0
- package/dist/ui/carousel/useCarousel.js +1288 -0
- package/dist/ui/chart/index.js +8 -0
- package/dist/ui/chart/interface.js +1 -0
- package/dist/ui/chart-area/index.js +331 -0
- package/dist/ui/chart-bar/index.js +490 -0
- package/dist/ui/chart-donut/index.js +509 -0
- package/dist/ui/chart-line/index.js +110 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/dist/ui/collapsible/index.js +60 -0
- package/dist/ui/combobox/index.js +877 -0
- package/dist/ui/command/index.js +323 -0
- package/dist/ui/context-menu/index.js +734 -0
- package/dist/ui/dialog/index.js +169 -0
- package/dist/ui/drawer/index.js +971 -0
- package/dist/ui/dropdown-menu/index.js +723 -0
- package/dist/ui/form/index.js +13 -0
- package/dist/ui/form/injectionKeys.js +4 -0
- package/dist/ui/form/useFormField.js +25 -0
- package/dist/ui/hover-card/index.js +331 -0
- package/dist/ui/input/index.js +4 -0
- package/dist/ui/label/index.js +4 -0
- package/dist/ui/menubar/index.js +862 -0
- package/dist/ui/navigation-menu/index.js +873 -0
- package/dist/ui/number-field/index.js +682 -0
- package/dist/ui/pagination/index.js +444 -0
- package/dist/ui/pin-input/index.js +308 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/progress/index.js +137 -0
- package/dist/ui/radio-group/index.js +5 -0
- package/dist/ui/range-calendar/index.js +986 -0
- package/dist/ui/resizable/index.js +1432 -0
- package/dist/ui/scroll-area/index.js +775 -0
- package/dist/ui/select/index.js +135 -0
- package/dist/ui/separator/index.js +4 -0
- package/dist/ui/sheet/index.js +188 -0
- package/dist/ui/sidebar/index.js +652 -0
- package/dist/ui/sidebar/utils.js +12 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/dist/ui/slider/index.js +478 -0
- package/dist/ui/sonner/index.js +892 -0
- package/dist/ui/stepper/index.js +442 -0
- package/dist/ui/switch/index.js +4 -0
- package/dist/ui/table/index.js +153 -0
- package/dist/ui/tabs/index.js +280 -0
- package/dist/ui/tags-input/index.js +449 -0
- package/dist/ui/textarea/index.js +4 -0
- package/dist/ui/toast/index.js +738 -0
- package/dist/ui/toast/use-toast.js +85 -0
- package/dist/ui/toggle/index.js +6 -0
- package/dist/ui/toggle-group/index.js +112 -0
- package/dist/ui/tooltip/index.js +29 -0
- package/dist/useArrowNavigation-BRMPveaB.js +49 -0
- package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
- package/dist/useDirection-C3C_TLKm.js +14 -0
- package/dist/useFocusGuards-CyjC9cG9.js +26 -0
- package/dist/useFormControl-CFVC51Lp.js +11 -0
- package/dist/useForwardExpose-DZT6mL_U.js +37 -0
- package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
- package/dist/useGraceArea-D7-GP1ii.js +137 -0
- package/dist/useId-reAg216X.js +13 -0
- package/dist/useKbd-BJNupnml.js +41 -0
- package/dist/useLocale-BfU0LC8Z.js +14 -0
- package/dist/useNonce-C1ZOgOp5.js +14 -0
- package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
- package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
- package/dist/useSize-BnyQ8FZF.js +37 -0
- package/dist/useTypeahead-oSidjyFF.js +40 -0
- package/dist/utils-DKNaYMZh.js +57 -0
- package/dist/utils-Dx9la83v.js +35 -0
- package/dist/utils-DxQ_ywGa.js +55 -0
- package/dist/utils-SFgRDk1R.js +2748 -0
- package/dist/utils-W-UiqiPE.js +1869 -0
- package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
- package/dist/x-Cl6YllUK.js +14 -0
- package/package.json +265 -3
- package/dist/OcCodeBlock-chTpuRDc.js +0 -63
- package/dist/OcLottieAnimation-EBkAB8-y.js +0 -7741
- package/dist/QuillEditor-BHWfmp5D.js +0 -9544
- /package/dist/{style.css → dashboard.css} +0 -0
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
import { ref as E, computed as S, defineComponent as w, toRefs as Ne, createBlock as $, openBlock as y, unref as r, mergeProps as C, withCtx as V, renderSlot as D, createCommentVNode as De, withModifiers as N, onMounted as Fe, watch as Pe, withKeys as P, createElementBlock as Se, normalizeClass as me, createVNode as ce } from "vue";
|
|
2
|
+
import { c as B } from "../../utils-SFgRDk1R.js";
|
|
3
|
+
import { u as Ce, a as pe } from "../../useForwardPropsEmits-0XKBv1pB.js";
|
|
4
|
+
import { p as fe, a as Ve, i as Ee, e as Z, c as Ie, u as _e } from "../../index-BwPb_idr.js";
|
|
5
|
+
import { c as Me } from "../../createContext-CZEfaSVa.js";
|
|
6
|
+
import { u as O } from "../../usePrimitiveElement-BjwUvHih.js";
|
|
7
|
+
import { u as Be } from "../../useLocale-BfU0LC8Z.js";
|
|
8
|
+
import { u as Re } from "../../useFormControl-CFVC51Lp.js";
|
|
9
|
+
import { c as Te, s as We } from "../../clamp-BL1Rb24G.js";
|
|
10
|
+
import { P as j } from "../../Primitive-B3twiLO1.js";
|
|
11
|
+
import { _ as Oe } from "../../VisuallyHiddenInput-DvJnsVHt.js";
|
|
12
|
+
import { i as H } from "../../nullish-CjWwlQS3.js";
|
|
13
|
+
import { r as Q } from "../../index-OpE2oGce.js";
|
|
14
|
+
import { c as je } from "../../createLucideIcon-eXqDwUWj.js";
|
|
15
|
+
import { P as ke } from "../../plus-CgluTYQY.js";
|
|
16
|
+
import { g as Ae } from "../../getActiveElement-B-HWdUIb.js";
|
|
17
|
+
let U = /* @__PURE__ */ new Map(), J = !1;
|
|
18
|
+
try {
|
|
19
|
+
J = new Intl.NumberFormat("de-DE", {
|
|
20
|
+
signDisplay: "exceptZero"
|
|
21
|
+
}).resolvedOptions().signDisplay === "exceptZero";
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
let W = !1;
|
|
25
|
+
try {
|
|
26
|
+
W = new Intl.NumberFormat("de-DE", {
|
|
27
|
+
style: "unit",
|
|
28
|
+
unit: "degree"
|
|
29
|
+
}).resolvedOptions().style === "unit";
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
const be = {
|
|
33
|
+
degree: {
|
|
34
|
+
narrow: {
|
|
35
|
+
default: "°",
|
|
36
|
+
"ja-JP": " 度",
|
|
37
|
+
"zh-TW": "度",
|
|
38
|
+
"sl-SI": " °"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
class he {
|
|
43
|
+
/** Formats a number value as a string, according to the locale and options provided to the constructor. */
|
|
44
|
+
format(t) {
|
|
45
|
+
let e = "";
|
|
46
|
+
if (!J && this.options.signDisplay != null ? e = qe(this.numberFormatter, this.options.signDisplay, t) : e = this.numberFormatter.format(t), this.options.style === "unit" && !W) {
|
|
47
|
+
var s;
|
|
48
|
+
let { unit: a, unitDisplay: n = "short", locale: d } = this.resolvedOptions();
|
|
49
|
+
if (!a) return e;
|
|
50
|
+
let o = (s = be[a]) === null || s === void 0 ? void 0 : s[n];
|
|
51
|
+
e += o[d] || o.default;
|
|
52
|
+
}
|
|
53
|
+
return e;
|
|
54
|
+
}
|
|
55
|
+
/** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
|
|
56
|
+
formatToParts(t) {
|
|
57
|
+
return this.numberFormatter.formatToParts(t);
|
|
58
|
+
}
|
|
59
|
+
/** Formats a number range as a string. */
|
|
60
|
+
formatRange(t, e) {
|
|
61
|
+
if (typeof this.numberFormatter.formatRange == "function") return this.numberFormatter.formatRange(t, e);
|
|
62
|
+
if (e < t) throw new RangeError("End date must be >= start date");
|
|
63
|
+
return `${this.format(t)} – ${this.format(e)}`;
|
|
64
|
+
}
|
|
65
|
+
/** Formats a number range as an array of parts. */
|
|
66
|
+
formatRangeToParts(t, e) {
|
|
67
|
+
if (typeof this.numberFormatter.formatRangeToParts == "function") return this.numberFormatter.formatRangeToParts(t, e);
|
|
68
|
+
if (e < t) throw new RangeError("End date must be >= start date");
|
|
69
|
+
let s = this.numberFormatter.formatToParts(t), a = this.numberFormatter.formatToParts(e);
|
|
70
|
+
return [
|
|
71
|
+
...s.map((n) => ({
|
|
72
|
+
...n,
|
|
73
|
+
source: "startRange"
|
|
74
|
+
})),
|
|
75
|
+
{
|
|
76
|
+
type: "literal",
|
|
77
|
+
value: " – ",
|
|
78
|
+
source: "shared"
|
|
79
|
+
},
|
|
80
|
+
...a.map((n) => ({
|
|
81
|
+
...n,
|
|
82
|
+
source: "endRange"
|
|
83
|
+
}))
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
87
|
+
resolvedOptions() {
|
|
88
|
+
let t = this.numberFormatter.resolvedOptions();
|
|
89
|
+
return !J && this.options.signDisplay != null && (t = {
|
|
90
|
+
...t,
|
|
91
|
+
signDisplay: this.options.signDisplay
|
|
92
|
+
}), !W && this.options.style === "unit" && (t = {
|
|
93
|
+
...t,
|
|
94
|
+
style: "unit",
|
|
95
|
+
unit: this.options.unit,
|
|
96
|
+
unitDisplay: this.options.unitDisplay
|
|
97
|
+
}), t;
|
|
98
|
+
}
|
|
99
|
+
constructor(t, e = {}) {
|
|
100
|
+
this.numberFormatter = Le(t, e), this.options = e;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function Le(i, t = {}) {
|
|
104
|
+
let { numberingSystem: e } = t;
|
|
105
|
+
if (e && i.includes("-nu-") && (i.includes("-u-") || (i += "-u-"), i += `-nu-${e}`), t.style === "unit" && !W) {
|
|
106
|
+
var s;
|
|
107
|
+
let { unit: d, unitDisplay: o = "short" } = t;
|
|
108
|
+
if (!d) throw new Error('unit option must be provided with style: "unit"');
|
|
109
|
+
if (!(!((s = be[d]) === null || s === void 0) && s[o])) throw new Error(`Unsupported unit ${d} with unitDisplay = ${o}`);
|
|
110
|
+
t = {
|
|
111
|
+
...t,
|
|
112
|
+
style: "decimal"
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
let a = i + (t ? Object.entries(t).sort((d, o) => d[0] < o[0] ? -1 : 1).join() : "");
|
|
116
|
+
if (U.has(a)) return U.get(a);
|
|
117
|
+
let n = new Intl.NumberFormat(i, t);
|
|
118
|
+
return U.set(a, n), n;
|
|
119
|
+
}
|
|
120
|
+
function qe(i, t, e) {
|
|
121
|
+
if (t === "auto") return i.format(e);
|
|
122
|
+
if (t === "never") return i.format(Math.abs(e));
|
|
123
|
+
{
|
|
124
|
+
let s = !1;
|
|
125
|
+
if (t === "always" ? s = e > 0 || Object.is(e, 0) : t === "exceptZero" && (Object.is(e, -0) || Object.is(e, 0) ? e = Math.abs(e) : s = e > 0), s) {
|
|
126
|
+
let a = i.format(-e), n = i.format(e), d = a.replace(n, "").replace(/\u200e|\u061C/, "");
|
|
127
|
+
return [
|
|
128
|
+
...d
|
|
129
|
+
].length !== 1 && console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"), a.replace(n, "!!!").replace(d, "+").replace("!!!", n);
|
|
130
|
+
} else return i.format(e);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const ze = new RegExp("^.*\\(.*\\).*$"), Ye = [
|
|
134
|
+
"latn",
|
|
135
|
+
"arab",
|
|
136
|
+
"hanidec",
|
|
137
|
+
"deva",
|
|
138
|
+
"beng"
|
|
139
|
+
];
|
|
140
|
+
class ge {
|
|
141
|
+
/**
|
|
142
|
+
* Parses the given string to a number. Returns NaN if a valid number could not be parsed.
|
|
143
|
+
*/
|
|
144
|
+
parse(t) {
|
|
145
|
+
return X(this.locale, this.options, t).parse(t);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns whether the given string could potentially be a valid number. This should be used to
|
|
149
|
+
* validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity
|
|
150
|
+
* of the minus/plus sign characters can be checked.
|
|
151
|
+
*/
|
|
152
|
+
isValidPartialNumber(t, e, s) {
|
|
153
|
+
return X(this.locale, this.options, t).isValidPartialNumber(t, e, s);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns a numbering system for which the given string is valid in the current locale.
|
|
157
|
+
* If no numbering system could be detected, the default numbering system for the current
|
|
158
|
+
* locale is returned.
|
|
159
|
+
*/
|
|
160
|
+
getNumberingSystem(t) {
|
|
161
|
+
return X(this.locale, this.options, t).options.numberingSystem;
|
|
162
|
+
}
|
|
163
|
+
constructor(t, e = {}) {
|
|
164
|
+
this.locale = t, this.options = e;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const re = /* @__PURE__ */ new Map();
|
|
168
|
+
function X(i, t, e) {
|
|
169
|
+
let s = ne(i, t);
|
|
170
|
+
if (!i.includes("-nu-") && !s.isValidPartialNumber(e)) {
|
|
171
|
+
for (let a of Ye) if (a !== s.options.numberingSystem) {
|
|
172
|
+
let n = ne(i + (i.includes("-u-") ? "-nu-" : "-u-nu-") + a, t);
|
|
173
|
+
if (n.isValidPartialNumber(e)) return n;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return s;
|
|
177
|
+
}
|
|
178
|
+
function ne(i, t) {
|
|
179
|
+
let e = i + (t ? Object.entries(t).sort((a, n) => a[0] < n[0] ? -1 : 1).join() : ""), s = re.get(e);
|
|
180
|
+
return s || (s = new Ge(i, t), re.set(e, s)), s;
|
|
181
|
+
}
|
|
182
|
+
class Ge {
|
|
183
|
+
parse(t) {
|
|
184
|
+
let e = this.sanitize(t);
|
|
185
|
+
if (this.symbols.group && (e = M(e, this.symbols.group, "")), this.symbols.decimal && (e = e.replace(this.symbols.decimal, ".")), this.symbols.minusSign && (e = e.replace(this.symbols.minusSign, "-")), e = e.replace(this.symbols.numeral, this.symbols.index), this.options.style === "percent") {
|
|
186
|
+
let d = e.indexOf("-");
|
|
187
|
+
e = e.replace("-", ""), e = e.replace("+", "");
|
|
188
|
+
let o = e.indexOf(".");
|
|
189
|
+
o === -1 && (o = e.length), e = e.replace(".", ""), o - 2 === 0 ? e = `0.${e}` : o - 2 === -1 ? e = `0.0${e}` : o - 2 === -2 ? e = "0.00" : e = `${e.slice(0, o - 2)}.${e.slice(o - 2)}`, d > -1 && (e = `-${e}`);
|
|
190
|
+
}
|
|
191
|
+
let s = e ? +e : NaN;
|
|
192
|
+
if (isNaN(s)) return NaN;
|
|
193
|
+
if (this.options.style === "percent") {
|
|
194
|
+
var a, n;
|
|
195
|
+
let d = {
|
|
196
|
+
...this.options,
|
|
197
|
+
style: "decimal",
|
|
198
|
+
minimumFractionDigits: Math.min(((a = this.options.minimumFractionDigits) !== null && a !== void 0 ? a : 0) + 2, 20),
|
|
199
|
+
maximumFractionDigits: Math.min(((n = this.options.maximumFractionDigits) !== null && n !== void 0 ? n : 0) + 2, 20)
|
|
200
|
+
};
|
|
201
|
+
return new ge(this.locale, d).parse(new he(this.locale, d).format(s));
|
|
202
|
+
}
|
|
203
|
+
return this.options.currencySign === "accounting" && ze.test(t) && (s = -1 * s), s;
|
|
204
|
+
}
|
|
205
|
+
sanitize(t) {
|
|
206
|
+
return t = t.replace(this.symbols.literals, ""), this.symbols.minusSign && (t = t.replace("-", this.symbols.minusSign)), this.options.numberingSystem === "arab" && (this.symbols.decimal && (t = t.replace(",", this.symbols.decimal), t = t.replace("،", this.symbols.decimal)), this.symbols.group && (t = M(t, ".", this.symbols.group))), this.options.locale === "fr-FR" && this.symbols.group && (t = M(t, " ", this.symbols.group), t = M(t, /\u00A0/g, this.symbols.group)), t;
|
|
207
|
+
}
|
|
208
|
+
isValidPartialNumber(t, e = -1 / 0, s = 1 / 0) {
|
|
209
|
+
return t = this.sanitize(t), this.symbols.minusSign && t.startsWith(this.symbols.minusSign) && e < 0 ? t = t.slice(this.symbols.minusSign.length) : this.symbols.plusSign && t.startsWith(this.symbols.plusSign) && s > 0 && (t = t.slice(this.symbols.plusSign.length)), this.symbols.group && t.startsWith(this.symbols.group) || this.symbols.decimal && t.indexOf(this.symbols.decimal) > -1 && this.options.maximumFractionDigits === 0 ? !1 : (this.symbols.group && (t = M(t, this.symbols.group, "")), t = t.replace(this.symbols.numeral, ""), this.symbols.decimal && (t = t.replace(this.symbols.decimal, "")), t.length === 0);
|
|
210
|
+
}
|
|
211
|
+
constructor(t, e = {}) {
|
|
212
|
+
this.locale = t, e.roundingIncrement !== 1 && e.roundingIncrement != null && (e.maximumFractionDigits == null && e.minimumFractionDigits == null ? (e.maximumFractionDigits = 0, e.minimumFractionDigits = 0) : e.maximumFractionDigits == null ? e.maximumFractionDigits = e.minimumFractionDigits : e.minimumFractionDigits == null && (e.minimumFractionDigits = e.maximumFractionDigits)), this.formatter = new Intl.NumberFormat(t, e), this.options = this.formatter.resolvedOptions(), this.symbols = Ze(t, this.formatter, this.options, e);
|
|
213
|
+
var s, a;
|
|
214
|
+
this.options.style === "percent" && (((s = this.options.minimumFractionDigits) !== null && s !== void 0 ? s : 0) > 18 || ((a = this.options.maximumFractionDigits) !== null && a !== void 0 ? a : 0) > 18) && console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const le = /* @__PURE__ */ new Set([
|
|
218
|
+
"decimal",
|
|
219
|
+
"fraction",
|
|
220
|
+
"integer",
|
|
221
|
+
"minusSign",
|
|
222
|
+
"plusSign",
|
|
223
|
+
"group"
|
|
224
|
+
]), Ke = [
|
|
225
|
+
0,
|
|
226
|
+
4,
|
|
227
|
+
2,
|
|
228
|
+
1,
|
|
229
|
+
11,
|
|
230
|
+
20,
|
|
231
|
+
3,
|
|
232
|
+
7,
|
|
233
|
+
100,
|
|
234
|
+
21,
|
|
235
|
+
0.1,
|
|
236
|
+
1.1
|
|
237
|
+
];
|
|
238
|
+
function Ze(i, t, e, s) {
|
|
239
|
+
var a, n, d, o;
|
|
240
|
+
let l = new Intl.NumberFormat(i, {
|
|
241
|
+
...e,
|
|
242
|
+
// Resets so we get the full range of symbols
|
|
243
|
+
minimumSignificantDigits: 1,
|
|
244
|
+
maximumSignificantDigits: 21,
|
|
245
|
+
roundingIncrement: 1,
|
|
246
|
+
roundingPriority: "auto",
|
|
247
|
+
roundingMode: "halfExpand"
|
|
248
|
+
}), u = l.formatToParts(-10000.111), f = l.formatToParts(10000.111), b = Ke.map((p) => l.formatToParts(p));
|
|
249
|
+
var g;
|
|
250
|
+
let k = (g = (a = u.find((p) => p.type === "minusSign")) === null || a === void 0 ? void 0 : a.value) !== null && g !== void 0 ? g : "-", c = (n = f.find((p) => p.type === "plusSign")) === null || n === void 0 ? void 0 : n.value;
|
|
251
|
+
!c && ((s == null ? void 0 : s.signDisplay) === "exceptZero" || (s == null ? void 0 : s.signDisplay) === "always") && (c = "+");
|
|
252
|
+
let A = (d = new Intl.NumberFormat(i, {
|
|
253
|
+
...e,
|
|
254
|
+
minimumFractionDigits: 2,
|
|
255
|
+
maximumFractionDigits: 2
|
|
256
|
+
}).formatToParts(1e-3).find((p) => p.type === "decimal")) === null || d === void 0 ? void 0 : d.value, I = (o = u.find((p) => p.type === "group")) === null || o === void 0 ? void 0 : o.value, L = u.filter((p) => !le.has(p.type)).map((p) => oe(p.value)), x = b.flatMap((p) => p.filter((v) => !le.has(v.type)).map((v) => oe(v.value))), R = [
|
|
257
|
+
.../* @__PURE__ */ new Set([
|
|
258
|
+
...L,
|
|
259
|
+
...x
|
|
260
|
+
])
|
|
261
|
+
].sort((p, v) => v.length - p.length), q = R.length === 0 ? new RegExp("[\\p{White_Space}]", "gu") : new RegExp(`${R.join("|")}|[\\p{White_Space}]`, "gu"), _ = [
|
|
262
|
+
...new Intl.NumberFormat(e.locale, {
|
|
263
|
+
useGrouping: !1
|
|
264
|
+
}).format(9876543210)
|
|
265
|
+
].reverse(), z = new Map(_.map((p, v) => [
|
|
266
|
+
p,
|
|
267
|
+
v
|
|
268
|
+
])), Y = new RegExp(`[${_.join("")}]`, "g");
|
|
269
|
+
return {
|
|
270
|
+
minusSign: k,
|
|
271
|
+
plusSign: c,
|
|
272
|
+
decimal: A,
|
|
273
|
+
group: I,
|
|
274
|
+
literals: q,
|
|
275
|
+
numeral: Y,
|
|
276
|
+
index: (p) => String(z.get(p))
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function M(i, t, e) {
|
|
280
|
+
return i.replaceAll ? i.replaceAll(t, e) : i.split(t).join(e);
|
|
281
|
+
}
|
|
282
|
+
function oe(i) {
|
|
283
|
+
return i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
284
|
+
}
|
|
285
|
+
function ve(i) {
|
|
286
|
+
const { disabled: t } = i, e = E(), s = Ie(), a = () => window.clearTimeout(e.value), n = (g) => {
|
|
287
|
+
a(), !t.value && (s.trigger(), e.value = window.setTimeout(() => {
|
|
288
|
+
n(60);
|
|
289
|
+
}, g));
|
|
290
|
+
}, d = () => {
|
|
291
|
+
n(400);
|
|
292
|
+
}, o = () => {
|
|
293
|
+
a();
|
|
294
|
+
}, l = E(!1), u = S(() => Ve(i.target)), f = (g) => {
|
|
295
|
+
g.button !== 0 || l.value || (g.preventDefault(), l.value = !0, d());
|
|
296
|
+
}, b = () => {
|
|
297
|
+
l.value = !1, o();
|
|
298
|
+
};
|
|
299
|
+
return Ee && (Z(u || window, "pointerdown", f), Z(window, "pointerup", b), Z(window, "pointercancel", b)), {
|
|
300
|
+
isPressed: l,
|
|
301
|
+
onTrigger: s.on
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function ue(i, t = E({})) {
|
|
305
|
+
return fe(() => new he(i.value, t.value));
|
|
306
|
+
}
|
|
307
|
+
function He(i, t = E({})) {
|
|
308
|
+
return fe(() => new ge(i.value, t.value));
|
|
309
|
+
}
|
|
310
|
+
function de(i, t, e) {
|
|
311
|
+
let s = i === "+" ? t + e : t - e;
|
|
312
|
+
if (t % 1 !== 0 || e % 1 !== 0) {
|
|
313
|
+
const a = t.toString().split("."), n = e.toString().split("."), d = a[1] && a[1].length || 0, o = n[1] && n[1].length || 0, l = 10 ** Math.max(d, o);
|
|
314
|
+
t = Math.round(t * l), e = Math.round(e * l), s = i === "+" ? t + e : t - e, s /= l;
|
|
315
|
+
}
|
|
316
|
+
return s;
|
|
317
|
+
}
|
|
318
|
+
const [ee, Ue] = Me("NumberFieldRoot"), Xe = /* @__PURE__ */ w({
|
|
319
|
+
inheritAttrs: !1,
|
|
320
|
+
__name: "NumberFieldRoot",
|
|
321
|
+
props: {
|
|
322
|
+
defaultValue: { default: void 0 },
|
|
323
|
+
modelValue: {},
|
|
324
|
+
min: {},
|
|
325
|
+
max: {},
|
|
326
|
+
step: { default: 1 },
|
|
327
|
+
stepSnapping: { type: Boolean, default: !0 },
|
|
328
|
+
formatOptions: {},
|
|
329
|
+
locale: {},
|
|
330
|
+
disabled: { type: Boolean },
|
|
331
|
+
disableWheelChange: { type: Boolean },
|
|
332
|
+
invertWheelChange: { type: Boolean },
|
|
333
|
+
id: {},
|
|
334
|
+
asChild: { type: Boolean },
|
|
335
|
+
as: { default: "div" },
|
|
336
|
+
name: {},
|
|
337
|
+
required: { type: Boolean }
|
|
338
|
+
},
|
|
339
|
+
emits: ["update:modelValue"],
|
|
340
|
+
setup(i, { emit: t }) {
|
|
341
|
+
const e = i, s = t, { disabled: a, disableWheelChange: n, invertWheelChange: d, min: o, max: l, step: u, stepSnapping: f, formatOptions: b, id: g, locale: k } = Ne(e), c = _e(e, "modelValue", s, {
|
|
342
|
+
defaultValue: e.defaultValue,
|
|
343
|
+
passive: e.modelValue === void 0
|
|
344
|
+
}), { primitiveElement: te, currentElement: A } = O(), I = Be(k), L = Re(A), x = E(), R = S(
|
|
345
|
+
() => !H(c.value) && (F(c.value) === o.value || o.value && !isNaN(c.value) ? de("-", c.value, u.value) < o.value : !1)
|
|
346
|
+
), q = S(
|
|
347
|
+
() => !H(c.value) && (F(c.value) === l.value || l.value && !isNaN(c.value) ? de("+", c.value, u.value) > l.value : !1)
|
|
348
|
+
);
|
|
349
|
+
function _(m, h = 1) {
|
|
350
|
+
var se, ie;
|
|
351
|
+
(se = x.value) == null || se.focus();
|
|
352
|
+
const K = v.parse(((ie = x.value) == null ? void 0 : ie.value) ?? "");
|
|
353
|
+
e.disabled || (isNaN(K) ? c.value = o.value ?? 0 : m === "increase" ? c.value = F(K + (u.value ?? 1) * h) : c.value = F(K - (u.value ?? 1) * h));
|
|
354
|
+
}
|
|
355
|
+
function z(m = 1) {
|
|
356
|
+
_("increase", m);
|
|
357
|
+
}
|
|
358
|
+
function Y(m = 1) {
|
|
359
|
+
_("decrease", m);
|
|
360
|
+
}
|
|
361
|
+
function ae(m) {
|
|
362
|
+
m === "min" && o.value !== void 0 ? c.value = F(o.value) : m === "max" && l.value !== void 0 && (c.value = F(l.value));
|
|
363
|
+
}
|
|
364
|
+
const p = ue(I, b), v = He(I, b), ye = S(() => p.resolvedOptions().maximumFractionDigits > 0 ? "decimal" : "numeric"), $e = ue(I, b), T = S(() => H(c.value) || isNaN(c.value) ? "" : $e.format(c.value));
|
|
365
|
+
function we(m) {
|
|
366
|
+
return v.isValidPartialNumber(m, o.value, l.value);
|
|
367
|
+
}
|
|
368
|
+
function G(m) {
|
|
369
|
+
x.value && (x.value.value = m);
|
|
370
|
+
}
|
|
371
|
+
function F(m) {
|
|
372
|
+
let h;
|
|
373
|
+
return u.value === void 0 || isNaN(u.value) || !f.value ? h = Te(m, o.value, l.value) : h = We(m, o.value, l.value, u.value), h = v.parse(p.format(h)), h;
|
|
374
|
+
}
|
|
375
|
+
function xe(m) {
|
|
376
|
+
const h = v.parse(m);
|
|
377
|
+
return c.value = isNaN(h) ? void 0 : F(h), m.length ? (isNaN(h), G(T.value)) : G(m);
|
|
378
|
+
}
|
|
379
|
+
return Ue({
|
|
380
|
+
modelValue: c,
|
|
381
|
+
handleDecrease: Y,
|
|
382
|
+
handleIncrease: z,
|
|
383
|
+
handleMinMaxValue: ae,
|
|
384
|
+
inputMode: ye,
|
|
385
|
+
inputEl: x,
|
|
386
|
+
onInputElement: (m) => x.value = m,
|
|
387
|
+
textValue: T,
|
|
388
|
+
validate: we,
|
|
389
|
+
applyInputValue: xe,
|
|
390
|
+
disabled: a,
|
|
391
|
+
disableWheelChange: n,
|
|
392
|
+
invertWheelChange: d,
|
|
393
|
+
max: l,
|
|
394
|
+
min: o,
|
|
395
|
+
isDecreaseDisabled: R,
|
|
396
|
+
isIncreaseDisabled: q,
|
|
397
|
+
id: g
|
|
398
|
+
}), (m, h) => (y(), $(r(j), C(m.$attrs, {
|
|
399
|
+
ref_key: "primitiveElement",
|
|
400
|
+
ref: te,
|
|
401
|
+
role: "group",
|
|
402
|
+
as: m.as,
|
|
403
|
+
"as-child": m.asChild,
|
|
404
|
+
"data-disabled": r(a) ? "" : void 0
|
|
405
|
+
}), {
|
|
406
|
+
default: V(() => [
|
|
407
|
+
D(m.$slots, "default", {
|
|
408
|
+
modelValue: r(c),
|
|
409
|
+
textValue: T.value
|
|
410
|
+
}),
|
|
411
|
+
r(L) && m.name ? (y(), $(r(Oe), {
|
|
412
|
+
key: 0,
|
|
413
|
+
type: "text",
|
|
414
|
+
value: r(c),
|
|
415
|
+
name: m.name,
|
|
416
|
+
disabled: r(a),
|
|
417
|
+
required: m.required
|
|
418
|
+
}, null, 8, ["value", "name", "disabled", "required"])) : De("", !0)
|
|
419
|
+
]),
|
|
420
|
+
_: 3
|
|
421
|
+
}, 16, ["as", "as-child", "data-disabled"]));
|
|
422
|
+
}
|
|
423
|
+
}), Je = /* @__PURE__ */ w({
|
|
424
|
+
__name: "NumberFieldDecrement",
|
|
425
|
+
props: {
|
|
426
|
+
disabled: { type: Boolean },
|
|
427
|
+
asChild: { type: Boolean },
|
|
428
|
+
as: { default: "button" }
|
|
429
|
+
},
|
|
430
|
+
setup(i) {
|
|
431
|
+
const t = i, e = ee(), s = S(() => {
|
|
432
|
+
var l;
|
|
433
|
+
return ((l = e.disabled) == null ? void 0 : l.value) || t.disabled || e.isDecreaseDisabled.value;
|
|
434
|
+
}), { primitiveElement: a, currentElement: n } = O(), { isPressed: d, onTrigger: o } = ve({ target: n, disabled: s });
|
|
435
|
+
return o(() => {
|
|
436
|
+
e.handleDecrease();
|
|
437
|
+
}), (l, u) => (y(), $(r(j), C(t, {
|
|
438
|
+
ref_key: "primitiveElement",
|
|
439
|
+
ref: a,
|
|
440
|
+
tabindex: "-1",
|
|
441
|
+
"aria-label": "Decrease",
|
|
442
|
+
type: l.as === "button" ? "button" : void 0,
|
|
443
|
+
style: {
|
|
444
|
+
userSelect: r(d) ? "none" : void 0
|
|
445
|
+
},
|
|
446
|
+
disabled: s.value ? "" : void 0,
|
|
447
|
+
"data-disabled": s.value ? "" : void 0,
|
|
448
|
+
"data-pressed": r(d) ? "true" : void 0,
|
|
449
|
+
onContextmenu: u[0] || (u[0] = N(() => {
|
|
450
|
+
}, ["prevent"]))
|
|
451
|
+
}), {
|
|
452
|
+
default: V(() => [
|
|
453
|
+
D(l.$slots, "default")
|
|
454
|
+
]),
|
|
455
|
+
_: 3
|
|
456
|
+
}, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
|
|
457
|
+
}
|
|
458
|
+
}), Qe = /* @__PURE__ */ w({
|
|
459
|
+
__name: "NumberFieldIncrement",
|
|
460
|
+
props: {
|
|
461
|
+
disabled: { type: Boolean },
|
|
462
|
+
asChild: { type: Boolean },
|
|
463
|
+
as: { default: "button" }
|
|
464
|
+
},
|
|
465
|
+
setup(i) {
|
|
466
|
+
const t = i, e = ee(), s = S(() => {
|
|
467
|
+
var l;
|
|
468
|
+
return ((l = e.disabled) == null ? void 0 : l.value) || t.disabled || e.isIncreaseDisabled.value;
|
|
469
|
+
}), { primitiveElement: a, currentElement: n } = O(), { isPressed: d, onTrigger: o } = ve({ target: n, disabled: s });
|
|
470
|
+
return o(() => {
|
|
471
|
+
e.handleIncrease();
|
|
472
|
+
}), (l, u) => (y(), $(r(j), C(t, {
|
|
473
|
+
ref_key: "primitiveElement",
|
|
474
|
+
ref: a,
|
|
475
|
+
tabindex: "-1",
|
|
476
|
+
"aria-label": "Increase",
|
|
477
|
+
type: l.as === "button" ? "button" : void 0,
|
|
478
|
+
style: {
|
|
479
|
+
userSelect: r(d) ? "none" : void 0
|
|
480
|
+
},
|
|
481
|
+
disabled: s.value ? "" : void 0,
|
|
482
|
+
"data-disabled": s.value ? "" : void 0,
|
|
483
|
+
"data-pressed": r(d) ? "true" : void 0,
|
|
484
|
+
onContextmenu: u[0] || (u[0] = N(() => {
|
|
485
|
+
}, ["prevent"]))
|
|
486
|
+
}), {
|
|
487
|
+
default: V(() => [
|
|
488
|
+
D(l.$slots, "default")
|
|
489
|
+
]),
|
|
490
|
+
_: 3
|
|
491
|
+
}, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
|
|
492
|
+
}
|
|
493
|
+
}), et = /* @__PURE__ */ w({
|
|
494
|
+
__name: "NumberFieldInput",
|
|
495
|
+
props: {
|
|
496
|
+
asChild: { type: Boolean },
|
|
497
|
+
as: { default: "input" }
|
|
498
|
+
},
|
|
499
|
+
setup(i) {
|
|
500
|
+
const t = i, { primitiveElement: e, currentElement: s } = O(), a = ee();
|
|
501
|
+
function n(l) {
|
|
502
|
+
a.disableWheelChange.value || l.target === Ae() && (Math.abs(l.deltaY) <= Math.abs(l.deltaX) || (l.preventDefault(), l.deltaY > 0 ? a.invertWheelChange.value ? a.handleDecrease() : a.handleIncrease() : l.deltaY < 0 && (a.invertWheelChange.value ? a.handleIncrease() : a.handleDecrease())));
|
|
503
|
+
}
|
|
504
|
+
Fe(() => {
|
|
505
|
+
a.onInputElement(s.value);
|
|
506
|
+
});
|
|
507
|
+
const d = E(a.textValue.value);
|
|
508
|
+
Pe(() => a.textValue.value, () => {
|
|
509
|
+
d.value = a.textValue.value;
|
|
510
|
+
}, { immediate: !0, deep: !0 });
|
|
511
|
+
function o() {
|
|
512
|
+
requestAnimationFrame(() => {
|
|
513
|
+
d.value = a.textValue.value;
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
return (l, u) => (y(), $(r(j), C(t, {
|
|
517
|
+
id: r(a).id.value,
|
|
518
|
+
ref_key: "primitiveElement",
|
|
519
|
+
ref: e,
|
|
520
|
+
value: d.value,
|
|
521
|
+
role: "spinbutton",
|
|
522
|
+
type: "text",
|
|
523
|
+
tabindex: "0",
|
|
524
|
+
inputmode: r(a).inputMode.value,
|
|
525
|
+
disabled: r(a).disabled.value ? "" : void 0,
|
|
526
|
+
"data-disabled": r(a).disabled.value ? "" : void 0,
|
|
527
|
+
autocomplete: "off",
|
|
528
|
+
autocorrect: "off",
|
|
529
|
+
spellcheck: "false",
|
|
530
|
+
"aria-roledescription": "Number field",
|
|
531
|
+
"aria-valuenow": r(a).modelValue.value,
|
|
532
|
+
"aria-valuemin": r(a).min.value,
|
|
533
|
+
"aria-valuemax": r(a).max.value,
|
|
534
|
+
onKeydown: [
|
|
535
|
+
u[0] || (u[0] = P(N((f) => r(a).handleIncrease(), ["prevent"]), ["up"])),
|
|
536
|
+
u[1] || (u[1] = P(N((f) => r(a).handleDecrease(), ["prevent"]), ["down"])),
|
|
537
|
+
u[2] || (u[2] = P(N((f) => r(a).handleIncrease(10), ["prevent"]), ["page-up"])),
|
|
538
|
+
u[3] || (u[3] = P(N((f) => r(a).handleDecrease(10), ["prevent"]), ["page-down"])),
|
|
539
|
+
u[4] || (u[4] = P(N((f) => r(a).handleMinMaxValue("min"), ["prevent"]), ["home"])),
|
|
540
|
+
u[5] || (u[5] = P(N((f) => r(a).handleMinMaxValue("max"), ["prevent"]), ["end"])),
|
|
541
|
+
u[8] || (u[8] = P((f) => {
|
|
542
|
+
var b;
|
|
543
|
+
return r(a).applyInputValue((b = f.target) == null ? void 0 : b.value);
|
|
544
|
+
}, ["enter"]))
|
|
545
|
+
],
|
|
546
|
+
onWheel: n,
|
|
547
|
+
onBeforeinput: u[6] || (u[6] = (f) => {
|
|
548
|
+
const b = f.target;
|
|
549
|
+
let g = b.value.slice(0, b.selectionStart ?? void 0) + (f.data ?? "") + b.value.slice(b.selectionEnd ?? void 0);
|
|
550
|
+
r(a).validate(g) || f.preventDefault();
|
|
551
|
+
}),
|
|
552
|
+
onInput: u[7] || (u[7] = (f) => {
|
|
553
|
+
const b = f.target;
|
|
554
|
+
d.value = b.value;
|
|
555
|
+
}),
|
|
556
|
+
onChange: o,
|
|
557
|
+
onBlur: u[9] || (u[9] = (f) => {
|
|
558
|
+
var b;
|
|
559
|
+
return r(a).applyInputValue((b = f.target) == null ? void 0 : b.value);
|
|
560
|
+
})
|
|
561
|
+
}), {
|
|
562
|
+
default: V(() => [
|
|
563
|
+
D(l.$slots, "default")
|
|
564
|
+
]),
|
|
565
|
+
_: 3
|
|
566
|
+
}, 16, ["id", "value", "inputmode", "disabled", "data-disabled", "aria-valuenow", "aria-valuemin", "aria-valuemax"]));
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
/**
|
|
570
|
+
* @license lucide-vue-next v0.514.0 - ISC
|
|
571
|
+
*
|
|
572
|
+
* This source code is licensed under the ISC license.
|
|
573
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
574
|
+
*/
|
|
575
|
+
const tt = je("minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]), vt = /* @__PURE__ */ w({
|
|
576
|
+
__name: "NumberField",
|
|
577
|
+
props: {
|
|
578
|
+
defaultValue: {},
|
|
579
|
+
modelValue: {},
|
|
580
|
+
min: {},
|
|
581
|
+
max: {},
|
|
582
|
+
step: {},
|
|
583
|
+
stepSnapping: { type: Boolean },
|
|
584
|
+
formatOptions: {},
|
|
585
|
+
locale: {},
|
|
586
|
+
disabled: { type: Boolean },
|
|
587
|
+
disableWheelChange: { type: Boolean },
|
|
588
|
+
invertWheelChange: { type: Boolean },
|
|
589
|
+
id: {},
|
|
590
|
+
asChild: { type: Boolean },
|
|
591
|
+
as: { type: [String, Object, Function] },
|
|
592
|
+
name: {},
|
|
593
|
+
required: { type: Boolean },
|
|
594
|
+
class: {}
|
|
595
|
+
},
|
|
596
|
+
emits: ["update:modelValue"],
|
|
597
|
+
setup(i, { emit: t }) {
|
|
598
|
+
const e = i, s = t, a = Q(e, "class"), n = Ce(a, s);
|
|
599
|
+
return (d, o) => (y(), $(r(Xe), C(r(n), {
|
|
600
|
+
class: r(B)("grid gap-1.5", e.class)
|
|
601
|
+
}), {
|
|
602
|
+
default: V(() => [
|
|
603
|
+
D(d.$slots, "default")
|
|
604
|
+
]),
|
|
605
|
+
_: 3
|
|
606
|
+
}, 16, ["class"]));
|
|
607
|
+
}
|
|
608
|
+
}), yt = /* @__PURE__ */ w({
|
|
609
|
+
__name: "NumberFieldContent",
|
|
610
|
+
props: {
|
|
611
|
+
class: {}
|
|
612
|
+
},
|
|
613
|
+
setup(i) {
|
|
614
|
+
const t = i;
|
|
615
|
+
return (e, s) => (y(), Se("div", {
|
|
616
|
+
class: me(r(B)("relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5", t.class))
|
|
617
|
+
}, [
|
|
618
|
+
D(e.$slots, "default")
|
|
619
|
+
], 2));
|
|
620
|
+
}
|
|
621
|
+
}), $t = /* @__PURE__ */ w({
|
|
622
|
+
__name: "NumberFieldDecrement",
|
|
623
|
+
props: {
|
|
624
|
+
disabled: { type: Boolean },
|
|
625
|
+
asChild: { type: Boolean },
|
|
626
|
+
as: { type: [String, Object, Function] },
|
|
627
|
+
class: {}
|
|
628
|
+
},
|
|
629
|
+
setup(i) {
|
|
630
|
+
const t = i, e = Q(t, "class"), s = pe(e);
|
|
631
|
+
return (a, n) => (y(), $(r(Je), C({ "data-slot": "decrement" }, r(s), {
|
|
632
|
+
class: r(B)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20", t.class)
|
|
633
|
+
}), {
|
|
634
|
+
default: V(() => [
|
|
635
|
+
D(a.$slots, "default", {}, () => [
|
|
636
|
+
ce(r(tt), { class: "h-4 w-4" })
|
|
637
|
+
])
|
|
638
|
+
]),
|
|
639
|
+
_: 3
|
|
640
|
+
}, 16, ["class"]));
|
|
641
|
+
}
|
|
642
|
+
}), wt = /* @__PURE__ */ w({
|
|
643
|
+
__name: "NumberFieldIncrement",
|
|
644
|
+
props: {
|
|
645
|
+
disabled: { type: Boolean },
|
|
646
|
+
asChild: { type: Boolean },
|
|
647
|
+
as: { type: [String, Object, Function] },
|
|
648
|
+
class: {}
|
|
649
|
+
},
|
|
650
|
+
setup(i) {
|
|
651
|
+
const t = i, e = Q(t, "class"), s = pe(e);
|
|
652
|
+
return (a, n) => (y(), $(r(Qe), C({ "data-slot": "increment" }, r(s), {
|
|
653
|
+
class: r(B)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3", t.class)
|
|
654
|
+
}), {
|
|
655
|
+
default: V(() => [
|
|
656
|
+
D(a.$slots, "default", {}, () => [
|
|
657
|
+
ce(r(ke), { class: "h-4 w-4" })
|
|
658
|
+
])
|
|
659
|
+
]),
|
|
660
|
+
_: 3
|
|
661
|
+
}, 16, ["class"]));
|
|
662
|
+
}
|
|
663
|
+
}), xt = /* @__PURE__ */ w({
|
|
664
|
+
__name: "NumberFieldInput",
|
|
665
|
+
props: {
|
|
666
|
+
class: {}
|
|
667
|
+
},
|
|
668
|
+
setup(i) {
|
|
669
|
+
const t = i;
|
|
670
|
+
return (e, s) => (y(), $(r(et), {
|
|
671
|
+
"data-slot": "input",
|
|
672
|
+
class: me(r(B)("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", t.class))
|
|
673
|
+
}, null, 8, ["class"]));
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
export {
|
|
677
|
+
vt as NumberField,
|
|
678
|
+
yt as NumberFieldContent,
|
|
679
|
+
$t as NumberFieldDecrement,
|
|
680
|
+
wt as NumberFieldIncrement,
|
|
681
|
+
xt as NumberFieldInput
|
|
682
|
+
};
|