@oxy.so/bloom 4.17.0 → 4.18.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.
- package/docs/adoption-matrix.mdx +4 -4
- package/docs/breadcrumb.mdx +11 -0
- package/docs/cart-panel.mdx +4 -2
- package/docs/checkout-summary.mdx +4 -0
- package/docs/chip.mdx +14 -1
- package/docs/dialog.mdx +5 -4
- package/docs/loading.mdx +11 -0
- package/docs/price-breakdown.mdx +17 -0
- package/docs/rating.mdx +22 -0
- package/docs/stepper.mdx +25 -0
- package/lib/commonjs/breadcrumb/Breadcrumb.js +36 -6
- package/lib/commonjs/breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/commonjs/cart-panel/CartLine.js +32 -10
- package/lib/commonjs/cart-panel/CartLine.js.map +1 -1
- package/lib/commonjs/cart-panel/CartPanel.js +3 -0
- package/lib/commonjs/cart-panel/CartPanel.js.map +1 -1
- package/lib/commonjs/cart-panel/shared.js +2 -0
- package/lib/commonjs/cart-panel/shared.js.map +1 -1
- package/lib/commonjs/checkout-summary/CheckoutConfirm.js +11 -1
- package/lib/commonjs/checkout-summary/CheckoutConfirm.js.map +1 -1
- package/lib/commonjs/chip/Chip.js +3 -1
- package/lib/commonjs/chip/Chip.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +15 -6
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +11 -5
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/placement.js +18 -1
- package/lib/commonjs/dialog/placement.js.map +1 -1
- package/lib/commonjs/loading/Loading.js +7 -3
- package/lib/commonjs/loading/Loading.js.map +1 -1
- package/lib/commonjs/loading/Loading.web.js +7 -3
- package/lib/commonjs/loading/Loading.web.js.map +1 -1
- package/lib/commonjs/loading/LoadingBase.js +49 -2
- package/lib/commonjs/loading/LoadingBase.js.map +1 -1
- package/lib/commonjs/price-breakdown/PriceSummary.js +11 -1
- package/lib/commonjs/price-breakdown/PriceSummary.js.map +1 -1
- package/lib/commonjs/price-breakdown/PriceSummaryLine.js +13 -1
- package/lib/commonjs/price-breakdown/PriceSummaryLine.js.map +1 -1
- package/lib/commonjs/rating/Rating.js +90 -4
- package/lib/commonjs/rating/Rating.js.map +1 -1
- package/lib/commonjs/stepper/Stepper.js +18 -5
- package/lib/commonjs/stepper/Stepper.js.map +1 -1
- package/lib/module/breadcrumb/Breadcrumb.js +36 -6
- package/lib/module/breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/module/cart-panel/CartLine.js +32 -10
- package/lib/module/cart-panel/CartLine.js.map +1 -1
- package/lib/module/cart-panel/CartPanel.js +3 -0
- package/lib/module/cart-panel/CartPanel.js.map +1 -1
- package/lib/module/cart-panel/shared.js +2 -0
- package/lib/module/cart-panel/shared.js.map +1 -1
- package/lib/module/checkout-summary/CheckoutConfirm.js +11 -1
- package/lib/module/checkout-summary/CheckoutConfirm.js.map +1 -1
- package/lib/module/chip/Chip.js +3 -1
- package/lib/module/chip/Chip.js.map +1 -1
- package/lib/module/dialog/Dialog.js +16 -7
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +12 -6
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/placement.js +17 -1
- package/lib/module/dialog/placement.js.map +1 -1
- package/lib/module/loading/Loading.js +8 -4
- package/lib/module/loading/Loading.js.map +1 -1
- package/lib/module/loading/Loading.web.js +8 -4
- package/lib/module/loading/Loading.web.js.map +1 -1
- package/lib/module/loading/LoadingBase.js +49 -3
- package/lib/module/loading/LoadingBase.js.map +1 -1
- package/lib/module/price-breakdown/PriceSummary.js +11 -1
- package/lib/module/price-breakdown/PriceSummary.js.map +1 -1
- package/lib/module/price-breakdown/PriceSummaryLine.js +13 -1
- package/lib/module/price-breakdown/PriceSummaryLine.js.map +1 -1
- package/lib/module/rating/Rating.js +89 -4
- package/lib/module/rating/Rating.js.map +1 -1
- package/lib/module/stepper/Stepper.js +18 -5
- package/lib/module/stepper/Stepper.js.map +1 -1
- package/lib/typescript/commonjs/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/lib/typescript/commonjs/breadcrumb/types.d.ts +7 -0
- package/lib/typescript/commonjs/breadcrumb/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/cart-panel/CartLine.d.ts +10 -5
- package/lib/typescript/commonjs/cart-panel/CartLine.d.ts.map +1 -1
- package/lib/typescript/commonjs/cart-panel/CartPanel.d.ts +1 -1
- package/lib/typescript/commonjs/cart-panel/CartPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/cart-panel/shared.d.ts +1 -1
- package/lib/typescript/commonjs/cart-panel/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/cart-panel/types.d.ts +18 -0
- package/lib/typescript/commonjs/cart-panel/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts +4 -1
- package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts.map +1 -1
- package/lib/typescript/commonjs/checkout-summary/types.d.ts +6 -0
- package/lib/typescript/commonjs/checkout-summary/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/types.d.ts +8 -6
- package/lib/typescript/commonjs/chip/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/placement.d.ts +13 -2
- package/lib/typescript/commonjs/dialog/placement.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +3 -2
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/loading/Loading.d.ts.map +1 -1
- package/lib/typescript/commonjs/loading/Loading.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/loading/LoadingBase.d.ts +18 -0
- package/lib/typescript/commonjs/loading/LoadingBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/loading/types.d.ts +11 -0
- package/lib/typescript/commonjs/loading/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/price-breakdown/PriceSummary.d.ts.map +1 -1
- package/lib/typescript/commonjs/price-breakdown/PriceSummaryLine.d.ts +3 -1
- package/lib/typescript/commonjs/price-breakdown/PriceSummaryLine.d.ts.map +1 -1
- package/lib/typescript/commonjs/price-breakdown/types.d.ts +12 -0
- package/lib/typescript/commonjs/price-breakdown/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/rating/Rating.d.ts +3 -1
- package/lib/typescript/commonjs/rating/Rating.d.ts.map +1 -1
- package/lib/typescript/commonjs/rating/index.d.ts +1 -1
- package/lib/typescript/commonjs/rating/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/rating/types.d.ts +20 -0
- package/lib/typescript/commonjs/rating/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/stepper/Stepper.d.ts +1 -1
- package/lib/typescript/commonjs/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/commonjs/stepper/types.d.ts +9 -0
- package/lib/typescript/commonjs/stepper/types.d.ts.map +1 -1
- package/lib/typescript/module/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/lib/typescript/module/breadcrumb/types.d.ts +7 -0
- package/lib/typescript/module/breadcrumb/types.d.ts.map +1 -1
- package/lib/typescript/module/cart-panel/CartLine.d.ts +10 -5
- package/lib/typescript/module/cart-panel/CartLine.d.ts.map +1 -1
- package/lib/typescript/module/cart-panel/CartPanel.d.ts +1 -1
- package/lib/typescript/module/cart-panel/CartPanel.d.ts.map +1 -1
- package/lib/typescript/module/cart-panel/shared.d.ts +1 -1
- package/lib/typescript/module/cart-panel/shared.d.ts.map +1 -1
- package/lib/typescript/module/cart-panel/types.d.ts +18 -0
- package/lib/typescript/module/cart-panel/types.d.ts.map +1 -1
- package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts +4 -1
- package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts.map +1 -1
- package/lib/typescript/module/checkout-summary/types.d.ts +6 -0
- package/lib/typescript/module/checkout-summary/types.d.ts.map +1 -1
- package/lib/typescript/module/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/module/chip/types.d.ts +8 -6
- package/lib/typescript/module/chip/types.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/placement.d.ts +13 -2
- package/lib/typescript/module/dialog/placement.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +3 -2
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/loading/Loading.d.ts.map +1 -1
- package/lib/typescript/module/loading/Loading.web.d.ts.map +1 -1
- package/lib/typescript/module/loading/LoadingBase.d.ts +18 -0
- package/lib/typescript/module/loading/LoadingBase.d.ts.map +1 -1
- package/lib/typescript/module/loading/types.d.ts +11 -0
- package/lib/typescript/module/loading/types.d.ts.map +1 -1
- package/lib/typescript/module/price-breakdown/PriceSummary.d.ts.map +1 -1
- package/lib/typescript/module/price-breakdown/PriceSummaryLine.d.ts +3 -1
- package/lib/typescript/module/price-breakdown/PriceSummaryLine.d.ts.map +1 -1
- package/lib/typescript/module/price-breakdown/types.d.ts +12 -0
- package/lib/typescript/module/price-breakdown/types.d.ts.map +1 -1
- package/lib/typescript/module/rating/Rating.d.ts +3 -1
- package/lib/typescript/module/rating/Rating.d.ts.map +1 -1
- package/lib/typescript/module/rating/index.d.ts +1 -1
- package/lib/typescript/module/rating/index.d.ts.map +1 -1
- package/lib/typescript/module/rating/types.d.ts +20 -0
- package/lib/typescript/module/rating/types.d.ts.map +1 -1
- package/lib/typescript/module/stepper/Stepper.d.ts +1 -1
- package/lib/typescript/module/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/module/stepper/types.d.ts +9 -0
- package/lib/typescript/module/stepper/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/breadcrumb/Breadcrumb.tsx +29 -4
- package/src/breadcrumb/types.ts +7 -0
- package/src/cart-panel/CartLine.tsx +30 -7
- package/src/cart-panel/CartPanel.tsx +3 -0
- package/src/cart-panel/shared.ts +11 -1
- package/src/cart-panel/types.ts +18 -0
- package/src/checkout-summary/CheckoutConfirm.tsx +9 -0
- package/src/checkout-summary/types.ts +6 -0
- package/src/chip/Chip.tsx +3 -1
- package/src/chip/types.ts +8 -6
- package/src/dialog/Dialog.tsx +19 -8
- package/src/dialog/Dialog.web.tsx +15 -7
- package/src/dialog/placement.ts +19 -2
- package/src/dialog/types.ts +3 -2
- package/src/loading/Loading.tsx +6 -2
- package/src/loading/Loading.web.tsx +6 -2
- package/src/loading/LoadingBase.tsx +55 -5
- package/src/loading/types.ts +11 -0
- package/src/price-breakdown/PriceSummary.tsx +10 -0
- package/src/price-breakdown/PriceSummaryLine.tsx +12 -0
- package/src/price-breakdown/types.ts +12 -0
- package/src/rating/Rating.tsx +87 -3
- package/src/rating/index.ts +1 -0
- package/src/rating/types.ts +21 -0
- package/src/stepper/Stepper.tsx +18 -5
- package/src/stepper/types.ts +9 -0
package/docs/adoption-matrix.mdx
CHANGED
|
@@ -173,7 +173,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
173
173
|
| `date-picker` | `@oxy.so/bloom/date-picker` + barrel | universal | `date-picker.mdx` | yes | 4 | reads | reads | | reads |
|
|
174
174
|
| `delivery-slot` | `@oxy.so/bloom/delivery-slot` + barrel | universal | `delivery-slot.mdx` | yes | 2 | reads | | | |
|
|
175
175
|
| `design-tokens` | `@oxy.so/bloom/design-tokens` + barrel | universal | `design-tokens.mdx` | yes | 3 | | | | |
|
|
176
|
-
| `dialog` | `@oxy.so/bloom/dialog` + barrel | web fork | `dialog.mdx` | yes |
|
|
176
|
+
| `dialog` | `@oxy.so/bloom/dialog` + barrel | web fork | `dialog.mdx` | yes | 17 | | | | |
|
|
177
177
|
| `directions` | `@oxy.so/bloom/directions` + barrel | universal | `directions.mdx` | yes | 2 | | | | |
|
|
178
178
|
| `divider` | `@oxy.so/bloom/divider` + barrel | universal | `divider.mdx` | yes | 1 | | | | |
|
|
179
179
|
| `dot-grid-meter` | `@oxy.so/bloom/dot-grid-meter` + barrel | universal | `dot-grid-meter.mdx` | yes | 2 | | | | |
|
|
@@ -213,7 +213,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
213
213
|
| `listing-card` | `@oxy.so/bloom/listing-card` + barrel | universal | `listing-card.mdx` | yes | 4 | | | | |
|
|
214
214
|
| `listing-details` | `@oxy.so/bloom/listing-details` + barrel | universal | `listing-details.mdx` | yes | 4 | | | | reads |
|
|
215
215
|
| `listing-editor` | `@oxy.so/bloom/listing-editor` + barrel | universal | `listing-editor.mdx` | yes | 1 | **adaptation** | | | reads |
|
|
216
|
-
| `loading` | `@oxy.so/bloom/loading` + barrel | web fork | `loading.mdx` | yes |
|
|
216
|
+
| `loading` | `@oxy.so/bloom/loading` + barrel | web fork | `loading.mdx` | yes | 3 | | | | |
|
|
217
217
|
| `location-puck` | `@oxy.so/bloom/location-puck` + barrel | universal | `location-puck.mdx` | yes | 1 | | | | |
|
|
218
218
|
| `lyrics` | `@oxy.so/bloom/lyrics` + barrel | universal | `lyrics.mdx` | yes | 2 | | | | |
|
|
219
219
|
| `mail-compose` | `@oxy.so/bloom/mail-compose` + barrel | universal | `mail-compose.mdx` | yes | 2 | reads | | | reads |
|
|
@@ -257,7 +257,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
257
257
|
| `place-list` | `@oxy.so/bloom/place-list` + barrel | universal | `place-list.mdx` | yes | 1 | | | | |
|
|
258
258
|
| `place-reviews` | `@oxy.so/bloom/place-reviews` + barrel | universal | `place-reviews.mdx` | yes | 1 | | | | reads |
|
|
259
259
|
| `popover` | `@oxy.so/bloom/popover` + barrel | web fork | `popover.mdx` | yes | 7 | | | reads | reads |
|
|
260
|
-
| `portal` | `@oxy.so/bloom/portal` + barrel | web fork | `portal.mdx` | yes |
|
|
260
|
+
| `portal` | `@oxy.so/bloom/portal` + barrel | web fork | `portal.mdx` | yes | 18 | | | | |
|
|
261
261
|
| `pressable-scale` | `@oxy.so/bloom/pressable-scale` + barrel | universal | `pressable-scale.mdx` | yes | 1 | | | | |
|
|
262
262
|
| `price-breakdown` | `@oxy.so/bloom/price-breakdown` + barrel | universal | `price-breakdown.mdx` | yes | 3 | | | | reads |
|
|
263
263
|
| `progressive-blur` | `@oxy.so/bloom/progressive-blur` + barrel | web fork | `progressive-blur.mdx` | yes | 1 | | | | |
|
|
@@ -304,7 +304,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
304
304
|
| `tenancy` | `@oxy.so/bloom/tenancy` + barrel | universal | `tenancy.mdx` | yes | 3 | | n/a¹ | | |
|
|
305
305
|
| `text-field` | `@oxy.so/bloom/text-field` + barrel | universal | `text-field.mdx` | yes | 13 | reads | reads | | |
|
|
306
306
|
| `textarea` | `@oxy.so/bloom/textarea` + barrel | universal | `textarea.mdx` | yes | 4 | reads | reads | | n/a¹ |
|
|
307
|
-
| `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes |
|
|
307
|
+
| `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes | 303 | | | n/a¹ | reads |
|
|
308
308
|
| `theme-toggle` | `@oxy.so/bloom/theme-toggle` + barrel | universal | `theme-toggle.mdx` | yes | 1 | n/a¹ | | | |
|
|
309
309
|
| `toast` | `@oxy.so/bloom/toast` + barrel | universal | `toast.mdx` | yes | 17 | | | | |
|
|
310
310
|
| `tooltip` | `@oxy.so/bloom/tooltip` + barrel | web fork | `tooltip.mdx` | yes | 1 | | | | |
|
package/docs/breadcrumb.mdx
CHANGED
|
@@ -35,6 +35,16 @@ An item is a **link** with `href`, a **button** with `onPress`, and a plain labe
|
|
|
35
35
|
|
|
36
36
|
The list scrolls horizontally, with no scrollbar, when it outgrows its container. Bloom uses a full pill, like every other pressable, rather than a 6px corner.
|
|
37
37
|
|
|
38
|
+
### Right-to-left and custom separators
|
|
39
|
+
|
|
40
|
+
The chevron points the READING direction. In a right-to-left layout (`<html dir="rtl">` on web, `I18nManager.isRTL` natively) the row mirrors, and the chevron flips with it (`scaleX(-1)`, read from `useIsRtl()`) so it still points from each crumb to the next. The landmark also carries `dir` on web, so react-native-web resolves logical keys against it.
|
|
41
|
+
|
|
42
|
+
`separator` replaces the chevron with any node — a `"/"`, a dot, an icon. It is hidden from assistive tech like the chevron, and rendered as given: a custom glyph that has a direction is the caller's to mirror.
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
<Breadcrumb separator={<Text variant="caption-1-medium">/</Text>}>…</Breadcrumb>
|
|
46
|
+
```
|
|
47
|
+
|
|
38
48
|
### `href` and routers
|
|
39
49
|
|
|
40
50
|
On web an `href` item is a real `<a href>`, so middle-click and "open in new tab" work. Pass `onPress` too and the browser's navigation is prevented so the router can navigate instead. On native, an `href` item without `onPress` opens the URL with `Linking`.
|
|
@@ -48,6 +58,7 @@ On web an `href` item is a real `<a href>`, so middle-click and "open in new tab
|
|
|
48
58
|
| Prop | Type | Default | Description |
|
|
49
59
|
|------|------|---------|-------------|
|
|
50
60
|
| `Breadcrumb.accessibilityLabel?` | `string` | `'Breadcrumb'` | Names the landmark. |
|
|
61
|
+
| `Breadcrumb.separator?` | `ReactNode` | direction-aware chevron | Replaces the chevron between items; hidden from assistive tech. |
|
|
51
62
|
| `BreadcrumbItem.href?` | `string` | — | Makes the item a link. |
|
|
52
63
|
| `BreadcrumbItem.onPress?` | `() => void` | — | Makes the item a button (or routes an `href`). |
|
|
53
64
|
| `BreadcrumbItem.current?` | `boolean` | `false` | The active page. |
|
package/docs/cart-panel.mdx
CHANGED
|
@@ -43,10 +43,12 @@ Inline in a desktop sidebar it is dropped in a `Card`; on a phone it is what a `
|
|
|
43
43
|
|
|
44
44
|
Which is why the vendor is a header and not a field on every line. Switching vendor is a different action — it empties the basket — and this component does not offer it.
|
|
45
45
|
|
|
46
|
-
## The stepper does not remove
|
|
46
|
+
## The stepper does not remove — unless you ask
|
|
47
47
|
|
|
48
48
|
`CartLine`'s stepper has a floor of **1**, and removing is its own control with its own accessible name. A stepper that deletes the line when you press `−` once too often is a destructive action hiding behind an arithmetic one, and it has no label saying so.
|
|
49
49
|
|
|
50
|
+
`removeInStepper` (on `CartLine`, and on `CartPanel` for every line) opts into the storefront pattern instead: at quantity 1 the `−` becomes a trash button NAMED as removal — `removeLabel`, default `"Remove <name>"` — through `Stepper`'s `onRemove`, and the separate remove control is not drawn. It needs both `onQuantityChange` and `onRemove`. A sold-out line keeps the separate control, because its stepper is disabled and could not remove anything.
|
|
51
|
+
|
|
50
52
|
The line is never pressable, which is what lets its controls live inside it: a pressable `Item` is a real `<button>` on web, and a control inside one is invalid HTML whose click also fires the row. Editing a line's options is `MenuItemOptions` in a sheet, opened from the dish rather than from a row that is mostly controls.
|
|
51
53
|
|
|
52
54
|
## The promo field has two states, not one
|
|
@@ -71,6 +73,6 @@ Once the order is placed it belongs to `order-status`: `OrderStatusTimeline` for
|
|
|
71
73
|
|
|
72
74
|
## Traps
|
|
73
75
|
|
|
74
|
-
- **Every amount is a string.** `price` on a line is the line's own total, already multiplied by `quantity` **by the app**. Nothing here multiplies, converts or rounds.
|
|
76
|
+
- **Every amount is a string.** `price` on a line is the line's own total, already multiplied by `quantity` **by the app**. Nothing here multiplies, converts or rounds. A second currency is `secondaryPrice` (`"≈ 12,00 €"`), drawn de-emphasised under the price and added to the line's accessible name after it — `listing-card`'s `ListingPriceLine.secondary`, spelled after this family's `price`. The totals take `secondaryAmount` on their `PriceLine`s.
|
|
75
77
|
- **The empty basket hides everything after the lines.** No tip picker, no promo field, no totals and no checkout button — each of them would be a control acting on nothing.
|
|
76
78
|
- **`CartLine` takes the line's fields, not the entry.** `CartLineEntry` carries the `id` the panel keys and reports by; the standalone component takes the rest, so a caller cannot pass an id that reaches nothing.
|
|
@@ -88,3 +88,7 @@ screen and a button reading "Place order" are two, and the gap between them is w
|
|
|
88
88
|
reader confirms a figure they last saw before a tip picker changed it. The separator is a
|
|
89
89
|
middle dot: "Place order - €49.62" reads as a subtraction at a glance in a row that is
|
|
90
90
|
otherwise full of money.
|
|
91
|
+
|
|
92
|
+
The button carries ONE amount — the one the charge is made in. A second currency is
|
|
93
|
+
`secondaryAmount` (`"≈ 49,62 €"`), pre-formatted like `amount` and drawn de-emphasised,
|
|
94
|
+
centred 8 under the button, above the terms.
|
package/docs/chip.mdx
CHANGED
|
@@ -66,16 +66,29 @@ The hues sit BESIDE the accent recipe, not inside it: `resolveAccentColors` is u
|
|
|
66
66
|
|
|
67
67
|
### Role
|
|
68
68
|
|
|
69
|
-
A pressable chip's ROLE decides which state attribute it carries, and the
|
|
69
|
+
A pressable chip's ROLE decides which state attribute it carries, and the four are not interchangeable:
|
|
70
70
|
|
|
71
71
|
| `role` | web | native |
|
|
72
72
|
|---|---|---|
|
|
73
73
|
| `button` (default) | `aria-pressed` | `accessibilityState.selected` |
|
|
74
|
+
| `checkbox` | `aria-checked` | `accessibilityState.checked` |
|
|
74
75
|
| `radio` | `aria-checked` | `accessibilityState.checked` |
|
|
75
76
|
| `tab` | `aria-selected` | `accessibilityState.selected` |
|
|
76
77
|
|
|
77
78
|
`aria-pressed` is invalid on a radio and on a tab, which is what this component used to emit for every one of them. Put a `radio` inside a `role="radiogroup"` and a `tab` inside a `role="tablist"` — `ChipRow` takes that role for you.
|
|
78
79
|
|
|
80
|
+
A multi-select filter row (brands, sizes, amenities — any number on at once) is a `group` of `checkbox` chips: a screen reader then says "checked"/"not checked" rather than "pressed", which is what a filter is. `onCheckedChange` receives the next state.
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
<ChipRow accessibilityLabel="Brand">
|
|
84
|
+
{brands.map((brand) => (
|
|
85
|
+
<Chip key={brand} role="checkbox" checked={picked.has(brand)} onCheckedChange={(on) => toggle(brand, on)}>
|
|
86
|
+
{brand}
|
|
87
|
+
</Chip>
|
|
88
|
+
))}
|
|
89
|
+
</ChipRow>
|
|
90
|
+
```
|
|
91
|
+
|
|
79
92
|
On web, `tabIndex` and `onKeyDown` are passed through for a roving-tabindex row (one tab stop, arrows move focus). Both are inert on native. A chip also forwards a ref to its pressable, so a row can focus one.
|
|
80
93
|
|
|
81
94
|
### `inverted`
|
package/docs/dialog.mdx
CHANGED
|
@@ -6,7 +6,7 @@ order: 3
|
|
|
6
6
|
|
|
7
7
|
# Dialog
|
|
8
8
|
|
|
9
|
-
A single `<Dialog>` component for every overlay surface — centered modal, side-sheet (left/right drawer), or bottom-sheet — controlled by the `placement` prop. Same component, same props on every platform.
|
|
9
|
+
A single `<Dialog>` component for every overlay surface — centered modal, side-sheet (left/right or logical start/end drawer), or bottom-sheet — controlled by the `placement` prop. Same component, same props on every platform.
|
|
10
10
|
|
|
11
11
|
<Callout variant="warning" title="Required providers (native)">
|
|
12
12
|
Your app root **must** be wrapped with `GestureHandlerRootView` from `react-native-gesture-handler` for the bottom-sheet pan gestures to work. See [Getting started](/docs/bloom/main/getting-started).
|
|
@@ -105,7 +105,7 @@ Drop the declarative props entirely — `children` owns every pixel.
|
|
|
105
105
|
| `children?` | `React.ReactNode` | — | Custom content rendered after the description. |
|
|
106
106
|
| `onClose?` | `() => void` | — | Fires after the dialog finishes closing. In controlled mode, the host flips `open` to `false`. |
|
|
107
107
|
| `contentPadding?` | `number` | `20` | Inner padding of the dialog body (px). Set `0` for custom children that own their insets. |
|
|
108
|
-
| `width?` | `number` | `460` | Side-sheet width (px) on `left`/`right` placements. |
|
|
108
|
+
| `width?` | `number` | `460` | Side-sheet width (px) on `left`/`right`/`start`/`end` placements. |
|
|
109
109
|
| `maxWidth?` | `number` | `480` | Centered-card max width (px). |
|
|
110
110
|
| `maxHeightRatio?` | `number` | `0.9` | Bottom-sheet max height as a fraction of the viewport height. |
|
|
111
111
|
| `inset?` | `{ top?; bottom?; left?; right? }` | — | Side-sheet inset (px) from the overlay container edges. |
|
|
@@ -123,7 +123,7 @@ Drop the declarative props entirely — `children` owns every pixel.
|
|
|
123
123
|
`placement` accepts a single value or a **responsive map** resolved by `useWindowDimensions()`:
|
|
124
124
|
|
|
125
125
|
```ts
|
|
126
|
-
type DialogPlacement = 'center' | 'left' | 'right' | 'bottom';
|
|
126
|
+
type DialogPlacement = 'center' | 'left' | 'right' | 'start' | 'end' | 'bottom';
|
|
127
127
|
|
|
128
128
|
type ResponsiveDialogPlacement =
|
|
129
129
|
| DialogPlacement
|
|
@@ -134,7 +134,8 @@ Breakpoints (px): `sm` 640 / `md` 768 / `lg` 1024 / `xl` 1280. The largest break
|
|
|
134
134
|
|
|
135
135
|
Per-placement behavior:
|
|
136
136
|
- `center` — DOM-portal modal (web) / detached floating card (native).
|
|
137
|
-
- `left` / `right` — animated side-sheet anchored to
|
|
137
|
+
- `left` / `right` — animated side-sheet anchored to that PHYSICAL viewport edge.
|
|
138
|
+
- `start` / `end` — the same side-sheet on the LOGICAL edge: `start` is the left in a left-to-right layout and the right in a right-to-left one (`end` the reverse), read from `useIsRtl()`, and the panel slides in from that edge. The matching `inset` side applies (`inset.right` for `start` in RTL). On native the panel is positioned with `insetInlineStart`/`insetInlineEnd`, which Yoga resolves against `I18nManager` — a physical `left`/`right` would be swapped by React Native's default `swapLeftAndRightInRTL`. On web the drawer is portaled outside any `dir` context, so it takes the physical edge `useIsRtl()` names. An app that ships Arabic or Hebrew wants `start`/`end`: `{ base: 'bottom', md: 'start' }` is the mirrored store drawer.
|
|
138
139
|
- `bottom` — reuses the cross-platform `BottomSheet` on BOTH web and native (drag-to-dismiss + internal scroll work everywhere). Custom `children` on bottom placement are rendered in a NON-scrollable body — children own scrolling.
|
|
139
140
|
|
|
140
141
|
### `DialogAction`
|
package/docs/loading.mdx
CHANGED
|
@@ -52,6 +52,16 @@ For native-tailwind users, `className` overrides `color`:
|
|
|
52
52
|
<Loading variant="spinner" className="text-primary" />
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
## Accessibility
|
|
56
|
+
|
|
57
|
+
A spinner draws no words, so nothing but a name can tell a screen reader what is loading. Pass `accessibilityLabel` and the indicator becomes an indeterminate `progressbar`: `role="progressbar"`, `aria-label` and `aria-busy="true"` on web (flat `aria-*`, because react-native-web drops `accessibilityState`), the same role, label and busy state natively, and deliberately **no** `aria-valuenow` — that omission is how ARIA says "indeterminate". The `top` bar carries it only while `showLoading`.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<Loading accessibilityLabel="Loading results" />
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
It is opt-in, so an unlabelled `Loading` renders exactly as before, with no role. That is right when the spinner sits INSIDE something already announcing the wait — an upload tile's own named progressbar — where a second one would say it twice.
|
|
64
|
+
|
|
55
65
|
## Props
|
|
56
66
|
|
|
57
67
|
### Shared
|
|
@@ -64,6 +74,7 @@ For native-tailwind users, `className` overrides `color`:
|
|
|
64
74
|
| `className?` | `string` | NativeWind class. Overrides `color`. |
|
|
65
75
|
| `style?` | `ViewStyle` | Container style. |
|
|
66
76
|
| `showLoading?` | `boolean` | For animated variants — pause when false. |
|
|
77
|
+
| `accessibilityLabel?` | `string` | Names the indicator and makes it an indeterminate `progressbar`. See [Accessibility](#accessibility). |
|
|
67
78
|
| `testID?` | `string` | |
|
|
68
79
|
|
|
69
80
|
### `spinner`
|
package/docs/price-breakdown.mdx
CHANGED
|
@@ -37,6 +37,23 @@ two — and "quietly" is the problem: a mis-formatted price still renders.
|
|
|
37
37
|
In particular, **`tone="discount"` colours a credit; it does not create one.** Pass
|
|
38
38
|
`"−€5.00"`, not `"5.00"`.
|
|
39
39
|
|
|
40
|
+
### A second currency
|
|
41
|
+
|
|
42
|
+
`secondaryAmount` — on a `PriceLine` and on the `total` — is a second, pre-formatted
|
|
43
|
+
rendering of the same amount, drawn under it in `body-2-regular` at the secondary rung,
|
|
44
|
+
tabular and right-aligned: the buyer's currency beside the shop's.
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
<PriceSummary
|
|
48
|
+
lines={[{ label: 'Subtotal', amount: '$13.20', secondaryAmount: '≈ 12,00 €' }]}
|
|
49
|
+
total={{ label: 'Total', amount: '$15.20', secondaryAmount: '≈ 13,82 €' }}
|
|
50
|
+
/>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
It is the same contract as `amount`: drawn as given, never converted. The name follows
|
|
54
|
+
the family's own `amount`; `listing-card`'s `ListingPriceLine.secondary` and
|
|
55
|
+
`cart-panel`'s `secondaryPrice` are the same idea on those families' `price`.
|
|
56
|
+
|
|
40
57
|
## The three tones
|
|
41
58
|
|
|
42
59
|
| tone | what it is for |
|
package/docs/rating.mdx
CHANGED
|
@@ -32,6 +32,11 @@ const [stars, setStars] = useState<number | null>(null);
|
|
|
32
32
|
| `reviewsLabel` | the word after the count, default `"reviews"` — translate it |
|
|
33
33
|
| `newLabel` | drawn instead of the value when there is no rating yet, default `"New"` |
|
|
34
34
|
| `size` | `'small'` (14px star, body-2 text) or `'medium'` (default, 16px star, body text) |
|
|
35
|
+
| `variant` | `'compact'` (default, one star) or `'stars'` (five stars, filled fractionally, before the value) |
|
|
36
|
+
| `color` | paints the star(s), the value and the count — e.g. white over a brand-coloured hero |
|
|
37
|
+
| `starColor` | the filled star(s) only (a gold star beside neutral text); default `color` |
|
|
38
|
+
| `countColor` | the count only; default `color` when given, else text-secondary |
|
|
39
|
+
| `emptyStarColor` | `stars` only: the unfilled part of each star; default the border colour |
|
|
35
40
|
| `accessibilityLabel` | replaces the composed name — pass a translated sentence |
|
|
36
41
|
| `style`, `testID` | |
|
|
37
42
|
|
|
@@ -41,6 +46,23 @@ named "Rated 4.92 out of 5, 128 reviews", so a screen reader does not read the
|
|
|
41
46
|
star, the number and the brackets as separate items. That sentence is English;
|
|
42
47
|
apps in other languages pass `accessibilityLabel`.
|
|
43
48
|
|
|
49
|
+
### Five stars, and colour
|
|
50
|
+
|
|
51
|
+
`variant="stars"` draws a row of five stars 2px apart instead of the single
|
|
52
|
+
star. Each is the unfilled star (`emptyStarColor`) with the filled star clipped
|
|
53
|
+
over it to its share of the value — 4.3 fills four stars and 30% of the fifth. A
|
|
54
|
+
string `value` is parsed for the fill and drawn as given. The clip is anchored
|
|
55
|
+
with a logical inset, so in a right-to-left layout the row fills from the right
|
|
56
|
+
(the root carries `dir` on web for react-native-web to resolve it). The row
|
|
57
|
+
stays ONE named image, like the compact rating.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<Rating variant="stars" value={4.3} count={128} color="#fff" emptyStarColor="rgba(255,255,255,0.35)" />
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Over a surface the theme's text pair cannot sit on — a brand-coloured hero — pass
|
|
64
|
+
`color`; the default text-primary/text-secondary are measured against the PAGE.
|
|
65
|
+
|
|
44
66
|
## `RatingBar`
|
|
45
67
|
|
|
46
68
|
| prop | decides |
|
package/docs/stepper.mdx
CHANGED
|
@@ -36,6 +36,7 @@ import { Stepper, StepperRow } from '@oxy.so/bloom/stepper';
|
|
|
36
36
|
| `formatValue` | the drawn and announced text, e.g. `(n) => (n === 8 ? '8+' : String(n))` |
|
|
37
37
|
| `accessibilityLabel` | **required** — what is being counted |
|
|
38
38
|
| `decrementLabel` / `incrementLabel` | the buttons' names, default `"Decrease"` / `"Increase"` — translate them |
|
|
39
|
+
| `onRemove` / `removeLabel` | opt-in: at `min` the `−` becomes a trash button named `removeLabel` (default `"Remove"`) that calls `onRemove`; without it the button disables at `min` |
|
|
39
40
|
| `style`, `testID` | the row; `testID` also derives `-decrement`, `-value`, `-increment` |
|
|
40
41
|
|
|
41
42
|
`StepperRow` takes every `Stepper` prop plus `title`, `description`, `divider`
|
|
@@ -53,6 +54,30 @@ import { Stepper, StepperRow } from '@oxy.so/bloom/stepper';
|
|
|
53
54
|
- **Row** title `headline-medium` text-primary over a `body-regular`
|
|
54
55
|
text-secondary description, the stepper on the right, 16 above and below.
|
|
55
56
|
|
|
57
|
+
## Remove at the floor
|
|
58
|
+
|
|
59
|
+
By default the stepper floors at `min` and the `−` disables there. A basket line
|
|
60
|
+
that should go from 1 to gone opts in with `onRemove`:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
<Stepper
|
|
64
|
+
value={quantity}
|
|
65
|
+
min={1}
|
|
66
|
+
onValueChange={setQuantity}
|
|
67
|
+
onRemove={removeLine}
|
|
68
|
+
removeLabel={`Remove ${name}`}
|
|
69
|
+
accessibilityLabel={name}
|
|
70
|
+
/>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
At `min` the `−` draws `RiDeleteBinLine`, is named `removeLabel`, stays enabled
|
|
74
|
+
and calls `onRemove` rather than `onValueChange`. Above `min` it is the ordinary
|
|
75
|
+
decrement. Only the BUTTON removes: ArrowDown, Home and the native `decrement`
|
|
76
|
+
action on the value still stop at `min`, because a key or a swipe that deletes is
|
|
77
|
+
a destructive action behind an arithmetic one. So that a keyboard user can
|
|
78
|
+
reach it, the remove button joins the tab order (the decrement never does). A
|
|
79
|
+
`disabled` stepper offers no removal.
|
|
80
|
+
|
|
56
81
|
## Accessibility
|
|
57
82
|
|
|
58
83
|
The stepper is a `group` named by `accessibilityLabel` — or, inside a
|
|
@@ -11,6 +11,7 @@ var _useTheme = require("../theme/use-theme.js");
|
|
|
11
11
|
var _Typography = require("../typography/Typography.js");
|
|
12
12
|
var _tokens = require("../styles/tokens.js");
|
|
13
13
|
var _useInteractionState = require("../hooks/use-interaction-state.js");
|
|
14
|
+
var _useIsRtl = require("../hooks/use-is-rtl.js");
|
|
14
15
|
var _interactiveWebCss = require("../styles/interactive-web-css.js");
|
|
15
16
|
var _shared = require("../button/shared.js");
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -71,16 +72,28 @@ const BREADCRUMB_CSS = (0, _interactiveWebCss.interactiveWebCss)({
|
|
|
71
72
|
});
|
|
72
73
|
const IS_WEB = _reactNative.Platform.OS === 'web';
|
|
73
74
|
|
|
74
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* `ChevronRightSmall`, path for path. It points the READING direction: the
|
|
77
|
+
* row mirrors in a right-to-left layout (flex order follows the direction on
|
|
78
|
+
* both platforms), so a fixed right-pointing chevron would point back at the
|
|
79
|
+
* crumb it came from. A glyph is a sign, not an inset — no logical style key
|
|
80
|
+
* can flip it — so it reads `useIsRtl()` and mirrors itself with `scaleX`.
|
|
81
|
+
*/
|
|
75
82
|
function Chevron({
|
|
76
|
-
color
|
|
83
|
+
color,
|
|
84
|
+
rtl
|
|
77
85
|
}) {
|
|
78
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
79
87
|
"aria-hidden": true,
|
|
80
88
|
style: {
|
|
81
89
|
width: 12,
|
|
82
90
|
height: 12,
|
|
83
|
-
flexShrink: 0
|
|
91
|
+
flexShrink: 0,
|
|
92
|
+
...(rtl ? {
|
|
93
|
+
transform: [{
|
|
94
|
+
scaleX: -1
|
|
95
|
+
}]
|
|
96
|
+
} : null)
|
|
84
97
|
},
|
|
85
98
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.default, {
|
|
86
99
|
width: 12,
|
|
@@ -98,14 +111,33 @@ function Chevron({
|
|
|
98
111
|
}
|
|
99
112
|
const BreadcrumbComponent = ({
|
|
100
113
|
children,
|
|
114
|
+
separator,
|
|
101
115
|
accessibilityLabel = 'Breadcrumb',
|
|
102
116
|
style,
|
|
103
117
|
testID
|
|
104
118
|
}) => {
|
|
105
119
|
const theme = (0, _useTheme.useTheme)();
|
|
120
|
+
const rtl = (0, _useIsRtl.useIsRtl)();
|
|
121
|
+
const directionProps = (0, _useIsRtl.useDirectionProps)();
|
|
106
122
|
const palette = (0, _react.useMemo)(() => resolveBreadcrumbPalette(theme), [theme]);
|
|
107
123
|
const items = _react.Children.toArray(children).filter(_react.isValidElement);
|
|
124
|
+
// A caller's separator is theirs to mirror (or not — a "/" needs nothing);
|
|
125
|
+
// it is hidden from assistive technology like the chevron, since the list
|
|
126
|
+
// structure already says where one crumb ends.
|
|
127
|
+
const between = separator !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
128
|
+
"aria-hidden": true,
|
|
129
|
+
style: {
|
|
130
|
+
flexShrink: 0,
|
|
131
|
+
flexDirection: 'row',
|
|
132
|
+
alignItems: 'center'
|
|
133
|
+
},
|
|
134
|
+
children: separator
|
|
135
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Chevron, {
|
|
136
|
+
color: palette.tertiary,
|
|
137
|
+
rtl: rtl
|
|
138
|
+
});
|
|
108
139
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
140
|
+
...directionProps,
|
|
109
141
|
role: "navigation",
|
|
110
142
|
accessibilityLabel: accessibilityLabel,
|
|
111
143
|
testID: testID,
|
|
@@ -130,9 +162,7 @@ const BreadcrumbComponent = ({
|
|
|
130
162
|
paddingRight: 4
|
|
131
163
|
},
|
|
132
164
|
children: items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
133
|
-
children: [index > 0 ?
|
|
134
|
-
color: palette.tertiary
|
|
135
|
-
}) : null, item]
|
|
165
|
+
children: [index > 0 ? between : null, item]
|
|
136
166
|
}, item.key ?? index))
|
|
137
167
|
})
|
|
138
168
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSvg","_useTheme","_Typography","_tokens","_useInteractionState","_interactiveWebCss","_shared","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","resolveBreadcrumbPalette","theme","c","colors","tertiary","textSecondary","secondary","text","hover","backgroundSecondary","ring","primary","STYLE_ID","SELECTOR","BREADCRUMB_CSS","interactiveWebCss","selector","varPrefix","base","transition","BUTTON_TRANSITION_MS","declarations","outlineOffset","extraRules","IS_WEB","Platform","OS","Chevron","color","jsx","View","style","width","height","flexShrink","children","viewBox","fill","Path","d","stroke","strokeWidth","strokeLinecap","BreadcrumbComponent","accessibilityLabel","testID","useTheme","palette","useMemo","items","Children","toArray","filter","isValidElement","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSvg","_useTheme","_Typography","_tokens","_useInteractionState","_useIsRtl","_interactiveWebCss","_shared","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","resolveBreadcrumbPalette","theme","c","colors","tertiary","textSecondary","secondary","text","hover","backgroundSecondary","ring","primary","STYLE_ID","SELECTOR","BREADCRUMB_CSS","interactiveWebCss","selector","varPrefix","base","transition","BUTTON_TRANSITION_MS","declarations","outlineOffset","extraRules","IS_WEB","Platform","OS","Chevron","color","rtl","jsx","View","style","width","height","flexShrink","transform","scaleX","children","viewBox","fill","Path","d","stroke","strokeWidth","strokeLinecap","BreadcrumbComponent","separator","accessibilityLabel","testID","useTheme","useIsRtl","directionProps","useDirectionProps","palette","useMemo","items","Children","toArray","filter","isValidElement","between","undefined","flexDirection","alignItems","role","ScrollView","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","gap","paddingLeft","paddingRight","map","item","index","jsxs","Fragment","key","BreadcrumbItemComponent","icon","Icon","leading","href","onPress","current","textStyle","useInteractiveWebCss","state","hovered","onIn","onHoverIn","onOut","onHoverOut","useInteractionState","foreground","name","String","content","Text","selectable","variant","numberOfLines","pillStyle","marginLeft","marginRight","paddingTop","paddingBottom","borderRadius","full","backgroundColor","hoverProps","Pressable","dataSet","bloomBreadcrumbItem","event","preventDefault","Linking","openURL","Breadcrumb","exports","memo","displayName","BreadcrumbItem"],"sourceRoot":"../../../src","sources":["breadcrumb/Breadcrumb.tsx"],"mappings":";;;;;;AAAA,IAA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,OAAA,CAAAD,UAAA,gBAAG,IAAAE,WAAI,EAAC3E,mBAAmB,CAAC;AACnDyE,UAAU,CAACG,WAAW,GAAG,YAAY;AAE9B,MAAMC,cAAc,GAAAH,OAAA,CAAAG,cAAA,gBAAG,IAAAF,WAAI,EAAC1C,uBAAuB,CAAC;AAC3D4C,cAAc,CAACD,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -26,12 +26,17 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
26
26
|
* leading the square photo (56; 44 compact), washed while it is sold out
|
|
27
27
|
* body the name; the chosen options on one quiet line; the note; then
|
|
28
28
|
* the quantity control and remove, side by side
|
|
29
|
-
* trailing the price, right-aligned, with an optional struck original
|
|
29
|
+
* trailing the price, right-aligned, with an optional struck original, and
|
|
30
|
+
* an optional `secondaryPrice` (a second currency) under it in the
|
|
31
|
+
* secondary colour
|
|
30
32
|
*
|
|
31
|
-
* THE STEPPER DOES NOT REMOVE. Its floor is 1, and removing is its
|
|
32
|
-
* with its own name — a stepper that deletes the line when you
|
|
33
|
-
* too often is a destructive action behind an arithmetic one
|
|
34
|
-
*
|
|
33
|
+
* BY DEFAULT THE STEPPER DOES NOT REMOVE. Its floor is 1, and removing is its
|
|
34
|
+
* own control with its own name — a stepper that deletes the line when you
|
|
35
|
+
* press `−` once too often is a destructive action behind an arithmetic one.
|
|
36
|
+
* `removeInStepper` opts into the storefront pattern instead: at 1 the `−`
|
|
37
|
+
* becomes a trash button NAMED as removal (`Stepper`'s `onRemove`), and the
|
|
38
|
+
* separate remove control is not drawn. A sold-out line keeps the separate
|
|
39
|
+
* control, because its stepper is disabled and could not remove anything.
|
|
35
40
|
*
|
|
36
41
|
* The row is never pressable, which is what lets the controls live in it: a
|
|
37
42
|
* pressable `Item` is a real `<button>` on web and a control inside one is
|
|
@@ -53,6 +58,7 @@ function CartLineComponent(props) {
|
|
|
53
58
|
note,
|
|
54
59
|
price,
|
|
55
60
|
originalPrice,
|
|
61
|
+
secondaryPrice,
|
|
56
62
|
quantity,
|
|
57
63
|
photo,
|
|
58
64
|
photoVariant,
|
|
@@ -61,6 +67,7 @@ function CartLineComponent(props) {
|
|
|
61
67
|
onQuantityChange,
|
|
62
68
|
onRemove,
|
|
63
69
|
removeLabel,
|
|
70
|
+
removeInStepper = false,
|
|
64
71
|
density = 'comfortable',
|
|
65
72
|
accessibilityLabel,
|
|
66
73
|
style,
|
|
@@ -72,6 +79,10 @@ function CartLineComponent(props) {
|
|
|
72
79
|
const g = _constants.CART_GEOMETRY[density];
|
|
73
80
|
const compact = density === 'compact';
|
|
74
81
|
const chosen = (0, _shared.optionsLine)(options);
|
|
82
|
+
const removeName = removeLabel ?? `Remove ${name}`;
|
|
83
|
+
// The stepper carries removal only when it is live; a disabled stepper
|
|
84
|
+
// (sold out) cannot, and the line still needs its remove control.
|
|
85
|
+
const stepperRemoves = removeInStepper && onRemove !== undefined && onQuantityChange !== undefined && !unavailable;
|
|
75
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Item, {
|
|
76
87
|
role: "listitem",
|
|
77
88
|
density: density,
|
|
@@ -86,12 +97,12 @@ function CartLineComponent(props) {
|
|
|
86
97
|
washed: unavailable,
|
|
87
98
|
testID: testID
|
|
88
99
|
}),
|
|
89
|
-
trailing: /*#__PURE__*/(0, _jsxRuntime.
|
|
100
|
+
trailing: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
90
101
|
style: {
|
|
91
102
|
alignItems: 'flex-end',
|
|
92
103
|
minWidth: 0
|
|
93
104
|
},
|
|
94
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_parts.ListingPriceLines, {
|
|
105
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_parts.ListingPriceLines, {
|
|
95
106
|
lines: [{
|
|
96
107
|
price,
|
|
97
108
|
originalPrice
|
|
@@ -100,7 +111,16 @@ function CartLineComponent(props) {
|
|
|
100
111
|
color: paint.text,
|
|
101
112
|
secondaryColor: paint.textSecondary,
|
|
102
113
|
testID: testID ? `${testID}-price` : undefined
|
|
103
|
-
})
|
|
114
|
+
}), secondaryPrice ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Text, {
|
|
115
|
+
variant: compact ? 'caption-1-regular' : 'body-2-regular',
|
|
116
|
+
numberOfLines: 1,
|
|
117
|
+
testID: testID ? `${testID}-secondary-price` : undefined,
|
|
118
|
+
style: {
|
|
119
|
+
color: paint.textSecondary,
|
|
120
|
+
fontVariant: ['tabular-nums']
|
|
121
|
+
},
|
|
122
|
+
children: secondaryPrice
|
|
123
|
+
}) : null]
|
|
104
124
|
}),
|
|
105
125
|
style: style,
|
|
106
126
|
testID: testID,
|
|
@@ -154,6 +174,8 @@ function CartLineComponent(props) {
|
|
|
154
174
|
min: 1,
|
|
155
175
|
disabled: unavailable,
|
|
156
176
|
onValueChange: onQuantityChange,
|
|
177
|
+
onRemove: stepperRemoves ? onRemove : undefined,
|
|
178
|
+
removeLabel: stepperRemoves ? removeName : undefined,
|
|
157
179
|
accessibilityLabel: name,
|
|
158
180
|
testID: testID ? `${testID}-stepper` : undefined
|
|
159
181
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Text, {
|
|
@@ -164,10 +186,10 @@ function CartLineComponent(props) {
|
|
|
164
186
|
fontVariant: ['tabular-nums']
|
|
165
187
|
},
|
|
166
188
|
children: `×${quantity}`
|
|
167
|
-
}), onRemove ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.GlyphButton, {
|
|
189
|
+
}), onRemove && !stepperRemoves ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.GlyphButton, {
|
|
168
190
|
size: 32,
|
|
169
191
|
icon: _RiDeleteBinLine.RiDeleteBinLine,
|
|
170
|
-
accessibilityLabel:
|
|
192
|
+
accessibilityLabel: removeName,
|
|
171
193
|
onPress: onRemove,
|
|
172
194
|
testID: testID ? `${testID}-remove` : undefined
|
|
173
195
|
}) : null]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_button","_RiDeleteBinLine","_index","_parts","_parts2","_index2","_surfaceLevels","_useTheme","_index3","_constants","_shared","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CartLineComponent","props","name","options","note","price","originalPrice","quantity","photo","photoVariant","unavailable","unavailableLabel","onQuantityChange","onRemove","removeLabel","density","accessibilityLabel","style","testID","theme","useTheme","surface","useSurfaceFill","paint","useMemo","resolveCartPaint","g","CART_GEOMETRY","compact","chosen","optionsLine","jsx","Item","role","composeCartLineName","leading","MenuItemThumb","size","thumb","radius","thumbRadius","placeholder","tile","wash","washed","trailing","View","alignItems","minWidth","children","ListingPriceLines","lines","color","text","secondaryColor","textSecondary","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_button","_RiDeleteBinLine","_index","_parts","_parts2","_index2","_surfaceLevels","_useTheme","_index3","_constants","_shared","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CartLineComponent","props","name","options","note","price","originalPrice","secondaryPrice","quantity","photo","photoVariant","unavailable","unavailableLabel","onQuantityChange","onRemove","removeLabel","removeInStepper","density","accessibilityLabel","style","testID","theme","useTheme","surface","useSurfaceFill","paint","useMemo","resolveCartPaint","g","CART_GEOMETRY","compact","chosen","optionsLine","removeName","stepperRemoves","undefined","jsx","Item","role","composeCartLineName","leading","MenuItemThumb","size","thumb","radius","thumbRadius","placeholder","tile","wash","washed","trailing","jsxs","View","alignItems","minWidth","children","ListingPriceLines","lines","color","text","secondaryColor","textSecondary","Text","variant","numberOfLines","fontVariant","flex","gap","textTertiary","flexDirection","marginTop","Stepper","value","min","disabled","onValueChange","GlyphButton","icon","RiDeleteBinLine","onPress","CartLine","exports","memo","displayName"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,MAAM,GAAG,GAAGA,MAAM,UAAU,GAAGe;QAAU,CAClD,CAAC,gBAEF,IAAAvD,WAAA,CAAAwD,GAAA,EAAC3D,OAAA,CAAAqF,IAAI;UACHC,OAAO,EAAC,gBAAgB;UACxB3C,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,WAAW,GAAGe,SAAU;UAClDhB,KAAK,EAAE;YAAEuC,KAAK,EAAEjC,KAAK,CAACoC,aAAa;YAAEI,WAAW,EAAE,CAAC,cAAc;UAAE,CAAE;UAAAV,QAAA,EAEpE,IAAI/C,QAAQ;QAAE,CACX,CACP,EACAM,QAAQ,IAAI,CAACoB,cAAc,gBAC1B,IAAAtD,WAAA,CAAAwD,GAAA,EAACnE,OAAA,CAAA2G,WAAW;UACVlC,IAAI,EAAE,EAAG;UACTmC,IAAI,EAAEC,gCAAgB;UACtB5D,kBAAkB,EAAEe,UAAW;UAC/B8C,OAAO,EAAEjE,QAAS;UAClBM,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,SAAS,GAAGe;QAAU,CACjD,CAAC,GACA,IAAI;MAAA,CACJ,CAAC;IAAA,CACH;EAAC,CACH,CAAC;AAEX;AAEO,MAAM6C,QAAQ,GAAAC,OAAA,CAAAD,QAAA,gBAAG,IAAAE,WAAI,EAAClF,iBAAiB,CAAC;AAC/CgF,QAAQ,CAACG,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -176,6 +176,7 @@ function CartPanelComponent({
|
|
|
176
176
|
lines,
|
|
177
177
|
onLineQuantityChange,
|
|
178
178
|
onLineRemove,
|
|
179
|
+
removeInStepper = false,
|
|
179
180
|
minimumOrder,
|
|
180
181
|
tip,
|
|
181
182
|
promo,
|
|
@@ -231,6 +232,7 @@ function CartPanelComponent({
|
|
|
231
232
|
note: line.note,
|
|
232
233
|
price: line.price,
|
|
233
234
|
originalPrice: line.originalPrice,
|
|
235
|
+
secondaryPrice: line.secondaryPrice,
|
|
234
236
|
quantity: line.quantity,
|
|
235
237
|
photo: line.photo,
|
|
236
238
|
photoVariant: line.photoVariant,
|
|
@@ -239,6 +241,7 @@ function CartPanelComponent({
|
|
|
239
241
|
density: density,
|
|
240
242
|
onQuantityChange: onLineQuantityChange ? quantity => onLineQuantityChange(line.id, quantity) : undefined,
|
|
241
243
|
onRemove: onLineRemove ? () => onLineRemove(line.id) : undefined,
|
|
244
|
+
removeInStepper: removeInStepper,
|
|
242
245
|
testID: testID ? `${testID}-line-${line.id}` : undefined
|
|
243
246
|
}, line.id))
|
|
244
247
|
}) : empty ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyBasket, {
|