al-design-system 1.5.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 + 28 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.
@@ -43,10 +43,12 @@ An open-source design system, from Figma to code. Plain CSS, a little vanilla Ja
43
43
  | Navigation | Sidebar | ✓ | [guidelines](src/components/sidebar/guidelines.md) |
44
44
  | | Breadcrumb | ✓ | [guidelines](src/components/breadcrumb/guidelines.md) |
45
45
  | | Pagination | | [guidelines](src/components/pagination/guidelines.md) |
46
+ | | Stepper | | [guidelines](src/components/stepper/guidelines.md) |
46
47
  | Feedback | Tooltip | ✓ | [guidelines](src/components/tooltip/guidelines.md) |
47
48
  | | Toast | ✓ | [guidelines](src/components/toast/guidelines.md) |
48
49
  | | Alert | ✓ | [guidelines](src/components/alert/guidelines.md) |
49
50
  | | Progress | | [guidelines](src/components/progress/guidelines.md) |
51
+ | | Empty state | | [guidelines](src/components/empty-state/guidelines.md) |
50
52
 
51
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.
52
54
 
@@ -59,7 +61,7 @@ npm install al-design-system
59
61
  Or straight from a CDN, pinned to a version:
60
62
 
61
63
  ```html
62
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.5.0/dist/al.css">
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.7.0/dist/al.css">
63
65
  ```
64
66
 
