@orderlyshop/web-components 0.1.0-build.7067 → 0.1.0-build.7075

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.
Files changed (48) hide show
  1. package/AGENTS.md +30 -51
  2. package/DESIGN.md +224 -0
  3. package/README.md +44 -65
  4. package/bin/orderly-build-category-pages.mjs +3 -1
  5. package/bin/orderly-hydrate-static-pages.mjs +24 -0
  6. package/bin/orderly-init-navigation.mjs +187 -19
  7. package/bin/orderly-init-shop.mjs +25 -17
  8. package/custom-elements.json +2 -1
  9. package/dist/browser/orderly-web-components.define.global.js +134 -80
  10. package/dist/browser/orderly-web-components.define.global.js.br +0 -0
  11. package/dist/browser/orderly-web-components.define.global.js.gz +0 -0
  12. package/dist/browser/orderly-web-components.define.global.js.map +1 -1
  13. package/dist/browser/orderly-web-components.global.js +134 -80
  14. package/dist/browser/orderly-web-components.global.js.br +0 -0
  15. package/dist/browser/orderly-web-components.global.js.gz +0 -0
  16. package/dist/browser/orderly-web-components.global.js.map +1 -1
  17. package/dist/{default-shop-CQuz1DKx.d.ts → default-shop-CtdjFj4B.d.ts} +8 -1
  18. package/dist/default-shop.d.ts +1 -1
  19. package/dist/default-shop.js +1 -1
  20. package/dist/default-shop.js.br +0 -0
  21. package/dist/default-shop.js.gz +0 -0
  22. package/dist/default-shop.js.map +1 -1
  23. package/dist/define-RfHbS0-w.d.ts +10 -0
  24. package/dist/define.d.ts +1 -1
  25. package/dist/define.js +127 -73
  26. package/dist/define.js.br +0 -0
  27. package/dist/define.js.gz +0 -0
  28. package/dist/define.js.map +1 -1
  29. package/dist/index.d.ts +6 -5
  30. package/dist/index.js +132 -78
  31. package/dist/index.js.br +0 -0
  32. package/dist/index.js.gz +0 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/{shop-CYr-svkP.d.ts → shop-DDkMlBLC.d.ts} +1 -1
  35. package/dist/shop.d.ts +2 -2
  36. package/dist/shop.js +132 -78
  37. package/dist/shop.js.br +0 -0
  38. package/dist/shop.js.gz +0 -0
  39. package/dist/shop.js.map +1 -1
  40. package/docs/components/README.md +14 -7
  41. package/docs/components/product-grid.md +12 -4
  42. package/docs/components/product-rail.md +8 -7
  43. package/docs/search-syntax.md +38 -0
  44. package/docs/shop-best-practices.md +17 -0
  45. package/examples/shop/src/includes/head.html +2 -0
  46. package/html-custom-data.json +1 -1
  47. package/package.json +3 -2
  48. package/dist/define-DThgfT4n.d.ts +0 -10
package/AGENTS.md CHANGED
@@ -5,40 +5,26 @@ Use this package as a headless storefront component library. Prefer native custo
5
5
  ## Agent Operating Contract
6
6
 
7
7
  - These instructions are optimized for GPT-5.5-class coding agents and other modern LLMs. Work from the user's requested storefront outcome, choose the package-owned component or CLI that owns that outcome, and keep edits scoped to that path.
8
- - Read stable package context before shop-specific files: `README.md`, `DESIGN.md`, component docs, then `custom-elements.json` or `html-custom-data.json` for exact API names. Inspect the consuming shop after that.
9
8
  - Prefer package configuration, typed properties, declarative templates, semantic tokens, and package CLI tools over copying component internals into a shop.
10
9
  - Do not infer attribute names, event names, template slots, or CSS hooks from memory. Use the docs and metadata in this package as the source of truth.
