@it-enterprise/forcebpm-ui-kit 1.0.2-beta.3 → 1.0.2-beta.30

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 (86) hide show
  1. package/README.md +81 -65
  2. package/index.js +48 -1
  3. package/package.json +35 -15
  4. package/plugin.js +117 -0
  5. package/src/FActionSnackbar.vue +107 -0
  6. package/src/FAvatar.vue +10 -8
  7. package/src/{FConfirmModal.vue → FConfirmDialog.vue} +38 -28
  8. package/src/FContextMenu.vue +87 -0
  9. package/src/FDialog.vue +264 -0
  10. package/src/FLangSwitcher.vue +47 -0
  11. package/src/FNoData.vue +80 -0
  12. package/src/FNotify.vue +257 -0
  13. package/src/FPagination.vue +163 -0
  14. package/src/FPreLoader.vue +105 -0
  15. package/src/FSearchPanel.vue +191 -0
  16. package/src/FShare.vue +134 -0
  17. package/src/FTruncate.vue +121 -0
  18. package/src/FUserGroupPicker.vue +634 -0
  19. package/src/FUserRoles.vue +195 -0
  20. package/src/assets/fonts/ProximaNova-Bold.woff +0 -0
  21. package/src/assets/fonts/ProximaNova-Bold.woff2 +0 -0
  22. package/src/assets/fonts/ProximaNova-Regular.woff +0 -0
  23. package/src/assets/fonts/ProximaNova-Regular.woff2 +0 -0
  24. package/src/assets/fonts/ProximaNova-Semibold.woff +0 -0
  25. package/src/assets/fonts/ProximaNova-Semibold.woff2 +0 -0
  26. package/src/assets/fonts/loadFonts.js +55 -0
  27. package/src/assets/icons/bell-mute.svg +4 -0
  28. package/src/assets/icons/bell.svg +3 -0
  29. package/src/assets/icons/check.svg +3 -0
  30. package/src/assets/icons/checkbox-false.svg +3 -0
  31. package/src/assets/icons/checkbox-true.svg +4 -0
  32. package/src/assets/icons/chevron.svg +3 -0
  33. package/src/assets/icons/color-radio-active.svg +4 -0
  34. package/src/assets/icons/color-radio.svg +3 -0
  35. package/src/assets/icons/ctx-arrow.svg +3 -0
  36. package/src/assets/icons/ctx-delete.svg +6 -0
  37. package/src/assets/icons/ctx-link.svg +5 -0
  38. package/src/assets/icons/ctx-more.svg +5 -0
  39. package/src/assets/icons/ctx-pen.svg +4 -0
  40. package/src/assets/icons/delete.svg +6 -0
  41. package/src/assets/icons/dots.svg +5 -0
  42. package/src/assets/icons/filter.svg +3 -0
  43. package/src/assets/icons/folder.svg +3 -0
  44. package/src/assets/icons/open-envelope.svg +6 -0
  45. package/src/assets/icons/pass-eye-close.svg +3 -0
  46. package/src/assets/icons/pass-eye-open.svg +4 -0
  47. package/src/assets/icons/plus-solid.svg +4 -0
  48. package/src/assets/icons/plus.svg +4 -0
  49. package/src/assets/icons/radio-false.svg +3 -0
  50. package/src/assets/icons/radio-true.svg +4 -0
  51. package/src/assets/icons/search.svg +3 -0
  52. package/src/assets/icons/sort-solid.svg +3 -0
  53. package/src/assets/icons/sort.svg +6 -0
  54. package/src/assets/icons/star-line.svg +3 -0
  55. package/src/assets/icons/star.svg +3 -0
  56. package/src/assets/icons/times.svg +4 -0
  57. package/src/assets/images/0.gif +0 -0
  58. package/src/assets/images/0.svg +4 -0
  59. package/src/assets/images/3.svg +4 -0
  60. package/src/assets/images/4.svg +4 -0
  61. package/src/assets/images/5.svg +4 -0
  62. package/src/assets/scss/buttons.scss +60 -0
  63. package/src/assets/scss/card.scss +11 -0
  64. package/src/assets/scss/expansion.scss +45 -0
  65. package/src/assets/scss/icons.scss +273 -0
  66. package/src/assets/scss/index.scss +10 -0
  67. package/src/assets/scss/input.scss +344 -0
  68. package/src/assets/scss/overlay.scss +69 -0
  69. package/src/assets/scss/skeleton.scss +22 -0
  70. package/src/assets/scss/tables.scss +143 -0
  71. package/src/assets/scss/tabs.scss +42 -0
  72. package/src/assets/scss/utilities.scss +167 -0
  73. package/src/f-date-picker/FDatePicker.vue +322 -0
  74. package/src/f-date-picker/FMenuDatePicker.vue +337 -0
  75. package/src/f-date-picker/FTextFieldDate.vue +498 -0
  76. package/src/f-toolbar/FFilterPanel.vue +62 -0
  77. package/src/f-toolbar/FSortPanel.vue +55 -0
  78. package/src/f-toolbar/FTabPanel.vue +123 -0
  79. package/src/f-toolbar/FToolbar.vue +131 -0
  80. package/src/f-toolbar/FViewerPanel.vue +71 -0
  81. package/src/forcebpmIcon.js +69 -0
  82. package/src/locales/en.json +115 -0
  83. package/src/locales/index.js +7 -0
  84. package/src/locales/ru.json +116 -0
  85. package/src/locales/uk.json +116 -0
  86. package/src/utils/color.js +38 -0
