@avakhula/ui 0.0.506-alpha-spa.3 → 0.0.506-alpha-spa.4

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 (114) hide show
  1. package/.babelrc.json +14 -0
  2. package/.eslintrc.cjs +22 -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 +12 -0
  9. package/.storybook/preview.js +25 -0
  10. package/.storybook/scss-loader.scss +6 -0
  11. package/.storybook/withSource.js +97 -0
  12. package/dist/index.css +1 -1
  13. package/dist/index.js +22641 -103
  14. package/dist/index.umd.cjs +238 -0
  15. package/index.html +21 -0
  16. package/package.json +3 -7
  17. package/src/components/Form/Textarea/Textarea.vue +4 -8
  18. package/static/Logo.svg +25 -0
  19. package/static/docks/button.pdf +147566 -0
  20. package/static/favicon.ico +0 -0
  21. package/vite.config.js +47 -0
  22. package/dist/App.js +0 -23
  23. package/dist/EventEmmiter.js +0 -33
  24. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +0 -8
  25. package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  26. package/dist/chunks/floating-ui.dom-D8OVFdyL.js +0 -861
  27. package/dist/chunks/vue-quill.esm-bundler-FvTqp_xR.js +0 -9070
  28. package/dist/components/Accordion/Accordion.js +0 -81
  29. package/dist/components/Alert/Alert.js +0 -121
  30. package/dist/components/Alert/constants.js +0 -10
  31. package/dist/components/Avatar/Avatar.js +0 -75
  32. package/dist/components/Avatar/constants.js +0 -12
  33. package/dist/components/Badge/Badge.js +0 -29
  34. package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -117
  35. package/dist/components/Button/Button.js +0 -140
  36. package/dist/components/Button/constants.js +0 -11
  37. package/dist/components/ButtonGroup/ButtonGroup.js +0 -14
  38. package/dist/components/Chips/Chips.js +0 -65
  39. package/dist/components/Dropdown/Dropdown.js +0 -225
  40. package/dist/components/Dropdown/DropdownDivider.js +0 -10
  41. package/dist/components/Dropdown/DropdownItem.js +0 -50
  42. package/dist/components/Dropdown/DropdownList.js +0 -104
  43. package/dist/components/Dropdown/constants.js +0 -12
  44. package/dist/components/Form/CharactersCount.js +0 -33
  45. package/dist/components/Form/Checkbox/Checkbox.js +0 -171
  46. package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +0 -81
  47. package/dist/components/Form/DatePicker/DatePicker.js +0 -1782
  48. package/dist/components/Form/DatePicker/Icons/chevron-back.js +0 -8
  49. package/dist/components/Form/DatePicker/Icons/chevron-forward.js +0 -8
  50. package/dist/components/Form/FormGroup/FormGroup.js +0 -30
  51. package/dist/components/Form/FormGroup/FormGroupSet.js +0 -44
  52. package/dist/components/Form/Input/Input.js +0 -375
  53. package/dist/components/Form/Input/constants.js +0 -9
  54. package/dist/components/Form/Label/Label.js +0 -87
  55. package/dist/components/Form/PhoneInput/PhoneInput.js +0 -3811
  56. package/dist/components/Form/Radio/Radio.js +0 -91
  57. package/dist/components/Form/TextEditor/TextEditor.js +0 -422
  58. package/dist/components/Form/TextEditor/Toolbar.js +0 -291
  59. package/dist/components/Form/TextEditor/icons/toolbarIcons.js +0 -109
  60. package/dist/components/Form/TextEditor/plugins/alphabetList.js +0 -31
  61. package/dist/components/Form/TextEditor/plugins/imageBlot.js +0 -16
  62. package/dist/components/Form/TextEditor/setupTextEditor.js +0 -27
  63. package/dist/components/Form/Textarea/Textarea.js +0 -121
  64. package/dist/components/Form/Toggle/Toggle.js +0 -134
  65. package/dist/components/Icon.js +0 -37
  66. package/dist/components/IconButton/IconButton.js +0 -93
  67. package/dist/components/IconButton/constants.js +0 -15
  68. package/dist/components/List.js +0 -66
  69. package/dist/components/Modal/Modal.js +0 -198
  70. package/dist/components/Modal/constants.js +0 -9
  71. package/dist/components/Pagination/LimitSelector.js +0 -73
  72. package/dist/components/Pagination/Pagination.js +0 -226
  73. package/dist/components/Panel/Panel.js +0 -107
  74. package/dist/components/Popover/Popover.js +0 -105
  75. package/dist/components/Popover/constants.js +0 -17
  76. package/dist/components/ProgressBar/ProgressBar.js +0 -63
  77. package/dist/components/ProgressBar/constants.js +0 -10
  78. package/dist/components/Sorting/Sorting.js +0 -182
  79. package/dist/components/Sorting/constants.js +0 -12
  80. package/dist/components/SplitButton/SplitButton.js +0 -145
  81. package/dist/components/SplitButton/SplitButtonItem.js +0 -34
  82. package/dist/components/SplitButton/constants.js +0 -7
  83. package/dist/components/StatusIndicator/StatusIndicator.js +0 -29
  84. package/dist/components/StatusIndicator/constants.js +0 -13
  85. package/dist/components/StatusIndicator/icons.js +0 -44
  86. package/dist/components/Table/Cells/Cell.js +0 -39
  87. package/dist/components/Table/Cells/CheckboxCell.js +0 -37
  88. package/dist/components/Table/Row.js +0 -14
  89. package/dist/components/Table/Table.js +0 -24
  90. package/dist/components/Tabs/Tab.js +0 -47
  91. package/dist/components/Tabs/TabDropdown.js +0 -94
  92. package/dist/components/Tabs/Tabs.js +0 -128
  93. package/dist/components/TagPill/TagPill.js +0 -61
  94. package/dist/components/TagPill/constants.js +0 -12
  95. package/dist/components/ToggleTip/ToggleTip.js +0 -91
  96. package/dist/components/ToggleTip/constants.js +0 -17
  97. package/dist/components/Tooltip/Tooltip.js +0 -46
  98. package/dist/components/TreeSelect/Option.js +0 -302
  99. package/dist/components/TreeSelect/Select.js +0 -1850
  100. package/dist/components/TreeSelect/mixins/InfinityLoaderMixin.js +0 -32
  101. package/dist/constants/events.js +0 -5
  102. package/dist/constants/keyCodes.js +0 -12
  103. package/dist/directives/outside/outside.js +0 -37
  104. package/dist/directives/tooltip/TooltipController.js +0 -116
  105. package/dist/directives/tooltip/textOverflowTooltip.js +0 -23
  106. package/dist/directives/tooltip/tooltip.js +0 -48
  107. package/dist/helpers/debounce.js +0 -14
  108. package/dist/helpers/generateUID.js +0 -6
  109. package/dist/helpers/getHrefFromID.js +0 -6
  110. package/dist/helpers/multiLineOverflows.js +0 -6
  111. package/dist/helpers/removeEvents.js +0 -8
  112. package/dist/helpers/stripHtml.js +0 -6
  113. package/dist/main.js +0 -10
  114. package/dist/mixins/expandAnimation.js +0 -24
package/.babelrc.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "sourceType": "unambiguous",
3
+ "presets": [
4
+ [
5
+ "@babel/preset-env",
6
+ {
7
+ "targets": {
8
+ "chrome": 100
9
+ }
10
+ }
11
+ ]
12
+ ],
13
+ "plugins": []
14
+ }
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
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,10 @@
1
+ import { create } from '@storybook/theming';
2
+ import logo from '../static/Logo.svg';
3
+
4
+ export default create({
5
+ base: 'light',
6
+ brandTitle: 'Intelliboard UI',
7
+ brandUrl: 'https://intelliboard.net/',
8
+ brandImage: logo,
9
+ brandTarget: '_self',
10
+ });
@@ -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,7 @@
1
+ import { addons } from '@storybook/addons';
2
+ import IntelliboardTheme from "./intelliboardTheme";
3
+ addons.setConfig({
4
+ theme: IntelliboardTheme,
5
+ isFullscreen: false,
6
+ panelPosition: 'right',
7
+ });
@@ -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,6 @@
1
+ @import '../src/assets/scss/style.scss';
2
+
3
+ // Style for documentation
4
+ table {
5
+ width: 100%;
6
+ }
@@ -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
+ });