@oneli8/core 1.0.0-beta.10

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.
Files changed (125) hide show
  1. package/AGENTS.md +16 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +8 -0
  4. package/PRINCIPLES.md +48 -0
  5. package/README.md +130 -0
  6. package/ai-context.json +348 -0
  7. package/package.json +100 -0
  8. package/skills/oneli8-figma-to-code/SKILL.md +25 -0
  9. package/skills/oneli8-icons/SKILL.md +36 -0
  10. package/skills/oneli8-ui/SKILL.md +52 -0
  11. package/src/atoms/icon/icon.css +54 -0
  12. package/src/atoms/icon/icon.d.ts +19 -0
  13. package/src/atoms/icon/icon.js +81 -0
  14. package/src/atoms/icon/icons.generated.d.ts +48 -0
  15. package/src/atoms/icon/icons.generated.js +562 -0
  16. package/src/atoms/icon/index.d.ts +2 -0
  17. package/src/atoms/icon/index.js +2 -0
  18. package/src/atoms/index.d.ts +3 -0
  19. package/src/atoms/index.js +3 -0
  20. package/src/atoms/navigation-badge/index.d.ts +1 -0
  21. package/src/atoms/navigation-badge/index.js +1 -0
  22. package/src/atoms/navigation-badge/navigation-badge.css +35 -0
  23. package/src/atoms/navigation-badge/navigation-badge.d.ts +5 -0
  24. package/src/atoms/navigation-badge/navigation-badge.js +21 -0
  25. package/src/atoms/selection-indicator/index.d.ts +1 -0
  26. package/src/atoms/selection-indicator/index.js +1 -0
  27. package/src/atoms/selection-indicator/selection-indicator.css +160 -0
  28. package/src/atoms/selection-indicator/selection-indicator.d.ts +36 -0
  29. package/src/atoms/selection-indicator/selection-indicator.js +61 -0
  30. package/src/index.d.ts +3 -0
  31. package/src/index.js +3 -0
  32. package/src/materials/gem/gem.css +374 -0
  33. package/src/molecules/button/button.css +193 -0
  34. package/src/molecules/button/button.d.ts +51 -0
  35. package/src/molecules/button/button.js +134 -0
  36. package/src/molecules/button/index.d.ts +1 -0
  37. package/src/molecules/button/index.js +1 -0
  38. package/src/molecules/choice-chip/choice-chip.css +214 -0
  39. package/src/molecules/choice-chip/choice-chip.d.ts +27 -0
  40. package/src/molecules/choice-chip/choice-chip.js +170 -0
  41. package/src/molecules/choice-chip/index.d.ts +2 -0
  42. package/src/molecules/choice-chip/index.js +10 -0
  43. package/src/molecules/choice-item/choice-item.css +265 -0
  44. package/src/molecules/choice-item/choice-item.d.ts +54 -0
  45. package/src/molecules/choice-item/choice-item.js +153 -0
  46. package/src/molecules/choice-item/index.d.ts +1 -0
  47. package/src/molecules/choice-item/index.js +1 -0
  48. package/src/molecules/form-message/form-message.css +46 -0
  49. package/src/molecules/form-message/form-message.d.ts +23 -0
  50. package/src/molecules/form-message/form-message.js +73 -0
  51. package/src/molecules/form-message/index.d.ts +1 -0
  52. package/src/molecules/form-message/index.js +1 -0
  53. package/src/molecules/icon-button/icon-button.css +222 -0
  54. package/src/molecules/icon-button/icon-button.d.ts +40 -0
  55. package/src/molecules/icon-button/icon-button.js +121 -0
  56. package/src/molecules/icon-button/index.d.ts +1 -0
  57. package/src/molecules/icon-button/index.js +1 -0
  58. package/src/molecules/index.d.ts +10 -0
  59. package/src/molecules/index.js +10 -0
  60. package/src/molecules/link/index.d.ts +1 -0
  61. package/src/molecules/link/index.js +1 -0
  62. package/src/molecules/link/link.css +114 -0
  63. package/src/molecules/link/link.d.ts +27 -0
  64. package/src/molecules/link/link.js +76 -0
  65. package/src/molecules/navigation-item/index.js +1 -0
  66. package/src/molecules/navigation-item/navigation-item.css +153 -0
  67. package/src/molecules/navigation-item/navigation-item.js +95 -0
  68. package/src/molecules/select/index.js +1 -0
  69. package/src/molecules/select/select.css +31 -0
  70. package/src/molecules/select/select.js +127 -0
  71. package/src/molecules/selection-option/index.d.ts +1 -0
  72. package/src/molecules/selection-option/index.js +1 -0
  73. package/src/molecules/selection-option/selection-option.css +121 -0
  74. package/src/molecules/selection-option/selection-option.d.ts +42 -0
  75. package/src/molecules/selection-option/selection-option.js +97 -0
  76. package/src/molecules/text-field/index.d.ts +1 -0
  77. package/src/molecules/text-field/index.js +5 -0
  78. package/src/molecules/text-field/text-field.css +266 -0
  79. package/src/molecules/text-field/text-field.d.ts +69 -0
  80. package/src/molecules/text-field/text-field.js +234 -0
  81. package/src/molecules/token/index.d.ts +2 -0
  82. package/src/molecules/token/index.js +1 -0
  83. package/src/molecules/token/token.css +63 -0
  84. package/src/molecules/token/token.d.ts +35 -0
  85. package/src/molecules/token/token.js +83 -0
  86. package/src/organisms/choice-group/choice-group.css +93 -0
  87. package/src/organisms/choice-group/choice-group.d.ts +80 -0
  88. package/src/organisms/choice-group/choice-group.js +159 -0
  89. package/src/organisms/choice-group/index.d.ts +1 -0
  90. package/src/organisms/choice-group/index.js +1 -0
  91. package/src/organisms/choice-picker/choice-picker.css +98 -0
  92. package/src/organisms/choice-picker/choice-picker.d.ts +62 -0
  93. package/src/organisms/choice-picker/choice-picker.js +201 -0
  94. package/src/organisms/choice-picker/index.d.ts +1 -0
  95. package/src/organisms/choice-picker/index.js +1 -0
  96. package/src/organisms/combobox/combobox.css +40 -0
  97. package/src/organisms/combobox/combobox.js +309 -0
  98. package/src/organisms/combobox/index.js +5 -0
  99. package/src/organisms/index.d.ts +8 -0
  100. package/src/organisms/index.js +8 -0
  101. package/src/organisms/multi-select-field/index.d.ts +1 -0
  102. package/src/organisms/multi-select-field/index.js +1 -0
  103. package/src/organisms/multi-select-field/multi-select-field.css +76 -0
  104. package/src/organisms/multi-select-field/multi-select-field.d.ts +64 -0
  105. package/src/organisms/multi-select-field/multi-select-field.js +317 -0
  106. package/src/organisms/navigation-keys.js +58 -0
  107. package/src/organisms/segmented-control/index.d.ts +1 -0
  108. package/src/organisms/segmented-control/index.js +1 -0
  109. package/src/organisms/segmented-control/segmented-control.css +113 -0
  110. package/src/organisms/segmented-control/segmented-control.d.ts +43 -0
  111. package/src/organisms/segmented-control/segmented-control.js +163 -0
  112. package/src/organisms/selection-popup/index.js +1 -0
  113. package/src/organisms/selection-popup/selection-popup.css +90 -0
  114. package/src/organisms/selection-popup/selection-popup.js +100 -0
  115. package/src/organisms/tab-bar/index.d.ts +1 -0
  116. package/src/organisms/tab-bar/index.js +1 -0
  117. package/src/organisms/tab-bar/tab-bar.css +45 -0
  118. package/src/organisms/tab-bar/tab-bar.d.ts +37 -0
  119. package/src/organisms/tab-bar/tab-bar.js +104 -0
  120. package/src/organisms/tabs/index.d.ts +1 -0
  121. package/src/organisms/tabs/index.js +1 -0
  122. package/src/organisms/tabs/tabs.css +53 -0
  123. package/src/organisms/tabs/tabs.d.ts +48 -0
  124. package/src/organisms/tabs/tabs.js +152 -0
  125. package/styles.css +29 -0
