@avakhula/ui 0.0.505 → 0.0.510-alpha-spa.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/.babelrc.json +0 -0
  2. package/.eslintrc.cjs +0 -0
  3. package/.nvmrc +0 -0
  4. package/.storybook/main.js +0 -0
  5. package/.storybook/preview-head.html +0 -0
  6. package/.storybook/preview.js +0 -0
  7. package/dist/index.css +1 -0
  8. package/dist/index.es.js +22382 -0
  9. package/dist/index.umd.js +238 -0
  10. package/package.json +11 -10
  11. package/src/App.vue +16 -127
  12. package/src/assets/scss/mixins/dropdown-list-item.scss +9 -4
  13. package/src/assets/scss/mixins/tooltip-position.scss +7 -0
  14. package/src/assets/scss/mixins.scss +2 -2
  15. package/src/assets/scss/style.scss +4 -4
  16. package/src/assets/scss/typography.scss +3 -3
  17. package/src/assets/scss/variables/colors.json +0 -0
  18. package/src/assets/scss/variables/colors.scss +0 -0
  19. package/src/assets/scss/variables/shadows.json +0 -0
  20. package/src/assets/scss/variables/shadows.scss +0 -0
  21. package/src/components/Accordion/Accordion.scss +3 -3
  22. package/src/components/Accordion/Accordion.stories.js +0 -0
  23. package/src/components/Accordion/Accordion.vue +2 -2
  24. package/src/components/Accordion/Acordion.spec.js +0 -0
  25. package/src/components/Accordion/readme.mdx +0 -0
  26. package/src/components/Alert/Alert.spec.js +0 -0
  27. package/src/components/Alert/Alert.stories.js +0 -0
  28. package/src/components/Alert/Alert.vue +6 -1
  29. package/src/components/Alert/alert.scss +8 -3
  30. package/src/components/Alert/constants.js +0 -0
  31. package/src/components/Alert/readme.mdx +0 -0
  32. package/src/components/Avatar/Avatar.stories.js +5 -1
  33. package/src/components/Avatar/Avatar.vue +27 -4
  34. package/src/components/Avatar/constants.js +6 -0
  35. package/src/components/Badge/Badge.spec.js +0 -0
  36. package/src/components/Badge/Badge.vue +2 -2
  37. package/src/components/Badge/readme.mdx +0 -0
  38. package/src/components/Breadcrumbs/Breadcrumbs.vue +24 -9
  39. package/src/components/Breadcrumbs/breadcrumbs.scss +5 -5
  40. package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
  41. package/src/components/Button/Button.spec.js +0 -0
  42. package/src/components/Button/Button.vue +20 -4
  43. package/src/components/Button/button.scss +8 -3
  44. package/src/components/Button/readme.mdx +0 -0
  45. package/src/components/ButtonGroup/ButtonGroup.stories.js +0 -0
  46. package/src/components/ButtonGroup/readme.mdx +0 -0
  47. package/src/components/Chips/Chips.stories.js +30 -0
  48. package/src/components/Chips/Chips.vue +125 -0
  49. package/src/components/Dropdown/Dropdown.spec.js +0 -0
  50. package/src/components/Dropdown/Dropdown.stories.js +0 -0
  51. package/src/components/Dropdown/Dropdown.vue +3 -3
  52. package/src/components/Dropdown/DropdownDivider.vue +1 -1
  53. package/src/components/Dropdown/DropdownItem.vue +27 -5
  54. package/src/components/Dropdown/DropdownList.stories.js +0 -0
  55. package/src/components/Dropdown/DropdownList.vue +6 -2
  56. package/src/components/Dropdown/readme.mdx +0 -0
  57. package/src/components/Form/CharactersCount.vue +12 -9
  58. package/src/components/Form/Checkbox/Checkbox.scss +4 -4
  59. package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
  60. package/src/components/Form/Checkbox/Checkbox.vue +25 -12
  61. package/src/components/Form/Checkbox/readme.mdx +0 -0
  62. package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +0 -0
  63. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +15 -0
  64. package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
  65. package/src/components/Form/DatePicker/DatePicker.scss +356 -265
  66. package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
  67. package/src/components/Form/DatePicker/DatePicker.vue +73 -18
  68. package/src/components/Form/DatePicker/readme.mdx +0 -0
  69. package/src/components/Form/FormGroup/FormGroup.vue +5 -5
  70. package/src/components/Form/FormGroup/FormGroupSet.vue +1 -1
  71. package/src/components/Form/Input/Input.stories.js +0 -0
  72. package/src/components/Form/Input/Input.vue +120 -14
  73. package/src/components/Form/Input/constants.js +0 -0
  74. package/src/components/Form/Input/input.scss +64 -5
  75. package/src/components/Form/Input/readme.mdx +0 -0
  76. package/src/components/Form/Label/Label.stories.js +0 -0
  77. package/src/components/Form/Label/Label.vue +24 -12
  78. package/src/components/Form/Label/readme.mdx +0 -0
  79. package/src/components/Form/PhoneInput/PhoneInput.stories.js +0 -0
  80. package/src/components/Form/PhoneInput/PhoneInput.vue +77 -28
  81. package/src/components/Form/PhoneInput/phoneInput.scss +42 -10
  82. package/src/components/Form/PhoneInput/readme.mdx +0 -0
  83. package/src/components/Form/Radio/Radio.stories.js +0 -0
  84. package/src/components/Form/Radio/Radio.vue +17 -45
  85. package/src/components/Form/Radio/radio.scss +8 -5
  86. package/src/components/Form/Radio/readme.mdx +0 -0
  87. package/src/components/Form/TextEditor/TextEditor.stories.js +0 -0
  88. package/src/components/Form/TextEditor/TextEditor.vue +92 -138
  89. package/src/components/Form/TextEditor/Toolbar.vue +723 -0
  90. package/src/components/Form/TextEditor/icons/toolbarIcons.js +8 -0
  91. package/src/components/Form/TextEditor/plugins/imageBlot.js +23 -0
  92. package/src/components/Form/TextEditor/readme.mdx +0 -0
  93. package/src/components/Form/TextEditor/setupTextEditor.js +71 -0
  94. package/src/components/Form/TextEditor/textEditor.scss +15 -339
  95. package/src/components/Form/Textarea/Textarea.spec.js +0 -0
  96. package/src/components/Form/Textarea/Textarea.stories.js +0 -0
  97. package/src/components/Form/Textarea/Textarea.vue +28 -10
  98. package/src/components/Form/Textarea/readme.mdx +0 -0
  99. package/src/components/Form/Textarea/textarea.scss +33 -5
  100. package/src/components/Form/Toggle/Toggle.stories.js +0 -0
  101. package/src/components/Form/Toggle/Toggle.vue +1 -1
  102. package/src/components/Form/Toggle/readme.mdx +0 -0
  103. package/src/components/Form/Toggle/toggle.scss +3 -3
  104. package/src/components/IconButton/IconButton.scss +13 -2
  105. package/src/components/IconButton/IconButton.vue +11 -4
  106. package/src/components/IconButton/readme.mdx +0 -0
  107. package/src/components/List.vue +1 -1
  108. package/src/components/Modal/Modal.stories.js +0 -0
  109. package/src/components/Modal/Modal.vue +109 -40
  110. package/src/components/Modal/constants.js +0 -0
  111. package/src/components/Modal/readme.mdx +0 -0
  112. package/src/components/Pagination/LimitSelector.vue +5 -0
  113. package/src/components/Pagination/Pagination.vue +37 -5
  114. package/src/components/Pagination/pagination.scss +20 -4
  115. package/src/components/Panel/Panel.stories.js +0 -0
  116. package/src/components/Panel/Panel.vue +72 -6
  117. package/src/components/Popover/Popover.vue +27 -10
  118. package/src/components/Popover/constants.js +0 -0
  119. package/src/components/Popover/popover.scss +4 -4
  120. package/src/components/Popover/readme.mdx +0 -0
  121. package/src/components/ProgressBar/ProgressBar.vue +1 -1
  122. package/src/components/ProgressBar/constants.js +0 -0
  123. package/src/components/ProgressBar/progressBar.scss +1 -1
  124. package/src/components/ProgressBar/readme.mdx +0 -0
  125. package/src/components/Sorting/Sorting.stories.js +0 -0
  126. package/src/components/Sorting/Sorting.vue +25 -27
  127. package/src/components/Sorting/sorting.scss +5 -5
  128. package/src/components/SplitButton/SplitButton.stories.js +0 -0
  129. package/src/components/SplitButton/SplitButton.vue +52 -9
  130. package/src/components/SplitButton/SplitButtonItem.vue +14 -2
  131. package/src/components/SplitButton/readme.mdx +0 -0
  132. package/src/components/SplitButton/splitButton.scss +3 -3
  133. package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
  134. package/src/components/StatusIndicator/StatusIndicator.vue +2 -2
  135. package/src/components/StatusIndicator/constants.js +0 -0
  136. package/src/components/StatusIndicator/icons.js +0 -0
  137. package/src/components/StatusIndicator/readme.mdx +0 -0
  138. package/src/components/Table/Cells/Cell.vue +2 -2
  139. package/src/components/Table/Cells/CheckboxCell.vue +0 -0
  140. package/src/components/Table/Row.vue +1 -1
  141. package/src/components/Table/Table.stories.js +0 -0
  142. package/src/components/Table/Table.vue +0 -0
  143. package/src/components/Tabs/Tab.vue +4 -0
  144. package/src/components/Tabs/TabDropdown.vue +1 -1
  145. package/src/components/Tabs/Tabs.stories.js +0 -0
  146. package/src/components/Tabs/Tabs.vue +21 -6
  147. package/src/components/Tabs/tabs.scss +12 -6
  148. package/src/components/TagPill/TagPill.stories.js +0 -0
  149. package/src/components/TagPill/TagPill.vue +8 -2
  150. package/src/components/TagPill/readme.mdx +0 -0
  151. package/src/components/ToggleTip/ToggleTip.vue +1 -1
  152. package/src/components/ToggleTip/constants.js +0 -0
  153. package/src/components/ToggleTip/readme.mdx +0 -0
  154. package/src/components/ToggleTip/toggleTip.scss +5 -5
  155. package/src/components/Tooltip/Tooltip.vue +4 -4
  156. package/src/components/Tooltip/readme.mdx +0 -0
  157. package/src/components/TreeSelect/Option.vue +59 -25
  158. package/src/components/TreeSelect/Select.stories.js +0 -0
  159. package/src/components/TreeSelect/Select.vue +283 -148
  160. package/src/components/TreeSelect/TreeSelect.stories.js +0 -0
  161. package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
  162. package/src/components/TreeSelect/scss/option.scss +37 -6
  163. package/src/components/TreeSelect/scss/select.scss +97 -6
  164. package/src/constants/keyCodes.js +1 -0
  165. package/src/directives/outside/outside.stories.js +0 -0
  166. package/src/directives/outside/readme.mdx +0 -0
  167. package/src/directives/tooltip/TooltipController.js +2 -0
  168. package/src/directives/tooltip/readme.mdx +0 -0
  169. package/src/directives/tooltip/textOverflowTooltip.js +3 -1
  170. package/src/directives/tooltip/tooltip.js +61 -0
  171. package/src/directives/tooltip/tooltip.stories.js +0 -0
  172. package/src/helpers/debounce.js +23 -0
  173. package/src/helpers/removeEvents.js +0 -0
  174. package/src/helpers/stripHtml.js +4 -0
  175. package/src/index.js +7 -0
  176. package/src/main.js +0 -0
  177. package/src/mixins/expandAnimation.js +0 -0
  178. package/src/scripts/parseScssVariables.js +0 -0
  179. package/src/stories/link.readme.mdx +0 -0
  180. package/src/stories/variables/colors.stories.js +0 -0
  181. package/src/stories/variables/shadows.stories.js +0 -0
  182. package/static/docks/button.pdf +0 -0
  183. package/static/favicon.ico +0 -0
  184. package/vite.config.js +3 -9
  185. package/dist/index.js +0 -20786
  186. package/dist/index.umd.cjs +0 -227
  187. package/dist/style.css +0 -1
