@demos-europe/demosplan-ui 0.3.19 → 0.3.21
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/.idea/shelf/Uncommitted_changes_before_Update_at_17_07_2024_15_21_[Changes]/shelved.patch +36 -0
- package/.idea/shelf/Uncommitted_changes_before_Update_at_17_07_2024_15_21__Changes_.xml +4 -0
- package/.idea/workspace.xml +37 -7
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +20 -1
- package/buildTokens.js +157 -41
- package/dist/demosplan-ui.umd.js +1 -1
- package/package.json +5 -4
- package/src/components/DpButtonRow/DpButtonRow.vue +8 -2
- package/src/components/DpEditor/DpEditor.vue +46 -33
- package/src/components/DpEditor/DpResizableImage.vue +10 -4
- package/src/components/DpEditor/DpUploadModal.vue +29 -15
- package/src/components/DpUploadFiles/DpUpload.vue +9 -1
- package/src/components/DpUploadFiles/DpUploadFiles.vue +7 -0
- package/storybook-static/favicon.svg +7 -0
- package/storybook-static/index.html +123 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +63 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/fonts.css +31 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js +1 -0
- package/storybook-static/sb-manager/chunk-4IYAVH3S.js +348 -0
- package/storybook-static/sb-manager/chunk-CXYKRFSY.js +9 -0
- package/storybook-static/sb-manager/chunk-LVLAH4SI.js +7 -0
- package/storybook-static/sb-manager/chunk-VFHDXWEA.js +406 -0
- package/storybook-static/sb-manager/chunk-ZEU7PDD3.js +1 -0
- package/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals.js +1 -0
- package/storybook-static/sb-manager/index.js +1 -0
- package/storybook-static/sb-manager/runtime.js +1 -0
- package/storybook-static/sb-manager/syntaxhighlighter-B5GMVT5T-EA5ASEYD.js +1 -0
- package/storybook-static/stories.json +1 -0
- package/tailwind.config.js +27 -1
- package/tokens/dist/js/boxShadow.js +13 -81
- package/tokens/dist/js/breakpoints.js +1 -1
- package/tokens/dist/js/color.brand.js +19 -7
- package/tokens/dist/js/color.data.js +85 -29
- package/tokens/dist/js/color.palette.js +175 -59
- package/tokens/dist/js/color.ui-tailwind.js +1899 -0
- package/tokens/dist/js/color.ui.js +2063 -57
- package/tokens/dist/js/fontSize.js +1 -1
- package/tokens/dist/js/rounded.js +1 -77
- package/tokens/dist/js/space.js +1 -1
- package/tokens/dist/js/zIndex.js +1 -1
- package/tokens/dist/scss/_boxShadow.scss +1 -1
- package/tokens/dist/scss/_breakpoints.scss +1 -1
- package/tokens/dist/scss/_color.brand.scss +1 -1
- package/tokens/dist/scss/_color.data.scss +1 -1
- package/tokens/dist/scss/_color.palette.scss +1 -1
- package/tokens/dist/scss/_color.ui.scss +1 -1
- package/tokens/dist/scss/_fontSize.scss +1 -1
- package/tokens/dist/scss/_rounded.scss +1 -1
- package/tokens/dist/scss/_space.scss +1 -1
- package/tokens/dist/scss/_zIndex.scss +1 -1
- package/tokens/dist/tailwind/backgroundColor.js +24 -0
- package/tokens/dist/tailwind/borderColor.js +9 -0
- package/tokens/dist/tailwind/color.brand.js +8 -0
- package/tokens/dist/tailwind/color.data.js +30 -0
- package/tokens/dist/tailwind/color.js +5 -0
- package/tokens/dist/tailwind/color.palette.js +60 -0
- package/tokens/dist/tailwind/textColor.js +37 -0
- package/tokens/src/boxShadow.json +16 -8
- package/tokens/src/color/color.brand.json +12 -6
- package/tokens/src/color/color.data.json +56 -28
- package/tokens/src/color/color.palette.json +116 -58
- package/tokens/src/color/color.ui-tailwind.json +401 -0
- package/tokens/src/color/color.ui.json +114 -57
- package/tokens/tokens.color.stories.mdx +83 -34
- package/tokens/tokens.space.stories.mdx +20 -20
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_12_07_2024_08_46_[Changes]/shelved.patch +0 -30538
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_12_07_2024_08_46__Changes_.xml +0 -4
- package/.idea/shelf/Uncommitted_changes_before_Update_at_12_07_2024_14_02_[Changes]/shelved.patch +0 -19
- package/.idea/shelf/Uncommitted_changes_before_Update_at_12_07_2024_14_02__Changes_.xml +0 -4
- package/style/index.css +0 -7
|
@@ -7,32 +7,38 @@
|
|
|
7
7
|
"default": {
|
|
8
8
|
"$description": "Default state.",
|
|
9
9
|
"value": "{color.palette.blue.base}",
|
|
10
|
-
"themeable": true
|
|
10
|
+
"themeable": true,
|
|
11
|
+
"$type": "color"
|
|
11
12
|
},
|
|
12
13
|
"hover": {
|
|
13
14
|
"$description": "Hover state.",
|
|
14
15
|
"value": "{color.palette.blue.dark-1}",
|
|
15
|
-
"themeable": true
|
|
16
|
+
"themeable": true,
|
|
17
|
+
"$type": "color"
|
|
16
18
|
},
|
|
17
19
|
"subtle-hover": {
|
|
18
20
|
"$description": "Use as background to visualize hover state for bigger areas or buttons.",
|
|
19
21
|
"value": "{color.palette.neutral.light-4}",
|
|
20
|
-
"themeable": true
|
|
22
|
+
"themeable": true,
|
|
23
|
+
"$type": "color"
|
|
21
24
|
},
|
|
22
25
|
"subtle-active": {
|
|
23
26
|
"$description": "Use as background to visualize active state for bigger areas or buttons.",
|
|
24
27
|
"value": "{color.palette.neutral.light-3}",
|
|
25
|
-
"themeable": true
|
|
28
|
+
"themeable": true,
|
|
29
|
+
"$type": "color"
|
|
26
30
|
},
|
|
27
31
|
"active": {
|
|
28
32
|
"$description": "Active/pressed state.",
|
|
29
33
|
"value": "{color.palette.blue.dark-2}",
|
|
30
|
-
"themeable": true
|
|
34
|
+
"themeable": true,
|
|
35
|
+
"$type": "color"
|
|
31
36
|
},
|
|
32
37
|
"muted": {
|
|
33
38
|
"$description": "Use for interactive elements that reveal their base state on:hover of a parent element, eg. in a table row. Note that this is not to be conflated with the disabled state, which is communicated via opacity.",
|
|
34
39
|
"value": "{color.palette.neutral.light-1}",
|
|
35
|
-
"themeable": true
|
|
40
|
+
"themeable": true,
|
|
41
|
+
"$type": "color"
|
|
36
42
|
}
|
|
37
43
|
},
|
|
38
44
|
"message": {
|
|
@@ -41,115 +47,140 @@
|
|
|
41
47
|
"$description": "Use these colors to communicate uncritical information.",
|
|
42
48
|
"bg": {
|
|
43
49
|
"value": "{color.palette.blue.light-3}",
|
|
44
|
-
"themeable": true
|
|
50
|
+
"themeable": true,
|
|
51
|
+
"$type": "color"
|
|
45
52
|
},
|
|
46
53
|
"border": {
|
|
47
54
|
"value": "{color.palette.blue.light-1}",
|
|
48
|
-
"themeable": true
|
|
55
|
+
"themeable": true,
|
|
56
|
+
"$type": "color"
|
|
49
57
|
},
|
|
50
58
|
"fill": {
|
|
51
59
|
"value": "{color.palette.blue.dark-1}",
|
|
52
|
-
"themeable": true
|
|
60
|
+
"themeable": true,
|
|
61
|
+
"$type": "color"
|
|
53
62
|
},
|
|
54
63
|
"interactive": {
|
|
55
64
|
"value": "{color.palette.blue.base}",
|
|
56
|
-
"themeable": true
|
|
65
|
+
"themeable": true,
|
|
66
|
+
"$type": "color"
|
|
57
67
|
},
|
|
58
68
|
"text": {
|
|
59
69
|
"value": "{color.palette.blue.dark-2}",
|
|
60
|
-
"themeable": true
|
|
70
|
+
"themeable": true,
|
|
71
|
+
"$type": "color"
|
|
61
72
|
}
|
|
62
73
|
},
|
|
63
74
|
"warning": {
|
|
64
75
|
"$description": "Use these colors to noticeably communicate uncritical information.",
|
|
65
76
|
"bg": {
|
|
66
77
|
"value": "{color.palette.yellow.light-3}",
|
|
67
|
-
"themeable": true
|
|
78
|
+
"themeable": true,
|
|
79
|
+
"$type": "color"
|
|
68
80
|
},
|
|
69
81
|
"border": {
|
|
70
82
|
"value": "{color.palette.yellow.base}",
|
|
71
|
-
"themeable": true
|
|
83
|
+
"themeable": true,
|
|
84
|
+
"$type": "color"
|
|
72
85
|
},
|
|
73
86
|
"fill": {
|
|
74
87
|
"value": "{color.palette.yellow.dark-2}",
|
|
75
|
-
"themeable": true
|
|
88
|
+
"themeable": true,
|
|
89
|
+
"$type": "color"
|
|
76
90
|
},
|
|
77
91
|
"interactive": {
|
|
78
92
|
"value": "{color.palette.yellow.dark-2}",
|
|
79
|
-
"themeable": true
|
|
93
|
+
"themeable": true,
|
|
94
|
+
"$type": "color"
|
|
80
95
|
},
|
|
81
96
|
"text": {
|
|
82
97
|
"value": "{color.palette.yellow.dark-2}",
|
|
83
|
-
"themeable": true
|
|
98
|
+
"themeable": true,
|
|
99
|
+
"$type": "color"
|
|
84
100
|
}
|
|
85
101
|
},
|
|
86
102
|
"severe": {
|
|
87
103
|
"$description": "Use these colors to communicate importance, danger, and immediate action.",
|
|
88
104
|
"bg": {
|
|
89
105
|
"value": "{color.palette.red.light-3}",
|
|
90
|
-
"themeable": true
|
|
106
|
+
"themeable": true,
|
|
107
|
+
"$type": "color"
|
|
91
108
|
},
|
|
92
109
|
"border": {
|
|
93
110
|
"value": "{color.palette.red.light-1}",
|
|
94
|
-
"themeable": true
|
|
111
|
+
"themeable": true,
|
|
112
|
+
"$type": "color"
|
|
95
113
|
},
|
|
96
114
|
"fill": {
|
|
97
115
|
"value": "{color.palette.red.dark-1}",
|
|
98
|
-
"themeable": true
|
|
116
|
+
"themeable": true,
|
|
117
|
+
"$type": "color"
|
|
99
118
|
},
|
|
100
119
|
"interactive": {
|
|
101
120
|
"value": "{color.palette.red.dark-1}",
|
|
102
|
-
"themeable": true
|
|
121
|
+
"themeable": true,
|
|
122
|
+
"$type": "color"
|
|
103
123
|
},
|
|
104
124
|
"text": {
|
|
105
125
|
"value": "{color.palette.red.dark-2}",
|
|
106
|
-
"themeable": true
|
|
126
|
+
"themeable": true,
|
|
127
|
+
"$type": "color"
|
|
107
128
|
}
|
|
108
129
|
},
|
|
109
130
|
"success": {
|
|
110
131
|
"$description": "Use these colors to communicate successful state change.",
|
|
111
132
|
"bg": {
|
|
112
133
|
"value": "{color.palette.green.light-3}",
|
|
113
|
-
"themeable": true
|
|
134
|
+
"themeable": true,
|
|
135
|
+
"$type": "color"
|
|
114
136
|
},
|
|
115
137
|
"border": {
|
|
116
138
|
"value": "{color.palette.green.light-1}",
|
|
117
|
-
"themeable": true
|
|
139
|
+
"themeable": true,
|
|
140
|
+
"$type": "color"
|
|
118
141
|
},
|
|
119
142
|
"fill": {
|
|
120
143
|
"value": "{color.palette.green.dark-1}",
|
|
121
|
-
"themeable": true
|
|
144
|
+
"themeable": true,
|
|
145
|
+
"$type": "color"
|
|
122
146
|
},
|
|
123
147
|
"interactive": {
|
|
124
148
|
"value": "{color.palette.green.base}",
|
|
125
|
-
"themeable": true
|
|
149
|
+
"themeable": true,
|
|
150
|
+
"$type": "color"
|
|
126
151
|
},
|
|
127
152
|
"text": {
|
|
128
153
|
"value": "{color.palette.green.dark-2}",
|
|
129
|
-
"themeable": true
|
|
154
|
+
"themeable": true,
|
|
155
|
+
"$type": "color"
|
|
130
156
|
}
|
|
131
157
|
},
|
|
132
158
|
"debug": {
|
|
133
159
|
"$description": "Use these colors to communicate information for debugging purposes.",
|
|
134
160
|
"bg": {
|
|
135
161
|
"value": "{color.palette.purple.light-3}",
|
|
136
|
-
"themeable": true
|
|
162
|
+
"themeable": true,
|
|
163
|
+
"$type": "color"
|
|
137
164
|
},
|
|
138
165
|
"border": {
|
|
139
166
|
"value": "{color.palette.purple.light-1}",
|
|
140
|
-
"themeable": true
|
|
167
|
+
"themeable": true,
|
|
168
|
+
"$type": "color"
|
|
141
169
|
},
|
|
142
170
|
"fill": {
|
|
143
171
|
"value": "{color.palette.purple.dark-1}",
|
|
144
|
-
"themeable": true
|
|
172
|
+
"themeable": true,
|
|
173
|
+
"$type": "color"
|
|
145
174
|
},
|
|
146
175
|
"interactive": {
|
|
147
176
|
"value": "{color.palette.purple.dark-1}",
|
|
148
|
-
"themeable": true
|
|
177
|
+
"themeable": true,
|
|
178
|
+
"$type": "color"
|
|
149
179
|
},
|
|
150
180
|
"text": {
|
|
151
181
|
"value": "{color.palette.purple.dark-2}",
|
|
152
|
-
"themeable": true
|
|
182
|
+
"themeable": true,
|
|
183
|
+
"$type": "color"
|
|
153
184
|
}
|
|
154
185
|
}
|
|
155
186
|
},
|
|
@@ -159,59 +190,70 @@
|
|
|
159
190
|
"$description": "Use these colors to communicate that something is in progress",
|
|
160
191
|
"fill": {
|
|
161
192
|
"value": "{color.palette.blue.base}",
|
|
162
|
-
"themeable": true
|
|
193
|
+
"themeable": true,
|
|
194
|
+
"$type": "color"
|
|
163
195
|
},
|
|
164
196
|
"text": {
|
|
165
197
|
"value": "{color.palette.blue.dark-1}",
|
|
166
|
-
"themeable": true
|
|
198
|
+
"themeable": true,
|
|
199
|
+
"$type": "color"
|
|
167
200
|
}
|
|
168
201
|
},
|
|
169
202
|
"changed": {
|
|
170
203
|
"$description": "Use these colors to communicate something has moved or changed.",
|
|
171
204
|
"fill": {
|
|
172
205
|
"value": "{color.palette.yellow.dark-1}",
|
|
173
|
-
"themeable": true
|
|
206
|
+
"themeable": true,
|
|
207
|
+
"$type": "color"
|
|
174
208
|
},
|
|
175
209
|
"text": {
|
|
176
210
|
"value": "{color.palette.yellow.dark-2}",
|
|
177
|
-
"themeable": true
|
|
211
|
+
"themeable": true,
|
|
212
|
+
"$type": "color"
|
|
178
213
|
}
|
|
179
214
|
},
|
|
180
215
|
"failed": {
|
|
181
216
|
"$description": "Use these colors to communicate that an action or validation has failed on an item.",
|
|
182
217
|
"border": {
|
|
183
218
|
"value": "{color.palette.red.base}",
|
|
184
|
-
"themeable": true
|
|
219
|
+
"themeable": true,
|
|
220
|
+
"$type": "color"
|
|
185
221
|
},
|
|
186
222
|
"fill": {
|
|
187
223
|
"value": "{color.palette.red.base}",
|
|
188
|
-
"themeable": true
|
|
224
|
+
"themeable": true,
|
|
225
|
+
"$type": "color"
|
|
189
226
|
},
|
|
190
227
|
"text": {
|
|
191
228
|
"value": "{color.palette.red.dark-1}",
|
|
192
|
-
"themeable": true
|
|
229
|
+
"themeable": true,
|
|
230
|
+
"$type": "color"
|
|
193
231
|
}
|
|
194
232
|
},
|
|
195
233
|
"complete": {
|
|
196
234
|
"$description": "Use these colors to communicate that an action has completed, or something has been added.",
|
|
197
235
|
"fill": {
|
|
198
236
|
"value": "{color.palette.green.base}",
|
|
199
|
-
"themeable": true
|
|
237
|
+
"themeable": true,
|
|
238
|
+
"$type": "color"
|
|
200
239
|
},
|
|
201
240
|
"text": {
|
|
202
241
|
"value": "{color.palette.green.dark-1}",
|
|
203
|
-
"themeable": true
|
|
242
|
+
"themeable": true,
|
|
243
|
+
"$type": "color"
|
|
204
244
|
}
|
|
205
245
|
},
|
|
206
246
|
"neutral": {
|
|
207
247
|
"$description": "Use these colors if no other option applies.",
|
|
208
248
|
"fill": {
|
|
209
249
|
"value": "{color.palette.neutral.base}",
|
|
210
|
-
"themeable": true
|
|
250
|
+
"themeable": true,
|
|
251
|
+
"$type": "color"
|
|
211
252
|
},
|
|
212
253
|
"text": {
|
|
213
254
|
"value": "{color.palette.neutral.dark-1}",
|
|
214
|
-
"themeable": true
|
|
255
|
+
"themeable": true,
|
|
256
|
+
"$type": "color"
|
|
215
257
|
}
|
|
216
258
|
}
|
|
217
259
|
},
|
|
@@ -220,59 +262,71 @@
|
|
|
220
262
|
"default": {
|
|
221
263
|
"$description": "Default color for text that should be readable.",
|
|
222
264
|
"value": "{color.palette.neutral.dark-2}",
|
|
223
|
-
"themeable": true
|
|
265
|
+
"themeable": true,
|
|
266
|
+
"$type": "color"
|
|
224
267
|
},
|
|
225
268
|
"muted": {
|
|
226
269
|
"$description": "Default color for text that should stand out a little less. Has sufficient contrast on white.",
|
|
227
270
|
"value": "{color.palette.neutral.base}",
|
|
228
|
-
"themeable": true
|
|
271
|
+
"themeable": true,
|
|
272
|
+
"$type": "color"
|
|
229
273
|
},
|
|
230
274
|
"on-dark": {
|
|
231
275
|
"$description": "Default color for text that has sufficient contrast on dark backgrounds.",
|
|
232
276
|
"value": "{color.palette.white}",
|
|
233
|
-
"themeable": true
|
|
277
|
+
"themeable": true,
|
|
278
|
+
"$type": "color"
|
|
234
279
|
},
|
|
235
280
|
"marked": {
|
|
236
281
|
"$description": "Color for highlighting portions of text.",
|
|
237
282
|
"value": "{color.palette.blue.dark-2}",
|
|
238
|
-
"themeable": true
|
|
283
|
+
"themeable": true,
|
|
284
|
+
"$type": "color"
|
|
239
285
|
},
|
|
240
286
|
"marked-bg": {
|
|
241
287
|
"$description": "Background color for highlighting portions of text.",
|
|
242
288
|
"value": "{color.palette.blue.light-3}",
|
|
243
|
-
"themeable": true
|
|
289
|
+
"themeable": true,
|
|
290
|
+
"$type": "color"
|
|
244
291
|
},
|
|
245
292
|
"inserted-bg": {
|
|
246
293
|
"$description": "Background color for inserted (ins) text.",
|
|
247
294
|
"value": "{color.palette.blue.light-3}",
|
|
248
|
-
"themeable": true
|
|
295
|
+
"themeable": true,
|
|
296
|
+
"$type": "color"
|
|
249
297
|
},
|
|
250
298
|
"inserted-bg-muted": {
|
|
251
299
|
"$description": "Background color for highlighting portions of text, that is discernible from 'marked-bg'",
|
|
252
300
|
"value": "{color.palette.blue.light-4}",
|
|
253
|
-
"themeable": true
|
|
301
|
+
"themeable": true,
|
|
302
|
+
"$type": "color"
|
|
254
303
|
},
|
|
255
304
|
"deleted-bg": {
|
|
256
305
|
"$description": "Background color for deleted (del) text.",
|
|
257
306
|
"value": "{color.palette.yellow.light-2}",
|
|
258
|
-
"themeable": true
|
|
307
|
+
"themeable": true,
|
|
308
|
+
"$type": "color"
|
|
259
309
|
},
|
|
260
310
|
"deleted-bg-muted": {
|
|
261
311
|
"$description": "Background color for deleted (del) text.",
|
|
262
312
|
"value": "{color.palette.yellow.light-3}",
|
|
263
|
-
"themeable": true
|
|
313
|
+
"themeable": true,
|
|
314
|
+
"$type": "color"
|
|
264
315
|
}
|
|
265
316
|
},
|
|
266
317
|
"selection": {
|
|
267
|
-
"$description": "Color used to visualize selected elements.",
|
|
268
318
|
"$status": "{_status.review}",
|
|
269
319
|
"text": {
|
|
320
|
+
"$description": "Color used to visualize selected elements.",
|
|
270
321
|
"value": "{color.palette.blue.dark-1}",
|
|
271
|
-
"themeable": true
|
|
322
|
+
"themeable": true,
|
|
323
|
+
"$type": "color"
|
|
272
324
|
},
|
|
273
325
|
"bg": {
|
|
326
|
+
"$description": "Background Color used to visualize selected elements.",
|
|
274
327
|
"value": "{color.palette.blue.light-3}",
|
|
275
|
-
"themeable": true
|
|
328
|
+
"themeable": true,
|
|
329
|
+
"$type": "color"
|
|
276
330
|
}
|
|
277
331
|
},
|
|
278
332
|
"border": {
|
|
@@ -286,17 +340,20 @@
|
|
|
286
340
|
"default": {
|
|
287
341
|
"$description": "Default color used for backgrounds.",
|
|
288
342
|
"value": "{color.palette.white}",
|
|
289
|
-
"themeable": true
|
|
343
|
+
"themeable": true,
|
|
344
|
+
"$type": "color"
|
|
290
345
|
},
|
|
291
346
|
"light": {
|
|
292
347
|
"$description": "Lightest background color that is discernible on normal monitors.",
|
|
293
348
|
"value": "{color.palette.neutral.light-4}",
|
|
294
|
-
"themeable": true
|
|
349
|
+
"themeable": true,
|
|
350
|
+
"$type": "color"
|
|
295
351
|
},
|
|
296
352
|
"medium": {
|
|
297
353
|
"$description": "Medium background color for boxes etc.",
|
|
298
354
|
"value": "{color.palette.neutral.light-3}",
|
|
299
|
-
"themeable": true
|
|
355
|
+
"themeable": true,
|
|
356
|
+
"$type": "color"
|
|
300
357
|
}
|
|
301
358
|
}
|
|
302
359
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs'
|
|
2
|
+
import ColorTableGrouped from '../.storybook/components/ColorTableGrouped'
|
|
3
|
+
import ColorTable from '../.storybook/components/ColorTable'
|
|
4
|
+
import Notice from '../.storybook/components/Notice'
|
|
2
5
|
|
|
3
6
|
<Meta title="Design Tokens/Color"/>
|
|
4
7
|
|
|
@@ -10,13 +13,57 @@ import { Meta } from '@storybook/addon-docs'
|
|
|
10
13
|
|
|
11
14
|
# Color tokens
|
|
12
15
|
|
|
13
|
-
The demosplan-ui color tokens are grouped into
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
The demosplan-ui color tokens are grouped into <a target="_self" href="#brand-colors">**brand**</a> (for colors used in branded context),
|
|
17
|
+
<a target="_self" href="#data-visualization-colors">**data**</a> (for data visualization) and
|
|
18
|
+
<a target="_self" href="#functional-semantic-color-tokens">**semantic tokens**</a> for visualizing **message**, **status**
|
|
19
|
+
(to communicate system state) and **interactive** (to indicate possible interaction), alongside tokens for **text**, **surface**,
|
|
20
|
+
and **border** colors used throughout the interface. A full list of all palette colors (the raw color values which cannot
|
|
21
|
+
be used directly) can be found <a target="_self" href="#palette-colors">here</a>.
|
|
22
|
+
|
|
23
|
+
Tokens are available as <a target="_self" href="#tailwind-utility-classes">Tailwind utility classes</a> and <a target="_self" href="#scss-variables">SCSS variables</a>.
|
|
24
|
+
|
|
25
|
+
<Notice content={
|
|
26
|
+
`Note that the naming scheme for ui colors differs between Tailwind and SCSS, as SCSS follows a legacy naming scheme,
|
|
27
|
+
while Tailwind enforces the property name or short name as the first part of the selector.`
|
|
28
|
+
} />
|
|
16
29
|
|
|
17
30
|
## How to use and override color tokens
|
|
18
31
|
|
|
19
|
-
|
|
32
|
+
### Tailwind utility classes
|
|
33
|
+
|
|
34
|
+
To use tokens via Tailwind utility classes, the `tailwind.config.js` provided by demosplan-ui
|
|
35
|
+
must be merged into the config of the consuming application:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
const config = {
|
|
39
|
+
...require('@demos-europe/demosplan-ui/tailwind.config'),
|
|
40
|
+
content: [ // Files to watch for tailwind classes ],
|
|
41
|
+
// Other config values
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = config
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then, they can be applied to markup that is matched in the `content` definition.
|
|
48
|
+
|
|
49
|
+
#### Overriding Tailwind colors
|
|
50
|
+
|
|
51
|
+
Tailwind classes are defined to use a cascade of CSS variables. Each selector that inherits from a variable
|
|
52
|
+
will also be overridden. This way, it is possible to globally override colors, or to override a specific variable:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
:root {
|
|
56
|
+
// Globally override a palette color
|
|
57
|
+
--dp-color-blue-base: #2400d0;
|
|
58
|
+
|
|
59
|
+
// Override a specific variable
|
|
60
|
+
--dp-color-interactive-hover: #e100bd;
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### SCSS Variables
|
|
65
|
+
|
|
66
|
+
To use tokens via SCSS variables, they have to be imported at first:
|
|
20
67
|
|
|
21
68
|
```
|
|
22
69
|
@import '@demos-europe/demosplan-ui/tokens/scss/color.palette';
|
|
@@ -39,8 +86,9 @@ Then, tokens can be used within Scss code:
|
|
|
39
86
|
}
|
|
40
87
|
```
|
|
41
88
|
|
|
42
|
-
|
|
43
|
-
|
|
89
|
+
#### Overriding SCSS Variables
|
|
90
|
+
|
|
91
|
+
To override the value of a specific token, define the override before importing the provided file:
|
|
44
92
|
|
|
45
93
|
```
|
|
46
94
|
// Set a new color for just this one token:
|
|
@@ -55,7 +103,7 @@ $dp-color-interactive-hover: #9700ff;
|
|
|
55
103
|
|
|
56
104
|
If you want to override tokens with other token values, you
|
|
57
105
|
would have to import those first. Also, by importing alias
|
|
58
|
-
tokens
|
|
106
|
+
tokens afterward, they are as well assigned the changed values.
|
|
59
107
|
|
|
60
108
|
```
|
|
61
109
|
@import '@demos-europe/demosplan-ui/tokens/scss/color.palette';
|
|
@@ -74,48 +122,38 @@ $dp-color-main: $dp-color-yellow-base;
|
|
|
74
122
|
// Use tokens...
|
|
75
123
|
```
|
|
76
124
|
|
|
77
|
-
## Available tokens
|
|
78
|
-
|
|
79
|
-
### Palette colors
|
|
125
|
+
## Available color tokens
|
|
80
126
|
|
|
81
|
-
|
|
82
|
-
|
|
127
|
+
**brand**, **data** and **interactive** colors are enabled for all Tailwind corePlugins that apply color.
|
|
128
|
+
A full list of those corePlugins can be found [in the config.full.js stub for tailwind](https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/config.full.js) - each plugin that applies `theme('colors')`.
|
|
83
129
|
|
|
84
|
-
|
|
130
|
+
**backgroundColor**, **borderColor** and **textColor** corePlugins each define additional available ui colors.
|
|
85
131
|
|
|
86
|
-
|
|
87
|
-
and interaction tokens, they are aliased to palette tokens.
|
|
132
|
+
### Functional (semantic) color tokens
|
|
88
133
|
|
|
89
|
-
|
|
134
|
+
When building UI with a focus on functionality, not brand, the following semantic tokens can be used.
|
|
90
135
|
|
|
91
|
-
|
|
136
|
+
#### Tokens available for all corePlugins
|
|
92
137
|
|
|
93
|
-
|
|
138
|
+
<ColorTableGrouped module={'color'} />
|
|
94
139
|
|
|
95
|
-
|
|
96
|
-
its interactive nature, the *interactive* tokens can be used.
|
|
140
|
+
#### Text colors
|
|
97
141
|
|
|
98
|
-
|
|
142
|
+
<ColorTableGrouped module={'textColor'} />
|
|
99
143
|
|
|
100
|
-
|
|
144
|
+
#### Background colors
|
|
101
145
|
|
|
102
|
-
|
|
103
|
-
- `-border` Border color
|
|
104
|
-
- `-interactive` Color for links and other interactive elements
|
|
105
|
-
- `-fill` Fill color for icons or other svg
|
|
106
|
-
- `-text` Text color
|
|
146
|
+
<ColorTableGrouped module={'backgroundColor'} />
|
|
107
147
|
|
|
108
|
-
####
|
|
148
|
+
#### Border colors
|
|
109
149
|
|
|
110
|
-
|
|
111
|
-
the following *status* tokens can be used:
|
|
150
|
+
<ColorTableGrouped module={'borderColor'} />
|
|
112
151
|
|
|
113
|
-
|
|
114
|
-
- `-text` Text color
|
|
152
|
+
### Brand colors
|
|
115
153
|
|
|
116
|
-
|
|
154
|
+
For contexts that require to express brand, the *main*, *alt*, and *highlight* tokens exist.
|
|
117
155
|
|
|
118
|
-
|
|
156
|
+
<ColorTable namespace={'brand'} />
|
|
119
157
|
|
|
120
158
|
### Data visualization colors
|
|
121
159
|
|
|
@@ -125,6 +163,8 @@ that differentiate from each other. Like palette colors, they contain hex values
|
|
|
125
163
|
These are generated with https://colorbrewer2.org/#type=diverging&scheme=BrBG&n=8 to be colorblind safe
|
|
126
164
|
and intentionally separate from other color palettes.
|
|
127
165
|
|
|
166
|
+
<ColorTable namespace={'data'} />
|
|
167
|
+
|
|
128
168
|
Although these colors are universally used for charts, they need to be refined into "sequential", "categorical",
|
|
129
169
|
and "diverging" when appropriate. Read more if the need arises:
|
|
130
170
|
|
|
@@ -133,3 +173,12 @@ and "diverging" when appropriate. Read more if the need arises:
|
|
|
133
173
|
- https://medium.com/design-ibm/inclusive-color-sequences-for-data-viz-in-6-steps-712869b910c2
|
|
134
174
|
- https://medium.com/carbondesign/color-palettes-and-accessibility-features-for-data-visualization-7869f4874fca
|
|
135
175
|
- https://blog.graphiq.com/finding-the-right-color-palettes-for-data-visualizations-fcd4e707a283
|
|
176
|
+
|
|
177
|
+
### Palette colors
|
|
178
|
+
|
|
179
|
+
Color palettes resemble all colors available within demosplan-ui. Available color palettes contain 7 steps:
|
|
180
|
+
a base color, 2 shades and 4 lights. The colors are complemented with white, black, and neutral.
|
|
181
|
+
|
|
182
|
+
<Notice content={'Palette colors are not meant nor made to be used directly - instead, the functional colors defined above should be utilized.'} />
|
|
183
|
+
|
|
184
|
+
<ColorTable namespace={'palette'} />
|
|
@@ -30,25 +30,25 @@ Spacing tokens define the spacing scale available with demosplan-ui.
|
|
|
30
30
|
]}
|
|
31
31
|
/>
|
|
32
32
|
|
|
33
|
-
<ul className="list-none space-y-2 shadow p-2 inline-block">
|
|
34
|
-
<li className="w-0 bg-
|
|
35
|
-
<li className="w-px bg-
|
|
36
|
-
<li className="w-0.5 bg-
|
|
37
|
-
<li className="w-1 bg-
|
|
38
|
-
<li className="w-1.5 bg-
|
|
39
|
-
<li className="w-2 bg-
|
|
40
|
-
<li className="w-3 bg-
|
|
41
|
-
<li className="w-4 bg-
|
|
42
|
-
<li className="w-5 bg-
|
|
43
|
-
<li className="w-6 bg-
|
|
44
|
-
<li className="w-7 bg-
|
|
45
|
-
<li className="w-8 bg-
|
|
46
|
-
<li className="w-9 bg-
|
|
47
|
-
<li className="w-10 bg-
|
|
48
|
-
<li className="w-11 bg-
|
|
49
|
-
<li className="w-12 bg-
|
|
50
|
-
<li className="w-13 bg-
|
|
51
|
-
<li className="w-14 bg-
|
|
33
|
+
<ul className="sb-unstyled list-none space-y-2 shadow p-2 inline-block">
|
|
34
|
+
<li className="w-0 bg-message-debug">0</li>
|
|
35
|
+
<li className="w-px bg-message-debug">px</li>
|
|
36
|
+
<li className="w-0.5 bg-message-debug">0.5</li>
|
|
37
|
+
<li className="w-1 bg-message-debug">1</li>
|
|
38
|
+
<li className="w-1.5 bg-message-debug">1.5</li>
|
|
39
|
+
<li className="w-2 bg-message-debug">2</li>
|
|
40
|
+
<li className="w-3 bg-message-debug">3</li>
|
|
41
|
+
<li className="w-4 bg-message-debug">4</li>
|
|
42
|
+
<li className="w-5 bg-message-debug">5</li>
|
|
43
|
+
<li className="w-6 bg-message-debug">6</li>
|
|
44
|
+
<li className="w-7 bg-message-debug">7</li>
|
|
45
|
+
<li className="w-8 bg-message-debug">8</li>
|
|
46
|
+
<li className="w-9 bg-message-debug">9</li>
|
|
47
|
+
<li className="w-10 bg-message-debug">10</li>
|
|
48
|
+
<li className="w-11 bg-message-debug">11</li>
|
|
49
|
+
<li className="w-12 bg-message-debug">12</li>
|
|
50
|
+
<li className="w-13 bg-message-debug">13</li>
|
|
51
|
+
<li className="w-14 bg-message-debug">14</li>
|
|
52
52
|
</ul>
|
|
53
53
|
|
|
54
54
|
While the values `0.5` to `6` follow a linear progression with "in-betweens",
|
|
@@ -79,6 +79,6 @@ They replace the default classes mentioned in the [Tailwind documentation](https
|
|
|
79
79
|
Instead, the custom spacing scale shown here is inherited by the padding, margin, width, height, maxHeight,
|
|
80
80
|
gap, inset, space, translate, scrollMargin, and scrollPadding core plugins of Tailwind.
|
|
81
81
|
|
|
82
|
-
<div className="w-6 h-6 space-y-2 gap-1.5 bg-
|
|
82
|
+
<div className="w-6 h-6 space-y-2 gap-1.5 bg-message-debug">
|
|
83
83
|
Css is awesome.
|
|
84
84
|
</div>
|