@eturnity/eturnity_reusable_components 9.22.2 → 9.25.0

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 (92) hide show
  1. package/dist/index.es3.js +268 -156
  2. package/package.json +3 -3
  3. package/src/assets/theme.js +202 -90
  4. package/src/components/accordion/Accordion.stories.js +1 -1
  5. package/src/components/addNewButton/AddNewButton.stories.js +40 -8
  6. package/src/components/banner/actionBanner/ActionBanner.stories.js +1 -1
  7. package/src/components/banner/actionBanner/index.vue +4 -2
  8. package/src/components/banner/banner/Banner.stories.js +1 -1
  9. package/src/components/banner/infoBanner/InfoBanner.stories.js +1 -1
  10. package/src/components/banner/infoBanner/index.vue +4 -2
  11. package/src/components/banner/notificationBanner/notificationBanner.stories.js +81 -0
  12. package/src/components/buttons/buttonIcon/index.vue +216 -80
  13. package/src/components/buttons/closeButton/CloseButton.stories.js +1 -1
  14. package/src/components/buttons/collection/index.vue +1 -3
  15. package/src/components/buttons/mainButton/index.vue +98 -44
  16. package/src/components/buttons/splitButtons/splitButtons.stories.js +70 -0
  17. package/src/components/card/Card.stories.js +16 -4
  18. package/src/components/card/index.vue +1 -1
  19. package/src/components/collapsableInfoText/collapsableInfoText.stories.js +52 -0
  20. package/src/components/deleteIcon/DeleteIcon.stories.js +1 -1
  21. package/src/components/draggableCard/draggableCard.stories.js +1 -1
  22. package/src/components/draggableInputHandle/draggableInputHandle.stories.js +43 -0
  23. package/src/components/dropdown/Dropdown.stories.js +1 -1
  24. package/src/components/errorMessage/errorMessage.stories.js +31 -17
  25. package/src/components/filter/filterSettings.vue +1 -1
  26. package/src/components/icon/Icon.stories.js +1 -1
  27. package/src/components/iconWrapper/iconWrapper.stories.js +78 -0
  28. package/src/components/infoCard/InfoCard.stories.js +1 -1
  29. package/src/components/infoLabel/infoLabel.stories.js +61 -0
  30. package/src/components/infoText/infoText.stories.js +1 -1
  31. package/src/components/inputs/checkbox/Checkbox.stories.js +1 -1
  32. package/src/components/inputs/checkbox/index.vue +10 -1
  33. package/src/components/inputs/inputNumber/InputNumber.stories.js +1 -1
  34. package/src/components/inputs/inputNumber/index.vue +15 -5
  35. package/src/components/inputs/inputNumberQuestion/inputNumberQuestion.stories.js +77 -0
  36. package/src/components/inputs/inputText/InputText.stories.js +1 -1
  37. package/src/components/inputs/inputText/index.vue +29 -20
  38. package/src/components/inputs/isRequiredLabelStar/isRequiredLabelStar.stories.js +26 -0
  39. package/src/components/inputs/radioButton/RadioButton.stories.js +1 -1
  40. package/src/components/inputs/radioButton/index.vue +21 -7
  41. package/src/components/inputs/searchInput/SearchInput.stories.js +1 -1
  42. package/src/components/inputs/select/index.vue +33 -21
  43. package/src/components/inputs/select/option/index.vue +1 -1
  44. package/src/components/inputs/select/select.stories.js +4 -25
  45. package/src/components/inputs/shared/inputLabelTypography.js +7 -0
  46. package/src/components/inputs/slider/index.vue +9 -12
  47. package/src/components/inputs/slider/slider.stories.js +71 -0
  48. package/src/components/inputs/switchField/index.vue +37 -10
  49. package/src/components/inputs/switchField/switchField.stories.js +71 -0
  50. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +1 -1
  51. package/src/components/inputs/textAreaInput/index.vue +19 -6
  52. package/src/components/inputs/toggle/Toggle.stories.js +1 -1
  53. package/src/components/inputs/toggle/index.vue +10 -6
  54. package/src/components/label/index.vue +39 -11
  55. package/src/components/label/label.stories.js +69 -0
  56. package/src/components/markerItem/markerItem.stories.js +46 -0
  57. package/src/components/modals/actionModal/actionModal.stories.js +1 -1
  58. package/src/components/modals/actionModal/index.vue +1 -1
  59. package/src/components/modals/infoModal/index.vue +1 -10
  60. package/src/components/modals/infoModal/infoModal.stories.js +1 -1
  61. package/src/components/modals/modal/modal.spec.js +168 -0
  62. package/src/components/modals/modal/modal.stories.js +287 -26
  63. package/src/components/modals/modalBody/index.vue +30 -0
  64. package/src/components/modals/modalButtonContainer/index.vue +42 -0
  65. package/src/components/modals/modalButtonContainer/modalButtonContainer.stories.js +59 -0
  66. package/src/components/modals/modalContent/index.vue +125 -0
  67. package/src/components/modals/modalTitle/index.vue +34 -0
  68. package/src/components/navigationTabs/navigationTabs.stories.js +58 -0
  69. package/src/components/pageSubtitle/PageSubtitle.stories.js +1 -1
  70. package/src/components/pageTitle/PageTitle.stories.js +1 -1
  71. package/src/components/pagination/pagination.stories.js +79 -0
  72. package/src/components/paginationV2/paginationV2.spec.js +132 -0
  73. package/src/components/paginationV2/paginationV2.stories.js +68 -0
  74. package/src/components/panelRangeInfo/panelRangeInfo.stories.js +60 -0
  75. package/src/components/progressBar/ProgressBar.stories.js +1 -1
  76. package/src/components/progressStep/progressStep.stories.js +1 -1
  77. package/src/components/projectMarker/ProjectMarker.stories.js +1 -1
  78. package/src/components/rangeSlider/RangeSlider.stories.js +1 -1
  79. package/src/components/roundTabs/roundTabs.stories.js +54 -0
  80. package/src/components/selectedOptions/selectedOptions.stories.js +1 -1
  81. package/src/components/sideMenu/sideMenu.stories.js +53 -0
  82. package/src/components/spinner/Spinner.stories.js +1 -1
  83. package/src/components/spinnerGif/SpinnerGif.stories.js +1 -1
  84. package/src/components/statusIndicator/statusIndicator.stories.js +101 -0
  85. package/src/components/tableDropdown/TableDropdown.stories.js +1 -1
  86. package/src/components/tables/viewTable/viewTable.stories.js +85 -0
  87. package/src/components/tabsHeader/TabsHeader.stories.js +1 -1
  88. package/src/components/tag/conversionTag/conversionTag.stories.js +47 -0
  89. package/src/components/tag/freeTrialTag/freeTrialTag.stories.js +42 -0
  90. package/src/components/threeDots/index.vue +20 -3
  91. package/src/components/threeDots/threeDots.stories.js +59 -0
  92. package/src/components/videoThumbnail/videoThumbnail.stories.js +1 -1
