al-design-system 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@ An open-source design system, from Figma to code. Plain CSS, a little vanilla Ja
10
10
 
11
11
  ## What it is
12
12
 
13
- - **Foundation + 29 components**, designed in Figma and coded from the same tokens.
13
+ - **Foundation + 30 components**, designed in Figma and coded from the same tokens.
14
14
  - **Light and dark themes** built in. It follows the operating system by default, and you can force one.
15
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
16
  - **Nothing is typed by hand.** Tokens, CSS variables, `tokens.json` and the documentation tables are all generated from one source.
@@ -48,6 +48,7 @@ An open-source design system, from Figma to code. Plain CSS, a little vanilla Ja
48
48
  | | Toast | ✓ | [guidelines](src/components/toast/guidelines.md) |
49
49
  | | Alert | ✓ | [guidelines](src/components/alert/guidelines.md) |
50
50
  | | Progress | | [guidelines](src/components/progress/guidelines.md) |
51
+ | | Empty state | | [guidelines](src/components/empty-state/guidelines.md) |
51
52
 
52
53
  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.
53
54
 
@@ -60,7 +61,7 @@ npm install al-design-system
60
61
  Or straight from a CDN, pinned to a version:
61
62
 
62
63
  ```html
63
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.6.0/dist/al.css">
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.7.0/dist/al.css">
64
65
  ```
65
66
 
