dsp-semactic 0.1.0 → 0.2.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/dist/dsp-semactic.css +1 -0
- package/dist/vue-design-system.es.js +53 -0
- package/dist/vue-design-system.umd.js +1 -0
- package/package.json +10 -1
- package/.vscode/extensions.json +0 -3
- package/index.html +0 -13
- package/vitest.workspace.js +0 -32
- /package/{public → dist}/vite.svg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.storybook-button[data-v-ade7987a]{display:inline-block;cursor:pointer;border:0;border-radius:3em;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.storybook-button--primary[data-v-ade7987a]{background-color:#555ab9;color:#fff}.storybook-button--secondary[data-v-ade7987a]{box-shadow:#00000026 0 0 0 1px inset;background-color:transparent;color:#333}.storybook-button--small[data-v-ade7987a]{padding:10px 16px;font-size:12px}.storybook-button--medium[data-v-ade7987a]{padding:11px 20px;font-size:14px}.storybook-button--large[data-v-ade7987a]{padding:12px 24px;font-size:16px}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { computed as a, createElementBlock as l, openBlock as i, normalizeStyle as u, normalizeClass as y, toDisplayString as m } from "vue";
|
|
2
|
+
const p = (t, e) => {
|
|
3
|
+
const o = t.__vccOpts || t;
|
|
4
|
+
for (const [r, n] of e)
|
|
5
|
+
o[r] = n;
|
|
6
|
+
return o;
|
|
7
|
+
}, d = {
|
|
8
|
+
__name: "MyButton",
|
|
9
|
+
props: {
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
primary: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
validator: function(t) {
|
|
21
|
+
return ["small", "medium", "large"].indexOf(t) !== -1;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
backgroundColor: {
|
|
25
|
+
type: String
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["click"],
|
|
29
|
+
setup(t, { emit: e }) {
|
|
30
|
+
const o = t, r = e, n = a(() => ({
|
|
31
|
+
"storybook-button": !0,
|
|
32
|
+
"storybook-button--primary": o.primary,
|
|
33
|
+
"storybook-button--secondary": !o.primary,
|
|
34
|
+
[`storybook-button--${o.size || "medium"}`]: !0
|
|
35
|
+
})), s = a(() => ({
|
|
36
|
+
backgroundColor: o.backgroundColor
|
|
37
|
+
})), c = () => {
|
|
38
|
+
r("click");
|
|
39
|
+
};
|
|
40
|
+
return (k, _) => (i(), l("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
class: y(n.value),
|
|
43
|
+
onClick: c,
|
|
44
|
+
style: u(s.value)
|
|
45
|
+
}, m(t.label), 7));
|
|
46
|
+
}
|
|
47
|
+
}, b = /* @__PURE__ */ p(d, [["__scopeId", "data-v-ade7987a"]]), g = {
|
|
48
|
+
MyButton: b
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
b as MyButton,
|
|
52
|
+
g as default
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.VueDesignSystem={},e.Vue))})(this,function(e,t){"use strict";const c=((o,r)=>{const n=o.__vccOpts||o;for(const[s,i]of r)n[s]=i;return n})({__name:"MyButton",props:{label:{type:String,required:!0},primary:{type:Boolean,default:!1},size:{type:String,validator:function(o){return["small","medium","large"].indexOf(o)!==-1}},backgroundColor:{type:String}},emits:["click"],setup(o,{emit:r}){const n=o,s=r,i=t.computed(()=>({"storybook-button":!0,"storybook-button--primary":n.primary,"storybook-button--secondary":!n.primary,[`storybook-button--${n.size||"medium"}`]:!0})),l=t.computed(()=>({backgroundColor:n.backgroundColor})),a=()=>{s("click")};return(y,m)=>(t.openBlock(),t.createElementBlock("button",{type:"button",class:t.normalizeClass(i.value),onClick:a,style:t.normalizeStyle(l.value)},t.toDisplayString(o.label),7))}},[["__scopeId","data-v-ade7987a"]]),u={MyButton:c};e.MyButton=c,e.default=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsp-semactic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/vue-design-system.umd.js",
|
|
7
7
|
"module": "dist/vue-design-system.es.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/vue-design-system.es.js",
|
|
11
|
+
"require": "./dist/vue-design-system.umd.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
8
17
|
"scripts": {
|
|
9
18
|
"dev": "vite",
|
|
10
19
|
"build": "vite build",
|
package/.vscode/extensions.json
DELETED
package/index.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/src/main.js"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/vitest.workspace.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
|
|
4
|
-
import { defineWorkspace } from 'vitest/config';
|
|
5
|
-
|
|
6
|
-
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
7
|
-
|
|
8
|
-
const dirname =
|
|
9
|
-
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
-
|
|
11
|
-
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
|
|
12
|
-
export default defineWorkspace([
|
|
13
|
-
'vite.config.js',
|
|
14
|
-
{
|
|
15
|
-
extends: 'vite.config.js',
|
|
16
|
-
plugins: [
|
|
17
|
-
// The plugin will run tests for the stories defined in your Storybook config
|
|
18
|
-
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
|
|
19
|
-
storybookTest({ configDir: path.join(dirname, '.storybook') }),
|
|
20
|
-
],
|
|
21
|
-
test: {
|
|
22
|
-
name: 'storybook',
|
|
23
|
-
browser: {
|
|
24
|
-
enabled: true,
|
|
25
|
-
headless: true,
|
|
26
|
-
provider: 'playwright',
|
|
27
|
-
instances: [{ browser: 'chromium' }]
|
|
28
|
-
},
|
|
29
|
-
setupFiles: ['.storybook/vitest.setup.js'],
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
]);
|
|
File without changes
|