65
67
  Each [GitHub Release](https://github.com/guilhermedworakowski/al-design-system/releases) also carries the `dist/` folder as a zip.
@@ -68,7 +70,7 @@ Each [GitHub Release](https://github.com/guilhermedworakowski/al-design-system/r
68
70
 
69
71
  | File | What it is |
70
72
  |---|---|
71
- | `al.css` | Foundation + all 28 components, in one file |
73
+ | `al.css` | Foundation + all 30 components, in one file |
72
74
  | `foundation.css` | Only the Foundation: color, typography, spacing, radius, icon size, elevation, focus ring and motion |
73
75
  | `components/<name>.css` | One component (its tokens + its CSS) |
74
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 + 28 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ó.
@@ -43,10 +43,12 @@ Design system open source, do Figma ao código. CSS puro, um pouco de JavaScript
43
43
  | Navegação | Sidebar | ✓ | [diretrizes](src/components/sidebar/guidelines.md) |
44
44
  | | Breadcrumb | ✓ | [diretrizes](src/components/breadcrumb/guidelines.md) |
45
45
  | | Pagination | | [diretrizes](src/components/pagination/guidelines.md) |
46
+ | | Stepper | | [diretrizes](src/components/stepper/guidelines.md) |
46
47
  | Feedback | Tooltip | ✓ | [diretrizes](src/components/tooltip/guidelines.md) |
47
48
  | | Toast | ✓ | [diretrizes](src/components/toast/guidelines.md) |
48
49
  | | Alert | ✓ | [diretrizes](src/components/alert/guidelines.md) |
49
50
  | | Progress | | [diretrizes](src/components/progress/guidelines.md) |
51
+ | | Empty state | | [diretrizes](src/components/empty-state/guidelines.md) |
50
52
 
51
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.
52
54
 
@@ -59,7 +61,7 @@ npm install al-design-system
59
61
  Ou direto de uma CDN, fixado numa versão:
60
62
 
61
63
  ```html
62
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.5.0/dist/al.css">
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/al-design-system@1.7.0/dist/al.css">
63
65
  ```
64
66
 
65
67
  Cada [Release no GitHub](https://github.com/guilhermedworakowski/al-design-system/releases) também traz a pasta `dist/` num zip.
@@ -68,7 +70,7 @@ Cada [Release no GitHub](https://github.com/guilhermedworakowski/al-design-syste
68
70
 
69
71
  | Arquivo | O que é |
70
72
  |---|---|
71
- | `al.css` | Foundation + os 28 componentes, num arquivo só |
73
+ | `al.css` | Foundation + os 30 componentes, num arquivo só |
72
74
  | `foundation.css` | Só a Foundation: cor, tipografia, espaçamento, radius, tamanho de ícone, elevação, anel de foco e motion |
73
75
  | `components/<nome>.css` | Um componente (os tokens + o CSS dele) |
74
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.5.0 - Foundation + 28 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.5.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
 
@@ -7844,3 +7844,412 @@
7844
7844
  transition: none;
7845
7845
  }
7846
7846
  }
7847
+
7848
+ /* AL Design System - Stepper tokens
7849
+ * GENERATED by src/components/stepper/tokens.py. Do not edit by hand.
7850
+ *
7851
+ * Every color is a semantic the theme switches on :root.
7852
+ */
7853
+
7854
+ :root {
7855
+ /* color */
7856
+ --al-stepper-label: var(--al-text-primary);
7857
+ --al-stepper-label-upcoming: var(--al-text-secondary);
7858
+ --al-stepper-description: var(--al-text-secondary);
7859
+ --al-stepper-completed-bg: var(--al-bg-brand-subtle);
7860
+ --al-stepper-completed-border: var(--al-border-brand);
7861
+ --al-stepper-completed-icon: var(--al-text-brand);
7862
+ --al-stepper-current-bg: var(--al-bg-brand);
7863
+ --al-stepper-current-number: var(--al-text-on-brand);
7864
+ --al-stepper-upcoming-bg: var(--al-bg-surface);
7865
+ --al-stepper-upcoming-border: var(--al-border-strong);
7866
+ --al-stepper-upcoming-number: var(--al-text-secondary);
7867
+ --al-stepper-connector: var(--al-border-default);
7868
+ --al-stepper-connector-done: var(--al-border-brand);
7869
+
7870
+ /* geometry */
7871
+ --al-stepper-indicator-size: var(--al-space-32);
7872
+ --al-stepper-indicator-radius: var(--al-radius-full);
7873
+ --al-stepper-indicator-border-width: var(--al-border-width-1);
7874
+ --al-stepper-icon-size: var(--al-icon-size-16);
7875
+ --al-stepper-connector-thickness: var(--al-border-width-1);
7876
+ --al-stepper-text-gap: var(--al-space-2);
7877
+ --al-stepper-horizontal-gap: var(--al-space-8);
7878
+ --al-stepper-horizontal-text-padding: var(--al-space-8);
7879
+ --al-stepper-vertical-gap: var(--al-space-12);
7880
+ --al-stepper-vertical-rail-gap: var(--al-space-4);
7881
+ --al-stepper-vertical-step-gap: var(--al-space-24);
7882
+
7883
+ /* type - title and number like label-md, description like body-sm */
7884
+ --al-stepper-font-size: var(--al-font-size-sm);
7885
+ --al-stepper-line-height: var(--al-line-height-sm);
7886
+ --al-stepper-font-weight: var(--al-font-weight-medium);
7887
+ --al-stepper-description-font-size: var(--al-font-size-sm);
7888
+ --al-stepper-description-line-height: var(--al-line-height-sm);
7889
+ --al-stepper-description-font-weight: var(--al-font-weight-regular);
7890
+ }
7891
+
7892
+ /* AL Design System - Stepper
7893
+ *
7894
+ * Depends on: al-foundation.css, al-stepper-tokens.css, al-icon-tokens.css + icon.css
7895
+ *
7896
+ * .al-stepper Horizontal - title under the circle, one line
7897
+ * .al-stepper--vertical Vertical - rail on the left, text on the right
7898
+ *
7899
+ * Markup (usage rules 17-19): an <ol> inside <nav aria-label="Progress">.
7900
+ * Status is a class on the step; the current one also carries
7901
+ * aria-current="step", and that attribute is what styles it, so the look can
7902
+ * never disagree with what is announced. Each step spells its status out in
7903
+ * hidden text - the check and the color say nothing to a screen reader.
7904
+ *
7905
+ * <nav aria-label="Progress">
7906
+ * <ol class="al-stepper">
7907
+ * <li class="al-stepper__step al-stepper__step--completed">
7908
+ * <span class="al-stepper__indicator">
7909
+ * <svg class="al-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">…check…</svg>
7910
+ * </span>
7911
+ * <span class="al-stepper__text">
7912
+ * <span class="al-stepper__label">Account</span>
7913
+ * <span class="al-stepper__status">completed</span>
7914
+ * <span class="al-stepper__description">Optional description</span>
7915
+ * </span>
7916
+ * </li>
7917
+ * <li class="al-stepper__step" aria-current="step">
7918
+ * <span class="al-stepper__indicator" aria-hidden="true">2</span> …
7919
+ * </li>
7920
+ * <li class="al-stepper__step"> … upcoming … </li>
7921
+ * </ol>
7922
+ * </nav>
7923
+ *
7924
+ * NOT CLICKABLE (rule 24): no hover, no focus, no link. Moving between steps
7925
+ * is the form's Back / Continue.
7926
+ *
7927
+ * ONE CONTINUOUS LINE (rule 15): each horizontal step draws half a line on
7928
+ * each side of its circle (::before / ::after) and the steps touch, so the
7929
+ * halves join. The line before a step is brand when the step is completed or
7930
+ * current; the line after, only when completed. The outer halves stay
7931
+ * unpainted - they keep the circle centered over the title.
7932
+ *
7933
+ * THE BORDER IS ALWAYS THERE: the current step paints it in its own fill, so
7934
+ * the circle never changes size between states.
7935
+ *
7936
+ * NO TOKEN, ON PURPOSE: the vertical text drops by (circle - line) / 2 so the
7937
+ * title's first line centers on the circle.
7938
+ */
7939
+
7940
+ .al-stepper {
7941
+ display: flex;
7942
+ margin: 0;
7943
+ padding: 0;
7944
+ list-style: none;
7945
+ font-family: var(--al-font-sans);
7946
+ }
7947
+
7948
+ /* ---------------------------------------------------------- horizontal */
7949
+ .al-stepper__step {
7950
+ display: grid;
7951
+ flex: 1 1 0;
7952
+ grid-template-columns: 1fr var(--al-stepper-indicator-size) 1fr;
7953
+ align-items: center;
7954
+ align-content: start;
7955
+ row-gap: var(--al-stepper-horizontal-gap);
7956
+ min-inline-size: 0;
7957
+ }
7958
+
7959
+ .al-stepper__step::before,
7960
+ .al-stepper__step::after {
7961
+ content: '';
7962
+ grid-row: 1;
7963
+ block-size: var(--al-stepper-connector-thickness);
7964
+ background-color: var(--al-stepper-connector);
7965
+ }
7966
+
7967
+ .al-stepper__step::before { grid-column: 1; }
7968
+ .al-stepper__step::after { grid-column: 3; }
7969
+
7970
+ .al-stepper__step--completed::before,
7971
+ .al-stepper__step--completed::after,
7972
+ .al-stepper__step[aria-current='step']::before {
7973
+ background-color: var(--al-stepper-connector-done);
7974
+ }
7975
+
7976
+ .al-stepper__step:first-child::before,
7977
+ .al-stepper__step:last-child::after {
7978
+ background-color: transparent;
7979
+ }
7980
+
7981
+ .al-stepper__indicator {
7982
+ grid-row: 1;
7983
+ grid-column: 2;
7984
+ }
7985
+
7986
+ .al-stepper__text {
7987
+ grid-row: 2;
7988
+ grid-column: 1 / -1;
7989
+ padding-inline: var(--al-stepper-horizontal-text-padding);
7990
+ text-align: center;
7991
+ }
7992
+
7993
+ /* ------------------------------------------------------------ vertical */
7994
+ .al-stepper--vertical {
7995
+ flex-direction: column;
7996
+ }
7997
+
7998
+ .al-stepper--vertical .al-stepper__step {
7999
+ flex: none;
8000
+ grid-template-columns: var(--al-stepper-indicator-size) 1fr;
8001
+ grid-template-rows: auto 1fr;
8002
+ align-items: start;
8003
+ column-gap: var(--al-stepper-vertical-gap);
8004
+ row-gap: 0;
8005
+ }
8006
+
8007
+ .al-stepper--vertical .al-stepper__step::before {
8008
+ display: none;
8009
+ }
8010
+
8011
+ .al-stepper--vertical .al-stepper__step::after {
8012
+ grid-row: 2;
8013
+ grid-column: 1;
8014
+ justify-self: center;
8015
+ align-self: stretch;
8016
+ inline-size: var(--al-stepper-connector-thickness);
8017
+ block-size: auto;
8018
+ margin-block: var(--al-stepper-vertical-rail-gap);
8019
+ }
8020
+
8021
+ .al-stepper--vertical .al-stepper__step:last-child::after {
8022
+ display: none;
8023
+ }
8024
+
8025
+ .al-stepper--vertical .al-stepper__indicator {
8026
+ grid-column: 1;
8027
+ }
8028
+
8029
+ .al-stepper--vertical .al-stepper__text {
8030
+ grid-row: 1 / span 2;
8031
+ grid-column: 2;
8032
+ padding-block: calc((var(--al-stepper-indicator-size) - var(--al-stepper-line-height)) / 2)
8033
+ var(--al-stepper-vertical-step-gap);
8034
+ padding-inline: 0;
8035
+ text-align: start;
8036
+ }
8037
+
8038
+ .al-stepper--vertical .al-stepper__step:last-child .al-stepper__text {
8039
+ padding-block-end: 0;
8040
+ }
8041
+
8042
+ /* ----------------------------------------------------------- indicator */
8043
+ .al-stepper__indicator {
8044
+ display: inline-flex;
8045
+ align-items: center;
8046
+ justify-content: center;
8047
+ box-sizing: border-box;
8048
+ inline-size: var(--al-stepper-indicator-size);
8049
+ block-size: var(--al-stepper-indicator-size);
8050
+ border: var(--al-stepper-indicator-border-width) solid var(--al-stepper-upcoming-border);
8051
+ border-radius: var(--al-stepper-indicator-radius);
8052
+ background-color: var(--al-stepper-upcoming-bg);
8053
+ color: var(--al-stepper-upcoming-number);
8054
+ font-size: var(--al-stepper-font-size);
8055
+ line-height: var(--al-stepper-line-height);
8056
+ font-weight: var(--al-stepper-font-weight);
8057
+ font-variant-numeric: tabular-nums;
8058
+ }
8059
+
8060
+ .al-stepper__indicator .al-icon {
8061
+ --al-icon-box: var(--al-stepper-icon-size);
8062
+ }
8063
+
8064
+ .al-stepper__step--completed .al-stepper__indicator {
8065
+ border-color: var(--al-stepper-completed-border);
8066
+ background-color: var(--al-stepper-completed-bg);
8067
+ color: var(--al-stepper-completed-icon);
8068
+ }
8069
+
8070
+ .al-stepper__step[aria-current='step'] .al-stepper__indicator {
8071
+ border-color: var(--al-stepper-current-bg);
8072
+ background-color: var(--al-stepper-current-bg);
8073
+ color: var(--al-stepper-current-number);
8074
+ }
8075
+
8076
+ /* ---------------------------------------------------------------- text */
8077
+ .al-stepper__text {
8078
+ display: flex;
8079
+ flex-direction: column;
8080
+ gap: var(--al-stepper-text-gap);
8081
+ }
8082
+
8083
+ .al-stepper__label {
8084
+ font-size: var(--al-stepper-font-size);
8085
+ line-height: var(--al-stepper-line-height);
8086
+ font-weight: var(--al-stepper-font-weight);
8087
+ color: var(--al-stepper-label-upcoming);
8088
+ }
8089
+
8090
+ .al-stepper__step--completed .al-stepper__label,
8091
+ .al-stepper__step[aria-current='step'] .al-stepper__label {
8092
+ color: var(--al-stepper-label);
8093
+ }
8094
+
8095
+ .al-stepper__description {
8096
+ font-size: var(--al-stepper-description-font-size);
8097
+ line-height: var(--al-stepper-description-line-height);
8098
+ font-weight: var(--al-stepper-description-font-weight);
8099
+ color: var(--al-stepper-description);
8100
+ }
8101
+
8102
+ /* Read, never seen (rule 19). One border-width is the 1px box the pattern
8103
+ needs; clip-path hides it. */
8104
+ .al-stepper__status {
8105
+ position: absolute;
8106
+ inline-size: var(--al-border-width-1);
8107
+ block-size: var(--al-border-width-1);
8108
+ overflow: hidden;
8109
+ clip-path: inset(50%);
8110
+ white-space: nowrap;
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
+ }
@@ -0,0 +1,264 @@
1
+ /* AL Design System - Stepper tokens
2
+ * GENERATED by src/components/stepper/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-stepper-label: var(--al-text-primary);
10
+ --al-stepper-label-upcoming: var(--al-text-secondary);
11
+ --al-stepper-description: var(--al-text-secondary);
12
+ --al-stepper-completed-bg: var(--al-bg-brand-subtle);
13
+ --al-stepper-completed-border: var(--al-border-brand);
14
+ --al-stepper-completed-icon: var(--al-text-brand);
15
+ --al-stepper-current-bg: var(--al-bg-brand);
16
+ --al-stepper-current-number: var(--al-text-on-brand);
17
+ --al-stepper-upcoming-bg: var(--al-bg-surface);
18
+ --al-stepper-upcoming-border: var(--al-border-strong);
19
+ --al-stepper-upcoming-number: var(--al-text-secondary);
20
+ --al-stepper-connector: var(--al-border-default);
21
+ --al-stepper-connector-done: var(--al-border-brand);
22
+
23
+ /* geometry */
24
+ --al-stepper-indicator-size: var(--al-space-32);
25
+ --al-stepper-indicator-radius: var(--al-radius-full);
26
+ --al-stepper-indicator-border-width: var(--al-border-width-1);
27
+ --al-stepper-icon-size: var(--al-icon-size-16);
28
+ --al-stepper-connector-thickness: var(--al-border-width-1);
29
+ --al-stepper-text-gap: var(--al-space-2);
30
+ --al-stepper-horizontal-gap: var(--al-space-8);
31
+ --al-stepper-horizontal-text-padding: var(--al-space-8);
32
+ --al-stepper-vertical-gap: var(--al-space-12);
33
+ --al-stepper-vertical-rail-gap: var(--al-space-4);
34
+ --al-stepper-vertical-step-gap: var(--al-space-24);
35
+
36
+ /* type - title and number like label-md, description like body-sm */
37
+ --al-stepper-font-size: var(--al-font-size-sm);
38
+ --al-stepper-line-height: var(--al-line-height-sm);
39
+ --al-stepper-font-weight: var(--al-font-weight-medium);
40
+ --al-stepper-description-font-size: var(--al-font-size-sm);
41
+ --al-stepper-description-line-height: var(--al-line-height-sm);
42
+ --al-stepper-description-font-weight: var(--al-font-weight-regular);
43
+ }
44
+
45
+ /* AL Design System - Stepper
46
+ *
47
+ * Depends on: al-foundation.css, al-stepper-tokens.css, al-icon-tokens.css + icon.css
48
+ *
49
+ * .al-stepper Horizontal - title under the circle, one line
50
+ * .al-stepper--vertical Vertical - rail on the left, text on the right
51
+ *
52
+ * Markup (usage rules 17-19): an <ol> inside <nav aria-label="Progress">.
53
+ * Status is a class on the step; the current one also carries
54
+ * aria-current="step", and that attribute is what styles it, so the look can
55
+ * never disagree with what is announced. Each step spells its status out in
56
+ * hidden text - the check and the color say nothing to a screen reader.
57
+ *
58
+ * <nav aria-label="Progress">
59
+ * <ol class="al-stepper">
60
+ * <li class="al-stepper__step al-stepper__step--completed">
61
+ * <span class="al-stepper__indicator">
62
+ * <svg class="al-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">…check…</svg>
63
+ * </span>
64
+ * <span class="al-stepper__text">
65
+ * <span class="al-stepper__label">Account</span>
66
+ * <span class="al-stepper__status">completed</span>
67
+ * <span class="al-stepper__description">Optional description</span>
68
+ * </span>
69
+ * </li>
70
+ * <li class="al-stepper__step" aria-current="step">
71
+ * <span class="al-stepper__indicator" aria-hidden="true">2</span> …
72
+ * </li>
73
+ * <li class="al-stepper__step"> … upcoming … </li>
74
+ * </ol>
75
+ * </nav>
76
+ *
77
+ * NOT CLICKABLE (rule 24): no hover, no focus, no link. Moving between steps
78
+ * is the form's Back / Continue.
79
+ *
80
+ * ONE CONTINUOUS LINE (rule 15): each horizontal step draws half a line on
81
+ * each side of its circle (::before / ::after) and the steps touch, so the
82
+ * halves join. The line before a step is brand when the step is completed or
83
+ * current; the line after, only when completed. The outer halves stay
84
+ * unpainted - they keep the circle centered over the title.
85
+ *
86
+ * THE BORDER IS ALWAYS THERE: the current step paints it in its own fill, so
87
+ * the circle never changes size between states.
88
+ *
89
+ * NO TOKEN, ON PURPOSE: the vertical text drops by (circle - line) / 2 so the
90
+ * title's first line centers on the circle.
91
+ */
92
+
93
+ .al-stepper {
94
+ display: flex;
95
+ margin: 0;
96
+ padding: 0;
97
+ list-style: none;
98
+ font-family: var(--al-font-sans);
99
+ }
100
+
101
+ /* ---------------------------------------------------------- horizontal */
102
+ .al-stepper__step {
103
+ display: grid;
104
+ flex: 1 1 0;
105
+ grid-template-columns: 1fr var(--al-stepper-indicator-size) 1fr;
106
+ align-items: center;
107
+ align-content: start;
108
+ row-gap: var(--al-stepper-horizontal-gap);
109
+ min-inline-size: 0;
110
+ }
111
+
112
+ .al-stepper__step::before,
113
+ .al-stepper__step::after {
114
+ content: '';
115
+ grid-row: 1;
116
+ block-size: var(--al-stepper-connector-thickness);
117
+ background-color: var(--al-stepper-connector);
118
+ }
119
+
120
+ .al-stepper__step::before { grid-column: 1; }
121
+ .al-stepper__step::after { grid-column: 3; }
122
+
123
+ .al-stepper__step--completed::before,
124
+ .al-stepper__step--completed::after,
125
+ .al-stepper__step[aria-current='step']::before {
126
+ background-color: var(--al-stepper-connector-done);
127
+ }
128
+
129
+ .al-stepper__step:first-child::before,
130
+ .al-stepper__step:last-child::after {
131
+ background-color: transparent;
132
+ }
133
+
134
+ .al-stepper__indicator {
135
+ grid-row: 1;
136
+ grid-column: 2;
137
+ }
138
+
139
+ .al-stepper__text {
140
+ grid-row: 2;
141
+ grid-column: 1 / -1;
142
+ padding-inline: var(--al-stepper-horizontal-text-padding);
143
+ text-align: center;
144
+ }
145
+
146
+ /* ------------------------------------------------------------ vertical */
147
+ .al-stepper--vertical {
148
+ flex-direction: column;
149
+ }
150
+
151
+ .al-stepper--vertical .al-stepper__step {
152
+ flex: none;
153
+ grid-template-columns: var(--al-stepper-indicator-size) 1fr;
154
+ grid-template-rows: auto 1fr;
155
+ align-items: start;
156
+ column-gap: var(--al-stepper-vertical-gap);
157
+ row-gap: 0;
158
+ }
159
+
160
+ .al-stepper--vertical .al-stepper__step::before {
161
+ display: none;
162
+ }
163
+
164
+ .al-stepper--vertical .al-stepper__step::after {
165
+ grid-row: 2;
166
+ grid-column: 1;
167
+ justify-self: center;
168
+ align-self: stretch;
169
+ inline-size: var(--al-stepper-connector-thickness);
170
+ block-size: auto;
171
+ margin-block: var(--al-stepper-vertical-rail-gap);
172
+ }
173
+
174
+ .al-stepper--vertical .al-stepper__step:last-child::after {
175
+ display: none;
176
+ }
177
+
178
+ .al-stepper--vertical .al-stepper__indicator {
179
+ grid-column: 1;
180
+ }
181
+
182
+ .al-stepper--vertical .al-stepper__text {
183
+ grid-row: 1 / span 2;
184
+ grid-column: 2;
185
+ padding-block: calc((var(--al-stepper-indicator-size) - var(--al-stepper-line-height)) / 2)
186
+ var(--al-stepper-vertical-step-gap);
187
+ padding-inline: 0;
188
+ text-align: start;
189
+ }
190
+
191
+ .al-stepper--vertical .al-stepper__step:last-child .al-stepper__text {
192
+ padding-block-end: 0;
193
+ }
194
+
195
+ /* ----------------------------------------------------------- indicator */
196
+ .al-stepper__indicator {
197
+ display: inline-flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+ box-sizing: border-box;
201
+ inline-size: var(--al-stepper-indicator-size);
202
+ block-size: var(--al-stepper-indicator-size);
203
+ border: var(--al-stepper-indicator-border-width) solid var(--al-stepper-upcoming-border);
204
+ border-radius: var(--al-stepper-indicator-radius);
205
+ background-color: var(--al-stepper-upcoming-bg);
206
+ color: var(--al-stepper-upcoming-number);
207
+ font-size: var(--al-stepper-font-size);
208
+ line-height: var(--al-stepper-line-height);
209
+ font-weight: var(--al-stepper-font-weight);
210
+ font-variant-numeric: tabular-nums;
211
+ }
212
+
213
+ .al-stepper__indicator .al-icon {
214
+ --al-icon-box: var(--al-stepper-icon-size);
215
+ }
216
+
217
+ .al-stepper__step--completed .al-stepper__indicator {
218
+ border-color: var(--al-stepper-completed-border);
219
+ background-color: var(--al-stepper-completed-bg);
220
+ color: var(--al-stepper-completed-icon);
221
+ }
222
+
223
+ .al-stepper__step[aria-current='step'] .al-stepper__indicator {
224
+ border-color: var(--al-stepper-current-bg);
225
+ background-color: var(--al-stepper-current-bg);
226
+ color: var(--al-stepper-current-number);
227
+ }
228
+
229
+ /* ---------------------------------------------------------------- text */
230
+ .al-stepper__text {
231
+ display: flex;
232
+ flex-direction: column;
233
+ gap: var(--al-stepper-text-gap);
234
+ }
235
+
236
+ .al-stepper__label {
237
+ font-size: var(--al-stepper-font-size);
238
+ line-height: var(--al-stepper-line-height);
239
+ font-weight: var(--al-stepper-font-weight);
240
+ color: var(--al-stepper-label-upcoming);
241
+ }
242
+
243
+ .al-stepper__step--completed .al-stepper__label,
244
+ .al-stepper__step[aria-current='step'] .al-stepper__label {
245
+ color: var(--al-stepper-label);
246
+ }
247
+
248
+ .al-stepper__description {
249
+ font-size: var(--al-stepper-description-font-size);
250
+ line-height: var(--al-stepper-description-line-height);
251
+ font-weight: var(--al-stepper-description-font-weight);
252
+ color: var(--al-stepper-description);
253
+ }
254
+
255
+ /* Read, never seen (rule 19). One border-width is the 1px box the pattern
256
+ needs; clip-path hides it. */
257
+ .al-stepper__status {
258
+ position: absolute;
259
+ inline-size: var(--al-border-width-1);
260
+ block-size: var(--al-border-width-1);
261
+ overflow: hidden;
262
+ clip-path: inset(50%);
263
+ white-space: nowrap;
264
+ }
@@ -1,5 +1,5 @@
1
1
  /* AL Design System - Foundation
2
- * v1.5.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.5.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.5.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",