@bethinkpl/design-system 24.1.0 → 24.2.1

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 (54) hide show
  1. package/dist/design-system.umd.js +487 -28
  2. package/dist/design-system.umd.js.map +1 -1
  3. package/dist/lib/js/components/Banner/Banner.vue.d.ts +1 -0
  4. package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +1 -0
  5. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +1 -0
  6. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +1 -0
  7. package/dist/lib/js/components/Chip/Chip.vue.d.ts +1 -0
  8. package/dist/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue.d.ts +1 -0
  9. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +1 -0
  10. package/dist/lib/js/components/Form/Checkbox/Checkbox.vue.d.ts +1 -0
  11. package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +1 -0
  12. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +1 -0
  13. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +1 -0
  14. package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +1 -0
  15. package/dist/lib/js/components/Modal/Modal.vue.d.ts +1 -0
  16. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +1 -0
  17. package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +1 -0
  18. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +1 -0
  19. package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +1 -0
  20. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +1 -0
  21. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +23 -0
  22. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +1 -0
  23. package/dist/lib/js/components/SelectionTile/SelectionTile.vue.d.ts +1 -0
  24. package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +1 -0
  25. package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +1 -0
  26. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +1 -0
  27. package/dist/lib/js/components/Switch/Switch.vue.d.ts +1 -0
  28. package/dist/lib/js/components/TextGroup/TextGroup.consts.d.ts +22 -0
  29. package/dist/lib/js/components/TextGroup/TextGroup.stories.d.ts +5 -0
  30. package/dist/lib/js/components/TextGroup/TextGroup.vue.d.ts +139 -0
  31. package/dist/lib/js/components/TextGroup/index.d.ts +3 -0
  32. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +1 -0
  33. package/dist/lib/js/components/Tile/Tile.vue.d.ts +1 -0
  34. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +1 -0
  35. package/dist/lib/js/icons/fontawesome.d.ts +1 -0
  36. package/dist/lib/js/index.d.ts +2 -0
  37. package/docs/838.fdf5ac21.iframe.bundle.js +2 -0
  38. package/docs/iframe.html +1 -1
  39. package/docs/main.e50740e2.iframe.bundle.js +2 -0
  40. package/docs/project.json +1 -1
  41. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.stories.ts +64 -37
  42. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue +60 -53
  43. package/lib/js/components/TextGroup/TextGroup.consts.ts +27 -0
  44. package/lib/js/components/TextGroup/TextGroup.stories.ts +109 -0
  45. package/lib/js/components/TextGroup/TextGroup.vue +332 -0
  46. package/lib/js/components/TextGroup/index.ts +4 -0
  47. package/lib/js/components/Tooltip/Tooltip.stories.ts +1 -1
  48. package/lib/js/icons/fontawesome.ts +2 -0
  49. package/lib/js/index.ts +2 -0
  50. package/package.json +1 -1
  51. package/docs/548.a87360ed.iframe.bundle.js +0 -2
  52. package/docs/main.9060ef19.iframe.bundle.js +0 -2
  53. /package/docs/{548.a87360ed.iframe.bundle.js.LICENSE.txt → 838.fdf5ac21.iframe.bundle.js.LICENSE.txt} +0 -0
  54. /package/docs/{main.9060ef19.iframe.bundle.js.LICENSE.txt → main.e50740e2.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -0,0 +1,332 @@
1
+ <template>
2
+ <div
3
+ class="ds-textGroup"
4
+ :class="{
5
+ '-ds-small': size === TEXT_GROUP_SIZES.SMALL,
6
+
7
+ '-ds-hovered': state === TEXT_GROUP_STATES.HOVERED,
8
+ '-ds-loading': isLoading,
9
+ '-ds-disabled': state === TEXT_GROUP_STATES.DISABLED,
10
+
11
+ '-ds-interactive': isInteractive,
12
+ '-ds-selected': isSelected,
13
+
14
+ [loadingSizeClassName]: isLoading,
15
+
16
+ [colorClassName]: true,
17
+ }"
18
+ >
19
+ <div
20
+ v-if="eyebrowText !== null"
21
+ class="ds-textGroup__eyebrow"
22
+ :class="{
23
+ '-ds-ellipsis': eyebrowTextEllipsis,
24
+ '-ds-uppercase': isEyebrowTextUppercase,
25
+ }"
26
+ >
27
+ <div v-if="isLoading" class="ds-textGroup__skeletonWrapper">
28
+ <ds-skeleton width="50%" height="100%" />
29
+ </div>
30
+ <span v-else-if="eyebrowText === ''">&nbsp;</span>
31
+ <span v-else>{{ eyebrowText }}</span>
32
+ </div>
33
+ <div
34
+ v-if="mainText !== null"
35
+ class="ds-textGroup__main"
36
+ :class="{
37
+ '-ds-ellipsis': mainTextEllipsis,
38
+ }"
39
+ >
40
+ <div v-if="isLoading" class="ds-textGroup__skeletonWrapper">
41
+ <ds-skeleton width="100%" height="100%" />
42
+ </div>
43
+ <span v-else-if="mainText === ''">&nbsp;</span>
44
+ <span v-else>{{ mainText }}</span>
45
+ </div>
46
+ <div
47
+ v-if="supportingText !== null"
48
+ class="ds-textGroup__supporting"
49
+ :class="{
50
+ '-ds-ellipsis': supportingTextEllipsis,
51
+ }"
52
+ >
53
+ <div v-if="isLoading" class="ds-textGroup__skeletonWrapper">
54
+ <ds-skeleton width="100%" height="100%" />
55
+ </div>
56
+ <span v-else-if="supportingText === ''">&nbsp;</span>
57
+ <span v-else v-html="supportingText" />
58
+ </div>
59
+ </div>
60
+ </template>
61
+
62
+ <style lang="scss">
63
+ @import '../../../styles/settings/typography/tokens';
64
+ @import '../../../styles/settings/colors/tokens';
65
+ @import '../../../styles/settings/spacings';
66
+
67
+ $text-group-colors: (
68
+ 'neutral': (
69
+ 'eyebrow-color': $color-neutral-text-weak,
70
+ 'eyebrow-color-hovered': $color-neutral-text-weak-hovered,
71
+ 'eyebrow-color-disabled': $color-neutral-text-weak-disabled,
72
+ 'main-text-color': $color-neutral-text-strong,
73
+ 'main-text-color-hovered': $color-neutral-text-strong-hovered,
74
+ 'main-text-color-disabled': $color-neutral-text-strong-disabled,
75
+ 'main-text-color-selected': $color-primary-text,
76
+ 'main-text-color-selected-hovered': $color-primary-text-hovered,
77
+ 'main-text-color-selected-disabled': $color-primary-text-disabled,
78
+ 'supporting-text-color': $color-neutral-text,
79
+ 'supporting-text-color-hovered': $color-neutral-text-hovered,
80
+ 'supporting-text-color-disabled': $color-neutral-text-disabled,
81
+ ),
82
+ );
83
+
84
+ @mixin setTextGroupColors($self, $map) {
85
+ #{$self}__eyebrow {
86
+ color: map-get($map, 'eyebrow-color');
87
+ }
88
+
89
+ #{$self}__main {
90
+ color: map-get($map, 'main-text-color');
91
+ }
92
+
93
+ #{$self}__supporting {
94
+ color: map-get($map, 'supporting-text-color');
95
+ }
96
+
97
+ &.-ds-interactive:hover,
98
+ &.-ds-hovered {
99
+ #{$self}__eyebrow {
100
+ color: map-get($map, 'eyebrow-color-hovered');
101
+ }
102
+
103
+ #{$self}__main {
104
+ color: map-get($map, 'main-text-color-hovered');
105
+ }
106
+
107
+ #{$self}__supporting {
108
+ color: map-get($map, 'supporting-text-color-hovered');
109
+ }
110
+ }
111
+
112
+ &.-ds-disabled {
113
+ pointer-events: none;
114
+
115
+ #{$self}__eyebrow {
116
+ color: map-get($map, 'eyebrow-color-disabled');
117
+ }
118
+
119
+ #{$self}__main {
120
+ color: map-get($map, 'main-text-color-disabled');
121
+ }
122
+
123
+ #{$self}__supporting {
124
+ color: map-get($map, 'supporting-text-color-disabled');
125
+ }
126
+ }
127
+
128
+ &.-ds-selected {
129
+ #{$self}__main {
130
+ color: map-get($map, 'main-text-color-selected');
131
+ }
132
+
133
+ &.-ds-interactive:hover,
134
+ &.-ds-hovered {
135
+ #{$self}__main {
136
+ color: map-get($map, 'main-text-color-selected-hovered');
137
+ }
138
+ }
139
+
140
+ &.-ds-disabled {
141
+ #{$self}__main {
142
+ color: map-get($map, 'main-text-color-selected-disabled');
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ .ds-textGroup {
149
+ $self: &;
150
+
151
+ @each $color-name, $color-map in $text-group-colors {
152
+ &.-ds-#{$color-name} {
153
+ @include setTextGroupColors($self, $color-map);
154
+ }
155
+ }
156
+
157
+ display: flex;
158
+ flex-direction: column;
159
+ width: 100%;
160
+
161
+ &__eyebrow {
162
+ @include info-s-default-bold;
163
+
164
+ margin-bottom: $space-5xs;
165
+
166
+ &.-ds-uppercase {
167
+ @include info-s-extensive-bold-uppercase;
168
+ }
169
+ }
170
+
171
+ &__main {
172
+ @include text-m-compact-bold;
173
+ }
174
+
175
+ &__supporting {
176
+ @include text-s-compact-regular;
177
+ }
178
+
179
+ &__eyebrow.-ds-ellipsis,
180
+ &__main.-ds-ellipsis,
181
+ &__supporting.-ds-ellipsis {
182
+ overflow: hidden;
183
+ text-overflow: ellipsis;
184
+ white-space: nowrap;
185
+ }
186
+
187
+ &.-ds-small {
188
+ #{$self}__eyebrow {
189
+ @include info-xs-default-bold;
190
+
191
+ margin-bottom: 0;
192
+
193
+ &.-ds-uppercase {
194
+ @include info-xs-extensive-bold-uppercase;
195
+ }
196
+ }
197
+
198
+ #{$self}__main {
199
+ @include text-s-compact-bold;
200
+ }
201
+ }
202
+
203
+ &.-ds-interactive:hover,
204
+ &.-ds-hovered {
205
+ cursor: pointer;
206
+ }
207
+
208
+ &.-ds-disabled {
209
+ pointer-events: none;
210
+ }
211
+
212
+ &.-ds-loading {
213
+ pointer-events: none;
214
+
215
+ #{$self}__eyebrow,
216
+ #{$self}__main,
217
+ #{$self}__supporting {
218
+ align-items: center;
219
+ display: flex;
220
+ height: 1.25em; // Fallback for older browsers
221
+ /* stylelint-disable-next-line unit-no-unknown */
222
+ height: 1lh;
223
+ }
224
+
225
+ #{$self}__skeletonWrapper {
226
+ height: 1em;
227
+ width: 100%;
228
+ }
229
+ }
230
+
231
+ &.-ds-loading-small {
232
+ width: 50%;
233
+ }
234
+
235
+ &.-ds-loading-medium {
236
+ width: 70%;
237
+ }
238
+ }
239
+ </style>
240
+
241
+ <script lang="ts">
242
+ import { defineComponent, PropType } from 'vue';
243
+ import DsSkeleton from '../Skeleton/Skeleton.vue';
244
+ import {
245
+ TEXT_GROUP_COLORS,
246
+ TEXT_GROUP_LOADING_SIZES,
247
+ TEXT_GROUP_SIZES,
248
+ TEXT_GROUP_STATES,
249
+ TextGroupColor,
250
+ TextGroupLoadingSize,
251
+ TextGroupSize,
252
+ TextGroupState,
253
+ } from './TextGroup.consts';
254
+
255
+ export default defineComponent({
256
+ name: 'TextGroup',
257
+ components: {
258
+ DsSkeleton,
259
+ },
260
+ props: {
261
+ size: {
262
+ type: String as PropType<TextGroupSize>,
263
+ default: TEXT_GROUP_SIZES.MEDIUM,
264
+ },
265
+ color: {
266
+ type: String as PropType<TextGroupColor>,
267
+ default: TEXT_GROUP_COLORS.NEUTRAL,
268
+ },
269
+ eyebrowText: {
270
+ type: String as PropType<string | null>,
271
+ default: null,
272
+ },
273
+ eyebrowTextEllipsis: {
274
+ type: Boolean,
275
+ default: false,
276
+ },
277
+ isEyebrowTextUppercase: {
278
+ type: Boolean,
279
+ default: true,
280
+ },
281
+ mainText: {
282
+ type: String as PropType<string | null>,
283
+ default: null,
284
+ },
285
+ mainTextEllipsis: {
286
+ type: Boolean,
287
+ default: false,
288
+ },
289
+ supportingText: {
290
+ type: String as PropType<string | null>,
291
+ default: null,
292
+ },
293
+ supportingTextEllipsis: {
294
+ type: Boolean,
295
+ default: false,
296
+ },
297
+ isInteractive: {
298
+ type: Boolean,
299
+ default: true,
300
+ },
301
+ skeletonLoadingSize: {
302
+ type: String as PropType<TextGroupLoadingSize>,
303
+ default: TEXT_GROUP_LOADING_SIZES.LARGE,
304
+ },
305
+ isSelected: {
306
+ type: Boolean,
307
+ default: false,
308
+ },
309
+ state: {
310
+ type: String as PropType<TextGroupState>,
311
+ default: TEXT_GROUP_STATES.DEFAULT,
312
+ },
313
+ },
314
+ data() {
315
+ return {
316
+ TEXT_GROUP_SIZES: Object.freeze(TEXT_GROUP_SIZES),
317
+ TEXT_GROUP_STATES: Object.freeze(TEXT_GROUP_STATES),
318
+ };
319
+ },
320
+ computed: {
321
+ colorClassName(): string {
322
+ return `-ds-${this.color}`;
323
+ },
324
+ isLoading(): boolean {
325
+ return this.state === TEXT_GROUP_STATES.LOADING;
326
+ },
327
+ loadingSizeClassName(): string {
328
+ return `-ds-loading-${this.skeletonLoadingSize}`;
329
+ },
330
+ },
331
+ });
332
+ </script>
@@ -0,0 +1,4 @@
1
+ import TextGroup from './TextGroup.vue';
2
+
3
+ export default TextGroup;
4
+ export * from './TextGroup.consts';
@@ -6,7 +6,7 @@ import DsSwitch from '../Switch/Switch.vue';
6
6
  import DsButton from '../Buttons/Button/Button.vue';
