@avakhula/ui 0.0.340 → 0.0.342

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 (204) hide show
  1. package/.babelrc.json +0 -0
  2. package/.eslintrc.cjs +0 -0
  3. package/.nvmrc +0 -0
  4. package/.prettierrc.json +0 -0
  5. package/.storybook/intelliboardTheme.js +0 -0
  6. package/.storybook/main.js +0 -0
  7. package/.storybook/manager.js +0 -0
  8. package/.storybook/preview-head.html +0 -0
  9. package/.storybook/preview.js +0 -0
  10. package/.storybook/scss-loader.scss +0 -0
  11. package/.storybook/withSource.js +0 -0
  12. package/README.md +0 -0
  13. package/dist/index.js +1173 -1155
  14. package/dist/index.umd.cjs +43 -43
  15. package/dist/style.css +1 -1
  16. package/index.html +0 -0
  17. package/package.json +1 -2
  18. package/src/App.vue +42 -1
  19. package/src/EventEmmiter.js +0 -0
  20. package/src/assets/scss/mixins/tooltip-position.scss +0 -0
  21. package/src/assets/scss/mixins.scss +0 -0
  22. package/src/assets/scss/reset.scss +0 -0
  23. package/src/assets/scss/style.scss +0 -0
  24. package/src/assets/scss/typography.scss +0 -0
  25. package/src/assets/scss/variables/colors.json +0 -0
  26. package/src/assets/scss/variables/colors.scss +0 -0
  27. package/src/assets/scss/variables/shadows.json +0 -0
  28. package/src/assets/scss/variables/shadows.scss +0 -0
  29. package/src/components/Accordion/Accordion.scss +0 -0
  30. package/src/components/Accordion/Accordion.stories.js +0 -0
  31. package/src/components/Accordion/Accordion.vue +0 -0
  32. package/src/components/Accordion/Acordion.spec.js +0 -0
  33. package/src/components/Accordion/readme.mdx +0 -0
  34. package/src/components/Alert/Alert.spec.js +0 -0
  35. package/src/components/Alert/Alert.stories.js +0 -0
  36. package/src/components/Alert/Alert.vue +0 -0
  37. package/src/components/Alert/alert.scss +0 -0
  38. package/src/components/Alert/constants.js +0 -0
  39. package/src/components/Alert/readme.mdx +0 -0
  40. package/src/components/Avatar/Avatar.stories.js +0 -0
  41. package/src/components/Avatar/Avatar.vue +0 -0
  42. package/src/components/Avatar/constants.js +0 -0
  43. package/src/components/Badge/Badge.spec.js +0 -0
  44. package/src/components/Badge/Badge.stories.js +0 -0
  45. package/src/components/Badge/Badge.vue +0 -0
  46. package/src/components/Badge/readme.mdx +0 -0
  47. package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -0
  48. package/src/components/Breadcrumbs/breadcrumbs.scss +0 -0
  49. package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
  50. package/src/components/Button/Button.spec.js +0 -0
  51. package/src/components/Button/Button.stories.js +0 -0
  52. package/src/components/Button/Button.vue +0 -0
  53. package/src/components/Button/constants.js +0 -0
  54. package/src/components/Button/readme.mdx +0 -0
  55. package/src/components/ButtonGroup/ButtonGroup.stories.js +0 -0
  56. package/src/components/ButtonGroup/ButtonGroup.vue +0 -0
  57. package/src/components/ButtonGroup/readme.mdx +0 -0
  58. package/src/components/Dropdown/Dropdown.spec.js +0 -0
  59. package/src/components/Dropdown/Dropdown.stories.js +0 -0
  60. package/src/components/Dropdown/Dropdown.vue +0 -0
  61. package/src/components/Dropdown/DropdownDivider.vue +0 -0
  62. package/src/components/Dropdown/DropdownList.stories.js +0 -0
  63. package/src/components/Dropdown/DropdownList.vue +0 -0
  64. package/src/components/Dropdown/constants.js +0 -0
  65. package/src/components/Dropdown/readme.mdx +0 -0
  66. package/src/components/Form/CharactersCount.vue +0 -0
  67. package/src/components/Form/Checkbox/Checkbox.scss +0 -0
  68. package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
  69. package/src/components/Form/Checkbox/readme.mdx +0 -0
  70. package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +0 -0
  71. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +11 -0
  72. package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
  73. package/src/components/Form/DatePicker/DatePicker.scss +0 -0
  74. package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
  75. package/src/components/Form/DatePicker/DatePicker.vue +0 -0
  76. package/src/components/Form/DatePicker/Icons/chevron-back.js +0 -0
  77. package/src/components/Form/DatePicker/Icons/chevron-forward.js +0 -0
  78. package/src/components/Form/DatePicker/readme.mdx +0 -0
  79. package/src/components/Form/FormGroup/FormGroup.stories.js +0 -0
  80. package/src/components/Form/FormGroup/FormGroup.vue +0 -0
  81. package/src/components/Form/FormGroup/FormGroupSet.stories.js +0 -0
  82. package/src/components/Form/FormGroup/FormGroupSet.vue +0 -0
  83. package/src/components/Form/Input/Input.stories.js +0 -0
  84. package/src/components/Form/Input/Input.vue +0 -0
  85. package/src/components/Form/Input/constants.js +0 -0
  86. package/src/components/Form/Input/input.scss +0 -0
  87. package/src/components/Form/Input/readme.mdx +0 -0
  88. package/src/components/Form/Label/Label.stories.js +0 -0
  89. package/src/components/Form/Label/readme.mdx +0 -0
  90. package/src/components/Form/PhoneInput/PhoneInput.stories.js +0 -0
  91. package/src/components/Form/PhoneInput/PhoneInput.vue +0 -0
  92. package/src/components/Form/PhoneInput/phoneInput.scss +0 -0
  93. package/src/components/Form/PhoneInput/readme.mdx +0 -0
  94. package/src/components/Form/Radio/Radio.stories.js +0 -0
  95. package/src/components/Form/Radio/Radio.vue +21 -34
  96. package/src/components/Form/Radio/radio.scss +5 -2
  97. package/src/components/Form/Radio/readme.mdx +0 -0
  98. package/src/components/Form/TextEditor/TextEditor.stories.js +0 -0
  99. package/src/components/Form/TextEditor/TextEditor.vue +0 -0
  100. package/src/components/Form/TextEditor/icons/svg/chevron-down.svg +0 -0
  101. package/src/components/Form/TextEditor/icons/toolbarIcons.js +0 -0
  102. package/src/components/Form/TextEditor/plugins/alphabetList.js +0 -0
  103. package/src/components/Form/TextEditor/readme.mdx +0 -0
  104. package/src/components/Form/TextEditor/textEditor.scss +0 -0
  105. package/src/components/Form/Textarea/Textarea.spec.js +0 -0
  106. package/src/components/Form/Textarea/Textarea.stories.js +0 -0
  107. package/src/components/Form/Textarea/Textarea.vue +0 -0
  108. package/src/components/Form/Textarea/readme.mdx +0 -0
  109. package/src/components/Form/Textarea/textarea.scss +0 -0
  110. package/src/components/Form/Toggle/Toggle.stories.js +0 -0
  111. package/src/components/Form/Toggle/Toggle.vue +0 -0
  112. package/src/components/Form/Toggle/readme.mdx +0 -0
  113. package/src/components/Form/Toggle/toggle.scss +0 -0
  114. package/src/components/Icon.vue +0 -0
  115. package/src/components/IconButton/IconButton.scss +0 -0
  116. package/src/components/IconButton/IconButton.stories.js +0 -0
  117. package/src/components/IconButton/constants.js +0 -0
  118. package/src/components/IconButton/readme.mdx +0 -0
  119. package/src/components/List.vue +0 -0
  120. package/src/components/Modal/Modal.stories.js +0 -0
  121. package/src/components/Modal/Modal.vue +0 -0
  122. package/src/components/Modal/constants.js +0 -0
  123. package/src/components/Modal/readme.mdx +0 -0
  124. package/src/components/Pagination/LimitSelector.vue +0 -0
  125. package/src/components/Pagination/Pagination.stories.js +0 -0
  126. package/src/components/Pagination/Pagination.vue +0 -0
  127. package/src/components/Pagination/pagination.scss +0 -0
  128. package/src/components/Panel/Panel.stories.js +0 -0
  129. package/src/components/Panel/Panel.vue +0 -0
  130. package/src/components/Popover/Popover.stories.js +0 -0
  131. package/src/components/Popover/constants.js +0 -0
  132. package/src/components/Popover/readme.mdx +0 -0
  133. package/src/components/ProgressBar/ProgressBar.stories.js +0 -0
  134. package/src/components/ProgressBar/ProgressBar.vue +0 -0
  135. package/src/components/ProgressBar/constants.js +0 -0
  136. package/src/components/ProgressBar/progressBar.scss +0 -0
  137. package/src/components/ProgressBar/readme.mdx +0 -0
  138. package/src/components/Sorting/Sorting.stories.js +0 -0
  139. package/src/components/Sorting/Sorting.vue +0 -0
  140. package/src/components/Sorting/constants.js +0 -0
  141. package/src/components/Sorting/sorting.scss +0 -0
  142. package/src/components/SplitButton/SplitButton.stories.js +0 -0
  143. package/src/components/SplitButton/SplitButton.vue +0 -0
  144. package/src/components/SplitButton/SplitButtonItem.vue +0 -0
  145. package/src/components/SplitButton/constants.js +0 -0
  146. package/src/components/SplitButton/readme.mdx +0 -0
  147. package/src/components/SplitButton/splitButton.scss +0 -0
  148. package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
  149. package/src/components/StatusIndicator/StatusIndicator.vue +0 -0
  150. package/src/components/StatusIndicator/constants.js +0 -0
  151. package/src/components/StatusIndicator/icons.js +0 -0
  152. package/src/components/StatusIndicator/readme.mdx +0 -0
  153. package/src/components/Table/Cells/Cell.vue +0 -0
  154. package/src/components/Table/Cells/CheckboxCell.vue +0 -0
  155. package/src/components/Table/Row.vue +0 -0
  156. package/src/components/Table/Table.stories.js +0 -0
  157. package/src/components/Table/Table.vue +0 -0
  158. package/src/components/Tabs/Tab.vue +0 -0
  159. package/src/components/Tabs/TabDropdown.vue +0 -0
  160. package/src/components/Tabs/Tabs.stories.js +0 -0
  161. package/src/components/Tabs/Tabs.vue +0 -0
  162. package/src/components/Tabs/tabs.scss +0 -0
  163. package/src/components/TagPill/TagPill.stories.js +0 -0
  164. package/src/components/TagPill/TagPill.vue +0 -0
  165. package/src/components/TagPill/constants.js +0 -0
  166. package/src/components/TagPill/readme.mdx +0 -0
  167. package/src/components/ToggleTip/ToggleTip.stories.js +0 -0
  168. package/src/components/ToggleTip/ToggleTip.vue +0 -0
  169. package/src/components/ToggleTip/constants.js +0 -0
  170. package/src/components/ToggleTip/readme.mdx +0 -0
  171. package/src/components/ToggleTip/toggleTip.scss +0 -0
  172. package/src/components/Tooltip/Tooltip.stories.js +0 -0
  173. package/src/components/Tooltip/Tooltip.vue +1 -1
  174. package/src/components/Tooltip/readme.mdx +0 -0
  175. package/src/components/TreeSelect/Option.vue +0 -0
  176. package/src/components/TreeSelect/Select.stories.js +0 -0
  177. package/src/components/TreeSelect/Select.vue +0 -0
  178. package/src/components/TreeSelect/TreeSelect.stories.js +0 -0
  179. package/src/components/TreeSelect/scss/option.scss +0 -0
  180. package/src/components/TreeSelect/scss/select.scss +0 -0
  181. package/src/constants/events.js +0 -0
  182. package/src/constants/keyCodes.js +0 -0
  183. package/src/directives/outside/outside.js +0 -0
  184. package/src/directives/outside/outside.stories.js +0 -0
  185. package/src/directives/outside/readme.mdx +0 -0
  186. package/src/directives/tooltip/readme.mdx +0 -0
  187. package/src/directives/tooltip/textOverflowTooltip.js +0 -0
  188. package/src/directives/tooltip/tooltip.js +0 -0
  189. package/src/directives/tooltip/tooltip.stories.js +0 -0
  190. package/src/helpers/generateUID.js +0 -0
  191. package/src/helpers/getHrefFromID.js +0 -0
  192. package/src/helpers/multiLineOverflows.js +0 -0
  193. package/src/helpers/removeEvents.js +0 -0
  194. package/src/main.js +0 -0
  195. package/src/mixins/expandAnimation.js +0 -0
  196. package/src/scripts/parseScssVariables.js +0 -0
  197. package/src/stories/link.readme.mdx +0 -0
  198. package/src/stories/link.stories.js +0 -0
  199. package/src/stories/variables/colors.stories.js +0 -0
  200. package/src/stories/variables/shadows.stories.js +0 -0
  201. package/static/Logo.svg +0 -0
  202. package/static/docks/button.pdf +0 -0
  203. package/static/favicon.ico +0 -0
  204. package/vite.config.js +0 -0
