hp-design-system 0.0.10 → 0.0.12

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.
@@ -0,0 +1,20 @@
1
+ const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2
+ __proto__: null,
3
+ get default() {
4
+ return t;
5
+ }
6
+ }, Symbol.toStringTag, { value: "Module" }));
7
+ function c(o) {
8
+ Object.keys(e).forEach((n) => {
9
+ o.component(n, e[n]);
10
+ });
11
+ }
12
+ const t = { install: c };
13
+ function l(o) {
14
+ for (const n in t)
15
+ t.hasOwnProperty(n) && o.component(n, t[n]);
16
+ }
17
+ const r = { install: l };
18
+ export {
19
+ r as default
20
+ };
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @font-face{font-family:myfont}.icon-heart:before{content:""}.global-example{color:red}
@@ -0,0 +1,8 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void;
3
+ import '../assets/main.scss';
4
+ declare const _default: {
5
+ install: typeof install;
6
+ };
7
+ export default _default;
8
+ export * from '../components';
@@ -0,0 +1,8 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void;
3
+ import './assets/main.scss';
4
+ declare const _default: {
5
+ install: typeof install;
6
+ };
7
+ export default _default;
8
+ export * from './components';
package/package.json CHANGED
@@ -1,32 +1,38 @@
1
1
  {
2
2
  "name": "hp-design-system",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "main": "dist/hp-design-system.umd.js",
6
- "module": "dist/hp-design-system.esm.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/hp-design-system.esm.js",
11
- "require": "./dist/hp-design-system.umd.js"
12
- }
13
- },
14
6
  "scripts": {
15
- "dev": "vite",
16
- "build": "npm run build:types && vite build",
17
- "build:types": "vue-tsc --project tsconfig.json",
18
- "preview": "vite preview"
19
- },
7
+ "dev": "vite",
8
+ "clean:cache": "rmdir /s /q node_modules\\.vite",
9
+ "build": "rimraf dist && vue-tsc && vite build",
10
+ "preview": "vite preview"
11
+ },
20
12
  "dependencies": {
13
+ "@vitejs/plugin-vue": "^5.0.5",
21
14
  "vue": "^3.4.29"
22
15
  },
23
16
  "devDependencies": {
24
17
  "@types/node": "^20.14.8",
25
18
  "@types/vue": "^2.0.0",
26
- "@vitejs/plugin-vue": "^5.0.5",
27
19
  "@vue/runtime-dom": "^3.4.30",
28
- "typescript": "^5.2.2",
20
+ "rimraf": "^5.0.1",
21
+ "sass": "^1.63.6",
22
+ "typescript": "^5.5.2",
29
23
  "vite": "^5.3.1",
30
24
  "vue-tsc": "^2.0.21"
25
+ },
26
+ "files": [
27
+ "src",
28
+ "dist"
29
+ ],
30
+ "module": "./disthp-design-system.es.js",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/types/index.d.ts",
34
+ "import": "./disthp-design-system.es.js"
35
+ },
36
+ "./dist/style.css": "./dist/style.css"
31
37
  }
32
38
  }
@@ -0,0 +1,17 @@
1
+ @font-face {
2
+ font-family: 'myfont';
3
+ // src: url('fonts/myfont.woff');
4
+ }
5
+
6
+ [class^='icon-'],
7
+ [class*=' icon-'] {
8
+ // font-family: 'myfont' !important;
9
+ }
10
+
11
+ .icon-heart:before {
12
+ content: '\e9da';
13
+ }
14
+
15
+ .global-example {
16
+ color: red;
17
+ }
@@ -7,4 +7,4 @@
7
7
  const props = defineProps({
8
8
  text: { type: String, required: true }
9
9
  })
