@propeller-commerce/propeller-v2-react-ui 0.4.6 → 0.4.7
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/CHANGELOG.md +25 -0
- package/dist/index.cjs +36 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -12
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,31 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
|
|
|
8
8
|
between minor versions; breaking changes are called out below and in
|
|
9
9
|
[MIGRATION.md](./MIGRATION.md).
|
|
10
10
|
|
|
11
|
+
## [0.4.7] - 2026-06-19
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Mobile product card layout (below 768px).** On narrow viewports the
|
|
16
|
+
`ProductCard` action area no longer overflows the card edge — the quantity
|
|
17
|
+
stepper and "Add to cart" button were clipped. Below `md` (768px):
|
|
18
|
+
- **List view** (`columns === 1`): the footer becomes two rows — stock and
|
|
19
|
+
price share the first row (`justify-between`), and the full-width
|
|
20
|
+
`AddToCart` (stepper + button) sits on the second row.
|
|
21
|
+
- **Grid view** (`columns > 1`): the footer becomes three rows — stock ↔
|
|
22
|
+
price, then a full-width stepper, then a full-width button.
|
|
23
|
+
|
|
24
|
+
At `md` and up the previous desktop layout is unchanged. This flows through
|
|
25
|
+
every surface that renders `ProductCard` / `ProductGrid` (catalog, search,
|
|
26
|
+
product slider). Implemented purely with responsive Tailwind classes — no
|
|
27
|
+
JavaScript width detection.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Cart icon in the `AddToCart` button.** The submit button now renders a
|
|
32
|
+
built-in cart glyph (`.propeller-add-to-cart__icon`) before its label, drawn
|
|
33
|
+
with `currentColor` and `em` sizing so consumers can restyle its size,
|
|
34
|
+
colour and stroke via CSS.
|
|
35
|
+
|
|
11
36
|
## [0.4.6] - 2026-06-09
|
|
12
37
|
|
|
13
38
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -4024,8 +4024,8 @@ function AddToCart(rawProps) {
|
|
|
4024
4024
|
className: `propeller-add-to-cart ${props.className || ""}`,
|
|
4025
4025
|
"data-loading": loading ? "true" : "false",
|
|
4026
4026
|
children: [
|
|
4027
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__controls flex items-center gap-2 w-full", children: [
|
|
4028
|
-
props.allowIncrDecr !== false ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__stepper flex items-center border border-input rounded-control bg-card h-10", children: [
|
|
4027
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__controls flex flex-wrap items-center gap-2 w-full md:flex-nowrap", children: [
|
|
4028
|
+
props.allowIncrDecr !== false ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__stepper flex items-center border border-input rounded-control bg-card h-10 w-full md:w-auto", children: [
|
|
4029
4029
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4030
4030
|
"button",
|
|
4031
4031
|
{
|
|
@@ -4044,7 +4044,7 @@ function AddToCart(rawProps) {
|
|
|
4044
4044
|
"input",
|
|
4045
4045
|
{
|
|
4046
4046
|
type: "number",
|
|
4047
|
-
className: "propeller-add-to-cart__quantity w-12 text-center text-sm bg-transparent border-none focus:ring-0 focus:outline-none h-full [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
4047
|
+
className: "propeller-add-to-cart__quantity flex-1 md:flex-none md:w-12 text-center text-sm bg-transparent border-none focus:ring-0 focus:outline-none h-full [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
4048
4048
|
min: getMinQuantity(props.product),
|
|
4049
4049
|
step: getStep(props.product),
|
|
4050
4050
|
value: quantity,
|
|
@@ -4077,7 +4077,7 @@ function AddToCart(rawProps) {
|
|
|
4077
4077
|
"input",
|
|
4078
4078
|
{
|
|
4079
4079
|
type: "number",
|
|
4080
|
-
className: "propeller-add-to-cart__quantity w-16 h-10 text-center text-sm border border-input rounded-control focus:ring-2 focus:ring-secondary focus:border-transparent [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
4080
|
+
className: "propeller-add-to-cart__quantity w-full md:w-16 h-10 text-center text-sm border border-input rounded-control focus:ring-2 focus:ring-secondary focus:border-transparent [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
4081
4081
|
min: getMinQuantity(props.product),
|
|
4082
4082
|
step: getStep(props.product),
|
|
4083
4083
|
value: quantity,
|
|
@@ -4095,10 +4095,28 @@ function AddToCart(rawProps) {
|
|
|
4095
4095
|
"button",
|
|
4096
4096
|
{
|
|
4097
4097
|
type: "button",
|
|
4098
|
-
className: "propeller-add-to-cart__submit flex-1 inline-flex justify-center items-center h-10 px-6 border border-transparent text-sm font-medium rounded-control text-secondary-foreground bg-secondary hover:bg-secondary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
4098
|
+
className: "propeller-add-to-cart__submit flex-1 basis-full md:basis-auto inline-flex justify-center items-center gap-2 h-10 px-6 border border-transparent text-sm font-medium rounded-control text-secondary-foreground bg-secondary hover:bg-secondary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
4099
4099
|
onClick: () => handleAddToCart(),
|
|
4100
4100
|
disabled: loading,
|
|
4101
4101
|
children: [
|
|
4102
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4103
|
+
"svg",
|
|
4104
|
+
{
|
|
4105
|
+
className: "propeller-add-to-cart__icon w-[1.1em] h-[1.1em] flex-shrink-0",
|
|
4106
|
+
viewBox: "0 0 24 24",
|
|
4107
|
+
fill: "none",
|
|
4108
|
+
stroke: "currentColor",
|
|
4109
|
+
strokeWidth: 2,
|
|
4110
|
+
strokeLinecap: "round",
|
|
4111
|
+
strokeLinejoin: "round",
|
|
4112
|
+
"aria-hidden": "true",
|
|
4113
|
+
children: [
|
|
4114
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "21", r: "1" }),
|
|
4115
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "19", cy: "21", r: "1" }),
|
|
4116
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12" })
|
|
4117
|
+
]
|
|
4118
|
+
}
|
|
4119
|
+
),
|
|
4102
4120
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: propellerV2CoreUi.getLabel(props.labels, "adding", "Adding...") }) : null,
|
|
4103
4121
|
!loading ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: propellerV2CoreUi.getLabel(props.labels, "add", "Add") }) : null
|
|
4104
4122
|
]
|
|
@@ -13262,22 +13280,28 @@ function ProductCardRoot(rawProps) {
|
|
|
13262
13280
|
props.showManufacturer && manufacturer ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardManufacturer, {}) : null,
|
|
13263
13281
|
props.showShortDescription && shortDescription ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardShortDescription, {}) : null
|
|
13264
13282
|
] }) }),
|
|
13265
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer w-full md:w-auto flex items-center gap-3 px-4 py-2 md:py-0 border-t md:border-t-0 border-border-subtle", children: [
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13283
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer w-full md:w-auto flex flex-col gap-2 md:flex-row md:items-center md:gap-3 px-4 py-2 md:py-0 border-t md:border-t-0 border-border-subtle", children: [
|
|
13284
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer-meta flex items-center justify-between gap-3 md:contents", children: [
|
|
13285
|
+
props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
|
|
13286
|
+
props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-sm" }) : null
|
|
13287
|
+
] }),
|
|
13288
|
+
props.allowAddToCart !== false ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__cta w-full md:w-auto md:flex-shrink-0 md:ml-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardAddToCart, {}) }) : null
|
|
13269
13289
|
] })
|
|
13270
13290
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13271
13291
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__body flex flex-1 flex-col gap-1.5 p-3 sm:gap-2 sm:p-4", children: [
|
|
13272
13292
|
props.showSku !== false && sku ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardSku, {}) : null,
|
|
13273
13293
|
props.showName !== false ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardName, { linkable: true }) : null,
|
|
13274
13294
|
textLabelValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardTextLabels, {}) : null,
|
|
13275
|
-
props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
|
|
13295
|
+
props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) }) : null,
|
|
13276
13296
|
props.showManufacturer && manufacturer ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardManufacturer, {}) : null,
|
|
13277
13297
|
props.showShortDescription && shortDescription ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardShortDescription, {}) : null,
|
|
13278
|
-
props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__price mt-auto pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-base sm:text-lg" }) }) : null
|
|
13298
|
+
props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__price mt-auto pt-1 hidden md:block", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-base sm:text-lg" }) }) : null
|
|
13279
13299
|
] }),
|
|
13280
|
-
props.
|
|
13300
|
+
props.showStock && !!product.inventory || props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-card__footer-meta flex items-center justify-between gap-2 px-3 pt-1 sm:px-4 md:hidden", children: [
|
|
13301
|
+
props.showStock && !!product.inventory ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardStock, {}) : null,
|
|
13302
|
+
props.showPrice !== false && !!product?.price ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardPrice, { priceSize: "text-base" }) : null
|
|
13303
|
+
] }) : null,
|
|
13304
|
+
props.allowAddToCart !== false ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-card__cta px-3 pb-3 pt-2 sm:px-4 sm:pb-4", children: /* @__PURE__ */ jsxRuntime.jsx(ProductCardAddToCart, {}) }) : null
|
|
13281
13305
|
] })
|
|
13282
13306
|
]
|
|
13283
13307
|
}
|