@@ -0,0 +1,348 @@
1
+ {
2
+ "$comment": "GENERATED by packages/sync/src/build-package-context.mjs — do not edit.",
3
+ "system": "OneLi8",
4
+ "version": "1.0.0-beta.10",
5
+ "meaning": "OneLi8 means One Light.",
6
+ "foundations": {
7
+ "package": "@oneli8/tokens",
8
+ "css": "@oneli8/tokens/css",
9
+ "tokenPrefix": "--ol8-",
10
+ "naming": {
11
+ "grammar": "Sanskrit grammar, not a CSS convention. Two rules follow from it and together they explain every name in the system. First, a compound that names ONE thing is written as one word: actionprimary is a single role rather than action plus primary, and cutedge is one feature of the Gem material, so action-primary would suggest two things where there is one. Second, a qualifier stays SEPARATE from what it qualifies: in --ol8-material-control-gem--primary-hover-start, hover is a state applied to start, two grammatical roles, so they stay apart. That is why disabledcontent is joined while hover-start is not. Hyphens separate levels of the hierarchy, never words inside a level. Words stay readable: no abbreviations, no truncation, no btn where button will do.",
12
+ "authority": "Figma is the authority on the result. Every variable there carries an explicit codeSyntax, copied verbatim into packages/tokens/src/figma-code-syntax.txt. Read a name from that record rather than re-deriving it from the grammar, because the file is not perfectly regular between siblings and guessing is how code and design drifted apart before. The grammar is the rule; the record is the spelling."
13
+ },
14
+ "rules": [
15
+ "Components consume SEMANTIC roles only. Primitives (color-<family>-<step>) are hidden from pickers in Figma and must not appear in component code.",
16
+ "color-primary-* is an alias ramp onto color-blue-* — identical values, distinct names. Prefer the semantic role over either.",
17
+ "Dimension scale is 3px-atomic. Even multiples for structural layout; odd multiples are deliberate optical or micro-gap choices.",
18
+ "Elevation ink is cyan-840 rgb(22,63,75) — never default black.",
19
+ "Typography roles are composite. Apply a whole role, all five of --ol8-typography-<role>-{font-family,font-size,font-weight,line-height,letter-spacing}, rather than picking loose font vars. This package ships custom properties and no class names.",
20
+ "shape-radius-full (999px) is reserved for pills and circles. Soft hexagons are component-specific recipes, not a radius token."
21
+ ]
22
+ },
23
+ "readFirst": [
24
+ "PRINCIPLES.md",
25
+ "AGENTS.md",
26
+ "skills/"
27
+ ],
28
+ "model": "Framework agnostic. renderX() returns an HTML string; hydrateX() applies the runtime rules to markup that already exists.",
29
+ "architecture": {
30
+ "convention": "Atomic Design for developers (benjaminwfox.com/blog/tech/atomic-design-for-developers)",
31
+ "rules": [
32
+ "ATOM: composes no other component — native elements only. May hold internal state; must not read application state.",
33
+ "MOLECULE: composed of one or more atoms. Reusable, more specialised.",
34
+ "ORGANISM: composed of atoms/molecules/organisms. May hold business logic and application state.",
35
+ "MATERIALS are not an atomic tier. They are cross-cutting surface adapters applied by attribute (data-ol8-material) to an existing component, and live outside the hierarchy.",
36
+ "Assign margins to a component via its parent, NEVER to the component itself. Enforced by packages/sync/src/check-structure.mjs, which runs in npm run build."
37
+ ]
38
+ },
39
+ "components": [
40
+ {
41
+ "tier": "atom",
42
+ "module": "atoms/icon/icon.js",
43
+ "exports": [
44
+ "OL8_ICON_SIZES",
45
+ "isOl8IconName",
46
+ "renderIconSvg",
47
+ "renderIcon",
48
+ "hydrateIcons"
49
+ ],
50
+ "constraint": "Composes no other component. Native elements only."
51
+ },
52
+ {
53
+ "tier": "atom",
54
+ "module": "atoms/navigation-badge/navigation-badge.js",
55
+ "exports": [
56
+ "renderNavigationBadge"
57
+ ],
58
+ "constraint": "Composes no other component. Native elements only."
59
+ },
60
+ {
61
+ "tier": "atom",
62
+ "module": "atoms/selection-indicator/selection-indicator.js",
63
+ "exports": [
64
+ "OL8_SELECTION_KINDS",
65
+ "OL8_SELECTION_SIZES",
66
+ "OL8_SELECTION_STATES",
67
+ "renderSelectionIndicator"
68
+ ],
69
+ "constraint": "Composes no other component. Native elements only."
70
+ },
71
+ {
72
+ "tier": "molecule",
73
+ "module": "molecules/button/button.js",
74
+ "exports": [
75
+ "OL8_BUTTON_VARIANTS",
76
+ "OL8_BUTTON_SIZES",
77
+ "OL8_MATERIALS",
78
+ "GEM_VARIANTS",
79
+ "iconSizeForButton",
80
+ "renderButton",
81
+ "hydrateButtons",
82
+ "setButtonLoading"
83
+ ],
84
+ "constraint": "Composed of atoms. Reusable and more specialised."
85
+ },
86
+ {
87
+ "tier": "molecule",
88
+ "module": "molecules/choice-chip/choice-chip.js",
89
+ "exports": [
90
+ "OL8_CHIP_SIZES",
91
+ "renderChoiceChip",
92
+ "hydrateChoiceChips",
93
+ "syncChip"
94
+ ],
95
+ "constraint": "Composed of atoms. Reusable and more specialised."
96
+ },
97
+ {
98
+ "tier": "molecule",
99
+ "module": "molecules/choice-item/choice-item.js",
100
+ "exports": [
101
+ "OL8_CHOICE_KINDS",
102
+ "OL8_CHOICE_SIZES",
103
+ "indicatorSizeFor",
104
+ "selectionStateFor",
105
+ "renderChoiceItem",
106
+ "hydrateChoiceItems",
107
+ "syncIndicator",
108
+ "setChoiceMixed"
109
+ ],
110
+ "constraint": "Composed of atoms. Reusable and more specialised."
111
+ },
112
+ {
113
+ "tier": "molecule",
114
+ "module": "molecules/form-message/form-message.js",
115
+ "exports": [
116
+ "OL8_FORM_MESSAGE_TONES",
117
+ "OL8_FORM_MESSAGE_ICONS",
118
+ "renderFormMessage",
119
+ "hydrateFormMessages"
120
+ ],
121
+ "constraint": "Composed of atoms. Reusable and more specialised."
122
+ },
123
+ {
124
+ "tier": "molecule",
125
+ "module": "molecules/icon-button/icon-button.js",
126
+ "exports": [
127
+ "OL8_ICON_BUTTON_VARIANTS",
128
+ "OL8_ICON_BUTTON_SIZES",
129
+ "OL8_ICON_BUTTON_SHAPES",
130
+ "artworkSizeForIconButton",
131
+ "renderIconButton",
132
+ "hydrateIconButtons"
133
+ ],
134
+ "constraint": "Composed of atoms. Reusable and more specialised."
135
+ },
136
+ {
137
+ "tier": "molecule",
138
+ "module": "molecules/link/link.js",
139
+ "exports": [
140
+ "OL8_LINK_FORMS",
141
+ "OL8_LINK_SIZES",
142
+ "OL8_LINK_MOTIONS",
143
+ "renderLink",
144
+ "hydrateLinks"
145
+ ],
146
+ "constraint": "Composed of atoms. Reusable and more specialised."
147
+ },
148
+ {
149
+ "tier": "molecule",
150
+ "module": "molecules/select/select.js",
151
+ "exports": [
152
+ "OL8_SELECT_SIZES",
153
+ "OL8_SELECT_APPEARANCES",
154
+ "OL8_SELECT_MATERIALS",
155
+ "OL8_SELECT_NATIVE_POLICIES",
156
+ "renderSelect"
157
+ ],
158
+ "constraint": "Composed of atoms. Reusable and more specialised."
159
+ },
160
+ {
161
+ "tier": "molecule",
162
+ "module": "molecules/selection-option/selection-option.js",
163
+ "exports": [
164
+ "OL8_OPTION_SIZES",
165
+ "renderSelectionOption",
166
+ "setOptionSelected",
167
+ "setActiveOption"
168
+ ],
169
+ "constraint": "Composed of atoms. Reusable and more specialised."
170
+ },
171
+ {
172
+ "tier": "molecule",
173
+ "module": "molecules/text-field/text-field.js",
174
+ "exports": [
175
+ "OL8_TEXT_FIELD_SIZES",
176
+ "OL8_TEXT_FIELD_APPEARANCES",
177
+ "OL8_TEXT_FIELD_MATERIALS",
178
+ "OL8_MESSAGE_TONES",
179
+ "OL8_VALIDATION_STATUSES",
180
+ "OL8_CHARACTER_LIMIT_BEHAVIORS",
181
+ "renderTextField",
182
+ "hydrateTextFields",
183
+ "countGraphemes",
184
+ "clipToGraphemes"
185
+ ],
186
+ "constraint": "Composed of atoms. Reusable and more specialised."
187
+ },
188
+ {
189
+ "tier": "molecule",
190
+ "module": "molecules/token/token.js",
191
+ "exports": [
192
+ "OL8_TOKEN_SIZES",
193
+ "OL8_TOKEN_MARKS",
194
+ "resolveTokenMark",
195
+ "renderToken"
196
+ ],
197
+ "constraint": "Composed of atoms. Reusable and more specialised."
198
+ },
199
+ {
200
+ "tier": "organism",
201
+ "module": "organisms/choice-group/choice-group.js",
202
+ "exports": [
203
+ "OL8_AGGREGATE",
204
+ "computeAggregate",
205
+ "renderRadioGroup",
206
+ "renderCheckboxGroup",
207
+ "hydrateChoiceGroups"
208
+ ],
209
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
210
+ },
211
+ {
212
+ "tier": "organism",
213
+ "module": "organisms/choice-picker/choice-picker.js",
214
+ "exports": [
215
+ "OL8_PICKER_SIZES",
216
+ "OL8_PICKER_MATERIALS",
217
+ "OL8_COMMIT_BEHAVIORS",
218
+ "OL8_PICKER_PRESENTATIONS",
219
+ "OL8_PICKER_MARKS",
220
+ "renderChoicePicker",
221
+ "hydrateChoicePickers"
222
+ ],
223
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
224
+ },
225
+ {
226
+ "tier": "organism",
227
+ "module": "organisms/combobox/combobox.js",
228
+ "exports": [
229
+ "OL8_COMBOBOX_SIZES",
230
+ "OL8_COMBOBOX_APPEARANCES",
231
+ "OL8_COMBOBOX_MATERIALS",
232
+ "OL8_AUTOCOMPLETE_MODES",
233
+ "OL8_FILTER_SOURCES",
234
+ "renderCombobox",
235
+ "hydrateComboboxes"
236
+ ],
237
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
238
+ },
239
+ {
240
+ "tier": "organism",
241
+ "module": "organisms/multi-select-field/multi-select-field.js",
242
+ "exports": [
243
+ "OL8_MULTI_SELECT_SIZES",
244
+ "OL8_MULTI_SELECT_APPEARANCES",
245
+ "OL8_MULTI_SELECT_MATERIALS",
246
+ "renderMultiSelectField",
247
+ "hydrateMultiSelectFields"
248
+ ],
249
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
250
+ },
251
+ {
252
+ "tier": "organism",
253
+ "module": "organisms/segmented-control/segmented-control.js",
254
+ "exports": [
255
+ "OL8_SEGMENT_BEHAVIORS",
256
+ "OL8_SEGMENT_PRESENTATIONS",
257
+ "renderSegmentedControl",
258
+ "hydrateSegmentedControls"
259
+ ],
260
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
261
+ },
262
+ {
263
+ "tier": "organism",
264
+ "module": "organisms/selection-popup/selection-popup.js",
265
+ "exports": [
266
+ "OL8_POPUP_WIDTHS",
267
+ "OL8_POPUP_SIZES",
268
+ "OL8_POPUP_STATUSES",
269
+ "renderSelectionPopup"
270
+ ],
271
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
272
+ },
273
+ {
274
+ "tier": "organism",
275
+ "module": "organisms/tab-bar/tab-bar.js",
276
+ "exports": [
277
+ "OL8_TAB_BAR_PRESENTATIONS",
278
+ "renderTabBar",
279
+ "hydrateTabBars"
280
+ ],
281
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
282
+ },
283
+ {
284
+ "tier": "organism",
285
+ "module": "organisms/tabs/tabs.js",
286
+ "exports": [
287
+ "OL8_TABS_HIERARCHIES",
288
+ "OL8_TABS_ORIENTATIONS",
289
+ "OL8_TABS_ACTIVATIONS",
290
+ "renderTabs",
291
+ "renderTabPanel",
292
+ "hydrateTabs"
293
+ ],
294
+ "constraint": "Composed of atoms, molecules or organisms. May hold application state."
295
+ }
296
+ ],
297
+ "buildingWhatIsNotHere": {
298
+ "principle": "A component OneLi8 does not ship is still a OneLi8 component. Compose it from these foundations rather than inventing a parallel system.",
299
+ "steps": [
300
+ "Check the inventory below first. Do not rebuild something that exists.",
301
+ "Pick the tier by what it composes, not by how complex it feels.",
302
+ "Reach for a SEMANTIC token, never a primitive and never a literal. color-actionprimary-default, not color-blue-600 and not #2c438b.",
303
+ "Every dimension sits on the 3px grid. An exception needs an approval record, not a rounded number.",
304
+ "Icons come from the pool. To draw a new one follow skills/oneli8-icons: a 24px neutral source on the shared 1.8 stroke.",
305
+ "Give margins to the parent, never to the component.",
306
+ "States are not classes. Use :hover, :active, :focus-visible, [disabled] and data attributes.",
307
+ "Colour is currentColor on icons; the parent supplies the semantic role."
308
+ ],
309
+ "forbidden": [
310
+ "A literal colour, size or font value anywhere in a component.",
311
+ "A primitive token in a component. Primitives are hidden from the Figma pickers for the same reason.",
312
+ "An invented icon name. Choose from OL8_ICONS.",
313
+ "A per-size icon stroke. The 1.8 stroke is shared, and an Icon Frame instance is an exact scale of the 24px master, so an 18px one carries a 1.35 stroke. The selection masters are the exception: Icon / Selection / Check keeps the same 10.2 x 6.9 artwork at 1.8 in both its 18 and 24 boxes, so it is not scaled.",
314
+ "Mixing a filled treatment with an outlined one across selection controls. Checkbox and Radio share one language."
315
+ ]
316
+ },
317
+ "materials": {
318
+ "gem": {
319
+ "strategy": "attribute",
320
+ "emitAs": {
321
+ "data-ol8-material": "gem"
322
+ },
323
+ "note": "Gem is an attribute on an existing button, never a new class or variant. renderButton/renderIconButton throw for quiet and destructive.",
324
+ "appliesTo": {
325
+ "ol8-btn": [
326
+ "primary",
327
+ "secondary"
328
+ ],
329
+ "ol8-icon-btn": [
330
+ "primary",
331
+ "secondary"
332
+ ]
333
+ }
334
+ }
335
+ },
336
+ "pending": {
337
+ "Select and Combobox": {
338
+ "page": "1034:12628",
339
+ "remaining": {
340
+ "02 Selection Popup (organism)": "574:534, 6 variants — Width Content|Anchor|Wide x Size Standard|Large",
341
+ "03 Select Trigger": "583:338, 24 variants — Size x Appearance Outline|Filled x Condition",
342
+ "04 Choice Chip Foundation": "612:657 — Soft Hexagon 636:847 and Neutral 983:6552",
343
+ "05 Mobbin-informed Compositions": "603:281 (documentation)",
344
+ "06 Canonical Public Owners": "875:1399 (documentation)"
345
+ }
346
+ }
347
+ }
348
+ }
package/package.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "@oneli8/core",
3
+ "version": "1.0.0-beta.10",
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
+ "keywords": [
6
+ "design-system",
7
+ "components",
8
+ "headless",
9
+ "framework-agnostic",
10
+ "design-tokens",
11
+ "accessibility",
12
+ "oneli8"
13
+ ],
14
+ "homepage": "https://github.com/Akshay007ad/OneLi8-Design-System#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/Akshay007ad/OneLi8-Design-System/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/Akshay007ad/OneLi8-Design-System.git",
21
+ "directory": "packages/core"
22
+ },
23
+ "license": "Apache-2.0",
24
+ "author": "Akshay Dhore",
25
+ "type": "module",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./src/index.d.ts",
29
+ "import": "./src/index.js",
30
+ "default": "./src/index.js"
31
+ },
32
+ "./atoms": {
33
+ "types": "./src/atoms/index.d.ts",
34
+ "import": "./src/atoms/index.js",
35
+ "default": "./src/atoms/index.js"
36
+ },
37
+ "./molecules": {
38
+ "types": "./src/molecules/index.d.ts",
39
+ "import": "./src/molecules/index.js",
40
+ "default": "./src/molecules/index.js"
41
+ },
42
+ "./organisms": {
43
+ "types": "./src/organisms/index.d.ts",
44
+ "import": "./src/organisms/index.js",
45
+ "default": "./src/organisms/index.js"
46
+ },
47
+ "./styles.css": "./styles.css",
48
+ "./styles/icon.css": "./src/atoms/icon/icon.css",
49
+ "./styles/navigation-badge.css": "./src/atoms/navigation-badge/navigation-badge.css",
50
+ "./styles/selection-indicator.css": "./src/atoms/selection-indicator/selection-indicator.css",
51
+ "./styles/button.css": "./src/molecules/button/button.css",
52
+ "./styles/choice-chip.css": "./src/molecules/choice-chip/choice-chip.css",
53
+ "./styles/choice-item.css": "./src/molecules/choice-item/choice-item.css",
54
+ "./styles/form-message.css": "./src/molecules/form-message/form-message.css",
55
+ "./styles/icon-button.css": "./src/molecules/icon-button/icon-button.css",
56
+ "./styles/link.css": "./src/molecules/link/link.css",
57
+ "./styles/navigation-item.css": "./src/molecules/navigation-item/navigation-item.css",
58
+ "./styles/select.css": "./src/molecules/select/select.css",
59
+ "./styles/selection-option.css": "./src/molecules/selection-option/selection-option.css",
60
+ "./styles/text-field.css": "./src/molecules/text-field/text-field.css",
61
+ "./styles/token.css": "./src/molecules/token/token.css",
62
+ "./styles/choice-group.css": "./src/organisms/choice-group/choice-group.css",
63
+ "./styles/choice-picker.css": "./src/organisms/choice-picker/choice-picker.css",
64
+ "./styles/combobox.css": "./src/organisms/combobox/combobox.css",
65
+ "./styles/multi-select-field.css": "./src/organisms/multi-select-field/multi-select-field.css",
66
+ "./styles/segmented-control.css": "./src/organisms/segmented-control/segmented-control.css",
67
+ "./styles/selection-popup.css": "./src/organisms/selection-popup/selection-popup.css",
68
+ "./styles/tab-bar.css": "./src/organisms/tab-bar/tab-bar.css",
69
+ "./styles/tabs.css": "./src/organisms/tabs/tabs.css",
70
+ "./styles/gem.css": "./src/materials/gem/gem.css",
71
+ "./package.json": "./package.json",
72
+ "./ai-context.json": "./ai-context.json",
73
+ "./skills/*": "./skills/*"
74
+ },
75
+ "types": "./src/index.d.ts",
76
+ "sideEffects": [
77
+ "./styles.css",
78
+ "**/*.css"
79
+ ],
80
+ "files": [
81
+ "src",
82
+ "styles.css",
83
+ "ai-context.json",
84
+ "skills",
85
+ "PRINCIPLES.md",
86
+ "AGENTS.md",
87
+ "README.md",
88
+ "LICENSE",
89
+ "NOTICE"
90
+ ],
91
+ "dependencies": {
92
+ "@oneli8/tokens": "1.0.0-beta.10"
93
+ },
94
+ "engines": {
95
+ "node": ">=20"
96
+ },
97
+ "publishConfig": {
98
+ "access": "public"
99
+ }
100
+ }
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: oneli8-figma-to-code
3
+ description: Translate inspected OneLi8 Button, IconButton and Link properties into canonical code without paid Code Connect.
4
+ ---
5
+
6
+ Locate the bundle; read README.md, PRINCIPLES.md and the matching JSON and module
7
+ in mappings/. These are property translators, not a Figma exporter. They need no
8
+ paid Code Connect service. They do not supply a consumer's Figma access.
9
+
10
+ Use an authorized connector, user-run read-only plugin, or manually supplied
11
+ observations to obtain owner identity, exact properties, nested icon identities
12
+ and token bindings. Never require enterprise Variables REST access. Screenshots
13
+ alone support provisional visual work, not structural certification.
14
+
15
+ Call mapButton, mapIconButton or mapLink with the shipped mapping and explicit
16
+ observations; use the function signature in its module. Block unknown properties
17
+ and missing identities. Copied libraries may change IDs: inspect rather than
18
+ silently guessing. Do not build replacement HTML from a screenshot when a public
19
+ owner exists. No component outside the public beta is supported by these adapters.
20
+
21
+ Preserve approved Figma and decisions. Code mapping does not authorize changing
22
+ Figma. Map focus/hover to real browser interactions, not invented public props.
23
+ Verify properties, structural/token ownership, matched visual states, and runtime
24
+ behavior separately. Record remaining gaps and observation dates. A mapped plan
25
+ or successful render is not full synchronization or accessibility certification.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: oneli8-icons
3
+ description: Reuse or propose additions to the OneLi8 public beta neutral 24px icon pool with shared presentation and color.
4
+ ---
5
+
6
+ Locate the public beta bundle. Read PRINCIPLES.md, packages/react/src/atoms/Icon.js,
7
+ packages/react/src/foundations/icons.generated.js and packages/react/src/styles/icon.css.
8
+ Icon owns drawing AND presentation: its `size` prop plus that stylesheet set the
9
+ frame, so there is no separate IconFrame module and no Icon.d.ts — types live in
10
+ index.d.ts and foundations/icons.generated.d.ts. These are the actual owners, not
11
+ templates to copy into controls.
12
+
13
+ Search OL8_ICONS first; isOl8IconName guards a name. Existing meaning uses its existing identity. For a missing
14
+ meaning, propose one neutral 24×24 source definition in the pool and update the
15
+ IconName type; no size-, color-, Gem- or consumer-specific duplicate masters.
16
+ Follow adjacent approved geometry and the shared semantic stroke token. Icons
17
+ scale GEOMETRICALLY from the 24px source, so the 1.8 stroke scales with the
18
+ artwork: 1.35 at 18px, 1.8 at 24px, 3.6 at 48px. Verified against Figma — the
19
+ Icon Frame Size=48 variant exports stroke-width 3.6 in a 48 viewBox (3.6/48 =
20
+ 1.8/24), and the Icon Frame's own description states that no per-size source or
21
+ stroke tokens exist. The token set agrees: every stroke token is 1.8 and all 29
22
+ stroked paths in the pool are 1.8; there is no 1.2/2.4 step scale.
23
+
24
+ Do not put non-scaling-stroke on an icon. That belongs to Choice Chip
25
+ terminals, which stretch unevenly under preserveAspectRatio="none" and need a
26
+ constant edge; an icon scales uniformly and must not fight it. Filled marks
27
+ have no outline. Do not invent per-size stroke values.
28
+
29
+ Color follows currentColor and the consumer's semantic state. Button and
30
+ IconButton already own their IconFrame sizing. A new icon is a candidate until
31
+ Akshay approves it; an AI-generated candidate is not automatically canonical.
32
+ This skill is guidance, not an autonomous icon-generation program.
33
+
34
+ Test multi-part paths, clipping and color at 9, 12, 24 and a large display size;
35
+ test swaps in light/dark and Regular/Gem. Compare Figma geometry/instance behavior
36
+ when authorized access exists. Record unavailable checks instead of claiming sync.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: oneli8-ui
3
+ description: Compose UI using the OneLi8 public beta components and tokens without recreating canonical owners.
4
+ ---
5
+
6
+ Locate the extracted public beta bundle and read its README.md, PRINCIPLES.md and
7
+ packages/react/src/index.d.ts. If unavailable, obtain it rather than inventing
8
+ APIs. Paths here are relative to the bundle root.
9
+
10
+ Before composition, record the public component, icon identity, semantic color,
11
+ material, size and layout responsibility. Import from @oneli8/react; use generated
12
+ tokens rather than copied values. Reuse source atoms inside their existing
13
+ molecules. A new wrapper does not become a new atom merely because it is small.
14
+
15
+ Keep optional slots collapsible and parent/child insets intentional. Do not copy
16
+ private implementations into a product. For unsupported families, explicitly
17
+ separate consumer-owned work from canonical OneLi8; do not claim it is provided.
18
+ New canonical patterns need Mobbin visual research, official interaction guidance
19
+ and maintainer approval, not copied visual identity.
20
+
21
+ Gem has two faces and they imply different content. Choosing the wrong pairing
22
+ is the most common Gem error, in both directions: near-white ink on a stabilized
23
+ face over a light page is invisible, and ordinary dark ink on an environmental
24
+ face over daylight scenery is unreadable.
25
+
26
+ material.gem.color.quiet.environmentalFace is a surface over imagery or the real
27
+ world. Its content is material.gem.color.quiet.content, a stable near-white in
28
+ BOTH appearances, and it carries the material.gem.color.quiet.contentGlow halo at
29
+ material.gem.blur.contentGlow: four stacked shadows for text, three for control
30
+ geometry, because 1.4.11 asks 3:1 of a graphical object where 1.4.3 asks 4.5:1 of
31
+ text. That means every glyph AND the unselected control boundary and any icon, not
32
+ the label alone. Disabled takes material.gem.color.quiet.contentDisabled, one
33
+ whitish grey shared by text and control geometry, and no halo.
34
+
35
+ material.gem.color.quiet.stabilizedFace is the local content plane on app chrome,
36
+ including the filled Gem text field, Select and Combobox. Its content is ordinary
37
+ color.text.* and takes no halo. Selected and mixed indicators are never restyled
38
+ on either face; they fill with the primary action family and carry their own mark.
39
+
40
+ material.gem.color.quiet.legibilityFace is the reduced-transparency mode. It is
41
+ denser, never opaque, because Gem is worn and a solid surface would occlude the
42
+ world for the person who needs help reading it. It uses the same content as the
43
+ environmental face.
44
+
45
+ Never thicken a face to win contrast, and never widen the halo: blur spreads a
46
+ fixed alpha budget, so a wider halo is a weaker halo. docs/gem-material.md carries
47
+ the measured values and the Figma node each was read from.
48
+
49
+ Check light/dark, Regular/Gem, focus, loading/disabled, accessible names and long
50
+ content where applicable. Do not claim screen-reader testing from HTML checks.
51
+ Record changed owners and the Figma/code impact; unavailable evidence stays open.
52
+ The public beta's smoke tests verify packaging, not downstream UI correctness.
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Oneli8 · Icon atom
3
+ * Figma: page "Iconography" — masters "Icon Library / Masters" (426:55),
4
+ * sizing from "Icon Frame" (418:51).
5
+ *
6
+ * Contract, straight from the Figma component descriptions:
7
+ * - one canonical 24px source per glyph
8
+ * - the Icon Frame *geometrically* scales the complete source instance, so
9
+ * the 1.8-unit stroke scales with the artwork (48px icon => 3.6px stroke).
10
+ * This is why the SVG keeps viewBox="0 0 24 24" and we size the box only —
11
+ * never `vector-effect: non-scaling-stroke`.
12
+ * - the source is neutral; the consumer supplies semantic color, which is
13
+ * why every stroke/fill is `currentColor`.
14
+ */
15
+
16
+ .ol8-icon {
17
+ /* The outer asset box. Defaults to the canonical 24px source size. */
18
+ --_ol8-icon-size: var(--ol8-size-icon-standard);
19
+
20
+ display: inline-flex;
21
+ flex: none;
22
+ align-items: center;
23
+ justify-content: center;
24
+ inline-size: var(--_ol8-icon-size);
25
+ block-size: var(--_ol8-icon-size);
26
+ /* Inherit ink from the consuming component (semantic color lives there). */
27
+ color: inherit;
28
+ }
29
+
30
+ /* The inner leaf. Both dimensions are explicit — never `auto`. */
31
+ .ol8-icon > svg {
32
+ display: block;
33
+ inline-size: var(--_ol8-icon-size);
34
+ block-size: var(--_ol8-icon-size);
35
+ overflow: visible; /* matches the Figma export; round caps may kiss the edge */
36
+ }
37
+
38
+ /* ---- Icon Frame · universal sizes (Figma 418:51) ---------------------- */
39
+ .ol8-icon[data-ol8-icon-size="9"] { --_ol8-icon-size: var(--ol8-size-icon-micro); }
40
+ .ol8-icon[data-ol8-icon-size="12"] { --_ol8-icon-size: var(--ol8-size-icon-compact); }
41
+ .ol8-icon[data-ol8-icon-size="18"] { --_ol8-icon-size: var(--ol8-size-icon-small); }
42
+ .ol8-icon[data-ol8-icon-size="24"] { --_ol8-icon-size: var(--ol8-size-icon-standard); }
43
+ .ol8-icon[data-ol8-icon-size="30"] { --_ol8-icon-size: var(--ol8-size-icon-medium); }
44
+ .ol8-icon[data-ol8-icon-size="36"] { --_ol8-icon-size: var(--ol8-size-icon-large); }
45
+ .ol8-icon[data-ol8-icon-size="48"] { --_ol8-icon-size: var(--ol8-size-icon-xlarge); }
46
+ .ol8-icon[data-ol8-icon-size="60"] { --_ol8-icon-size: var(--ol8-size-icon-spacious); }
47
+ .ol8-icon[data-ol8-icon-size="72"] { --_ol8-icon-size: var(--ol8-size-icon-display); }
48
+ .ol8-icon[data-ol8-icon-size="96"] { --_ol8-icon-size: var(--ol8-size-icon-hero); }
49
+ .ol8-icon[data-ol8-icon-size="108"] { --_ol8-icon-size: var(--ol8-size-icon-landmark); }
50
+
51
+ /* ---- Direction ------------------------------------------------------- */
52
+ /* "Direction: semantic registry controls RTL mirroring" (Iconography doc 84:13).
53
+ The registry sets data-ol8-icon-mirror; CSS only obeys it. */
54
+ [dir="rtl"] .ol8-icon[data-ol8-icon-mirror="true"] > svg { transform: scaleX(-1); }
@@ -0,0 +1,19 @@
1
+ import type { Ol8IconName } from './icons.generated.js';
2
+
3
+ export type Ol8IconSize = 9 | 12 | 18 | 24 | 30 | 36 | 48 | 60 | 72 | 96 | 108;
4
+ export declare const OL8_ICON_SIZES: readonly Ol8IconSize[];
5
+
6
+ export interface Ol8IconOptions {
7
+ /** One of the Icon Frame universal sizes. Defaults to the 24px source size. */
8
+ size?: Ol8IconSize;
9
+ /** Accessible name. Omit for decorative icons (the default). */
10
+ label?: string;
11
+ /** Extra classes on the outer box. */
12
+ className?: string;
13
+ }
14
+
15
+ export declare function isOl8IconName(name: string): name is Ol8IconName;
16
+ export declare function renderIconSvg(name: Ol8IconName): string;
17
+ export declare function renderIcon(name: Ol8IconName, options?: Ol8IconOptions): string;
18
+ export declare function hydrateIcons(root?: ParentNode): void;
19
+ export { OL8_ICONS, type Ol8IconName } from './icons.generated.js';