@@ -1,7 +1,7 @@
1
1
  import Checkbox from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'Checkbox',
4
+ title: 'Components/Inputs/Checkbox',
5
5
  component: Checkbox,
6
6
  tags: ['autodocs'],
7
7
  }
@@ -45,6 +45,12 @@
45
45
  // />
46
46
  import styled from 'vue3-styled-components'
47
47
  import IsRequiredLabelStar from '../isRequiredLabelStar'
48
+ import {
49
+ inputLabelFontSize,
50
+ inputLabelFontWeight,
51
+ inputLabelLetterSpacing,
52
+ inputLabelLineHeight,
53
+ } from '../shared/inputLabelTypography'
48
54
  const ComponentWrapper = styled.div`
49
55
  min-height: 16px;
50
56
  `
@@ -178,7 +184,10 @@
178
184
  isDisabled: Boolean,
179
185
  }
180
186
  const LabelText = styled('div', LabelTextAttrs)`
181
- font-size: 13px;
187
+ font-size: ${inputLabelFontSize};
188
+ font-weight: ${inputLabelFontWeight};
189
+ line-height: ${inputLabelLineHeight};
190
+ letter-spacing: ${inputLabelLetterSpacing};
182
191
  display: flex;
183
192
  align-items: center;
184
193
  min-height: 16px;
@@ -1,7 +1,7 @@
1
1
  import InputNumber from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'InputNumber',
4
+ title: 'Components/Inputs/InputNumber',
5
5
  component: InputNumber,
6
6
  // argTypes: {},
7
7
  }
@@ -50,7 +50,7 @@
50
50
  "
51
51
  :border-color="
52
52
  colorMode === 'transparent' && !borderColor
53
- ? 'white'
53
+ ? 'grey4'
54
54
  : borderColor
55
55
  "
56
56
  :color-mode="colorMode"
@@ -97,7 +97,7 @@
97
97
  colorMode === 'transparent' ? 'transparent' : backgroundColor
98
98
  "
99
99
  :border-color="
100
- colorMode === 'transparent' && !borderColor ? 'white' : borderColor
100
+ colorMode === 'transparent' && !borderColor ? 'grey4' : borderColor
101
101
  "
102
102
  :color-mode="colorMode"
103
103
  :data-id="inputDataId"
@@ -250,6 +250,12 @@
250
250
  import IsRequiredLabelStar from '../isRequiredLabelStar'
251
251
  import warningIcon from '../../../assets/icons/error_icon.png'
252
252
  import Icon from '../../icon'
253
+ import {
254
+ inputLabelFontSize,
255
+ inputLabelFontWeight,
256
+ inputLabelLetterSpacing,
257
+ inputLabelLineHeight,
258
+ } from '../shared/inputLabelTypography'
253
259
 
254
260
  const inputProps = {
255
261
  isError: Boolean,
@@ -496,12 +502,16 @@
496
502
  `
