@bethinkpl/design-system 22.2.0 → 22.3.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/.storybook/manager.js +3 -1
- package/dist/design-system.umd.js +3960 -154
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +3 -0
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +3 -0
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +3 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +3 -0
- package/dist/lib/js/components/Chip/Chip.vue.d.ts +3 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.consts.d.ts +26 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +107 -0
- package/dist/lib/js/components/DatePickers/DatePicker/index.d.ts +3 -0
- package/dist/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue.d.ts +268 -0
- package/dist/lib/js/components/DatePickers/DatePickerBox/index.d.ts +2 -0
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +3 -288
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +3 -234
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +3 -0
- package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +6 -2
- package/dist/lib/js/components/Form/Checkbox/Checkbox.vue.d.ts +3 -0
- package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +3 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +3 -0
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +3 -0
- package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +3 -0
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +3 -0
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +3 -0
- package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +3 -0
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +3 -0
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +3 -0
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +3 -0
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +3 -0
- package/dist/lib/js/components/SelectList/SelectList.vue.d.ts +3 -4
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +3 -264
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +3 -8
- package/dist/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue.d.ts +6 -2
- package/dist/lib/js/components/SelectionTile/SelectionTile.vue.d.ts +5 -2
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +3 -0
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +3 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +3 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +3 -0
- package/dist/lib/js/components/Switch/Switch.vue.d.ts +3 -0
- package/dist/lib/js/components/Tile/Tile.consts.d.ts +3 -0
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +3 -0
- package/dist/lib/js/components/Tile/Tile.shared.d.ts +8 -3
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +9 -2
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +3 -0
- package/dist/lib/js/icons/fontawesome.d.ts +3 -0
- package/dist/lib/js/index.d.ts +58 -0
- package/dist/tools/importers/helpers/modifiers.d.ts +9 -0
- package/docs/166.463f1d4f.iframe.bundle.js +2 -0
- package/docs/{39.bfc720d8.iframe.bundle.js → 39.0fa13ab1.iframe.bundle.js} +2 -2
- package/docs/iframe.html +1 -1
- package/docs/index.html +1 -1
- package/docs/main.ec4e5d4f1933fc03f588.manager.bundle.js +1 -0
- package/docs/main.f33ff81a.iframe.bundle.js +2 -0
- package/docs/main.f33ff81a.iframe.bundle.js.LICENSE.txt +1 -0
- package/docs/project.json +1 -1
- package/docs/{runtime~main.b2826aa6.iframe.bundle.js → runtime~main.c8f2837a.iframe.bundle.js} +1 -1
- package/lib/js/components/DatePickers/DatePicker/DatePicker.consts.ts +33 -0
- package/lib/js/components/DatePickers/DatePicker/DatePicker.stories.ts +138 -0
- package/lib/js/components/DatePickers/DatePicker/DatePicker.vue +333 -0
- package/lib/js/components/DatePickers/DatePicker/index.ts +5 -0
- package/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue +291 -0
- package/lib/js/components/DatePickers/DatePickerBox/index.ts +3 -0
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.stories.ts +1 -1
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue +11 -4
- package/lib/js/components/Tile/Tile.consts.ts +6 -0
- package/lib/js/components/Tile/Tile.sb.shared.ts +2 -0
- package/lib/js/components/Tile/Tile.shared.ts +8 -4
- package/lib/js/components/Tile/Tile.vue +10 -0
- package/lib/js/icons/fontawesome.ts +6 -0
- package/lib/js/index.ts +58 -0
- package/package.json +7 -3
- package/docs/531.90dff866.iframe.bundle.js +0 -2
- package/docs/main.115da493.iframe.bundle.js +0 -1
- package/docs/main.44a93c1fb278828c899f.manager.bundle.js +0 -1
- /package/docs/{531.90dff866.iframe.bundle.js.LICENSE.txt → 166.463f1d4f.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{39.bfc720d8.iframe.bundle.js.LICENSE.txt → 39.0fa13ab1.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="ds-datePickerBox"
|
|
4
|
+
:class="{
|
|
5
|
+
'-ds-disabled': state === DATE_PICKER_STATES.DISABLED,
|
|
6
|
+
'-ds-loading': state === DATE_PICKER_STATES.LOADING,
|
|
7
|
+
'-ds-interactive': isInteractive,
|
|
8
|
+
'-ds-warning': color === DATE_PICKER_COLORS.WARNING,
|
|
9
|
+
'-ds-neutral': color === DATE_PICKER_COLORS.NEUTRAL,
|
|
10
|
+
'-ds-isOpen': isOpen,
|
|
11
|
+
}"
|
|
12
|
+
>
|
|
13
|
+
<span v-if="eyebrowText" class="ds-datePickerBox__eyebrow">{{ eyebrowText }}</span>
|
|
14
|
+
<div class="ds-datePickerBox__dateWrapper">
|
|
15
|
+
<ds-icon
|
|
16
|
+
v-if="icon"
|
|
17
|
+
class="ds-datePickerBox__icon"
|
|
18
|
+
:class="{ '-ds-hiddenOnMobile': isIconHiddenOnMobile }"
|
|
19
|
+
:icon="icon"
|
|
20
|
+
:size="ICON_SIZES.XX_SMALL"
|
|
21
|
+
></ds-icon>
|
|
22
|
+
<span class="ds-datePickerBox__date">{{ text }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div v-if="state === DATE_PICKER_STATES.LOADING" class="ds-datePickerBox__loader">
|
|
26
|
+
<ds-icon :icon="ICONS.FAD_SPINNER_THIRD" :size="ICON_SIZES.X_SMALL" spinning />
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<style scoped lang="scss">
|
|
32
|
+
@import '../../../../styles/settings/typography/tokens';
|
|
33
|
+
@import '../../../../styles/settings/colors/tokens';
|
|
34
|
+
@import '../../../../styles/settings/spacings';
|
|
35
|
+
@import '../../../../styles/settings/media-queries';
|
|
36
|
+
@import '../../../../styles/settings/borders';
|
|
37
|
+
@import '../../../../styles/settings/radiuses';
|
|
38
|
+
|
|
39
|
+
@mixin color-scheme(
|
|
40
|
+
$color-eyebrow,
|
|
41
|
+
$color-date,
|
|
42
|
+
$color-icon,
|
|
43
|
+
$color-icon-hovered,
|
|
44
|
+
$color-date-hovered,
|
|
45
|
+
$color-icon-disabled,
|
|
46
|
+
$color-eyebrow-disabled,
|
|
47
|
+
$color-date-disabled,
|
|
48
|
+
$self
|
|
49
|
+
) {
|
|
50
|
+
&.-ds-interactive {
|
|
51
|
+
&:hover {
|
|
52
|
+
#{$self}__icon {
|
|
53
|
+
color: $color-icon-hovered;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#{$self}__date {
|
|
57
|
+
color: $color-date-hovered;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.-ds-disabled {
|
|
63
|
+
#{$self}__eyebrow {
|
|
64
|
+
color: $color-eyebrow-disabled;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#{$self}__date {
|
|
68
|
+
color: $color-date-disabled;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#{$self}__icon {
|
|
72
|
+
color: $color-icon-disabled;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.-ds-isOpen {
|
|
77
|
+
&:hover {
|
|
78
|
+
#{$self}__icon {
|
|
79
|
+
color: $color-icon;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#{$self}__date {
|
|
83
|
+
color: $color-date;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
#{$self}__eyebrow {
|
|
88
|
+
color: $color-eyebrow;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
#{$self}__date {
|
|
92
|
+
color: $color-date;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#{$self}__icon {
|
|
96
|
+
color: $color-icon;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
#{$self}__loader {
|
|
100
|
+
color: $color-icon;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ds-datePickerBox {
|
|
105
|
+
$self: &;
|
|
106
|
+
|
|
107
|
+
border: $border-xs solid transparent;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
min-height: 44px;
|
|
112
|
+
min-width: 76px;
|
|
113
|
+
padding: $space-2xs $space-xs;
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
position: relative;
|
|
116
|
+
|
|
117
|
+
&.-ds-loading,
|
|
118
|
+
&.-ds-interactive {
|
|
119
|
+
background-color: $color-neutral-background-weak;
|
|
120
|
+
border-color: $color-neutral-border-weak;
|
|
121
|
+
border-radius: $radius-s;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&.-ds-disabled {
|
|
125
|
+
background-color: $color-neutral-background-weak-disabled;
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.-ds-isOpen {
|
|
130
|
+
background-color: $color-neutral-background-medium;
|
|
131
|
+
|
|
132
|
+
&:hover {
|
|
133
|
+
background-color: $color-neutral-background-medium;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__eyebrow {
|
|
138
|
+
@include info-xs-default-regular;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&__dateWrapper {
|
|
142
|
+
column-gap: $space-4xs;
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
|
|
145
|
+
/* Prevent text select */
|
|
146
|
+
-webkit-user-select: none; /* Safari */
|
|
147
|
+
user-select: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&__date {
|
|
151
|
+
@include text-s-default-regular;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&__icon {
|
|
155
|
+
&.-ds-hiddenOnMobile {
|
|
156
|
+
display: none;
|
|
157
|
+
|
|
158
|
+
@media (#{breakpoint-s()}) {
|
|
159
|
+
display: flex;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&__loader {
|
|
165
|
+
background-color: inherit;
|
|
166
|
+
display: flex;
|
|
167
|
+
height: calc(100% - $border-s * 2);
|
|
168
|
+
justify-content: center;
|
|
169
|
+
left: $space-5xs;
|
|
170
|
+
position: absolute;
|
|
171
|
+
top: $space-5xs;
|
|
172
|
+
width: calc(100% - $border-s * 2);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.-ds-loading,
|
|
176
|
+
&.-ds-neutral {
|
|
177
|
+
@include color-scheme(
|
|
178
|
+
$color-neutral-text-weak,
|
|
179
|
+
$color-neutral-text-heavy,
|
|
180
|
+
$color-neutral-icon,
|
|
181
|
+
$color-neutral-icon-hovered,
|
|
182
|
+
$color-neutral-text-heavy,
|
|
183
|
+
$color-neutral-icon-disabled,
|
|
184
|
+
$color-neutral-text-disabled,
|
|
185
|
+
$color-neutral-text-heavy-disabled,
|
|
186
|
+
$self
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:not(.-ds-loading) {
|
|
191
|
+
&.-ds-interactive {
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
pointer-events: all;
|
|
194
|
+
|
|
195
|
+
&:hover:not(.-ds-isOpen) {
|
|
196
|
+
background-color: $color-neutral-background-weak-hovered;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.-ds-warning {
|
|
201
|
+
@include color-scheme(
|
|
202
|
+
$color-warning-text,
|
|
203
|
+
$color-warning-text,
|
|
204
|
+
$color-warning-icon,
|
|
205
|
+
$color-warning-icon-hovered,
|
|
206
|
+
$color-warning-text-hovered,
|
|
207
|
+
$color-warning-icon-disabled,
|
|
208
|
+
$color-warning-text-disabled,
|
|
209
|
+
$color-warning-text-disabled,
|
|
210
|
+
$self
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
216
|
+
|
|
217
|
+
<script lang="ts">
|
|
218
|
+
import DsIcon, { ICON_SIZES, ICONS } from '../../Icons/Icon';
|
|
219
|
+
import {
|
|
220
|
+
DATE_PICKER_COLORS,
|
|
221
|
+
DATE_PICKER_STATES,
|
|
222
|
+
DatePickerColors,
|
|
223
|
+
DatePickerStates,
|
|
224
|
+
} from '../DatePicker/DatePicker.consts';
|
|
225
|
+
import { PropType, toRaw } from 'vue';
|
|
226
|
+
|
|
227
|
+
export default {
|
|
228
|
+
name: 'DatePickerBox',
|
|
229
|
+
components: {
|
|
230
|
+
DsIcon,
|
|
231
|
+
},
|
|
232
|
+
props: {
|
|
233
|
+
isInteractive: {
|
|
234
|
+
type: Boolean,
|
|
235
|
+
default: true,
|
|
236
|
+
},
|
|
237
|
+
placeholder: {
|
|
238
|
+
type: String,
|
|
239
|
+
default: 'Ustaw',
|
|
240
|
+
},
|
|
241
|
+
date: {
|
|
242
|
+
type: Date,
|
|
243
|
+
default: null,
|
|
244
|
+
},
|
|
245
|
+
icon: {
|
|
246
|
+
type: Object,
|
|
247
|
+
default: null,
|
|
248
|
+
validate: (icon) => icon === null || Object.values(ICONS).includes(toRaw(icon)),
|
|
249
|
+
},
|
|
250
|
+
isIconHiddenOnMobile: {
|
|
251
|
+
type: Boolean,
|
|
252
|
+
default: false,
|
|
253
|
+
},
|
|
254
|
+
state: {
|
|
255
|
+
type: (String as PropType<DatePickerStates>) || null,
|
|
256
|
+
default: DATE_PICKER_STATES.DEFAULT,
|
|
257
|
+
},
|
|
258
|
+
color: {
|
|
259
|
+
type: String as PropType<DatePickerColors>,
|
|
260
|
+
default: DATE_PICKER_COLORS.NEUTRAL,
|
|
261
|
+
},
|
|
262
|
+
eyebrowText: {
|
|
263
|
+
type: String,
|
|
264
|
+
default: '',
|
|
265
|
+
},
|
|
266
|
+
isOpen: {
|
|
267
|
+
type: Boolean,
|
|
268
|
+
default: false,
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
data() {
|
|
272
|
+
return {
|
|
273
|
+
ICONS: Object.freeze(ICONS),
|
|
274
|
+
ICON_SIZES: Object.freeze(ICON_SIZES),
|
|
275
|
+
DATE_PICKER_STATES: Object.freeze(DATE_PICKER_STATES),
|
|
276
|
+
DATE_PICKER_COLORS: Object.freeze(DATE_PICKER_COLORS),
|
|
277
|
+
};
|
|
278
|
+
},
|
|
279
|
+
computed: {
|
|
280
|
+
text() {
|
|
281
|
+
if (this.date) {
|
|
282
|
+
return this.date.toLocaleDateString(undefined, {
|
|
283
|
+
month: 'short',
|
|
284
|
+
day: '2-digit',
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
return this.placeholder;
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
</script>
|
|
@@ -59,8 +59,8 @@ const argTypes = {
|
|
|
59
59
|
control: {
|
|
60
60
|
type: 'select',
|
|
61
61
|
options: Object.values(OVERLAY_HEADER_BORDER_COLORS),
|
|
62
|
-
defaultValue: OVERLAY_HEADER_BORDER_COLORS.NEUTRAL_GHOST,
|
|
63
62
|
},
|
|
63
|
+
defaultValue: OVERLAY_HEADER_BORDER_COLORS.NEUTRAL_GHOST,
|
|
64
64
|
},
|
|
65
65
|
} as ArgTypes;
|
|
66
66
|
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
<slot name="titleLeading" />
|
|
31
31
|
</div>
|
|
32
32
|
<div
|
|
33
|
+
v-if="title || shortTitle"
|
|
33
34
|
class="ds-overlayHeader__titleWrapper"
|
|
34
35
|
:title="title"
|
|
35
36
|
:class="{ '-ds-interactive': isTitleInteractive }"
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
@import '../../../../styles/settings/spacings';
|
|
101
102
|
@import '../../../../styles/settings/media-queries';
|
|
102
103
|
@import '../../../../styles/settings/colors/tokens';
|
|
104
|
+
@import '../../../../styles/settings/shadows';
|
|
103
105
|
@import '../../../../styles/settings/typography/tokens';
|
|
104
106
|
@import '../../../../styles/mixins/flex-overflow-mask';
|
|
105
107
|
|
|
@@ -107,6 +109,7 @@
|
|
|
107
109
|
align-items: center;
|
|
108
110
|
background: $color-neutral-background;
|
|
109
111
|
border-bottom: 2px solid $color-neutral-border-ghost;
|
|
112
|
+
box-shadow: $shadow-s;
|
|
110
113
|
display: flex;
|
|
111
114
|
padding: $space-2xs $space-3xs $space-2xs 0;
|
|
112
115
|
|
|
@@ -162,14 +165,19 @@
|
|
|
162
165
|
&__main {
|
|
163
166
|
align-items: center;
|
|
164
167
|
display: flex;
|
|
168
|
+
gap: $space-2xs;
|
|
169
|
+
// title is required, but in some edge-cases we don't render it. We need to set min-height to avoid jumping
|
|
170
|
+
// Keep value in sync with &__title line-height
|
|
171
|
+
min-height: $typography-line-height-s;
|
|
165
172
|
}
|
|
166
173
|
|
|
167
174
|
&__titleLeading {
|
|
168
175
|
display: flex;
|
|
169
|
-
margin-right: $space-2xs;
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
&__titleWrapper {
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
|
|
173
181
|
&.-ds-interactive {
|
|
174
182
|
cursor: pointer;
|
|
175
183
|
}
|
|
@@ -202,9 +210,8 @@
|
|
|
202
210
|
@include flexOverflowMask($color-neutral-background, 20px);
|
|
203
211
|
|
|
204
212
|
display: flex;
|
|
205
|
-
// flex-shrink:
|
|
206
|
-
flex-shrink:
|
|
207
|
-
margin-left: $space-2xs;
|
|
213
|
+
// flex-shrink: 100000 is big enough, so the title will not shrink
|
|
214
|
+
flex-shrink: 100000;
|
|
208
215
|
}
|
|
209
216
|
|
|
210
217
|
&__titleTrailing {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Value } from '../../utils/type.utils';
|
|
2
|
+
|
|
1
3
|
export const TILE_COLORS = {
|
|
2
4
|
NEUTRAL: 'neutral',
|
|
3
5
|
NEUTRAL_WEAK: 'neutralWeak',
|
|
@@ -8,8 +10,12 @@ export const TILE_COLORS = {
|
|
|
8
10
|
INFO: 'info',
|
|
9
11
|
} as const;
|
|
10
12
|
|
|
13
|
+
export type TileColors = Value<typeof TILE_COLORS>;
|
|
14
|
+
|
|
11
15
|
export const TILE_STATES = {
|
|
12
16
|
DEFAULT: 'default',
|
|
13
17
|
DISABLED: 'disabled',
|
|
14
18
|
LOADING: 'loading',
|
|
15
19
|
} as const;
|
|
20
|
+
|
|
21
|
+
export type TileStates = Value<typeof TILE_STATES>;
|
|
@@ -10,6 +10,7 @@ export const template = (componentTag: string) => `
|
|
|
10
10
|
:eyebrow-text="eyebrowText"
|
|
11
11
|
:icon-left="ICONS[iconLeft]"
|
|
12
12
|
:icon-right="ICONS[iconRight]"
|
|
13
|
+
:is-icon-right-hidden-on-mobile="isIconRightHiddenOnMobile"
|
|
13
14
|
:interactive="interactive"
|
|
14
15
|
:is-eyebrow-text-uppercase="isEyebrowTextUppercase"
|
|
15
16
|
:state="state"
|
|
@@ -25,6 +26,7 @@ export const args = {
|
|
|
25
26
|
interactive: true,
|
|
26
27
|
iconLeft: null,
|
|
27
28
|
iconRight: null,
|
|
29
|
+
isIconRightHiddenOnMobile: false,
|
|
28
30
|
text: 'this is a text text',
|
|
29
31
|
eyebrowText: 'this is an eyebrowText text',
|
|
30
32
|
additionalText: '',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toRaw } from 'vue';
|
|
1
|
+
import { PropType, toRaw } from 'vue';
|
|
2
2
|
import { ICONS } from '../Icons/Icon';
|
|
3
|
-
import { TILE_COLORS, TILE_STATES } from './Tile.consts';
|
|
3
|
+
import { TILE_COLORS, TILE_STATES, TileColors, TileStates } from './Tile.consts';
|
|
4
4
|
import { Value } from '../../utils/type.utils';
|
|
5
5
|
|
|
6
6
|
export const props = {
|
|
@@ -22,6 +22,10 @@ export const props = {
|
|
|
22
22
|
return Object.values(ICONS).includes(toRaw(iconRight));
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
+
isIconRightHiddenOnMobile: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
25
29
|
text: {
|
|
26
30
|
type: String,
|
|
27
31
|
required: true,
|
|
@@ -35,7 +39,7 @@ export const props = {
|
|
|
35
39
|
default: null,
|
|
36
40
|
},
|
|
37
41
|
color: {
|
|
38
|
-
type: String
|
|
42
|
+
type: String as PropType<TileColors>,
|
|
39
43
|
default: TILE_COLORS.NEUTRAL,
|
|
40
44
|
validator(color) {
|
|
41
45
|
return Object.values(TILE_COLORS).includes(color);
|
|
@@ -46,7 +50,7 @@ export const props = {
|
|
|
46
50
|
default: false,
|
|
47
51
|
},
|
|
48
52
|
state: {
|
|
49
|
-
type: String
|
|
53
|
+
type: String as PropType<TileStates>,
|
|
50
54
|
default: TILE_STATES.DEFAULT,
|
|
51
55
|
validator(value: Value<typeof TILE_STATES>) {
|
|
52
56
|
return Object.values(TILE_STATES).includes(value);
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
<ds-icon
|
|
29
29
|
v-else-if="iconRight"
|
|
30
30
|
class="ds-tile__iconRight"
|
|
31
|
+
:class="{ '-ds-hiddenOnMobile': isIconRightHiddenOnMobile }"
|
|
31
32
|
:icon="iconRight"
|
|
32
33
|
:size="ICON_SIZES.SMALL"
|
|
33
34
|
/>
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
@import '../../../styles/settings/radiuses';
|
|
44
45
|
@import '../../../styles/settings/colors/tokens';
|
|
45
46
|
@import '../../../styles/settings/typography/tokens';
|
|
47
|
+
@import '../../../styles/settings/media-queries';
|
|
46
48
|
|
|
47
49
|
$tile-colors: (
|
|
48
50
|
'neutral': (
|
|
@@ -263,6 +265,14 @@ $tile-colors: (
|
|
|
263
265
|
|
|
264
266
|
&__iconRight {
|
|
265
267
|
margin-left: $space-xs;
|
|
268
|
+
|
|
269
|
+
&.-ds-hiddenOnMobile {
|
|
270
|
+
display: none;
|
|
271
|
+
|
|
272
|
+
@media #{breakpoint-s()} {
|
|
273
|
+
display: block;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
266
276
|
}
|
|
267
277
|
|
|
268
278
|
&.-ds-interactive:not(.-ds-disabled):not(.-ds-loading) {
|
|
@@ -143,6 +143,8 @@ import { faWindowMaximize } from '@fortawesome/pro-regular-svg-icons/faWindowMax
|
|
|
143
143
|
import { faXmark } from '@fortawesome/pro-regular-svg-icons/faXmark';
|
|
144
144
|
import { faCommentsQuestion } from '@fortawesome/pro-regular-svg-icons/faCommentsQuestion';
|
|
145
145
|
import { faCommentsQuestionCheck } from '@fortawesome/pro-regular-svg-icons/faCommentsQuestionCheck';
|
|
146
|
+
import { faCalendarClock } from '@fortawesome/pro-regular-svg-icons/faCalendarClock';
|
|
147
|
+
import { faFileCheck } from '@fortawesome/pro-regular-svg-icons/faFileCheck';
|
|
146
148
|
import { faArrowDown as fasArrowDown } from '@fortawesome/pro-solid-svg-icons/faArrowDown';
|
|
147
149
|
import { faArrowLeft as fasArrowLeft } from '@fortawesome/pro-solid-svg-icons/faArrowLeft';
|
|
148
150
|
import { faArrowRight as fasArrowRight } from '@fortawesome/pro-solid-svg-icons/faArrowRight';
|
|
@@ -156,6 +158,7 @@ import { faCheck as fasCheck } from '@fortawesome/pro-solid-svg-icons/faCheck';
|
|
|
156
158
|
import { faCircleCheck as fasCircleCheck } from '@fortawesome/pro-solid-svg-icons/faCircleCheck';
|
|
157
159
|
import { faCirclePlay as fasCirclePlay } from '@fortawesome/pro-solid-svg-icons/faCirclePlay';
|
|
158
160
|
import { faComment as fasComment } from '@fortawesome/pro-solid-svg-icons/faComment';
|
|
161
|
+
import { faCompass as fasCompass } from '@fortawesome/pro-solid-svg-icons/faCompass';
|
|
159
162
|
import { faExclamation as fasExclamation } from '@fortawesome/pro-solid-svg-icons/faExclamation';
|
|
160
163
|
import { faFileLines as fasFileLines } from '@fortawesome/pro-solid-svg-icons/faFileLines';
|
|
161
164
|
import { faFilePen as fasFilePen } from '@fortawesome/pro-solid-svg-icons/faFilePen';
|
|
@@ -221,6 +224,7 @@ export const FONTAWESOME_ICONS = {
|
|
|
221
224
|
FA_BOX: faBox,
|
|
222
225
|
FA_BOX_ARCHIVE: faBoxArchive,
|
|
223
226
|
FA_CALENDAR: faCalendar,
|
|
227
|
+
FA_CALENDAR_CLOCK: faCalendarClock,
|
|
224
228
|
FA_CALENDAR_CIRCLE_EXCLAMATION: faCalendarCircleExclamation,
|
|
225
229
|
FA_CALENDAR_CHECK: faCalendarCheck,
|
|
226
230
|
FA_CALENDAR_DAY: faCalendarDay,
|
|
@@ -262,6 +266,7 @@ export const FONTAWESOME_ICONS = {
|
|
|
262
266
|
FA_COMMENTS: faComments,
|
|
263
267
|
FA_COMMENTS_QUESTION: faCommentsQuestion,
|
|
264
268
|
FA_COMMENTS_QUESTION_CHECK: faCommentsQuestionCheck,
|
|
269
|
+
FA_COMPASS_SOLID: fasCompass,
|
|
265
270
|
FA_COMPRESS: faCompress,
|
|
266
271
|
FA_COPY: faCopy,
|
|
267
272
|
FA_CREDIT_CARD: faCreditCard,
|
|
@@ -277,6 +282,7 @@ export const FONTAWESOME_ICONS = {
|
|
|
277
282
|
FA_FACE_MEH: faFaceMeh,
|
|
278
283
|
FA_FACE_SMILE: faFaceSmile,
|
|
279
284
|
FA_FACEBOOK: faFacebook,
|
|
285
|
+
FA_FILE_CHECK: faFileCheck,
|
|
280
286
|
FA_FILE_INVOICE_DOLLAR: faFileInvoiceDollar,
|
|
281
287
|
FA_FILE_LINES: faFileLines,
|
|
282
288
|
FA_FILE_LINES_SOLID: fasFileLines,
|
package/lib/js/index.ts
CHANGED
|
@@ -1,99 +1,157 @@
|
|
|
1
1
|
export { default as BadgeScore } from './components/BadgeScore';
|
|
2
|
+
export { default as DsBadgeScore } from './components/BadgeScore';
|
|
2
3
|
export * from './components/BadgeScore/BadgeScore.consts';
|
|
3
4
|
export { default as Banner } from './components/Banner';
|
|
5
|
+
export { default as DsBanner } from './components/Banner';
|
|
4
6
|
export * from './components/Banner/Banner.consts';
|
|
5
7
|
export { default as Button } from './components/Buttons/Button';
|
|
8
|
+
export { default as DsButton } from './components/Buttons/Button';
|
|
6
9
|
export * from './components/Buttons/Button/Button.consts';
|
|
7
10
|
export { default as ToggleButton } from './components/Toggles/ToggleButton';
|
|
11
|
+
export { default as DsToggleButton } from './components/Toggles/ToggleButton';
|
|
8
12
|
export * from './components/Toggles/ToggleButton/ToggleButton.consts';
|
|
9
13
|
export { default as Card } from './components/Cards/Card/';
|
|
14
|
+
export { default as DsCard } from './components/Cards/Card/';
|
|
10
15
|
export { default as CardExpandable } from './components/Cards/CardExpandable/';
|
|
16
|
+
export { default as DsCardExpandable } from './components/Cards/CardExpandable/';
|
|
17
|
+
export { default as DatePicker } from './components/DatePickers/DatePicker';
|
|
18
|
+
export { default as DsDatePicker } from './components/DatePickers/DatePicker';
|
|
19
|
+
export * from './components/DatePickers/DatePicker';
|
|
11
20
|
export { default as Divider } from './components/Divider';
|
|
21
|
+
export { default as DsDivider } from './components/Divider';
|
|
12
22
|
export * from './components/Divider/Divider.consts';
|
|
13
23
|
export { default as FeatureIcon } from './components/Icons/FeatureIcon';
|
|
24
|
+
export { default as DsFeatureIcon } from './components/Icons/FeatureIcon';
|
|
14
25
|
export * from './components/Icons/FeatureIcon/FeatureIcon.consts';
|
|
15
26
|
export { default as Icon } from './components/Icons/Icon';
|
|
27
|
+
export { default as DsIcon } from './components/Icons/Icon';
|
|
16
28
|
export * from './components/Icons/Icon/Icon.consts';
|
|
17
29
|
export { default as IconButton } from './components/Buttons/IconButton';
|
|
30
|
+
export { default as DsIconButton } from './components/Buttons/IconButton';
|
|
18
31
|
export * from './components/Buttons/IconButton/IconButton.consts';
|
|
19
32
|
export { default as Modal } from './components/Modal';
|
|
20
33
|
export { default as DsModal } from './components/Modals/Modal';
|
|
21
34
|
export * from './components/Modals/Modal/Modal.consts';
|
|
22
35
|
export { default as DsModalDialog } from './components/Modals/ModalDialog';
|
|
23
36
|
export { default as NumberInCircle } from './components/NumberInCircle';
|
|
37
|
+
export { default as DsNumberInCircle } from './components/NumberInCircle';
|
|
24
38
|
export * from './components/NumberInCircle/NumberInCircle.consts';
|
|
25
39
|
export { default as TabItem } from './components/TabItem';
|
|
40
|
+
export { default as DsTabItem } from './components/TabItem';
|
|
26
41
|
export * from './components/TabItem/TabItem.consts';
|
|
27
42
|
export { default as Tile } from './components/Tile';
|
|
43
|
+
export { default as DsTile } from './components/Tile';
|
|
28
44
|
export * from './components/Tile/Tile.consts';
|
|
29
45
|
export { default as AccessStatus } from './components/Statuses/AccessStatus/';
|
|
46
|
+
export { default as DsAccessStatus } from './components/Statuses/AccessStatus/';
|
|
30
47
|
export { default as BlockadeStatus } from './components/Statuses/BlockadeStatus/';
|
|
48
|
+
export { default as DsBlockadeStatus } from './components/Statuses/BlockadeStatus/';
|
|
31
49
|
export * from './consts/colors';
|
|
32
50
|
export { default as SurveyToggle } from './components/SurveyToggle/';
|
|
51
|
+
export { default as DsSurveyToggle } from './components/SurveyToggle/';
|
|
33
52
|
export * from './components/SurveyToggle/SurveyToggle.consts';
|
|
34
53
|
export { default as SurveyQuestionScale } from './components/SurveyQuestions/SurveyQuestionScale/';
|
|
54
|
+
export { default as DsSurveyQuestionScale } from './components/SurveyQuestions/SurveyQuestionScale/';
|
|
35
55
|
export { default as SurveyQuestionOpenEnded } from './components/SurveyQuestions/SurveyQuestionOpenEnded/';
|
|
56
|
+
export { default as DsSurveyQuestionOpenEnded } from './components/SurveyQuestions/SurveyQuestionOpenEnded/';
|
|
36
57
|
export * from './components/SurveyQuestions/SurveyQuestion.consts';
|
|
37
58
|
export * from './components/SurveyQuestions/SurveyQuestion.domain';
|
|
38
59
|
export { default as SectionHeader } from './components/Headers/SectionHeader';
|
|
60
|
+
export { default as DsSectionHeader } from './components/Headers/SectionHeader';
|
|
39
61
|
export * from './components/Headers/SectionHeader/SectionHeader.consts';
|
|
40
62
|
export { default as PageHeader } from './components/Headers/PageHeader';
|
|
63
|
+
export { default as DsPageHeader } from './components/Headers/PageHeader';
|
|
41
64
|
export * from './components/Headers/PageHeader/PageHeader.consts';
|
|
42
65
|
export { default as SectionTitle } from './components/SectionTitle/SectionTitle.vue';
|
|
66
|
+
export { default as DsSectionTitle } from './components/SectionTitle/SectionTitle.vue';
|
|
43
67
|
export * from './components/SectionTitle/SectionTitle.consts';
|
|
44
68
|
export { default as Drawer } from './components/Drawer';
|
|
69
|
+
export { default as DsDrawer } from './components/Drawer';
|
|
45
70
|
export * from './components/Drawer/Drawer.consts';
|
|
46
71
|
export { default as DrawerContent } from './components/Drawer/DrawerContent/DrawerContent.vue';
|
|
72
|
+
export { default as DsDrawerContent } from './components/Drawer/DrawerContent/DrawerContent.vue';
|
|
47
73
|
export { default as DrawerDivider } from './components/Drawer/DrawerDivider/DrawerDivider.vue';
|
|
74
|
+
export { default as DsDrawerDivider } from './components/Drawer/DrawerDivider/DrawerDivider.vue';
|
|
48
75
|
export { default as DrawerHeader } from './components/Drawer/DrawerHeader/DrawerHeader.vue';
|
|
76
|
+
export { default as DsDrawerHeader } from './components/Drawer/DrawerHeader/DrawerHeader.vue';
|
|
49
77
|
export * from './components/Drawer/DrawerHeader/DrawerHeader.consts';
|
|
50
78
|
export { default as DrawerListItem } from './components/Drawer/DrawerListItem/DrawerListItem.vue';
|
|
79
|
+
export { default as DsDrawerListItem } from './components/Drawer/DrawerListItem/DrawerListItem.vue';
|
|
51
80
|
export { default as DrawerListItemGroup } from './components/Drawer/DrawerListItemGroup/DrawerListItemGroup.vue';
|
|
81
|
+
export { default as DsDrawerListItemGroup } from './components/Drawer/DrawerListItemGroup/DrawerListItemGroup.vue';
|
|
52
82
|
export * from './components/Drawer/DrawerListItem/DrawerListItem.consts';
|
|
53
83
|
export { default as DrawerTile } from './components/Drawer/DrawerTile/DrawerTile.vue';
|
|
84
|
+
export { default as DsDrawerTile } from './components/Drawer/DrawerTile/DrawerTile.vue';
|
|
54
85
|
export { default as DrawerSection } from './components/Drawer/DrawerSection/DrawerSection.vue';
|
|
86
|
+
export { default as DsDrawerSection } from './components/Drawer/DrawerSection/DrawerSection.vue';
|
|
55
87
|
export { default as OutlineItem } from './components/Outline/OutlineItem';
|
|
88
|
+
export { default as DsOutlineItem } from './components/Outline/OutlineItem';
|
|
56
89
|
export * from './components/Outline/OutlineItem/OutlineItem.consts';
|
|
57
90
|
export { default as OutlineDivider } from './components/Outline/OutlineDivider';
|
|
91
|
+
export { default as DsOutlineDivider } from './components/Outline/OutlineDivider';
|
|
58
92
|
export { default as OutlineSectionHeader } from './components/Outline/OutlineSectionHeader';
|
|
93
|
+
export { default as DsOutlineSectionHeader } from './components/Outline/OutlineSectionHeader';
|
|
59
94
|
export { default as Chip } from './components/Chip';
|
|
95
|
+
export { default as DsChip } from './components/Chip';
|
|
60
96
|
export * from './components/Chip/Chip.consts';
|
|
61
97
|
export { default as CounterToggle } from './components/Toggles/CounterToggle';
|
|
98
|
+
export { default as DsCounterToggle } from './components/Toggles/CounterToggle';
|
|
62
99
|
export * from './components/Toggles/CounterToggle/CounterToggle.consts';
|
|
63
100
|
export { default as SelectList } from './components/SelectList/SelectList.vue';
|
|
101
|
+
export { default as DsSelectList } from './components/SelectList/SelectList.vue';
|
|
64
102
|
export { default as SelectListItem } from './components/SelectList/SelectListItem/SelectListItem.vue';
|
|
103
|
+
export { default as DsSelectListItem } from './components/SelectList/SelectListItem/SelectListItem.vue';
|
|
65
104
|
export { default as SelectListItemDivider } from './components/SelectList/SelectListItemDivider/SelectListItemDivider.vue';
|
|
105
|
+
export { default as DsSelectListItemDivider } from './components/SelectList/SelectListItemDivider/SelectListItemDivider.vue';
|
|
66
106
|
export { default as SelectListItemToggle } from './components/SelectList/SelectListItemToggle/SelectListItemToggle.vue';
|
|
107
|
+
export { default as DsSelectListItemToggle } from './components/SelectList/SelectListItemToggle/SelectListItemToggle.vue';
|
|
67
108
|
export { default as SelectListItemTile } from './components/SelectList/SelectListItemTile/SelectListItemTile.vue';
|
|
109
|
+
export { default as DsSelectListItemTile } from './components/SelectList/SelectListItemTile/SelectListItemTile.vue';
|
|
68
110
|
export { default as SelectListSectionTitle } from './components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue';
|
|
111
|
+
export { default as DsSelectListSectionTitle } from './components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue';
|
|
69
112
|
export * from './components/SelectList/SelectListItem/SelectListItem.consts';
|
|
70
113
|
export { default as SelectionTile } from './components/SelectionTile';
|
|
114
|
+
export { default as DsSelectionTile } from './components/SelectionTile';
|
|
71
115
|
export * from './components/SelectionTile';
|
|
72
116
|
export { default as LoadingBar } from './components/LoadingBar';
|
|
117
|
+
export { default as DsLoadingBar } from './components/LoadingBar';
|
|
73
118
|
export * from './components/LoadingBar';
|
|
74
119
|
export { default as PopOver } from './components/PopOver';
|
|
120
|
+
export { default as DsPopOver } from './components/PopOver';
|
|
75
121
|
export * from './components/PopOver/PopOver.consts';
|
|
76
122
|
export { default as Dropdown } from './components/Dropdown';
|
|
123
|
+
export { default as DsDropdown } from './components/Dropdown';
|
|
77
124
|
export * from './components/Dropdown/Dropdown.consts';
|
|
78
125
|
export { default as ProgressBar } from './components/ProgressBar';
|
|
126
|
+
export { default as DsProgressBar } from './components/ProgressBar';
|
|
79
127
|
export * from './components/ProgressBar/ProgressBar.consts';
|
|
80
128
|
export { default as ProgressDonutChart } from './components/ProgressDonutChart';
|
|
129
|
+
export { default as DsProgressDonutChart } from './components/ProgressDonutChart';
|
|
81
130
|
export * from './components/ProgressDonutChart/ProgressDonutChart.consts';
|
|
82
131
|
export { default as IconText } from './components/IconText';
|
|
132
|
+
export { default as DsIconText } from './components/IconText';
|
|
83
133
|
export * from './components/IconText/IconText.consts';
|
|
84
134
|
export { default as Pagination } from './components/Pagination';
|
|
135
|
+
export { default as DsPagination } from './components/Pagination';
|
|
85
136
|
export * from './components/Pagination/Pagination.consts';
|
|
86
137
|
export { default as OverlayHeader } from './components/Headers/OverlayHeader';
|
|
138
|
+
export { default as DsOverlayHeader } from './components/Headers/OverlayHeader';
|
|
87
139
|
export * from './components/Headers/OverlayHeader/OverlayHeader.consts';
|
|
88
140
|
export { default as Well } from './components/Well';
|
|
141
|
+
export { default as DsWell } from './components/Well';
|
|
89
142
|
export * from './components/Well/Well.consts';
|
|
90
143
|
export { default as ThreeColumnLayout } from './components/Layouts/ThreeColumnLayout';
|
|
144
|
+
export { default as DsThreeColumnLayout } from './components/Layouts/ThreeColumnLayout';
|
|
91
145
|
export * from './components/Layouts/ThreeColumnLayout/ThreeColumnLayout.consts';
|
|
92
146
|
export { default as RichListItem } from './components/RichList/RichListItem';
|
|
147
|
+
export { default as DsRichListItem } from './components/RichList/RichListItem';
|
|
93
148
|
export * from './components/RichList/RichListItem/RichListItem.consts';
|
|
94
149
|
export { default as BasicRichListItem } from './components/RichList/BasicRichListItem';
|
|
150
|
+
export { default as DsBasicRichListItem } from './components/RichList/BasicRichListItem';
|
|
95
151
|
export { default as GroupRichListItem } from './components/RichList/GroupRichListItem';
|
|
152
|
+
export { default as DsGroupRichListItem } from './components/RichList/GroupRichListItem';
|
|
96
153
|
export { default as Switch } from './components/Switch';
|
|
154
|
+
export { default as DsSwitch } from './components/Switch';
|
|
97
155
|
export * from './components/Switch/Switch.consts';
|
|
98
156
|
export { default as DsTooltip } from './components/Tooltip';
|
|
99
157
|
export * from './components/Tooltip/Tooltip.consts';
|