@eturnity/eturnity_reusable_components 9.22.2 → 9.25.1

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 (105) hide show
  1. package/dist/index.es3.js +268 -156
  2. package/package.json +3 -3
  3. package/src/assets/svgIcons/add_thin_icon.svg +3 -0
  4. package/src/assets/svgIcons/delete.svg +2 -3
  5. package/src/assets/svgIcons/location_outline.svg +3 -0
  6. package/src/assets/svgIcons/redo.svg +2 -5
  7. package/src/assets/svgIcons/save.svg +2 -2
  8. package/src/assets/svgIcons/subtract_thin_icon.svg +3 -0
  9. package/src/assets/svgIcons/undo.svg +2 -5
  10. package/src/assets/theme.js +202 -90
  11. package/src/components/accordion/Accordion.stories.js +1 -1
  12. package/src/components/addNewButton/AddNewButton.stories.js +40 -8
  13. package/src/components/banner/actionBanner/ActionBanner.stories.js +1 -1
  14. package/src/components/banner/actionBanner/index.vue +4 -2
  15. package/src/components/banner/banner/Banner.stories.js +1 -1
  16. package/src/components/banner/infoBanner/InfoBanner.stories.js +1 -1
  17. package/src/components/banner/infoBanner/index.vue +4 -2
  18. package/src/components/banner/notificationBanner/notificationBanner.stories.js +81 -0
  19. package/src/components/buttons/buttonIcon/index.vue +213 -81
  20. package/src/components/buttons/closeButton/CloseButton.stories.js +1 -1
  21. package/src/components/buttons/collection/index.vue +1 -3
  22. package/src/components/buttons/mainButton/index.vue +99 -45
  23. package/src/components/buttons/splitButtons/splitButtons.stories.js +70 -0
  24. package/src/components/card/Card.stories.js +16 -4
  25. package/src/components/card/index.vue +1 -1
  26. package/src/components/collapsableInfoText/collapsableInfoText.stories.js +52 -0
  27. package/src/components/deleteIcon/DeleteIcon.stories.js +1 -1
  28. package/src/components/draggableCard/draggableCard.stories.js +1 -1
  29. package/src/components/draggableInputHandle/draggableInputHandle.stories.js +43 -0
  30. package/src/components/dropdown/Dropdown.stories.js +1 -1
  31. package/src/components/errorMessage/errorMessage.stories.js +31 -17
  32. package/src/components/filter/filterSettings.vue +1 -1
  33. package/src/components/icon/Icon.stories.js +1 -1
  34. package/src/components/iconWrapper/iconWrapper.stories.js +78 -0
  35. package/src/components/infoCard/InfoCard.stories.js +1 -1
  36. package/src/components/infoLabel/infoLabel.stories.js +61 -0
  37. package/src/components/infoText/infoText.stories.js +1 -1
  38. package/src/components/inputs/checkbox/Checkbox.stories.js +1 -1
  39. package/src/components/inputs/checkbox/index.vue +10 -1
  40. package/src/components/inputs/colorSelector/ColorSelector.stories.js +78 -0
  41. package/src/components/inputs/colorSelector/colorSelector.spec.js +73 -0
  42. package/src/components/inputs/colorSelector/defaultProps.js +11 -0
  43. package/src/components/inputs/colorSelector/index.vue +224 -0
  44. package/src/components/inputs/inputNumber/InputNumber.stories.js +1 -1
  45. package/src/components/inputs/inputNumber/index.vue +69 -59
  46. package/src/components/inputs/inputNumberQuestion/inputNumberQuestion.stories.js +77 -0
  47. package/src/components/inputs/inputText/InputText.stories.js +1 -1
  48. package/src/components/inputs/inputText/index.vue +29 -20
  49. package/src/components/inputs/isRequiredLabelStar/isRequiredLabelStar.stories.js +26 -0
  50. package/src/components/inputs/radioButton/RadioButton.stories.js +1 -1
  51. package/src/components/inputs/radioButton/index.vue +21 -7
  52. package/src/components/inputs/searchInput/SearchInput.stories.js +1 -1
  53. package/src/components/inputs/select/index.vue +33 -21
  54. package/src/components/inputs/select/option/index.vue +1 -1
  55. package/src/components/inputs/select/select.stories.js +4 -25
  56. package/src/components/inputs/shared/inputLabelTypography.js +7 -0
  57. package/src/components/inputs/slider/index.vue +9 -12
  58. package/src/components/inputs/slider/slider.stories.js +71 -0
  59. package/src/components/inputs/switchField/index.vue +38 -10
  60. package/src/components/inputs/switchField/switchField.stories.js +72 -0
  61. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +1 -1
  62. package/src/components/inputs/textAreaInput/index.vue +19 -6
  63. package/src/components/inputs/toggle/Toggle.stories.js +1 -1
  64. package/src/components/inputs/toggle/index.vue +10 -6
  65. package/src/components/label/index.vue +39 -11
  66. package/src/components/label/label.stories.js +69 -0
  67. package/src/components/markerItem/markerItem.stories.js +46 -0
  68. package/src/components/modals/actionModal/actionModal.stories.js +1 -1
  69. package/src/components/modals/actionModal/index.vue +1 -1
  70. package/src/components/modals/infoModal/index.vue +1 -10
  71. package/src/components/modals/infoModal/infoModal.stories.js +1 -1
  72. package/src/components/modals/modal/modal.spec.js +168 -0
  73. package/src/components/modals/modal/modal.stories.js +287 -26
  74. package/src/components/modals/modalBody/index.vue +30 -0
  75. package/src/components/modals/modalButtonContainer/index.vue +42 -0
  76. package/src/components/modals/modalButtonContainer/modalButtonContainer.stories.js +59 -0
  77. package/src/components/modals/modalContent/index.vue +125 -0
  78. package/src/components/modals/modalTitle/index.vue +34 -0
  79. package/src/components/navigationTabs/navigationTabs.stories.js +58 -0
  80. package/src/components/pageSubtitle/PageSubtitle.stories.js +1 -1
  81. package/src/components/pageTitle/PageTitle.stories.js +1 -1
  82. package/src/components/pagination/pagination.stories.js +79 -0
  83. package/src/components/paginationV2/paginationV2.spec.js +132 -0
  84. package/src/components/paginationV2/paginationV2.stories.js +68 -0
  85. package/src/components/panelRangeInfo/panelRangeInfo.stories.js +60 -0
  86. package/src/components/progressBar/ProgressBar.stories.js +1 -1
  87. package/src/components/progressStep/progressStep.stories.js +1 -1
  88. package/src/components/projectMarker/ProjectMarker.stories.js +1 -1
  89. package/src/components/rangeSlider/RangeSlider.stories.js +1 -1
  90. package/src/components/roundTabs/roundTabs.stories.js +54 -0
  91. package/src/components/selectedOptions/selectedOptions.stories.js +1 -1
  92. package/src/components/sideMenu/sideMenu.stories.js +53 -0
  93. package/src/components/spinner/Spinner.stories.js +1 -1
  94. package/src/components/spinnerGif/SpinnerGif.stories.js +1 -1
  95. package/src/components/statusIndicator/statusIndicator.stories.js +101 -0
  96. package/src/components/tableDropdown/TableDropdown.stories.js +1 -1
  97. package/src/components/tables/viewTable/viewTable.stories.js +85 -0
  98. package/src/components/tabsHeader/TabsHeader.stories.js +1 -1
  99. package/src/components/tag/conversionTag/conversionTag.stories.js +47 -0
  100. package/src/components/tag/conversionTag/index.vue +1 -1
  101. package/src/components/tag/freeTrialTag/freeTrialTag.stories.js +42 -0
  102. package/src/components/threeDots/index.vue +20 -3
  103. package/src/components/threeDots/threeDots.stories.js +59 -0
  104. package/src/components/videoThumbnail/videoThumbnail.stories.js +1 -1
  105. package/src/constants/colorPalettes.js +71 -0