497
503
 
498
504
  const LabelText = styled('div', inputProps)`
499
- font-size: 13px;
505
+ font-size: ${(props) =>
506
+ props.fontSize ? props.fontSize : inputLabelFontSize};
507
+ font-weight: ${(props) =>
508
+ props.labelFontWeight ? props.labelFontWeight : inputLabelFontWeight};
509
+ line-height: ${inputLabelLineHeight};
510
+ letter-spacing: ${inputLabelLetterSpacing};
500
511
  color: ${(props) =>
501
512
  props.theme.colors[props.labelFontColor]
502
513
  ? props.theme.colors[props.labelFontColor]
503
514
  : props.labelFontColor};
504
- font-weight: ${(props) => props.labelFontWeight};
505
515
  `
506
516
 
507
517
  const IconAttrs = { size: String, marginRight: Number }
@@ -737,7 +747,7 @@
737
747
  labelFontWeight: {
738
748
  type: String,
739
749
  required: false,
740
- default: '700',
750
+ default: '500',
741
751
  },
742
752
  focus: {
743
753
  type: Boolean,
@@ -0,0 +1,77 @@
1
+ import { ref } from 'vue'
2
+ import InputNumberQuestion from './index.vue'
3
+ import theme from '@/assets/theme'
4
+
5
+ const questionWithUnit = {
6
+ number_format_precision: 2,
7
+ number_min_allowed: 0,
8
+ number_max_allowed: 500,
9
+ unit_short_name: 'kWh',
10
+ }
11
+
12
+ const questionPlain = {
13
+ number_format_precision: 0,
14
+ number_min_allowed: 1,
15
+ number_max_allowed: 99,
16
+ unit_short_name: '',
17
+ }
18
+
19
+ export default {
20
+ title: 'Components/Inputs/InputNumberQuestion',
21
+ component: InputNumberQuestion,
22
+ tags: ['autodocs'],
23
+ parameters: {
24
+ layout: 'centered',
25
+ },
26
+ }
27
+
28
+ const Template = (args) => ({
29
+ components: { InputNumberQuestion },
30
+ setup() {
31
+ const val = ref(args.value)
32
+ return { args, val }
33
+ },
34
+ template: `
35
+ <div data-test-id="input-number-question-story" style="min-width: 280px; padding: 16px;">
36
+ <InputNumberQuestion
37
+ :question="args.question"
38
+ :value="val"
39
+ :placeholder="args.placeholder"
40
+ :is-error="args.isError"
41
+ :input-width="args.inputWidth"
42
+ :error-message="args.errorMessage"
43
+ @input-change="val = $event"
44
+ />
45
+ </div>
46
+ `,
47
+ provide: {
48
+ theme,
49
+ },
50
+ })
51
+
52
+ export const WithUnit = Template.bind({})
53
+ WithUnit.args = {
54
+ question: questionWithUnit,
55
+ value: '120',
56
+ placeholder: 'Annual consumption',
57
+ isError: false,
58
+ inputWidth: '200px',
59
+ errorMessage: 'Enter a number between 0 and 500',
60
+ }
61
+
62
+ export const PlainInteger = Template.bind({})
63
+ PlainInteger.args = {
64
+ question: questionPlain,
65
+ value: '',
66
+ placeholder: 'Floor number',
67
+ isError: false,
68
+ inputWidth: '160px',
69
+ errorMessage: 'Enter a number between 1 and 99',
70
+ }
71
+
72
+ export const WithError = Template.bind({})
73
+ WithError.args = {
74
+ ...PlainInteger.args,
75
+ value: 'abc',
76
+ isError: true,
77
+ }
@@ -1,7 +1,7 @@
1
1
  import InputText from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'InputText',
4
+ title: 'Components/Inputs/InputText',
5
5
  component: InputText,
6
6
  tags: ['autodocs'],
7
7
  }
