@itfin/components 1.2.59 → 1.2.60

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,12 +1,12 @@
1
1
  {
2
2
  "name": "@itfin/components",
3
- "version": "1.2.59",
3
+ "version": "1.2.60",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
7
7
  "build": "vue-cli-service build --target lib --name ITFComponents src/main.js",
8
8
  "test:unit": "vue-cli-service test:unit",
9
- "lint": "vue-cli-service lint",
9
+ "lint": "eslint --ext .js,.vue --ignore-path .eslintignore .",
10
10
  "build:storybook": "build-storybook -c .storybook -o .out",
11
11
  "dev": "start-storybook",
12
12
  "storybook:build": "vue-cli-service storybook:build -c config/storybook",
@@ -22,12 +22,12 @@
22
22
  "@egjs/vue-flicking": "^4.10.4",
23
23
  "@popperjs/core": "^2.11.6",
24
24
  "@vue/cli-service": "^4.5.8",
25
+ "@vue/composition-api": "^1.7.1",
25
26
  "air-datepicker": "^3.3.3",
26
27
  "bootstrap": "^5.2.3",
27
28
  "core-js": "^3.7.0",
28
29
  "debug": "^4.2.0",
29
30
  "intersection-observer": "^0.12.2",
30
- "@vue/composition-api": "^1.7.1",
31
31
  "lodash": "^4.17.20",
32
32
  "luxon": "^3.1.1",
33
33
  "pdfjs-dist": "^2.10.377",
@@ -37,6 +37,7 @@
37
37
  "vue-property-decorator": "^9.1.2"
38
38
  },
39
39
  "devDependencies": {
40
+ "@babel/eslint-parser": "^7.19.1",
40
41
  "@babel/plugin-proposal-numeric-separator": "^7.18.6",
41
42
  "@babel/plugin-syntax-numeric-separator": "^7.10.4",
42
43
  "@storybook/addon-docs": "=6.3.8",
@@ -50,12 +51,14 @@
50
51
  "babel-eslint": "^10.1.0",
51
52
  "eslint": "^8.30.0",
52
53
  "eslint-plugin-import": "^2.22.1",
53
- "eslint-plugin-vue": "^9.8.0",
54
+ "eslint-plugin-prettier": "^4.2.1",
55
+ "eslint-plugin-vue": "^9.9.0",
54
56
  "fibers": "^5.0.0",
55
57
  "marked": "^4.2.5",
56
58
  "sass": "^1.29.0",
57
59
  "sass-loader": "^10.0.5",
58
60
  "vue-class-component": "^7.2.6",
61
+ "vue-eslint-parser": "^9.1.0",
59
62
  "vue-template-compiler": "=2.6.14"
60
63
  },
61
64
  "eslintConfig": {
@@ -101,7 +104,8 @@
101
104
  ],
102
105
  "collectCoverage": true,
103
106
  "coverageReporters": [
104
- "html"
107
+ "html",
108
+ "lcov"
105
109
  ]
106
110
  },
107
111
  "license": "ISC"
@@ -1,9 +1,12 @@
1
1
  <template>
2
- <div class="itf-radio-box form-check card" :class="{ 'itf-radio__large': large, 'itf-radio__medium': medium, 'active': isChecked }">
2
+ <div class="itf-radio-box form-check card" :class="{ 'itf-radio__large': large, 'itf-radio__medium': medium, 'active': isChecked, 'right': right, 'left': !right }">
3
3
  <input class="form-check-input" :id="id" type="radio" :name="radioName" v-model="isChecked" :value="true" :disabled="disabled" />
4
4
  <label :for="id" slot="label" class="form-check-label card-body">
5
5
 
6
- <slot></slot>
6
+ <slot>
7
+ <div>{{label}}</div>
8
+ <small v-if="helpText" v-text="helpText" class="text-muted" />
9
+ </slot>
7
10
 
8
11
  </label>
9
12
  </div>
@@ -13,6 +16,24 @@
13
16
  padding: 0;
14
17
  margin-bottom: .5rem;
15
18
  position: relative;
19
+ cursor: pointer;
20
+
21
+ &.left {
22
+ padding: 0 0 0 2.5rem;
23
+
24
+ .form-check-input {
25
+ position: absolute;
26
+ left: 3rem;
27
+ top: 1rem;
28
+ }
29
+ }
30
+ &.right {
31
+ .form-check-input {
32
+ position: absolute;
33
+ right: 1.5rem;
34
+ top: 1rem;
35
+ }
36
+ }
16
37
 
17
38
  &.active {
18
39
  background-color: rgba(var(--bs-primary-rgb),.1) !important;
@@ -24,12 +45,6 @@
24
45
  .form-check-label {
25
46
  cursor: pointer;
26
47
  }
27
-
28
- .form-check-input {
29
- position: absolute;
30
- right: 0.5rem;
31
- top: 0.5rem;
32
- }
33
48
  }
34
49
  </style>
35
50
  <script>
@@ -47,12 +62,14 @@ class itfRadio extends Vue {
47
62
 
48
63
  @Model('input') checked;
49
64
  @Prop(String) label;
65
+ @Prop(String) helpText;
50
66
  @Prop() value;
51
67
  @Prop({ type: String }) name;
52
68
 
53
69
  @Prop(Boolean) disabled;
54
70
  @Prop(Boolean) medium;
55
71
  @Prop(Boolean) large;
72
+ @Prop(Boolean) right;
56
73
 
57
74
  id = '';
58
75
 
@@ -10,7 +10,7 @@
10
10
  <slot name="title">
11
11
  <h5 class="modal-title" :id="modalId">{{title}}</h5>
12
12
  </slot>
13
- <itf-button icon data-bs-dismiss="modal" :aria-label="$t('components.close')" class="btn-close"></itf-button>
13
+ <itf-button icon @click="close" :aria-label="$t('components.close')" class="btn-close"></itf-button>
14
14
  </div>
15
15
  <div class="modal-body" v-if="value">
16
16
  <slot></slot>
@@ -2,7 +2,7 @@ export default {
2
2
  data() {
3
3
  return {
4
4
  typeAheadPointer: -1,
5
- }
5
+ };
6
6
  },
7
7
 
8
8
  watch: {