@itfin/components 1.4.40 → 1.5.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 (187) hide show
  1. package/package.json +17 -20
  2. package/src/ITFSettings.js +6 -0
  3. package/src/assets/scss/components/_button.scss +118 -0
  4. package/src/assets/scss/components/_text-field.scss +22 -8
  5. package/src/components/alert/AlertBanner.vue +75 -0
  6. package/src/components/app/App.vue +6 -3
  7. package/src/components/button/Button.vue +3 -1
  8. package/src/components/button/NativeButton.js +4 -0
  9. package/src/components/button/index.stories.js +2 -2
  10. package/src/components/checkbox/Checkbox.vue +2 -1
  11. package/src/components/checkbox/RadioBox.vue +13 -7
  12. package/src/components/copyToClipboard/CopyToClipboard.vue +4 -1
  13. package/src/components/customize/PropertiesList.vue +0 -2
  14. package/src/components/customize/PropertiesPopupMenu.vue +1 -1
  15. package/src/components/customize/PropertyItem.vue +6 -24
  16. package/src/components/datepicker/DatePicker.vue +3 -1
  17. package/src/components/datepicker/DatePickerInline.vue +2 -2
  18. package/src/components/datepicker/DateRangePickerInline.vue +6 -1
  19. package/src/components/dropdown/Dropdown.vue +1 -1
  20. package/src/components/dropdown/DropdownMenu.vue +1 -1
  21. package/src/components/editable/EditButton.vue +1 -1
  22. package/src/components/editor/plugins.js +1012 -0
  23. package/src/components/filter/FilterBadge.vue +17 -3
  24. package/src/components/filter/FilterFacetsList.vue +67 -13
  25. package/src/components/filter/FilterPanel.vue +8 -21
  26. package/src/components/filter/NewFilter.vue +305 -0
  27. package/src/components/form/Label.vue +5 -5
  28. package/src/components/icon/components/nomi-ai-alt.vue +5 -0
  29. package/src/components/icon/components/nomi-bell.vue +5 -0
  30. package/src/components/icon/components/nomi-budget.vue +4 -0
  31. package/src/components/icon/components/nomi-calendar-payment.vue +10 -0
  32. package/src/components/icon/components/nomi-card-plus.vue +1 -0
  33. package/src/components/icon/components/nomi-cash-provider.vue +9 -0
  34. package/src/components/icon/components/nomi-category-edit.vue +5 -0
  35. package/src/components/icon/components/nomi-delta.vue +7 -0
  36. package/src/components/icon/components/nomi-exit-right.vue +4 -0
  37. package/src/components/icon/components/nomi-help.vue +2 -3
  38. package/src/components/icon/components/nomi-lock.vue +1 -1
  39. package/src/components/icon/components/nomi-project.vue +2 -2
  40. package/src/components/icon/components/nomi-refresh-off.vue +4 -0
  41. package/src/components/icon/components/nomi-refresh.vue +4 -0
  42. package/src/components/icon/components/nomi-scissors.vue +1 -1
  43. package/src/components/icon/components/nomi-start.vue +28 -0
  44. package/src/components/icon/components/nomi-table-view.vue +1 -4
  45. package/src/components/icon/components/nomi-transactions-delete.vue +5 -0
  46. package/src/components/icon/components/nomi-type-array.vue +6 -0
  47. package/src/components/icon/components/nomi-type-boolean.vue +5 -0
  48. package/src/components/icon/components/nomi-type-date.vue +4 -0
  49. package/src/components/icon/components/nomi-type-null.vue +4 -0
  50. package/src/components/icon/components/nomi-type-number.vue +4 -0
  51. package/src/components/icon/components/nomi-type-object.vue +4 -0
  52. package/src/components/icon/components/nomi-type-string.vue +4 -0
  53. package/src/components/icon/components/nomi-unarchive.vue +17 -0
  54. package/src/components/icon/components/nomi-unlink.vue +10 -0
  55. package/src/components/icon/components/nomi-user.vue +3 -3
  56. package/src/components/icon/components/nomi-warning-triangle.vue +6 -0
  57. package/src/components/icon/components/nomi-warning_triangle_filled.vue +6 -0
  58. package/src/components/icon/convert-icons.js +3 -0
  59. package/src/components/icon/icons.js +390 -312
  60. package/src/components/icon/new-icons/ai-alt.svg +4 -0
  61. package/src/components/icon/new-icons/arrow-right-alt.svg +3 -0
  62. package/src/components/icon/new-icons/arrow-right.svg +3 -0
  63. package/src/components/icon/new-icons/arrow_left.svg +3 -0
  64. package/src/components/icon/new-icons/automation.svg +4 -0
  65. package/src/components/icon/new-icons/balance.svg +3 -0
  66. package/src/components/icon/new-icons/balance_turnover.svg +4 -0
  67. package/src/components/icon/new-icons/bar-horizontal.svg +6 -0
  68. package/src/components/icon/new-icons/bell.svg +4 -0
  69. package/src/components/icon/new-icons/calendar-payment.svg +9 -0
  70. package/src/components/icon/new-icons/card-plus.svg +1 -0
  71. package/src/components/icon/new-icons/cash-provider.svg +8 -0
  72. package/src/components/icon/new-icons/cash-repeat.svg +5 -0
  73. package/src/components/icon/new-icons/cash.svg +3 -0
  74. package/src/components/icon/new-icons/cashflow.svg +3 -0
  75. package/src/components/icon/new-icons/category-edit.svg +4 -0
  76. package/src/components/icon/new-icons/category.svg +4 -0
  77. package/src/components/icon/new-icons/category_alt.svg +3 -0
  78. package/src/components/icon/new-icons/chart-bars.svg +5 -0
  79. package/src/components/icon/new-icons/chart-donut.svg +3 -0
  80. package/src/components/icon/new-icons/chart-funnel.svg +5 -0
  81. package/src/components/icon/new-icons/chart-kpi.svg +7 -0
  82. package/src/components/icon/new-icons/chart-line.svg +4 -0
  83. package/src/components/icon/new-icons/chart-lines.svg +5 -0
  84. package/src/components/icon/new-icons/check-alt.svg +3 -0
  85. package/src/components/icon/new-icons/check.svg +3 -0
  86. package/src/components/icon/new-icons/chevron-down.svg +3 -0
  87. package/src/components/icon/new-icons/chevron-left.svg +3 -0
  88. package/src/components/icon/new-icons/chevron-right.svg +3 -0
  89. package/src/components/icon/new-icons/chevron-up.svg +3 -0
  90. package/src/components/icon/new-icons/collapse.svg +6 -0
  91. package/src/components/icon/new-icons/control-panel.svg +7 -0
  92. package/src/components/icon/new-icons/credit.svg +3 -0
  93. package/src/components/icon/new-icons/currencies.svg +3 -0
  94. package/src/components/icon/new-icons/debt.svg +3 -0
  95. package/src/components/icon/new-icons/delta.svg +6 -0
  96. package/src/components/icon/new-icons/demo.svg +6 -0
  97. package/src/components/icon/new-icons/dev.svg +3 -0
  98. package/src/components/icon/new-icons/dots.svg +5 -0
  99. package/src/components/icon/new-icons/duplicate.svg +4 -0
  100. package/src/components/icon/new-icons/exit-right.svg +3 -0
  101. package/src/components/icon/new-icons/export.svg +3 -0
  102. package/src/components/icon/new-icons/file.svg +3 -0
  103. package/src/components/icon/new-icons/folder.svg +3 -0
  104. package/src/components/icon/new-icons/goods-turnover.svg +3 -0
  105. package/src/components/icon/new-icons/goods.svg +4 -0
  106. package/src/components/icon/new-icons/help-alt.svg +3 -0
  107. package/src/components/icon/new-icons/help.svg +2 -3
  108. package/src/components/icon/new-icons/history.svg +6 -0
  109. package/src/components/icon/new-icons/integration.svg +3 -0
  110. package/src/components/icon/new-icons/link.svg +5 -0
  111. package/src/components/icon/new-icons/lock.svg +1 -1
  112. package/src/components/icon/new-icons/menu.svg +5 -0
  113. package/src/components/icon/new-icons/minus.svg +3 -0
  114. package/src/components/icon/new-icons/payment_calendar.svg +3 -0
  115. package/src/components/icon/new-icons/pc.svg +3 -0
  116. package/src/components/icon/new-icons/pen-alt.svg +3 -0
  117. package/src/components/icon/new-icons/planFact.svg +4 -0
  118. package/src/components/icon/new-icons/pnl.svg +7 -0
  119. package/src/components/icon/new-icons/project.svg +2 -2
  120. package/src/components/icon/new-icons/project_alt.svg +3 -0
  121. package/src/components/icon/new-icons/project_alt2.svg +3 -0
  122. package/src/components/icon/new-icons/promo.svg +3 -0
  123. package/src/components/icon/new-icons/refresh-off.svg +3 -0
  124. package/src/components/icon/new-icons/refresh.svg +3 -0
  125. package/src/components/icon/new-icons/scissors.svg +1 -1
  126. package/src/components/icon/new-icons/segment.svg +3 -0
  127. package/src/components/icon/new-icons/start.svg +27 -0
  128. package/src/components/icon/new-icons/strongbox.svg +3 -0
  129. package/src/components/icon/new-icons/subscription.svg +3 -0
  130. package/src/components/icon/new-icons/table-view.svg +1 -4
  131. package/src/components/icon/new-icons/time.svg +3 -0
  132. package/src/components/icon/new-icons/transactions_alt.svg +6 -0
  133. package/src/components/icon/new-icons/transactions_delete.svg +4 -0
  134. package/src/components/icon/new-icons/type-array.svg +5 -0
  135. package/src/components/icon/new-icons/type-boolean.svg +4 -0
  136. package/src/components/icon/new-icons/type-date.svg +3 -0
  137. package/src/components/icon/new-icons/type-null.svg +3 -0
  138. package/src/components/icon/new-icons/type-number.svg +3 -0
  139. package/src/components/icon/new-icons/type-object.svg +3 -0
  140. package/src/components/icon/new-icons/type-string.svg +3 -0
  141. package/src/components/icon/new-icons/types.svg +6 -0
  142. package/src/components/icon/new-icons/unarchive.svg +16 -0
  143. package/src/components/icon/new-icons/unlink.svg +9 -0
  144. package/src/components/icon/new-icons/user.svg +3 -3
  145. package/src/components/icon/new-icons/user_plus.svg +10 -0
  146. package/src/components/icon/new-icons/warehouse.svg +3 -0
  147. package/src/components/icon/new-icons/warning_triangle.svg +5 -0
  148. package/src/components/icon/new-icons/warning_triangle_filled.svg +5 -0
  149. package/src/components/kanban/BoardCard.vue +1 -1
  150. package/src/components/kanban/BoardCardTimer.vue +1 -1
  151. package/src/components/modal/DeleteConfirmModal.vue +10 -6
  152. package/src/components/modal/ItemEditor.vue +1 -1
  153. package/src/components/modal/Modal.vue +1 -1
  154. package/src/components/overlay/SensitiveOverlay.vue +2 -4
  155. package/src/components/panels/Panel.vue +110 -23
  156. package/src/components/panels/PanelItemEdit.vue +8 -6
  157. package/src/components/panels/PanelList.vue +164 -40
  158. package/src/components/panels/helpers.ts +41 -13
  159. package/src/components/popover/Popover.vue +105 -22
  160. package/src/components/segmented-control/SegmentedControl.vue +9 -3
  161. package/src/components/sortable/draggable.js +1 -1
  162. package/src/components/table/Table2.vue +68 -67
  163. package/src/components/table/TableBody.vue +17 -22
  164. package/src/components/table/TableGroup.vue +40 -24
  165. package/src/components/table/TableHeader.vue +86 -81
  166. package/src/components/table/TableRowToggle.vue +1 -9
  167. package/src/components/table/TableRows.vue +49 -55
  168. package/src/components/table/mobile.js +4 -0
  169. package/src/components/table/table2.scss +34 -15
  170. package/src/components/text-field/MoneyField.vue +10 -4
  171. package/src/components/text-field/TextField.vue +17 -8
  172. package/src/components/tree/TreeEditor.vue +3 -2
  173. package/src/components/view/View.vue +80 -207
  174. package/src/directives/appendToBody.js +1 -0
  175. package/src/helpers/validators.js +9 -35
  176. package/src/helpers/validators.spec.js +11 -48
  177. package/src/locales/en.js +4 -6
  178. package/src/locales/pl.js +158 -0
  179. package/src/locales/uk.js +6 -7
  180. package/src/components/icon/components/nomi-calendar-view.vue +0 -4
  181. package/src/components/icon/components/nomi-kanban-view.vue +0 -6
  182. package/src/components/icon/components/nomi-list-view.vue +0 -7
  183. package/src/components/icon/components/nomi-table-config.vue +0 -9
  184. package/src/components/icon/new-icons/calendar-view.svg +0 -3
  185. package/src/components/icon/new-icons/kanban-view.svg +0 -5
  186. package/src/components/icon/new-icons/list-view.svg +0 -6
  187. package/src/components/icon/new-icons/table-config.svg +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itfin/components",