10
- </script>
10
+ </script>
@@ -0,0 +1,14 @@
1
+ import { App } from 'vue';
2
+ import * as components from '../components';
3
+
4
+ function install(app: App) {
5
+ Object.keys(components).forEach(key => {
6
+ app.component(key, components[key as keyof typeof components]);
7
+ });
8
+ }
9
+
10
+ import '../assets/main.scss';
11
+
12
+ export default { install };
13
+
14
+ export * from '../components';
package/src/index.ts CHANGED
@@ -1,11 +1,15 @@
1
- import { App } from 'vue'
2
- import HpButton from './components/Button.vue'
1
+ import { App } from 'vue';
2
+ import components from './components';
3
3
 
4
- const HpDesignSystem = {
5
- install(app: App) {
6
- app.component('HpButton', HpButton)
4
+ function install(app: App) {
5
+ for (const key in components) {
6
+ if (components.hasOwnProperty(key)) {
7
+ app.component(key, (components as any)[key]);
8
+ }
7
9
  }
8
10
  }
9
11
 
10
- export default HpDesignSystem
11
- export { HpButton }
12
+ import './assets/main.scss';
13
+
14
+ export default { install };
15
+ export * from './components';
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["Vue.volar"]
3
- }
package/dist/App.vue.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
- export default _default;
@@ -1,18 +0,0 @@
1
- import { openBlock as e, createElementBlock as n, toDisplayString as o } from "vue";
2
- const r = {
3
- __name: "Button",
4
- props: {
5
- text: { type: String, required: !0 }
6
- },
7
- setup(t) {
8
- return (p, s) => (e(), n("button", null, o(t.text), 1));
9
- }
10
- }, c = {
11
- install(t) {
12
- t.component("HpButton", r);
13
- }
14
- };
15
- export {
16
- r as HpButton,
17
- c as default
18
- };
@@ -1 +0,0 @@
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.HpDesignSystem={},e.Vue))})(this,function(e,t){"use strict";const o={__name:"Button",props:{text:{type:String,required:!0}},setup(n){return(i,s)=>(t.openBlock(),t.createElementBlock("button",null,t.toDisplayString(n.text),1))}},u={install(n){n.component("HpButton",o)}};e.HpButton=o,e.default=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { App } from 'vue';
2
- import HpButton from './components/Button.vue';
3
- declare const HpDesignSystem: {
4
- install(app: App): void;
5
- };
6
- export default HpDesignSystem;
7
- export { HpButton };
package/dist/main.d.ts DELETED
@@ -1 +0,0 @@
1
- import './style.css';
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 + 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/public/vite.svg DELETED
@@ -1 +0,0 @@
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/src/App.vue DELETED
@@ -1,8 +0,0 @@
1
- <template>
2
- <div>
3
- Design System
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- </script>
@@ -1 +0,0 @@
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>
package/src/main.ts DELETED
@@ -1,5 +0,0 @@
1
- import { createApp } from 'vue'
2
- import './style.css'
3
- import App from './App.vue'
4
-
5
- createApp(App).mount('#app')
@@ -1,5 +0,0 @@
1
- declare module '*.vue' {
2
- import { DefineComponent } from 'vue'
3
- const component: DefineComponent<{}, {}, any>
4
- export default component
5
- }
package/src/vite-env.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
package/tsconfig.app.json DELETED
@@ -1,27 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "target": "ES2020",
6
- "useDefineForClassFields": true,
7
- "module": "ESNext",
8
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
9
- "skipLibCheck": true,
10
-
11
- /* Bundler mode */
12
- "moduleResolution": "bundler",
13
- "allowImportingTsExtensions": true,
14
- "resolveJsonModule": true,
15
- "isolatedModules": true,
16
- "moduleDetection": "force",
17
- "noEmit": false, // Habilita a geração de arquivos de saída
18
- "jsx": "preserve",
19
-
20
- /* Linting */
21
- "strict": true,
22
- "noUnusedLocals": true,
23
- "noUnusedParameters": true,
24
- "noFallthroughCasesInSwitch": true
25
- },
26
- "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
27
- }
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
- "skipLibCheck": true,
6
- "module": "ESNext",
7
- "moduleResolution": "bundler",
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true,
10
- "noEmit": false // Permitir a geração de arquivos de saída
11
- },
12
- "include": ["vite.config.ts"]
13
- }