11
- - Stop when the requested behavior is implemented and verified with the nearest relevant script. If validation needs data, account ids, credentials, or a running backend, report the exact missing prerequisite.
12
-
13
- ## Discovery
14
-
15
- - Read `README.md` for setup and package-wide concepts.
16
- - Read `DESIGN.md` before changing the visual theme. It defines the semantic design tokens that should be changed first.
17
- - Read `docs/components/README.md` for component APIs.
18
- - Read `docs/shop-best-practices.md` before building or heavily customizing a shop. Use it as the checklist for moving from the scaffold to a branded, editorial storefront while preserving package-owned components.
19
- - Read `docs/components/product-rail.md` and `docs/components/product-grid.md` before implementing product listing UI.
20
- - Read `custom-elements.json` for machine-readable custom element metadata.
21
- - Read `html-custom-data.json` when generating vanilla HTML or configuring editor autocomplete.
22
- - Inspect `examples/shop` for a complete vanilla TypeScript shop that customizes the defaults without replacing package logic.
23
- - When creating a new shop from scratch, run `npx orderly-init-shop` first. It scaffolds the vanilla HTML/TypeScript/Vite structure that the package expects, including `src/includes/head.html`, `src/navigation.ts`, `src/shop-query.ts`, page templates, and package scripts.
24
-
25
- ## New Shop Intake
26
-
27
- - Ask the user for the Orderly account id so `src/shop-query.ts` can tenant-scope the default `SearchQuery`.
28
- - Ask the user for a reference website URL for the desired visual style. If they do not have one, ask for a short description of the target look.
29
- - Use the reference website as design direction only: extract palette, density, radius, typography feel, spacing, and navigation patterns into semantic Orderly tokens and shop CSS. Do not copy proprietary assets, text, logos, or brand marks unless the user confirms they own or may use them.
30
- - Do not deliver a shop that mostly looks like the package default with minor token changes. The default scaffold is a functional baseline, not the creative target.
31
- - Inspect the product catalog and use online research when available to understand the shop, category, product type, audience, competitors, and current visual conventions before committing to a design direction.
32
- - Build a distinctive first version: homepage and category pages should combine package components with shop-owned editorial sections, catalog-driven product groupings, contextual copy, category storytelling, and imagery or content choices that make the shop feel specific.
33
- - Use `docs/shop-best-practices.md` as the practical standard for the first version, especially when deciding what belongs in shop CSS/config/slots versus custom component logic.
34
- - Research current high-end frontend execution before finalizing when network access is available. Aim for the technical polish expected from premium product marketing sites: responsive art direction, strong imagery, smooth interaction states, thoughtful motion where appropriate, performance, and accessibility. Use this as a quality bar, not as permission to copy a specific site.
35
- - Put the resulting theme in `src/style.css` or the consuming shop stylesheet, starting with `DESIGN.md` tokens before adding component-specific selectors.
36
- - After scaffolding, run the nearest local dev/build command and visually compare the shop against the requested reference at desktop and mobile widths when a browser is available.
10
+ - Stop only when the behavior is implemented, verified with the nearest relevant script, and visually inspected in a browser when available. If validation needs data, account ids, credentials, a browser, or a running backend, report the exact missing prerequisite.
11
+
12
+ ## Required Reading and Intake
13
+
14
+ - Read `README.md`, `DESIGN.md`, `docs/shop-best-practices.md`, `docs/components/README.md`, then `custom-elements.json` or `html-custom-data.json` before shop-specific edits. Read `docs/components/product-rail.md` and `docs/components/product-grid.md` before product listing work.
15
+ - Use `docs/shop-best-practices.md` as the completion checklist for branded shop work. A finished shop must not look like the default scaffold with minor token changes.
16
+ - For new shops, run `npx orderly-init-shop` first. Ask for the Orderly account id, legal webshop owner name, legal owner CVR, and a reference website URL; if no reference exists, ask for a short style description.
17
+ - Set `defaultShop.legalOwnerName` and `defaultShop.legalOwnerCvr`. `orderly-page-layout` renders the required ownership notice after footer content, and shop templates must not replace it.
18
+ - Use the account id for tenant-scoped `src/shop-query.ts`. Use the reference, catalog inspection, and online research as design direction for `src/style.css`; never copy proprietary assets, text, logos, or brand marks without user confirmation.
19
+ - Build the first version around catalog-driven content: homepage sections, category introductions, product context, useful navigation, and a visual system based on `DESIGN.md` tokens plus scoped CSS.
20
+ - Aim for current premium frontend craft: responsive art direction, strong imagery, clear interaction states, appropriate motion, performance, and accessibility.
21
+ - Before reporting completion, run the local dev/build command and visually inspect homepage, category, product, basket, and checkout on desktop and mobile when a browser is available.
37
22
 
