@caspeco/casper-ui-library 10.9.0 → 11.0.0

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.
@@ -1,6 +1,9 @@
1
1
  import { CountryCode } from 'libphonenumber-js/mobile/es6';
2
2
  import { Locales } from './translations.js';
3
- /** Lowercases and strips diacritics for accent-insensitive search (e.g. "espana" matches "España"). */
3
+ /**
4
+ * Lowercases and strips diacritics for accent-insensitive search (e.g. "espana" matches "España"),
5
+ * and strips a leading "+" so dial codes can be searched the way they're dialed (e.g. "+46").
6
+ */
4
7
  export declare function normalizeForSearch(value: string): string;
5
8
  /** A country row produced by {@link getLocalizedCountries}. */
6
9
  export interface CountryItem {
@@ -1 +1 @@
1
- {"version":3,"file":"country-data.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAQD,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;CACnB;AAgBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,EAAE,CAmBpE"}
1
+ {"version":3,"file":"country-data.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAQD,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;CACnB;AAgBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,EAAE,CAmBpE"}
@@ -2,7 +2,7 @@ import { getCountries as e } from "../../node_modules/libphonenumber-js/mobile/e
2
2
  import { getCountryCallingCode as t } from "../../node_modules/libphonenumber-js/mobile/es6/exports/getCountryCallingCode.js";
3
3
  //#region lib/components/phone-input/country-data.ts
4
4
  function n(e) {
5
- return e.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase();
5
+ return e.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase().replace(/^\+/, "");
6
6
  }
7
7
  var r = e().map((e) => {
8
8
  let n = new Intl.Locale(`und-${e}`).maximize().language, r = new Intl.DisplayNames([n], { type: "region" }).of(e) ?? e;
@@ -2,17 +2,17 @@
2
2
  var e = {
3
3
  searchCountryPlaceholder: "Search country...",
4
4
  noCountriesFound: "No countries found",
5
- enterPhoneNumberPlaceholder: "Enter your phone number",
6
- numberLooksIncomplete: "Please enter a valid phone number",
7
- requiredFieldEmpty: "Phone number is required",
5
+ enterPhoneNumberPlaceholder: "Enter your mobile number",
6
+ numberLooksIncomplete: "Please enter a valid mobile number",
7
+ requiredFieldEmpty: "Mobile number is required",
8
8
  openCountrySelector: "Open country selector"
9
9
  }, t = {
10
10
  "sv-SE": {
11
11
  searchCountryPlaceholder: "Sök land...",
12
12
  noCountriesFound: "Inga länder hittades",
13
- enterPhoneNumberPlaceholder: "Ange ditt telefonnummer",
14
- numberLooksIncomplete: "Ange ett giltigt telefonnummer",
15
- requiredFieldEmpty: "Telefonnummer krävs",
13
+ enterPhoneNumberPlaceholder: "Ange ditt mobilnummer",
14
+ numberLooksIncomplete: "Ange ett giltigt mobilnummer",
15
+ requiredFieldEmpty: "Mobilnummer krävs",
16
16
  openCountrySelector: "Öppna landsväljaren"
17
17
  },
18
18
  "en-US": e,
@@ -20,33 +20,33 @@ var e = {
20
20
  "nb-NO": {
21
21
  searchCountryPlaceholder: "Søk land...",
22
22
  noCountriesFound: "Ingen land funnet",
23
- enterPhoneNumberPlaceholder: "Skriv inn telefonnummeret ditt",
24
- numberLooksIncomplete: "Skriv inn et gyldig telefonnummer",
25
- requiredFieldEmpty: "Telefonnummer er påkrevd",
23
+ enterPhoneNumberPlaceholder: "Skriv inn mobilnummeret ditt",
24
+ numberLooksIncomplete: "Skriv inn et gyldig mobilnummer",
25
+ requiredFieldEmpty: "Mobilnummer er påkrevd",
26
26
  openCountrySelector: "Åpne landvelgeren"
27
27
  },
28
28
  "da-DK": {
29
29
  searchCountryPlaceholder: "Søg land...",
30
30
  noCountriesFound: "Ingen lande fundet",
31
- enterPhoneNumberPlaceholder: "Indtast dit telefonnummer",
32
- numberLooksIncomplete: "Indtast et gyldigt telefonnummer",
33
- requiredFieldEmpty: "Telefonnummer er påkrævet",
31
+ enterPhoneNumberPlaceholder: "Indtast dit mobilnummer",
32
+ numberLooksIncomplete: "Indtast et gyldigt mobilnummer",
33
+ requiredFieldEmpty: "Mobilnummer er påkrævet",
34
34
  openCountrySelector: "Åbn landevælgeren"
35
35
  },
36
36
  "fr-FR": {
37
37
  searchCountryPlaceholder: "Rechercher un pays...",
38
38
  noCountriesFound: "Aucun pays trouvé",
39
- enterPhoneNumberPlaceholder: "Entrez votre numéro de téléphone",
40
- numberLooksIncomplete: "Veuillez saisir un numéro de téléphone valide",
41
- requiredFieldEmpty: "Le numéro de téléphone est obligatoire",
39
+ enterPhoneNumberPlaceholder: "Entrez votre numéro de mobile",
40
+ numberLooksIncomplete: "Veuillez saisir un numéro de mobile valide",
41
+ requiredFieldEmpty: "Le numéro de mobile est obligatoire",
42
42
  openCountrySelector: "Ouvrir le sélecteur de pays"
43
43
  },
44
44
  "nl-BE": {
45
45
  searchCountryPlaceholder: "Zoek land...",
46
46
  noCountriesFound: "Geen landen gevonden",
47
- enterPhoneNumberPlaceholder: "Voer uw telefoonnummer in",
48
- numberLooksIncomplete: "Voer een geldig telefoonnummer in",
49
- requiredFieldEmpty: "Telefoonnummer is verplicht",
47
+ enterPhoneNumberPlaceholder: "Voer uw mobiele nummer in",
48
+ numberLooksIncomplete: "Voer een geldig mobiel nummer in",
49
+ requiredFieldEmpty: "Mobiel nummer is verplicht",
50
50
  openCountrySelector: "Landselector openen"
51
51
  }
52
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"quantity-button.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/quantity-button.composition.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS,mCAiBrB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAiBrB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAyC1B,CAAC"}
1
+ {"version":3,"file":"quantity-button.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/quantity-button.composition.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS,mCAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAKrB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAmC1B,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { QuantityButtonProps } from './types.js';
2
- export declare function QuantityButton({ size, quantity, onClickPlus, onClickMinus, minusButtonAriaLabel, plusButtonAriaLabel, min, max, disabled, ...props }: QuantityButtonProps): import("react").JSX.Element;
2
+ export declare function QuantityButton({ value, defaultValue, onValueChange, min, max, step, size, minusButtonAriaLabel, plusButtonAriaLabel, disabled, readOnly, invalid, id, "aria-label": ariaLabel, ...props }: QuantityButtonProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=quantity-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"quantity-button.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/quantity-button.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,cAAc,CAAC,EAC9B,IAAW,EACX,QAAY,EACZ,WAAW,EACX,YAAY,EACZ,oBAAiC,EACjC,mBAAgC,EAChC,GAAO,EACP,GAAQ,EACR,QAAgB,EAChB,GAAG,KAAK,EACR,EAAE,mBAAmB,+BAyDrB"}
1
+ {"version":3,"file":"quantity-button.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/quantity-button.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,cAAc,CAAC,EAC9B,KAAK,EACL,YAAY,EACZ,aAAa,EACb,GAAO,EACP,GAAQ,EACR,IAAQ,EACR,IAAmB,EACnB,oBAAiC,EACjC,mBAAgC,EAChC,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,EAAE,EACF,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACR,EAAE,mBAAmB,+BA0GrB"}
@@ -1,73 +1,129 @@
1
1
  import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
2
- import { ThemeBorderVariable as t, ThemeColorVariable as n, ThemeFontSizeVariable as r, ThemeFontVariable as i, ThemeRadiusVariable as a } from "../../theme/theme-types.js";
3
- import { MinusButton as o } from "./minus-button.js";
4
- import { PlusButton as s } from "./plus-button.js";
5
- import { Box as c, Flex as l, Text as u } from "@chakra-ui/react";
6
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
2
+ import { ThemeBreakPointToken as t } from "../../theme/theme-tokens.js";
3
+ import { ThemeBorderVariable as n, ThemeColorVariable as r, ThemeFontSizeVariable as i, ThemeFontVariable as ee, ThemeRadiusVariable as te } from "../../theme/theme-types.js";
4
+ import { DecreaseIcon as ne } from "../icon/icons/decrease-icon.js";
5
+ import { IncreaseIcon as re } from "../icon/icons/increase-icon.js";
6
+ import { IconButton as a } from "../icon-button/icon-button.js";
7
+ import { useState as ie } from "react";
8
+ import { Box as ae, Flex as o, NumberInputDecrementTrigger as oe, NumberInputIncrementTrigger as se, NumberInputInput as ce, NumberInputRoot as le, useBreakpointValue as ue, useControllableState as de } from "@chakra-ui/react";
9
+ import { jsx as s, jsxs as fe } from "react/jsx-runtime";
7
10
  //#region lib/components/quantity-button/quantity-button.tsx
8
- var p = e();
9
- function m(e) {
10
- let m = (0, p.c)(33), h, g, _, v, y, b, x, S, C, w;
11
- m[0] === e ? (h = m[1], g = m[2], _ = m[3], v = m[4], y = m[5], b = m[6], x = m[7], S = m[8], C = m[9], w = m[10]) : ({size: v, quantity: y, onClickPlus: g, onClickMinus: h, minusButtonAriaLabel: b, plusButtonAriaLabel: x, min: S, max: C, disabled: w, ..._} = e, m[0] = e, m[1] = h, m[2] = g, m[3] = _, m[4] = v, m[5] = y, m[6] = b, m[7] = x, m[8] = S, m[9] = C, m[10] = w);
12
- let T = v === void 0 ? "sm" : v, E = y === void 0 ? 0 : y, D = b === void 0 ? "decrease" : b, O = x === void 0 ? "increase" : x, k = S === void 0 ? 0 : S, A = C === void 0 ? 99 : C, j = w !== void 0 && w, M = T === "lg", N = M ? "160px" : "120px", P = M ? "lg" : "md", F = M ? r.XLarge : r.Large, I = E <= k || j, L;
13
- m[11] !== P || m[12] !== D || m[13] !== h || m[14] !== I ? (L = /* @__PURE__ */ d(o, {
14
- onClick: h,
15
- ariaLabel: D,
16
- buttonSize: P,
17
- isDisabled: I
18
- }), m[11] = P, m[12] = D, m[13] = h, m[14] = I, m[15] = L) : L = m[15];
19
- let R;
20
- m[16] !== E || m[17] !== F ? (R = /* @__PURE__ */ d(l, {
21
- justify: "center",
22
- align: "center",
23
- userSelect: "none",
24
- zIndex: -1,
25
- left: "0",
26
- right: "0",
27
- ml: "auto",
28
- mr: "auto",
29
- position: "absolute",
30
- h: "100%",
31
- children: /* @__PURE__ */ d(u, {
32
- fontFamily: i.SubHeader,
33
- fontWeight: "normal",
34
- fontSize: F,
35
- color: n.OnSurface,
36
- children: E
11
+ var pe = e(), c = "sm";
12
+ function l(e) {
13
+ let l = (0, pe.c)(60), u, d, f, p, m, h, g, _, v, y, b, x, S, C, w;
14
+ l[0] === e ? (u = l[1], d = l[2], f = l[3], p = l[4], m = l[5], h = l[6], g = l[7], _ = l[8], v = l[9], y = l[10], b = l[11], x = l[12], S = l[13], C = l[14], w = l[15]) : ({value: w, defaultValue: d, onValueChange: p, min: h, max: g, step: _, size: v, minusButtonAriaLabel: y, plusButtonAriaLabel: b, disabled: x, readOnly: S, invalid: C, id: f, "aria-label": u, ...m} = e, l[0] = e, l[1] = u, l[2] = d, l[3] = f, l[4] = p, l[5] = m, l[6] = h, l[7] = g, l[8] = _, l[9] = v, l[10] = y, l[11] = b, l[12] = x, l[13] = S, l[14] = C, l[15] = w);
15
+ let T = h === void 0 ? 0 : h, E = g === void 0 ? 99 : g, D = _ === void 0 ? 1 : _, O = v === void 0 ? c : v, k = y === void 0 ? "decrease" : y, A = b === void 0 ? "increase" : b, j = x !== void 0 && x, M = S !== void 0 && S, N = C !== void 0 && C, P = d ?? T, F;
16
+ l[16] !== p || l[17] !== P || l[18] !== w ? (F = {
17
+ value: w,
18
+ defaultValue: P,
19
+ onChange: p
20
+ }, l[16] = p, l[17] = P, l[18] = w, l[19] = F) : F = l[19];
21
+ let [me, I] = de(F), [he, L] = ie(null), R = (ue(typeof O == "string" || O === void 0 ? { [t.Base]: O ?? c } : O, { fallback: c }) ?? c) === "lg", z = R ? "160px" : "120px", B = R ? "lg" : "md", V = he ?? String(me), H;
22
+ l[20] !== k || l[21] !== A ? (H = {
23
+ incrementLabel: A,
24
+ decrementLabel: k
25
+ }, l[20] = k, l[21] = A, l[22] = H) : H = l[22];
26
+ let U;
27
+ l[23] === I ? U = l[24] : (U = (e) => {
28
+ let { value: t, valueAsNumber: n } = e;
29
+ L(t), Number.isNaN(n) || I(n);
30
+ }, l[23] = I, l[24] = U);
31
+ let W;
32
+ l[25] !== T || l[26] !== I ? (W = (e) => {
33
+ let { focused: t, valueAsNumber: n } = e;
34
+ t || (L(null), Number.isNaN(n) && I(T));
35
+ }, l[25] = T, l[26] = I, l[27] = W) : W = l[27];
36
+ let G;
37
+ l[28] === Symbol.for("react.memo_cache_sentinel") ? (G = {
38
+ borderColor: r.Info,
39
+ boxShadow: `0 0 0 4px ${r.InfoContainer}`
40
+ }, l[28] = G) : G = l[28];
41
+ let K;
42
+ l[29] !== B || l[30] !== k ? (K = /* @__PURE__ */ s(oe, {
43
+ asChild: !0,
44
+ children: /* @__PURE__ */ s(a, {
45
+ variant: "ghost",
46
+ icon: ne,
47
+ size: B,
48
+ "aria-label": k
37
49
  })
38
- }), m[16] = E, m[17] = F, m[18] = R) : R = m[18];
39
- let z = E >= A || j, B;
40
- m[19] !== P || m[20] !== g || m[21] !== O || m[22] !== z ? (B = /* @__PURE__ */ d(s, {
41
- isDisabled: z,
42
- onClick: g,
43
- ariaLabel: O,
44
- buttonSize: P
45
- }), m[19] = P, m[20] = g, m[21] = O, m[22] = z, m[23] = B) : B = m[23];
46
- let V;
47
- m[24] !== R || m[25] !== B || m[26] !== L || m[27] !== N ? (V = /* @__PURE__ */ d(c, {
48
- border: t.XSmall,
49
- borderColor: n.OnBackgroundBorder,
50
- borderRadius: a.XLarge,
51
- backgroundColor: n.Surface,
50
+ }), l[29] = B, l[30] = k, l[31] = K) : K = l[31];
51
+ let q = R ? i.XLarge : i.Large, J;
52
+ l[32] === Symbol.for("react.memo_cache_sentinel") ? (J = {
53
+ cursor: "not-allowed",
54
+ color: r.OnSurfaceSubdued
55
+ }, l[32] = J) : J = l[32];
56
+ let Y;
57
+ l[33] !== u || l[34] !== f || l[35] !== q ? (Y = /* @__PURE__ */ s(ce, {
58
+ unstyled: !0,
59
+ id: f,
60
+ "aria-label": u,
61
+ flex: 1,
62
+ minWidth: 0,
63
+ alignSelf: "stretch",
64
+ textAlign: "center",
65
+ border: "none",
66
+ outline: "none",
67
+ background: "transparent",
68
+ cursor: "text",
69
+ fontFamily: ee.SubHeader,
70
+ fontSize: q,
71
+ color: r.OnSurface,
72
+ _disabled: J
73
+ }), l[33] = u, l[34] = f, l[35] = q, l[36] = Y) : Y = l[36];
74
+ let X;
75
+ l[37] !== B || l[38] !== A ? (X = /* @__PURE__ */ s(se, {
76
+ asChild: !0,
77
+ children: /* @__PURE__ */ s(a, {
78
+ variant: "ghost",
79
+ icon: re,
80
+ size: B,
81
+ "aria-label": A
82
+ })
83
+ }), l[37] = B, l[38] = A, l[39] = X) : X = l[39];
84
+ let Z;
85
+ l[40] !== K || l[41] !== Y || l[42] !== X ? (Z = /* @__PURE__ */ s(ae, {
86
+ width: "100%",
87
+ border: n.XSmall,
88
+ borderColor: r.OnBackgroundBorder,
89
+ borderRadius: te.XLarge,
90
+ backgroundColor: r.Surface,
52
91
  opacity: .88,
53
- children: /* @__PURE__ */ f(l, {
92
+ _focusWithin: G,
93
+ children: /* @__PURE__ */ fe(o, {
94
+ align: "center",
54
95
  justify: "space-between",
55
- position: "relative",
56
- zIndex: 1,
57
- w: N,
58
96
  children: [
59
- L,
60
- R,
61
- B
97
+ K,
98
+ Y,
99
+ X
62
100
  ]
63
101
  })
64
- }), m[24] = R, m[25] = B, m[26] = L, m[27] = N, m[28] = V) : V = m[28];
65
- let H;
66
- return m[29] !== _ || m[30] !== V || m[31] !== N ? (H = /* @__PURE__ */ d(l, {
67
- w: N,
68
- ..._,
69
- children: V
70
- }), m[29] = _, m[30] = V, m[31] = N, m[32] = H) : H = m[32], H;
102
+ }), l[40] = K, l[41] = Y, l[42] = X, l[43] = Z) : Z = l[43];
103
+ let Q;
104
+ l[44] !== m || l[45] !== Z || l[46] !== z ? (Q = /* @__PURE__ */ s(o, {
105
+ w: z,
106
+ ...m,
107
+ children: Z
108
+ }), l[44] = m, l[45] = Z, l[46] = z, l[47] = Q) : Q = l[47];
109
+ let $;
110
+ return l[48] !== j || l[49] !== N || l[50] !== E || l[51] !== T || l[52] !== M || l[53] !== D || l[54] !== V || l[55] !== H || l[56] !== U || l[57] !== W || l[58] !== Q ? ($ = /* @__PURE__ */ s(le, {
111
+ unstyled: !0,
112
+ value: V,
113
+ min: T,
114
+ max: E,
115
+ step: D,
116
+ disabled: j,
117
+ readOnly: M,
118
+ invalid: N,
119
+ allowMouseWheel: !1,
120
+ clampValueOnBlur: !0,
121
+ spinOnPress: !0,
122
+ translations: H,
123
+ onValueChange: U,
124
+ onFocusChange: W,
125
+ children: Q
126
+ }), l[48] = j, l[49] = N, l[50] = E, l[51] = T, l[52] = M, l[53] = D, l[54] = V, l[55] = H, l[56] = U, l[57] = W, l[58] = Q, l[59] = $) : $ = l[59], $;
71
127
  }
72
128
  //#endregion
73
- export { m as QuantityButton };
129
+ export { l as QuantityButton };
@@ -3,26 +3,37 @@ import { ConditionalValue } from '@chakra-ui/react';
3
3
  type CustomThemeProps = PaddingProps & MarginProps & LayoutProps & ShadowProps & CustomChakraBoxProps;
4
4
  type CustomThemePropsWithExclusions = Omit<CustomThemeProps, "justify" | "justifyContent" | "zIndex">;
5
5
  export type QuantityButtonProps = {
6
- /** Function to be called when plus button is clicked. */
7
- onClickPlus: () => void;
8
- /** Function to be called when minus button is clicked. */
9
- onClickMinus: () => void;
10
- /** Quantity to display. 0 is not shown . */
11
- quantity?: number;
12
- /** Min number for quantity. Defaults to 0.
13
- * When quantity equals min, the minus button will be disabled. */
6
+ /** The current quantity. Pass with `onValueChange` for a controlled component. */
7
+ value?: number;
8
+ /** Starting quantity when the component manages its own value. */
9
+ defaultValue?: number;
10
+ /** Called with the new quantity, whether it was typed or stepped with the buttons. */
11
+ onValueChange?: (value: number) => void;
12
+ /** Lowest quantity that can be reached. Defaults to 0.
13
+ * When the quantity equals min, the decrease button is disabled. */
14
14
  min?: number;
15
- /** Max number for quantity. Defaults to 99.
16
- * When quantity equals max, the plus button will be disabled. */
15
+ /** Highest quantity that can be reached. Defaults to 99.
16
+ * When the quantity equals max, the increase button is disabled. */
17
17
  max?: number;
18
+ /** How much the buttons and arrow keys move the quantity. Defaults to 1. */
19
+ step?: number;
18
20
  /** The size of the component, default is small ('sm') */
19
21
  size?: ConditionalValue<"lg" | "sm"> | undefined;
20
- /** Aria label for icon with plus icon. Defaults to "increase" */
21
- plusButtonAriaLabel?: string;
22
- /** Aria label for icon with minus icon. Defaults to "decrease" */
22
+ /** Accessible name for the quantity field. The visible label usually sits outside the
23
+ * component, in which case pass `id` instead and point a label at it. */
24
+ "aria-label"?: string;
25
+ /** Id for the quantity field, to pair with an external label. */
26
+ id?: string;
27
+ /** Aria label for the decrease button. Defaults to "decrease" */
23
28
  minusButtonAriaLabel?: string;
24
- /** Disables plus and minus button */
29
+ /** Aria label for the increase button. Defaults to "increase" */
30
+ plusButtonAriaLabel?: string;
31
+ /** Disables the field and both buttons */
25
32
  disabled?: boolean;
33
+ /** Shows the quantity but does not allow changing it */
34
+ readOnly?: boolean;
35
+ /** Renders the invalid appearance */
36
+ invalid?: boolean;
26
37
  } & CustomThemePropsWithExclusions;
27
38
  export {};
28
39
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,KAAK,gBAAgB,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,oBAAoB,CAAC;AAEtG,KAAK,8BAA8B,GAAG,IAAI,CACzC,gBAAgB,EAEhB,SAAS,GAAG,gBAAgB,GAAG,QAAQ,CACvC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,yDAAyD;IACzD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,0DAA0D;IAC1D,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;sEACkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;qEACiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACjD,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kEAAkE;IAClE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,8BAA8B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,KAAK,gBAAgB,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,oBAAoB,CAAC;AAEtG,KAAK,8BAA8B,GAAG,IAAI,CACzC,gBAAgB,EAEhB,SAAS,GAAG,gBAAgB,GAAG,QAAQ,CACvC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;wEACoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;wEACoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,IAAI,CAAC,EAAE,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACjD;6EACyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,8BAA8B,CAAC"}
@@ -1888,24 +1888,34 @@ function vr(e, t, n) {
1888
1888
  raw: a
1889
1889
  };
1890
1890
  }
1891
- function yr(e, t, n, r) {
1891
+ var yr = 4;
1892
+ function br(e) {
1893
+ let t = 0;
1894
+ for (let n of e) t = n === " " ? t + yr - t % yr : t + 1;
1895
+ return t;
1896
+ }
1897
+ function xr(e, t, n, r, i) {
1892
1898
  if (!e || !Array.isArray(e.content)) return "";
1893
- let i = typeof n == "function" ? n(r) : n, [a, ...o] = e.content, s = `${i}${t.renderChildren([a])}`;
1894
- return o && o.length > 0 && o.forEach((e, n) => {
1899
+ let a = typeof n == "function" ? n(r) : n, [o, ...s] = e.content, c = `${a}${t.renderChildren([o])}`;
1900
+ return s && s.length > 0 && s.forEach((e, n) => {
1895
1901
  let r = t.renderChild?.call(t, e, n + 1) ?? t.renderChildren([e]);
1896
1902
  if (r != null) {
1897
- let n = r.split("\n").map((e) => e ? t.indent(e) : t.indent("")).join("\n");
1898
- s += e.type === "paragraph" ? `\n\n${n}` : `\n${n}`;
1903
+ let n = (e) => {
1904
+ if (!i?.alignNestedToPrefix) return t.indent(e);
1905
+ let n = t.indent(""), r = br(a);
1906
+ return (br(n) >= r ? n : " ".repeat(r)) + e;
1907
+ }, o = r.split("\n").map((e) => n(e || "")).join("\n");
1908
+ c += e.type === "paragraph" ? `\n\n${o}` : `\n${o}`;
1899
1909
  }
1900
- }), s;
1910
+ }), c;
1901
1911
  }
1902
- function br(e, t) {
1912
+ function Sr(e, t) {
1903
1913
  let n = { ...e };
1904
1914
  return Z(e) && Z(t) && Object.keys(t).forEach((r) => {
1905
- Z(t[r]) && Z(e[r]) ? n[r] = br(e[r], t[r]) : n[r] = t[r];
1915
+ Z(t[r]) && Z(e[r]) ? n[r] = Sr(e[r], t[r]) : n[r] = t[r];
1906
1916
  }), n;
1907
1917
  }
1908
- function xr(e, t, n = {}) {
1918
+ function Cr(e, t, n = {}) {
1909
1919
  let { state: r } = t, { doc: i, tr: a } = r, o = e;
1910
1920
  i.descendants((t, r) => {
1911
1921
  let i = a.mapping.map(r), s = a.mapping.map(r) + t.nodeSize, c = null;
@@ -1929,14 +1939,14 @@ var Q = class {
1929
1939
  constructor(e) {
1930
1940
  this.find = e.find, this.handler = e.handler, this.undoable = e.undoable ?? !0;
1931
1941
  }
1932
- }, Sr = (e, t) => {
1942
+ }, wr = (e, t) => {
1933
1943
  if (k(t)) return t.exec(e);
1934
1944
  let n = t(e);
1935
1945
  if (!n) return null;
1936
1946
  let r = [n.text];
1937
1947
  return r.index = n.index, r.input = e, r.data = n.data, n.replaceWith && (n.text.includes(n.replaceWith) || console.warn("[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\"."), r.push(n.replaceWith)), r;
1938
1948
  };
1939
- function Cr(e) {
1949
+ function Tr(e) {
1940
1950
  let { editor: t, from: n, to: r, text: i, rules: a, plugin: o } = e, { view: s } = t;
1941
1951
  if (s.composing) return !1;
1942
1952
  let c = s.state.doc.resolve(n);
@@ -1944,7 +1954,7 @@ function Cr(e) {
1944
1954
  let l = !1, u = rn(c) + i;
1945
1955
  return a.forEach((e) => {
1946
1956
  if (l) return;
1947
- let a = Sr(u, e.find);
1957
+ let a = wr(u, e.find);
1948
1958
  if (!a) return;
1949
1959
  let d = a[0].length - i.length;
1950
1960
  if (d > 0) {
@@ -1976,7 +1986,7 @@ function Cr(e) {
1976
1986
  }), s.dispatch(f), l = !0);
1977
1987
  }), l;
1978
1988
  }
1979
- function wr(e) {
1989
+ function Er(e) {
1980
1990
  let { editor: t, rules: n } = e, i = new y({
1981
1991
  state: {
1982
1992
  init() {
@@ -1990,7 +2000,7 @@ function wr(e) {
1990
2000
  let { text: e } = c;
1991
2001
  e = typeof e == "string" ? e : H(r.from(e), o.schema);
1992
2002
  let { from: a } = c, s = a + e.length;
1993
- Cr({
2003
+ Tr({
1994
2004
  editor: t,
1995
2005
  from: a,
1996
2006
  to: s,
@@ -2003,7 +2013,7 @@ function wr(e) {
2003
2013
  },
2004
2014
  props: {
2005
2015
  handleTextInput(e, r, a, o) {
2006
- return Cr({
2016
+ return Tr({
2007
2017
  editor: t,
2008
2018
  from: r,
2009
2019
  to: a,
@@ -2014,7 +2024,7 @@ function wr(e) {
2014
2024
  },
2015
2025
  handleDOMEvents: { compositionend: (e) => (setTimeout(() => {
2016
2026
  let { $cursor: r } = e.state.selection;
2017
- r && Cr({
2027
+ r && Tr({
2018
2028
  editor: t,
2019
2029
  from: r.pos,
2020
2030
  to: r.pos,
@@ -2026,7 +2036,7 @@ function wr(e) {
2026
2036
  handleKeyDown(e, r) {
2027
2037
  if (r.key !== "Enter") return !1;
2028
2038
  let { $cursor: a } = e.state.selection;
2029
- return a ? Cr({
2039
+ return a ? Tr({
2030
2040
  editor: t,
2031
2041
  from: a.pos,
2032
2042
  to: a.pos,
@@ -2040,7 +2050,7 @@ function wr(e) {
2040
2050
  });
2041
2051
  return i;
2042
2052
  }
2043
- var Tr = class {
2053
+ var Dr = class {
2044
2054
  constructor(e = {}) {
2045
2055
  this.type = "extendable", this.parent = null, this.child = null, this.name = "", this.config = { name: this.name }, this.config = {
2046
2056
  ...this.config,
@@ -2059,7 +2069,7 @@ var Tr = class {
2059
2069
  configure(e = {}) {
2060
2070
  let t = this.extend({
2061
2071
  ...this.config,
2062
- addOptions: () => br(this.options, e)
2072
+ addOptions: () => Sr(this.options, e)
2063
2073
  });
2064
2074
  return t.name = this.name, t.parent = this.parent, this.child = null, t;
2065
2075
  }
@@ -2070,7 +2080,7 @@ var Tr = class {
2070
2080
  });
2071
2081
  return t.parent = this, this.child = t, t.name = "name" in e ? e.name : t.parent.name, t;
2072
2082
  }
2073
- }, Er = class e extends Tr {
2083
+ }, Or = class e extends Dr {
2074
2084
  constructor(...e) {
2075
2085
  super(...e), this.type = "mark";
2076
2086
  }
@@ -2095,11 +2105,11 @@ var Tr = class {
2095
2105
  let t = typeof e == "function" ? e() : e;
2096
2106
  return super.extend(t);
2097
2107
  }
2098
- }, Dr = class {
2108
+ }, kr = class {
2099
2109
  constructor(e) {
2100
2110
  this.find = e.find, this.handler = e.handler;
2101
2111
  }
2102
- }, Or = (e, t, n) => {
2112
+ }, Ar = (e, t, n) => {
2103
2113
  if (k(t)) return [...e.matchAll(t)];
2104
2114
  let r = t(e, n);
2105
2115
  return r ? r.map((t) => {
@@ -2107,7 +2117,7 @@ var Tr = class {
2107
2117
  return n.index = t.index, n.input = e, n.data = t.data, t.replaceWith && (t.text.includes(t.replaceWith) || console.warn("[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\"."), n.push(t.replaceWith)), n;
2108
2118
  }) : [];
2109
2119
  };
2110
- function kr(e) {
2120
+ function jr(e) {
2111
2121
  let { editor: t, state: n, from: r, to: i, rule: a, pasteEvent: o, dropEvent: s } = e, { commands: c, chain: l, can: u } = new D({
2112
2122
  editor: t,
2113
2123
  state: n
@@ -2116,7 +2126,7 @@ function kr(e) {
2116
2126
  var f;
2117
2127
  if ((f = e.type) != null && (f = f.spec) != null && f.code || !(e.isText || e.isTextblock || e.isInline)) return;
2118
2128
  let p = e.content?.size ?? e.nodeSize ?? 0, m = Math.max(r, t), h = Math.min(i, t + p);
2119
- m >= h || Or(e.isText ? e.text || "" : e.textBetween(m - t, h - t, void 0, ""), a.find, o).forEach((e) => {
2129
+ m >= h || Ar(e.isText ? e.text || "" : e.textBetween(m - t, h - t, void 0, ""), a.find, o).forEach((e) => {
2120
2130
  if (e.index === void 0) return;
2121
2131
  let t = m + e.index + 1, r = t + e[0].length, i = {
2122
2132
  from: n.tr.mapping.map(t),
@@ -2135,12 +2145,12 @@ function kr(e) {
2135
2145
  });
2136
2146
  }), d.every((e) => e !== null);
2137
2147
  }
2138
- var Ar = null, jr = (e) => {
2148
+ var Mr = null, Nr = (e) => {
2139
2149
  var t;
2140
2150
  let n = new ClipboardEvent("paste", { clipboardData: new DataTransfer() });
2141
2151
  return (t = n.clipboardData) == null || t.setData("text/html", e), n;
2142
2152
  };
2143
- function Mr(e) {
2153
+ function Pr(e) {
2144
2154
  let { editor: t, rules: n } = e, i = null, a = !1, o = !1, s = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, c;
2145
2155
  try {
2146
2156
  c = typeof DragEvent < "u" ? new DragEvent("drop") : null;
@@ -2152,7 +2162,7 @@ function Mr(e) {
2152
2162
  state: e,
2153
2163
  transaction: o
2154
2164
  });
2155
- if (!(!kr({
2165
+ if (!(!jr({
2156
2166
  editor: t,
2157
2167
  state: l,
2158
2168
  from: Math.max(n - 1, 0),
@@ -2172,9 +2182,9 @@ function Mr(e) {
2172
2182
  return n.map((e) => new y({
2173
2183
  view(e) {
2174
2184
  let n = (n) => {
2175
- i = e.dom.parentElement?.contains(n.target) ? e.dom.parentElement : null, i && (Ar = t);
2185
+ i = e.dom.parentElement?.contains(n.target) ? e.dom.parentElement : null, i && (Mr = t);
2176
2186
  }, r = () => {
2177
- Ar &&= null;
2187
+ Mr &&= null;
2178
2188
  };
2179
2189
  return window.addEventListener("dragstart", n), window.addEventListener("dragend", r), { destroy() {
2180
2190
  window.removeEventListener("dragstart", n), window.removeEventListener("dragend", r);
@@ -2183,7 +2193,7 @@ function Mr(e) {
2183
2193
  props: { handleDOMEvents: {
2184
2194
  drop: (e, t) => {
2185
2195
  if (o = i === e.dom.parentElement, c = t, !o) {
2186
- let e = Ar;
2196
+ let e = Mr;
2187
2197
  e?.isEditable && setTimeout(() => {
2188
2198
  let t = e.state.selection;
2189
2199
  t && e.commands.deleteRange({
@@ -2205,7 +2215,7 @@ function Mr(e) {
2205
2215
  if (p) {
2206
2216
  let { text: t } = f;
2207
2217
  t = typeof t == "string" ? t : H(r.from(t), i.schema);
2208
- let { from: n } = f, a = n + t.length, o = jr(t);
2218
+ let { from: n } = f, a = n + t.length, o = Nr(t);
2209
2219
  return l({
2210
2220
  rule: e,
2211
2221
  state: i,
@@ -2225,7 +2235,7 @@ function Mr(e) {
2225
2235
  }
2226
2236
  }));
2227
2237
  }
2228
- var Nr = class {
2238
+ var Fr = class {
2229
2239
  constructor(e, t) {
2230
2240
  this.splittableMarks = [], this.nonClearableMarks = [], this.decorationManager = null, this.editor = t, this.baseExtensions = e, this.extensions = Ht(e), this.schema = Bt(this.extensions, t), this.setupExtensions();
2231
2241
  }
@@ -2253,7 +2263,7 @@ var Nr = class {
2253
2263
  editor: e,
2254
2264
  type: q(t.name, this.schema)
2255
2265
  }, r = [], i = B(t, "addKeyboardShortcuts", n), a = {};
2256
- if (t.type === "mark" && B(t, "exitable", n) && (a.ArrowRight = () => Er.handleExit({
2266
+ if (t.type === "mark" && B(t, "exitable", n) && (a.ArrowRight = () => Or.handleExit({
2257
2267
  editor: e,
2258
2268
  mark: t
2259
2269
  })), i) {
@@ -2269,7 +2279,7 @@ var Nr = class {
2269
2279
  if (ln(t, e.options.enableInputRules) && s) {
2270
2280
  let t = s();
2271
2281
  if (t && t.length) {
2272
- let n = wr({
2282
+ let n = Er({
2273
2283
  editor: e,
2274
2284
  rules: t
2275
2285
  }), i = Array.isArray(n) ? n : [n];
@@ -2280,7 +2290,7 @@ var Nr = class {
2280
2290
  if (ln(t, e.options.enablePasteRules) && c) {
2281
2291
  let t = c();
2282
2292
  if (t && t.length) {
2283
- let n = Mr({
2293
+ let n = Pr({
2284
2294
  editor: e,
2285
2295
  rules: t
2286
2296
  });
@@ -2402,7 +2412,7 @@ var Nr = class {
2402
2412
  extension: t,
2403
2413
  HTMLAttributes: s,
2404
2414
  updateAttributes: (t) => {
2405
- xr(i, e, t);
2415
+ Cr(i, e, t);
2406
2416
  }
2407
2417
  });
2408
2418
  }] : [];
@@ -2434,8 +2444,8 @@ var Nr = class {
2434
2444
  });
2435
2445
  }
2436
2446
  };
2437
- Nr.resolve = Ht, Nr.sort = K, Nr.flatten = V;
2438
- var $ = class e extends Tr {
2447
+ Fr.resolve = Ht, Fr.sort = K, Fr.flatten = V;
2448
+ var $ = class e extends Dr {
2439
2449
  constructor(...e) {
2440
2450
  super(...e), this.type = "extension";
2441
2451
  }
@@ -2450,7 +2460,7 @@ var $ = class e extends Tr {
2450
2460
  let t = typeof e == "function" ? e() : e;
2451
2461
  return super.extend(t);
2452
2462
  }
2453
- }, Pr = $.create({
2463
+ }, Ir = $.create({
2454
2464
  name: "clipboardTextSerializer",
2455
2465
  addOptions() {
2456
2466
  return { blockSeparator: void 0 };
@@ -2470,12 +2480,12 @@ var $ = class e extends Tr {
2470
2480
  } }
2471
2481
  })];
2472
2482
  }
2473
- }), Fr = $.create({
2483
+ }), Lr = $.create({
2474
2484
  name: "commands",
2475
2485
  addCommands() {
2476
2486
  return { ...Wn };
2477
2487
  }
2478
- }), Ir = $.create({
2488
+ }), Rr = $.create({
2479
2489
  name: "delete",
2480
2490
  onUpdate({ transaction: e, appendedTransactions: t }) {
2481
2491
  var n;
@@ -2529,7 +2539,7 @@ var $ = class e extends Tr {
2529
2539
  };
2530
2540
  ((n = this.editor.options.coreExtensionOptions) == null || (n = n.delete) == null ? void 0 : n.async) ?? !0 ? setTimeout(r, 0) : r();
2531
2541
  }
2532
- }), Lr = $.create({
2542
+ }), zr = $.create({
2533
2543
  name: "drop",
2534
2544
  addProseMirrorPlugins() {
2535
2545
  return [new y({
@@ -2544,7 +2554,7 @@ var $ = class e extends Tr {
2544
2554
  } }
2545
2555
  })];
2546
2556
  }
2547
- }), Rr = $.create({
2557
+ }), Br = $.create({
2548
2558
  name: "editable",
2549
2559
  addProseMirrorPlugins() {
2550
2560
  return [new y({
@@ -2552,12 +2562,12 @@ var $ = class e extends Tr {
2552
2562
  props: { editable: () => this.editor.options.editable }
2553
2563
  })];
2554
2564
  }
2555
- }), zr = new b("focusEvents"), Br = $.create({
2565
+ }), Vr = new b("focusEvents"), Hr = $.create({
2556
2566
  name: "focusEvents",
2557
2567
  addProseMirrorPlugins() {
2558
2568
  let { editor: e } = this;
2559
2569
  return [new y({
2560
- key: zr,
2570
+ key: Vr,
2561
2571
  props: { handleDOMEvents: {
2562
2572
  focus: (t, n) => {
2563
2573
  e.isFocused = !0;
@@ -2572,7 +2582,7 @@ var $ = class e extends Tr {
2572
2582
  } }
2573
2583
  })];
2574
2584
  }
2575
- }), Vr = $.create({
2585
+ }), Ur = $.create({
2576
2586
  name: "keymap",
2577
2587
  addKeyboardShortcuts() {
2578
2588
  let e = () => this.editor.commands.first(({ commands: e }) => [
@@ -2636,7 +2646,7 @@ var $ = class e extends Tr {
2636
2646
  }
2637
2647
  })];
2638
2648
  }
2639
- }), Hr = $.create({
2649
+ }), Wr = $.create({
2640
2650
  name: "paste",
2641
2651
  addProseMirrorPlugins() {
2642
2652
  return [new y({
@@ -2650,7 +2660,7 @@ var $ = class e extends Tr {
2650
2660
  } }
2651
2661
  })];
2652
2662
  }
2653
- }), Ur = $.create({
2663
+ }), Gr = $.create({
2654
2664
  name: "tabindex",
2655
2665
  addOptions() {
2656
2666
  return { value: void 0 };
@@ -2661,7 +2671,7 @@ var $ = class e extends Tr {
2661
2671
  props: { attributes: () => !this.editor.isEditable && this.options.value === void 0 ? {} : { tabindex: this.options.value ?? "0" } }
2662
2672
  })];
2663
2673
  }
2664
- }), Wr = $.create({
2674
+ }), Kr = $.create({
2665
2675
  name: "textDirection",
2666
2676
  addOptions() {
2667
2677
  return { direction: void 0 };
@@ -2690,10 +2700,10 @@ var $ = class e extends Tr {
2690
2700
  } }
2691
2701
  })];
2692
2702
  }
2693
- }), Gr = !1;
2694
- function Kr(e) {
2695
- if (Gr) return;
2696
- Gr = !0;
2703
+ }), qr = !1;
2704
+ function Jr(e) {
2705
+ if (qr) return;
2706
+ qr = !0;
2697
2707
  let t;
2698
2708
  try {
2699
2709
  t = l.fromJSON(e, {
@@ -2705,7 +2715,7 @@ function Kr(e) {
2705
2715
  }
2706
2716
  t instanceof r || console.warn("[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.");
2707
2717
  }
2708
- var qr = class e {
2718
+ var Yr = class e {
2709
2719
  get name() {
2710
2720
  return this.node.type.name;
2711
2721
  }
@@ -2827,7 +2837,7 @@ var qr = class e {
2827
2837
  ...e
2828
2838
  }), this.editor.view.dispatch(t);
2829
2839
  }
2830
- }, Jr = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}", Yr = class extends qn {
2840
+ }, Xr = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}", Zr = class extends qn {
2831
2841
  constructor(e = {}) {
2832
2842
  super(), this.css = null, this.className = "tiptap", this.editorView = null, this.isFocused = !1, this.destroyed = !1, this.isInitialized = !1, this.extensionStorage = {}, this.instanceId = Math.random().toString(36).slice(2, 9), this.hasWarnedStaleDecorationRead = !1, this.options = {
2833
2843
  element: typeof document < "u" ? document.createElement("div") : null,
@@ -2876,7 +2886,7 @@ var qr = class e {
2876
2886
  selection: e || void 0
2877
2887
  });
2878
2888
  }
2879
- Kr(this.schema), this.options.element && this.mount(this.options.element);
2889
+ Jr(this.schema), this.options.element && this.mount(this.options.element);
2880
2890
  }
2881
2891
  mount(e) {
2882
2892
  if (typeof document > "u") throw Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");
@@ -2910,7 +2920,7 @@ var qr = class e {
2910
2920
  return this.commandManager ? this.commandManager.can() : D.createFallbackCan();
2911
2921
  }
2912
2922
  injectCSS() {
2913
- this.options.injectCSS && typeof document < "u" && (this.css = hr(Jr, this.options.injectNonce));
2923
+ this.options.injectCSS && typeof document < "u" && (this.css = hr(Xr, this.options.injectNonce));
2914
2924
  }
2915
2925
  setOptions(e = {}) {
2916
2926
  this.options = {
@@ -2968,22 +2978,22 @@ var qr = class e {
2968
2978
  createExtensionManager() {
2969
2979
  var e, t;
2970
2980
  let n = [...this.options.enableCoreExtensions ? [
2971
- Rr,
2972
- Pr.configure({ blockSeparator: (e = this.options.coreExtensionOptions) == null || (e = e.clipboardTextSerializer) == null ? void 0 : e.blockSeparator }),
2973
- Fr,
2974
2981
  Br,
2975
- Vr,
2976
- Ur.configure({ value: (t = this.options.coreExtensionOptions) == null || (t = t.tabindex) == null ? void 0 : t.value }),
2982
+ Ir.configure({ blockSeparator: (e = this.options.coreExtensionOptions) == null || (e = e.clipboardTextSerializer) == null ? void 0 : e.blockSeparator }),
2977
2983
  Lr,
2978
2984
  Hr,
2979
- Ir,
2980
- Wr.configure({ direction: this.options.textDirection })
2985
+ Ur,
2986
+ Gr.configure({ value: (t = this.options.coreExtensionOptions) == null || (t = t.tabindex) == null ? void 0 : t.value }),
2987
+ zr,
2988
+ Wr,
2989
+ Rr,
2990
+ Kr.configure({ direction: this.options.textDirection })
2981
2991
  ].filter((e) => typeof this.options.enableCoreExtensions != "object" || this.options.enableCoreExtensions[e.name] !== !1) : [], ...this.options.extensions].filter((e) => [
2982
2992
  "extension",
2983
2993
  "node",
2984
2994
  "mark"
2985
2995
  ].includes(e?.type));
2986
- this.extensionManager = new Nr(n, this);
2996
+ this.extensionManager = new Fr(n, this);
2987
2997
  }
2988
2998
  createCommandManager() {
2989
2999
  this.commandManager = new D({ editor: this });
@@ -3124,13 +3134,13 @@ var qr = class e {
3124
3134
  }
3125
3135
  $pos(e) {
3126
3136
  let t = this.state.doc.resolve(e), n = e > 0 && t.nodeAfter && !t.nodeAfter.isText && t.nodeAfter.isAtom ? t.nodeAfter : null;
3127
- return new qr(t, this, !1, n);
3137
+ return new Yr(t, this, !1, n);
3128
3138
  }
3129
3139
  get $doc() {
3130
3140
  return this.$pos(0);
3131
3141
  }
3132
3142
  };
3133
- function Xr(e) {
3143
+ function Qr(e) {
3134
3144
  return new Q({
3135
3145
  find: e.find,
3136
3146
  handler: ({ state: t, range: n, match: r }) => {
@@ -3148,7 +3158,7 @@ function Xr(e) {
3148
3158
  undoable: e.undoable
3149
3159
  });
3150
3160
  }
3151
- function Zr(e) {
3161
+ function $r(e) {
3152
3162
  return new Q({
3153
3163
  find: e.find,
3154
3164
  handler: ({ state: t, range: n, match: r }) => {
@@ -3167,7 +3177,7 @@ function Zr(e) {
3167
3177
  undoable: e.undoable
3168
3178
  });
3169
3179
  }
3170
- function Qr(e) {
3180
+ function ei(e) {
3171
3181
  return new Q({
3172
3182
  find: e.find,
3173
3183
  handler: ({ state: t, range: n, match: r }) => {
@@ -3178,7 +3188,7 @@ function Qr(e) {
3178
3188
  undoable: e.undoable
3179
3189
  });
3180
3190
  }
3181
- function $r(e) {
3191
+ function ti(e) {
3182
3192
  return new Q({
3183
3193
  find: e.find,
3184
3194
  handler: ({ state: t, range: n, match: r, chain: i }) => {
@@ -3201,7 +3211,7 @@ function $r(e) {
3201
3211
  undoable: e.undoable
3202
3212
  });
3203
3213
  }
3204
- var ei = class e extends Tr {
3214
+ var ni = class e extends Dr {
3205
3215
  constructor(...e) {
3206
3216
  super(...e), this.type = "node";
3207
3217
  }
@@ -3217,8 +3227,8 @@ var ei = class e extends Tr {
3217
3227
  return super.extend(t);
3218
3228
  }
3219
3229
  };
3220
- function ti(e) {
3221
- return new Dr({
3230
+ function ri(e) {
3231
+ return new kr({
3222
3232
  find: e.find,
3223
3233
  handler: ({ state: t, range: n, match: r, pasteEvent: i }) => {
3224
3234
  let a = U(e.getAttributes, void 0, r, i);
@@ -3233,4 +3243,4 @@ function ti(e) {
3233
3243
  });
3234
3244
  }
3235
3245
  //#endregion
3236
- export { D as CommandManager, Y as DECORATION_MANAGER_PLUGIN_KEY, pr as DecorationManager, Yr as Editor, Tr as Extendable, $ as Extension, Q as InputRule, pn as MappablePosition, Er as Mark, ei as Node, qr as NodePos, Dr as PasteRule, U as callOrReturn, mr as canInsertNode, Dt as combineTransactionSteps, Wn as commands, E as createChainableState, R as createDocument, hn as createMappablePosition, F as createNodeFromContent, hr as createStyleTag, $e as defaultBlockAt, gt as deleteProps, P as elementFromString, Ot as findChildrenInRange, Vt as findDuplicates, z as findParentNode, kt as findParentNodeClosestToPos, V as flattenExtensions, It as fromString, Wt as generateHTML, Gt as generateJSON, Xt as getAttributes, Mt as getAttributesFromExtensions, $t as getChangedRanges, B as getExtensionField, H as getHTMLFromFragment, Et as getMarkAttributes, Re as getMarkRange, j as getMarkType, en as getMarksBetween, tn as getNodeAtPosition, Yt as getNodeAttributes, O as getNodeType, nn as getPreviousBlockSibling, G as getRenderedAttributes, Ut as getSchema, Bt as getSchemaByResolvedExtensions, q as getSchemaTypeByName, L as getSchemaTypeNameByName, J as getSplittedAttributes, qt as getText, Kt as getTextBetween, rn as getTextContentFromNodes, Jt as getTextSerializersFromSchema, mn as getUpdatedPosition, Lt as injectExtensionAttributesToParseRule, wr as inputRulesPlugin, on as isActive, Ue as isAndroid, sn as isAtEndOfNode, cn as isAtStartOfNode, jt as isEmptyObject, ln as isExtensionRulesEnabled, At as isFunction, un as isList, lt as isMacOS, an as isMarkActive, I as isNodeActive, dn as isNodeEmpty, fn as isNodeSelection, gr as isNumber, Z as isPlainObject, k as isRegExp, We as isSafari, Ve as isTextSelection, N as isiOS, Xr as markInputRule, ti as markPasteRule, Ft as mergeAttributes, br as mergeDeep, M as minMax, Zr as nodeInputRule, A as objectIncludes, vr as parseIndentedBlocks, Mr as pasteRulesPlugin, Zt as removeDuplicates, yr as renderNestedMarkdownContent, Ht as resolveExtensions, He as resolveFocusPosition, Ze as selectionToInsertionEnd, K as sortExtensions, W as splitExtensions, Qr as textblockTypeInputRule, xr as updateMarkViewAttributes, $r as wrappingInputRule };
3246
+ export { D as CommandManager, Y as DECORATION_MANAGER_PLUGIN_KEY, pr as DecorationManager, Zr as Editor, Dr as Extendable, $ as Extension, Q as InputRule, pn as MappablePosition, Or as Mark, ni as Node, Yr as NodePos, kr as PasteRule, U as callOrReturn, mr as canInsertNode, Dt as combineTransactionSteps, Wn as commands, E as createChainableState, R as createDocument, hn as createMappablePosition, F as createNodeFromContent, hr as createStyleTag, $e as defaultBlockAt, gt as deleteProps, P as elementFromString, Ot as findChildrenInRange, Vt as findDuplicates, z as findParentNode, kt as findParentNodeClosestToPos, V as flattenExtensions, It as fromString, Wt as generateHTML, Gt as generateJSON, Xt as getAttributes, Mt as getAttributesFromExtensions, $t as getChangedRanges, B as getExtensionField, H as getHTMLFromFragment, Et as getMarkAttributes, Re as getMarkRange, j as getMarkType, en as getMarksBetween, tn as getNodeAtPosition, Yt as getNodeAttributes, O as getNodeType, nn as getPreviousBlockSibling, G as getRenderedAttributes, Ut as getSchema, Bt as getSchemaByResolvedExtensions, q as getSchemaTypeByName, L as getSchemaTypeNameByName, J as getSplittedAttributes, qt as getText, Kt as getTextBetween, rn as getTextContentFromNodes, Jt as getTextSerializersFromSchema, mn as getUpdatedPosition, Lt as injectExtensionAttributesToParseRule, Er as inputRulesPlugin, on as isActive, Ue as isAndroid, sn as isAtEndOfNode, cn as isAtStartOfNode, jt as isEmptyObject, ln as isExtensionRulesEnabled, At as isFunction, un as isList, lt as isMacOS, an as isMarkActive, I as isNodeActive, dn as isNodeEmpty, fn as isNodeSelection, gr as isNumber, Z as isPlainObject, k as isRegExp, We as isSafari, Ve as isTextSelection, N as isiOS, Qr as markInputRule, ri as markPasteRule, Ft as mergeAttributes, Sr as mergeDeep, M as minMax, $r as nodeInputRule, A as objectIncludes, vr as parseIndentedBlocks, Pr as pasteRulesPlugin, Zt as removeDuplicates, xr as renderNestedMarkdownContent, Ht as resolveExtensions, He as resolveFocusPosition, Ze as selectionToInsertionEnd, K as sortExtensions, W as splitExtensions, ei as textblockTypeInputRule, Cr as updateMarkViewAttributes, ti as wrappingInputRule };
@@ -288,7 +288,7 @@ var I = i.create({
288
288
  return F((n = e.meta) == null || (n = n.parentAttrs) == null ? void 0 : n.type, r - 1 + (e.index || 0), ". ");
289
289
  }
290
290
  return "- ";
291
- }, n),
291
+ }, n, { alignNestedToPrefix: n?.parentType === "orderedList" }),
292
292
  addExtensions() {
293
293
  return [x(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
294
294
  },
@@ -3106,7 +3106,7 @@ var e = {
3106
3106
  0,
3107
3107
  0,
3108
3108
  0,
3109
- [0, ["(?:4(?:(?:09|24)[3-6]|44[0-35-9]|6(?:4[0-57-9]|6[0-6])|7(?:4[0-48]|6[0-5]))|5(?:25[3-7]|35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-467]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-35])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}", [8]]],
3109
+ [0, ["(?:4(?:0(?:6[0-3]|9[3-6])|24[3-6]|44[0-35-9]|6(?:4[0-57-9]|6[0-6])|7(?:4[0-48]|6[0-5]))|5(?:25[3-7]|35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-467]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-35])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}", [8]]],
3110
3110
  "00"
3111
3111
  ],
3112
3112
  HN: [
@@ -3843,7 +3843,7 @@ var e = {
3843
3843
  0,
3844
3844
  0,
3845
3845
  0,
3846
- [0, ["(?:427|7(?:[78][0-25-9]|9\\d))\\d{6}", [9]]]
3846
+ [0, ["(?:427|7(?:11|[29]\\d|[78][0-25-9]))\\d{6}", [9]]]
3847
3847
  ],
3848
3848
  JP: [
3849
3849
  "81",
@@ -5733,7 +5733,7 @@ var e = {
5733
5733
  [[
5734
5734
  "(\\d{3})(\\d{4})",
5735
5735
  "$1 $2",
5736
- ["18|[2-69]|85"]
5736
+ ["18|[2-69]|85[02-46-9]"]
5737
5737
  ], [
5738
5738
  "(\\d{4})(\\d{4})",
5739
5739
  "$1 $2",
@@ -5745,7 +5745,7 @@ var e = {
5745
5745
  0,
5746
5746
  0,
5747
5747
  0,
5748
- [0, ["(?:7\\d|8[1-48])\\d{6}", [8]]],
5748
+ [0, ["(?:7\\d|8[1-58])\\d{6}", [8]]],
5749
5749
  "00"
5750
5750
  ],
5751
5751
  PH: [
@@ -7458,7 +7458,7 @@ var e = {
7458
7458
  0,
7459
7459
  0,
7460
7460
  0,
7461
- [0, ["(?:6[1-35-9]|7\\d)\\d{7}"]]
7461
+ [0, ["(?:6[0-35-9]|7\\d)\\d{7}"]]
7462
7462
  ],
7463
7463
  UA: [
7464
7464
  "380",
@@ -8032,20 +8032,23 @@ var e = {
8032
8032
  ZW: [
8033
8033
  "263",
8034
8034
  "00",
8035
- "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",
8035
+ "(?:13|8\\d{4})\\d{5}|[235-8]\\d{8}|[2-689]\\d{6}",
8036
8036
  [
8037
- 5,
8038
- 6,
8039
8037
  7,
8040
- 8,
8041
8038
  9,
8042
8039
  10
8043
8040
  ],
8044
8041
  [
8042
+ [
8043
+ "(\\d{2})(\\d{3,5})",
8044
+ "$1 $2",
8045
+ ["1|2(?:0[0-36-9]|29|58)|67[0-46-9]|(?:55|68)[0-69]"],
8046
+ "0$1"
8047
+ ],
8045
8048
  [
8046
8049
  "(\\d{3})(\\d{3,5})",
8047
8050
  "$1 $2",
8048
- ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],
8051
+ ["2(?:0[45]|[27]|48)|37|675|(?:55|68)[78]"],
8049
8052
  "0$1"
8050
8053
  ],
8051
8054
  [
@@ -8061,45 +8064,39 @@ var e = {
8061
8064
  "0$1"
8062
8065
  ],
8063
8066
  [
8064
- "(\\d{2})(\\d{7})",
8067
+ "(\\d{4})(\\d{3,5})",
8065
8068
  "$1 $2",
8066
- ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],
8067
- "(0$1)"
8068
- ],
8069
- [
8070
- "(\\d{2})(\\d{3})(\\d{4})",
8071
- "$1 $2 $3",
8072
- ["7"],
8069
+ ["548"],
8073
8070
  "0$1"
8074
8071
  ],
8075
8072
  [
8076
- "(\\d{3})(\\d{3})(\\d{3,4})",
8073
+ "(\\d{2})(\\d{3})(\\d{3,4})",
8077
8074
  "$1 $2 $3",
8078
- ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],
8075
+ ["29[013-9]"],
8079
8076
  "0$1"
8080
8077
  ],
8081
8078
  [
8082
- "(\\d{4})(\\d{6})",
8079
+ "(\\d{2})(\\d{7})",
8083
8080
  "$1 $2",
8084
- ["8"],
8085
- "0$1"
8081
+ ["[256]|39|8[13-59]"],
8082
+ "(0$1)"
8086
8083
  ],
8087
8084
  [
8088
- "(\\d{2})(\\d{3,5})",
8089
- "$1 $2",
8090
- ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],
8085
+ "(\\d{2})(\\d{3})(\\d{4})",
8086
+ "$1 $2 $3",
8087
+ ["7"],
8091
8088
  "0$1"
8092
8089
  ],
8093
8090
  [
8094
- "(\\d{2})(\\d{3})(\\d{3,4})",
8091
+ "(\\d{3})(\\d{3})(\\d{3,4})",
8095
8092
  "$1 $2 $3",
8096
- ["29[013-9]|39|54"],
8093
+ ["3"],
8097
8094
  "0$1"
8098
8095
  ],
8099
8096
  [
8100
- "(\\d{4})(\\d{3,5})",
8097
+ "(\\d{4})(\\d{6})",
8101
8098
  "$1 $2",
8102
- ["(?:25|54)8", "258|5483"],
8099
+ ["8"],
8103
8100
  "0$1"
8104
8101
  ]
8105
8102
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "10.9.0",
3
+ "version": "11.0.0",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -43,28 +43,28 @@
43
43
  "@babel/core": "^7.29.7",
44
44
  "@caspeco/eslint-config-react": "^5.4.2",
45
45
  "@caspeco/prettier-config": "^1.0.7",
46
- "@chakra-ui/cli": "^3.36.1",
46
+ "@chakra-ui/cli": "^3.37.0",
47
47
  "@rolldown/plugin-babel": "^0.2.3",
48
- "@types/node": "^26.3.0",
48
+ "@types/node": "^26.4.1",
49
49
  "@types/react": "^19.2.18",
50
50
  "@types/react-dom": "^19.2.4",
51
- "@vitejs/plugin-react": "^6.1.0",
51
+ "@vitejs/plugin-react": "^6.1.1",
52
52
  "@vitest/browser": "^4.1.11",
53
53
  "@vitest/browser-playwright": "^4.1.11",
54
54
  "@vitest/ui": "^4.1.11",
55
55
  "babel-plugin-react-compiler": "^1.0.0",
56
56
  "eslint": "^9.39.2",
57
57
  "eslint-plugin-react-hooks": "^7.1.1",
58
- "eslint-plugin-react-refresh": "^0.5.4",
59
- "globals": "^17.11.0",
60
- "knip": "^6.32.2",
58
+ "eslint-plugin-react-refresh": "^0.5.5",
59
+ "globals": "^17.12.0",
60
+ "knip": "^6.34.0",
61
61
  "playwright": "1.62.1",
62
62
  "prettier": "^3.9.6",
63
63
  "rimraf": "^6.1.3",
64
- "tsc-alias": "^1.9.2",
64
+ "tsc-alias": "^1.9.3",
65
65
  "typescript": "^6.0.3",
66
66
  "vite": "^8.2.1",
67
- "vite-plugin-dts": "^5.0.3",
67
+ "vite-plugin-dts": "^5.1.0",
68
68
  "vitest": "^4.1.11",
69
69
  "vitest-browser-react": "^2.2.0"
70
70
  },
@@ -82,15 +82,15 @@
82
82
  "@floating-ui/dom": "^1.8.0",
83
83
  "@tanstack/react-table": "^8.21.3",
84
84
  "@tanstack/react-virtual": "^3.14.10",
85
- "@tiptap/core": "^3.30.5",
86
- "@tiptap/extension-link": "^3.30.5",
87
- "@tiptap/extension-underline": "^3.30.5",
88
- "@tiptap/react": "^3.30.5",
89
- "@tiptap/starter-kit": "^3.30.5",
85
+ "@tiptap/core": "^3.31.0",
86
+ "@tiptap/extension-link": "^3.31.0",
87
+ "@tiptap/extension-underline": "^3.31.0",
88
+ "@tiptap/react": "^3.31.0",
89
+ "@tiptap/starter-kit": "^3.31.0",
90
90
  "country-flag-icons": "^1.6.20",
91
91
  "csstype": "^3.2.3",
92
92
  "date-fns": "^4.4.0",
93
- "libphonenumber-js": "^1.13.11",
93
+ "libphonenumber-js": "^1.13.12",
94
94
  "linkifyjs": "^4.3.3",
95
95
  "next-themes": "^0.4.6"
96
96
  }
@@ -1,9 +0,0 @@
1
- type MinusButtonProps = {
2
- ariaLabel: string;
3
- buttonSize: "lg" | "sm" | "md";
4
- onClick: () => void;
5
- isDisabled: boolean;
6
- };
7
- export declare function MinusButton({ buttonSize, ariaLabel, onClick, isDisabled }: MinusButtonProps): import("react").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=minus-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"minus-button.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/minus-button.tsx"],"names":[],"mappings":"AAGA,KAAK,gBAAgB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,gBAAgB,+BAW3F"}
@@ -1,19 +0,0 @@
1
- import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
2
- import { DecreaseIcon as t } from "../icon/icons/decrease-icon.js";
3
- import { IconButton as n } from "../icon-button/icon-button.js";
4
- import { jsx as r } from "react/jsx-runtime";
5
- //#region lib/components/quantity-button/minus-button.tsx
6
- var i = e();
7
- function a(e) {
8
- let a = (0, i.c)(5), { buttonSize: o, ariaLabel: s, onClick: c, isDisabled: l } = e, u;
9
- return a[0] !== s || a[1] !== o || a[2] !== l || a[3] !== c ? (u = /* @__PURE__ */ r(n, {
10
- variant: "ghost",
11
- icon: t,
12
- "aria-label": s,
13
- size: o,
14
- onClick: c,
15
- isDisabled: l
16
- }), a[0] = s, a[1] = o, a[2] = l, a[3] = c, a[4] = u) : u = a[4], u;
17
- }
18
- //#endregion
19
- export { a as MinusButton };
@@ -1,9 +0,0 @@
1
- type PlusButtonProps = {
2
- isDisabled: boolean;
3
- ariaLabel: string;
4
- buttonSize: "lg" | "sm" | "md";
5
- onClick: () => void;
6
- };
7
- export declare function PlusButton({ ariaLabel, buttonSize, onClick, isDisabled }: PlusButtonProps): import("react").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=plus-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plus-button.d.ts","sourceRoot":"","sources":["../../../lib/components/quantity-button/plus-button.tsx"],"names":[],"mappings":"AAGA,KAAK,eAAe,GAAG;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,+BAWzF"}
@@ -1,19 +0,0 @@
1
- import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
2
- import { IncreaseIcon as t } from "../icon/icons/increase-icon.js";
3
- import { IconButton as n } from "../icon-button/icon-button.js";
4
- import { jsx as r } from "react/jsx-runtime";
5
- //#region lib/components/quantity-button/plus-button.tsx
6
- var i = e();
7
- function a(e) {
8
- let a = (0, i.c)(5), { ariaLabel: o, buttonSize: s, onClick: c, isDisabled: l } = e, u;
9
- return a[0] !== o || a[1] !== s || a[2] !== l || a[3] !== c ? (u = /* @__PURE__ */ r(n, {
10
- variant: "ghost",
11
- icon: t,
12
- "aria-label": o,
13
- size: s,
14
- onClick: c,
15
- isDisabled: l
16
- }), a[0] = o, a[1] = s, a[2] = l, a[3] = c, a[4] = u) : u = a[4], u;
17
- }
18
- //#endregion
19
- export { a as PlusButton };