@evoke-tech/stencil-ui-kit 0.2.0 → 0.2.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/README.md CHANGED
@@ -51,15 +51,31 @@ defineCustomElements();
51
51
  (React 19 passes props/events to custom elements natively; for React 18 use `ref` + `addEventListener`.)
52
52
 
53
53
  ### Vue
54
+
55
+ **Recommended: use the Vue wrappers** (`@evoke-tech/stencil-ui-kit/vue`). They are generated with Stencil's Vue output target and need no compiler setting.
56
+
54
57
  ```ts
55
- // vite.config.ts: vue({ template: { compilerOptions: { isCustomElement: t => t.startsWith('evoke-') } } })
56
- import { defineCustomElements } from '@evoke-tech/stencil-ui-kit/loader';
57
- defineCustomElements();
58
+ // main.ts
59
+ import { createApp } from 'vue';
60
+ import { EvokeUi } from '@evoke-tech/stencil-ui-kit/vue';
61
+ import '@evoke-tech/stencil-ui-kit/dist/evoke-ui/evoke-ui.css';
62
+
63
+ createApp(App).use(EvokeUi).mount('#app'); // registers the custom elements
58
64
  ```
59
- ```html
60
- <evoke-input label="Email" @evokeInput="email = $event.detail" />
65
+ ```vue
66
+ <script setup>
67
+ import { EvokeButton, EvokeInput } from '@evoke-tech/stencil-ui-kit/vue';
68
+ </script>
69
+ <template>
70
+ <EvokeButton @click="count++">Clicked {{ count }} times</EvokeButton>
71
+ <EvokeInput label="Email" @evokeInput="email = $event.detail" />
72
+ </template>
61
73
  ```
62
74
 
75
+ **Why wrappers?** The components render into the page DOM (no shadow root) so Tailwind, Bootstrap and your CSS can style them. If you use the raw tag `<evoke-button>Count: {{ n }}</evoke-button>`, Vue replaces the tag's contents on every update and removes the button's inner markup. The wrappers pass the text to the tag in a way that avoids this.
76
+
77
+ **Using the raw tags instead?** Set `isCustomElement: t => t.startsWith('evoke-')` in your Vue compiler options, call `defineCustomElements()` from `@evoke-tech/stencil-ui-kit/loader`, and wrap any dynamic text in an element: `<evoke-button><span>{{ n }}</span></evoke-button>`.
78
+
63
79
  ### Plain HTML / CDN
64
80
  ```html
65
81
  <script type="module" src="https://unpkg.com/@evoke-tech/stencil-ui-kit/dist/evoke-ui/evoke-ui.esm.js"></script>
