@avakhula/ui 0.0.83 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +635 -626
- package/dist/index.umd.cjs +43 -43
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.stories.js +23 -0
- package/src/components/Avatar/Avatar.vue +11 -3
- package/src/components/Avatar/constants.js +4 -0
- package/src/components/Modal/Modal.vue +1 -1
- package/src/components/StatusIndicator/icons.js +11 -11
- package/src/components/TreeSelect/Select.stories.js +1 -79
- package/src/directives/tooltip/readme.mdx +17 -0
- package/src/directives/tooltip/tooltip.stories.js +30 -0
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Avatar from "./Avatar.vue";
|
|
2
|
+
import { avatarSizes } from "./constants";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Avatar",
|
|
6
|
+
component: Avatar,
|
|
7
|
+
argTypes: {
|
|
8
|
+
size: {
|
|
9
|
+
control: { type: "select" },
|
|
10
|
+
options: Object.values(avatarSizes),
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Template = (args) => ({
|
|
16
|
+
components: { Avatar },
|
|
17
|
+
setup() {
|
|
18
|
+
return { args };
|
|
19
|
+
},
|
|
20
|
+
template: `<avatar v-bind="args"></avatar>`,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const Default = Template.bind({});
|
|
@@ -21,18 +21,26 @@
|
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
23
|
import IbIcon from "../Icon.vue";
|
|
24
|
+
import { avatarSizes } from "./constants";
|
|
25
|
+
|
|
24
26
|
export default {
|
|
25
27
|
name: "IbAvatar",
|
|
26
28
|
props: {
|
|
27
|
-
name:
|
|
28
|
-
|
|
29
|
+
name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "",
|
|
32
|
+
},
|
|
33
|
+
src: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "",
|
|
36
|
+
},
|
|
29
37
|
userAvatar: {
|
|
30
38
|
type: Boolean,
|
|
31
39
|
default: false,
|
|
32
40
|
},
|
|
33
41
|
size: {
|
|
34
42
|
type: String,
|
|
35
|
-
default:
|
|
43
|
+
default: avatarSizes.M,
|
|
36
44
|
},
|
|
37
45
|
},
|
|
38
46
|
computed: {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export const icons = {
|
|
2
|
-
new: `<svg width="
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
new: `<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<circle id="Ellipse" cx="5.5" cy="5.5" r="5" fill="#0369E8"/>
|
|
4
|
+
</svg>
|
|
5
5
|
`,
|
|
6
6
|
|
|
7
7
|
success: `
|
|
8
|
-
<svg width="
|
|
9
|
-
<circle cx="
|
|
10
|
-
</svg>
|
|
8
|
+
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
|
+
<circle id="Ellipse" cx="5.5" cy="5.5" r="5" fill="#0D7F39"/>
|
|
10
|
+
</svg>
|
|
11
11
|
`,
|
|
12
12
|
|
|
13
13
|
error: `
|
|
14
|
-
<svg width="
|
|
15
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="
|
|
14
|
+
<svg width="10" height="11" viewBox="0 0 10 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
15
|
+
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M9.1336 8.31393C9.68034 7.51234 10 6.5435 10 5.5C10 2.73858 7.76142 0.5 5 0.5C3.9565 0.5 2.98766 0.819661 2.18607 1.3664L9.1336 8.31393ZM0.866401 2.68607C0.319661 3.48766 0 4.4565 0 5.5C0 8.26142 2.23858 10.5 5 10.5C6.0435 10.5 7.01234 10.1803 7.81393 9.6336L0.866401 2.68607Z" fill="#C8182E"/>
|
|
16
16
|
</svg>
|
|
17
17
|
`,
|
|
18
18
|
|
|
19
19
|
warning: `
|
|
20
|
-
<svg width="
|
|
21
|
-
<path d="
|
|
22
|
-
</svg>
|
|
20
|
+
<svg width="12" height="11" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
21
|
+
<path d="M6 0.5L12 10.5H0L6 0.5Z" fill="#F1BC19"/>
|
|
22
|
+
</svg>
|
|
23
23
|
`,
|
|
24
24
|
|
|
25
25
|
incomplete: `
|
|
@@ -4,90 +4,12 @@ import IbIcon from "../Icon.vue";
|
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: "Form/Select",
|
|
7
|
-
|
|
7
|
+
component: IbSelect,
|
|
8
8
|
argTypes: {
|
|
9
9
|
onResize: { action: "resize" },
|
|
10
10
|
onSearch: { action: "search" },
|
|
11
11
|
onSubmit: { action: "submit" },
|
|
12
12
|
onInput: { action: "input" },
|
|
13
|
-
placeholder: {
|
|
14
|
-
control: { type: "text" },
|
|
15
|
-
},
|
|
16
|
-
searchPlaceholderText: {
|
|
17
|
-
control: { type: "text" },
|
|
18
|
-
},
|
|
19
|
-
clearButtonMessage: {
|
|
20
|
-
control: { type: "text" },
|
|
21
|
-
},
|
|
22
|
-
showClearButton: {
|
|
23
|
-
control: { type: "boolean" },
|
|
24
|
-
},
|
|
25
|
-
isResizable: {
|
|
26
|
-
control: { type: "boolean" },
|
|
27
|
-
},
|
|
28
|
-
name: {
|
|
29
|
-
control: { type: "text" },
|
|
30
|
-
},
|
|
31
|
-
maxSelectedNames: {
|
|
32
|
-
control: { type: "number" },
|
|
33
|
-
},
|
|
34
|
-
isMultiple: {
|
|
35
|
-
control: { type: "boolean" },
|
|
36
|
-
},
|
|
37
|
-
parentAutoCheck: {
|
|
38
|
-
control: { type: "boolean" },
|
|
39
|
-
},
|
|
40
|
-
strings: {
|
|
41
|
-
control: { type: "object" },
|
|
42
|
-
},
|
|
43
|
-
onlyEndNodes: {
|
|
44
|
-
control: { type: "boolean" },
|
|
45
|
-
},
|
|
46
|
-
isRequired: {
|
|
47
|
-
control: { type: "boolean" },
|
|
48
|
-
},
|
|
49
|
-
htmlOptionTitle: {
|
|
50
|
-
control: { type: "boolean" },
|
|
51
|
-
},
|
|
52
|
-
showInputs: {
|
|
53
|
-
control: { type: "boolean" },
|
|
54
|
-
},
|
|
55
|
-
dependency: {
|
|
56
|
-
control: { type: "text" },
|
|
57
|
-
},
|
|
58
|
-
filterId: {
|
|
59
|
-
control: { type: "text" },
|
|
60
|
-
},
|
|
61
|
-
staticPlaceholder: {
|
|
62
|
-
control: { type: "boolean" },
|
|
63
|
-
},
|
|
64
|
-
useSearch: {
|
|
65
|
-
control: { type: "boolean" },
|
|
66
|
-
},
|
|
67
|
-
isWatching: {
|
|
68
|
-
control: { type: "boolean" },
|
|
69
|
-
},
|
|
70
|
-
vertical: {
|
|
71
|
-
control: { type: "text" },
|
|
72
|
-
},
|
|
73
|
-
emptyMessage: {
|
|
74
|
-
control: { type: "text" },
|
|
75
|
-
},
|
|
76
|
-
errorMessage: {
|
|
77
|
-
control: { type: "text" },
|
|
78
|
-
},
|
|
79
|
-
allOptions: {
|
|
80
|
-
control: { type: "boolean" },
|
|
81
|
-
},
|
|
82
|
-
watchClearValue: {
|
|
83
|
-
control: { type: "boolean" },
|
|
84
|
-
},
|
|
85
|
-
isToggle: {
|
|
86
|
-
control: { type: "boolean" },
|
|
87
|
-
},
|
|
88
|
-
alphabetSort: {
|
|
89
|
-
control: { type: "boolean" },
|
|
90
|
-
},
|
|
91
13
|
},
|
|
92
14
|
};
|
|
93
15
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# TooltipDirectives
|
|
2
|
+
Use the v-tooltip directive on any element or component where you would like a tooltip to appear.
|
|
3
|
+
|
|
4
|
+
## Usage
|
|
5
|
+
```html
|
|
6
|
+
<script>
|
|
7
|
+
import { TooltipDirective as Tooltip } from "ib/ui";// change when we deployed on npm
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
directives: { Tooltip },
|
|
11
|
+
};
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div v-tooltip="'Tooltip Content'">Hover to me</div>
|
|
16
|
+
</template>
|
|
17
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import IbButton from "../../components/Button/Button.vue";
|
|
2
|
+
import { TooltipDirective } from "./tooltip";
|
|
3
|
+
import readme from "./readme.mdx";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "directives/tooltip",
|
|
7
|
+
component: TooltipDirective,
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
page: readme,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Template = (args) => ({
|
|
16
|
+
components: { IbButton },
|
|
17
|
+
directives: { tooltip: TooltipDirective },
|
|
18
|
+
setup() {
|
|
19
|
+
return { args };
|
|
20
|
+
},
|
|
21
|
+
template: `<ib-button v-tooltip="'Tooltip Content'" v-bind="args">Hover to me</ib-button>`,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.decorators = [
|
|
26
|
+
() => ({
|
|
27
|
+
template:
|
|
28
|
+
'<div style="display: flex; align-items:center; justify-content: center; width: 400px; height: 400px; margin: 0 auto"><story /></div>',
|
|
29
|
+
}),
|
|
30
|
+
];
|