@dative-gpi/foundation-shared-components 0.0.13 → 0.0.15

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 (40) hide show
  1. package/components/FSCalendarTwin.vue +2 -0
  2. package/components/FSClock.vue +7 -15
  3. package/components/FSCol.vue +2 -2
  4. package/components/FSSlideGroup.vue +10 -11
  5. package/components/FSWrapGroup.vue +10 -11
  6. package/components/fields/FSAutocompleteField.vue +8 -2
  7. package/components/fields/FSColorField.vue +89 -78
  8. package/components/fields/FSDateField.vue +1 -1
  9. package/components/fields/FSDateRangeField.vue +1 -5
  10. package/components/fields/FSDateTimeField.vue +1 -1
  11. package/components/fields/FSDateTimeRangeField.vue +23 -15
  12. package/components/fields/FSIconField.vue +1 -5
  13. package/components/fields/FSNumberField.vue +17 -3
  14. package/components/fields/FSRichTextField.vue +10 -8
  15. package/components/fields/FSTagField.vue +3 -3
  16. package/components/fields/FSTextArea.vue +2 -2
  17. package/components/fields/FSTimeField.vue +118 -20
  18. package/components/fields/FSTimeSlotField.vue +59 -53
  19. package/components/lists/FSDataTableUI.vue +8 -10
  20. package/package.json +4 -4
  21. package/styles/components/fs_autocomplete_field.scss +3 -60
  22. package/styles/components/fs_color_field.scss +4 -0
  23. package/styles/components/fs_data_table.scss +7 -2
  24. package/styles/components/fs_rich_text_field.scss +1 -1
  25. package/styles/components/fs_select_field.scss +3 -4
  26. package/styles/components/fs_switch.scss +4 -4
  27. package/styles/components/fs_text_area.scss +2 -0
  28. package/styles/components/fs_text_field.scss +1 -0
  29. package/styles/components/fs_time_field.scss +13 -0
  30. package/styles/components/fs_timeslot_field.scss +4 -67
  31. package/styles/globals/overrides.scss +8 -6
  32. package/styles/main.scss +1 -3
  33. package/utils/icons.ts +88 -2
  34. package/aliases/FSButton.ts +0 -116
  35. package/aliases/index.ts +0 -1
  36. package/pages/FSExternalIdentityButton.vue +0 -64
  37. package/pages/FSLanguageSetter.vue +0 -140
  38. package/pages/FSLoginPage.vue +0 -253
  39. package/styles/pages/fs_language_setter.scss +0 -55
  40. package/styles/pages/index.scss +0 -1
@@ -1,75 +1,12 @@
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
1
  .fs-time-slot-field-label {
61
- color: var(--fs-time-slot-field-color);
2
+ color: var(--fs-time-slot-field-color);
62
3
  }
63
4
 
64
5
  .fs-time-slot-field-messages {
65
- align-self: stretch;
66
- color: var(--fs-time-slot-field-error-color);
6
+ align-self: stretch;
7
+ color: var(--fs-time-slot-field-error-color);
67
8
  }
68
9
 
69
10
  .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;
11
+ color: var(--fs-time-slot-field-color);
75
12
  }
@@ -17,6 +17,14 @@
17
17
  margin-inline-start: 8px !important;
18
18
  }
19
19
 
20
+ // Clearable icon is always centered vertically
21
+ .v-input__control > .v-field > .v-field__clearable {
22
+ align-items: center;
23
+ padding-top: 0px;
24
+ height: 100%;
25
+ }
26
+
27
+
20
28
  // No up / down buttons in input field of type number