@@ -0,0 +1,167 @@
1
+ // Font size utilities
2
+ .fs-08 {
3
+ font-size: 0.8em;
4
+ }
5
+ .fs-09 {
6
+ font-size: 0.9em;
7
+ }
8
+ .fs-1 {
9
+ font-size: 1em;
10
+ }
11
+ .fs-11 {
12
+ font-size: 1.1em;
13
+ }
14
+ .fs-12 {
15
+ font-size: 1.2em;
16
+ }
17
+ .fs-13 {
18
+ font-size: 1.3em;
19
+ }
20
+ .fs-14 {
21
+ font-size: 1.4em;
22
+ }
23
+ .fs-15 {
24
+ font-size: 1.5em;
25
+ }
26
+
27
+ // Line height utilities
28
+ .lh-09 {
29
+ line-height: 0.9em;
30
+ }
31
+ .lh-1 {
32
+ line-height: 1em;
33
+ }
34
+ .lh-11 {
35
+ line-height: 1.1em;
36
+ }
37
+ .lh-12 {
38
+ line-height: 1.2em;
39
+ }
40
+ .lh-13 {
41
+ line-height: 1.3em;
42
+ }
43
+ .lh-14 {
44
+ line-height: 1.4em;
45
+ }
46
+ .lh-15 {
47
+ line-height: 1.5em;
48
+ }
49
+ .lh-16 {
50
+ line-height: 1.6em;
51
+ }
52
+
53
+ // Width utilities
54
+ .fill-width {
55
+ width: 100%;
56
+ }
57
+
58
+ // Custom scrollbar styles
59
+ .f-scrollbar-y {
60
+ overflow-y: auto;
61
+ overflow-x: hidden;
62
+ height: inherit;
63
+ &::-webkit-scrollbar {
64
+ width: 6px;
65
+ }
66
+ &::-webkit-scrollbar-track {
67
+ border-radius: 10.8px;
68
+ box-shadow: inset 0 0 6px rgba(var(--v-theme-disabled));
69
+ }
70
+ &::-webkit-scrollbar-thumb {
71
+ border-top: 0px solid rgba(0, 0, 0, 0);
72
+ border-bottom: 0px solid rgba(0, 0, 0, 0);
73
+ background-clip: padding-box;
74
+ border-radius: 10.8px;
75
+ height: 50px;
76
+ background-color: rgba(var(--v-theme-disabled));
77
+ &:hover {
78
+ background-color: rgba(var(--v-theme-primary));
79
+ }
80
+ }
81
+ }
82
+
83
+ .f-menu.v-menu .v-overlay__content .f-context-menu-list.v-list {
84
+ padding: 12px 6px;
85
+ overflow-x: hidden;
86
+ .v-list-item {
87
+ padding: 4px 6px;
88
+ min-height: auto;
89
+ .v-list-item__overlay {
90
+ border-radius: 5.8px;
91
+ background: rgb(var(--v-theme-primary));
92
+ }
93
+ &:hover {
94
+ .v-list-item__overlay {
95
+ opacity: 0.15;
96
+ }
97
+ }
98
+ .v-list-item__content {
99
+ .v-list-item-title {
100
+ display: flex;
101
+ align-items: center;
102
+ font-weight: 600;
103
+ font-size: 1em;
104
+ color: rgb(var(--v-theme-subTitle));
105
+ }
106
+ }
107
+ }
108
+ .v-divider {
109
+ position: relative;
110
+ min-width: calc(100% + 12px);
111
+ left: -6px;
112
+ }
113
+ }
114
+
115
+ .v-virtual-scroll {
116
+ &::-webkit-scrollbar {
117
+ width: 6px;
118
+ }
119
+ &::-webkit-scrollbar-track {
120
+ border-radius: 10.8px;
121
+ box-shadow: inset 0 0 6px rgba(var(--v-theme-disabled));
122
+ }
123
+ &::-webkit-scrollbar-thumb {
124
+ border-top: 0px solid rgba(0, 0, 0, 0);
125
+ border-bottom: 0px solid rgba(0, 0, 0, 0);
126
+ background-clip: padding-box;
127
+ border-radius: 10.8px;
128
+ height: 50px;
129
+ background-color: rgba(var(--v-theme-disabled));
130
+ &:hover {
131
+ background-color: rgba(var(--v-theme-primary));
132
+ }
133
+ }
134
+ }
135
+
136
+ // Box shadow utility
137
+ :root {
138
+ --f-box-shadow: 0px 4px 20px 0px rgba(var(--v-theme-disabled));
139
+ }
140
+ .f-box-shadow {
141
+ box-shadow: 0px 4px 20px 0px var(--f-box-shadow);
142
+ }
143
+ .v-theme--dark {
144
+ --f-box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.6);
145
+ .f-box-shadow {
146
+ box-shadow: 0px 4px 20px 0px var(--f-box-shadow);
147
+ }
148
+ }
149
+
150
+ .bg-overlay {
151
+ position: relative;
152
+ z-index: 1;
153
+ &::after {
154
+ content: '';
155
+ display: block;
156
+ position: absolute;
157
+ border-radius: inherit;
158
+ z-index: -1;
159
+ top: 0;
160
+ left: 0;
161
+ height: 100%;
162
+ width: 100%;
163
+ opacity: 0.2;
164
+ visibility: visible;
165
+ background: currentColor;
166
+ }
167
+ }
@@ -0,0 +1,322 @@
1
+ <script setup>
2
+ // FDatePicker
3
+ import { ref, computed, watch } from 'vue'
4
+ import moment from 'moment'
5
+
6
+ const props = defineProps({
7
+ disabled: {
8
+ type: Boolean,
9
+ default: false
10
+ },
11
+ isRange: {
12
+ type: Boolean,
13
+ default: false
14
+ },
15
+ isActions: {
16
+ type: Boolean,
17
+ default: false
18
+ },
19
+ allowedDates: {
20
+ type: Function,
21
+ default: () => true
22
+ },
23
+ type: {
24
+ type: String,
25
+ default: 'date',
26
+ validator(value, props) {
27
+ if (!['date', 'datetime'].includes(value)) return false
28
+
29
+ if (value === 'datetime' && props.isRange) {
30
+ console.warn('type "datetime" cannot be used with isRange')
31
+ return false
32
+ }
33
+ return true
34
+ }
35
+ }
36
+ })
37
+
38
+ const modelValue = defineModel({
39
+ type: [String, Date, Object],
40
+ default: null
41
+ })
42
+
43
+ const emit = defineEmits(['cancel', 'save'])
44
+
45
+ const date = ref(null)
46
+ const time = ref(null)
47
+
48
+ const FORMAT_DATE = 'YYYY-MM-DD'
49
+
50
+ const fromDateText = computed(() => {
51
+ if (props.isRange && modelValue?.value?.from) {
52
+ return moment(modelValue.value.from).format('DD.MM.YYYY')
53
+ }
54
+ return null
55
+ })
56
+
57
+ const toDateText = computed(() => {
58
+ if (props.isRange && modelValue?.value?.to) {
59
+ return moment(modelValue.value.to).format('DD.MM.YYYY')
60
+ }
61
+ return null
62
+ })
63
+
64
+ const saveDisabled = computed(() => {
65
+ if (props.isRange) {
66
+ return !(fromDateText.value && toDateText.value)
67
+ } else {
68
+ return !date.value
69
+ }
70
+ })
71
+
72
+ watch(
73
+ modelValue,
74
+ () => {
75
+ if ((typeof modelValue.value === 'string' || modelValue.value instanceof Date) && moment(modelValue.value).isValid()) {
76
+ date.value = moment(modelValue.value).format(FORMAT_DATE)
77
+ if (props.type === 'datetime') {
78
+ time.value = moment(modelValue.value).format('HH:mm')
79
+ }
80
+ return
81
+ }
82
+
83
+ if (props.isRange && modelValue.value && typeof modelValue.value === 'object' && modelValue.value.from && modelValue.value.to) {
84
+ const datesArray = []
85
+ const current = moment(modelValue.value.from).clone()
86
+ const end = moment(modelValue.value.to)
87
+
88
+ while (current.isSameOrBefore(end)) {
89
+ datesArray.push(new Date(current))
90
+ current.add(1, 'day')
91
+ }
92
+
93
+ date.value = datesArray
94
+ return
95
+ }
96
+
97
+ date.value = null
98
+ if (props.type === 'datetime') time.value = null
99
+ },
100
+ { immediate: true }
101
+ )
102
+
103
+ const updateDateHandler = value => {
104
+ if (props.type === 'date') {
105
+ if (props.isRange && Array.isArray(value) && value.length) {
106
+ const from = value[0]
107
+ const to = value.length > 1 ? value[value.length - 1] : moment(from).endOf('day').toDate()
108
+ modelValue.value = { from, to }
109
+ } else {
110
+ modelValue.value = value instanceof Date ? value : null
111
+ }
112
+ }
113
+
114
+ if (props.type === 'datetime') {
115
+ if (!time.value) time.value = '00:00'
116
+ const dateTimeString = `${moment(date.value).format(FORMAT_DATE)} ${time.value}`
117
+ modelValue.value = dateTimeString
118
+ }
119
+ }
120
+ </script>
121
+
122
+ <template>
123
+ <v-date-picker
124
+ v-model="date"
125
+ hide-title
126
+ show-adjacent-months
127
+ color="secondary"
128
+ first-day-of-week="1"
129
+ weekday-format="short"
130
+ class="f-date-picker"
131
+ mode-icon="f-icon:chevron-down bg-secondary"
132
+ next-icon="f-icon:chevron-right bg-secondary"
133
+ prev-icon="f-icon:chevron-left bg-secondary"
134
+ :hide-header="!isRange"
135
+ :allowed-dates="allowedDates"
136
+ :multiple="isRange ? 'range' : false"
137
+ @update:model-value="updateDateHandler"
138
+ >
139
+ <!-- Header for "is-range" -->
140
+ <template v-if="isRange" #header>
141
+ <div class="d-flex align-center justify-space-between f-date-picker-header">
142
+ <span class="range-title">{{ $t('pickers.periodName') }}:</span>
143
+
144
+ <!-- From date -->
145
+ <div v-if="fromDateText" class="d-flex align-center">
146
+ <span class="range-from">{{ $t('pickers.from') }}</span>
147
+ <span class="range-from-date">{{ fromDateText }}</span>
148
+ </div>
149
+
150
+ <!-- To date -->
151
+ <div v-if="toDateText" class="d-flex align-center">
152
+ <span class="range-to ml-auto">{{ $t('pickers.to') }}</span>
153
+ <span class="range-to-date">{{ toDateText }}</span>
154
+ </div>
155
+ </div>
156
+ </template>
157
+
158
+ <!-- Footer -->
159
+ <template v-if="type === 'datetime' || isActions" #actions>
160
+ <div class="d-flex flex-column fill-width f-date-picker-footer">
161
+ <!-- Time picker -->
162
+ <div v-if="type === 'datetime'" class="d-flex mt-5 font-weight-semibold f-date-picker-footer-time">
163
+ <span class="mr-2">{{ $t('pickers.time') }}:</span>
164
+ <v-menu offset="0, -6" location="bottom right" content-class="time-picker-content" :close-on-content-click="false">
165
+ <template #activator="{ props: activatorProps }">
166
+ <div class="time pointer" v-bind="activatorProps">{{ time }}</div>
167
+ </template>
168
+
169
+ <v-time-picker v-model="time" hide-title scrollable format="24hr" @update:model-value="updateDateHandler" />
170
+ </v-menu>
171
+ </div>
172
+
173
+ <!-- Picker actions -->
174
+ <div v-if="isActions" class="d-flex justify-space-between fill-width mt-5 f-date-picker-actions">
175
+ <v-btn width="48%" variant="outlined" @click="emit('cancel')">
176
+ {{ $t('buttons.cancel') }}
177
+ </v-btn>
178
+ <v-btn width="48%" :disabled="saveDisabled" variant="elevated" @click="emit('save')">
179
+ {{ $t('buttons.save') }}
180
+ </v-btn>
181
+ </div>
182
+ </div>
183
+ </template>
184
+ </v-date-picker>
185
+ </template>
186
+
187
+ <style lang="scss" scoped>
188
+ .f-date-picker {
189
+ .f-date-picker-header {
190
+ padding: 14px 14px 10px;
191
+ background-color: rgb(var(--v-theme-background));
192
+ border-bottom: 0.5px solid rgb(var(--v-theme-line));
193
+ .range-title {
194
+ font-size: 0.9em;
195
+ font-weight: 600;
196
+ line-height: 1.5em;
197
+ color: rgb(var(--v-theme-secondary));
198
+ }
199
+ .range-from,
200
+ .range-to {
201
+ font-size: 0.8em;
202
+ margin-right: 4px;
203
+ color: rgb(var(--v-theme-text));
204
+ }
205
+ .range-from-date,
206
+ .range-to-date {
207
+ font-size: 0.85em;
208
+ border-radius: 5.8px;
209
+ line-height: 1.5em;
210
+ padding-inline: 5px;
211
+ color: rgb(var(--v-theme-text));
212
+ background-color: rgb(var(--v-theme-fields));
213
+ }
214
+ }
215
+
216
+ &.v-picker.v-sheet {
217
+ border-radius: inherit;
218
+ box-shadow: none;
219
+ }
220
+ &.v-date-picker {
221
+ :deep(.v-picker__body) {
222
+ .v-date-picker-month__days {
223
+ .v-date-picker-month__day {
224
+ .v-btn.v-btn--variant-text .v-btn__overlay {
225
+ background: rgb(var(--v-theme-secondary));
226
+ }
227
+ }
228
+ }
229
+ }
230
+ }
231
+
232
+ :deep(.v-picker__actions) {
233
+ padding-bottom: 40px;
234
+ border-top: 1px solid rgb(var(--v-theme-line));
235
+ justify-content: flex-start;
236
+ .v-btn {
237
+ margin-inline-end: 0;
238
+ }
239
+ }
240
+ .f-date-picker-footer {
241
+ .f-date-picker-footer-time {
242
+ color: rgb(var(--v-theme-secondary));
243
+ .time {
244
+ &::after {
245
+ content: '';
246
+ display: block;
247
+ width: 100%;
248
+ height: 0;
249
+ border-bottom: 0.5px solid rgb(var(--v-theme-secondary));
250
+ position: relative;
251
+ top: -1px;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ .time-picker-content {
258
+ .v-time-picker {
259
+ min-width: 290px;
260
+ :deep(.v-picker__header) {
261
+ padding: 10px 20px 4px;
262
+ background: rgb(var(--v-theme-background-dark));
263
+ .v-time-picker-controls {
264
+ .v-time-picker-controls__time__field {
265
+ height: auto;
266
+ .v-field {
267
+ font-size: 32px;
268
+ background-color: rgb(var(--v-theme-fields));
269
+ .v-field__input {
270
+ padding: 4px 8px;
271
+ min-height: 20px;
272
+ color: rgb(var(--v-theme-fields-light));
273
+ }
274
+ }
275
+ }
276
+ .v-time-picker-controls__field-label {
277
+ opacity: 1;
278
+ }
279
+ .v-time-picker-controls__time__separator {
280
+ font-size: 32px;
281
+ line-height: 44px;
282
+ color: rgb(var(--v-theme-fields-light));
283
+ }
284
+ }
285
+ }
286
+ :deep(.v-picker__body) {
287
+ .v-time-picker-clock {
288
+ margin: 20px;
289
+ background: rgb(var(--v-theme-line));
290
+ .v-time-picker-clock__hand {
291
+ background: rgb(var(--v-theme-secondary));
292
+ &::before {
293
+ border-color: rgb(var(--v-theme-secondary));
294
+ }
295
+ &::after {
296
+ background: rgb(var(--v-theme-secondary));
297
+ }
298
+ }
299
+ .v-time-picker-clock__item {
300
+ color: rgb(var(--v-theme-text));
301
+ font-size: 14px;
302
+ height: 28px;
303
+ width: 28px;
304
+ &.v-time-picker-clock__item--active {
305
+ color: rgb(var(--v-theme-fields));
306
+ background: rgb(var(--v-theme-secondary));
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ .v-theme--dark {
314
+ .time-picker-content {
315
+ .v-time-picker {
316
+ :deep(.v-picker__header) {
317
+ border-bottom: 1px solid rgb(var(--v-theme-line));
318
+ }
319
+ }
320
+ }
321
+ }
322
+ </style>