38
23
  ## Query Rules
39
24
 
40
25
  - Use `configureShop({ defaultShop: { defaultQuery } })` for shop-wide query scope. `defaultQuery` is a full Core `SearchQuery`.
41
26
  - Do not create package-specific account id shortcuts. Tenant scoping is just `SearchQuery.SourceAccountId`.
27
+ - Read `docs/search-syntax.md` before writing category or rail queries. Whitespace in `SearchQuery.Query` is narrowing; use `|` for OR alternatives such as `lego | matchbox | playmobil`. Multiple `SearchQuery.Tags` are narrowing AND-style filters, not broad alternatives.
42
28
  - For simple markup-driven searches, use declarative query attributes:
43
29
  - `keywords` maps to `SearchQuery.Query`.
44
30
  - `tags` maps to `SearchQuery.Tags`.
@@ -56,32 +42,25 @@ Use this package as a headless storefront component library. Prefer native custo
56
42
 
57
43
  ## Implementation Defaults
58
44
 
59
- - Keep components headless. Add behavior and default light-DOM markup, not bundled theme CSS.
60
- - Start theme work from the semantic tokens in `DESIGN.md`. Use component-local selectors and hooks only for deliberate exceptions after the shared tokens are set.
61
- - Treat visual differentiation as part of the implementation, not a later polish task. Configure package components, slots, templates, and shop CSS so the first working shop already matches the design target as closely as possible.
62
- - Prefer shop-owned editorial page sections around package components over replacing package templates wholesale. Preserve package-owned product tiles, checkout, product detail behavior, image viewers, structured data, accessibility, and generated URLs unless the user explicitly asks for a different structure.
45
+ - Keep components headless. Prefer configuration, typed properties, templates, slots, semantic tokens, and scoped shop CSS over copying package internals.
46
+ - Start theme work from `DESIGN.md`. Visual differentiation is part of the first implementation, not later polish.
47
+ - Add shop-owned editorial sections around package components. Preserve package-owned product tiles, checkout, product detail behavior, image viewers, structured data, accessibility, and generated URLs unless the user explicitly asks for a different structure.
63
48
  - Built-in UI copy defaults to Danish. Use `configureShop({ uiLanguage: "EN" })` for English shops, and prefer shop attributes/templates for wording that is unique to one storefront.
64
- - Preserve template override support through `data-orderly-template`, `data-orderly-bind`, `data-orderly-slot`, and `data-orderly-action`.
65
- - Put shop-wide templates in a shared document-level registry, for example template files included from `body-start.html`, using `data-orderly-template` plus `data-orderly-for`.
66
- - Keep browser-only package code free of Node HTTP modules.
67
- - Do not store tokens, API keys, OAuth responses, or cookie values.
68
- - Use `configureShop({ consent })` before enabling optional analytics, marketing, personalization, or shop-owned cookies. Keep cookie/vendor/purpose/duration text accurate for the specific shop, and use `setOrderlyCookie()` or `hasCookieConsent()` for custom optional browser state instead of writing cookies directly.
69
- - Treat localStorage basket and checkout profile data as user-owned state. Do not add secret persistence.
49
+ - Preserve `data-orderly-template`, `data-orderly-bind`, `data-orderly-slot`, and `data-orderly-action`. Put shared templates in a document-level registry using `data-orderly-for`.
50
+ - Keep browser code free of Node HTTP modules. Do not store tokens, API keys, OAuth responses, cookie values, or other secrets.
51
+ - Use `configureShop({ consent })` before enabling optional analytics, marketing, personalization, or shop-owned cookies. Use `setOrderlyCookie()` or `hasCookieConsent()` for optional browser state.
52
+ - Treat localStorage basket and checkout profile data as user-owned state.
70
53
  - Product images should default to `fit="contain"`, white background, and square aspect ratio in product tiles.
