From 56c40021ba3f6843a868a84c43feee0daf165baf Mon Sep 17 00:00:00 2001 From: AntoXa PRO Date: Wed, 20 Sep 2023 14:09:22 +0300 Subject: [PATCH] big update --- index.html | 14 ++ package.json | 40 ++-- rollup.config.ts | 14 -- src/App.vue | 342 +++++++++++++++++++++++++++ src/components/Alert.vue | 21 +- src/components/Btn.vue | 42 +++- src/components/Card.vue | 10 +- src/components/Dialog.vue | 33 ++- src/components/Field.vue | 95 -------- src/components/FieldCheckbox.vue | 56 +++-- src/components/FieldDate.vue | 33 ++- src/components/FieldFile.vue | 57 +++++ src/components/FieldInput.vue | 64 +++++ src/components/FieldNumber.vue | 13 +- src/components/FieldPassword.vue | 13 +- src/components/FieldPhone.vue | 20 +- src/components/FieldSelect.vue | 68 ++++-- src/components/FieldSelectGender.vue | 2 +- src/components/FieldText.vue | 13 +- src/components/FieldTextArea.vue | 47 +++- src/components/FieldWrapper.vue | 36 +++ src/components/Form.vue | 73 +++--- src/components/Icon.vue | 22 +- src/components/IconVisibility.vue | 20 +- src/components/PickerDays.vue | 22 +- src/components/ToggleTheme.vue | 16 +- src/components/index.ts | 77 ++++-- src/icons.ts | 2 +- src/index.ts | 4 + src/main.ts | 3 + src/{css => style}/common.sass | 54 +++-- src/style/tailwind.sass | 3 + src/{css => style}/theme.sass | 10 +- tailwind.config.ts | 4 +- vite.config.ts | 30 +++ 35 files changed, 1049 insertions(+), 324 deletions(-) create mode 100644 index.html delete mode 100644 rollup.config.ts create mode 100644 src/App.vue delete mode 100644 src/components/Field.vue create mode 100644 src/components/FieldFile.vue create mode 100644 src/components/FieldInput.vue create mode 100644 src/components/FieldWrapper.vue create mode 100644 src/main.ts rename src/{css => style}/common.sass (74%) create mode 100644 src/style/tailwind.sass rename src/{css => style}/theme.sass (87%) create mode 100644 vite.config.ts diff --git a/index.html b/index.html new file mode 100644 index 0000000..6b0cc71 --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite + Vue + TS + + + +
+ + + diff --git a/package.json b/package.json index d6cc6db..90a48e9 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,25 @@ { "name": "axp-ui", "descriiption": "My helper ui lib", - "version": "1.6.3", + "version": "1.7.0", "homepage": "https://antoxahub.ru/antoxa/axp-ui", "repository": { "type": "git", "url": "https://antoxahub.ru/antoxa/axp-ui.git" }, - "module": "./dist/index.js", + "module": "./dist/index.mjs", + "main": "./dist/index.umd.js", + "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js" + "import": "./dist/index.mjs", + "requier": "./dist/index.umd.js" }, - "./styles/": [ - "./src/css/" - ], - "./tailwind.config": "./tailwind.config.ts" + "./tailwind.config": "./tailwind.config.ts", + "./style.css": "./dist/style.css", + "./style/*": "./src/style/*", + "./tsconfig.json": "./tsconfig.json" }, - "types": "./dist/index.d.ts", "files": [ "dist", "tsconfig.json", @@ -25,23 +27,23 @@ "src/css" ], "scripts": { - "build": "rollup -c --configPlugin rollup-plugin-typescript2", + "build": "vite build", + "dev": "vite", "prepare": "npm run build" }, - "dependencies": { - "axp-ts": "^1.9.6", + "peerDependencies": { + "axp-ts": "^1.9.10", "vue": "^3.3.4" }, "devDependencies": { - "autoprefixer": "^10.4.14", - "postcss": "^8.4.27", + "@vitejs/plugin-vue": "^4.3.4", + "autoprefixer": "^10.4.15", + "postcss": "^8.4.29", "prettier": "^2.8.8", - "rollup": "^3.27.0", - "rollup-plugin-sass": "^1.12.20", - "rollup-plugin-typescript2": "^0.35.0", - "rollup-plugin-vue": "^6.0.0", - "sass": "^1.64.2", + "sass": "^1.66.1", "tailwindcss": "^3.3.3", - "tslib": "^2.6.1" + "typescript": "^5.2.2", + "vite": "^4.4.9", + "vite-plugin-dts": "^3.5.3" } } diff --git a/rollup.config.ts b/rollup.config.ts deleted file mode 100644 index 94241ce..0000000 --- a/rollup.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from 'rollup' -import typescript from 'rollup-plugin-typescript2' -import vue from 'rollup-plugin-vue' -import sass from 'rollup-plugin-sass' - -export default defineConfig({ - input: 'src/index.ts', - output: { - format: 'esm', - dir: 'dist' - }, - plugins: [typescript(), vue(), sass()], - external: ['vue', 'axp-ts'], -}) diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..bf1a29c --- /dev/null +++ b/src/App.vue @@ -0,0 +1,342 @@ + + + + + diff --git a/src/components/Alert.vue b/src/components/Alert.vue index f92ce56..19cdc7e 100644 --- a/src/components/Alert.vue +++ b/src/components/Alert.vue @@ -1,14 +1,25 @@ - + +