@dative-gpi/foundation-shared-components 0.0.118 → 0.1.120

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 (37) hide show
  1. package/components/FSBreadcrumbs.vue +1 -1
  2. package/components/FSButton.vue +1 -1
  3. package/components/FSChip.vue +1 -1
  4. package/components/FSClickable.vue +2 -2
  5. package/components/FSClock.vue +1 -7
  6. package/components/FSCol.vue +1 -1
  7. package/components/FSDialogForm.vue +141 -52
  8. package/components/FSDialogMultiForm.vue +39 -40
  9. package/components/FSDialogRemove.vue +2 -2
  10. package/components/FSDialogSubmit.vue +44 -39
  11. package/components/FSDivider.vue +1 -1
  12. package/components/FSSlideGroup.vue +1 -1
  13. package/components/FSTabs.vue +12 -12
  14. package/components/FSTagGroup.vue +28 -5
  15. package/components/FSText.vue +1 -1
  16. package/components/FSWrapGroup.vue +1 -1
  17. package/components/deviceOrganisations/FSStatusCard.vue +0 -1
  18. package/components/fields/FSAutocompleteField.vue +284 -106
  19. package/components/fields/FSDateRangeField.vue +2 -2
  20. package/components/fields/FSDateTimeRangeField.vue +5 -11
  21. package/components/fields/FSSelectField.vue +11 -3
  22. package/components/fields/FSTagField.vue +2 -2
  23. package/components/fields/FSTermField.vue +3 -1
  24. package/components/lists/FSDataTableUI.vue +1 -0
  25. package/components/tiles/FSDeviceOrganisationTileUI.vue +1 -1
  26. package/components/tiles/FSGroupTileUI.vue +1 -1
  27. package/components/tiles/FSSimpleIconTileUI.vue +1 -1
  28. package/components/tiles/FSUserOrganisationTileUI.vue +2 -2
  29. package/composables/useColors.ts +39 -49
  30. package/package.json +4 -4
  31. package/styles/components/fs_data_table.scss +100 -94
  32. package/styles/components/fs_dialog.scss +4 -3
  33. package/styles/components/fs_dialog_menu.scss +2 -2
  34. package/styles/components/fs_slider.scss +9 -1
  35. package/styles/components/fs_tabs.scss +5 -4
  36. package/styles/globals/overrides.scss +2 -2
  37. package/styles/globals/scrollbars.scss +46 -36
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSDialog
3
- :title="$props.title"
4
3
  :subtitle="$props.subtitle"
4
+ :title="$props.title"
5
5
  :width="$props.width"
6
6
  :modelValue="$props.modelValue"
7
7
  @update:modelValue="$emit('update:modelValue', $event)"
@@ -36,21 +36,22 @@
36
36
  :wrap="false"
37
37
  >
38
38
  <FSButton
39
- :prependIcon="$props.leftButtonPrependIcon"
40
- :label="cancelButtonLabel"
41
- :appendIcon="$props.leftButtonAppendIcon"
42
- :variant="$props.leftButtonVariant"
43
- :color="$props.leftButtonColor"
44
- @click="() => $emit('update:modelValue', false)"
39
+ :prependIcon="$props.cancelButtonPrependIcon"
40
+ :appendIcon="$props.cancelButtonAppendIcon"
41
+ :variant="$props.cancelButtonVariant"
42
+ :color="$props.cancelButtonColor"
43
+ :label="cancelLabel"
44
+ @click="$emit('update:modelValue', false)"
45
45
  />
46
46
  <FSButton
47
- :prependIcon="$props.rightButtonPrependIcon"
48
- :label="submitButtonLabel"
49
- :appendIcon="$props.rightButtonAppendIcon"
50
- :variant="$props.rightButtonVariant"
51
- :color="$props.rightButtonColor"
47
+ :prependIcon="$props.submitButtonPrependIcon"
48
+ :appendIcon="$props.submitButtonAppendIcon"
49
+ :variant="$props.submitButtonVariant"
50
+ :color="$props.submitButtonColor"
52
51
  :editable="$props.editable"
53
- @click="() => $emit('click:rightButton')"
52
+ :label="submitLabel"
53
+ :load="$props.load"
54
+ @click="$emit('click:submitButton')"
54
55
  />
55
56
  </FSRow>
56
57
  </FSRow>