71
54
  - Use `orderly-stored-image` for package/product images when possible and set the appropriate `image-role` (`product-tile`, `product-detail`, `thumbnail`, `basket-line`, `checkout-line`, or `fullsize`) so image URLs reuse configured CDN dimensions.
72
55
  - Product grids should support continuation-token based dynamic paging without requiring a visible load-more button.
73
- - Use `orderly-home-page` for default storefront homepages instead of generating product rails in app code. Set `basket-mode="inline-desktop"` when the design needs a package-owned desktop basket rail instead of custom portal glue.
56
+ - Use `orderly-home-page` for default storefront homepages instead of generating product rails in app code. Use its `hero` slot/template for a custom homepage hero before replacing the full layout. Set `basket-mode="inline-desktop"` when the design needs a package-owned desktop basket rail instead of custom portal glue.
74
57
  - Use `orderly-category-page` for category routes. Default category links should use `/categories/<category-path>/` so builds can generate and hydrate server-rendered category pages. Use `/category.html#id=<encoded-category-path-or-slug>` only for shops that explicitly opt into hash routing. Prefer navigation `heroImage`, `heroLayout: "covers"`, `heroCoverCount`, and category `description` before replacing the category hero template.
75
58
  - Keep `orderly-navigation` sticky by default. Use `sticky="false"` only when a shop intentionally wants navigation to scroll away. Use `persist-state state-key="main-menu"` for vertical desktop menus that should remember open branches, and use `slot="menu-before"`/`slot="menu-after"` for store finder, campaign, volunteer, or other menu promo links.
76
- - Use `<orderly-basket-icon href="/checkout.html" placement="mobile-fixed" hide-when-empty>` for a package-owned mobile cart/checkout button with count before building a shop-specific fixed basket badge.
77
- - Use `orderly-checkout-page` for checkout pages instead of wiring `orderly-checkout` and `orderly-basket` manually in app code.
59
+ - Use package-owned basket and checkout surfaces first: `<orderly-basket-icon href="/checkout.html" placement="mobile-fixed" hide-when-empty>`, `basket-mode="inline-desktop"`, and `orderly-checkout-page`.
78
60
  - Use `orderly-product-detail-page` for full product routes. Set `share-url` to the product `SearchObject.ShareURL.URL`; the component loads the product through `SearchQuery.ShareUrl`.
79
- - Keep category page generation in the normal shop build. Use `orderly-build-category-pages` without `--no-hydrate` so homepage/category pages get initial HTML for SEO and less visible loading shift. Pass `--base-url` or set `VITE_ORDERLY_BASE_URL` to override the default `https://service.orderly.shop` snapshot backend.
61
+ - Keep category page generation in the normal shop build. Use `orderly-build-category-pages` without `--no-hydrate` so homepage/category pages get initial HTML for SEO and less visible loading shift. Pass `--base-url` or set `VITE_ORDERLY_BASE_URL` to override the default `https://service.orderly.shop` snapshot backend. Treat warnings about category pages or homepage rails matching 0 products as blockers; use `--strict-empty-categories` in CI when empty categories should fail the build.
80
62
  - For real product URLs on traditional hosting, use the package-owned helpers in `server/`: Apache `.htaccess`, Nginx rewrite config, PHP product renderer, and optional Node product snapshot endpoint. Do not copy this logic into example-shop.
