@youcan/celeste 0.6.49 → 0.6.51
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/celeste.css +354 -141
- package/dist/cjs/checkbox-card.js +1 -1
- package/dist/cjs/chunks/counter-input.vue_vue_type_style_index_0_lang.js +70 -0
- package/dist/cjs/chunks/index.js +684 -0
- package/dist/cjs/counter-input.js +3 -0
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/modal-header.js +1 -1
- package/dist/cjs/popover-content.js +1 -1
- package/dist/cjs/radio-group-card.js +110 -0
- package/dist/cjs/radio-group-label.js +109 -0
- package/dist/components/counter-input/counter-input.d.ts +17 -0
- package/dist/components/counter-input/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/radio-group/index.d.ts +4 -0
- package/dist/components/radio-group/radio-group-card.d.ts +34 -0
- package/dist/components/radio-group/radio-group-label.d.ts +29 -0
- package/dist/es/button.js +1 -1
- package/dist/es/checkbox-card.js +2 -2
- package/dist/es/checkbox-label.js +1 -1
- package/dist/es/chunks/counter-input.vue_vue_type_style_index_0_lang.js +71 -0
- package/dist/es/chunks/index.js +754 -70
- package/dist/es/chunks/index3.js +1 -1
- package/dist/es/chunks/radio-group-item.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/es/chunks/switch.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/es/combobox-group.js +1 -1
- package/dist/es/combobox-input.js +1 -1
- package/dist/es/combobox-item.js +1 -1
- package/dist/es/combobox-list.js +1 -1
- package/dist/es/combobox-root.js +1 -1
- package/dist/es/combobox-separator.js +1 -1
- package/dist/es/combobox-trigger.js +1 -1
- package/dist/es/command-group.js +1 -1
- package/dist/es/command-input.js +1 -1
- package/dist/es/command-item.js +1 -1
- package/dist/es/command-list.js +1 -1
- package/dist/es/command-root.js +1 -1
- package/dist/es/command-separator.js +1 -1
- package/dist/es/compact-button.js +1 -1
- package/dist/es/context-menu-item.js +1 -1
- package/dist/es/counter-input.js +4 -0
- package/dist/es/digit-input-group.js +1 -1
- package/dist/es/digit-input-slot.js +1 -1
- package/dist/es/digit-input.js +1 -1
- package/dist/es/dropdown-menu-content.js +1 -1
- package/dist/es/dropdown-menu-group.js +1 -1
- package/dist/es/dropdown-menu-item.js +1 -1
- package/dist/es/dropdown-menu-label.js +1 -1
- package/dist/es/dropdown-menu-separator.js +1 -1
- package/dist/es/dropdown-menu-sub-content.js +1 -1
- package/dist/es/dropdown-menu-sub-trigger.js +1 -1
- package/dist/es/dropdown-menu-trigger.js +1 -1
- package/dist/es/dropdown-menu.js +1 -1
- package/dist/es/dropdown.js +1 -1
- package/dist/es/fancy-button.js +1 -1
- package/dist/es/index.js +48 -39
- package/dist/es/label.js +1 -1
- package/dist/es/link-button.js +1 -1
- package/dist/es/modal-content.js +1 -1
- package/dist/es/modal-header.js +2 -2
- package/dist/es/popover-content.js +2 -2
- package/dist/es/popover-trigger.js +1 -1
- package/dist/es/progress-bar.js +1 -1
- package/dist/es/progress-circle.js +1 -1
- package/dist/es/radio-group-card.js +111 -0
- package/dist/es/radio-group-label.js +110 -0
- package/dist/es/scroll-bar.js +1 -1
- package/dist/es/segmented-control-item.js +1 -1
- package/dist/es/segmented-control.js +1 -1
- package/dist/es/select-content.js +1 -1
- package/dist/es/select-item.js +1 -1
- package/dist/es/select-trigger.js +1 -1
- package/dist/es/select-value.js +1 -1
- package/dist/es/social-button.js +1 -1
- package/dist/es/tab-menu-content.js +1 -1
- package/dist/es/tab-menu-item.js +1 -1
- package/dist/es/tab-menu-list.js +1 -1
- package/dist/es/tab-menu.js +1 -1
- package/dist/es/tag.js +1 -1
- package/dist/es/text-input.js +1 -1
- package/dist/es/tooltip.js +1 -1
- package/package.json +3 -3
- package/src/components/checkbox/checkbox-card.vue +1 -0
- package/src/components/counter-input/counter-input.vue +131 -0
- package/src/components/counter-input/index.ts +2 -0
- package/src/components/counter-input/stories/counter-input.stories.ts +149 -0
- package/src/components/digit-input/stories/digit-input.stories.ts +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/modal/modal-header.vue +1 -1
- package/src/components/popover/popover-content.vue +1 -1
- package/src/components/popover/stories/popover.stories.ts +46 -0
- package/src/components/radio-group/index.ts +6 -0
- package/src/components/radio-group/radio-group-card.vue +221 -0
- package/src/components/radio-group/radio-group-label.vue +108 -0
- package/src/components/radio-group/stories/radio-group-card.stories.ts +297 -0
- package/src/components/radio-group/stories/radio-group.stories.ts +25 -15
- package/src/components/text-input/stories/text-input.stories.ts +1 -1
package/dist/es/chunks/index.js
CHANGED
|
@@ -1947,6 +1947,351 @@ function useFloating(reference, floating, options) {
|
|
|
1947
1947
|
update
|
|
1948
1948
|
};
|
|
1949
1949
|
}
|
|
1950
|
+
let $488c6ddbf4ef74c2$var$formatterCache = /* @__PURE__ */ new Map();
|
|
1951
|
+
let $488c6ddbf4ef74c2$var$supportsSignDisplay = false;
|
|
1952
|
+
try {
|
|
1953
|
+
$488c6ddbf4ef74c2$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", {
|
|
1954
|
+
signDisplay: "exceptZero"
|
|
1955
|
+
}).resolvedOptions().signDisplay === "exceptZero";
|
|
1956
|
+
} catch {
|
|
1957
|
+
}
|
|
1958
|
+
let $488c6ddbf4ef74c2$var$supportsUnit = false;
|
|
1959
|
+
try {
|
|
1960
|
+
$488c6ddbf4ef74c2$var$supportsUnit = new Intl.NumberFormat("de-DE", {
|
|
1961
|
+
style: "unit",
|
|
1962
|
+
unit: "degree"
|
|
1963
|
+
}).resolvedOptions().style === "unit";
|
|
1964
|
+
} catch {
|
|
1965
|
+
}
|
|
1966
|
+
const $488c6ddbf4ef74c2$var$UNITS = {
|
|
1967
|
+
degree: {
|
|
1968
|
+
narrow: {
|
|
1969
|
+
default: "°",
|
|
1970
|
+
"ja-JP": " 度",
|
|
1971
|
+
"zh-TW": "度",
|
|
1972
|
+
"sl-SI": " °"
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
};
|
|
1976
|
+
class $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 {
|
|
1977
|
+
/** Formats a number value as a string, according to the locale and options provided to the constructor. */
|
|
1978
|
+
format(value) {
|
|
1979
|
+
let res = "";
|
|
1980
|
+
if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null) res = $488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
|
|
1981
|
+
else res = this.numberFormatter.format(value);
|
|
1982
|
+
if (this.options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
|
|
1983
|
+
var _UNITS_unit;
|
|
1984
|
+
let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
|
|
1985
|
+
if (!unit) return res;
|
|
1986
|
+
let values = (_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay];
|
|
1987
|
+
res += values[locale] || values.default;
|
|
1988
|
+
}
|
|
1989
|
+
return res;
|
|
1990
|
+
}
|
|
1991
|
+
/** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
|
|
1992
|
+
formatToParts(value) {
|
|
1993
|
+
return this.numberFormatter.formatToParts(value);
|
|
1994
|
+
}
|
|
1995
|
+
/** Formats a number range as a string. */
|
|
1996
|
+
formatRange(start, end) {
|
|
1997
|
+
if (typeof this.numberFormatter.formatRange === "function") return this.numberFormatter.formatRange(start, end);
|
|
1998
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
1999
|
+
return `${this.format(start)} – ${this.format(end)}`;
|
|
2000
|
+
}
|
|
2001
|
+
/** Formats a number range as an array of parts. */
|
|
2002
|
+
formatRangeToParts(start, end) {
|
|
2003
|
+
if (typeof this.numberFormatter.formatRangeToParts === "function") return this.numberFormatter.formatRangeToParts(start, end);
|
|
2004
|
+
if (end < start) throw new RangeError("End date must be >= start date");
|
|
2005
|
+
let startParts = this.numberFormatter.formatToParts(start);
|
|
2006
|
+
let endParts = this.numberFormatter.formatToParts(end);
|
|
2007
|
+
return [
|
|
2008
|
+
...startParts.map((p) => ({
|
|
2009
|
+
...p,
|
|
2010
|
+
source: "startRange"
|
|
2011
|
+
})),
|
|
2012
|
+
{
|
|
2013
|
+
type: "literal",
|
|
2014
|
+
value: " – ",
|
|
2015
|
+
source: "shared"
|
|
2016
|
+
},
|
|
2017
|
+
...endParts.map((p) => ({
|
|
2018
|
+
...p,
|
|
2019
|
+
source: "endRange"
|
|
2020
|
+
}))
|
|
2021
|
+
];
|
|
2022
|
+
}
|
|
2023
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
2024
|
+
resolvedOptions() {
|
|
2025
|
+
let options = this.numberFormatter.resolvedOptions();
|
|
2026
|
+
if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null) options = {
|
|
2027
|
+
...options,
|
|
2028
|
+
signDisplay: this.options.signDisplay
|
|
2029
|
+
};
|
|
2030
|
+
if (!$488c6ddbf4ef74c2$var$supportsUnit && this.options.style === "unit") options = {
|
|
2031
|
+
...options,
|
|
2032
|
+
style: "unit",
|
|
2033
|
+
unit: this.options.unit,
|
|
2034
|
+
unitDisplay: this.options.unitDisplay
|
|
2035
|
+
};
|
|
2036
|
+
return options;
|
|
2037
|
+
}
|
|
2038
|
+
constructor(locale, options = {}) {
|
|
2039
|
+
this.numberFormatter = $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options);
|
|
2040
|
+
this.options = options;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options = {}) {
|
|
2044
|
+
let { numberingSystem } = options;
|
|
2045
|
+
if (numberingSystem && locale.includes("-nu-")) {
|
|
2046
|
+
if (!locale.includes("-u-")) locale += "-u-";
|
|
2047
|
+
locale += `-nu-${numberingSystem}`;
|
|
2048
|
+
}
|
|
2049
|
+
if (options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
|
|
2050
|
+
var _UNITS_unit;
|
|
2051
|
+
let { unit, unitDisplay = "short" } = options;
|
|
2052
|
+
if (!unit) throw new Error('unit option must be provided with style: "unit"');
|
|
2053
|
+
if (!((_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay])) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
|
|
2054
|
+
options = {
|
|
2055
|
+
...options,
|
|
2056
|
+
style: "decimal"
|
|
2057
|
+
};
|
|
2058
|
+
}
|
|
2059
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a2, b) => a2[0] < b[0] ? -1 : 1).join() : "");
|
|
2060
|
+
if ($488c6ddbf4ef74c2$var$formatterCache.has(cacheKey)) return $488c6ddbf4ef74c2$var$formatterCache.get(cacheKey);
|
|
2061
|
+
let numberFormatter = new Intl.NumberFormat(locale, options);
|
|
2062
|
+
$488c6ddbf4ef74c2$var$formatterCache.set(cacheKey, numberFormatter);
|
|
2063
|
+
return numberFormatter;
|
|
2064
|
+
}
|
|
2065
|
+
function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
|
|
2066
|
+
if (signDisplay === "auto") return numberFormat.format(num);
|
|
2067
|
+
else if (signDisplay === "never") return numberFormat.format(Math.abs(num));
|
|
2068
|
+
else {
|
|
2069
|
+
let needsPositiveSign = false;
|
|
2070
|
+
if (signDisplay === "always") needsPositiveSign = num > 0 || Object.is(num, 0);
|
|
2071
|
+
else if (signDisplay === "exceptZero") {
|
|
2072
|
+
if (Object.is(num, -0) || Object.is(num, 0)) num = Math.abs(num);
|
|
2073
|
+
else needsPositiveSign = num > 0;
|
|
2074
|
+
}
|
|
2075
|
+
if (needsPositiveSign) {
|
|
2076
|
+
let negative = numberFormat.format(-num);
|
|
2077
|
+
let noSign = numberFormat.format(num);
|
|
2078
|
+
let minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
|
|
2079
|
+
if ([
|
|
2080
|
+
...minus
|
|
2081
|
+
].length !== 1) console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case");
|
|
2082
|
+
let positive = negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
|
|
2083
|
+
return positive;
|
|
2084
|
+
} else return numberFormat.format(num);
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX = new RegExp("^.*\\(.*\\).*$");
|
|
2088
|
+
const $6c7bd7858deea686$var$NUMBERING_SYSTEMS = [
|
|
2089
|
+
"latn",
|
|
2090
|
+
"arab",
|
|
2091
|
+
"hanidec",
|
|
2092
|
+
"deva",
|
|
2093
|
+
"beng"
|
|
2094
|
+
];
|
|
2095
|
+
class $6c7bd7858deea686$export$cd11ab140839f11d {
|
|
2096
|
+
/**
|
|
2097
|
+
* Parses the given string to a number. Returns NaN if a valid number could not be parsed.
|
|
2098
|
+
*/
|
|
2099
|
+
parse(value) {
|
|
2100
|
+
return $6c7bd7858deea686$var$getNumberParserImpl(this.locale, this.options, value).parse(value);
|
|
2101
|
+
}
|
|
2102
|
+
/**
|
|
2103
|
+
* Returns whether the given string could potentially be a valid number. This should be used to
|
|
2104
|
+
* validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity
|
|
2105
|
+
* of the minus/plus sign characters can be checked.
|
|
2106
|
+
*/
|
|
2107
|
+
isValidPartialNumber(value, minValue, maxValue) {
|
|
2108
|
+
return $6c7bd7858deea686$var$getNumberParserImpl(this.locale, this.options, value).isValidPartialNumber(value, minValue, maxValue);
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* Returns a numbering system for which the given string is valid in the current locale.
|
|
2112
|
+
* If no numbering system could be detected, the default numbering system for the current
|
|
2113
|
+
* locale is returned.
|
|
2114
|
+
*/
|
|
2115
|
+
getNumberingSystem(value) {
|
|
2116
|
+
return $6c7bd7858deea686$var$getNumberParserImpl(this.locale, this.options, value).options.numberingSystem;
|
|
2117
|
+
}
|
|
2118
|
+
constructor(locale, options = {}) {
|
|
2119
|
+
this.locale = locale;
|
|
2120
|
+
this.options = options;
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
const $6c7bd7858deea686$var$numberParserCache = /* @__PURE__ */ new Map();
|
|
2124
|
+
function $6c7bd7858deea686$var$getNumberParserImpl(locale, options, value) {
|
|
2125
|
+
let defaultParser = $6c7bd7858deea686$var$getCachedNumberParser(locale, options);
|
|
2126
|
+
if (!locale.includes("-nu-") && !defaultParser.isValidPartialNumber(value)) {
|
|
2127
|
+
for (let numberingSystem of $6c7bd7858deea686$var$NUMBERING_SYSTEMS) if (numberingSystem !== defaultParser.options.numberingSystem) {
|
|
2128
|
+
let parser = $6c7bd7858deea686$var$getCachedNumberParser(locale + (locale.includes("-u-") ? "-nu-" : "-u-nu-") + numberingSystem, options);
|
|
2129
|
+
if (parser.isValidPartialNumber(value)) return parser;
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
return defaultParser;
|
|
2133
|
+
}
|
|
2134
|
+
function $6c7bd7858deea686$var$getCachedNumberParser(locale, options) {
|
|
2135
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a2, b) => a2[0] < b[0] ? -1 : 1).join() : "");
|
|
2136
|
+
let parser = $6c7bd7858deea686$var$numberParserCache.get(cacheKey);
|
|
2137
|
+
if (!parser) {
|
|
2138
|
+
parser = new $6c7bd7858deea686$var$NumberParserImpl(locale, options);
|
|
2139
|
+
$6c7bd7858deea686$var$numberParserCache.set(cacheKey, parser);
|
|
2140
|
+
}
|
|
2141
|
+
return parser;
|
|
2142
|
+
}
|
|
2143
|
+
class $6c7bd7858deea686$var$NumberParserImpl {
|
|
2144
|
+
parse(value) {
|
|
2145
|
+
let fullySanitizedValue = this.sanitize(value);
|
|
2146
|
+
if (this.symbols.group)
|
|
2147
|
+
fullySanitizedValue = $6c7bd7858deea686$var$replaceAll(fullySanitizedValue, this.symbols.group, "");
|
|
2148
|
+
if (this.symbols.decimal) fullySanitizedValue = fullySanitizedValue.replace(this.symbols.decimal, ".");
|
|
2149
|
+
if (this.symbols.minusSign) fullySanitizedValue = fullySanitizedValue.replace(this.symbols.minusSign, "-");
|
|
2150
|
+
fullySanitizedValue = fullySanitizedValue.replace(this.symbols.numeral, this.symbols.index);
|
|
2151
|
+
if (this.options.style === "percent") {
|
|
2152
|
+
let isNegative = fullySanitizedValue.indexOf("-");
|
|
2153
|
+
fullySanitizedValue = fullySanitizedValue.replace("-", "");
|
|
2154
|
+
let index = fullySanitizedValue.indexOf(".");
|
|
2155
|
+
if (index === -1) index = fullySanitizedValue.length;
|
|
2156
|
+
fullySanitizedValue = fullySanitizedValue.replace(".", "");
|
|
2157
|
+
if (index - 2 === 0) fullySanitizedValue = `0.${fullySanitizedValue}`;
|
|
2158
|
+
else if (index - 2 === -1) fullySanitizedValue = `0.0${fullySanitizedValue}`;
|
|
2159
|
+
else if (index - 2 === -2) fullySanitizedValue = "0.00";
|
|
2160
|
+
else fullySanitizedValue = `${fullySanitizedValue.slice(0, index - 2)}.${fullySanitizedValue.slice(index - 2)}`;
|
|
2161
|
+
if (isNegative > -1) fullySanitizedValue = `-${fullySanitizedValue}`;
|
|
2162
|
+
}
|
|
2163
|
+
let newValue = fullySanitizedValue ? +fullySanitizedValue : NaN;
|
|
2164
|
+
if (isNaN(newValue)) return NaN;
|
|
2165
|
+
if (this.options.style === "percent") {
|
|
2166
|
+
var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
|
|
2167
|
+
let options = {
|
|
2168
|
+
...this.options,
|
|
2169
|
+
style: "decimal",
|
|
2170
|
+
minimumFractionDigits: Math.min(((_this_options_minimumFractionDigits = this.options.minimumFractionDigits) !== null && _this_options_minimumFractionDigits !== void 0 ? _this_options_minimumFractionDigits : 0) + 2, 20),
|
|
2171
|
+
maximumFractionDigits: Math.min(((_this_options_maximumFractionDigits = this.options.maximumFractionDigits) !== null && _this_options_maximumFractionDigits !== void 0 ? _this_options_maximumFractionDigits : 0) + 2, 20)
|
|
2172
|
+
};
|
|
2173
|
+
return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale, options).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale, options).format(newValue));
|
|
2174
|
+
}
|
|
2175
|
+
if (this.options.currencySign === "accounting" && $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(value)) newValue = -1 * newValue;
|
|
2176
|
+
return newValue;
|
|
2177
|
+
}
|
|
2178
|
+
sanitize(value) {
|
|
2179
|
+
value = value.replace(this.symbols.literals, "");
|
|
2180
|
+
if (this.symbols.minusSign) value = value.replace("-", this.symbols.minusSign);
|
|
2181
|
+
if (this.options.numberingSystem === "arab") {
|
|
2182
|
+
if (this.symbols.decimal) {
|
|
2183
|
+
value = value.replace(",", this.symbols.decimal);
|
|
2184
|
+
value = value.replace(String.fromCharCode(1548), this.symbols.decimal);
|
|
2185
|
+
}
|
|
2186
|
+
if (this.symbols.group) value = $6c7bd7858deea686$var$replaceAll(value, ".", this.symbols.group);
|
|
2187
|
+
}
|
|
2188
|
+
if (this.options.locale === "fr-FR") value = $6c7bd7858deea686$var$replaceAll(value, ".", String.fromCharCode(8239));
|
|
2189
|
+
return value;
|
|
2190
|
+
}
|
|
2191
|
+
isValidPartialNumber(value, minValue = -Infinity, maxValue = Infinity) {
|
|
2192
|
+
value = this.sanitize(value);
|
|
2193
|
+
if (this.symbols.minusSign && value.startsWith(this.symbols.minusSign) && minValue < 0) value = value.slice(this.symbols.minusSign.length);
|
|
2194
|
+
else if (this.symbols.plusSign && value.startsWith(this.symbols.plusSign) && maxValue > 0) value = value.slice(this.symbols.plusSign.length);
|
|
2195
|
+
if (this.symbols.group && value.startsWith(this.symbols.group)) return false;
|
|
2196
|
+
if (this.symbols.decimal && value.indexOf(this.symbols.decimal) > -1 && this.options.maximumFractionDigits === 0) return false;
|
|
2197
|
+
if (this.symbols.group) value = $6c7bd7858deea686$var$replaceAll(value, this.symbols.group, "");
|
|
2198
|
+
value = value.replace(this.symbols.numeral, "");
|
|
2199
|
+
if (this.symbols.decimal) value = value.replace(this.symbols.decimal, "");
|
|
2200
|
+
return value.length === 0;
|
|
2201
|
+
}
|
|
2202
|
+
constructor(locale, options = {}) {
|
|
2203
|
+
this.locale = locale;
|
|
2204
|
+
this.formatter = new Intl.NumberFormat(locale, options);
|
|
2205
|
+
this.options = this.formatter.resolvedOptions();
|
|
2206
|
+
this.symbols = $6c7bd7858deea686$var$getSymbols(locale, this.formatter, this.options, options);
|
|
2207
|
+
var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
|
|
2208
|
+
if (this.options.style === "percent" && (((_this_options_minimumFractionDigits = this.options.minimumFractionDigits) !== null && _this_options_minimumFractionDigits !== void 0 ? _this_options_minimumFractionDigits : 0) > 18 || ((_this_options_maximumFractionDigits = this.options.maximumFractionDigits) !== null && _this_options_maximumFractionDigits !== void 0 ? _this_options_maximumFractionDigits : 0) > 18)) console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
const $6c7bd7858deea686$var$nonLiteralParts = /* @__PURE__ */ new Set([
|
|
2212
|
+
"decimal",
|
|
2213
|
+
"fraction",
|
|
2214
|
+
"integer",
|
|
2215
|
+
"minusSign",
|
|
2216
|
+
"plusSign",
|
|
2217
|
+
"group"
|
|
2218
|
+
]);
|
|
2219
|
+
const $6c7bd7858deea686$var$pluralNumbers = [
|
|
2220
|
+
0,
|
|
2221
|
+
4,
|
|
2222
|
+
2,
|
|
2223
|
+
1,
|
|
2224
|
+
11,
|
|
2225
|
+
20,
|
|
2226
|
+
3,
|
|
2227
|
+
7,
|
|
2228
|
+
100,
|
|
2229
|
+
21,
|
|
2230
|
+
0.1,
|
|
2231
|
+
1.1
|
|
2232
|
+
];
|
|
2233
|
+
function $6c7bd7858deea686$var$getSymbols(locale, formatter, intlOptions, originalOptions) {
|
|
2234
|
+
var _allParts_find, _posAllParts_find, _decimalParts_find, _allParts_find1;
|
|
2235
|
+
let symbolFormatter = new Intl.NumberFormat(locale, {
|
|
2236
|
+
...intlOptions,
|
|
2237
|
+
// Resets so we get the full range of symbols
|
|
2238
|
+
minimumSignificantDigits: 1,
|
|
2239
|
+
maximumSignificantDigits: 21,
|
|
2240
|
+
roundingIncrement: 1,
|
|
2241
|
+
roundingPriority: "auto",
|
|
2242
|
+
roundingMode: "halfExpand"
|
|
2243
|
+
});
|
|
2244
|
+
let allParts = symbolFormatter.formatToParts(-10000.111);
|
|
2245
|
+
let posAllParts = symbolFormatter.formatToParts(10000.111);
|
|
2246
|
+
let pluralParts = $6c7bd7858deea686$var$pluralNumbers.map((n) => symbolFormatter.formatToParts(n));
|
|
2247
|
+
var _allParts_find_value;
|
|
2248
|
+
let minusSign = (_allParts_find_value = (_allParts_find = allParts.find((p) => p.type === "minusSign")) === null || _allParts_find === void 0 ? void 0 : _allParts_find.value) !== null && _allParts_find_value !== void 0 ? _allParts_find_value : "-";
|
|
2249
|
+
let plusSign = (_posAllParts_find = posAllParts.find((p) => p.type === "plusSign")) === null || _posAllParts_find === void 0 ? void 0 : _posAllParts_find.value;
|
|
2250
|
+
if (!plusSign && ((originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === "exceptZero" || (originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === "always")) plusSign = "+";
|
|
2251
|
+
let decimalParts = new Intl.NumberFormat(locale, {
|
|
2252
|
+
...intlOptions,
|
|
2253
|
+
minimumFractionDigits: 2,
|
|
2254
|
+
maximumFractionDigits: 2
|
|
2255
|
+
}).formatToParts(1e-3);
|
|
2256
|
+
let decimal = (_decimalParts_find = decimalParts.find((p) => p.type === "decimal")) === null || _decimalParts_find === void 0 ? void 0 : _decimalParts_find.value;
|
|
2257
|
+
let group = (_allParts_find1 = allParts.find((p) => p.type === "group")) === null || _allParts_find1 === void 0 ? void 0 : _allParts_find1.value;
|
|
2258
|
+
let allPartsLiterals = allParts.filter((p) => !$6c7bd7858deea686$var$nonLiteralParts.has(p.type)).map((p) => $6c7bd7858deea686$var$escapeRegex(p.value));
|
|
2259
|
+
let pluralPartsLiterals = pluralParts.flatMap((p) => p.filter((p2) => !$6c7bd7858deea686$var$nonLiteralParts.has(p2.type)).map((p2) => $6c7bd7858deea686$var$escapeRegex(p2.value)));
|
|
2260
|
+
let sortedLiterals = [
|
|
2261
|
+
.../* @__PURE__ */ new Set([
|
|
2262
|
+
...allPartsLiterals,
|
|
2263
|
+
...pluralPartsLiterals
|
|
2264
|
+
])
|
|
2265
|
+
].sort((a2, b) => b.length - a2.length);
|
|
2266
|
+
let literals = sortedLiterals.length === 0 ? new RegExp("[\\p{White_Space}]", "gu") : new RegExp(`${sortedLiterals.join("|")}|[\\p{White_Space}]`, "gu");
|
|
2267
|
+
let numerals = [
|
|
2268
|
+
...new Intl.NumberFormat(intlOptions.locale, {
|
|
2269
|
+
useGrouping: false
|
|
2270
|
+
}).format(9876543210)
|
|
2271
|
+
].reverse();
|
|
2272
|
+
let indexes = new Map(numerals.map((d, i) => [
|
|
2273
|
+
d,
|
|
2274
|
+
i
|
|
2275
|
+
]));
|
|
2276
|
+
let numeral = new RegExp(`[${numerals.join("")}]`, "g");
|
|
2277
|
+
let index = (d) => String(indexes.get(d));
|
|
2278
|
+
return {
|
|
2279
|
+
minusSign,
|
|
2280
|
+
plusSign,
|
|
2281
|
+
decimal,
|
|
2282
|
+
group,
|
|
2283
|
+
literals,
|
|
2284
|
+
numeral,
|
|
2285
|
+
index
|
|
2286
|
+
};
|
|
2287
|
+
}
|
|
2288
|
+
function $6c7bd7858deea686$var$replaceAll(str, find, replace) {
|
|
2289
|
+
if (str.replaceAll) return str.replaceAll(find, replace);
|
|
2290
|
+
return str.split(find).join(replace);
|
|
2291
|
+
}
|
|
2292
|
+
function $6c7bd7858deea686$var$escapeRegex(string) {
|
|
2293
|
+
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2294
|
+
}
|
|
1950
2295
|
function Q(a2, t) {
|
|
1951
2296
|
const e = typeof a2 == "string" && !t ? `${a2}Context` : t, n = Symbol(e);
|
|
1952
2297
|
return [(r) => {
|
|
@@ -1971,6 +2316,21 @@ function Wt(a2, t, e) {
|
|
|
1971
2316
|
function jt(a2, t = Number.NEGATIVE_INFINITY, e = Number.POSITIVE_INFINITY) {
|
|
1972
2317
|
return Math.min(e, Math.max(t, a2));
|
|
1973
2318
|
}
|
|
2319
|
+
function Ea(a2, t) {
|
|
2320
|
+
let e = a2;
|
|
2321
|
+
const n = t.toString(), l = n.indexOf("."), s = l >= 0 ? n.length - l : 0;
|
|
2322
|
+
if (s > 0) {
|
|
2323
|
+
const r = 10 ** s;
|
|
2324
|
+
e = Math.round(e * r) / r;
|
|
2325
|
+
}
|
|
2326
|
+
return e;
|
|
2327
|
+
}
|
|
2328
|
+
function zr(a2, t, e, n) {
|
|
2329
|
+
t = Number(t), e = Number(e);
|
|
2330
|
+
const l = (a2 - (Number.isNaN(t) ? 0 : t)) % n;
|
|
2331
|
+
let s = Ea(Math.abs(l) * 2 >= n ? a2 + Math.sign(l) * (n - Math.abs(l)) : a2 - l, n);
|
|
2332
|
+
return Number.isNaN(t) ? !Number.isNaN(e) && s > e && (s = Math.floor(Ea(e / n, n)) * n) : s < t ? s = t : !Number.isNaN(e) && s > e && (s = t + Math.floor(Ea((e - t) / n, n)) * n), s = Ea(s, n), s;
|
|
2333
|
+
}
|
|
1974
2334
|
function Kr(a2) {
|
|
1975
2335
|
return a2.__esModule && Object.prototype.hasOwnProperty.call(a2, "default") ? a2.default : a2;
|
|
1976
2336
|
}
|
|
@@ -2047,6 +2407,37 @@ function Sl(a2) {
|
|
|
2047
2407
|
function Ke(a2) {
|
|
2048
2408
|
return typeof a2 == "function" ? a2() : unref(a2);
|
|
2049
2409
|
}
|
|
2410
|
+
function ni(a2) {
|
|
2411
|
+
if (!isRef(a2))
|
|
2412
|
+
return reactive(a2);
|
|
2413
|
+
const t = new Proxy({}, {
|
|
2414
|
+
get(e, n, l) {
|
|
2415
|
+
return unref(Reflect.get(a2.value, n, l));
|
|
2416
|
+
},
|
|
2417
|
+
set(e, n, l) {
|
|
2418
|
+
return isRef(a2.value[n]) && !isRef(l) ? a2.value[n].value = l : a2.value[n] = l, true;
|
|
2419
|
+
},
|
|
2420
|
+
deleteProperty(e, n) {
|
|
2421
|
+
return Reflect.deleteProperty(a2.value, n);
|
|
2422
|
+
},
|
|
2423
|
+
has(e, n) {
|
|
2424
|
+
return Reflect.has(a2.value, n);
|
|
2425
|
+
},
|
|
2426
|
+
ownKeys() {
|
|
2427
|
+
return Object.keys(a2.value);
|
|
2428
|
+
},
|
|
2429
|
+
getOwnPropertyDescriptor() {
|
|
2430
|
+
return {
|
|
2431
|
+
enumerable: true,
|
|
2432
|
+
configurable: true
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
});
|
|
2436
|
+
return reactive(t);
|
|
2437
|
+
}
|
|
2438
|
+
function El(a2) {
|
|
2439
|
+
return ni(computed(a2));
|
|
2440
|
+
}
|
|
2050
2441
|
const Ye = typeof window < "u" && typeof document < "u";
|
|
2051
2442
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2052
2443
|
const oi = (a2) => typeof a2 < "u", li = (a2) => a2 != null, si = Object.prototype.toString, ri = (a2) => si.call(a2) === "[object Object]", Va = () => {
|
|
@@ -6085,6 +6476,295 @@ const Oh = /* @__PURE__ */ defineComponent({
|
|
|
6085
6476
|
}, 16));
|
|
6086
6477
|
}
|
|
6087
6478
|
});
|
|
6479
|
+
function hs(a2) {
|
|
6480
|
+
const { disabled: t } = a2, e = ref(), n = ia(), l = () => window.clearTimeout(e.value), s = (v) => {
|
|
6481
|
+
l(), !t.value && (n.trigger(), e.value = window.setTimeout(() => {
|
|
6482
|
+
s(60);
|
|
6483
|
+
}, v));
|
|
6484
|
+
}, r = () => {
|
|
6485
|
+
s(400);
|
|
6486
|
+
}, i = () => {
|
|
6487
|
+
l();
|
|
6488
|
+
}, u = ref(false), d = computed(() => $e(a2.target)), c = (v) => {
|
|
6489
|
+
v.button !== 0 || u.value || (v.preventDefault(), u.value = true, r());
|
|
6490
|
+
}, f = () => {
|
|
6491
|
+
u.value = false, i();
|
|
6492
|
+
};
|
|
6493
|
+
return Ye && (Le(d || window, "pointerdown", c), Le(window, "pointerup", f), Le(window, "pointercancel", f)), {
|
|
6494
|
+
isPressed: u,
|
|
6495
|
+
onTrigger: n.on
|
|
6496
|
+
};
|
|
6497
|
+
}
|
|
6498
|
+
function Xo(a2, t = ref({})) {
|
|
6499
|
+
return El(() => new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(a2.value, t.value));
|
|
6500
|
+
}
|
|
6501
|
+
function zc(a2, t = ref({})) {
|
|
6502
|
+
return El(() => new $6c7bd7858deea686$export$cd11ab140839f11d(a2.value, t.value));
|
|
6503
|
+
}
|
|
6504
|
+
function Zo(a2, t, e) {
|
|
6505
|
+
let n = a2 === "+" ? t + e : t - e;
|
|
6506
|
+
if (t % 1 !== 0 || e % 1 !== 0) {
|
|
6507
|
+
const l = t.toString().split("."), s = e.toString().split("."), r = l[1] && l[1].length || 0, i = s[1] && s[1].length || 0, u = 10 ** Math.max(r, i);
|
|
6508
|
+
t = Math.round(t * u), e = Math.round(e * u), n = a2 === "+" ? t + e : t - e, n /= u;
|
|
6509
|
+
}
|
|
6510
|
+
return n;
|
|
6511
|
+
}
|
|
6512
|
+
const Kc = ["value", "name", "disabled", "required"], [Eo, Hc] = Q("NumberFieldRoot"), my = /* @__PURE__ */ defineComponent({
|
|
6513
|
+
inheritAttrs: false,
|
|
6514
|
+
__name: "NumberFieldRoot",
|
|
6515
|
+
props: {
|
|
6516
|
+
defaultValue: { default: void 0 },
|
|
6517
|
+
modelValue: {},
|
|
6518
|
+
min: {},
|
|
6519
|
+
max: {},
|
|
6520
|
+
step: { default: 1 },
|
|
6521
|
+
formatOptions: {},
|
|
6522
|
+
locale: { default: "en-US" },
|
|
6523
|
+
disabled: { type: Boolean },
|
|
6524
|
+
required: { type: Boolean },
|
|
6525
|
+
name: {},
|
|
6526
|
+
id: {},
|
|
6527
|
+
asChild: { type: Boolean },
|
|
6528
|
+
as: { default: "div" }
|
|
6529
|
+
},
|
|
6530
|
+
emits: ["update:modelValue"],
|
|
6531
|
+
setup(a2, { emit: t }) {
|
|
6532
|
+
const e = a2, n = t, { disabled: l, min: s, max: r, step: i, locale: u, formatOptions: d, id: c } = toRefs(e), f = ne(e, "modelValue", n, {
|
|
6533
|
+
defaultValue: e.defaultValue,
|
|
6534
|
+
passive: e.modelValue === void 0
|
|
6535
|
+
}), { primitiveElement: v, currentElement: p } = Ie(), g = Qe(p), m = ref(), _ = computed(
|
|
6536
|
+
() => W(f.value) === s.value || (s.value && !isNaN(f.value) ? Zo("-", f.value, i.value) < s.value : false)
|
|
6537
|
+
), C = computed(
|
|
6538
|
+
() => W(f.value) === r.value || (r.value && !isNaN(f.value) ? Zo("+", f.value, i.value) > r.value : false)
|
|
6539
|
+
);
|
|
6540
|
+
function $(G, J = 1) {
|
|
6541
|
+
var z;
|
|
6542
|
+
const K = I.parse(((z = m.value) == null ? void 0 : z.value) ?? "");
|
|
6543
|
+
e.disabled || (isNaN(K) ? f.value = s.value ?? 0 : G === "increase" ? f.value = W(K + (i.value ?? 1) * J) : f.value = W(K - (i.value ?? 1) * J));
|
|
6544
|
+
}
|
|
6545
|
+
function h2(G = 1) {
|
|
6546
|
+
$("increase", G);
|
|
6547
|
+
}
|
|
6548
|
+
function E(G = 1) {
|
|
6549
|
+
$("decrease", G);
|
|
6550
|
+
}
|
|
6551
|
+
function P(G) {
|
|
6552
|
+
G === "min" && s.value !== void 0 ? f.value = W(s.value) : G === "max" && r.value !== void 0 && (f.value = W(r.value));
|
|
6553
|
+
}
|
|
6554
|
+
const D = Xo(u, d), I = zc(u, d), M = computed(() => D.resolvedOptions().maximumFractionDigits > 0 ? "decimal" : "numeric"), V = Xo(u, d), A = computed(() => isNaN(f.value) ? "" : V.format(f.value));
|
|
6555
|
+
function F(G) {
|
|
6556
|
+
return I.isValidPartialNumber(G, s.value, r.value);
|
|
6557
|
+
}
|
|
6558
|
+
function j(G) {
|
|
6559
|
+
m.value && (m.value.value = G);
|
|
6560
|
+
}
|
|
6561
|
+
function W(G) {
|
|
6562
|
+
let J;
|
|
6563
|
+
return i.value === void 0 || isNaN(i.value) ? J = jt(G, s.value, r.value) : J = zr(G, s.value, r.value, i.value), J = I.parse(D.format(J)), J;
|
|
6564
|
+
}
|
|
6565
|
+
function ee(G) {
|
|
6566
|
+
const J = I.parse(G);
|
|
6567
|
+
return f.value = W(J), G.length ? j(A.value) : j(G);
|
|
6568
|
+
}
|
|
6569
|
+
return Hc({
|
|
6570
|
+
modelValue: f,
|
|
6571
|
+
handleDecrease: E,
|
|
6572
|
+
handleIncrease: h2,
|
|
6573
|
+
handleMinMaxValue: P,
|
|
6574
|
+
inputMode: M,
|
|
6575
|
+
inputEl: m,
|
|
6576
|
+
onInputElement: (G) => m.value = G,
|
|
6577
|
+
textValue: A,
|
|
6578
|
+
validate: F,
|
|
6579
|
+
applyInputValue: ee,
|
|
6580
|
+
disabled: l,
|
|
6581
|
+
max: r,
|
|
6582
|
+
min: s,
|
|
6583
|
+
isDecreaseDisabled: _,
|
|
6584
|
+
isIncreaseDisabled: C,
|
|
6585
|
+
id: c
|
|
6586
|
+
}), (G, J) => (openBlock(), createElementBlock(Fragment, null, [
|
|
6587
|
+
createVNode(unref(O), mergeProps(G.$attrs, {
|
|
6588
|
+
ref_key: "primitiveElement",
|
|
6589
|
+
ref: v,
|
|
6590
|
+
role: "group",
|
|
6591
|
+
as: G.as,
|
|
6592
|
+
"as-child": G.asChild,
|
|
6593
|
+
"data-disabled": unref(l) ? "" : void 0
|
|
6594
|
+
}), {
|
|
6595
|
+
default: withCtx(() => [
|
|
6596
|
+
renderSlot(G.$slots, "default", {
|
|
6597
|
+
modelValue: unref(f),
|
|
6598
|
+
textValue: A.value
|
|
6599
|
+
})
|
|
6600
|
+
]),
|
|
6601
|
+
_: 3
|
|
6602
|
+
}, 16, ["as", "as-child", "data-disabled"]),
|
|
6603
|
+
unref(g) ? (openBlock(), createElementBlock("input", {
|
|
6604
|
+
key: 0,
|
|
6605
|
+
type: "text",
|
|
6606
|
+
tabindex: "-1",
|
|
6607
|
+
"aria-hidden": "true",
|
|
6608
|
+
value: unref(f),
|
|
6609
|
+
name: e.name,
|
|
6610
|
+
disabled: e.disabled,
|
|
6611
|
+
required: e.required,
|
|
6612
|
+
style: {
|
|
6613
|
+
transform: "translateX(-100%)",
|
|
6614
|
+
position: "absolute",
|
|
6615
|
+
pointerEvents: "none",
|
|
6616
|
+
opacity: 0,
|
|
6617
|
+
margin: 0
|
|
6618
|
+
}
|
|
6619
|
+
}, null, 8, Kc)) : createCommentVNode("", true)
|
|
6620
|
+
], 64));
|
|
6621
|
+
}
|
|
6622
|
+
}), hy = /* @__PURE__ */ defineComponent({
|
|
6623
|
+
__name: "NumberFieldInput",
|
|
6624
|
+
props: {
|
|
6625
|
+
asChild: { type: Boolean },
|
|
6626
|
+
as: { default: "input" }
|
|
6627
|
+
},
|
|
6628
|
+
setup(a2) {
|
|
6629
|
+
const t = a2, { primitiveElement: e, currentElement: n } = Ie(), l = Eo();
|
|
6630
|
+
function s(u) {
|
|
6631
|
+
u.target === document.activeElement && (Math.abs(u.deltaY) <= Math.abs(u.deltaX) || (u.preventDefault(), u.deltaY > 0 ? l.handleIncrease() : u.deltaY < 0 && l.handleDecrease()));
|
|
6632
|
+
}
|
|
6633
|
+
onMounted(() => {
|
|
6634
|
+
l.onInputElement(n.value);
|
|
6635
|
+
});
|
|
6636
|
+
const r = ref(l.textValue.value);
|
|
6637
|
+
watch(() => l.textValue.value, () => {
|
|
6638
|
+
r.value = l.textValue.value;
|
|
6639
|
+
}, { immediate: true, deep: true });
|
|
6640
|
+
function i() {
|
|
6641
|
+
requestAnimationFrame(() => {
|
|
6642
|
+
r.value = l.textValue.value;
|
|
6643
|
+
});
|
|
6644
|
+
}
|
|
6645
|
+
return (u, d) => (openBlock(), createBlock(unref(O), mergeProps(t, {
|
|
6646
|
+
id: unref(l).id.value,
|
|
6647
|
+
ref_key: "primitiveElement",
|
|
6648
|
+
ref: e,
|
|
6649
|
+
value: r.value,
|
|
6650
|
+
role: "spinbutton",
|
|
6651
|
+
type: "text",
|
|
6652
|
+
tabindex: "0",
|
|
6653
|
+
inputmode: unref(l).inputMode.value,
|
|
6654
|
+
disabled: unref(l).disabled.value ? "" : void 0,
|
|
6655
|
+
"data-disabled": unref(l).disabled.value ? "" : void 0,
|
|
6656
|
+
autocomplete: "off",
|
|
6657
|
+
autocorrect: "off",
|
|
6658
|
+
spellcheck: "false",
|
|
6659
|
+
"aria-roledescription": "Number field",
|
|
6660
|
+
"aria-valuenow": unref(l).modelValue.value,
|
|
6661
|
+
"aria-valuemin": unref(l).min.value,
|
|
6662
|
+
"aria-valuemax": unref(l).max.value,
|
|
6663
|
+
onKeydown: [
|
|
6664
|
+
d[0] || (d[0] = withKeys(withModifiers((c) => unref(l).handleIncrease(), ["prevent"]), ["up"])),
|
|
6665
|
+
d[1] || (d[1] = withKeys(withModifiers((c) => unref(l).handleDecrease(), ["prevent"]), ["down"])),
|
|
6666
|
+
d[2] || (d[2] = withKeys(withModifiers((c) => unref(l).handleIncrease(10), ["prevent"]), ["page-up"])),
|
|
6667
|
+
d[3] || (d[3] = withKeys(withModifiers((c) => unref(l).handleDecrease(10), ["prevent"]), ["page-down"])),
|
|
6668
|
+
d[4] || (d[4] = withKeys(withModifiers((c) => unref(l).handleMinMaxValue("min"), ["prevent"]), ["home"])),
|
|
6669
|
+
d[5] || (d[5] = withKeys(withModifiers((c) => unref(l).handleMinMaxValue("max"), ["prevent"]), ["end"])),
|
|
6670
|
+
d[8] || (d[8] = withKeys((c) => {
|
|
6671
|
+
var f;
|
|
6672
|
+
return unref(l).applyInputValue((f = c.target) == null ? void 0 : f.value);
|
|
6673
|
+
}, ["enter"]))
|
|
6674
|
+
],
|
|
6675
|
+
onWheel: s,
|
|
6676
|
+
onBeforeinput: d[6] || (d[6] = (c) => {
|
|
6677
|
+
const f = c.target;
|
|
6678
|
+
let v = f.value.slice(0, f.selectionStart ?? void 0) + (c.data ?? "") + f.value.slice(f.selectionEnd ?? void 0);
|
|
6679
|
+
unref(l).validate(v) || c.preventDefault();
|
|
6680
|
+
}),
|
|
6681
|
+
onInput: d[7] || (d[7] = (c) => {
|
|
6682
|
+
const f = c.target;
|
|
6683
|
+
r.value = f.value;
|
|
6684
|
+
}),
|
|
6685
|
+
onChange: i,
|
|
6686
|
+
onBlur: d[9] || (d[9] = (c) => {
|
|
6687
|
+
var f;
|
|
6688
|
+
return unref(l).applyInputValue((f = c.target) == null ? void 0 : f.value);
|
|
6689
|
+
})
|
|
6690
|
+
}), {
|
|
6691
|
+
default: withCtx(() => [
|
|
6692
|
+
renderSlot(u.$slots, "default")
|
|
6693
|
+
]),
|
|
6694
|
+
_: 3
|
|
6695
|
+
}, 16, ["id", "value", "inputmode", "disabled", "data-disabled", "aria-valuenow", "aria-valuemin", "aria-valuemax"]));
|
|
6696
|
+
}
|
|
6697
|
+
}), yy = /* @__PURE__ */ defineComponent({
|
|
6698
|
+
__name: "NumberFieldIncrement",
|
|
6699
|
+
props: {
|
|
6700
|
+
disabled: { type: Boolean },
|
|
6701
|
+
asChild: { type: Boolean },
|
|
6702
|
+
as: { default: "button" }
|
|
6703
|
+
},
|
|
6704
|
+
setup(a2) {
|
|
6705
|
+
const t = a2, e = Eo(), n = computed(() => {
|
|
6706
|
+
var u;
|
|
6707
|
+
return ((u = e.disabled) == null ? void 0 : u.value) || t.disabled || e.isIncreaseDisabled.value;
|
|
6708
|
+
}), { primitiveElement: l, currentElement: s } = Ie(), { isPressed: r, onTrigger: i } = hs({ target: s, disabled: n });
|
|
6709
|
+
return i(() => {
|
|
6710
|
+
e.handleIncrease();
|
|
6711
|
+
}), (u, d) => (openBlock(), createBlock(unref(O), mergeProps(t, {
|
|
6712
|
+
ref_key: "primitiveElement",
|
|
6713
|
+
ref: l,
|
|
6714
|
+
tabindex: "-1",
|
|
6715
|
+
"aria-label": "Increase",
|
|
6716
|
+
type: u.as === "button" ? "button" : void 0,
|
|
6717
|
+
style: {
|
|
6718
|
+
userSelect: unref(r) ? "none" : void 0
|
|
6719
|
+
},
|
|
6720
|
+
disabled: n.value ? "" : void 0,
|
|
6721
|
+
"data-disabled": n.value ? "" : void 0,
|
|
6722
|
+
"data-pressed": unref(r) ? "true" : void 0,
|
|
6723
|
+
onContextmenu: d[0] || (d[0] = withModifiers(() => {
|
|
6724
|
+
}, ["prevent"]))
|
|
6725
|
+
}), {
|
|
6726
|
+
default: withCtx(() => [
|
|
6727
|
+
renderSlot(u.$slots, "default")
|
|
6728
|
+
]),
|
|
6729
|
+
_: 3
|
|
6730
|
+
}, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
|
|
6731
|
+
}
|
|
6732
|
+
}), gy = /* @__PURE__ */ defineComponent({
|
|
6733
|
+
__name: "NumberFieldDecrement",
|
|
6734
|
+
props: {
|
|
6735
|
+
disabled: { type: Boolean },
|
|
6736
|
+
asChild: { type: Boolean },
|
|
6737
|
+
as: { default: "button" }
|
|
6738
|
+
},
|
|
6739
|
+
setup(a2) {
|
|
6740
|
+
const t = a2, e = Eo(), n = computed(() => {
|
|
6741
|
+
var u;
|
|
6742
|
+
return ((u = e.disabled) == null ? void 0 : u.value) || t.disabled || e.isDecreaseDisabled.value;
|
|
6743
|
+
}), { primitiveElement: l, currentElement: s } = Ie(), { isPressed: r, onTrigger: i } = hs({ target: s, disabled: n });
|
|
6744
|
+
return i(() => {
|
|
6745
|
+
e.handleDecrease();
|
|
6746
|
+
}), (u, d) => (openBlock(), createBlock(unref(O), mergeProps(t, {
|
|
6747
|
+
ref_key: "primitiveElement",
|
|
6748
|
+
ref: l,
|
|
6749
|
+
tabindex: "-1",
|
|
6750
|
+
"aria-label": "Decrease",
|
|
6751
|
+
type: u.as === "button" ? "button" : void 0,
|
|
6752
|
+
style: {
|
|
6753
|
+
userSelect: unref(r) ? "none" : void 0
|
|
6754
|
+
},
|
|
6755
|
+
disabled: n.value ? "" : void 0,
|
|
6756
|
+
"data-disabled": n.value ? "" : void 0,
|
|
6757
|
+
"data-pressed": unref(r) ? "true" : void 0,
|
|
6758
|
+
onContextmenu: d[0] || (d[0] = withModifiers(() => {
|
|
6759
|
+
}, ["prevent"]))
|
|
6760
|
+
}), {
|
|
6761
|
+
default: withCtx(() => [
|
|
6762
|
+
renderSlot(u.$slots, "default")
|
|
6763
|
+
]),
|
|
6764
|
+
_: 3
|
|
6765
|
+
}, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
|
|
6766
|
+
}
|
|
6767
|
+
});
|
|
6088
6768
|
const Gc = ["id", "value", "name", "disabled", "required"], [qc, Yc] = Q("PinInputRoot"), Dy = /* @__PURE__ */ defineComponent({
|
|
6089
6769
|
inheritAttrs: false,
|
|
6090
6770
|
__name: "PinInputRoot",
|
|
@@ -9694,99 +10374,103 @@ const av = /* @__PURE__ */ defineComponent({
|
|
|
9694
10374
|
}
|
|
9695
10375
|
});
|
|
9696
10376
|
export {
|
|
9697
|
-
|
|
10377
|
+
Wv as $,
|
|
9698
10378
|
At as A,
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
10379
|
+
size as B,
|
|
10380
|
+
autoPlacement as C,
|
|
10381
|
+
hide as D,
|
|
10382
|
+
inline as E,
|
|
9703
10383
|
Fy as F,
|
|
9704
10384
|
Gy as G,
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
10385
|
+
computePosition as H,
|
|
10386
|
+
yg as I,
|
|
10387
|
+
gg as J,
|
|
9708
10388
|
Kv as K,
|
|
9709
|
-
|
|
9710
|
-
|
|
10389
|
+
Cg as L,
|
|
10390
|
+
bg as M,
|
|
9711
10391
|
Ny as N,
|
|
9712
10392
|
Oy as O,
|
|
9713
|
-
|
|
10393
|
+
lv as P,
|
|
9714
10394
|
Qf as Q,
|
|
9715
10395
|
Ry as R,
|
|
9716
|
-
|
|
10396
|
+
sv as S,
|
|
9717
10397
|
Ty as T,
|
|
9718
|
-
|
|
10398
|
+
My as U,
|
|
9719
10399
|
Vy as V,
|
|
9720
10400
|
Wy as W,
|
|
9721
|
-
|
|
9722
|
-
|
|
10401
|
+
Oh as X,
|
|
10402
|
+
qv as Y,
|
|
9723
10403
|
Zv as Z,
|
|
9724
|
-
|
|
10404
|
+
Yv as _,
|
|
9725
10405
|
Gl as a,
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
10406
|
+
Qv as a0,
|
|
10407
|
+
nm as a1,
|
|
10408
|
+
Xv as a2,
|
|
10409
|
+
Jv as a3,
|
|
10410
|
+
Hv as a4,
|
|
10411
|
+
tm as a5,
|
|
10412
|
+
Uv as a6,
|
|
10413
|
+
$y as a7,
|
|
10414
|
+
Dy as a8,
|
|
10415
|
+
ih as a9,
|
|
10416
|
+
Uy as aA,
|
|
10417
|
+
Ly as aB,
|
|
10418
|
+
eg as aC,
|
|
10419
|
+
Qy as aD,
|
|
10420
|
+
Lg as aE,
|
|
10421
|
+
zg as aF,
|
|
10422
|
+
Kg as aG,
|
|
10423
|
+
jg as aH,
|
|
10424
|
+
Hg as aI,
|
|
10425
|
+
Wg as aJ,
|
|
10426
|
+
uh as aa,
|
|
10427
|
+
fh as ab,
|
|
10428
|
+
ch as ac,
|
|
10429
|
+
hh as ad,
|
|
10430
|
+
ph as ae,
|
|
10431
|
+
Ch as af,
|
|
10432
|
+
wh as ag,
|
|
10433
|
+
rh as ah,
|
|
10434
|
+
sh as ai,
|
|
10435
|
+
Dv as aj,
|
|
10436
|
+
Eu as ak,
|
|
10437
|
+
xu as al,
|
|
10438
|
+
Pu as am,
|
|
10439
|
+
Du as an,
|
|
10440
|
+
bs as ao,
|
|
10441
|
+
ws as ap,
|
|
10442
|
+
_s as aq,
|
|
10443
|
+
xs as ar,
|
|
10444
|
+
gs as as,
|
|
10445
|
+
By as at,
|
|
10446
|
+
Iy as au,
|
|
10447
|
+
zy as av,
|
|
10448
|
+
Ky as aw,
|
|
10449
|
+
Xy as ax,
|
|
10450
|
+
jy as ay,
|
|
10451
|
+
Yy as az,
|
|
9768
10452
|
bh as b,
|
|
9769
10453
|
tg as c,
|
|
9770
10454
|
ag as d,
|
|
9771
10455
|
eu as e,
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
10456
|
+
yy as f,
|
|
10457
|
+
gy as g,
|
|
10458
|
+
hy as h,
|
|
10459
|
+
Ay as i,
|
|
9776
10460
|
jv as j,
|
|
9777
10461
|
ky as k,
|
|
9778
|
-
|
|
9779
|
-
|
|
10462
|
+
O as l,
|
|
10463
|
+
my as m,
|
|
9780
10464
|
ng as n,
|
|
9781
10465
|
og as o,
|
|
9782
|
-
|
|
10466
|
+
mg as p,
|
|
9783
10467
|
qy as q,
|
|
9784
|
-
|
|
9785
|
-
|
|
10468
|
+
hg as r,
|
|
10469
|
+
flip as s,
|
|
9786
10470
|
tu as t,
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
10471
|
+
shift as u,
|
|
10472
|
+
offset as v,
|
|
10473
|
+
arrow$1 as w,
|
|
9790
10474
|
xe as x,
|
|
9791
10475
|
ys as y,
|
|
9792
10476
|
zv as z
|