21
29
  input[type=number] {
22
30
  -moz-appearance: textfield;
@@ -56,12 +64,6 @@ input[type=number]::-webkit-outer-spin-button {
56
64
  color: var(--fs-group-hover-color);
57
65
  }
58
66
 
59
- // remove arrows when disabled
60
- .v-slide-group__prev--disabled,
61
- .v-slide-group__next--disabled {
62
- display: none !important;
63
- }
64
-
65
67
  // Badges are totally overriden
66
68
  .v-badge__badge {
67
69
  align-items: center !important;
package/styles/main.scss CHANGED
@@ -1,5 +1,3 @@
1
1
  // Warning: Imports are loaded in order. If you need to use a variable / property / mixin, import it after the file that defines it
2
2
  @import 'globals/index.scss';
3
- @import 'components/index.scss';
4
-
5
- @import 'pages/index.scss';
3
+ @import 'components/index.scss';
package/utils/icons.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Flags } from "../icons/sets";
2
+
1
3
  const MdiIcons = [
2
4
  {
3
5
  "name": "ab-testing",
@@ -75408,9 +75410,93 @@ const MdiIcons = [
75408
75410
  "styles": [],
75409
75411
  "tags": []
75410
75412
  }
75411
- ]
75413
+ ];
75414
+
75415
+ const FlagIcons = [
75416
+ {
75417
+ "name": "france",
75418
+ "aliases": [
75419
+ "french-flag"
75420
+ ],
75421
+ "styles": [],
75422
+ "tags": [
75423
+ "Flags",
75424
+ "France"
75425
+ ]
75426
+ },
75427
+ {
75428
+ "name": "germany",
75429
+ "aliases": [
75430
+ "german-flag"
75431
+ ],
75432
+ "styles": [],
75433
+ "tags": [
75434
+ "Flags",
75435
+ "Allemagne"
75436
+ ]
75437
+ },
75438
+ {
75439
+ "name": "greatBritain",
75440
+ "aliases": [
75441
+ "great-britain-flag",
75442
+ "united-kingdom-flag"
75443
+ ],
75444
+ "styles": [],
75445
+ "tags": [
75446
+ "Flags",
75447
+ "Royaume-Uni"
75448
+ ]
75449
+ },
75450
+ {
75451
+ "name": "italy",
75452
+ "aliases": [
75453
+ "italien-flag"
75454
+ ],
75455
+ "styles": [],
75456
+ "tags": [
75457
+ "Flags",
75458
+ "Italie"
75459
+ ]
75460
+ },
75461
+ {
75462
+ "name": "portugal",
75463
+ "aliases": [
75464
+ "portuguese-flag"
75465
+ ],
75466
+ "styles": [],
75467
+ "tags": [
75468
+ "Flags",
75469
+ "Portugal"
75470
+ ]
75471
+ },
75472
+ {
75473
+ "name": "spain",
75474
+ "aliases": [
75475
+ "spanish-flag"
75476
+ ],
75477
+ "styles": [],
75478
+ "tags": [
75479
+ "Flags",
75480
+ "Espagne"
75481
+ ]
75482
+ },
75483
+ {
75484
+ "name": "unitedStates",
75485
+ "aliases": [
75486
+ "united-states-flag"
75487
+ ],
75488
+ "styles": [],
75489
+ "tags": [
75490
+ "Flags",
75491
+ "Etats-Unis"
75492
+ ]
75493
+ }
75494
+ ];
75412
75495
 
75413
75496
  export const Icons: { name: string, fullText: string }[] = MdiIcons.map((icon) => ({
75414
75497
  name: "mdi-" + icon.name,
75415
75498
  fullText: icon.name + icon.name.split("-").join(" ") + " " + icon.aliases.join(" ") + " " + icon.tags.join(" ") + " " + icon.styles.join(" ")
75416
- }));
75499
+ })).concat(FlagIcons.map((icon) => ({
75500
+ name: "$" + icon.name,
75501
+ fullText: icon.name + icon.name.split("-").join(" ") + " " + icon.aliases.join(" ") + " " + icon.tags.join(" ") + " " + icon.styles.join(" ")
75502
+ })));
@@ -1,116 +0,0 @@
1
- import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
3
-
4
- import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
5
-
6
- const { $tr } = useTranslationsProvider();
7
-
8
- import { computed } from "vue";
9
-
10
- export const FSButtonsAliases = {
11
- FSButtonSearch: FSButton,
12
- FSButtonSearchMini: FSButton,
13
- FSButtonSearchIcon: FSButton,
14
- FSButtonRemove: FSButton,
15
- FSButtonRemoveMini: FSButton,
16
- FSButtonRemoveIcon: FSButton,
17
- FSButtonSave: FSButton,
18
- FSButtonSaveMini: FSButton,
19
- FSButtonSaveIcon: FSButton,
20
- FSButtonCancel: FSButton,
21
- FSButtonCancelMini: FSButton,
22
- FSButtonCancelIcon: FSButton
23
- }
24
-
25
- export const FSButtonsProps = {
26
- FSButtonSearch: {
27
- prependIcon: "mdi-magnify",
28
- get label() { return $tr("ui.button.search", "Search") },
29
- variant: "standard",
30
- color: ColorEnum.Primary
31
- },
32
- FSButtonSearchMini: {
33
- prependIcon: "mdi-magnify",
34
- label: undefined,
35
- variant: "standard",
36
- color: ColorEnum.Primary
37
- },
38
- FSButtonSearchIcon: {
39
- icon: "mdi-magnify",
40
- label: undefined,
41
- variant: "icon",
42
- color: ColorEnum.Primary
43
- },
44
- FSButtonRemove: {
45
- prependIcon: "mdi-delete-outline",
46
- get label() { return $tr("ui.button.remove", "Remove") },
47
- variant: "standard",
48
- color: ColorEnum.Error
49
- },
50
- FSButtonRemoveMini: {
51
- prependIcon: "mdi-delete-outline",
52
- label: undefined,
53
- variant: "standard",
54
- color: ColorEnum.Error
55
- },
56
- FSButtonRemoveIcon: {
57
- icon: "mdi-delete-outline",
58
- label: undefined,
59
- variant: "icon",
60
- color: ColorEnum.Error
61
- },
62
- FSButtonSave: {
63
- prependIcon: "mdi-content-save-outline",
64
- get label() { return $tr("ui.button.save", "Save") },
65
- variant: "standard",
66
- color: ColorEnum.Primary
67
- },
68
- FSButtonSaveMini: {
69
- prependIcon: "mdi-content-save-outline",
70
- label: undefined,
71
- variant: "standard",
72
- color: ColorEnum.Primary
73
- },
74
- FSButtonSaveIcon: {
75
- icon: "mdi-content-save-outline",
76
- label: undefined,
77
- variant: "icon",
78
- color: ColorEnum.Primary
79
- },
80
- FSButtonCancel: {
81
- prependIcon: "mdi-cancel",
82
- get label() { return $tr("ui.button.cancel", "Cancel") },
83
- variant: "standard",
84
- color: ColorEnum.Light
85
- },
86
- FSButtonCancelMini: {
87
- prependIcon: "mdi-cancel",
88
- label: undefined,
89
- variant: "standard",
90
- color: ColorEnum.Light
91
- },
92
- FSButtonCancelIcon: {
93
- icon: "mdi-cancel",
94
- label: undefined,
95
- variant: "icon",
96
- color: ColorEnum.Light
97
- },
98
- FSButtonDocumentation: {
99
- prependIcon: "mdi-file-document-outline",
100
- get label() { return $tr("ui.button.documentation", "Documentation") },
101
- variant: "standard",
102
- color: ColorEnum.Light
103
- },
104
- FSButtonDocumentationMini: {
105
- prependIcon: "mdi-file-document-outline",
106
- label: undefined,
107
- variant: "standard",
108
- color: ColorEnum.Light
109
- },
110
- FSButtonDocumentationIcon: {
111
- icon: "mdi-file-document-outline",
112
- label: undefined,
113
- variant: "icon",
114
- color: ColorEnum.Light
115
- }
116
- }
package/aliases/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./FSButton";
@@ -1,64 +0,0 @@
1
- <template>
2
- <FSButton
3
- style="flex: 1"
4
- :href="loginUrl"
5
- :prependIcon="icon"
6
- />
7
- </template>
8
-
9
- <script lang="ts">
10
- import { computed, defineComponent, PropType } from "vue";
11
-
12
- import { LOGIN_EXTERNAL_URL, SIGNUP_EXTERNAL_URL } from "@dative-gpi/foundation-shared-services/config";
13
- import { buildURL } from "@dative-gpi/bones-ui";
14
-
15
- import FSButton from "../components/FSButton.vue";
16
- import FSIcon from "../components/FSIcon.vue";
17
-
18
- export default defineComponent({
19
- name: "FSExternalIdentityButton",
20
- components: {
21
- FSButton,
22
- FSIcon
23
- },
24
- props: {
25
- scheme: {
26
- type: String as PropType<"OpenIdConnect" | "Google" | "Facebook">,
27
- required: false,
28
- default: null
29
- },
30
- invitation: {
31
- type: Boolean,
32
- required: false,
33
- default: false
34
- },
35
- token: {
36
- type: String,
37
- required: false,
38
- default: null
39
- }
40
- },
41
- setup(props) {
42
- const loginUrl = computed((): string => {
43
- if (props.invitation) {
44
- return buildURL(SIGNUP_EXTERNAL_URL(), { scheme: props.scheme, token: props.token });
45
- }
46
- return buildURL(LOGIN_EXTERNAL_URL(), { scheme: props.scheme });
47
- });
48
-
49
- const icon = computed((): string => {
50
- switch (props.scheme) {
51
- case "OpenIdConnect": return "mdi-microsoft";
52
- case "Google": return "mdi-google";
53
- case "Facebook": return "mdi-facebook";
54
- default: return "mdi-login";
55
- }
56
- });
57
-
58
- return {
59
- loginUrl,
60
- icon
61
- };
62
- }
63
- })
64
- </script>
@@ -1,140 +0,0 @@
1
- <template>
2
- <v-skeleton-loader
3
- v-if="fetching"
4
- type="image"
5
- :class="loadClasses"
6
- />
7
- <FSSelectField
8
- v-else
9
- itemValue="code"
10
- :class="classes"
11
- :items="entities"
12
- :modelValue="languageCode"
13
- :hideHeader="$props.hideHeader"
14
- @update:modelValue="setLanguageCode($event)"
15
- v-bind="$attrs"
16
- >
17
- <template #selection>
18
- <FSRow
19
- align="center-center"
20
- >
21
- <FSIcon size="l">
22
- {{ languageIcon }}
23
- </FSIcon>
24
- <FSSpan
25
- v-if="$props.withLabel"
26
- >
27
- {{ languageLabel }}
28
- </FSSpan>
29
- </FSRow>
30
- </template>
31
- <template #item="{ item, props }">
32
- <v-list-item v-bind="{ ...props, title: '' }">
33
- <FSRow
34
- align="center-left"
35
- width="hug"
36
- >
37
- <FSIcon size="l">
38
- {{ item.raw.icon }}
39
- </FSIcon>
40
- <FSSpan
41
- v-if="$props.withLabel"
42
- >
43
- {{ item.raw.label }}
44
- </FSSpan>
45
- </FSRow>
46
- </v-list-item>
47
- </template>
48
- </FSSelectField>
49
- </template>
50
-
51
- <script lang="ts">
52
- import { computed, defineComponent, onMounted } from "vue";
53
-
54
- import { useLanguageCode } from "@dative-gpi/foundation-shared-services/composables";
55
- import { useLanguages } from "@dative-gpi/foundation-core-services/composables";
56
-
57
- import FSSelectField from "../components/fields/FSSelectField.vue";
58
- import FSIcon from "../components/FSIcon.vue";
59
- import FSSpan from "../components/FSSpan.vue";
60
- import FSRow from "../components/FSRow.vue";
61
-
62
- export default defineComponent({
63
- name: "FSLanguageSet",
64
- components: {
65
- FSSelectField,
66
- FSIcon,
67
- FSSpan,
68
- FSRow
69
- },
70
- props: {
71
- withLabel: {
72
- type: Boolean,
73
- required: false,
74
- default: false
75
- },
76
- modelValue: {
77
- type: String,
78
- required: false,
79
- default: null
80
- },
81
- hideHeader: {
82
- type: Boolean,
83
- required: false,
84
- default: true
85
- }
86
- },
87
- emits: ["update:modelValue"],
88
- setup(props) {
89
- const { getMany, fetching, entities } = useLanguages();
90
- const { setLanguageCode, languageCode } = useLanguageCode();
91
-
92
- onMounted(() => {
93
- getMany();
94
- });
95
-
96
- const classes = computed((): string[] => {
97
- const innerClasses = ["fs-language-setter"];
98
- if (!props.withLabel) {
99
- innerClasses.push("fs-language-setter-icon");
100
- }
101
- return innerClasses;
102
- });
103
-
104
- const loadClasses = computed((): string[] => {
105
- const innerClasses = ["fs-load-language-setter"];
106
- if (!props.withLabel) {
107
- innerClasses.push("fs-load-language-setter-icon");
108
- }
109
- return innerClasses;
110
- });
111
-
112
- const languageIcon = computed((): string => {
113
- const language = entities.value.find((entity) => entity.code === languageCode.value);
114
- if (language) {
115
- return language.icon;
116
- }
117
- return "";
118
- });
119
-
120
- const languageLabel = computed((): string => {
121
- const language = entities.value.find((entity) => entity.code === languageCode.value);
122
- if (language) {
123
- return language.label;
124
- }
125
- return "";
126
- });
127
-
128
- return {
129
- classes,
130
- fetching,
131
- entities,
132
- loadClasses,
133
- languageCode,
134
- languageIcon,
135
- languageLabel,
136
- setLanguageCode
137
- };
138
- }
139
- });
140
- </script>