3
- "version": "1.4.40",
3
+ "version": "1.5.1",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -20,36 +20,36 @@
20
20
  "libs/"
21
21
  ],
22
22
  "dependencies": {
23
- "@calumk/editorjs-codecup": "^1.1.1",
23
+ "@calumk/editorjs-codecup": "^1.3.0",
24
24
  "@editorjs/attaches": "^1.3.0",
25
- "@editorjs/code": "^2.9.0",
26
- "@editorjs/delimiter": "^1.4.0",
27
- "@editorjs/editorjs": "^2.29.0",
28
- "@editorjs/embed": "^2.7.0",
29
- "@editorjs/header": "^2.8.1",
30
- "@editorjs/image": "^2.9.0",
31
- "@editorjs/inline-code": "^1.5.0",
25
+ "@editorjs/code": "^2.9.3",
26
+ "@editorjs/delimiter": "^1.4.2",
27
+ "@editorjs/editorjs": "^2.30.8",
28
+ "@editorjs/embed": "^2.7.6",
29
+ "@editorjs/header": "^2.8.8",
30
+ "@editorjs/image": "^2.10.2",
31
+ "@editorjs/inline-code": "^1.5.2",
32
32
  "@editorjs/link": "^2.6.2",
33
33
  "@editorjs/marker": "^1.4.0",
34
- "@editorjs/nested-list": "^1.4.2",
35
- "@editorjs/quote": "^2.6.0",
36
- "@editorjs/table": "^2.3.0",
34
+ "@editorjs/nested-list": "^1.4.3",
35
+ "@editorjs/quote": "^2.7.6",
36
+ "@editorjs/table": "^2.4.5",
37
37
  "@egjs/vue-flicking": "^4.10.4",
38
38
  "@mdi/js": "^7.2.96",
39
39
  "@popperjs/core": "^2.11.8",
40
40
  "@shopify/draggable": "^1.0.0-beta.8",
41
- "@vue/composition-api": "^1.7.1",
41
+ "@vue/composition-api": "^1.7.2",
42
42
  "@vue/vue2-jest": "^27.0.0",
43
43
  "@vue/web-component-wrapper": "^1.3.0",
44
- "bootstrap": "^5.3.x",
44
+ "bootstrap": "^5.3.6",
45
45
  "bpmn-js": "^17.0.2",
46
46
  "clipboard": "^2.0.11",
47
47
  "core-js": "^3.7.0",
48
48
  "intersection-observer": "^0.12.2",
49
+ "json5": "^2.2.3",
49
50
  "lodash": "^4.17.20",
50
51
  "luxon": "^3.3.0",
51
52
  "pdfjs-dist": "^2.10.377",
52
- "storybook-dark-mode": "^3.0.3",
53
53
  "tippy.js": "^6.3.2",
54
54
  "vue-grid-layout": "^2.4.0",
55
55
  "vue-imask": "^6.6.3",
@@ -62,9 +62,6 @@
62
62
  "@babel/plugin-proposal-numeric-separator": "^7.18.6",
63
63
  "@babel/plugin-syntax-numeric-separator": "^7.10.4",
64
64
  "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
65
- "@storybook/addon-docs": "=6.3.8",
66
- "@storybook/addon-viewport": "=6.3.8",
67
- "@storybook/vue": "=6.3.8",
68
65
  "@vue/cli-plugin-babel": "^5.0.8",
69
66
  "@vue/cli-plugin-eslint": "^5.0.8",
70
67
  "@vue/cli-plugin-unit-jest": "^5.0.8",
@@ -76,7 +73,6 @@
76
73
  "eslint-plugin-import": "^2.22.1",
77
74
  "eslint-plugin-prettier": "^4.2.1",
78
75
  "eslint-plugin-vue": "^9.9.0",
79
- "fibers": "^5.0.0",
80
76
  "marked": "^4.2.5",
81
77
  "postcss-cli": "^11.0.0",
82
78
  "sass": "^1.29.0",
@@ -84,6 +80,7 @@
84
80
  "vue": "^2.6.12",
85
81
  "vue-class-component": "^7.2.6",
86
82
  "vue-eslint-parser": "^9.1.0",
83
+ "vue-jest": "^3.0.7",
87
84
  "vue-template-compiler": "=2.6.14"
88
85
  },