@@ -107,6 +107,12 @@
107
107
  import ErrorMessage from '../../errorMessage'
108
108
  import InputValidations from '../../../mixins/inputValidations.js'
109
109
  import IsRequiredLabelStar from '../isRequiredLabelStar'
110
+ import {
111
+ inputLabelFontSize,
112
+ inputLabelFontWeight,
113
+ inputLabelLetterSpacing,
114
+ inputLabelLineHeight,
115
+ } from '../shared/inputLabelTypography'
110
116
 
111
117
  const Container = styled.div`
112
118
  width: 100%;
@@ -119,14 +125,17 @@
119
125
  props.theme.colors[props.labelFontColor]
120
126
  ? props.theme.colors[props.labelFontColor]
121
127
  : props.labelFontColor
122
- ? props.labelFontColor
123
- : props.theme.colors.eturnityGrey};
128
+ ? props.labelFontColor
129
+ : props.theme.colors.eturnityGrey};
124
130
 
125
- font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
126
- font-weight: 700;
131
+ font-size: ${(props) =>
132
+ props.fontSize ? props.fontSize : inputLabelFontSize};
133
+ font-weight: ${inputLabelFontWeight};
134
+ line-height: ${inputLabelLineHeight};
135
+ letter-spacing: ${inputLabelLetterSpacing};
127
136
  `
128
137
  const OptionalLabel = styled.span`
129
- font-weight: 300;
138
+ font-weight: 400;
130
139
  `