package/index.html CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.340",
3
+ "version": "0.0.342",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -21,7 +21,6 @@
21
21
  "build-storybook": "storybook build"
22
22
  },
23
23
  "dependencies": {
24
- "@floating-ui/dom": "^1.5.4",
25
24
  "@vueup/vue-quill": "^1.2.0",
26
25
  "mitt": "^3.0.0",
27
26
  "vue": "^3.2.45"
package/src/App.vue CHANGED
@@ -5,10 +5,45 @@
5
5
  </template>
6
6
  </ib-select>
7
7
 
8
+
9
+ <ib-checkbox-group
10
+ label-text="label"
11
+ info-text="info"
12
+ required
13
+ >
14
+ <ib-radio
15
+ :value="'1'"
16
+ name="connection_id"
17
+ dusk="active-radio-button"
18
+ label="text 1"
19
+ id="1"
20
+ v-model="checked"
21
+ />
22
+ <ib-radio
23
+ :value="'2'"
24
+ name="connection_id"
25
+ dusk="active-radio-button"
26
+ label="text 2"
27
+ id="2"
28
+ v-model="checked"
29
+ />
30
+ <ib-radio
31
+ :value="'3'"
32
+ name="connection_id"
33
+ dusk="active-radio-button"
34
+ label="text 3"
35
+ id="3"
36
+ v-model="checked"
37
+ />
38
+ </ib-checkbox-group>
39
+
8
40
  </template>
9
41
 
10
42
  <script>
11
43
  import IbSelect from "./components/TreeSelect/Select.vue";
44
+ import label from "@/components/Form/Label/Label.vue";
45
+ import {IbCheckboxGroup} from "./index.js";
46
+ import {IbRadio} from "./index.js";
12
47
  const testData1 = [
13
48
  {
14
49
  id: "1",
@@ -125,11 +160,17 @@ const testData1 = [
125
160
  },
126
161
  ];
127
162
  export default {
163
+ computed: {
164
+ label() {
165
+ return label
166
+ }
167
+ },
128
168
  data() {
129
169
  return {
130
170
  opt: testData1,
171
+ checked: '1'
131
172
  }
132
173
  },
133
- components: {IbSelect}
174
+ components: {IbSelect, IbCheckboxGroup, IbRadio}
134
175
  }
135
176
  </script>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,6 +7,7 @@
7
7
  v-if="labelText.length"
8
8
  class="ib-checkbox-group-label"
9
9
  :required="required"
10
+ :info-text="infoText"
10
11
  >
11
12
  {{ labelText }}
12
13
  </ib-label>
@@ -44,6 +45,14 @@ export default {
44
45
  type: String,
45
46
  default: "",
46
47
  },
48
+ infoText: {
49
+ type: String,
50
+ default: ""
51
+ },
52
+ height: {
53
+ type: String,
54
+ default: '290px'
55
+ }
47
56
  },
48
57
  components: {
49
58
  IbLabel,
@@ -62,6 +71,8 @@ export default {
62
71
  .ib-checkbox-group-content {
63
72
  display: flex;
64
73
  flex-direction: column;
74
+ flex-wrap: wrap;
75
+ max-height: v-bind(height);
65
76
  .ib-radio:not(:last-child),
66
77
  .ib-checkbox:not(:last-child) {
67
78
  margin-bottom: 10px;
@@ -17,6 +17,8 @@ The IbCheckboxGroup component is a wrapper component that helps to group and dis
17
17
  | required | Boolean | false | If true, a required indicator will be displayed next to the label |
18
18
  | horizontal | Boolean | false | If true, the checkboxes or radio buttons will be displayed horizontally |
19
19
  | errorMessage | String | '' | Responsible for displaying an error |
20
+ | infoText | String | '' | The text that will be displayed inside the tooltip when the information button is hover or have focus. |
21
+ | maxHeight | String | '290px' | Max height of container with radio elements. |
20
22
 
21
23
  ### Slots
22
24
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,19 +3,17 @@
3
3
  role="radio"
4
4
  :class="classes"
5
5
  :for="id"
6
- :aria-checked="checked"
7
- @click.prevent="onClick"
6
+ :aria-checked="isChecked"
8
7
  >
9
8
  <input
10
9
  type="radio"
11
10
  :name="name"
12
11
  :id="id"
13
12
  :value="value"
14
- :checked="checked"
13
+ :checked="isChecked"
15
14
  :disabled="disabled"
16
15
  ref="radio"
17
- @input.stop
18
- @change="onChange"
16
+ @change="checkHandler"
19
17
  />
20
18
  <span class="ib-radio-body" :class="{ 'without-text': !label?.length }">
21
19
  <span class="ib-radio-input"></span>
@@ -29,11 +27,8 @@ import generateUID from "../../../helpers/generateUID";
29
27
 
30
28
  export default {
31
29
  name: "IbRadio",
32
- model: {
33
- prop: "isChecked",
34
- event: "input",
35
- },
36
30
  props: {
31
+ modelValue: '',
37
32
  label: String,
38
33
  error: {
39
34
  type: Boolean,
@@ -52,50 +47,39 @@ export default {
52
47
  type: String,
53
48
  required: true,
54
49
  },
55
- isChecked: {
56
- type: Boolean,
57
- default: false,
58
- },
59
50
  disabled: {
60
51
  type: Boolean,
61
52
  default: false,
62
53
  },
63
54
  },
64
- watch: {
65
- isChecked(value) {
66
- this.checked = value;
67
- },
55
+ emits: ['update:modelValue'],
56
+ data() {
57
+ return {
58
+ checked: false,
59
+ uid: generateUID(),
60
+ };
68
61
  },
69
62
  mounted() {
63
+ this.checked = this.isChecked;
70
64
  this.$globalEvents.$on(`radio:update:${this.name}`, (uid) => {
71
65
  if (this.uid !== uid) {
72
66
  this.checked = false;
73
67
  }
74
68
  });
75
69
  },
76
- data() {
77
- return {
78
- checked: this.isChecked,
79
- uid: generateUID(),
80
- };
70
+ watch: {
71
+ isChecked(val) {
72
+ this.checked = val;
73
+ },
81
74
  },
82
75
  methods: {
83
- onClick() {
76
+ checkHandler($event) {
77
+ this.$emit('update:modelValue', $event.target.value)
84
78
  if (!this.disabled) {
85
79
  this.checked = !this.checked;
86
80
  this.$globalEvents.$emit(`radio:update:${this.name}`, this.uid);
87
- this.$emit("input", this.checked);
88
- this.$emit("change", this.checked);
89
81
  }
90
- },
91
- onChange() {
92
- if (!this.disabled) {
93
- this.checked = !this.checked;
94
- this.$globalEvents.$emit(`radio:update:${this.name}`, this.uid);
95
- this.$emit("change", this.checked);
96
- this.$emit("input", this.checked);
97
- }
98
- },
82
+ }
99
83
  },
100
84
  computed: {
101
85
  classes() {
@@ -106,6 +90,9 @@ export default {
106
90
  "radio-disabled": this.disabled,
107
91
  };
108
92
  },
93
+ isChecked() {
94
+ return this.modelValue === this.value
95
+ }
109
96
  },
110
97
  };
111
98
  </script>
@@ -30,12 +30,15 @@ $radio-border-filled-disabled: $neutral-500;
30
30
  .ib-radio {
31
31
  display: inline-flex;
32
32
  cursor: pointer;
33
+ position: relative;
33
34
 
34
35
  input {
35
36
  opacity: 0;
36
37
  position: absolute;
37
- top: -100%;
38
- right: -100%;
38
+ width: 1px;
39
+ height: 1px;
40
+ z-index: -1;
41
+
39
42
 
40
43
  &:focus + .ib-radio-body {
41
44
  border-radius: 4px;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes