@bethinkpl/design-system 34.0.4 → 34.0.6

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.
Files changed (39) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/design-system.js +4135 -4113
  3. package/dist/design-system.js.map +1 -1
  4. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +1 -0
  5. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +1 -0
  6. package/dist/lib/js/components/Chip/Chip.vue.d.ts +4 -0
  7. package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +1 -0
  8. package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +1 -0
  9. package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +1 -0
  10. package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +16 -0
  11. package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +1 -0
  12. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +3 -0
  13. package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +1 -0
  14. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +2 -0
  15. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +2 -0
  16. package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +1 -0
  17. package/dist/lib/js/components/Modal/Modal.vue.d.ts +1 -0
  18. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +2 -0
  19. package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +2 -0
  20. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +3 -0
  21. package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +1 -0
  22. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +1 -0
  23. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +1 -0
  24. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +1 -0
  25. package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +1 -0
  26. package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +1 -0
  27. package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +1 -0
  28. package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +1 -0
  29. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +3 -0
  30. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +3 -0
  31. package/dist/lib/js/components/Switch/Switch.vue.d.ts +1 -0
  32. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +1 -0
  33. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +1 -0
  34. package/dist/lib/js/icons/fontawesome.d.ts +1 -0
  35. package/lib/js/components/Chip/Chip.spec.ts +29 -0
  36. package/lib/js/components/Chip/Chip.stories.ts +3 -2
  37. package/lib/js/components/Chip/Chip.vue +33 -2
  38. package/lib/js/icons/fontawesome.ts +2 -0
  39. package/package.json +1 -1
@@ -8,9 +8,11 @@
8
8
  '-ds-uppercase': isLabelUppercase,
9
9
  '-ds-rounded': radius === CHIP_RADIUSES.ROUNDED,
10
10
  '-ds-removable': size !== CHIP_SIZES.X_SMALL && isRemovable,
11
+ '-ds-interactive': isInteractiveComputed,
11
12
  }"
12
13
  :title="label ?? undefined"
13
14
  :style="colorHex ? { backgroundColor: colorHex } : undefined"
15
+ @click="isInteractiveComputed && $emit('chipClick', $event)"
14
16
  >
15
17
  <span v-if="$slots.accessory || leftIcon" class="ds-chip__leftIcon">
16
18
  <slot name="accessory">
@@ -40,6 +42,7 @@
40
42
  </template>
41
43
 
42
44
  <style lang="scss" scoped>
45
+ @import '../../../styles/settings/animations';
43
46
  @import '../../../styles/settings/spacings';
44
47
  @import '../../../styles/settings/radiuses';
45
48
  @import '../../../styles/settings/colors/tokens';
