@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.
Files changed (96) hide show
  1. package/dist/celeste.css +354 -141
  2. package/dist/cjs/checkbox-card.js +1 -1
  3. package/dist/cjs/chunks/counter-input.vue_vue_type_style_index_0_lang.js +70 -0
  4. package/dist/cjs/chunks/index.js +684 -0
  5. package/dist/cjs/counter-input.js +3 -0
  6. package/dist/cjs/index.js +9 -0
  7. package/dist/cjs/modal-header.js +1 -1
  8. package/dist/cjs/popover-content.js +1 -1
  9. package/dist/cjs/radio-group-card.js +110 -0
  10. package/dist/cjs/radio-group-label.js +109 -0
  11. package/dist/components/counter-input/counter-input.d.ts +17 -0
  12. package/dist/components/counter-input/index.d.ts +2 -0
  13. package/dist/components/index.d.ts +1 -0
  14. package/dist/components/radio-group/index.d.ts +4 -0
  15. package/dist/components/radio-group/radio-group-card.d.ts +34 -0
  16. package/dist/components/radio-group/radio-group-label.d.ts +29 -0
  17. package/dist/es/button.js +1 -1
  18. package/dist/es/checkbox-card.js +2 -2
  19. package/dist/es/checkbox-label.js +1 -1
  20. package/dist/es/chunks/counter-input.vue_vue_type_style_index_0_lang.js +71 -0
  21. package/dist/es/chunks/index.js +754 -70
  22. package/dist/es/chunks/index3.js +1 -1
  23. package/dist/es/chunks/radio-group-item.vue_vue_type_style_index_0_lang.js +1 -1
  24. package/dist/es/chunks/switch.vue_vue_type_style_index_0_lang.js +1 -1
  25. package/dist/es/combobox-group.js +1 -1
  26. package/dist/es/combobox-input.js +1 -1
  27. package/dist/es/combobox-item.js +1 -1
  28. package/dist/es/combobox-list.js +1 -1
  29. package/dist/es/combobox-root.js +1 -1
  30. package/dist/es/combobox-separator.js +1 -1
  31. package/dist/es/combobox-trigger.js +1 -1
  32. package/dist/es/command-group.js +1 -1
  33. package/dist/es/command-input.js +1 -1
  34. package/dist/es/command-item.js +1 -1
  35. package/dist/es/command-list.js +1 -1
  36. package/dist/es/command-root.js +1 -1
  37. package/dist/es/command-separator.js +1 -1
  38. package/dist/es/compact-button.js +1 -1
  39. package/dist/es/context-menu-item.js +1 -1
  40. package/dist/es/counter-input.js +4 -0
  41. package/dist/es/digit-input-group.js +1 -1
  42. package/dist/es/digit-input-slot.js +1 -1
  43. package/dist/es/digit-input.js +1 -1
  44. package/dist/es/dropdown-menu-content.js +1 -1
  45. package/dist/es/dropdown-menu-group.js +1 -1
  46. package/dist/es/dropdown-menu-item.js +1 -1
  47. package/dist/es/dropdown-menu-label.js +1 -1
  48. package/dist/es/dropdown-menu-separator.js +1 -1
  49. package/dist/es/dropdown-menu-sub-content.js +1 -1
  50. package/dist/es/dropdown-menu-sub-trigger.js +1 -1
  51. package/dist/es/dropdown-menu-trigger.js +1 -1
  52. package/dist/es/dropdown-menu.js +1 -1
  53. package/dist/es/dropdown.js +1 -1
  54. package/dist/es/fancy-button.js +1 -1
  55. package/dist/es/index.js +48 -39
  56. package/dist/es/label.js +1 -1
  57. package/dist/es/link-button.js +1 -1
  58. package/dist/es/modal-content.js +1 -1
  59. package/dist/es/modal-header.js +2 -2
  60. package/dist/es/popover-content.js +2 -2
  61. package/dist/es/popover-trigger.js +1 -1
  62. package/dist/es/progress-bar.js +1 -1
  63. package/dist/es/progress-circle.js +1 -1
  64. package/dist/es/radio-group-card.js +111 -0
  65. package/dist/es/radio-group-label.js +110 -0
  66. package/dist/es/scroll-bar.js +1 -1
  67. package/dist/es/segmented-control-item.js +1 -1
  68. package/dist/es/segmented-control.js +1 -1
  69. package/dist/es/select-content.js +1 -1
  70. package/dist/es/select-item.js +1 -1
  71. package/dist/es/select-trigger.js +1 -1
  72. package/dist/es/select-value.js +1 -1
  73. package/dist/es/social-button.js +1 -1
  74. package/dist/es/tab-menu-content.js +1 -1
  75. package/dist/es/tab-menu-item.js +1 -1
  76. package/dist/es/tab-menu-list.js +1 -1
  77. package/dist/es/tab-menu.js +1 -1
  78. package/dist/es/tag.js +1 -1
  79. package/dist/es/text-input.js +1 -1
  80. package/dist/es/tooltip.js +1 -1
  81. package/package.json +3 -3
  82. package/src/components/checkbox/checkbox-card.vue +1 -0
  83. package/src/components/counter-input/counter-input.vue +131 -0
  84. package/src/components/counter-input/index.ts +2 -0
  85. package/src/components/counter-input/stories/counter-input.stories.ts +149 -0
  86. package/src/components/digit-input/stories/digit-input.stories.ts +1 -1
  87. package/src/components/index.ts +1 -0
  88. package/src/components/modal/modal-header.vue +1 -1
  89. package/src/components/popover/popover-content.vue +1 -1
  90. package/src/components/popover/stories/popover.stories.ts +46 -0
  91. package/src/components/radio-group/index.ts +6 -0
  92. package/src/components/radio-group/radio-group-card.vue +221 -0
  93. package/src/components/radio-group/radio-group-label.vue +108 -0
  94. package/src/components/radio-group/stories/radio-group-card.stories.ts +297 -0
  95. package/src/components/radio-group/stories/radio-group.stories.ts +25 -15
  96. package/src/components/text-input/stories/text-input.stories.ts +1 -1