@@ -28,8 +28,12 @@
28
28
  <SwitchOption
29
29
  v-for="(item, index) in options"
30
30
  :key="index"
31
+ :border-color="borderColor"
31
32
  :color-mode="colorMode"
32
33
  :data-id="item.hasOwnProperty('dataId') ? item.dataId : ''"
34
+ :height="height"
35
+ :height="height"
36
+ :inactive-border-color="inactiveBorderColor"
33
37
  :inactive-color="inactiveColor"
34
38
  :is-active="value == item.value"
35
39
  :primary-color="primaryColor"
@@ -82,6 +86,12 @@
82
86
  import theme from '../../../assets/theme'
83
87
  import RCIcon from '../../icon'
84
88
  import IsRequiredLabelStar from '../isRequiredLabelStar'
89
+ import {
90
+ inputLabelFontSize,
91
+ inputLabelFontWeight,
92
+ inputLabelLetterSpacing,
93
+ inputLabelLineHeight,
94
+ } from '../shared/inputLabelTypography'
85
95
  const OptionIconContainer = styled.div`
86
96
  display: flex;
87
97
  align-items: center;
@@ -114,8 +124,10 @@
114
124
  }
115
125
  const LabelText = styled('div', toggleAttrs)`
116
126
  color: ${(props) => props.primaryColor};
