@dronico/droni-kit 1.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/.github/workflows/release.yml +28 -0
- package/.storybook/main.ts +19 -0
- package/.storybook/preview.ts +14 -0
- package/.storybook/vitest.setup.ts +9 -0
- package/.vscode/extensions.json +3 -0
- package/CHANGELOG.md +24 -0
- package/README.md +5 -0
- package/dist/App.vue.d.ts +2 -0
- package/dist/components/HelloWorld.vue.d.ts +5 -0
- package/dist/droni-kit.css +1 -0
- package/dist/droni-kit.js +76 -0
- package/dist/droni-kit.umd.cjs +1 -0
- package/dist/main.d.ts +0 -0
- package/dist/stories/Button.stories.d.ts +42 -0
- package/dist/stories/Button.vue.d.ts +26 -0
- package/dist/stories/Header.stories.d.ts +59 -0
- package/dist/stories/Header.vue.d.ts +15 -0
- package/dist/stories/Page.stories.d.ts +19 -0
- package/dist/stories/Page.vue.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/index.html +13 -0
- package/package.json +56 -0
- package/public/vite.svg +1 -0
- package/release.config.ts +23 -0
- package/src/App.vue +30 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/HelloWorld.vue +41 -0
- package/src/main.ts +5 -0
- package/src/stories/Button.stories.ts +63 -0
- package/src/stories/Button.vue +48 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +48 -0
- package/src/stories/Header.vue +37 -0
- package/src/stories/Page.stories.ts +38 -0
- package/src/stories/Page.vue +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
- package/src/style.css +79 -0
- package/src/vite-env.d.ts +1 -0
- package/storybook-static/App.vue.d.ts +2 -0
- package/storybook-static/assets/Button-B2efaGtC.css +1 -0
- package/storybook-static/assets/Button-CoYrOF_8.js +1 -0
- package/storybook-static/assets/Button.stories-X_0VSq8O.js +26 -0
- package/storybook-static/assets/Color-YHDXOIA2-DLeC5Hg8.js +1 -0
- package/storybook-static/assets/Configure-bVvReBib.js +165 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-DfQH6b5n.js +26 -0
- package/storybook-static/assets/Header-3jNfoSF5.js +1 -0
- package/storybook-static/assets/Header-Ck-SSN7O.css +1 -0
- package/storybook-static/assets/Header.stories-DKH58MAE.js +11 -0
- package/storybook-static/assets/Page-CeeQJVdd.css +1 -0
- package/storybook-static/assets/Page.stories-C8t25IEs.js +17 -0
- package/storybook-static/assets/accessibility-W_h2acOZ.png +0 -0
- package/storybook-static/assets/addon-library-BWUCAmyN.png +0 -0
- package/storybook-static/assets/context-C0qIqeS4.png +0 -0
- package/storybook-static/assets/docs---vsFbMi.png +0 -0
- package/storybook-static/assets/entry-preview-CZIIErml.js +1 -0
- package/storybook-static/assets/entry-preview-docs-VgQ3afV1.js +16 -0
- package/storybook-static/assets/figma-plugin-CH2hELiO.png +0 -0
- package/storybook-static/assets/iframe-Ck6AF3FG.js +211 -0
- package/storybook-static/assets/index-BDOojamX.js +240 -0
- package/storybook-static/assets/index-Bx-go_-4.js +8 -0
- package/storybook-static/assets/index-C8GcTUhO.js +1 -0
- package/storybook-static/assets/index-DCUO3UO8.js +599 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/preview-B8lJiyuQ.js +34 -0
- package/storybook-static/assets/preview-BBWR9nbA.js +1 -0
- package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
- package/storybook-static/assets/preview-Bej7FSAj.js +1 -0
- package/storybook-static/assets/preview-CIRcjyVj.js +1 -0
- package/storybook-static/assets/preview-CvbIS5ZJ.js +1 -0
- package/storybook-static/assets/preview-CyK-uEc4.js +2 -0
- package/storybook-static/assets/preview-DD_OYowb.js +1 -0
- package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
- package/storybook-static/assets/share-DGA-UcQf.png +0 -0
- package/storybook-static/assets/styling-Bk6zjRzU.png +0 -0
- package/storybook-static/assets/testing-cbzR9l9r.png +0 -0
- package/storybook-static/assets/theming-D6WJLNoW.png +0 -0
- package/storybook-static/assets/vue.esm-bundler-DJJpJwIm.js +36 -0
- package/storybook-static/components/HelloWorld.vue.d.ts +5 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +666 -0
- package/storybook-static/index.html +181 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/main.d.ts +0 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +331 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +51 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +242 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/onboarding-9/manager-bundle.js +127 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-experimental-addon-test-11/manager-bundle.js +223 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +1051 -0
- package/storybook-static/sb-manager/globals-runtime.js +41591 -0
- package/storybook-static/sb-manager/globals.js +48 -0
- package/storybook-static/sb-manager/runtime.js +12048 -0
- package/storybook-static/stories/Button.stories.d.ts +42 -0
- package/storybook-static/stories/Button.vue.d.ts +26 -0
- package/storybook-static/stories/Header.stories.d.ts +59 -0
- package/storybook-static/stories/Header.vue.d.ts +15 -0
- package/storybook-static/stories/Page.stories.d.ts +19 -0
- package/storybook-static/stories/Page.vue.d.ts +2 -0
- package/storybook-static/vite.svg +1 -0
- package/tsconfig.app.json +14 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +24 -0
- package/vite.config.ts +28 -0
- package/vitest.workspace.ts +32 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- beta
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
issues: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: '22'
|
|
22
|
+
- run: npm i
|
|
23
|
+
- run: npm run build
|
|
24
|
+
- name: Release
|
|
25
|
+
env:
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
28
|
+
run: npm run release
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/vue3-vite';
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
"stories": [
|
|
5
|
+
"../src/**/*.mdx",
|
|
6
|
+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
|
|
7
|
+
],
|
|
8
|
+
"addons": [
|
|
9
|
+
"@storybook/addon-essentials",
|
|
10
|
+
"@storybook/addon-onboarding",
|
|
11
|
+
"@chromatic-com/storybook",
|
|
12
|
+
"@storybook/experimental-addon-test"
|
|
13
|
+
],
|
|
14
|
+
"framework": {
|
|
15
|
+
"name": "@storybook/vue3-vite",
|
|
16
|
+
"options": {}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export default config;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { beforeAll } from 'vitest';
|
|
2
|
+
import { setProjectAnnotations } from '@storybook/vue3';
|
|
3
|
+
import * as projectAnnotations from './preview';
|
|
4
|
+
|
|
5
|
+
// This is an important step to apply the right configuration when testing your stories.
|
|
6
|
+
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
|
7
|
+
const project = setProjectAnnotations([projectAnnotations]);
|
|
8
|
+
|
|
9
|
+
beforeAll(project.beforeAll);
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## [1.0.1](https://github.com/Droni-app/droni-kit/compare/v1.0.0...v1.0.1) (2025-04-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* public access ([d8b4a99](https://github.com/Droni-app/droni-kit/commit/d8b4a999d620d6f43f386e5d853722893992f8de))
|
|
7
|
+
|
|
8
|
+
# 1.0.0 (2025-04-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* node version ([29d60d7](https://github.com/Droni-app/droni-kit/commit/29d60d7fb761eb56124a4cc4f71bc1bb2c54f18c))
|
|
14
|
+
* release node 22 ([dfa6321](https://github.com/Droni-app/droni-kit/commit/dfa6321d6912d5859164e19876e26c576979fa48))
|
|
15
|
+
* remove cjs module ([40c2a53](https://github.com/Droni-app/droni-kit/commit/40c2a53fcfdb8391fcdc9ef3231d872aa7ed8cb8))
|
|
16
|
+
* simple release ([9b621fb](https://github.com/Droni-app/droni-kit/commit/9b621fbd639f5c276ea87b3a5b7c2330f4867df0))
|
|
17
|
+
* update package.json ([1fe5d74](https://github.com/Droni-app/droni-kit/commit/1fe5d74f263ea819e5067c50dfe66297cab499d8))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* dts plugin ([bee9bf6](https://github.com/Droni-app/droni-kit/commit/bee9bf68d7c86aab1d86c13b2f80883d1cd3f073))
|
|
23
|
+
* init version ([e041521](https://github.com/Droni-app/droni-kit/commit/e0415211f2ed19162f87d6d21ad4d1bbf64746ea))
|
|
24
|
+
* new action ([3295f9c](https://github.com/Droni-app/droni-kit/commit/3295f9ce5e6693ee93f4de293a726a983d387ecd))
|
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Vue 3 + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
msg: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.read-the-docs[data-v-cc337d8c]{color:#888}.logo[data-v-48d00746]{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo[data-v-48d00746]:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.vue[data-v-48d00746]:hover{filter:drop-shadow(0 0 2em #42b883aa)}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent as i, ref as g, createElementBlock as p, openBlock as u, Fragment as c, createElementVNode as t, toDisplayString as a, createTextVNode as l, createVNode as m, createApp as v } from "vue";
|
|
2
|
+
const h = "/vite.svg", _ = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e", f = { class: "card" }, k = /* @__PURE__ */ i({
|
|
3
|
+
__name: "HelloWorld",
|
|
4
|
+
props: {
|
|
5
|
+
msg: {}
|
|
6
|
+
},
|
|
7
|
+
setup(n) {
|
|
8
|
+
const s = g(0);
|
|
9
|
+
return (o, e) => (u(), p(c, null, [
|
|
10
|
+
t("h1", null, a(o.msg), 1),
|
|
11
|
+
t("div", f, [
|
|
12
|
+
t("button", {
|
|
13
|
+
type: "button",
|
|
14
|
+
onClick: e[0] || (e[0] = (r) => s.value++)
|
|
15
|
+
}, "count is " + a(s.value), 1),
|
|
16
|
+
e[1] || (e[1] = t("p", null, [
|
|
17
|
+
l(" Edit "),
|
|
18
|
+
t("code", null, "components/HelloWorld.vue"),
|
|
19
|
+
l(" to test HMR ")
|
|
20
|
+
], -1))
|
|
21
|
+
]),
|
|
22
|
+
e[2] || (e[2] = t("p", null, [
|
|
23
|
+
l(" Check out "),
|
|
24
|
+
t("a", {
|
|
25
|
+
href: "https://vuejs.org/guide/quick-start.html#local",
|
|
26
|
+
target: "_blank"
|
|
27
|
+
}, "create-vue"),
|
|
28
|
+
l(", the official Vue + Vite starter ")
|
|
29
|
+
], -1)),
|
|
30
|
+
e[3] || (e[3] = t("p", null, [
|
|
31
|
+
l(" Learn more about IDE Support for Vue in the "),
|
|
32
|
+
t("a", {
|
|
33
|
+
href: "https://vuejs.org/guide/scaling-up/tooling.html#ide-support",
|
|
34
|
+
target: "_blank"
|
|
35
|
+
}, "Vue Docs Scaling up Guide"),
|
|
36
|
+
l(". ")
|
|
37
|
+
], -1)),
|
|
38
|
+
e[4] || (e[4] = t("p", { class: "read-the-docs" }, "Click on the Vite and Vue logos to learn more", -1))
|
|
39
|
+
], 64));
|
|
40
|
+
}
|
|
41
|
+
}), d = (n, s) => {
|
|
42
|
+
const o = n.__vccOpts || n;
|
|
43
|
+
for (const [e, r] of s)
|
|
44
|
+
o[e] = r;
|
|
45
|
+
return o;
|
|
46
|
+
}, V = /* @__PURE__ */ d(k, [["__scopeId", "data-v-cc337d8c"]]), L = /* @__PURE__ */ i({
|
|
47
|
+
__name: "App",
|
|
48
|
+
setup(n) {
|
|
49
|
+
return (s, o) => (u(), p(c, null, [
|
|
50
|
+
o[0] || (o[0] = t("div", null, [
|
|
51
|
+
t("a", {
|
|
52
|
+
href: "https://vite.dev",
|
|
53
|
+
target: "_blank"
|
|
54
|
+
}, [
|
|
55
|
+
t("img", {
|
|
56
|
+
src: h,
|
|
57
|
+
class: "logo",
|
|
58
|
+
alt: "Vite logo"
|
|
59
|
+
})
|
|
60
|
+
]),
|
|
61
|
+
t("a", {
|
|
62
|
+
href: "https://vuejs.org/",
|
|
63
|
+
target: "_blank"
|
|
64
|
+
}, [
|
|
65
|
+
t("img", {
|
|
66
|
+
src: _,
|
|
67
|
+
class: "logo vue",
|
|
68
|
+
alt: "Vue logo"
|
|
69
|
+
})
|
|
70
|
+
])
|
|
71
|
+
], -1)),
|
|
72
|
+
m(V, { msg: "Vite + Vue" })
|
|
73
|
+
], 64));
|
|
74
|
+
}
|
|
75
|
+
}), w = /* @__PURE__ */ d(L, [["__scopeId", "data-v-48d00746"]]);
|
|
76
|
+
v(w).mount("#app");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,n){typeof exports=="object"&&typeof module<"u"?n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.Vue))})(this,function(e){"use strict";const n="/vite.svg",i="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e",c={class:"card"},d=e.defineComponent({__name:"HelloWorld",props:{msg:{}},setup(r){const l=e.ref(0);return(o,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h1",null,e.toDisplayString(o.msg),1),e.createElementVNode("div",c,[e.createElementVNode("button",{type:"button",onClick:t[0]||(t[0]=s=>l.value++)},"count is "+e.toDisplayString(l.value),1),t[1]||(t[1]=e.createElementVNode("p",null,[e.createTextVNode(" Edit "),e.createElementVNode("code",null,"components/HelloWorld.vue"),e.createTextVNode(" to test HMR ")],-1))]),t[2]||(t[2]=e.createElementVNode("p",null,[e.createTextVNode(" Check out "),e.createElementVNode("a",{href:"https://vuejs.org/guide/quick-start.html#local",target:"_blank"},"create-vue"),e.createTextVNode(", the official Vue + Vite starter ")],-1)),t[3]||(t[3]=e.createElementVNode("p",null,[e.createTextVNode(" Learn more about IDE Support for Vue in the "),e.createElementVNode("a",{href:"https://vuejs.org/guide/scaling-up/tooling.html#ide-support",target:"_blank"},"Vue Docs Scaling up Guide"),e.createTextVNode(". ")],-1)),t[4]||(t[4]=e.createElementVNode("p",{class:"read-the-docs"},"Click on the Vite and Vue logos to learn more",-1))],64))}}),a=(r,l)=>{const o=r.__vccOpts||r;for(const[t,s]of l)o[t]=s;return o},p=a(d,[["__scopeId","data-v-cc337d8c"]]),m=a(e.defineComponent({__name:"App",setup(r){return(l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o[0]||(o[0]=e.createElementVNode("div",null,[e.createElementVNode("a",{href:"https://vite.dev",target:"_blank"},[e.createElementVNode("img",{src:n,class:"logo",alt:"Vite logo"})]),e.createElementVNode("a",{href:"https://vuejs.org/",target:"_blank"},[e.createElementVNode("img",{src:i,class:"logo vue",alt:"Vue logo"})])],-1)),e.createVNode(p,{msg:"Vite + Vue"})],64))}}),[["__scopeId","data-v-48d00746"]]);e.createApp(m).mount("#app")});
|
package/dist/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/vue3';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('vue').DefineComponent<{
|
|
5
|
+
label: string;
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
size?: "small" | "medium" | "large";
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
click: (id: number) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
12
|
+
label: string;
|
|
13
|
+
primary?: boolean;
|
|
14
|
+
size?: "small" | "medium" | "large";
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
onClick?: ((id: number) => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
primary: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
21
|
+
tags: string[];
|
|
22
|
+
argTypes: {
|
|
23
|
+
size: {
|
|
24
|
+
control: "select";
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
backgroundColor: {
|
|
28
|
+
control: "color";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
args: {
|
|
32
|
+
primary: false;
|
|
33
|
+
onClick: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
export declare const Primary: Story;
|
|
39
|
+
export declare const Secondary: Story;
|
|
40
|
+
export declare const Large: Story;
|
|
41
|
+
export declare const Small: Story;
|
|
42
|
+
export declare const Select: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* The label of the button
|
|
4
|
+
*/
|
|
5
|
+
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* primary or secondary button
|
|
8
|
+
*/
|
|
9
|
+
primary?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* size of the button
|
|
12
|
+
*/
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/**
|
|
15
|
+
* background color of the button
|
|
16
|
+
*/
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
click: (id: number) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onClick?: ((id: number) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
primary: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/vue3';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('vue').DefineComponent<{
|
|
5
|
+
user: {
|
|
6
|
+
name: string;
|
|
7
|
+
} | null;
|
|
8
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
|
+
createAccount: () => any;
|
|
10
|
+
login: () => any;
|
|
11
|
+
logout: () => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
13
|
+
user: {
|
|
14
|
+
name: string;
|
|
15
|
+
} | null;
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
onCreateAccount?: (() => any) | undefined;
|
|
18
|
+
onLogin?: (() => any) | undefined;
|
|
19
|
+
onLogout?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
21
|
+
render: (args: any) => {
|
|
22
|
+
components: {
|
|
23
|
+
MyHeader: import('vue').DefineComponent<{
|
|
24
|
+
user: {
|
|
25
|
+
name: string;
|
|
26
|
+
} | null;
|
|
27
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
+
createAccount: () => any;
|
|
29
|
+
login: () => any;
|
|
30
|
+
logout: () => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
32
|
+
user: {
|
|
33
|
+
name: string;
|
|
34
|
+
} | null;
|
|
35
|
+
}> & Readonly<{
|
|
36
|
+
onCreateAccount?: (() => any) | undefined;
|
|
37
|
+
onLogin?: (() => any) | undefined;
|
|
38
|
+
onLogout?: (() => any) | undefined;
|
|
39
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
40
|
+
};
|
|
41
|
+
setup(this: void): {
|
|
42
|
+
args: any;
|
|
43
|
+
};
|
|
44
|
+
template: string;
|
|
45
|
+
};
|
|
46
|
+
parameters: {
|
|
47
|
+
layout: string;
|
|
48
|
+
};
|
|
49
|
+
args: {
|
|
50
|
+
onLogin: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
51
|
+
onLogout: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
52
|
+
onCreateAccount: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
53
|
+
};
|
|
54
|
+
tags: string[];
|
|
55
|
+
};
|
|
56
|
+
export default meta;
|
|
57
|
+
type Story = StoryObj<typeof meta>;
|
|
58
|
+
export declare const LoggedIn: Story;
|
|
59
|
+
export declare const LoggedOut: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
user: {
|
|
3
|
+
name: string;
|
|
4
|
+
} | null;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
createAccount: () => any;
|
|
8
|
+
login: () => any;
|
|
9
|
+
logout: () => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onCreateAccount?: (() => any) | undefined;
|
|
12
|
+
onLogin?: (() => any) | undefined;
|
|
13
|
+
onLogout?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/vue3';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
5
|
+
render: () => {
|
|
6
|
+
components: {
|
|
7
|
+
MyPage: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
8
|
+
};
|
|
9
|
+
template: string;
|
|
10
|
+
};
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: string;
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const LoggedIn: Story;
|
|
19
|
+
export declare const LoggedOut: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
2
|
+
export default _default;
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + Vue + TS</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dronico/droni-kit",
|
|
3
|
+
"author": "Gustavo Barragan <dev@droni.co>",
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"private": false,
|
|
6
|
+
"access": "public",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "dist/droni-kit.umd.js",
|
|
12
|
+
"module": "dist/droni-kit.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "vite",
|
|
16
|
+
"build": "vue-tsc -b && vite build",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"storybook": "storybook dev -p 6006",
|
|
19
|
+
"build-storybook": "storybook build",
|
|
20
|
+
"release": "semantic-release"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"vue": "^3.5.13"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@chromatic-com/storybook": "^3.2.6",
|
|
27
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
28
|
+
"@semantic-release/git": "^10.0.1",
|
|
29
|
+
"@semantic-release/github": "^11.0.1",
|
|
30
|
+
"@semantic-release/npm": "^12.0.1",
|
|
31
|
+
"@storybook/addon-essentials": "^8.6.12",
|
|
32
|
+
"@storybook/addon-onboarding": "^8.6.12",
|
|
33
|
+
"@storybook/blocks": "^8.6.12",
|
|
34
|
+
"@storybook/experimental-addon-test": "^8.6.12",
|
|
35
|
+
"@storybook/test": "^8.6.12",
|
|
36
|
+
"@storybook/vue3": "^8.6.12",
|
|
37
|
+
"@storybook/vue3-vite": "^8.6.12",
|
|
38
|
+
"@types/node": "^22.14.1",
|
|
39
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
40
|
+
"@vitest/browser": "^3.1.1",
|
|
41
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
42
|
+
"@vue/tsconfig": "^0.7.0",
|
|
43
|
+
"playwright": "^1.51.1",
|
|
44
|
+
"semantic-release": "^24.2.3",
|
|
45
|
+
"storybook": "^8.6.12",
|
|
46
|
+
"typescript": "~5.7.2",
|
|
47
|
+
"vite": "^6.2.0",
|
|
48
|
+
"vite-plugin-dts": "^4.5.3",
|
|
49
|
+
"vitest": "^3.1.1",
|
|
50
|
+
"vue-tsc": "^2.2.4"
|
|
51
|
+
},
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+https://github.com/Droni-app/droni-kit.git"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/public/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// release.config.ts
|
|
2
|
+
export default {
|
|
3
|
+
branches: ['main', { name: 'beta', prerelease: true }],
|
|
4
|
+
plugins: [
|
|
5
|
+
"@semantic-release/commit-analyzer",
|
|
6
|
+
"@semantic-release/release-notes-generator",
|
|
7
|
+
[
|
|
8
|
+
"@semantic-release/changelog",
|
|
9
|
+
{
|
|
10
|
+
changelogFile: "CHANGELOG.md",
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
"@semantic-release/npm",
|
|
14
|
+
[
|
|
15
|
+
"@semantic-release/git",
|
|
16
|
+
{
|
|
17
|
+
assets: ["package.json", "CHANGELOG.md"],
|
|
18
|
+
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
"@semantic-release/github",
|
|
22
|
+
],
|
|
23
|
+
};
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import HelloWorld from './components/HelloWorld.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div>
|
|
7
|
+
<a href="https://vite.dev" target="_blank">
|
|
8
|
+
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://vuejs.org/" target="_blank">
|
|
11
|
+
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
|
|
12
|
+
</a>
|
|
13
|
+
</div>
|
|
14
|
+
<HelloWorld msg="Vite + Vue" />
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style scoped>
|
|
18
|
+
.logo {
|
|
19
|
+
height: 6em;
|
|
20
|
+
padding: 1.5em;
|
|
21
|
+
will-change: filter;
|
|
22
|
+
transition: filter 300ms;
|
|
23
|
+
}
|
|
24
|
+
.logo:hover {
|
|
25
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
26
|
+
}
|
|
27
|
+
.logo.vue:hover {
|
|
28
|
+
filter: drop-shadow(0 0 2em #42b883aa);
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
defineProps<{ msg: string }>()
|
|
5
|
+
|
|
6
|
+
const count = ref(0)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<h1>{{ msg }}</h1>
|
|
11
|
+
|
|
12
|
+
<div class="card">
|
|
13
|
+
<button type="button" @click="count++">count is {{ count }}</button>
|
|
14
|
+
<p>
|
|
15
|
+
Edit
|
|
16
|
+
<code>components/HelloWorld.vue</code> to test HMR
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<p>
|
|
21
|
+
Check out
|
|
22
|
+
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
|
23
|
+
>create-vue</a
|
|
24
|
+
>, the official Vue + Vite starter
|
|
25
|
+
</p>
|
|
26
|
+
<p>
|
|
27
|
+
Learn more about IDE Support for Vue in the
|
|
28
|
+
<a
|
|
29
|
+
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
30
|
+
target="_blank"
|
|
31
|
+
>Vue Docs Scaling up Guide</a
|
|
32
|
+
>.
|
|
33
|
+
</p>
|
|
34
|
+
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<style scoped>
|
|
38
|
+
.read-the-docs {
|
|
39
|
+
color: #888;
|
|
40
|
+
}
|
|
41
|
+
</style>
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { fn } from '@storybook/test';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
3
|
+
|
|
4
|
+
import Button from './Button.vue';
|
|
5
|
+
|
|
6
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Example/Button',
|
|
9
|
+
component: Button,
|
|
10
|
+
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: { control: 'select', options: ['small', 'medium', 'large'] },
|
|
14
|
+
backgroundColor: { control: 'color' },
|
|
15
|
+
},
|
|
16
|
+
args: {
|
|
17
|
+
primary: false,
|
|
18
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
|
|
19
|
+
onClick: fn(),
|
|
20
|
+
},
|
|
21
|
+
} satisfies Meta<typeof Button>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
/*
|
|
26
|
+
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
|
|
27
|
+
* See https://storybook.js.org/docs/api/csf
|
|
28
|
+
* to learn how to use render functions.
|
|
29
|
+
*/
|
|
30
|
+
export const Primary: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
primary: false,
|
|
33
|
+
label: 'Button',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const Secondary: Story = {
|
|
38
|
+
args: {
|
|
39
|
+
primary: false,
|
|
40
|
+
label: 'Button',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const Large: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
label: 'Button',
|
|
47
|
+
size: 'large',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Small: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
label: 'Button',
|
|
54
|
+
size: 'small',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const Select: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
primary: true,
|
|
61
|
+
label: "Button"
|
|
62
|
+
}
|
|
63
|
+
};
|