@oneli8/core 1.0.0-beta.4 → 1.0.0-beta.5
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/README.md +33 -7
- package/ai-context.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @oneli8/core
|
|
2
2
|
|
|
3
|
-
OneLi8 Design System
|
|
3
|
+
OneLi8 Design System, framework agnostic components.
|
|
4
4
|
|
|
5
5
|
Every component is two functions: `renderX(...)` returns an HTML **string**, and
|
|
6
6
|
`hydrateX(root)` enforces the runtime contract on markup that already exists.
|
|
@@ -29,23 +29,49 @@ hydrateButtons();
|
|
|
29
29
|
| Atom | `Icon`, `Selection Indicator` (checkbox, radio, switch) |
|
|
30
30
|
| Molecule | `Button`, `Icon Button`, `Choice Item`, `Selection Option` |
|
|
31
31
|
| Organism | `Choice Group` (checkbox hierarchy, radio group) |
|
|
32
|
-
| Material | `Gem
|
|
32
|
+
| Material | `Gem`, an attribute adapter, not a tier |
|
|
33
33
|
|
|
34
34
|
Anything not listed is not exported. Tokens exist for component families whose
|
|
35
35
|
implementations are not in this release; a token is not a promise of a component.
|
|
36
36
|
|
|
37
|
+
## Why this exists
|
|
38
|
+
|
|
39
|
+
OneLi8 means One Light. It was created by Akshay Dhore, intended for broad human
|
|
40
|
+
benefit and conceived as service to Guruji Shrii Arnav, whose teachings inspire
|
|
41
|
+
it. Service, clarity, harmony, proportion, restraint and evolution guide its
|
|
42
|
+
decisions. `PRINCIPLES.md` ships inside this package and sets them out in full.
|
|
43
|
+
|
|
44
|
+
The practical intention: most design systems hand you components and hope you
|
|
45
|
+
stay inside them. This one hands you the reasoning too, so when you need
|
|
46
|
+
something it does not ship you can build it and have it still belong.
|
|
47
|
+
|
|
48
|
+
## Naming
|
|
49
|
+
|
|
50
|
+
The structure is borrowed from Sanskrit grammar rather than a CSS convention.
|
|
51
|
+
|
|
52
|
+
**A compound naming one thing is one word.** `actionprimary` is not action plus
|
|
53
|
+
primary, it is a single role. `cutedge` is one feature of the Gem material.
|
|
54
|
+
|
|
55
|
+
**A qualifier stays separate from what it qualifies.** In
|
|
56
|
+
`--ol8-material-control-gem--primary-hover-start`, `hover` is a state applied to
|
|
57
|
+
`start`, so it keeps its hyphen. That is why `disabledcontent` is joined and
|
|
58
|
+
`hover-start` is not.
|
|
59
|
+
|
|
60
|
+
Hyphens separate levels of the hierarchy, never words inside a level. The words
|
|
61
|
+
themselves stay readable: no abbreviations and no truncation.
|
|
62
|
+
|
|
37
63
|
## Rendering and hydration
|
|
38
64
|
|
|
39
65
|
`render*` covers everything expressible in markup. `hydrate*` exists only for
|
|
40
66
|
what markup genuinely cannot express:
|
|
41
67
|
|
|
42
|
-
- `indeterminate` on a checkbox is a JavaScript
|
|
68
|
+
- `indeterminate` on a checkbox is a JavaScript only property, so Mixed needs
|
|
43
69
|
hydration and every other state does not.
|
|
44
70
|
- A `<button>` without an explicit `type` submits its form. Hydration pins it.
|
|
45
71
|
- Links cannot be natively disabled, so they get `aria-disabled` and their
|
|
46
72
|
activation is swallowed.
|
|
47
73
|
|
|
48
|
-
Hydration is idempotent
|
|
74
|
+
Hydration is idempotent, running it twice changes nothing.
|
|
49
75
|
|
|
50
76
|
## Styles
|
|
51
77
|
|
|
@@ -57,7 +83,7 @@ import '@oneli8/tokens/css';
|
|
|
57
83
|
import '@oneli8/core/styles/button.css';
|
|
58
84
|
```
|
|
59
85
|
|
|
60
|
-
Tokens must always come first
|
|
86
|
+
Tokens must always come first, every component rule reads them.
|
|
61
87
|
|
|
62
88
|
## Accessibility is enforced, not suggested
|
|
63
89
|
|
|
@@ -66,11 +92,11 @@ Tokens must always come first — every component rule reads them.
|
|
|
66
92
|
Primary and Secondary only. These are errors rather than review comments on
|
|
67
93
|
purpose.
|
|
68
94
|
|
|
69
|
-
Test Gem against its real backdrop.
|
|
95
|
+
Test Gem against its real backdrop. Content close to white content alone does not guarantee
|
|
70
96
|
readable contrast.
|
|
71
97
|
|
|
72
98
|
## Licence
|
|
73
99
|
|
|
74
|
-
Apache
|
|
100
|
+
Apache 2.0. Created by Akshay Dhore. See `LICENSE` and `NOTICE`; preserve the
|
|
75
101
|
attribution notices when redistributing. This does not require a visible badge
|
|
76
102
|
in your product, and implies no OneLi8 endorsement.
|
package/ai-context.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneli8/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
4
|
"description": "OneLi8 Design System, framework agnostic. renderX returns an HTML string, hydrateX wires existing DOM. Ships the design language and the rules it follows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"NOTICE"
|
|
75
75
|
],
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@oneli8/tokens": "1.0.0-beta.
|
|
77
|
+
"@oneli8/tokens": "1.0.0-beta.5"
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">=20"
|