@cityway/design-tokens 1.0.1 → 1.1.0-beta002
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/_config.scss +10 -0
- package/_functions.scss +9 -84
- package/_layout-bo.scss +209 -0
- package/_primitives.scss +15 -0
- package/_theme-mapping.scss +73 -59
- package/_tokens-bo.scss +454 -0
- package/docs/README.md +138 -0
- package/package.json +6 -2
package/_config.scss
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// ===========================================================
|
|
2
|
+
// Config transverse des tokens générés (maintenue à la main).
|
|
3
|
+
// Les fichiers générés (_tokens-bo, _layout-bo, ...) font `@use "config" as *`
|
|
4
|
+
// et émettent en interpolation : `--#{$prefix}-…`, `[#{$theme-attr}^="#{$theme}"]`.
|
|
5
|
+
// $theme (ex. "cw-bo") est défini en tête de CHAQUE fichier de tokens, pas ici.
|
|
6
|
+
// ===========================================================
|
|
7
|
+
|
|
8
|
+
$prefix: cw; // préfixe des CSS custom properties (--cw-…)
|
|
9
|
+
$theme-attr: data-cw-theme; // attribut de thème (le `cw` marque l'appartenance lib)
|
|
10
|
+
$dark-suffix: dark; // suffixe mode sombre -> cw-bo-dark
|
package/_functions.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
|
+
@use "sass:color";
|
|
2
3
|
@use "primitives" as p;
|
|
3
4
|
|
|
4
5
|
@function size($key) {
|
|
@@ -18,90 +19,14 @@
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
@function hex-to-rgb($hex) {
|
|
21
|
-
|
|
22
|
+
// On extrait les 3 canaux d'un coup dans l'espace RGB
|
|
23
|
+
$r: color.channel($hex, "red", $space: rgb);
|
|
24
|
+
$g: color.channel($hex, "green", $space: rgb);
|
|
25
|
+
$b: color.channel($hex, "blue", $space: rgb);
|
|
26
|
+
|
|
27
|
+
@return #{$r}, #{$g}, #{$b};
|
|
22
28
|
}
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
--cw-base-dark-rgb: 26, 26, 26;
|
|
27
|
-
--cw-base-black: #000000;
|
|
28
|
-
--cw-base-black-rgb: 0, 0, 0;
|
|
29
|
-
--cw-base-white: #ffffff;
|
|
30
|
-
--cw-base-white-rgb: 255, 255, 255;
|
|
31
|
-
--cw-base-disabled: #696969;
|
|
32
|
-
--cw-base-disabled-rgb: 105, 105, 105;
|
|
33
|
-
--cw-primary: #107099;
|
|
34
|
-
--cw-primary-rgb: 16, 112, 153;
|
|
35
|
-
--cw-primary-hover: #0d5878;
|
|
36
|
-
--cw-primary-hover-rgb: 13, 88, 120;
|
|
37
|
-
--cw-primary-contrasted: #ffffff;
|
|
38
|
-
--cw-primary-contrasted-rgb: 255, 255, 255;
|
|
39
|
-
--cw-secondary: #107099;
|
|
40
|
-
--cw-secondary-rgb: 16, 112, 153;
|
|
41
|
-
--cw-secondary-hover: #0d5878;
|
|
42
|
-
--cw-secondary-hover-rgb: 13, 88, 120;
|
|
43
|
-
--cw-secondary-contrasted: #ffffff;
|
|
44
|
-
--cw-secondary-contrasted-rgb: 255, 255, 255;
|
|
45
|
-
--cw-success: #44853c;
|
|
46
|
-
--cw-success-rgb: 68, 133, 60;
|
|
47
|
-
--cw-success-hover: #366930;
|
|
48
|
-
--cw-success-hover-rgb: 54, 105, 48;
|
|
49
|
-
--cw-success-contrasted: #ffffff;
|
|
50
|
-
--cw-success-contrasted-rgb: 255, 255, 255;
|
|
51
|
-
--cw-success-light: #ebf5ea;
|
|
52
|
-
--cw-success-light-rgb: 235, 245, 234;
|
|
53
|
-
--cw-info: #0b40a2;
|
|
54
|
-
--cw-info-rgb: 11, 64, 162;
|
|
55
|
-
--cw-info-hover: #0f58e0;
|
|
56
|
-
--cw-info-hover-rgb: 15, 88, 224;
|
|
57
|
-
--cw-info-contrasted: #ffffff;
|
|
58
|
-
--cw-info-contrasted-rgb: 255, 255, 255;
|
|
59
|
-
--cw-info-light: #dee8fd;
|
|
60
|
-
--cw-info-light-rgb: 222, 232, 253;
|
|
61
|
-
--cw-warning: #e8580c;
|
|
62
|
-
--cw-warning-rgb: 232, 88, 12;
|
|
63
|
-
--cw-warning-hover: #df3603;
|
|
64
|
-
--cw-warning-hover-rgb: 223, 54, 3;
|
|
65
|
-
--cw-warning-contrasted: #1a1a1a;
|
|
66
|
-
--cw-warning-contrasted-rgb: 26, 26, 26;
|
|
67
|
-
--cw-warning-light: #fff9e6;
|
|
68
|
-
--cw-warning-light-rgb: 255, 249, 230;
|
|
69
|
-
--cw-danger: #e1001a;
|
|
70
|
-
--cw-danger-rgb: 225, 0, 26;
|
|
71
|
-
--cw-danger-hover: #b30015;
|
|
72
|
-
--cw-danger-hover-rgb: 179, 0, 21;
|
|
73
|
-
--cw-danger-contrasted: #ffffff;
|
|
74
|
-
--cw-danger-contrasted-rgb: 255, 255, 255;
|
|
75
|
-
--cw-danger-light: #ffe5e8;
|
|
76
|
-
--cw-danger-light-rgb: 255, 229, 232;
|
|
77
|
-
--cw-light: #f9f9f9;
|
|
78
|
-
--cw-light-rgb: 249, 249, 249;
|
|
79
|
-
--cw-light-hover: #f2f2f2;
|
|
80
|
-
--cw-light-hover-rgb: 242, 242, 242;
|
|
81
|
-
--cw-light-contrasted: #313131;
|
|
82
|
-
--cw-light-contrasted-rgb: 49, 49, 49;
|
|
83
|
-
--cw-dark: #1a1a1a;
|
|
84
|
-
--cw-dark-rgb: 26, 26, 26;
|
|
85
|
-
--cw-dark-hover: #1a1a1a;
|
|
86
|
-
--cw-dark-hover-rgb: 26, 26, 26;
|
|
87
|
-
--cw-dark-contrasted: #ffffff;
|
|
88
|
-
--cw-dark-contrasted-rgb: 255, 255, 255;
|
|
89
|
-
--cw-body-bg: #ffffff;
|
|
90
|
-
--cw-body-bg-rgb: 255, 255, 255;
|
|
91
|
-
--cw-body-color: #1a1a1a;
|
|
92
|
-
--cw-body-color-rgb: 26, 26, 26;
|
|
93
|
-
--cw-link-color: #107099;
|
|
94
|
-
--cw-link-color-rgb: 16, 112, 153;
|
|
95
|
-
--cw-link-hover: #0d5878;
|
|
96
|
-
--cw-link-hover-rgb: 13, 88, 120;
|
|
97
|
-
--cw-body-fs: 1rem;
|
|
98
|
-
--cw-body-fw: 400;
|
|
99
|
-
--cw-body-lh: 1.5;
|
|
100
|
-
--cw-body-ff-heading: Nunito, sans-serif;
|
|
101
|
-
--cw-body-ff-text: Nunito, sans-serif;
|
|
102
|
-
--cw-link-decoration: underline;
|
|
103
|
-
--cw-border-radius: 0.5rem;
|
|
104
|
-
--cw-border-radius-input: 6.25rem;
|
|
105
|
-
--cw-shadow-default: 0 0.25rem 1rem -0.063rem rgba(0, 0, 0, 0.1);
|
|
106
|
-
--cw-shadow-hover: 0 0.25rem 1rem -0.063rem rgba(0, 0, 0, 0.35);
|
|
30
|
+
@function grid($type, $variant) {
|
|
31
|
+
@return map.get(p.$grid, $type, $variant);
|
|
107
32
|
}
|
package/_layout-bo.scss
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// ===========================================================
|
|
2
|
+
// GÉNÉRÉ PAR sync-layout.mjs — NE PAS ÉDITER À LA MAIN
|
|
3
|
+
// Source : bou-layout.json (tokens)
|
|
4
|
+
// ===========================================================
|
|
5
|
+
|
|
6
|
+
@use "config" as *;
|
|
7
|
+
|
|
8
|
+
$theme: "cw-bo";
|
|
9
|
+
|
|
10
|
+
[#{$theme-attr}^="#{$theme}"] {
|
|
11
|
+
--#{$prefix}-shadow-effect-1: 0 0.0625rem 0.25rem 0 var(--#{$prefix}-shadow-effect-1-default);
|
|
12
|
+
--#{$prefix}-shadow-effect-2: 0 0 0 0.0625rem var(--#{$prefix}-shadow-effect-2-default);
|
|
13
|
+
--#{$prefix}-gap-none: 0;
|
|
14
|
+
--#{$prefix}-gap-4xs: 0.125rem;
|
|
15
|
+
--#{$prefix}-gap-3xs: 0.25rem;
|
|
16
|
+
--#{$prefix}-gap-2xs: 0.5rem;
|
|
17
|
+
--#{$prefix}-gap-xs: 0.625rem;
|
|
18
|
+
--#{$prefix}-gap-sm: 0.75rem;
|
|
19
|
+
--#{$prefix}-gap-md: 1rem;
|
|
20
|
+
--#{$prefix}-gap-lg: 1.25rem;
|
|
21
|
+
--#{$prefix}-gap-xl: 1.5rem;
|
|
22
|
+
--#{$prefix}-gap-2xl: 2rem;
|
|
23
|
+
--#{$prefix}-gap-3xl: 2.5rem;
|
|
24
|
+
--#{$prefix}-gap-4xl: 3rem;
|
|
25
|
+
--#{$prefix}-gap-5xl: 3.5rem;
|
|
26
|
+
--#{$prefix}-gap-6xl: 3.75rem;
|
|
27
|
+
--#{$prefix}-gap-7xl: 5rem;
|
|
28
|
+
--#{$prefix}-padding-none: 0;
|
|
29
|
+
--#{$prefix}-padding-4xs: 0.125rem;
|
|
30
|
+
--#{$prefix}-padding-3xs: 0.25rem;
|
|
31
|
+
--#{$prefix}-padding-2xs: 0.5rem;
|
|
32
|
+
--#{$prefix}-padding-xs: 0.625rem;
|
|
33
|
+
--#{$prefix}-padding-sm: 0.75rem;
|
|
34
|
+
--#{$prefix}-padding-md: 1rem;
|
|
35
|
+
--#{$prefix}-padding-lg: 1.25rem;
|
|
36
|
+
--#{$prefix}-padding-xl: 1.5rem;
|
|
37
|
+
--#{$prefix}-padding-2xl: 2rem;
|
|
38
|
+
--#{$prefix}-padding-3xl: 2.5rem;
|
|
39
|
+
--#{$prefix}-padding-4xl: 3rem;
|
|
40
|
+
--#{$prefix}-padding-5xl: 3.5rem;
|
|
41
|
+
--#{$prefix}-padding-6xl: 3.75rem;
|
|
42
|
+
--#{$prefix}-padding-7xl: 5rem;
|
|
43
|
+
--#{$prefix}-radius-none: 0;
|
|
44
|
+
--#{$prefix}-radius-2xs: 0.125rem;
|
|
45
|
+
--#{$prefix}-radius-xs: 0.25rem;
|
|
46
|
+
--#{$prefix}-radius-sm: 0.375rem;
|
|
47
|
+
--#{$prefix}-radius-md: 0.5rem;
|
|
48
|
+
--#{$prefix}-radius-lg: 0.625rem;
|
|
49
|
+
--#{$prefix}-radius-3xl: 1.5rem;
|
|
50
|
+
--#{$prefix}-radius-round: 6.25rem;
|
|
51
|
+
--#{$prefix}-opacity-none: 0;
|
|
52
|
+
--#{$prefix}-opacity-2xs: 0.05;
|
|
53
|
+
--#{$prefix}-opacity-xs: 0.1;
|
|
54
|
+
--#{$prefix}-opacity-sm: 0.25;
|
|
55
|
+
--#{$prefix}-opacity-md: 0.5;
|
|
56
|
+
--#{$prefix}-opacity-lg: 0.75;
|
|
57
|
+
--#{$prefix}-opacity-xl: 1;
|
|
58
|
+
--#{$prefix}-border-width-none: 0;
|
|
59
|
+
--#{$prefix}-border-width-xs: 0.0625rem;
|
|
60
|
+
--#{$prefix}-border-width-sm: 0.125rem;
|
|
61
|
+
--#{$prefix}-border-width-md: 0.1875rem;
|
|
62
|
+
--#{$prefix}-layout-gutter: 1rem;
|
|
63
|
+
--#{$prefix}-layout-card-radius: var(--#{$prefix}-radius-lg);
|
|
64
|
+
--#{$prefix}-layout-card-px: 0.75rem;
|
|
65
|
+
--#{$prefix}-layout-card-py: 1rem;
|
|
66
|
+
--#{$prefix}-layout-card-gap: 0.75rem;
|
|
67
|
+
--#{$prefix}-layout-empty-state-card-width: 20.5rem;
|
|
68
|
+
--#{$prefix}-layout-empty-state-card-px: 1rem;
|
|
69
|
+
--#{$prefix}-layout-empty-state-card-my: 1rem;
|
|
70
|
+
--#{$prefix}-layout-header-height: 3.5rem;
|
|
71
|
+
--#{$prefix}-layout-footer-height: 3.5rem;
|
|
72
|
+
--#{$prefix}-layout-modal-width-xs: 18.75rem;
|
|
73
|
+
--#{$prefix}-layout-modal-width-md: 31.25rem;
|
|
74
|
+
--#{$prefix}-layout-modal-width-lg: 50rem;
|
|
75
|
+
--#{$prefix}-layout-modal-width-xl: 71.25rem;
|
|
76
|
+
--#{$prefix}-layout-sidebar-main-collapsed-width: 4.5rem;
|
|
77
|
+
--#{$prefix}-layout-sidebar-height: 67rem;
|
|
78
|
+
--#{$prefix}-layout-sidebar-item-height: 2.5rem;
|
|
79
|
+
--#{$prefix}-layout-sidebar-main-expanded-width: 22rem;
|
|
80
|
+
--#{$prefix}-layout-sidebar-main-logo-width: 2.5rem;
|
|
81
|
+
--#{$prefix}-layout-sidebar-main-logo-height: var(--#{$prefix}-layout-sidebar-main-logo-width);
|
|
82
|
+
--#{$prefix}-layout-sidebar-main-logo-radius: var(--#{$prefix}-radius-md);
|
|
83
|
+
--#{$prefix}-layout-sidebar-secondary-collapsed-width: var(--#{$prefix}-layout-sidebar-main-collapsed-width);
|
|
84
|
+
--#{$prefix}-layout-sidebar-secondary-expanded-width: 17.5rem;
|
|
85
|
+
--#{$prefix}-icon-default-size-2xl: 2.5rem;
|
|
86
|
+
--#{$prefix}-icon-default-size-xl: 2rem;
|
|
87
|
+
--#{$prefix}-icon-default-size-lg: 1.5rem;
|
|
88
|
+
--#{$prefix}-icon-default-size-md: 1.25rem;
|
|
89
|
+
--#{$prefix}-icon-default-size-sm: 1rem;
|
|
90
|
+
--#{$prefix}-icon-default-size-xs: 0.75rem;
|
|
91
|
+
--#{$prefix}-icon-default-size-2xs: 0.625rem;
|
|
92
|
+
--#{$prefix}-icon-in-shape-shape-6xl: 6rem;
|
|
93
|
+
--#{$prefix}-icon-in-shape-shape-5xl: 5rem;
|
|
94
|
+
--#{$prefix}-icon-in-shape-shape-xl: 3.5rem;
|
|
95
|
+
--#{$prefix}-icon-in-shape-shape-md: 2.5rem;
|
|
96
|
+
--#{$prefix}-icon-in-shape-shape-sm: 2rem;
|
|
97
|
+
--#{$prefix}-icon-in-shape-shape-xs: 1.5rem;
|
|
98
|
+
--#{$prefix}-icon-in-shape-circular-radius: var(--#{$prefix}-radius-round);
|
|
99
|
+
--#{$prefix}-icon-in-shape-square-radius: var(--#{$prefix}-radius-md);
|
|
100
|
+
--#{$prefix}-section-radius: 2.5rem;
|
|
101
|
+
|
|
102
|
+
@media (min-width: 768px) {
|
|
103
|
+
--#{$prefix}-layout-gutter: 1.25rem;
|
|
104
|
+
--#{$prefix}-layout-card-px: 1rem;
|
|
105
|
+
--#{$prefix}-layout-card-gap: 1rem;
|
|
106
|
+
--#{$prefix}-layout-empty-state-card-width: 46.375rem;
|
|
107
|
+
--#{$prefix}-layout-empty-state-card-px: 2rem;
|
|
108
|
+
--#{$prefix}-layout-empty-state-card-my: 2rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (min-width: 1200px) {
|
|
112
|
+
--#{$prefix}-layout-empty-state-card-px: 6.25rem;
|
|
113
|
+
--#{$prefix}-layout-empty-state-card-my: 5rem;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[#{$theme-attr}^="#{$theme}"] .badge {
|
|
118
|
+
--#{$prefix}-badge-height-md: 1.25rem;
|
|
119
|
+
--#{$prefix}-badge-height-sm: 1rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[#{$theme-attr}^="#{$theme}"] .btn {
|
|
123
|
+
--#{$prefix}-button-md-height: 2.5rem;
|
|
124
|
+
--#{$prefix}-button-md-px: var(--#{$prefix}-gap-sm);
|
|
125
|
+
--#{$prefix}-button-gap: var(--#{$prefix}-gap-2xs);
|
|
126
|
+
--#{$prefix}-button-set-gap: var(--#{$prefix}-gap-md);
|
|
127
|
+
--#{$prefix}-button-radius: var(--#{$prefix}-radius-xs);
|
|
128
|
+
--#{$prefix}-button-border-width: var(--#{$prefix}-border-width-xs);
|
|
129
|
+
--#{$prefix}-button-sm-height: 2rem;
|
|
130
|
+
--#{$prefix}-button-sm-px: var(--#{$prefix}-gap-xs);
|
|
131
|
+
--#{$prefix}-button-action-width: 1.5rem;
|
|
132
|
+
--#{$prefix}-button-action-height: var(--#{$prefix}-button-action-width);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[#{$theme-attr}^="#{$theme}"] .cw-dropdown {
|
|
136
|
+
--#{$prefix}-dropdown-radius: var(--#{$prefix}-radius-xs);
|
|
137
|
+
--#{$prefix}-dropdown-border-width: var(--#{$prefix}-border-width-xs);
|
|
138
|
+
--#{$prefix}-dropdown-px: var(--#{$prefix}-gap-xs);
|
|
139
|
+
--#{$prefix}-dropdown-py: var(--#{$prefix}-gap-2xs);
|
|
140
|
+
--#{$prefix}-dropdown-header-width: 12.5rem;
|
|
141
|
+
--#{$prefix}-dropdown-height: 2.25rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
[#{$theme-attr}^="#{$theme}"] .cw-popover {
|
|
145
|
+
--#{$prefix}-popover-px: 0.0625rem;
|
|
146
|
+
--#{$prefix}-popover-py: 0.0625rem;
|
|
147
|
+
--#{$prefix}-popover-arrow-radius: 0.0625rem;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[#{$theme-attr}^="#{$theme}"] .cw-progressbar {
|
|
151
|
+
--#{$prefix}-progressbar-height-md: 1rem;
|
|
152
|
+
--#{$prefix}-progressbar-height-sm: 0.5rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
[#{$theme-attr}^="#{$theme}"] .cw-slider {
|
|
156
|
+
--#{$prefix}-slider-pointer-size: 1.5rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
[#{$theme-attr}^="#{$theme}"] .cw-stepper {
|
|
160
|
+
--#{$prefix}-stepper-thumb-px: 0.1875rem;
|
|
161
|
+
--#{$prefix}-stepper-thumb-py: 0.1875rem;
|
|
162
|
+
--#{$prefix}-stepper-line-gap: -0.0625rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[#{$theme-attr}^="#{$theme}"] .cw-tab {
|
|
166
|
+
--#{$prefix}-tab-card-px: 1.5rem;
|
|
167
|
+
|
|
168
|
+
@media (min-width: 768px) {
|
|
169
|
+
--#{$prefix}-tab-card-px: 2.5rem;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[#{$theme-attr}^="#{$theme}"] .cw-table {
|
|
174
|
+
--#{$prefix}-table-cell-min-height: 2.5rem;
|
|
175
|
+
--#{$prefix}-table-picture-square-width: 2rem;
|
|
176
|
+
--#{$prefix}-table-cell-min-width: 5rem;
|
|
177
|
+
--#{$prefix}-table-cell-px: var(--#{$prefix}-gap-sm);
|
|
178
|
+
--#{$prefix}-table-cell-py: var(--#{$prefix}-gap-2xs);
|
|
179
|
+
--#{$prefix}-table-cell-gap: var(--#{$prefix}-gap-2xs);
|
|
180
|
+
--#{$prefix}-table-picture-square-height: var(--#{$prefix}-table-picture-square-width);
|
|
181
|
+
--#{$prefix}-table-pagination-item-height: 2rem;
|
|
182
|
+
--#{$prefix}-table-pagination-item-width: var(--#{$prefix}-table-pagination-item-height);
|
|
183
|
+
--#{$prefix}-table-picture-rectangle-width: 3rem;
|
|
184
|
+
--#{$prefix}-table-picture-rectangle-height: 2rem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
[#{$theme-attr}^="#{$theme}"] .field-group {
|
|
188
|
+
--#{$prefix}-form-calendar-width: 16.875rem;
|
|
189
|
+
--#{$prefix}-form-calendar-day-width: 2rem;
|
|
190
|
+
--#{$prefix}-form-calendar-day-height: 2.25rem;
|
|
191
|
+
--#{$prefix}-form-calendar-day-radius: var(--#{$prefix}-radius-round);
|
|
192
|
+
--#{$prefix}-form-calendar-day-px: 0;
|
|
193
|
+
--#{$prefix}-form-calendar-day-py: 0;
|
|
194
|
+
--#{$prefix}-form-datepicker-width: 7.875rem;
|
|
195
|
+
--#{$prefix}-form-field-radius: var(--#{$prefix}-button-radius);
|
|
196
|
+
--#{$prefix}-form-field-md-height: var(--#{$prefix}-button-md-height);
|
|
197
|
+
--#{$prefix}-form-field-sm-height: var(--#{$prefix}-button-sm-height);
|
|
198
|
+
--#{$prefix}-form-field-border-width-default: var(--#{$prefix}-border-width-xs);
|
|
199
|
+
--#{$prefix}-form-field-border-width-focus: var(--#{$prefix}-border-width-md);
|
|
200
|
+
--#{$prefix}-form-timepicker-width: 6.25rem;
|
|
201
|
+
|
|
202
|
+
@media (min-width: 768px) {
|
|
203
|
+
--#{$prefix}-form-calendar-width: 18.625rem;
|
|
204
|
+
--#{$prefix}-form-calendar-day-width: 2.25rem;
|
|
205
|
+
--#{$prefix}-form-calendar-day-px: 0.0625rem;
|
|
206
|
+
--#{$prefix}-form-calendar-day-py: 0.0625rem;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
package/_primitives.scss
CHANGED
|
@@ -20,6 +20,21 @@ $dropshadow-position: (
|
|
|
20
20
|
md: 0.25rem
|
|
21
21
|
);
|
|
22
22
|
|
|
23
|
+
// Grid
|
|
24
|
+
$grid: (
|
|
25
|
+
breakpoints: (
|
|
26
|
+
xs: 0,
|
|
27
|
+
sm: 576px,
|
|
28
|
+
md: 768px,
|
|
29
|
+
lg: 992px,
|
|
30
|
+
xl: 1200px,
|
|
31
|
+
xxl: 1400px
|
|
32
|
+
),
|
|
33
|
+
columns: (
|
|
34
|
+
number: 12
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
|
|
23
38
|
// Colors
|
|
24
39
|
// ---------------------------------
|
|
25
40
|
$colors: (
|
package/_theme-mapping.scss
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
@use "sass:color";
|
|
4
|
+
@use "sass:list";
|
|
2
5
|
@use "primitives" as *;
|
|
3
6
|
@use "functions" as *;
|
|
4
7
|
|
|
@@ -11,12 +14,12 @@ $theme-fo-colors: (
|
|
|
11
14
|
dark: #1A1A1A,
|
|
12
15
|
"black": #000000,
|
|
13
16
|
"white": #ffffff,
|
|
14
|
-
disabled: #696969
|
|
15
|
-
),
|
|
17
|
+
disabled: #696969),
|
|
16
18
|
primary: (
|
|
17
19
|
base: color(primary, 500),
|
|
18
20
|
hover: color(primary, 600),
|
|
19
|
-
contrasted: color(base, "white")
|
|
21
|
+
contrasted: color(base, "white"),
|
|
22
|
+
light: color(primary, p-overlay-50),
|
|
20
23
|
),
|
|
21
24
|
secondary: (
|
|
22
25
|
base: color(primary, 500),
|
|
@@ -72,23 +75,20 @@ $theme-fo-colors: (
|
|
|
72
75
|
);
|
|
73
76
|
|
|
74
77
|
$theme-fo-props: (
|
|
75
|
-
body: (
|
|
76
|
-
fs: 1rem,
|
|
78
|
+
body: (fs: 1rem,
|
|
77
79
|
fw: 400,
|
|
78
80
|
lh: 1.5,
|
|
79
81
|
ff-heading: ('"#{font(ff, nunito)}"', sans-serif),
|
|
80
|
-
ff-text: ('"#{font(ff, nunito)}"', sans-serif)
|
|
81
|
-
),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
),
|
|
85
|
-
|
|
86
|
-
radius: border(br, md),
|
|
87
|
-
radius-input: border(br, round)
|
|
88
|
-
),
|
|
89
|
-
shadow: (
|
|
90
|
-
default: 0 0.25rem 1rem -0.063rem rgba(#000000, 0.1),
|
|
82
|
+
ff-text: ('"#{font(ff, nunito)}"', sans-serif)),
|
|
83
|
+
link: (decoration: underline),
|
|
84
|
+
border: (radius: border(br, 2xl),
|
|
85
|
+
radius-input: border(br, round)),
|
|
86
|
+
shadow: (default: 0 0.25rem 1rem -0.063rem rgba(#000000, 0.1),
|
|
87
|
+
filter: 0 0.25rem 0.875rem rgba(#000000, 0.1),
|
|
91
88
|
hover: 0 0.25rem 1rem -0.063rem rgba(#000000, 0.35),
|
|
89
|
+
),
|
|
90
|
+
columns: (
|
|
91
|
+
gutter: 2rem
|
|
92
92
|
)
|
|
93
93
|
);
|
|
94
94
|
|
|
@@ -97,48 +97,50 @@ $theme-fo-props: (
|
|
|
97
97
|
|
|
98
98
|
$theme-bo-colors: (
|
|
99
99
|
base: (
|
|
100
|
-
dark: #
|
|
100
|
+
dark: #2A2E33,
|
|
101
101
|
"black": #000000,
|
|
102
102
|
"white": #ffffff,
|
|
103
|
-
disabled: #
|
|
103
|
+
disabled: #7C8288,
|
|
104
|
+
light: #F1F2F4,
|
|
104
105
|
),
|
|
105
106
|
primary: (
|
|
106
|
-
base: #
|
|
107
|
-
hover: #
|
|
108
|
-
contrasted: color(base, "white")
|
|
107
|
+
base: #00638F,
|
|
108
|
+
hover: #004A6D,
|
|
109
|
+
contrasted: color(base, "white"),
|
|
110
|
+
light: #F7FAFB,
|
|
109
111
|
),
|
|
110
112
|
secondary: (
|
|
111
|
-
base:
|
|
112
|
-
hover: #
|
|
113
|
-
contrasted:
|
|
113
|
+
base: color(base, "white"),
|
|
114
|
+
hover: #7C8288,
|
|
115
|
+
contrasted: #7C8288
|
|
114
116
|
),
|
|
115
117
|
success: (
|
|
116
|
-
base: #
|
|
117
|
-
hover: #
|
|
118
|
+
base: #124805,
|
|
119
|
+
hover: #124805,
|
|
118
120
|
contrasted: color(base, "white"),
|
|
119
|
-
light: #
|
|
121
|
+
light: #C7F0DA
|
|
120
122
|
),
|
|
121
123
|
info: (
|
|
122
|
-
base: #
|
|
123
|
-
hover: #
|
|
124
|
+
base: #024358,
|
|
125
|
+
hover: #024358,
|
|
124
126
|
contrasted: color(base, "white"),
|
|
125
|
-
light: #
|
|
127
|
+
light: #CDE6EE
|
|
126
128
|
),
|
|
127
129
|
warning: (
|
|
128
|
-
base: #
|
|
129
|
-
hover: #
|
|
130
|
+
base: #7E5201,
|
|
131
|
+
hover: #7E5201,
|
|
130
132
|
contrasted: color("grey", 950),
|
|
131
|
-
light: #
|
|
133
|
+
light: #FDECCC
|
|
132
134
|
),
|
|
133
135
|
danger: (
|
|
134
|
-
base: #
|
|
135
|
-
hover: #
|
|
136
|
+
base: #75000E,
|
|
137
|
+
hover: #75000E,
|
|
136
138
|
contrasted: color(base, "white"),
|
|
137
|
-
light:
|
|
139
|
+
light: #F9CCD1
|
|
138
140
|
),
|
|
139
141
|
light: (
|
|
140
|
-
base: #
|
|
141
|
-
hover:
|
|
142
|
+
base: #F1F2F4,
|
|
143
|
+
hover: #F1F2F4,
|
|
142
144
|
contrasted: color("grey", 900)
|
|
143
145
|
),
|
|
144
146
|
dark: (
|
|
@@ -151,21 +153,21 @@ $theme-bo-colors: (
|
|
|
151
153
|
contrasted: color(base, "white")
|
|
152
154
|
),
|
|
153
155
|
body: (
|
|
154
|
-
bg: #
|
|
155
|
-
color: #
|
|
156
|
+
bg: #f5f8fa,
|
|
157
|
+
color: #181E28
|
|
156
158
|
),
|
|
157
159
|
link: (
|
|
158
|
-
color: #
|
|
159
|
-
hover:
|
|
160
|
+
color: #00638F,
|
|
161
|
+
hover: #004A6D
|
|
160
162
|
),
|
|
161
163
|
);
|
|
162
164
|
|
|
163
165
|
|
|
164
166
|
$theme-bo-props: (
|
|
165
167
|
body: (
|
|
166
|
-
fs:
|
|
168
|
+
fs: 0.875rem,
|
|
167
169
|
fw: 400,
|
|
168
|
-
lh: 1.
|
|
170
|
+
lh: 1.43,
|
|
169
171
|
ff-heading: ('"#{font(ff, nunito)}"', sans-serif),
|
|
170
172
|
ff-text: ('"#{font(ff, nunito)}"', sans-serif)
|
|
171
173
|
),
|
|
@@ -173,12 +175,16 @@ $theme-bo-props: (
|
|
|
173
175
|
decoration: underline
|
|
174
176
|
),
|
|
175
177
|
border: (
|
|
176
|
-
radius:
|
|
177
|
-
radius-input:
|
|
178
|
+
radius: size(xs),
|
|
179
|
+
radius-input: border(br, xs)
|
|
178
180
|
),
|
|
179
181
|
shadow: (
|
|
180
|
-
default: 0 0
|
|
181
|
-
|
|
182
|
+
default: 0 0 0 1px #ECEEF2,
|
|
183
|
+
filter: 0 0 1px #ECEEF2,
|
|
184
|
+
hover: 0 0 0 1px #ECEEF2
|
|
185
|
+
),
|
|
186
|
+
columns: (
|
|
187
|
+
gutter: 1.25rem
|
|
182
188
|
)
|
|
183
189
|
);
|
|
184
190
|
|
|
@@ -188,8 +194,7 @@ $theme-bo-props: (
|
|
|
188
194
|
@mixin color-with-rgb($name, $color) {
|
|
189
195
|
--#{$name}: #{$color};
|
|
190
196
|
|
|
191
|
-
|
|
192
|
-
@if type-of($color) == 'color' and alpha($color) == 1 {
|
|
197
|
+
@if meta.type-of($color)=='color' and color.alpha($color)==1 {
|
|
193
198
|
--#{$name}-rgb: #{hex-to-rgb($color)};
|
|
194
199
|
}
|
|
195
200
|
}
|
|
@@ -197,11 +202,7 @@ $theme-bo-props: (
|
|
|
197
202
|
@mixin generate-theme-colors($color-mapping) {
|
|
198
203
|
@each $color-name, $variants in $color-mapping {
|
|
199
204
|
@each $variant-name, $value in $variants {
|
|
200
|
-
@
|
|
201
|
-
@include color-with-rgb(#{$prefix}-#{$color-name}, $value);
|
|
202
|
-
} @else {
|
|
203
|
-
@include color-with-rgb(#{$prefix}-#{$color-name}-#{$variant-name}, $value);
|
|
204
|
-
}
|
|
205
|
+
@include color-with-rgb(#{$prefix}-#{$color-name}-#{$variant-name}, $value);
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
}
|
|
@@ -209,12 +210,25 @@ $theme-bo-props: (
|
|
|
209
210
|
@mixin generate-theme-props($props-mapping) {
|
|
210
211
|
@each $component-name, $properties in $props-mapping {
|
|
211
212
|
@each $prop-name, $value in $properties {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
@if meta.type-of($value)=='list' and list.separator($value)==comma {
|
|
214
|
+
--#{$prefix}-#{$component-name}-#{$prop-name}: #{list.join((), $value, $separator: comma)};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@else {
|
|
216
218
|
--#{$prefix}-#{$component-name}-#{$prop-name}: #{$value};
|
|
217
219
|
}
|
|
220
|
+
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// MIXINS FOR COMMON ELEMENTS
|
|
226
|
+
////////////////////////////////////////////////////////////////
|
|
227
|
+
|
|
228
|
+
@mixin generate-grid-vars($map) {
|
|
229
|
+
@each $group-name, $group-values in $map {
|
|
230
|
+
@each $key, $value in $group-values {
|
|
231
|
+
--#{$prefix}-#{$group-name}-#{$key}: #{$value};
|
|
218
232
|
}
|
|
219
233
|
}
|
|
220
234
|
}
|
package/_tokens-bo.scss
ADDED
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
// ===========================================================
|
|
2
|
+
// GÉNÉRÉ PAR sync-colors.mjs — NE PAS ÉDITER À LA MAIN
|
|
3
|
+
// Source : bou-colors.json (tokens)
|
|
4
|
+
// ===========================================================
|
|
5
|
+
|
|
6
|
+
@use "config" as *;
|
|
7
|
+
|
|
8
|
+
$theme: "cw-bo";
|
|
9
|
+
|
|
10
|
+
[#{$theme-attr}^="#{$theme}"] {
|
|
11
|
+
--#{$prefix}-border-transparent: #ffffff00;
|
|
12
|
+
--#{$prefix}-border-primary: var(--#{$prefix}-surface-primary);
|
|
13
|
+
--#{$prefix}-border-primary-hover: var(--#{$prefix}-surface-primary-hover);
|
|
14
|
+
--#{$prefix}-border-primary-disabled: var(--#{$prefix}-surface-primary-disabled);
|
|
15
|
+
--#{$prefix}-border-secondary-hover: #89969f;
|
|
16
|
+
--#{$prefix}-border-danger: var(--#{$prefix}-surface-danger);
|
|
17
|
+
--#{$prefix}-border-danger-hover: var(--#{$prefix}-surface-danger-hover);
|
|
18
|
+
--#{$prefix}-border-danger-disabled: var(--#{$prefix}-surface-danger-disabled);
|
|
19
|
+
--#{$prefix}-border-danger-secondary: var(--#{$prefix}-border-danger);
|
|
20
|
+
--#{$prefix}-border-danger-secondary-hover: var(--#{$prefix}-border-danger-hover);
|
|
21
|
+
--#{$prefix}-border-light-hover: #89969f;
|
|
22
|
+
--#{$prefix}-shadow-default: #65747e1a;
|
|
23
|
+
--#{$prefix}-shadow-hover: #65747e4d;
|
|
24
|
+
--#{$prefix}-shadow-none: #ffffff00;
|
|
25
|
+
--#{$prefix}-shadow-effect-1-default: #00000012;
|
|
26
|
+
--#{$prefix}-text-on-secondary-hover: #4a5c66;
|
|
27
|
+
--#{$prefix}-text-on-light-hover: #65747e;
|
|
28
|
+
--#{$prefix}-surface-primary-focus: #004a6d;
|
|
29
|
+
--#{$prefix}-surface-primary-disabled: #00638f80;
|
|
30
|
+
--#{$prefix}-surface-secondary-focus: #e6edf2;
|
|
31
|
+
--#{$prefix}-surface-danger-focus: #b83535;
|
|
32
|
+
--#{$prefix}-surface-danger-disabled: #9a282880;
|
|
33
|
+
--#{$prefix}-icon-on-secondary-hover: #4a5c66;
|
|
34
|
+
--#{$prefix}-status-information-border-light: #cbe4fd;
|
|
35
|
+
--#{$prefix}-status-information-text: var(--#{$prefix}-text-default);
|
|
36
|
+
--#{$prefix}-status-information-icon-default: var(--#{$prefix}-icon-primary);
|
|
37
|
+
--#{$prefix}-icon-on-light-hover: #65747e;
|
|
38
|
+
--#{$prefix}-icon-real-time: #e8580c;
|
|
39
|
+
--#{$prefix}-layout-frieze-surface-1: #00638f;
|
|
40
|
+
--#{$prefix}-layout-header-surface: var(--#{$prefix}-layout-sidebar-main-surface);
|
|
41
|
+
--#{$prefix}-layout-footer-surface: var(--#{$prefix}-surface-main);
|
|
42
|
+
--#{$prefix}-layout-footer-text: var(--#{$prefix}-layout-header-text);
|
|
43
|
+
--#{$prefix}-layout-header-text: var(--#{$prefix}-layout-sidebar-main-text);
|
|
44
|
+
--#{$prefix}-layout-header-icon: var(--#{$prefix}-layout-sidebar-main-icon);
|
|
45
|
+
--#{$prefix}-layout-frieze-surface-2: #515fa5;
|
|
46
|
+
--#{$prefix}-layout-frieze-surface-3: #91509f;
|
|
47
|
+
--#{$prefix}-layout-frieze-surface-4: #c03d7b;
|
|
48
|
+
--#{$prefix}-layout-frieze-surface-5: #d04444;
|
|
49
|
+
--#{$prefix}-layout-modal-surface: #00000080;
|
|
50
|
+
--#{$prefix}-illustration-empty-state-white: #ffffff;
|
|
51
|
+
--#{$prefix}-illustration-empty-state-color-1: #f5f8fa;
|
|
52
|
+
--#{$prefix}-illustration-empty-state-color-2: #c8d6df;
|
|
53
|
+
--#{$prefix}-illustration-empty-state-color-2-overlay-50: #c8d6df80;
|
|
54
|
+
--#{$prefix}-illustration-empty-state-color-2-overlay-40: #c8d6df66;
|
|
55
|
+
--#{$prefix}-illustration-empty-state-color-2-overlay-25: #c8d6df40;
|
|
56
|
+
--#{$prefix}-illustration-empty-state-color-2-overlay-15: #c8d6df26;
|
|
57
|
+
--#{$prefix}-section-100: #e2e7ec;
|
|
58
|
+
--#{$prefix}-section-200: #d2d8de;
|
|
59
|
+
--#{$prefix}-section-300: #c2c9d0;
|
|
60
|
+
--#{$prefix}-section-500: #414141;
|
|
61
|
+
--#{$prefix}-status-success-border-light: #c7f0da;
|
|
62
|
+
--#{$prefix}-status-success-text: var(--#{$prefix}-text-default);
|
|
63
|
+
--#{$prefix}-status-success-icon-default: var(--#{$prefix}-icon-success);
|
|
64
|
+
--#{$prefix}-status-warning-border-light: #fdedc4;
|
|
65
|
+
--#{$prefix}-status-warning-text: var(--#{$prefix}-text-default);
|
|
66
|
+
--#{$prefix}-status-warning-icon-default: var(--#{$prefix}-icon-warning);
|
|
67
|
+
--#{$prefix}-status-danger-border-light: #ffd6d6;
|
|
68
|
+
--#{$prefix}-status-danger-text: var(--#{$prefix}-text-default);
|
|
69
|
+
--#{$prefix}-status-danger-icon-default: var(--#{$prefix}-icon-danger);
|
|
70
|
+
--#{$prefix}-status-light-border-default: #c8d6df;
|
|
71
|
+
--#{$prefix}-status-light-text: var(--#{$prefix}-text-default);
|
|
72
|
+
--#{$prefix}-figma-slot: #ffe8f8;
|
|
73
|
+
--#{$prefix}-system-blue: #1967d2;
|
|
74
|
+
--#{$prefix}-system-grey-1: #f1f1f1;
|
|
75
|
+
--#{$prefix}-system-grey-2: #8b8b8b;
|
|
76
|
+
--#{$prefix}-layout-tab-surface-hover: var(--#{$prefix}-layout-sidebar-universe-hover);
|
|
77
|
+
--#{$prefix}-illustration-placeholder-white: #ffffff;
|
|
78
|
+
--#{$prefix}-illustration-placeholder-grey-1: #dde8f5;
|
|
79
|
+
--#{$prefix}-illustration-placeholder-grey-2: #c8dcf5;
|
|
80
|
+
--#{$prefix}-illustration-placeholder-blue-1: #7baed4;
|
|
81
|
+
--#{$prefix}-illustration-placeholder-blue-2: #5a93c2;
|
|
82
|
+
--#{$prefix}-illustration-placeholder-green-1: #a8c97a;
|
|
83
|
+
--#{$prefix}-illustration-placeholder-green-2: #8bbd5a;
|
|
84
|
+
--#{$prefix}-illustration-placeholder-yellow: #ffd166;
|
|
85
|
+
--#{$prefix}-layout-sidebar-dual-subsection-selected-text: #00638f;
|
|
86
|
+
--#{$prefix}-layout-sidebar-dual-subsection-selected-icon: #00638f;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] {
|
|
90
|
+
--#{$prefix}-surface-default: #121d23;
|
|
91
|
+
--#{$prefix}-surface-invert: #e6edf2;
|
|
92
|
+
--#{$prefix}-surface-main: #0d1117;
|
|
93
|
+
--#{$prefix}-border-default: #21303a;
|
|
94
|
+
--#{$prefix}-border-white: #21303a;
|
|
95
|
+
--#{$prefix}-border-dark: #e6edf2;
|
|
96
|
+
--#{$prefix}-border-secondary: #65747e;
|
|
97
|
+
--#{$prefix}-border-light: #21303a;
|
|
98
|
+
--#{$prefix}-border-lighter: #21303a;
|
|
99
|
+
--#{$prefix}-text-default: #fcfcfd;
|
|
100
|
+
--#{$prefix}-text-invert: #121d23;
|
|
101
|
+
--#{$prefix}-text-primary: #96c9e5;
|
|
102
|
+
--#{$prefix}-text-primary-hover: #e6f3f9;
|
|
103
|
+
--#{$prefix}-text-on-primary: #121d23;
|
|
104
|
+
--#{$prefix}-text-on-primary-hover: #121d23;
|
|
105
|
+
--#{$prefix}-text-on-secondary: #89969f;
|
|
106
|
+
--#{$prefix}-text-success: #c7f0da;
|
|
107
|
+
--#{$prefix}-text-danger: #f05959;
|
|
108
|
+
--#{$prefix}-text-danger-hover: #ff8080;
|
|
109
|
+
--#{$prefix}-text-on-danger: #121d23;
|
|
110
|
+
--#{$prefix}-text-on-danger-hover: #121d23;
|
|
111
|
+
--#{$prefix}-text-on-danger-secondary: #f05959;
|
|
112
|
+
--#{$prefix}-text-on-danger-secondary-hover: #ff8080;
|
|
113
|
+
--#{$prefix}-text-disabled: #89969f;
|
|
114
|
+
--#{$prefix}-text-disabled-darker: #a3b6c2;
|
|
115
|
+
--#{$prefix}-text-on-disabled: #121d23;
|
|
116
|
+
--#{$prefix}-surface-primary: #96c9e5;
|
|
117
|
+
--#{$prefix}-text-on-light: #89969f;
|
|
118
|
+
--#{$prefix}-surface-primary-hover: #e6f3f9;
|
|
119
|
+
--#{$prefix}-surface-secondary: #121d23;
|
|
120
|
+
--#{$prefix}-surface-secondary-hover: #0d1117;
|
|
121
|
+
--#{$prefix}-surface-danger: #f05959;
|
|
122
|
+
--#{$prefix}-surface-danger-hover: #ffb0b0;
|
|
123
|
+
--#{$prefix}-surface-disabled: #89969f;
|
|
124
|
+
--#{$prefix}-surface-light: #344650;
|
|
125
|
+
--#{$prefix}-icon-default: #fcfcfd;
|
|
126
|
+
--#{$prefix}-icon-invert: #121d23;
|
|
127
|
+
--#{$prefix}-icon-primary: #96c9e5;
|
|
128
|
+
--#{$prefix}-status-information-surface-default: #0f5ecc;
|
|
129
|
+
--#{$prefix}-icon-primary-hover: #e6f3f9;
|
|
130
|
+
--#{$prefix}-icon-on-primary: #121d23;
|
|
131
|
+
--#{$prefix}-status-information-surface-light: #041d40;
|
|
132
|
+
--#{$prefix}-icon-on-primary-hover: #121d23;
|
|
133
|
+
--#{$prefix}-icon-on-secondary: #89969f;
|
|
134
|
+
--#{$prefix}-status-information-border-default: #093d85;
|
|
135
|
+
--#{$prefix}-icon-success: #c7f0da;
|
|
136
|
+
--#{$prefix}-icon-warning: #e08c00;
|
|
137
|
+
--#{$prefix}-icon-danger: #f05959;
|
|
138
|
+
--#{$prefix}-icon-on-danger: #121d23;
|
|
139
|
+
--#{$prefix}-icon-on-danger-secondary: #f05959;
|
|
140
|
+
--#{$prefix}-icon-on-danger-secondary-hover: #ff8080;
|
|
141
|
+
--#{$prefix}-icon-disabled: #89969f;
|
|
142
|
+
--#{$prefix}-icon-on-disabled: #121d23;
|
|
143
|
+
--#{$prefix}-icon-on-light: #89969f;
|
|
144
|
+
--#{$prefix}-universe-itinerary-surface: #0d3333;
|
|
145
|
+
--#{$prefix}-universe-itinerary-text: #5ecfcf;
|
|
146
|
+
--#{$prefix}-universe-itinerary-icon: #5ecfcf;
|
|
147
|
+
--#{$prefix}-layout-sidebar-main-surface: #21303a;
|
|
148
|
+
--#{$prefix}-layout-sidebar-main-text: #121d23;
|
|
149
|
+
--#{$prefix}-layout-sidebar-main-icon: #fcfcfd;
|
|
150
|
+
--#{$prefix}-layout-sidebar-dual-default-surface: #121d23;
|
|
151
|
+
--#{$prefix}-layout-sidebar-dual-default-text: #121d23;
|
|
152
|
+
--#{$prefix}-layout-sidebar-dual-default-icon: #121d23;
|
|
153
|
+
--#{$prefix}-layout-sidebar-dual-hover-surface: #21303a;
|
|
154
|
+
--#{$prefix}-layout-sidebar-dual-hover-text: #121d23;
|
|
155
|
+
--#{$prefix}-layout-sidebar-dual-hover-icon: #121d23;
|
|
156
|
+
--#{$prefix}-layout-sidebar-universe-hover: #00638f;
|
|
157
|
+
--#{$prefix}-layout-sidebar-universe-selected: #00638f;
|
|
158
|
+
--#{$prefix}-layout-card-surface-default: #121d23;
|
|
159
|
+
--#{$prefix}-status-success-surface-default: #0e8c50;
|
|
160
|
+
--#{$prefix}-status-success-surface-light: #032d18;
|
|
161
|
+
--#{$prefix}-status-success-border-default: #0b7542;
|
|
162
|
+
--#{$prefix}-status-warning-surface-default: #a36500;
|
|
163
|
+
--#{$prefix}-status-warning-surface-light: #3d2500;
|
|
164
|
+
--#{$prefix}-status-warning-border-default: #a36500;
|
|
165
|
+
--#{$prefix}-status-danger-surface-default: #9a2828;
|
|
166
|
+
--#{$prefix}-status-danger-surface-light: #3a0a0a;
|
|
167
|
+
--#{$prefix}-status-danger-border-default: #9a2828;
|
|
168
|
+
--#{$prefix}-status-light-border-light: #21303a;
|
|
169
|
+
--#{$prefix}-system-dark: #ffffff;
|
|
170
|
+
--#{$prefix}-system-white: #000000;
|
|
171
|
+
--#{$prefix}-surface-light-hover: #0d1117;
|
|
172
|
+
--#{$prefix}-universe-booking-surface: #1a1640;
|
|
173
|
+
--#{$prefix}-universe-booking-text: #9b92e8;
|
|
174
|
+
--#{$prefix}-universe-booking-icon: #9b92e8;
|
|
175
|
+
--#{$prefix}-universe-purchase-surface: #2c1800;
|
|
176
|
+
--#{$prefix}-universe-purchase-text: #e0882a;
|
|
177
|
+
--#{$prefix}-universe-purchase-icon: #e0882a;
|
|
178
|
+
--#{$prefix}-universe-account-surface: #0e1a22;
|
|
179
|
+
--#{$prefix}-universe-account-text: #6fa3c4;
|
|
180
|
+
--#{$prefix}-universe-account-icon: #6fa3c4;
|
|
181
|
+
--#{$prefix}-universe-performance-surface: #260d30;
|
|
182
|
+
--#{$prefix}-universe-performance-text: #c47de0;
|
|
183
|
+
--#{$prefix}-universe-performance-icon: #c47de0;
|
|
184
|
+
--#{$prefix}-universe-web-apps-surface: #221a00;
|
|
185
|
+
--#{$prefix}-universe-web-apps-text: #d4a830;
|
|
186
|
+
--#{$prefix}-universe-web-apps-icon: #d4a830;
|
|
187
|
+
--#{$prefix}-layout-tab-surface-selected: #003b57;
|
|
188
|
+
--#{$prefix}-layout-sidebar-dual-selected-surface: #21303a;
|
|
189
|
+
--#{$prefix}-layout-sidebar-dual-selected-text: #121d23;
|
|
190
|
+
--#{$prefix}-layout-sidebar-dual-selected-icon: #121d23;
|
|
191
|
+
--#{$prefix}-universe-settings-surface: #21303a;
|
|
192
|
+
--#{$prefix}-universe-settings-text: #c8d6df;
|
|
193
|
+
--#{$prefix}-universe-settings-icon: #c8d6df;
|
|
194
|
+
--#{$prefix}-shadow-effect-2-default: #21303a;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
[#{$theme-attr}="#{$theme}"] {
|
|
198
|
+
--#{$prefix}-surface-default: #ffffff;
|
|
199
|
+
--#{$prefix}-surface-invert: #121d23;
|
|
200
|
+
--#{$prefix}-surface-main: #f5f8fa;
|
|
201
|
+
--#{$prefix}-border-default: #e6edf2;
|
|
202
|
+
--#{$prefix}-border-white: #ffffff;
|
|
203
|
+
--#{$prefix}-border-dark: #121d23;
|
|
204
|
+
--#{$prefix}-border-secondary: #89969f;
|
|
205
|
+
--#{$prefix}-border-light: #89969f;
|
|
206
|
+
--#{$prefix}-border-lighter: #e6edf2;
|
|
207
|
+
--#{$prefix}-text-default: #121d23;
|
|
208
|
+
--#{$prefix}-text-invert: #fcfcfd;
|
|
209
|
+
--#{$prefix}-text-primary: #00638f;
|
|
210
|
+
--#{$prefix}-text-primary-hover: #004a6d;
|
|
211
|
+
--#{$prefix}-text-on-primary: #ffffff;
|
|
212
|
+
--#{$prefix}-text-on-primary-hover: #ffffff;
|
|
213
|
+
--#{$prefix}-text-on-secondary: #65747e;
|
|
214
|
+
--#{$prefix}-text-success: #0b7542;
|
|
215
|
+
--#{$prefix}-text-danger: #d04444;
|
|
216
|
+
--#{$prefix}-text-danger-hover: #b83535;
|
|
217
|
+
--#{$prefix}-text-on-danger: #ffffff;
|
|
218
|
+
--#{$prefix}-text-on-danger-hover: #ffffff;
|
|
219
|
+
--#{$prefix}-text-on-danger-secondary: #d04444;
|
|
220
|
+
--#{$prefix}-text-on-danger-secondary-hover: #b83535;
|
|
221
|
+
--#{$prefix}-text-disabled: #65747e;
|
|
222
|
+
--#{$prefix}-text-disabled-darker: #4a5c66;
|
|
223
|
+
--#{$prefix}-text-on-disabled: #f5f8fa;
|
|
224
|
+
--#{$prefix}-surface-primary: #00638f;
|
|
225
|
+
--#{$prefix}-text-on-light: #65747e;
|
|
226
|
+
--#{$prefix}-surface-primary-hover: #004a6d;
|
|
227
|
+
--#{$prefix}-surface-secondary: #ffffff;
|
|
228
|
+
--#{$prefix}-surface-secondary-hover: #e6edf2;
|
|
229
|
+
--#{$prefix}-surface-danger: #d04444;
|
|
230
|
+
--#{$prefix}-surface-danger-hover: #b83535;
|
|
231
|
+
--#{$prefix}-surface-disabled: #65747e;
|
|
232
|
+
--#{$prefix}-surface-light: #f5f8fa;
|
|
233
|
+
--#{$prefix}-icon-default: #121d23;
|
|
234
|
+
--#{$prefix}-icon-invert: #fcfcfd;
|
|
235
|
+
--#{$prefix}-icon-primary: #00638f;
|
|
236
|
+
--#{$prefix}-status-information-surface-default: #cbe4fd;
|
|
237
|
+
--#{$prefix}-icon-primary-hover: #004a6d;
|
|
238
|
+
--#{$prefix}-icon-on-primary: #ffffff;
|
|
239
|
+
--#{$prefix}-status-information-surface-light: #ebf4ff;
|
|
240
|
+
--#{$prefix}-icon-on-primary-hover: #ffffff;
|
|
241
|
+
--#{$prefix}-icon-on-secondary: #65747e;
|
|
242
|
+
--#{$prefix}-status-information-border-default: #093d8533;
|
|
243
|
+
--#{$prefix}-icon-success: #0b7542;
|
|
244
|
+
--#{$prefix}-icon-warning: #a36500;
|
|
245
|
+
--#{$prefix}-icon-danger: #d04444;
|
|
246
|
+
--#{$prefix}-icon-on-danger: #ffffff;
|
|
247
|
+
--#{$prefix}-icon-on-danger-secondary: #d04444;
|
|
248
|
+
--#{$prefix}-icon-on-danger-secondary-hover: #b83535;
|
|
249
|
+
--#{$prefix}-icon-disabled: #65747e;
|
|
250
|
+
--#{$prefix}-icon-on-disabled: #f5f8fa;
|
|
251
|
+
--#{$prefix}-icon-on-light: #65747e;
|
|
252
|
+
--#{$prefix}-universe-itinerary-surface: #e0f4f4;
|
|
253
|
+
--#{$prefix}-universe-itinerary-text: #0e7a7a;
|
|
254
|
+
--#{$prefix}-universe-itinerary-icon: #0e7a7a;
|
|
255
|
+
--#{$prefix}-layout-sidebar-main-surface: #ffffff;
|
|
256
|
+
--#{$prefix}-layout-sidebar-main-text: #344650;
|
|
257
|
+
--#{$prefix}-layout-sidebar-main-icon: #344650;
|
|
258
|
+
--#{$prefix}-layout-sidebar-dual-default-surface: #e6edf2;
|
|
259
|
+
--#{$prefix}-layout-sidebar-dual-default-text: #344650;
|
|
260
|
+
--#{$prefix}-layout-sidebar-dual-default-icon: #344650;
|
|
261
|
+
--#{$prefix}-layout-sidebar-dual-hover-surface: #c8d6df;
|
|
262
|
+
--#{$prefix}-layout-sidebar-dual-hover-text: #344650;
|
|
263
|
+
--#{$prefix}-layout-sidebar-dual-hover-icon: #344650;
|
|
264
|
+
--#{$prefix}-layout-sidebar-universe-hover: #e6f3f9;
|
|
265
|
+
--#{$prefix}-layout-sidebar-universe-selected: #e6f3f9;
|
|
266
|
+
--#{$prefix}-layout-card-surface-default: #ffffff;
|
|
267
|
+
--#{$prefix}-status-success-surface-default: #c7f0da;
|
|
268
|
+
--#{$prefix}-status-success-surface-light: #eafaf1;
|
|
269
|
+
--#{$prefix}-status-success-border-default: #0b754233;
|
|
270
|
+
--#{$prefix}-status-warning-surface-default: #fdedc4;
|
|
271
|
+
--#{$prefix}-status-warning-surface-light: #fff8ea;
|
|
272
|
+
--#{$prefix}-status-warning-border-default: #a3650033;
|
|
273
|
+
--#{$prefix}-status-danger-surface-default: #ffd6d6;
|
|
274
|
+
--#{$prefix}-status-danger-surface-light: #fff0f0;
|
|
275
|
+
--#{$prefix}-status-danger-border-default: #9a282833;
|
|
276
|
+
--#{$prefix}-status-light-border-light: #e6edf2;
|
|
277
|
+
--#{$prefix}-system-dark: #000000;
|
|
278
|
+
--#{$prefix}-system-white: #ffffff;
|
|
279
|
+
--#{$prefix}-surface-light-hover: #e6edf2;
|
|
280
|
+
--#{$prefix}-universe-booking-surface: #eae8f8;
|
|
281
|
+
--#{$prefix}-universe-booking-text: #4a3db5;
|
|
282
|
+
--#{$prefix}-universe-booking-icon: #4a3db5;
|
|
283
|
+
--#{$prefix}-universe-purchase-surface: #fcf0e2;
|
|
284
|
+
--#{$prefix}-universe-purchase-text: #a06010;
|
|
285
|
+
--#{$prefix}-universe-purchase-icon: #a06010;
|
|
286
|
+
--#{$prefix}-universe-account-surface: #edf2ee;
|
|
287
|
+
--#{$prefix}-universe-account-text: #3a5068;
|
|
288
|
+
--#{$prefix}-universe-account-icon: #3a5068;
|
|
289
|
+
--#{$prefix}-universe-performance-surface: #f2e8f5;
|
|
290
|
+
--#{$prefix}-universe-performance-text: #7a2d9a;
|
|
291
|
+
--#{$prefix}-universe-performance-icon: #7a2d9a;
|
|
292
|
+
--#{$prefix}-universe-web-apps-surface: #f5f0e0;
|
|
293
|
+
--#{$prefix}-universe-web-apps-text: #7a5c00;
|
|
294
|
+
--#{$prefix}-universe-web-apps-icon: #7a5c00;
|
|
295
|
+
--#{$prefix}-layout-tab-surface-selected: #e6f3f9;
|
|
296
|
+
--#{$prefix}-layout-sidebar-dual-selected-surface: #c8d6df;
|
|
297
|
+
--#{$prefix}-layout-sidebar-dual-selected-text: #344650;
|
|
298
|
+
--#{$prefix}-layout-sidebar-dual-selected-icon: #344650;
|
|
299
|
+
--#{$prefix}-universe-settings-surface: #f5f8fa;
|
|
300
|
+
--#{$prefix}-universe-settings-text: #4a5c66;
|
|
301
|
+
--#{$prefix}-universe-settings-icon: #4a5c66;
|
|
302
|
+
--#{$prefix}-shadow-effect-2-default: #f5f8fa;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
[#{$theme-attr}^="#{$theme}"] .cw-divider {
|
|
306
|
+
--#{$prefix}-divider-surface-default: #e6edf2;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
[#{$theme-attr}^="#{$theme}"] .cw-dropdown {
|
|
310
|
+
--#{$prefix}-dropdown-surface: var(--#{$prefix}-layout-header-surface);
|
|
311
|
+
--#{$prefix}-dropdown-border: #e6edf2;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
[#{$theme-attr}^="#{$theme}"] .cw-image {
|
|
315
|
+
--#{$prefix}-image-border: #c8d6df;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
[#{$theme-attr}^="#{$theme}"] .cw-logo {
|
|
319
|
+
--#{$prefix}-logo-cityway-shape: #ffffff;
|
|
320
|
+
--#{$prefix}-logo-company-surface: #ffffff;
|
|
321
|
+
--#{$prefix}-logo-company-shape-1: #00638f;
|
|
322
|
+
--#{$prefix}-logo-company-shape-2: #b83535;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
[#{$theme-attr}^="#{$theme}"] .cw-slider {
|
|
326
|
+
--#{$prefix}-slider-default-surface: #65747e;
|
|
327
|
+
--#{$prefix}-slider-selected-surface: #00638f;
|
|
328
|
+
--#{$prefix}-slider-inside-surface: #ffffff;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
[#{$theme-attr}^="#{$theme}"] .cw-switch {
|
|
332
|
+
--#{$prefix}-switch-surface-default: #65747e;
|
|
333
|
+
--#{$prefix}-switch-surface-danger: #ffffff;
|
|
334
|
+
--#{$prefix}-switch-surface-disabled: #65747e80;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
[#{$theme-attr}^="#{$theme}"] .cw-table {
|
|
338
|
+
--#{$prefix}-table-heading-text: var(--#{$prefix}-text-default);
|
|
339
|
+
--#{$prefix}-table-heading-filtered-surface: var(--#{$prefix}-table-heading-surface);
|
|
340
|
+
--#{$prefix}-table-cell-surface-default: var(--#{$prefix}-surface-default);
|
|
341
|
+
--#{$prefix}-table-cell-surface-hover: var(--#{$prefix}-surface-light-hover);
|
|
342
|
+
--#{$prefix}-table-pagination-disabled-surface: var(--#{$prefix}-surface-secondary);
|
|
343
|
+
--#{$prefix}-table-pagination-disabled-border: var(--#{$prefix}-table-border);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
[#{$theme-attr}^="#{$theme}"] .field-group {
|
|
347
|
+
--#{$prefix}-field-default-border: #89969f;
|
|
348
|
+
--#{$prefix}-field-default-border-focus-outline: #093d8533;
|
|
349
|
+
--#{$prefix}-field-danger-border: var(--#{$prefix}-border-danger);
|
|
350
|
+
--#{$prefix}-field-danger-border-focus: #ff8080;
|
|
351
|
+
--#{$prefix}-field-danger-border-focus-outline: #9a282833;
|
|
352
|
+
--#{$prefix}-field-select-badge-border: #b8dbff;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
[#{$theme-attr}^="#{$theme}"] .tooltip {
|
|
356
|
+
--#{$prefix}-tooltip-text: var(--#{$prefix}-text-invert);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .cw-divider {
|
|
360
|
+
--#{$prefix}-divider-surface-invert: #121d23;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .cw-logo {
|
|
364
|
+
--#{$prefix}-logo-cityway-surface: #121d23;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .cw-progressbar {
|
|
368
|
+
--#{$prefix}-progressbar-information: #74b5fa;
|
|
369
|
+
--#{$prefix}-progressbar-on-information: #121d23;
|
|
370
|
+
--#{$prefix}-progressbar-success: #38bb77;
|
|
371
|
+
--#{$prefix}-progressbar-on-success: #121d23;
|
|
372
|
+
--#{$prefix}-progressbar-warning: #f5af24;
|
|
373
|
+
--#{$prefix}-progressbar-on-warning: #121d23;
|
|
374
|
+
--#{$prefix}-progressbar-danger: #ff8080;
|
|
375
|
+
--#{$prefix}-progressbar-on-danger: #121d23;
|
|
376
|
+
--#{$prefix}-progressbar-neutral: #344650;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .cw-slider {
|
|
380
|
+
--#{$prefix}-slider-disabled-surface: #0d1117;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .cw-table {
|
|
384
|
+
--#{$prefix}-table-border: #21303a;
|
|
385
|
+
--#{$prefix}-table-heading-surface: #0d1117;
|
|
386
|
+
--#{$prefix}-table-cell-surface-selected: #003b57;
|
|
387
|
+
--#{$prefix}-table-pagination-disabled-icon: #121d23;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .field-group {
|
|
391
|
+
--#{$prefix}-field-surface: #121d23;
|
|
392
|
+
--#{$prefix}-field-default-border-focus: #0f5ecc;
|
|
393
|
+
--#{$prefix}-field-readonly-surface: #21303a;
|
|
394
|
+
--#{$prefix}-field-readonly-border: #21303a;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .popover {
|
|
398
|
+
--#{$prefix}-popover-header-surface: #0d1117;
|
|
399
|
+
--#{$prefix}-popover-body-surface: #121d23;
|
|
400
|
+
--#{$prefix}-popover-border: #21303a;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[#{$theme-attr}="#{$theme}-#{$dark-suffix}"] .tooltip {
|
|
404
|
+
--#{$prefix}-tooltip-surface: #89969f;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
[#{$theme-attr}="#{$theme}"] .cw-divider {
|
|
408
|
+
--#{$prefix}-divider-surface-invert: #ffffff;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
[#{$theme-attr}="#{$theme}"] .cw-logo {
|
|
412
|
+
--#{$prefix}-logo-cityway-surface: #00638f;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
[#{$theme-attr}="#{$theme}"] .cw-progressbar {
|
|
416
|
+
--#{$prefix}-progressbar-information: #1570e8;
|
|
417
|
+
--#{$prefix}-progressbar-on-information: #ffffff;
|
|
418
|
+
--#{$prefix}-progressbar-success: #0b7542;
|
|
419
|
+
--#{$prefix}-progressbar-on-success: #ffffff;
|
|
420
|
+
--#{$prefix}-progressbar-warning: #a36500;
|
|
421
|
+
--#{$prefix}-progressbar-on-warning: #ffffff;
|
|
422
|
+
--#{$prefix}-progressbar-danger: #d04444;
|
|
423
|
+
--#{$prefix}-progressbar-on-danger: #ffffff;
|
|
424
|
+
--#{$prefix}-progressbar-neutral: #c8d6df;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
[#{$theme-attr}="#{$theme}"] .cw-slider {
|
|
428
|
+
--#{$prefix}-slider-disabled-surface: #e6edf2;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
[#{$theme-attr}="#{$theme}"] .cw-table {
|
|
432
|
+
--#{$prefix}-table-border: #e6edf2;
|
|
433
|
+
--#{$prefix}-table-heading-surface: #f5f8fa;
|
|
434
|
+
--#{$prefix}-table-cell-surface-selected: #e6f3f9;
|
|
435
|
+
--#{$prefix}-table-pagination-disabled-icon: #a3b6c2;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
[#{$theme-attr}="#{$theme}"] .field-group {
|
|
439
|
+
--#{$prefix}-field-surface: #ffffff;
|
|
440
|
+
--#{$prefix}-field-default-border-focus: #3d95f5;
|
|
441
|
+
--#{$prefix}-field-readonly-surface: #e6edf2;
|
|
442
|
+
--#{$prefix}-field-readonly-border: #e6edf2;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
[#{$theme-attr}="#{$theme}"] .popover {
|
|
446
|
+
--#{$prefix}-popover-header-surface: #f5f8fa;
|
|
447
|
+
--#{$prefix}-popover-body-surface: #ffffff;
|
|
448
|
+
--#{$prefix}-popover-border: #f5f8fa;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
[#{$theme-attr}="#{$theme}"] .tooltip {
|
|
452
|
+
--#{$prefix}-tooltip-surface: #21303a;
|
|
453
|
+
}
|
|
454
|
+
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# `@cityway/design-tokens`
|
|
2
|
+
|
|
3
|
+
> Fondations visuelles (couleurs, layout, typo) du Design System Cityway, exposées en SCSS + variables CSS.
|
|
4
|
+
>
|
|
5
|
+
> ⚠️ **Lib en refonte.** Ce document décrit **l'état cible** (architecture verrouillée avec le DS). Les points non figés sont marqués **TBD**. À relire/compléter avec l'équipe UX/DS.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Fonction & ce qu'elle propose
|
|
10
|
+
|
|
11
|
+
`design-tokens` est le **miroir code du Design System Figma**. C'est la **source unique** des valeurs visuelles consommées par `basic-ui` et `bo-ui` :
|
|
12
|
+
|
|
13
|
+
- des **variables CSS publiques** préfixées `--cw-*` (couleurs, rayons, espacements, ombres, tailles…) ;
|
|
14
|
+
- des **fonctions SCSS accesseurs** qui renvoient ces `var(--cw-*)` ;
|
|
15
|
+
- l'organisation **multi-thèmes** (`bo`, `fo`) et **dark** (`bo-dark`).
|
|
16
|
+
|
|
17
|
+
La lib ne contient **aucun composant ni classe** : uniquement des fondations.
|
|
18
|
+
|
|
19
|
+
### Principe directeur
|
|
20
|
+
|
|
21
|
+
Le DS Figma exporte des JSON (`bou-colors.json`, `bou-layout.json` ; typo **TBD**, pas encore exportée). Une **moulinette Node** régénère le SCSS à partir de ces JSON (cadence ~mensuelle, manuelle). On ne modifie pas les tokens à la main : on régénère.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Architecture cible
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
@cityway/design-tokens
|
|
29
|
+
├── _config.scss # variables de config (prefixe, attribut de theme, suffixe dark) [écrit à la main]
|
|
30
|
+
├── _functions.scss # accesseurs SCSS -> var(--cw-*) [à la main]
|
|
31
|
+
├── _theme-mapping.scss # mapping thèmes (compat ancienne API) [à la main]
|
|
32
|
+
├── _primitives.scss # primitives (entrée de validation, non émis en prod) [à la main]
|
|
33
|
+
├── _tokens-bo.scss # tokens COULEUR du thème bo (+ bo-dark) [GÉNÉRÉ par sync-colors]
|
|
34
|
+
├── _layout-bo.scss # tokens LAYOUT du thème bo [GÉNÉRÉ par sync-layout]
|
|
35
|
+
└── _index.scss # point d'entrée (@forward)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Conventions de nommage (calquées Figma)
|
|
39
|
+
|
|
40
|
+
| Figma | Variable CSS |
|
|
41
|
+
|-------|--------------|
|
|
42
|
+
| `surface/primary-hover` | `--cw-surface-primary-hover` |
|
|
43
|
+
| `text/default` | `--cw-text-default` |
|
|
44
|
+
| `radius/md` | `--cw-radius-md` |
|
|
45
|
+
|
|
46
|
+
- **Tout** sort en **CSS custom properties** (couleur **et** layout) → un changement responsive ne casse jamais un consommateur.
|
|
47
|
+
- Les fonctions SCSS deviennent de simples accesseurs renvoyant `var(--cw-…)`.
|
|
48
|
+
|
|
49
|
+
### Thèmes & sélecteurs
|
|
50
|
+
|
|
51
|
+
| Sélecteur | Portée |
|
|
52
|
+
|-----------|--------|
|
|
53
|
+
| `[data-cw-theme^="cw-bo"]` (`^=`) | **Commun light + dark** : layout, gabarits, invariants. `^="cw-bo"` attrape `cw-bo` ET `cw-bo-dark`. |
|
|
54
|
+
| `[data-cw-theme="cw-bo"]` | Valeurs **couleur light** |
|
|
55
|
+
| `[data-cw-theme="cw-bo-dark"]` | Valeurs **couleur dark** |
|
|
56
|
+
| `[data-cw-theme="cw-fo"]` | Thème Front-Office |
|
|
57
|
+
|
|
58
|
+
- **2 thèmes** : `bo` (alimenté par l'export BOU) et `fo` (**même arborescence/mêmes noms** de tokens, seules les valeurs changent ; futur JSON FO de structure identique — **TBD**).
|
|
59
|
+
- **Dark = BO uniquement.** FO aura ses propres déclinaisons (**TBD**).
|
|
60
|
+
|
|
61
|
+
### Unités & responsive
|
|
62
|
+
|
|
63
|
+
- Tout en **`rem`** (conversion px→rem base 16) ; opacités sans unité.
|
|
64
|
+
- Breakpoints **Bootstrap 5 mobile-first**. Bascule à **768px** (Tablet) confirmée ; **1200px** (Desktop) provisoire — **TBD**.
|
|
65
|
+
- Une media query n'est émise **que** pour les tokens layout qui **varient** entre Desktop/Tablet/Mobile ; sinon valeur unique.
|
|
66
|
+
|
|
67
|
+
### Cas particuliers de mapping (résumé)
|
|
68
|
+
|
|
69
|
+
- **Ombres** : une `var` composée par effet (`--cw-shadow-effect-N: ox oy blur spread color`), pas une var par offset/blur.
|
|
70
|
+
- **Type de nœud Figma → CSS** : icône vecteur → `color` (sprite currentColor) ; ellipse derrière icône → `background-color` ; vrai SVG multi-couleurs → `fill` ; flèche tooltip/popover → `border-color` (triangle CSS). Détail dans `docs/for-claude.md`.
|
|
71
|
+
- **Garde dark** : l'export recopie parfois le light dans le dark pour des alias vivants → corrections ciblées (`ALIAS_LIVE`, `VALUE_CORRECTIONS`) dans la moulinette. Root cause à corriger côté export DS. **TBD**.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 3. Comment consommer la lib (côté basic-ui / bo-ui)
|
|
76
|
+
|
|
77
|
+
La lib est 100% SCSS, publiée en `.tgz`, installée à plat dans `node_modules/@cityway/design-tokens/`.
|
|
78
|
+
|
|
79
|
+
```scss
|
|
80
|
+
// dans un SCSS de composant ou un bundle de thème
|
|
81
|
+
@use "@cityway/design-tokens/functions" as f;
|
|
82
|
+
|
|
83
|
+
.mon-composant {
|
|
84
|
+
// Recommandé : consommer les variables CSS (theme-aware, dark-safe)
|
|
85
|
+
background-color: var(--cw-surface-default);
|
|
86
|
+
color: var(--cw-text-default);
|
|
87
|
+
border-radius: var(--cw-radius-md);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Compilation avec résolution node_modules :
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx sass --load-path=node_modules <entrée>.scss <sortie>.css
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
> ⚠️ **Piège dark** : ne PAS consommer les variables **legacy** light-only (`--cw-border-radius`, `--cw-shadow-default`, `--cw-body-*`) dans un composant migré : elles ne sont définies que dans le bloc light → elles disparaissent en dark. Utiliser les tokens DS (`--cw-radius-*`, `--cw-shadow-effect-*`) avec éventuellement un fallback legacy pour le FO :
|
|
98
|
+
> `border-radius: var(--cw-radius-xs, var(--cw-border-radius));`
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 4. Régénérer les tokens (workflow mainteneur)
|
|
103
|
+
|
|
104
|
+
> Outillage officiel sous `projects/design-tokens/tooling/` (sources, moulinette, sorties). Non publié dans le `.tgz` (hors `files`).
|
|
105
|
+
|
|
106
|
+
1. Mettre à jour les JSON source (`tooling/tokens-source/bou-colors.json`, `bou-layout.json`).
|
|
107
|
+
2. Régénérer :
|
|
108
|
+
```bash
|
|
109
|
+
cd projects/design-tokens/tooling
|
|
110
|
+
node sync-colors.mjs # -> out/_tokens.bo.scss (+ audit DS)
|
|
111
|
+
node sync-layout.mjs # -> out/_layout.bo.scss
|
|
112
|
+
```
|
|
113
|
+
3. Copier les sorties vers la lib **et** vers `node_modules` (équivaut à un install rapide) :
|
|
114
|
+
- `out/_tokens.bo.scss` → `projects/design-tokens/_tokens-bo.scss` **et** `node_modules/@cityway/design-tokens/_tokens-bo.scss`
|
|
115
|
+
- idem pour `_layout-bo.scss`
|
|
116
|
+
4. Recompiler les bundles `basic-ui` (`npm run pack-basic-ui`) pour propager.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 5. Build & publication
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npm run pack-design-tokens # cd projects/design-tokens && npm pack -> .tgz
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Le `package.json` liste les fichiers publiés (`files[]`) : `_index`, `_primitives`, `_functions`, `_theme-mapping`, `_config`, `_tokens-bo`, `_layout-bo`.
|
|
127
|
+
|
|
128
|
+
> Quand la doc embarquée sera mise en place, ajouter `docs/` à `files[]` pour qu'elle voyage dans le `.tgz`.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 6. Points non figés (TBD à trancher avec l'UX/DS)
|
|
133
|
+
|
|
134
|
+
- **Typographie** : pas de JSON DS exporté → reste géré à la main (`$font`) en attendant.
|
|
135
|
+
- **Thème FO** : structure identique au BO, valeurs et dark à fournir.
|
|
136
|
+
- **Breakpoint Desktop** (1200px) provisoire.
|
|
137
|
+
- **Correction de l'export DS** (alias dark recopiés du light) : idéalement corriger l'export pour supprimer les allowlists `ALIAS_LIVE`/`VALUE_CORRECTIONS`.
|
|
138
|
+
- **Couche de compat** ancienne API (`color()`, `size()`, `--cw-primary-base`) : périmètre et durée de vie.
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityway/design-tokens",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0-beta002",
|
|
4
4
|
"style": "_index.scss",
|
|
5
5
|
"files": [
|
|
6
6
|
"_index.scss",
|
|
7
7
|
"_primitives.scss",
|
|
8
8
|
"_functions.scss",
|
|
9
|
-
"_theme-mapping.scss"
|
|
9
|
+
"_theme-mapping.scss",
|
|
10
|
+
"_config.scss",
|
|
11
|
+
"_tokens-bo.scss",
|
|
12
|
+
"_layout-bo.scss",
|
|
13
|
+
"docs"
|
|
10
14
|
]
|
|
11
15
|
}
|