@bethinkpl/design-system 43.0.0 → 45.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 (97) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/design-system.js +13826 -13252
  3. package/dist/design-system.js.map +1 -1
  4. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +1 -1
  5. package/dist/lib/js/components/Callout/Callout.consts.d.ts +32 -0
  6. package/dist/lib/js/components/{ActionContent/ActionContent.vue.d.ts → Callout/Callout.vue.d.ts} +17 -6
  7. package/dist/lib/js/components/Callout/index.d.ts +4 -0
  8. package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +1 -1
  9. package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +5 -5
  10. package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +2 -2
  11. package/dist/lib/js/components/Divider/Divider.vue.d.ts +1 -1
  12. package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue.d.ts +1 -1
  13. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +4 -4
  14. package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +4 -4
  15. package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +1 -1
  16. package/dist/lib/js/components/Form/FormField/FormField.utils.d.ts +1 -1
  17. package/dist/lib/js/components/Form/InputField/InputField.vue.d.ts +2 -2
  18. package/dist/lib/js/components/Form/PasswordField/PasswordField.vue.d.ts +2 -2
  19. package/dist/lib/js/components/Form/PinInputField/PinInputField.consts.d.ts +14 -0
  20. package/dist/lib/js/components/Form/PinInputField/PinInputField.types.d.ts +12 -0
  21. package/dist/lib/js/components/Form/PinInputField/PinInputField.utils.d.ts +2 -0
  22. package/dist/lib/js/components/Form/PinInputField/PinInputField.vue.d.ts +91 -0
  23. package/dist/lib/js/components/Form/PinInputField/index.d.ts +5 -0
  24. package/dist/lib/js/components/Form/PinInputField/usePinInputFieldWithinForm.d.ts +8 -0
  25. package/dist/lib/js/components/Form/SelectField/SelectField.vue.d.ts +2 -2
  26. package/dist/lib/js/components/Form/TextAreaField/TextAreaField.types.d.ts +9 -0
  27. package/dist/lib/js/components/Form/TextAreaField/TextAreaField.vue.d.ts +76 -0
  28. package/dist/lib/js/components/Form/TextAreaField/TextAreaFieldAutosized.vue.d.ts +6 -0
  29. package/dist/lib/js/components/Form/TextAreaField/index.d.ts +4 -0
  30. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +5 -5
  31. package/dist/lib/js/components/Headers/PageHeader/PageHeader.vue.d.ts +1 -1
  32. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +3 -3
  33. package/dist/lib/js/components/IconText/IconText.vue.d.ts +1 -1
  34. package/dist/lib/js/components/Image/Image.vue.d.ts +1 -1
  35. package/dist/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.vue.d.ts +12 -1
  36. package/dist/lib/js/components/Menu/MenuDivider/MenuDivider.vue.d.ts +1 -1
  37. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +2 -2
  38. package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +2 -2
  39. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +2 -2
  40. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +7 -7
  41. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +3 -3
  42. package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +1 -1
  43. package/dist/lib/js/components/Skeleton/Skeleton.vue.d.ts +1 -1
  44. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +3 -3
  45. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +3 -3
  46. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +2 -2
  47. package/dist/lib/js/components/Tile/Tile.vue.d.ts +2 -2
  48. package/dist/lib/js/components/Toast/Toast.consts.d.ts +11 -9
  49. package/dist/lib/js/components/Toast/Toast.vue.d.ts +51 -433
  50. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +1 -1
  51. package/dist/lib/js/{components/Form/InputField/useInputFieldWithinForm.d.ts → composables/useTextFieldWithinForm.d.ts} +1 -1
  52. package/dist/lib/js/index.d.ts +6 -1
  53. package/lib/js/components/Callout/Callout.consts.ts +25 -0
  54. package/lib/js/components/Callout/Callout.spec.ts +257 -0
  55. package/lib/js/components/Callout/Callout.stories.ts +209 -0
  56. package/lib/js/components/Callout/Callout.vue +161 -0
  57. package/lib/js/components/Callout/index.ts +4 -0
  58. package/lib/js/components/Cards/Card/Card.vue +1 -1
  59. package/lib/js/components/Form/CheckboxGroupField/CheckboxGroupField.spec.ts +15 -0
  60. package/lib/js/components/Form/CheckboxGroupField/CheckboxGroupField.vue +5 -2
  61. package/lib/js/components/Form/Form.stories.ts +23 -2
  62. package/lib/js/components/Form/InputField/InputField.spec.ts +11 -1
  63. package/lib/js/components/Form/InputField/InputField.vue +7 -4
  64. package/lib/js/components/Form/PasswordField/PasswordField.vue +1 -1
  65. package/lib/js/components/Form/PinInputField/PinInputField.consts.ts +18 -0
  66. package/lib/js/components/Form/PinInputField/PinInputField.spec.ts +394 -0
  67. package/lib/js/components/Form/PinInputField/PinInputField.stories.ts +124 -0
  68. package/lib/js/components/Form/PinInputField/PinInputField.types.ts +42 -0
  69. package/lib/js/components/Form/PinInputField/PinInputField.utils.ts +5 -0
  70. package/lib/js/components/Form/PinInputField/PinInputField.vue +211 -0
  71. package/lib/js/components/Form/PinInputField/index.ts +6 -0
  72. package/lib/js/components/Form/PinInputField/usePinInputFieldWithinForm.ts +29 -0
  73. package/lib/js/components/Form/SelectField/SelectField.stories.ts +0 -5
  74. package/lib/js/components/Form/SelectField/useSelectFieldWithinForm.ts +1 -1
  75. package/lib/js/components/Form/TextAreaField/TextAreaField.spec.ts +341 -0
  76. package/lib/js/components/Form/TextAreaField/TextAreaField.stories.ts +99 -0
  77. package/lib/js/components/Form/TextAreaField/TextAreaField.types.ts +23 -0
  78. package/lib/js/components/Form/TextAreaField/TextAreaField.vue +190 -0
  79. package/lib/js/components/Form/TextAreaField/TextAreaFieldAutosized.vue +19 -0
  80. package/lib/js/components/Form/TextAreaField/index.ts +5 -0
  81. package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.spec.ts +26 -0
  82. package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.stories.ts +16 -3
  83. package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.vue +5 -0
  84. package/lib/js/components/LoadingBar/LoadingBar.spec.ts +84 -0
  85. package/lib/js/components/LoadingBar/LoadingBar.vue +30 -19
  86. package/lib/js/components/Toast/Toast.consts.ts +4 -2
  87. package/lib/js/components/Toast/Toast.spec.ts +177 -0
  88. package/lib/js/components/Toast/Toast.stories.ts +65 -31
  89. package/lib/js/components/Toast/Toast.vue +176 -195
  90. package/lib/js/{components/Form/InputField/useInputFieldWithinForm.ts → composables/useTextFieldWithinForm.ts} +7 -2
  91. package/lib/js/index.ts +6 -1
  92. package/package.json +1 -1
  93. package/dist/lib/js/components/ActionContent/index.d.ts +0 -3
  94. package/lib/js/components/ActionContent/ActionContent.spec.ts +0 -99
  95. package/lib/js/components/ActionContent/ActionContent.stories.ts +0 -141
  96. package/lib/js/components/ActionContent/ActionContent.vue +0 -104
  97. package/lib/js/components/ActionContent/index.ts +0 -3
@@ -1,141 +0,0 @@
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
- };
@@ -1,104 +0,0 @@
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>
@@ -1,3 +0,0 @@
1
- import ActionContent from './ActionContent.vue';
2
-
3
- export default ActionContent;