@timus-networks/theme 2.0.0 → 2.0.1
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/README.md +128 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +11 -0
- package/dist/module.d.ts +11 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +159 -0
- package/dist/runtime/components/example.button.vue +237 -0
- package/dist/runtime/components/example.button.vue.d.ts +10 -0
- package/dist/runtime/components/example.checkbox.vue +190 -0
- package/dist/runtime/components/example.checkbox.vue.d.ts +24 -0
- package/dist/runtime/components/example.dialog.vue +82 -0
- package/dist/runtime/components/example.form.vue +494 -0
- package/dist/runtime/components/example.input.vue +286 -0
- package/dist/runtime/components/example.input.vue.d.ts +20 -0
- package/dist/runtime/components/example.popover.vue +161 -0
- package/dist/runtime/components/example.radio.vue +165 -0
- package/dist/runtime/components/example.radio.vue.d.ts +24 -0
- package/dist/runtime/components/example.select.vue +591 -0
- package/dist/runtime/components/example.select.vue.d.ts +69 -0
- package/dist/runtime/components/example.sidebar.vue +104 -0
- package/dist/runtime/components/example.table.vue +126 -0
- package/dist/runtime/components/example.tag.vue +279 -0
- package/dist/runtime/components/html-encode.vue +37 -0
- package/dist/runtime/pages/theme.vue +30 -0
- package/dist/runtime/plugins/element-extend-plugin.d.ts +38 -0
- package/dist/runtime/plugins/element-extend-plugin.js +39 -0
- package/dist/runtime/plugins/element-extend-plugin.mjs +39 -0
- package/dist/runtime/plugins/experimental-size-plugin.d.ts +2 -0
- package/dist/runtime/plugins/experimental-size-plugin.js +13 -0
- package/dist/runtime/plugins/experimental-size-plugin.mjs +13 -0
- package/dist/runtime/plugins/sample-plugin.d.ts +20 -0
- package/dist/runtime/plugins/sample-plugin.js +5 -0
- package/dist/runtime/plugins/sample-plugin.mjs +5 -0
- package/dist/runtime/plugins/theme-provider.d.ts +30 -0
- package/dist/runtime/plugins/theme-provider.js +46 -0
- package/dist/runtime/plugins/theme-provider.mjs +46 -0
- package/dist/runtime/public/scss/element-plus/affix.css +277 -0
- package/dist/runtime/public/scss/element-plus/alert.css +420 -0
- package/dist/runtime/public/scss/element-plus/anchor-link.css +304 -0
- package/dist/runtime/public/scss/element-plus/anchor.css +348 -0
- package/dist/runtime/public/scss/element-plus/aside.css +280 -0
- package/dist/runtime/public/scss/element-plus/autocomplete.css +383 -0
- package/dist/runtime/public/scss/element-plus/avatar.css +320 -0
- package/dist/runtime/public/scss/element-plus/backtop.css +298 -0
- package/dist/runtime/public/scss/element-plus/badge.css +348 -0
- package/dist/runtime/public/scss/element-plus/base.css +522 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb.css +330 -0
- package/dist/runtime/public/scss/element-plus/button-group.css +413 -0
- package/dist/runtime/public/scss/element-plus/button.css +1043 -0
- package/dist/runtime/public/scss/element-plus/calendar.css +342 -0
- package/dist/runtime/public/scss/element-plus/card.css +312 -0
- package/dist/runtime/public/scss/element-plus/carousel-item.css +322 -0
- package/dist/runtime/public/scss/element-plus/carousel.css +447 -0
- package/dist/runtime/public/scss/element-plus/cascader-panel.css +400 -0
- package/dist/runtime/public/scss/element-plus/cascader.css +532 -0
- package/dist/runtime/public/scss/element-plus/check-tag.css +358 -0
- package/dist/runtime/public/scss/element-plus/checkbox-button.css +418 -0
- package/dist/runtime/public/scss/element-plus/checkbox-group.css +279 -0
- package/dist/runtime/public/scss/element-plus/checkbox.css +560 -0
- package/dist/runtime/public/scss/element-plus/col.css +3242 -0
- package/dist/runtime/public/scss/element-plus/collapse-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/collapse-transition.css +0 -0
- package/dist/runtime/public/scss/element-plus/collapse.css +462 -0
- package/dist/runtime/public/scss/element-plus/color/index.css +0 -0
- package/dist/runtime/public/scss/element-plus/color-picker.css +622 -0
- package/dist/runtime/public/scss/element-plus/common/popup.css +310 -0
- package/dist/runtime/public/scss/element-plus/common/transition.css +392 -0
- package/dist/runtime/public/scss/element-plus/common/var.css +274 -0
- package/dist/runtime/public/scss/element-plus/config-provider.css +0 -0
- package/dist/runtime/public/scss/element-plus/container.css +285 -0
- package/dist/runtime/public/scss/element-plus/dark/css-vars.css +325 -0
- package/dist/runtime/public/scss/element-plus/dark/var.css +274 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-picker.css +496 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-range-picker.css +378 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-table.css +398 -0
- package/dist/runtime/public/scss/element-plus/date-picker/month-table.css +360 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker-panel.css +391 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker.css +634 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-picker.css +344 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-range-picker.css +303 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-spinner.css +362 -0
- package/dist/runtime/public/scss/element-plus/date-picker/year-table.css +356 -0
- package/dist/runtime/public/scss/element-plus/date-picker.css +1447 -0
- package/dist/runtime/public/scss/element-plus/descriptions-item.css +307 -0
- package/dist/runtime/public/scss/element-plus/descriptions.css +373 -0
- package/dist/runtime/public/scss/element-plus/dialog.css +484 -0
- package/dist/runtime/public/scss/element-plus/display.css +329 -0
- package/dist/runtime/public/scss/element-plus/divider.css +317 -0
- package/dist/runtime/public/scss/element-plus/drawer.css +391 -0
- package/dist/runtime/public/scss/element-plus/dropdown-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown-menu.css +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown.css +464 -0
- package/dist/runtime/public/scss/element-plus/empty.css +327 -0
- package/dist/runtime/public/scss/element-plus/footer.css +282 -0
- package/dist/runtime/public/scss/element-plus/form-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/form.css +499 -0
- package/dist/runtime/public/scss/element-plus/header.css +282 -0
- package/dist/runtime/public/scss/element-plus/icon.css +315 -0
- package/dist/runtime/public/scss/element-plus/image-viewer.css +411 -0
- package/dist/runtime/public/scss/element-plus/image.css +315 -0
- package/dist/runtime/public/scss/element-plus/index.css +16702 -0
- package/dist/runtime/public/scss/element-plus/infinite-scroll.css +0 -0
- package/dist/runtime/public/scss/element-plus/input-number.css +450 -0
- package/dist/runtime/public/scss/element-plus/input.css +742 -0
- package/dist/runtime/public/scss/element-plus/link.css +422 -0
- package/dist/runtime/public/scss/element-plus/loading.css +363 -0
- package/dist/runtime/public/scss/element-plus/main.css +283 -0
- package/dist/runtime/public/scss/element-plus/mention.css +385 -0
- package/dist/runtime/public/scss/element-plus/menu-item-group.css +0 -0
- package/dist/runtime/public/scss/element-plus/menu-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/menu.css +709 -0
- package/dist/runtime/public/scss/element-plus/message-box.css +501 -0
- package/dist/runtime/public/scss/element-plus/message.css +398 -0
- package/dist/runtime/public/scss/element-plus/mixins/config.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/function.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/mixins.css +274 -0
- package/dist/runtime/public/scss/element-plus/mixins/utils.css +0 -0
- package/dist/runtime/public/scss/element-plus/notification.css +381 -0
- package/dist/runtime/public/scss/element-plus/option-group.css +303 -0
- package/dist/runtime/public/scss/element-plus/option.css +325 -0
- package/dist/runtime/public/scss/element-plus/overlay.css +289 -0
- package/dist/runtime/public/scss/element-plus/page-header.css +323 -0
- package/dist/runtime/public/scss/element-plus/pagination.css +533 -0
- package/dist/runtime/public/scss/element-plus/popconfirm.css +287 -0
- package/dist/runtime/public/scss/element-plus/popover.css +324 -0
- package/dist/runtime/public/scss/element-plus/popper.css +372 -0
- package/dist/runtime/public/scss/element-plus/progress.css +421 -0
- package/dist/runtime/public/scss/element-plus/radio-button.css +402 -0
- package/dist/runtime/public/scss/element-plus/radio-group.css +280 -0
- package/dist/runtime/public/scss/element-plus/radio.css +533 -0
- package/dist/runtime/public/scss/element-plus/rate.css +356 -0
- package/dist/runtime/public/scss/element-plus/reset.css +371 -0
- package/dist/runtime/public/scss/element-plus/result.css +353 -0
- package/dist/runtime/public/scss/element-plus/row.css +311 -0
- package/dist/runtime/public/scss/element-plus/scrollbar.css +345 -0
- package/dist/runtime/public/scss/element-plus/segmented.css +432 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown-v2.css +323 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown.css +323 -0
- package/dist/runtime/public/scss/element-plus/select-v2.css +740 -0
- package/dist/runtime/public/scss/element-plus/select.css +740 -0
- package/dist/runtime/public/scss/element-plus/skeleton-item.css +344 -0
- package/dist/runtime/public/scss/element-plus/skeleton.css +307 -0
- package/dist/runtime/public/scss/element-plus/slider.css +452 -0
- package/dist/runtime/public/scss/element-plus/space.css +289 -0
- package/dist/runtime/public/scss/element-plus/spinner.css +314 -0
- package/dist/runtime/public/scss/element-plus/statistic.css +308 -0
- package/dist/runtime/public/scss/element-plus/step.css +558 -0
- package/dist/runtime/public/scss/element-plus/steps.css +291 -0
- package/dist/runtime/public/scss/element-plus/sub-menu.css +0 -0
- package/dist/runtime/public/scss/element-plus/switch.css +498 -0
- package/dist/runtime/public/scss/element-plus/tab-pane.css +0 -0
- package/dist/runtime/public/scss/element-plus/table-column.css +354 -0
- package/dist/runtime/public/scss/element-plus/table-v2.css +492 -0
- package/dist/runtime/public/scss/element-plus/table.css +865 -0
- package/dist/runtime/public/scss/element-plus/tabs.css +864 -0
- package/dist/runtime/public/scss/element-plus/tag.css +596 -0
- package/dist/runtime/public/scss/element-plus/text.css +344 -0
- package/dist/runtime/public/scss/element-plus/time-picker.css +942 -0
- package/dist/runtime/public/scss/element-plus/time-select.css +884 -0
- package/dist/runtime/public/scss/element-plus/timeline-item.css +387 -0
- package/dist/runtime/public/scss/element-plus/timeline.css +306 -0
- package/dist/runtime/public/scss/element-plus/tooltip-v2.css +382 -0
- package/dist/runtime/public/scss/element-plus/tooltip.css +0 -0
- package/dist/runtime/public/scss/element-plus/tour.css +433 -0
- package/dist/runtime/public/scss/element-plus/transfer.css +469 -0
- package/dist/runtime/public/scss/element-plus/tree-select.css +297 -0
- package/dist/runtime/public/scss/element-plus/tree.css +510 -0
- package/dist/runtime/public/scss/element-plus/upload.css +834 -0
- package/dist/runtime/public/scss/element-plus/var.css +361 -0
- package/dist/runtime/public/scss/element-plus/virtual-list.css +302 -0
- package/dist/runtime/public/scss/theme.css +1191 -0
- package/dist/runtime/server/tsconfig.json +6 -0
- package/dist/runtime/types.d.ts +40 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +29 -12
- package/components/TimusIcons.vue +0 -54
- package/generate-icon.js +0 -22
- package/module.ts +0 -84
- package/pages/icons.vue +0 -46
- package/plugins/sample-plugin.ts +0 -5
- package/public/isax/fonts/iconsax.svg +0 -927
- package/public/isax/fonts/iconsax.ttf +0 -0
- package/public/isax/fonts/iconsax.woff +0 -0
- package/public/isax/icons.json +0 -899
- package/public/isax/selection.json +0 -1
- package/public/isax/style.css +0 -1
- package/public/isax/style.scss +0 -5435
- package/public/isax/variables.scss +0 -900
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# @timus-networks/fonts
|
|
2
|
+
|
|
3
|
+
Nuxt module for Font Installation.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Usage](#usage)
|
|
9
|
+
- [Configuration](#configuration)
|
|
10
|
+
- [Scripts](#scripts)
|
|
11
|
+
- [Contributing](#contributing)
|
|
12
|
+
- [License](#license)
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
To install this module, you can use npm or yarn:
|
|
17
|
+
|
|
18
|
+
### npm
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install @timus-networks/fonts
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### yarn
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
yarn add @timus-networks/fonts
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
1. To use this module in your Nuxt 3 project, add it to your `nuxt.config.ts`:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
export default defineNuxtConfig({
|
|
36
|
+
modules: ['@timus-networks/fonts'],
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. Add below configuration to your **nuxt.config.js** file.
|
|
41
|
+
|
|
42
|
+
<sub>nuxt.config.js</sub>
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
tailwindcss: {
|
|
46
|
+
// cssPath: '~/static/scss/main.scss',
|
|
47
|
+
configPath: '@/tailwind.config.js',
|
|
48
|
+
exposeConfig: false,
|
|
49
|
+
exposeLevel: 2,
|
|
50
|
+
config: {
|
|
51
|
+
darkMode: 'class',
|
|
52
|
+
},
|
|
53
|
+
injectPosition: 'first',
|
|
54
|
+
viewer: true,
|
|
55
|
+
},
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Add below code to your **tailwind.config.js** file
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
// tint & shade color generator
|
|
62
|
+
function generateColors(baseName, start = 100, end = 900, step = 100) {
|
|
63
|
+
const colors = {};
|
|
64
|
+
for (let i = start; i <= end; i += step) {
|
|
65
|
+
colors[i] = `var(--${baseName}-${i})`;
|
|
66
|
+
}
|
|
67
|
+
return colors;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const colorNames = ['primary', 'secondary', 'gray', 'danger', 'success', 'warning', 'info'];
|
|
71
|
+
|
|
72
|
+
const colors = colorNames.reduce((acc, color) => {
|
|
73
|
+
return { ...acc, [`${color}`]: generateColors(color, 100, 900) };
|
|
74
|
+
}, {});
|
|
75
|
+
|
|
76
|
+
module.exports = {
|
|
77
|
+
content: ['./pages/**/*.{html,js}'],
|
|
78
|
+
theme: {
|
|
79
|
+
extend: {
|
|
80
|
+
colors: colors,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
plugins: [],
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
You can configure the module with the following options in your `nuxt.config.ts`:
|
|
90
|
+
There are 2 type fonts exist currently: Poppins or Satoshi. Default font is `Poppins`. You can change it manually using `font: { family: 'Satoshi' }` option or add option with module.
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
export default defineNuxtConfig({
|
|
94
|
+
modules: [['@timus-networks/fonts', { family: 'Poppins' }]],
|
|
95
|
+
// Or add your custom configurations using font attribute
|
|
96
|
+
font: { family: 'Satoshi' },
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Scripts
|
|
101
|
+
|
|
102
|
+
The following npm scripts are available:
|
|
103
|
+
|
|
104
|
+
- `test`: Run tests using Vitest.
|
|
105
|
+
- `test:watch`: Run tests in watch mode.
|
|
106
|
+
- `test:types`: Check TypeScript types.
|
|
107
|
+
- `lint:prettier`: Lint code using Prettier.
|
|
108
|
+
- `lint:eslint`: Lint code using ESLint.
|
|
109
|
+
- `lint:stylelint`: Lint styles using Stylelint.
|
|
110
|
+
- `fix`: Fix linting errors.
|
|
111
|
+
- `prepack`: Run the prepack script.
|
|
112
|
+
- `pub`: Publish the module.
|
|
113
|
+
- `release`: Release a new version.
|
|
114
|
+
|
|
115
|
+
## Contributing
|
|
116
|
+
|
|
117
|
+
If you would like to contribute, please follow these guidelines:
|
|
118
|
+
|
|
119
|
+
1. Fork the repository.
|
|
120
|
+
2. Create a new branch for your feature or bug fix.
|
|
121
|
+
3. Commit your changes.
|
|
122
|
+
4. Push your branch and create a pull request.
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
This project is licensed under the MIT License.
|
|
127
|
+
|
|
128
|
+
<sub>Source for Poppins https://github.com/webfontworld/Poppins, Source for Satoshi https://www.fontshare.com/fonts/satoshi</sub>
|
package/dist/module.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { ModuleOptions } from 'nuxt/schema';
|
|
3
|
+
|
|
4
|
+
interface MyModuleOptions extends ModuleOptions {
|
|
5
|
+
moduleName: string;
|
|
6
|
+
version: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: _nuxt_schema.NuxtModule<MyModuleOptions>;
|
|
10
|
+
|
|
11
|
+
export { type MyModuleOptions, _default as default };
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { ModuleOptions } from 'nuxt/schema';
|
|
3
|
+
|
|
4
|
+
interface MyModuleOptions extends ModuleOptions {
|
|
5
|
+
moduleName: string;
|
|
6
|
+
version: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: _nuxt_schema.NuxtModule<MyModuleOptions>;
|
|
10
|
+
|
|
11
|
+
export { type MyModuleOptions, _default as default };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { readdirSync } from 'node:fs';
|
|
2
|
+
import { resolve, parse, join } from 'node:path';
|
|
3
|
+
import { defineNuxtModule, createResolver, addPlugin, addComponent } from 'nuxt/kit';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
// -- Unbuild CommonJS Shims --
|
|
8
|
+
import __cjs_url__ from 'url';
|
|
9
|
+
import __cjs_path__ from 'path';
|
|
10
|
+
import __cjs_mod__ from 'module';
|
|
11
|
+
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = __cjs_path__.dirname(__filename);
|
|
13
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
14
|
+
const name = "@timus-networks/theme";
|
|
15
|
+
const version = "2.0.1";
|
|
16
|
+
const description = "A comprehensive Nuxt.js module providing a tailored theme experience with integrated TailwindCSS support for applications.";
|
|
17
|
+
const type = "module";
|
|
18
|
+
const exports = {
|
|
19
|
+
".": {
|
|
20
|
+
types: "./dist/types.d.ts",
|
|
21
|
+
"import": "./dist/module.mjs",
|
|
22
|
+
require: "./dist/module.cjs"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const main = "./dist/module.cjs";
|
|
26
|
+
const types = "./dist/types.d.ts";
|
|
27
|
+
const files = [
|
|
28
|
+
"dist"
|
|
29
|
+
];
|
|
30
|
+
const scripts = {
|
|
31
|
+
test: "vitest run",
|
|
32
|
+
"test:watch": "vitest watch",
|
|
33
|
+
"test:types": "vue-tsc --noEmit",
|
|
34
|
+
"lint:prettier": "npx prettier --write --list-different \"{**/*.js,**/*.vue,**/*.scss,!(node*)**/*.js}\"",
|
|
35
|
+
"lint:eslint": "eslint --ext \".js,.ts,.vue,.json\" .",
|
|
36
|
+
"lint:stylelint": "stylelint \"**/*.{scss,sass,html,vue}\"",
|
|
37
|
+
fix: "npm run lint:prettier && npm run lint:eslint -- --fix && npm run lint:stylelint -- --fix",
|
|
38
|
+
pub: "npm publish",
|
|
39
|
+
sass: "node generate-sass.js",
|
|
40
|
+
prepack: "nuxt-module-build build",
|
|
41
|
+
release: "npm run prepack && changelogen --release && npm run pub && git push --follow-tags"
|
|
42
|
+
};
|
|
43
|
+
const repository = {
|
|
44
|
+
type: "git",
|
|
45
|
+
url: "https://bitbucket.org/timus-networks/timus.modules.git"
|
|
46
|
+
};
|
|
47
|
+
const keywords = [
|
|
48
|
+
"nuxt",
|
|
49
|
+
"nuxt3",
|
|
50
|
+
"module",
|
|
51
|
+
"component",
|
|
52
|
+
"vue",
|
|
53
|
+
"vue3",
|
|
54
|
+
"theme",
|
|
55
|
+
"tailwind"
|
|
56
|
+
];
|
|
57
|
+
const peerDependencies = {
|
|
58
|
+
vue: "^3.x"
|
|
59
|
+
};
|
|
60
|
+
const author = "Serkan Konakcı<serkan.konakci@timusnetworks.com>";
|
|
61
|
+
const license = "MIT";
|
|
62
|
+
const dependencies = {
|
|
63
|
+
"@nuxt/kit": "*",
|
|
64
|
+
tailwindcss: "*",
|
|
65
|
+
"vue-tsc": "^2.0.29"
|
|
66
|
+
};
|
|
67
|
+
const devDependencies = {
|
|
68
|
+
changelogen: "^0.5.5",
|
|
69
|
+
sass: "*",
|
|
70
|
+
"sass-loader": "*"
|
|
71
|
+
};
|
|
72
|
+
const PackageJson = {
|
|
73
|
+
name: name,
|
|
74
|
+
version: version,
|
|
75
|
+
description: description,
|
|
76
|
+
type: type,
|
|
77
|
+
exports: exports,
|
|
78
|
+
main: main,
|
|
79
|
+
types: types,
|
|
80
|
+
files: files,
|
|
81
|
+
scripts: scripts,
|
|
82
|
+
repository: repository,
|
|
83
|
+
keywords: keywords,
|
|
84
|
+
peerDependencies: peerDependencies,
|
|
85
|
+
author: author,
|
|
86
|
+
license: license,
|
|
87
|
+
dependencies: dependencies,
|
|
88
|
+
devDependencies: devDependencies
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const folderPath = "./runtime";
|
|
92
|
+
const module = defineNuxtModule({
|
|
93
|
+
meta: {
|
|
94
|
+
name: PackageJson.name,
|
|
95
|
+
configKey: "themeOptions"
|
|
96
|
+
},
|
|
97
|
+
defaults: {
|
|
98
|
+
moduleName: PackageJson.name,
|
|
99
|
+
version: PackageJson.version,
|
|
100
|
+
description: PackageJson.description
|
|
101
|
+
},
|
|
102
|
+
hooks: {
|
|
103
|
+
"pages:extend": (pages) => {
|
|
104
|
+
const resolver = createResolver(import.meta.url);
|
|
105
|
+
pages.push({
|
|
106
|
+
name: "theme",
|
|
107
|
+
path: "/theme",
|
|
108
|
+
mode: "client",
|
|
109
|
+
file: resolver.resolve(`${folderPath}/pages/theme.vue`)
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
"nitro:config": async (nitroConfig) => {
|
|
113
|
+
nitroConfig.publicAssets ||= [];
|
|
114
|
+
nitroConfig.publicAssets.push({
|
|
115
|
+
dir: resolve(__dirname, `${folderPath}/public`),
|
|
116
|
+
maxAge: 60 * 60 * 24 * 365
|
|
117
|
+
// 1 year
|
|
118
|
+
});
|
|
119
|
+
nitroConfig.prerender = {
|
|
120
|
+
...nitroConfig.prerender,
|
|
121
|
+
...{ failOnError: false }
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
setup(options, nuxt) {
|
|
126
|
+
const resolver = createResolver(import.meta.url);
|
|
127
|
+
console.info(`'${PackageJson.name}' loaded. Version:${options.version}`);
|
|
128
|
+
const components_dir_list = ["runtime/components"];
|
|
129
|
+
const addComponentFromFolder = (folder) => {
|
|
130
|
+
const path = resolve(__dirname, folder);
|
|
131
|
+
const files = readdirSync(path);
|
|
132
|
+
files.forEach((file) => {
|
|
133
|
+
const { name } = parse(file);
|
|
134
|
+
addComponent({
|
|
135
|
+
name: join(name),
|
|
136
|
+
filePath: resolve(path, file),
|
|
137
|
+
mode: "client"
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
components_dir_list.forEach((folder) => {
|
|
142
|
+
addComponentFromFolder(folder);
|
|
143
|
+
});
|
|
144
|
+
addPlugin(resolver.resolve(`${folderPath}/plugins/sample-plugin`));
|
|
145
|
+
addPlugin(resolver.resolve(`${folderPath}/plugins/theme-provider`));
|
|
146
|
+
nuxt.options.runtimeConfig.public.theme = {
|
|
147
|
+
...options,
|
|
148
|
+
types: options.types,
|
|
149
|
+
sizes: options.sizes
|
|
150
|
+
};
|
|
151
|
+
nuxt.options.css.push(resolver.resolve(`${folderPath}/public/scss/theme.scss`));
|
|
152
|
+
nuxt.options.css.push(resolver.resolve(`${folderPath}/public/scss/element-plus/index.scss`));
|
|
153
|
+
nuxt.hook("prepare:types", ({ references }) => {
|
|
154
|
+
references.push({ path: resolver.resolve(`${folderPath}/types.d.ts`) });
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
export { module as default };
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Buttons</h1>
|
|
4
|
+
<p>Element Plus Button is a customizable and versatile UI component designed for creating interactive and visually appealing buttons in web applications.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header>
|
|
8
|
+
<div class="flex flex-col gap-3 items-start">
|
|
9
|
+
<h2>Sizes</h2>
|
|
10
|
+
<p>
|
|
11
|
+
Default size is Large. Button component provides {{ sizes.length }} additional sizes for you to choose among different scenarios. Use attribute size to set additional
|
|
12
|
+
sizes <el-text tag="mark">{{ sizes.join(', ') }}</el-text>
|
|
13
|
+
</p>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<div class="flex gap-4">
|
|
17
|
+
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size">{{ capitalize(size) }}</el-button>
|
|
18
|
+
</div>
|
|
19
|
+
<template #footer>
|
|
20
|
+
<code class="flex flex-col gap-3 items-start">
|
|
21
|
+
<el-tag type="neutral"><el-button :size="small">small</el-button></el-tag>
|
|
22
|
+
</code>
|
|
23
|
+
</template>
|
|
24
|
+
</el-card>
|
|
25
|
+
|
|
26
|
+
<el-card>
|
|
27
|
+
<template #header>
|
|
28
|
+
<div class="flex flex-col gap-3 items-start">
|
|
29
|
+
<h2>Rounded</h2>
|
|
30
|
+
<p>
|
|
31
|
+
A rounded button in Element Plus features slightly curved corners, providing a softer and more modern appearance to your UI elements. To apply it add
|
|
32
|
+
<el-text tag="mark">round</el-text> to button
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<div class="flex gap-4">
|
|
37
|
+
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" round>{{ capitalize(size) }}</el-button>
|
|
38
|
+
</div>
|
|
39
|
+
<template #footer>
|
|
40
|
+
<code class="flex flex-col gap-3 items-start">
|
|
41
|
+
<el-tag type="neutral"><el-button round>small</el-button></el-tag>
|
|
42
|
+
</code>
|
|
43
|
+
</template>
|
|
44
|
+
</el-card>
|
|
45
|
+
|
|
46
|
+
<el-card>
|
|
47
|
+
<template #header>
|
|
48
|
+
<div class="flex flex-col gap-3 items-start">
|
|
49
|
+
<h2>Colors</h2>
|
|
50
|
+
<p>
|
|
51
|
+
The type prop in Element Plus Button allows you to select from predefined styles such as
|
|
52
|
+
<el-text tag="mark">'primary', 'secondary', 'neutral', 'success', 'warning', 'info', and 'danger'</el-text> to visually distinguish buttons based on their purpose and
|
|
53
|
+
importance within your application.
|
|
54
|
+
</p>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
<div class="flex gap-4 flex-wrap">
|
|
58
|
+
<el-button v-for="(color, index) of colors" :key="color + index" :type="color">{{ color }}</el-button>
|
|
59
|
+
</div>
|
|
60
|
+
<template #footer>
|
|
61
|
+
<code class="flex flex-col gap-3 items-start">
|
|
62
|
+
<el-tag type="neutral"><el-button :type="success">success</el-button></el-tag>
|
|
63
|
+
</code>
|
|
64
|
+
</template>
|
|
65
|
+
</el-card>
|
|
66
|
+
|
|
67
|
+
<el-card>
|
|
68
|
+
<template #header>
|
|
69
|
+
<div class="flex flex-col gap-3 items-start">
|
|
70
|
+
<h2>Outline / Plain</h2>
|
|
71
|
+
<p>
|
|
72
|
+
The plain prop in Element Plus Button creates a button with a transparent background, offering a subtle and minimalistic look. Add
|
|
73
|
+
<el-text tag="mark">plain</el-text> to the button to make it outlined."
|
|
74
|
+
</p>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
<div class="flex gap-4 flex-wrap">
|
|
78
|
+
<el-button v-for="(color, index) of colors" :key="color + index" :type="color" plain>{{ color }}</el-button>
|
|
79
|
+
</div>
|
|
80
|
+
<template #footer>
|
|
81
|
+
<code class="flex flex-col gap-3 items-start">
|
|
82
|
+
<el-tag type="neutral"><el-button plain>success</el-button></el-tag>
|
|
83
|
+
</code>
|
|
84
|
+
</template>
|
|
85
|
+
</el-card>
|
|
86
|
+
|
|
87
|
+
<el-card>
|
|
88
|
+
<template #header>
|
|
89
|
+
<div class="flex flex-col gap-3 items-start">
|
|
90
|
+
<h2>Ghost / Text</h2>
|
|
91
|
+
<p>
|
|
92
|
+
The plain prop in Element Plus Button creates a button with a transparent background, offering a subtle and minimalistic look. Add <el-text tag="mark">text</el-text>
|
|
93
|
+
to the button to make it ghost."
|
|
94
|
+
</p>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
<div class="flex gap-4 flex-wrap">
|
|
98
|
+
<el-button v-for="(color, index) of colors" :key="color + index" :type="color" text>{{ color }}</el-button>
|
|
99
|
+
</div>
|
|
100
|
+
<template #footer>
|
|
101
|
+
<code class="flex flex-col gap-3 items-start">
|
|
102
|
+
<el-tag type="neutral"><el-button text>success</el-button></el-tag>
|
|
103
|
+
</code>
|
|
104
|
+
</template>
|
|
105
|
+
</el-card>
|
|
106
|
+
|
|
107
|
+
<el-card>
|
|
108
|
+
<template #header>
|
|
109
|
+
<div class="flex flex-col gap-3 items-start">
|
|
110
|
+
<h2>Disabled</h2>
|
|
111
|
+
<p>
|
|
112
|
+
The <code><el-text tag="mark">disabled</el-text></code> attribute determines if the button is disabled. Use disabled attribute to determine whether a button is
|
|
113
|
+
disabled. It accepts a Boolean value.
|
|
114
|
+
</p>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
<div class="flex flex-col gap-4">
|
|
118
|
+
<div class="flex gap-4 flex-wrap">
|
|
119
|
+
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" disabled type="primary">{{ capitalize(size) }}</el-button>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="flex gap-4 flex-wrap">
|
|
122
|
+
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" type="primary" disabled plain>{{ capitalize(size) }}</el-button>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="flex gap-4 flex-wrap">
|
|
125
|
+
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" type="primary" disabled text>{{ capitalize(size) }}</el-button>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<template #footer>
|
|
129
|
+
<code class="flex flex-col gap-3 items-start">
|
|
130
|
+
<el-tag type="neutral"><el-button :size="small">small</el-button></el-tag>
|
|
131
|
+
</code>
|
|
132
|
+
</template>
|
|
133
|
+
</el-card>
|
|
134
|
+
|
|
135
|
+
<el-card>
|
|
136
|
+
<template #header>
|
|
137
|
+
<div class="flex flex-col gap-3 items-start">
|
|
138
|
+
<h2>Icon Button</h2>
|
|
139
|
+
<p>
|
|
140
|
+
Use <el-text tag="mark">icons</el-text> to add more meaning to Button. You can use icon alone to save some space, or use it with text. Use the icon attribute to add
|
|
141
|
+
icon. You can find the icon list in Element Plus icon component. Adding icons to the right side of the text is achievable with an
|
|
142
|
+
<span class="font-medium"><i ></span> tag. Custom icons can be used as well.
|
|
143
|
+
</p>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
<div class="flex gap-4">
|
|
147
|
+
<el-button :icon="ElIconEdit" />
|
|
148
|
+
<el-button :icon="ElIconShare" />
|
|
149
|
+
<el-button :icon="ElIconDelete" size="small" type="danger" />
|
|
150
|
+
<el-button :icon="ElIconDelete" size="mini" type="danger" />
|
|
151
|
+
<el-button :icon="ElIconSearch">Search</el-button>
|
|
152
|
+
<el-button class="isax-add-circle">Search</el-button>
|
|
153
|
+
<el-button>
|
|
154
|
+
Upload<el-icon class="el-icon--right"><ElIconUpload /></el-icon>
|
|
155
|
+
</el-button>
|
|
156
|
+
</div>
|
|
157
|
+
<template #footer>
|
|
158
|
+
<code class="flex flex-col gap-3 items-start">
|
|
159
|
+
<el-tag type="neutral"><el-button :icon="ElIconShare" /></el-tag>
|
|
160
|
+
<el-tag type="neutral"> <el-button>Upload<el-icon class="el-icon--right"><ElIconUpload /></el-icon></el-button> </el-tag>
|
|
161
|
+
</code>
|
|
162
|
+
</template>
|
|
163
|
+
</el-card>
|
|
164
|
+
|
|
165
|
+
<el-card>
|
|
166
|
+
<template #header>
|
|
167
|
+
<div class="flex flex-col gap-3 items-start">
|
|
168
|
+
<h2>Button Group</h2>
|
|
169
|
+
<p>
|
|
170
|
+
Displayed as a button group, can be used to group a series of similar operations. Use tag <el-text tag="mark"><el-button-groupn></el-text> to group your buttons.
|
|
171
|
+
</p>
|
|
172
|
+
</div>
|
|
173
|
+
</template>
|
|
174
|
+
<div class="flex gap-4">
|
|
175
|
+
<el-button-group>
|
|
176
|
+
<el-button type="primary" :icon="ElIconArrowLeft">Previous Page</el-button>
|
|
177
|
+
<el-button type="primary">
|
|
178
|
+
Next Page<el-icon class="el-icon--right"><ElIconArrowRight /></el-icon>
|
|
179
|
+
</el-button>
|
|
180
|
+
</el-button-group>
|
|
181
|
+
</div>
|
|
182
|
+
<template #footer>
|
|
183
|
+
<html-encode :tag="snippets.group" />
|
|
184
|
+
</template>
|
|
185
|
+
</el-card>
|
|
186
|
+
|
|
187
|
+
<el-card>
|
|
188
|
+
<template #header>
|
|
189
|
+
<div class="flex flex-col gap-3 items-start">
|
|
190
|
+
<h2>Tag</h2>
|
|
191
|
+
<p>You can custom element <el-text tag="mark">tag</el-text>, For example button, div, a, router-link, nuxt-link.</p>
|
|
192
|
+
</div>
|
|
193
|
+
</template>
|
|
194
|
+
<div class="flex gap-4">
|
|
195
|
+
<el-button tag="div" role="button" tabindex="0">div</el-button>
|
|
196
|
+
<el-button type="primary" tag="a" href="https://github.com/element-plus/element-plus" target="_blank" rel="noopener noreferrer"> a </el-button>
|
|
197
|
+
</div>
|
|
198
|
+
<template #footer>
|
|
199
|
+
<code class="flex flex-col gap-3 items-start">
|
|
200
|
+
<el-tag type="neutral"><el-button tag="div" role="button" tabindex="0">div</el-button></el-tag>
|
|
201
|
+
<el-tag type="neutral">
|
|
202
|
+
<el-button type="primary" tag="a" href="https://github.com/element-plus/element-plus" target="_blank" rel="noopener
|
|
203
|
+
noreferrer" > a </el-button>
|
|
204
|
+
</el-tag>
|
|
205
|
+
</code>
|
|
206
|
+
</template>
|
|
207
|
+
</el-card>
|
|
208
|
+
</div>
|
|
209
|
+
</template>
|
|
210
|
+
|
|
211
|
+
<script>
|
|
212
|
+
import { defineComponent } from "vue";
|
|
213
|
+
export default defineComponent({
|
|
214
|
+
name: "TimusButton",
|
|
215
|
+
data() {
|
|
216
|
+
return {
|
|
217
|
+
sizes: ["default", "large", "medium", "small", "mini"],
|
|
218
|
+
colors: ["default", "primary", "secondary", "neutral", "success", "warning", "info", "danger"],
|
|
219
|
+
snippets: {
|
|
220
|
+
group: `
|
|
221
|
+
<el-button-group>
|
|
222
|
+
<el-button type="primary" :icon="ElIconArrowLeft">Previous Page</el-button>
|
|
223
|
+
<el-button type="primary">
|
|
224
|
+
Next Page<el-icon class="el-icon--right"><ElIconArrowRight /></el-icon>
|
|
225
|
+
</el-button>
|
|
226
|
+
</el-button-group>`
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
methods: {
|
|
231
|
+
capitalize(value) {
|
|
232
|
+
const text = String(value);
|
|
233
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {
|
|
2
|
+
sizes: string[];
|
|
3
|
+
colors: string[];
|
|
4
|
+
snippets: {
|
|
5
|
+
group: string;
|
|
6
|
+
};
|
|
7
|
+
}, {}, {
|
|
8
|
+
capitalize(value: string): string;
|
|
9
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
10
|
+
export default _default;
|