@bethinkpl/design-system 39.0.1 → 40.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.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/dist/design-system.css +1 -1
  3. package/dist/design-system.js +19314 -19127
  4. package/dist/design-system.js.map +1 -1
  5. package/dist/lib/js/components/ActionContent/ActionContent.vue.d.ts +42 -0
  6. package/dist/lib/js/components/ActionContent/index.d.ts +3 -0
  7. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +4 -1
  8. package/dist/lib/js/components/Cards/Card/Card.consts.d.ts +13 -8
  9. package/dist/lib/js/components/Cards/Card/Card.vue.d.ts +22 -9
  10. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +78 -21
  11. package/dist/lib/js/components/Chip/Chip.vue.d.ts +2 -0
  12. package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +4 -1
  13. package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +8 -5
  14. package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +5 -2
  15. package/dist/lib/js/components/Divider/Divider.vue.d.ts +1 -1
  16. package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue.d.ts +1 -1
  17. package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +12 -3
  18. package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +3 -0
  19. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +13 -4
  20. package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +4 -4
  21. package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +1 -1
  22. package/dist/lib/js/components/Form/FormField/FormField.utils.d.ts +1 -1
  23. package/dist/lib/js/components/Form/InputField/InputField.vue.d.ts +2 -2
  24. package/dist/lib/js/components/Form/PasswordField/PasswordField.vue.d.ts +2 -2
  25. package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +3 -0
  26. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +11 -5
  27. package/dist/lib/js/components/Headers/PageHeader/PageHeader.vue.d.ts +1 -1
  28. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +9 -3
  29. package/dist/lib/js/components/IconText/IconText.vue.d.ts +1 -1
  30. package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +3 -0
  31. package/dist/lib/js/components/Image/Image.vue.d.ts +1 -1
  32. package/dist/lib/js/components/Menu/MenuDivider/MenuDivider.vue.d.ts +1 -1
  33. package/dist/lib/js/components/Modal/Modal.vue.d.ts +3 -0
  34. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +8 -2
  35. package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +8 -2
  36. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +8 -2
  37. package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +3 -0
  38. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +3 -0
  39. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +45 -23
  40. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +7 -4
  41. package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +1 -1
  42. package/dist/lib/js/components/Skeleton/Skeleton.vue.d.ts +1 -1
  43. package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +3 -0
  44. package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +3 -0
  45. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +85 -22
  46. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +85 -22
  47. package/dist/lib/js/components/Switch/Switch.vue.d.ts +3 -0
  48. package/dist/lib/js/components/TextGroup/TextGroup.consts.d.ts +14 -3
  49. package/dist/lib/js/components/TextGroup/TextGroup.vue.d.ts +8 -3
  50. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +5 -2
  51. package/dist/lib/js/components/Tile/Tile.vue.d.ts +2 -2
  52. package/dist/lib/js/components/Toast/Toast.vue.d.ts +76 -22
  53. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +5 -2
  54. package/dist/lib/js/components/Well/Well.consts.d.ts +24 -0
  55. package/dist/lib/js/components/Well/Well.vue.d.ts +13 -1
  56. package/dist/lib/js/icons/fontawesome.d.ts +2 -0
  57. package/dist/lib/js/index.d.ts +2 -0
  58. package/dist/lib/js/utils/type.utils.d.ts +3 -0
  59. package/lib/images/icons/comment-lock.svg +1 -0
  60. package/lib/js/components/ActionContent/ActionContent.spec.ts +99 -0
  61. package/lib/js/components/ActionContent/ActionContent.stories.ts +141 -0
  62. package/lib/js/components/ActionContent/ActionContent.vue +104 -0
  63. package/lib/js/components/ActionContent/index.ts +3 -0
  64. package/lib/js/components/Cards/Card/Card.consts.ts +15 -8
  65. package/lib/js/components/Cards/Card/Card.spec.ts +61 -1
  66. package/lib/js/components/Cards/Card/Card.stories.ts +20 -13
  67. package/lib/js/components/Cards/Card/Card.vue +65 -34
  68. package/lib/js/components/Chip/Chip.spec.ts +28 -0
  69. package/lib/js/components/Chip/Chip.stories.ts +7 -2
  70. package/lib/js/components/Chip/Chip.vue +14 -3
  71. package/lib/js/components/Icons/Icon/Icon.consts.ts +2 -0
  72. package/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.ts +3 -3
  73. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue +8 -1
  74. package/lib/js/components/TextGroup/TextGroup.consts.ts +15 -1
  75. package/lib/js/components/TextGroup/TextGroup.stories.ts +14 -5
  76. package/lib/js/components/TextGroup/TextGroup.vue +51 -28
  77. package/lib/js/components/Well/Well.consts.ts +16 -0
  78. package/lib/js/components/Well/Well.spec.ts +112 -0
  79. package/lib/js/components/Well/Well.stories.ts +90 -1
  80. package/lib/js/components/Well/Well.vue +135 -4
  81. package/lib/js/icons/fontawesome.ts +4 -0
  82. package/lib/js/index.ts +2 -0
  83. package/lib/js/utils/type.utils.ts +16 -0
  84. package/package.json +14 -6