81
- - Use `navigation.ts` for shop category/navigation structure. Export `navigationDefinitions: NavigationDefinition[]`.
82
- - Use `npx orderly-init-navigation` to create the default file or `npx orderly-init-navigation --suggest --account-id <account-id>` to dump sampled product data for agent-assisted navigation design.
83
- - Navigation definitions are recursive but should stay at most two category levels deep for normal shops. Each item must include `label` and a stable globally unique `slug`, and can include optional `heroImage`, optional `heroLayout`, optional `heroCoverCount`, optional `description`, optional `query`, and optional `children`.
84
- - Use plain `SearchQueryInput` objects in navigation definitions, for example `query: { query: "sko sneakers", tags: ["sko"] }`.
63
+ - Use `navigation.ts` for category/navigation structure. Run `npx orderly-init-navigation --suggest --account-id <account-id>` when sampling helps, then read `querySyntax` and `navigationSuggestions` in `navigation-products.json` before exporting `navigationDefinitions: NavigationDefinition[]` with stable unique slugs, at most two levels, optional hero/content fields, and plain `SearchQueryInput` values such as `query: { query: "sko | sneakers" }` or `query: { query: "kjole | sommerkjole", tags: ["dametøj"] }`.
85
64
 
86
65
  ## Common Patterns
87
66
 
@@ -92,8 +71,8 @@ Declarative product rail:
92
71
  title="Sko"
93
72
  cta-label="Se alle"
94
73
  cta-href="/categories/sko/"
95
- keywords="H&M"
96
- tags="børnetøj,bluser">
74
+ keywords="sneakers | støvler | sandaler"
75
+ tags="sko">
97
76
  </orderly-product-rail>
98
77
  ```
99
78
 
@@ -102,8 +81,8 @@ Structured query markup:
102
81
  ```html
103
82
  <orderly-product-rail title="Sko">
104
83
  <query>
105
- <tags>børnetøj,bluser</tags>
106
- <keywords>H&M</keywords>
84
+ <tags>sko</tags>
85
+ <keywords>sneakers | støvler | sandaler</keywords>
107
86
  <order-by>CreatedTime desc</order-by>
108
87
  </query>
109
88
  </orderly-product-rail>
@@ -116,7 +95,7 @@ import { create } from "@bufbuild/protobuf";
116
95
  import { SearchQuerySchema } from "@orderlyshop/core-client";
117
96
 
118
97
  productRail.query = create(SearchQuerySchema, {
119
- Query: "H&M",
98
+ Query: "sneakers | støvler | sandaler",
120
99
  OrderBy: ["CreatedTime desc"]
121
100
  });
