@cartbase/storefront 0.17.0 → 0.18.1
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/LICENSE +21 -21
- package/package.json +3 -1
- package/src/api/auth.ts +108 -108
- package/src/api/carts.ts +523 -523
- package/src/api/categories.ts +184 -184
- package/src/api/checkout.ts +526 -526
- package/src/api/collections.ts +130 -130
- package/src/api/consent.ts +75 -75
- package/src/api/content.ts +125 -125
- package/src/api/customers.ts +303 -303
- package/src/api/gift-cards.ts +112 -112
- package/src/api/http.ts +180 -180
- package/src/api/index.ts +30 -30
- package/src/api/menus.ts +77 -77
- package/src/api/metaobjects.ts +136 -136
- package/src/api/orders.ts +290 -290
- package/src/api/products.ts +43 -1
- package/src/api/redirects.ts +37 -37
- package/src/api/regions.ts +200 -200
- package/src/api/reviews.ts +259 -259
- package/src/api/search.ts +163 -163
- package/src/api/store.ts +35 -35
- package/src/api/types.ts +91 -91
- package/src/cart-drawer/context.tsx +367 -168
- package/src/cart-drawer/cross-sell-carousel.tsx +211 -211
- package/src/cart-drawer/cross-sell-sidebar.tsx +158 -158
- package/src/cart-drawer/gift-wrap.tsx +82 -82
- package/src/cart-drawer/index.ts +73 -68
- package/src/cart-drawer/item/index.tsx +162 -162
- package/src/cart-drawer/item/quantity.tsx +8 -14
- package/src/cart-drawer/item/upsell.tsx +110 -110
- package/src/cart-drawer/labels.ts +123 -123
- package/src/cart-drawer/mutation-queue.ts +78 -0
- package/src/cart-drawer/notes.tsx +131 -131
- package/src/cart-drawer/sticky-footer.tsx +73 -73
- package/src/cart-drawer/summary-breakdown.tsx +197 -197
- package/src/checkout/address-error-copy.ts +117 -117
- package/src/checkout/boxnow-locker-selector.tsx +410 -410
- package/src/checkout/compare-addresses.ts +40 -40
- package/src/checkout/discount-section.tsx +218 -218
- package/src/checkout/error-copy-codes.ts +63 -63
- package/src/checkout/geocode.ts +154 -154
- package/src/checkout/gift-card-section.tsx +224 -224
- package/src/checkout/index.ts +72 -72
- package/src/checkout/labels.ts +495 -495
- package/src/checkout/payment-button.tsx +372 -372
- package/src/checkout/payment-error-copy.ts +154 -154
- package/src/checkout/promotion-error-copy.ts +91 -91
- package/src/checkout/use-checkout-orchestration.ts +1604 -1592
- package/src/common/country-flag.tsx +52 -52
- package/src/common/country-select.tsx +11 -11
- package/src/common/index.ts +20 -20
- package/src/common/market-select.tsx +57 -57
- package/src/index.ts +12 -12
- package/src/lib/cookie-names.ts +14 -0
- package/src/lib/country-name.ts +59 -59
- package/src/lib/get-product-price.ts +133 -133
- package/src/lib/media-image.tsx +39 -39
- package/src/lib/payment-constants.ts +53 -53
- package/src/lib/platform.ts +13 -13
- package/src/lib/price.tsx +39 -39
- package/src/lib/store-api-error.ts +36 -36
- package/src/lib/variant-caption.ts +32 -32
- package/src/locales/bg.ts +467 -467
- package/src/locales/context.ts +37 -37
- package/src/locales/en.ts +26 -26
- package/src/locales/es.ts +466 -466
- package/src/locales/index.ts +19 -19
- package/src/locales/provider.tsx +59 -59
- package/src/locales/types.ts +77 -77
- package/src/order/index.ts +62 -62
- package/src/order/labels.ts +79 -79
- package/src/order/order-totals.tsx +250 -250
- package/src/primitives/select-field.tsx +93 -93
- package/src/products/image-gallery.tsx +43 -43
- package/src/products/index.ts +68 -59
- package/src/products/option-select.tsx +67 -67
- package/src/products/product-actions-wrapper.tsx +63 -62
- package/src/products/product-actions.tsx +151 -150
- package/src/products/product-price.tsx +69 -69
- package/src/products/product-promises.tsx +61 -61
- package/src/products/product-specs.tsx +65 -65
- package/src/products/product-tabs.tsx +123 -123
- package/src/products/product-template.tsx +163 -162
- package/src/products/purchase-options.tsx +130 -130
- package/src/products/sets.ts +110 -0
- package/src/products/use-product-actions.ts +199 -164
- package/src/products/variant-matching.ts +71 -71
- package/src/products/variant-url.ts +74 -74
- package/src/reviews-ui/index.ts +73 -73
- package/src/store/category-template.tsx +136 -136
- package/src/store/index.ts +40 -40
- package/src/tracking/chatgpt-pixel.tsx +99 -99
- package/src/tracking/consent-init.tsx +62 -62
- package/src/tracking/events.ts +348 -348
- package/src/tracking/ga4.tsx +93 -93
- package/src/tracking/google-ads.ts +84 -84
- package/src/tracking/gtm.tsx +60 -60
- package/src/tracking/inline-script.ts +49 -49
- package/src/tracking/oaiq.ts +206 -206
- package/src/tracking/tiktok-pixel.tsx +91 -91
- package/src/tracking/track-init.tsx +56 -56
- package/src/tracking/track-order-purchase.tsx +122 -122
- package/src/tracking/ttq.ts +180 -180
- package/src/tracking/use-tracking-config.ts +54 -54
- package/theme/index.css +25 -25
- package/theme/theme.css +150 -150
- package/theme/tokens.css +106 -106
package/theme/theme.css
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Cartbase storefront — the VOCABULARY.
|
|
3
|
-
*
|
|
4
|
-
* Every line maps a value from tokens.css into a Tailwind namespace, which is
|
|
5
|
-
* what turns it into a utility class. Registering `--color-primary` is what
|
|
6
|
-
* makes `bg-primary`, `text-primary`, `border-primary` and `ring-primary`
|
|
7
|
-
* exist. Registering `--text-h2` is what makes `text-h2` exist.
|
|
8
|
-
*
|
|
9
|
-
* THIS FILE HOLDS NO VALUES, and a theme never edits it. A theme swaps
|
|
10
|
-
* tokens.css and the whole library repaints, because components only ever
|
|
11
|
-
* reference names from here.
|
|
12
|
-
*
|
|
13
|
-
* Every namespace below is Tailwind's own. We invented none of them and we
|
|
14
|
-
* add none of our own, because the requirement is that a developer or a
|
|
15
|
-
* coding agent reads `text-h2` or `bg-primary` and needs no documentation to
|
|
16
|
-
* know what it is or how to change it.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
@theme {
|
|
20
|
-
/* ── Colour ───────────────────────────────────────────────────────────── */
|
|
21
|
-
--color-background: var(--background);
|
|
22
|
-
--color-foreground: var(--foreground);
|
|
23
|
-
--color-card: var(--card);
|
|
24
|
-
--color-card-foreground: var(--card-foreground);
|
|
25
|
-
--color-popover: var(--popover);
|
|
26
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
27
|
-
|
|
28
|
-
--color-primary: var(--primary);
|
|
29
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
30
|
-
--color-secondary: var(--secondary);
|
|
31
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
32
|
-
--color-muted: var(--muted);
|
|
33
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
34
|
-
--color-accent: var(--accent);
|
|
35
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
36
|
-
|
|
37
|
-
--color-destructive: var(--destructive);
|
|
38
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
39
|
-
--color-success: var(--success);
|
|
40
|
-
--color-success-foreground: var(--success-foreground);
|
|
41
|
-
--color-warning: var(--warning);
|
|
42
|
-
--color-warning-foreground: var(--warning-foreground);
|
|
43
|
-
|
|
44
|
-
--color-border: var(--border);
|
|
45
|
-
--color-input: var(--input);
|
|
46
|
-
--color-ring: var(--ring);
|
|
47
|
-
|
|
48
|
-
/* ── Typefaces ────────────────────────────────────────────────────────── */
|
|
49
|
-
--font-body: var(--font-body-family);
|
|
50
|
-
--font-display: var(--font-display-family);
|
|
51
|
-
--font-mono: var(--font-mono-family);
|
|
52
|
-
|
|
53
|
-
/*
|
|
54
|
-
* ── Type scale ──────────────────────────────────────────────────────────
|
|
55
|
-
* Generated at a 1.2 ratio from a 16px base and rounded to 4px steps, the
|
|
56
|
-
* major-third scale Polaris uses. Named h1 to h6 because that is what every
|
|
57
|
-
* web developer reads without translation.
|
|
58
|
-
*
|
|
59
|
-
* The name is a STYLE, never a tag. Put `text-h2` on an <h1> when the page
|
|
60
|
-
* needs a smaller heading: the tag stays correct for search engines and
|
|
61
|
-
* screen readers, the style is a separate decision. This is exactly how
|
|
62
|
-
* Webflow's Client-First `heading-style-h*` classes work.
|
|
63
|
-
*/
|
|
64
|
-
--text-h1: 2.5rem;
|
|
65
|
-
--text-h1--line-height: 1.1;
|
|
66
|
-
--text-h1--letter-spacing: -0.02em;
|
|
67
|
-
--text-h1--font-weight: 600;
|
|
68
|
-
|
|
69
|
-
--text-h2: 2rem;
|
|
70
|
-
--text-h2--line-height: 1.15;
|
|
71
|
-
--text-h2--letter-spacing: -0.015em;
|
|
72
|
-
--text-h2--font-weight: 600;
|
|
73
|
-
|
|
74
|
-
--text-h3: 1.75rem;
|
|
75
|
-
--text-h3--line-height: 1.2;
|
|
76
|
-
--text-h3--letter-spacing: -0.01em;
|
|
77
|
-
--text-h3--font-weight: 600;
|
|
78
|
-
|
|
79
|
-
--text-h4: 1.5rem;
|
|
80
|
-
--text-h4--line-height: 1.25;
|
|
81
|
-
--text-h4--font-weight: 600;
|
|
82
|
-
|
|
83
|
-
--text-h5: 1.25rem;
|
|
84
|
-
--text-h5--line-height: 1.3;
|
|
85
|
-
--text-h5--font-weight: 600;
|
|
86
|
-
|
|
87
|
-
--text-h6: 1rem;
|
|
88
|
-
--text-h6--line-height: 1.4;
|
|
89
|
-
--text-h6--font-weight: 600;
|
|
90
|
-
|
|
91
|
-
--text-body-large: 1.125rem;
|
|
92
|
-
--text-body-large--line-height: 1.6;
|
|
93
|
-
|
|
94
|
-
--text-body: 1rem;
|
|
95
|
-
--text-body--line-height: 1.6;
|
|
96
|
-
|
|
97
|
-
--text-body-small: 0.875rem;
|
|
98
|
-
--text-body-small--line-height: 1.5;
|
|
99
|
-
|
|
100
|
-
/* Buttons, form labels, badges — short, never a sentence. */
|
|
101
|
-
--text-label: 0.875rem;
|
|
102
|
-
--text-label--line-height: 1.2;
|
|
103
|
-
--text-label--font-weight: 500;
|
|
104
|
-
|
|
105
|
-
/* Fine print, metadata, timestamps. */
|
|
106
|
-
--text-caption: 0.75rem;
|
|
107
|
-
--text-caption--line-height: 1.4;
|
|
108
|
-
|
|
109
|
-
/*
|
|
110
|
-
* ── Weight ──────────────────────────────────────────────────────────────
|
|
111
|
-
* Three, not four. Bold and semibold were doing the same job in different
|
|
112
|
-
* places, which is how a scale rots.
|
|
113
|
-
*/
|
|
114
|
-
--font-weight-regular: 400;
|
|
115
|
-
--font-weight-medium: 500;
|
|
116
|
-
--font-weight-semibold: 600;
|
|
117
|
-
|
|
118
|
-
/*
|
|
119
|
-
* ── Spacing ─────────────────────────────────────────────────────────────
|
|
120
|
-
* Tailwind's own 4px step, stated rather than assumed so a theme can widen
|
|
121
|
-
* the whole rhythm with one number.
|
|
122
|
-
*/
|
|
123
|
-
--spacing: 0.25rem;
|
|
124
|
-
|
|
125
|
-
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
126
|
-
--radius-sm: calc(var(--radius-base) - 4px);
|
|
127
|
-
--radius-md: calc(var(--radius-base) - 2px);
|
|
128
|
-
--radius-lg: var(--radius-base);
|
|
129
|
-
--radius-xl: calc(var(--radius-base) + 4px);
|
|
130
|
-
--radius-2xl: calc(var(--radius-base) + 12px);
|
|
131
|
-
|
|
132
|
-
/*
|
|
133
|
-
* ── Elevation ───────────────────────────────────────────────────────────
|
|
134
|
-
* Named for what is raised, not for how big the blur is. `shadow-card` says
|
|
135
|
-
* what it is for; `shadow-md` says nothing and cannot be retuned per theme.
|
|
136
|
-
*/
|
|
137
|
-
--shadow-card: var(--elevation-card);
|
|
138
|
-
--shadow-card-hover: var(--elevation-card-hover);
|
|
139
|
-
--shadow-popover: var(--elevation-popover);
|
|
140
|
-
--shadow-drawer: var(--elevation-drawer);
|
|
141
|
-
|
|
142
|
-
/* ── Motion ───────────────────────────────────────────────────────────── */
|
|
143
|
-
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
144
|
-
--ease-entrance: cubic-bezier(0, 0, 0.2, 1);
|
|
145
|
-
--ease-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
146
|
-
|
|
147
|
-
/* ── Layout ───────────────────────────────────────────────────────────── */
|
|
148
|
-
--container-page: var(--layout-page-width);
|
|
149
|
-
--container-prose: var(--layout-prose-width);
|
|
150
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Cartbase storefront — the VOCABULARY.
|
|
3
|
+
*
|
|
4
|
+
* Every line maps a value from tokens.css into a Tailwind namespace, which is
|
|
5
|
+
* what turns it into a utility class. Registering `--color-primary` is what
|
|
6
|
+
* makes `bg-primary`, `text-primary`, `border-primary` and `ring-primary`
|
|
7
|
+
* exist. Registering `--text-h2` is what makes `text-h2` exist.
|
|
8
|
+
*
|
|
9
|
+
* THIS FILE HOLDS NO VALUES, and a theme never edits it. A theme swaps
|
|
10
|
+
* tokens.css and the whole library repaints, because components only ever
|
|
11
|
+
* reference names from here.
|
|
12
|
+
*
|
|
13
|
+
* Every namespace below is Tailwind's own. We invented none of them and we
|
|
14
|
+
* add none of our own, because the requirement is that a developer or a
|
|
15
|
+
* coding agent reads `text-h2` or `bg-primary` and needs no documentation to
|
|
16
|
+
* know what it is or how to change it.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@theme {
|
|
20
|
+
/* ── Colour ───────────────────────────────────────────────────────────── */
|
|
21
|
+
--color-background: var(--background);
|
|
22
|
+
--color-foreground: var(--foreground);
|
|
23
|
+
--color-card: var(--card);
|
|
24
|
+
--color-card-foreground: var(--card-foreground);
|
|
25
|
+
--color-popover: var(--popover);
|
|
26
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
27
|
+
|
|
28
|
+
--color-primary: var(--primary);
|
|
29
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
30
|
+
--color-secondary: var(--secondary);
|
|
31
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
32
|
+
--color-muted: var(--muted);
|
|
33
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
34
|
+
--color-accent: var(--accent);
|
|
35
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
36
|
+
|
|
37
|
+
--color-destructive: var(--destructive);
|
|
38
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
39
|
+
--color-success: var(--success);
|
|
40
|
+
--color-success-foreground: var(--success-foreground);
|
|
41
|
+
--color-warning: var(--warning);
|
|
42
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
43
|
+
|
|
44
|
+
--color-border: var(--border);
|
|
45
|
+
--color-input: var(--input);
|
|
46
|
+
--color-ring: var(--ring);
|
|
47
|
+
|
|
48
|
+
/* ── Typefaces ────────────────────────────────────────────────────────── */
|
|
49
|
+
--font-body: var(--font-body-family);
|
|
50
|
+
--font-display: var(--font-display-family);
|
|
51
|
+
--font-mono: var(--font-mono-family);
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* ── Type scale ──────────────────────────────────────────────────────────
|
|
55
|
+
* Generated at a 1.2 ratio from a 16px base and rounded to 4px steps, the
|
|
56
|
+
* major-third scale Polaris uses. Named h1 to h6 because that is what every
|
|
57
|
+
* web developer reads without translation.
|
|
58
|
+
*
|
|
59
|
+
* The name is a STYLE, never a tag. Put `text-h2` on an <h1> when the page
|
|
60
|
+
* needs a smaller heading: the tag stays correct for search engines and
|
|
61
|
+
* screen readers, the style is a separate decision. This is exactly how
|
|
62
|
+
* Webflow's Client-First `heading-style-h*` classes work.
|
|
63
|
+
*/
|
|
64
|
+
--text-h1: 2.5rem;
|
|
65
|
+
--text-h1--line-height: 1.1;
|
|
66
|
+
--text-h1--letter-spacing: -0.02em;
|
|
67
|
+
--text-h1--font-weight: 600;
|
|
68
|
+
|
|
69
|
+
--text-h2: 2rem;
|
|
70
|
+
--text-h2--line-height: 1.15;
|
|
71
|
+
--text-h2--letter-spacing: -0.015em;
|
|
72
|
+
--text-h2--font-weight: 600;
|
|
73
|
+
|
|
74
|
+
--text-h3: 1.75rem;
|
|
75
|
+
--text-h3--line-height: 1.2;
|
|
76
|
+
--text-h3--letter-spacing: -0.01em;
|
|
77
|
+
--text-h3--font-weight: 600;
|
|
78
|
+
|
|
79
|
+
--text-h4: 1.5rem;
|
|
80
|
+
--text-h4--line-height: 1.25;
|
|
81
|
+
--text-h4--font-weight: 600;
|
|
82
|
+
|
|
83
|
+
--text-h5: 1.25rem;
|
|
84
|
+
--text-h5--line-height: 1.3;
|
|
85
|
+
--text-h5--font-weight: 600;
|
|
86
|
+
|
|
87
|
+
--text-h6: 1rem;
|
|
88
|
+
--text-h6--line-height: 1.4;
|
|
89
|
+
--text-h6--font-weight: 600;
|
|
90
|
+
|
|
91
|
+
--text-body-large: 1.125rem;
|
|
92
|
+
--text-body-large--line-height: 1.6;
|
|
93
|
+
|
|
94
|
+
--text-body: 1rem;
|
|
95
|
+
--text-body--line-height: 1.6;
|
|
96
|
+
|
|
97
|
+
--text-body-small: 0.875rem;
|
|
98
|
+
--text-body-small--line-height: 1.5;
|
|
99
|
+
|
|
100
|
+
/* Buttons, form labels, badges — short, never a sentence. */
|
|
101
|
+
--text-label: 0.875rem;
|
|
102
|
+
--text-label--line-height: 1.2;
|
|
103
|
+
--text-label--font-weight: 500;
|
|
104
|
+
|
|
105
|
+
/* Fine print, metadata, timestamps. */
|
|
106
|
+
--text-caption: 0.75rem;
|
|
107
|
+
--text-caption--line-height: 1.4;
|
|
108
|
+
|
|
109
|
+
/*
|
|
110
|
+
* ── Weight ──────────────────────────────────────────────────────────────
|
|
111
|
+
* Three, not four. Bold and semibold were doing the same job in different
|
|
112
|
+
* places, which is how a scale rots.
|
|
113
|
+
*/
|
|
114
|
+
--font-weight-regular: 400;
|
|
115
|
+
--font-weight-medium: 500;
|
|
116
|
+
--font-weight-semibold: 600;
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* ── Spacing ─────────────────────────────────────────────────────────────
|
|
120
|
+
* Tailwind's own 4px step, stated rather than assumed so a theme can widen
|
|
121
|
+
* the whole rhythm with one number.
|
|
122
|
+
*/
|
|
123
|
+
--spacing: 0.25rem;
|
|
124
|
+
|
|
125
|
+
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
126
|
+
--radius-sm: calc(var(--radius-base) - 4px);
|
|
127
|
+
--radius-md: calc(var(--radius-base) - 2px);
|
|
128
|
+
--radius-lg: var(--radius-base);
|
|
129
|
+
--radius-xl: calc(var(--radius-base) + 4px);
|
|
130
|
+
--radius-2xl: calc(var(--radius-base) + 12px);
|
|
131
|
+
|
|
132
|
+
/*
|
|
133
|
+
* ── Elevation ───────────────────────────────────────────────────────────
|
|
134
|
+
* Named for what is raised, not for how big the blur is. `shadow-card` says
|
|
135
|
+
* what it is for; `shadow-md` says nothing and cannot be retuned per theme.
|
|
136
|
+
*/
|
|
137
|
+
--shadow-card: var(--elevation-card);
|
|
138
|
+
--shadow-card-hover: var(--elevation-card-hover);
|
|
139
|
+
--shadow-popover: var(--elevation-popover);
|
|
140
|
+
--shadow-drawer: var(--elevation-drawer);
|
|
141
|
+
|
|
142
|
+
/* ── Motion ───────────────────────────────────────────────────────────── */
|
|
143
|
+
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
144
|
+
--ease-entrance: cubic-bezier(0, 0, 0.2, 1);
|
|
145
|
+
--ease-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
146
|
+
|
|
147
|
+
/* ── Layout ───────────────────────────────────────────────────────────── */
|
|
148
|
+
--container-page: var(--layout-page-width);
|
|
149
|
+
--container-prose: var(--layout-prose-width);
|
|
150
|
+
}
|
package/theme/tokens.css
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Cartbase storefront — the DEFAULT THEME's values.
|
|
3
|
-
*
|
|
4
|
-
* This file is one half of the two-layer token model. It holds VALUES and
|
|
5
|
-
* nothing else. The other half (theme.css) holds the NAMES and never holds a
|
|
6
|
-
* value. A theme replaces this file; it never touches the other one.
|
|
7
|
-
*
|
|
8
|
-
* Naming follows shadcn/ui exactly, because that is the vocabulary every
|
|
9
|
-
* developer and every coding agent already knows without reading a document:
|
|
10
|
-
* a semantic role (`primary`, `muted`, `destructive`) always paired with its
|
|
11
|
-
* `-foreground`, so text on a surface is never a guess.
|
|
12
|
-
*
|
|
13
|
-
* Colours are oklch. Opacity modifiers (`bg-primary/50`) work on full colour
|
|
14
|
-
* values in Tailwind 4, so unlike the old preset these are complete colours
|
|
15
|
-
* rather than bare channels waiting for a wrapper.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
:root {
|
|
19
|
-
color-scheme: light;
|
|
20
|
-
|
|
21
|
-
/* ── Surfaces ─────────────────────────────────────────────────────────── */
|
|
22
|
-
--background: oklch(1 0 0);
|
|
23
|
-
--foreground: oklch(0.145 0 0);
|
|
24
|
-
--card: oklch(1 0 0);
|
|
25
|
-
--card-foreground: oklch(0.145 0 0);
|
|
26
|
-
--popover: oklch(1 0 0);
|
|
27
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
28
|
-
|
|
29
|
-
/* ── Roles ────────────────────────────────────────────────────────────── */
|
|
30
|
-
--primary: oklch(0.205 0 0);
|
|
31
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
32
|
-
--secondary: oklch(0.97 0 0);
|
|
33
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
34
|
-
--muted: oklch(0.97 0 0);
|
|
35
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
36
|
-
--accent: oklch(0.97 0 0);
|
|
37
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
38
|
-
|
|
39
|
-
/* ── Feedback ─────────────────────────────────────────────────────────── */
|
|
40
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
41
|
-
--destructive-foreground: oklch(0.985 0 0);
|
|
42
|
-
--success: oklch(0.648 0.15 160);
|
|
43
|
-
--success-foreground: oklch(0.985 0 0);
|
|
44
|
-
--warning: oklch(0.828 0.189 84.429);
|
|
45
|
-
--warning-foreground: oklch(0.279 0.077 45.635);
|
|
46
|
-
|
|
47
|
-
/* ── Lines and focus ──────────────────────────────────────────────────── */
|
|
48
|
-
--border: oklch(0.922 0 0);
|
|
49
|
-
--input: oklch(0.922 0 0);
|
|
50
|
-
--ring: oklch(0.708 0 0);
|
|
51
|
-
|
|
52
|
-
/* ── Typefaces ────────────────────────────────────────────────────────── */
|
|
53
|
-
--font-body-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
54
|
-
--font-display-family: ui-serif, Georgia, serif;
|
|
55
|
-
--font-mono-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
56
|
-
|
|
57
|
-
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
58
|
-
--radius-base: 0.5rem;
|
|
59
|
-
|
|
60
|
-
/* ── Elevation ────────────────────────────────────────────────────────── */
|
|
61
|
-
--elevation-card: 0 1px 2px 0 oklch(0 0 0 / 5%);
|
|
62
|
-
--elevation-card-hover: 0 4px 12px -2px oklch(0 0 0 / 10%), 0 2px 4px -2px oklch(0 0 0 / 6%);
|
|
63
|
-
--elevation-popover: 0 8px 24px -4px oklch(0 0 0 / 12%), 0 2px 6px -2px oklch(0 0 0 / 8%);
|
|
64
|
-
--elevation-drawer: -8px 0 32px -8px oklch(0 0 0 / 16%);
|
|
65
|
-
|
|
66
|
-
/* ── Layout ───────────────────────────────────────────────────────────── */
|
|
67
|
-
--layout-page-width: 80rem;
|
|
68
|
-
--layout-prose-width: 42rem;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.dark {
|
|
72
|
-
color-scheme: dark;
|
|
73
|
-
|
|
74
|
-
--background: oklch(0.145 0 0);
|
|
75
|
-
--foreground: oklch(0.985 0 0);
|
|
76
|
-
--card: oklch(0.205 0 0);
|
|
77
|
-
--card-foreground: oklch(0.985 0 0);
|
|
78
|
-
--popover: oklch(0.205 0 0);
|
|
79
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
80
|
-
|
|
81
|
-
--primary: oklch(0.985 0 0);
|
|
82
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
83
|
-
--secondary: oklch(0.269 0 0);
|
|
84
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
85
|
-
--muted: oklch(0.269 0 0);
|
|
86
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
87
|
-
--accent: oklch(0.269 0 0);
|
|
88
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
89
|
-
|
|
90
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
91
|
-
--destructive-foreground: oklch(0.985 0 0);
|
|
92
|
-
--success: oklch(0.696 0.17 162.48);
|
|
93
|
-
--success-foreground: oklch(0.145 0 0);
|
|
94
|
-
--warning: oklch(0.828 0.189 84.429);
|
|
95
|
-
--warning-foreground: oklch(0.279 0.077 45.635);
|
|
96
|
-
|
|
97
|
-
--border: oklch(1 0 0 / 12%);
|
|
98
|
-
--input: oklch(1 0 0 / 18%);
|
|
99
|
-
--ring: oklch(0.556 0 0);
|
|
100
|
-
|
|
101
|
-
/* Shadows have to be heavier on a dark ground or they vanish entirely. */
|
|
102
|
-
--elevation-card: 0 1px 2px 0 oklch(0 0 0 / 40%);
|
|
103
|
-
--elevation-card-hover: 0 4px 12px -2px oklch(0 0 0 / 55%), 0 2px 4px -2px oklch(0 0 0 / 40%);
|
|
104
|
-
--elevation-popover: 0 8px 24px -4px oklch(0 0 0 / 60%), 0 2px 6px -2px oklch(0 0 0 / 45%);
|
|
105
|
-
--elevation-drawer: -8px 0 32px -8px oklch(0 0 0 / 65%);
|
|
106
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Cartbase storefront — the DEFAULT THEME's values.
|
|
3
|
+
*
|
|
4
|
+
* This file is one half of the two-layer token model. It holds VALUES and
|
|
5
|
+
* nothing else. The other half (theme.css) holds the NAMES and never holds a
|
|
6
|
+
* value. A theme replaces this file; it never touches the other one.
|
|
7
|
+
*
|
|
8
|
+
* Naming follows shadcn/ui exactly, because that is the vocabulary every
|
|
9
|
+
* developer and every coding agent already knows without reading a document:
|
|
10
|
+
* a semantic role (`primary`, `muted`, `destructive`) always paired with its
|
|
11
|
+
* `-foreground`, so text on a surface is never a guess.
|
|
12
|
+
*
|
|
13
|
+
* Colours are oklch. Opacity modifiers (`bg-primary/50`) work on full colour
|
|
14
|
+
* values in Tailwind 4, so unlike the old preset these are complete colours
|
|
15
|
+
* rather than bare channels waiting for a wrapper.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
:root {
|
|
19
|
+
color-scheme: light;
|
|
20
|
+
|
|
21
|
+
/* ── Surfaces ─────────────────────────────────────────────────────────── */
|
|
22
|
+
--background: oklch(1 0 0);
|
|
23
|
+
--foreground: oklch(0.145 0 0);
|
|
24
|
+
--card: oklch(1 0 0);
|
|
25
|
+
--card-foreground: oklch(0.145 0 0);
|
|
26
|
+
--popover: oklch(1 0 0);
|
|
27
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
28
|
+
|
|
29
|
+
/* ── Roles ────────────────────────────────────────────────────────────── */
|
|
30
|
+
--primary: oklch(0.205 0 0);
|
|
31
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
32
|
+
--secondary: oklch(0.97 0 0);
|
|
33
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
34
|
+
--muted: oklch(0.97 0 0);
|
|
35
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
36
|
+
--accent: oklch(0.97 0 0);
|
|
37
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
38
|
+
|
|
39
|
+
/* ── Feedback ─────────────────────────────────────────────────────────── */
|
|
40
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
41
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
42
|
+
--success: oklch(0.648 0.15 160);
|
|
43
|
+
--success-foreground: oklch(0.985 0 0);
|
|
44
|
+
--warning: oklch(0.828 0.189 84.429);
|
|
45
|
+
--warning-foreground: oklch(0.279 0.077 45.635);
|
|
46
|
+
|
|
47
|
+
/* ── Lines and focus ──────────────────────────────────────────────────── */
|
|
48
|
+
--border: oklch(0.922 0 0);
|
|
49
|
+
--input: oklch(0.922 0 0);
|
|
50
|
+
--ring: oklch(0.708 0 0);
|
|
51
|
+
|
|
52
|
+
/* ── Typefaces ────────────────────────────────────────────────────────── */
|
|
53
|
+
--font-body-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
54
|
+
--font-display-family: ui-serif, Georgia, serif;
|
|
55
|
+
--font-mono-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
56
|
+
|
|
57
|
+
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
58
|
+
--radius-base: 0.5rem;
|
|
59
|
+
|
|
60
|
+
/* ── Elevation ────────────────────────────────────────────────────────── */
|
|
61
|
+
--elevation-card: 0 1px 2px 0 oklch(0 0 0 / 5%);
|
|
62
|
+
--elevation-card-hover: 0 4px 12px -2px oklch(0 0 0 / 10%), 0 2px 4px -2px oklch(0 0 0 / 6%);
|
|
63
|
+
--elevation-popover: 0 8px 24px -4px oklch(0 0 0 / 12%), 0 2px 6px -2px oklch(0 0 0 / 8%);
|
|
64
|
+
--elevation-drawer: -8px 0 32px -8px oklch(0 0 0 / 16%);
|
|
65
|
+
|
|
66
|
+
/* ── Layout ───────────────────────────────────────────────────────────── */
|
|
67
|
+
--layout-page-width: 80rem;
|
|
68
|
+
--layout-prose-width: 42rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dark {
|
|
72
|
+
color-scheme: dark;
|
|
73
|
+
|
|
74
|
+
--background: oklch(0.145 0 0);
|
|
75
|
+
--foreground: oklch(0.985 0 0);
|
|
76
|
+
--card: oklch(0.205 0 0);
|
|
77
|
+
--card-foreground: oklch(0.985 0 0);
|
|
78
|
+
--popover: oklch(0.205 0 0);
|
|
79
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
80
|
+
|
|
81
|
+
--primary: oklch(0.985 0 0);
|
|
82
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
83
|
+
--secondary: oklch(0.269 0 0);
|
|
84
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
85
|
+
--muted: oklch(0.269 0 0);
|
|
86
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
87
|
+
--accent: oklch(0.269 0 0);
|
|
88
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
89
|
+
|
|
90
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
91
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
92
|
+
--success: oklch(0.696 0.17 162.48);
|
|
93
|
+
--success-foreground: oklch(0.145 0 0);
|
|
94
|
+
--warning: oklch(0.828 0.189 84.429);
|
|
95
|
+
--warning-foreground: oklch(0.279 0.077 45.635);
|
|
96
|
+
|
|
97
|
+
--border: oklch(1 0 0 / 12%);
|
|
98
|
+
--input: oklch(1 0 0 / 18%);
|
|
99
|
+
--ring: oklch(0.556 0 0);
|
|
100
|
+
|
|
101
|
+
/* Shadows have to be heavier on a dark ground or they vanish entirely. */
|
|
102
|
+
--elevation-card: 0 1px 2px 0 oklch(0 0 0 / 40%);
|
|
103
|
+
--elevation-card-hover: 0 4px 12px -2px oklch(0 0 0 / 55%), 0 2px 4px -2px oklch(0 0 0 / 40%);
|
|
104
|
+
--elevation-popover: 0 8px 24px -4px oklch(0 0 0 / 60%), 0 2px 6px -2px oklch(0 0 0 / 45%);
|
|
105
|
+
--elevation-drawer: -8px 0 32px -8px oklch(0 0 0 / 65%);
|
|
106
|
+
}
|