131
140
  const LabelWrapper = styled.div`
132
141
  display: inline-grid;
@@ -163,29 +172,29 @@
163
172
  props.noBorder
164
173
  ? 'none'
165
174
  : props.isError
166
- ? '1px solid ' + props.theme.colors.red
167
- : props.borderColor
168
- ? props.theme.colors[props.borderColor]
169
- ? '1px solid ' + props.theme.colors[props.borderColor]
170
- : '1px solid ' + props.borderColor
171
- : '1px solid ' + props.theme.colors.grey4};
175
+ ? '1px solid ' + props.theme.colors.red
176
+ : props.borderColor
177
+ ? props.theme.colors[props.borderColor]
178
+ ? '1px solid ' + props.theme.colors[props.borderColor]
179
+ : '1px solid ' + props.borderColor
180
+ : '1px solid ' + props.theme.colors.grey4};
172
181
  padding: ${(props) =>
173
182
  props.isError
174
183
  ? '11px 25px 11px 10px'
175
184
  : props.inputType === 'password'
176
- ? '11px 25px 11px 10px'
177
- : props.defaultPadding
178
- ? '10px 35px 10px 15px'
179
- : '11px 5px 11px 10px'};
185
+ ? '11px 25px 11px 10px'
186
+ : props.defaultPadding
187
+ ? '10px 35px 10px 15px'
188
+ : '11px 5px 11px 10px'};
180
189
  border-radius: 4px;
181
190
  position: relative;
182
- font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
191
+ font-size: ${(props) => (props.fontSize ? props.fontSize : '14px')};
183
192
  color: ${(props) =>
184
193
  props.isDisabled
185
194
  ? props.theme.colors.grey2
186
195
  : props.fontColor
187
- ? props.fontColor + ' !important'
188
- : props.theme.colors.black};
196
+ ? props.fontColor + ' !important'
197
+ : props.theme.colors.black};
189
198
 
190
199
  width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
191
200
  min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
@@ -199,8 +208,8 @@
199
208
  ? props.disabledBackgroundColor + ' !important'
200
209
  : props.theme.colors.grey5
201
210
  : props.backgroundColor
202
- ? props.backgroundColor + ' !important'
203
- : props.theme.colors.white};
211
+ ? props.backgroundColor + ' !important'
212
+ : props.theme.colors.white};
204
213
  &::placeholder {
205
214
  color: ${(props) => props.theme.colors.grey2};
206
215
  }
@@ -0,0 +1,26 @@
1
+ import IsRequiredLabelStar from './index.vue'
2
+ import theme from '@/assets/theme'
3
+
4
+ export default {
5
+ title: 'Components/Inputs/IsRequiredLabelStar',
6
+ component: IsRequiredLabelStar,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ }
12
+
13
+ const Template = () => ({
14
+ components: { IsRequiredLabelStar },
15
+ template: `
16
+ <span data-test-id="required-star-story" style="font-size: 14px;">
17
+ Required field
18
+ <IsRequiredLabelStar />
19
+ </span>
20
+ `,
21
+ provide: {
22
+ theme,
23
+ },
24
+ })
25
+
26
+ export const Default = Template.bind({})
@@ -4,7 +4,7 @@ import defaultRadioButtonProps from './defaultProps'
4
4
  import RadioButton from './index.vue'
5
5
 
6
6
  export default {
7
- title: 'RadioButton',
7
+ title: 'Components/Inputs/RadioButton',
8
8
  component: RadioButton,
9
9
  tags: ['autodocs'],
10
10
  }
@@ -110,6 +110,12 @@
110
110
  import InfoText from '../../infoText'
111
111
  import IsRequiredLabelStar from '../isRequiredLabelStar'
112
112
  import ErrorMessage from '../../errorMessage'
113
+ import {
114
+ inputLabelFontSize,
115
+ inputLabelFontWeight,
116
+ inputLabelLetterSpacing,
117
+ inputLabelLineHeight,
118
+ } from '../shared/inputLabelTypography'
113
119
 
114
120
  const wrapperProps = {
115
121
  layout: String,
@@ -159,12 +165,6 @@
159
165
  : props.theme.colors.black};
160
166
  position: relative;
161
167
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
162
- font-size: ${(props) =>
163
- props.size === 'large'
164
- ? '16px'
165
- : props.size === 'medium'
166
- ? '13px'
167
- : '10px'};
168
168
  user-select: none;
169
169
  flex: auto;
170
170
  align-self: baseline;
@@ -213,8 +213,22 @@
213
213
  }
214
214
  `
215
215
 