122
101
  ```
@@ -131,7 +110,7 @@ Standalone browser setup:
131
110
  uiLanguage: "DA",
132
111
  defaultShop: {
133
112
  navigationDefinitions: [
134
- { label: "Sko", slug: "sko", query: { query: "sko sneakers" } }
113
+ { label: "Sko", slug: "sko", query: { query: "sko | sneakers" } }
135
114
  ]
136
115
  }
137
116
  });
package/DESIGN.md ADDED
@@ -0,0 +1,224 @@
1
+ # Design Contract
2
+
3
+ This file is the source of truth for theming `@orderlyshop/web-components`.
4
+
5
+ If a shop, coding agent, or LLM needs to restyle the package, start here before touching component selectors.
6
+
7
+ ## Rules For Agents And LLMs
8
+
9
+ 1. Keep design work outcome-first: produce a coherent shop theme with the smallest token and selector changes that satisfy the requested visual behavior.
10
+ 2. Set semantic design tokens first. Override them on `:root`, `html`, `body`, `orderly-page-layout`, or another shop shell element.
11
+ 3. Do not start by hunting through `.orderly-*` selectors. Component selectors are for deliberate exceptions, not for the base theme.
12
+ 4. Treat `--orderly-color-accent` and `--orderly-color-accent-soft` as legacy compatibility aliases. New themes should set `--orderly-color-primary`, `--orderly-color-primary-soft`, and `--orderly-color-primary-contrast`.
13
+ 5. If a color change should apply to buttons, badges, selection states, navigation hovers, and CTA links, change the semantic tokens below instead of patching each component separately.
14
+ 6. If shape changes should apply to tiles, panels, inputs, buttons, and icon buttons, change the radius tokens below instead of hardcoding `border-radius` on component selectors.
15
+ 7. Use component-specific selectors only when the token system cannot express the requested exception. Keep that exception scoped to the component and avoid redesigning unrelated surfaces.
16
+
17
+ Package defaults are intentionally declared with `:where(:root)` so they have zero selector specificity. A shop-level `:root { --orderly-color-primary: ... }` is therefore authoritative even if the package CSS is injected later by `defineOrderlyWebComponents()`. Do not repeat token overrides on `body` just to win the cascade; use `body` or a shell element only when you deliberately want a narrower theme scope.
18
+
19
+ ## Reference Website Workflow
20
+
21
+ When an agent or LLM builds a new shop, ask for a reference website URL before choosing the visual style. Inspect the reference for reusable design direction:
22
+
23
+ - foundation palette and contrast
24
+ - action, badge, link, and selection colors
25
+ - shape language and radius scale
26
+ - spacing density and page rhythm
27
+ - header, navigation, card, product tile, and checkout surface patterns
28
+
29
+ Translate those observations into this package's semantic tokens and the shop stylesheet. Keep the result recognizably aligned with the reference, but do not copy proprietary assets, copy, logos, or brand marks unless the user explicitly confirms they own or may use them.
30
+
31
+ ## Token Layers
32
+
33
+ ### Foundation Tokens
34
+
35
+ Use these for the base palette:
36
+
37
+ - `--orderly-color-primary`
38
+ - `--orderly-color-primary-soft`
39
+ - `--orderly-color-primary-contrast`
40
+ - `--orderly-color-text`
41
+ - `--orderly-color-muted`
42
+ - `--orderly-color-border`
43
+ - `--orderly-color-surface`
44
+ - `--orderly-color-surface-muted`
45
+ - `--orderly-color-page`
46
+ - `--orderly-color-danger`
47
+
48
+ `--orderly-color-accent` and `--orderly-color-accent-soft` still exist, but they now default to the primary tokens and should not be the first place new themes start.
49
+
50
+ ### Semantic Interaction Tokens
51
+
52
+ Use these when the shop wants a coherent interactive theme:
53
+
54
+ - `--orderly-link-accent-color`
55
+ - `--orderly-selection-border`
56
+ - `--orderly-selection-background`
57
+ - `--orderly-badge-background`
58
+ - `--orderly-badge-color`
59
+ - `--orderly-action-primary-background`
60
+ - `--orderly-action-primary-border`
61
+ - `--orderly-action-primary-color`
62
+ - `--orderly-action-primary-hover-background`
63
+ - `--orderly-action-primary-hover-border`
64
+ - `--orderly-action-primary-hover-color`
65
+ - `--orderly-action-primary-hover-shadow`
66
+ - `--orderly-action-secondary-background`
67
+ - `--orderly-action-secondary-border`
68
+ - `--orderly-action-secondary-color`
69
+ - `--orderly-action-secondary-hover-background`
70
+ - `--orderly-action-secondary-hover-border`
71
+ - `--orderly-action-secondary-hover-color`
72
+ - `--orderly-action-secondary-hover-shadow`
73
+ - `--orderly-focus-ring`
74
+ - `--orderly-focus-outline`
75
+
76
+ These tokens drive the default styles for:
77
+
78
+ - primary actions such as product tile add-to-basket, product page add-to-basket, checkout submit, and basket checkout
79
+ - secondary actions such as close buttons, expand buttons, and outlined remove/toggle actions
80
+ - navigation hover states, inline CTA links, hero eyebrows, and footer links
81
+ - basket count badges and other count/status pills
82
+ - selected thumbnails, selected checkout options, and form/radio focus states
83
+
84
+ ### Radius Tokens
85
+
86
+ Use the radius scale to define the shop's shape language:
87
+
88
+ - `--orderly-radius-none`
89
+ - `--orderly-radius-xs`
90
+ - `--orderly-radius-sm`
91
+ - `--orderly-radius-md`
92
+ - `--orderly-radius-lg`
93
+ - `--orderly-radius-pill`
94
+
95
+ Use semantic radius tokens for components. This keeps related UI aligned while still allowing smaller elements to use smaller radii than large panels:
96
+
97
+ - `--orderly-radius-card`: product tiles, basket/order lines, checkout option cards, and other card-like rows
98
+ - `--orderly-radius-panel`: checkout cards, payment/result cards, dialogs, empty states, and larger panels
99
+ - `--orderly-radius-control`: default control radius foundation
100
+ - `--orderly-radius-control-sm`: compact skeletons and small control details
101
+ - `--orderly-radius-button`: primary and secondary buttons, CTA links, and add-to-basket controls
102
+ - `--orderly-radius-icon-button`: square icon buttons such as search, basket, burger menu, and close controls
103
+ - `--orderly-radius-input`: text inputs, selects, search inputs, and quantity controls
104
+ - `--orderly-radius-image`: small image frames inside basket/order summaries
105
+ - `--orderly-radius-indicator`: active navigation indicators and other pill indicators
106
+
107
+ Compatibility aliases still exist:
108
+
109
+ - `--orderly-radius` defaults to `--orderly-radius-sm`
110
+ - `--orderly-icon-button-radius` defaults to `--orderly-radius-icon-button`
111
+
112
+ ### Layout Tokens
113
+
114
+ These are not color tokens, but they are part of the default design contract and should be preferred over ad hoc layout overrides:
115
+
116
+ - `--orderly-content-max-width`
117
+ - `--orderly-section-gap`
118
+ - `--orderly-item-gap`
119
+ - `--orderly-control-height`
120
+ - `--orderly-icon-button-size`
121
+ - `--orderly-product-grid-gap`
122
+ - `--orderly-product-grid-item-min-width`
123
+ - `--orderly-product-tile-border`
124
+ - `--orderly-product-tile-radius`
125
+ - `--orderly-product-tile-background`
126
+ - `--orderly-product-tile-shadow`
127
+ - `--orderly-product-tile-hover-border-color`
128
+ - `--orderly-product-tile-image-background`
129
+ - `--orderly-product-tile-body-padding`
130
+ - `--orderly-product-tile-title-color`
131
+ - `--orderly-product-tile-title-font-weight`
132
+ - `--orderly-product-tile-price-color`
133
+ - `--orderly-product-price-color`
134
+ - `--orderly-product-rail-header-padding`
135
+ - `--orderly-product-rail-title-font-size`
136
+ - `--orderly-product-rail-cta-color`
137
+ - `--orderly-collection-hero-height`
138
+ - `--orderly-collection-hero-background`
139
+ - `--orderly-collection-hero-color`
140
+ - `--orderly-collection-hero-image-opacity`
141
+ - `--orderly-collection-hero-cover-shadow`
142
+ - `--orderly-checkout-card-border`
143
+ - `--orderly-checkout-card-radius`
144
+ - `--orderly-checkout-card-background`
145
+ - `--orderly-checkout-card-shadow`
146
+ - `--orderly-checkout-option-border`
147
+ - `--orderly-checkout-option-background`
148
+ - `--orderly-checkout-option-selected-border`
149
+ - `--orderly-checkout-option-selected-background`
150
+ - `--orderly-checkout-option-selected-shadow`
151
+
152
+ ## Recommended Styling Workflow
153
+
154
+ When building a new shop or retheming an existing one:
155
+
156
+ 1. Set the foundation palette.
157
+ 2. Set the semantic interaction tokens so buttons, badges, links, and selection states stay aligned.
158
+ 3. Set the radius scale and semantic radius tokens so tiles, checkout surfaces, buttons, inputs, and icon buttons share one shape system.
159
+ 4. Review the shop.
160
+ 5. Only then use component-specific hooks such as navigation or product-grid variables for intentional deviations.
161
+
162
+ ## Example: Green Theme
163
+
164
+ ```css
165
+ :root {
166
+ --orderly-color-primary: #1f7a43;
167
+ --orderly-color-primary-soft: #e7f4eb;
168
+ --orderly-color-primary-contrast: #ffffff;
169
+
170
+ --orderly-link-accent-color: var(--orderly-color-primary);
171
+ --orderly-selection-border: var(--orderly-color-primary);
172
+ --orderly-selection-background: var(--orderly-color-primary-soft);
173
+ --orderly-badge-background: var(--orderly-color-primary);
174
+ --orderly-badge-color: var(--orderly-color-primary-contrast);
175
+
176
+ --orderly-action-primary-background: var(--orderly-color-primary);
177
+ --orderly-action-primary-border: var(--orderly-color-primary);
178
+ --orderly-action-primary-color: var(--orderly-color-primary-contrast);
179
+ --orderly-action-primary-hover-background: #166338;
180
+ --orderly-action-primary-hover-border: #166338;
181
+ --orderly-action-primary-hover-color: #ffffff;
182
+ --orderly-action-primary-hover-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
183
+
184
+ --orderly-action-secondary-background: #ffffff;
185
+ --orderly-action-secondary-border: var(--orderly-color-primary);
186
+ --orderly-action-secondary-color: var(--orderly-color-primary);
187
+ --orderly-action-secondary-hover-background: #dff0e5;
188
+ --orderly-action-secondary-hover-border: var(--orderly-color-primary);
189
+ --orderly-action-secondary-hover-color: var(--orderly-color-primary);
190
+ --orderly-action-secondary-hover-shadow: inset 0 -3px 0 rgba(31, 122, 67, 0.14);
191
+
192
+ --orderly-focus-ring: 0 0 0 3px rgba(31, 122, 67, 0.24);
193
+ --orderly-focus-outline: 3px solid rgba(31, 122, 67, 0.34);
194
+
195
+ --orderly-radius-sm: 4px;
196
+ --orderly-radius-md: 10px;
197
+ --orderly-radius-lg: 14px;
198
+ --orderly-radius-card: var(--orderly-radius-md);
199
+ --orderly-radius-panel: var(--orderly-radius-lg);
200
+ --orderly-radius-control: var(--orderly-radius-md);
201
+ --orderly-radius-button: var(--orderly-radius-control);
202
+ --orderly-radius-icon-button: var(--orderly-radius-control);
203
+ --orderly-radius-input: var(--orderly-radius-control);
204
+ --orderly-radius-image: var(--orderly-radius-sm);
205
+ }
206
+ ```
207
+
208
+ That one block is enough to restyle color and shape consistently without editing component markup or package CSS.
209
+
210
+ ## Component-Specific Hooks
211
+
212
+ Component-specific variables still exist and are useful, but they are a second step.
213
+
214
+ Examples:
215
+
216
+ - navigation active states: `--orderly-navigation-indicator-color`, `--orderly-navigation-link-active-background`, `--orderly-navigation-link-active-color`, `--orderly-navigation-link-padding`
217
+ - product tile surfaces: `--orderly-product-tile-background`, `--orderly-product-tile-border`, `--orderly-product-tile-radius`, `--orderly-product-tile-shadow`, `--orderly-product-tile-image-background`
218
+ - product rail headers: `--orderly-product-rail-header-padding`, `--orderly-product-rail-title-font-size`, `--orderly-product-rail-cta-color`
219
+ - category hero covers: `--orderly-collection-hero-background`, `--orderly-collection-hero-color`, `--orderly-collection-hero-image-opacity`, `--orderly-collection-hero-cover-shadow`
220
+ - checkout cards/options: `--orderly-checkout-card-*`, `--orderly-checkout-option-*`
221
+ - product grid: `--orderly-product-grid-gap`, `--orderly-product-grid-item-min-width`
222
+ - page layout: `--orderly-content-max-width`
223
+
224
+ Use these only when a specific component should differ from the shared design system.