@@ -1964,6 +1964,351 @@ function useFloating(reference, floating, options) {
1964
1964
  update
1965
1965
  };
1966
1966
  }
1967
+ let $488c6ddbf4ef74c2$var$formatterCache = /* @__PURE__ */ new Map();
1968
+ let $488c6ddbf4ef74c2$var$supportsSignDisplay = false;
1969
+ try {
1970
+ $488c6ddbf4ef74c2$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", {
1971
+ signDisplay: "exceptZero"
1972
+ }).resolvedOptions().signDisplay === "exceptZero";
1973
+ } catch {
1974
+ }
1975
+ let $488c6ddbf4ef74c2$var$supportsUnit = false;
1976
+ try {
1977
+ $488c6ddbf4ef74c2$var$supportsUnit = new Intl.NumberFormat("de-DE", {
1978
+ style: "unit",
1979
+ unit: "degree"
1980
+ }).resolvedOptions().style === "unit";
1981
+ } catch {
1982
+ }
1983
+ const $488c6ddbf4ef74c2$var$UNITS = {
1984
+ degree: {
1985
+ narrow: {
1986
+ default: "°",
1987
+ "ja-JP": " 度",
1988
+ "zh-TW": "度",
1989
+ "sl-SI": " °"
1990
+ }
1991
+ }
1992
+ };
1993
+ class $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 {
1994
+ /** Formats a number value as a string, according to the locale and options provided to the constructor. */
1995
+ format(value) {
1996
+ let res = "";
1997
+ if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null) res = $488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
1998
+ else res = this.numberFormatter.format(value);
1999
+ if (this.options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
2000
+ var _UNITS_unit;
2001
+ let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
2002
+ if (!unit) return res;
2003
+ let values = (_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay];
2004
+ res += values[locale] || values.default;
2005
+ }
2006
+ return res;
2007
+ }
2008
+ /** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
2009
+ formatToParts(value) {
2010
+ return this.numberFormatter.formatToParts(value);
2011
+ }
2012
+ /** Formats a number range as a string. */
2013
+ formatRange(start, end) {
2014
+ if (typeof this.numberFormatter.formatRange === "function") return this.numberFormatter.formatRange(start, end);
2015
+ if (end < start) throw new RangeError("End date must be >= start date");
2016
+ return `${this.format(start)} – ${this.format(end)}`;
2017
+ }
2018
+ /** Formats a number range as an array of parts. */
2019
+ formatRangeToParts(start, end) {
2020
+ if (typeof this.numberFormatter.formatRangeToParts === "function") return this.numberFormatter.formatRangeToParts(start, end);
2021
+ if (end < start) throw new RangeError("End date must be >= start date");
2022
+ let startParts = this.numberFormatter.formatToParts(start);
2023
+ let endParts = this.numberFormatter.formatToParts(end);
2024
+ return [
2025
+ ...startParts.map((p) => ({
2026
+ ...p,
2027
+ source: "startRange"
2028
+ })),
2029
+ {
2030
+ type: "literal",
2031
+ value: " – ",
2032
+ source: "shared"
2033
+ },
2034
+ ...endParts.map((p) => ({
2035
+ ...p,
2036
+ source: "endRange"
2037
+ }))
2038
+ ];
2039
+ }
2040
+ /** Returns the resolved formatting options based on the values passed to the constructor. */
2041
+ resolvedOptions() {
2042
+ let options = this.numberFormatter.resolvedOptions();
2043
+ if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null) options = {
2044
+ ...options,
2045
+ signDisplay: this.options.signDisplay
2046
+ };
2047
+ if (!$488c6ddbf4ef74c2$var$supportsUnit && this.options.style === "unit") options = {
2048
+ ...options,
2049
+ style: "unit",
2050
+ unit: this.options.unit,
2051
+ unitDisplay: this.options.unitDisplay
2052
+ };
2053
+ return options;
2054
+ }
2055
+ constructor(locale, options = {}) {
2056
+ this.numberFormatter = $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options);
2057
+ this.options = options;
2058
+ }
2059
+ }
2060
+ function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options = {}) {
2061
+ let { numberingSystem } = options;
2062
+ if (numberingSystem && locale.includes("-nu-")) {
2063
+ if (!locale.includes("-u-")) locale += "-u-";
2064
+ locale += `-nu-${numberingSystem}`;
2065
+ }
2066
+ if (options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
2067
+ var _UNITS_unit;
2068
+ let { unit, unitDisplay = "short" } = options;
2069
+ if (!unit) throw new Error('unit option must be provided with style: "unit"');
2070
+ 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}`);
2071
+ options = {
2072
+ ...options,
2073
+ style: "decimal"
2074
+ };
2075
+ }
2076
+ let cacheKey = locale + (options ? Object.entries(options).sort((a2, b) => a2[0] < b[0] ? -1 : 1).join() : "");
2077
+ if ($488c6ddbf4ef74c2$var$formatterCache.has(cacheKey)) return $488c6ddbf4ef74c2$var$formatterCache.get(cacheKey);
2078
+ let numberFormatter = new Intl.NumberFormat(locale, options);
2079
+ $488c6ddbf4ef74c2$var$formatterCache.set(cacheKey, numberFormatter);
2080
+ return numberFormatter;
2081
+ }
2082
+ function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
2083
+ if (signDisplay === "auto") return numberFormat.format(num);
2084
+ else if (signDisplay === "never") return numberFormat.format(Math.abs(num));
2085
+ else {
2086
+ let needsPositiveSign = false;
2087
+ if (signDisplay === "always") needsPositiveSign = num > 0 || Object.is(num, 0);
2088
+ else if (signDisplay === "exceptZero") {
2089
+ if (Object.is(num, -0) || Object.is(num, 0)) num = Math.abs(num);
2090
+ else needsPositiveSign = num > 0;
2091
+ }
2092
+ if (needsPositiveSign) {
2093
+ let negative = numberFormat.format(-num);
2094
+ let noSign = numberFormat.format(num);
2095
+ let minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
2096
+ if ([
2097
+ ...minus
2098
+ ].length !== 1) console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case");
2099
+ let positive = negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
2100
+ return positive;
2101
+ } else return numberFormat.format(num);
2102
+ }
2103
+ }
2104
+ const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX = new RegExp("^.*\\(.*\\).*$");
2105
+ const $6c7bd7858deea686$var$NUMBERING_SYSTEMS = [
2106
+ "latn",
2107
+ "arab",
2108
+ "hanidec",
2109
+ "deva",
2110
+ "beng"
2111
+ ];
2112
+ class $6c7bd7858deea686$export$cd11ab140839f11d {
2113
+ /**
2114
+ * Parses the given string to a number. Returns NaN if a valid number could not be parsed.
2115
+ */
2116
+ parse(value) {
2117
+ return $6c7bd7858deea686$var$getNumberParserImpl(this.locale, this.options, value).parse(value);
2118
+ }
2119
+ /**
2120
+ * Returns whether the given string could potentially be a valid number. This should be used to
2121
+ * validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity
2122
+ * of the minus/plus sign characters can be checked.
2123
+ */
2124
+ isValidPartialNumber(value, minValue, maxValue) {
2125
+ return $6c7bd7858deea686$var$getNumberParserImpl(this.locale, this.options, value).isValidPartialNumber(value, minValue, maxValue);
2126
+ }
2127
+ /**
2128
+ * Returns a numbering system for which the given string is valid in the current locale.
2129
+ * If no numbering system could be detected, the default numbering system for the current
2130
+ * locale is returned.
2131
+ */
2132
+ getNumberingSystem(value) {
2133
+ return $6c7bd7858deea686$var$getNumberParserImpl(this.locale, this.options, value).options.numberingSystem;
2134
+ }
2135
+ constructor(locale, options = {}) {
2136
+ this.locale = locale;
2137
+ this.options = options;
2138
+ }
2139
+ }
2140
+ const $6c7bd7858deea686$var$numberParserCache = /* @__PURE__ */ new Map();
2141
+ function $6c7bd7858deea686$var$getNumberParserImpl(locale, options, value) {
2142
+ let defaultParser = $6c7bd7858deea686$var$getCachedNumberParser(locale, options);
2143
+ if (!locale.includes("-nu-") && !defaultParser.isValidPartialNumber(value)) {
2144
+ for (let numberingSystem of $6c7bd7858deea686$var$NUMBERING_SYSTEMS) if (numberingSystem !== defaultParser.options.numberingSystem) {
2145
+ let parser = $6c7bd7858deea686$var$getCachedNumberParser(locale + (locale.includes("-u-") ? "-nu-" : "-u-nu-") + numberingSystem, options);
2146
+ if (parser.isValidPartialNumber(value)) return parser;
2147
+ }
2148
+ }
2149
+ return defaultParser;
2150
+ }
2151
+ function $6c7bd7858deea686$var$getCachedNumberParser(locale, options) {
2152
+ let cacheKey = locale + (options ? Object.entries(options).sort((a2, b) => a2[0] < b[0] ? -1 : 1).join() : "");
2153
+ let parser = $6c7bd7858deea686$var$numberParserCache.get(cacheKey);
2154
+ if (!parser) {
2155
+ parser = new $6c7bd7858deea686$var$NumberParserImpl(locale, options);
2156
+ $6c7bd7858deea686$var$numberParserCache.set(cacheKey, parser);
2157
+ }
2158
+ return parser;
2159
+ }
2160
+ class $6c7bd7858deea686$var$NumberParserImpl {
2161
+ parse(value) {
2162
+ let fullySanitizedValue = this.sanitize(value);
2163
+ if (this.symbols.group)
2164
+ fullySanitizedValue = $6c7bd7858deea686$var$replaceAll(fullySanitizedValue, this.symbols.group, "");
2165
+ if (this.symbols.decimal) fullySanitizedValue = fullySanitizedValue.replace(this.symbols.decimal, ".");
2166
+ if (this.symbols.minusSign) fullySanitizedValue = fullySanitizedValue.replace(this.symbols.minusSign, "-");
2167
+ fullySanitizedValue = fullySanitizedValue.replace(this.symbols.numeral, this.symbols.index);
2168
+ if (this.options.style === "percent") {
2169
+ let isNegative = fullySanitizedValue.indexOf("-");
2170
+ fullySanitizedValue = fullySanitizedValue.replace("-", "");
2171
+ let index = fullySanitizedValue.indexOf(".");
2172
+ if (index === -1) index = fullySanitizedValue.length;
2173
+ fullySanitizedValue = fullySanitizedValue.replace(".", "");
2174
+ if (index - 2 === 0) fullySanitizedValue = `0.${fullySanitizedValue}`;
2175
+ else if (index - 2 === -1) fullySanitizedValue = `0.0${fullySanitizedValue}`;
2176
+ else if (index - 2 === -2) fullySanitizedValue = "0.00";
2177
+ else fullySanitizedValue = `${fullySanitizedValue.slice(0, index - 2)}.${fullySanitizedValue.slice(index - 2)}`;
2178
+ if (isNegative > -1) fullySanitizedValue = `-${fullySanitizedValue}`;
2179
+ }
2180
+ let newValue = fullySanitizedValue ? +fullySanitizedValue : NaN;
2181
+ if (isNaN(newValue)) return NaN;
2182
+ if (this.options.style === "percent") {
2183
+ var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
2184
+ let options = {
2185
+ ...this.options,
2186
+ style: "decimal",
2187
+ minimumFractionDigits: Math.min(((_this_options_minimumFractionDigits = this.options.minimumFractionDigits) !== null && _this_options_minimumFractionDigits !== void 0 ? _this_options_minimumFractionDigits : 0) + 2, 20),
2188
+ maximumFractionDigits: Math.min(((_this_options_maximumFractionDigits = this.options.maximumFractionDigits) !== null && _this_options_maximumFractionDigits !== void 0 ? _this_options_maximumFractionDigits : 0) + 2, 20)
2189
+ };
2190
+ return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale, options).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale, options).format(newValue));
2191
+ }
2192
+ if (this.options.currencySign === "accounting" && $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(value)) newValue = -1 * newValue;
2193
+ return newValue;
2194
+ }
2195
+ sanitize(value) {
2196
+ value = value.replace(this.symbols.literals, "");
2197
+ if (this.symbols.minusSign) value = value.replace("-", this.symbols.minusSign);
2198
+ if (this.options.numberingSystem === "arab") {
2199
+ if (this.symbols.decimal) {
2200
+ value = value.replace(",", this.symbols.decimal);
2201
+ value = value.replace(String.fromCharCode(1548), this.symbols.decimal);
2202
+ }
2203
+ if (this.symbols.group) value = $6c7bd7858deea686$var$replaceAll(value, ".", this.symbols.group);
2204
+ }
2205
+ if (this.options.locale === "fr-FR") value = $6c7bd7858deea686$var$replaceAll(value, ".", String.fromCharCode(8239));
2206
+ return value;
2207
+ }
2208
+ isValidPartialNumber(value, minValue = -Infinity, maxValue = Infinity) {
2209
+ value = this.sanitize(value);
2210
+ if (this.symbols.minusSign && value.startsWith(this.symbols.minusSign) && minValue < 0) value = value.slice(this.symbols.minusSign.length);
2211
+ else if (this.symbols.plusSign && value.startsWith(this.symbols.plusSign) && maxValue > 0) value = value.slice(this.symbols.plusSign.length);
2212
+ if (this.symbols.group && value.startsWith(this.symbols.group)) return false;
2213
+ if (this.symbols.decimal && value.indexOf(this.symbols.decimal) > -1 && this.options.maximumFractionDigits === 0) return false;
2214
+ if (this.symbols.group) value = $6c7bd7858deea686$var$replaceAll(value, this.symbols.group, "");
2215
+ value = value.replace(this.symbols.numeral, "");
2216
+ if (this.symbols.decimal) value = value.replace(this.symbols.decimal, "");
2217
+ return value.length === 0;
2218
+ }
2219
+ constructor(locale, options = {}) {
2220
+ this.locale = locale;
2221
+ this.formatter = new Intl.NumberFormat(locale, options);
2222
+ this.options = this.formatter.resolvedOptions();
2223
+ this.symbols = $6c7bd7858deea686$var$getSymbols(locale, this.formatter, this.options, options);
2224
+ var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
2225
+ 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.");
2226
+ }
2227
+ }
2228
+ const $6c7bd7858deea686$var$nonLiteralParts = /* @__PURE__ */ new Set([
2229
+ "decimal",
2230
+ "fraction",
2231
+ "integer",
2232
+ "minusSign",
2233
+ "plusSign",
2234
+ "group"
2235
+ ]);
2236
+ const $6c7bd7858deea686$var$pluralNumbers = [
2237
+ 0,
2238
+ 4,
2239
+ 2,
2240
+ 1,
2241
+ 11,
2242
+ 20,
2243
+ 3,
2244
+ 7,
2245
+ 100,
2246
+ 21,
2247
+ 0.1,
2248
+ 1.1
2249
+ ];
2250
+ function $6c7bd7858deea686$var$getSymbols(locale, formatter, intlOptions, originalOptions) {
2251
+ var _allParts_find, _posAllParts_find, _decimalParts_find, _allParts_find1;
2252
+ let symbolFormatter = new Intl.NumberFormat(locale, {
2253
+ ...intlOptions,
2254
+ // Resets so we get the full range of symbols
2255
+ minimumSignificantDigits: 1,
2256
+ maximumSignificantDigits: 21,
2257
+ roundingIncrement: 1,
2258
+ roundingPriority: "auto",
2259
+ roundingMode: "halfExpand"
2260
+ });
2261
+ let allParts = symbolFormatter.formatToParts(-10000.111);
2262
+ let posAllParts = symbolFormatter.formatToParts(10000.111);
2263
+ let pluralParts = $6c7bd7858deea686$var$pluralNumbers.map((n) => symbolFormatter.formatToParts(n));
2264
+ var _allParts_find_value;
2265
+ 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 : "-";
2266
+ let plusSign = (_posAllParts_find = posAllParts.find((p) => p.type === "plusSign")) === null || _posAllParts_find === void 0 ? void 0 : _posAllParts_find.value;
2267
+ if (!plusSign && ((originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === "exceptZero" || (originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === "always")) plusSign = "+";
2268
+ let decimalParts = new Intl.NumberFormat(locale, {
2269
+ ...intlOptions,
2270
+ minimumFractionDigits: 2,
2271
+ maximumFractionDigits: 2
2272
+ }).formatToParts(1e-3);
2273
+ let decimal = (_decimalParts_find = decimalParts.find((p) => p.type === "decimal")) === null || _decimalParts_find === void 0 ? void 0 : _decimalParts_find.value;
2274
+ let group = (_allParts_find1 = allParts.find((p) => p.type === "group")) === null || _allParts_find1 === void 0 ? void 0 : _allParts_find1.value;
2275
+ let allPartsLiterals = allParts.filter((p) => !$6c7bd7858deea686$var$nonLiteralParts.has(p.type)).map((p) => $6c7bd7858deea686$var$escapeRegex(p.value));
2276
+ let pluralPartsLiterals = pluralParts.flatMap((p) => p.filter((p2) => !$6c7bd7858deea686$var$nonLiteralParts.has(p2.type)).map((p2) => $6c7bd7858deea686$var$escapeRegex(p2.value)));
2277
+ let sortedLiterals = [
2278
+ .../* @__PURE__ */ new Set([
2279
+ ...allPartsLiterals,
2280
+ ...pluralPartsLiterals
2281
+ ])
2282
+ ].sort((a2, b) => b.length - a2.length);
2283
+ let literals = sortedLiterals.length === 0 ? new RegExp("[\\p{White_Space}]", "gu") : new RegExp(`${sortedLiterals.join("|")}|[\\p{White_Space}]`, "gu");
2284
+ let numerals = [
2285
+ ...new Intl.NumberFormat(intlOptions.locale, {
2286
+ useGrouping: false
2287
+ }).format(9876543210)
2288
+ ].reverse();
2289
+ let indexes = new Map(numerals.map((d, i) => [
2290
+ d,
2291
+ i
2292
+ ]));
2293
+ let numeral = new RegExp(`[${numerals.join("")}]`, "g");
2294
+ let index = (d) => String(indexes.get(d));
2295
+ return {
2296
+ minusSign,
2297
+ plusSign,
2298
+ decimal,
2299
+ group,
2300
+ literals,
2301
+ numeral,
2302
+ index
2303
+ };
2304
+ }
2305
+ function $6c7bd7858deea686$var$replaceAll(str, find, replace) {
2306
+ if (str.replaceAll) return str.replaceAll(find, replace);
2307
+ return str.split(find).join(replace);
2308
+ }
2309
+ function $6c7bd7858deea686$var$escapeRegex(string) {
2310
+ return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2311
+ }
1967
2312
  function Q(a2, t) {
1968
2313
  const e = typeof a2 == "string" && !t ? `${a2}Context` : t, n = Symbol(e);
1969
2314
  return [(r) => {
@@ -1988,6 +2333,21 @@ function Wt(a2, t, e) {
1988
2333
  function jt(a2, t = Number.NEGATIVE_INFINITY, e = Number.POSITIVE_INFINITY) {
1989
2334
  return Math.min(e, Math.max(t, a2));
1990
2335
  }
2336
+ function Ea(a2, t) {
2337
+ let e = a2;
2338
+ const n = t.toString(), l = n.indexOf("."), s = l >= 0 ? n.length - l : 0;
2339
+ if (s > 0) {
2340
+ const r = 10 ** s;
2341
+ e = Math.round(e * r) / r;
2342
+ }
2343
+ return e;
2344
+ }
2345
+ function zr(a2, t, e, n) {
2346
+ t = Number(t), e = Number(e);
2347
+ const l = (a2 - (Number.isNaN(t) ? 0 : t)) % n;
2348
+ let s = Ea(Math.abs(l) * 2 >= n ? a2 + Math.sign(l) * (n - Math.abs(l)) : a2 - l, n);
2349
+ 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;
2350
+ }
1991
2351
  function Kr(a2) {
1992
2352
  return a2.__esModule && Object.prototype.hasOwnProperty.call(a2, "default") ? a2.default : a2;
1993
2353
  }
@@ -2064,6 +2424,37 @@ function Sl(a2) {
2064
2424
  function Ke(a2) {
2065
2425
  return typeof a2 == "function" ? a2() : Mo.unref(a2);
2066
2426
  }
2427
+ function ni(a2) {
2428
+ if (!Mo.isRef(a2))
2429
+ return Mo.reactive(a2);
2430
+ const t = new Proxy({}, {
2431
+ get(e, n, l) {
2432
+ return Mo.unref(Reflect.get(a2.value, n, l));
2433
+ },
2434
+ set(e, n, l) {
2435
+ return Mo.isRef(a2.value[n]) && !Mo.isRef(l) ? a2.value[n].value = l : a2.value[n] = l, true;
2436
+ },
2437
+ deleteProperty(e, n) {
2438
+ return Reflect.deleteProperty(a2.value, n);
2439
+ },
2440
+ has(e, n) {
2441
+ return Reflect.has(a2.value, n);
2442
+ },
2443
+ ownKeys() {
2444
+ return Object.keys(a2.value);
2445
+ },
2446
+ getOwnPropertyDescriptor() {
2447
+ return {
2448
+ enumerable: true,
2449
+ configurable: true
2450
+ };
2451
+ }
2452
+ });
2453
+ return Mo.reactive(t);
2454
+ }
2455
+ function El(a2) {
2456
+ return ni(Mo.computed(a2));
2457
+ }
2067
2458
  const Ye = typeof window < "u" && typeof document < "u";
2068
2459
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2069
2460
  const oi = (a2) => typeof a2 < "u", li = (a2) => a2 != null, si = Object.prototype.toString, ri = (a2) => si.call(a2) === "[object Object]", Va = () => {
@@ -6102,6 +6493,295 @@ const Oh = /* @__PURE__ */ Mo.defineComponent({
6102
6493
  }, 16));
6103
6494
  }
6104
6495
  });
6496
+ function hs(a2) {
6497
+ const { disabled: t } = a2, e = Mo.ref(), n = ia(), l = () => window.clearTimeout(e.value), s = (v) => {
6498
+ l(), !t.value && (n.trigger(), e.value = window.setTimeout(() => {
6499
+ s(60);
6500
+ }, v));
6501
+ }, r = () => {
6502
+ s(400);
6503
+ }, i = () => {
6504
+ l();
6505
+ }, u = Mo.ref(false), d = Mo.computed(() => $e(a2.target)), c = (v) => {
6506
+ v.button !== 0 || u.value || (v.preventDefault(), u.value = true, r());
6507
+ }, f = () => {
6508
+ u.value = false, i();
6509
+ };
6510
+ return Ye && (Le(d || window, "pointerdown", c), Le(window, "pointerup", f), Le(window, "pointercancel", f)), {
6511
+ isPressed: u,
6512
+ onTrigger: n.on
6513
+ };
6514
+ }
6515
+ function Xo(a2, t = Mo.ref({})) {
6516
+ return El(() => new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(a2.value, t.value));
6517
+ }
6518
+ function zc(a2, t = Mo.ref({})) {
6519
+ return El(() => new $6c7bd7858deea686$export$cd11ab140839f11d(a2.value, t.value));
6520
+ }
6521
+ function Zo(a2, t, e) {
6522
+ let n = a2 === "+" ? t + e : t - e;
6523
+ if (t % 1 !== 0 || e % 1 !== 0) {
6524
+ 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);
6525
+ t = Math.round(t * u), e = Math.round(e * u), n = a2 === "+" ? t + e : t - e, n /= u;
6526
+ }
6527
+ return n;
6528
+ }
6529
+ const Kc = ["value", "name", "disabled", "required"], [Eo, Hc] = Q("NumberFieldRoot"), my = /* @__PURE__ */ Mo.defineComponent({
6530
+ inheritAttrs: false,
6531
+ __name: "NumberFieldRoot",
6532
+ props: {
6533
+ defaultValue: { default: void 0 },
6534
+ modelValue: {},
6535
+ min: {},
6536
+ max: {},
6537
+ step: { default: 1 },
6538
+ formatOptions: {},
6539
+ locale: { default: "en-US" },
6540
+ disabled: { type: Boolean },
6541
+ required: { type: Boolean },
6542
+ name: {},
6543
+ id: {},
6544
+ asChild: { type: Boolean },
6545
+ as: { default: "div" }
6546
+ },
6547
+ emits: ["update:modelValue"],
6548
+ setup(a2, { emit: t }) {
6549
+ const e = a2, n = t, { disabled: l, min: s, max: r, step: i, locale: u, formatOptions: d, id: c } = Mo.toRefs(e), f = ne(e, "modelValue", n, {
6550
+ defaultValue: e.defaultValue,
6551
+ passive: e.modelValue === void 0
6552
+ }), { primitiveElement: v, currentElement: p } = Ie(), g = Qe(p), m = Mo.ref(), _ = Mo.computed(
6553
+ () => W(f.value) === s.value || (s.value && !isNaN(f.value) ? Zo("-", f.value, i.value) < s.value : false)
6554
+ ), C = Mo.computed(
6555
+ () => W(f.value) === r.value || (r.value && !isNaN(f.value) ? Zo("+", f.value, i.value) > r.value : false)
6556
+ );
6557
+ function $(G, J = 1) {
6558
+ var z;
6559
+ const K = I.parse(((z = m.value) == null ? void 0 : z.value) ?? "");
6560
+ 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));
6561
+ }
6562
+ function h(G = 1) {
6563
+ $("increase", G);
6564
+ }
6565
+ function E(G = 1) {
6566
+ $("decrease", G);
6567
+ }
6568
+ function P(G) {
6569
+ G === "min" && s.value !== void 0 ? f.value = W(s.value) : G === "max" && r.value !== void 0 && (f.value = W(r.value));
6570
+ }
6571
+ const D = Xo(u, d), I = zc(u, d), M = Mo.computed(() => D.resolvedOptions().maximumFractionDigits > 0 ? "decimal" : "numeric"), V = Xo(u, d), A = Mo.computed(() => isNaN(f.value) ? "" : V.format(f.value));
6572
+ function F(G) {
6573
+ return I.isValidPartialNumber(G, s.value, r.value);
6574
+ }
6575
+ function j(G) {
6576
+ m.value && (m.value.value = G);
6577
+ }
6578
+ function W(G) {
6579
+ let J;
6580
+ 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;
6581
+ }
6582
+ function ee(G) {
6583
+ const J = I.parse(G);
6584
+ return f.value = W(J), G.length ? j(A.value) : j(G);
6585
+ }
6586
+ return Hc({
6587
+ modelValue: f,
6588
+ handleDecrease: E,
6589
+ handleIncrease: h,
6590
+ handleMinMaxValue: P,
6591
+ inputMode: M,
6592
+ inputEl: m,
6593
+ onInputElement: (G) => m.value = G,
6594
+ textValue: A,
6595
+ validate: F,
6596
+ applyInputValue: ee,
6597
+ disabled: l,
6598
+ max: r,
6599
+ min: s,
6600
+ isDecreaseDisabled: _,
6601
+ isIncreaseDisabled: C,
6602
+ id: c
6603
+ }), (G, J) => (Mo.openBlock(), Mo.createElementBlock(Mo.Fragment, null, [
6604
+ Mo.createVNode(Mo.unref(O), Mo.mergeProps(G.$attrs, {
6605
+ ref_key: "primitiveElement",
6606
+ ref: v,
6607
+ role: "group",
6608
+ as: G.as,
6609
+ "as-child": G.asChild,
6610
+ "data-disabled": Mo.unref(l) ? "" : void 0
6611
+ }), {
6612
+ default: Mo.withCtx(() => [
6613
+ Mo.renderSlot(G.$slots, "default", {
6614
+ modelValue: Mo.unref(f),
6615
+ textValue: A.value
6616
+ })
6617
+ ]),
6618
+ _: 3
6619
+ }, 16, ["as", "as-child", "data-disabled"]),
6620
+ Mo.unref(g) ? (Mo.openBlock(), Mo.createElementBlock("input", {
6621
+ key: 0,
6622
+ type: "text",
6623
+ tabindex: "-1",
6624
+ "aria-hidden": "true",
6625
+ value: Mo.unref(f),
6626
+ name: e.name,
6627
+ disabled: e.disabled,
6628
+ required: e.required,
6629
+ style: {
6630
+ transform: "translateX(-100%)",
6631
+ position: "absolute",
6632
+ pointerEvents: "none",
6633
+ opacity: 0,
6634
+ margin: 0
6635
+ }
6636
+ }, null, 8, Kc)) : Mo.createCommentVNode("", true)
6637
+ ], 64));
6638
+ }
6639
+ }), hy = /* @__PURE__ */ Mo.defineComponent({
6640
+ __name: "NumberFieldInput",
6641
+ props: {
6642
+ asChild: { type: Boolean },
6643
+ as: { default: "input" }
6644
+ },
6645
+ setup(a2) {
6646
+ const t = a2, { primitiveElement: e, currentElement: n } = Ie(), l = Eo();
6647
+ function s(u) {
6648
+ u.target === document.activeElement && (Math.abs(u.deltaY) <= Math.abs(u.deltaX) || (u.preventDefault(), u.deltaY > 0 ? l.handleIncrease() : u.deltaY < 0 && l.handleDecrease()));
6649
+ }
6650
+ Mo.onMounted(() => {
6651
+ l.onInputElement(n.value);
6652
+ });
6653
+ const r = Mo.ref(l.textValue.value);
6654
+ Mo.watch(() => l.textValue.value, () => {
6655
+ r.value = l.textValue.value;
6656
+ }, { immediate: true, deep: true });
6657
+ function i() {
6658
+ requestAnimationFrame(() => {
6659
+ r.value = l.textValue.value;
6660
+ });
6661
+ }
6662
+ return (u, d) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6663
+ id: Mo.unref(l).id.value,
6664
+ ref_key: "primitiveElement",
6665
+ ref: e,
6666
+ value: r.value,
6667
+ role: "spinbutton",
6668
+ type: "text",
6669
+ tabindex: "0",
6670
+ inputmode: Mo.unref(l).inputMode.value,
6671
+ disabled: Mo.unref(l).disabled.value ? "" : void 0,
6672
+ "data-disabled": Mo.unref(l).disabled.value ? "" : void 0,
6673
+ autocomplete: "off",
6674
+ autocorrect: "off",
6675
+ spellcheck: "false",
6676
+ "aria-roledescription": "Number field",
6677
+ "aria-valuenow": Mo.unref(l).modelValue.value,
6678
+ "aria-valuemin": Mo.unref(l).min.value,
6679
+ "aria-valuemax": Mo.unref(l).max.value,
6680
+ onKeydown: [
6681
+ d[0] || (d[0] = Mo.withKeys(Mo.withModifiers((c) => Mo.unref(l).handleIncrease(), ["prevent"]), ["up"])),
6682
+ d[1] || (d[1] = Mo.withKeys(Mo.withModifiers((c) => Mo.unref(l).handleDecrease(), ["prevent"]), ["down"])),
6683
+ d[2] || (d[2] = Mo.withKeys(Mo.withModifiers((c) => Mo.unref(l).handleIncrease(10), ["prevent"]), ["page-up"])),
6684
+ d[3] || (d[3] = Mo.withKeys(Mo.withModifiers((c) => Mo.unref(l).handleDecrease(10), ["prevent"]), ["page-down"])),
6685
+ d[4] || (d[4] = Mo.withKeys(Mo.withModifiers((c) => Mo.unref(l).handleMinMaxValue("min"), ["prevent"]), ["home"])),
6686
+ d[5] || (d[5] = Mo.withKeys(Mo.withModifiers((c) => Mo.unref(l).handleMinMaxValue("max"), ["prevent"]), ["end"])),
6687
+ d[8] || (d[8] = Mo.withKeys((c) => {
6688
+ var f;
6689
+ return Mo.unref(l).applyInputValue((f = c.target) == null ? void 0 : f.value);
6690
+ }, ["enter"]))
6691
+ ],
6692
+ onWheel: s,
6693
+ onBeforeinput: d[6] || (d[6] = (c) => {
6694
+ const f = c.target;
6695
+ let v = f.value.slice(0, f.selectionStart ?? void 0) + (c.data ?? "") + f.value.slice(f.selectionEnd ?? void 0);
6696
+ Mo.unref(l).validate(v) || c.preventDefault();
6697
+ }),
6698
+ onInput: d[7] || (d[7] = (c) => {
6699
+ const f = c.target;
6700
+ r.value = f.value;
6701
+ }),
6702
+ onChange: i,
6703
+ onBlur: d[9] || (d[9] = (c) => {
6704
+ var f;
6705
+ return Mo.unref(l).applyInputValue((f = c.target) == null ? void 0 : f.value);
6706
+ })
6707
+ }), {
6708
+ default: Mo.withCtx(() => [
6709
+ Mo.renderSlot(u.$slots, "default")
6710
+ ]),
6711
+ _: 3
6712
+ }, 16, ["id", "value", "inputmode", "disabled", "data-disabled", "aria-valuenow", "aria-valuemin", "aria-valuemax"]));
6713
+ }
6714
+ }), yy = /* @__PURE__ */ Mo.defineComponent({
6715
+ __name: "NumberFieldIncrement",
6716
+ props: {
6717
+ disabled: { type: Boolean },
6718
+ asChild: { type: Boolean },
6719
+ as: { default: "button" }
6720
+ },
6721
+ setup(a2) {
6722
+ const t = a2, e = Eo(), n = Mo.computed(() => {
6723
+ var u;
6724
+ return ((u = e.disabled) == null ? void 0 : u.value) || t.disabled || e.isIncreaseDisabled.value;
6725
+ }), { primitiveElement: l, currentElement: s } = Ie(), { isPressed: r, onTrigger: i } = hs({ target: s, disabled: n });
6726
+ return i(() => {
6727
+ e.handleIncrease();
6728
+ }), (u, d) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6729
+ ref_key: "primitiveElement",
6730
+ ref: l,
6731
+ tabindex: "-1",
6732
+ "aria-label": "Increase",
6733
+ type: u.as === "button" ? "button" : void 0,
6734
+ style: {
6735
+ userSelect: Mo.unref(r) ? "none" : void 0
6736
+ },
6737
+ disabled: n.value ? "" : void 0,
6738
+ "data-disabled": n.value ? "" : void 0,
6739
+ "data-pressed": Mo.unref(r) ? "true" : void 0,
6740
+ onContextmenu: d[0] || (d[0] = Mo.withModifiers(() => {
6741
+ }, ["prevent"]))
6742
+ }), {
6743
+ default: Mo.withCtx(() => [
6744
+ Mo.renderSlot(u.$slots, "default")
6745
+ ]),
6746
+ _: 3
6747
+ }, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
6748
+ }
6749
+ }), gy = /* @__PURE__ */ Mo.defineComponent({
6750
+ __name: "NumberFieldDecrement",
6751
+ props: {
6752
+ disabled: { type: Boolean },
6753
+ asChild: { type: Boolean },
6754
+ as: { default: "button" }
6755
+ },
6756
+ setup(a2) {
6757
+ const t = a2, e = Eo(), n = Mo.computed(() => {
6758
+ var u;
6759
+ return ((u = e.disabled) == null ? void 0 : u.value) || t.disabled || e.isDecreaseDisabled.value;
6760
+ }), { primitiveElement: l, currentElement: s } = Ie(), { isPressed: r, onTrigger: i } = hs({ target: s, disabled: n });
6761
+ return i(() => {
6762
+ e.handleDecrease();
6763
+ }), (u, d) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6764
+ ref_key: "primitiveElement",
6765
+ ref: l,
6766
+ tabindex: "-1",
6767
+ "aria-label": "Decrease",
6768
+ type: u.as === "button" ? "button" : void 0,
6769
+ style: {
6770
+ userSelect: Mo.unref(r) ? "none" : void 0
6771
+ },
6772
+ disabled: n.value ? "" : void 0,
6773
+ "data-disabled": n.value ? "" : void 0,
6774
+ "data-pressed": Mo.unref(r) ? "true" : void 0,
6775
+ onContextmenu: d[0] || (d[0] = Mo.withModifiers(() => {
6776
+ }, ["prevent"]))
6777
+ }), {
6778
+ default: Mo.withCtx(() => [
6779
+ Mo.renderSlot(u.$slots, "default")
6780
+ ]),
6781
+ _: 3
6782
+ }, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
6783
+ }
6784
+ });
6105
6785
  const Gc = ["id", "value", "name", "disabled", "required"], [qc, Yc] = Q("PinInputRoot"), Dy = /* @__PURE__ */ Mo.defineComponent({
6106
6786
  inheritAttrs: false,
6107
6787
  __name: "PinInputRoot",
@@ -9769,9 +10449,11 @@ exports.fh = fh;
9769
10449
  exports.flip = flip;
9770
10450
  exports.gg = gg;
9771
10451
  exports.gs = gs;
10452
+ exports.gy = gy;
9772
10453
  exports.hg = hg;
9773
10454
  exports.hh = hh;
9774
10455
  exports.hide = hide;
10456
+ exports.hy = hy;
9775
10457
  exports.ih = ih;
9776
10458
  exports.inline = inline;
9777
10459
  exports.jg = jg;
@@ -9780,6 +10462,7 @@ exports.jy = jy;
9780
10462
  exports.ky = ky;
9781
10463
  exports.lv = lv;
9782
10464
  exports.mg = mg;
10465
+ exports.my = my;
9783
10466
  exports.ng = ng;
9784
10467
  exports.nm = nm;
9785
10468
  exports.offset = offset;
@@ -9803,6 +10486,7 @@ exports.xs = xs;
9803
10486
  exports.xu = xu;
9804
10487
  exports.yg = yg;
9805
10488
  exports.ys = ys;
10489
+ exports.yy = yy;
9806
10490
  exports.zg = zg;
9807
10491
  exports.zv = zv;
9808
10492
  exports.zy = zy;