aloha-vue 1.0.0

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 (158) hide show
  1. package/.babelrc +10 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +183 -0
  4. package/LICENSE +21 -0
  5. package/README.md +2 -0
  6. package/build/webpack.common.js +104 -0
  7. package/build/webpack.dev.js +16 -0
  8. package/build/webpack.prod.js +20 -0
  9. package/dist/index.js +9 -0
  10. package/docs/App.js +52 -0
  11. package/docs/App.pug +10 -0
  12. package/docs/App.scss +1 -0
  13. package/docs/App.vue +3 -0
  14. package/docs/components/TheMenu/TheMenu.js +49 -0
  15. package/docs/components/TheMenu/TheMenu.pug +7 -0
  16. package/docs/components/TheMenu/TheMenu.scss +39 -0
  17. package/docs/components/TheMenu/TheMenu.vue +3 -0
  18. package/docs/components/TheMenuItem/TheMenuItem.js +29 -0
  19. package/docs/components/TheMenuItem/TheMenuItem.pug +26 -0
  20. package/docs/components/TheMenuItem/TheMenuItem.vue +2 -0
  21. package/docs/components/TheNavbar/TheNavbar.js +57 -0
  22. package/docs/components/TheNavbar/TheNavbar.pug +34 -0
  23. package/docs/components/TheNavbar/TheNavbar.vue +2 -0
  24. package/docs/i18n/de.json +4 -0
  25. package/docs/i18n/en.json +4 -0
  26. package/docs/i18n/hr.json +4 -0
  27. package/docs/i18n/ru.json +4 -0
  28. package/docs/main.js +30 -0
  29. package/docs/router/index.js +70 -0
  30. package/docs/static/styles.css +7725 -0
  31. package/docs/store/index.js +17 -0
  32. package/docs/styles/base.scss +11 -0
  33. package/docs/styles/bootstrap.lazy.scss +5 -0
  34. package/docs/styles/bulma.lazy.scss +1 -0
  35. package/docs/styles/foundation.lazy.scss +2 -0
  36. package/docs/styles/uikit.lazy.scss +3 -0
  37. package/docs/views/About.vue +5 -0
  38. package/docs/views/NotFound.vue +3 -0
  39. package/docs/views/PageAJson/PageAJson.js +18 -0
  40. package/docs/views/PageAJson/PageAJson.pug +10 -0
  41. package/docs/views/PageAJson/PageAJson.vue +2 -0
  42. package/docs/views/PageAccordion/PageAccordion.js +68 -0
  43. package/docs/views/PageAccordion/PageAccordion.pug +27 -0
  44. package/docs/views/PageAccordion/PageAccordion.vue +2 -0
  45. package/docs/views/PageCloak/PageCloak.js +8 -0
  46. package/docs/views/PageCloak/PageCloak.pug +6 -0
  47. package/docs/views/PageCloak/PageCloak.vue +2 -0
  48. package/docs/views/PageCollapse/PageCollapse.js +8 -0
  49. package/docs/views/PageCollapse/PageCollapse.pug +22 -0
  50. package/docs/views/PageCollapse/PageCollapse.vue +2 -0
  51. package/docs/views/PageInput/PageInput.js +22 -0
  52. package/docs/views/PageInput/PageInput.pug +25 -0
  53. package/docs/views/PageInput/PageInput.vue +2 -0
  54. package/docs/views/PageSpinner/PageSpinner.js +8 -0
  55. package/docs/views/PageSpinner/PageSpinner.pug +12 -0
  56. package/docs/views/PageSpinner/PageSpinner.vue +2 -0
  57. package/docs/views/PageStart/PageStart.js +39 -0
  58. package/docs/views/PageStart/PageStart.pug +19 -0
  59. package/docs/views/PageStart/PageStart.vue +2 -0
  60. package/docs/views/PageTable/PageTable.js +68 -0
  61. package/docs/views/PageTable/PageTable.pug +10 -0
  62. package/docs/views/PageTable/PageTable.vue +2 -0
  63. package/package.json +55 -0
  64. package/public/index.html +11 -0
  65. package/src/AAccordion/AAccordion.js +442 -0
  66. package/src/AAccordion/AAccordion.pug +27 -0
  67. package/src/AAccordion/AAccordion.vue +2 -0
  68. package/src/AAccordion/AAccordionItem/AAccordionItem.js +162 -0
  69. package/src/AAccordion/AAccordionItem/AAccordionItem.pug +76 -0
  70. package/src/AAccordion/AAccordionItem/AAccordionItem.vue +2 -0
  71. package/src/ACloak/ACloak.js +116 -0
  72. package/src/ACollapse/ACollapse.js +103 -0
  73. package/src/ACollapse/ACollapse.pug +25 -0
  74. package/src/ACollapse/ACollapse.vue +2 -0
  75. package/src/AFormElement/AFormElementBtnClear/AFormElementBtnClear.js +58 -0
  76. package/src/AIcon/AIcon.js +81 -0
  77. package/src/AIcon/Icons/Aloha.js +20 -0
  78. package/src/AIcon/Icons/ChevronDown.js +3 -0
  79. package/src/AIcon/Icons/ChevronLeft.js +1 -0
  80. package/src/AIcon/Icons/ChevronRight.js +3 -0
  81. package/src/AIcon/Icons/ChevronUp.js +3 -0
  82. package/src/AIcon/Icons/Close.js +16 -0
  83. package/src/AIcon/Icons/Cross.js +14 -0
  84. package/src/AIcon/Icons/Pause.js +14 -0
  85. package/src/AIcon/Icons/Play.js +3 -0
  86. package/src/AIcon/Icons/Repeat.js +9 -0
  87. package/src/AIcon/Icons/Reset.js +11 -0
  88. package/src/AIcon/Incscape-icons/Aloha.svg +349 -0
  89. package/src/AIcon/Incscape-icons/aloha-copy.svg +80 -0
  90. package/src/AIcon/Incscape-icons/chevron-bottom.svg +61 -0
  91. package/src/AIcon/Incscape-icons/chevron-left.svg +61 -0
  92. package/src/AIcon/Incscape-icons/chevron-right.svg +61 -0
  93. package/src/AIcon/Incscape-icons/chevron-up.svg +61 -0
  94. package/src/AIcon/Incscape-icons/close.svg +74 -0
  95. package/src/AIcon/Incscape-icons/cross.svg +73 -0
  96. package/src/AIcon/Incscape-icons/pause.svg +70 -0
  97. package/src/AIcon/Incscape-icons/play.svg +72 -0
  98. package/src/AIcon/Incscape-icons/repeat.svg +84 -0
  99. package/src/AIcon/Incscape-icons/reset.svg +86 -0
  100. package/src/AIcon/Incscape-icons/th-large-outline.svg +95 -0
  101. package/src/AIcon/Incscape-icons/th-large-rund-outline.svg +90 -0
  102. package/src/AIcon/Incscape-icons/th-large-rund.svg +94 -0
  103. package/src/AIcon/Incscape-icons/th-large.svg +97 -0
  104. package/src/AIcon/SVG-icons/aloha.svg +28 -0
  105. package/src/AIcon/SVG-icons/chevron-bottom.svg +11 -0
  106. package/src/AIcon/SVG-icons/chevron-left.svg +11 -0
  107. package/src/AIcon/SVG-icons/chevron-right.svg +11 -0
  108. package/src/AIcon/SVG-icons/chevron-up.svg +11 -0
  109. package/src/AIcon/SVG-icons/close.svg +23 -0
  110. package/src/AIcon/SVG-icons/cross.svg +22 -0
  111. package/src/AIcon/SVG-icons/pause.svg +20 -0
  112. package/src/AIcon/SVG-icons/play.svg +11 -0
  113. package/src/AIcon/SVG-icons/repeat.svg +17 -0
  114. package/src/AIcon/SVG-icons/reset.svg +19 -0
  115. package/src/AIcon/SVG-icons/th-large-outline.svg +45 -0
  116. package/src/AIcon/SVG-icons/th-large.svg +41 -0
  117. package/src/AInput/AInput.js +177 -0
  118. package/src/AJson/AJson.js +356 -0
  119. package/src/ALabel/ALabel.js +81 -0
  120. package/src/API/frameworksApi.js +20 -0
  121. package/src/ASlot/ASlot.js +4 -0
  122. package/src/ASlot/ASlot.pug +1 -0
  123. package/src/ASlot/ASlot.vue +2 -0
  124. package/src/ASpinner/ASpinner.js +76 -0
  125. package/src/ATable/ATable.js +180 -0
  126. package/src/ATable/ATableCountProPage/ATableCountProPage.js +56 -0
  127. package/src/ATable/ATableHeader/ATableHeader.js +45 -0
  128. package/src/ATable/ATableHeaderTh/ATableHeaderTh.js +147 -0
  129. package/src/ATable/ATablePagination/ATablePagination.js +208 -0
  130. package/src/ATable/ATableTd/ATableTd.js +73 -0
  131. package/src/ATable/ATableTopPanel/ATableTopPanel.js +72 -0
  132. package/src/ATable/ATableTr/ATableTr.js +45 -0
  133. package/src/ATextarea/ATextarea.js +256 -0
  134. package/src/ATranslation/ATranslation.js +225 -0
  135. package/src/FormElements/AInputMixin.js +51 -0
  136. package/src/const/colors.js +10 -0
  137. package/src/const/frameworks.js +6 -0
  138. package/src/i18n/de.json +8 -0
  139. package/src/i18n/en.json +8 -0
  140. package/src/i18n/hr.json +8 -0
  141. package/src/i18n/ru.json +8 -0
  142. package/src/plugins/alohaPlugin.js +5 -0
  143. package/src/plugins/i18nPlugin.js +10 -0
  144. package/src/styles/components/ACloak.scss +12 -0
  145. package/src/styles/components/AFormElement/AFormElement.scss +21 -0
  146. package/src/styles/components/AFormElement/AInput.scss +0 -0
  147. package/src/styles/components/AFormElement/ATextarea.scss +6 -0
  148. package/src/styles/components/ASpinner.scss +24 -0
  149. package/src/styles/components/ATable.scss +0 -0
  150. package/src/styles/styles.scss +13 -0
  151. package/src/styles/utils/display.scss +30 -0
  152. package/src/styles/utils/flex.scss +50 -0
  153. package/src/styles/utils/paddingMargin.scss +28 -0
  154. package/src/styles/utils/utils.scss +19 -0
  155. package/src/styles/utils/widthHeight.scss +17 -0
  156. package/src/styles/variables.scss +96 -0
  157. package/src/utils/autosize.js +268 -0
  158. package/src/utils/utils.js +16 -0
