@adminiumjs/tokens 0.1.2 → 0.2.2-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pre-hydration.d.ts.map +1 -1
- package/dist/pre-hydration.js +5 -1
- package/dist/pre-hydration.js.map +1 -1
- package/package.json +1 -1
- package/src/density.css +19 -2
- package/src/index.ts +1 -0
- package/src/motion.css +15 -0
- package/src/pre-hydration.ts +5 -1
- package/src/tailwind.css +14 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,sFAAsF;AACtF,eAAO,MAAM,MAAM,sCAAuC,CAAC;AAC3D,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAChD,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;CASf,CAAC;AAEX,+BAA+B;AAC/B,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,OAAO,CAAC;AAE1C,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,CAEtE;AAED,qCAAqC;AACrC,eAAO,MAAM,SAAS,qCAAsC,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,4EAA4E;AAC5E,eAAO,MAAM,IAAI,yBAA0B,CAAC;AAC5C,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAExC,mFAAmF;AACnF,eAAO,MAAM,WAAW,mGASd,CAAC;AAEX,uEAAuE;AACvE,eAAO,MAAM,eAAe,4CAA6C,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAK3D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACR,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACR,CAAC;AAKX,4DA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CACD,CAAC;AAEX,uEAAuE;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAU,CAAC;AAE1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;IACvB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,iBAAiB;IACzB,OAAO,EAAE,kBAAkB;IAC3B,MAAM,EAAE,iBAAiB;IACzB,GAAG,EAAE,cAAc;CACX,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,aAAa;IACtB,MAAM,EAAE,OAAO;CACP,CAAC;AAEX,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pre-hydration.d.ts","sourceRoot":"","sources":["../src/pre-hydration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pre-hydration.d.ts","sourceRoot":"","sources":["../src/pre-hydration.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,QAauC,CAAC"}
|
package/dist/pre-hydration.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
1
2
|
/**
|
|
2
3
|
* Pre-hydration script — flash prevention. See 02-design-system.md §4.3.
|
|
3
4
|
*
|
|
@@ -20,5 +21,8 @@ export const preHydrationScript = '(function(){try{var d=document.documentElemen
|
|
|
20
21
|
'var r=s.getItem("adminium-dir");' +
|
|
21
22
|
'if(r==="rtl")d.setAttribute("dir","rtl");' +
|
|
22
23
|
'var l=s.getItem("adminium-locale");' +
|
|
23
|
-
|
|
24
|
+
// split/join, not replace: `replace("_","-")` swaps only the FIRST
|
|
25
|
+
// underscore, so a three-subtag id like `zh_Hant_TW` would stamp the invalid
|
|
26
|
+
// tag `zh-Hant_TW` (23 §5.5).
|
|
27
|
+
'if(l)d.setAttribute("lang",l.split("_").join("-"))}catch(e){}})();';
|
|
24
28
|
//# sourceMappingURL=pre-hydration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pre-hydration.js","sourceRoot":"","sources":["../src/pre-hydration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,gEAAgE;IAChE,8CAA8C;IAC9C,sFAAsF;IACtF,iCAAiC;IACjC,uEAAuE;IACvE,8EAA8E;IAC9E,kCAAkC;IAClC,2CAA2C;IAC3C,qCAAqC;IACrC,
|
|
1
|
+
{"version":3,"file":"pre-hydration.js","sourceRoot":"","sources":["../src/pre-hydration.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,gEAAgE;IAChE,8CAA8C;IAC9C,sFAAsF;IACtF,iCAAiC;IACjC,uEAAuE;IACvE,8EAA8E;IAC9E,kCAAkC;IAClC,2CAA2C;IAC3C,qCAAqC;IACrC,mEAAmE;IACnE,6EAA6E;IAC7E,8BAA8B;IAC9B,oEAAoE,CAAC"}
|
package/package.json
CHANGED
package/src/density.css
CHANGED
|
@@ -5,12 +5,29 @@
|
|
|
5
5
|
--row-py: 13px;
|
|
6
6
|
--cell-fs: 13px;
|
|
7
7
|
--card-pad: 20px;
|
|
8
|
-
|
|
8
|
+
/* Widget cards run tighter than a generic Card: every `.nb-card` in the
|
|
9
|
+
Analytics comp is a flat 18px box, where --card-pad's 20px is the comp's
|
|
10
|
+
HERO tier. Kept separate so the two can't drift into one number — and so
|
|
11
|
+
the opt-in `bleed` config flag has exactly one knob to zero out. */
|
|
12
|
+
--widget-pad: 18px;
|
|
13
|
+
/* The one page gutter. Split into axes because the page-padding choice an
|
|
14
|
+
admin makes in Studio is an x/y pair, and a shorthand cannot be overridden
|
|
15
|
+
one axis at a time. The shorthand stays derived so `p-[var(--main-pad)]`
|
|
16
|
+
call sites keep working. Bottom is no longer a third, larger value: a
|
|
17
|
+
40px floor under a 24px ceiling read as a mistake on every short page. */
|
|
18
|
+
--main-pad-x: 28px;
|
|
19
|
+
--main-pad-y: 24px;
|
|
20
|
+
--main-pad: var(--main-pad-y) var(--main-pad-x);
|
|
9
21
|
}
|
|
10
22
|
|
|
11
23
|
[data-density="compact"] {
|
|
12
24
|
--row-py: 7px;
|
|
13
25
|
--cell-fs: 12px;
|
|
14
26
|
--card-pad: 16px;
|
|
15
|
-
|
|
27
|
+
/* The comp has no compact mode; 14px keeps the comfortable→compact ratio the
|
|
28
|
+
hand-rolled `px-4 → compact:px-3` pair used before the token existed. */
|
|
29
|
+
--widget-pad: 14px;
|
|
30
|
+
--main-pad-x: 20px;
|
|
31
|
+
--main-pad-y: 16px;
|
|
32
|
+
--main-pad: var(--main-pad-y) var(--main-pad-x);
|
|
16
33
|
}
|
package/src/index.ts
CHANGED
package/src/motion.css
CHANGED
|
@@ -84,6 +84,21 @@
|
|
|
84
84
|
border-color: var(--border-strong);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
/* card hover bloom: shadow only, NO lift. Distinct from .nb-lift on purpose —
|
|
88
|
+
a dashboard is ~40 cards, and translating each one on mouseover reads as
|
|
89
|
+
noise. Matches the comp's `.nb-card:hover` (Analytics.dc.html lines 32-33).
|
|
90
|
+
The dark value has no comp counterpart (the comp's dark block never restates
|
|
91
|
+
it); it is the light recipe re-tuned for a #141419 surface. */
|
|
92
|
+
.nb-cardh {
|
|
93
|
+
transition: box-shadow .16s ease, border-color .16s ease;
|
|
94
|
+
}
|
|
95
|
+
.nb-cardh:hover {
|
|
96
|
+
box-shadow: 0 6px 18px -10px rgba(20, 20, 35, .24);
|
|
97
|
+
}
|
|
98
|
+
[data-theme="dark"] .nb-cardh:hover {
|
|
99
|
+
box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6);
|
|
100
|
+
}
|
|
101
|
+
|
|
87
102
|
/* button press: hover brighten, active shrink */
|
|
88
103
|
.nb-press {
|
|
89
104
|
transition: transform .12s ease, filter .12s ease;
|
package/src/pre-hydration.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
1
2
|
/**
|
|
2
3
|
* Pre-hydration script — flash prevention. See 02-design-system.md §4.3.
|
|
3
4
|
*
|
|
@@ -21,4 +22,7 @@ export const preHydrationScript =
|
|
|
21
22
|
'var r=s.getItem("adminium-dir");' +
|
|
22
23
|
'if(r==="rtl")d.setAttribute("dir","rtl");' +
|
|
23
24
|
'var l=s.getItem("adminium-locale");' +
|
|
24
|
-
|
|
25
|
+
// split/join, not replace: `replace("_","-")` swaps only the FIRST
|
|
26
|
+
// underscore, so a three-subtag id like `zh_Hant_TW` would stamp the invalid
|
|
27
|
+
// tag `zh-Hant_TW` (23 §5.5).
|
|
28
|
+
'if(l)d.setAttribute("lang",l.split("_").join("-"))}catch(e){}})();';
|
package/src/tailwind.css
CHANGED
|
@@ -51,6 +51,11 @@
|
|
|
51
51
|
--text-title: 20px; --text-title--font-weight: 800; --text-title--letter-spacing: -0.02em;
|
|
52
52
|
--text-modal: 16.5px; --text-modal--font-weight: 800;
|
|
53
53
|
--text-section: 14.5px; --text-section--font-weight: 700; --text-section--letter-spacing: -0.01em;
|
|
54
|
+
/* Widget-card and topbar headings. Neither can reuse --text-section: the comp's
|
|
55
|
+
card title carries NO tracking (14px/700 flat) and its topbar h1 is a full
|
|
56
|
+
tier larger and heavier (18px/800/-0.02em). */
|
|
57
|
+
--text-card-title: 14px; --text-card-title--font-weight: 700;
|
|
58
|
+
--text-topbar-title: 18px; --text-topbar-title--font-weight: 800; --text-topbar-title--letter-spacing: -0.02em;
|
|
54
59
|
--text-body: 13px; --text-body--line-height: 1.5;
|
|
55
60
|
--text-body-sm: 12.5px; --text-body-sm--line-height: 1.5;
|
|
56
61
|
--text-caption: 11.5px;
|
|
@@ -59,5 +64,13 @@
|
|
|
59
64
|
/* layout */
|
|
60
65
|
--spacing-sidebar: 256px;
|
|
61
66
|
--container-form: 640px; --container-narrow: 720px; --container-page: 1080px;
|
|
62
|
-
--container-marketing: 1160px; --container-wide: 1200px; --container-max: 1360px;
|
|
67
|
+
--container-marketing: 1160px; --container-wide: 1200px; --container-max: 1360px; --container-widest: 1800px;
|
|
68
|
+
/* The reading column for pages whose content is a short stack of controls
|
|
69
|
+
rather than a grid — import, settings, account. Wide enough for a two-up
|
|
70
|
+
field row, narrow enough that a lone label does not run the full monitor.
|
|
71
|
+
`--container-narrow` (720px) is a text measure and squeezes those rows. */
|
|
72
|
+
--container-content: 900px;
|
|
73
|
+
/* Dashboard column. Deliberately NOT --container-page (1080px), which form and
|
|
74
|
+
settings pages depend on staying narrow. */
|
|
75
|
+
--container-dash: 1320px;
|
|
63
76
|
}
|