@axiapps/axi-design 1.7.0 → 1.8.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/accents.json +13 -0
- package/dist/axi.css +22 -0
- package/docs/RULES.md +9 -0
- package/package.json +15 -5
- package/src/shells.css +22 -0
package/accents.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "id": "axi-gold", "label": "Axi Gold", "hex": "#ffc53d" },
|
|
3
|
+
{ "id": "electric-blue", "label": "Electric Blue", "hex": "#3b82f6" },
|
|
4
|
+
{ "id": "refined-cyan", "label": "Refined Cyan", "hex": "#5eadd5" },
|
|
5
|
+
{ "id": "amber-warm", "label": "Amber Warm", "hex": "#f59e0b" },
|
|
6
|
+
{ "id": "emerald-mint", "label": "Emerald Mint", "hex": "#34d399" },
|
|
7
|
+
{ "id": "rose-pink", "label": "Rose Pink", "hex": "#f43f5e" },
|
|
8
|
+
{ "id": "violet-purple", "label": "Violet Purple", "hex": "#8b5cf6" },
|
|
9
|
+
{ "id": "crimson-red", "label": "Crimson Red", "hex": "#ef4444" },
|
|
10
|
+
{ "id": "slate-silver", "label": "Slate Silver", "hex": "#94a3b8" },
|
|
11
|
+
{ "id": "teal-ocean", "label": "Teal Ocean", "hex": "#14b8a6" },
|
|
12
|
+
{ "id": "gold-bronze", "label": "Gold Bronze", "hex": "#d4a017" }
|
|
13
|
+
]
|
package/dist/axi.css
CHANGED
|
@@ -638,6 +638,28 @@ a { color: inherit; }
|
|
|
638
638
|
.axi-menu__pop label:hover { background: var(--axi-ground); color: var(--axi-text); }
|
|
639
639
|
.axi-menu__pop input { margin: 3px 0 0; accent-color: var(--axi-accent); }
|
|
640
640
|
|
|
641
|
+
/* ---------- tooltip ---------- */
|
|
642
|
+
/* One line of ink on the darkest surface in the language, so it reads over
|
|
643
|
+
anything it lands on. The class draws the box only; coordinates come from
|
|
644
|
+
the consumer's script (measure the trigger, set left/top — gallery.js is
|
|
645
|
+
the reference wiring). Two contracts travel with it: the element is
|
|
646
|
+
appended to <body>, never inside the component it annotates, because
|
|
647
|
+
position: fixed re-anchors to any transformed ancestor and rule 4 makes
|
|
648
|
+
every hovered ancestor transformed; and it never carries information that
|
|
649
|
+
exists nowhere else, because a keyboard or touch user may never see it. */
|
|
650
|
+
.axi-tooltip {
|
|
651
|
+
position: fixed;
|
|
652
|
+
z-index: 99999;
|
|
653
|
+
padding: 5px 8px;
|
|
654
|
+
background: var(--axi-ink-line);
|
|
655
|
+
color: var(--axi-text);
|
|
656
|
+
border: var(--axi-border-hairline) solid var(--axi-rule);
|
|
657
|
+
border-radius: var(--axi-radius-sm);
|
|
658
|
+
font: var(--axi-t-micro);
|
|
659
|
+
white-space: nowrap;
|
|
660
|
+
pointer-events: none;
|
|
661
|
+
}
|
|
662
|
+
|
|
641
663
|
/* ---------- card ---------- */
|
|
642
664
|
.axi-card {
|
|
643
665
|
position: relative; overflow: hidden;
|
package/docs/RULES.md
CHANGED
|
@@ -132,6 +132,15 @@ keeping the control's `translate(-2px, -2px)`.
|
|
|
132
132
|
Nothing in this language fades, glows or pulses. The movement reads in
|
|
133
133
|
peripheral vision and costs no colour.
|
|
134
134
|
|
|
135
|
+
The lift being a transform has one structural consequence: a transformed
|
|
136
|
+
element becomes the containing block for any `position: fixed` descendant.
|
|
137
|
+
An overlay positioned in viewport coordinates — `.axi-tooltip` is the one
|
|
138
|
+
this language ships — must therefore live as a child of `<body>`, never
|
|
139
|
+
inside the component it annotates, or the first hover lift re-anchors it.
|
|
140
|
+
The class draws only the box (ink-line ground, hairline rule border, micro
|
|
141
|
+
type); measuring the trigger and setting `left`/`top` is the consumer's
|
|
142
|
+
half, and `gallery.js` is the reference wiring.
|
|
143
|
+
|
|
135
144
|
Every lift is turned off under `@media (prefers-reduced-motion: reduce)`, in
|
|
136
145
|
`base.css`, once, for every consumer. Resting appearance is untouched: the
|
|
137
146
|
diamond still rotates, because a rotation that never changes is geometry and
|
package/package.json
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiapps/axi-design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "The design language for the axi suite — flat and outlined, dark, drawn in saturated ink.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "darkharasho",
|
|
8
|
-
"repository": {
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/darkharasho/axi-design.git"
|
|
11
|
+
},
|
|
9
12
|
"homepage": "https://darkharasho.github.io/axi-design/",
|
|
10
|
-
"engines": {
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22"
|
|
15
|
+
},
|
|
11
16
|
"//publishConfig": "A scoped package defaults to a restricted publish, and a restricted design language is no use to the apps that consume it. Pinned here rather than passed as --access public on the command line, so it cannot be forgotten on a later release.",
|
|
12
|
-
"publishConfig": {
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
13
20
|
"//exports": "Two entry points, and both are stylesheets. Consumers import the path rather than the package root because there is no JavaScript here to be a default export - `import '@axiapps/axi-design/axi.css'` says what it does, and a bare `import '@axiapps/axi-design'` resolving to a stylesheet would not. ./tokens.css is the palette without the components, for an app that already draws its own components through its own variables and wants to point them at ours: it is the whole language for a consumer like that, and copying the token block by hand is the one way those values are guaranteed to drift.",
|
|
14
21
|
"exports": {
|
|
15
22
|
"./axi.css": "./dist/axi.css",
|
|
@@ -27,11 +34,14 @@
|
|
|
27
34
|
"dist",
|
|
28
35
|
"src",
|
|
29
36
|
"docs",
|
|
37
|
+
"accents.json",
|
|
30
38
|
"README.md"
|
|
31
39
|
],
|
|
32
40
|
"scripts": {
|
|
33
41
|
"build": "node scripts/build.mjs",
|
|
34
42
|
"test": "vitest run"
|
|
35
43
|
},
|
|
36
|
-
"devDependencies": {
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"vitest": "^2.1.0"
|
|
46
|
+
}
|
|
37
47
|
}
|
package/src/shells.css
CHANGED
|
@@ -120,6 +120,28 @@
|
|
|
120
120
|
.axi-menu__pop label:hover { background: var(--axi-ground); color: var(--axi-text); }
|
|
121
121
|
.axi-menu__pop input { margin: 3px 0 0; accent-color: var(--axi-accent); }
|
|
122
122
|
|
|
123
|
+
/* ---------- tooltip ---------- */
|
|
124
|
+
/* One line of ink on the darkest surface in the language, so it reads over
|
|
125
|
+
anything it lands on. The class draws the box only; coordinates come from
|
|
126
|
+
the consumer's script (measure the trigger, set left/top — gallery.js is
|
|
127
|
+
the reference wiring). Two contracts travel with it: the element is
|
|
128
|
+
appended to <body>, never inside the component it annotates, because
|
|
129
|
+
position: fixed re-anchors to any transformed ancestor and rule 4 makes
|
|
130
|
+
every hovered ancestor transformed; and it never carries information that
|
|
131
|
+
exists nowhere else, because a keyboard or touch user may never see it. */
|
|
132
|
+
.axi-tooltip {
|
|
133
|
+
position: fixed;
|
|
134
|
+
z-index: 99999;
|
|
135
|
+
padding: 5px 8px;
|
|
136
|
+
background: var(--axi-ink-line);
|
|
137
|
+
color: var(--axi-text);
|
|
138
|
+
border: var(--axi-border-hairline) solid var(--axi-rule);
|
|
139
|
+
border-radius: var(--axi-radius-sm);
|
|
140
|
+
font: var(--axi-t-micro);
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
pointer-events: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
123
145
|
/* ---------- card ---------- */
|
|
124
146
|
.axi-card {
|
|
125
147
|
position: relative; overflow: hidden;
|