@dative-gpi/foundation-shared-components 0.0.7 → 0.0.9

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 (139) hide show
  1. package/{models/FSButtons.ts → aliases/FSButton.ts} +24 -21
  2. package/aliases/index.ts +1 -0
  3. package/components/FSAutocompleteField.vue +207 -0
  4. package/components/FSBadge.vue +38 -0
  5. package/components/FSBreadcrumbs.vue +49 -55
  6. package/components/FSButton.vue +116 -101
  7. package/components/FSCalendar.vue +184 -0
  8. package/components/FSCalendarTwin.vue +412 -0
  9. package/components/FSCard.vue +77 -0
  10. package/components/FSCarousel.vue +63 -0
  11. package/components/FSCheckbox.vue +111 -104
  12. package/components/FSChip.vue +140 -0
  13. package/components/FSClock.vue +172 -0
  14. package/components/FSCol.vue +104 -98
  15. package/components/FSColor.vue +61 -64
  16. package/components/FSColorIcon.vue +67 -0
  17. package/components/FSContainer.vue +64 -0
  18. package/components/FSDateField.vue +211 -0
  19. package/components/FSDateRangeField.vue +225 -0
  20. package/components/FSDateTimeField.vue +257 -0
  21. package/components/FSDateTimeRangeField.vue +286 -0
  22. package/components/FSDialog.vue +103 -0
  23. package/components/FSDivider.vue +39 -0
  24. package/components/FSFadeOut.vue +49 -59
  25. package/components/FSFileButton.vue +245 -0
  26. package/components/FSHeaderButton.vue +17 -0
  27. package/components/FSIcon.vue +23 -23
  28. package/components/FSIconField.vue +232 -0
  29. package/components/FSImage.vue +142 -0
  30. package/components/FSLoadTile.vue +93 -0
  31. package/components/FSNumberField.vue +51 -53
  32. package/components/FSPasswordField.vue +99 -99
  33. package/components/FSRadio.vue +107 -110
  34. package/components/FSRadioGroup.vue +55 -57
  35. package/components/FSRemoveDialog.vue +123 -0
  36. package/components/FSRichTextField.vue +551 -0
  37. package/components/FSRow.vue +110 -104
  38. package/components/FSSearchField.vue +114 -105
  39. package/components/FSSelectField.vue +188 -0
  40. package/components/FSSlideGroup.vue +45 -49
  41. package/components/FSSlider.vue +130 -0
  42. package/components/FSSpan.vue +53 -37
  43. package/components/FSSubmitDialog.vue +165 -0
  44. package/components/FSSwitch.vue +110 -109
  45. package/components/FSTab.vue +61 -61
  46. package/components/FSTabs.vue +53 -55
  47. package/components/FSTag.vue +88 -84
  48. package/components/FSTagField.vue +183 -128
  49. package/components/FSTagGroup.vue +38 -45
  50. package/components/FSText.vue +74 -64
  51. package/components/FSTextArea.vue +209 -0
  52. package/components/FSTextField.vue +152 -149
  53. package/components/FSTile.vue +90 -0
  54. package/components/FSToggleSet.vue +282 -0
  55. package/components/FSTooltip.vue +21 -0
  56. package/components/FSWindow.vue +26 -16
  57. package/components/FSWrapGroup.vue +44 -47
  58. package/components/deviceOrganisations/FSConnectivity.vue +114 -0
  59. package/components/deviceOrganisations/FSStatus.vue +117 -0
  60. package/components/deviceOrganisations/FSStatusesCarousel.vue +105 -0
  61. package/components/deviceOrganisations/FSStatusesRow.vue +66 -0
  62. package/components/deviceOrganisations/FSWorstAlert.vue +165 -0
  63. package/components/lists/FSDataIteratorGroup.vue +7 -0
  64. package/components/lists/FSDataIteratorItem.vue +103 -0
  65. package/components/lists/FSDataTable.vue +964 -0
  66. package/components/lists/FSFilterButton.vue +176 -0
  67. package/components/lists/FSHeaderButton.vue +99 -0
  68. package/components/lists/FSHiddenButton.vue +79 -0
  69. package/components/tiles/FSDeviceOrganisationTileUI.vue +232 -0
  70. package/components/tiles/FSGroupTileUI.vue +192 -0
  71. package/composables/index.ts +2 -1
  72. package/composables/useBreakpoints.ts +33 -0
  73. package/composables/useColors.ts +53 -23
  74. package/composables/useSlots.ts +43 -0
  75. package/index.ts +6 -0
  76. package/models/breadcrumbs.ts +8 -0
  77. package/models/colors.ts +17 -0
  78. package/models/deviceAlerts.ts +10 -0
  79. package/models/deviceConnectivities.ts +11 -0
  80. package/models/deviceStatuses.ts +16 -0
  81. package/models/dispositions.ts +33 -0
  82. package/models/index.ts +9 -0
  83. package/models/modelStatuses.ts +11 -0
  84. package/models/rules.ts +50 -0
  85. package/models/toggleSets.ts +7 -0
  86. package/package.json +13 -4
  87. package/plugins/colorPlugin.ts +2 -2
  88. package/shims-plugin.d.ts +1 -1
  89. package/styles/components/fs_autocomplete_field.scss +123 -0
  90. package/styles/components/fs_button.scss +4 -14
  91. package/styles/components/fs_calendar.scss +138 -0
  92. package/styles/components/fs_card.scss +4 -0
  93. package/styles/components/fs_carousel.scss +4 -0
  94. package/styles/components/fs_chip.scss +33 -0
  95. package/styles/components/fs_clock.scss +43 -0
  96. package/styles/components/fs_col.scss +2 -0
  97. package/styles/components/fs_color_icon.scss +37 -0
  98. package/styles/components/fs_container.scss +16 -0
  99. package/styles/components/fs_data_iterator_item.scss +19 -0
  100. package/styles/components/fs_data_table.scss +97 -0
  101. package/styles/components/fs_date_field.scss +8 -0
  102. package/styles/components/fs_dialog.scss +30 -0
  103. package/styles/components/fs_divider.scss +5 -0
  104. package/styles/components/fs_fade_out.scss +10 -2
  105. package/styles/components/fs_filter_button.scss +12 -0
  106. package/styles/components/fs_header_button.scss +4 -0
  107. package/styles/components/fs_icon.scss +14 -4
  108. package/styles/components/fs_icon_field.scss +12 -0
  109. package/styles/components/fs_image.scss +7 -0
  110. package/styles/components/fs_load_tile.scss +49 -0
  111. package/styles/components/fs_password_field.scss +2 -2
  112. package/styles/components/fs_rich_text_field.scss +67 -0
  113. package/styles/components/fs_row.scss +4 -1
  114. package/styles/components/fs_select_field.scss +71 -0
  115. package/styles/components/fs_slide_group.scss +6 -0
  116. package/styles/components/fs_slider.scss +40 -0
  117. package/styles/components/fs_span.scss +8 -0
  118. package/styles/components/fs_submit_dialog.scss +9 -0
  119. package/styles/components/fs_tabs.scss +4 -0
  120. package/styles/components/fs_tag_field.scss +6 -8
  121. package/styles/components/fs_text_area.scss +105 -0
  122. package/styles/components/fs_text_field.scss +23 -15
  123. package/styles/components/fs_tile.scss +33 -0
  124. package/styles/components/fs_tooltip.scss +5 -0
  125. package/styles/components/fs_wrap_group.scss +7 -8
  126. package/styles/components/index.scss +26 -0
  127. package/styles/globals/breakpoints.scss +7 -0
  128. package/styles/globals/overrides.scss +20 -7
  129. package/styles/globals/text_fonts.scss +8 -8
  130. package/themes/default.ts +1 -11
  131. package/utils/css.ts +11 -0
  132. package/utils/icons.ts +75416 -0
  133. package/utils/index.ts +5 -0
  134. package/utils/levenshtein.ts +97 -0
  135. package/utils/lexical.ts +27 -0
  136. package/utils/sort.ts +9 -0
  137. package/composables/useTouch.ts +0 -9
  138. package/models/FSTags.ts +0 -8
  139. package/models/FSTextFields.ts +0 -17