@@ -100,55 +101,60 @@ export default defineComponent({
100
101
  required: false,
101
102
  default: false
102
103
  },
103
- leftButtonPrependIcon: {
104
+ cancelButtonPrependIcon: {
104
105
  type: String as PropType<string | null>,
105
106
  required: false,
106
107
  default: null
107
108
  },
108
- leftButtonLabel: {
109
+ cancelButtonLabel: {
109
110
  type: String as PropType<string | null>,
110
111
  required: false,
111
112
  default: null
112
113
  },
113
- leftButtonAppendIcon: {
114
+ cancelButtonAppendIcon: {
114
115
  type: String as PropType<string | null>,
115
116
  required: false,
116
117
  default: null
117
118
  },
118
- leftButtonVariant: {
119
+ cancelButtonVariant: {
119
120
  type: String as PropType<"standard" | "full" | "icon">,
120
121
  required: false,
121
122
  default: "standard"
122
123
  },
123
- rightButtonPrependIcon: {
124
+ cancelButtonColor: {
125
+ type: String as PropType<ColorBase>,
126
+ required: false,
127
+ default: ColorEnum.Light
128
+ },
129
+ submitButtonPrependIcon: {
124
130
  type: String as PropType<string | null>,
125
131
  required: false,
126
132
  default: null
127
133
  },
128
- rightButtonLabel: {
134
+ submitButtonLabel: {
129
135
  type: String as PropType<string | null>,
130
136
  required: false,
131
137
  default: null
132
138
  },
133
- rightButtonAppendIcon: {
139
+ submitButtonAppendIcon: {
134
140
  type: String as PropType<string | null>,
135
141
  required: false,
136
142
  default: null
137
143
  },
138
- rightButtonVariant: {
144
+ submitButtonVariant: {
139
145
  type: String as PropType<"standard" | "full" | "icon">,
140
146
  required: false,
141
147
  default: "full"
142
148
  },
143
- leftButtonColor: {
149
+ submitButtonColor: {
144
150
  type: String as PropType<ColorBase>,
145
151
  required: false,
146
- default: ColorEnum.Light
152
+ default: ColorEnum.Primary
147
153
  },
148
- rightButtonColor: {
149
- type: String as PropType<ColorBase>,
154
+ load: {
155
+ type: Boolean,
150
156
  required: false,
151
- default: ColorEnum.Primary
157
+ default: false
152
158
  },
153
159
  editable: {
154
160
  type: Boolean,
@@ -156,31 +162,30 @@ export default defineComponent({
156
162
  default: true
157
163
  }
158
164
  },
159
- emits: ["update:modelValue", "click:rightButton"],
165
+ emits: ["update:modelValue", "click:submitButton"],
160
166
  setup(props) {
161
167
  const { isMobileSized } = useBreakpoints();
162
168
  const { $tr } = useTranslationsProvider();
163
169
 
164
170
  const height = computed(() => {
165
- const other = 24 + 24 // Paddings
166
- + (props.title ? isMobileSized.value ? 24 : 32 : 0) // Title
167
- + (props.subtitle ? isMobileSized.value ? 14 + 8 : 16 + 8 : 0) // Subtitle
168
- + (isMobileSized.value ? 36 : 40) // Footer
169
- + 64; // Debug mask
170
- return `calc(90vh - ${other}px)`;
171
+ const other = 24 + 24 // Paddings
172
+ + (isMobileSized.value ? 24 : 32) + 24 // Title
173
+ + (props.subtitle ? (isMobileSized.value ? 14 : 16) + 8 : 0) // Subtitle
174
+ + (isMobileSized.value ? 36 : 40) + 24; // Footer
175
+ return `calc(100vh - 40px - ${other}px)`;
171
176
  });
172
177
 
173
- const cancelButtonLabel = computed(() => {
174
- return props.leftButtonLabel ?? $tr("ui.button.cancel", "Cancel");
178
+ const cancelLabel = computed(() => {
179
+ return props.cancelButtonLabel ?? $tr("ui.button.cancel", "Cancel");
175
180
  });
176
181
 
177
- const submitButtonLabel = computed(() => {
178
- return props.rightButtonLabel ?? $tr("ui.button.validate", "Validate");
182
+ const submitLabel = computed(() => {
183
+ return props.submitButtonLabel ?? $tr("ui.button.validate", "Validate");
179
184
  });
180
185
 
181
186
  return {
182
- cancelButtonLabel,
183
- submitButtonLabel,
187
+ cancelLabel,
188
+ submitLabel,
184
189
  ColorEnum,
185
190
  height
186
191
  };
@@ -19,7 +19,7 @@
19
19
  :style="style"
20
20
  />
21
21
  <FSText
22
- variant="light"
22
+ variant="soft"
23
23
  :font="$props.font"
24
24
  >
25
25
  <slot>
@@ -91,7 +91,7 @@ export default defineComponent({
91
91
  const style = computed((): { [key: string] : string | null | undefined } => ({
92
92
  "--fs-group-padding" : sizeToVar(props.padding),
93
93
  "--fs-group-gap" : sizeToVar(props.gap),
94
- "--fs-group-color" : darks.light,
94
+ "--fs-group-color" : darks.soft,
95
95
  "--fs-group-hover-color" : darks.dark
96
96
  }));
97
97
 
@@ -1,17 +1,18 @@
1
1
  <template>
2
2
  <v-tabs
3
- class="fs-tabs"
4
3
  selectedClass="fs-tab-active"
5
- :grow="true"
6
- :style="style"
7
- :showArrows="true"
4
+ class="fs-tabs"
8
5
  :sliderColor="$props.color"
6
+ :showArrows="true"
7
+ :style="style"
8
+ :grow="true"
9
9
  :modelValue="$props.tab"
10
- @update:modelValue="(value) => $emit('update:tab', value)"
10
+ @update:modelValue="$emit('update:tab', $event)"
11
11
  v-bind="$attrs"
12
12
  >
13
13
  <template
14
- v-for="component in getChildren()"
14
+ v-for="(component, index) in getChildren()"
15
+ :key="index"
15
16
  >
16
17
  <component
17
18
  :is="component"
@@ -45,16 +46,15 @@ export default defineComponent({
45
46
  const { getColors } = useColors();
46
47
 
47
48
  const colors = computed(() => getColors(props.color));
49
+ const lights = getColors(ColorEnum.Light);
48
50
  const darks = getColors(ColorEnum.Dark);
49
51
 
50
52
  const style = computed((): { [key: string] : string | null | undefined } => ({
51
- "--fs-group-color" : darks.base,
52
- "--fs-group-disabled-color" : darks.light,
53
- "--fs-group-hover-background-color": colors.value.light,
53
+ "--fs-group-color" : darks.soft,
54
54
  "--fs-group-hover-color" : darks.dark,
55
- "--fs-group-light" : colors.value.light,
56
- "--fs-group-base" : colors.value.base,
57
- "--fs-group-dark" : colors.value.dark,
55
+ "--fs-tab-border-color" : lights.dark,
56
+ "--fs-tab-hover-border-color" : darks.dark,
57
+ "--fs-tab-active-background-color" : colors.value.light,
58
58
  "--fs-tab-tag-background-color" : colors.value.base,
59
59
  "--fs-tab-tag-color" : colors.value.baseContrast
60
60
  }));
@@ -1,16 +1,34 @@
1
1
  <template>
2
- <FSWrapGroup v-bind="$attrs">
2
+ <FSWrapGroup
3
+ v-if="$props.variant === 'wrap'"
4
+ v-bind="$attrs"
5
+ >
3
6
  <FSTag
4
7
  v-for="(tag, index) in $props.tags"
5
- :key="index"
6
- :label="tag"
7
- :variant="$props.variant"
8
- :color="$props.color"
8
+ :variant="$props.tagVariant"
9
9
  :editable="$props.editable"
10
+ :color="$props.color"
11
+ :label="tag"
12
+ :key="index"
10
13
  @remove="() => $emit('remove', tag)"
11
14
  />
12
15
  <slot />
13
16
  </FSWrapGroup>
17
+ <FSSlideGroup
18
+ v-if="$props.variant === 'slide'"
19
+ v-bind="$attrs"
20
+ >
21
+ <FSTag
22
+ v-for="(tag, index) in $props.tags"
23
+ :variant="$props.tagVariant"
24
+ :editable="$props.editable"
25
+ :color="$props.color"
26
+ :label="tag"
27
+ :key="index"
28
+ @remove="() => $emit('remove', tag)"
29
+ />
30
+ <slot />
31
+ </FSSlideGroup>
14
32
  </template>
15
33
 
16
34
  <script lang="ts">
@@ -34,6 +52,11 @@ export default defineComponent({
34
52
  default: () => []
35
53
  },
36
54
  variant: {
55
+ type: String as PropType<"wrap" | "slide">,
56
+ required: false,
57
+ default: "wrap"
58
+ },
59
+ tagVariant: {
37
60
  type: String as PropType<"standard" | "full">,
38
61
  required: false,
39
62
  default: "full"
@@ -45,7 +45,7 @@ export default defineComponent({
45
45
  default: ColorEnum.Dark
46
46
  },
47
47
  variant: {
48
- type: String as PropType<"base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
48
+ type: String as PropType<"base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast" | "soft" | "softContrast">,
49
49
  required: false,
50
50
  default: "base"
51
51
  }
@@ -54,7 +54,7 @@ export default defineComponent({
54
54
  const style = computed((): { [key: string] : string | null | undefined } => ({
55
55
  "--fs-group-padding" : sizeToVar(props.padding),
56
56
  "--fs-group-gap" : sizeToVar(props.gap),
57
- "--fs-group-color" : darks.light,
57
+ "--fs-group-color" : darks.soft,
58
58
  "--fs-group-hover-color": darks.dark
59
59
  }));
60
60
 
@@ -50,7 +50,6 @@
50
50
  </FSSpan>
51
51
  </FSRow>
52
52
  </FSCol>
53
-
54
53
  </FSCol>
55
54
  <FSRow
56
55
  v-if="deviceTimestamp"