@avakhula/ui 0.0.506-alpha-spa.3 → 0.0.506-alpha-spa.5
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/.babelrc.json +14 -0
- package/.eslintrc.cjs +22 -0
- package/.nvmrc +1 -0
- package/.prettierrc.json +1 -0
- package/.storybook/intelliboardTheme.js +10 -0
- package/.storybook/main.js +25 -0
- package/.storybook/manager.js +7 -0
- package/.storybook/preview-head.html +12 -0
- package/.storybook/preview.js +25 -0
- package/.storybook/scss-loader.scss +6 -0
- package/.storybook/withSource.js +97 -0
- package/dist/index.css +1 -1
- package/dist/index.js +22641 -103
- package/dist/index.umd.cjs +238 -0
- package/index.html +21 -0
- package/package.json +2 -6
- package/src/components/Form/Textarea/Textarea.vue +4 -8
- package/static/Logo.svg +25 -0
- package/static/docks/button.pdf +147566 -0
- package/static/favicon.ico +0 -0
- package/vite.config.js +47 -0
- package/dist/App.js +0 -23
- package/dist/EventEmmiter.js +0 -33
- package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/chunks/floating-ui.dom-D8OVFdyL.js +0 -861
- package/dist/chunks/vue-quill.esm-bundler-FvTqp_xR.js +0 -9070
- package/dist/components/Accordion/Accordion.js +0 -81
- package/dist/components/Alert/Alert.js +0 -121
- package/dist/components/Alert/constants.js +0 -10
- package/dist/components/Avatar/Avatar.js +0 -75
- package/dist/components/Avatar/constants.js +0 -12
- package/dist/components/Badge/Badge.js +0 -29
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -117
- package/dist/components/Button/Button.js +0 -140
- package/dist/components/Button/constants.js +0 -11
- package/dist/components/ButtonGroup/ButtonGroup.js +0 -14
- package/dist/components/Chips/Chips.js +0 -65
- package/dist/components/Dropdown/Dropdown.js +0 -225
- package/dist/components/Dropdown/DropdownDivider.js +0 -10
- package/dist/components/Dropdown/DropdownItem.js +0 -50
- package/dist/components/Dropdown/DropdownList.js +0 -104
- package/dist/components/Dropdown/constants.js +0 -12
- package/dist/components/Form/CharactersCount.js +0 -33
- package/dist/components/Form/Checkbox/Checkbox.js +0 -171
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +0 -81
- package/dist/components/Form/DatePicker/DatePicker.js +0 -1782
- package/dist/components/Form/DatePicker/Icons/chevron-back.js +0 -8
- package/dist/components/Form/DatePicker/Icons/chevron-forward.js +0 -8
- package/dist/components/Form/FormGroup/FormGroup.js +0 -30
- package/dist/components/Form/FormGroup/FormGroupSet.js +0 -44
- package/dist/components/Form/Input/Input.js +0 -375
- package/dist/components/Form/Input/constants.js +0 -9
- package/dist/components/Form/Label/Label.js +0 -87
- package/dist/components/Form/PhoneInput/PhoneInput.js +0 -3811
- package/dist/components/Form/Radio/Radio.js +0 -91
- package/dist/components/Form/TextEditor/TextEditor.js +0 -422
- package/dist/components/Form/TextEditor/Toolbar.js +0 -291
- package/dist/components/Form/TextEditor/icons/toolbarIcons.js +0 -109
- package/dist/components/Form/TextEditor/plugins/alphabetList.js +0 -31
- package/dist/components/Form/TextEditor/plugins/imageBlot.js +0 -16
- package/dist/components/Form/TextEditor/setupTextEditor.js +0 -27
- package/dist/components/Form/Textarea/Textarea.js +0 -121
- package/dist/components/Form/Toggle/Toggle.js +0 -134
- package/dist/components/Icon.js +0 -37
- package/dist/components/IconButton/IconButton.js +0 -93
- package/dist/components/IconButton/constants.js +0 -15
- package/dist/components/List.js +0 -66
- package/dist/components/Modal/Modal.js +0 -198
- package/dist/components/Modal/constants.js +0 -9
- package/dist/components/Pagination/LimitSelector.js +0 -73
- package/dist/components/Pagination/Pagination.js +0 -226
- package/dist/components/Panel/Panel.js +0 -107
- package/dist/components/Popover/Popover.js +0 -105
- package/dist/components/Popover/constants.js +0 -17
- package/dist/components/ProgressBar/ProgressBar.js +0 -63
- package/dist/components/ProgressBar/constants.js +0 -10
- package/dist/components/Sorting/Sorting.js +0 -182
- package/dist/components/Sorting/constants.js +0 -12
- package/dist/components/SplitButton/SplitButton.js +0 -145
- package/dist/components/SplitButton/SplitButtonItem.js +0 -34
- package/dist/components/SplitButton/constants.js +0 -7
- package/dist/components/StatusIndicator/StatusIndicator.js +0 -29
- package/dist/components/StatusIndicator/constants.js +0 -13
- package/dist/components/StatusIndicator/icons.js +0 -44
- package/dist/components/Table/Cells/Cell.js +0 -39
- package/dist/components/Table/Cells/CheckboxCell.js +0 -37
- package/dist/components/Table/Row.js +0 -14
- package/dist/components/Table/Table.js +0 -24
- package/dist/components/Tabs/Tab.js +0 -47
- package/dist/components/Tabs/TabDropdown.js +0 -94
- package/dist/components/Tabs/Tabs.js +0 -128
- package/dist/components/TagPill/TagPill.js +0 -61
- package/dist/components/TagPill/constants.js +0 -12
- package/dist/components/ToggleTip/ToggleTip.js +0 -91
- package/dist/components/ToggleTip/constants.js +0 -17
- package/dist/components/Tooltip/Tooltip.js +0 -46
- package/dist/components/TreeSelect/Option.js +0 -302
- package/dist/components/TreeSelect/Select.js +0 -1850
- package/dist/components/TreeSelect/mixins/InfinityLoaderMixin.js +0 -32
- package/dist/constants/events.js +0 -5
- package/dist/constants/keyCodes.js +0 -12
- package/dist/directives/outside/outside.js +0 -37
- package/dist/directives/tooltip/TooltipController.js +0 -116
- package/dist/directives/tooltip/textOverflowTooltip.js +0 -23
- package/dist/directives/tooltip/tooltip.js +0 -48
- package/dist/helpers/debounce.js +0 -14
- package/dist/helpers/generateUID.js +0 -6
- package/dist/helpers/getHrefFromID.js +0 -6
- package/dist/helpers/multiLineOverflows.js +0 -6
- package/dist/helpers/removeEvents.js +0 -8
- package/dist/helpers/stripHtml.js +0 -6
- package/dist/main.js +0 -10
- package/dist/mixins/expandAnimation.js +0 -24
package/.babelrc.json
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v16.18.1
|
package/.prettierrc.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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>
|
|
@@ -0,0 +1,25 @@
|
|
|
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 };
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
});
|