@@ -1,44 +1,49 @@
1
1
  <template>
2
- <FSCol width="hug">
3
- <FSRow width="hug" align="center-left">
4
- <FSIcon
5
- class="fs-checkbox"
6
- size="checkbox"
7
- :style="style"
8
- @click="onToggle"
9
- >
10
- {{ icon }}
11
- </FSIcon>
12
- <slot name="default">
13
- <FSSpan
14
- v-if="$props.label"
15
- class="fs-checkbox-label"
16
- :style="style"
17
- :font="font"
18
- @click="onToggle"
19
- >
20
- {{ $props.label }}
21
- </FSSpan>
22
- </slot>
23
- </FSRow>
24
- <slot name="description">
25
- <FSSpan
26
- v-if="$props.description"
27
- class="fs-checkbox-description"
28
- font="text-underline"
29
- :style="style"
30
- >
31
- {{ $props.description }}
32
- </FSSpan>
33
- </slot>
34
- </FSCol>
2
+ <FSCol
3
+ width="hug"
4
+ >
5
+ <FSRow
6
+ width="hug"
7
+ align="center-left"
8
+ >
9
+ <FSIcon
10
+ class="fs-checkbox"
11
+ size="l"
12
+ :style="style"
13
+ @click.stop="onToggle"
14
+ >
15
+ {{ icon }}
16
+ </FSIcon>
17
+ <slot>
18
+ <FSSpan
19
+ v-if="$props.label"
20
+ class="fs-checkbox-label"
21
+ :style="style"
22
+ :font="font"
23
+ @click.stop="onToggle"
24
+ >
25
+ {{ $props.label }}
26
+ </FSSpan>
27
+ </slot>
28
+ </FSRow>
29
+ <slot name="description">
30
+ <FSSpan
31
+ v-if="$props.description"
32
+ class="fs-checkbox-description"
33
+ font="text-underline"
34
+ :style="style"
35
+ >
36
+ {{ $props.description }}
37
+ </FSSpan>
38
+ </slot>
39
+ </FSCol>
35
40
  </template>