216
- const textAttrs = { isDisabled: Boolean, colorMode: String }
216
+ const textAttrs = {
217
+ isDisabled: Boolean,
218
+ colorMode: String,
219
+ fontSize: String,
220
+ fontWeight: String,
221
+ labelFontWeight: String,
222
+ }
217
223
  const LabelText = styled('div', textAttrs)`
224
+ font-size: ${(props) =>
225
+ props.fontSize ? props.fontSize : inputLabelFontSize};
226
+ font-weight: ${(props) =>
227
+ props.fontWeight || props.labelFontWeight
228
+ ? props.fontWeight || props.labelFontWeight
229
+ : inputLabelFontWeight};
230
+ line-height: ${inputLabelLineHeight};
231
+ letter-spacing: ${inputLabelLetterSpacing};
218
232
  color: ${(props) =>
219
233
  props.isDisabled
220
234
  ? props.theme.colors.grey2
@@ -4,7 +4,7 @@ import defaultSearchInputProps from './defaultProps'
4
4
  import SearchInput from './index.vue'
5
5
 
6
6
  export default {
7
- title: 'SearchInput',
7
+ title: 'Components/Inputs/SearchInput',
8
8
  component: SearchInput,
9
9
  tags: ['autodocs'],
10
10
  }
@@ -24,7 +24,6 @@
24
24
  ? 'white'
25
25
  : 'eturnityGrey'
26
26
  "
27
- :font-size="fontSize"
28
27
  :font-weight="labelFontWeight"
29
28
  >{{ label }}
30
29
  <IsRequiredLabelStar v-if="isRequiredLabel" />
@@ -50,7 +49,7 @@
50
49
  buttonBgColor
51
50
  ? buttonBgColor
52
51
  : colorMode == 'dark'
53
- ? 'transparentBlack1'
52
+ ? 'transparent'
54
53
  : colorMode == 'transparent'
55
54
  ? 'transparent'
56
55
  : 'white'
@@ -155,6 +154,7 @@
155
154
  : 'white'
156
155
  "
157
156
  class="rc-select-dropdown"
157
+ :color-mode="colorMode"
158
158
  :dropdown-match-max-content="dropdownMatchMaxContent"
159
159
  :dropdown-position="dropdownPosition"
160
160
  :font-color="
@@ -233,9 +233,9 @@
233
233
  ></slot>
234
234
  <slot
235
235
  v-if="isCustomOptionVisible"
236
- name="customOption"
237
236
  :custom-option-value="customOptionValue"
238
- />
237
+ name="customOption"
238
+ ></slot>
239
239
  </SelectDropdown>
240
240
  </Component>
241
241
  </DropdownWrapper>
@@ -287,6 +287,12 @@
287
287
  import InputText from '../inputText'
288
288
  import DraggableInputHandle from '../../draggableInputHandle'
289
289
  import IsRequiredLabelStar from '../isRequiredLabelStar'
290
+ import {
291
+ inputLabelFontSize,
292
+ inputLabelFontWeight,
293
+ inputLabelLetterSpacing,
294
+ inputLabelLineHeight,
295
+ } from '../shared/inputLabelTypography'
290
296
  import { debounce } from '../../../utils'
291
297
 
292
298
  const CARET_WIDTH = '30px'
@@ -323,6 +329,7 @@
323
329
  showBorder: Boolean,
324
330
  }
325
331
  const Selector = styled('div', selectorProps)`
332
+ font-size: 14px;
326
333
  color: ${(props) => (props.disabled ? props.theme.colors.grey2 : '')};
327
334
  ${(props) =>
328
335
  props.selectWidth === '100%'
@@ -357,8 +364,12 @@
357
364
  props.theme.colors[props.fontColor]
358
365
  ? props.theme.colors[props.fontColor]
359
366
  : props.fontColor};
360
- font-size: ${(props) => props.fontSize};
361
- font-weight: ${(props) => props.fontWeight};
367
+ font-size: ${(props) =>
368
+ props.fontSize ? props.fontSize : inputLabelFontSize};
369
+ font-weight: ${(props) =>
370
+ props.fontWeight ? props.fontWeight : inputLabelFontWeight};
371
+ line-height: ${inputLabelLineHeight};
372
+ letter-spacing: ${inputLabelLetterSpacing};
362
373
  `
363
374
  const OptionalLabel = styled.span`
364
375
  font-weight: 300;
