@dative-gpi/foundation-shared-components 0.0.8 → 0.0.10

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 (140) 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 +52 -39
  8. package/components/FSCalendarTwin.vue +120 -102
  9. package/components/FSCard.vue +35 -21
  10. package/components/FSCarousel.vue +63 -0
  11. package/components/FSCheckbox.vue +111 -103
  12. package/components/FSChip.vue +140 -0
  13. package/components/FSClock.vue +149 -15
  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 -101
  33. package/components/FSRadio.vue +107 -109
  34. package/components/FSRadioGroup.vue +55 -57
  35. package/components/FSRemoveDialog.vue +123 -0
  36. package/components/FSRichTextField.vue +26 -33
  37. package/components/FSRow.vue +110 -104
  38. package/components/FSSearchField.vue +35 -27
  39. package/components/FSSelectField.vue +188 -0
  40. package/components/FSSlideGroup.vue +45 -49
  41. package/components/FSSlider.vue +31 -33
  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 +32 -36
  49. package/components/FSTagGroup.vue +38 -45
  50. package/components/FSText.vue +74 -64
  51. package/components/FSTextArea.vue +187 -185
  52. package/components/FSTextField.vue +18 -20
  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/FSDataTableUI.vue +982 -0
  66. package/components/lists/FSFilterButton.vue +177 -0
  67. package/components/lists/FSHeaderButton.vue +99 -0
  68. package/components/lists/FSHiddenButton.vue +81 -0
  69. package/components/tiles/FSDeviceOrganisationTileUI.vue +232 -0
  70. package/components/tiles/FSGroupTileUI.vue +192 -0
  71. package/composables/index.ts +1 -1
  72. package/composables/useBreakpoints.ts +23 -4
  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/index.ts +9 -0
  82. package/models/modelStatuses.ts +11 -0
  83. package/models/rules.ts +50 -0
  84. package/models/tables.ts +33 -0
  85. package/models/toggleSets.ts +7 -0
  86. package/package.json +6 -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 -6
  91. package/styles/components/fs_calendar.scss +24 -1
  92. package/styles/components/fs_card.scss +2 -5
  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 +21 -0
  106. package/styles/components/fs_header_button.scss +4 -0
  107. package/styles/components/fs_hidden_button.scss +12 -0
  108. package/styles/components/fs_icon.scss +19 -3
  109. package/styles/components/fs_icon_field.scss +12 -0
  110. package/styles/components/fs_image.scss +7 -0
  111. package/styles/components/fs_load_tile.scss +49 -0
  112. package/styles/components/fs_password_field.scss +2 -2
  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 +29 -9
  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 +0 -11
  121. package/styles/components/fs_text_field.scss +23 -15
  122. package/styles/components/fs_tile.scss +33 -0
  123. package/styles/components/fs_tooltip.scss +5 -0
  124. package/styles/components/fs_wrap_group.scss +7 -8
  125. package/styles/components/index.scss +22 -1
  126. package/styles/globals/breakpoints.scss +7 -0
  127. package/styles/globals/overrides.scss +20 -7
  128. package/styles/globals/text_fonts.scss +8 -8
  129. package/themes/default.ts +1 -11
  130. package/utils/css.ts +11 -0
  131. package/utils/icons.ts +75416 -0
  132. package/utils/index.ts +5 -1
  133. package/utils/levenshtein.ts +97 -0
  134. package/utils/sort.ts +9 -0
  135. package/components/FSDatePicker.vue +0 -226
  136. package/composables/useDates.ts +0 -39
  137. package/models/FSTags.ts +0 -8
  138. package/models/FSTextFields.ts +0 -23
  139. package/styles/components/fs_date_picker.scss +0 -0
  140. /package/utils/{FSRichTextField.ts → lexical.ts} +0 -0
@@ -1,10 +1,10 @@
1
1
  .fs-password-field-icon {
2
2
  opacity: 1 !important;
3
3
  cursor: var(--fs-password-field-cursor) !important;
4
- color: var(--fs-password-field-base-text) !important;
4
+ color: var(--fs-password-field-color) !important;
5
5
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
6
6
 
7
7
  &:hover {
8
- color: var(--fs-password-field-dark-text) !important;
8
+ color: var(--fs-password-field-hover-color) !important;
9
9
  }
10
10
  }
