@eturnity/eturnity_reusable_components 8.16.9-EPDM-EPDM-14492.1 → 8.16.9-EPDM-11600.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.16.9-EPDM-EPDM-14492.1",
3
+ "version": "8.16.9-EPDM-11600.6",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -1,4 +1,3 @@
1
- <svg fill="none" height="16" viewbox="12 12 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
2
- <circle cx="20" cy="20" r="7"></circle>
3
- <path d="M24.9592 15.0408C22.2382 12.3197 17.7618 12.3197 15.0408 15.0408C12.3197 17.7618 12.3197 22.2382 15.0408 24.9592C17.7618 27.6803 22.2382 27.6803 24.9592 24.9592C27.6803 22.2382 27.6803 17.8495 24.9592 15.0408ZM23.6426 22.5016L22.4138 23.7304L19.9561 21.2727L17.4984 23.7304L16.2696 22.5016L18.7273 20.0439L16.2696 17.5862L17.4984 16.3574L19.9561 18.815L22.4138 16.3574L23.6426 17.5862L21.185 20.0439L23.6426 22.5016Z" fill="#FF5656"></path>
1
+ <svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M18.4389 3.06113C14.3574 -1.02038 7.64263 -1.02038 3.56113 3.06113C-0.520376 7.14263 -0.520376 13.8574 3.56113 17.9389C7.64263 22.0204 14.3574 22.0204 18.4389 17.9389C22.5204 13.8574 22.5204 7.2743 18.4389 3.06113ZM16.464 14.2524L14.6207 16.0956L10.9342 12.4091L7.24765 16.0956L5.40439 14.2524L9.09091 10.5658L5.40439 6.87931L7.24765 5.03605L10.9342 8.72257L14.6207 5.03605L16.464 6.87931L12.7774 10.5658L16.464 14.2524Z" fill="#FF5656"/>
4
3
  </svg>
@@ -123,7 +123,11 @@
123
123
  return this.type === 'error_minor'
124
124
  },
125
125
  iconName() {
126
- return this.type === 'warning' ? 'warning_triangle' : 'info'
126
+ return this.type === 'warning'
127
+ ? 'warning_triangle'
128
+ : this.isErrorMinor
129
+ ? 'erase'
130
+ : 'info'
127
131
  },