36
41
 
37
42
  <script lang="ts">
38
- import { computed, defineComponent, PropType, toRefs } from "vue";
43
+ import { computed, defineComponent, PropType } from "vue";
39
44
 
45
+ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
40
46
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
41
- import { ColorBase } from "@dative-gpi/foundation-shared-components/themes";
42
47
 
43
48
  import FSIcon from "./FSIcon.vue";
44
49
  import FSSpan from "./FSSpan.vue";
@@ -46,81 +51,83 @@ import FSRow from "./FSRow.vue";
46
51
  import FSCol from "./FSCol.vue";
47
52
 
48
53
  export default defineComponent({
49
- name: "FSCheckbox",
50
- components: {
51
- FSIcon,
52
- FSSpan,
53
- FSRow,
54
- FSCol
54
+ name: "FSCheckbox",
55
+ components: {
56
+ FSIcon,
57
+ FSSpan,
58
+ FSRow,
59
+ FSCol
60
+ },
61
+ props: {
62
+ label: {
63
+ type: String,
64
+ required: false,
65
+ default: null
55
66
  },
56
- props: {
57
- label: {
58
- type: String,
59
- required: false,
60
- default: null
61
- },
62
- description: {
63
- type: String,
64
- required: false,
65
- default: null
66
- },
67
- value: {
68
- type: Boolean,
69
- required: false,
70
- default: false
71
- },
72
- color: {
73
- type: String as PropType<ColorBase>,
74
- required: false,
75
- default: ColorBase.Primary
76
- },
77
- editable: {
78
- type: Boolean,
79
- required: false,
80
- default: true
81
- }
67
+ description: {
68
+ type: String,
69
+ required: false,
70
+ default: null
82
71
  },
83
- emits: ["update:value"],
84
- setup(props, { emit }) {
85
- const { value, color, editable } = toRefs(props);
86
-
87
- const colors = useColors().getColors(color.value);
88
-
89
- const lights = useColors().getColors(ColorBase.Light);
90
- const darks = useColors().getColors(ColorBase.Dark);
72
+ modelValue: {
73
+ type: Boolean,
74
+ required: false,
75
+ default: false
76
+ },
77
+ color: {
78
+ type: String as PropType<ColorBase>,
79
+ required: false,
80
+ default: ColorEnum.Primary
81
+ },
82
+ indeterminate: {
83
+ type: Boolean,
84
+ required: false,
85
+ default: false
86
+ },
87
+ editable: {
88
+ type: Boolean,
89
+ required: false,
90
+ default: true
91
+ }
92
+ },
93
+ emits: ["update:modelValue"],
94
+ setup(props, { emit }) {
95
+ const colors = computed(() => useColors().getColors(props.color));
96
+ const lights = useColors().getColors(ColorEnum.Light);
97
+ const darks = useColors().getColors(ColorEnum.Dark);
91
98
 
92
- const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
93
- if (!editable.value) {
94
- return {
95
- "--fs-checkbox-cursor": "default",
96
- "--fs-checkbox-checkbox-color": lights.dark,
97
- "--fs-checkbox-color": lights.dark
98
- };
99
- }
100
- return {
101
- "--fs-checkbox-cursor": "pointer",
102
- "--fs-checkbox-checkbox-color": value.value ? colors.base : darks.base,
103
- "--fs-checkbox-color": darks.base
104
- }
105
- });
99
+ const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
100
+ if (!props.editable) {
101
+ return {
102
+ "--fs-checkbox-cursor" : "default",
103
+ "--fs-checkbox-checkbox-color": lights.dark,
104
+ "--fs-checkbox-color" : lights.dark
105
+ };
106
+ }
107
+ return {
108
+ "--fs-checkbox-cursor" : "pointer",
109
+ "--fs-checkbox-checkbox-color": (props.modelValue || props.indeterminate) ? colors.value.base : darks.base,
110
+ "--fs-checkbox-color" : darks.base
111
+ }
112
+ });
106
113
 
107
- const icon = computed((): string => value.value ? "mdi-checkbox-marked" : "mdi-checkbox-blank-outline");
114
+ const icon = computed((): string => props.modelValue ? "mdi-checkbox-marked" : props.indeterminate ? "mdi-minus-box" : "mdi-checkbox-blank-outline");
108
115
 
109
- const font = computed((): string => value.value ? "text-button" : "text-body");
116
+ const font = computed((): string => props.modelValue ? "text-button" : "text-body");
110
117
 
111
- const onToggle = (): void => {
112
- if (!editable.value) {
113
- return;
114
- }
115
- emit("update:value", !value.value);
116
- };
118
+ const onToggle = (): void => {
119
+ if (!props.editable) {
120
+ return;
121
+ }
122
+ emit("update:modelValue", !props.modelValue);
123
+ };
117
124
 
118
- return {
119
- style,
120
- icon,
121
- font,
122
- onToggle
123
- };
124
- }
125
+ return {
126
+ style,
127
+ icon,
128
+ font,
129
+ onToggle
130
+ };
131
+ }
125
132
  });