117
- font-size: 13px;
118
- font-weight: 700;
127
+ font-size: ${inputLabelFontSize};
128
+ font-weight: ${inputLabelFontWeight};
129
+ line-height: ${inputLabelLineHeight};
130
+ letter-spacing: ${inputLabelLetterSpacing};
119
131
  `
120
132
 
121
133
  const SwitchWrapper = styled('span', toggleAttrs)`
@@ -131,6 +143,9 @@
131
143
  inactiveColor: String,
132
144
  size: String,
133
145
  width: String,
146
+ height: String,
147
+ borderColor: String,
148
+ inactiveBorderColor: String,
134
149
  }
135
150
  const SwitchOption = styled('div', optionAttrs)`
136
151
  color: ${(props) =>
@@ -139,7 +154,7 @@
139
154
  props.isActive ? props.secondaryColor : 'transparent'};
140
155
  border: 1px solid
141
156
  ${(props) =>
142
- props.isActive ? props.secondaryColor : props.inactiveColor};
157
+ props.isActive ? props.borderColor : props.inactiveBorderColor};
143
158
  display: flex;
144
159
  width: ${({ width }) => width};
145
160
  word-break: break-word;
@@ -150,7 +165,9 @@
150
165
  line-height: 1;
151
166
  text-align: center;
152
167
  height: ${(props) =>
153
- props.size === 'medium'
168
+ props.height
169
+ ? props.height
170
+ : props.size === 'medium'
154
171
  ? '24px'
155
172
  : props.size === 'small'
156
173
  ? '16px'
@@ -209,6 +226,11 @@
209
226
  required: false,
210
227
  default: 'small',
211
228
  },
229
+ height: {
230
+ required: false,
231
+ default: null,
232
+ type: String,
233
+ },
212
234
  labelAlign: {
213
235
  required: false,
214
236
  default: 'left',
@@ -249,17 +271,23 @@
249
271
  primaryColor: 'white',
250
272
  secondaryColor: 'black',
251
273
  inactiveColor: 'grey6',
274
+ borderColor: 'grey6',
275
+ inactiveBorderColor: 'grey6',
252
276
  }
253
277
  },
254
278
  created() {
255
279
  if (this.colorMode == 'dark') {
256
- this.primaryColor = theme.colors.black
257
- this.secondaryColor = theme.colors.white
258
- this.inactiveColor = theme.colors.grey6
280
+ this.primaryColor = theme.semanticColors.teal[800]
281
+ this.secondaryColor = theme.semanticColors.teal[50]
282
+ this.inactiveColor = theme.semanticColors.teal[50]
283
+ this.borderColor = this.secondaryColor
284
+ this.inactiveBorderColor = theme.semanticColors.teal[600]
259
285
  } else {
260
- this.primaryColor = theme.colors.white
261
- this.secondaryColor = theme.colors.black
262
- this.inactiveColor = theme.colors.grey6
286
+ this.primaryColor = theme.semanticColors.teal[50]
287
+ this.secondaryColor = theme.semanticColors.teal[800]
288
+ this.inactiveColor = theme.semanticColors.teal[50]
289
+ this.borderColor = this.secondaryColor
290
+ this.inactiveBorderColor = theme.semanticColors.teal[50]
263
291
  }
264
292
  },
265
293
  methods: {
@@ -0,0 +1,72 @@
1
+ import { ref } from 'vue'
2
+ import SwitchField from './index.vue'
3
+ import theme from '@/assets/theme'
4
+
5
+ const demoOptions = [
6
+ { value: 0, content: 'Off' },
7
+ { value: 1, content: 'Auto' },
8
+ { value: 2, content: 'On' },
9
+ ]
10
+
11
+ export default {
12
+ title: 'Components/Inputs/SwitchField',
13
+ component: SwitchField,
14
+ tags: ['autodocs'],
15
+ parameters: {
16
+ layout: 'centered',
17
+ },
18
+ argTypes: {
19
+ label: { control: 'text' },
20
+ size: { control: 'select', options: ['small', 'medium'] },
21
+ height: { control: 'text' },
22
+ disabled: { control: 'boolean' },
23
+ colorMode: { control: 'select', options: ['light', 'dark'] },
24
+ alignItems: { control: 'select', options: ['horizontal', 'vertical'] },
25
+ infoTextMessage: { control: 'text' },
26
+ },
27
+ }
28
+
29
+ const Template = (args) => ({
30
+ components: { SwitchField },
31
+ setup() {
32
+ const value = ref(args.value)
33
+ return { args, value, demoOptions }
34
+ },
35
+ template: `
36
+ <div data-test-id="switch-field-story" style="padding: 16px; min-width: 280px;">
37
+ <SwitchField
38
+ v-bind="args"
39
+ :options="demoOptions"
40
+ :value="value"
41
+ @on-switch-change="value = $event"
42
+ />
43
+ <p style="margin-top: 12px; font-size: 12px; color: #666;">Selected value: {{ value }}</p>
44
+ </div>
45
+ `,
46
+ provide: {
47
+ theme,
48
+ },
49
+ })
50
+
51
+ export const ThreeWaySwitch = Template.bind({})
52
+ ThreeWaySwitch.args = {
53
+ label: 'Fan speed',
54
+ value: 1,
55
+ size: 'small',
56
+ disabled: false,
57
+ colorMode: 'light',
58
+ alignItems: 'horizontal',
59
+ infoTextMessage: '',
60
+ }
61
+
62
+ export const WithInfoText = Template.bind({})
63
+ WithInfoText.args = {
64
+ ...ThreeWaySwitch.args,
65
+ infoTextMessage: 'Applies to this location only.',
66
+ }
67
+
68
+ export const Disabled = Template.bind({})
69
+ Disabled.args = {
70
+ ...ThreeWaySwitch.args,
71
+ disabled: true,
72
+ }
@@ -1,7 +1,7 @@
1
1
  import TextAreaInput from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'TextAreaInput',
4
+ title: 'Components/Inputs/TextAreaInput',
5
5
  component: TextAreaInput,
6
6
  // argTypes: {},
7
7
  }
@@ -5,7 +5,7 @@
5
5
  :has-label="label && label.length > 0"
6
6
  >
7
7
  <LabelWrapper v-if="label">
8
- <InputLabel :data-id="labelDataId" :font-size="fontSize">
8
+ <InputLabel :data-id="labelDataId">
9
9
  {{ label }}
10
10
  <IsRequiredLabelStar v-if="isRequiredLabel" />
11
11
  </InputLabel>
@@ -15,6 +15,7 @@
15
15
  :app-theme="appTheme"
16
16
  :disabled="isDisabled"
17
17
  :font-size="fontSize"
18
+ :input-padding="inputPadding"
18
19
  :input-width="inputWidth"
19
20
  :is-error="isError"
20
21
  >
@@ -58,12 +59,17 @@
58
59
  import InfoText from '../../infoText'
59
60
  import ErrorMessage from '../../errorMessage'
60
61
  import IsRequiredLabelStar from '../isRequiredLabelStar'
62
+ import {
63
+ inputLabelFontSize,
64
+ inputLabelFontWeight,
65
+ inputLabelLetterSpacing,
66
+ inputLabelLineHeight,
67
+ } from '../shared/inputLabelTypography'
61
68
 
62
69
  const containerProps = { inputWidth: String }
63
70
  const Container = styled('div', containerProps)`