@@ -282,7 +298,7 @@ Alternative: `npm link` (run `npm link` in the package folder, then `npm link @e
282
298
  ```
283
299
  3. Confirm the package name is free (a 404 means it is available):
284
300
  ```bash
285
- npm view @evoke-tech/stencil-ui-kit
301
+ npm view @evoke-tech/stencil-ui-kit
286
302
  ```
287
303
 
288
304
  ### Every release
@@ -7,9 +7,9 @@
7
7
  --evoke-surface: var(--mat-sys-surface, #fef7ff);
8
8
  --evoke-text: var(--mat-sys-on-surface, #1d1b20);
9
9
  --evoke-border: var(--mat-sys-outline, #79747e);
10
- --evoke-radius: var(--mat-sys-corner-full, 20px);
10
+ --evoke-radius: var(--mat-sys-corner-medium, 12px);
11
11
  --evoke-radius-field: var(--mat-sys-corner-extra-small, 4px);
12
- --evoke-font: var(--mat-sys-body-large-font, Roboto, 'Helvetica Neue', sans-serif);
12
+ --evoke-font: var(--mat-sys-body-large-font, Roboto), 'Helvetica Neue', sans-serif;
13
13
  --evoke-focus-ring: 0 0 0 2px var(--mat-sys-primary, #6750a4);
14
14
  --evoke-secondary: var(--mat-sys-secondary, #625b71);
15
15
  --evoke-secondary-contrast: var(--mat-sys-on-secondary, #ffffff);
@@ -0,0 +1,22 @@
1
+ import { type StencilVueComponent } from '@stencil/vue-output-target/runtime';
2
+ import type { JSX } from '@evoke-tech/stencil-ui-kit';
3
+ export declare const EvokeAlert: StencilVueComponent<JSX.EvokeAlert>;
4
+ export declare const EvokeAppBar: StencilVueComponent<JSX.EvokeAppBar>;
5
+ export declare const EvokeBadge: StencilVueComponent<JSX.EvokeBadge>;
6
+ export declare const EvokeButton: StencilVueComponent<JSX.EvokeButton>;
7
+ export declare const EvokeCard: StencilVueComponent<JSX.EvokeCard>;
8
+ export declare const EvokeCheckbox: StencilVueComponent<JSX.EvokeCheckbox>;
9
+ export declare const EvokeChip: StencilVueComponent<JSX.EvokeChip>;
10
+ export declare const EvokeInput: StencilVueComponent<JSX.EvokeInput>;
11
+ export declare const EvokeModal: StencilVueComponent<JSX.EvokeModal>;
12
+ export declare const EvokePagination: StencilVueComponent<JSX.EvokePagination>;
13
+ export declare const EvokeProgress: StencilVueComponent<JSX.EvokeProgress>;
14
+ export declare const EvokeQuantityStepper: StencilVueComponent<JSX.EvokeQuantityStepper>;
15
+ export declare const EvokeRadioGroup: StencilVueComponent<JSX.EvokeRadioGroup>;
16
+ export declare const EvokeSelect: StencilVueComponent<JSX.EvokeSelect>;
17
+ export declare const EvokeSwitch: StencilVueComponent<JSX.EvokeSwitch>;
18
+ export declare const EvokeTable: StencilVueComponent<JSX.EvokeTable>;
19
+ export declare const EvokeTabs: StencilVueComponent<JSX.EvokeTabs>;
20
+ export declare const EvokeTextarea: StencilVueComponent<JSX.EvokeTextarea>;
21
+ export declare const EvokeToast: StencilVueComponent<JSX.EvokeToast>;
22
+ export declare const EvokeTooltip: StencilVueComponent<JSX.EvokeTooltip>;
@@ -0,0 +1,220 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /* auto-generated vue proxies */
4
+ import { defineContainer } from '@stencil/vue-output-target/runtime';
5
+ export const EvokeAlert = /*@__PURE__*/ defineContainer('evoke-alert', undefined, [
6
+ 'type',
7
+ 'appearance',
8
+ 'dismissible',
9
+ 'evokeDismiss'
10
+ ], [
11
+ 'evokeDismiss'
12
+ ]);
13
+ export const EvokeAppBar = /*@__PURE__*/ defineContainer('evoke-app-bar', undefined, [
14
+ 'appearance',
15
+ 'sticky',
16
+ 'navLabel'
17
+ ]);
18
+ export const EvokeBadge = /*@__PURE__*/ defineContainer('evoke-badge', undefined, [
19
+ 'count',
20
+ 'max',
21
+ 'dot',
22
+ 'showZero',
23
+ 'color',
24
+ 'label'
25
+ ]);
26
+ export const EvokeButton = /*@__PURE__*/ defineContainer('evoke-button', undefined, [
27
+ 'variant',
28
+ 'size',
29
+ 'type',
30
+ 'disabled',
31
+ 'loading',
32
+ 'icon',
33
+ 'iconOnly',
34
+ 'accessibleLabel',
35
+ 'block',
36
+ 'buttonClass'
37
+ ]);
38
+ export const EvokeCard = /*@__PURE__*/ defineContainer('evoke-card', undefined, [
39
+ 'heading',
40
+ 'appearance',
41
+ 'clickable',
42
+ 'cardClass',
43
+ 'evokeClick'
44
+ ], [
45
+ 'evokeClick'
46
+ ]);
47
+ export const EvokeCheckbox = /*@__PURE__*/ defineContainer('evoke-checkbox', undefined, [
48
+ 'label',
49
+ 'checked',
50
+ 'indeterminate',
51
+ 'disabled',
52
+ 'error',
53
+ 'inputClass',
54
+ 'evokeChange'
55
+ ], [
56
+ 'evokeChange'
57
+ ]);
58
+ export const EvokeChip = /*@__PURE__*/ defineContainer('evoke-chip', undefined, [
59
+ 'label',
60
+ 'selected',
61
+ 'removable',
62
+ 'disabled',
63
+ 'evokeChange',
64
+ 'evokeRemove'
65
+ ], [
66
+ 'evokeChange',
67
+ 'evokeRemove'
68
+ ]);
69
+ export const EvokeInput = /*@__PURE__*/ defineContainer('evoke-input', undefined, [
70
+ 'label',
71
+ 'value',
72
+ 'type',
73
+ 'name',
74
+ 'placeholder',
75
+ 'disabled',
76
+ 'required',
77
+ 'appearance',
78
+ 'error',
79
+ 'hint',
80
+ 'icon',
81
+ 'inputClass',
82
+ 'evokeInput',
83
+ 'evokeChange'
84
+ ], [
85
+ 'evokeInput',
86
+ 'evokeChange'
87
+ ]);
88
+ export const EvokeModal = /*@__PURE__*/ defineContainer('evoke-modal', undefined, [
89
+ 'open',
90
+ 'heading',
91
+ 'position',
92
+ 'size',
93
+ 'closeOnBackdrop',
94
+ 'modalClass',
95
+ 'evokeClose'
96
+ ], [
97
+ 'evokeClose'
98
+ ]);
99
+ export const EvokePagination = /*@__PURE__*/ defineContainer('evoke-pagination', undefined, [
100
+ 'page',
101
+ 'total',
102
+ 'appearance',
103
+ 'disabled',
104
+ 'evokeChange'
105
+ ], [
106
+ 'evokeChange'
107
+ ]);
108
+ export const EvokeProgress = /*@__PURE__*/ defineContainer('evoke-progress', undefined, [
109
+ 'type',
110
+ 'value',
111
+ 'indeterminate',
112
+ 'label',
113
+ 'size'
114
+ ]);
115
+ export const EvokeQuantityStepper = /*@__PURE__*/ defineContainer('evoke-quantity-stepper', undefined, [
116
+ 'value',
117
+ 'min',
118
+ 'max',
119
+ 'appearance',
120
+ 'disabled',
121
+ 'label',
122
+ 'evokeChange'
123
+ ], [
124
+ 'evokeChange'
125
+ ]);
126
+ export const EvokeRadioGroup = /*@__PURE__*/ defineContainer('evoke-radio-group', undefined, [
127
+ 'label',
128
+ 'options',
129
+ 'value',
130
+ 'name',
131
+ 'disabled',
132
+ 'appearance',
133
+ 'inline',
134
+ 'error',
135
+ 'evokeChange'
136
+ ], [
137
+ 'evokeChange'
138
+ ]);
139
+ export const EvokeSelect = /*@__PURE__*/ defineContainer('evoke-select', undefined, [
140
+ 'label',
141
+ 'options',
142
+ 'value',
143
+ 'placeholder',
144
+ 'multiple',
145
+ 'searchable',
146
+ 'disabled',
147
+ 'error',
148
+ 'hint',
149
+ 'selectClass',
150
+ 'evokeChange'
151
+ ], [
152
+ 'evokeChange'
153
+ ]);
154
+ export const EvokeSwitch = /*@__PURE__*/ defineContainer('evoke-switch', undefined, [
155
+ 'checked',
156
+ 'label',
157
+ 'description',
158
+ 'disabled',
159
+ 'accessibleLabel',
160
+ 'evokeChange'
161
+ ], [
162
+ 'evokeChange'
163
+ ]);
164
+ export const EvokeTable = /*@__PURE__*/ defineContainer('evoke-table', undefined, [
165
+ 'columns',
166
+ 'rows',
167
+ 'striped',
168
+ 'sortable',
169
+ 'caption',
170
+ 'emptyText',
171
+ 'evokeSort'
172
+ ], [
173
+ 'evokeSort'
174
+ ]);
175
+ export const EvokeTabs = /*@__PURE__*/ defineContainer('evoke-tabs', undefined, [
176
+ 'options',
177
+ 'value',
178
+ 'appearance',
179
+ 'label',
180
+ 'evokeChange'
181
+ ], [
182
+ 'evokeChange'
183
+ ]);
184
+ export const EvokeTextarea = /*@__PURE__*/ defineContainer('evoke-textarea', undefined, [
185
+ 'label',
186
+ 'value',
187
+ 'name',
188
+ 'placeholder',
189
+ 'rows',
190
+ 'autoGrow',
191
+ 'maxLength',
192
+ 'disabled',
193
+ 'required',
194
+ 'error',
195
+ 'hint',
196
+ 'textareaClass',
197
+ 'evokeInput',
198
+ 'evokeChange'
199
+ ], [
200
+ 'evokeInput',
201
+ 'evokeChange'
202
+ ]);
203
+ export const EvokeToast = /*@__PURE__*/ defineContainer('evoke-toast', undefined, [
204
+ 'open',
205
+ 'message',
206
+ 'type',
207
+ 'action',
208
+ 'duration',
209
+ 'position',
210
+ 'evokeAction',
211
+ 'evokeClose'
212
+ ], [
213
+ 'evokeAction',
214
+ 'evokeClose'
215
+ ]);
216
+ export const EvokeTooltip = /*@__PURE__*/ defineContainer('evoke-tooltip', undefined, [
217
+ 'text',
218
+ 'placement',
219
+ 'theme'
220
+ ]);
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './plugin';
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './plugin';
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from 'vue';
2
+ /** Registers the Evoke custom elements. Use with `app.use(EvokeUi)`. */
3
+ export declare const EvokeUi: Plugin;
@@ -0,0 +1,7 @@
1
+ import { defineCustomElements } from '@evoke-tech/stencil-ui-kit/loader';
2
+ /** Registers the Evoke custom elements. Use with `app.use(EvokeUi)`. */
3
+ export const EvokeUi = {
4
+ install() {
5
+ defineCustomElements();
6
+ },
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-tech/stencil-ui-kit",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Evoke Tech UI kit: framework-agnostic web components (Stencil) for Angular, React, Vue and plain HTML, with Angular Material, Tailwind CSS, Bootstrap and plain CSS themes.",
5
5
  "license": "MIT",
6
6
  "author": "ssamal23 (https://github.com/ssamal23)",
@@ -41,13 +41,17 @@
41
41
  "import": "./loader/index.js",
42
42
  "require": "./loader/index.cjs.js"
43
43
  },
44
+ "./vue": {
45
+ "types": "./dist/vue/index.d.ts",
46
+ "import": "./dist/vue/index.js"
47
+ },
44
48
  "./dist/evoke-ui/evoke-ui.css": "./dist/evoke-ui/evoke-ui.css",
45
49
  "./themes/*": "./dist/themes/*"
46
50
  },
47
51
  "scripts": {
48
52
  "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && stencil build --docs",
49
53
  "start": "stencil build --dev --watch --serve",
50
- "postbuild": "node -e \"require('fs').cpSync('src/themes','dist/themes',{recursive:true})\"",
54
+ "postbuild": "node -e \"require('fs').cpSync('src/themes','dist/themes',{recursive:true})\" && tsc -p tsconfig.vue.json",
51
55
  "test": "stencil test --spec",
52
56
  "prepublishOnly": "npm run build"
53
57
  },
@@ -61,7 +65,20 @@
61
65
  "bootstrap",
62
66
  "angular-material"
63
67
  ],
68
+ "dependencies": {
69
+ "@stencil/vue-output-target": "^0.15.0"
70
+ },
71
+ "peerDependencies": {
72
+ "vue": ">=3.4.38"
73
+ },
74
+ "peerDependenciesMeta": {
75
+ "vue": {
76
+ "optional": true
77
+ }
78
+ },
64
79
  "devDependencies": {
65
- "@stencil/core": "^4.45.2"
80
+ "@stencil/core": "^4.45.2",
81
+ "typescript": "^5.9.3",
82
+ "vue": "^3.5.45"
66
83
  }
67
84
  }