whelk-ui 0.0.2 → 0.0.4

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 CHANGED
@@ -1,5 +1,4 @@
1
- Whelk UI
2
- ========
1
+ # Whelk UI
3
2
 
4
3
  ***Coming soon - The VueJS UI Components used to build NearBeach***
5
4
 
@@ -7,12 +6,14 @@ Whelk UI
7
6
 
8
7
  ---
9
8
 
10
- # Component Completion
9
+ ## Component Completion
11
10
 
12
11
  You can follow the completion status on [NearBeach's 0.32 Component Reconstruction kanban board](https://prod.nearbeach.app/public/kanban_board/14/dfa1f175-faa2-4dd1-a2f3-f2c8c507bee4/)
13
12
 
14
- ## Forms
13
+ ### Forms
15
14
 
15
+ - [] Add Object
16
+ - [x] Buttons
16
17
  - [] Checkbox
17
18
  - [] Datetime picker
18
19
  - [] Date picker
@@ -26,6 +27,6 @@ You can follow the completion status on [NearBeach's 0.32 Component Reconstructi
26
27
  - [] Toggle
27
28
  - [] Website Input
28
29
 
29
- ## Generic
30
+ ### Generic
30
31
 
31
32
  - [] Tooltip
@@ -0,0 +1,50 @@
1
+ import { App } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { DefineComponent } from 'vue';
5
+ import { ExtractPropTypes } from 'vue';
6
+ import { PublicProps } from 'vue';
7
+
8
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
9
+ objectState: {
10
+ type: StringConstructor;
11
+ default: "NO_ACTION";
12
+ required: false;
13
+ validator: (value: string) => boolean;
14
+ };
15
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
16
+ objectState: {
17
+ type: StringConstructor;
18
+ default: "NO_ACTION";
19
+ required: false;
20
+ validator: (value: string) => boolean;
21
+ };
22
+ }>> & Readonly<{}>, {
23
+ objectState: string;
24
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLButtonElement>;
25
+
26
+ declare function __VLS_template(): {
27
+ attrs: Partial<{}>;
28
+ slots: {
29
+ default?(_: {}): any;
30
+ };
31
+ refs: {};
32
+ rootEl: HTMLButtonElement;
33
+ };
34
+
35
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
36
+
37
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+
43
+ export declare const ButtonComponent: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
+
45
+ declare const _default: {
46
+ install(app: App): void;
47
+ };
48
+ export default _default;
49
+
50
+ export { }
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Whelk UI - Development</title>
7
+ </head>
8
+ <body>
9
+ <div id="app"></div>
10
+ <script type="module" src="/dev/main.ts"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1 @@
1
+ button[data-v-3de7a432]{padding:.5rem 1rem;border:var(--border);border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);color:var(--text)}button.compact[data-v-3de7a432]{padding:.25rem .125rem;font-size:.75rem;line-height:1rem}button.tiny[data-v-3de7a432]{padding:.125rem 0rem;font-size:.75rem;line-height:.75rem}button.primary[data-v-3de7a432]{background-color:var(--primary);border-color:var(--primary)}button.primary:hover[data-v-3de7a432]:enabled{background-color:var(--primary-hover)}button.secondary[data-v-3de7a432]{background-color:var(--secondary);border-color:var(--secondary)}button.secondary:hover[data-v-3de7a432]:enabled{background-color:var(--secondary-hover)}button.danger[data-v-3de7a432]{background-color:var(--danger);border-color:var(--danger)}button.danger:hover[data-v-3de7a432]:enabled{background-color:var(--danger-hover)}button.warning[data-v-3de7a432]{background-color:var(--warning);border-color:var(--warning)}button.warning:hover[data-v-3de7a432]:enabled{background-color:var(--warning-hover)}button.success[data-v-3de7a432]{background-color:var(--success);border-color:var(--success)}button.success:hover[data-v-3de7a432]:enabled{background-color:var(--success-hover)}button.info[data-v-3de7a432]{background-color:var(--info);border-color:var(--info)}button.info:hover[data-v-3de7a432]:enabled{background-color:var(--info-hover)}button.loading[data-v-3de7a432]{animation:loading-animation-3de7a432 1s infinite linear}@keyframes loading-animation-3de7a432{0%{color:var(--text)}50%{color:var(--text-muted)}to{color:var(--text)}}
@@ -0,0 +1,48 @@
1
+ import { defineComponent as l, openBlock as a, createElementBlock as r, unref as c, renderSlot as d, createCommentVNode as s, toDisplayString as m } from "vue";
2
+ const n = {
3
+ Disable: "DISABLE",
4
+ Error: "ERROR",
5
+ Loading: "LOADING",
6
+ LoggingIn: "LOGGING_IN",
7
+ LoggingOut: "LOGGING_OUT",
8
+ NoAction: "NO_ACTION",
9
+ Saving: "SAVING"
10
+ }, _ = ["disabled"], b = { key: 1 }, f = /* @__PURE__ */ l({
11
+ __name: "ButtonComponent",
12
+ props: {
13
+ objectState: {
14
+ type: String,
15
+ default: n.NoAction,
16
+ required: !1,
17
+ validator: function(t) {
18
+ return Object.values(n).includes(t);
19
+ }
20
+ }
21
+ },
22
+ setup(t) {
23
+ return (e, o) => (a(), r("button", {
24
+ disabled: t.objectState !== c(n).NoAction
25
+ }, [
26
+ t.objectState === c(n).NoAction ? d(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
27
+ t.objectState !== c(n).NoAction ? (a(), r("span", b, m(t.objectState), 1)) : s("", !0)
28
+ ], 8, _));
29
+ }
30
+ }), O = (t, e) => {
31
+ const o = t.__vccOpts || t;
32
+ for (const [i, u] of e)
33
+ o[i] = u;
34
+ return o;
35
+ }, S = /* @__PURE__ */ O(f, [["__scopeId", "data-v-3de7a432"]]), g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
+ __proto__: null,
37
+ ButtonComponent: S
38
+ }, Symbol.toStringTag, { value: "Module" })), N = {
39
+ install(t) {
40
+ Object.entries(g).forEach(([e, o]) => {
41
+ t.component(e, o);
42
+ });
43
+ }
44
+ };
45
+ export {
46
+ S as ButtonComponent,
47
+ N as default
48
+ };
@@ -0,0 +1 @@
1
+ (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.WhelkUI={},o.Vue))})(this,(function(o,e){"use strict";const c={Disable:"DISABLE",Error:"ERROR",Loading:"LOADING",LoggingIn:"LOGGING_IN",LoggingOut:"LOGGING_OUT",NoAction:"NO_ACTION",Saving:"SAVING"},s=["disabled"],a={key:1},d=e.defineComponent({__name:"ButtonComponent",props:{objectState:{type:String,default:c.NoAction,required:!1,validator:function(t){return Object.values(c).includes(t)}}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("button",{disabled:t.objectState!==e.unref(c).NoAction},[t.objectState===e.unref(c).NoAction?e.renderSlot(n.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0),t.objectState!==e.unref(c).NoAction?(e.openBlock(),e.createElementBlock("span",a,e.toDisplayString(t.objectState),1)):e.createCommentVNode("",!0)],8,s))}}),r=((t,n)=>{const i=t.__vccOpts||t;for(const[f,m]of n)i[f]=m;return i})(d,[["__scopeId","data-v-3de7a432"]]),u=Object.freeze(Object.defineProperty({__proto__:null,ButtonComponent:r},Symbol.toStringTag,{value:"Module"})),l={install(t){Object.entries(u).forEach(([n,i])=>{t.component(n,i)})}};o.ButtonComponent=r,o.default=l,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,32 +1,71 @@
1
1
  {
2
2
  "name": "whelk-ui",
3
+ "description": "Vue3 Component Library for NearBeach",
4
+ "keywords": [
5
+ "vue",
6
+ "vue3",
7
+ "component-library",
8
+ "ui"
9
+ ],
10
+ "author": "Robotichead",
11
+ "license": "MIT",
3
12
  "private": false,
4
- "version": "0.0.2",
13
+ "version": "0.0.4",
5
14
  "type": "module",
15
+ "main": "./dist/whelk-ui.umd.cjs",
16
+ "module": "./dist/whelk-ui.js",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/whelk-ui.js",
22
+ "require": "./dist/whelk-ui.umd.cjs"
23
+ },
24
+ "./dist/style.css": "./dist/style.css"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
6
29
  "scripts": {
7
30
  "dev": "vite",
8
- "build": "vue-tsc -b && vite build",
9
- "preview": "vite preview",
10
- "test:unit": "vitest"
31
+ "build": "vite build",
32
+ "test": "vitest",
33
+ "test:ui": "vitest --ui",
34
+ "test:coverage": "vitest --coverage",
35
+ "test:e2e": "playwright test",
36
+ "docs:dev": "vuepress dev docs",
37
+ "docs:build": "vuepress build docs",
38
+ "prepublishOnly": "npm run build"
11
39
  },
12
- "dependencies": {
40
+ "peerDependencies": {
13
41
  "vue": "^3.5.24"
14
42
  },
43
+ "dependencies": {
44
+ "@vuepress/theme-default": "^2.0.0-rc.121"
45
+ },
15
46
  "devDependencies": {
16
47
  "@csstools/postcss-global-data": "^3.1.0",
48
+ "@playwright/test": "^1.58.0",
17
49
  "@types/node": "^24.10.1",
18
- "@vitejs/plugin-vue": "^6.0.1",
19
- "@vitest/browser-playwright": "^4.0.7",
20
- "@vitest/coverage-v8": "^4.0.8",
50
+ "@vitejs/plugin-vue": "^6.0.3",
51
+ "@vitest/browser-playwright": "^4.0.18",
52
+ "@vitest/coverage-v8": "^4.0.18",
21
53
  "@vitest/eslint-plugin": "^1.4.0",
54
+ "@vitest/ui": "^4.0.18",
55
+ "@vue/test-utils": "^2.4.6",
22
56
  "@vue/tsconfig": "^0.8.1",
23
- "petite-vue-i18n": "^11.2.8",
57
+ "@vuepress/bundler-vite": "^2.0.0-rc.26",
58
+ "@vuepress/client": "^2.0.0-rc.26",
59
+ "jsdom": "^27.4.0",
24
60
  "postcss": "^8.5.6",
25
61
  "postcss-nesting": "^13.0.2",
62
+ "sass-embedded": "^1.97.3",
26
63
  "typescript": "~5.9.3",
27
- "vite": "^7.2.4",
64
+ "vite": "^7.3.1",
65
+ "vite-plugin-dts": "^4.5.4",
28
66
  "vitest": "^4.0.18",
29
67
  "vitest-browser-vue": "^2.0.1",
30
- "vue-tsc": "^3.1.4"
68
+ "vue-tsc": "^3.2.3",
69
+ "vuepress": "^2.0.0-rc.26"
31
70
  }
32
71
  }
package/index.html DELETED
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <link rel="icon" href="https://cdn.nearbeach.org/0.31.102/NearBeach/NearBeach_Small.png">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Whelk UI</title>
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@500&display=swap" rel="stylesheet">
11
- </head>
12
- <body style="margin:0;padding:0;">
13
- <div id="app"></div>
14
- <script type="module" src="/src/main.ts"></script>
15
- </body>
16
- </html>
package/src/App.vue DELETED
@@ -1,28 +0,0 @@
1
- <script setup lang="ts">
2
-
3
- import ButtonComponent from "./components/button/ButtonComponent.vue";
4
- import {ObjectStateEnum} from "./utils/enums/ObjectStateEnum.ts";
5
- </script>
6
-
7
- <template>
8
- <main id="main" aria-labelledby="main-title" role="main">
9
- <ButtonComponent class="primary">Button Text</ButtonComponent>
10
- <ButtonComponent class="secondary">Button Text</ButtonComponent>
11
- <ButtonComponent :object-state="ObjectStateEnum.LoggingIn"
12
- class="secondary">Button Text</ButtonComponent>
13
- </main>
14
- </template>
15
-
16
- <style scoped>
17
- main {
18
- display: flex;
19
- flex-direction: column;
20
- justify-content: center;
21
- align-items: center;
22
- width: 100vw;
23
- height: 100dvh;
24
- background-color: oklch(40.5% 0.101 131.063);
25
-
26
- }
27
-
28
- </style>
@@ -1,11 +0,0 @@
1
- // src/components/button/ButtonComponent.spec.ts
2
- import {describe, test, expect } from "vitest";
3
- import ButtonComponent from "./ButtonComponent.vue";
4
-
5
- describe("ButtonComponent", () => {
6
- test("mount component", async () => {
7
- // App exists
8
- expect(ButtonComponent).toBeTruthy();
9
- });
10
- });
11
-
@@ -1,129 +0,0 @@
1
- <script setup lang="ts">
2
- import {ObjectStateEnum} from '../../utils/enums/ObjectStateEnum.ts';
3
-
4
- defineProps({
5
- objectState: {
6
- type: String,
7
- default: ObjectStateEnum.NoAction,
8
- required: false,
9
- validator: function (value: string): boolean {
10
- const enumValues: string[] = Object.values(ObjectStateEnum);
11
- return enumValues.includes(value);
12
- },
13
- },
14
- });
15
- </script>
16
-
17
- <template>
18
- <button :disabled="objectState !== ObjectStateEnum.NoAction">
19
- <slot v-if="objectState === ObjectStateEnum.NoAction" />
20
- <span v-if="objectState !== ObjectStateEnum.NoAction">
21
- {{objectState}}
22
- </span>
23
- </button>
24
- </template>
25
-
26
- <style scoped>
27
- button {
28
- padding: 0.5rem 1rem;
29
- border: var(--border);
30
- border-radius: var(--border-radius);
31
- border-width: var(--border-width);
32
- border-style: var(--border-style);
33
- color: var(--text);
34
-
35
- &.compact {
36
- padding: 0.25rem 0.125rem;
37
- font-size: 0.75rem;
38
- line-height: 1rem;
39
- }
40
-
41
- &.tiny {
42
- padding: 0.125rem 0rem;
43
- font-size: 0.75rem;
44
- line-height: 0.75rem;
45
- }
46
-
47
- &.primary {
48
- background-color: var(--primary);
49
- border-color: var(--primary);
50
-
51
- &:hover {
52
- &:enabled {
53
- background-color: var(--primary-hover);
54
- }
55
- }
56
- }
57
-
58
- &.secondary {
59
- background-color: var(--secondary);
60
- border-color: var(--secondary);
61
-
62
- &:hover {
63
- &:enabled {
64
- background-color: var(--secondary-hover);
65
- }
66
- }
67
- }
68
-
69
- &.danger {
70
- background-color: var(--danger);
71
- border-color: var(--danger);
72
-
73
- &:hover {
74
- &:enabled {
75
- background-color: var(--danger-hover);
76
- }
77
- }
78
- }
79
-
80
- &.warning {
81
- background-color: var(--warning);
82
- border-color: var(--warning);
83
-
84
- &:hover {
85
- &:enabled {
86
- background-color: var(--warning-hover);
87
- }
88
- }
89
- }
90
-
91
- &.success {
92
- background-color: var(--success);
93
- border-color: var(--success);
94
-
95
- &:hover {
96
- &:enabled {
97
- background-color: var(--success-hover);
98
- }
99
- }
100
- }
101
-
102
- &.info {
103
- background-color: var(--info);
104
- border-color: var(--info);
105
-
106
- &:hover {
107
- &:enabled {
108
- background-color: var(--info-hover);
109
- }
110
- }
111
- }
112
-
113
- &.loading {
114
- animation: loading-animation 1s infinite linear;
115
- }
116
- }
117
-
118
- @keyframes loading-animation {
119
- 0% {
120
- color: var(--text);
121
- }
122
- 50% {
123
- color: var(--text-muted);
124
- }
125
- 100% {
126
- color: var(--text);
127
- }
128
- }
129
- </style>
package/src/main.ts DELETED
@@ -1,6 +0,0 @@
1
- import { createApp } from "vue";
2
- import "./styles/main.css";
3
- import App from "./App.vue";
4
-
5
- const app = createApp(App);
6
- app.mount("#app");
@@ -1 +0,0 @@
1
- @import "./partials/_general_variables.css";
@@ -1,74 +0,0 @@
1
- :root {
2
- /* Border Variables */
3
- --border-radius: 5px;
4
- --border-style: solid;
5
- --border-width: 1px;
6
-
7
- /* Set all the colour variables here */
8
- --bg-dark: hsl(26 53% 89%);
9
- --bg: hsl(26 100% 94%);
10
- --bg-light: hsl(26 100% 100%);
11
- --text: hsl(16 100% 4%);
12
- --text-red: hsl(8, 93%, 43%);
13
- --text-muted: hsl(26 35% 27%);
14
- --highlight: hsl(26 100% 99%);
15
- --border: hsl(26 21% 49%);
16
- --border-muted: hsl(26 27% 61%);
17
- --primary: hsl(27 65% 66%);
18
- --primary-hover: hsl(27 65% 76%);
19
- --secondary: hsl(204 74% 68%);
20
- --secondary-hover: hsl(204 74% 78%);
21
- --danger: hsl(9 26% 64%);
22
- --danger-hover: hsl(9 26% 74%);
23
- --warning: hsl(52 19% 57%);
24
- --warning-hover: hsl(52 19% 67%);
25
- --success: hsl(146 17% 59%);
26
- --success-hover: hsl(146 17% 69%);
27
- --info: hsl(217 28% 65%);
28
- --info-hover: hsl(217 28% 75%); /* Set all the object colours here */
29
- --document-links: hsl(203.53, 40.8%, 24.51%);
30
- --document-links-hover: hsl(203.53, 40.8%, 75.51%);
31
- --customer-background: hsl(203.53, 40.8%, 75.49%);
32
- --customer-text: hsl(203.53, 40.8%, 24.51%);
33
- --kanban-board-background: hsl(78.26, 88.46%, 89.8%);
34
- --kanban-board-text: hsl(78.26, 88.46%, 10.2%);
35
- --kanban-card-background: hsl(74.12, 35.56%, 53.14%);
36
- --kanban-card-text: hsl(74.12, 35.56%, 10.86%);
37
- --organisation-background: hsl(52.05, 85.57%, 61.96%);
38
- --organisation-text: hsl(52.05, 85.57%, 8.04%);
39
- --request-for-change-background: hsl(67.61, 100%, 72.16%);
40
- --request-for-change-text: hsl(67.61, 100%, 7.84%);
41
- --requirement-background: hsl(200.31, 94.2%, 86.47%);
42
- --requirement-text: hsl(200.31, 94.2%, 10.53%);
43
- --requirement-item-background: hsl(322.8, 29.76%, 67.06%);
44
- --requirement-item-text: hsl(322.8, 29.76%, 8.94%);
45
- --project-background: hsl(333.62, 49.57%, 45.88%);
46
- --project-text: hsl(333.62, 49.57%, 8.12%);
47
- --task-background: hsl(224, 10.2%, 71.82%);
48
- --task-text: hsl(224, 10.2%, 7.18%);
49
- }
50
-
51
- .dark {
52
- --bg-dark: hsl(16 100% 2%);
53
- --bg: hsl(22 76% 4%);
54
- --bg-light: hsl(26 50% 8%);
55
- --text: hsl(26 100% 94%);
56
- --text-red: hsl(8,
57
- 93%, 23%);
58
- --text-muted: hsl(26 34% 68%);
59
- --highlight: hsl(26 26% 38%);
60
- --border: hsl(26 35% 27%);
61
- --border-muted: hsl(27 56% 16%);
62
- --primary: hsl(32 100% 20%);
63
- --primary-hover: hsl(32 100% 10%);
64
- --secondary: hsl(198 100% 20%);
65
- --secondary-hover: hsl(198 100% 10%);
66
- --danger: hsl(9 21% 41%);
67
- --danger-hover: hsl(9 21% 31%);
68
- --warning: hsl(52 23% 34%);
69
- --warning-hover: hsl(52 23% 24%);
70
- --success: hsl(147 19% 36%);
71
- --success-hover: hsl(147 19% 26%);
72
- --info: hsl(217 22% 41%);
73
- --info-hover: hsl(217 22% 31%);
74
- }
@@ -1,13 +0,0 @@
1
- const ObjectStateEnum = {
2
- Disable: "DISABLE",
3
- Error: "ERROR",
4
- Loading: "LOADING",
5
- LoggingIn: "LOGGING_IN",
6
- LoggingOut: "LOGGING_OUT",
7
- NoAction: "NO_ACTION",
8
- Saving: "SAVING",
9
- } as const;
10
-
11
- type ObjectStateEnum = (typeof ObjectStateEnum)[keyof typeof ObjectStateEnum];
12
-
13
- export { ObjectStateEnum };
package/tsconfig.app.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "extends": "@vue/tsconfig/tsconfig.dom.json",
3
- "compilerOptions": {
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "types": ["vite/client"],
6
-
7
- /* Linting */
8
- "strict": true,
9
- "noUnusedLocals": true,
10
- "noUnusedParameters": true,
11
- "erasableSyntaxOnly": true,
12
- "noFallthroughCasesInSwitch": true,
13
- "noUncheckedSideEffectImports": true
14
- },
15
- "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
16
- }
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2023",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- // "verbatimModuleSyntax": true,
14
- "noEmit": true,
15
-
16
- /* Linting */
17
- "strict": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "erasableSyntaxOnly": true,
21
- "noFallthroughCasesInSwitch": true,
22
- "noUncheckedSideEffectImports": true
23
- },
24
- "include": ["vite.config.ts"]
25
- }
package/vite.config.ts DELETED
@@ -1,40 +0,0 @@
1
- import {defineConfig} from 'vite'
2
- import vue from '@vitejs/plugin-vue'
3
- import postcssNesting from 'postcss-nesting'
4
- import {resolve} from 'path'
5
-
6
-
7
- // https://vite.dev/config/
8
- export default defineConfig({
9
- build: {
10
- cssCodeSplit: true,
11
- lib: {
12
- entry: {
13
- button: resolve(__dirname, 'src/components/button/ButtonComponent.vue'),
14
- style: resolve(__dirname, 'src/styles/main.css'),
15
- },
16
- name: 'whelk-ui',
17
- formats: ['es', 'cjs']
18
- },
19
- rollupOptions: {
20
- external: ['vue'],
21
- output: {
22
- globals: {
23
- vue: 'Vue',
24
- },
25
- preserveModules: true,
26
- preserveModulesRoot: 'src'
27
- },
28
- },
29
- },
30
- css: {
31
- postcss: {
32
- plugins: [
33
- postcssNesting,
34
- ]
35
- }
36
- },
37
- plugins: [
38
- vue(),
39
- ],
40
- })
File without changes