@avakhula/ui 0.0.10

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 (194) hide show
  1. package/.babelrc.json +14 -0
  2. package/.eslintrc.cjs +15 -0
  3. package/.nvmrc +1 -0
  4. package/.prettierrc.json +1 -0
  5. package/.storybook/intelliboardTheme.js +10 -0
  6. package/.storybook/main.js +25 -0
  7. package/.storybook/manager.js +7 -0
  8. package/.storybook/preview-head.html +11 -0
  9. package/.storybook/preview.js +24 -0
  10. package/.storybook/scss-loader.scss +6 -0
  11. package/.storybook/withSource.js +97 -0
  12. package/README.md +35 -0
  13. package/dist/favicon.ico +0 -0
  14. package/dist/index.mjs +19366 -0
  15. package/dist/index.umd.js +209 -0
  16. package/dist/style.css +1 -0
  17. package/index.html +21 -0
  18. package/package.json +63 -0
  19. package/public/favicon.ico +0 -0
  20. package/src/App.vue +37 -0
  21. package/src/EventEmmiter.js +19 -0
  22. package/src/assets/scss/mixins/dropdown-list-item.scss +45 -0
  23. package/src/assets/scss/mixins/tooltip-position.scss +147 -0
  24. package/src/assets/scss/mixins.scss +21 -0
  25. package/src/assets/scss/reset.scss +12 -0
  26. package/src/assets/scss/style.scss +73 -0
  27. package/src/assets/scss/typography.scss +155 -0
  28. package/src/assets/scss/variables/colors.scss +115 -0
  29. package/src/assets/scss/variables/shadows.scss +17 -0
  30. package/src/components/Accordion/Accordion.scss +94 -0
  31. package/src/components/Accordion/Accordion.stories.js +41 -0
  32. package/src/components/Accordion/Accordion.vue +104 -0
  33. package/src/components/Accordion/readme.mdx +38 -0
  34. package/src/components/Alert/Alert.stories.js +69 -0
  35. package/src/components/Alert/Alert.vue +131 -0
  36. package/src/components/Alert/alert.scss +166 -0
  37. package/src/components/Alert/constants.js +6 -0
  38. package/src/components/Alert/readme.mdx +63 -0
  39. package/src/components/Badge/Badge.stories.js +53 -0
  40. package/src/components/Badge/Badge.vue +58 -0
  41. package/src/components/Badge/readme.mdx +38 -0
  42. package/src/components/Breadcrumbs/Breadcrumbs.vue +98 -0
  43. package/src/components/Breadcrumbs/breadcrumbs.scss +77 -0
  44. package/src/components/Breadcrumbs/breadcrumbs.stories.js +37 -0
  45. package/src/components/Button/Button.stories.js +124 -0
  46. package/src/components/Button/Button.vue +165 -0
  47. package/src/components/Button/button.scss +217 -0
  48. package/src/components/Button/constants.js +8 -0
  49. package/src/components/Button/readme.mdx +118 -0
  50. package/src/components/ButtonGroup/ButtonGroup.stories.js +27 -0
  51. package/src/components/ButtonGroup/ButtonGroup.vue +24 -0
  52. package/src/components/ButtonGroup/readme.mdx +10 -0
  53. package/src/components/Dropdown/Dropdown.spec.js +90 -0
  54. package/src/components/Dropdown/Dropdown.stories.js +48 -0
  55. package/src/components/Dropdown/Dropdown.vue +313 -0
  56. package/src/components/Dropdown/DropdownDivider.vue +15 -0
  57. package/src/components/Dropdown/DropdownItem.vue +59 -0
  58. package/src/components/Dropdown/DropdownList.stories.js +174 -0
  59. package/src/components/Dropdown/DropdownList.vue +93 -0
  60. package/src/components/Dropdown/constants.js +10 -0
  61. package/src/components/Dropdown/readme.mdx +88 -0
  62. package/src/components/Form/CharactersCount.vue +55 -0
  63. package/src/components/Form/Checkbox/Checkbox.scss +226 -0
  64. package/src/components/Form/Checkbox/Checkbox.stories.js +63 -0
  65. package/src/components/Form/Checkbox/Checkbox.vue +128 -0
  66. package/src/components/Form/Checkbox/readme.mdx +69 -0
  67. package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +64 -0
  68. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +87 -0
  69. package/src/components/Form/CheckboxGroup/readme.mdx +56 -0
  70. package/src/components/Form/DatePicker/DatePicker.scss +479 -0
  71. package/src/components/Form/DatePicker/DatePicker.stories.js +78 -0
  72. package/src/components/Form/DatePicker/DatePicker.vue +284 -0
  73. package/src/components/Form/DatePicker/Icons/chevron-back.js +5 -0
  74. package/src/components/Form/DatePicker/Icons/chevron-forward.js +5 -0
  75. package/src/components/Form/DatePicker/readme.mdx +115 -0
  76. package/src/components/Form/FormGroup/FormGroup.stories.js +48 -0
  77. package/src/components/Form/FormGroup/FormGroup.vue +61 -0
  78. package/src/components/Form/FormGroup/FormGroupSet.stories.js +32 -0
  79. package/src/components/Form/FormGroup/FormGroupSet.vue +75 -0
  80. package/src/components/Form/Input/Input.stories.js +137 -0
  81. package/src/components/Form/Input/Input.vue +231 -0
  82. package/src/components/Form/Input/constants.js +5 -0
  83. package/src/components/Form/Input/input.scss +133 -0
  84. package/src/components/Form/Input/readme.mdx +68 -0
  85. package/src/components/Form/Label/Label.stories.js +29 -0
  86. package/src/components/Form/Label/Label.vue +87 -0
  87. package/src/components/Form/Label/readme.mdx +25 -0
  88. package/src/components/Form/PhoneInput/PhoneInput.stories.js +43 -0
  89. package/src/components/Form/PhoneInput/PhoneInput.vue +105 -0
  90. package/src/components/Form/PhoneInput/phoneInput.scss +197 -0
  91. package/src/components/Form/PhoneInput/readme.mdx +37 -0
  92. package/src/components/Form/Radio/Radio.stories.js +34 -0
  93. package/src/components/Form/Radio/Radio.vue +109 -0
  94. package/src/components/Form/Radio/radio.scss +187 -0
  95. package/src/components/Form/Radio/readme.mdx +48 -0
  96. package/src/components/Form/TextEditor/TextEditor.stories.js +58 -0
  97. package/src/components/Form/TextEditor/TextEditor.vue +305 -0
  98. package/src/components/Form/TextEditor/icons/svg/chevron-down.svg +3 -0
  99. package/src/components/Form/TextEditor/icons/toolbarIcons.js +111 -0
  100. package/src/components/Form/TextEditor/plugins/alphabetList.js +43 -0
  101. package/src/components/Form/TextEditor/readme.mdx +59 -0
  102. package/src/components/Form/TextEditor/textEditor.scss +684 -0
  103. package/src/components/Form/Textarea/Textarea.spec.js +107 -0
  104. package/src/components/Form/Textarea/Textarea.stories.js +68 -0
  105. package/src/components/Form/Textarea/Textarea.vue +102 -0
  106. package/src/components/Form/Textarea/readme.mdx +45 -0
  107. package/src/components/Form/Textarea/textarea.scss +84 -0
  108. package/src/components/Form/Toggle/Toggle.stories.js +44 -0
  109. package/src/components/Form/Toggle/Toggle.vue +122 -0
  110. package/src/components/Form/Toggle/readme.mdx +39 -0
  111. package/src/components/Form/Toggle/toggle.scss +166 -0
  112. package/src/components/Icon.vue +41 -0
  113. package/src/components/IconButton/IconButton.scss +91 -0
  114. package/src/components/IconButton/IconButton.stories.js +115 -0
  115. package/src/components/IconButton/IconButton.vue +100 -0
  116. package/src/components/IconButton/constants.js +14 -0
  117. package/src/components/IconButton/readme.mdx +66 -0
  118. package/src/components/List.vue +150 -0
  119. package/src/components/Modal/Modal.stories.js +48 -0
  120. package/src/components/Modal/Modal.vue +231 -0
  121. package/src/components/Modal/readme.mdx +76 -0
  122. package/src/components/Pagination/LimitSelector.vue +73 -0
  123. package/src/components/Pagination/Pagination.stories.js +54 -0
  124. package/src/components/Pagination/Pagination.vue +227 -0
  125. package/src/components/Pagination/pagination.scss +189 -0
  126. package/src/components/Popover/Popover.stories.js +46 -0
  127. package/src/components/Popover/Popover.vue +81 -0
  128. package/src/components/Popover/constants.js +14 -0
  129. package/src/components/Popover/popover.scss +26 -0
  130. package/src/components/Popover/readme.mdx +42 -0
  131. package/src/components/ProgressBar/ProgressBar.stories.js +90 -0
  132. package/src/components/ProgressBar/ProgressBar.vue +58 -0
  133. package/src/components/ProgressBar/constants.js +6 -0
  134. package/src/components/ProgressBar/progressBar.scss +116 -0
  135. package/src/components/ProgressBar/readme.mdx +67 -0
  136. package/src/components/Sorting/Sorting.stories.js +35 -0
  137. package/src/components/Sorting/Sorting.vue +128 -0
  138. package/src/components/Sorting/constants.js +10 -0
  139. package/src/components/Sorting/sorting.scss +87 -0
  140. package/src/components/SplitButton/SplitButton.stories.js +39 -0
  141. package/src/components/SplitButton/SplitButton.vue +132 -0
  142. package/src/components/SplitButton/SplitButtonItem.vue +34 -0
  143. package/src/components/SplitButton/constants.js +4 -0
  144. package/src/components/SplitButton/readme.mdx +77 -0
  145. package/src/components/SplitButton/splitButton.scss +161 -0
  146. package/src/components/StatusIndicator/StatusIndicator.stories.js +40 -0
  147. package/src/components/StatusIndicator/StatusIndicator.vue +52 -0
  148. package/src/components/StatusIndicator/constants.js +10 -0
  149. package/src/components/StatusIndicator/icons.js +48 -0
  150. package/src/components/StatusIndicator/readme.mdx +21 -0
  151. package/src/components/Table/Cells/Cell.vue +71 -0
  152. package/src/components/Table/Cells/CheckboxCell.vue +48 -0
  153. package/src/components/Table/Row.vue +26 -0
  154. package/src/components/Table/Table.stories.js +59 -0
  155. package/src/components/Table/Table.vue +36 -0
  156. package/src/components/Tabs/Tab.vue +37 -0
  157. package/src/components/Tabs/TabDropdown.vue +93 -0
  158. package/src/components/Tabs/Tabs.stories.js +57 -0
  159. package/src/components/Tabs/Tabs.vue +94 -0
  160. package/src/components/Tabs/tabs.scss +157 -0
  161. package/src/components/TagPill/TagPill.stories.js +30 -0
  162. package/src/components/TagPill/TagPill.vue +133 -0
  163. package/src/components/TagPill/constants.js +9 -0
  164. package/src/components/TagPill/readme.mdx +37 -0
  165. package/src/components/ToggleTip/ToggleTip.stories.js +98 -0
  166. package/src/components/ToggleTip/ToggleTip.vue +112 -0
  167. package/src/components/ToggleTip/constants.js +14 -0
  168. package/src/components/ToggleTip/readme.mdx +46 -0
  169. package/src/components/ToggleTip/toggleTip.scss +55 -0
  170. package/src/components/Tooltip/Tooltip.stories.js +56 -0
  171. package/src/components/Tooltip/Tooltip.vue +49 -0
  172. package/src/components/Tooltip/readme.mdx +43 -0
  173. package/src/components/TreeSelect/Option.vue +325 -0
  174. package/src/components/TreeSelect/Select.stories.js +349 -0
  175. package/src/components/TreeSelect/Select.vue +909 -0
  176. package/src/components/TreeSelect/TreeSelect.stories.js +270 -0
  177. package/src/components/TreeSelect/scss/option.scss +204 -0
  178. package/src/components/TreeSelect/scss/select.scss +166 -0
  179. package/src/constants/events.js +2 -0
  180. package/src/constants/keyCodes.js +8 -0
  181. package/src/directives/outside/outside.js +81 -0
  182. package/src/directives/outside/outside.stories.js +29 -0
  183. package/src/directives/outside/readme.mdx +24 -0
  184. package/src/helpers/generateUID.js +3 -0
  185. package/src/helpers/getHrefFromID.js +3 -0
  186. package/src/helpers/multiLineOverflows.js +3 -0
  187. package/src/helpers/removeEvents.js +9 -0
  188. package/src/index.js +49 -0
  189. package/src/main.js +12 -0
  190. package/src/stories/link.readme.mdx +57 -0
  191. package/src/stories/link.stories.js +59 -0
  192. package/static/Logo.svg +25 -0
  193. package/static/docks/button.pdf +147566 -0
  194. package/vite.config.js +47 -0