126
133
  </script>
@@ -0,0 +1,140 @@
1
+ <template>
2
+ <FSRow
3
+ width="hug"
4
+ align="center-left"
5
+ :class="classes"
6
+ :style="style"
7
+ :wrap="false"
8
+ v-bind="$attrs"
9
+ >
10
+ <slot name="prepend" v-bind="{ color: $props.color, colors }">
11
+ <FSIcon
12
+ v-if="$props.prependIcon"
13
+ size="s"
14
+ >
15
+ {{ $props.prependIcon }}
16
+ </FSIcon>
17
+ </slot>
18
+ <slot v-bind="{ color: $props.color, colors }">
19
+ <FSSpan
20
+ v-if="$props.label"
21
+ font="text-overline"
22
+ class="fs-chip-label"
23
+ >
24
+ {{ $props.label }}
25
+ </FSSpan>
26
+ </slot>
27
+ <slot name="append" v-bind="{ color: $props.color, colors }">
28
+ <FSIcon
29
+ v-if="$props.appendIcon"
30
+ size="s"
31
+ >
32
+ {{ $props.appendIcon }}
33
+ </FSIcon>
34
+ </slot>
35
+ </FSRow>
36
+ </template>
37
+
38
+ <script lang="ts">
39
+ import { computed, defineComponent, PropType } from "vue";
40
+
41
+ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
42
+ import { useColors } from "@dative-gpi/foundation-shared-components/composables";
43
+
44
+ import FSIcon from "./FSIcon.vue";
45
+ import FSSpan from "./FSSpan.vue";
46
+ import FSRow from "./FSRow.vue";
47
+
48
+ export default defineComponent({
49
+ name: "FSChip",
50
+ components: {
51
+ FSIcon,
52
+ FSSpan,
53
+ FSRow
54
+ },
55
+ props: {
56
+ prependIcon: {
57
+ type: String,
58
+ required: false,
59
+ default: null
60
+ },
61
+ label: {
62
+ type: String,
63
+ required: false,
64
+ default: null
65
+ },
66
+ appendIcon: {
67
+ type: String,
68
+ required: false,
69
+ default: null
70
+ },
71
+ variant: {
72
+ type: String as PropType<"standard" | "full">,
73
+ required: false,
74
+ default: "full"
75
+ },
76
+ color: {
77
+ type: String as PropType<ColorBase>,
78
+ required: false,
79
+ default: ColorEnum.Primary
80
+ },
81
+ editable: {
82
+ type: Boolean,
83
+ required: false,
84
+ default: false
85
+ }
86
+ },
87
+ setup(props) {
88
+ const colors = computed(() => useColors().getColors(props.color));
89
+ const backgrounds = useColors().getColors(ColorEnum.Background);
90
+
91
+ const textColors = computed(() => {
92
+ switch (props.variant) {
93
+ case "standard": return colors.value;
94
+ case "full": return useColors().getContrasts(props.color);
95
+ }
96
+ });
97
+
98
+ const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
99
+ switch (props.variant) {
100
+ case "standard": return {
101
+ "--fs-chip-background-color" : backgrounds.base,
102
+ "--fs-chip-border-color" : colors.value.base,
103
+ "--fs-chip-color" : textColors.value.base,
104
+ "--fs-chip-hover-background-color" : backgrounds.base,
105
+ "--fs-chip-hover-border-color" : colors.value.base,
106
+ "--fs-chip-hover-color" : textColors.value.base,
107
+ "--fs-chip-active-background-color": backgrounds.base,
108
+ "--fs-chip-active-border-color" : colors.value.dark,
109
+ "--fs-chip-active-color" : textColors.value.dark
110
+ };
111
+ case "full": return {
112
+ "--fs-chip-background-color" : colors.value.base,
113
+ "--fs-chip-border-color" : colors.value.base,
114
+ "--fs-chip-color" : textColors.value.light,
115
+ "--fs-chip-hover-background-color" : colors.value.base,
116
+ "--fs-chip-hover-border-color" : colors.value.base,
117
+ "--fs-chip-hover-color" : textColors.value.light,
118
+ "--fs-chip-active-background-color": colors.value.dark,
119
+ "--fs-chip-active-border-color" : colors.value.dark,
120
+ "--fs-chip-active-color" : textColors.value.light
121
+ };
122
+ }
123
+ });
124
+
125
+ const classes = computed((): string[] => {
126
+ const classNames: string[] = ["fs-chip"];
127
+ if (props.editable) {
128
+ classNames.push("fs-chip-editable");
129
+ }
130
+ return classNames;
131
+ });
132
+
133
+ return {
134
+ colors,
135
+ style,
136
+ classes
137
+ };
138
+ }
139
+ });
140
+ </script>
@@ -0,0 +1,172 @@
1
+ <template>
2
+ <FSCol
3
+ width="fill"
4
+ gap="16px"
5
+ >
6
+ <FSRow
7
+ align="center-center"
8
+ >
9
+ <FSTextField
10
+ v-if="$props.reminder"
11
+ :readonly="true"
12
+ :hideHeader="true"
13
+ :modelValue="epochToLongDateFormat($props.date)"
14
+ />
15
+ <v-text-field
16
+ class="fs-clock-field"
17
+ variant="outlined"
18
+ type="number"
19
+ hide-details
20
+ :style="style"
21
+ :readonly="!$props.editable"
22
+ :modelValue="innerHours.toString().padStart(2, '0')"
23
+ @update:modelValue="onChangeHours"
24
+ />
25
+ :
26
+ <v-text-field
27
+ class="fs-clock-field"
28
+ variant="outlined"
29
+ type="number"
30
+ hide-details
31
+ :style="style"
32
+ :readonly="!$props.editable"
33
+ :modelValue="innerMinutes.toString().padStart(2, '0')"
34
+ @update:modelValue="onChangeMinutes"
35
+ />
36
+ </FSRow>
37
+ <FSCol>
38
+ <FSSpan
39
+ font="text-overline"
40
+ >
41
+ {{ $tr("ui.clock.hours", "Hours") }}
42
+ </FSSpan>
43
+ <FSSlider
44
+ :readonly="!$props.editable"
45
+ :color="$props.color"
46
+ :step="1"
47
+ :max="23"
48
+ :min="0"
49
+ v-model="innerHours"
50
+ />
51
+ </FSCol>
52
+ <FSCol>
53
+ <FSSpan
54
+ font="text-overline"
55
+ >
56
+ {{ $tr("ui.clock.minutes", "Minutes") }}
57
+ </FSSpan>
58
+ <FSSlider
59
+ :readonly="!$props.editable"
60
+ :color="$props.color"
61
+ :step="1"
62
+ :max="59"
63
+ :min="0"
64
+ v-model="innerMinutes"
65
+ />
66
+ </FSCol>
67
+ </FSCol>
68
+ </template>
69
+
70
+ <script lang="ts">
71
+ import { computed, defineComponent, PropType, ref, watch } from "vue";
72
+
73
+ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
74
+ import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
75
+ import { useColors } from "@dative-gpi/foundation-shared-components/composables";
76
+
77
+ import FSTextField from "./FSTextField.vue";
78
+ import FSSlider from "./FSSlider.vue";
79
+ import FSCol from "./FSCol.vue";
80
+ import FSRow from "./FSRow.vue";
81
+
82
+ export default defineComponent({
83
+ name: "FSClock",
84
+ components: {
85
+ FSTextField,
86
+ FSSlider,
87
+ FSCol,
88
+ FSRow
89
+ },
90
+ props: {
91
+ modelValue: {
92
+ type: Number,
93
+ required: false,
94
+ default: null
95
+ },
96
+ color: {
97
+ type: String as PropType<ColorBase>,
98
+ required: false,
99
+ default: ColorEnum.Primary
100
+ },
101
+ date: {
102
+ type: Number,
103
+ required: false,
104
+ default: null
105
+ },
106
+ reminder: {
107
+ type: Boolean,
108
+ required: false,
109
+ default: false
110
+ },
111
+ editable: {
112
+ type: Boolean,
113
+ required: false,
114
+ default: true
115
+ }
116
+ },
117
+ emits: ["update:modelValue"],
118
+ setup(props, { emit }) {
119
+ const { epochToLongDateFormat } = useTimeZone();
120
+
121
+ const colors = computed(() => useColors().getColors(props.color));
122
+ const backgrounds = useColors().getColors(ColorEnum.Background);
123
+ const lights = useColors().getColors(ColorEnum.Light);
124
+ const darks = useColors().getColors(ColorEnum.Dark);
125
+
126
+ const innerHours = ref(props.modelValue ? Math.floor(props.modelValue / (60 * 60 * 1000)) : 0);
127
+ const innerMinutes = ref(props.modelValue ? Math.floor((props.modelValue % (60 * 60 * 1000)) / (60 * 1000)) : 0);
128
+
129
+ const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
130
+ if (!props.editable) {
131
+ return {
132
+ "--fs-clock-field-cursor" : "default",
133
+ "--fs-clock-field-background-color" : backgrounds.base,
134
+ "--fs-clock-field-border-color" : lights.base,
135
+ "--fs-clock-field-color" : lights.dark,
136
+ "--fs-clock-field-active-border-color": lights.base
137
+ };
138
+ }
139
+ return {
140
+ "--fs-clock-field-cursor" : "text",
141
+ "--fs-clock-field-background-color" : colors.value.light,
142
+ "--fs-clock-field-border-color" : colors.value.base,
143
+ "--fs-clock-field-color" : darks.base,
144
+ "--fs-clock-field-active-border-color": colors.value.dark
145
+ };
146
+ });
147
+
148
+ const onChangeHours = (value: number): void => {
149
+ value = Math.min(23, Math.max(0, value));
150
+ innerHours.value = value;
151
+ };
152
+
153
+ const onChangeMinutes = (value: number): void => {
154
+ value = Math.min(59, Math.max(0, value));
155
+ innerMinutes.value = value;
156
+ };
157
+
158
+ watch([innerHours, innerMinutes], () => {
159
+ emit("update:modelValue", (innerHours.value * 60 * 60 * 1000) + (innerMinutes.value * 60 * 1000));
160
+ });
161
+
162
+ return {
163
+ style,
164
+ innerHours,
165
+ innerMinutes,
166
+ onChangeHours,
167
+ onChangeMinutes,
168
+ epochToLongDateFormat
169
+ };
170
+ }
171
+ });
172
+ </script>