@dative-gpi/foundation-shared-components 0.0.12 → 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/components/FSButton.vue +1 -1
- package/components/FSCheckbox.vue +3 -3
- package/components/FSClock.vue +45 -30
- package/components/FSDivider.vue +46 -7
- package/components/FSForm.vue +52 -0
- package/components/FSImage.vue +41 -32
- package/components/FSLabel.vue +105 -0
- package/components/FSPagination.vue +25 -9
- package/components/FSPermissions.vue +0 -0
- package/components/FSRadio.vue +3 -3
- package/components/FSSubmitDialog.vue +1 -1
- package/components/FSSwitch.vue +3 -3
- package/components/FSText.vue +1 -1
- package/components/{FSAutocompleteField.vue → fields/FSAutocompleteField.vue} +18 -17
- package/components/fields/FSColorField.vue +194 -0
- package/components/{FSDateField.vue → fields/FSDateField.vue} +14 -49
- package/components/{FSDateRangeField.vue → fields/FSDateRangeField.vue} +18 -64
- package/components/{FSDateTimeField.vue → fields/FSDateTimeField.vue} +16 -51
- package/components/{FSDateTimeRangeField.vue → fields/FSDateTimeRangeField.vue} +23 -67
- package/components/{FSIconField.vue → fields/FSIconField.vue} +15 -50
- package/components/{FSNumberField.vue → fields/FSNumberField.vue} +0 -24
- package/components/{FSPasswordField.vue → fields/FSPasswordField.vue} +5 -29
- package/components/{FSRichTextField.vue → fields/FSRichTextField.vue} +3 -3
- package/components/{FSSearchField.vue → fields/FSSearchField.vue} +1 -1
- package/components/{FSSelectField.vue → fields/FSSelectField.vue} +17 -21
- package/components/{FSTagField.vue → fields/FSTagField.vue} +15 -50
- package/components/{FSTextArea.vue → fields/FSTextArea.vue} +24 -24
- package/components/{FSTextField.vue → fields/FSTextField.vue} +18 -18
- package/components/fields/FSTimeField.vue +104 -0
- package/components/fields/FSTimeSlotField.vue +263 -0
- package/components/lists/FSDataTableUI.vue +2 -2
- package/components/lists/FSFilterButton.vue +1 -1
- package/components/tiles/FSDeviceOrganisationTileUI.vue +4 -9
- package/components/tiles/FSGroupTileUI.vue +4 -9
- package/composables/index.ts +1 -0
- package/composables/useBreakpoints.ts +7 -5
- 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 +8 -0
- package/package.json +4 -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_pagination.scss +3 -3
- package/styles/components/fs_time_field.scss +3 -0
- package/styles/components/fs_timeslot_field.scss +75 -0
- package/styles/components/index.scss +4 -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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.fs-pagination {
|
|
1
|
+
.fs-pagination-page {
|
|
2
2
|
height: 4px;
|
|
3
|
-
min-width: 12%;
|
|
4
3
|
border-radius: 4px;
|
|
4
|
+
min-width: var(--fs-pagination-page-width);
|
|
5
5
|
background-color: var(--fs-pagination-background-color);
|
|
6
6
|
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
7
7
|
|
|
8
|
-
&.fs-pagination-active {
|
|
8
|
+
&.fs-pagination-active-page {
|
|
9
9
|
background-color: var(--fs-pagination-active-background-color);
|
|
10
10
|
}
|
|
11
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,6 +24,7 @@
|
|
|
23
24
|
@import "fs_icon_field.scss";
|
|
24
25
|
@import "fs_icon.scss";
|
|
25
26
|
@import "fs_image.scss";
|
|
27
|
+
@import "fs_label.scss";
|
|
26
28
|
@import "fs_link.scss";
|
|
27
29
|
@import "fs_load_data_table.scss";
|
|
28
30
|
@import "fs_load_tile.scss";
|
|
@@ -44,5 +46,7 @@
|
|
|
44
46
|
@import "fs_text_field.scss";
|
|
45
47
|
@import "fs_text.scss";
|
|
46
48
|
@import "fs_tile.scss";
|
|
49
|
+
@import "fs_time_field.scss";
|
|
50
|
+
@import "fs_timeslot_field.scss";
|
|
47
51
|
@import "fs_tooltip.scss";
|
|
48
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
|
+
}
|