package/.babelrc ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "presets": [
3
+ ["@babel/preset-env"]
4
+ ],
5
+ "plugins": [
6
+ ["@babel/plugin-transform-runtime", {
7
+ "corejs": 3
8
+ }]
9
+ ]
10
+ }
package/.eslintignore ADDED
@@ -0,0 +1,3 @@
1
+ /node_modules/**
2
+ **/webpack.config.js
3
+ **/dist/**
package/.eslintrc.js ADDED
@@ -0,0 +1,183 @@
1
+ var OFF = 0, WARN = 1, ERROR = 2;
2
+
3
+ module.exports = exports = {
4
+ parser: "vue-eslint-parser",
5
+ parserOptions: {
6
+ parser: {
7
+ js: "@babel/eslint-parser",
8
+ },
9
+ requireConfigFile: false,
10
+ allowImportExportEverywhere: true,
11
+ ecmaVersion: 8,
12
+ sourceType: "module",
13
+ impliedStrict: true,
14
+ ecmaFeatures: {
15
+ spread: true,
16
+ },
17
+ },
18
+
19
+ extends: [
20
+ "eslint:recommended",
21
+ "plugin:vue/vue3-recommended",
22
+ ],
23
+
24
+ globals: {
25
+ _: false,
26
+ $: false,
27
+ L: false,
28
+ angular: false,
29
+ window: false,
30
+ event: false,
31
+ beforeEach: false,
32
+ afterEach: false,
33
+ exports: false,
34
+ define: false,
35
+ module: false,
36
+ it: false,
37
+ describe: false,
38
+ inject: false,
39
+ expect: false,
40
+ spyOn: false,
41
+ jasmine: false,
42
+ sinon: false,
43
+ xdescribe: false,
44
+ Raven: false,
45
+ console: false,
46
+ setTimeout: false,
47
+ clearTimeout: false,
48
+ history: false,
49
+ localStorage: false,
50
+ CKEDITOR: false,
51
+ document: false,
52
+ require: false,
53
+ process: false,
54
+ },
55
+
56
+ "rules": {
57
+ // Possible Errors
58
+ "for-direction": WARN,
59
+ "getter-return": [WARN, { allowImplicit: true }],
60
+ "no-async-promise-executor": ERROR,
61
+ "no-await-in-loop": ERROR,
62
+ "no-compare-neg-zero": WARN,
63
+ "no-cond-assign": [ERROR, "always"],
64
+ "no-console": OFF,
65
+ "no-constant-condition": [WARN, { "checkLoops": false }],
66
+ "no-debugger": WARN,
67
+ "no-dupe-args": WARN,
68
+ "no-dupe-keys": WARN,
69
+ "no-duplicate-case": WARN,
70
+ "no-empty": [WARN, { "allowEmptyCatch": true }],
71
+ "no-empty-character-class": WARN,
72
+ "no-extra-boolean-cast": WARN,
73
+ "no-extra-semi": WARN,
74
+ "no-func-assign": WARN,
75
+ "no-inner-declarations": WARN,
76
+ "no-invalid-regexp": [WARN, { "allowConstructorFlags": ["u", "y"] }],
77
+ "no-irregular-whitespace": OFF,
78
+ "no-obj-calls": WARN,
79
+ "no-prototype-builtins": WARN,
80
+ "no-regex-spaces": WARN,
81
+ "no-sparse-arrays": WARN,
82
+ "no-unexpected-multiline": WARN,
83
+ "no-unreachable": WARN,
84
+ "no-unsafe-negation": WARN,
85
+ "use-isnan": WARN,
86
+ "valid-typeof": WARN,
87
+
88
+ // Best Practices
89
+ "accessor-pairs": WARN,
90
+ "block-scoped-var": WARN,
91
+ "curly": WARN,
92
+ "dot-notation": [WARN, { "allowKeywords": true }],
93
+ "no-alert": WARN,
94
+ "no-else-return": WARN,
95
+ "no-eq-null": WARN,
96
+ "no-eval": WARN,
97
+ "no-extra-bind": WARN,
98
+ "no-extra-label": WARN,
99
+ "no-floating-decimal": WARN,
100
+ "no-global-assign": WARN,
101
+ "no-implied-eval": WARN,
102
+ "no-loop-func": WARN,
103
+ "no-multi-spaces": WARN,
104
+ "no-new-func": WARN,
105
+ "no-redeclare": WARN,
106
+ "no-return-assign": OFF,
107
+ "no-self-assign": WARN,
108
+ "no-self-compare": WARN,
109
+ "no-useless-concat": WARN,
110
+ "no-useless-escape": WARN,
111
+ "require-await": WARN,
112
+ yoda: [WARN, "never", { "exceptRange": true }],
113
+
114
+ // Strict Mode
115
+ strict: OFF,
116
+
117
+ // Variables
118
+ "no-shadow-restricted-names": WARN,
119
+ "no-undef": WARN,
120
+ "no-use-before-define": [WARN, { "functions": false }],
121
+ "no-unused-vars": WARN,
122
+
123
+ // Stylistic Issues
124
+ "array-bracket-newline": [WARN, "consistent"],
125
+ "array-bracket-spacing": [WARN, "never"],
126
+ "block-spacing": [WARN, "always"],
127
+ "brace-style": WARN,
128
+ "comma-spacing": [WARN, { "before": false, "after": true }],
129
+ "comma-style": [WARN, "last"],
130
+ "computed-property-spacing": [WARN, "never"],
131
+ "eol-last": [WARN, "always"],
132
+ "func-call-spacing": [WARN, "never"],
133
+ "function-paren-newline": [WARN, "multiline-arguments"],
134
+ "implicit-arrow-linebreak": [WARN, "beside"],
135
+ indent: [WARN, 2, {
136
+ "VariableDeclarator": "first",
137
+ "FunctionDeclaration": {"parameters": "first"},
138
+ "FunctionExpression": {"parameters": "first" },
139
+ "CallExpression": {"arguments": "first"},
140
+ "ImportDeclaration": 1,
141
+ "ObjectExpression": "first",
142
+ "ArrayExpression": "first",
143
+ "ignoreComments": true,
144
+ "ignoredNodes": ["ConditionalExpression"],
145
+ "outerIIFEBody": 0,
146
+ }],
147
+ "key-spacing": WARN,
148
+ "keyword-spacing": WARN,
149
+ "no-mixed-spaces-and-tabs": OFF,
150
+ "no-multi-assign": WARN,
151
+ "no-multiple-empty-lines": WARN,
152
+ "no-unneeded-ternary": WARN,
153
+ "no-whitespace-before-property": WARN,
154
+ "object-curly-spacing": [WARN, "always"],
155
+ "padded-blocks": [WARN, "never"],
156
+ "quote-props": [WARN, "as-needed"],
157
+ "quotes": [WARN, "double", { "allowTemplateLiterals": true }],
158
+ semi: [WARN, "always"],
159
+ "space-before-blocks": WARN,
160
+ "space-before-function-paren": [WARN, "never"],
161
+ "space-in-parens": [WARN, "never"],
162
+ "space-infix-ops": WARN,
163
+ "spaced-comment": [WARN, "always", { "exceptions": ["-", "*", "+", "@ngInject", "/"] }],
164
+
165
+ // ECMAScript 6
166
+ "arrow-parens": [WARN, "as-needed"],
167
+ "arrow-spacing": WARN,
168
+ "constructor-super": WARN,
169
+ "no-const-assign": WARN,
170
+ "no-dupe-class-members": WARN,
171
+ "no-duplicate-imports": WARN,
172
+ "no-this-before-super": WARN,
173
+ "no-var": WARN,
174
+ "prefer-const": WARN,
175
+ // "prefer-template": WARN,
176
+ "template-curly-spacing": [WARN, "always"],
177
+ },
178
+ env: {
179
+ jquery: true,
180
+ es6: true,
181
+ browser: true,
182
+ }
183
+ };
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Ilia Brykin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # aloha-vue
2
+ aloha
@@ -0,0 +1,104 @@
1
+ const path = require("path");
2
+ const { CleanWebpackPlugin } = require("clean-webpack-plugin");
3
+ const HtmlWebpackPlugin = require("html-webpack-plugin");
4
+ const { VueLoaderPlugin } = require("vue-loader/dist/index");
5
+ const ESLintPlugin = require("eslint-webpack-plugin");
6
+ const CopyWebpackPlugin = require("copy-webpack-plugin");
7
+
8
+ // const TARGET = process.env.npm_lifecycle_event;
9
+
10
+ module.exports = {
11
+ entry: "./docs/main.js",
12
+ output: {
13
+ filename: "[name].[contenthash].js",
14
+ path: path.resolve(__dirname, "../docs/dist"),
15
+ publicPath: "/",
16
+ },
17
+ // resolve: {
18
+ // extensions: ['.vue', '.ts', '.js', '.jsx', '.json'], //It means that the file suffix can not be written in the import file
19
+ // alias: {
20
+ // '@': path.join(__dirname, '../src')
21
+ // //When the import file is in src, it can be written as @ / component /
22
+ // }
23
+ // },
24
+ plugins: [
25
+ new CleanWebpackPlugin(),
26
+ new HtmlWebpackPlugin({
27
+ title: "I am webpack.config Configured title",
28
+ template: "./public/index.html",
29
+ // Compress HTML
30
+ minify: {
31
+ removeComments: true, // Remove comments from HTML
32
+ collapseWhitespace: true // Remove whitespace and newline
33
+ }
34
+ }),
35
+ new VueLoaderPlugin(), // Plug in for parsing and converting. vue files
36
+ new ESLintPlugin({}),
37
+ new CopyWebpackPlugin({
38
+ patterns: [
39
+ // { from: "../public", to: "./" },
40
+ { from: "docs/static/" },
41
+ ],
42
+ }),
43
+ ],
44
+ module: {
45
+ rules: [
46
+ {
47
+ test: /\.js$/,
48
+ exclude: /node_modules/,
49
+ use: ["babel-loader"],
50
+ },
51
+ {
52
+ test: /\.s[ac]ss$/i,
53
+ exclude: /\.lazy\.s[ac]ss$/i,
54
+ use: [
55
+ // Creates `style` nodes from JS strings
56
+ "style-loader",
57
+ // Translates CSS into CommonJS
58
+ "css-loader",
59
+ // Compiles Sass to CSS
60
+ "sass-loader",
61
+ ],
62
+ },
63
+ {
64
+ test: /\.lazy\.s[ac]ss$/i,
65
+ use: [
66
+ { loader: "style-loader", options: { injectType: "lazyStyleTag" } },
67
+ "css-loader",
68
+ "sass-loader",
69
+ ],
70
+ },
71
+ {
72
+ test: /\.(png|svg|jpg|gif)$/,
73
+ type: "asset", // Automatically choose between exporting a data URI and sending a separate file
74
+ },
75
+ {
76
+ test: /\.vue$/,
77
+ use: ["vue-loader"],
78
+ },
79
+ {
80
+ test: /\.pug$/,
81
+ use: ["vue-pug-loader"],
82
+ },
83
+ ],
84
+ },
85
+ // https://webpack.docschina.org/guides/caching/
86
+ optimization: {
87
+ // The deterministic option benefits long-term caching
88
+ moduleIds: "deterministic",
89
+ // use optimization.runtimeChunk Option to split the runtime code into a separate chunk
90
+ runtimeChunk: "single",
91
+ splitChunks: {
92
+ // Using the client's long-term caching mechanism, hit the cache to eliminate requests and reduce getting resources from the server,
93
+ // At the same time, it can ensure that the client code and server code version are consistent. This can be done by
94
+ // Use the cacheGroups option of the SplitChunksPlugin plug-in.
95
+ cacheGroups: {
96
+ vendor: {
97
+ test: /[\\/]node_modules[\\/]/,
98
+ name: "vendors",
99
+ chunks: "all",
100
+ },
101
+ },
102
+ },
103
+ },
104
+ };
@@ -0,0 +1,16 @@
1
+ const { merge } = require("webpack-merge");
2
+ const common = require("./webpack.common.js");
3
+
4
+ module.exports = merge(common, {
5
+ mode: "development",
6
+ // devtool: "inline-source-map",
7
+ devtool: "source-map",
8
+ devServer: {
9
+ static: "../docs/dist",
10
+ historyApiFallback: true,
11
+ // hot: true,
12
+ },
13
+ // optimization: {
14
+ // minimize: true,
15
+ // },
16
+ });
@@ -0,0 +1,20 @@
1
+ const { merge } = require("webpack-merge");
2
+ const common = require("./webpack.common.js");
3
+ const TerserPlugin = require("terser-webpack-plugin");
4
+
5
+ module.exports = merge(common, {
6
+ mode: "production",
7
+ devtool: "source-map",
8
+ optimization: {
9
+ // https://webpack.docschina.org/plugins/terser-webpack-plugin/
10
+ // Compression js
11
+ minimize: true,
12
+ minimizer: [
13
+ // https://webpack.docschina.org/plugins/terser-webpack-plugin/
14
+ // Compression js
15
+ new TerserPlugin({
16
+ parallel: true, // Using multi process concurrent execution to improve the construction speed
17
+ }),
18
+ ],
19
+ },
20
+ });
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import AIcon from "../src/AIcon/AIcon";
2
+ import ASpinner from "../src/ASpinner/ASpinner";
3
+ import ATable from "../src/ATable/ATable";
4
+
5
+ export {
6
+ AIcon,
7
+ ASpinner,
8
+ ATable,
9
+ };
package/docs/App.js ADDED
@@ -0,0 +1,52 @@
1
+ import TheMenu from "./components/TheMenu/TheMenu.vue";
2
+ import TheNavbar from "./components/TheNavbar/TheNavbar.vue";
3
+
4
+ import bootstrapStyles from "./styles/bootstrap.lazy.scss";
5
+ import bulmaStyles from "./styles/bulma.lazy.scss";
6
+ import foundationStyles from "./styles/foundation.lazy.scss";
7
+ import uikitStyles from "./styles/uikit.lazy.scss";
8
+ import frameworks from "../src/const/frameworks";
9
+ import {
10
+ computed,
11
+ defineComponent,
12
+ } from "vue";
13
+
14
+ const STYLES = {
15
+ bootstrap: bootstrapStyles,
16
+ bulma: bulmaStyles,
17
+ foundation: foundationStyles,
18
+ uikit: uikitStyles,
19
+ };
20
+
21
+ export default defineComponent({
22
+ components: {
23
+ TheMenu,
24
+ TheNavbar,
25
+ },
26
+ provide() {
27
+ return {
28
+ framework: computed(() => this.framework),
29
+ };
30
+ },
31
+ data() {
32
+ return {
33
+ framework: "bootstrap",
34
+ };
35
+ },
36
+ methods: {
37
+ changeFramework({ framework }) {
38
+ this.addFrameworkStyles(framework);
39
+ this.framework = framework;
40
+ },
41
+
42
+ addFrameworkStyles(framework) {
43
+ frameworks.forEach(_framework => {
44
+ if (_framework === framework) {
45
+ STYLES[_framework].use();
46
+ } else {
47
+ STYLES[_framework].unuse();
48
+ }
49
+ });
50
+ },
51
+ },
52
+ });
package/docs/App.pug ADDED
@@ -0,0 +1,10 @@
1
+ div
2
+ the-navbar(
3
+ @change-framework="changeFramework"
4
+ )
5
+ .a_d_flex
6
+ the-menu
7
+ .a_d_inline_block.a_pl_4(
8
+ style="width: calc(100vw - 280px);"
9
+ )
10
+ router-view
package/docs/App.scss ADDED
@@ -0,0 +1 @@
1
+ @import "./styles/base";
package/docs/App.vue ADDED
@@ -0,0 +1,3 @@
1
+ <template lang="pug" src="./App.pug"></template>
2
+ <script src="./App.js"></script>
3
+ <style lang="scss" src="./App.scss"></style>
@@ -0,0 +1,49 @@
1
+ import TheMenuItem from "../TheMenuItem/TheMenuItem.vue";
2
+
3
+ export default {
4
+ name: "TheMenu",
5
+ components: {
6
+ TheMenuItem,
7
+ },
8
+ data() {
9
+ return {
10
+ menuItems: [
11
+ {
12
+ id: "spinner",
13
+ name: "PageSpinner",
14
+ label: "Spinner",
15
+ },
16
+ {
17
+ id: "table",
18
+ name: "PageTable",
19
+ label: "Table",
20
+ },
21
+ {
22
+ id: "collapse",
23
+ name: "PageCollapse",
24
+ label: "Collapse",
25
+ },
26
+ {
27
+ id: "cloak",
28
+ name: "PageCloak",
29
+ label: "Cloak",
30
+ },
31
+ {
32
+ id: "input",
33
+ name: "PageInput",
34
+ label: "Input",
35
+ },
36
+ {
37
+ id: "json",
38
+ name: "PageAJson",
39
+ label: "JSON",
40
+ },
41
+ {
42
+ id: "accordion",
43
+ name: "PageAccordion",
44
+ label: "Accordion",
45
+ },
46
+ ],
47
+ };
48
+ },
49
+ };
@@ -0,0 +1,7 @@
1
+ .the_menu
2
+ ul.the_menu__ul
3
+ the-menu-item(
4
+ v-for="item in menuItems"
5
+ :key="item.id"
6
+ :data="item"
7
+ )
@@ -0,0 +1,39 @@
1
+ .the_menu {
2
+ display: inline-block;
3
+ background-color: #000;
4
+ width: 280px;
5
+ min-height: calc(100vh - 80px);
6
+ }
7
+ .the_menu__ul {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ padding-left: 0;
11
+ margin-bottom: 0;
12
+ list-style: none;
13
+ flex-direction: column;
14
+ }
15
+ .the_menu__link {
16
+ display: block;
17
+ padding: .5rem 1rem;
18
+ color: #fff;
19
+ text-decoration: underline;
20
+ &:hover {
21
+ color: #fff;
22
+ text-decoration: none;
23
+ }
24
+ }
25
+ .the_menu__btn_collapse {
26
+ width: 100%;
27
+ display: flex;
28
+ justify-content: space-between;
29
+ padding: .5rem 1rem;
30
+ color: #fff;
31
+ background-color: inherit;
32
+ border: none;
33
+ }
34
+ .the_menu__box_collapse {
35
+ background-color: lighten(#000, 20);
36
+ }
37
+ .the_menu__box_collapse__li > .the_menu__link {
38
+ padding-left: 1.5rem;
39
+ }
@@ -0,0 +1,3 @@
1
+ <template lang="pug" src="./TheMenu.pug"></template>
2
+ <script src="./TheMenu.js"></script>
3
+ <style lang="scss" src="./TheMenu.scss"></style>
@@ -0,0 +1,29 @@
1
+ import AIcon from "../../../src/AIcon/AIcon";
2
+
3
+ export default {
4
+ name: "TheMenuItem",
5
+ components: {
6
+ AIcon,
7
+ },
8
+ props: {
9
+ data: {
10
+ type: Object,
11
+ required: true,
12
+ },
13
+ },
14
+ data() {
15
+ return {
16
+ isOpen: false,
17
+ };
18
+ },
19
+ computed: {
20
+ collapseIcon() {
21
+ return this.isOpen ? "ChevronUp" : "ChevronDown";
22
+ },
23
+ },
24
+ methods: {
25
+ toggle() {
26
+ this.isOpen = !this.isOpen;
27
+ },
28
+ },
29
+ };
@@ -0,0 +1,26 @@
1
+ li
2
+ template(
3
+ v-if="data.children && data.children.length"
4
+ key="children"
5
+ )
6
+ button.the_menu__btn_collapse(
7
+ type="button"
8
+ @click="toggle"
9
+ )
10
+ span {{ data.label }}
11
+ a-icon(
12
+ :icon="collapseIcon"
13
+ )
14
+ .the_menu__box_collapse(
15
+ v-show="isOpen"
16
+ )
17
+ the-menu-item.the_menu__box_collapse__li(
18
+ v-for="item in data.children"
19
+ :key="item.id"
20
+ :data="item"
21
+ )
22
+ router-link.the_menu__link(
23
+ v-else
24
+ key="link"
25
+ :to="{ name: data.name, params: data.params }"
26
+ ) {{ data.label }}
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./TheMenuItem.pug"></template>
2
+ <script src="./TheMenuItem.js"></script>
@@ -0,0 +1,57 @@
1
+ import AIcon from "../../../src/AIcon/AIcon";
2
+
3
+ import frameworks from "../../../src/const/frameworks";
4
+
5
+ export default {
6
+ name: "TheNavbar",
7
+ components: {
8
+ AIcon,
9
+ },
10
+ emits: [
11
+ "change-framework",
12
+ ],
13
+ data() {
14
+ return {
15
+ frameworks: frameworks,
16
+ modelFramework: "bootstrap",
17
+ modelLanguage: "de",
18
+ languages: [
19
+ {
20
+ label: "Deutsch",
21
+ value: "de",
22
+ },
23
+ {
24
+ label: "English",
25
+ value: "en",
26
+ },
27
+ {
28
+ label: "Русский",
29
+ value: "ru",
30
+ },
31
+ {
32
+ label: "Hrvatski",
33
+ value: "hr",
34
+ },
35
+ ],
36
+ };
37
+ },
38
+ created() {
39
+ this.changeLanguage();
40
+ this.changeFramework();
41
+ },
42
+ methods: {
43
+ changeLanguage() {
44
+ setTimeout(() => {
45
+ this.$root.$i18n.language = this.modelLanguage;
46
+ });
47
+ },
48
+
49
+ changeFramework() {
50
+ setTimeout(() => {
51
+ this.$emit("change-framework", {
52
+ framework: this.modelFramework,
53
+ });
54
+ });
55
+ },
56
+ },
57
+ };