@@ -109,3 +109,11 @@ export const LIST_ALPHABET = `
109
109
  <rect x="7" y="14.5" width="11" height="2" rx="1" class="fill" fill="#1A1A1A"/>
110
110
  </svg>
111
111
  `;
112
+
113
+ export const IMAGE = `
114
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
115
+ <path d="M16.25 3.125H3.75C2.71447 3.125 1.875 3.96447 1.875 5V15C1.875 16.0355 2.71447 16.875 3.75 16.875H16.25C17.2855 16.875 18.125 16.0355 18.125 15V5C18.125 3.96447 17.2855 3.125 16.25 3.125Z" stroke="#1A1A1A" stroke-width="1.25" stroke-linejoin="round"/>
116
+ <path d="M13.125 8.125C13.8154 8.125 14.375 7.56536 14.375 6.875C14.375 6.18464 13.8154 5.625 13.125 5.625C12.4346 5.625 11.875 6.18464 11.875 6.875C11.875 7.56536 12.4346 8.125 13.125 8.125Z" stroke="#1A1A1A" stroke-width="1.25" stroke-miterlimit="10"/>
117
+ <path d="M8.75 16.8741L13.568 12.0561C13.7883 11.8353 14.0832 11.7049 14.3948 11.6904C14.7064 11.676 15.0121 11.7785 15.252 11.978L18.125 14.3741M11.875 13.1159L8.33359 9.58111C8.10824 9.35581 7.80535 9.22508 7.48684 9.21564C7.16832 9.2062 6.85822 9.31876 6.61992 9.53032L1.875 13.7491L11.875 13.1159Z" stroke="#1A1A1A" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
118
+ </svg>
119
+ `;
@@ -0,0 +1,23 @@
1
+ import { Quill } from "@vueup/vue-quill";
2
+
3
+ const ImageBlot = Quill.import('formats/image');
4
+
5
+ class CustomImageBlot extends ImageBlot {
6
+ static create(value) {
7
+ const node = super.create(value);
8
+
9
+ node.setAttribute('data-supernova-id', value);
10
+
11
+ node.setAttribute('src', '#');
12
+ return node;
13
+ }
14
+
15
+ static value(node) {
16
+ return node.getAttribute('data-supernova-id');
17
+ }
18
+ }
19
+
20
+ CustomImageBlot.blotName = 'custom-image';
21
+ CustomImageBlot.tagName = 'img';
22
+
23
+ export default CustomImageBlot;
File without changes
@@ -0,0 +1,71 @@
1
+ import { Quill } from "@vueup/vue-quill";
2
+ import { AlphabetList, AlphabetListItem } from "./plugins/alphabetList.js";
3
+ import CustomImageBlot from "./plugins/imageBlot.js";
4
+ import {
5
+ ALIGN_CENTER,
6
+ ALIGN_JUSTIFY,
7
+ ALIGN_LEFT,
8
+ ALIGN_RIGHT,
9
+ BOLD,
10
+ CODE,
11
+ ITALIC,
12
+ LINK,
13
+ LIST_ALPHABET,
14
+ LIST_BULLET,
15
+ LIST_ORDERED,
16
+ STRIKE,
17
+ UNDERLINE,
18
+ IMAGE,
19
+ } from "./icons/toolbarIcons.js";
20
+
21
+ // Custom size class for pixel values
22
+ const SizeClass = Quill.import('attributors/class/size');
23
+ SizeClass.whitelist = ['12px', '14px', '16px', '20px', '24px', '36px', '48px'];
24
+
25
+ const SizeStyle = Quill.import('attributors/style/size');
26
+ SizeStyle.whitelist = ['12px', '14px', '16px', '20px', '24px', '36px', '48px'];
27
+
28
+ export function setupTextEditor() {
29
+ Quill.register(Quill.import('attributors/attribute/direction'), true);
30
+ Quill.register(Quill.import('attributors/class/align'), true);
31
+ Quill.register(Quill.import('attributors/class/direction'), true);
32
+ Quill.register(Quill.import('attributors/class/font'), true);
33
+ Quill.register(SizeClass, true);
34
+ Quill.register(Quill.import('attributors/style/align'), true);
35
+ Quill.register(Quill.import('attributors/style/background'), true);
36
+ Quill.register(Quill.import('attributors/style/color'), true);
37
+ Quill.register(Quill.import('attributors/style/direction'), true);
38
+ Quill.register(Quill.import('attributors/style/font'), true);
39
+ Quill.register(SizeStyle, true);
40
+
41
+ setupTextEditorIcons();
42
+ setupTextEditorPlugins();
43
+ }
44
+
45
+ export function setupTextEditorIcons() {
46
+ const icons = Quill.import("ui/icons");
47
+ icons.bold = BOLD;
48
+ icons.italic = ITALIC;
49
+ icons.underline = UNDERLINE;
50
+ icons.strike = STRIKE;
51
+ icons["code-block"] = CODE;
52
+ icons.link = LINK;
53
+ icons.align[""] = ALIGN_LEFT;
54
+ icons.align.center = ALIGN_CENTER;
55
+ icons.align.right = ALIGN_RIGHT;
56
+ icons.align.justify = ALIGN_JUSTIFY;
57
+ icons.list.ordered = LIST_ORDERED;
58
+ icons.list.bullet = LIST_BULLET;
59
+ icons["alphabet-list"] = LIST_ALPHABET;
60
+ icons.image = IMAGE;
61
+
62
+ Quill.register(icons);
63
+ }
64
+
65
+ export function setupTextEditorPlugins() {
66
+ Quill.register({
67
+ "formats/alphabet-list": AlphabetList,
68
+ "formats/alphabet-list/item": AlphabetListItem,
69
+ "formats/custom-image": CustomImageBlot,
70
+ });
71
+ }
@@ -1,7 +1,7 @@
1
- @import "../../../assets/scss/variables/colors.scss";
2
- @import "../../../assets/scss/variables/shadows.scss";
3
- @import "../../../assets/scss/mixins.scss";
4
- @import "../../../assets/scss/typography.scss";
1
+ @use "../../../assets/scss/variables/colors.scss" as *;
2
+ @use "../../../assets/scss/variables/shadows.scss" as *;
3
+ @use "../../../assets/scss/mixins.scss" as *;
4
+ @use "../../../assets/scss/typography.scss" as *;
5
5
 