128
132
  presetStyles() {
129
133
  // the types that doesn't have explicit border anyway have it transparent
@@ -142,8 +146,8 @@
142
146
  stylesCollection.iconColor = theme.semanticColors.teal[800]
143
147
  } else if (this.isErrorMinor) {
144
148
  stylesCollection.borderStyle = 'dashed'
145
- stylesCollection.borderColor = theme.colors.pureRed
146
- stylesCollection.iconColor = theme.colors.pureRed
149
+ stylesCollection.borderColor = theme.colors.grey4
150
+ stylesCollection.iconColor = theme.colors.red
147
151
  } else {
148
152
  stylesCollection.borderStyle = 'dashed'
149
153
  stylesCollection.borderColor = theme.colors.grey4
@@ -3,15 +3,15 @@ import InputNumber from './index.vue'
3
3
  export default {
4
4
  title: 'InputNumber',
5
5
  component: InputNumber,
6
- // argTypes: {},
7
6
  }
8
7
 
9
- const Template = (args, { argTypes }) => ({
8
+ const Template = (args) => ({
10
9
  // Components used in your story `template` are defined in the `components` object
11
10
  components: { InputNumber },
12
- // The story's `args` need to be mapped into the template through the `setup()` method
13
- props: Object.keys(argTypes),
14
- template: '<input-number v-bind="$props" />',
11
+ setup() {
12
+ return { args: args }
13
+ },
14
+ template: `<InputNumber v-bind="args" />`,
15
15
 
16
16
  // import InputNumber from "@eturnity/eturnity_reusable_components/src/components/inputs/inputNumber"
17
17
  // How to use:
@@ -73,6 +73,20 @@ Disabled.args = {
73
73
  showLinearUnitName: false,
74
74
  }
75
75
 
76
+ export const DisabledAndPreDefined = Template.bind({})
77
+ DisabledAndPreDefined.args = {
78
+ placeholder: 'Enter Value',
79
+ disabled: true,
80
+ isPreDefined: true,
81
+ value: '',
82
+ inputWidth: '200px',
83
+ isError: false,
84
+ numberPrecision: 0,
85
+ noBorder: false,
86
+ textAlign: 'left',
87
+ showLinearUnitName: false,
88
+ }
89
+
76
90
  export const LinearUnit = Template.bind({})
77
91
  LinearUnit.args = {
78
92
  placeholder: 'Enter Value',
@@ -43,7 +43,6 @@
43
43
  :color-mode="colorMode"
44
44
  :data-id="inputDataId"
45
45
  :data-qa-id="dataQaId"
46
- :disabled="disabled"
47
46
  :font-color="colorMode === 'transparent' ? 'white' : fontColor"
48
47
  :font-size="fontSize"
49
48
  :has-label-slot="hasLabelSlot"
@@ -53,6 +52,7 @@
53
52
  :is-disabled="disabled"
54
53
  :is-error="isError"
55
54
  :is-interactive="isInteractive"
55
+ :is-pre-defined="isPreDefined"
56
56
  :min-width="minWidth"
57
57
  :no-border="noBorder"
58
58
  :placeholder="displayedPlaceholder"
@@ -134,7 +134,7 @@
134
134
  </ArrowButton>
135
135
  </ArrowControls>
136
136
  </InputWrapper>
137
- <ErrorMessage v-if="isError">{{ errorMessage }}</ErrorMessage>
137
+ <ErrorMessage v-if="isError && errorMessage">{{ errorMessage }}</ErrorMessage>
138
138
  </Container>
139
139
  </template>
140
140
 
@@ -197,6 +197,7 @@
197
197
  slotSize: String,
198
198
  inputHeight: String,
199
199
  isInteractive: Boolean,
200
+ isPreDefined: Boolean,
200
201
  alignItems: String,
201
202
  labelFontColor: String,
202
203
  labelFontWeight: String,
@@ -259,7 +260,7 @@
259
260
  color: ${(props) =>
260
261
  props.isError
261
262
  ? props.theme.colors.grey6
262
- : props.isDisabled
263
+ : props.isDisabled && !props.isPreDefined
263
264
  ? props.colorMode === 'transparent'
264
265
  ? props.theme.colors.white
265
266
  : props.theme.colors.grey2
@@ -513,10 +514,9 @@
513
514
  default: '40px',
514
515
  },
515
516
  value: {
517
+ type: [String, Number],
516
518
  required: true,
517
519
  default: null,
518
- validator: (val) =>
519
- typeof val === 'string' || typeof val === 'number' || val === null,
520
520
  },
521
521
  clearInput: {
522
522
  type: Boolean,
@@ -538,6 +538,11 @@
538
538
  required: false,
539
539
  default: 0,
540
540
  },
541
+ isPreDefined: {
542
+ type: Boolean,
543
+ required: false,
544
+ default: false,
545
+ },
541
546
  minDecimals: {
542
547
  type: Number,
543
548
  required: false,
@@ -658,12 +663,18 @@
658
663
  required: false,
659
664
  default: '',
660
665
  },
666
+ labelDataTestId: {
667
+ type: String,
668
+ required: false,
669
+ default: '',
670
+ },
661
671
  inputDataId: {
662
672
  type: String,
663
673
  required: false,
664
674
  default: '',
665
675
  },
666
676
  dataQaId: {
677
+ type: String,
667
678
  required: false,
668
679
  default: '',
669
680
  },
@@ -5,7 +5,8 @@
5
5
  :has-info-text="!!infoText"
6
6
  :margin-bottom="marginBottom"
7
7
  >
8
- <span data-test-id="page_subtitle_text">
8
+ <span v-if="containsHtml" data-test-id="page_subtitle_text" v-html="text"></span>
9
+ <span v-else data-test-id="page_subtitle_text">
9
10
  {{ text }}
10
11
  </span>
11
12
  <InfoText
@@ -58,6 +59,11 @@
58
59
  required: true,
59
60
  type: String,
60
61
  },
62
+ containsHtml: {
63
+ required: false,
64
+ type: Boolean,
65
+ default: false,
66
+ },
61
67
  color: {
62
68
  required: false,
63
69
  type: String,