@citizenplane/pimp 18.23.2 → 18.23.4
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/CpAncillaryItem.vue.d.ts +1 -0
- package/dist/components/CpAncillaryItem.vue.d.ts.map +1 -1
- package/dist/components/CpBasket.vue.d.ts +13 -2
- package/dist/components/CpBasket.vue.d.ts.map +1 -1
- package/dist/components/CpQuantityCounter.vue.d.ts +1 -0
- package/dist/components/CpQuantityCounter.vue.d.ts.map +1 -1
- package/dist/pimp.es.js +7 -4
- package/dist/pimp.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/src/components/CpAncillaryItem.vue +2 -0
- package/src/components/CpBasket.spec.ts +90 -0
- package/src/components/CpBasket.vue +7 -2
- package/src/components/CpQuantityCounter.vue +3 -2
- package/src/components/__snapshots__/CpBasket.spec.ts.snap +40 -0
- package/src/stories/CpAncillaryItem.stories.ts +4 -0
- package/src/stories/CpBasket.stories.ts +53 -0
- package/tsconfig.build.json +10 -1
- package/vitest.config.js +32 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CpAncillaryItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpAncillaryItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CpAncillaryItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpAncillaryItem.vue"],"names":[],"mappings":"AA6CA;AAydA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAEvE,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,oBAAoB,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,KAAK,WAAW,GAAG,KAAK,CAAC;AAkFzB,KAAK,gBAAgB,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AAYF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsLxD,QAAA,MAAM,YAAY;;;;;YAjSP,MAAM,GAAG,MAAM;YACf,MAAM;cANJ,MAAM;iBAOH,MAAM,GAAG,IAAI;cAMhB,OAAO;6EA6RlB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -5,11 +5,22 @@ interface Props {
|
|
|
5
5
|
total: string;
|
|
6
6
|
totalLabel: string;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface ResolvedRow extends CpBasketRow {
|
|
9
|
+
key: string;
|
|
10
|
+
}
|
|
11
|
+
declare var __VLS_1: {}, __VLS_21: {
|
|
12
|
+
row: ResolvedRow;
|
|
13
|
+
}, __VLS_23: {
|
|
14
|
+
row: ResolvedRow;
|
|
15
|
+
}, __VLS_25: {};
|
|
9
16
|
type __VLS_Slots = {} & {
|
|
10
17
|
leading?: (props: typeof __VLS_1) => any;
|
|
11
18
|
} & {
|
|
12
|
-
|
|
19
|
+
rowLabel?: (props: typeof __VLS_21) => any;
|
|
20
|
+
} & {
|
|
21
|
+
rowValue?: (props: typeof __VLS_23) => any;
|
|
22
|
+
} & {
|
|
23
|
+
trailing?: (props: typeof __VLS_25) => any;
|
|
13
24
|
};
|
|
14
25
|
declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
26
|
hideDetailsOnCategories: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CpBasket.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpBasket.vue"],"names":[],"mappings":"AA0CA;
|
|
1
|
+
{"version":3,"file":"CpBasket.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpBasket.vue"],"names":[],"mappings":"AA0CA;AAyRA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAK9E,UAAU,KAAK;IACb,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAA;IAClC,IAAI,EAAE,WAAW,EAAE,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,WAAY,SAAQ,WAAW;IACvC,GAAG,EAAE,MAAM,CAAA;CACZ;AA8OD,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ;;CAAW,EAAE,QAAQ;;CAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC9C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC9C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKjD,QAAA,MAAM,UAAU;6BAhQY,MAAM,EAAE;6EAmQlC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CpQuantityCounter.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpQuantityCounter.vue"],"names":[],"mappings":"AA0BA;
|
|
1
|
+
{"version":3,"file":"CpQuantityCounter.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpQuantityCounter.vue"],"names":[],"mappings":"AA0BA;AAyHA,UAAU,KAAK;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,KAAK,WAAW,GAAG,KAAK,CAAC;AAmBzB,KAAK,gBAAgB,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;AAMF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA8FxD,QAAA,MAAM,YAAY;;;;;sBAhIG,OAAO;SAGpB,MAAM,GAAG,IAAI;SACb,MAAM;6EAgIZ,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/pimp.es.js
CHANGED
|
@@ -24053,6 +24053,7 @@ var WE = /*#__PURE__*/ X(EE, [["render", UE]]), GE = { class: "cpAccordion" }, K
|
|
|
24053
24053
|
type: Boolean,
|
|
24054
24054
|
default: !1
|
|
24055
24055
|
},
|
|
24056
|
+
disabled: { type: Boolean },
|
|
24056
24057
|
increaseLabel: {},
|
|
24057
24058
|
max: { default: null },
|
|
24058
24059
|
min: { default: 0 }
|
|
@@ -24062,7 +24063,7 @@ var WE = /*#__PURE__*/ X(EE, [["render", UE]]), GE = { class: "cpAccordion" }, K
|
|
|
24062
24063
|
}),
|
|
24063
24064
|
emits: ["update:modelValue"],
|
|
24064
24065
|
setup(e) {
|
|
24065
|
-
let t = e, n = de(e, "modelValue"), r = a(() => n.value <= t.min), i = a(() => t.max !== null && n.value >= t.max), o = () => {
|
|
24066
|
+
let t = e, n = de(e, "modelValue"), r = a(() => t.disabled || n.value <= t.min), i = a(() => t.disabled || t.max !== null && n.value >= t.max), o = () => {
|
|
24066
24067
|
r.value || --n.value;
|
|
24067
24068
|
}, c = () => {
|
|
24068
24069
|
i.value || (n.value += 1);
|
|
@@ -24122,6 +24123,7 @@ var WE = /*#__PURE__*/ X(EE, [["render", UE]]), GE = { class: "cpAccordion" }, K
|
|
|
24122
24123
|
currency: {},
|
|
24123
24124
|
description: {},
|
|
24124
24125
|
disableAnimation: { type: Boolean },
|
|
24126
|
+
disabled: { type: Boolean },
|
|
24125
24127
|
layout: { default: "card" },
|
|
24126
24128
|
locale: { default: () => typeof navigator > "u" ? "en" : navigator.language },
|
|
24127
24129
|
maxQuantity: { default: null },
|
|
@@ -24201,12 +24203,13 @@ var WE = /*#__PURE__*/ X(EE, [["render", UE]]), GE = { class: "cpAccordion" }, K
|
|
|
24201
24203
|
appearance: "secondary",
|
|
24202
24204
|
class: "cpAncillaryItem__addButton",
|
|
24203
24205
|
color: "accent",
|
|
24206
|
+
disabled: e.disabled,
|
|
24204
24207
|
size: "sm",
|
|
24205
24208
|
onClick: g
|
|
24206
24209
|
}, {
|
|
24207
24210
|
default: V(() => [p(L(e.addLabel), 1)]),
|
|
24208
24211
|
_: 1
|
|
24209
|
-
})) : (M(), s(OO, {
|
|
24212
|
+
}, 8, ["disabled"])) : (M(), s(OO, {
|
|
24210
24213
|
key: 1,
|
|
24211
24214
|
modelValue: n.value,
|
|
24212
24215
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
@@ -24350,12 +24353,12 @@ var WE = /*#__PURE__*/ X(EE, [["render", UE]]), GE = { class: "cpAccordion" }, K
|
|
|
24350
24353
|
default: V(() => [(M(!0), l(t, null, P(e.rows, (t) => (M(), l("div", {
|
|
24351
24354
|
key: t.key,
|
|
24352
24355
|
class: T(e.rowClass)
|
|
24353
|
-
}, [u("span", null, L(t.label), 1), u("span", null, L(t.value), 1)], 2))), 128))]),
|
|
24356
|
+
}, [F(n.$slots, "rowLabel", { row: t }, () => [u("span", null, L(t.label), 1)]), F(n.$slots, "rowValue", { row: t }, () => [u("span", null, L(t.value), 1)])], 2))), 128))]),
|
|
24354
24357
|
_: 2
|
|
24355
24358
|
}, 1024)]))), 128))]),
|
|
24356
24359
|
_: 2
|
|
24357
24360
|
}, 1024)])) : c("", !0)]))), 128))])])) : c("", !0)]),
|
|
24358
|
-
_:
|
|
24361
|
+
_: 3
|
|
24359
24362
|
}),
|
|
24360
24363
|
u("div", kk, [u("p", null, L(e.totalLabel), 1), u("p", Ak, L(e.total), 1)]),
|
|
24361
24364
|
o.value ? (M(), l("div", jk, [F(n.$slots, "trailing")])) : c("", !0)
|