64
71
  width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
65
72
  position: relative;
66
- margin-bottom: 20px;
67
73
  `
68
74
 
69
75
  const LabelWrapper = styled.div`
@@ -80,6 +86,7 @@
80
86
  fontSize: String,
81
87
  inputWidth: String,
82
88
  appTheme: String,
89
+ inputPadding: String,
83
90
  }
84
91
 
85
92
  const InputContainer = styled('div', inputProps)`
@@ -88,8 +95,7 @@
88
95
  props.isError
89
96
  ? `1px solid ${props.theme.colors.red} !important`
90
97
  : `1px solid ${props.theme.colors.grey4} !important`};
91
- padding: ${(props) =>
92
- props.hasUnit ? '11px 40px 11px 10px !important' : '15px !important'};
98
+ padding: ${(props) => props.inputPadding + ' !important'};
93
99
  border-radius: 4px !important;
94
100
  font-size: ${(props) => `${props.fontSize} !important`};
95
101
  color: ${({ appTheme, theme }) =>
@@ -129,8 +135,11 @@
129
135
 
130
136
  const labelAttrs = { fontSize: String }
131
137
  const InputLabel = styled('div', labelAttrs)`
132
- font-weight: bold;
133
- font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
138
+ font-size: ${(props) =>
139
+ props.fontSize ? props.fontSize : inputLabelFontSize};
140
+ font-weight: ${inputLabelFontWeight};
141
+ line-height: ${inputLabelLineHeight};
142
+ letter-spacing: ${inputLabelLetterSpacing};
134
143
  `
135
144
 
136
145
  export default {
@@ -218,6 +227,10 @@
218
227
  type: String,
219
228
  default: 'light',
220
229
  },
230
+ inputPadding: {
231
+ required: false,
232
+ default: '15px',
233
+ },
221
234
  },
222
235
  methods: {
223
236
  onChangeHandler($event) {
@@ -1,7 +1,7 @@
1
1
  import Toggle from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'Toggle',
4
+ title: 'Components/Inputs/Toggle',
5
5
  component: Toggle,
6
6
  // argTypes: {},
7
7
  }
@@ -94,6 +94,12 @@
94
94
  import styled from 'vue3-styled-components'
95
95
  import InfoText from '../../infoText'
96
96
  import IsRequiredLabelStar from '../isRequiredLabelStar'
97
+ import {
98
+ inputLabelFontSize,
99
+ inputLabelFontWeight,
100
+ inputLabelLetterSpacing,
101
+ inputLabelLineHeight,
102
+ } from '../shared/inputLabelTypography'
97
103
 
98
104
  const Container = styled.div`