@@ -443,7 +454,7 @@
443
454
  display: flex;
444
455
  align-items: center;
445
456
  ${(props) => (props.selectHeight ? `height: ${props.selectHeight};` : '')}
446
- ${({ showBorder, theme, hasError }) =>
457
+ ${({ showBorder, theme, hasError, colorMode }) =>
447
458
  showBorder &&
448
459
  `
449
460
  border: ${BORDER_WIDTH} solid ${
@@ -472,7 +483,11 @@
472
483
  overflow: hidden;
473
484
  & > .handle {
474
485
  border-right: ${(props) =>
475
- props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
486
+ props.hasError
487
+ ? props.theme.colors.red
488
+ : props.colorMode === 'light'
489
+ ? props.theme.colors.grey4
490
+ : props.theme.colors.white}
476
491
  1px solid;
477
492
  }
478
493
  `
@@ -492,6 +507,7 @@
492
507
  isFixedDropdownPosition: Boolean,
493
508
  isTeleport: Boolean,
494
509
  dropdownMatchMaxContent: Boolean,
510
+ colorMode: String,
495
511
  }
496
512
  const SelectDropdown = styled('div', selectDropdownAttrs)`
497
513
  box-sizing: border-box;
@@ -564,7 +580,7 @@
564
580
  gap: 8px;
565
581
  box-sizing: border-box;
566
582
  width: 100%;
567
- border: 1px solid ${(p) => p.theme.semanticColors.grey[300]};
583
+ border: 1px solid ${(p) => p.theme.semanticColors.teal[600]};
568
584
  border-radius: 8px;
569
585
  background-color: ${(p) => p.theme.colors.white};
570
586
  `
@@ -648,7 +664,7 @@
648
664
  },
649
665
  labelFontWeight: {
650
666
  required: false,
651
- default: '700',
667
+ default: '500',
652
668
  type: String,
653
669
  },
654
670
  isRequiredLabel: {
@@ -715,7 +731,7 @@
715
731
  },
716
732
  dropdownBgColor: {
717
733
  required: false,
718
- default: 'grey5',
734
+ default: 'transparent',
719
735
  },
720
736
  dropdownFontColor: {
721
737
  required: false,
@@ -925,12 +941,9 @@
925
941
  isSearchBarVisible() {
926
942
  return (
927
943
  (this.isCustomizable ||
928
- (
929
- this.searchPlacement !== 'dropdown' &&
944
+ (this.searchPlacement !== 'dropdown' &&
930
945
  this.isSearchable &&
931
- this.optionLength >= this.minOptionLength
932
- )
933
- ) &&
946
+ this.optionLength >= this.minOptionLength)) &&
934
947
  this.isDropdownOpen
935
948
  )
936
949
  },
@@ -967,10 +980,7 @@
967
980
  return this.dropdownWidth
968
981
  },
969
982
  isSelectDropdownShown() {
970
- return (
971
- this.isDropdownOpen &&
972
- this.dropdownPosition.left !== null
973
- )
983
+ return this.isDropdownOpen && this.dropdownPosition.left !== null
974
984
  },
975
985
  isMobileDevice() {
976
986
  const userAgent =
@@ -1230,7 +1240,9 @@
1230
1240
  }
1231
1241
 