@@ -1,7 +1,10 @@
1
1
  .fs-row {
2
2
  display: flex;
3
3
  flex-wrap: var(--fs-row-flex-wrap);
4
+ padding: var(--fs-row-padding);
4
5
  gap: var(--fs-row-gap);
6
+ max-width: 100%;
7
+ max-height: 100%;
5
8
 
6
9
  &-top-left {
7
10
  align-items: flex-start;
@@ -86,6 +89,6 @@
86
89
  }
87
90
 
88
91
  &-fixed {
89
- width: var(--fs-row-height);
92
+ height: var(--fs-row-height);
90
93
  }
91
94
  }
@@ -0,0 +1,71 @@
1
+ .fs-select-field {
2
+ padding: 0px !important;
3
+ width: 100%;
4
+
5
+ & > .v-input__control > .v-field {
6
+ border: 1px solid var(--fs-select-field-border-color) !important;
7
+ cursor: var(--fs-select-field-cursor) !important;
8
+ border-radius: 4px !important;
9
+ padding: 0 16px !important;
10
+ gap: 8px;
11
+
12
+ &--error {
13
+ border-color: var(--fs-select-field-error-border-color) !important;
14
+ }
15
+
16
+ &:not(.v-field--error):focus-within {
17
+ border-color: var(--fs-select-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-select-field-color);
29
+ cursor: var(--fs-select-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-select-field-color);
52
+
53
+ & > i {
54
+ margin-inline-start: 0px;
55
+ }
56
+ }
57
+ }
58
+ }
59
+
60
+ .fs-select-field-label {
61
+ color: var(--fs-select-field-color);
62
+ }
63
+
64
+ .fs-select-field-messages {
65
+ align-self: stretch;
66
+ color: var(--fs-select-field-error-color);
67
+ }
68
+
69
+ .fs-select-field-description {
70
+ color: var(--fs-select-field-color);
71
+ }
@@ -0,0 +1,6 @@
1
+ .fs-slide-group {
2
+ & > .v-slide-group__container > .v-slide-group__content {
3
+ padding: var(--fs-group-padding);
4
+ gap: var(--fs-group-gap);
5
+ }
6
+ }
@@ -1,6 +1,34 @@
1
1
  .fs-slider {
2
2
  padding: 0px !important;
3
- width: 100%;
3
+ width: calc(100% - 16px);
4
+
5
+ & .v-slider__container {
6
+ cursor: var(--fs-slider-cursor);
7
+ opacity: 1 !important;
8
+ }
9
+
10
+ & .v-slider-track__background {
11
+ background-color: var(--fs-slider-track-color);
12
+ height: 6px !important;
13
+ opacity: 1;
14
+ }
15
+
16
+ & .v-slider-track__fill {
17
+ display: none;
18
+ }
19
+
20
+ & .v-slider-track__tick {
21
+ background-color: var(--fs-slider-thumb-color);
22
+ border-radius: 50%;
23
+ }
24
+
25
+ & .v-slider-thumb {
26
+ color: var(--fs-slider-thumb-color);
27
+
28
+ &__surface:before {
29
+ display: none;
30
+ }
31
+ }
4
32
  }
5
33
 
