@orderlyshop/web-components 0.1.0-build.7059 → 0.1.0-build.7060
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/README.md +2 -2
- package/dist/browser/orderly-web-components.define.global.js +40 -18
- package/dist/browser/orderly-web-components.define.global.js.map +1 -1
- package/dist/browser/orderly-web-components.global.js +40 -18
- package/dist/browser/orderly-web-components.global.js.map +1 -1
- package/dist/define-B9WAFqvc.d.ts +9 -0
- package/dist/define.d.ts +1 -1
- package/dist/define.js +40 -18
- package/dist/define.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +40 -18
- package/dist/index.js.map +1 -1
- package/dist/shop.js +40 -18
- package/dist/shop.js.map +1 -1
- package/docs/components/README.md +22 -0
- package/package.json +2 -2
- package/dist/define-lsZaAHZ0.d.ts +0 -9
package/README.md
CHANGED
|
@@ -563,11 +563,11 @@ collection.query = searchQuery;
|
|
|
563
563
|
- `orderly-home-page` composes page layout, responsive primary navigation, one product rail per top-level category, basket icon, basket drawer, product detail dialog, and footer. Configure it with `configureShop({ defaultShop })` plus attributes such as `title`, `eyebrow`, `rail-cta-label`, and `product-href`. The product dialog expand link follows the configured product URL mode, and compact `https://orderly.shop/...` product URLs are preserved when it builds hash or path routes.
|
|
564
564
|
- `orderly-category-page` composes page layout, navigation, search, product grid, product detail, basket icon, and basket around a navigation category. Without properties it uses the package default shop configuration. Override with `configureShop({ defaultShop })` once per shop, set `base-url` or `product-href` in markup, or assign `category`, `navigationItems`, `sortOptions`, `client`, `defaultQuery`, and `basketController` from JavaScript for advanced cases. The product dialog expand link uses the configured product URL mode and still supports explicit per-page `product-href` overrides when a shop wants a different physical product page URL.
|
|
565
565
|
- `orderly-checkout-page` composes page layout, responsive primary navigation, checkout form, basket order summary, footer, shared basket state, delivery loading, and order-created cleanup. Delivery methods render as radio cards after address entry, service points render as radio-card pickup choices when required, and delivery changes verify the draft so totals update. Configure copy through `configureShop({ defaultShop: { checkoutPageTitle, checkoutPageDescription, checkoutOrderTitle, checkoutTermsHref, checkoutLabels, basketLabels } })`, or assign `client`, `basketController`, `navigationItems`, `checkoutLabels`, and `basketLabels` from JavaScript.
|
|
566
|
-
- `orderly-product-detail-page` composes page layout, navigation, product detail, basket drawer, and footer for a product route. Set `share-url`, the `shareUrl` property, or pass `#url=<encoded-share-url>` in the page URL; compact Orderly slugs are restored to `https://orderly.shop/...` before it calls `SearchService.Search` with `SearchQuery.ShareUrl` and renders the resolved `SearchObject`.
|
|
566
|
+
- `orderly-product-detail-page` composes page layout, navigation, product detail, basket drawer, and footer for a product route. Set `share-url`, the `shareUrl` property, or pass `#url=<encoded-share-url>` in the page URL; compact Orderly slugs are restored to `https://orderly.shop/...` before it calls `SearchService.Search` with `SearchQuery.ShareUrl` and renders the resolved `SearchObject`. Shops can tune outer gutters with `--orderly-product-detail-page-padding`, `--orderly-product-detail-page-mobile-padding`, `--orderly-product-detail-page-inline-padding`, and `--orderly-product-detail-page-mobile-inline-padding`.
|
|
567
567
|
- `orderly-stored-image` accepts `image: StoredImage`, resolves image URLs from the configured prefix, and applies `RotationDeg`, crop, and full-size metadata in the browser.
|
|
568
568
|
- `orderly-credit` accepts `credit: Credit` or declarative `amount` and `currency` attributes, then renders stylable money markup. DKK values are formatted as `kr. <pris>`, for example `kr. 100,00`.
|
|
569
569
|
- `orderly-product-tile` accepts `product: SearchObject` and emits `orderly-product-selected`, `orderly-add-to-basket`, and `orderly-remove-from-basket`. Templates can bind the product share URL with `data-orderly-bind="share-url"`; anchors without an existing `href` keep the raw share URL, while anchors that already point at a product page are rewritten to the configured physical product route using hash or path mode. Default tiles and statically hydrated category tiles include `schema.org/Product` and `schema.org/Offer` microdata for name, image, URL, description, SKU, brand, price, currency, and in-stock availability when those fields are present. When a `BasketController` is assigned through `basketController`, the default action button toggles between add and remove, using an icon-only button next to the price.
|
|
570
|
-
- `orderly-product-page` accepts `product: SearchObject`, renders all product image thumbnails, switches the selected image on thumbnail click, and exposes product details plus add-to-basket behavior. Product-page templates bind `title`, `description`, `brand`, `size`, `color`, `condition`, `price`, `image`, `addLabel`, and `closeLabel`; they also support `basket-action-label`, `basket-action-icon`, and `basket-action-state` so product-page add-to-basket markup can share the same binding names as product tiles.
|
|
570
|
+
- `orderly-product-page` accepts `product: SearchObject`, renders all product image thumbnails, switches the selected image on thumbnail click, and exposes product details plus add-to-basket behavior. Product-page templates bind `title`, `description`, `brand`, `size`, `color`, `condition`, `price`, `image`, `addLabel`, and `closeLabel`; they also support `basket-action-label`, `basket-action-icon`, and `basket-action-state` so product-page add-to-basket markup can share the same binding names as product tiles. Main image frame styling lives on the default wrapper, not the inner `orderly-stored-image`, and shops can tune spacing/image framing with `--orderly-product-page-gap`, `--orderly-product-page-mobile-gap`, `--orderly-product-page-media-gap`, `--orderly-product-page-padding`, `--orderly-product-page-mobile-padding`, `--orderly-product-page-details-padding`, `--orderly-product-page-mobile-details-padding`, `--orderly-product-page-image-border`, `--orderly-product-page-image-radius`, and `--orderly-product-page-image-background`.
|
|
571
571
|
- `orderly-search-box` binds to a target `orderly-product-grid`. Use `mode="textbox"` for an inline search input or `mode="icon"` for a header icon that opens a full-page search overlay. Icon mode searches automatically with a 500ms debounce and renders matching product tiles below the search field. Default home and category pages use icon mode next to the basket icon.
|
|
572
572
|
- `orderly-product-grid` accepts `query: SearchQuery`, merges the configured shop query scope, calls `SearchService.Search`, renders its own sort control from `sortOptions`, supports opaque `ContinuationToken` paging, manual paging, dynamic/infinite scroll, and default loading placeholders while the first page is pending.
|
|
573
573
|
- `orderly-product-rail` accepts `query: SearchQuery`, title, CTA label, and CTA href, then renders the search as a horizontal scroll list by composing `orderly-product-grid`. It is useful for homepages and editorial rows where several category searches should be stacked vertically.
|
|
@@ -293,6 +293,20 @@ orderly-shop-footer:not([data-orderly-ready])::before {
|
|
|
293
293
|
--orderly-product-action-width: 42px;
|
|
294
294
|
--orderly-product-action-height: 34px;
|
|
295
295
|
--orderly-content-max-width: 1280px;
|
|
296
|
+
--orderly-product-detail-page-padding: 30px 0 48px;
|
|
297
|
+
--orderly-product-detail-page-mobile-padding: 24px 0 36px;
|
|
298
|
+
--orderly-product-detail-page-inline-padding: 24px;
|
|
299
|
+
--orderly-product-detail-page-mobile-inline-padding: 18px;
|
|
300
|
+
--orderly-product-page-gap: 2rem;
|
|
301
|
+
--orderly-product-page-mobile-gap: var(--orderly-product-page-media-gap);
|
|
302
|
+
--orderly-product-page-media-gap: 0.85rem;
|
|
303
|
+
--orderly-product-page-padding: 1.25rem;
|
|
304
|
+
--orderly-product-page-mobile-padding: 0;
|
|
305
|
+
--orderly-product-page-details-padding: 0;
|
|
306
|
+
--orderly-product-page-mobile-details-padding: 0 1rem 1rem;
|
|
307
|
+
--orderly-product-page-image-border: 1px solid var(--orderly-color-image-border);
|
|
308
|
+
--orderly-product-page-image-radius: var(--orderly-radius-image);
|
|
309
|
+
--orderly-product-page-image-background: var(--orderly-color-surface);
|
|
296
310
|
color: var(--orderly-color-text);
|
|
297
311
|
font-family: Roboto, "Segoe UI", Arial, sans-serif;
|
|
298
312
|
line-height: 1.5;
|
|
@@ -1618,7 +1632,7 @@ input.orderly-search-box,
|
|
|
1618
1632
|
gap: 34px;
|
|
1619
1633
|
max-width: 100%;
|
|
1620
1634
|
min-width: 0;
|
|
1621
|
-
padding:
|
|
1635
|
+
padding: var(--orderly-product-detail-page-padding);
|
|
1622
1636
|
overflow: hidden;
|
|
1623
1637
|
}
|
|
1624
1638
|
|
|
@@ -1626,8 +1640,8 @@ input.orderly-search-box,
|
|
|
1626
1640
|
.orderly-product-detail-page,
|
|
1627
1641
|
.orderly-product-detail-page__product {
|
|
1628
1642
|
width: 100%;
|
|
1629
|
-
padding-right:
|
|
1630
|
-
padding-left:
|
|
1643
|
+
padding-right: var(--orderly-product-detail-page-inline-padding);
|
|
1644
|
+
padding-left: var(--orderly-product-detail-page-inline-padding);
|
|
1631
1645
|
}
|
|
1632
1646
|
|
|
1633
1647
|
.orderly-home-page__eyebrow {
|
|
@@ -2248,12 +2262,12 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
2248
2262
|
.orderly-product-page {
|
|
2249
2263
|
display: grid;
|
|
2250
2264
|
grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
|
|
2251
|
-
gap:
|
|
2265
|
+
gap: var(--orderly-product-page-gap);
|
|
2252
2266
|
align-items: start;
|
|
2253
2267
|
clear: both;
|
|
2254
2268
|
min-width: 0;
|
|
2255
2269
|
max-width: 100%;
|
|
2256
|
-
padding:
|
|
2270
|
+
padding: var(--orderly-product-page-padding);
|
|
2257
2271
|
border: var(--orderly-border);
|
|
2258
2272
|
border-radius: var(--orderly-radius-panel);
|
|
2259
2273
|
background: var(--orderly-color-surface);
|
|
@@ -2261,7 +2275,7 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
2261
2275
|
|
|
2262
2276
|
.orderly-product-page__media {
|
|
2263
2277
|
display: grid;
|
|
2264
|
-
gap:
|
|
2278
|
+
gap: var(--orderly-product-page-media-gap);
|
|
2265
2279
|
align-content: start;
|
|
2266
2280
|
justify-self: stretch;
|
|
2267
2281
|
width: 100%;
|
|
@@ -2273,17 +2287,18 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
2273
2287
|
width: 100%;
|
|
2274
2288
|
min-width: 0;
|
|
2275
2289
|
padding: 0;
|
|
2276
|
-
border:
|
|
2277
|
-
border-radius:
|
|
2278
|
-
background:
|
|
2290
|
+
border: var(--orderly-product-page-image-border);
|
|
2291
|
+
border-radius: var(--orderly-product-page-image-radius);
|
|
2292
|
+
background: var(--orderly-product-page-image-background);
|
|
2279
2293
|
color: inherit;
|
|
2280
2294
|
cursor: zoom-in;
|
|
2295
|
+
overflow: hidden;
|
|
2281
2296
|
}
|
|
2282
2297
|
|
|
2283
2298
|
.orderly-product-page__image-button:hover,
|
|
2284
2299
|
.orderly-product-page__image-button:focus-visible {
|
|
2285
|
-
border:
|
|
2286
|
-
background:
|
|
2300
|
+
border: var(--orderly-product-page-image-border);
|
|
2301
|
+
background: var(--orderly-product-page-image-background);
|
|
2287
2302
|
color: inherit;
|
|
2288
2303
|
box-shadow: none;
|
|
2289
2304
|
outline: var(--orderly-focus-outline);
|
|
@@ -2295,8 +2310,13 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
2295
2310
|
}
|
|
2296
2311
|
|
|
2297
2312
|
.orderly-product-page__image {
|
|
2298
|
-
border:
|
|
2299
|
-
border-radius:
|
|
2313
|
+
border: 0;
|
|
2314
|
+
border-radius: inherit;
|
|
2315
|
+
background: transparent;
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
.orderly-product-page__image .orderly-stored-image__frame {
|
|
2319
|
+
background: transparent;
|
|
2300
2320
|
}
|
|
2301
2321
|
|
|
2302
2322
|
.orderly-product-page__image-overlay[hidden] {
|
|
@@ -2447,6 +2467,7 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
2447
2467
|
gap: 1rem;
|
|
2448
2468
|
align-content: start;
|
|
2449
2469
|
min-width: 0;
|
|
2470
|
+
padding: var(--orderly-product-page-details-padding);
|
|
2450
2471
|
}
|
|
2451
2472
|
|
|
2452
2473
|
.orderly-product-page__brand,
|
|
@@ -3647,7 +3668,7 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
3647
3668
|
.orderly-home-page,
|
|
3648
3669
|
.orderly-product-detail-page {
|
|
3649
3670
|
gap: 28px;
|
|
3650
|
-
padding:
|
|
3671
|
+
padding: var(--orderly-product-detail-page-mobile-padding);
|
|
3651
3672
|
}
|
|
3652
3673
|
|
|
3653
3674
|
.orderly-home-page__intro,
|
|
@@ -3656,8 +3677,8 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
3656
3677
|
.orderly-product-rail__header,
|
|
3657
3678
|
.orderly-product-rail__status,
|
|
3658
3679
|
.orderly-product-rail__empty {
|
|
3659
|
-
padding-right:
|
|
3660
|
-
padding-left:
|
|
3680
|
+
padding-right: var(--orderly-product-detail-page-mobile-inline-padding);
|
|
3681
|
+
padding-left: var(--orderly-product-detail-page-mobile-inline-padding);
|
|
3661
3682
|
}
|
|
3662
3683
|
|
|
3663
3684
|
.orderly-product-rail__header {
|
|
@@ -3703,11 +3724,12 @@ orderly-product-tile[data-orderly-clickable]:focus-visible {
|
|
|
3703
3724
|
}
|
|
3704
3725
|
|
|
3705
3726
|
.orderly-product-page {
|
|
3706
|
-
|
|
3727
|
+
gap: var(--orderly-product-page-mobile-gap);
|
|
3728
|
+
padding: var(--orderly-product-page-mobile-padding);
|
|
3707
3729
|
}
|
|
3708
3730
|
|
|
3709
3731
|
.orderly-product-page__details {
|
|
3710
|
-
padding:
|
|
3732
|
+
padding: var(--orderly-product-page-mobile-details-padding);
|
|
3711
3733
|
}
|
|
3712
3734
|
|
|
3713
3735
|
.orderly-product-page__title {
|