7
7
 
8
8
  export default {
9
- title: 'Components/Tooltip',
9
+ title: 'Prime Vue Components/Tooltip',
10
10
  component: Tooltip,
11
11
  } as Meta<typeof Tooltip>;
12
12
 
@@ -180,6 +180,7 @@ import { faSitemap as fasSitemap } from '@fortawesome/pro-solid-svg-icons/faSite
180
180
  import { faSquareCheck as fasSquareCheck } from '@fortawesome/pro-solid-svg-icons/faSquareCheck';
181
181
  import { faSquareList as fasSquareList } from '@fortawesome/pro-solid-svg-icons/faSquareList';
182
182
  import { faStar as fasStar } from '@fortawesome/pro-solid-svg-icons/faStar';
183
+ import { faStethoscope } from '@fortawesome/pro-regular-svg-icons/faStethoscope';
183
184
  import { faStopwatch as fasStopwach } from '@fortawesome/pro-solid-svg-icons/faStopwatch';
184
185
  import { faThumbsUp as fasThumbsUp } from '@fortawesome/pro-solid-svg-icons/faThumbsUp';
185
186
  import { faThumbtack as fasThumbtack } from '@fortawesome/pro-solid-svg-icons/faThumbtack';
@@ -366,6 +367,7 @@ export const FONTAWESOME_ICONS = {
366
367
  FA_SQUARE_LIST_SOLID: fasSquareList,
367
368
  FA_STAR: faStar,
368
369
  FA_STAR_SOLID: fasStar,
370
+ FA_STETHOSCOPE: faStethoscope,
369
371
  FA_STOPWATCH_SOLID: fasStopwach,
370
372
  FA_TAG: faTag,
371
373
  FA_TAGS: faTags,
package/lib/js/index.ts CHANGED
@@ -153,6 +153,8 @@ export { default as DsGroupRichListItem } from './components/RichList/GroupRichL
153
153
  export { default as Switch } from './components/Switch';
154
154
  export { default as DsSwitch } from './components/Switch';
155
155
  export * from './components/Switch/Switch.consts';
156
+ export { default as DsTextGroup } from './components/TextGroup';
157
+ export * from './components/TextGroup/TextGroup.consts';
156
158
  export { default as DsTooltip } from './components/Tooltip';
157
159
  export * from './components/Tooltip/Tooltip.consts';
158
160
  export { default as DsImage } from './components/Image';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bethinkpl/design-system",
3
- "version": "24.1.0",
3
+ "version": "24.2.1",
4
4
  "description": "Bethink universe design-system",
5
5
  "repository": {
6
6
  "type": "git",