@dative-gpi/foundation-shared-components 1.0.56 → 1.0.58-groupings
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/assets/images/map/snow.png +0 -0
- package/components/FSAccordionPanel.vue +40 -21
- package/components/FSBreadcrumbs.vue +21 -12
- package/components/FSButton.vue +16 -16
- package/components/FSCalendar.vue +50 -12
- package/components/FSCalendarTwin.vue +95 -43
- package/components/FSCard.vue +61 -9
- package/components/FSCardPlaceholder.vue +8 -5
- package/components/FSCheckbox.vue +5 -4
- package/components/FSChip.vue +73 -45
- package/components/FSChipGroup.vue +69 -0
- package/components/FSClickable.vue +11 -9
- package/components/FSClock.vue +30 -12
- package/components/FSCol.vue +11 -5
- package/components/FSColorIcon.vue +23 -5
- package/components/FSDialog.vue +2 -1
- package/components/FSDialogContent.vue +12 -11
- package/components/FSDialogForm.vue +22 -2
- package/components/FSDialogFormBody.vue +50 -31
- package/components/FSDialogMenu.vue +17 -8
- package/components/FSDialogMultiFormBody.vue +79 -56
- package/components/FSDialogRemove.vue +7 -8
- package/components/FSDialogSubmit.vue +20 -11
- package/components/FSEditImage.vue +1 -1
- package/components/FSEditImageUI.vue +20 -10
- package/components/FSFadeOut.vue +53 -21
- package/components/FSForm.vue +10 -8
- package/components/FSGrid.vue +1 -1
- package/components/FSIcon.vue +4 -3
- package/components/FSIconCard.vue +68 -12
- package/components/FSImage.vue +9 -2
- package/components/FSImageUI.vue +8 -15
- package/components/FSInformationsMenu.vue +142 -0
- package/components/FSInstantPicker.vue +269 -0
- package/components/FSLink.vue +25 -9
- package/components/FSLoader.vue +28 -10
- package/components/FSMenu.vue +47 -0
- package/components/FSOptionGroup.vue +57 -9
- package/components/FSOptionItem.vue +4 -4
- package/components/FSPagination.vue +1 -1
- package/components/FSPlayButtons.vue +72 -0
- package/components/FSProgressBar.vue +94 -0
- package/components/FSRadio.vue +5 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSRouterLink.vue +42 -0
- package/components/FSSlideGroup.vue +19 -5
- package/components/FSSlider.vue +6 -5
- package/components/FSSpan.vue +12 -7
- package/components/FSSwitch.vue +47 -21
- package/components/FSTab.vue +15 -13
- package/components/FSTabs.vue +32 -7
- package/components/FSTag.vue +16 -5
- package/components/FSTagGroup.vue +4 -4
- package/components/FSText.vue +11 -7
- package/components/FSToggleSet.vue +7 -7
- package/components/FSWindow.vue +122 -5
- package/components/FSWrapGroup.vue +13 -1
- package/components/agenda/FSAgenda.vue +50 -37
- package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
- package/components/agenda/FSAgendaHeader.vue +35 -10
- package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
- package/components/agenda/FSAgendaHoursRow.vue +48 -8
- package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
- package/components/agenda/FSDayAgenda.vue +1 -2
- package/components/agenda/FSMonthAgenda.vue +3 -9
- package/components/agenda/FSSelectAgendaMode.vue +2 -2
- package/components/agenda/FSWeekAgenda.vue +7 -13
- package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
- package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
- package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
- package/components/buttons/FSButtonAdd.vue +1 -1
- package/components/buttons/FSButtonAddLabel.vue +1 -1
- package/components/buttons/FSButtonCancel.vue +1 -1
- package/components/buttons/FSButtonCancelLabel.vue +1 -1
- package/components/buttons/FSButtonCheckbox.vue +4 -4
- package/components/buttons/FSButtonCopy.vue +1 -1
- package/components/buttons/FSButtonCopyLabel.vue +1 -1
- package/components/buttons/FSButtonDuplicate.vue +1 -1
- package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
- package/components/buttons/FSButtonEdit.vue +1 -1
- package/components/buttons/FSButtonEditLabel.vue +1 -1
- package/components/buttons/FSButtonFile.vue +1 -1
- package/components/buttons/FSButtonFileLabel.vue +1 -1
- package/components/buttons/FSButtonNext.vue +1 -1
- package/components/buttons/FSButtonNextLabel.vue +1 -1
- package/components/buttons/FSButtonPrevious.vue +1 -1
- package/components/buttons/FSButtonPreviousLabel.vue +1 -1
- package/components/buttons/FSButtonRedo.vue +1 -1
- package/components/buttons/FSButtonRedoLabel.vue +1 -1
- package/components/buttons/FSButtonRemove.vue +1 -1
- package/components/buttons/FSButtonRemoveLabel.vue +1 -1
- package/components/buttons/FSButtonSave.vue +1 -1
- package/components/buttons/FSButtonSaveLabel.vue +1 -1
- package/components/buttons/FSButtonSearch.vue +1 -1
- package/components/buttons/FSButtonSearchLabel.vue +1 -1
- package/components/buttons/FSButtonUndo.vue +1 -1
- package/components/buttons/FSButtonUndoLabel.vue +1 -1
- package/components/buttons/FSButtonUpdate.vue +1 -1
- package/components/buttons/FSButtonUpdateLabel.vue +1 -1
- package/components/buttons/FSButtonValidate.vue +1 -1
- package/components/buttons/FSButtonValidateLabel.vue +1 -1
- package/components/calendar/FSSimpleCalendar.vue +145 -0
- package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
- package/components/calendar/FSSimpleMonthSelector.vue +138 -0
- package/components/deviceOrganisations/FSConnectivity.vue +16 -4
- package/components/deviceOrganisations/FSConnectivityCard.vue +17 -45
- package/components/deviceOrganisations/FSStatus.vue +16 -4
- package/components/deviceOrganisations/FSStatusCard.vue +33 -59
- package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
- package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +8 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +37 -42
- package/components/deviceOrganisations/FSWorstAlertCard.vue +35 -84
- package/components/fields/FSAutocompleteField.vue +85 -82
- package/components/fields/FSAutocompleteTag.vue +1 -1
- package/components/fields/FSBaseField.vue +54 -30
- package/components/fields/FSClosableSearchField.vue +83 -0
- package/components/fields/FSColorField.vue +48 -44
- package/components/fields/FSCommentField.vue +28 -16
- package/components/fields/FSDateField.vue +13 -10
- package/components/fields/FSDateRangeField.vue +6 -5
- package/components/fields/FSDateTimeField.vue +14 -11
- package/components/fields/FSDateTimeRangeDialog.vue +160 -0
- package/components/fields/FSDateTimeRangeField.vue +23 -115
- package/components/fields/FSEntityFieldUI.vue +36 -19
- package/components/fields/FSGradientField.vue +5 -5
- package/components/fields/FSIconField.vue +16 -9
- package/components/fields/FSMagicConfigField.vue +15 -7
- package/components/fields/FSMagicField.vue +7 -2
- package/components/fields/FSNumberField.vue +9 -4
- package/components/fields/FSPasswordField.vue +7 -7
- package/components/fields/FSRichTextField.vue +78 -58
- package/components/fields/FSSearchField.vue +9 -115
- package/components/fields/FSSelectField.vue +69 -71
- package/components/fields/FSTagField.vue +10 -10
- package/components/fields/FSTermField.vue +72 -47
- package/components/fields/FSTextArea.vue +17 -11
- package/components/fields/FSTextField.vue +15 -10
- package/components/fields/FSTimeField.vue +14 -10
- package/components/fields/FSTimeRangeField.vue +310 -0
- package/components/fields/FSTimeStepField.vue +5 -5
- package/components/fields/FSTranslateField.vue +10 -10
- package/components/fields/FSTranslateRichTextField.vue +41 -20
- package/components/fields/FSTranslateTextArea.vue +10 -10
- package/components/fields/FSTreeViewField.vue +15 -13
- package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
- package/components/fields/periodicField/FSPeriodicField.vue +15 -15
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
- package/components/lists/FSDataIteratorItem.vue +23 -67
- package/components/lists/FSDataTableUI.vue +220 -137
- package/components/lists/FSDraggable.vue +2 -2
- package/components/lists/FSFilterButton.vue +14 -16
- package/components/lists/FSHeaderButton.vue +11 -9
- package/components/lists/FSHiddenButton.vue +9 -9
- package/components/lists/FSLoadDataTable.vue +10 -7
- package/components/lists/FSSimpleList.vue +96 -102
- package/components/lists/FSSimpleListItem.vue +131 -0
- package/components/map/FSMap.vue +146 -158
- package/components/map/FSMapFeatureGroup.vue +7 -1
- package/components/map/FSMapLayerButton.vue +4 -3
- package/components/map/FSMapMarker.vue +70 -48
- package/components/map/FSMapMarkerClusterGroup.vue +32 -7
- package/components/map/FSMapOverlay.vue +44 -24
- package/components/map/FSMapPolygon.vue +16 -4
- package/components/map/FSMapTileLayer.vue +26 -9
- package/components/map/layers.ts +0 -0
- package/components/selects/FSSelectAutoRefresh.vue +8 -8
- package/components/selects/FSSelectDashboardVariableType.vue +4 -3
- package/components/selects/FSSelectDateSetting.vue +2 -2
- package/components/selects/FSSelectDays.vue +8 -8
- package/components/selects/FSSelectListMode.vue +2 -2
- package/components/selects/FSSelectMapLayer.vue +68 -0
- package/components/selects/FSSelectMonths.vue +13 -13
- package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
- package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
- package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
- package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
- package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
- package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
- package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
- package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
- package/components/tiles/FSAlertTileUI.vue +90 -0
- package/components/tiles/FSChartTileUI.vue +61 -52
- package/components/tiles/FSCommentTileUI.vue +38 -13
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
- package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
- package/components/tiles/FSDeviceOrganisationTileUI.vue +6 -6
- package/components/tiles/FSGroupTileUI.vue +58 -110
- package/components/tiles/FSGroupingTileUI.vue +115 -0
- package/components/tiles/FSLoadTile.vue +16 -10
- package/components/tiles/FSLocationTileUI.vue +63 -55
- package/components/tiles/FSModelTileUI.vue +5 -46
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
- package/components/tiles/FSSimpleTileUI.vue +34 -29
- package/components/tiles/FSTile.vue +46 -39
- package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSBaseView.vue +64 -0
- package/components/views/FSEntityView.vue +12 -140
- package/components/views/FSSimpleView.vue +29 -0
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
- package/components/views/desktop/FSBaseDesktopView.vue +53 -0
- package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
- package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
- package/components/views/mobile/FSBaseMobileView.vue +53 -0
- package/composables/index.ts +1 -0
- package/composables/useAddress.ts +40 -8
- package/composables/useBreakpoints.ts +40 -4
- package/composables/useColors.ts +16 -7
- package/composables/useMagicFieldProvider.ts +1 -0
- package/composables/useMapLayers.ts +62 -0
- package/composables/useSlots.ts +2 -1
- package/models/colors.ts +2 -1
- package/models/deviceAlerts.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +12 -10
- package/models/rules.ts +6 -3
- package/models/tables.ts +5 -2
- package/models/variableNode.ts +8 -5
- package/package.json +5 -5
- package/styles/components/fs_agenda.scss +4 -0
- package/styles/components/fs_agenda_event.scss +1 -1
- package/styles/components/fs_agenda_hours_row.scss +0 -8
- package/styles/components/fs_autocomplete_field.scss +0 -13
- package/styles/components/fs_breadcrumbs.scss +18 -36
- package/styles/components/fs_button.scss +7 -5
- package/styles/components/fs_calendar.scss +1 -0
- package/styles/components/fs_card.scss +9 -0
- package/styles/components/fs_chip.scss +13 -7
- package/styles/components/fs_clickable.scss +16 -23
- package/styles/components/fs_clock.scss +0 -10
- package/styles/components/fs_col.scss +1 -1
- package/styles/components/fs_color_field.scss +1 -4
- package/styles/components/fs_data_table.scss +6 -9
- package/styles/components/fs_dialog.scss +4 -10
- package/styles/components/fs_dialog_menu.scss +4 -2
- package/styles/components/fs_draggable.scss +0 -5
- package/styles/components/fs_edit_image.scss +8 -0
- package/styles/components/fs_fade_out.scss +10 -2
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_hidden_button.scss +2 -7
- package/styles/components/fs_image_card.scss +6 -4
- package/styles/components/fs_magic_config_field.scss +1 -2
- package/styles/components/fs_map.scss +57 -17
- package/styles/components/fs_meta_field.scss +3 -5
- package/styles/components/fs_option_group.scss +15 -5
- package/styles/components/fs_password_field.scss +4 -2
- package/styles/components/fs_progress_bar.scss +14 -0
- package/styles/components/fs_radio.scss +0 -11
- package/styles/components/fs_rich_text_field.scss +1 -10
- package/styles/components/fs_select_field.scss +4 -13
- package/styles/components/fs_slide_group.scss +7 -0
- package/styles/components/fs_span.scss +13 -5
- package/styles/components/fs_status_rich_card.scss +6 -0
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +19 -33
- package/styles/components/fs_tag.scss +8 -22
- package/styles/components/fs_text_area.scss +2 -21
- package/styles/components/fs_tile.scss +0 -19
- package/styles/components/fs_window.scss +3 -1
- package/styles/components/fs_wrap_group.scss +7 -0
- package/styles/components/index.scss +2 -6
- package/styles/globals/index.scss +1 -5
- package/styles/globals/overrides.scss +28 -61
- package/styles/globals/scrollbars.scss +8 -0
- package/styles/globals/text_fonts.scss +18 -66
- package/styles/globals/touchscreen.scss +2 -2
- package/tools/alertsTools.ts +87 -12
- package/tools/chartsTools.ts +143 -16
- package/tools/index.ts +3 -1
- package/tools/reportsTools.ts +38 -0
- package/tools/timeRangeTools.ts +125 -0
- package/utils/badge.ts +9 -5
- package/utils/filter.ts +7 -4
- package/utils/index.ts +1 -0
- package/utils/leafletMarkers.ts +4 -4
- package/utils/operations.ts +108 -0
- package/utils/sort.ts +2 -2
- package/utils/time.ts +16 -16
- package/components/fields/FSTimeSlotField.vue +0 -250
- package/components/views/FSEntityHeader.vue +0 -350
- package/components/views/FSListHeader.vue +0 -83
- package/components/views/FSListView.vue +0 -83
- package/components/views/FSSkeletonView.vue +0 -100
- package/styles/components/fs_data_iterator_item.scss +0 -33
- package/styles/components/fs_icon_field.scss +0 -12
- package/styles/components/fs_search_field.scss +0 -3
- package/styles/components/fs_tag_field.scss +0 -8
- package/styles/components/fs_time_field.scss +0 -12
- package/styles/components/fs_timeslot_field.scss +0 -12
- package/styles/globals/breakpoints.scss +0 -20
- package/styles/globals/fixes.scss +0 -5
package/components/FSCard.vue
CHANGED
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
</FSRow>
|
|
31
31
|
</FSCol>
|
|
32
32
|
</slot>
|
|
33
|
+
<FSRow
|
|
34
|
+
v-if="$slots['top-right']"
|
|
35
|
+
class="fs-card-top-right"
|
|
36
|
+
>
|
|
37
|
+
<slot
|
|
38
|
+
name="top-right"
|
|
39
|
+
/>
|
|
40
|
+
</FSRow>
|
|
33
41
|
</div>
|
|
34
42
|
</template>
|
|
35
43
|
|
|
@@ -60,6 +68,11 @@ export default defineComponent({
|
|
|
60
68
|
required: false,
|
|
61
69
|
default: null
|
|
62
70
|
},
|
|
71
|
+
maxWidth: {
|
|
72
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
73
|
+
required: false,
|
|
74
|
+
default: null
|
|
75
|
+
},
|
|
63
76
|
padding: {
|
|
64
77
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
65
78
|
required: false,
|
|
@@ -95,17 +108,27 @@ export default defineComponent({
|
|
|
95
108
|
required: false,
|
|
96
109
|
default: "solid"
|
|
97
110
|
},
|
|
111
|
+
borderColor: {
|
|
112
|
+
type: [Array, String] as PropType<ColorBase | null | string>,
|
|
113
|
+
required: false,
|
|
114
|
+
default: null
|
|
115
|
+
},
|
|
98
116
|
elevation: {
|
|
99
117
|
type: Boolean,
|
|
100
118
|
required: false,
|
|
101
119
|
default: false
|
|
120
|
+
},
|
|
121
|
+
topRightPadding: {
|
|
122
|
+
type: [String, Number],
|
|
123
|
+
required: false,
|
|
124
|
+
default: "4px"
|
|
102
125
|
}
|
|
103
126
|
},
|
|
104
127
|
setup(props) {
|
|
105
128
|
const { getColors, getGradients } = useColors();
|
|
106
129
|
|
|
107
130
|
const colors = computed(() => {
|
|
108
|
-
if(Array.isArray(props.color)) {
|
|
131
|
+
if (Array.isArray(props.color)) {
|
|
109
132
|
return getColors(props.color[0]);
|
|
110
133
|
}
|
|
111
134
|
return getColors(props.color);
|
|
@@ -115,6 +138,27 @@ export default defineComponent({
|
|
|
115
138
|
const lights = getColors(ColorEnum.Light);
|
|
116
139
|
const darks = getColors(ColorEnum.Dark);
|
|
117
140
|
|
|
141
|
+
const borderColor = computed((): ColorBase => {
|
|
142
|
+
if (props.borderColor) {
|
|
143
|
+
return getColors(props.borderColor).base;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
switch (props.variant) {
|
|
147
|
+
case "background":
|
|
148
|
+
return lights.dark;
|
|
149
|
+
case "standard" :
|
|
150
|
+
if (Array.isArray(props.color)) {
|
|
151
|
+
return colors.value.lightContrast!;
|
|
152
|
+
}
|
|
153
|
+
if (([ColorEnum.Background, ColorEnum.Light, ColorEnum.Dark] as ColorBase[]).includes(props.color)) {
|
|
154
|
+
return lights.dark;
|
|
155
|
+
}
|
|
156
|
+
return colors.value.lightContrast!;
|
|
157
|
+
case "full" : return colors.value.base;
|
|
158
|
+
case "gradient" : return colors.value.lightContrast!;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
118
162
|
const style = computed((): StyleValue => {
|
|
119
163
|
switch (props.variant) {
|
|
120
164
|
case "background": return {
|
|
@@ -124,9 +168,11 @@ export default defineComponent({
|
|
|
124
168
|
"--fs-card-padding" : sizeToVar(props.padding),
|
|
125
169
|
"--fs-card-height" : sizeToVar(props.height),
|
|
126
170
|
"--fs-card-width" : sizeToVar(props.width),
|
|
171
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
127
172
|
"--fs-card-background-color": backgrounds.base,
|
|
128
|
-
"--fs-card-border-color" :
|
|
129
|
-
"--fs-card-color" : darks.base
|
|
173
|
+
"--fs-card-border-color" : borderColor.value,
|
|
174
|
+
"--fs-card-color" : darks.base,
|
|
175
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
130
176
|
}
|
|
131
177
|
case "standard": return {
|
|
132
178
|
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
@@ -135,9 +181,11 @@ export default defineComponent({
|
|
|
135
181
|
"--fs-card-padding" : sizeToVar(props.padding),
|
|
136
182
|
"--fs-card-height" : sizeToVar(props.height),
|
|
137
183
|
"--fs-card-width" : sizeToVar(props.width),
|
|
184
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
138
185
|
"--fs-card-background-color": colors.value.light,
|
|
139
|
-
"--fs-card-border-color" :
|
|
140
|
-
"--fs-card-color" : colors.value.lightContrast
|
|
186
|
+
"--fs-card-border-color" : borderColor.value,
|
|
187
|
+
"--fs-card-color" : colors.value.lightContrast!,
|
|
188
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
141
189
|
}
|
|
142
190
|
case "full": return {
|
|
143
191
|
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
@@ -146,9 +194,11 @@ export default defineComponent({
|
|
|
146
194
|
"--fs-card-padding" : sizeToVar(props.padding),
|
|
147
195
|
"--fs-card-height" : sizeToVar(props.height),
|
|
148
196
|
"--fs-card-width" : sizeToVar(props.width),
|
|
197
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
149
198
|
"--fs-card-background-color": colors.value.base,
|
|
150
|
-
"--fs-card-border-color" :
|
|
151
|
-
"--fs-card-color" : colors.value.baseContrast
|
|
199
|
+
"--fs-card-border-color" : borderColor.value,
|
|
200
|
+
"--fs-card-color" : colors.value.baseContrast!,
|
|
201
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
152
202
|
}
|
|
153
203
|
case "gradient": return {
|
|
154
204
|
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
@@ -157,9 +207,11 @@ export default defineComponent({
|
|
|
157
207
|
"--fs-card-padding" : sizeToVar(props.padding),
|
|
158
208
|
"--fs-card-height" : sizeToVar(props.height),
|
|
159
209
|
"--fs-card-width" : sizeToVar(props.width),
|
|
210
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
160
211
|
"--fs-card-background-color": gradients.value.base,
|
|
161
|
-
"--fs-card-border-color" :
|
|
162
|
-
"--fs-card-color" : colors.value.lightContrast
|
|
212
|
+
"--fs-card-border-color" : borderColor.value,
|
|
213
|
+
"--fs-card-color" : colors.value.lightContrast!,
|
|
214
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
163
215
|
}
|
|
164
216
|
}
|
|
165
217
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="$attrs.onClick ? FSClickable : FSCard"
|
|
3
4
|
borderStyle="dashed"
|
|
4
5
|
padding="24px"
|
|
5
6
|
:height="$props.height"
|
|
6
7
|
:width="$props.width"
|
|
7
8
|
:border="true"
|
|
8
|
-
@click="$emit('click')"
|
|
9
9
|
v-bind="$attrs"
|
|
10
10
|
>
|
|
11
11
|
<FSRow
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{{ $props.label }}
|
|
27
27
|
</FSText>
|
|
28
28
|
</FSRow>
|
|
29
|
-
</
|
|
29
|
+
</component>
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script lang="ts">
|
|
@@ -35,6 +35,7 @@ import { defineComponent, type PropType } from "vue";
|
|
|
35
35
|
import { ColorEnum } from "../models";
|
|
36
36
|
|
|
37
37
|
import FSClickable from "./FSClickable.vue";
|
|
38
|
+
import FSCard from "./FSCard.vue";
|
|
38
39
|
import FSIcon from "./FSIcon.vue";
|
|
39
40
|
import FSText from "./FSText.vue";
|
|
40
41
|
import FSRow from "./FSRow.vue";
|
|
@@ -43,6 +44,7 @@ export default defineComponent({
|
|
|
43
44
|
name: "FSCardPlaceholder",
|
|
44
45
|
components: {
|
|
45
46
|
FSClickable,
|
|
47
|
+
FSCard,
|
|
46
48
|
FSIcon,
|
|
47
49
|
FSText,
|
|
48
50
|
FSRow
|
|
@@ -69,10 +71,11 @@ export default defineComponent({
|
|
|
69
71
|
default: null
|
|
70
72
|
}
|
|
71
73
|
},
|
|
72
|
-
emits: ["click"],
|
|
73
74
|
setup() {
|
|
74
75
|
return {
|
|
75
|
-
ColorEnum
|
|
76
|
+
ColorEnum,
|
|
77
|
+
FSClickable,
|
|
78
|
+
FSCard,
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
});
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
v-if="$props.description"
|
|
51
51
|
class="fs-checkbox-description"
|
|
52
52
|
font="text-overline"
|
|
53
|
+
:lineClamp="2"
|
|
53
54
|
:style="style"
|
|
54
55
|
>
|
|
55
56
|
{{ $props.description }}
|
|
@@ -113,10 +114,10 @@ export default defineComponent({
|
|
|
113
114
|
required: false,
|
|
114
115
|
default: null
|
|
115
116
|
},
|
|
116
|
-
|
|
117
|
+
disabled: {
|
|
117
118
|
type: Boolean,
|
|
118
119
|
required: false,
|
|
119
|
-
default:
|
|
120
|
+
default: false
|
|
120
121
|
}
|
|
121
122
|
},
|
|
122
123
|
emits: ["update:modelValue"],
|
|
@@ -130,7 +131,7 @@ export default defineComponent({
|
|
|
130
131
|
const darks = getColors(ColorEnum.Dark);
|
|
131
132
|
|
|
132
133
|
const style = computed((): StyleValue => {
|
|
133
|
-
if (
|
|
134
|
+
if (props.disabled) {
|
|
134
135
|
return {
|
|
135
136
|
"--fs-checkbox-cursor" : "default",
|
|
136
137
|
"--fs-checkbox-checkbox-color": (props.modelValue || props.indeterminate) ? colors.value.light : lights.base,
|
|
@@ -158,7 +159,7 @@ export default defineComponent({
|
|
|
158
159
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
159
160
|
|
|
160
161
|
const onToggle = (): void => {
|
|
161
|
-
if (
|
|
162
|
+
if (props.disabled) {
|
|
162
163
|
return;
|
|
163
164
|
}
|
|
164
165
|
emit("update:modelValue", !props.modelValue);
|
package/components/FSChip.vue
CHANGED
|
@@ -1,50 +1,58 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
:wrap="false"
|
|
8
|
-
v-bind="$attrs"
|
|
2
|
+
<component
|
|
3
|
+
:is="$props.to && $props.clickable ? 'FSRouterLink' : 'div'"
|
|
4
|
+
class="fs-chip-container"
|
|
5
|
+
v-bind="$props.to ? { to: $props.to } : {}"
|
|
6
|
+
@click="$emit('click', $event)"
|
|
9
7
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
<FSRow
|
|
9
|
+
:align="$props.align"
|
|
10
|
+
:width="$props.width"
|
|
11
|
+
:class="classes"
|
|
12
|
+
:style="style"
|
|
13
|
+
:wrap="false"
|
|
14
|
+
v-bind="$attrs"
|
|
13
15
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
<slot
|
|
17
|
+
name="prepend"
|
|
18
|
+
v-bind="{ color: $props.color, colors }"
|
|
17
19
|
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class="fs-chip-label"
|
|
20
|
+
<FSIcon
|
|
21
|
+
v-if="$props.prependIcon"
|
|
22
|
+
size="s"
|
|
23
|
+
>
|
|
24
|
+
{{ $props.prependIcon }}
|
|
25
|
+
</FSIcon>
|
|
26
|
+
</slot>
|
|
27
|
+
<slot
|
|
28
|
+
v-bind="{ color: $props.color, colors }"
|
|
28
29
|
>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
<FSSpan
|
|
31
|
+
v-if="$props.label"
|
|
32
|
+
font="text-overline"
|
|
33
|
+
class="fs-chip-label"
|
|
34
|
+
>
|
|
35
|
+
{{ $props.label }}
|
|
36
|
+
</FSSpan>
|
|
37
|
+
</slot>
|
|
38
|
+
<slot
|
|
39
|
+
name="append"
|
|
40
|
+
v-bind="{ color: $props.color, colors }"
|
|
39
41
|
>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
<FSIcon
|
|
43
|
+
v-if="$props.appendIcon"
|
|
44
|
+
size="s"
|
|
45
|
+
>
|
|
46
|
+
{{ $props.appendIcon }}
|
|
47
|
+
</FSIcon>
|
|
48
|
+
</slot>
|
|
49
|
+
</FSRow>
|
|
50
|
+
</component>
|
|
44
51
|
</template>
|
|
45
52
|
|
|
46
53
|
<script lang="ts">
|
|
47
54
|
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
55
|
+
import { type RouteLocation } from "vue-router";
|
|
48
56
|
|
|
49
57
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
50
58
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -53,10 +61,12 @@ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
|
53
61
|
import FSIcon from "./FSIcon.vue";
|
|
54
62
|
import FSSpan from "./FSSpan.vue";
|
|
55
63
|
import FSRow from "./FSRow.vue";
|
|
64
|
+
import FSRouterLink from '@dative-gpi/foundation-shared-components/components/FSRouterLink.vue';
|
|
56
65
|
|
|
57
66
|
export default defineComponent({
|
|
58
67
|
name: "FSChip",
|
|
59
68
|
components: {
|
|
69
|
+
FSRouterLink,
|
|
60
70
|
FSIcon,
|
|
61
71
|
FSSpan,
|
|
62
72
|
FSRow
|
|
@@ -82,6 +92,11 @@ export default defineComponent({
|
|
|
82
92
|
required: false,
|
|
83
93
|
default: () => [24, 20]
|
|
84
94
|
},
|
|
95
|
+
width: {
|
|
96
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
97
|
+
required: false,
|
|
98
|
+
default: "hug"
|
|
99
|
+
},
|
|
85
100
|
variant: {
|
|
86
101
|
type: String as PropType<"standard" | "full" | "borderless">,
|
|
87
102
|
required: false,
|
|
@@ -92,12 +107,24 @@ export default defineComponent({
|
|
|
92
107
|
required: false,
|
|
93
108
|
default: ColorEnum.Primary
|
|
94
109
|
},
|
|
95
|
-
|
|
110
|
+
clickable: {
|
|
96
111
|
type: Boolean,
|
|
97
112
|
required: false,
|
|
98
113
|
default: false
|
|
99
|
-
}
|
|
114
|
+
},
|
|
115
|
+
align: {
|
|
116
|
+
type: String as PropType<"center-center" | "center-left">,
|
|
117
|
+
required: false,
|
|
118
|
+
default: "center-center"
|
|
119
|
+
},
|
|
120
|
+
to: {
|
|
121
|
+
type: Object as PropType<RouteLocation | null>,
|
|
122
|
+
required: false,
|
|
123
|
+
default: null
|
|
124
|
+
},
|
|
100
125
|
},
|
|
126
|
+
inheritsAttrs: false,
|
|
127
|
+
emits: ['click'],
|
|
101
128
|
setup(props) {
|
|
102
129
|
const { getColors } = useColors();
|
|
103
130
|
|
|
@@ -112,9 +139,9 @@ export default defineComponent({
|
|
|
112
139
|
"--fs-chip-background-color" : backgrounds.base,
|
|
113
140
|
"--fs-chip-border-color" : colors.value.base,
|
|
114
141
|
"--fs-chip-color" : colors.value.base,
|
|
115
|
-
"--fs-chip-hover-background-color" :
|
|
142
|
+
"--fs-chip-hover-background-color" : colors.value.base,
|
|
116
143
|
"--fs-chip-hover-border-color" : colors.value.base,
|
|
117
|
-
"--fs-chip-hover-color" : colors.value.
|
|
144
|
+
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
118
145
|
"--fs-chip-active-background-color": backgrounds.base,
|
|
119
146
|
"--fs-chip-active-border-color" : colors.value.dark,
|
|
120
147
|
"--fs-chip-active-color" : colors.value.dark
|
|
@@ -124,8 +151,8 @@ export default defineComponent({
|
|
|
124
151
|
"--fs-chip-background-color" : colors.value.base,
|
|
125
152
|
"--fs-chip-border-color" : colors.value.base,
|
|
126
153
|
"--fs-chip-color" : colors.value.baseContrast!,
|
|
127
|
-
"--fs-chip-hover-background-color" : colors.value.
|
|
128
|
-
"--fs-chip-hover-border-color" : colors.value.
|
|
154
|
+
"--fs-chip-hover-background-color" : colors.value.soft,
|
|
155
|
+
"--fs-chip-hover-border-color" : colors.value.soft,
|
|
129
156
|
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
130
157
|
"--fs-chip-active-background-color": colors.value.dark,
|
|
131
158
|
"--fs-chip-active-border-color" : colors.value.darkContrast!,
|
|
@@ -148,13 +175,14 @@ export default defineComponent({
|
|
|
148
175
|
|
|
149
176
|
const classes = computed((): string[] => {
|
|
150
177
|
const classNames: string[] = ["fs-chip"];
|
|
151
|
-
if (props.
|
|
152
|
-
classNames.push("fs-chip-
|
|
178
|
+
if (props.clickable) {
|
|
179
|
+
classNames.push("fs-chip-clickable");
|
|
153
180
|
}
|
|
154
181
|
return classNames;
|
|
155
182
|
});
|
|
156
183
|
|
|
157
184
|
return {
|
|
185
|
+
FSRouterLink,
|
|
158
186
|
classes,
|
|
159
187
|
colors,
|
|
160
188
|
style
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSWrapGroup
|
|
3
|
+
v-if="$props.variant === 'wrap'"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
>
|
|
6
|
+
<FSChip
|
|
7
|
+
v-for="(label, index) in $props.labels"
|
|
8
|
+
:key="index"
|
|
9
|
+
:variant="$props.chipVariant"
|
|
10
|
+
:color="$props.color"
|
|
11
|
+
:label="label"
|
|
12
|
+
/>
|
|
13
|
+
<slot />
|
|
14
|
+
</FSWrapGroup>
|
|
15
|
+
<FSSlideGroup
|
|
16
|
+
v-if="$props.variant === 'slide'"
|
|
17
|
+
v-bind="$attrs"
|
|
18
|
+
>
|
|
19
|
+
<FSChip
|
|
20
|
+
v-for="(label, index) in $props.labels"
|
|
21
|
+
:key="index"
|
|
22
|
+
:variant="$props.chipVariant"
|
|
23
|
+
:color="$props.color"
|
|
24
|
+
:label="label"
|
|
25
|
+
/>
|
|
26
|
+
<slot />
|
|
27
|
+
</FSSlideGroup>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import { defineComponent, type PropType } from "vue";
|
|
32
|
+
|
|
33
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
34
|
+
|
|
35
|
+
import FSSlideGroup from "./FSSlideGroup.vue";
|
|
36
|
+
import FSWrapGroup from "./FSWrapGroup.vue";
|
|
37
|
+
import FSChip from "./FSChip.vue";
|
|
38
|
+
|
|
39
|
+
export default defineComponent({
|
|
40
|
+
name: "FSChipGroup",
|
|
41
|
+
components: {
|
|
42
|
+
FSSlideGroup,
|
|
43
|
+
FSWrapGroup,
|
|
44
|
+
FSChip
|
|
45
|
+
},
|
|
46
|
+
props: {
|
|
47
|
+
labels: {
|
|
48
|
+
type: Array as PropType<string[]>,
|
|
49
|
+
required: false,
|
|
50
|
+
default: () => []
|
|
51
|
+
},
|
|
52
|
+
variant: {
|
|
53
|
+
type: String as PropType<"wrap" | "slide">,
|
|
54
|
+
required: false,
|
|
55
|
+
default: "wrap"
|
|
56
|
+
},
|
|
57
|
+
chipVariant: {
|
|
58
|
+
type: String as PropType<"standard" | "full" | "borderless">,
|
|
59
|
+
required: false,
|
|
60
|
+
default: "full"
|
|
61
|
+
},
|
|
62
|
+
color: {
|
|
63
|
+
type: String as PropType<ColorBase>,
|
|
64
|
+
required: false,
|
|
65
|
+
default: ColorEnum.Light
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
</script>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
/>
|
|
41
41
|
</template>
|
|
42
42
|
</a>
|
|
43
|
-
<
|
|
43
|
+
<FSRouterLink
|
|
44
44
|
v-else-if="$props.to"
|
|
45
45
|
:style="style"
|
|
46
46
|
:to="$props.to"
|
|
@@ -80,12 +80,13 @@
|
|
|
80
80
|
:color="loadColor"
|
|
81
81
|
/>
|
|
82
82
|
</template>
|
|
83
|
-
</
|
|
83
|
+
</FSRouterLink>
|
|
84
84
|
<button
|
|
85
85
|
v-else
|
|
86
86
|
:type="$props.type"
|
|
87
87
|
:style="style"
|
|
88
88
|
:class="$props.class"
|
|
89
|
+
:disabled="$props.load || $props.disabled"
|
|
89
90
|
@click.stop="onClick"
|
|
90
91
|
@mouseover="hover = true"
|
|
91
92
|
@mouseleave="hover = false"
|
|
@@ -115,7 +116,6 @@
|
|
|
115
116
|
v-if="$props.load"
|
|
116
117
|
>
|
|
117
118
|
<v-progress-circular
|
|
118
|
-
:class="$props.class"
|
|
119
119
|
class="fs-clickable-load"
|
|
120
120
|
width="2"
|
|
121
121
|
size="24"
|
|
@@ -134,11 +134,13 @@ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-compone
|
|
|
134
134
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
135
135
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
136
136
|
|
|
137
|
+
import FSRouterLink from "./FSRouterLink.vue";
|
|
137
138
|
import FSCard from "./FSCard.vue";
|
|
138
139
|
|
|
139
140
|
export default defineComponent({
|
|
140
141
|
name: "FSClickable",
|
|
141
142
|
components: {
|
|
143
|
+
FSRouterLink,
|
|
142
144
|
FSCard
|
|
143
145
|
},
|
|
144
146
|
props: {
|
|
@@ -163,7 +165,7 @@ export default defineComponent({
|
|
|
163
165
|
default: null
|
|
164
166
|
},
|
|
165
167
|
to: {
|
|
166
|
-
type:
|
|
168
|
+
type: Object as PropType<RouteLocation | null>,
|
|
167
169
|
required: false,
|
|
168
170
|
default: null
|
|
169
171
|
},
|
|
@@ -207,10 +209,10 @@ export default defineComponent({
|
|
|
207
209
|
required: false,
|
|
208
210
|
default: false
|
|
209
211
|
},
|
|
210
|
-
|
|
212
|
+
disabled: {
|
|
211
213
|
type: Boolean,
|
|
212
214
|
required: false,
|
|
213
|
-
default:
|
|
215
|
+
default: false
|
|
214
216
|
}
|
|
215
217
|
},
|
|
216
218
|
emits: ["click"],
|
|
@@ -226,7 +228,7 @@ export default defineComponent({
|
|
|
226
228
|
const active = ref(false);
|
|
227
229
|
|
|
228
230
|
const style = computed((): StyleValue => {
|
|
229
|
-
if (
|
|
231
|
+
if (props.disabled) {
|
|
230
232
|
return {
|
|
231
233
|
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
232
234
|
"--fs-clickable-border-style" : props.borderStyle,
|
|
@@ -326,7 +328,7 @@ export default defineComponent({
|
|
|
326
328
|
|
|
327
329
|
const classes = computed((): string[] => {
|
|
328
330
|
const classNames: string[] = ["fs-clickable"];
|
|
329
|
-
if (
|
|
331
|
+
if (props.disabled) {
|
|
330
332
|
classNames.push("fs-clickable-disabled");
|
|
331
333
|
}
|
|
332
334
|
return classNames;
|
|
@@ -343,7 +345,7 @@ export default defineComponent({
|
|
|
343
345
|
});
|
|
344
346
|
|
|
345
347
|
const onClick = (event: MouseEvent) => {
|
|
346
|
-
if (!props.to && !props.href && props.
|
|
348
|
+
if (!props.to && !props.href && !props.disabled && !props.load) {
|
|
347
349
|
emit("click", event);
|
|
348
350
|
}
|
|
349
351
|
};
|
package/components/FSClock.vue
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
type="number"
|
|
11
11
|
hide-details
|
|
12
12
|
:style="style"
|
|
13
|
-
:
|
|
13
|
+
:disabled="$props.disabled"
|
|
14
|
+
:readonly="$props.readonly"
|
|
14
15
|
:modelValue="innerHours.toString().padStart(2, '0')"
|
|
15
16
|
@update:modelValue="onChangeHours"
|
|
16
17
|
/>
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
type="number"
|
|
22
23
|
hide-details
|
|
23
24
|
:style="style"
|
|
24
|
-
:
|
|
25
|
+
:disabled="$props.disabled"
|
|
26
|
+
:readonly="$props.readonly"
|
|
25
27
|
:modelValue="innerMinutes.toString().padStart(2, '0')"
|
|
26
28
|
@update:modelValue="onChangeMinutes"
|
|
27
29
|
/>
|
|
@@ -30,8 +32,9 @@
|
|
|
30
32
|
v-if="$props.slider"
|
|
31
33
|
>
|
|
32
34
|
<FSSlider
|
|
33
|
-
:label="$tr('ui.
|
|
34
|
-
:
|
|
35
|
+
:label="$tr('ui.common.hours', 'Hours')"
|
|
36
|
+
:disabled="$props.disabled"
|
|
37
|
+
:readonly="$props.readonly"
|
|
35
38
|
:color="$props.color"
|
|
36
39
|
:step="1"
|
|
37
40
|
:max="23"
|
|
@@ -39,8 +42,9 @@
|
|
|
39
42
|
v-model="innerHours"
|
|
40
43
|
/>
|
|
41
44
|
<FSSlider
|
|
42
|
-
:label="$tr('ui.
|
|
43
|
-
:
|
|
45
|
+
:label="$tr('ui.common.minutes', 'Minutes')"
|
|
46
|
+
:disabled="$props.disabled"
|
|
47
|
+
:readonly="$props.readonly"
|
|
44
48
|
:color="$props.color"
|
|
45
49
|
:step="1"
|
|
46
50
|
:max="59"
|
|
@@ -54,9 +58,9 @@
|
|
|
54
58
|
<script lang="ts">
|
|
55
59
|
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
56
60
|
|
|
61
|
+
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
57
62
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
58
63
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
59
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
60
64
|
|
|
61
65
|
import FSSlider from "./FSSlider.vue";
|
|
62
66
|
import FSCol from "./FSCol.vue";
|
|
@@ -85,10 +89,15 @@ export default defineComponent({
|
|
|
85
89
|
required: false,
|
|
86
90
|
default: null
|
|
87
91
|
},
|
|
88
|
-
|
|
92
|
+
disabled: {
|
|
89
93
|
type: Boolean,
|
|
90
94
|
required: false,
|
|
91
|
-
default:
|
|
95
|
+
default: false
|
|
96
|
+
},
|
|
97
|
+
readonly: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
required: false,
|
|
100
|
+
default: false
|
|
92
101
|
},
|
|
93
102
|
slider: {
|
|
94
103
|
type: Boolean,
|
|
@@ -99,6 +108,7 @@ export default defineComponent({
|
|
|
99
108
|
emits: ["update:modelValue"],
|
|
100
109
|
setup(props, { emit }) {
|
|
101
110
|
const { epochToLongDateFormat } = useDateFormat();
|
|
111
|
+
const { isMobileSized } = useBreakpoints();
|
|
102
112
|
const { getColors } = useColors();
|
|
103
113
|
|
|
104
114
|
const colors = computed(() => getColors(props.color));
|
|
@@ -110,13 +120,17 @@ export default defineComponent({
|
|
|
110
120
|
const innerMinutes = ref(0);
|
|
111
121
|
|
|
112
122
|
const style = computed((): StyleValue => {
|
|
113
|
-
if (
|
|
123
|
+
if (props.disabled) {
|
|
114
124
|
return {
|
|
115
125
|
"--fs-clock-field-cursor" : "default",
|
|
116
126
|
"--fs-clock-field-background-color" : backgrounds.base,
|
|
117
127
|
"--fs-clock-field-border-color" : lights.base,
|
|
118
128
|
"--fs-clock-field-color" : lights.dark,
|
|
119
|
-
"--fs-clock-field-active-border-color": lights.base
|
|
129
|
+
"--fs-clock-field-active-border-color": lights.base,
|
|
130
|
+
"--fs-font-font-size" : isMobileSized.value ? "12px" : "14px",
|
|
131
|
+
"--fs-font-line-height" : isMobileSized.value ? "16px" : "20px",
|
|
132
|
+
"--fs-font-letter-spacing" : isMobileSized.value ? "-0.36px" : "-0.42px",
|
|
133
|
+
"--fs-base-field-input-height" : isMobileSized.value ? "34px" : "38px"
|
|
120
134
|
};
|
|
121
135
|
}
|
|
122
136
|
return {
|
|
@@ -124,7 +138,11 @@ export default defineComponent({
|
|
|
124
138
|
"--fs-clock-field-background-color" : colors.value.light,
|
|
125
139
|
"--fs-clock-field-border-color" : colors.value.base,
|
|
126
140
|
"--fs-clock-field-color" : darks.base,
|
|
127
|
-
"--fs-clock-field-active-border-color": colors.value.dark
|
|
141
|
+
"--fs-clock-field-active-border-color": colors.value.dark,
|
|
142
|
+
"--fs-font-font-size" : isMobileSized.value ? "12px" : "14px",
|
|
143
|
+
"--fs-font-line-height" : isMobileSized.value ? "16px" : "20px",
|
|
144
|
+
"--fs-font-letter-spacing" : isMobileSized.value ? "-0.36px" : "-0.42px",
|
|
145
|
+
"--fs-base-field-input-height" : isMobileSized.value ? "34px" : "38px"
|
|
128
146
|
};
|
|
129
147
|
});
|
|
130
148
|
|