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.
- package/.babelrc +10 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +183 -0
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/build/webpack.common.js +104 -0
- package/build/webpack.dev.js +16 -0
- package/build/webpack.prod.js +20 -0
- package/dist/index.js +9 -0
- package/docs/App.js +52 -0
- package/docs/App.pug +10 -0
- package/docs/App.scss +1 -0
- package/docs/App.vue +3 -0
- package/docs/components/TheMenu/TheMenu.js +49 -0
- package/docs/components/TheMenu/TheMenu.pug +7 -0
- package/docs/components/TheMenu/TheMenu.scss +39 -0
- package/docs/components/TheMenu/TheMenu.vue +3 -0
- package/docs/components/TheMenuItem/TheMenuItem.js +29 -0
- package/docs/components/TheMenuItem/TheMenuItem.pug +26 -0
- package/docs/components/TheMenuItem/TheMenuItem.vue +2 -0
- package/docs/components/TheNavbar/TheNavbar.js +57 -0
- package/docs/components/TheNavbar/TheNavbar.pug +34 -0
- package/docs/components/TheNavbar/TheNavbar.vue +2 -0
- package/docs/i18n/de.json +4 -0
- package/docs/i18n/en.json +4 -0
- package/docs/i18n/hr.json +4 -0
- package/docs/i18n/ru.json +4 -0
- package/docs/main.js +30 -0
- package/docs/router/index.js +70 -0
- package/docs/static/styles.css +7725 -0
- package/docs/store/index.js +17 -0
- package/docs/styles/base.scss +11 -0
- package/docs/styles/bootstrap.lazy.scss +5 -0
- package/docs/styles/bulma.lazy.scss +1 -0
- package/docs/styles/foundation.lazy.scss +2 -0
- package/docs/styles/uikit.lazy.scss +3 -0
- package/docs/views/About.vue +5 -0
- package/docs/views/NotFound.vue +3 -0
- package/docs/views/PageAJson/PageAJson.js +18 -0
- package/docs/views/PageAJson/PageAJson.pug +10 -0
- package/docs/views/PageAJson/PageAJson.vue +2 -0
- package/docs/views/PageAccordion/PageAccordion.js +68 -0
- package/docs/views/PageAccordion/PageAccordion.pug +27 -0
- package/docs/views/PageAccordion/PageAccordion.vue +2 -0
- package/docs/views/PageCloak/PageCloak.js +8 -0
- package/docs/views/PageCloak/PageCloak.pug +6 -0
- package/docs/views/PageCloak/PageCloak.vue +2 -0
- package/docs/views/PageCollapse/PageCollapse.js +8 -0
- package/docs/views/PageCollapse/PageCollapse.pug +22 -0
- package/docs/views/PageCollapse/PageCollapse.vue +2 -0
- package/docs/views/PageInput/PageInput.js +22 -0
- package/docs/views/PageInput/PageInput.pug +25 -0
- package/docs/views/PageInput/PageInput.vue +2 -0
- package/docs/views/PageSpinner/PageSpinner.js +8 -0
- package/docs/views/PageSpinner/PageSpinner.pug +12 -0
- package/docs/views/PageSpinner/PageSpinner.vue +2 -0
- package/docs/views/PageStart/PageStart.js +39 -0
- package/docs/views/PageStart/PageStart.pug +19 -0
- package/docs/views/PageStart/PageStart.vue +2 -0
- package/docs/views/PageTable/PageTable.js +68 -0
- package/docs/views/PageTable/PageTable.pug +10 -0
- package/docs/views/PageTable/PageTable.vue +2 -0
- package/package.json +55 -0
- package/public/index.html +11 -0
- package/src/AAccordion/AAccordion.js +442 -0
- package/src/AAccordion/AAccordion.pug +27 -0
- package/src/AAccordion/AAccordion.vue +2 -0
- package/src/AAccordion/AAccordionItem/AAccordionItem.js +162 -0
- package/src/AAccordion/AAccordionItem/AAccordionItem.pug +76 -0
- package/src/AAccordion/AAccordionItem/AAccordionItem.vue +2 -0
- package/src/ACloak/ACloak.js +116 -0
- package/src/ACollapse/ACollapse.js +103 -0
- package/src/ACollapse/ACollapse.pug +25 -0
- package/src/ACollapse/ACollapse.vue +2 -0
- package/src/AFormElement/AFormElementBtnClear/AFormElementBtnClear.js +58 -0
- package/src/AIcon/AIcon.js +81 -0
- package/src/AIcon/Icons/Aloha.js +20 -0
- package/src/AIcon/Icons/ChevronDown.js +3 -0
- package/src/AIcon/Icons/ChevronLeft.js +1 -0
- package/src/AIcon/Icons/ChevronRight.js +3 -0
- package/src/AIcon/Icons/ChevronUp.js +3 -0
- package/src/AIcon/Icons/Close.js +16 -0
- package/src/AIcon/Icons/Cross.js +14 -0
- package/src/AIcon/Icons/Pause.js +14 -0
- package/src/AIcon/Icons/Play.js +3 -0
- package/src/AIcon/Icons/Repeat.js +9 -0
- package/src/AIcon/Icons/Reset.js +11 -0
- package/src/AIcon/Incscape-icons/Aloha.svg +349 -0
- package/src/AIcon/Incscape-icons/aloha-copy.svg +80 -0
- package/src/AIcon/Incscape-icons/chevron-bottom.svg +61 -0
- package/src/AIcon/Incscape-icons/chevron-left.svg +61 -0
- package/src/AIcon/Incscape-icons/chevron-right.svg +61 -0
- package/src/AIcon/Incscape-icons/chevron-up.svg +61 -0
- package/src/AIcon/Incscape-icons/close.svg +74 -0
- package/src/AIcon/Incscape-icons/cross.svg +73 -0
- package/src/AIcon/Incscape-icons/pause.svg +70 -0
- package/src/AIcon/Incscape-icons/play.svg +72 -0
- package/src/AIcon/Incscape-icons/repeat.svg +84 -0
- package/src/AIcon/Incscape-icons/reset.svg +86 -0
- package/src/AIcon/Incscape-icons/th-large-outline.svg +95 -0
- package/src/AIcon/Incscape-icons/th-large-rund-outline.svg +90 -0
- package/src/AIcon/Incscape-icons/th-large-rund.svg +94 -0
- package/src/AIcon/Incscape-icons/th-large.svg +97 -0
- package/src/AIcon/SVG-icons/aloha.svg +28 -0
- package/src/AIcon/SVG-icons/chevron-bottom.svg +11 -0
- package/src/AIcon/SVG-icons/chevron-left.svg +11 -0
- package/src/AIcon/SVG-icons/chevron-right.svg +11 -0
- package/src/AIcon/SVG-icons/chevron-up.svg +11 -0
- package/src/AIcon/SVG-icons/close.svg +23 -0
- package/src/AIcon/SVG-icons/cross.svg +22 -0
- package/src/AIcon/SVG-icons/pause.svg +20 -0
- package/src/AIcon/SVG-icons/play.svg +11 -0
- package/src/AIcon/SVG-icons/repeat.svg +17 -0
- package/src/AIcon/SVG-icons/reset.svg +19 -0
- package/src/AIcon/SVG-icons/th-large-outline.svg +45 -0
- package/src/AIcon/SVG-icons/th-large.svg +41 -0
- package/src/AInput/AInput.js +177 -0
- package/src/AJson/AJson.js +356 -0
- package/src/ALabel/ALabel.js +81 -0
- package/src/API/frameworksApi.js +20 -0
- package/src/ASlot/ASlot.js +4 -0
- package/src/ASlot/ASlot.pug +1 -0
- package/src/ASlot/ASlot.vue +2 -0
- package/src/ASpinner/ASpinner.js +76 -0
- package/src/ATable/ATable.js +180 -0
- package/src/ATable/ATableCountProPage/ATableCountProPage.js +56 -0
- package/src/ATable/ATableHeader/ATableHeader.js +45 -0
- package/src/ATable/ATableHeaderTh/ATableHeaderTh.js +147 -0
- package/src/ATable/ATablePagination/ATablePagination.js +208 -0
- package/src/ATable/ATableTd/ATableTd.js +73 -0
- package/src/ATable/ATableTopPanel/ATableTopPanel.js +72 -0
- package/src/ATable/ATableTr/ATableTr.js +45 -0
- package/src/ATextarea/ATextarea.js +256 -0
- package/src/ATranslation/ATranslation.js +225 -0
- package/src/FormElements/AInputMixin.js +51 -0
- package/src/const/colors.js +10 -0
- package/src/const/frameworks.js +6 -0
- package/src/i18n/de.json +8 -0
- package/src/i18n/en.json +8 -0
- package/src/i18n/hr.json +8 -0
- package/src/i18n/ru.json +8 -0
- package/src/plugins/alohaPlugin.js +5 -0
- package/src/plugins/i18nPlugin.js +10 -0
- package/src/styles/components/ACloak.scss +12 -0
- package/src/styles/components/AFormElement/AFormElement.scss +21 -0
- package/src/styles/components/AFormElement/AInput.scss +0 -0
- package/src/styles/components/AFormElement/ATextarea.scss +6 -0
- package/src/styles/components/ASpinner.scss +24 -0
- package/src/styles/components/ATable.scss +0 -0
- package/src/styles/styles.scss +13 -0
- package/src/styles/utils/display.scss +30 -0
- package/src/styles/utils/flex.scss +50 -0
- package/src/styles/utils/paddingMargin.scss +28 -0
- package/src/styles/utils/utils.scss +19 -0
- package/src/styles/utils/widthHeight.scss +17 -0
- package/src/styles/variables.scss +96 -0
- package/src/utils/autosize.js +268 -0
- package/src/utils/utils.js +16 -0
package/.babelrc
ADDED
package/.eslintignore
ADDED
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,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
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
package/docs/App.scss
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "./styles/base";
|
package/docs/App.vue
ADDED
|
@@ -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,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,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,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
|
+
};
|