99
105
  display: inline-block;
@@ -123,12 +129,10 @@
123
129
  const LabelText = styled('div', toggleAttrs)`
124
130
  color: ${(props) =>
125
131
  props.fontColor ? props.fontColor : props.theme.colors.darkGray};
126
- font-size: ${(props) =>
127
- props.size === 'medium'
128
- ? '16px'
129
- : props.size === 'small'
130
- ? '13px'
131
- : '16px'};
132
+ font-size: ${inputLabelFontSize};
133
+ font-weight: ${inputLabelFontWeight};
134
+ line-height: ${inputLabelLineHeight};
135
+ letter-spacing: ${inputLabelLetterSpacing};
132
136
  `
133
137
 
134
138
  const ToggleWrapper = styled('span', toggleAttrs)`
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <LabelWrapper :label-align="labelAlign">
3
- <InputLabel :font-size="fontSize" :label-font-color="labelFontColor">
3
+ <InputLabel
4
+ :app-theme="appTheme"
5
+ :font-size="fontSize"
6
+ :label-font-color="labelFontColor"
7
+ >
4
8
  <slot></slot>
5
9
  <IsRequiredLabelStar v-if="isRequiredLabel" />
6
10
  <OptionalLabel v-if="labelOptional">
@@ -10,6 +14,7 @@
10
14
  <InfoText
11
15
  v-if="infoTextMessage"
12
16
  :align-arrow="infoTextAlign"
17
+ :app-theme="appTheme"
13
18
  :size="fontSize ? fontSize : '14px'"
14
19
  :text="infoTextMessage"
15
20
  />
@@ -20,18 +25,36 @@
20
25
  import styled from 'vue3-styled-components'
21
26
  import InfoText from '../infoText'
22
27
  import IsRequiredLabelStar from '../inputs/isRequiredLabelStar'
28
+ import {
29
+ inputLabelFontSize,
30
+ inputLabelFontWeight,
31
+ inputLabelLetterSpacing,
32
+ inputLabelLineHeight,
33
+ } from '../inputs/shared/inputLabelTypography'
23
34
 
24
- const labelAttrs = { fontSize: String, labelFontColor: String }
35
+ const labelAttrs = {
36
+ appTheme: String,
37
+ fontSize: String,
38
+ labelFontColor: String,
39
+ }
25
40
  const InputLabel = styled('div', labelAttrs)`
