@caspeco/casper-ui-library 10.9.1 → 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 +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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "10.9.1",
3
+ "version": "11.0.0",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -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 };