@citizenplane/pimp 11.0.5 → 12.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenplane/pimp",
3
- "version": "11.0.5",
3
+ "version": "12.0.0",
4
4
  "scripts": {
5
5
  "dev": "storybook dev -p 8080",
6
6
  "build-storybook": "storybook build --output-dir ./docs",
@@ -40,7 +40,7 @@ interface Props {
40
40
  }
41
41
 
42
42
  const props = withDefaults(defineProps<Props>(), {
43
- color: Colors.GRAY,
43
+ color: 'gray',
44
44
  size: Sizes.MD,
45
45
  label: '',
46
46
  leadingIcon: '',
@@ -11,11 +11,15 @@
11
11
  @click="handleClick"
12
12
  >
13
13
  <span class="cpButton__body">
14
- <span v-if="isLoading" class="cpButton__loader"><cp-loader :color="Colors.NEUTRAL" /></span>
14
+ <span v-if="isLoading" class="cpButton__loader">
15
+ <cp-loader color="neutral" />
16
+ </span>
15
17
  <span v-if="hasIconBefore" class="cpButton__icon cpButton__icon--isBefore">
16
18
  <slot name="leading-icon" />
17
19
  </span>
18
- <span v-if="hasLabel"><slot /></span>
20
+ <span v-if="hasLabel" class="cpButton__label">
21
+ <slot />
22
+ </span>
19
23
  <span v-if="hasIconAfter" class="cpButton__icon cpButton__icon--isAfter">
20
24
  <slot name="trailing-icon" />
21
25
  </span>
@@ -35,23 +39,25 @@ import CpLoader from '@/components/CpLoader.vue'
35
39
  import { Colors, Sizes } from '@/constants'
36
40
  import { capitalizeFirstLetter } from '@/helpers'
37
41
 
42
+ type ButtonColor = Extract<Colors, 'neutral' | 'accent' | 'error' | 'warning' | 'success'>
43
+
38
44
  interface Props {
39
45
  appearance?: ButtonAppearances
40
- color?: Colors
46
+ color?: ButtonColor
41
47
  disabled?: boolean
42
48
  enableHaptics?: boolean
43
49
  isLoading?: boolean
44
50
  isSquare?: boolean
45
- size?: Sizes
51
+ size?: Exclude<Sizes, Sizes.XXL | Sizes.XXXL | Sizes.XXXXL>
46
52
  tag?: ButtonTags
47
53
  type?: ButtonTypes
48
54
  }
49
55
 
50
56
  const props = withDefaults(defineProps<Props>(), {
51
- appearance: ButtonAppearances.DEFAULT,
52
- color: undefined,
53
- tag: ButtonTags.BUTTON,
54
- type: ButtonTypes.BUTTON,
57
+ appearance: 'primary',
58
+ color: 'neutral',
59
+ tag: 'button',
60
+ type: 'button',
55
61
  size: Sizes.MD,
56
62
  })
57
63
 
@@ -92,89 +98,76 @@ const handleClick = () => {
92
98
  </script>
93
99
 
94
100
  <style lang="scss">
95
- @mixin cp-button-default($className, $textColor, $textColorHover) {
96
- &--isDefault#{&}--is#{$className} {
97
- background-color: var(--cp-background-primary);
98
- box-shadow:
99
- var(--cp-shadows-3xs-inset),
100
- 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft-hover);
101
-
102
- &,
103
- &:visited {
104
- color: $textColor;
105
- }
106
-
107
- &:active,
108
- &:hover {
109
- background-color: var(--cp-background-primary-hover);
110
- box-shadow:
111
- var(--cp-shadows-3xs-inset),
112
- 0 0 0 var(--cp-dimensions-0_25) $textColorHover;
113
- color: $textColorHover;
114
- }
115
-
116
- &:focus,
117
- &:focus-visible {
118
- outline: fn.px-to-rem(2) solid $textColorHover;
119
- outline-offset: fn.px-to-rem(3);
101
+ @mixin cp-button-primary($className, $color, $backgroundColor, $hoverBackgroundColor) {
102
+ &--isPrimary#{&}--is#{$className} {
103
+ &:not(:disabled) {
104
+ background-color: $backgroundColor;
105
+ color: $color;
106
+ box-shadow: var(--cp-shadows-3xs);
107
+
108
+ &:hover {
109
+ background-color: $hoverBackgroundColor;
110
+ }
111
+
112
+ &:focus,
113
+ &:focus-visible,
114
+ &:active {
115
+ background-color: $hoverBackgroundColor;
116
+ outline: fn.px-to-rem(2) solid $hoverBackgroundColor;
117
+ }
120
118
  }
121
119
  }
122
120
  }
123
121
 
124
- @mixin cp-button-primary($className, $color, $hoverColor) {
125
- &--isPrimary#{&}--is#{$className} {
126
- background-color: $color;
127
- color: var(--cp-text-white);
128
-
129
- &:hover {
130
- background-color: $hoverColor;
131
- }
132
-
133
- &:focus,
134
- &:focus-visible,
135
- &:active {
136
- background-color: $hoverColor;
137
- outline: fn.px-to-rem(2) solid $color;
122
+ @mixin cp-button-secondary($className, $color) {
123
+ &--isSecondary#{&}--is#{$className} {
124
+ &:not(:disabled) {
125
+ background-color: var(--cp-background-primary);
126
+ border: fn.px-to-rem(1) solid var(--cp-border-soft);
127
+ color: $color;
128
+ box-shadow: var(--cp-shadows-3xs);
129
+
130
+ &:hover {
131
+ background-color: var(--cp-background-primary-hover);
132
+ border-color: var(--cp-border-soft-hover);
133
+ }
134
+
135
+ &:focus,
136
+ &:focus-visible,
137
+ &:active {
138
+ background-color: var(--cp-background-primary-hover);
139
+ outline: fn.px-to-rem(2) solid var(--cp-background-primary-hover);
140
+ }
138
141
  }
139
142
  }
140
143
  }
141
144
 
142
- @mixin cp-button-tertiary($className, $textColor, $hoverColor) {
143
- &--isMinimal#{&}--is#{$className} {
144
- color: $textColor;
145
- box-shadow: none;
146
-
147
- &,
148
- &:visited {
149
- color: $textColor;
150
- }
151
-
152
- &:hover {
153
- background: $hoverColor;
154
- }
155
-
156
- &:focus,
157
- &:focus-visible,
158
- &:active {
159
- outline: fn.px-to-rem(2) solid $textColor;
160
- }
161
-
162
- &:active {
163
- background: $hoverColor;
164
- color: $textColor;
145
+ @mixin cp-button-tertiary($className, $color, $hoverColor, $hoverBackgroundColor) {
146
+ &--isTertiary#{&}--is#{$className} {
147
+ &:not(:disabled) {
148
+ background-color: transparent;
149
+ color: $color;
150
+
151
+ &:hover {
152
+ background-color: $hoverBackgroundColor;
153
+ color: $hoverColor;
154
+ }
155
+
156
+ &:focus,
157
+ &:focus-visible,
158
+ &:active {
159
+ color: $hoverColor;
160
+ outline: fn.px-to-rem(2) solid $color;
161
+ }
165
162
  }
166
163
  }
167
164
  }
168
165
 
169
166
  .cpButton {
170
- border-radius: fn.px-to-rem(1000);
171
- background-color: var(--cp-background-primary);
167
+ border-radius: var(--cp-radius-full);
172
168
  padding: var(--cp-spacing-md) var(--cp-spacing-lg);
173
- font-size: var(--cp-text-size-md);
174
- box-shadow: var(--cp-shadows-3xs);
175
- line-height: var(--cp-line-height-md); /* 150% */
169
+ line-height: var(--cp-line-height-md);
176
170
  text-decoration: none;
177
- color: var(--cp-text-primary);
178
171
  font-weight: 500;
179
172
  transition-property: box-shadow, background-color, transform, width;
180
173
  transition-duration: 150ms;
@@ -187,37 +180,6 @@ const handleClick = () => {
187
180
  color: var(--cp-text-primary);
188
181
  }
189
182
 
190
- &--isDefault,
191
- &--isPrimary,
192
- &--isMinimal {
193
- &:hover {
194
- background-color: var(--cp-background-primary-hover);
195
- }
196
-
197
- &:focus {
198
- outline: fn.px-to-rem(2) solid var(--cp-border-strong);
199
- box-shadow: none;
200
- }
201
- }
202
-
203
- &--isDefault {
204
- box-shadow: 0 0 0 fn.px-to-rem(1) var(--cp-border-soft);
205
-
206
- &:hover {
207
- box-shadow: 0 0 0 fn.px-to-rem(1) var(--cp-border-soft-hover);
208
- }
209
-
210
- &:focus {
211
- outline: fn.px-to-rem(2) solid var(--cp-border-strong);
212
- box-shadow: none;
213
- }
214
- }
215
-
216
- &--isMinimal {
217
- background-color: transparent;
218
- box-shadow: none;
219
- }
220
-
221
183
  &,
222
184
  &__body {
223
185
  display: inline-flex;
@@ -233,48 +195,90 @@ const handleClick = () => {
233
195
  transform: translateY(fn.px-to-rem(1));
234
196
  }
235
197
 
236
- // Default appearance (style secondary on Figma)
237
- @include cp-button-default('Blue', var(--cp-text-blue-primary), var(--cp-text-blue-primary-hover));
238
- @include cp-button-default('Purple', var(--cp-text-accent-primary), var(--cp-text-accent-primary-hover));
239
- @include cp-button-default('Green', var(--cp-text-success-primary), var(--cp-text-success-primary-hover));
240
- @include cp-button-default('Orange', var(--cp-text-warning-primary), var(--cp-text-warning-primary-hover));
241
- @include cp-button-default('Red', var(--cp-text-error-primary), var(--cp-text-error-primary-hover));
242
-
243
- // Primary appearance (style primary on Figma)
244
- @include cp-button-primary('Blue', var(--cp-background-blue-solid), var(--cp-background-blue-solid-hover));
245
- @include cp-button-primary('Purple', var(--cp-background-accent-solid), var(--cp-background-accent-solid-hover));
246
- @include cp-button-primary('Green', var(--cp-background-success-solid), var(--cp-background-success-solid-hover));
247
- @include cp-button-primary('Orange', var(--cp-background-warning-solid), var(--cp-background-warning-solid-hover));
248
- @include cp-button-primary('Red', var(--cp-background-error-solid), var(--cp-background-error-solid-hover));
249
-
250
- // Minimal appearance (style tertiary on Figma)
251
- @include cp-button-tertiary('Blue', var(--cp-text-blue-primary), var(--cp-background-blue-primary-hover));
252
- @include cp-button-tertiary('Purple', var(--cp-text-accent-primary), var(--cp-background-accent-primary-hover));
253
- @include cp-button-tertiary('Green', var(--cp-text-success-primary), var(--cp-background-success-primary-hover));
254
- @include cp-button-tertiary('Orange', var(--cp-text-warning-primary), var(--cp-background-warning-primary-hover));
255
- @include cp-button-tertiary('Red', var(--cp-text-error-primary), var(--cp-background-error-primary-hover));
198
+ // Primary appearance
199
+ @include cp-button-primary(
200
+ 'Neutral',
201
+ var(--cp-text-primary),
202
+ var(--cp-background-primary),
203
+ var(--cp-background-primary-hover)
204
+ );
205
+ @include cp-button-primary(
206
+ 'Accent',
207
+ var(--cp-text-white),
208
+ var(--cp-background-accent-solid),
209
+ var(--cp-background-accent-solid-hover)
210
+ );
211
+ @include cp-button-primary(
212
+ 'Success',
213
+ var(--cp-text-white),
214
+ var(--cp-background-success-solid),
215
+ var(--cp-background-success-solid-hover)
216
+ );
217
+ @include cp-button-primary(
218
+ 'Warning',
219
+ var(--cp-text-white),
220
+ var(--cp-background-warning-solid),
221
+ var(--cp-background-warning-solid-hover)
222
+ );
223
+ @include cp-button-primary(
224
+ 'Error',
225
+ var(--cp-text-white),
226
+ var(--cp-background-error-solid),
227
+ var(--cp-background-error-solid-hover)
228
+ );
229
+
230
+ // Secondary appearance
231
+ @include cp-button-secondary('Neutral', var(--cp-text-primary));
232
+ @include cp-button-secondary('Accent', var(--cp-text-accent-primary));
233
+ @include cp-button-secondary('Success', var(--cp-text-success-primary));
234
+ @include cp-button-secondary('Warning', var(--cp-text-warning-primary));
235
+ @include cp-button-secondary('Error', var(--cp-text-error-primary));
236
+
237
+ // Tertiary appearance
238
+ @include cp-button-tertiary(
239
+ 'Neutral',
240
+ var(--cp-text-primary),
241
+ var(--cp-text-primary-hover),
242
+ var(--cp-background-primary-hover)
243
+ );
244
+ @include cp-button-tertiary(
245
+ 'Accent',
246
+ var(--cp-text-accent-primary),
247
+ var(--cp-text-accent-primary-hover),
248
+ var(--cp-background-accent-primary-hover)
249
+ );
250
+ @include cp-button-tertiary(
251
+ 'Success',
252
+ var(--cp-text-success-primary),
253
+ var(--cp-text-success-primary-hover),
254
+ var(--cp-background-success-primary-hover)
255
+ );
256
+ @include cp-button-tertiary(
257
+ 'Warning',
258
+ var(--cp-text-warning-primary),
259
+ var(--cp-text-warning-primary-hover),
260
+ var(--cp-background-warning-primary-hover)
261
+ );
262
+ @include cp-button-tertiary(
263
+ 'Error',
264
+ var(--cp-text-error-primary),
265
+ var(--cp-text-error-primary-hover),
266
+ var(--cp-background-error-primary-hover)
267
+ );
256
268
 
257
269
  &--isDisabled {
258
- box-shadow: none !important;
259
- background-color: var(--cp-background-disabled) !important;
260
- color: var(--cp-text-disabled) !important;
261
- cursor: not-allowed !important;
270
+ box-shadow: none;
271
+ background-color: var(--cp-background-disabled);
272
+ color: var(--cp-text-disabled);
262
273
  user-select: none;
263
274
 
264
275
  &:hover,
265
276
  &:active {
277
+ cursor: not-allowed;
266
278
  transform: none;
267
279
  }
268
280
  }
269
281
 
270
- &--isIcon {
271
- padding: fn.px-to-rem(10);
272
-
273
- .cpButton__icon {
274
- @include mx.square-sizing(20);
275
- }
276
- }
277
-
278
282
  &__body {
279
283
  display: flex;
280
284
  align-items: center;
@@ -284,6 +288,10 @@ const handleClick = () => {
284
288
  transition: padding-left 250ms var(--cp-easing-elastic);
285
289
  }
286
290
 
291
+ &__label {
292
+ padding-inline: var(--cp-spacing-xs);
293
+ }
294
+
287
295
  &__icon,
288
296
  &__loader {
289
297
  display: flex;
@@ -299,8 +307,6 @@ const handleClick = () => {
299
307
  }
300
308
 
301
309
  &__icon {
302
- @include mx.square-sizing(20);
303
-
304
310
  flex-shrink: 0;
305
311
  }
306
312
 
@@ -318,77 +324,85 @@ const handleClick = () => {
318
324
  }
319
325
 
320
326
  &--isSquare {
321
- border-radius: var(--cp-radius-md);
327
+ &.cpButton--2xs {
328
+ border-radius: var(--cp-radius-sm-md);
329
+ }
330
+
331
+ &.cpButton--xs,
332
+ &.cpButton--sm,
333
+ &.cpButton--md {
334
+ border-radius: var(--cp-radius-md);
335
+ }
322
336
 
323
337
  &.cpButton--lg {
324
338
  border-radius: var(--cp-radius-md-lg);
325
339
  }
340
+ }
326
341
 
327
- &.cpButton--2xs {
328
- border-radius: var(--cp-radius-sm-md);
342
+ &--2xs,
343
+ &--xs,
344
+ &--sm {
345
+ .cpButton__icon,
346
+ .cpButton__loader {
347
+ @include mx.square-sizing(16);
329
348
  }
330
349
  }
331
350
 
351
+ &--md,
332
352
  &--lg {
333
- padding: var(--cp-spacing-lg) var(--cp-spacing-xl);
334
- font-size: var(--cp-text-size-md);
335
- line-height: var(--cp-line-height-md); /* 150% */
336
-
337
- &.cpButton--isIcon {
338
- padding: var(--cp-spacing-lg);
339
- }
340
-
341
353
  .cpButton__icon,
342
354
  .cpButton__loader {
343
- @include mx.square-sizing(24);
355
+ @include mx.square-sizing(20);
344
356
  }
345
357
  }
346
358
 
347
- &--sm,
348
- &--xs {
349
- .cpButton__body {
350
- gap: var(--cp-spacing-xs);
351
- }
359
+ &--2xs {
360
+ font-size: var(--cp-text-size-xs);
361
+ padding: var(--cp-spacing-sm) var(--cp-spacing-md);
362
+ line-height: var(--cp-line-height-xs);
352
363
 
353
364
  &.cpButton--isIcon {
354
- padding: var(--cp-spacing-sm-md);
365
+ padding: var(--cp-spacing-sm);
355
366
  }
356
367
  }
357
368
 
358
- &--sm {
359
- padding: var(--cp-spacing-sm-md) var(--cp-spacing-md);
369
+ &--xs {
360
370
  font-size: var(--cp-text-size-sm);
361
- line-height: var(--cp-line-height-sm); /* 142.857% */
371
+ padding: var(--cp-spacing-sm) var(--cp-spacing-md);
372
+ line-height: var(--cp-line-height-sm);
362
373
 
363
- .cpButton__icon,
364
- .cpButton__loader {
365
- @include mx.square-sizing(20);
374
+ &.cpButton--isIcon {
375
+ padding: var(--cp-spacing-sm-md);
366
376
  }
367
377
  }
368
378
 
369
- &--xs {
379
+ &--sm {
370
380
  font-size: var(--cp-text-size-sm);
371
- padding: var(--cp-spacing-sm) var(--cp-spacing-md);
381
+ padding: var(--cp-spacing-sm-md) var(--cp-spacing-md);
372
382
  line-height: var(--cp-line-height-sm);
373
383
 
374
- .cpButton__icon,
375
- .cpButton__loader {
376
- @include mx.square-sizing(16);
384
+ &.cpButton--isIcon {
385
+ padding: var(--cp-spacing-md);
377
386
  }
378
387
  }
379
388
 
380
- &--2xs {
381
- font-size: var(--cp-text-size-xs);
382
- padding: var(--cp-spacing-sm) var(--cp-spacing-md);
383
- line-height: var(--cp-line-height-xs);
389
+ &--md {
390
+ font-size: var(--cp-text-size-md);
391
+ padding: var(--cp-spacing-md) var(--cp-spacing-lg);
392
+ line-height: var(--cp-line-height-md);
384
393
 
385
- .cpButton__body {
386
- gap: var(--cp-spacing-xs);
394
+ &.cpButton--isIcon {
395
+ padding: fn.px-to-rem(10);
387
396
  }
397
+ }
388
398
 
389
- .cpButton__icon,
390
- .cpButton__loader {
391
- @include mx.square-sizing(12);
399
+ &--lg {
400
+ font-size: var(--cp-text-size-md);
401
+ padding: var(--cp-spacing-lg) var(--cp-spacing-xl);
402
+ line-height: var(--cp-line-height-md);
403
+
404
+ &.cpButton--isIcon {
405
+ padding: fn.px-to-rem(14);
392
406
  }
393
407
  }
394
408
  }
@@ -41,7 +41,7 @@ interface Props {
41
41
  autofocus?: boolean
42
42
  checkboxLabel?: string
43
43
  checkboxValue?: string | number
44
- color?: string
44
+ color?: ToggleColors
45
45
  groupName?: string
46
46
  helper?: string
47
47
  indeterminate?: boolean
@@ -55,7 +55,7 @@ const props = withDefaults(defineProps<Props>(), {
55
55
  checkboxValue: '',
56
56
  checkboxLabel: '',
57
57
  groupName: '',
58
- color: ToggleColors.ACCENT,
58
+ color: 'accent',
59
59
  helper: '',
60
60
  })
61
61
 
@@ -46,7 +46,7 @@ interface Props {
46
46
  size?: number | string
47
47
  }
48
48
 
49
- const props = withDefaults(defineProps<Props>(), { color: Colors.ACCENT, size: 24 })
49
+ const props = withDefaults(defineProps<Props>(), { color: 'accent', size: 24 })
50
50
 
51
51
  const capitalizedColor = computed(() => capitalizeFirstLetter(props.color))
52
52
 
@@ -44,7 +44,7 @@ interface RadioOption {
44
44
 
45
45
  interface Props {
46
46
  autofocus?: boolean
47
- color?: string
47
+ color?: ToggleColors
48
48
  groupName?: string
49
49
  modelValue: string
50
50
  options: RadioOption[]
@@ -56,7 +56,7 @@ interface Emits {
56
56
 
57
57
  const props = withDefaults(defineProps<Props>(), {
58
58
  groupName: '',
59
- color: ToggleColors.BLUE,
59
+ color: 'blue',
60
60
  autofocus: false,
61
61
  })
62
62
 
@@ -41,7 +41,7 @@ import { capitalizeFirstLetter } from '@/helpers'
41
41
 
42
42
  interface Props {
43
43
  autofocus?: boolean
44
- color?: string
44
+ color?: ToggleColors
45
45
  disabled?: boolean
46
46
  enableHaptics?: boolean
47
47
  groupName?: string
@@ -63,7 +63,7 @@ const props = withDefaults(defineProps<Props>(), {
63
63
  helper: '',
64
64
  disabled: false,
65
65
  groupName: '',
66
- color: ToggleColors.PURPLE,
66
+ color: 'purple',
67
67
  reverseLabel: false,
68
68
  autofocus: false,
69
69
  isRequired: false,
@@ -40,7 +40,7 @@ import { useId, useSlots, computed } from 'vue'
40
40
  import { Colors } from '@/constants'
41
41
  import { capitalizeFirstLetter } from '@/helpers'
42
42
 
43
- type TooltipColors = Colors.ACCENT | Colors.NEUTRAL
43
+ type TooltipColors = Extract<Colors, 'accent' | 'neutral'>
44
44
  type Placement = 'top' | 'right' | 'bottom' | 'left'
45
45
 
46
46
  interface Props {
@@ -55,7 +55,7 @@ interface Props {
55
55
  const props = withDefaults(defineProps<Props>(), {
56
56
  content: '',
57
57
  distance: 8,
58
- color: Colors.ACCENT,
58
+ color: 'accent',
59
59
  placement: undefined,
60
60
  subcontent: '',
61
61
  })
@@ -1,16 +1,5 @@
1
- export enum ButtonAppearances {
2
- DEFAULT = 'default',
3
- PRIMARY = 'primary',
4
- MINIMAL = 'minimal',
5
- }
1
+ export type ButtonAppearances = 'primary' | 'secondary' | 'tertiary'
6
2
 
7
- export enum ButtonTags {
8
- BUTTON = 'button',
9
- A = 'a',
10
- }
3
+ export type ButtonTags = 'button' | 'a'
11
4
 
12
- export enum ButtonTypes {
13
- BUTTON = 'button',
14
- SUBMIT = 'submit',
15
- RESET = 'reset',
16
- }
5
+ export type ButtonTypes = 'button' | 'submit' | 'reset'
@@ -1,20 +1,16 @@
1
- export enum Colors {
2
- NEUTRAL = 'neutral',
3
- ACCENT = 'accent',
4
- ERROR = 'error',
5
- WARNING = 'warning',
6
- SUCCESS = 'success',
7
-
8
- BLUE = 'blue',
9
- PINK = 'pink',
10
- MAGENTA = 'magenta',
11
- YELLOW = 'yellow',
12
-
13
- WHITE = 'white',
14
-
15
- GRAY = 'gray', // TODO: Should be replace by NEUTRAL
16
- GREEN = 'green', // TODO: Should be replace by SUCCESS
17
- ORANGE = 'orange', // TODO: Should be replace by WARNING
18
- PURPLE = 'purple', // TODO: Should be replace by ACCENT
19
- RED = 'red', // TODO: Should be replace by ERROR
20
- }
1
+ export type Colors =
2
+ | 'neutral'
3
+ | 'accent'
4
+ | 'error'
5
+ | 'warning'
6
+ | 'success'
7
+ | 'blue'
8
+ | 'pink'
9
+ | 'magenta'
10
+ | 'yellow'
11
+ | 'white'
12
+ | 'gray' // TODO: Should be replace by NEUTRAL
13
+ | 'green' // TODO: Should be replace by SUCCESS
14
+ | 'orange' // TODO: Should be replace by WARNING
15
+ | 'purple' // TODO: Should be replace by ACCENT
16
+ | 'red' // TODO: Should be replace by ERROR
@@ -1,7 +1,4 @@
1
1
  import { Colors } from './Colors'
2
2
 
3
- export enum ToggleColors {
4
- ACCENT = Colors.ACCENT,
5
- BLUE = Colors.BLUE,
6
- PURPLE = Colors.PURPLE, // TODO: Should be replace by ACCENT
7
- }
3
+ // TODO: purple should be replace by ACCENT
4
+ export type ToggleColors = Extract<Colors, 'accent' | 'blue' | 'purple'>