@@ -0,0 +1,63 @@
1
+ # IbAlert
2
+
3
+ import { Story, Canvas } from "@storybook/addon-docs";
4
+ import * as AlertStories from "./Alert.stories";
5
+
6
+ Notifications are an important method of communicating with users and providing feedback. They range from granular, inline responses to user actions to system-wide messages.
7
+
8
+ Notifications provide limited space for content, and therefore the content must be short and concise. A user should be able to quickly scan the notification, be apprised of the situation, and know what to do next.
9
+
10
+ #### Title
11
+
12
+ - The title type format should use the Title Case.
13
+ - The title should be short and descriptive, explaining the most important piece of information.
14
+ - When possible, communicate the main message using just the title.
15
+ - Use a period only if the title is a full sentence.
16
+ - When using rich text, such as in a title, a screen reader will read aloud the entire message as one sentence. Since the message will be read as one string, make sure that any text styling does not convey meaning.
17
+
18
+ #### Body content
19
+
20
+ - Be concise and avoid repeating or paraphrasing the title.
21
+ - Limit content to one or two short sentences.
22
+ - Explain how to resolve the issue by including any troubleshooting actions or next steps. You can include links within the notification body that redirect the user to next steps by using an actionable notification.
23
+
24
+ #### Action (actionable only)
25
+
26
+ - Only actionable notifications can contain interactive elements such as a
27
+ link or button.
28
+ - Keep labels concise and clearly indicate the action the user can take.
29
+
30
+ Limit action labels to one or two words. For a list of recommended action labels, see Carbon’s content guidelines.
31
+
32
+ ### Props
33
+
34
+ | Name | type | Default Value | Required | Description |
35
+ | --------------- | ------- | ------------- | -------- | --------------------------------------------------------------------------- |
36
+ | type | String | "alert" | No | The type of alert to be displayed. It can be "alert", "success", or "info". |
37
+ | showIcon | Boolean | false | No | Determines whether to display an icon with the alert message. |
38
+ | showCloseButton | Boolean | false | No | Determines whether to display a close button with the alert message. |
39
+ | title | String | "" | No | The title of the alert message. |
40
+
41
+ ### Slots
42
+
43
+ | Slot name | Description |
44
+ | --------- | ------------------------------------------------------------------ |
45
+ | link | The link slot can be used to display a link with the alert message |
46
+ | default | default slot is used to display the text of the alert message. |
47
+
48
+ ### Events
49
+
50
+ | Events name | Description |
51
+ | ----------- | ------------------------------------------------ |
52
+ | Close | Emits when the close button is clicked on alert. |
53
+
54
+ ### Default
55
+ <Canvas of={AlertStories.Default} />
56
+
57
+
58
+ ### All alert types
59
+ <Canvas of={AlertStories.Types} />
60
+
61
+ ### Alert when we have large content and link
62
+ <Canvas of={AlertStories.LargeAlert} />
63
+
@@ -0,0 +1,53 @@
1
+ import ibBadge from "./Badge.vue";
2
+ import IbIconButton from "../IconButton/IconButton.vue";
3
+ import readme from "./readme.mdx";
4
+
5
+ export default {
6
+ title: "Badge",
7
+ component: ibBadge,
8
+ parameters: {
9
+ docs: {
10
+ page: readme,
11
+ },
12
+ },
13
+ };
14
+
15
+ const Template = (args) => ({
16
+ components: { ibBadge, IbIconButton },
17
+ setup() {
18
+ return { args };
19
+ },
20
+ template: `
21
+ <div style="position: relative; width: fit-content;">
22
+ <ib-badge style="position: absolute; top: -2px; right: -2px;" v-bind="args"></ib-badge>
23
+
24
+ <ib-icon-button kind="ghost">
25
+ <ion-icon style="font-size=20px" name="add"></ion-icon>
26
+ </ib-icon-button>
27
+ </div>
28
+ `,
29
+ });
30
+
31
+ const TemplateLarge = (args) => ({
32
+ components: { ibBadge, IbIconButton },
33
+ setup() {
34
+ return { args };
35
+ },
36
+ template: `
37
+ <div style="position: relative; width: fit-content;">
38
+ <ib-badge style="position: absolute; top: -7px; left: 16px;" v-bind="args"></ib-badge>
39
+
40
+ <ib-icon-button kind="ghost">
41
+ <ion-icon style="font-size=20px" name="add"></ion-icon>
42
+ </ib-icon-button>
43
+ </div>
44
+ `,
45
+ });
46
+
47
+ export const Default = Template.bind({});
48
+ Default.args = {};
49
+
50
+ export const Large = TemplateLarge.bind({});
51
+ Large.args = {
52
+ content: 10000,
53
+ };
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <span :class="classes">
3
+ {{ normalizeContent }}
4
+ </span>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: "IbBadge",
10
+ props: {
11
+ content: {
12
+ type: [String, Number],
13
+ default: "",
14
+ },
15
+ },
16
+ computed: {
17
+ classes() {
18
+ const classList = ["ib-badge"];
19
+
20
+ if (this.content.toString().length) {
21
+ classList.push("ib-badge-large");
22
+ }
23
+ return classList;
24
+ },
25
+ normalizeContent() {
26
+ if (typeof this.content === "number" && this.content > 99) {
27
+ return "99+";
28
+ }
29
+
30
+ return this.content;
31
+ },
32
+ },
33
+ };
34
+ </script>
35
+
36
+ <style lang="scss" scoped>
37
+ @import "../../assets/scss/typography.scss";
38
+ @import "../../assets/scss/variables/colors.scss";
39
+
40
+ $badge-bg: $blue-800;
41
+ $badge-color: $white;
42
+
43
+ .ib-badge {
44
+ width: 8px;
45
+ height: 8px;
46
+ background-color: $badge-bg;
47
+ border-radius: 100%;
48
+ color: $badge-color;
49
+
50
+ &-large {
51
+ @include Ib-H6-regular;
52
+ width: auto;
53
+ height: auto;
54
+ border-radius: 6px;
55
+ padding: 0 4px 1px;
56
+ }
57
+ }
58
+ </style>
@@ -0,0 +1,38 @@
1
+ # IbBadge
2
+
3
+ import { Story, Canvas } from "@storybook/addon-docs";
4
+
5
+ The `IbBadge` component is a small component used to display a notification badge with a count or indicator on a parent component.
6
+ ### Usage
7
+ * Use badges with items to convey dynamic information associated with that destination
8
+ * Small badges use only shape to indicate a status change or new notification
9
+ * Large badges display numbers within a container to indicate a quantifiable status change
10
+
11
+ #### There are 2 types of badges:
12
+ 1. **Small badge.** Simple dot, used to indicate an unread notification.
13
+ 2. **Large badge.** contains label text communicating item count information.
14
+
15
+ #### **Large Badge Sizing**
16
+ Label large badges with counts or a status. The maximum number of characters within large badge label text is tree, including a + to indicate more.
17
+
18
+ ### Props
19
+ | Name | type | Default Value | Description |
20
+ | ------- | ---------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
21
+ | Content | String or Number | `""` | The content to display within the badge. If a number greater than 99 is passed, the badge will display "99+" instead. |
22
+
23
+
24
+ ### Slots
25
+ The IbBadge component does not have any slots.
26
+
27
+ ### Events
28
+ The IbBadge component does not emit any events.
29
+
30
+ ### Default
31
+ <Canvas>
32
+ <Story id="badge--default"/>
33
+ </Canvas>
34
+
35
+ ### Large
36
+ <Canvas>
37
+ <Story id="badge--large"/>
38
+ </Canvas>
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <nav aria-label="breadcrumb">
3
+ <ul class="breadcrumb">
4
+ <li
5
+ class="breadcrumb-item"
6
+ :class="index === last ? 'active' : ''"
7
+ aria-current="page"
8
+ v-for="(item, index) in items"
9
+ :key="index"
10
+ >
11
+ <a
12
+ class="ib-link"
13
+ :href="item.url"
14
+ v-if="(index !== last && index > items.length - 4) || index === 0"
15
+ >
16
+ {{ item.title }}
17
+ </a>
18
+
19
+ <p v-if="index === last">
20
+ {{ item.title }}
21
+ </p>
22
+
23
+ <ib-dropdown-list
24
+ horizontal="center"
25
+ v-if="initContextMenu && index === items.length - 4"
26
+ >
27
+ <template #trigger>
28
+ <ib-icon-button kind="ghost">
29
+ <ib-icon name="ellipsis-horizontal-sharp" />
30
+ <ib-tooltip v-if="tooltipTextContext" :text="tooltipTextContext">
31
+ </ib-tooltip>
32
+ </ib-icon-button>
33
+ </template>
34
+
35
+ <template #body>
36
+ <ib-dropdown-item
37
+ v-for="(item, index) in setItemsContextMenu"
38
+ :key="index"
39
+ >
40
+ <a class="context-breadcrums" :href="item.url">
41
+ {{ item.title }}
42
+ </a>
43
+ </ib-dropdown-item>
44
+ </template>
45
+ </ib-dropdown-list>
46
+
47
+ <ib-icon
48
+ v-if="(index !== last && index > items.length - 5) || index === 0"
49
+ name="chevron-forward-outline"
50
+ />
51
+ </li>
52
+ </ul>
53
+ </nav>
54
+ </template>
55
+
56
+ <script>
57
+ import IbIcon from "../Icon.vue";
58
+ import IbIconButton from "../IconButton/IconButton.vue";
59
+ import IbDropdownList from "../Dropdown/DropdownList.vue";
60
+ import IbDropdownItem from "../Dropdown/DropdownItem.vue";
61
+ import IbTooltip from "../Tooltip/Tooltip.vue";
62
+
63
+ export default {
64
+ name: "IbBreadcrumbs",
65
+ props: {
66
+ items: {
67
+ type: Array,
68
+ default: () => [],
69
+ },
70
+ tooltipTextContext: {
71
+ type: String,
72
+ },
73
+ },
74
+ computed: {
75
+ last() {
76
+ return this.items.length ? this.items.length - 1 : null;
77
+ },
78
+ initContextMenu() {
79
+ return this.items.length > 4 ? true : false;
80
+ },
81
+ setItemsContextMenu() {
82
+ let items = this.items.slice(0, -3);
83
+ return items;
84
+ },
85
+ },
86
+ components: {
87
+ IbIcon,
88
+ IbIconButton,
89
+ IbDropdownItem,
90
+ IbDropdownList,
91
+ IbTooltip,
92
+ },
93
+ };
94
+ </script>
95
+
96
+ <style scoped lang="scss">
97
+ @import "./breadcrumbs.scss";
98
+ </style>
@@ -0,0 +1,77 @@
1
+ @import "../../assets/scss/variables/colors.scss";
2
+ @import "../../assets/scss/typography.scss";
3
+ @import "../../assets/scss/mixins.scss";
4
+ @import "../../assets/scss/reset.scss";
5
+
6
+
7
+ .breadcrumb {
8
+ margin: 0;
9
+ padding: 0;
10
+ list-style: none;
11
+ display: flex;
12
+
13
+ .context-breadcrums {
14
+ @include Ib-H4-medium;
15
+ text-decoration: none;
16
+ color: $neutral-900;
17
+
18
+ &:hover {
19
+ text-decoration: none;
20
+ color: $neutral-900;
21
+ }
22
+ }
23
+
24
+ .breadcrumb-item{
25
+ display: flex;
26
+ align-items: center;
27
+ height: 36px;
28
+ display: flex;
29
+ align-items: center;
30
+
31
+
32
+ a {
33
+ text-decoration: none;
34
+ color: $neutral-900;
35
+ height: inherit;
36
+ display: flex;
37
+ align-items: center;
38
+ white-space: nowrap;
39
+ @include Ib-H4-medium;
40
+
41
+ &:hover {
42
+ text-decoration: none;
43
+ color: $blue-700;
44
+ text-decoration: underline $blue-700;
45
+ text-underline-offset: 4px;
46
+ }
47
+
48
+ &:active {
49
+ color: $blue-900;
50
+ text-decoration: underline $blue-900;
51
+ text-underline-offset: 4px;
52
+ }
53
+
54
+ &:focus {
55
+ @include focus(2px);
56
+ border-radius: 4px;
57
+ }
58
+ }
59
+
60
+ &>ion-icon {
61
+ color: $gray-600;
62
+ font-size: 12px;
63
+ padding: 0 5px;
64
+ padding-top: 3px;
65
+ }
66
+
67
+ p {
68
+ color: $gray-600;
69
+ @include Ib-H4-regular;
70
+ @include lineClamp(1);
71
+
72
+ &:hover {
73
+ cursor: not-allowed;
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,37 @@
1
+ import IbBreadcrumbs from "./Breadcrumbs.vue";
2
+ export default {
3
+ title: "Breadcrumbs",
4
+ component: IbBreadcrumbs,
5
+ };
6
+ const Template = (args) => ({
7
+ components: { IbBreadcrumbs },
8
+ setup() {
9
+ return { args };
10
+ },
11
+ template: '<ib-breadcrumbs v-bind="args" />',
12
+ });
13
+ export const Default = Template.bind({});
14
+ Default.args = {
15
+ items: [
16
+ {
17
+ title: "Page 1",
18
+ url: "first URL",
19
+ },
20
+ {
21
+ title: "Page 2",
22
+ url: "second URL",
23
+ },
24
+ {
25
+ title: "Page 3",
26
+ url: "Third URL",
27
+ },
28
+ {
29
+ title: "Page 4",
30
+ url: "Fourth URL",
31
+ },
32
+ {
33
+ title: "Page 5",
34
+ url: "Fifth URL",
35
+ },
36
+ ],
37
+ };
@@ -0,0 +1,124 @@
1
+ import IbButton from "./Button.vue";
2
+ import { buttonKindOptions } from "./constants";
3
+ import readme from "./readme.mdx";
4
+
5
+ export default {
6
+ title: "Button",
7
+ component: IbButton,
8
+ argTypes: {
9
+ onClick: { action: "click" },
10
+ kind: {
11
+ control: { type: "select" },
12
+ options: Object.values(buttonKindOptions),
13
+ },
14
+ },
15
+ parameters: {
16
+ docs: {
17
+ page: readme,
18
+ },
19
+ },
20
+ };
21
+
22
+ const Template = (args) => ({
23
+ components: { IbButton },
24
+ setup() {
25
+ return { args };
26
+ },
27
+ template: '<ib-button v-bind="args">Button</ib-button>',
28
+ });
29
+
30
+ const IconTemplate = (args) => ({
31
+ components: { IbButton },
32
+ setup() {
33
+ return { args };
34
+ },
35
+ template: `
36
+ <ib-button v-bind="args">
37
+ <template #icon>
38
+ <ion-icon name="add"></ion-icon>
39
+ </template>
40
+ Button
41
+ </ib-button>`,
42
+ });
43
+
44
+ const KindsTemplate = (args) => ({
45
+ components: { IbButton },
46
+ setup() {
47
+ return { args };
48
+ },
49
+ template: `
50
+ <ib-button style="margin-right: 5px;" kind="primary">
51
+ Primary
52
+ </ib-button>
53
+
54
+ <ib-button style="margin-right: 5px;" kind="secondary">
55
+ Secondary
56
+ </ib-button>
57
+
58
+ <ib-button style="margin-right: 5px;" kind="tertiary">
59
+ Tertiary
60
+ </ib-button>
61
+
62
+ <ib-button style="margin-right: 5px;" kind="ghost">
63
+ Ghost
64
+ </ib-button>
65
+
66
+ <ib-button style="margin-right: 5px;" kind="danger">
67
+ Danger
68
+ </ib-button>
69
+
70
+ <ib-button style="margin-right: 5px;" kind="ghostDanger">
71
+ Ghost Danger
72
+ </ib-button>
73
+ `,
74
+ });
75
+
76
+ export const Default = Template.bind({});
77
+ Default.args = {};
78
+
79
+ export const Secondary = Template.bind({});
80
+ Secondary.args = {
81
+ kind: "secondary",
82
+ };
83
+
84
+ export const Tertiary = Template.bind({});
85
+ Tertiary.args = {
86
+ kind: "tertiary",
87
+ };
88
+
89
+ export const Ghost = Template.bind({});
90
+ Ghost.args = {
91
+ kind: "ghost",
92
+ };
93
+
94
+ export const Danger = Template.bind({});
95
+ Danger.args = {
96
+ kind: "danger",
97
+ };
98
+
99
+ export const DangerGhost = Template.bind({});
100
+ DangerGhost.args = {
101
+ kind: "ghostDanger",
102
+ };
103
+
104
+ export const Block = Template.bind({});
105
+ Block.args = {
106
+ block: true,
107
+ };
108
+
109
+ export const Disabled = Template.bind({});
110
+ Disabled.args = {
111
+ disabled: true,
112
+ };
113
+
114
+ export const ButtonWithIcon = IconTemplate.bind({});
115
+ ButtonWithIcon.args = {};
116
+
117
+ export const Kinds = KindsTemplate.bind({});
118
+ Kinds.args = {};
119
+ Kinds.decorators = [
120
+ () => ({
121
+ template:
122
+ '<div style="padding:20px; display: flex; flex: wrap: wrap; justify-content: space-between"><story /></div>',
123
+ }),
124
+ ];