@avakhula/ui 0.1.22 → 0.1.23
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/App.js +23 -0
- package/dist/EventEmmiter.js +33 -0
- package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/chunks/floating-ui.dom-D8OVFdyL.js +861 -0
- package/dist/chunks/vue-quill.esm-bundler-FvTqp_xR.js +9070 -0
- package/dist/components/Accordion/Accordion.js +81 -0
- package/dist/components/Alert/Alert.js +121 -0
- package/dist/components/Alert/constants.js +10 -0
- package/dist/components/Avatar/Avatar.js +75 -0
- package/dist/components/Avatar/constants.js +12 -0
- package/dist/components/Badge/Badge.js +29 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +117 -0
- package/dist/components/Button/Button.js +140 -0
- package/dist/components/Button/constants.js +11 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +14 -0
- package/dist/components/Chips/Chips.js +65 -0
- package/dist/components/Dropdown/Dropdown.js +228 -0
- package/dist/components/Dropdown/DropdownDivider.js +10 -0
- package/dist/components/Dropdown/DropdownItem.js +50 -0
- package/dist/components/Dropdown/DropdownList.js +104 -0
- package/dist/components/Dropdown/constants.js +12 -0
- package/dist/components/Form/CharactersCount.js +33 -0
- package/dist/components/Form/Checkbox/Checkbox.js +171 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +81 -0
- package/dist/components/Form/DatePicker/DatePicker.js +1782 -0
- package/dist/components/Form/DatePicker/Icons/chevron-back.js +8 -0
- package/dist/components/Form/DatePicker/Icons/chevron-forward.js +8 -0
- package/dist/components/Form/FormGroup/FormGroup.js +30 -0
- package/dist/components/Form/FormGroup/FormGroupSet.js +44 -0
- package/dist/components/Form/Input/Input.js +375 -0
- package/dist/components/Form/Input/constants.js +9 -0
- package/dist/components/Form/Label/Label.js +87 -0
- package/dist/components/Form/PhoneInput/PhoneInput.js +3811 -0
- package/dist/components/Form/Radio/Radio.js +91 -0
- package/dist/components/Form/TextEditor/TextEditor.js +422 -0
- package/dist/components/Form/TextEditor/Toolbar.js +291 -0
- package/dist/components/Form/TextEditor/icons/toolbarIcons.js +109 -0
- package/dist/components/Form/TextEditor/plugins/alphabetList.js +31 -0
- package/dist/components/Form/TextEditor/plugins/imageBlot.js +16 -0
- package/dist/components/Form/TextEditor/setupTextEditor.js +27 -0
- package/dist/components/Form/Textarea/Textarea.js +121 -0
- package/dist/components/Form/Toggle/Toggle.js +134 -0
- package/dist/components/Icon.js +37 -0
- package/dist/components/IconButton/IconButton.js +93 -0
- package/dist/components/IconButton/constants.js +15 -0
- package/dist/components/List.js +66 -0
- package/dist/components/Modal/Modal.js +198 -0
- package/dist/components/Modal/constants.js +9 -0
- package/dist/components/Pagination/LimitSelector.js +73 -0
- package/dist/components/Pagination/Pagination.js +226 -0
- package/dist/components/Panel/Panel.js +107 -0
- package/dist/components/Popover/Popover.js +105 -0
- package/dist/components/Popover/constants.js +17 -0
- package/dist/components/ProgressBar/ProgressBar.js +63 -0
- package/dist/components/ProgressBar/constants.js +10 -0
- package/dist/components/Sorting/Sorting.js +182 -0
- package/dist/components/Sorting/constants.js +12 -0
- package/dist/components/SplitButton/SplitButton.js +145 -0
- package/dist/components/SplitButton/SplitButtonItem.js +34 -0
- package/dist/components/SplitButton/constants.js +7 -0
- package/dist/components/StatusIndicator/StatusIndicator.js +29 -0
- package/dist/components/StatusIndicator/constants.js +13 -0
- package/dist/components/StatusIndicator/icons.js +44 -0
- package/dist/components/Table/Cells/Cell.js +39 -0
- package/dist/components/Table/Cells/CheckboxCell.js +37 -0
- package/dist/components/Table/Row.js +14 -0
- package/dist/components/Table/Table.js +24 -0
- package/dist/components/Tabs/Tab.js +47 -0
- package/dist/components/Tabs/TabDropdown.js +94 -0
- package/dist/components/Tabs/Tabs.js +128 -0
- package/dist/components/TagPill/TagPill.js +61 -0
- package/dist/components/TagPill/constants.js +12 -0
- package/dist/components/ToggleTip/ToggleTip.js +91 -0
- package/dist/components/ToggleTip/constants.js +17 -0
- package/dist/components/Tooltip/Tooltip.js +46 -0
- package/dist/components/TreeSelect/Option.js +302 -0
- package/dist/components/TreeSelect/Select.js +1871 -0
- package/dist/components/TreeSelect/mixins/InfinityLoaderMixin.js +32 -0
- package/dist/constants/events.js +5 -0
- package/dist/constants/keyCodes.js +12 -0
- package/dist/directives/outside/outside.js +37 -0
- package/dist/directives/tooltip/TooltipController.js +116 -0
- package/dist/directives/tooltip/textOverflowTooltip.js +23 -0
- package/dist/directives/tooltip/tooltip.js +48 -0
- package/dist/helpers/debounce.js +14 -0
- package/dist/helpers/generateUID.js +6 -0
- package/dist/helpers/getHrefFromID.js +6 -0
- package/dist/helpers/multiLineOverflows.js +6 -0
- package/dist/helpers/removeEvents.js +8 -0
- package/dist/helpers/stripHtml.js +6 -0
- package/dist/index.css +1 -1
- package/dist/index.js +103 -22665
- package/dist/main.js +10 -0
- package/dist/mixins/expandAnimation.js +24 -0
- package/package.json +7 -4
- package/src/components/Form/Textarea/Textarea.vue +8 -4
- package/.babelrc.json +0 -14
- package/.eslintrc.cjs +0 -22
- package/.nvmrc +0 -1
- package/.prettierrc.json +0 -1
- package/.storybook/intelliboardTheme.js +0 -10
- package/.storybook/main.js +0 -25
- package/.storybook/manager.js +0 -7
- package/.storybook/preview-head.html +0 -12
- package/.storybook/preview.js +0 -25
- package/.storybook/scss-loader.scss +0 -6
- package/.storybook/withSource.js +0 -97
- package/dist/index.umd.cjs +0 -238
- package/index.html +0 -21
- package/static/Logo.svg +0 -25
- package/static/docks/button.pdf +0 -147566
- package/static/favicon.ico +0 -0
- package/vite.config.js +0 -47
package/dist/main.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createApp as e } from "vue";
|
|
2
|
+
import i from "./App.js";
|
|
3
|
+
import n from "./EventEmmiter.js";
|
|
4
|
+
window.lang = (t, p, m = {}) => t;
|
|
5
|
+
const o = e(i);
|
|
6
|
+
o.config.globalProperties.$globalEvents = new n();
|
|
7
|
+
o.config.globalProperties.$emitEvent = function(t, ...p) {
|
|
8
|
+
this.$emit.apply(this, arguments), this.$emit("all", { event: t, args: p });
|
|
9
|
+
};
|
|
10
|
+
o.mount("#app");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
methods: {
|
|
3
|
+
enter(t) {
|
|
4
|
+
const i = getComputedStyle(t).width;
|
|
5
|
+
t.style.width = i, t.style.position = "absolute", t.style.visibility = "hidden", t.style.height = "auto";
|
|
6
|
+
const h = getComputedStyle(t).height;
|
|
7
|
+
t.style.width = null, t.style.position = null, t.style.visibility = null, t.style.height = 0, getComputedStyle(t).height, requestAnimationFrame(() => {
|
|
8
|
+
t.style.height = h;
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
afterEnter(t) {
|
|
12
|
+
t.style.height = "auto";
|
|
13
|
+
},
|
|
14
|
+
leave(t) {
|
|
15
|
+
const i = getComputedStyle(t).height;
|
|
16
|
+
t.style.height = i, getComputedStyle(t).height, requestAnimationFrame(() => {
|
|
17
|
+
t.style.height = 0;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
s as default
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avakhula/ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/index.umd.cjs",
|
|
6
|
-
"source": "src/index.js",
|
|
3
|
+
"version": "0.1.23",
|
|
7
4
|
"type": "module",
|
|
5
|
+
"module": "dist/index.js",
|
|
8
6
|
"private": false,
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"*.css",
|
|
9
|
+
"*.scss"
|
|
10
|
+
],
|
|
11
|
+
"files": [ "dist", "src" ],
|
|
9
12
|
"publishConfig": {
|
|
10
13
|
"access": "public",
|
|
11
14
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
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"
|
|
@@ -16,7 +20,6 @@
|
|
|
16
20
|
v-model="val"
|
|
17
21
|
:id="id"
|
|
18
22
|
@input="onInput"
|
|
19
|
-
@blur="onBlur"
|
|
20
23
|
class="ib-textarea"
|
|
21
24
|
:class="classes"
|
|
22
25
|
:disabled="disabled"
|
|
@@ -84,8 +87,9 @@ export default {
|
|
|
84
87
|
onInput() {
|
|
85
88
|
this.$emit("input", this.val);
|
|
86
89
|
},
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
onFocusOut(event) {
|
|
91
|
+
if (this.$el.contains(event.relatedTarget)) return;
|
|
92
|
+
this.$emit("blur", this.val);
|
|
89
93
|
},
|
|
90
94
|
},
|
|
91
95
|
computed: {
|
package/.babelrc.json
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
require("@rushstack/eslint-patch/modern-module-resolution");
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
root: true,
|
|
6
|
-
extends: [
|
|
7
|
-
"plugin:vue/vue3-essential",
|
|
8
|
-
"eslint:recommended",
|
|
9
|
-
"@vue/eslint-config-prettier",
|
|
10
|
-
"plugin:storybook/recommended",
|
|
11
|
-
],
|
|
12
|
-
parserOptions: {
|
|
13
|
-
ecmaVersion: "latest",
|
|
14
|
-
},
|
|
15
|
-
globals: {
|
|
16
|
-
lang: "readonly",
|
|
17
|
-
langComponents: "readonly",
|
|
18
|
-
},
|
|
19
|
-
rules: {
|
|
20
|
-
"indent": ["warm", 2]
|
|
21
|
-
},
|
|
22
|
-
};
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v16.18.1
|
package/.prettierrc.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/.storybook/main.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
3
|
-
addons: [
|
|
4
|
-
"@storybook/addon-docs",
|
|
5
|
-
"@storybook/addon-links",
|
|
6
|
-
"@storybook/addon-essentials",
|
|
7
|
-
"@storybook/addon-interactions",
|
|
8
|
-
"@storybook/addon-a11y",
|
|
9
|
-
"@storybook/addon-mdx-gfm",
|
|
10
|
-
],
|
|
11
|
-
staticDirs: ['../static'],
|
|
12
|
-
framework: {
|
|
13
|
-
name: "@storybook/vue3-vite",
|
|
14
|
-
options: {},
|
|
15
|
-
},
|
|
16
|
-
async viteFinal(config, options) {
|
|
17
|
-
return config;
|
|
18
|
-
},
|
|
19
|
-
features: {
|
|
20
|
-
storyStoreV7: true,
|
|
21
|
-
},
|
|
22
|
-
docs: {
|
|
23
|
-
autodocs: true,
|
|
24
|
-
},
|
|
25
|
-
};
|
package/.storybook/manager.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<script
|
|
2
|
-
type="module"
|
|
3
|
-
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"
|
|
4
|
-
></script>
|
|
5
|
-
<script
|
|
6
|
-
nomodule
|
|
7
|
-
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"
|
|
8
|
-
></script>
|
|
9
|
-
<script>
|
|
10
|
-
window.global = window;
|
|
11
|
-
window.lang = (key, component, params = {}) => key
|
|
12
|
-
</script>
|
package/.storybook/preview.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { setup } from '@storybook/vue3';
|
|
2
|
-
import { withSource } from "./withSource";
|
|
3
|
-
import EventEmitter from "../src/EventEmmiter";
|
|
4
|
-
import "./scss-loader.scss";
|
|
5
|
-
|
|
6
|
-
setup((app) => {
|
|
7
|
-
app.config.globalProperties.$globalEvents = new EventEmitter();
|
|
8
|
-
app.config.globalProperties.$emitEvent = function(event, ...args) {
|
|
9
|
-
this.$emit.apply(this, arguments);
|
|
10
|
-
this.$emit('all', {event, args})
|
|
11
|
-
};
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const parameters = {
|
|
15
|
-
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
16
|
-
controls: {
|
|
17
|
-
matchers: {
|
|
18
|
-
color: /(background|color)$/i,
|
|
19
|
-
date: /Date$/,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const decorators = [withSource];
|
|
25
|
-
export default { parameters, decorators };
|
package/.storybook/withSource.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { addons, makeDecorator } from "@storybook/addons";
|
|
2
|
-
import kebabCase from "lodash.kebabcase"
|
|
3
|
-
import { h, onMounted } from "vue";
|
|
4
|
-
|
|
5
|
-
// this value doesn't seem to be exported by addons-docs
|
|
6
|
-
export const SNIPPET_RENDERED = `storybook/docs/snippet-rendered`;
|
|
7
|
-
|
|
8
|
-
function templateSourceCode (
|
|
9
|
-
templateSource,
|
|
10
|
-
args,
|
|
11
|
-
argTypes,
|
|
12
|
-
replacing = 'v-bind="args"',
|
|
13
|
-
) {
|
|
14
|
-
const componentArgs = {}
|
|
15
|
-
for (const [k, t] of Object.entries(argTypes)) {
|
|
16
|
-
const val = args[k]
|
|
17
|
-
if (typeof val !== 'undefined' && t.table && t.table.category === 'props' && val !== t.defaultValue) {
|
|
18
|
-
componentArgs[k] = val
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const propToSource = (key, val) => {
|
|
23
|
-
const type = typeof val
|
|
24
|
-
switch (type) {
|
|
25
|
-
case "boolean":
|
|
26
|
-
return val ? key : ""
|
|
27
|
-
case "string":
|
|
28
|
-
return `${key}="${val}"`
|
|
29
|
-
default:
|
|
30
|
-
return `:${key}="${val}"`
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return templateSource.replace(
|
|
35
|
-
replacing,
|
|
36
|
-
Object.keys(componentArgs)
|
|
37
|
-
.map((key) => " " + propToSource(kebabCase(key), args[key]))
|
|
38
|
-
.join(""),
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const withSource = makeDecorator({
|
|
43
|
-
name: "withSource",
|
|
44
|
-
wrapper: (storyFn, context) => {
|
|
45
|
-
const story = storyFn(context);
|
|
46
|
-
|
|
47
|
-
// this returns a new component that computes the source code when mounted
|
|
48
|
-
// and emits an events that is handled by addons-docs
|
|
49
|
-
// this approach is based on the vue (2) implementation
|
|
50
|
-
// see https://github.com/storybookjs/storybook/blob/next/addons/docs/src/frameworks/vue/sourceDecorator.ts
|
|
51
|
-
return {
|
|
52
|
-
components: {
|
|
53
|
-
Story: story,
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
setup() {
|
|
57
|
-
onMounted(() => {
|
|
58
|
-
try {
|
|
59
|
-
// get the story source
|
|
60
|
-
const src = context.originalStoryFn().template;
|
|
61
|
-
|
|
62
|
-
// generate the source code based on the current args
|
|
63
|
-
const code = templateSourceCode(
|
|
64
|
-
src,
|
|
65
|
-
context.args,
|
|
66
|
-
context.argTypes
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
const channel = addons.getChannel();
|
|
70
|
-
|
|
71
|
-
const emitFormattedTemplate = async () => {
|
|
72
|
-
const prettier = await import("prettier/standalone");
|
|
73
|
-
const prettierHtml = await import("prettier/parser-html");
|
|
74
|
-
|
|
75
|
-
// emits an event when the transformation is completed
|
|
76
|
-
channel.emit(
|
|
77
|
-
SNIPPET_RENDERED,
|
|
78
|
-
(context || {}).id,
|
|
79
|
-
prettier.format(`<template>${code}</template>`, {
|
|
80
|
-
parser: "vue",
|
|
81
|
-
plugins: [prettierHtml],
|
|
82
|
-
htmlWhitespaceSensitivity: "ignore",
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
setTimeout(emitFormattedTemplate, 0);
|
|
88
|
-
} catch (e) {
|
|
89
|
-
console.warn("Failed to render code", e);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
return () => h(story);
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
},
|
|
97
|
-
});
|