@@ -76,7 +76,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
76
76
  RIGHT: string;
77
77
  }>;
78
78
  }, {
79
- buttonPrimaryColor(): "primary" | "neutral";
79
+ buttonPrimaryColor(): "neutral" | "primary";
80
80
  buttonSecondaryColor(): "danger" | "neutral";
81
81
  toastPosition(): string;
82
82
  toastSize(): string;
@@ -253,17 +253,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
253
253
  dividerUnderHeader: {
254
254
  type: PropType<boolean>;
255
255
  };
256
- hasBorder: {
256
+ hasRibbon: {
257
257
  type: PropType<boolean>;
258
258
  };
259
- borderPosition: {
260
- type: PropType<import('../Cards/Card').CardBorderPositions>;
259
+ hasRadius: {
260
+ type: PropType<boolean>;
261
261
  };
262
- borderSize: {
263
- type: PropType<import('../Cards/Card').CardBorderSizes>;
262
+ backgroundColor: {
263
+ type: PropType<import('../Cards/Card').CardBackgroundColor>;
264
264
  };
265
- borderColor: {
266
- type: PropType<import('../Cards/Card').CardBorderColors>;
265
+ ribbonPosition: {
266
+ type: PropType<import('../Cards/Card').CardRibbonPositions>;
267
+ };
268
+ ribbonSize: {
269
+ type: PropType<import('../Cards/Card').CardRibbonSizes>;
270
+ };
271
+ ribbonColor: {
272
+ type: PropType<import('../Cards/Card').CardRibbonColors>;
267
273
  };
268
274
  hasRibbonRadius: {
269
275
  type: PropType<boolean>;
@@ -283,6 +289,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
283
289
  isContentScrollable: {
284
290
  type: PropType<boolean>;
285
291
  };
292
+ hasBorder: {
293
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to hasRibbon">>;
294
+ };
295
+ borderPosition: {
296
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonPosition">>;
297
+ };
298
+ borderSize: {
299
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonSize">>;
300
+ };
301
+ borderColor: {
302
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonColor">>;
303
+ };
286
304
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
287
305
  P: {};
288
306
  B: {};
@@ -306,17 +324,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
306
324
  dividerUnderHeader: {
307
325
  type: PropType<boolean>;
308
326
  };
309
- hasBorder: {
327
+ hasRibbon: {
310
328
  type: PropType<boolean>;
311
329
  };
312
- borderPosition: {
313
- type: PropType<import('../Cards/Card').CardBorderPositions>;
330
+ hasRadius: {
331
+ type: PropType<boolean>;
314
332
  };
315
- borderSize: {
316
- type: PropType<import('../Cards/Card').CardBorderSizes>;
333
+ backgroundColor: {
334
+ type: PropType<import('../Cards/Card').CardBackgroundColor>;
317
335
  };
318
- borderColor: {
319
- type: PropType<import('../Cards/Card').CardBorderColors>;
336
+ ribbonPosition: {
337
+ type: PropType<import('../Cards/Card').CardRibbonPositions>;
338
+ };
339
+ ribbonSize: {
340
+ type: PropType<import('../Cards/Card').CardRibbonSizes>;
341
+ };
342
+ ribbonColor: {
343
+ type: PropType<import('../Cards/Card').CardRibbonColors>;
320
344
  };
321
345
  hasRibbonRadius: {
322
346
  type: PropType<boolean>;
@@ -336,6 +360,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
336
360
  isContentScrollable: {
337
361
  type: PropType<boolean>;
338
362
  };
363
+ hasBorder: {
364
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to hasRibbon">>;
365
+ };
366
+ borderPosition: {
367
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonPosition">>;
368
+ };
369
+ borderSize: {
370
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonSize">>;
371
+ };
372
+ borderColor: {
373
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonColor">>;
374
+ };
339
375
  }>> & Readonly<{}>, {}, {}, {}, {}, {}>;
340
376
  __isFragment?: never;
341
377
  __isTeleport?: never;
@@ -356,17 +392,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
356
392
  dividerUnderHeader: {
357
393
  type: PropType<boolean>;
358
394
  };
359
- hasBorder: {
395
+ hasRibbon: {
360
396
  type: PropType<boolean>;
361
397
  };
362
- borderPosition: {
363
- type: PropType<import('../Cards/Card').CardBorderPositions>;
398
+ hasRadius: {
399
+ type: PropType<boolean>;
364
400
  };
365
- borderSize: {
366
- type: PropType<import('../Cards/Card').CardBorderSizes>;
401
+ backgroundColor: {
402
+ type: PropType<import('../Cards/Card').CardBackgroundColor>;
367
403
  };
368
- borderColor: {
369
- type: PropType<import('../Cards/Card').CardBorderColors>;
404
+ ribbonPosition: {
405
+ type: PropType<import('../Cards/Card').CardRibbonPositions>;
406
+ };
407
+ ribbonSize: {
408
+ type: PropType<import('../Cards/Card').CardRibbonSizes>;
409
+ };
410
+ ribbonColor: {
411
+ type: PropType<import('../Cards/Card').CardRibbonColors>;
370
412
  };
371
413
  hasRibbonRadius: {
372
414
  type: PropType<boolean>;
@@ -386,6 +428,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
386
428
  isContentScrollable: {
387
429
  type: PropType<boolean>;
388
430
  };
431
+ hasBorder: {
432
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to hasRibbon">>;
433
+ };
434
+ borderPosition: {
435
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonPosition">>;
436
+ };
437
+ borderSize: {
438
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonSize">>;
439
+ };
440
+ borderColor: {
441
+ type: PropType<import('../../utils/type.utils').RemovedProp<"renamed to ribbonColor">>;
442
+ };
389
443
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
390
444
  $slots: Readonly<{
391
445
  header?: () => any;
@@ -61,6 +61,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
61
61
  ICONS: Readonly<{
62
62
  readonly ANSWERS: VueConstructor<Vue>;
63
63
  readonly CHANGE: VueConstructor<Vue>;
64
+ readonly COMMENT_LOCK: VueConstructor<Vue>;
64
65
  readonly COMMENTS_CHECK: VueConstructor<Vue>;
65
66
  readonly HEAD_WITH_QUESTION_MARK: VueConstructor<Vue>;
66
67
  readonly HIDE_ANSWERS: VueConstructor<Vue>;
@@ -162,6 +163,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
162
163
  readonly FA_CODE_SIMPLE: import('@fortawesome/fontawesome-common-types').IconDefinition;
163
164
  readonly FA_CODE: import('@fortawesome/fontawesome-common-types').IconDefinition;
164
165
  readonly FA_COMMENT_DOTS: import('@fortawesome/fontawesome-common-types').IconDefinition;
166
+ readonly FA_COMMENT_PLUS: import('@fortawesome/fontawesome-common-types').IconDefinition;
165
167
  readonly FA_COMMENT_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
166
168
  readonly FA_COMMENT: import('@fortawesome/fontawesome-common-types').IconDefinition;
167
169
  readonly FA_COMMENTS_QUESTION_CHECK: import('@fortawesome/fontawesome-common-types').IconDefinition;
@@ -325,6 +327,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
325
327
  readonly FA_VIDEO_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
326
328
  readonly FA_VOLUME_HIGH_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
327
329
  readonly FA_SPARKLES: import('@fortawesome/fontawesome-common-types').IconDefinition;
330
+ readonly FA_SPARKLES_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
328
331
  readonly FA_WAND_MAGIC_SPARKLES: import('@fortawesome/fontawesome-common-types').IconDefinition;
329
332
  readonly FA_WINDOW_MAXIMIZE: import('@fortawesome/fontawesome-common-types').IconDefinition;
330
333
  readonly FA_XMARK: import('@fortawesome/fontawesome-common-types').IconDefinition;
@@ -424,12 +427,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
424
427
  label: string;
425
428
  color: ToggleButtonColor;
426
429
  radius: ToggleButtonRadius;
430
+ isInteractive: boolean;
427
431
  state: ToggleButtonState;
432
+ isSelected: boolean;
428
433
  iconLeft: any;
429
434
  iconRight: any;
430
435
  isLabelUppercase: boolean;
431
- isInteractive: boolean;
432
- isSelected: boolean;
433
436
  hasSmallHorizontalPadding: boolean;
434
437
  labelSize: ToggleButtonLabelSize;
435
438
  }, {}, {
@@ -17,3 +17,27 @@ export declare const WELL_COLORS: {
17
17
  };
18
18
  export type WellColor = Value<typeof WELL_COLORS>;
19
19
  export declare const WELL_DEFAULT_COLOR: "neutral";
20
+ export declare const WELL_RIBBON_COLORS: {
21
+ readonly NEUTRAL: "neutral";
22
+ readonly NEUTRAL_HEAVY: "neutral-heavy";
23
+ readonly NEUTRAL_STRONG: "neutral-strong";
24
+ readonly PRIMARY: "primary";
25
+ readonly SUCCESS: "success";
26
+ readonly WARNING: "warning";
27
+ readonly DANGER: "danger";
28
+ readonly FAIL: "fail";
29
+ readonly INFO: "info";
30
+ readonly TRANSPARENT: "transparent";
31
+ };
32
+ export type WellRibbonColor = Value<typeof WELL_RIBBON_COLORS>;
33
+ export declare const WELL_RIBBON_SIZES: {
34
+ readonly SMALL: "small";
35
+ readonly MEDIUM: "medium";
36
+ readonly LARGE: "large";
37
+ };
38
+ export type WellRibbonSize = Value<typeof WELL_RIBBON_SIZES>;
39
+ export declare const WELL_RIBBON_POSITIONS: {
40
+ readonly TOP: "top";
41
+ readonly LEFT: "left";
42
+ };
43
+ export type WellRibbonPosition = Value<typeof WELL_RIBBON_POSITIONS>;
@@ -1,4 +1,4 @@
1
- import { WellPadding, WellColor } from './Well.consts';
1
+ import { WellPadding, WellColor, WellRibbonPosition, WellRibbonSize, WellRibbonColor } from './Well.consts';
2
2
 
3
3
  declare function __VLS_template(): {
4
4
  accessory?(_: {}): any;
@@ -7,9 +7,21 @@ declare function __VLS_template(): {
7
7
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
8
  padding?: WellPadding | null;
9
9
  color?: WellColor;
10
+ hasRadius?: boolean;
11
+ hasBorder?: boolean;
12
+ hasRibbon?: boolean;
13
+ ribbonPosition?: WellRibbonPosition;
14
+ ribbonSize?: WellRibbonSize;
15
+ ribbonColor?: WellRibbonColor;
10
16
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
17
  padding?: WellPadding | null;
12
18
  color?: WellColor;
19
+ hasRadius?: boolean;
20
+ hasBorder?: boolean;
21
+ hasRibbon?: boolean;
22
+ ribbonPosition?: WellRibbonPosition;
23
+ ribbonSize?: WellRibbonSize;
24
+ ribbonColor?: WellRibbonColor;
13
25
  }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
14
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
15
27
  export default _default;
@@ -91,6 +91,7 @@ export declare const FONTAWESOME_ICONS: {
91
91
  readonly FA_CODE_SIMPLE: import('@fortawesome/fontawesome-common-types').IconDefinition;
92
92
  readonly FA_CODE: import('@fortawesome/fontawesome-common-types').IconDefinition;
93
93
  readonly FA_COMMENT_DOTS: import('@fortawesome/fontawesome-common-types').IconDefinition;
94
+ readonly FA_COMMENT_PLUS: import('@fortawesome/fontawesome-common-types').IconDefinition;
94
95
  readonly FA_COMMENT_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
95
96
  readonly FA_COMMENT: import('@fortawesome/fontawesome-common-types').IconDefinition;
96
97
  readonly FA_COMMENTS_QUESTION_CHECK: import('@fortawesome/fontawesome-common-types').IconDefinition;
@@ -254,6 +255,7 @@ export declare const FONTAWESOME_ICONS: {
254
255
  readonly FA_VIDEO_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
255
256
  readonly FA_VOLUME_HIGH_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
256
257
  readonly FA_SPARKLES: import('@fortawesome/fontawesome-common-types').IconDefinition;
258
+ readonly FA_SPARKLES_SOLID: import('@fortawesome/fontawesome-common-types').IconDefinition;
257
259
  readonly FA_WAND_MAGIC_SPARKLES: import('@fortawesome/fontawesome-common-types').IconDefinition;
258
260
  readonly FA_WINDOW_MAXIMIZE: import('@fortawesome/fontawesome-common-types').IconDefinition;
259
261
  readonly FA_XMARK: import('@fortawesome/fontawesome-common-types').IconDefinition;
@@ -1,3 +1,4 @@
1
+ export { default as DsActionContent } from './components/ActionContent';
1
2
  export { default as Avatar } from './components/Avatar';
2
3
  export * from './components/Avatar/Avatar.consts';
3
4
  export { default as Badge } from './components/Badge';
@@ -84,6 +85,7 @@ export * from './components/Headers/PageHeader/PageHeader.consts';
84
85
  export { default as SectionTitle } from './components/SectionTitle/SectionTitle.vue';
85
86
  export { default as DsSectionTitle } from './components/SectionTitle/SectionTitle.vue';
86
87
  export * from './components/SectionTitle/SectionTitle.consts';
88
+ export { default as DsSpinnerLoading } from './components/SpinnerLoading/SpinnerLoading.vue';
87
89
  export { default as Drawer } from './components/Drawer';
88
90
  export { default as DsDrawer } from './components/Drawer';
89
91
  export * from './components/Drawer/Drawer.consts';
@@ -1 +1,4 @@
1
1
  export type Value<T extends {}> = T[keyof T];
2
+ export interface RemovedProp<TMessage extends string> {
3
+ __removed?: TMessage;
4
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 64 64"><path fill="currentColor" fill-rule="evenodd" d="M49.5 25C54.8036 25 59.1426 29.3875 59.1426 34.75V40.9658C61.4328 41.6971 63 43.8908 63 46.4502V58.1504C62.9998 61.4408 60.4682 64 57.2139 64H41.7861C38.6523 64 36.0002 61.4408 36 58.1504V46.4502C36 43.8908 37.5672 41.6971 39.8574 40.9658V34.75C39.8574 29.3875 44.1964 25 49.5 25ZM49.5 30.8496C47.3304 30.8496 45.6426 32.5563 45.6426 34.75V40.5996H53.3574V34.75C53.3574 32.5563 51.6696 30.8496 49.5 30.8496Z" clip-rule="evenodd"/><path fill="currentColor" d="M32.5 0C48.8223 0 62.166 11.8359 63 26.7188C61.2129 25.5469 59.1875 24.7266 56.9238 24.4922C55.0176 14.0625 45.1289 5.625 32.5 5.625C18.4414 5.625 7.71875 16.0547 7.71875 28.125C7.71875 33.1641 9.50586 37.7344 12.6035 41.6016C14.0332 43.3594 14.2715 45.8203 13.1992 47.8125L11.0547 51.6797L18.084 48.75C19.3945 48.1641 21.0625 48.1641 22.4922 48.75C25.3516 49.9219 28.5684 50.5078 31.9043 50.625C31.0703 52.3828 30.5938 54.375 30.5938 56.25C26.9004 56.0156 23.4453 55.1953 20.2285 53.9062L6.4082 59.7656C5.93164 60 5.57422 60 5.09766 60C3.31055 60 2 58.7109 2 57.0703C2 56.4844 2.11914 56.0156 2.35742 55.5469L8.19531 45.1172C4.26367 40.4297 2 34.4531 2 28.125C2 12.6562 15.7012 1.84648e-07 32.5 0Z"/></svg>
@@ -0,0 +1,99 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { mount } from '@vue/test-utils';
3
+ import { h } from 'vue';
4
+ import ActionContent from './ActionContent.vue';
5
+ import DsFeatureIcon from '../Icons/FeatureIcon';
6
+ import DsButton from '../Buttons/Button';
7
+ import { ICONS } from '../Icons/Icon';
8
+
9
+ describe('ActionContent', () => {
10
+ it('renders', () => {
11
+ const wrapper = mount(ActionContent);
12
+
13
+ expect(wrapper.exists()).toBe(true);
14
+ });
15
+
16
+ it('renders the feature icon when icon is provided', () => {
17
+ const wrapper = mount(ActionContent, {
18
+ props: {
19
+ icon: ICONS.FA_COMMENT_DOTS,
20
+ },
21
+ });
22
+
23
+ expect(wrapper.findComponent(DsFeatureIcon).exists()).toBe(true);
24
+ });
25
+
26
+ it('does not render the feature icon when icon is not provided', () => {
27
+ const wrapper = mount(ActionContent);
28
+
29
+ expect(wrapper.findComponent(DsFeatureIcon).exists()).toBe(false);
30
+ });
31
+
32
+ it('passes main and supporting text to the text group', () => {
33
+ const wrapper = mount(ActionContent, {
34
+ props: {
35
+ mainText: 'Main text',
36
+ supportingText: 'Supporting text',
37
+ },
38
+ });
39
+
40
+ expect(wrapper.find('.ds-actionContent__text').text()).toContain('Main text');
41
+ expect(wrapper.find('.ds-actionContent__text').text()).toContain('Supporting text');
42
+ });
43
+
44
+ it('renders a default primary button with the button label and icon', () => {
45
+ const wrapper = mount(ActionContent, {
46
+ props: {
47
+ buttonLabel: 'Confirm',
48
+ buttonIcon: ICONS.FA_COMMENT_DOTS,
49
+ },
50
+ });
51
+
52
+ const button = wrapper.findComponent(DsButton);
53
+ expect(button.exists()).toBe(true);
54
+ expect(button.text()).toBe('Confirm');
55
+ expect(button.props('iconLeft')).toStrictEqual(ICONS.FA_COMMENT_DOTS);
56
+ });
57
+
58
+ it('emits button-clicked when the default button is clicked', async () => {
59
+ const wrapper = mount(ActionContent, {
60
+ props: {
61
+ buttonLabel: 'Confirm',
62
+ },
63
+ });
64
+
65
+ await wrapper.findComponent(DsButton).trigger('click');
66
+
67
+ expect(wrapper.emitted('button-clicked')).toHaveLength(1);
68
+ });
69
+
70
+ it('renders the actions slot instead of the default button', () => {
71
+ const wrapper = mount(ActionContent, {
72
+ props: {
73
+ buttonLabel: 'Default button',
74
+ },
75
+ slots: {
76
+ actions: () => h('span', { class: 'custom-action' }, 'Custom action'),
77
+ },
78
+ });
79
+
80
+ expect(wrapper.find('.custom-action').exists()).toBe(true);
81
+ expect(wrapper.findComponent(DsButton).exists()).toBe(false);
82
+ });
83
+
84
+ it('adds the vertical modifier when isActionVertical is set', () => {
85
+ const wrapper = mount(ActionContent, {
86
+ props: {
87
+ isActionVertical: true,
88
+ },
89
+ });
90
+
91
+ expect(wrapper.find('.ds-actionContent__actions').classes()).toContain('-ds-vertical');
92
+ });
93
+
94
+ it('does not add the vertical modifier by default', () => {
95
+ const wrapper = mount(ActionContent);
96
+
97
+ expect(wrapper.find('.ds-actionContent__actions').classes()).not.toContain('-ds-vertical');
98
+ });
99
+ });
@@ -0,0 +1,141 @@
1
+ import ActionContent from './ActionContent.vue';
2
+ import DsButton from '../Buttons/Button';
3
+ import { BUTTON_COLORS, BUTTON_SIZES, BUTTON_TYPES } from '../Buttons/Button/Button.consts';
4
+ import { ICONS } from '../Icons/Icon';
5
+
6
+ import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
7
+ import { toRefs } from 'vue';
8
+
9
+ export default {
10
+ title: 'Components/ActionContent',
11
+ component: ActionContent,
12
+ } as Meta<typeof ActionContent>;
13
+
14
+ const StoryTemplate: StoryFn<typeof ActionContent> = (args) => {
15
+ return {
16
+ components: { ActionContent },
17
+ setup() {
18
+ return {
19
+ ...toRefs(args),
20
+ ICONS,
21
+ };
22
+ },
23
+ template: `
24
+ <action-content
25
+ :icon="ICONS[icon]"
26
+ :main-text="mainText"
27
+ :supporting-text="supportingText"
28
+ :button-label="buttonLabel"
29
+ :button-icon="ICONS[buttonIcon]"
30
+ :is-action-vertical="isActionVertical"
31
+ >
32
+ <template v-if="actions" #actions><span v-html="actions" /></template>
33
+ </action-content>`,
34
+ };
35
+ };
36
+
37
+ export const Interactive = StoryTemplate.bind({});
38
+
39
+ const args = {
40
+ icon: 'FA_COMMENT_DOTS',
41
+ mainText: 'Main text tutaj sobie będzie',
42
+ supportingText: 'Supporting text tutaj będzie',
43
+ buttonLabel: 'Button label',
44
+ buttonIcon: null,
45
+ isActionVertical: false,
46
+ actions: '',
47
+ } as Args;
48
+
49
+ const argTypes = {
50
+ icon: {
51
+ control: 'select',
52
+ options: [null, ...Object.keys(ICONS)],
53
+ },
54
+ mainText: {
55
+ control: 'text',
56
+ },
57
+ supportingText: {
58
+ control: 'text',
59
+ },
60
+ buttonLabel: {
61
+ control: 'text',
62
+ },
63
+ buttonIcon: {
64
+ control: 'select',
65
+ options: [null, ...Object.keys(ICONS)],
66
+ },
67
+ isActionVertical: {
68
+ control: 'boolean',
69
+ },
70
+ actions: {
71
+ control: 'text',
72
+ },
73
+ } as ArgTypes;
74
+
75
+ Interactive.argTypes = argTypes;
76
+ Interactive.args = args;
77
+
78
+ Interactive.parameters = {
79
+ design: {
80
+ type: 'figma',
81
+ url: 'https://www.figma.com/design/uLBrJvVwTYzuch6VnDOBlL/INI-188---Dyskusje-2.0-NEW?node-id=4001-152961&m=dev',
82
+ },
83
+ };
84
+
85
+ const WithActionsSlotTemplate: StoryFn<typeof ActionContent> = (args) => {
86
+ return {
87
+ components: { ActionContent, DsButton },
88
+ setup() {
89
+ return {
90
+ ...toRefs(args),
91
+ ICONS,
92
+ BUTTON_COLORS,
93
+ BUTTON_SIZES,
94
+ BUTTON_TYPES,
95
+ };
96
+ },
97
+ template: `
98
+ <action-content
99
+ :icon="ICONS[icon]"
100
+ :main-text="mainText"
101
+ :supporting-text="supportingText"
102
+ :is-action-vertical="isActionVertical"
103
+ >
104
+ <template #actions>
105
+ <ds-button
106
+ :color="BUTTON_COLORS.NEUTRAL"
107
+ :type="BUTTON_TYPES.OUTLINED"
108
+ :size="BUTTON_SIZES.SMALL"
109
+ >Cancel</ds-button>
110
+ <ds-button
111
+ :color="BUTTON_COLORS.PRIMARY"
112
+ :type="BUTTON_TYPES.FILLED"
113
+ :size="BUTTON_SIZES.SMALL"
114
+ >Confirm</ds-button>
115
+ </template>
116
+ </action-content>`,
117
+ };
118
+ };
119
+
120
+ export const WithActionsSlot = WithActionsSlotTemplate.bind({});
121
+
122
+ WithActionsSlot.argTypes = {
123
+ icon: argTypes.icon,
124
+ mainText: argTypes.mainText,
125
+ supportingText: argTypes.supportingText,
126
+ isActionVertical: argTypes.isActionVertical,
127
+ } as ArgTypes;
128
+
129
+ WithActionsSlot.args = {
130
+ icon: 'FA_COMMENT_DOTS',
131
+ mainText: 'Main text tutaj sobie będzie',
132
+ supportingText: 'Supporting text tutaj będzie',
133
+ isActionVertical: false,
134
+ } as Args;
135
+
136
+ WithActionsSlot.parameters = {
137
+ design: {
138
+ type: 'figma',
139
+ url: 'https://www.figma.com/design/uLBrJvVwTYzuch6VnDOBlL/INI-188---Dyskusje-2.0-NEW?node-id=4001-152961&m=dev',
140
+ },
141
+ };
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <div class="ds-actionContent">
3
+ <div class="ds-actionContent__content">
4
+ <ds-feature-icon
5
+ v-if="icon"
6
+ class="ds-actionContent__icon"
7
+ :icon="icon"
8
+ :color="FEATURE_ICON_COLOR.PRIMARY"
9
+ :size="FEATURE_ICON_SIZES.MEDIUM"
10
+ double-background
11
+ />
12
+ <ds-text-group
13
+ class="ds-actionContent__text"
14
+ :eyebrow-text="null"
15
+ :main-text="mainText"
16
+ :supporting-text="supportingText"
17
+ :size="TEXT_GROUP_SIZES.LARGE"
18
+ :align="TEXT_GROUP_ALIGNS.CENTER"
19
+ :main-text-color="TEXT_GROUP_MAIN_TEXT_COLORS.PRIMARY"
20
+ :is-interactive="false"
21
+ />
22
+ </div>
23
+ <div class="ds-actionContent__actions" :class="{ '-ds-vertical': isActionVertical }">
24
+ <slot name="actions">
25
+ <ds-button
26
+ :color="BUTTON_COLORS.PRIMARY"
27
+ :type="BUTTON_TYPES.FILLED"
28
+ :size="BUTTON_SIZES.SMALL"
29
+ :radius="BUTTON_RADIUSES.ROUNDED"
30
+ :icon-left="buttonIcon"
31
+ @click="$emit('button-clicked')"
32
+ >{{ buttonLabel }}</ds-button
33
+ >
34
+ </slot>
35
+ </div>
36
+ </div>
37
+ </template>
38
+
39
+ <style lang="scss" scoped>
40
+ @import '../../../styles/settings/spacings';
41
+
42
+ .ds-actionContent {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: $space-8;
46
+ width: 100%;
47
+
48
+ &__content {
49
+ align-items: center;
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: $space-4;
53
+ }
54
+
55
+ &__actions {
56
+ display: flex;
57
+ gap: $space-8;
58
+ justify-content: center;
59
+
60
+ &.-ds-vertical {
61
+ align-items: stretch;
62
+ flex-direction: column;
63
+ }
64
+ }
65
+ }
66
+ </style>
67
+
68
+ <script setup lang="ts">
69
+ import DsFeatureIcon from '../Icons/FeatureIcon';
70
+ import { FEATURE_ICON_COLOR, FEATURE_ICON_SIZES } from '../Icons/FeatureIcon/FeatureIcon.consts';
71
+ import DsTextGroup from '../TextGroup/TextGroup.vue';
72
+ import {
73
+ TEXT_GROUP_ALIGNS,
74
+ TEXT_GROUP_MAIN_TEXT_COLORS,
75
+ TEXT_GROUP_SIZES,
76
+ } from '../TextGroup/TextGroup.consts';
77
+ import DsButton, { BUTTON_RADIUSES } from '../Buttons/Button';
78
+ import { BUTTON_COLORS, BUTTON_SIZES, BUTTON_TYPES } from '../Buttons/Button/Button.consts';
79
+ import { IconItem } from '../Icons/Icon';
80
+
81
+ const {
82
+ icon = null,
83
+ mainText = null,
84
+ supportingText = null,
85
+ buttonLabel,
86
+ buttonIcon = null,
87
+ isActionVertical = false,
88
+ } = defineProps<{
89
+ icon?: IconItem | null;
90
+ mainText?: string | null;
91
+ supportingText?: string | null;
92
+ buttonLabel?: string;
93
+ buttonIcon?: IconItem | null;
94
+ isActionVertical?: boolean;
95
+ }>();
96
+
97
+ defineEmits<{
98
+ (e: 'button-clicked'): void;
99
+ }>();
100
+
101
+ defineSlots<{
102
+ actions?: () => any;
103
+ }>();
104
+ </script>
@@ -0,0 +1,3 @@
1
+ import ActionContent from './ActionContent.vue';
2
+
3
+ export default ActionContent;