@caspeco/casper-ui-library 10.9.1 → 11.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/button-recipe.d.ts.map +1 -1
- package/dist/components/button/button-recipe.js +1 -0
- package/dist/components/button/button.composition.d.ts +6 -0
- package/dist/components/button/button.composition.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.composition.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.d.ts +1 -1
- package/dist/components/quantity-button/quantity-button.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.js +119 -63
- package/dist/components/quantity-button/types.d.ts +25 -14
- package/dist/components/quantity-button/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/quantity-button/minus-button.d.ts +0 -9
- package/dist/components/quantity-button/minus-button.d.ts.map +0 -1
- package/dist/components/quantity-button/minus-button.js +0 -19
- package/dist/components/quantity-button/plus-button.d.ts +0 -9
- package/dist/components/quantity-button/plus-button.d.ts.map +0 -1
- package/dist/components/quantity-button/plus-button.js +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-recipe.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button-recipe.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,gBAAgB,EAAwC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"button-recipe.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button-recipe.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,gBAAgB,EAAwC,MAAM,kBAAkB,CAAC;AAgS/F,eAAO,MAAM,YAAY,EAAE,gBAoDzB,CAAC"}
|
|
@@ -3,4 +3,10 @@ export declare const SecondaryVariant: () => import("react").JSX.Element;
|
|
|
3
3
|
export declare const GhostVariant: () => import("react").JSX.Element;
|
|
4
4
|
export declare const LinkVariant: () => import("react").JSX.Element;
|
|
5
5
|
export declare const TertiaryVariant: () => import("react").JSX.Element;
|
|
6
|
+
export declare const PrimaryFocusRing: () => import("react").JSX.Element;
|
|
7
|
+
export declare const SecondaryFocusRing: () => import("react").JSX.Element;
|
|
8
|
+
export declare const TertiaryFocusRing: () => import("react").JSX.Element;
|
|
9
|
+
export declare const GhostFocusRing: () => import("react").JSX.Element;
|
|
10
|
+
export declare const AlertFocusRing: () => import("react").JSX.Element;
|
|
11
|
+
export declare const LinkFocusRing: () => import("react").JSX.Element;
|
|
6
12
|
//# sourceMappingURL=button.composition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button.composition.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,mCAe1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mCAe5B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAexB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAevB,CAAC;AAEF,eAAO,MAAM,eAAe,mCAe3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"button.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button.composition.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,mCAe1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mCAe5B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAexB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAevB,CAAC;AAEF,eAAO,MAAM,eAAe,mCAe3B,CAAC;AAGF,eAAO,MAAM,gBAAgB,mCAAmD,CAAC;AAEjF,eAAO,MAAM,kBAAkB,mCAAuD,CAAC;AAEvF,eAAO,MAAM,iBAAiB,mCAAqD,CAAC;AAEpF,eAAO,MAAM,cAAc,mCAA+C,CAAC;AAE3E,eAAO,MAAM,cAAc,mCAA+C,CAAC;AAE3E,eAAO,MAAM,aAAa,mCAA6C,CAAC"}
|
|
@@ -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,
|
|
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({
|
|
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":"
|
|
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 {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let T =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
}),
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
97
|
+
K,
|
|
98
|
+
Y,
|
|
99
|
+
X
|
|
62
100
|
]
|
|
63
101
|
})
|
|
64
|
-
}),
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
w:
|
|
68
|
-
...
|
|
69
|
-
children:
|
|
70
|
-
}),
|
|
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 {
|
|
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
|
-
/**
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* When quantity equals min, the
|
|
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
|
-
/**
|
|
16
|
-
* When quantity equals max, the
|
|
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
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
/**
|
|
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,
|
|
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,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 };
|