al-design-system 0.0.0-stage → 1.1.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.
Files changed (112) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +180 -2
  3. package/README.pt-BR.md +181 -0
  4. package/dist/al.css +6929 -0
  5. package/dist/components/accordion.css +218 -0
  6. package/dist/components/alert.css +223 -0
  7. package/dist/components/alert.js +109 -0
  8. package/dist/components/avatar.css +241 -0
  9. package/dist/components/breadcrumb.css +267 -0
  10. package/dist/components/breadcrumb.js +73 -0
  11. package/dist/components/button.css +369 -0
  12. package/dist/components/card.css +284 -0
  13. package/dist/components/checkbox.css +280 -0
  14. package/dist/components/divider.css +79 -0
  15. package/dist/components/drawer.css +298 -0
  16. package/dist/components/drawer.js +104 -0
  17. package/dist/components/icon-button.css +354 -0
  18. package/dist/components/icon.css +126 -0
  19. package/dist/components/input.css +391 -0
  20. package/dist/components/link.css +101 -0
  21. package/dist/components/modal.css +264 -0
  22. package/dist/components/modal.js +101 -0
  23. package/dist/components/password.css +382 -0
  24. package/dist/components/password.js +65 -0
  25. package/dist/components/radio.css +305 -0
  26. package/dist/components/select.css +344 -0
  27. package/dist/components/sidebar.css +374 -0
  28. package/dist/components/sidebar.js +108 -0
  29. package/dist/components/switch.css +282 -0
  30. package/dist/components/tab.css +261 -0
  31. package/dist/components/tab.js +115 -0
  32. package/dist/components/tag.css +325 -0
  33. package/dist/components/textarea.css +354 -0
  34. package/dist/components/toast.css +244 -0
  35. package/dist/components/toast.js +203 -0
  36. package/dist/components/tooltip.css +168 -0
  37. package/dist/components/tooltip.js +168 -0
  38. package/dist/foundation.css +368 -0
  39. package/dist/icons/NOTICE +21 -0
  40. package/dist/icons/arrow-down.svg +2 -0
  41. package/dist/icons/arrow-left.svg +2 -0
  42. package/dist/icons/arrow-right.svg +2 -0
  43. package/dist/icons/arrow-up-down.svg +2 -0
  44. package/dist/icons/arrow-up-right.svg +2 -0
  45. package/dist/icons/arrow-up.svg +2 -0
  46. package/dist/icons/bell.svg +2 -0
  47. package/dist/icons/bookmark.svg +2 -0
  48. package/dist/icons/calendar.svg +2 -0
  49. package/dist/icons/chart-column.svg +2 -0
  50. package/dist/icons/check.svg +2 -0
  51. package/dist/icons/chevron-down.svg +2 -0
  52. package/dist/icons/chevron-left.svg +2 -0
  53. package/dist/icons/chevron-right.svg +2 -0
  54. package/dist/icons/chevron-up.svg +2 -0
  55. package/dist/icons/chevrons-left.svg +2 -0
  56. package/dist/icons/chevrons-right.svg +2 -0
  57. package/dist/icons/circle-alert.svg +2 -0
  58. package/dist/icons/circle-check.svg +2 -0
  59. package/dist/icons/circle-help.svg +2 -0
  60. package/dist/icons/circle-x.svg +2 -0
  61. package/dist/icons/clock.svg +2 -0
  62. package/dist/icons/copy.svg +2 -0
  63. package/dist/icons/credit-card.svg +2 -0
  64. package/dist/icons/download.svg +2 -0
  65. package/dist/icons/ellipsis-vertical.svg +2 -0
  66. package/dist/icons/ellipsis.svg +2 -0
  67. package/dist/icons/external-link.svg +2 -0
  68. package/dist/icons/eye-off.svg +2 -0
  69. package/dist/icons/eye.svg +2 -0
  70. package/dist/icons/file-text.svg +2 -0
  71. package/dist/icons/filter.svg +2 -0
  72. package/dist/icons/folder.svg +2 -0
  73. package/dist/icons/globe.svg +2 -0
  74. package/dist/icons/heart.svg +2 -0
  75. package/dist/icons/house.svg +2 -0
  76. package/dist/icons/icons.json +81 -0
  77. package/dist/icons/image.svg +2 -0
  78. package/dist/icons/info.svg +2 -0
  79. package/dist/icons/link.svg +2 -0
  80. package/dist/icons/loader-circle.svg +2 -0
  81. package/dist/icons/lock.svg +2 -0
  82. package/dist/icons/log-in.svg +2 -0
  83. package/dist/icons/log-out.svg +2 -0
  84. package/dist/icons/mail.svg +2 -0
  85. package/dist/icons/map-pin.svg +2 -0
  86. package/dist/icons/maximize.svg +2 -0
  87. package/dist/icons/menu.svg +2 -0
  88. package/dist/icons/minus.svg +2 -0
  89. package/dist/icons/paperclip.svg +2 -0
  90. package/dist/icons/pause.svg +2 -0
  91. package/dist/icons/pencil.svg +2 -0
  92. package/dist/icons/phone.svg +2 -0
  93. package/dist/icons/play.svg +2 -0
  94. package/dist/icons/plus.svg +2 -0
  95. package/dist/icons/refresh-cw.svg +2 -0
  96. package/dist/icons/search.svg +2 -0
  97. package/dist/icons/send.svg +2 -0
  98. package/dist/icons/settings.svg +2 -0
  99. package/dist/icons/share-2.svg +2 -0
  100. package/dist/icons/shield-check.svg +2 -0
  101. package/dist/icons/shopping-cart.svg +2 -0
  102. package/dist/icons/skip-forward.svg +2 -0
  103. package/dist/icons/star.svg +2 -0
  104. package/dist/icons/trash.svg +2 -0
  105. package/dist/icons/triangle-alert.svg +2 -0
  106. package/dist/icons/upload.svg +2 -0
  107. package/dist/icons/user.svg +2 -0
  108. package/dist/icons/users.svg +2 -0
  109. package/dist/icons/volume-2.svg +2 -0
  110. package/dist/icons/x.svg +2 -0
  111. package/dist/tokens.json +1617 -0
  112. package/package.json +35 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Guilherme Domingues
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,181 @@
1
- # Temporary Holding Version
1
+ # AL Design System
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/al-design-system)](https://www.npmjs.com/package/al-design-system)
4
+ [![license](https://img.shields.io/github/license/guilhermedworakowski/al-design-system)](LICENSE)
5
+ [![build](https://github.com/guilhermedworakowski/al-design-system/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/guilhermedworakowski/al-design-system/actions/workflows/build.yml)
6
+
7
+ An open-source design system, from Figma to code. Plain CSS, a little vanilla JavaScript only where CSS can't reach, and no dependencies.
8
+
9
+ **English** · [Português](README.pt-BR.md) · [Documentation site](https://al.guilhermedesignd.com)
10
+
11
+ ## What it is
12
+
13
+ - **Foundation + 24 components**, designed in Figma and coded from the same tokens.
14
+ - **Light and dark themes** built in. It follows the operating system by default, and you can force one.
15
+ - **Accessibility is checked by the build.** Every rendered combination (variant × state × theme) is measured for contrast against the background it actually sits on, and each component's markup contract is verified. If something fails, the build stops.
16
+ - **Nothing is typed by hand.** Tokens, CSS variables, `tokens.json` and the documentation tables are all generated from one source.
17
+
18
+ ## Components
19
+
20
+ | Group | Component | Script | Guidelines |
21
+ |---|---|:---:|---|
22
+ | Actions and display | Button | | [guidelines](src/components/button/guidelines.md) |
23
+ | | Icon | | (70 icons, see [Icons](#icons)) |
24
+ | | Icon Button | | [guidelines](src/components/icon-button/guidelines.md) |
25
+ | | Link | | [guidelines](src/components/link/guidelines.md) |
26
+ | | Tag | | [guidelines](src/components/tag/guidelines.md) |
27
+ | | Avatar | | [guidelines](src/components/avatar/guidelines.md) |
28
+ | Forms | Select | | [guidelines](src/components/select/guidelines.md) |
29
+ | | Checkbox | | [guidelines](src/components/checkbox/guidelines.md) |
30
+ | | Radio | | [guidelines](src/components/radio/guidelines.md) |
31
+ | | Switch | | [guidelines](src/components/switch/guidelines.md) |
32
+ | | Input | | [guidelines](src/components/input/guidelines.md) |
33
+ | | Textarea | | [guidelines](src/components/textarea/guidelines.md) |
34
+ | | Password | ✓ | [guidelines](src/components/password/guidelines.md) |
35
+ | Structure and overlays | Divider | | [guidelines](src/components/divider/guidelines.md) |
36
+ | | Card | | [guidelines](src/components/card/guidelines.md) |
37
+ | | Tab | ✓ | [guidelines](src/components/tab/guidelines.md) |
38
+ | | Accordion | | [guidelines](src/components/accordion/guidelines.md) |
39
+ | | Modal | ✓ | [guidelines](src/components/modal/guidelines.md) |
40
+ | | Drawer | ✓ | [guidelines](src/components/drawer/guidelines.md) |
41
+ | Navigation | Sidebar | ✓ | [guidelines](src/components/sidebar/guidelines.md) |
42
+ | | Breadcrumb | ✓ | [guidelines](src/components/breadcrumb/guidelines.md) |
43
+ | Feedback | Tooltip | ✓ | [guidelines](src/components/tooltip/guidelines.md) |
44
+ | | Toast | ✓ | [guidelines](src/components/toast/guidelines.md) |
45
+ | | Alert | ✓ | [guidelines](src/components/alert/guidelines.md) |
46
+
47
+ Each guidelines file holds the usage rules (when to use it, when not to, content, behavior and accessibility) and, when there are any, the contrast exceptions the component declares.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ npm install al-design-system
53
+ ```
54
+
55
+ Or straight from a CDN, pinned to a version:
56
+
57
+ ```html
58
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.1.0/dist/al.css">
59
+ ```
60
+
61
+ Each [GitHub Release](https://github.com/guilhermedworakowski/al-design-system/releases) also carries the `dist/` folder as a zip.
62
+
63
+ ### What's in the package
64
+
65
+ | File | What it is |
66
+ |---|---|
67
+ | `al.css` | Foundation + all 24 components, in one file |
68
+ | `foundation.css` | Only the Foundation: color, typography, spacing, radius, icon size, elevation, focus ring and motion |
69
+ | `components/<name>.css` | One component (its tokens + its CSS) |
70
+ | `components/<name>.js` | The behavior, for the 9 components that have a script |
71
+ | `icons/*.svg`, `icons/icons.json` | The 70 icons |
72
+ | `tokens.json` | The Foundation tokens, to read from code |
73
+
74
+ ## Usage
75
+
76
+ ### CSS
77
+
78
+ The simplest way is the whole thing:
79
+
80
+ ```js
81
+ import 'al-design-system'; // same as al-design-system/al.css
82
+ ```
83
+
84
+ Or only what the product uses. The Foundation always comes first, because every component token points to one of its tokens:
85
+
86
+ ```js
87
+ import 'al-design-system/foundation.css';
88
+ import 'al-design-system/components/button.css';
89
+ ```
90
+
91
+ Then the markup uses the `.al-*` classes:
92
+
93
+ ```html
94
+ <button type="button" class="al-btn al-btn--primary al-btn--md">Save</button>
95
+ ```
96
+
97
+ The exact markup of each component (which element, which attributes) is described at the top of its CSS file and on the [documentation site](https://al.guilhermedesignd.com).
98
+
99
+ ### Scripts
100
+
101
+ Password, Tab, Modal, Drawer, Sidebar, Breadcrumb, Tooltip, Toast and Alert need their script, loaded once per page. Each one wires up the components already on the page by itself:
102
+
103
+ ```html
104
+ <script src="node_modules/al-design-system/dist/components/modal.js" defer></script>
105
+ ```
106
+
107
+ Content added later is wired with `init`, for example `window.alModals.init(element)`. Toast and Alert are opened from code: `alToast.show(...)` and `alAlert.show(...)`. The usage of each script is at the top of its file.
108
+
109
+ ### Theme
110
+
111
+ Without anything on `<html>`, the theme follows the operating system (`prefers-color-scheme`). To force one:
112
+
113
+ ```html
114
+ <html data-theme="dark">
115
+ ```
116
+
117
+ ### Fonts
118
+
119
+ Fonts are not in the package. The Foundation asks for `Inter` and `JetBrains Mono`, with system fallbacks. Loading the font files is up to the product, preferably hosted alongside it.
120
+
121
+ ### Icons
122
+
123
+ The SVGs go inline, with the `.al-icon` class on the `<svg>` itself, so they inherit the text color (`<img>` doesn't). The file only has the drawing. The accessibility contract is added by whoever uses it:
124
+
125
+ - decorative: `aria-hidden="true" focusable="false"`;
126
+ - carries meaning: `role="img"` and an `aria-label`.
127
+
128
+ ## Tokens
129
+
130
+ Three layers, each with one job:
131
+
132
+ 1. **Primitive**: the raw color ramps, in OKLCH, on a single lightness scale shared by every family. No component uses them directly.
133
+ 2. **Semantic**: the role (`bg-brand`, `text-secondary`, `border-focus`), with one value per theme. This is where the theme is resolved.
134
+ 3. **Component**: an alias of a semantic token, one per role in the component (`button-primary-bg-hover`). Never a loose hex value.
135
+
136
+ In CSS they are custom properties prefixed with `--al-`. `tokens.json` has the same values for anyone who wants to read them from code.
137
+
138
+ ## Accessibility
139
+
140
+ The minimums are the WCAG contrast ones: 4.5:1 for text, 3:1 for icons, borders and focus. When the brand color doesn't reach the minimum, the exception is named one by one, never goes below 3:1, and is paid for with a usage rule (a visible label, a title, a second cue). When a component has exceptions, they are listed in its guidelines.
141
+
142
+ Besides contrast, each component has a markup contract checked against the HTML: the right native element, an accessible name, the right attributes, nothing interactive where it shouldn't be.
143
+
144
+ ## Versioning
145
+
146
+ AL follows semantic versioning, read like this:
147
+
148
+ - **third digit** (1.0.**1**): an adjustment, with no new component or layer;
149
+ - **middle digit** (1.**1**.0): a new component or layer;
150
+ - **first digit** (**2**.0.0): a change that breaks what already exists.
151
+
152
+ What changed in each version is in the [CHANGELOG](CHANGELOG.md).
153
+
154
+ ## Repository structure
155
+
156
+ ```
157
+ src/foundation/ the Foundation source (color, typography, spacing...) in Python
158
+ src/components/<name>/ one folder per component:
159
+ tokens.py the component tokens (aliases of the Foundation)
160
+ <name>.css the handwritten CSS
161
+ <name>.js the script, when there is one
162
+ check.py, a11y.py the gates (literal CSS, orphan tokens, contrast, markup)
163
+ guidelines.md the usage rules
164
+ site/ the documentation site generator
165
+ tools/ what the build shares (paths, dist assembly)
166
+ build.py runs everything, in order
167
+ build/ generated output (CSS, tokens, site)
168
+ dist/ the package that goes to npm
169
+ ```
170
+
171
+ To build from source you only need Python 3.9 or later, with no packages to install:
172
+
173
+ ```bash
174
+ python3 build.py
175
+ ```
176
+
177
+ It regenerates everything and runs every gate. Details are in [CONTRIBUTING](CONTRIBUTING.md).
178
+
179
+ ## License
180
+
181
+ [MIT](LICENSE) © 2026 Guilherme Domingues. The icons come from [Lucide](https://lucide.dev) (ISC); see [`icons/NOTICE`](src/components/icon/NOTICE).
@@ -0,0 +1,181 @@
1
+ # AL Design System
2
+
3
+ [![npm](https://img.shields.io/npm/v/al-design-system)](https://www.npmjs.com/package/al-design-system)
4
+ [![licença](https://img.shields.io/github/license/guilhermedworakowski/al-design-system)](LICENSE)
5
+ [![build](https://github.com/guilhermedworakowski/al-design-system/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/guilhermedworakowski/al-design-system/actions/workflows/build.yml)
6
+
7
+ Design system open source, do Figma ao código. CSS puro, um pouco de JavaScript sem framework só onde o CSS não alcança, e nenhuma dependência.
8
+
9
+ [English](README.md) · **Português** · [Site de documentação](https://al.guilhermedesignd.com)
10
+
11
+ ## O que é
12
+
13
+ - **Foundation + 24 componentes**, desenhados no Figma e codados a partir dos mesmos tokens.
14
+ - **Temas claro e escuro** já incluídos. Por padrão segue o sistema operacional, e dá para forçar um.
15
+ - **A acessibilidade é conferida no build.** Cada combinação renderizada (variante × estado × tema) tem o contraste medido contra o fundo onde ela realmente aparece, e o contrato de marcação de cada componente é verificado. Se algo reprova, o build para.
16
+ - **Nada é digitado à mão.** Tokens, variáveis CSS, `tokens.json` e as tabelas da documentação saem todos de uma fonte só.
17
+
18
+ ## Componentes
19
+
20
+ | Grupo | Componente | Script | Diretrizes |
21
+ |---|---|:---:|---|
22
+ | Ações e exibição | Button | | [diretrizes](src/components/button/guidelines.md) |
23
+ | | Icon | | (70 ícones, ver [Ícones](#ícones)) |
24
+ | | Icon Button | | [diretrizes](src/components/icon-button/guidelines.md) |
25
+ | | Link | | [diretrizes](src/components/link/guidelines.md) |
26
+ | | Tag | | [diretrizes](src/components/tag/guidelines.md) |
27
+ | | Avatar | | [diretrizes](src/components/avatar/guidelines.md) |
28
+ | Formulários | Select | | [diretrizes](src/components/select/guidelines.md) |
29
+ | | Checkbox | | [diretrizes](src/components/checkbox/guidelines.md) |
30
+ | | Radio | | [diretrizes](src/components/radio/guidelines.md) |
31
+ | | Switch | | [diretrizes](src/components/switch/guidelines.md) |
32
+ | | Input | | [diretrizes](src/components/input/guidelines.md) |
33
+ | | Textarea | | [diretrizes](src/components/textarea/guidelines.md) |
34
+ | | Password | ✓ | [diretrizes](src/components/password/guidelines.md) |
35
+ | Estrutura e sobreposição | Divider | | [diretrizes](src/components/divider/guidelines.md) |
36
+ | | Card | | [diretrizes](src/components/card/guidelines.md) |
37
+ | | Tab | ✓ | [diretrizes](src/components/tab/guidelines.md) |
38
+ | | Accordion | | [diretrizes](src/components/accordion/guidelines.md) |
39
+ | | Modal | ✓ | [diretrizes](src/components/modal/guidelines.md) |
40
+ | | Drawer | ✓ | [diretrizes](src/components/drawer/guidelines.md) |
41
+ | Navegação | Sidebar | ✓ | [diretrizes](src/components/sidebar/guidelines.md) |
42
+ | | Breadcrumb | ✓ | [diretrizes](src/components/breadcrumb/guidelines.md) |
43
+ | Feedback | Tooltip | ✓ | [diretrizes](src/components/tooltip/guidelines.md) |
44
+ | | Toast | ✓ | [diretrizes](src/components/toast/guidelines.md) |
45
+ | | Alert | ✓ | [diretrizes](src/components/alert/guidelines.md) |
46
+
47
+ Cada arquivo de diretrizes traz as regras de uso (quando usar, quando não usar, conteúdo, comportamento e acessibilidade) e, quando houver, as exceções de contraste que o componente declara. Por enquanto as diretrizes estão em inglês; a versão em português chega junto com o site novo.
48
+
49
+ ## Instalação
50
+
51
+ ```bash
52
+ npm install al-design-system
53
+ ```
54
+
55
+ Ou direto de uma CDN, fixado numa versão:
56
+
57
+ ```html
58
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.1.0/dist/al.css">
59
+ ```
60
+
61
+ Cada [Release no GitHub](https://github.com/guilhermedworakowski/al-design-system/releases) também traz a pasta `dist/` num zip.
62
+
63
+ ### O que vem no pacote
64
+
65
+ | Arquivo | O que é |
66
+ |---|---|
67
+ | `al.css` | Foundation + os 24 componentes, num arquivo só |
68
+ | `foundation.css` | Só a Foundation: cor, tipografia, espaçamento, radius, tamanho de ícone, elevação, anel de foco e motion |
69
+ | `components/<nome>.css` | Um componente (os tokens + o CSS dele) |
70
+ | `components/<nome>.js` | O comportamento, para os 9 componentes que têm script |
71
+ | `icons/*.svg`, `icons/icons.json` | Os 70 ícones |
72
+ | `tokens.json` | Os tokens da Foundation, para ler por código |
73
+
74
+ ## Uso
75
+
76
+ ### CSS
77
+
78
+ O jeito mais simples é tudo de uma vez:
79
+
80
+ ```js
81
+ import 'al-design-system'; // o mesmo que al-design-system/al.css
82
+ ```
83
+
84
+ Ou só o que o produto usa. A Foundation vem sempre primeiro, porque todo token de componente aponta para um token dela:
85
+
86
+ ```js
87
+ import 'al-design-system/foundation.css';
88
+ import 'al-design-system/components/button.css';
89
+ ```
90
+
91
+ Depois, a marcação usa as classes `.al-*`:
92
+
93
+ ```html
94
+ <button type="button" class="al-btn al-btn--primary al-btn--md">Salvar</button>
95
+ ```
96
+
97
+ A marcação exata de cada componente (qual elemento, quais atributos) está descrita no topo do CSS dele e no [site de documentação](https://al.guilhermedesignd.com).
98
+
99
+ ### Scripts
100
+
101
+ Password, Tab, Modal, Drawer, Sidebar, Breadcrumb, Tooltip, Toast e Alert precisam do script, carregado uma vez por página. Cada um liga sozinho os componentes que já estão na página:
102
+
103
+ ```html
104
+ <script src="node_modules/al-design-system/dist/components/modal.js" defer></script>
105
+ ```
106
+
107
+ Conteúdo inserido depois é ligado com `init`, por exemplo `window.alModals.init(elemento)`. Toast e Alert são abertos por código: `alToast.show(...)` e `alAlert.show(...)`. O uso de cada script está no topo do arquivo.
108
+
109
+ ### Tema
110
+
111
+ Sem nada no `<html>`, o tema segue o sistema operacional (`prefers-color-scheme`). Para forçar um:
112
+
113
+ ```html
114
+ <html data-theme="dark">
115
+ ```
116
+
117
+ ### Fontes
118
+
119
+ As fontes não vêm no pacote. A Foundation pede `Inter` e `JetBrains Mono`, com fontes do sistema como reserva. Carregar os arquivos de fonte fica com o produto, de preferência hospedados junto com ele.
120
+
121
+ ### Ícones
122
+
123
+ Os SVGs entram inline, com a classe `.al-icon` no próprio `<svg>`, para herdarem a cor do texto (o `<img>` não herda). O arquivo traz só o desenho. O contrato de acessibilidade é acrescentado por quem usa:
124
+
125
+ - decorativo: `aria-hidden="true" focusable="false"`;
126
+ - carrega sentido: `role="img"` e um `aria-label`.
127
+
128
+ ## Tokens
129
+
130
+ Três camadas, cada uma com um trabalho:
131
+
132
+ 1. **Primitiva**: as escalas de cor cruas, em OKLCH, numa única escada de lightness compartilhada por todas as famílias. Nenhum componente usa direto.
133
+ 2. **Semântica**: o papel (`bg-brand`, `text-secondary`, `border-focus`), com um valor por tema. É onde o tema é resolvido.
134
+ 3. **Componente**: um alias de um token semântico, um por papel do componente (`button-primary-bg-hover`). Nunca um hex solto.
135
+
136
+ No CSS, são custom properties com o prefixo `--al-`. O `tokens.json` tem os mesmos valores para quem quiser ler por código.
137
+
138
+ ## Acessibilidade
139
+
140
+ Os mínimos são os de contraste do WCAG: 4,5:1 para texto, 3:1 para ícone, borda e foco. Quando a cor da marca não chega ao mínimo, a exceção é nomeada uma a uma, nunca desce de 3:1 e é paga com uma regra de uso (um rótulo visível, um título, uma segunda pista). Quando um componente tem exceções, elas estão listadas nas diretrizes dele.
141
+
142
+ Além do contraste, cada componente tem um contrato de marcação conferido contra o HTML: o elemento nativo certo, um nome acessível, os atributos certos, nada interativo onde não deve.
143
+
144
+ ## Versionamento
145
+
146
+ O AL segue o versionamento semântico, lido assim:
147
+
148
+ - **terceira casa** (1.0.**1**): ajuste, sem componente ou camada nova;
149
+ - **casa do meio** (1.**1**.0): componente ou camada nova;
150
+ - **primeira casa** (**2**.0.0): mudança que quebra o que já existe.
151
+
152
+ O que mudou em cada versão está no [CHANGELOG](CHANGELOG.md).
153
+
154
+ ## Estrutura do repositório
155
+
156
+ ```
157
+ src/foundation/ a fonte da Foundation (cor, tipografia, espaçamento...) em Python
158
+ src/components/<nome>/ uma pasta por componente:
159
+ tokens.py os tokens do componente (alias da Foundation)
160
+ <nome>.css o CSS escrito à mão
161
+ <nome>.js o script, quando existe
162
+ check.py, a11y.py os portões (CSS literal, token órfão, contraste, marcação)
163
+ guidelines.md as regras de uso
164
+ site/ o gerador do site de documentação
165
+ tools/ o que o build compartilha (caminhos, montagem do dist)
166
+ build.py roda tudo, na ordem
167
+ build/ saída gerada (CSS, tokens, site)
168
+ dist/ o pacote que vai para o npm
169
+ ```
170
+
171
+ Para gerar a partir do código, basta o Python 3.9 ou mais novo, sem nenhum pacote para instalar:
172
+
173
+ ```bash
174
+ python3 build.py
175
+ ```
176
+
177
+ Ele regera tudo e roda todos os portões. Os detalhes estão no [CONTRIBUTING](CONTRIBUTING.md) (em inglês).
178
+
179
+ ## Licença
180
+
181
+ [MIT](LICENSE) © 2026 Guilherme Domingues. Os ícones vêm do [Lucide](https://lucide.dev) (ISC); ver [`icons/NOTICE`](src/components/icon/NOTICE).