@@ -51,6 +54,7 @@ $chip-colors: (
51
54
  'label': $color-neutral-text-strong,
52
55
  'icon': $color-neutral-icon,
53
56
  'background': $color-neutral-background-medium,
57
+ 'background-hover': $color-neutral-background-medium-hovered,
54
58
  'disabled': (
55
59
  'label': $color-neutral-text-strong-disabled,
56
60
  'icon': $color-neutral-icon-disabled,
@@ -61,6 +65,7 @@ $chip-colors: (
61
65
  'label': $color-neutral-text,
62
66
  'icon': $color-neutral-icon,
63
67
  'background': $color-neutral-background,
68
+ 'background-hover': $color-neutral-background-hovered,
64
69
  'disabled': (
65
70
  'label': $color-neutral-text-disabled,
66
71
  'icon': $color-neutral-icon-disabled,
@@ -71,6 +76,7 @@ $chip-colors: (
71
76
  'label': $color-inverted-text,
72
77
  'icon': $color-inverted-icon,
73
78
  'background': $color-primary-background-strong,
79
+ 'background-hover': $color-primary-background-strong-hovered,
74
80
  'disabled': (
75
81
  'label': $color-inverted-text,
76
82
  'icon': $color-inverted-icon,
@@ -81,6 +87,7 @@ $chip-colors: (
81
87
  'label': $color-primary-text,
82
88
  'icon': $color-primary-icon,
83
89
  'background': $color-primary-background,
90
+ 'background-hover': $color-primary-background-hovered,
84
91
  'disabled': (
85
92
  'label': $color-primary-text-disabled,
86
93
  'icon': $color-primary-icon-disabled,
@@ -91,6 +98,7 @@ $chip-colors: (
91
98
  'label': $color-fail-text,
92
99
  'icon': $color-fail-icon,
93
100
  'background': $color-fail-background,
101
+ 'background-hover': $color-fail-background-hovered,
94
102
  'disabled': (
95
103
  'label': $color-fail-text-disabled,
96
104
  'icon': $color-fail-icon-disabled,
@@ -101,6 +109,7 @@ $chip-colors: (
101
109
  'label': $color-danger-text,
102
110
  'icon': $color-danger-icon,
103
111
  'background': $color-danger-background,
112
+ 'background-hover': $color-danger-background-hovered,
104
113
  'disabled': (
105
114
  'label': $color-danger-text-disabled,
106
115
  'icon': $color-danger-icon-disabled,
@@ -111,6 +120,7 @@ $chip-colors: (
111
120
  'label': $color-warning-text,
112
121
  'icon': $color-warning-icon,
113
122
  'background': $color-warning-background,
123
+ 'background-hover': $color-warning-background-hovered,
114
124
  'disabled': (
115
125
  'label': $color-warning-text-disabled,
116
126
  'icon': $color-warning-icon-disabled,
@@ -121,6 +131,7 @@ $chip-colors: (
121
131
  'label': $color-success-text,
122
132
  'icon': $color-success-icon,
123
133
  'background': $color-success-background,
134
+ 'background-hover': $color-success-background-hovered,
124
135
  'disabled': (
125
136
  'label': $color-success-text-disabled,
126
137
  'icon': $color-success-icon-disabled,
@@ -131,6 +142,7 @@ $chip-colors: (
131
142
  'label': $color-info-text,
132
143
  'icon': $color-info-icon,
133
144
  'background': $color-info-background,
145
+ 'background-hover': $color-info-background-hovered,
134
146
  'disabled': (
135
147
  'label': $color-info-text-disabled,
136
148
  'icon': $color-info-icon-disabled,
@@ -140,11 +152,12 @@ $chip-colors: (
140
152
  'inverted': (
141
153
  'label': $color-neutral-text,
142
154
  'icon': $color-neutral-icon,
143
- 'background': $color-default-background,
155
+ 'background': $color-neutral-background-weak,
156
+ 'background-hover': $color-neutral-background-weak-hovered,
144
157
  'disabled': (
145
158
  'label': $color-neutral-text-disabled,
146
159
  'icon': $color-neutral-icon-disabled,
147
- 'background': $color-default-background,
160
+ 'background': $color-neutral-background-weak,
148
161
  ),
149
162
  ),
150
163
  'invertedHex': (
@@ -173,6 +186,14 @@ $chip-colors: (
173
186
  color: map-get($color-map, 'label');
174
187
  }
175
188
 
189
+ &.-ds-interactive:hover {
190
+ $background-hover: map-get($color-map, 'background-hover');
191
+
192
+ @if $background-hover {
193
+ background-color: $background-hover;
194
+ }
195
+ }
196
+
176
197
  &.-ds-disabled {
177
198
  background-color: map-get(map-get($color-map, 'disabled'), 'background');
178
199
 
@@ -194,6 +215,11 @@ $chip-colors: (
194
215
  gap: $space-4xs;
195
216
  padding: $space-4xs $space-2xs;
196
217
 
218
+ &.-ds-interactive {
219
+ cursor: pointer;
220
+ transition: background-color ease-in-out $default-transition-time;
221
+ }
222
+
197
223
  &.-ds-removable {
198
224
  padding: $space-5xs $space-5xs $space-5xs $space-2xs;
199
225
  }
@@ -291,6 +317,7 @@ const {
291
317
  colorHex = null,
292
318
  state = CHIP_STATES.DEFAULT,
293
319
  isRemovable = false,
320
+ isInteractive = false,
294
321
  } = defineProps<{
295
322
  label?: string | null;
296
323
  isLabelUppercase?: boolean;
@@ -301,12 +328,16 @@ const {
301
328
  colorHex?: string | null;
302
329
  state?: ChipState;
303
330
  isRemovable?: boolean;
331
+ isInteractive?: boolean;
304
332
  }>();
305
333
 
306
334
  defineEmits<{
307
335
  remove: [];
336
+ chipClick: [event: Event];
308
337
  }>();
309
338
 
339
+ const isInteractiveComputed = computed(() => isInteractive && state !== CHIP_STATES.DISABLED);
340
+
310
341
  const colorClassName = computed(() => {
311
342
  if (colorHex) {
312
343
  return `-ds-color-invertedHex`;
@@ -232,6 +232,7 @@ import { faVolumeHigh as fasVolumeHigh } from '@fortawesome/pro-solid-svg-icons/
232
232
  import { faCircleDot as fasCircleDot } from '@fortawesome/pro-solid-svg-icons/faCircleDot';
233
233
  import { faDot as fasDot } from '@fortawesome/pro-solid-svg-icons/faDot';
234
234
  import { faFlagCheckered as fasFlagCheckered } from '@fortawesome/pro-solid-svg-icons/faFlagCheckered';
235
+ import { faSquare as fasSquare } from '@fortawesome/pro-solid-svg-icons/faSquare';
235
236
 
236
237
  import { faChevronLeft as falChevronLeft } from '@fortawesome/pro-light-svg-icons/faChevronLeft';
237
238
  import { faChevronRight as falChevronRight } from '@fortawesome/pro-light-svg-icons/faChevronRight';
@@ -472,6 +473,7 @@ export const FONTAWESOME_ICONS = {
472
473
  FA_SQUARE_LIST: faSquareList,
473
474
  FA_SQUARE_MINUS: faSquareMinus,
474
475
  FA_SQUARE: faSquare,
476
+ FA_SQUARE_SOLID: fasSquare,
475
477
  FA_STAR_SOLID: fasStar,
476
478
  FA_STAR: faStar,
477
479
  FA_STETHOSCOPE: faStethoscope,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bethinkpl/design-system",
3
- "version": "34.0.4",
3
+ "version": "34.0.6",
4
4
  "description": "Bethink universe design-system",
5
5
  "repository": {
6
6
  "type": "git",