@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.
- package/dist/design-system.css +1 -1
- package/dist/design-system.js +13826 -13252
- package/dist/design-system.js.map +1 -1
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +1 -1
- package/dist/lib/js/components/Callout/Callout.consts.d.ts +32 -0
- package/dist/lib/js/components/{ActionContent/ActionContent.vue.d.ts → Callout/Callout.vue.d.ts} +17 -6
- package/dist/lib/js/components/Callout/index.d.ts +4 -0
- package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +1 -1
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +5 -5
- package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +2 -2
- package/dist/lib/js/components/Divider/Divider.vue.d.ts +1 -1
- package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue.d.ts +1 -1
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +4 -4
- package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +4 -4
- package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/lib/js/components/Form/FormField/FormField.utils.d.ts +1 -1
- package/dist/lib/js/components/Form/InputField/InputField.vue.d.ts +2 -2
- package/dist/lib/js/components/Form/PasswordField/PasswordField.vue.d.ts +2 -2
- package/dist/lib/js/components/Form/PinInputField/PinInputField.consts.d.ts +14 -0
- package/dist/lib/js/components/Form/PinInputField/PinInputField.types.d.ts +12 -0
- package/dist/lib/js/components/Form/PinInputField/PinInputField.utils.d.ts +2 -0
- package/dist/lib/js/components/Form/PinInputField/PinInputField.vue.d.ts +91 -0
- package/dist/lib/js/components/Form/PinInputField/index.d.ts +5 -0
- package/dist/lib/js/components/Form/PinInputField/usePinInputFieldWithinForm.d.ts +8 -0
- package/dist/lib/js/components/Form/SelectField/SelectField.vue.d.ts +2 -2
- package/dist/lib/js/components/Form/TextAreaField/TextAreaField.types.d.ts +9 -0
- package/dist/lib/js/components/Form/TextAreaField/TextAreaField.vue.d.ts +76 -0
- package/dist/lib/js/components/Form/TextAreaField/TextAreaFieldAutosized.vue.d.ts +6 -0
- package/dist/lib/js/components/Form/TextAreaField/index.d.ts +4 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +5 -5
- package/dist/lib/js/components/Headers/PageHeader/PageHeader.vue.d.ts +1 -1
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +3 -3
- package/dist/lib/js/components/IconText/IconText.vue.d.ts +1 -1
- package/dist/lib/js/components/Image/Image.vue.d.ts +1 -1
- package/dist/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.vue.d.ts +12 -1
- package/dist/lib/js/components/Menu/MenuDivider/MenuDivider.vue.d.ts +1 -1
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +2 -2
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +2 -2
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +2 -2
- package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +7 -7
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +3 -3
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +1 -1
- package/dist/lib/js/components/Skeleton/Skeleton.vue.d.ts +1 -1
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +3 -3
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +3 -3
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +2 -2
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +2 -2
- package/dist/lib/js/components/Toast/Toast.consts.d.ts +11 -9
- package/dist/lib/js/components/Toast/Toast.vue.d.ts +51 -433
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +1 -1
- package/dist/lib/js/{components/Form/InputField/useInputFieldWithinForm.d.ts → composables/useTextFieldWithinForm.d.ts} +1 -1
- package/dist/lib/js/index.d.ts +6 -1
- package/lib/js/components/Callout/Callout.consts.ts +25 -0
- package/lib/js/components/Callout/Callout.spec.ts +257 -0
- package/lib/js/components/Callout/Callout.stories.ts +209 -0
- package/lib/js/components/Callout/Callout.vue +161 -0
- package/lib/js/components/Callout/index.ts +4 -0
- package/lib/js/components/Cards/Card/Card.vue +1 -1
- package/lib/js/components/Form/CheckboxGroupField/CheckboxGroupField.spec.ts +15 -0
- package/lib/js/components/Form/CheckboxGroupField/CheckboxGroupField.vue +5 -2
- package/lib/js/components/Form/Form.stories.ts +23 -2
- package/lib/js/components/Form/InputField/InputField.spec.ts +11 -1
- package/lib/js/components/Form/InputField/InputField.vue +7 -4
- package/lib/js/components/Form/PasswordField/PasswordField.vue +1 -1
- package/lib/js/components/Form/PinInputField/PinInputField.consts.ts +18 -0
- package/lib/js/components/Form/PinInputField/PinInputField.spec.ts +394 -0
- package/lib/js/components/Form/PinInputField/PinInputField.stories.ts +124 -0
- package/lib/js/components/Form/PinInputField/PinInputField.types.ts +42 -0
- package/lib/js/components/Form/PinInputField/PinInputField.utils.ts +5 -0
- package/lib/js/components/Form/PinInputField/PinInputField.vue +211 -0
- package/lib/js/components/Form/PinInputField/index.ts +6 -0
- package/lib/js/components/Form/PinInputField/usePinInputFieldWithinForm.ts +29 -0
- package/lib/js/components/Form/SelectField/SelectField.stories.ts +0 -5
- package/lib/js/components/Form/SelectField/useSelectFieldWithinForm.ts +1 -1
- package/lib/js/components/Form/TextAreaField/TextAreaField.spec.ts +341 -0
- package/lib/js/components/Form/TextAreaField/TextAreaField.stories.ts +99 -0
- package/lib/js/components/Form/TextAreaField/TextAreaField.types.ts +23 -0
- package/lib/js/components/Form/TextAreaField/TextAreaField.vue +190 -0
- package/lib/js/components/Form/TextAreaField/TextAreaFieldAutosized.vue +19 -0
- package/lib/js/components/Form/TextAreaField/index.ts +5 -0
- package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.spec.ts +26 -0
- package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.stories.ts +16 -3
- package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.vue +5 -0
- package/lib/js/components/LoadingBar/LoadingBar.spec.ts +84 -0
- package/lib/js/components/LoadingBar/LoadingBar.vue +30 -19
- package/lib/js/components/Toast/Toast.consts.ts +4 -2
- package/lib/js/components/Toast/Toast.spec.ts +177 -0
- package/lib/js/components/Toast/Toast.stories.ts +65 -31
- package/lib/js/components/Toast/Toast.vue +176 -195
- package/lib/js/{components/Form/InputField/useInputFieldWithinForm.ts → composables/useTextFieldWithinForm.ts} +7 -2
- package/lib/js/index.ts +6 -1
- package/package.json +1 -1
- package/dist/lib/js/components/ActionContent/index.d.ts +0 -3
- package/lib/js/components/ActionContent/ActionContent.spec.ts +0 -99
- package/lib/js/components/ActionContent/ActionContent.stories.ts +0 -141
- package/lib/js/components/ActionContent/ActionContent.vue +0 -104
- 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>
|