66
67
  Each [GitHub Release](https://github.com/guilhermedworakowski/al-design-system/releases) also carries the `dist/` folder as a zip.
@@ -69,7 +70,7 @@ Each [GitHub Release](https://github.com/guilhermedworakowski/al-design-system/r
69
70
 
70
71
  | File | What it is |
71
72
  |---|---|
72
- | `al.css` | Foundation + all 29 components, in one file |
73
+ | `al.css` | Foundation + all 30 components, in one file |
73
74
  | `foundation.css` | Only the Foundation: color, typography, spacing, radius, icon size, elevation, focus ring and motion |
74
75
  | `components/<name>.css` | One component (its tokens + its CSS) |
75
76
  | `components/<name>.js` | The behavior, for the 11 components that have a script |
package/README.pt-BR.md CHANGED
@@ -10,7 +10,7 @@ Design system open source, do Figma ao código. CSS puro, um pouco de JavaScript
10
10
 
11
11
  ## O que é
12
12
 
13
- - **Foundation + 29 componentes**, desenhados no Figma e codados a partir dos mesmos tokens.
13
+ - **Foundation + 30 componentes**, desenhados no Figma e codados a partir dos mesmos tokens.
14
14
  - **Temas claro e escuro** já incluídos. Por padrão segue o sistema operacional, e dá para forçar um.
15
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
16
  - **Nada é digitado à mão.** Tokens, variáveis CSS, `tokens.json` e as tabelas da documentação saem todos de uma fonte só.
@@ -48,6 +48,7 @@ Design system open source, do Figma ao código. CSS puro, um pouco de JavaScript
48
48
  | | Toast | ✓ | [diretrizes](src/components/toast/guidelines.md) |
49
49
  | | Alert | ✓ | [diretrizes](src/components/alert/guidelines.md) |
50
50
  | | Progress | | [diretrizes](src/components/progress/guidelines.md) |
51
+ | | Empty state | | [diretrizes](src/components/empty-state/guidelines.md) |
51
52
 
52
53
  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.
53
54
 
@@ -60,7 +61,7 @@ npm install al-design-system
60
61
  Ou direto de uma CDN, fixado numa versão:
61
62
 
62
63
  ```html
63
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.6.0/dist/al.css">
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.7.0/dist/al.css">
64
65
  ```
65
66
 
66
67
  Cada [Release no GitHub](https://github.com/guilhermedworakowski/al-design-system/releases) também traz a pasta `dist/` num zip.
@@ -69,7 +70,7 @@ Cada [Release no GitHub](https://github.com/guilhermedworakowski/al-design-syste
69
70
 
70
71
  | Arquivo | O que é |
71
72
  |---|---|
72
- | `al.css` | Foundation + os 29 componentes, num arquivo só |
73
+ | `al.css` | Foundation + os 30 componentes, num arquivo só |
73
74
  | `foundation.css` | Só a Foundation: cor, tipografia, espaçamento, radius, tamanho de ícone, elevação, anel de foco e motion |
74
75
  | `components/<nome>.css` | Um componente (os tokens + o CSS dele) |
75
76
  | `components/<nome>.js` | O comportamento, para os 11 componentes que têm script |
package/dist/al.css CHANGED
@@ -1,8 +1,8 @@
1
- /* AL Design System 1.6.0 - Foundation + 29 components.
1
+ /* AL Design System 1.7.0 - Foundation + 30 components.
2
2
  * MIT. https://github.com/guilhermedworakowski/al-design-system
3
3
  */
4
4
  /* AL Design System - Foundation
5
- * v1.6.0 - MIT
5
+ * v1.7.0 - MIT
6
6
  * GENERATED by src/foundation/css.py. Do not edit by hand: run the script.
7
7
  */
8
8
 
@@ -8109,3 +8109,147 @@
8109
8109
  clip-path: inset(50%);
8110
8110
  white-space: nowrap;
8111
8111
  }
8112
+
8113
+ /* AL Design System - Empty state tokens
8114
+ * GENERATED by src/components/empty-state/tokens.py. Do not edit by hand.
8115
+ *
8116
+ * Every color is a semantic the theme switches on :root.
8117
+ */
8118
+
8119
+ :root {
8120
+ /* color */
8121
+ --al-empty-state-bg: var(--al-bg-surface-raised);
8122
+ --al-empty-state-border: var(--al-border-default);
8123
+ --al-empty-state-icon: var(--al-text-primary);
8124
+ --al-empty-state-title: var(--al-text-primary);
8125
+ --al-empty-state-description: var(--al-text-secondary);
8126
+
8127
+ /* geometry */
8128
+ --al-empty-state-border-width: var(--al-border-width-1);
8129
+ --al-empty-state-radius: var(--al-radius-3xl);
8130
+ --al-empty-state-padding: var(--al-space-48);
8131
+ --al-empty-state-icon-size: var(--al-icon-size-32);
8132
+ --al-empty-state-gap-icon: var(--al-space-16);
8133
+ --al-empty-state-gap-text: var(--al-space-8);
8134
+ --al-empty-state-gap-action: var(--al-space-24);
8135
+
8136
+ /* width - declared value, no scale in the Foundation */
8137
+ --al-empty-state-max-width: 600px;
8138
+
8139
+ /* typography - one style becomes four vars */
8140
+ --al-empty-state-title-font-size: var(--al-font-size-xl);
8141
+ --al-empty-state-title-line-height: var(--al-line-height-xl);
8142
+ --al-empty-state-title-font-weight: 600;
8143
+ --al-empty-state-title-tracking: -0.01em;
8144
+ --al-empty-state-description-font-size: var(--al-font-size-md);
8145
+ --al-empty-state-description-line-height: var(--al-line-height-md);
8146
+ --al-empty-state-description-font-weight: 400;
8147
+ --al-empty-state-description-tracking: 0em;
8148
+ }
8149
+
8150
+ /* AL Design System - Empty state
8151
+ * Written by hand. Depends on al-foundation.css and al-empty-state-tokens.css,
8152
+ * in that order.
8153
+ *
8154
+ * No value here is literal: color, space, radius and typography come in
8155
+ * through var(--al-empty-state-*). The check.py next to it rejects the file if
8156
+ * any escapes.
8157
+ *
8158
+ * MARKUP CONTRACT
8159
+ *
8160
+ * <section class="al-empty-state" aria-labelledby="es-title">
8161
+ * <svg class="al-empty-state__icon" aria-hidden="true">...</svg>
8162
+ * <div class="al-empty-state__text">
8163
+ * <h2 class="al-empty-state__title" id="es-title">No projects yet</h2>
8164
+ * <p class="al-empty-state__description">Projects you create show up
8165
+ * here.</p>
8166
+ * </div>
8167
+ * <button class="al-btn al-btn--primary al-btn--md" type="button">
8168
+ * <span class="al-btn__label">Create project</span>
8169
+ * </button>
8170
+ * </section>
8171
+ *
8172
+ * Icon, description and button are optional (rules 9, 13, 16). At most one
8173
+ * button, always Primary (rule 15). No Link inside: Figma has none, and a
8174
+ * second action has no place here (rule 18).
8175
+ *
8176
+ * After a search or filter (decision A=a), the empty state is rendered into
8177
+ * a container with role="status", so it is announced once. On first load it
8178
+ * is static, with no role.
8179
+ *
8180
+ * THE TITLE IS ALWAYS A HEADING (B=a), THE LEVEL BELONGS TO THE PAGE
8181
+ * The class doesn't pin a tag (rule 19), same as the Card.
8182
+ *
8183
+ * THE BORDER IS OUTSIDE
8184
+ * In Figma the stroke is OUTSIDE. Here it is a 1px shadow with no blur, the
8185
+ * same as the Card Border: the 48 of padding discounts nothing.
8186
+ *
8187
+ * ONLY ON bg-canvas OR bg-surface (rule 5). Nothing here stops it; it is a
8188
+ * usage rule.
8189
+ *
8190
+ * HIGH CONTRAST
8191
+ * In `forced-colors` the shadow is removed and the box would vanish: it
8192
+ * gets an outline in the system's text color, the same as the Card.
8193
+ */
8194
+
8195
+ .al-empty-state {
8196
+ box-sizing: border-box;
8197
+ display: flex;
8198
+ flex-direction: column;
8199
+ align-items: center;
8200
+ gap: var(--al-empty-state-gap-action);
8201
+ width: 100%;
8202
+ max-width: var(--al-empty-state-max-width);
8203
+ margin-inline: auto;
8204
+ padding: var(--al-empty-state-padding);
8205
+ border-radius: var(--al-empty-state-radius);
8206
+ background-color: var(--al-empty-state-bg);
8207
+ box-shadow: 0 0 0 var(--al-empty-state-border-width) var(--al-empty-state-border);
8208
+ text-align: center;
8209
+ }
8210
+
8211
+ /* The box gap is gap-action (text -> button). Icon -> text is shorter, so the
8212
+ text block pulls itself up by the difference (24 - 16 = 8). */
8213
+ .al-empty-state__icon {
8214
+ flex: none;
8215
+ width: var(--al-empty-state-icon-size);
8216
+ height: var(--al-empty-state-icon-size);
8217
+ color: var(--al-empty-state-icon);
8218
+ }
8219
+
8220
+ .al-empty-state__icon + .al-empty-state__text {
8221
+ margin-top: calc(var(--al-empty-state-gap-icon) - var(--al-empty-state-gap-action));
8222
+ }
8223
+
8224
+ .al-empty-state__text {
8225
+ display: flex;
8226
+ flex-direction: column;
8227
+ gap: var(--al-empty-state-gap-text);
8228
+ }
8229
+
8230
+ .al-empty-state__title {
8231
+ margin: 0;
8232
+ font-family: var(--al-font-sans);
8233
+ font-size: var(--al-empty-state-title-font-size);
8234
+ line-height: var(--al-empty-state-title-line-height);
8235
+ font-weight: var(--al-empty-state-title-font-weight);
8236
+ letter-spacing: var(--al-empty-state-title-tracking);
8237
+ color: var(--al-empty-state-title);
8238
+ }
8239
+
8240
+ .al-empty-state__description {
8241
+ margin: 0;
8242
+ font-family: var(--al-font-sans);
8243
+ font-size: var(--al-empty-state-description-font-size);
8244
+ line-height: var(--al-empty-state-description-line-height);
8245
+ font-weight: var(--al-empty-state-description-font-weight);
8246
+ letter-spacing: var(--al-empty-state-description-tracking);
8247
+ color: var(--al-empty-state-description);
8248
+ }
8249
+
8250
+ /* ---------------------------------------------------------- high contrast */
8251
+ @media (forced-colors: active) {
8252
+ .al-empty-state {
8253
+ outline: var(--al-empty-state-border-width) solid CanvasText;
8254
+ }
8255
+ }
@@ -0,0 +1,143 @@
1
+ /* AL Design System - Empty state tokens
2
+ * GENERATED by src/components/empty-state/tokens.py. Do not edit by hand.
3
+ *
4
+ * Every color is a semantic the theme switches on :root.
5
+ */
6
+
7
+ :root {
8
+ /* color */
9
+ --al-empty-state-bg: var(--al-bg-surface-raised);
10
+ --al-empty-state-border: var(--al-border-default);
11
+ --al-empty-state-icon: var(--al-text-primary);
12
+ --al-empty-state-title: var(--al-text-primary);
13
+ --al-empty-state-description: var(--al-text-secondary);
14
+
15
+ /* geometry */
16
+ --al-empty-state-border-width: var(--al-border-width-1);
17
+ --al-empty-state-radius: var(--al-radius-3xl);
18
+ --al-empty-state-padding: var(--al-space-48);
19
+ --al-empty-state-icon-size: var(--al-icon-size-32);
20
+ --al-empty-state-gap-icon: var(--al-space-16);
21
+ --al-empty-state-gap-text: var(--al-space-8);
22
+ --al-empty-state-gap-action: var(--al-space-24);
23
+
24
+ /* width - declared value, no scale in the Foundation */
25
+ --al-empty-state-max-width: 600px;
26
+
27
+ /* typography - one style becomes four vars */
28
+ --al-empty-state-title-font-size: var(--al-font-size-xl);
29
+ --al-empty-state-title-line-height: var(--al-line-height-xl);
30
+ --al-empty-state-title-font-weight: 600;
31
+ --al-empty-state-title-tracking: -0.01em;
32
+ --al-empty-state-description-font-size: var(--al-font-size-md);
33
+ --al-empty-state-description-line-height: var(--al-line-height-md);
34
+ --al-empty-state-description-font-weight: 400;
35
+ --al-empty-state-description-tracking: 0em;
36
+ }
37
+
38
+ /* AL Design System - Empty state
39
+ * Written by hand. Depends on al-foundation.css and al-empty-state-tokens.css,
40
+ * in that order.
41
+ *
42
+ * No value here is literal: color, space, radius and typography come in
43
+ * through var(--al-empty-state-*). The check.py next to it rejects the file if
44
+ * any escapes.
45
+ *
46
+ * MARKUP CONTRACT
47
+ *
48
+ * <section class="al-empty-state" aria-labelledby="es-title">
49
+ * <svg class="al-empty-state__icon" aria-hidden="true">...</svg>
50
+ * <div class="al-empty-state__text">
51
+ * <h2 class="al-empty-state__title" id="es-title">No projects yet</h2>
52
+ * <p class="al-empty-state__description">Projects you create show up
53
+ * here.</p>
54
+ * </div>
55
+ * <button class="al-btn al-btn--primary al-btn--md" type="button">
56
+ * <span class="al-btn__label">Create project</span>
57
+ * </button>
58
+ * </section>
59
+ *
60
+ * Icon, description and button are optional (rules 9, 13, 16). At most one
61
+ * button, always Primary (rule 15). No Link inside: Figma has none, and a
62
+ * second action has no place here (rule 18).
63
+ *
64
+ * After a search or filter (decision A=a), the empty state is rendered into
65
+ * a container with role="status", so it is announced once. On first load it
66
+ * is static, with no role.
67
+ *
68
+ * THE TITLE IS ALWAYS A HEADING (B=a), THE LEVEL BELONGS TO THE PAGE
69
+ * The class doesn't pin a tag (rule 19), same as the Card.
70
+ *
71
+ * THE BORDER IS OUTSIDE
72
+ * In Figma the stroke is OUTSIDE. Here it is a 1px shadow with no blur, the
73
+ * same as the Card Border: the 48 of padding discounts nothing.
74
+ *
75
+ * ONLY ON bg-canvas OR bg-surface (rule 5). Nothing here stops it; it is a
76
+ * usage rule.
77
+ *
78
+ * HIGH CONTRAST
79
+ * In `forced-colors` the shadow is removed and the box would vanish: it
80
+ * gets an outline in the system's text color, the same as the Card.
81
+ */
82
+
83
+ .al-empty-state {
84
+ box-sizing: border-box;
85
+ display: flex;
86
+ flex-direction: column;
87
+ align-items: center;
88
+ gap: var(--al-empty-state-gap-action);
89
+ width: 100%;
90
+ max-width: var(--al-empty-state-max-width);
91
+ margin-inline: auto;
92
+ padding: var(--al-empty-state-padding);
93
+ border-radius: var(--al-empty-state-radius);
94
+ background-color: var(--al-empty-state-bg);
95
+ box-shadow: 0 0 0 var(--al-empty-state-border-width) var(--al-empty-state-border);
96
+ text-align: center;
97
+ }
98
+
99
+ /* The box gap is gap-action (text -> button). Icon -> text is shorter, so the
100
+ text block pulls itself up by the difference (24 - 16 = 8). */
101
+ .al-empty-state__icon {
102
+ flex: none;
103
+ width: var(--al-empty-state-icon-size);
104
+ height: var(--al-empty-state-icon-size);
105
+ color: var(--al-empty-state-icon);
106
+ }
107
+
108
+ .al-empty-state__icon + .al-empty-state__text {
109
+ margin-top: calc(var(--al-empty-state-gap-icon) - var(--al-empty-state-gap-action));
110
+ }
111
+
112
+ .al-empty-state__text {
113
+ display: flex;
114
+ flex-direction: column;
115
+ gap: var(--al-empty-state-gap-text);
116
+ }
117
+
118
+ .al-empty-state__title {
119
+ margin: 0;
120
+ font-family: var(--al-font-sans);
121
+ font-size: var(--al-empty-state-title-font-size);
122
+ line-height: var(--al-empty-state-title-line-height);
123
+ font-weight: var(--al-empty-state-title-font-weight);
124
+ letter-spacing: var(--al-empty-state-title-tracking);
125
+ color: var(--al-empty-state-title);
126
+ }
127
+
128
+ .al-empty-state__description {
129
+ margin: 0;
130
+ font-family: var(--al-font-sans);
131
+ font-size: var(--al-empty-state-description-font-size);
132
+ line-height: var(--al-empty-state-description-line-height);
133
+ font-weight: var(--al-empty-state-description-font-weight);
134
+ letter-spacing: var(--al-empty-state-description-tracking);
135
+ color: var(--al-empty-state-description);
136
+ }
137
+
138
+ /* ---------------------------------------------------------- high contrast */
139
+ @media (forced-colors: active) {
140
+ .al-empty-state {
141
+ outline: var(--al-empty-state-border-width) solid CanvasText;
142
+ }
143
+ }
@@ -1,5 +1,5 @@
1
1
  /* AL Design System - Foundation
2
- * v1.6.0 - MIT
2
+ * v1.7.0 - MIT
3
3
  * GENERATED by src/foundation/css.py. Do not edit by hand: run the script.
4
4
  */
5
5
 
package/dist/tokens.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "AL Design System",
4
- "version": "1.6.0",
4
+ "version": "1.7.0",
5
5
  "license": "MIT",
6
6
  "brandAnchor": "#FC5000",
7
7
  "colorSpace": "OKLCH",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "al-design-system",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "AL Design System: Foundation and components in plain CSS, from Figma to code.",
5
5
  "license": "MIT",
6
6
  "author": "Guilherme Domingues",