@bethinkpl/design-system 38.0.1 → 39.0.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.
- package/dist/design-system.css +1 -1
- package/dist/design-system.js +35 -31
- package/dist/design-system.js.map +1 -1
- package/dist/lib/js/components/BadgeScore/BadgeScore.vue.d.ts +3 -3
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +6 -6
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +3 -3
- package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +3 -3
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +3 -3
- package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +3 -3
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +9 -9
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +3 -3
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +9 -9
- package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +3 -3
- package/dist/lib/js/components/Form/SelectionControl/SelectionControl.vue.d.ts +3 -3
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +6 -6
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +9 -9
- package/dist/lib/js/components/IconText/IconText.vue.d.ts +3 -3
- package/dist/lib/js/components/Icons/Icon/Icon.vue.d.ts +3 -3
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +3 -3
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +6 -6
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +6 -6
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +3 -3
- package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +3 -3
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +3 -3
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +3 -3
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +3 -3
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +9 -9
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +12 -12
- package/dist/lib/js/components/SurveyToggle/SurveyToggle.vue.d.ts +3 -3
- package/dist/lib/js/components/Switch/Switch.vue.d.ts +3 -3
- package/dist/lib/js/components/TabItem/TabItem.vue.d.ts +3 -3
- package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.vue.d.ts +3 -3
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +3 -3
- package/lib/js/components/Banner/Banner.vue +0 -2
- package/lib/js/components/Buttons/HelpButton/HelpButton.stories.ts +1 -2
- package/lib/js/components/Buttons/HelpButton/HelpButton.vue +0 -1
- package/lib/js/components/Buttons/IconButton/IconButton.stories.ts +3 -3
- package/lib/js/components/Buttons/IconButton/IconButton.vue +15 -5
- package/lib/js/components/Chip/Chip.vue +5 -1
- package/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue +0 -2
- package/lib/js/components/Form/PasswordField/PasswordField.vue +0 -1
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue +2 -0
- package/lib/js/components/Headers/SectionHeader/SectionHeader.vue +0 -1
- package/lib/js/components/Icons/Icon/Icon.stories.ts +3 -3
- package/lib/js/components/Icons/Icon/Icon.vue +7 -2
- package/lib/js/components/Menu/MenuItem/MenuItem.vue +0 -1
- package/lib/js/components/Modal/Modal.vue +1 -1
- package/lib/js/components/Modals/Modal/Modal.vue +1 -1
- package/lib/js/components/Pagination/Pagination.vue +2 -0
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue +0 -1
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +0 -1
- package/lib/styles/components/_icons.scss +2 -2
- package/lib/styles/mixins/_touchable.scss +19 -0
- package/lib/styles/settings/_icons.scss +1 -1
- package/package.json +1 -1
|
@@ -29,8 +29,7 @@ const meta: Meta<ComponentProps<typeof HelpButton> & ComponentSlots<typeof HelpB
|
|
|
29
29
|
<template v-else #modal="{onClose}">
|
|
30
30
|
<modal @close-modal="onClose">test</modal>
|
|
31
31
|
</template>
|
|
32
|
-
</HelpButton
|
|
33
|
-
<ds-banner style="margin-top: 20px;" :color="BANNER_COLORS.WARNING" title="Uwaga, z uwagi na brak lokalizacji w DS, na Modalu (tworzonym za pomocą propsa modalTitle i slota modalContent) nie wyświetla się Button w footerze do zamykania modala. Poprawimy to w ramach LMS-2762. Jako alternatywa można skorzystać ze slota modal i wstawić do modala co się chce ;)" />`,
|
|
32
|
+
</HelpButton>`,
|
|
34
33
|
}),
|
|
35
34
|
argTypes: {
|
|
36
35
|
modalTitle: {
|
|
@@ -41,7 +41,7 @@ const StoryTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
|
41
41
|
:type="type"
|
|
42
42
|
:radius="radius"
|
|
43
43
|
:color-scheme="colorScheme"
|
|
44
|
-
:touchable="
|
|
44
|
+
:touchable-deprecated="touchableDeprecated"
|
|
45
45
|
:elevation="elevation"
|
|
46
46
|
:color="color"
|
|
47
47
|
:state="state"
|
|
@@ -61,7 +61,7 @@ const args = {
|
|
|
61
61
|
radius: BUTTON_RADIUSES.CAPSULE,
|
|
62
62
|
label: 'Zamknij',
|
|
63
63
|
colorScheme: ICON_BUTTON_COLOR_SCHEMES.ALL_IN_COLOR,
|
|
64
|
-
|
|
64
|
+
touchableDeprecated: false,
|
|
65
65
|
elevation: BUTTON_ELEVATIONS.NONE,
|
|
66
66
|
color: 'primary',
|
|
67
67
|
state: ICON_BUTTON_STATES.DEFAULT,
|
|
@@ -141,7 +141,7 @@ const argTypesDisabled = {
|
|
|
141
141
|
state: {
|
|
142
142
|
disable: true,
|
|
143
143
|
},
|
|
144
|
-
|
|
144
|
+
touchableDeprecated: {
|
|
145
145
|
disable: true,
|
|
146
146
|
},
|
|
147
147
|
default: {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
[colorClassName]: isButtonColor,
|
|
16
16
|
|
|
17
|
-
'-ds-touchable':
|
|
17
|
+
'-ds-touchable': touchableDeprecated,
|
|
18
18
|
}"
|
|
19
19
|
:style="{ color: computedColor }"
|
|
20
20
|
@mouseover="mouseOver"
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
@import '../../../../styles/settings/media-queries';
|
|
64
64
|
@import '../../../../styles/settings/spacings';
|
|
65
65
|
@import '../../../../styles/settings/typography/tokens';
|
|
66
|
+
@import '../../../../styles/mixins/touchable';
|
|
66
67
|
|
|
67
68
|
@mixin setIconButtonAdditions($border: null, $icon: null) {
|
|
68
69
|
@if $border {
|
|
@@ -131,10 +132,13 @@
|
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
|
|
135
|
+
@include touchableHitArea;
|
|
136
|
+
|
|
134
137
|
align-items: center;
|
|
135
138
|
color: $color-primary-text;
|
|
136
139
|
cursor: pointer;
|
|
137
140
|
display: inline-flex;
|
|
141
|
+
position: relative;
|
|
138
142
|
transition: color ease-in-out $default-transition-time;
|
|
139
143
|
|
|
140
144
|
&:disabled,
|
|
@@ -282,8 +286,8 @@
|
|
|
282
286
|
&.-ds-touchable {
|
|
283
287
|
align-items: center;
|
|
284
288
|
justify-content: center;
|
|
285
|
-
min-height: $min-touchable-size;
|
|
286
|
-
min-width: $min-touchable-size;
|
|
289
|
+
min-height: $DEPRECATED-min-touchable-size;
|
|
290
|
+
min-width: $DEPRECATED-min-touchable-size;
|
|
287
291
|
}
|
|
288
292
|
}
|
|
289
293
|
</style>
|
|
@@ -388,9 +392,15 @@ export default defineComponent({
|
|
|
388
392
|
return Object.values(BUTTON_ELEVATIONS).includes(value);
|
|
389
393
|
},
|
|
390
394
|
},
|
|
391
|
-
|
|
395
|
+
/**
|
|
396
|
+
* @deprecated Adds the `-ds-touchable` class, which inflates the layout footprint via
|
|
397
|
+
* the deprecated `$DEPRECATED-min-touchable-size`. The non-inflating touch target is now
|
|
398
|
+
* applied automatically on touch devices via `touchableHitArea` (`@media (pointer: coarse)`),
|
|
399
|
+
* so this prop is redundant — renamed to flag it for removal once call sites migrate.
|
|
400
|
+
*/
|
|
401
|
+
touchableDeprecated: {
|
|
392
402
|
type: Boolean,
|
|
393
|
-
default:
|
|
403
|
+
default: false,
|
|
394
404
|
},
|
|
395
405
|
state: {
|
|
396
406
|
type: String,
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
<icon-button
|
|
27
27
|
v-if="size !== CHIP_SIZES.X_SMALL && isRemovable"
|
|
28
28
|
class="ds-chip__remove"
|
|
29
|
-
:touchable="false"
|
|
30
29
|
:state="
|
|
31
30
|
state === CHIP_STATES.DISABLED
|
|
32
31
|
? ICON_BUTTON_STATES.DISABLED
|
|
@@ -43,8 +42,10 @@
|
|
|
43
42
|
|
|
44
43
|
<style lang="scss" scoped>
|
|
45
44
|
@import '../../../styles/settings/animations';
|
|
45
|
+
@import '../../../styles/settings/icons';
|
|
46
46
|
@import '../../../styles/settings/spacings';
|
|
47
47
|
@import '../../../styles/settings/radiuses';
|
|
48
|
+
@import '../../../styles/mixins/touchable';
|
|
48
49
|
@import '../../../styles/settings/colors/tokens';
|
|
49
50
|
@import '../../../styles/settings/typography/tokens';
|
|
50
51
|
|
|
@@ -216,7 +217,10 @@ $chip-colors: (
|
|
|
216
217
|
padding: $space-2 $space-4;
|
|
217
218
|
|
|
218
219
|
&.-ds-interactive {
|
|
220
|
+
@include touchableHitArea;
|
|
221
|
+
|
|
219
222
|
cursor: pointer;
|
|
223
|
+
position: relative;
|
|
220
224
|
transition: background-color ease-in-out $default-transition-time;
|
|
221
225
|
}
|
|
222
226
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
v-if="hasBackButton"
|
|
16
16
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
17
17
|
:icon="ICONS.FA_CHEVRON_LEFT"
|
|
18
|
-
:touchable="false"
|
|
19
18
|
@click="$emit('backClicked')"
|
|
20
19
|
/>
|
|
21
20
|
<div class="ds-drawerHeader__textWrapper">
|
|
@@ -59,7 +58,6 @@
|
|
|
59
58
|
:color="ICON_COLORS.NEUTRAL"
|
|
60
59
|
:icon="ICONS.FA_XMARK"
|
|
61
60
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
62
|
-
:touchable="false"
|
|
63
61
|
@click="$emit('close')"
|
|
64
62
|
/>
|
|
65
63
|
</div>
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
>
|
|
84
84
|
<template #reference>
|
|
85
85
|
<ds-icon-button
|
|
86
|
+
touchable-deprecated
|
|
86
87
|
:icon="dropdownIcon"
|
|
87
88
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
88
89
|
:color="ICON_BUTTON_COLORS.NEUTRAL"
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
:text="t('ds.overlayHeader.close')"
|
|
108
109
|
>
|
|
109
110
|
<ds-icon-button
|
|
111
|
+
touchable-deprecated
|
|
110
112
|
data-test-selector="overlay-header-close-button"
|
|
111
113
|
:icon="ICONS.FA_XMARK"
|
|
112
114
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
@@ -16,7 +16,7 @@ const StoryTemplate: StoryFn<typeof Icon> = (args) => ({
|
|
|
16
16
|
return args;
|
|
17
17
|
},
|
|
18
18
|
template:
|
|
19
|
-
'<div class="sbIconList__singleIcon"><icon :icon="ICONS[icon]" :size="size" :touchable="
|
|
19
|
+
'<div class="sbIconList__singleIcon"><icon :icon="ICONS[icon]" :size="size" :touchable-deprecated="touchableDeprecated" :spinning="spinning" :rotation="rotation" :flipped-vertical="flippedVertical" :flipped-horizontal="flippedHorizontal" /></div>',
|
|
20
20
|
data() {
|
|
21
21
|
return {
|
|
22
22
|
ICONS: Object.freeze(ICONS),
|
|
@@ -30,7 +30,7 @@ const args = {
|
|
|
30
30
|
size: ICON_SIZES.MEDIUM,
|
|
31
31
|
icon: 'HEAD_WITH_QUESTION_MARK',
|
|
32
32
|
spinning: false,
|
|
33
|
-
|
|
33
|
+
touchableDeprecated: false,
|
|
34
34
|
rotation: null,
|
|
35
35
|
flippedVertical: false,
|
|
36
36
|
flippedHorizontal: false,
|
|
@@ -68,7 +68,7 @@ const StoryAllIconsTemplate: StoryFn<typeof Icon> = (args) => ({
|
|
|
68
68
|
template:
|
|
69
69
|
'<div class="sbIconList">' +
|
|
70
70
|
'<div v-for="(icon, iconName) in ICONS" :key="iconName" class="sbIconList__icon">' +
|
|
71
|
-
'<icon :icon="icon" :size="size" :touchable="
|
|
71
|
+
'<icon :icon="icon" :size="size" :touchable-deprecated="touchableDeprecated" :spinning="spinning" :rotation="rotation" :flipped-vertical="flippedVertical" :flipped-horizontal="flippedHorizontal" />' +
|
|
72
72
|
'<div>{{iconName}}</div>' +
|
|
73
73
|
'</div>' +
|
|
74
74
|
'</div>',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="ds-icon"
|
|
4
4
|
:class="{
|
|
5
|
-
'-ds-touchable':
|
|
5
|
+
'-ds-touchable': touchableDeprecated,
|
|
6
6
|
'-ds-spin': spinning,
|
|
7
7
|
'-ds-flipped-vertical': flippedVertical,
|
|
8
8
|
'-ds-flipped-horizontal': flippedHorizontal,
|
|
@@ -55,7 +55,12 @@ export default defineComponent({
|
|
|
55
55
|
type: Boolean,
|
|
56
56
|
default: false,
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Adds the `-ds-touchable` class, which enlarges the hit area to the
|
|
60
|
+
* deprecated `$DEPRECATED-min-touchable-size`. Still has effect; renamed to flag it
|
|
61
|
+
* for removal so call sites can migrate away from this layout-inflating behavior.
|
|
62
|
+
*/
|
|
63
|
+
touchableDeprecated: {
|
|
59
64
|
type: Boolean,
|
|
60
65
|
default: false,
|
|
61
66
|
},
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
<div v-if="navigationItems.length > 1" class="ds-pagination__items -ds-compact">
|
|
71
71
|
<icon-button
|
|
72
|
+
touchable-deprecated
|
|
72
73
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
73
74
|
:color="ICON_BUTTON_COLORS.NEUTRAL"
|
|
74
75
|
:icon="ICONS.FA_ANGLE_LEFT"
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
</div>
|
|
98
99
|
|
|
99
100
|
<icon-button
|
|
101
|
+
touchable-deprecated
|
|
100
102
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
101
103
|
:color="ICON_BUTTON_COLORS.NEUTRAL"
|
|
102
104
|
:icon="ICONS.FA_ANGLE_RIGHT"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
$touchable-size: 32px;
|
|
2
|
+
|
|
3
|
+
// Enlarge the touch target on touch devices without affecting the layout footprint.
|
|
4
|
+
// The visual element keeps its real size; a transparent ::after extends the hit area.
|
|
5
|
+
// NOTE: the host element must establish a positioning context (e.g. `position: relative`)
|
|
6
|
+
// so the absolutely-positioned ::after anchors to it.
|
|
7
|
+
@mixin touchableHitArea {
|
|
8
|
+
@media (pointer: coarse) {
|
|
9
|
+
&::after {
|
|
10
|
+
content: '';
|
|
11
|
+
height: max(100%, #{$touchable-size});
|
|
12
|
+
left: 50%;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 50%;
|
|
15
|
+
transform: translate(-50%, -50%);
|
|
16
|
+
width: max(100%, #{$touchable-size});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -9,7 +9,7 @@ $icon-l: 32px;
|
|
|
9
9
|
$icon-xl: 48px;
|
|
10
10
|
$icon-xxl: 64px;
|
|
11
11
|
|
|
12
|
-
$min-touchable-size: 40px;
|
|
12
|
+
$DEPRECATED-min-touchable-size: 40px;
|
|
13
13
|
|
|
14
14
|
$animation-fade-in: a-fadeIn 300ms; /* stylelint-disable-line value-keyword-case */
|
|
15
15
|
$animation-spin: a-spinAround 1s infinite linear; /* stylelint-disable-line value-keyword-case */
|