89
86
  "eslintConfig": {
@@ -119,7 +116,7 @@
119
116
  "jest": {
120
117
  "preset": "@vue/cli-plugin-unit-jest",
121
118
  "testMatch": [
122
- "**/src/**/*.spec.js"
119
+ "**/src/**/*.spec.(j|t)s"
123
120
  ],
124
121
  "testPathIgnorePatterns": [
125
122
  "dist/"
@@ -1,3 +1,9 @@
1
+ if (typeof CSS !== 'undefined' && 'paintWorklet' in CSS) {
2
+ CSS.paintWorklet.addModule(
3
+ "https://www.unpkg.com/css-houdini-squircle@0.1.3/squircle.min.js"
4
+ );
5
+ }
6
+
1
7
  class ITFSettings {
2
8
  options = {
3
9
  firstDayOfWeek: 'Monday',
@@ -120,4 +120,122 @@
120
120
  }
121
121
  }
122
122
  }
123
+
124
+ &.btn-default {
125
+ --bs-btn-color: #22222B;
126
+ --bs-btn-border-color: #e5e5e5;
127
+ --bs-btn-hover-color: #1A4A97;
128
+ --bs-btn-hover-border-color: rgba(26, 74, 151, 0.3);
129
+ --bs-btn-active-color: #1A4A97;
130
+ --bs-btn-active-border-color: #1A4A97;
131
+ --bs-btn-disabled-color: var(--bs-btn-color);
132
+ --bs-btn-disabled-bg: transparent;
133
+ --bs-btn-disabled-border-color: var(--bs-btn-border-color);
134
+
135
+ .itf-icon {
136
+ color: #8E97A5;
137
+ }
138
+
139
+ &:hover {
140
+ .itf-icon {
141
+ color: var(--bs-btn-hover-color);
142
+ }
143
+ }
144
+ &:active, &:focus {
145
+ .itf-icon {
146
+ color: var(--bs-btn-active-color);
147
+ }
148
+ }
149
+
150
+ &.btn-white {
151
+ --bs-btn-color: #ffffff;
152
+ --bs-btn-bg: transparent;
153
+ --bs-btn-border-color: rgba(255, 255, 255, 0.5);
154
+ --bs-btn-hover-color: #22222b;
155
+ --bs-btn-hover-bg: rgba(255, 255, 255, 0.5);
156
+ --bs-btn-hover-border-color: rgba(255, 255, 255, 0.5);
157
+ --bs-btn-active-color: #22222b;
158
+ --bs-btn-active-bg: color-mix(in srgb, black 10%, var(--bs-btn-hover-bg));
159
+ --bs-btn-active-border-color: rgba(255, 255, 255, 0.5);
160
+
161
+ .itf-icon {
162
+ color: var(--bs-btn-color);
163
+ }
164
+
165
+ &:hover {
166
+ background-color: var(--bs-btn-hover-bg);
167
+ border-color: var(--bs-btn-hover-border-color);
168
+
169
+ .itf-icon {
170
+ color: var(--bs-btn-hover-color);
171
+ }
172
+ }
173
+ &:active, &:focus {
174
+ background-color: var(--bs-btn-active-bg);
175
+ border-color: var(--bs-btn-active-border-color);
176
+
177
+ .itf-icon {
178
+ color: var(--bs-btn-active-color);
179
+ }
180
+ }
181
+ }
182
+ }
183
+
184
+ &.btn-secondary {
185
+ --bs-btn-bg: #f5f6f8;
186
+ --bs-btn-border-color: #f5f6f8;
187
+
188
+ &:hover {
189
+ background-color: color-mix(in srgb, black 10%, var(--bs-btn-bg));
190
+ border-color: color-mix(in srgb, black 10%, var(--bs-btn-bg));
191
+ }
192
+ &:active, &:focus {
193
+ background-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
194
+ border-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
195
+ }
196
+
197
+ &.btn-secondary--light {
198
+ --bs-btn-bg: #ffffff;
199
+ --bs-btn-border-color: #ffffff;
200
+ }
201
+ }
202
+
203
+ &.btn-primary {
204
+ &:hover {
205
+ background-color: color-mix(in srgb, white 10%, var(--bs-btn-bg));
206
+ border-color: color-mix(in srgb, white 10%, var(--bs-btn-bg));
207
+ }
208
+ &:active, &:focus {
209
+ background-color: color-mix(in srgb, white 20%, var(--bs-btn-bg));
210
+ border-color: color-mix(in srgb, white 20%, var(--bs-btn-bg));
211
+ }
212
+ }
213
+
214
+ &.btn-blue {
215
+ --bs-btn-bg: #1A4A97;
216
+ --bs-btn-border-color: #1A4A97;
217
+
218
+ &:hover {
219
+ background-color: color-mix(in srgb, black 10%, var(--bs-btn-bg));
220
+ border-color: color-mix(in srgb, black 10%, var(--bs-btn-bg));
221
+ }
222
+ &:active, &:focus {
223
+ background-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
224
+ border-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
225
+ }
226
+ }
227
+
228
+ &.btn-white {
229
+ --bs-btn-bg: #ffffff;
230
+ --bs-btn-border-color: #ffffff;
231
+
232
+ &:hover {
233
+ background-color: color-mix(in srgb, black 10%, var(--bs-btn-bg));
234
+ border-color: color-mix(in srgb, black 10%, var(--bs-btn-bg));
235
+ }
236
+ &:active, &:focus {
237
+ background-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
238
+ border-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
239
+ }
240
+ }
123
241
  }
@@ -2,10 +2,10 @@
2
2
 
3
3
  .itf-text-field {
4
4
  &__input {
5
- .addon + & {
6
- border-top-left-radius: $input-border-radius !important;
7
- border-bottom-left-radius: $input-border-radius !important;
8
- }
5
+ min-height: 2rem;
6
+ border: 0 none;
7
+ background-color: transparent !important;
8
+
9
9
  -moz-appearance: textfield; // Hide Arrows From Input Number (Firefox)
10
10
 
11
11
  &::-webkit-outer-spin-button, // Hide Arrows From Input Number (Chrome, Safari, Edge, Opera)
@@ -14,11 +14,27 @@
14
14
  margin: 0;
15
15
  }
16
16
  }
17
+ .input-group-text {
18
+ --bs-border-width: 0;
19
+
20
+ background: transparent;
21
+
22
+ &.prepend {
23
+ padding: 0.375rem 0 0.375rem 0.75rem;
24
+ }
25
+ &.append {
26
+ padding-left: .325rem;
27
+ }
28
+ }
17
29
  .addon-end {
18
30
  pointer-events: all;
19
31
  padding-right: 0.25rem;
20
32
  }
21
33
  }