6
34
  .fs-slider-label {
@@ -9,12 +37,4 @@
9
37
 
10
38
  .fs-slider-description {
11
39
  color: var(--fs-slider-color);
12
- }
13
-
14
- .v-slider-thumb__ripple {
15
- display: none;
16
- }
17
-
18
- .v-slider-thumb__surface:after {
19
- content: none;
20
40
  }
@@ -1,5 +1,13 @@
1
1
  .fs-span {
2
2
  padding-inline-end: 2px;
3
+ max-width: 100%;
4
+ }
5
+
6
+ .fs-span-line-clamp {
7
+ overflow: hidden;
8
+ display: -webkit-box;
9
+ -webkit-box-orient: vertical;
10
+ -webkit-line-clamp: 2;
3
11
  }
4
12
 
5
13
  .fs-span-ellipsis {
@@ -0,0 +1,9 @@
1
+ .fs-submit-dialog {
2
+ min-width: 35vw !important;
3
+ }
4
+
5
+ .fs-submit-dialog-actions {
6
+ position: sticky;
7
+ right: 8px;
8
+ bottom: 8px;
9
+ }
@@ -15,6 +15,8 @@
15
15
  padding: 0 16px;
16
16
  border-bottom: 1px solid var(--fs-group-color) !important;
17
17
  color: var(--fs-group-color) !important;
18
+ display: flex;
19
+ align-items: center;
18
20
 
19
21
  & .fs-tab-label {
20
22
  @extend .text-button;
@@ -49,6 +51,8 @@
49
51
  border-radius: 4px;
50
52
  background-color: var(--fs-tab-tag-background-color);
51
53
  color: var(--fs-tab-tag-color);
54
+ display: flex;
55
+ align-items: center;
52
56
 
53
57
  @include web {
54
58
  min-width: 28px;
@@ -1,14 +1,3 @@
1
- .fs-tag-field-icon {
2
- opacity: 1 !important;
3
- cursor: var(--fs-tag-field-cursor) !important;
4
- color: var(--fs-tag-field-base-text) !important;
5
- transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
6
-
7
- &:hover {
8
- color: var(--fs-tag-field-dark-text) !important;
9
- }
10
- }
11
-
12
1
  .fs-tag-field-label {
13
2
  color: var(--fs-tag-field-color);
14
3
  }
@@ -4,8 +4,10 @@
4
4
 
5
5
  & > .v-input__control > .v-field {
6
6
  border: 1px solid var(--fs-text-field-border-color) !important;
7
+ cursor: var(--fs-text-field-cursor) !important;
7
8
  border-radius: 4px !important;
8
9
  padding: 0 16px !important;
10
+ gap: 8px;
9
11
 
10
12
  &--error {
11
13
  border-color: var(--fs-text-field-error-border-color) !important;
@@ -19,23 +21,29 @@
19
21
  display: none;
20
22
  }
21
23
 
22
- & > .v-field__field > input {
23
- @extend .text-body;
24
-
25
- padding-inline: 0 !important;
26
- cursor: var(--fs-text-field-cursor) !important;
27
- color: var(--fs-text-field-color);
28
-
29
- @include web {
30
- min-height: 46px !important;
31
- height: 46px !important;
32
- }
33
-
34
- @include mobile {
35
- min-height: 34px !important;
36
- height: 34px !important;
24
+ & > .v-field__field {
25
+ & > input {
26
+ @extend .text-body;
27
+
28
+ padding-inline: 0 !important;
29
+ color: var(--fs-text-field-color);
30
+ cursor: var(--fs-select-field-cursor) !important;
31
+
32
+ @include web {
33
+ min-height: 38px !important;
34
+ height: 38px !important;
35
+ }
36
+
37
+ @include mobile {
38
+ min-height: 34px !important;
39
+ height: 34px !important;
40
+ }
37
41
  }
38
42
  }
43
+
44
+ & > .v-field__clearable {
45
+ margin-inline: 0px;
46
+ }
39
47
  }
40
48
  }
41
49
 
@@ -0,0 +1,33 @@
1
+ .fs-tile {
2
+ position: relative;
3
+ border-bottom-left-radius: 0px !important;
4
+ border-bottom-right-radius: 0px !important;
5
+ }
6
+
7
+ .fs-tile-bottom {
8
+ position: absolute;
9
+ bottom: -1px;
10
+ left: -1px;
11
+ width: calc(100% + 2px);
12
+ height: 3px;
13
+ background: var(--fs-tile-border-color);
14
+ }
15
+
16
+ .fs-tile-checkbox {
17
+ border-radius: 4px;
18
+ position: absolute;
19
+ align-items: center;
20
+ justify-content: center;
21
+ top: 1px;
22
+ right: 1px;
23
+
24
+ @include web {
25
+ width: 40px;
26
+ height: 40px;
27
+ }
28
+
29
+ @include mobile {
30
+ width: 32px;
31
+ height: 32px;
32
+ }
33
+ }
@@ -0,0 +1,5 @@
1
+ .fs-tooltip > .v-overlay__content {
2
+ background: none !important;
3
+ color: initial !important;
4
+ padding: 0 !important;
5
+ }
@@ -1,12 +1,11 @@
1
+ .fs-wrap-group {
2
+ & > .v-slide-group__container > .v-slide-group__content {
3
+ padding: var(--fs-group-padding);
4
+ gap: var(--fs-group-gap);
1
5
 
2
- @include clickscreen {
3
- .fs-wrap-group {
4
- & .v-slide-group__container .v-slide-group__content {
5
- flex: 0 1 auto !important;
6
-
7
- & .fs-row {
8
- flex-wrap: wrap !important;
9
- }
6
+ @include clickscreen {
7
+ flex: 0 1 auto;
8
+ flex-wrap: wrap;
10
9
  }
11
10
  }
12
11
  }
@@ -1,19 +1,38 @@
1
+ @import "fs_autocomplete_field.scss";
1
2
  @import "fs_breadcrumbs.scss";
2
3
  @import "fs_button.scss";
3
4
  @import "fs_calendar.scss";
4
5
  @import "fs_card.scss";
6
+ @import "fs_carousel.scss";
5
7
  @import "fs_checkbox.scss";
8
+ @import "fs_chip.scss";
9
+ @import "fs_clock.scss";
6
10
  @import "fs_col.scss";
7
11
  @import "fs_color.scss";
8
- @import "fs_date_picker.scss";
12
+ @import "fs_color_icon.scss";
13
+ @import "fs_container.scss";
14
+ @import "fs_data_table.scss";
15
+ @import "fs_data_iterator_item.scss";
16
+ @import "fs_date_field.scss";
17
+ @import "fs_dialog.scss";
18
+ @import "fs_divider.scss";
9
19
  @import "fs_fade_out.scss";
20
+ @import "fs_filter_button.scss";
21
+ @import "fs_header_button.scss";
22
+ @import "fs_hidden_button.scss";
23
+ @import "fs_icon_field.scss";
10
24
  @import "fs_icon.scss";
25
+ @import "fs_image.scss";
26
+ @import "fs_load_tile.scss";
11
27
  @import "fs_password_field.scss";
12
28
  @import "fs_radio.scss";
13
29
  @import "fs_rich_text_field.scss";
14
30
  @import "fs_row.scss";
31
+ @import "fs_select_field.scss";
32
+ @import "fs_slide_group.scss";
15
33
  @import "fs_slider.scss";
16
34
  @import "fs_span.scss";
35
+ @import "fs_submit_dialog.scss";
17
36
  @import "fs_switch.scss";
18
37
  @import "fs_tag.scss";
19
38
  @import "fs_tabs.scss";
@@ -21,4 +40,6 @@
21
40
  @import "fs_text_area.scss";
22
41
  @import "fs_text_field.scss";
23
42
  @import "fs_text.scss";
43
+ @import "fs_tile.scss";
44
+ @import "fs_tooltip.scss";
24
45
  @import "fs_wrap_group.scss";
@@ -1,5 +1,12 @@
1
+ $extra-small-breakpoint: 599px;
1
2
  $mobile-breakpoint: 1264px;
2
3
 
4
+ @mixin extra-small {
5
+ @media only screen and (max-width: $extra-small-breakpoint) {
6
+ @content;
7
+ }
8
+ }
9
+
3
10
  @mixin mobile {
4
11
  @media only screen and (max-width: $mobile-breakpoint) {
5
12
  @content;
@@ -30,34 +30,47 @@ input[type=number]::-webkit-outer-spin-button {
30
30
  margin: 0;
31
31
  }
32
32
 
33
+ .v-overlay__content {
34
+ min-width: 0 !important;
35
+ }
36
+
33
37
  /***** Applies to all slide groups (FSTabs, FSSlideGroup, FSWrapGroup) *****/
34
38
 
35
39
  // On touchscreen, hide arrows
36
40
  // Otherwise show small ones with base text color
37
41
  .v-slide-group__prev,
38
42
  .v-slide-group__next {
39
- transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
43
+ color: var(--fs-group-color);
40
44
  min-width: 24px !important;
41
45
  width: 24px !important;
42
46
  flex: 1 1 0 !important;
43
- color: var(--fs-group-color);
44
47
 
45
48
  @include touchscreen {
46
49
  display: none !important;
47
50
  }
48
51
  }
49
52
 
50
- // Light background color & dark text color on arrows when hovered
53
+ // Change color on arrows when hovered
51
54
  .v-slide-group__prev:hover,
52
55
  .v-slide-group__next:hover {
53
- background-color: var(--fs-group-hover-background-color);
54
56
  color: var(--fs-group-hover-color);
55
57
  }
56
58
 
57
- // Light text color on arrows when disabled
59
+ // remove arrows when disabled
58
60
  .v-slide-group__prev--disabled,
59
61
  .v-slide-group__next--disabled {
60
- color: var(--fs-group-disabled-color) !important;
62
+ display: none !important;
63
+ }
64
+
65
+ // Badges are totally overriden
66
+ .v-badge__badge {
67
+ align-items: center !important;
68
+ justify-content: center !important;
69
+ padding: 3px 4px 3px 4px !important;
70
+ font-size: 10px !important;
71
+ font-weight: 900;
72
+ min-width: 16px !important;
73
+ height: 16px !important;
61
74
  }
62
75
 
63
- /***************************************************************************/
76
+ /***************************************************************************/
@@ -63,14 +63,14 @@
63
63
  text-transform: none !important;
64
64
 
65
65
  @include web {
66
- font-size: 16px !important;
67
- line-height: 20px !important;
66
+ font-size: 14px !important;
67
+ line-height: 16px !important;
68
68
  letter-spacing: -0.48px !important;
69
69
  }
70
70
 
71
71
  @include mobile {
72
- font-size: 13px !important;
73
- line-height: 16px !important;
72
+ font-size: 12px !important;
73
+ line-height: 14px !important;
74
74
  letter-spacing: -0.39px !important;
75
75
  }
76
76
  }
@@ -82,14 +82,14 @@
82
82
  text-transform: none !important;
83
83
 
84
84
  @include web {
85
- font-size: 16px !important;
86
- line-height: 20px !important;
85
+ font-size: 14px !important;
86
+ line-height: 16px !important;
87
87
  letter-spacing: -0.48px !important;
88
88
  }
89
89
 
90
90
  @include mobile {
91
- font-size: 13px !important;
92
- line-height: 16px !important;
91
+ font-size: 12px !important;
92
+ line-height: 14px !important;
93
93
  letter-spacing: -0.39px !important;
94
94
  }
95
95
  }
package/themes/default.ts CHANGED
@@ -1,22 +1,12 @@
1
1
  import { ThemeDefinition } from "vuetify";
2
2
 
3
- export enum ColorBase {
4
- Background = "background",
5
- Light = "light",
6
- Dark = "dark",
7
- Primary = "primary",
8
- Error = "error",
9
- Warning = "warning",
10
- Success = "success"
11
- };
12
-
13
3
  export const DefaultTheme: ThemeDefinition = {
14
4
  dark: false,
15
5
  colors: {
16
6
  "background": "#F9F9F9",
17
7
  "light" : "#E1E2E3", // hsv(216, 1, 89)
18
8
  "dark" : "#3F4040", // hsv(211, 1, 25)
19
- "primary" : "#0058E6", // hsv(217, 100, 90)
9
+ "primary" : "#0059E5", // hsv(217, 100, 90)
20
10
  "success" : "#6DE038", // hsv(101, 75, 88)
21
11
  "warning" : "#E6A52E", // hsv(39, 80, 90)
22
12
  "error" : "#E01212" // hsv(0, 92, 88)
package/utils/css.ts ADDED
@@ -0,0 +1,11 @@
1
+ export const sizeToVar = (value: string | number | null, nullValue: string = "fit-content", unit: "px" | "%" | "em"| "vw" | "vh" = "px"): string => {
2
+ if (value == null) {
3
+ return nullValue;
4
+ }
5
+ return typeof value === 'string' ? value : `${value}${unit}`;
6
+ };
7
+
8
+ export const varToSize = (value: string): number => {
9
+ const parsed = parseInt(value.replace(/[^0-9.]/g, ''));
10
+ return isNaN(parsed) ? 0 : parsed;
11
+ }