26
- color: ${(props) =>
27
- props.theme.colors[props.labelFontColor]
28
- ? props.theme.colors[props.labelFontColor]
29
- : props.labelFontColor
30
- ? props.labelFontColor
31
- : props.theme.colors.eturnityGrey};
41
+ color: ${(props) => {
42
+ if (props.labelFontColor) {
43
+ return props.theme.colors[props.labelFontColor]
44
+ ? props.theme.colors[props.labelFontColor]
45
+ : props.labelFontColor
46
+ }
47
+
48
+ return props.appTheme === 'dark'
49
+ ? props.theme.colors.white
50
+ : props.theme.colors.black
51
+ }};
32
52
 
33
- font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
34
- font-weight: 700;
53
+ font-size: ${(props) =>
54
+ props.fontSize ? props.fontSize : inputLabelFontSize};
55
+ font-weight: ${inputLabelFontWeight};
56
+ line-height: ${inputLabelLineHeight};
57
+ letter-spacing: ${inputLabelLetterSpacing};
35
58
  `
36
59
  const OptionalLabel = styled.span`
37
60
  font-weight: 300;
@@ -83,9 +106,14 @@
83
106
  required: false,
84
107
  default: null,
85
108
  },
109
+ appTheme: {
110
+ type: String,
111
+ required: false,
112
+ default: 'light',
113
+ },
86
114
  labelFontColor: {
87
115
  required: false,
88
- default: 'black',
116
+ default: null,
89
117
  },
