al-design-system 0.0.0-stage → 1.0.1

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 (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +179 -2
  3. package/README.pt-BR.md +180 -0
  4. package/dist/al.css +6827 -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/modal.css +264 -0
  21. package/dist/components/modal.js +101 -0
  22. package/dist/components/password.css +382 -0
  23. package/dist/components/password.js +65 -0
  24. package/dist/components/radio.css +305 -0
  25. package/dist/components/select.css +344 -0
  26. package/dist/components/sidebar.css +374 -0
  27. package/dist/components/sidebar.js +108 -0
  28. package/dist/components/switch.css +282 -0
  29. package/dist/components/tab.css +261 -0
  30. package/dist/components/tab.js +115 -0
  31. package/dist/components/tag.css +325 -0
  32. package/dist/components/textarea.css +354 -0
  33. package/dist/components/toast.css +244 -0
  34. package/dist/components/toast.js +203 -0
  35. package/dist/components/tooltip.css +168 -0
  36. package/dist/components/tooltip.js +168 -0
  37. package/dist/foundation.css +368 -0
  38. package/dist/icons/NOTICE +21 -0
  39. package/dist/icons/arrow-down.svg +2 -0
  40. package/dist/icons/arrow-left.svg +2 -0
  41. package/dist/icons/arrow-right.svg +2 -0
  42. package/dist/icons/arrow-up-down.svg +2 -0
  43. package/dist/icons/arrow-up-right.svg +2 -0
  44. package/dist/icons/arrow-up.svg +2 -0
  45. package/dist/icons/bell.svg +2 -0
  46. package/dist/icons/bookmark.svg +2 -0
  47. package/dist/icons/calendar.svg +2 -0
  48. package/dist/icons/chart-column.svg +2 -0
  49. package/dist/icons/check.svg +2 -0
  50. package/dist/icons/chevron-down.svg +2 -0
  51. package/dist/icons/chevron-left.svg +2 -0
  52. package/dist/icons/chevron-right.svg +2 -0
  53. package/dist/icons/chevron-up.svg +2 -0
  54. package/dist/icons/chevrons-left.svg +2 -0
  55. package/dist/icons/chevrons-right.svg +2 -0
  56. package/dist/icons/circle-alert.svg +2 -0
  57. package/dist/icons/circle-check.svg +2 -0
  58. package/dist/icons/circle-help.svg +2 -0
  59. package/dist/icons/circle-x.svg +2 -0
  60. package/dist/icons/clock.svg +2 -0
  61. package/dist/icons/copy.svg +2 -0
  62. package/dist/icons/credit-card.svg +2 -0
  63. package/dist/icons/download.svg +2 -0
  64. package/dist/icons/ellipsis-vertical.svg +2 -0
  65. package/dist/icons/ellipsis.svg +2 -0
  66. package/dist/icons/external-link.svg +2 -0
  67. package/dist/icons/eye-off.svg +2 -0
  68. package/dist/icons/eye.svg +2 -0
  69. package/dist/icons/file-text.svg +2 -0
  70. package/dist/icons/filter.svg +2 -0
  71. package/dist/icons/folder.svg +2 -0
  72. package/dist/icons/globe.svg +2 -0
  73. package/dist/icons/heart.svg +2 -0
  74. package/dist/icons/house.svg +2 -0
  75. package/dist/icons/icons.json +81 -0
  76. package/dist/icons/image.svg +2 -0
  77. package/dist/icons/info.svg +2 -0
  78. package/dist/icons/link.svg +2 -0
  79. package/dist/icons/loader-circle.svg +2 -0
  80. package/dist/icons/lock.svg +2 -0
  81. package/dist/icons/log-in.svg +2 -0
  82. package/dist/icons/log-out.svg +2 -0
  83. package/dist/icons/mail.svg +2 -0
  84. package/dist/icons/map-pin.svg +2 -0
  85. package/dist/icons/maximize.svg +2 -0
  86. package/dist/icons/menu.svg +2 -0
  87. package/dist/icons/minus.svg +2 -0
  88. package/dist/icons/paperclip.svg +2 -0
  89. package/dist/icons/pause.svg +2 -0
  90. package/dist/icons/pencil.svg +2 -0
  91. package/dist/icons/phone.svg +2 -0
  92. package/dist/icons/play.svg +2 -0
  93. package/dist/icons/plus.svg +2 -0
  94. package/dist/icons/refresh-cw.svg +2 -0
  95. package/dist/icons/search.svg +2 -0
  96. package/dist/icons/send.svg +2 -0
  97. package/dist/icons/settings.svg +2 -0
  98. package/dist/icons/share-2.svg +2 -0
  99. package/dist/icons/shield-check.svg +2 -0
  100. package/dist/icons/shopping-cart.svg +2 -0
  101. package/dist/icons/skip-forward.svg +2 -0
  102. package/dist/icons/star.svg +2 -0
  103. package/dist/icons/trash.svg +2 -0
  104. package/dist/icons/triangle-alert.svg +2 -0
  105. package/dist/icons/upload.svg +2 -0
  106. package/dist/icons/user.svg +2 -0
  107. package/dist/icons/users.svg +2 -0
  108. package/dist/icons/volume-2.svg +2 -0
  109. package/dist/icons/x.svg +2 -0
  110. package/dist/tokens.json +1617 -0
  111. 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,180 @@
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 + 23 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
+ | | Tag | | [guidelines](src/components/tag/guidelines.md) |
26
+ | | Avatar | | [guidelines](src/components/avatar/guidelines.md) |
27
+ | Forms | Select | | [guidelines](src/components/select/guidelines.md) |
28
+ | | Checkbox | | [guidelines](src/components/checkbox/guidelines.md) |
29
+ | | Radio | | [guidelines](src/components/radio/guidelines.md) |
30
+ | | Switch | | [guidelines](src/components/switch/guidelines.md) |
31
+ | | Input | | [guidelines](src/components/input/guidelines.md) |
32
+ | | Textarea | | [guidelines](src/components/textarea/guidelines.md) |
33
+ | | Password | ✓ | [guidelines](src/components/password/guidelines.md) |
34
+ | Structure and overlays | Divider | | [guidelines](src/components/divider/guidelines.md) |
35
+ | | Card | | [guidelines](src/components/card/guidelines.md) |
36
+ | | Tab | ✓ | [guidelines](src/components/tab/guidelines.md) |
37
+ | | Accordion | | [guidelines](src/components/accordion/guidelines.md) |
38
+ | | Modal | ✓ | [guidelines](src/components/modal/guidelines.md) |
39
+ | | Drawer | ✓ | [guidelines](src/components/drawer/guidelines.md) |
40
+ | Navigation | Sidebar | ✓ | [guidelines](src/components/sidebar/guidelines.md) |
41
+ | | Breadcrumb | ✓ | [guidelines](src/components/breadcrumb/guidelines.md) |
42
+ | Feedback | Tooltip | ✓ | [guidelines](src/components/tooltip/guidelines.md) |
43
+ | | Toast | ✓ | [guidelines](src/components/toast/guidelines.md) |
44
+ | | Alert | ✓ | [guidelines](src/components/alert/guidelines.md) |
45
+
46
+ 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.
47
+
48
+ ## Install
49
+
50
+ ```bash
51
+ npm install al-design-system
52
+ ```
53
+
54
+ Or straight from a CDN, pinned to a version:
55
+
56
+ ```html
57
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.0.1/dist/al.css">
58
+ ```
59
+
60
+ Each [GitHub Release](https://github.com/guilhermedworakowski/al-design-system/releases) also carries the `dist/` folder as a zip.
61
+
62
+ ### What's in the package
63
+
64
+ | File | What it is |
65
+ |---|---|
66
+ | `al.css` | Foundation + all 23 components, in one file |
67
+ | `foundation.css` | Only the Foundation: color, typography, spacing, radius, icon size, elevation, focus ring and motion |
68
+ | `components/<name>.css` | One component (its tokens + its CSS) |
69
+ | `components/<name>.js` | The behavior, for the 9 components that have a script |
70
+ | `icons/*.svg`, `icons/icons.json` | The 70 icons |
71
+ | `tokens.json` | The Foundation tokens, to read from code |
72
+
73
+ ## Usage
74
+
75
+ ### CSS
76
+
77
+ The simplest way is the whole thing:
78
+
79
+ ```js
80
+ import 'al-design-system'; // same as al-design-system/al.css
81
+ ```
82
+
83
+ Or only what the product uses. The Foundation always comes first, because every component token points to one of its tokens:
84
+
85
+ ```js
86
+ import 'al-design-system/foundation.css';
87
+ import 'al-design-system/components/button.css';
88
+ ```
89
+
90
+ Then the markup uses the `.al-*` classes:
91
+
92
+ ```html
93
+ <button type="button" class="al-btn al-btn--primary al-btn--md">Save</button>
94
+ ```
95
+
96
+ 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).
97
+
98
+ ### Scripts
99
+
100
+ 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:
101
+
102
+ ```html
103
+ <script src="node_modules/al-design-system/dist/components/modal.js" defer></script>
104
+ ```
105
+
106
+ 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.
107
+
108
+ ### Theme
109
+
110
+ Without anything on `<html>`, the theme follows the operating system (`prefers-color-scheme`). To force one:
111
+
112
+ ```html
113
+ <html data-theme="dark">
114
+ ```
115
+
116
+ ### Fonts
117
+
118
+ 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.
119
+
120
+ ### Icons
121
+
122
+ 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:
123
+
124
+ - decorative: `aria-hidden="true" focusable="false"`;
125
+ - carries meaning: `role="img"` and an `aria-label`.
126
+
127
+ ## Tokens
128
+
129
+ Three layers, each with one job:
130
+
131
+ 1. **Primitive**: the raw color ramps, in OKLCH, on a single lightness scale shared by every family. No component uses them directly.
132
+ 2. **Semantic**: the role (`bg-brand`, `text-secondary`, `border-focus`), with one value per theme. This is where the theme is resolved.
133
+ 3. **Component**: an alias of a semantic token, one per role in the component (`button-primary-bg-hover`). Never a loose hex value.
134
+
135
+ In CSS they are custom properties prefixed with `--al-`. `tokens.json` has the same values for anyone who wants to read them from code.
136
+
137
+ ## Accessibility
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ ## Versioning
144
+
145
+ AL follows semantic versioning, read like this:
146
+
147
+ - **third digit** (1.0.**1**): an adjustment, with no new component or layer;
148
+ - **middle digit** (1.**1**.0): a new component or layer;
149
+ - **first digit** (**2**.0.0): a change that breaks what already exists.
150
+
151
+ What changed in each version is in the [CHANGELOG](CHANGELOG.md).
152
+
153
+ ## Repository structure
154
+
155
+ ```
156
+ src/foundation/ the Foundation source (color, typography, spacing...) in Python
157
+ src/components/<name>/ one folder per component:
158
+ tokens.py the component tokens (aliases of the Foundation)
159
+ <name>.css the handwritten CSS
160
+ <name>.js the script, when there is one
161
+ check.py, a11y.py the gates (literal CSS, orphan tokens, contrast, markup)
162
+ guidelines.md the usage rules
163
+ site/ the documentation site generator
164
+ tools/ what the build shares (paths, dist assembly)
165
+ build.py runs everything, in order
166
+ build/ generated output (CSS, tokens, site)
167
+ dist/ the package that goes to npm
168
+ ```
169
+
170
+ To build from source you only need Python 3.9 or later, with no packages to install:
171
+
172
+ ```bash
173
+ python3 build.py
174
+ ```
175
+
176
+ It regenerates everything and runs every gate. Details are in [CONTRIBUTING](CONTRIBUTING.md).
177
+
178
+ ## License
179
+
180
+ [MIT](LICENSE) © 2026 Guilherme Domingues. The icons come from [Lucide](https://lucide.dev) (ISC); see [`icons/NOTICE`](src/components/icon/NOTICE).
@@ -0,0 +1,180 @@
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 + 23 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
+ | | Tag | | [diretrizes](src/components/tag/guidelines.md) |
26
+ | | Avatar | | [diretrizes](src/components/avatar/guidelines.md) |
27
+ | Formulários | Select | | [diretrizes](src/components/select/guidelines.md) |
28
+ | | Checkbox | | [diretrizes](src/components/checkbox/guidelines.md) |
29
+ | | Radio | | [diretrizes](src/components/radio/guidelines.md) |
30
+ | | Switch | | [diretrizes](src/components/switch/guidelines.md) |
31
+ | | Input | | [diretrizes](src/components/input/guidelines.md) |
32
+ | | Textarea | | [diretrizes](src/components/textarea/guidelines.md) |
33
+ | | Password | ✓ | [diretrizes](src/components/password/guidelines.md) |
34
+ | Estrutura e sobreposição | Divider | | [diretrizes](src/components/divider/guidelines.md) |
35
+ | | Card | | [diretrizes](src/components/card/guidelines.md) |
36
+ | | Tab | ✓ | [diretrizes](src/components/tab/guidelines.md) |
37
+ | | Accordion | | [diretrizes](src/components/accordion/guidelines.md) |
38
+ | | Modal | ✓ | [diretrizes](src/components/modal/guidelines.md) |
39
+ | | Drawer | ✓ | [diretrizes](src/components/drawer/guidelines.md) |
40
+ | Navegação | Sidebar | ✓ | [diretrizes](src/components/sidebar/guidelines.md) |
41
+ | | Breadcrumb | ✓ | [diretrizes](src/components/breadcrumb/guidelines.md) |
42
+ | Feedback | Tooltip | ✓ | [diretrizes](src/components/tooltip/guidelines.md) |
43
+ | | Toast | ✓ | [diretrizes](src/components/toast/guidelines.md) |
44
+ | | Alert | ✓ | [diretrizes](src/components/alert/guidelines.md) |
45
+
46
+ 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.
47
+
48
+ ## Instalação
49
+
50
+ ```bash
51
+ npm install al-design-system
52
+ ```
53
+
54
+ Ou direto de uma CDN, fixado numa versão:
55
+
56
+ ```html
57
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.0.1/dist/al.css">
58
+ ```
59
+
60
+ Cada [Release no GitHub](https://github.com/guilhermedworakowski/al-design-system/releases) também traz a pasta `dist/` num zip.
61
+
62
+ ### O que vem no pacote
63
+
64
+ | Arquivo | O que é |
65
+ |---|---|
66
+ | `al.css` | Foundation + os 23 componentes, num arquivo só |
67
+ | `foundation.css` | Só a Foundation: cor, tipografia, espaçamento, radius, tamanho de ícone, elevação, anel de foco e motion |
68
+ | `components/<nome>.css` | Um componente (os tokens + o CSS dele) |
69
+ | `components/<nome>.js` | O comportamento, para os 9 componentes que têm script |
70
+ | `icons/*.svg`, `icons/icons.json` | Os 70 ícones |
71
+ | `tokens.json` | Os tokens da Foundation, para ler por código |
72
+
73
+ ## Uso
74
+
75
+ ### CSS
76
+
77
+ O jeito mais simples é tudo de uma vez:
78
+
79
+ ```js
80
+ import 'al-design-system'; // o mesmo que al-design-system/al.css
81
+ ```
82
+
83
+ Ou só o que o produto usa. A Foundation vem sempre primeiro, porque todo token de componente aponta para um token dela:
84
+
85
+ ```js
86
+ import 'al-design-system/foundation.css';
87
+ import 'al-design-system/components/button.css';
88
+ ```
89
+
90
+ Depois, a marcação usa as classes `.al-*`:
91
+
92
+ ```html
93
+ <button type="button" class="al-btn al-btn--primary al-btn--md">Salvar</button>
94
+ ```
95
+
96
+ 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).
97
+
98
+ ### Scripts
99
+
100
+ 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:
101
+
102
+ ```html
103
+ <script src="node_modules/al-design-system/dist/components/modal.js" defer></script>
104
+ ```
105
+
106
+ 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.
107
+
108
+ ### Tema
109
+
110
+ Sem nada no `<html>`, o tema segue o sistema operacional (`prefers-color-scheme`). Para forçar um:
111
+
112
+ ```html
113
+ <html data-theme="dark">
114
+ ```
115
+
116
+ ### Fontes
117
+
118
+ 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.
119
+
120
+ ### Ícones
121
+
122
+ 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:
123
+
124
+ - decorativo: `aria-hidden="true" focusable="false"`;
125
+ - carrega sentido: `role="img"` e um `aria-label`.
126
+
127
+ ## Tokens
128
+
129
+ Três camadas, cada uma com um trabalho:
130
+
131
+ 1. **Primitiva**: as escalas de cor cruas, em OKLCH, numa única escada de lightness compartilhada por todas as famílias. Nenhum componente usa direto.
132
+ 2. **Semântica**: o papel (`bg-brand`, `text-secondary`, `border-focus`), com um valor por tema. É onde o tema é resolvido.
133
+ 3. **Componente**: um alias de um token semântico, um por papel do componente (`button-primary-bg-hover`). Nunca um hex solto.
134
+
135
+ No CSS, são custom properties com o prefixo `--al-`. O `tokens.json` tem os mesmos valores para quem quiser ler por código.
136
+
137
+ ## Acessibilidade
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ ## Versionamento
144
+
145
+ O AL segue o versionamento semântico, lido assim:
146
+
147
+ - **terceira casa** (1.0.**1**): ajuste, sem componente ou camada nova;
148
+ - **casa do meio** (1.**1**.0): componente ou camada nova;
149
+ - **primeira casa** (**2**.0.0): mudança que quebra o que já existe.
150
+
151
+ O que mudou em cada versão está no [CHANGELOG](CHANGELOG.md).
152
+
153
+ ## Estrutura do repositório
154
+
155
+ ```
156
+ src/foundation/ a fonte da Foundation (cor, tipografia, espaçamento...) em Python
157
+ src/components/<nome>/ uma pasta por componente:
158
+ tokens.py os tokens do componente (alias da Foundation)
159
+ <nome>.css o CSS escrito à mão
160
+ <nome>.js o script, quando existe
161
+ check.py, a11y.py os portões (CSS literal, token órfão, contraste, marcação)
162
+ guidelines.md as regras de uso
163
+ site/ o gerador do site de documentação
164
+ tools/ o que o build compartilha (caminhos, montagem do dist)
165
+ build.py roda tudo, na ordem
166
+ build/ saída gerada (CSS, tokens, site)
167
+ dist/ o pacote que vai para o npm
168
+ ```
169
+
170
+ Para gerar a partir do código, basta o Python 3.9 ou mais novo, sem nenhum pacote para instalar:
171
+
172
+ ```bash
173
+ python3 build.py
174
+ ```
175
+
176
+ Ele regera tudo e roda todos os portões. Os detalhes estão no [CONTRIBUTING](CONTRIBUTING.md) (em inglês).
177
+
178
+ ## Licença
179
+
180
+ [MIT](LICENSE) © 2026 Guilherme Domingues. Os ícones vêm do [Lucide](https://lucide.dev) (ISC); ver [`icons/NOTICE`](src/components/icon/NOTICE).