@aziontech/theme 5.2.0 → 5.2.2
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/dist/v4/globals.css +2 -2
- package/dist/v4/globals.scss +2 -2
- package/package.json +1 -1
- package/src/scripts/build-tokens.mjs +1 -121
- package/src/scripts/compile-primitives.js +0 -18
- package/src/scripts/compile-theme.js +0 -10
- package/src/scripts/refs.d.ts.map +1 -1
- package/src/scripts/refs.js +0 -9
- package/src/scripts/zero-unit.mjs +0 -19
- package/src/tokens/README.md +0 -7
- package/src/tokens/index.js +0 -4
- package/src/tokens/primitives/animations/animate.d.ts.map +1 -1
- package/src/tokens/primitives/animations/animate.js +0 -2
- package/src/tokens/primitives/animations/keyframes.d.ts +0 -5
- package/src/tokens/primitives/animations/keyframes.d.ts.map +1 -1
- package/src/tokens/primitives/animations/keyframes.js +0 -25
- package/src/tokens/primitives/colors/colors.js +0 -5
- package/src/tokens/primitives/shape/container.d.ts.map +1 -1
- package/src/tokens/primitives/shape/container.js +13 -30
- package/src/tokens/primitives/typography/tracking.js +0 -6
- package/src/tokens/semantic/colors.js +0 -21
- package/src/tokens/semantic/containers.d.ts.map +1 -1
- package/src/tokens/semantic/containers.data.d.ts +0 -10
- package/src/tokens/semantic/containers.data.d.ts.map +1 -1
- package/src/tokens/semantic/containers.data.js +0 -11
- package/src/tokens/semantic/containers.js +1 -7
- package/src/tokens/semantic/layouts.data.d.ts +0 -15
- package/src/tokens/semantic/layouts.data.d.ts.map +1 -1
- package/src/tokens/semantic/layouts.data.js +10 -265
- package/src/tokens/semantic/spacings.data.d.ts +0 -6
- package/src/tokens/semantic/spacings.data.d.ts.map +1 -1
- package/src/tokens/semantic/spacings.data.js +0 -7
- package/src/tokens/semantic/texts.data.d.ts +0 -1
- package/src/tokens/semantic/texts.data.d.ts.map +1 -1
- package/src/tokens/semantic/texts.data.js +0 -48
- package/src/tokens/semantic/z-indices.data.d.ts +0 -22
- package/src/tokens/semantic/z-indices.data.d.ts.map +1 -1
- package/src/tokens/semantic/z-indices.data.js +0 -23
- package/src/tokens/theme/accent.js +0 -12
- package/src/tokens/theme/background.js +0 -5
- package/src/tokens/theme/border.js +0 -22
- package/src/tokens/theme/code-sintax.js +0 -4
- package/src/tokens/theme/text.js +1 -1
- package/src/scripts/measure-comment.mjs +0 -47
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative container tokens (mobile-first).
|
|
3
|
-
*
|
|
4
|
-
* Each entry maps a token key to a breakpoint map. `_` is the default;
|
|
5
|
-
* any other key must exist in tokens/primitives/breakpoints.js.
|
|
6
|
-
*
|
|
7
|
-
* Values are ported from the legacy `containers.js` plugin. The `xl` bucket
|
|
8
|
-
* used to be wrapped in `@media (max-width: xl)` — orphan / never matched
|
|
9
|
-
* cleanly — and was corrected to `min-width` here.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
1
|
export const containersData = {
|
|
13
2
|
px: { _: '1rem', sm: '2.5rem', xl: '0' },
|
|
14
3
|
py: { _: '4rem', sm: '8rem', xl: '12rem' },
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// TODO: deprecated — substituído pelos tokens declarativos em
|
|
2
|
-
// `containers.data.js` e pelo CSS gerado em `dist/globals.css` via
|
|
3
|
-
// `src/scripts/build-tokens.mjs`. Remover quando consumers migrarem.
|
|
4
1
|
const plugin = (() => {
|
|
5
2
|
try {
|
|
6
3
|
return require('tailwindcss/plugin')
|
|
@@ -9,10 +6,7 @@ const plugin = (() => {
|
|
|
9
6
|
}
|
|
10
7
|
})()
|
|
11
8
|
|
|
12
|
-
/**
|
|
13
|
-
* Generate semantic spacing style components
|
|
14
|
-
* @returns {import('tailwindcss/plugin').Plugin}
|
|
15
|
-
*/
|
|
9
|
+
/** @returns {import('tailwindcss/plugin').Plugin} */
|
|
16
10
|
export const containers = () => {
|
|
17
11
|
return plugin(({ addComponents, theme }) => {
|
|
18
12
|
const mobile = {
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout tokens — the console's container system.
|
|
3
|
-
*
|
|
4
|
-
* Three decisions, expressed once: how far content sits from the app chrome
|
|
5
|
-
* (BOUNDARY), how far things sit from each other (RHYTHM), and how wide a reading
|
|
6
|
-
* column may get (MEASURE).
|
|
7
|
-
*
|
|
8
|
-
* A DERIVED GROUP: every value here is a `var()` reference to `--spacing-*` /
|
|
9
|
-
* `--container-*`. Never write a literal length in this file. That indirection is the
|
|
10
|
-
* whole point — the spacing scale is already fluid (`--spacing-lg` is 1rem, then
|
|
11
|
-
* 1.5rem from `sm`), and `var()` is substituted at USE time on the element, so a
|
|
12
|
-
* layout token follows the breakpoint override without owning a breakpoint map of its
|
|
13
|
-
* own. Giving these their own maps would duplicate the spacing scale into layout and
|
|
14
|
-
* let the two drift.
|
|
15
|
-
*/
|
|
16
1
|
export const layoutsData: {
|
|
17
2
|
'layout-boundary-inline': string;
|
|
18
3
|
'layout-boundary-end': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layouts.data.d.ts","sourceRoot":"","sources":["layouts.data.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"layouts.data.d.ts","sourceRoot":"","sources":["layouts.data.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAiBC;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CC"}
|
|
@@ -1,160 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout tokens — the console's container system.
|
|
3
|
-
*
|
|
4
|
-
* Three decisions, expressed once: how far content sits from the app chrome
|
|
5
|
-
* (BOUNDARY), how far things sit from each other (RHYTHM), and how wide a reading
|
|
6
|
-
* column may get (MEASURE).
|
|
7
|
-
*
|
|
8
|
-
* A DERIVED GROUP: every value here is a `var()` reference to `--spacing-*` /
|
|
9
|
-
* `--container-*`. Never write a literal length in this file. That indirection is the
|
|
10
|
-
* whole point — the spacing scale is already fluid (`--spacing-lg` is 1rem, then
|
|
11
|
-
* 1.5rem from `sm`), and `var()` is substituted at USE time on the element, so a
|
|
12
|
-
* layout token follows the breakpoint override without owning a breakpoint map of its
|
|
13
|
-
* own. Giving these their own maps would duplicate the spacing scale into layout and
|
|
14
|
-
* let the two drift.
|
|
15
|
-
*/
|
|
16
1
|
export const layoutsData = {
|
|
17
|
-
// BOUNDARY — content ↔ app chrome.
|
|
18
2
|
'layout-boundary-inline': 'var(--spacing-lg)',
|
|
19
3
|
'layout-boundary-end': 'var(--spacing-lg)',
|
|
20
4
|
'layout-boundary-start': 'var(--spacing-lg)',
|
|
21
5
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
* THE PAGE SHAPE. The page stack never carries a vertical `gap`. It holds the
|
|
26
|
-
* heading and ONE element below it, and that element carries the BAND step:
|
|
27
|
-
*
|
|
28
|
-
* <div class="layout-column layout-boundary flex min-w-0 flex-col">
|
|
29
|
-
* <PageHeading />
|
|
30
|
-
* <section class="layout-section-start flex flex-col
|
|
31
|
-
* gap-(--layout-section-gap)"> the bands
|
|
32
|
-
* <section class="flex flex-col gap-(--layout-group-gap)">…</section>
|
|
33
|
-
* <form class="flex flex-col gap-(--layout-group-gap)">…</form>
|
|
34
|
-
* </section>
|
|
35
|
-
* </div>
|
|
36
|
-
*
|
|
37
|
-
* So there are exactly three levels, each owning one decision: the BOUNDARY sets the
|
|
38
|
-
* page's top inset, the PARENT SECTION spaces the sections inside it with
|
|
39
|
-
* --layout-section-gap, and each of those sections spaces its own parts with
|
|
40
|
-
* --layout-group-gap (its title over its card, its controls over the table they
|
|
41
|
-
* narrow). Every page carries the parent section, whether it holds one section or
|
|
42
|
-
* seven, so the shape is the same to read and a second section needs no rework.
|
|
43
|
-
*
|
|
44
|
-
* TWO TOKENS, TUNED SEPARATELY. The space above the first section belongs to the
|
|
45
|
-
* BOUNDARY (--layout-boundary-start) and the space between sections belongs to the
|
|
46
|
-
* PARENT (--layout-section-gap), so either moves without the other. Today the
|
|
47
|
-
* section step is one stop larger than the boundary step: the page opens tight under
|
|
48
|
-
* its heading and then separates its sections more firmly than the parts inside any
|
|
49
|
-
* one of them. Retune either here and every page follows — no page restates a step.
|
|
50
|
-
*
|
|
51
|
-
* A `gap` is right on the parent section and inside a section, and wrong on the page
|
|
52
|
-
* stack: within the parent every child IS a section, so one rule spaces them all; on
|
|
53
|
-
* the page stack the heading and the parent are different kinds of thing.
|
|
54
|
-
* `.layout-group-start` covers the one case a parent cannot: a group whose parts are
|
|
55
|
-
* already direct siblings of the page stack.
|
|
56
|
-
*/
|
|
57
|
-
'layout-section-gap': 'var(--spacing-xl)', // between sections of a parent
|
|
58
|
-
'layout-group-gap': 'var(--spacing-md)', // within a band
|
|
6
|
+
'layout-section-gap': 'var(--spacing-xl)',
|
|
7
|
+
'layout-group-gap': 'var(--spacing-md)',
|
|
59
8
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* viewport edge on an ultrawide screen doesn't put its row actions a head-turn away
|
|
66
|
-
* from the name that identifies the row. They still want every pixel they can get:
|
|
67
|
-
* more columns visible is the point.
|
|
68
|
-
*
|
|
69
|
-
* FOCUSED pages (home, the create flows) are one task, but that task still goes
|
|
70
|
-
* multi-column — home is a rail plus a card grid — so they stay wide enough for
|
|
71
|
-
* those bands to breathe, and no wider.
|
|
72
|
-
*
|
|
73
|
-
* FORM pages (settings, in-page edit forms) are a single stacked column of fields.
|
|
74
|
-
* Past ~1200px the extra width lands entirely inside the controls: a label sits at
|
|
75
|
-
* the far left of a 1600px row from the input it names, and the eye has to travel
|
|
76
|
-
* the whole measure to pair them.
|
|
77
|
-
*
|
|
78
|
-
* CONTENT pages are the one column capped by TYPOGRAPHY rather than by layout. Prose
|
|
79
|
-
* is read line by line, and past ~90 characters the eye loses the start of the next
|
|
80
|
-
* line on the return sweep — a limit that has nothing to do with how wide the payload
|
|
81
|
-
* is, which is why it is far tighter than every other measure here and why it does not
|
|
82
|
-
* move when a rail collapses and frees up room. A documentation page is already
|
|
83
|
-
* flanked by two rails; this caps what is between them.
|
|
84
|
-
*
|
|
85
|
-
* IT IS NAMED FOR THE PAYLOAD, NOT FOR THE SECTION. The cap is a line length, so every
|
|
86
|
-
* page whose payload is flowing copy takes it — documentation today, the blog and any
|
|
87
|
-
* other article page next — and none of them has to re-derive the same limit under a
|
|
88
|
-
* name that says "docs". By the same rule, a page inside the documentation that is NOT
|
|
89
|
-
* read line by line (its home, a directory of cards) takes a wider measure: what picks
|
|
90
|
-
* the column is the payload, never the URL.
|
|
91
|
-
*/
|
|
92
|
-
'layout-measure': 'var(--container-7xl)', // 1620px — data pages
|
|
93
|
-
'layout-measure-focused': 'var(--container-4xl)', // 1024px — home
|
|
94
|
-
'layout-measure-form': 'var(--container-4xl)', // 1024px — settings, forms
|
|
95
|
-
'layout-measure-form-create': 'var(--container-5xl)', // 1192px — create flows
|
|
96
|
-
'layout-measure-content': 'var(--container-3xl)', // 876px — prose columns (docs, blog)
|
|
9
|
+
'layout-measure': 'var(--container-7xl)',
|
|
10
|
+
'layout-measure-focused': 'var(--container-4xl)',
|
|
11
|
+
'layout-measure-form': 'var(--container-4xl)',
|
|
12
|
+
'layout-measure-form-create': 'var(--container-5xl)',
|
|
13
|
+
'layout-measure-content': 'var(--container-3xl)',
|
|
97
14
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
* do not answer the same question.
|
|
102
|
-
*
|
|
103
|
-
* --layout-measure-site IS THE PAGE'S FRAME. The azion.com pages are a single
|
|
104
|
-
* vertical frame: the hero's inner column, every section below it, the docs home and
|
|
105
|
-
* the footer all sit on the SAME centred column, and the border-x that runs down the
|
|
106
|
-
* page is only continuous because they agree to the pixel. That is why this is a token
|
|
107
|
-
* rather than a width re-typed per band — the frame is one decision, and one place is
|
|
108
|
-
* where it has to live.
|
|
109
|
-
*
|
|
110
|
-
* --layout-measure-site-header IS THE BAR'S, AND IT IS DELIBERATELY ONE RUNG WIDER.
|
|
111
|
-
* A bar is chrome, not content: it carries the brand at one end of the window and the
|
|
112
|
-
* account actions at the other, held apart by a navigation region in the middle, so it
|
|
113
|
-
* wants the room a reading frame deliberately refuses. Held to the page's measure that
|
|
114
|
-
* middle region ran out of room on a laptop long before the page did. The bar is the
|
|
115
|
-
* ONE band allowed outside the frame, and it says so in a token of its own — which is
|
|
116
|
-
* also what keeps the exception reviewable in both directions: nobody widens the bar by
|
|
117
|
-
* retuning the page, and nobody widens the page by retuning the bar.
|
|
118
|
-
*
|
|
119
|
-
* The two part company only above the caps, and by a fixed step. Measured against the
|
|
120
|
-
* page frame: one shared inset up to 1280, 2px apart at 1440 (the frame has just
|
|
121
|
-
* capped), 82 at 1600, and a flat 92 from 1668 up, where the bar caps too — half the
|
|
122
|
-
* 232px between the two measures, less the boundary the bar keeps.
|
|
123
|
-
*
|
|
124
|
-
* Both are rungs of the shared container ladder (primitives/shape/container.js), not
|
|
125
|
-
* numbers chosen for a page. The page snaps to the scale, the scale does not bend to
|
|
126
|
-
* the page, which is the same rule --layout-measure follows. They are their own tokens
|
|
127
|
-
* rather than references to a console measure because the questions differ: a console
|
|
128
|
-
* measure caps a PAYLOAD (a table, a form), while these are the widths of a FRAME and
|
|
129
|
-
* of the chrome above it. Retuning any of the three must not move the others.
|
|
130
|
-
*/
|
|
131
|
-
'layout-measure-site': 'var(--container-6xl)', // 1388px — the marketing site column
|
|
132
|
-
'layout-measure-site-header': 'var(--container-7xl)', // 1620px — the site bar, one rung wider
|
|
133
|
-
/*
|
|
134
|
-
* MEASURE (control) — the widest the *right side* of an item-group field row may
|
|
135
|
-
* get. An ItemGroup row is two columns: the content names the field (title +
|
|
136
|
-
* guidance) on the left, the actions hold the control on the right. That right side
|
|
137
|
-
* is `flex-1` + `justify-end`, so this cap is what decides where the control
|
|
138
|
-
* actually sits — raise it and the control grows leftward, toward the label that
|
|
139
|
-
* names it; lower it and the control pins to the right edge with the gap opening up
|
|
140
|
-
* in between.
|
|
141
|
-
*
|
|
142
|
-
* The default is deliberately tight: a settings row reads as "name → current value",
|
|
143
|
-
* and a narrow value column keeps a scannable right edge down the whole card. A
|
|
144
|
-
* create form inverts that priority — the fields ARE the page's payload, several are
|
|
145
|
-
* radio blocks carrying their own descriptions, and the user is filling them in
|
|
146
|
-
* rather than scanning them — so the create band opens this up (see
|
|
147
|
-
* `.layout-form-create`). One token, retuned per band, instead of the cap being
|
|
148
|
-
* re-typed on every row.
|
|
149
|
-
*/
|
|
150
|
-
'layout-measure-control': 'var(--container-3xs)' // 256px — settings rows
|
|
15
|
+
'layout-measure-site': 'var(--container-6xl)',
|
|
16
|
+
'layout-measure-site-header': 'var(--container-7xl)',
|
|
17
|
+
'layout-measure-control': 'var(--container-3xs)'
|
|
151
18
|
}
|
|
152
19
|
|
|
153
|
-
/*
|
|
154
|
-
* --layout-column-measure is deliberately NOT a token: it is a per-class local that
|
|
155
|
-
* each column utility declares and the shared geometry below reads, so a fifth column
|
|
156
|
-
* class inherits the whole behaviour by naming one measure.
|
|
157
|
-
*/
|
|
158
20
|
const COLUMN_MEASURE = {
|
|
159
21
|
'layout-column': 'var(--layout-measure)',
|
|
160
22
|
'layout-column-focused': 'var(--layout-measure-focused)',
|
|
@@ -163,31 +25,6 @@ const COLUMN_MEASURE = {
|
|
|
163
25
|
'layout-column-content': 'var(--layout-measure-content)'
|
|
164
26
|
}
|
|
165
27
|
|
|
166
|
-
/**
|
|
167
|
-
* A centered column at the measure — every page carries one of these, list pages
|
|
168
|
-
* included. Full-bleed is the absence of all five classes, not a `w-full`.
|
|
169
|
-
*
|
|
170
|
-
* THE BOUNDARY IS NOT PART OF THE MEASURE. A `padded` page gets its boundary from the
|
|
171
|
-
* app shell, on the scroll box OUTSIDE the capped block, so the measure lands as
|
|
172
|
-
* CONTENT width. A page that carries the boundary ITSELF puts it on the same block as
|
|
173
|
-
* the measure, and there `box-sizing: border-box` makes the cap swallow the inset:
|
|
174
|
-
* 1620px of cap minus 24px a side is a 1572px content column, 48px narrower than the
|
|
175
|
-
* same measure gives a padded page. That is the measure describing something other
|
|
176
|
-
* than content, which is the one job it has.
|
|
177
|
-
*
|
|
178
|
-
* So when the boundary rides along, the cap grows by exactly the inset it now
|
|
179
|
-
* contains, and both shapes resolve to the same content column at every viewport.
|
|
180
|
-
* Which means a page can gain or lose its own boundary — pick up a tab bar, drop one,
|
|
181
|
-
* move from padded to self-padded — without moving a pixel.
|
|
182
|
-
*
|
|
183
|
-
* The widening nests HERE, on the column, rather than on the boundary utilities.
|
|
184
|
-
* Specificity is (0,2,0) either way, so correctness does not decide it; three things
|
|
185
|
-
* do. Both declarations that can set `max-width` stay in one block, in reading order.
|
|
186
|
-
* `.layout-boundary` stays what its name says — three padding declarations — instead
|
|
187
|
-
* of shipping a four-way `:is()` into every consumer that uses it with no column
|
|
188
|
-
* anywhere. And a fifth column class still costs one line, because these are generated
|
|
189
|
-
* from COLUMN_MEASURE and the nested rule comes along with it.
|
|
190
|
-
*/
|
|
191
28
|
const columnUtility = (measure, extra) => ({
|
|
192
29
|
'--layout-column-measure': measure,
|
|
193
30
|
...extra,
|
|
@@ -200,59 +37,21 @@ const columnUtility = (measure, extra) => ({
|
|
|
200
37
|
})
|
|
201
38
|
|
|
202
39
|
export const layoutsUtilities = {
|
|
203
|
-
/*
|
|
204
|
-
* The page boundary. Padding, never margin: a top margin on an `h-full` child of a
|
|
205
|
-
* padded scroll box overflows by exactly the margin (h-full resolves against the
|
|
206
|
-
* parent's content box, the margin sits outside it) and the overflow lands as a
|
|
207
|
-
* silent clip at the bottom of a table.
|
|
208
|
-
*/
|
|
209
40
|
'layout-boundary': {
|
|
210
41
|
'padding-inline': 'var(--layout-boundary-inline)',
|
|
211
42
|
'padding-block-start': 'var(--layout-boundary-start)',
|
|
212
43
|
'padding-block-end': 'var(--layout-boundary-end)'
|
|
213
44
|
},
|
|
214
45
|
|
|
215
|
-
/*
|
|
216
|
-
* The inline half of the boundary, alone — for a band that takes the page's side
|
|
217
|
-
* inset but owns its own vertical padding: a create flow's sticky action bar, whose
|
|
218
|
-
* `py` is a bar height, not a page boundary. Naming it is what lets the MEASURE rule
|
|
219
|
-
* above see a self-inset band and treat it exactly like the scrolling body it sits
|
|
220
|
-
* under, which is the whole point of a sticky bar.
|
|
221
|
-
*/
|
|
222
46
|
'layout-boundary-inline': {
|
|
223
47
|
'padding-inline': 'var(--layout-boundary-inline)'
|
|
224
48
|
},
|
|
225
49
|
|
|
226
|
-
/*
|
|
227
|
-
* The BOUNDARY step, as a margin — carried by the PARENT SECTION that sits directly
|
|
228
|
-
* below the heading. Exactly ONE element per page stack carries it. Never put it on
|
|
229
|
-
* a section INSIDE the parent: `gap` and `margin` both apply in a flex column, so
|
|
230
|
-
* the two add up and that section lands at twice the step.
|
|
231
|
-
*
|
|
232
|
-
* The `:first-child` rule zeroes the margin when the element that carries it happens
|
|
233
|
-
* to render first (a page with no heading; a stack whose opening band is
|
|
234
|
-
* conditional) — the boundary's padding is that band's top space, so the class is
|
|
235
|
-
* safe to carry unconditionally. This is what makes the margin model safe when the
|
|
236
|
-
* band ABOVE is conditional: a module list renders its controls row only when it has
|
|
237
|
-
* rows, so on an empty account the empty-state band becomes the first child and
|
|
238
|
-
* opens at exactly the boundary step. `v-if` bands are absent from the DOM, so
|
|
239
|
-
* `:first-child` reads the rendered truth.
|
|
240
|
-
*
|
|
241
|
-
* `margin-block-start` (not `margin-top`) to stay on the logical axis the boundary
|
|
242
|
-
* tokens use. Safe here because these stacks are flex containers, where a child's
|
|
243
|
-
* margin never collapses out of its parent.
|
|
244
|
-
*/
|
|
245
50
|
'layout-section-start': {
|
|
246
51
|
'margin-block-start': 'var(--layout-boundary-start)',
|
|
247
52
|
'&:first-child': { 'margin-block-start': '0' }
|
|
248
53
|
},
|
|
249
54
|
|
|
250
|
-
/*
|
|
251
|
-
* The GROUP step, as a margin — the fallback for a group whose parts are already
|
|
252
|
-
* direct siblings of the page stack, where a wrapper is the wrong answer. The band
|
|
253
|
-
* element normally IS that wrapper (`gap: var(--layout-group-gap)`), and that is the
|
|
254
|
-
* form to prefer: it names the group in the markup.
|
|
255
|
-
*/
|
|
256
55
|
'layout-group-start': {
|
|
257
56
|
'margin-block-start': 'var(--layout-group-gap)',
|
|
258
57
|
'&:first-child': { 'margin-block-start': '0' }
|
|
@@ -263,10 +62,6 @@ export const layoutsUtilities = {
|
|
|
263
62
|
name,
|
|
264
63
|
columnUtility(
|
|
265
64
|
measure,
|
|
266
|
-
// The create band retunes the control cap for everything inside it. On a
|
|
267
|
-
// 1192px column a 256px control side left every input pinned to the far right,
|
|
268
|
-
// a head-turn away from the label naming it; 472px pulls the control back
|
|
269
|
-
// toward its label and gives the radio blocks room to read.
|
|
270
65
|
name === 'layout-form-create'
|
|
271
66
|
? { '--layout-measure-control': 'var(--container-md)' }
|
|
272
67
|
: undefined
|
|
@@ -274,62 +69,12 @@ export const layoutsUtilities = {
|
|
|
274
69
|
])
|
|
275
70
|
),
|
|
276
71
|
|
|
277
|
-
/*
|
|
278
|
-
* THE SITE FRAME — the marketing page's column, and the one column in this file whose
|
|
279
|
-
* cap is a FRAME width rather than a content width.
|
|
280
|
-
*
|
|
281
|
-
* IT IS INSET FROM THE WINDOW AT EVERY WIDTH, and that is the whole reason it exists as
|
|
282
|
-
* a utility. On a wide screen the inset is free: --layout-measure-site is narrower than
|
|
283
|
-
* the window, `margin-inline: auto` centres the column, and its rules read as the page's
|
|
284
|
-
* vertical frame with canvas either side. Below the cap that stops doing anything — the
|
|
285
|
-
* column becomes the window — and the two rules land ON the window edges, where a
|
|
286
|
-
* hairline is not a frame, it is a seam against the bezel. So the frame that organises
|
|
287
|
-
* the whole desktop layout simply ceased to exist on a phone, and the headline above it
|
|
288
|
-
* (which pads by the boundary) opened a boundary inside a rule drawn at x=0.
|
|
289
|
-
*
|
|
290
|
-
* ONE `min()` COVERS THE WHOLE RANGE, WITH NO BREAKPOINT. The cap is whichever binds
|
|
291
|
-
* first: the measure, or the window less a boundary a side. While the measure is the
|
|
292
|
-
* smaller the column is capped and centred and the boundary term is inert; once the
|
|
293
|
-
* window is narrower than the measure — precisely where the cap has stopped working —
|
|
294
|
-
* the boundary term takes over and IS the inset. The two mechanisms hand off to each
|
|
295
|
-
* other, so a phone gets the same framed column a desktop gets, one boundary in from
|
|
296
|
-
* each edge.
|
|
297
|
-
*
|
|
298
|
-
* NO PADDING, DELIBERATELY. The inset belongs to the frame, not to the copy: the bands
|
|
299
|
-
* inside are grids whose `gap-px` rules have to reach the frame's own verticals, and a
|
|
300
|
-
* padding here would pull them off it. A band that wants its content inset too adds
|
|
301
|
-
* `layout-boundary-inline` on top (that is what SectionContainer's `padded` does).
|
|
302
|
-
*
|
|
303
|
-
* This is the shape /site/pricing worked out band by band and carried in a wrapper div;
|
|
304
|
-
* as a utility it is one element, pixel-identical at every width, and every other page
|
|
305
|
-
* and the footer get it by naming the column instead of re-deriving it.
|
|
306
|
-
*/
|
|
307
72
|
'layout-column-site': {
|
|
308
73
|
'margin-inline': 'auto',
|
|
309
74
|
width: '100%',
|
|
310
75
|
'max-width': 'min(var(--layout-measure-site), 100% - 2 * var(--layout-boundary-inline))'
|
|
311
76
|
},
|
|
312
77
|
|
|
313
|
-
/*
|
|
314
|
-
* The control side of an item-group field row: the same geometry every settings row
|
|
315
|
-
* hand-repeated, with the cap coming from --layout-measure-control so a band retunes
|
|
316
|
-
* all of its rows at once.
|
|
317
|
-
*
|
|
318
|
-
* `flex-1` + `justify-end` rather than a fixed width: the row stays two-column at
|
|
319
|
-
* every viewport (the control side yields to a long field name instead of wrapping),
|
|
320
|
-
* and controls inside still pass `w-full` to fill the cap.
|
|
321
|
-
*
|
|
322
|
-
* THE `:not(#\#)` IS LOAD-BEARING, and it is the one place in this file that needs a
|
|
323
|
-
* specificity hack. This class is applied to a component whose own root already
|
|
324
|
-
* carries `shrink-0`, and Vue merges both class lists onto one element. As plain
|
|
325
|
-
* unlayered CSS this rule won this tie; as an `@utility` it sorts BEFORE the core
|
|
326
|
-
* utilities, so `shrink-0` would win and the control side could no longer yield to a
|
|
327
|
-
* long field name. `#\#` is an id no element can carry, so the selector always
|
|
328
|
-
* matches while reading (1,1,0) — Tailwind's own important-strategy idiom. It stays
|
|
329
|
-
* variant-safe (`.md\:layout-field-control:not(#\#)`), unlike an `&:is(…)` bump.
|
|
330
|
-
* Applied to this utility ONLY: the other eight have no live conflict, and the hack
|
|
331
|
-
* would needlessly outrank legitimate consumer overrides.
|
|
332
|
-
*/
|
|
333
78
|
'layout-field-control': {
|
|
334
79
|
'&:not(#\\#)': {
|
|
335
80
|
display: 'flex',
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative spacing tokens (mobile-first).
|
|
3
|
-
*
|
|
4
|
-
* Each value maps to two utilities: `.gap-<key>` and `.p-<key>`, both backed
|
|
5
|
-
* by the same CSS variable. Values ported from `spacings.js`.
|
|
6
|
-
*/
|
|
7
1
|
export const spacingsData: {
|
|
8
2
|
'spacing-xxl': {
|
|
9
3
|
_: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacings.data.d.ts","sourceRoot":"","sources":["spacings.data.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"spacings.data.d.ts","sourceRoot":"","sources":["spacings.data.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative spacing tokens (mobile-first).
|
|
3
|
-
*
|
|
4
|
-
* Each value maps to two utilities: `.gap-<key>` and `.p-<key>`, both backed
|
|
5
|
-
* by the same CSS variable. Values ported from `spacings.js`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
export const spacingsData = {
|
|
9
2
|
'spacing-xxl': { _: '2rem', sm: '4rem', xl: '6rem' },
|
|
10
3
|
'spacing-xl': { _: '1.5rem', sm: '2rem', xl: '3rem' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texts.data.d.ts","sourceRoot":"","sources":["texts.data.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"texts.data.d.ts","sourceRoot":"","sources":["texts.data.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+OC"}
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative text style tokens (mobile-first).
|
|
3
|
-
*
|
|
4
|
-
* Each entry is a bundle of CSS properties; each property is either a string
|
|
5
|
-
* (static) or a breakpoint map `{ _, sm, md, lg, xl, 2xl }`. Values ported
|
|
6
|
-
* from the legacy `texts.js` plugin — direction inverted from desktop-first
|
|
7
|
-
* (max-width) to mobile-first (min-width).
|
|
8
|
-
*
|
|
9
|
-
* Optional `states` emits pseudo-class rules (e.g. `.text-link:hover`). Bundles
|
|
10
|
-
* with `fontSize: 'inherit'` are omitted from the Tailwind `fontSize` preset.
|
|
11
|
-
*
|
|
12
|
-
* `textWrapStyle` — the LONGHAND, never the `textWrap` shorthand. `text-wrap: pretty`
|
|
13
|
-
* is `text-wrap-mode: wrap` + `text-wrap-style: pretty`, so a typography utility
|
|
14
|
-
* written that way does not just choose how lines break: it decides THAT the text
|
|
15
|
-
* wraps, and it beats `truncate` / `whitespace-nowrap` on the same element (equal
|
|
16
|
-
* specificity, and this utility sorts later). Every `truncate text-body-sm` in the
|
|
17
|
-
* codebase therefore wrapped to two lines with an ellipsis that never appeared —
|
|
18
|
-
* measurably, table rows grew from 48px to 56px wherever a cell's text was longer
|
|
19
|
-
* than its column. The longhand keeps the balance/pretty intent and leaves wrapping
|
|
20
|
-
* to whoever owns the element.
|
|
21
|
-
*
|
|
22
|
-
* Mapping used during the port:
|
|
23
|
-
* old `large` (≤640) → `_`
|
|
24
|
-
* old `medium` (≤768) → `sm` (≥640)
|
|
25
|
-
* old `mobile` (default, applied >768) → `md` (≥768)
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
1
|
import { curve, duration } from '../primitives/animations/animate.js'
|
|
29
2
|
import { fontFamily } from '../primitives/typography/font-family.js'
|
|
30
3
|
import { fontSize } from '../primitives/typography/font-size.js'
|
|
@@ -51,26 +24,6 @@ export const textsData = {
|
|
|
51
24
|
fontWeight: fontWeight.normal,
|
|
52
25
|
fontFamily: fontFamily.display
|
|
53
26
|
},
|
|
54
|
-
// ── The amount ladder (Currency) ─────────────────────────────────────────
|
|
55
|
-
//
|
|
56
|
-
// The three sizes `Currency` typesets a monetary amount at, one per reading
|
|
57
|
-
// distance: `sm` inside a table row or list cell, `md` an amount stated as a fact on
|
|
58
|
-
// a card, `lg` the headline figure of a pricing card. Each MIRRORS the heading/label
|
|
59
|
-
// token it used to borrow (`text-label-lg`, `text-heading-md`, `text-heading-3xl`) —
|
|
60
|
-
// same size ramp, same leading, same weight — and adds the one thing that made
|
|
61
|
-
// borrowing wrong: the amount's negative tracking.
|
|
62
|
-
//
|
|
63
|
-
// `-0.08em` is PROPORTIONAL, and deliberately so, which is why it lives here and not
|
|
64
|
-
// in `tracking.js`. That scale is absolute (`rem`) on purpose so a step resolves to a
|
|
65
|
-
// fixed measure at any font size (see its docstring), and it therefore holds no
|
|
66
|
-
// `-0.08em`-equivalent step. A figure is the one place where the tracking has to
|
|
67
|
-
// scale WITH the glyphs: the Figma amount specifies −1.28px @16px, −1.92px @24px and
|
|
68
|
-
// −4.48px @56px, which is one ratio, not three steps. Expressing it as `em` is what
|
|
69
|
-
// makes a single declaration correct at all three sizes and at every breakpoint of
|
|
70
|
-
// `lg`'s responsive ramp.
|
|
71
|
-
//
|
|
72
|
-
// Dedicated tokens rather than tracking added to the borrowed ones: `text-heading-3xl`
|
|
73
|
-
// sets every hero headline in the system, and a hero is prose, not a numeral.
|
|
74
27
|
'text-amount-lg': {
|
|
75
28
|
textWrapStyle: 'balance',
|
|
76
29
|
fontSize: { _: fontSize['3xl'], sm: fontSize['5xl'], md: fontSize['6xl'] },
|
|
@@ -274,7 +227,6 @@ export const textsData = {
|
|
|
274
227
|
lineHeight: leading.tight,
|
|
275
228
|
letterSpacing: tracking.normal
|
|
276
229
|
},
|
|
277
|
-
/** Inline `<a>` in body/heading — inherits parent size; not the navigation Link component. */
|
|
278
230
|
'text-link': {
|
|
279
231
|
fontSize: 'inherit',
|
|
280
232
|
lineHeight: 'inherit',
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative z-index tokens.
|
|
3
|
-
*
|
|
4
|
-
* Intra-input stacking:
|
|
5
|
-
*
|
|
6
|
-
* - `z-input-field` → native field / interactive foreground (e.g. an
|
|
7
|
-
* `<input>` or trigger button) sitting above the
|
|
8
|
-
* input's own background surface, icons, and
|
|
9
|
-
* adornments so keyboard/mouse focus is never
|
|
10
|
-
* hijacked by a decorative sibling.
|
|
11
|
-
* - `z-input-popup` → inline (non-teleported) overlays anchored to the
|
|
12
|
-
* input — dropdown menus, option lists, popovers —
|
|
13
|
-
* that must sit above surrounding form content but
|
|
14
|
-
* within the current stacking context.
|
|
15
|
-
* - `z-input-overlay` → teleported overlays (rendered under `<body>` via
|
|
16
|
-
* `<Teleport>`) that must clear application chrome
|
|
17
|
-
* such as drawers, modals, and fixed headers.
|
|
18
|
-
*
|
|
19
|
-
* Values are intentionally small and well-spaced to make future additions
|
|
20
|
-
* obvious. Consume as `z-(--z-input-*)` in components — do not
|
|
21
|
-
* introduce ad-hoc numeric z-index in input `.vue` files.
|
|
22
|
-
*/
|
|
23
1
|
export const zIndicesData: {
|
|
24
2
|
'z-input-field': {
|
|
25
3
|
_: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z-indices.data.d.ts","sourceRoot":"","sources":["z-indices.data.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"z-indices.data.d.ts","sourceRoot":"","sources":["z-indices.data.js"],"names":[],"mappings":"AAAA;;;;;;;;;;EAIE"}
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative z-index tokens.
|
|
3
|
-
*
|
|
4
|
-
* Intra-input stacking:
|
|
5
|
-
*
|
|
6
|
-
* - `z-input-field` → native field / interactive foreground (e.g. an
|
|
7
|
-
* `<input>` or trigger button) sitting above the
|
|
8
|
-
* input's own background surface, icons, and
|
|
9
|
-
* adornments so keyboard/mouse focus is never
|
|
10
|
-
* hijacked by a decorative sibling.
|
|
11
|
-
* - `z-input-popup` → inline (non-teleported) overlays anchored to the
|
|
12
|
-
* input — dropdown menus, option lists, popovers —
|
|
13
|
-
* that must sit above surrounding form content but
|
|
14
|
-
* within the current stacking context.
|
|
15
|
-
* - `z-input-overlay` → teleported overlays (rendered under `<body>` via
|
|
16
|
-
* `<Teleport>`) that must clear application chrome
|
|
17
|
-
* such as drawers, modals, and fixed headers.
|
|
18
|
-
*
|
|
19
|
-
* Values are intentionally small and well-spaced to make future additions
|
|
20
|
-
* obvious. Consume as `z-(--z-input-*)` in components — do not
|
|
21
|
-
* introduce ad-hoc numeric z-index in input `.vue` files.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
1
|
export const zIndicesData = {
|
|
25
2
|
'z-input-field': { _: '1' },
|
|
26
3
|
'z-input-popup': { _: '10' },
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { tokenRef } from '../../scripts/refs.js'
|
|
2
2
|
|
|
3
|
-
// The accent family points at the BLUE primitive ramp (`primitives.blue`, the
|
|
4
|
-
// #0072F5 hue). These values mirror the Figma Theme collection's `accent/*`
|
|
5
|
-
// variables 1-to-1 — Figma is the source of truth, and it already aliases its
|
|
6
|
-
// whole `colors/brand/accent/accent-*` ramp onto `colors/blue/*` (it carries no
|
|
7
|
-
// violet primitives at all). The violet mapping this replaces existed only here.
|
|
8
|
-
//
|
|
9
|
-
// Accent is MODE-INVARIANT, exactly as Figma declares it: Light and Dark resolve
|
|
10
|
-
// to the same values. `accent-contrast` stays black — black on blue-500 is
|
|
11
|
-
// 4.73:1, clearing WCAG AA on the filled accent surface.
|
|
12
|
-
//
|
|
13
|
-
// `brand.accent` still holds violet values in code and ships as
|
|
14
|
-
// `--color-brand-accent-*`; only the semantic `--accent*` group turns blue here.
|
|
15
3
|
export const accent = {
|
|
16
4
|
light: {
|
|
17
5
|
accent: tokenRef('primitives.blue.500'),
|
|
@@ -24,11 +24,6 @@ export const background = {
|
|
|
24
24
|
'bg-surface-overlay': tokenRef('theme.surfaces.surface-700'),
|
|
25
25
|
'bg-placeholder': tokenRef('primitives.alpha.white.100'),
|
|
26
26
|
'bg-placeholder-highlight': tokenRef('primitives.alpha.white.100'),
|
|
27
|
-
// Interaction overlays LIGHTEN in dark. A black alpha over a dark surface is invisible
|
|
28
|
-
// (and a literal no-op over `bg-canvas`, which is pure black), so hover/active follow the
|
|
29
|
-
// same polarity flip `bg-mask` / `bg-placeholder` / `border-default` already make here.
|
|
30
|
-
// `active` stacks on top of `hover` (the row paints both layers while pressed), so it is
|
|
31
|
-
// the smaller increment, mirroring light's 8% + 2%.
|
|
32
27
|
'bg-hover': tokenRef('primitives.alpha.white.100'),
|
|
33
28
|
'bg-active': tokenRef('primitives.alpha.white.50'),
|
|
34
29
|
'bg-backdrop': tokenRef('primitives.alpha.black.800'),
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
import { tokenRef } from '../../scripts/refs.js'
|
|
2
2
|
|
|
3
|
-
// The neutral rules are OPAQUE steps of the surface palette, not alpha.
|
|
4
|
-
//
|
|
5
|
-
// They used to be `alpha.black.100` / `alpha.white.100` / `alpha.white.50`, which meant one
|
|
6
|
-
// token painted a different colour on every backdrop — the same hairline read four different
|
|
7
|
-
// ways across canvas / surface / raised / overlay — and two rules meeting composited into a
|
|
8
|
-
// brighter line, so any stacked or abutting border doubled. An opaque step gives a rule one
|
|
9
|
-
// identity wherever it is drawn, and makes overlap a no-op.
|
|
10
|
-
//
|
|
11
|
-
// The steps are ones added to fill the ramp's gaps (`gray.150` / `gray.275` / `gray.750` /
|
|
12
|
-
// `gray.775`), NOT the steps that bracket them — `surface-200` (light) and `surface-800` (dark)
|
|
13
|
-
// are what `--bg-selected` and `--bg-disabled` already use, so a border drawn there is exactly
|
|
14
|
-
// its own fill and vanishes. Every pairing a component can produce now clears zero:
|
|
15
|
-
// light default surface-275 vs canvas 36 · surface 46 · selected/disabled 20
|
|
16
|
-
// light muted surface-150 vs canvas 9 · surface 19 · selected/disabled 7
|
|
17
|
-
// dark default surface-750 vs canvas 43 · surface 33 · raised 23 · selected 17
|
|
18
|
-
// dark muted surface-775 vs canvas 36 · surface 26 · raised 16 · selected 10
|
|
19
|
-
//
|
|
20
|
-
// `muted` sits closer to the background than `default` in BOTH themes — lighter in light,
|
|
21
|
-
// darker in dark. It is a subtler rule, not a second default; it is drawn on `--bg-surface` /
|
|
22
|
-
// `--bg-canvas` (the segmented-button track, the tab-view list, a flow node), never on a
|
|
23
|
-
// selected or disabled fill, which is what lets the light step go as light as it does. Dark
|
|
24
|
-
// cannot go proportionally as subtle: `--bg-surface-raised` sits at 20 and would swallow it.
|
|
25
3
|
export const border = {
|
|
26
4
|
light: {
|
|
27
5
|
'border-default': tokenRef('theme.surfaces.surface-275'),
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { tokenRef } from '../../scripts/refs.js'
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Syntax-highlighting colors for code editors (Figma: code-sintax).
|
|
5
|
-
* Dark values match variable set 77:502 in Webkit Figma.
|
|
6
|
-
*/
|
|
7
3
|
export const codeSintax = {
|
|
8
4
|
light: {
|
|
9
5
|
'code-sintax-identifier': tokenRef('primitives.gray.900'),
|
package/src/tokens/theme/text.js
CHANGED
|
@@ -11,7 +11,7 @@ export const text = {
|
|
|
11
11
|
},
|
|
12
12
|
dark: {
|
|
13
13
|
'text-default': tokenRef('primitives.gray.50'),
|
|
14
|
-
'text-muted': tokenRef('primitives.gray.
|
|
14
|
+
'text-muted': tokenRef('primitives.gray.400'),
|
|
15
15
|
'text-disabled': tokenRef('primitives.gray.700'),
|
|
16
16
|
'text-link': tokenRef('primitives.blue.400'),
|
|
17
17
|
'text-link-hover': tokenRef('primitives.blue.300'),
|