1232
1242
  nodes.forEach((el) => {
1233
- let show = el.textContent.toLowerCase().includes(q) || el.hasAttribute('data-custom-option')
1243
+ let show =
1244
+ el.textContent.toLowerCase().includes(q) ||
1245
+ el.hasAttribute('data-custom-option')
1234
1246
  if (
1235
1247
  show &&
1236
1248
  hideUnassignedWhenOthers &&
@@ -2,7 +2,7 @@
2
2
  <OptionContainer
3
3
  :background-color="
4
4
  colorMode == 'dark'
5
- ? theme.semanticColors.teal[900]
5
+ ? theme.semanticColors.teal[800]
6
6
  : colorMode == 'transparent'
7
7
  ? 'black'
8
8
  : backgroundColor
@@ -10,7 +10,7 @@ const SELECT_SAMPLE_OPTIONS = [
10
10
  ]
11
11
 
12
12
  export default {
13
- title: 'select',
13
+ title: 'Components/Inputs/Select',
14
14
  component: Select,
15
15
  }
16
16
 
@@ -35,28 +35,6 @@ const Template = (args) => ({
35
35
  </Option>
36
36
  </template>
37
37
  </Select>`,
38
-
39
- // import Select from "@eturnity/eturnity_reusable_components/src/components/inputs/select"
40
- // import Option from "@eturnity/eturnity_reusable_components/src/components/inputs/select/option"
41
- // To use:
42
- // How to use it
43
- // <Select
44
- // hoverDropdown="true"
45
- // selectWidth="100%"
46
- // optionWidth="50%"
47
- // label="that is a label"
48
- // alignItems="vertical"
49
- // >
50
- // <template #selector="{selectedValue}">
51
- // value selected: {{selectedValue}}
52
- // </template>
53
- // <template #dropdown>
54
- // <Option value="1">value one</Option>
55
- // <Option value="2">value two</Option>
56
- // <Option value="3">value three</Option>
57
- // <Option value="4">value four</Option>
58
- // </template>
59
- // </Select>
60
38
  })
61
39
 
62
40
  export const Default = Template.bind({})
@@ -64,7 +42,7 @@ Default.args = {
64
42
  hoverDropdown: false,
65
43
  selectWidth: '100%',
66
44
  optionWidth: '50%',
67
- label: 'that is a label',
45
+ label: 'Service territory',
68
46
  alignItems: 'vertical',
69
47
  value: SELECT_SAMPLE_OPTIONS[1],
70
48
  }
@@ -88,7 +66,8 @@ const CustomizableTemplate = (args) => ({
88
66
  }
89
67
  return options.filter(
90
68
  (item, index, self) =>
91
- self.findIndex((candidate) => candidate.label === item.label) === index
69
+ self.findIndex((candidate) => candidate.label === item.label) ===
70
+ index
92
71
  )
93
72
  })
94
73
  const onInputChange = (value) => {
@@ -0,0 +1,7 @@
1
+ /** Default label typography for input components (matches InputText). */
2
+ export const inputLabelFontSize = '12px'
3
+
4
+ export const inputLabelFontWeight = '500'
5
+
6
+ export const inputLabelLineHeight = '140%'
7
+ export const inputLabelLetterSpacing = '-1%'
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Container>
3
- <Slider
3
+ <VueformSlider
4
4
  :max="maxValue"
5
5
  :min="minValue"
6
6
  :tooltips="false"
@@ -21,7 +21,7 @@
21
21
  // :minValue="10" //default is 0 if not specified
22
22
  // :maxValue="500" //default is 100 if not specified
23
23
  // />
24
- import Slider from '@vueform/slider'
24
+ import VueformSlider from '@vueform/slider'
25
25
  import styled from 'vue3-styled-components'
26
26
 
27
27
  const Container = styled.div`
@@ -81,9 +81,9 @@
81
81
  `
82
82
 
83
83
  export default {
84
- name: 'Slider',
84
+ name: 'RcSlider',
85
85
  components: {
86
- Slider,
86
+ VueformSlider,
87
87
  Container,
88
88
  NumberText,
89
89
  },
@@ -106,14 +106,11 @@
106
106
  },
107
107
  },
108
108
  mounted() {
109
- // This is to add the 3 white lines to the slider button
110
- let slider = document.querySelector('.slider-touch-area')
111
- let span1 = document.createElement('span')
112
- let span2 = document.createElement('span')
113
- let span3 = document.createElement('span')
114
- slider.appendChild(span1)
115
- slider.appendChild(span2)
116
- slider.appendChild(span3)
109
+ const slider = this.$el?.querySelector?.('.slider-touch-area')
110
+ if (!slider) return
111
+ ;[1, 2, 3].forEach(() => {
112
+ slider.appendChild(document.createElement('span'))
113
+ })
117
114
  },
118
115
  methods: {
119
116
  onChange(value) {