34
+ .itf-text-field.input-group > .form-control {
35
+ box-shadow: none !important;
36
+ border: 0 none !important;
37
+ }
22
38
 
23
39
  .itf-textarea {
24
40
  &.input-group {
@@ -30,10 +46,8 @@
30
46
  z-index: 10;
31
47
  }
32
48
  &__input {
33
- .addon + & {
34
- border-top-left-radius: $input-border-radius !important;
35
- border-bottom-left-radius: $input-border-radius !important;
36
- }
49
+ border: 0 none;
50
+ //background-color: transparent !important;
37
51
  resize: none;
38
52
  }
39
53
  &__autogrow &__input {
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div class="itf-alert-banner">
3
+ <div v-if="count" class="itf-alert-banner__counter px-2 bg-danger text-white fw-bold text-smaller text-decoration-none d-block rounded-pill">
4
+ {{ count > 99 ? '99+' : count }}
5
+ </div>
6
+ <div v-if="multiple" class="itf-alert-banner__panel itf-alert-banner__multiple rounded-3 border bg-muted-2"></div>
7
+ <div class="itf-alert-banner__panel px-3 rounded-3 border bg-muted-2 d-flex gap-3 align-items-start align-items-sm-center flex-sm-row flex-column">
8
+ <slot name="icon">
9
+ <div v-if="icon" class="itf-alert-banner__icon rounded-2 bg-danger flex-shrink-0 d-flex align-items-center justify-content-center">
10
+ <itf-icon new :name="icon" :size="24" class="text-white" />
11
+ </div>
12
+ </slot>
13
+ <div class="flex-grow-1">
14
+ <div class="fw-bold"><slot name="title">{{title}}</slot></div>
15
+ <div class="small text-muted"><slot></slot></div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </template>
20
+ <style lang="scss" scoped>
21
+ .itf-alert-banner {
22
+ width: 100%;
23
+ position: relative;
24
+ max-width: 420px;
25
+
26
+ &__counter {
27
+ top: 0;
28
+ right: -4px;
29
+ position: absolute;
30
+ z-index: 3;
31
+ padding-top: 0.375rem;
32
+ padding-bottom: 0.375rem;
33
+ min-width: 1.75rem;
34
+ text-align: center;
35
+ }
36
+ &__panel {
37
+ position: relative;
38
+ padding-top: 0.75rem;
39
+ padding-bottom: 0.75rem;
40
+ top: 4px;
41
+ z-index: 2;
42
+ }
43
+ &__icon {
44
+ width: 48px;
45
+ height: 48px;
46
+ }
47
+ &__multiple {
48
+ position: absolute;
49
+ top: 0;
50
+ right: -4px;
51
+ z-index: 1;
52
+ height: 100%;
53
+ width: 100%;
54
+ }
55
+ }
56
+ </style>
57
+ <script>
58
+ import { Vue, Component, Prop } from 'vue-property-decorator';
59
+ import itfIcon from '@itfin/components/src/components/icon/Icon';
60
+ import itfPanelLink from '@itfin/components/src/components/panels/PanelLink.vue';
61
+
62
+ export default @Component({
63
+ name: 'itfAlertBanner',
64
+ components: {
65
+ itfIcon,
66
+ itfPanelLink,
67
+ },
68
+ })
69
+ class AlertBanner extends Vue {
70
+ @Prop(String) title;
71
+ @Prop(String) icon;
72
+ @Prop() count;
73
+ @Prop(Boolean) multiple;
74
+ }
75
+ </script>
@@ -74,9 +74,12 @@ class itfApp extends Vue {
74
74
  try {
75
75
  await func();
76
76
  } catch (err) {
77
- this.showError(err.message);
78
- if (errFunc) {
79
- errFunc(err);
77
+ if (err.code !== 'ERR_CANCELED') {
78
+ console.error(err);
79
+ if (!err.noMessage) this.showError(err.message);
80
+ if (errFunc) {
81
+ errFunc(err);
82
+ }
80
83
  }
81
84
  }
82
85
  }
@@ -17,6 +17,7 @@ class itfButton extends Vue {
17
17
  @Prop(Boolean) large;
18
18
  @Prop(Boolean) icon;
19
19
  @Prop(Boolean) block;
20
+ @Prop(Boolean) squircle;
20
21
  @Prop(String) loadingText;
21
22
  @Prop(String) color;
22
23
  @Prop(Boolean) disabled;
@@ -27,7 +28,7 @@ class itfButton extends Vue {
27
28
 
28
29
  render (createElement, { data, slots, children, props }) {
29
30
  const {
30
- to, href, target, disabled, color, block, loading, labeled, secondary, primary, small, large, icon, loadingText, default: defaultStyle,
31
+ to, href, target, disabled, color, block, loading, labeled, secondary, primary, small, large, icon, loadingText, squircle, default: defaultStyle,
31
32
  class: classNames
32
33
  } = props;
33
34
  const component = to ? 'nuxt-link' : (props.href ? 'a' : 'button');
@@ -47,6 +48,7 @@ class itfButton extends Vue {
47
48
  'btn-default': defaultStyle,
48
49
  'btn-basic': !primary && !secondary && !color && !defaultStyle,
49
50
  'btn-secondary': secondary,
51
+ // 'btn-squircle': squircle,
50
52
  'btn-sm': small,
51
53
  'btn-lg': large,
52
54
  // 'px-3': small && !icon,
@@ -7,6 +7,7 @@ const CSS_CLASSES = {
7
7
  small: ['btn-sm'],
8
8
  block: ['itf-button__block'],
9
9
  labeled: ['labeled'],
10
+ squircle: ['btn-squircle'],
10
11
  icon: ['btn-icon'],
11
12
  loading: ['loading'],
12
13
  spinner: ['itf-spinner'],
@@ -35,6 +36,9 @@ class Button extends HTMLElement {
35
36
  if (this.hasAttribute('labeled')) {
36
37
  styles.push(CSS_CLASSES.labeled);
37
38
  }
39
+ if (this.hasAttribute('squircle')) {
40
+ styles.push(CSS_CLASSES.squircle);
41
+ }
38
42
  if (this.hasAttribute('icon')) {
39
43
  styles.push(CSS_CLASSES.icon);
40
44
  }
@@ -66,7 +66,7 @@ storiesOf('Common', module)
66
66
 
67
67
  <h3>Standart button</h3>
68
68
 
69
- <itf-button primary>Primary button</itf-button>
69
+ <itf-button squircle primary>Primary button</itf-button>
70
70
  <itf-button secondary>Secondary button</itf-button>
71
71
  <itf-button>Basic button</itf-button>
72
72
  <itf-button icon>
@@ -92,7 +92,7 @@ storiesOf('Common', module)
92
92
 
93
93
  <h3>Large button</h3>
94
94
 
95
- <itf-button large primary>Primary button</itf-button>
95
+ <itf-button squircle large primary>Primary button</itf-button>
96
96
  <itf-button large secondary>Secondary button</itf-button>
97
97
  <itf-button large>Basic button</itf-button>
98
98
  <itf-button large icon>
@@ -2,12 +2,13 @@
2
2
 
3
3
  <div class="itf-checkbox form-check" :class="{ 'form-switch': this.switch, 'itf-checkbox__large': large, 'itf-checkbox__medium': medium }">
4
4
  <input class="form-check-input" ref="input" :id="id" type="checkbox" name="checkbox" v-model="isChecked" :disabled="isDisabled" />
5
- <label :for="id" class="form-check-label">
5
+ <label :for="id" class="form-check-label" :class="{ 'disabled': isDisabled }">
6
6
  <slot name="label">
7
7
  {{label}}
8
8
  <slot name="icon"></slot>
9
9
  </slot>
10
10
  </label>
11
+ <slot name="after-label"></slot>
11
12
  </div>
12
13
 
13
14
  </template>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="itf-radio-box form-check card" :class="{ 'itf-radio__large': large, 'itf-radio__medium': medium, 'active': isChecked, 'right': right, 'left': !right }">
2
+ <div class="itf-radio-box form-check card" :class="{ 'disabled': disabled, '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
 
@@ -16,7 +16,17 @@
16
16
  padding: 0;
17
17
  margin-bottom: .5rem;
18
18
  position: relative;
19
- cursor: pointer;
19
+ &:not(.disabled) {
20
+ cursor: pointer;
21
+
22
+ .form-check-label {
23
+ cursor: pointer;
24
+ }
25
+ }
26
+
27
+ .form-check-label {
28
+ cursor: not-allowed;
29
+ }
20
30
 
21
31
  &.left {
22
32
  padding: 0 0 0 2.5rem;
@@ -38,13 +48,9 @@
38
48
  &.active {
39
49
  background-color: rgba(var(--bs-primary-rgb),.1) !important;
40
50
  }
41
- &:hover {
51
+ &:hover:not(.disabled) {
42
52
  background-color: rgba(0,0,0,.05);
43
53
  }
44
-
45
- .form-check-label {
46
- cursor: pointer;
47
- }
48
54
  }
49
55
  </style>
50
56
  <script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <itf-button icon small @click.stop="copy">
2
+ <itf-button :icon="icon" :small="small" @click.stop="copy" :disabled="disabled">
3
3
  <slot>
4
4
  <itf-icon name="clipboard_copy" />
5
5
  </slot>
@@ -18,6 +18,9 @@ export default @Component({
18
18
  })
19
19
  class CopyToClipboard extends Vue {
20
20
  @Prop(String) value;
21
+ @Prop({ type: Boolean, default: true }) small;
22
+ @Prop({ type: Boolean, default: true }) icon;
23
+ @Prop({ type: Boolean, default: false }) disabled;
21
24
 
22
25
  async copy () {
23
26
  const showSuccess = this.$showSuccess;
@@ -15,7 +15,6 @@
15
15
  :field="field"
16
16
  :editable="editable"
17
17
  :lock-fields="lockFields"
18
- :full-name="fullName"
19
18
  :value="value[field.Id]"
20
19
  @input="$emit('input', { ...value, [field.Id]: $event })"
21
20
  @delete="onDelete(field)"
@@ -105,7 +104,6 @@ class itfPropertiesList extends Vue {
105
104
  @Prop({ type: Boolean, default: false }) loading;
106
105
  @Prop({ type: Boolean, default: false }) editable;
107
106
  @Prop({ type: Boolean, default: false }) lockFields;
108
- @Prop({ type: Boolean, default: false }) fullName;
109
107
 
110
108
  isShowAll = false;
111
109
 
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  </template>
29
29
  <script>
30
- import { Vue, Component, Prop } from 'vue-property-decorator';
30
+ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
31
31
  import itfTextField from '../text-field/TextField.vue';
32
32
  import itfIcon from '../icon/Icon';
33
33
  import itfButton from '../button/Button';
@@ -9,10 +9,10 @@
9
9
 
10
10
  <itf-dropdown text :disabled="!editable || lockFields" ref="editDd" autoclose="outside" class="flex-grow-1 mw-100 editable-field" shadow @close="onClose">
11
11
  <div slot="button">
12
- <div class="d-flex align-items-center" :class="{ 'b-properties-list__title-text': lockFields }">
12
+ <div class="d-flex align-items-center">
13
13
  <!-- <itf-icon :name="field.Icon" :size="16" class="me-1" />-->
14
14
 
15
- <div :class="`b-properties-list__title-text-${fullName ? 'full' : 'short'}`" v-text="field.Name" />
15
+ <div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" v-text="field.Name" />
16
16
  </div>
17
17
  </div>
18
18
  <properties-edit-menu
@@ -35,11 +35,11 @@
35
35
  />
36
36
  </itf-dropdown>
37
37
  </div>
38
- <div class="bg-light b-properties-list__value rounded-2" :class="{'editable': editable, 'active shadow rounded-2 bg-body': focusId === field.Id}" sortable-skip>
38
+ <div class="b-properties-list__value rounded-2" :class="{'editable': editable, 'active shadow rounded-2 bg-body': focusId === field.Id}" sortable-skip>
39
39
  <property-inline-edit
40
40
  @focus="onFocus(field.Id)"
41
41
  @blur="onBlur(field.Id)"
42
- class="flex-grow-1 b-properties-list__inline-editor editable-field rounded-2"
42
+ class="flex-grow-1 b-properties-list__inline-editor editable-field"
43
43
  :field="field"
44
44
  :value="value"
45
45
  :editable="editable"
@@ -62,11 +62,6 @@
62
62
  background: rgba(0, 0, 0, 0.05);
63
63
  }
64
64
  }
65
- &__inline-editor {
66
- min-height: 44px;
67
- padding-right: 10px;
68
- padding-left: 10px;
69
- }
70
65
  &__draghandler {
71
66
  user-select: none;
72
67
  transition: opacity 150ms ease-in 0s;
@@ -85,7 +80,7 @@
85
80
  }
86
81
  &__inner {
87
82
  display: flex;
88
- padding-bottom: 8px;
83
+ padding-bottom: 4px;
89
84
  width: 100%;
90
85
  }
91
86
  &__name, &__value {
@@ -103,7 +98,7 @@
103
98
  &__name {
104
99
  display: flex;
105
100
  align-items: center;
106
- min-height: 44px;
101
+ height: 34px;
107
102
  width: 250px;
108
103
  flex: 0 0 auto;
109
104
  }
@@ -124,18 +119,6 @@
124
119
  background-color: rgba(55, 53, 47, 0.08);
125
120
  }
126
121
  }
127
- &__title-text {
128
- min-height: 44px;
129
- }
130
- &__title-text-short {
131
- white-space: nowrap;
132
- overflow: hidden;
133
- text-overflow: ellipsis;
134
- }
135
- &__title-text-full {
136
- white-space: normal;
137
- word-break: break-word;
138
- }
139
122
  }
140
123
  </style>
141
124
  <script>
@@ -171,7 +154,6 @@ class itfPropertyItem extends Vue {
171
154
  @Prop({ type: Boolean, default: false }) loading;
172
155
  @Prop({ type: Boolean, default: false }) editable;
173
156
  @Prop({ type: Boolean, default: false }) lockFields;
174
- @Prop({ type: Boolean, default: false }) fullName;
175
157
 
176
158
  isEditMode = false;
177
159
  focusId = null;
@@ -24,7 +24,7 @@
24
24
  :disabled="disabled"
25
25
  />
26
26
 
27
- <div class="addon-end" v-if="clearable && value && !isInvalid()">
27
+ <div class="addon-end" v-if="clearable && value">
28
28
  <slot name="clear">
29
29
  <itf-button
30
30
  icon
@@ -44,6 +44,7 @@
44
44
  :display-format="dateFormat"
45
45
  :value-format="valueFormat"
46
46
  :min-date="minDate"
47
+ :max-date="maxDate"
47
48
  :days-list="daysList"
48
49
  @input="selectInlineDate"
49
50
  ></itf-date-picker-inline>
@@ -87,6 +88,7 @@ class itfDatePicker extends Vue {
87
88
  @Prop({ type: String, default: '' }) prependIcon;
88
89
  @Prop({ type: String, default: 'bottom-start' }) placement;
89
90
  @Prop({ type: [String, Date], default: '' }) minDate;
91
+ @Prop({ type: [String, Date], default: '' }) maxDate;
90
92
  @Prop(Boolean) clearable;
91
93
  @Prop(Boolean) disabled;
92
94
 
@@ -90,8 +90,8 @@ class itfDatePickerInline extends Vue {
90
90
  range: this.range,
91
91
  view: (this.valueAsLuxon && !this.minView) ? 'days' : this.startView,
92
92
  minView: this.minView,
93
- minDate: this.minDate,
94
- maxDate: this.maxDate,
93
+ minDate: this.minDate === 'today' ? new Date() : this.minDate,
94
+ maxDate: this.maxDate === 'today' ? new Date() : this.maxDate,
95
95
  selectedDates: this.valueAsLuxon ? [this.valueAsLuxon.toJSDate()] : [],
96
96
  onSelect: ({ date }) => {
97
97
  if (this.range && !this.calendar.rangeDateTo) {
@@ -101,7 +101,12 @@ class itfDatePickerInline extends Vue {
101
101
  range: true,
102
102
  compareRange: true,
103
103
  dynamicRange: true,
104
- toggleSelected: false,
104
+ toggleSelected: function({ date, datepicker }) {
105
+ if (datepicker.selectedDates.length > 1) {
106
+ datepicker.selectDate(date);
107
+ }
108
+ return false;
109
+ },
105
110
  selectedDates: this.valueAsLuxon
106
111
  ? [this.valueAsLuxon[0].toJSDate(), this.valueAsLuxon[1].toJSDate()]
107
112
  : [],