@dative-gpi/foundation-shared-components 0.0.11 → 0.0.13
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/aliases/FSButton.ts +8 -6
- package/components/FSBreadcrumbs.vue +3 -1
- package/components/FSButton.vue +13 -10
- package/components/FSCalendar.vue +4 -3
- package/components/FSCalendarTwin.vue +4 -3
- package/components/FSCarousel.vue +3 -1
- package/components/FSCheckbox.vue +8 -6
- package/components/FSChip.vue +5 -3
- package/components/FSClock.vue +50 -34
- package/components/FSColor.vue +3 -1
- package/components/FSColorIcon.vue +3 -1
- package/components/FSContainer.vue +4 -2
- package/components/FSDivider.vue +49 -8
- package/components/FSFadeOut.vue +3 -1
- package/components/FSFileButton.vue +4 -3
- package/components/FSForm.vue +52 -0
- package/components/FSImage.vue +42 -33
- package/components/FSLabel.vue +105 -0
- package/components/FSLink.vue +95 -0
- package/components/FSPagination.vue +96 -0
- package/components/FSPermissions.vue +0 -0
- package/components/FSRadio.vue +8 -6
- package/components/FSRemoveDialog.vue +1 -1
- package/components/FSSlideGroup.vue +2 -1
- package/components/FSSlider.vue +5 -3
- package/components/FSSubmitDialog.vue +2 -2
- package/components/FSSwitch.vue +9 -7
- package/components/FSTabs.vue +4 -3
- package/components/FSTag.vue +4 -2
- package/components/FSText.vue +3 -2
- package/components/FSWrapGroup.vue +2 -1
- package/components/deviceOrganisations/FSConnectivity.vue +2 -1
- package/components/deviceOrganisations/FSWorstAlert.vue +2 -1
- package/components/{FSAutocompleteField.vue → fields/FSAutocompleteField.vue} +25 -22
- package/components/fields/FSColorField.vue +194 -0
- package/components/{FSDateField.vue → fields/FSDateField.vue} +18 -52
- package/components/{FSDateRangeField.vue → fields/FSDateRangeField.vue} +22 -67
- package/components/{FSDateTimeField.vue → fields/FSDateTimeField.vue} +20 -54
- package/components/{FSDateTimeRangeField.vue → fields/FSDateTimeRangeField.vue} +27 -70
- package/components/{FSIconField.vue → fields/FSIconField.vue} +20 -53
- package/components/{FSNumberField.vue → fields/FSNumberField.vue} +0 -24
- package/components/{FSPasswordField.vue → fields/FSPasswordField.vue} +9 -31
- package/components/{FSRichTextField.vue → fields/FSRichTextField.vue} +10 -9
- package/components/{FSSearchField.vue → fields/FSSearchField.vue} +47 -14
- package/components/{FSSelectField.vue → fields/FSSelectField.vue} +22 -24
- package/components/{FSTagField.vue → fields/FSTagField.vue} +19 -53
- package/components/{FSTextArea.vue → fields/FSTextArea.vue} +28 -27
- package/components/{FSTextField.vue → fields/FSTextField.vue} +23 -21
- package/components/fields/FSTimeField.vue +104 -0
- package/components/fields/FSTimeSlotField.vue +263 -0
- package/components/lists/FSDataTableUI.vue +7 -6
- package/components/lists/FSFilterButton.vue +25 -17
- package/components/lists/FSHiddenButton.vue +1 -0
- package/components/lists/FSLoadDataTable.vue +88 -0
- package/components/tiles/FSDeviceOrganisationTileUI.vue +5 -10
- package/components/tiles/FSGroupTileUI.vue +5 -10
- package/components/{FSLoadTile.vue → tiles/FSLoadTile.vue} +9 -7
- package/components/{FSTile.vue → tiles/FSTile.vue} +5 -4
- package/composables/index.ts +2 -0
- package/composables/useBreakpoints.ts +7 -5
- package/composables/useDebounce.ts +22 -0
- package/composables/useRules.ts +72 -0
- package/elements/FSFormElement.ts +17 -0
- package/icons/flags/France.vue +9 -0
- package/icons/flags/Germany.vue +7 -0
- package/icons/flags/GreatBritain.vue +9 -0
- package/icons/flags/Italy.vue +9 -0
- package/icons/flags/Portugal.vue +59 -0
- package/icons/flags/Spain.vue +546 -0
- package/icons/flags/UnitedStates.vue +12 -0
- package/icons/sets.ts +17 -0
- package/models/rules.ts +10 -1
- package/package.json +6 -4
- package/pages/FSExternalIdentityButton.vue +64 -0
- package/pages/FSLanguageSetter.vue +140 -0
- package/pages/FSLoginPage.vue +253 -0
- package/styles/components/fs_clock.scss +4 -0
- package/styles/components/fs_color_field.scss +17 -0
- package/styles/components/fs_divider.scss +5 -0
- package/styles/components/fs_image.scss +12 -1
- package/styles/components/fs_label.scss +86 -0
- package/styles/components/fs_link.scss +6 -0
- package/styles/components/fs_load_data_table.scss +77 -0
- package/styles/components/fs_pagination.scss +11 -0
- package/styles/components/fs_time_field.scss +3 -0
- package/styles/components/fs_timeslot_field.scss +75 -0
- package/styles/components/index.scss +7 -0
- package/styles/globals/text_fonts.scss +18 -0
- package/styles/main.scss +3 -1
- package/styles/pages/fs_language_setter.scss +55 -0
- package/styles/pages/index.scss +1 -0
- package/utils/color.ts +7 -0
- package/utils/css.ts +2 -1
- package/utils/index.ts +3 -1
- package/utils/time.ts +29 -0
- package/components/FSHeaderButton.vue +0 -17
- package/components/lists/FSDataIteratorGroup.vue +0 -7
- package/index.ts +0 -6
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.fs-load-data-table {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fs-load-data-table .fs-row:first-of-type .v-skeleton-loader__button {
|
|
6
|
+
margin: 0;
|
|
7
|
+
|
|
8
|
+
@include web {
|
|
9
|
+
height: 40px !important;
|
|
10
|
+
min-width: 40px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include mobile {
|
|
14
|
+
height: 36px !important;
|
|
15
|
+
min-width: 36px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fs-load-data-table .fs-row:first-of-type .v-skeleton-loader:first-of-type {
|
|
20
|
+
@include web {
|
|
21
|
+
min-width: calc(50% - 132px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include mobile {
|
|
25
|
+
min-width: calc(50% - 124px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& .v-skeleton-loader__button {
|
|
29
|
+
min-width: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.fs-load-data-table .fs-row:nth-of-type(2) .v-skeleton-loader__chip {
|
|
34
|
+
margin: 0;
|
|
35
|
+
border-radius: 50px !important;
|
|
36
|
+
min-width: 10vw;
|
|
37
|
+
|
|
38
|
+
@include web {
|
|
39
|
+
height: 24px !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include mobile {
|
|
43
|
+
height: 20px !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.fs-load-data-table .v-skeleton-loader:has(.v-skeleton-loader__table-row-divider),
|
|
48
|
+
.fs-load-data-table .v-skeleton-loader:has(.v-skeleton-loader__table-thead) {
|
|
49
|
+
background-color: var(--fs-load-tile-background-color);
|
|
50
|
+
min-width: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.fs-load-data-table .v-skeleton-loader__table-row {
|
|
54
|
+
margin: 0 -8px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.fs-load-data-table .fs-row:last-of-type .v-skeleton-loader__button {
|
|
58
|
+
margin: 0;
|
|
59
|
+
|
|
60
|
+
@include web {
|
|
61
|
+
height: 40px !important;
|
|
62
|
+
min-width: 40px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include mobile {
|
|
66
|
+
height: 36px !important;
|
|
67
|
+
min-width: 36px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.fs-load-data-table .fs-row:last-of-type .v-skeleton-loader:first-of-type {
|
|
72
|
+
min-width: 120px;
|
|
73
|
+
|
|
74
|
+
& .v-skeleton-loader__button {
|
|
75
|
+
min-width: 100%;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.fs-pagination-page {
|
|
2
|
+
height: 4px;
|
|
3
|
+
border-radius: 4px;
|
|
4
|
+
min-width: var(--fs-pagination-page-width);
|
|
5
|
+
background-color: var(--fs-pagination-background-color);
|
|
6
|
+
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
7
|
+
|
|
8
|
+
&.fs-pagination-active-page {
|
|
9
|
+
background-color: var(--fs-pagination-active-background-color);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.fs-time-slot-field {
|
|
2
|
+
padding: 0px !important;
|
|
3
|
+
width: 100%;
|
|
4
|
+
|
|
5
|
+
& > .v-input__control > .v-field {
|
|
6
|
+
border: 1px solid var(--fs-time-slot-field-border-color) !important;
|
|
7
|
+
cursor: var(--fs-time-slot-field-cursor) !important;
|
|
8
|
+
border-radius: 4px !important;
|
|
9
|
+
padding: 0 16px !important;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
|
|
12
|
+
&--error {
|
|
13
|
+
border-color: var(--fs-time-slot-field-error-border-color) !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:not(.v-field--error):focus-within {
|
|
17
|
+
border-color: var(--fs-time-slot-field-active-border-color) !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& > .v-field__outline {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
& > .v-field__field > .v-field__input {
|
|
25
|
+
@extend .text-body;
|
|
26
|
+
|
|
27
|
+
padding-inline: 0 !important;
|
|
28
|
+
color: var(--fs-time-slot-field-color);
|
|
29
|
+
cursor: var(--fs-time-slot-field-cursor) !important;
|
|
30
|
+
|
|
31
|
+
@include web {
|
|
32
|
+
min-height: 38px !important;
|
|
33
|
+
height: 38px !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include mobile {
|
|
37
|
+
min-height: 34px !important;
|
|
38
|
+
height: 34px !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& > .v-select__selection {
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& > .v-field__clearable {
|
|
47
|
+
margin-inline: 0px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
& > .v-field__append-inner {
|
|
51
|
+
color: var(--fs-time-slot-field-color);
|
|
52
|
+
|
|
53
|
+
& > i {
|
|
54
|
+
margin-inline-start: 0px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.fs-time-slot-field-label {
|
|
61
|
+
color: var(--fs-time-slot-field-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.fs-time-slot-field-messages {
|
|
65
|
+
align-self: stretch;
|
|
66
|
+
color: var(--fs-time-slot-field-error-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.fs-time-slot-field-description {
|
|
70
|
+
color: var(--fs-time-slot-field-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.fs-time-slot-field-number > .fs-row {
|
|
74
|
+
padding: 0px !important;
|
|
75
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
@import "fs_chip.scss";
|
|
9
9
|
@import "fs_clock.scss";
|
|
10
10
|
@import "fs_col.scss";
|
|
11
|
+
@import "fs_color_field.scss";
|
|
11
12
|
@import "fs_color.scss";
|
|
12
13
|
@import "fs_color_icon.scss";
|
|
13
14
|
@import "fs_container.scss";
|
|
@@ -23,7 +24,11 @@
|
|
|
23
24
|
@import "fs_icon_field.scss";
|
|
24
25
|
@import "fs_icon.scss";
|
|
25
26
|
@import "fs_image.scss";
|
|
27
|
+
@import "fs_label.scss";
|
|
28
|
+
@import "fs_link.scss";
|
|
29
|
+
@import "fs_load_data_table.scss";
|
|
26
30
|
@import "fs_load_tile.scss";
|
|
31
|
+
@import "fs_pagination.scss";
|
|
27
32
|
@import "fs_password_field.scss";
|
|
28
33
|
@import "fs_radio.scss";
|
|
29
34
|
@import "fs_rich_text_field.scss";
|
|
@@ -41,5 +46,7 @@
|
|
|
41
46
|
@import "fs_text_field.scss";
|
|
42
47
|
@import "fs_text.scss";
|
|
43
48
|
@import "fs_tile.scss";
|
|
49
|
+
@import "fs_time_field.scss";
|
|
50
|
+
@import "fs_timeslot_field.scss";
|
|
44
51
|
@import "fs_tooltip.scss";
|
|
45
52
|
@import "fs_wrap_group.scss";
|
|
@@ -56,6 +56,24 @@
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
.text-h4 {
|
|
60
|
+
font-family: 'Montserrat', sans-serif !important;
|
|
61
|
+
font-style: normal !important;
|
|
62
|
+
font-weight: 500 !important;
|
|
63
|
+
|
|
64
|
+
@include web {
|
|
65
|
+
font-size: 16px !important;
|
|
66
|
+
line-height: 20px !important;
|
|
67
|
+
letter-spacing: -0.48px !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include mobile {
|
|
71
|
+
font-size: 14px !important;
|
|
72
|
+
line-height: 16px !important;
|
|
73
|
+
letter-spacing: -0.41px !important;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
59
77
|
.text-body {
|
|
60
78
|
font-family: 'Montserrat', sans-serif !important;
|
|
61
79
|
font-style: normal !important;
|
package/styles/main.scss
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.fs-load-language-setter {
|
|
2
|
+
@include web {
|
|
3
|
+
height: 40px;
|
|
4
|
+
max-width: 360px;
|
|
5
|
+
}
|
|
6
|
+
@include mobile {
|
|
7
|
+
height: 36px;
|
|
8
|
+
max-width: 360px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
& .v-skeleton-loader__image {
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.fs-load-language-setter-icon {
|
|
19
|
+
@include mobile {
|
|
20
|
+
width: 72px;
|
|
21
|
+
}
|
|
22
|
+
@include web {
|
|
23
|
+
width: 76px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.fs-language-setter {
|
|
28
|
+
& > .v-input__control > .v-field {
|
|
29
|
+
padding: 0px 8px 0px 12px !important;
|
|
30
|
+
gap: 0px;
|
|
31
|
+
|
|
32
|
+
& > .v-field__field > .v-field__input {
|
|
33
|
+
padding-top: 0px;
|
|
34
|
+
padding-bottom: 0px;
|
|
35
|
+
|
|
36
|
+
& > .v-select__selection {
|
|
37
|
+
height: 100% !important;
|
|
38
|
+
|
|
39
|
+
& > .fs-row > .v-icon {
|
|
40
|
+
padding-bottom: 2px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.fs-language-setter-icon {
|
|
48
|
+
@include mobile {
|
|
49
|
+
width: 72px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include web {
|
|
53
|
+
width: 76px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "./fs_language_setter.scss";
|
package/utils/color.ts
ADDED
package/utils/css.ts
CHANGED
|
@@ -2,7 +2,8 @@ export const sizeToVar = (value: string | number | null, nullValue: string = "fi
|
|
|
2
2
|
if (value == null) {
|
|
3
3
|
return nullValue;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
return typeof value === 'string' && isNaN(+value) ? value : `${value}${unit}`;
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
export const varToSize = (value: string): number => {
|
package/utils/index.ts
CHANGED
package/utils/time.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
2
|
+
|
|
3
|
+
const { $tr } = useTranslationsProvider();
|
|
4
|
+
|
|
5
|
+
export const timeScale: any[] = [
|
|
6
|
+
{ id: 1, label: $tr("ui.time-field.second.singular", "Second"), plural: $tr("ui.time-field.second.plural", "Seconds") },
|
|
7
|
+
{ id: 60, label: $tr("ui.time-field.minute.singular", "Minute"), plural: $tr("ui.time-field.minute.plural", "Minutes") },
|
|
8
|
+
{ id: 3600, label: $tr("ui.time-field.hour.singular", "Hour"), plural: $tr("ui.time-field.hour.plural", "Hours") },
|
|
9
|
+
{ id: 86400, label: $tr("ui.time-field.day.singular", "Day"), plural: $tr("ui.time-field.day.plural", "Days") },
|
|
10
|
+
{ id: 604800, label: $tr("ui.time-field.week.singular", "Week"), plural: $tr("ui.time-field.week.plural", "Weeks") },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export const getTimeScaleIndex = (value: number): number => {
|
|
14
|
+
if (!value) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
for (let i = timeScale.length - 1; i >= 0; i--) {
|
|
18
|
+
if (value % timeScale[i].id === 0) {
|
|
19
|
+
return i;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return 0;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const getTimeBestString = (value: number): string => {
|
|
26
|
+
const unit = getTimeScaleIndex(value);
|
|
27
|
+
const figure = value / timeScale[unit].id;
|
|
28
|
+
return `${figure} ${figure === 1 ? timeScale[unit].label.toLowerCase() : timeScale[unit].plural.toLowerCaser()}`;
|
|
29
|
+
}
|