6
6
  $textarea-error-outline-color: $red-800;
7
7
  // TODO: it's duplicate from /components/Button/button.scss
@@ -30,13 +30,13 @@ $input-hover-error-color: $red-800;
30
30
 
31
31
  // AlphabeticalList list style
32
32
  ol[type="a"] li::before {
33
- content: counter(list-1, lower-alpha) ". ";
33
+ content: counter(list-1, lower-alpha) ". "!important;
34
34
  }
35
35
  ol[type="a"] li {
36
- counter-increment: list-1;
36
+ counter-increment: list-1!important;
37
37
  }
38
38
  ol[type="a"] li {
39
- counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
39
+ counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;
40
40
  }
41
41
 
42
42
  .textarea-wrapper {
@@ -84,6 +84,7 @@ ol[type="a"] li {
84
84
  color: $neutral-500;
85
85
  }
86
86
  }
87
+
87
88
  .ql-header.ql-picker {
88
89
  .ql-picker-label:hover,
89
90
  .ql-picker-label {
@@ -178,6 +179,10 @@ ol[type="a"] li {
178
179
 
179
180
  .ql-editor {
180
181
  padding: 0 0 10px 0;
182
+
183
+ img {
184
+ display: inline-block;
185
+ }
181
186
  }
182
187
  }
183
188
 
@@ -197,7 +202,7 @@ ol[type="a"] li {
197
202
  .ib-text-editor {
198
203
  background-color: $blue-100;
199
204
  border-bottom-color: $blue-700;
200
-
205
+
201
206
  & + .toolbar {
202
207
  background-color: $blue-100;
203
208
  }
@@ -235,344 +240,15 @@ ol[type="a"] li {
235
240
 
236
241
  .toolbar {
237
242
  position: absolute;
238
- bottom: 2px;
243
+ bottom: 1.5px;
239
244
  left: 12px;
240
245
  right: 25px;
241
246
  padding-top: 10px;
242
- padding-bottom: 8px;
247
+ padding-bottom: 5px;
243
248
  display: flex;
244
249
  flex-wrap: wrap;
245
250
  margin: 0 -10px;
246
251
  transition: background-color 0.3s;
247
- .toolbar-group {
248
- position: relative;
249
- display: flex;
250
- padding: 0 10px;
251
-
252
- &:last-child {
253
- &::before {
254
- display: none;
255
- }
256
- }
257
-
258
- &::before {
259
- content: "";
260
- height: 16px;
261
- width: 2px;
262
- background-color: $gray-300;
263
- position: absolute;
264
- right: -1px;
265
- top: 50%;
266
- transform: translateY(-50%);
267
- }
268
-
269
- button {
270
- &:not(:last-child) {
271
- margin-right: 4px;
272
- }
273
- }
274
- }
275
- }
276
-
277
- // Headings dropdown
278
- .ql-snow .ql-picker.ql-header .ql-picker-item {
279
- &::before {
280
- @include Ib-H4-regular;
281
- }
282
-
283
- &[data-value="1"]::before {
284
- @include Ib-H1-medium;
285
- }
286
-
287
- &[data-value="2"]::before {
288
- @include Ib-H2-medium;
289
- }
290
-
291
- &[data-value="3"]::before {
292
- @include Ib-H3-medium;
293
- }
294
-
295
- &[data-value="4"]::before {
296
- @include Ib-H4-medium;
297
- }
298
-
299
- &[data-value="5"]::before {
300
- @include Ib-H5-medium;
301
- }
302
-
303
- &[data-value="6"]::before {
304
- @include Ib-H6-medium;
305
- }
306
- }
307
-
308
- .ql-header.ql-picker {
309
- width: 98px;
310
- border-radius: 4px;
311
-
312
- // Is Open
313
- &.ql-expanded {
314
- .ql-picker-label {
315
- background-color: $blue-200;
316
- border-color: transparent;
317
-
318
- &:after {
319
- // Transform color from $neutral-900(#1A1A1A) to $blue-900(#0057C2)
320
- filter: invert(23%) sepia(50%) saturate(4320%) hue-rotate(204deg)
321
- brightness(87%) contrast(101%);
322
- transform: translateY(-50%) rotate(180deg);
323
- }
324
-
325
- &::before {
326
- color: $blue-900;
327
- }
328
- }
329
- }
330
-
331
- .ql-picker-label {
332
- padding: 2.5px 3px;
333
- border: 2px solid transparent;
334
- border-radius: 4px;
335
- overflow: hidden;
336
- transition: border-color 0.3s, background-color 0.3s;
337
-
338
- &::after {
339
- content: "";
340
- background-image: url(./icons/svg/chevron-down.svg);
341
- width: 16px;
342
- height: 16px;
343
- position: absolute;
344
- top: 50%;
345
- transform: translateY(-50%);
346
- right: 0;
347
- transition: transform 0.3s;
348
- }
349
-
350
- &:before {
351
- color: $neutral-900;
352
- @include Ib-H4-regular;
353
- line-height: 15px;
354
- transition: color 0.3s;
355
- }
356
-
357
- &:focus {
358
- border-radius: 4px;
359
- @include focus(4px);
360
- }
361
-
362
- svg {
363
- display: none;
364
- }
365
-
366
- &:hover {
367
- border-color: $blue-300;
368
- background-color: $blue-100;
369
-
370
- &:before {
371
- color: $blue-800;
372
- }
373
-
374
- &::after {
375
- // Transform color from $neutral-900(#1A1A1A) to $blue-800(#0060D6)
376
- filter: invert(76%) sepia(94%) saturate(5659%) hue-rotate(215deg)
377
- brightness(101%) contrast(100%);
378
- }
379
- }
380
-
381
- &:active {
382
- border-color: transparent;
383
- background-color: $blue-200;
384
-
385
- &:before {
386
- color: $blue-900;
387
- }
388
-
389
- &::after {
390
- // Transform color from $neutral-900(#1A1A1A) to $blue-900(#0057C2)
391
- filter: invert(23%) sepia(50%) saturate(4320%) hue-rotate(204deg)
392
- brightness(87%) contrast(101%);
393
- }
394
- }
395
- }
396
- }
397
-
398
- .ql-picker-options {
399
- left: -2px;
400
- margin-top: 5px !important;
401
- border-radius: 4px;
402
- padding: 6.5px 0;
403
- background-color: $white;
404
- box-shadow: $ib-shadow-4;
405
-
406
- .ql-picker-item {
407
- height: 36px;
408
- padding: 0px 15px 0px 13px;
409
- display: flex;
410
- align-items: center;
411
- border-left: 2px solid transparent;
412
- transition: border-color 0.3s, background-color 0.3s;
413
- @include focus();
414
-
415
- &:before {
416
- color: $neutral-900;
417
- }
418
-
419
- &:hover {
420
- background-color: $gray-100;
421
- }
422
-
423
- &.ql-selected {
424
- border-color: $blue-900;
425
- background-color: $gray-100;
426
-
427
- &:hover {
428
- background-color: $blue-50;
429
- }
430
- }
431
- }
432
- }
433
-
434
- .ql-color-picker {
435
- .ql-picker-label {
436
- padding: 0;
437
- width: 24px;
438
- height: 24px;
439
- max-width: 24px;
440
- max-height: 24px;
441
- min-width: 24px;
442
- min-height: 24px;
443
- line-height: 1px;
444
- display: flex;
445
- align-items: center;
446
- justify-content: center;
447
- border: 2px solid transparent;
448
-
449
- &:hover {
450
- background-color: $blue-100;
451
- border-color: $blue-300;
452
- border-radius: 4px;
453
-
454
- svg {
455
- .ql-stroke {
456
- stroke: $blue-800;
457
- }
458
- }
459
- }
460
-
461
- &:active {
462
- border-color: transparent;
463
- background-color: $blue-200;
464
-
465
- svg {
466
- .ql-stroke {
467
- stroke: $blue-900;
468
- }
469
- }
470
- }
471
-
472
- &:focus {
473
- border-radius: 4px;
474
- @include focus(2px);
475
- }
476
-
477
- svg {
478
- width: 20px;
479
- height: 20px;
480
-
481
- .ql-stroke {
482
- transition: stroke 0.3s;
483
- stroke: $neutral-900;
484
- }
485
- }
486
- }
487
-
488
- &.ql-expanded {
489
- .ql-picker-label {
490
- border-radius: 4px;
491
- background-color: $blue-200;
492
-
493
- svg {
494
- .ql-stroke {
495
- stroke: $blue-900;
496
- }
497
- }
498
- }
499
- }
500
-
501
- &.ql-background {
502
- .ql-picker-item {
503
- &:not([data-value]) {
504
- border: 1px solid $gray-600;
505
- background-color: $white!important;
506
- position: relative;
507
-
508
- &::after {
509
- content: "";
510
- width: 14px;
511
- height: 1px;
512
- background-color: $gray-600;
513
- position: absolute;
514
- top: 50%;
515
- left: 50%;
516
- transform: translate(-50%, -50%) rotate(-45deg);
517
- border-radius: 10px;
518
- }
519
-
520
- &:hover {
521
- background-color: $white!important;
522
- }
523
- }
524
- }
525
- }
526
-
527
- .ql-picker-options {
528
- padding: 7.5px;
529
- width: 162px;
530
-
531
- .ql-picker-item {
532
- width: 16px;
533
- height: 16px;
534
- padding: 0;
535
- border: none;
536
- border-radius: 4px;
537
- margin: 2.5px;
538
- transition: transform 0.2s;
539
-
540
- &[data-value="#ffffff"] {
541
- border: 1px solid $gray-600;
542
- position: relative;
543
- }
544
-
545
- &:hover {
546
- transform: scale(1.2);
547
- }
548
-
549
- &:focus {
550
- @include focus(1px);
551
- }
552
-
553
- &.ql-selected {
554
- position: relative;
555
-
556
- &:first-child {
557
- background-color: black;
558
- }
559
-
560
- &::before {
561
- content: "";
562
- width: calc(100% + 5px);
563
- height: calc(100% + 5px);
564
- border-radius: 4px;
565
- background-color: transparent;
566
- border: 1px solid $gray-600;
567
- position: absolute;
568
- top: -2.5px;
569
- bottom: -2.5px;
570
- right: -2.5px;
571
- left: -2.5px;
572
- }
573
- }
574
- }
575
- }
576
252
  }
577
253
 
578
254
  // Link tooltip
File without changes
File without changes
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <div class="textarea-wrapper" :class="{ disabled: disabled }">
2
+ <div
3
+ class="textarea-wrapper"
4
+ :class="{ disabled: disabled, hasActins: $slots.actions }"
5
+ @focusout="onFocusOut"
6
+ >
3
7
  <ib-character-count
4
8
  v-if="characterLimit"
5
9
  :character-limit="characterLimit"
@@ -14,12 +18,16 @@
14
18
  <textarea
15
19
  v-bind="$attrs"
16
20
  v-model="val"
21
+ :id="id"
17
22
  @input="onInput"
18
- @blur="onBlur"
19
23
  class="ib-textarea"
20
24
  :class="classes"
21
25
  :disabled="disabled"
22
26
  ></textarea>
27
+
28
+ <div class="textarea-actions">
29
+ <slot name="actions"></slot>
30
+ </div>
23
31
  </div>
24
32
  </template>
25
33
 
@@ -57,22 +65,31 @@ export default {
57
65
  type: String,
58
66
  default: "",
59
67
  },
68
+ value: {
69
+ type: String,
70
+ default: "",
71
+ },
72
+ },
73
+ watch: {
74
+ value() {
75
+ this.val = this.value;
76
+ },
77
+ val() {
78
+ this.$emit("update:value", this.val);
79
+ },
60
80
  },
61
81
  data() {
62
82
  return {
63
- val: "",
83
+ val: this.value,
64
84
  };
65
85
  },
66
86
  methods: {
67
87
  onInput() {
68
- if (!this.characterOverLimit) {
69
88
  this.$emit("input", this.val);
70
- }
71
89
  },
72
- onBlur() {
73
- if (!this.characterOverLimit) {
74
- this.$emit("blur", this.val);
75
- }
90
+ onFocusOut(event) {
91
+ if (this.$el.contains(event.relatedTarget)) return;
92
+ this.$emit("blur", this.val);
76
93
  },
77
94
  },
78
95
  computed: {
@@ -93,10 +110,11 @@ export default {
93
110
  IbAlert,
94
111
  IbCharacterCount,
95
112
  },
113
+ emits: ["input", "blur", "update:value"],
96
114
  inheritAttrs: false,
97
115
  };
98
116
  </script>
99
117
 
100
118
  <style lang="scss" scoped>
101
- @import "./textarea.scss";
119
+ @use "./textarea.scss" as *;
102
120
  </style>
File without changes
@@ -1,6 +1,6 @@
1
- @import "../../../assets/scss/variables/colors.scss";
2
- @import "../../../assets/scss/mixins.scss";
3
- @import "../../../assets/scss/typography.scss";
1
+ @use "../../../assets/scss/variables/colors.scss" as *;
2
+ @use "../../../assets/scss/mixins.scss" as *;
3
+ @use "../../../assets/scss/typography.scss" as *;
4
4
 
5
5
  $textarea-bg: $gray-100;
6
6
  $textarea-text-color: $neutral-900;
@@ -14,8 +14,10 @@ $textarea-hover-border-color: $blue-700;
14
14
  $textarea-error-outline-color: $red-800;
15
15
 
16
16
  .textarea-wrapper {
17
- width: fit-content;
17
+ background-color: $textarea-bg;
18
+ width: 100%;
18
19
  position: relative;
20
+ border-radius: 4px 4px 0px 0px;
19
21
 
20
22
  .character-count {
21
23
  position: absolute;
@@ -32,14 +34,35 @@ $textarea-error-outline-color: $red-800;
32
34
  color: $neutral-500;
33
35
  }
34
36
  }
37
+
38
+ &.hasActins {
39
+ textarea {
40
+ padding-bottom: 40px;
41
+ }
42
+ }
43
+
44
+ .textarea-actions {
45
+ background-color: inherit;
46
+ position: absolute;
47
+ bottom: 3px;
48
+ left: 0;
49
+ right: 10px;
50
+ padding: 0 10px 2px 10px;
51
+ transition: background-color 0.3s;
52
+ }
53
+
54
+ &:hover {
55
+ background-color: $textarea-hover-bg;
56
+ }
35
57
  }
36
58
 
37
59
  textarea.ib-textarea {
38
60
  @include Ib-H4-regular;
61
+ width: 100%;
39
62
  height: 80px;
40
63
  min-height: 36px;
41
64
  border: none;
42
- background-color: $textarea-bg;
65
+ background-color: inherit;
43
66
  color: $textarea-text-color;
44
67
  padding: 10px 15px;
45
68
  resize: vertical;
@@ -76,6 +99,11 @@ textarea.ib-textarea {
76
99
  }
77
100
  }
78
101
 
102
+ &:read-only:hover {
103
+ background-color: $textarea-bg;
104
+ color: $textarea-text-color;
105
+ }
106
+
79
107
  &.error {
80
108
  border-radius: 4px;
81
109
  border-bottom-color: transparent;
File without changes
@@ -122,5 +122,5 @@ export default {
122
122
  </script>
123
123
 
124
124
  <style lang="scss">
125
- @import "./toggle.scss";
125
+ @use "./toggle.scss" as *;
126
126
  </style>
File without changes
@@ -1,6 +1,6 @@
1
- @import "../../../assets/scss/variables/colors.scss";
2
- @import "../../../assets/scss/typography.scss";
3
- @import "../../../assets/scss/mixins.scss";
1
+ @use "../../../assets/scss/variables/colors.scss" as *;
2
+ @use "../../../assets/scss/typography.scss" as *;
3
+ @use "../../../assets/scss/mixins.scss" as *;
4
4
 
5
5
  $switcher-slider-on: $blue-800;
6
6
  $switcher-slider-on-hover: $blue-700;