90
118
  labelAlign: {
91
119
  required: false,
@@ -0,0 +1,69 @@
1
+ import LabelText from './index.vue'
2
+ import theme from '@/assets/theme'
3
+
4
+ export default {
5
+ title: 'Components/Label/Label',
6
+ component: LabelText,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ labelAlign: {
10
+ control: 'select',
11
+ options: ['vertical', 'horizontal'],
12
+ },
13
+ labelFontColor: { control: 'text' },
14
+ fontSize: { control: 'text' },
15
+ isRequiredLabel: { control: 'boolean' },
16
+ labelOptional: { control: 'boolean' },
17
+ infoTextMessage: { control: 'text' },
18
+ infoTextAlign: { control: 'select', options: ['left', 'right'] },
19
+ },
20
+ }
21
+
22
+ const Template = (args) => ({
23
+ components: { LabelText },
24
+ setup() {
25
+ return { args }
26
+ },
27
+ template: `
28
+ <div data-test-id="label-story" style="padding: 16px; max-width: 420px;">
29
+ <LabelText v-bind="args">
30
+ {{ args.slotLabel }}
31
+ </LabelText>
32
+ </div>
33
+ `,
34
+ provide: {
35
+ theme,
36
+ },
37
+ })
38
+
39
+ export const Default = Template.bind({})
40
+ Default.args = {
41
+ slotLabel: 'Project name',
42
+ labelAlign: 'vertical',
43
+ isRequiredLabel: false,
44
+ labelOptional: false,
45
+ infoTextMessage: '',
46
+ }
47
+
48
+ export const RequiredField = Template.bind({})
49
+ RequiredField.args = {
50
+ ...Default.args,
51
+ slotLabel: 'Legal entity',
52
+ isRequiredLabel: true,
53
+ }
54
+
55
+ export const OptionalWithHint = Template.bind({})
56
+ OptionalWithHint.args = {
57
+ ...Default.args,
58
+ slotLabel: 'Nickname',
59
+ labelOptional: true,
60
+ infoTextMessage: 'Shown on invoices only.',
61
+ infoTextAlign: 'left',
62
+ }
63
+
64
+ export const HorizontalLayout = Template.bind({})
65
+ HorizontalLayout.args = {
66
+ ...Default.args,
67
+ slotLabel: 'Budget (CHF)',
68
+ labelAlign: 'horizontal',
69
+ }
@@ -0,0 +1,46 @@
1
+ import MarkerItem from './index.vue'
2
+ import theme from '@/assets/theme'
3
+
4
+ export default {
5
+ title: 'Components/MarkerItem/MarkerItem',
6
+ component: MarkerItem,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ label: { control: 'text' },
13
+ iconName: { control: 'text' },
14
+ backgroundColor: { control: 'text' },
15
+ cursor: { control: 'text' },
16
+ },
17
+ }
18
+
19
+ const Template = (args) => ({
20
+ components: { MarkerItem },
21
+ setup() {
22
+ return { args }
23
+ },
24
+ template: `
25
+ <div data-test-id="marker-item-story" style="padding: 16px;">
26
+ <MarkerItem v-bind="args" />
27
+ </div>
28
+ `,
29
+ provide: {
30
+ theme,
31
+ },
32
+ })
33
+
34
+ export const Default = Template.bind({})
35
+ Default.args = {
36
+ label: 'Highlights',
37
+ iconName: 'House',
38
+ backgroundColor: 'blue4',
39
+ cursor: 'pointer',
40
+ }
41
+
42
+ export const TextOnly = Template.bind({})
43
+ TextOnly.args = {
44
+ label: 'No icon variant',
45
+ cursor: 'default',
46
+ }
@@ -1,7 +1,7 @@
1
1
  import ActionModal from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/ActionModal',
4
+ title: 'Components/Modals/ActionModal',
5
5
  component: ActionModal,
6
6
  tags: ['autodocs'],
7
7
  parameters: {
@@ -26,7 +26,7 @@
26
26
  font-family: inherit;
27
27
  font-size: 18px;
28
28
  font-style: normal;
29
- font-weight: 700;
29
+ font-weight: 500;
30
30
  line-height: 120%;
31
31
  &::first-letter {
32
32
  text-transform: uppercase;
@@ -22,21 +22,12 @@
22
22
  import styled from 'vue3-styled-components'
23
23
  import RCModal from '../modal'
24
24
  import RCMainButton from '../../buttons/mainButton'
25
-
25
+ import ModalTitle from '../modalTitle'
26
26
  const ModalContainer = styled.div`
27
27
  width: 450px;
28
28
  min-height: 205px;
29
29
  padding: 40px 40px 30px 40px;
30
30
  `
31
- const ModalTitle = styled.div`
32
- color: ${(props) => props.theme.colors.black};
33
- font-family: inherit;
34
- font-size: 18px;
35
- font-style: normal;
36
- font-weight: 700;
37
- line-height: 120%;
38
- text-transform: uppercase;
39
- `
40
31
  const ButtonContainer = styled.div`
41
32
  display: inline-flex;
42
33
  align-items: flex-start;
@@ -1,7 +1,7 @@
1
1
  import InfoModal from './index.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/InfoModal',
4
+ title: 'Components/Modals/InfoModal',
5
5
  component: InfoModal,
6
6
  tags: ['autodocs'],
7
7
  parameters: {