@evoke-tech/stencil-ui-kit 0.1.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 +142 -26
- package/dist/cjs/evoke-alert_20.cjs.entry.js +1047 -0
- package/dist/cjs/evoke-ui.cjs.js +2 -2
- package/dist/cjs/{index-B8xS0y1i.js → index-BpJ5gu8f.js} +146 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/evoke-alert/evoke-alert.css +17 -6
- package/dist/collection/components/evoke-alert/evoke-alert.js +25 -1
- package/dist/collection/components/evoke-app-bar/evoke-app-bar.css +13 -0
- package/dist/collection/components/evoke-app-bar/evoke-app-bar.js +94 -0
- package/dist/collection/components/evoke-badge/evoke-badge.css +13 -0
- package/dist/collection/components/evoke-badge/evoke-badge.js +162 -0
- package/dist/collection/components/evoke-button/evoke-button.css +16 -2
- package/dist/collection/components/evoke-button/evoke-button.js +117 -5
- package/dist/collection/components/evoke-card/evoke-card.css +9 -1
- package/dist/collection/components/evoke-card/evoke-card.js +75 -1
- package/dist/collection/components/evoke-checkbox/evoke-checkbox.css +7 -1
- package/dist/collection/components/evoke-checkbox/evoke-checkbox.js +31 -2
- package/dist/collection/components/evoke-chip/evoke-chip.css +16 -0
- package/dist/collection/components/evoke-chip/evoke-chip.js +149 -0
- package/dist/collection/components/evoke-input/evoke-input.css +11 -3
- package/dist/collection/components/evoke-input/evoke-input.js +103 -13
- package/dist/collection/components/evoke-modal/evoke-modal.css +21 -5
- package/dist/collection/components/evoke-modal/evoke-modal.js +129 -4
- package/dist/collection/components/evoke-pagination/evoke-pagination.css +12 -0
- package/dist/collection/components/evoke-pagination/evoke-pagination.js +156 -0
- package/dist/collection/components/evoke-progress/evoke-progress.css +12 -0
- package/dist/collection/components/evoke-progress/evoke-progress.js +146 -0
- package/dist/collection/components/evoke-quantity-stepper/evoke-quantity-stepper.css +20 -0
- package/dist/collection/components/evoke-quantity-stepper/evoke-quantity-stepper.js +201 -0
- package/dist/collection/components/evoke-radio-group/evoke-radio-group.css +14 -1
- package/dist/collection/components/evoke-radio-group/evoke-radio-group.js +34 -8
- package/dist/collection/components/evoke-select/evoke-select.css +25 -4
- package/dist/collection/components/evoke-select/evoke-select.js +245 -15
- package/dist/collection/components/evoke-switch/evoke-switch.css +16 -0
- package/dist/collection/components/evoke-switch/evoke-switch.js +151 -0
- package/dist/collection/components/evoke-table/evoke-table.css +20 -0
- package/dist/collection/components/evoke-table/evoke-table.js +222 -0
- package/dist/collection/components/evoke-tabs/evoke-tabs.css +20 -0
- package/dist/collection/components/evoke-tabs/evoke-tabs.js +179 -0
- package/dist/collection/components/evoke-textarea/evoke-textarea.css +19 -0
- package/dist/collection/components/evoke-textarea/evoke-textarea.js +328 -0
- package/dist/collection/components/evoke-toast/evoke-toast.css +24 -0
- package/dist/collection/components/evoke-toast/evoke-toast.js +225 -0
- package/dist/collection/components/evoke-tooltip/evoke-tooltip.css +22 -0
- package/dist/collection/components/evoke-tooltip/evoke-tooltip.js +119 -0
- package/dist/collection/utils/icons.js +29 -0
- package/dist/components/evoke-alert.js +1 -1
- package/dist/components/evoke-app-bar.d.ts +11 -0
- package/dist/components/evoke-app-bar.js +1 -0
- package/dist/components/evoke-badge.d.ts +11 -0
- package/dist/components/evoke-badge.js +1 -0
- package/dist/components/evoke-button.js +1 -1
- package/dist/components/evoke-card.js +1 -1
- package/dist/components/evoke-checkbox.js +1 -1
- package/dist/components/evoke-chip.d.ts +11 -0
- package/dist/components/evoke-chip.js +1 -0
- package/dist/components/evoke-input.js +1 -1
- package/dist/components/evoke-modal.js +1 -1
- package/dist/components/evoke-pagination.d.ts +11 -0
- package/dist/components/evoke-pagination.js +1 -0
- package/dist/components/evoke-progress.d.ts +11 -0
- package/dist/components/evoke-progress.js +1 -0
- package/dist/components/evoke-quantity-stepper.d.ts +11 -0
- package/dist/components/evoke-quantity-stepper.js +1 -0
- package/dist/components/evoke-radio-group.js +1 -1
- package/dist/components/evoke-select.js +1 -1
- package/dist/components/evoke-switch.d.ts +11 -0
- package/dist/components/evoke-switch.js +1 -0
- package/dist/components/evoke-table.d.ts +11 -0
- package/dist/components/evoke-table.js +1 -0
- package/dist/components/evoke-tabs.d.ts +11 -0
- package/dist/components/evoke-tabs.js +1 -0
- package/dist/components/evoke-textarea.d.ts +11 -0
- package/dist/components/evoke-textarea.js +1 -0
- package/dist/components/evoke-toast.d.ts +11 -0
- package/dist/components/evoke-toast.js +1 -0
- package/dist/components/evoke-tooltip.d.ts +11 -0
- package/dist/components/evoke-tooltip.js +1 -0
- package/dist/components/icons.js +1 -0
- package/dist/esm/evoke-alert_20.entry.js +1026 -0
- package/dist/esm/evoke-ui.js +3 -3
- package/dist/esm/{index-BtM1wZ-I.js → index-C-5sEjU8.js} +146 -6
- package/dist/esm/loader.js +3 -3
- package/dist/evoke-ui/evoke-ui.css +1 -1
- package/dist/evoke-ui/evoke-ui.esm.js +1 -1
- package/dist/evoke-ui/p-0841be89.entry.js +1 -0
- package/dist/evoke-ui/p-C-5sEjU8.js +3 -0
- package/dist/themes/bootstrap.css +3 -0
- package/dist/themes/material.css +5 -2
- package/dist/themes/tailwind.css +3 -0
- package/dist/themes/tokens.css +4 -1
- package/dist/types/components/evoke-alert/evoke-alert.d.ts +2 -0
- package/dist/types/components/evoke-app-bar/evoke-app-bar.d.ts +14 -0
- package/dist/types/components/evoke-badge/evoke-badge.d.ts +17 -0
- package/dist/types/components/evoke-button/evoke-button.d.ts +12 -2
- package/dist/types/components/evoke-card/evoke-card.d.ts +9 -0
- package/dist/types/components/evoke-checkbox/evoke-checkbox.d.ts +5 -0
- package/dist/types/components/evoke-chip/evoke-chip.d.ts +14 -0
- package/dist/types/components/evoke-input/evoke-input.d.ts +9 -1
- package/dist/types/components/evoke-modal/evoke-modal.d.ts +19 -1
- package/dist/types/components/evoke-pagination/evoke-pagination.d.ts +15 -0
- package/dist/types/components/evoke-progress/evoke-progress.d.ts +13 -0
- package/dist/types/components/evoke-quantity-stepper/evoke-quantity-stepper.d.ts +18 -0
- package/dist/types/components/evoke-radio-group/evoke-radio-group.d.ts +4 -2
- package/dist/types/components/evoke-select/evoke-select.d.ts +31 -6
- package/dist/types/components/evoke-switch/evoke-switch.d.ts +15 -0
- package/dist/types/components/evoke-table/evoke-table.d.ts +29 -0
- package/dist/types/components/evoke-tabs/evoke-tabs.d.ts +21 -0
- package/dist/types/components/evoke-textarea/evoke-textarea.d.ts +28 -0
- package/dist/types/components/evoke-toast/evoke-toast.d.ts +24 -0
- package/dist/types/components/evoke-tooltip/evoke-tooltip.d.ts +17 -0
- package/dist/types/components.d.ts +1237 -18
- package/dist/types/utils/icons.d.ts +25 -0
- package/dist/vue/components.d.ts +22 -0
- package/dist/vue/components.js +220 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +2 -0
- package/dist/vue/plugin.d.ts +3 -0
- package/dist/vue/plugin.js +7 -0
- package/package.json +30 -6
- package/dist/cjs/evoke-alert_6.cjs.entry.js +0 -172
- package/dist/cjs/evoke-card.cjs.entry.js +0 -20
- package/dist/cjs/evoke-modal.cjs.entry.js +0 -34
- package/dist/esm/evoke-alert_6.entry.js +0 -165
- package/dist/esm/evoke-card.entry.js +0 -18
- package/dist/esm/evoke-modal.entry.js +0 -32
- package/dist/evoke-ui/p-243075cd.entry.js +0 -1
- package/dist/evoke-ui/p-605d4757.entry.js +0 -1
- package/dist/evoke-ui/p-9a6eaeb6.entry.js +0 -1
- package/dist/evoke-ui/p-BtM1wZ-I.js +0 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Framework-agnostic web components built with [Stencil](https://stenciljs.com). One package works in Angular, React, Vue, or plain HTML.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The kit ships 20 components (see [Components](#components)).
|
|
6
6
|
|
|
7
7
|
## Development
|
|
8
8
|
|
|
@@ -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
|
-
//
|
|
56
|
-
import {
|
|
57
|
-
|
|
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
|
-
```
|
|
60
|
-
<
|
|
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>
|
|
@@ -78,31 +94,131 @@ Out of the box the components follow the Evoke Figma design: orange primary (`#f
|
|
|
78
94
|
- `evoke-button`: `variant` = `primary` (default) | `secondary` | `outline` | `danger`; `block` makes it full width.
|
|
79
95
|
- `evoke-input`: `icon` = `mail` | `lock` | `user` | `search`.
|
|
80
96
|
- Change the look with tokens, e.g. `--evoke-primary`, `--evoke-radius-button`, `--evoke-control-height`. The Material / Tailwind / Bootstrap themes below replace these defaults with that system's look.
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
|
|
97
|
+
## Components
|
|
98
|
+
|
|
99
|
+
20 components, each with two variants chosen by **one prop** (default = variant 1). Tags start with `evoke-`, events start with `evoke`, and the value is `event.detail` itself.
|
|
100
|
+
|
|
101
|
+
| Component | Variant 1 (default) | Variant 2 | Events (`event.detail`) |
|
|
102
|
+
|---|---|---|---|
|
|
103
|
+
| `evoke-button` | `variant="primary\|secondary\|danger"` (solid) | `variant="ghost"` (text only); also `outline` | native `click` |
|
|
104
|
+
| `evoke-input` | `appearance="outlined"` | `appearance="filled"` | `evokeInput`, `evokeChange` (string) |
|
|
105
|
+
| `evoke-select` | single (native `<select>`) | `multiple` (chips) + optional `searchable` | `evokeChange` (string, or string[] when `multiple`) |
|
|
106
|
+
| `evoke-checkbox` | standard | `indeterminate` | `evokeChange` (boolean) |
|
|
107
|
+
| `evoke-radio-group` | `appearance="classic"` | `appearance="segmented"` | `evokeChange` (string) |
|
|
108
|
+
| `evoke-card` | `appearance="outlined"` | `appearance="elevated"` (+ `clickable`) | `evokeClick` |
|
|
109
|
+
| `evoke-alert` | `appearance="subtle"` | `appearance="solid"` | `evokeDismiss` |
|
|
110
|
+
| `evoke-modal` | `position="center"` | `position="right"` (drawer) | `evokeClose` |
|
|
111
|
+
| `evoke-textarea` | fixed `rows` | `auto-grow` + `max-length` counter | `evokeInput`, `evokeChange` (string) |
|
|
112
|
+
| `evoke-switch` | plain toggle | with `label` + `description` | `evokeChange` (boolean) |
|
|
113
|
+
| `evoke-tabs` | `appearance="underline"` | `appearance="pill"` | `evokeChange` (string) |
|
|
114
|
+
| `evoke-badge` | `count` (with `max`) | `dot` | none |
|
|
115
|
+
| `evoke-tooltip` | `theme="dark"` | `theme="light"` (arrow) | none |
|
|
116
|
+
| `evoke-toast` | message only | message + `action` | `evokeAction`, `evokeClose` |
|
|
117
|
+
| `evoke-table` | basic | `striped` + `sortable` | `evokeSort` ({ key, direction }) |
|
|
118
|
+
| `evoke-pagination` | `appearance="numbered"` | `appearance="compact"` | `evokeChange` (number) |
|
|
119
|
+
| `evoke-chip` | filter (selectable) | `removable` | `evokeChange` (boolean), `evokeRemove` |
|
|
120
|
+
| `evoke-progress` | `type="linear"` | `type="circular"` | none |
|
|
121
|
+
| `evoke-app-bar` | `appearance="light"` | `appearance="dark"` | none (slots `logo`, `nav`, `actions`) |
|
|
122
|
+
| `evoke-quantity-stepper` | `appearance="inline"` | `appearance="compact"` (dropdown) | `evokeChange` (number) |
|
|
123
|
+
|
|
124
|
+
Every component also has a class pass-through prop (`button-class`, `input-class`, `select-class`, `textarea-class`, `card-class`, `modal-class`) and shows `error` text where it applies.
|
|
125
|
+
|
|
126
|
+
### Examples (one per variant)
|
|
84
127
|
|
|
85
128
|
```html
|
|
86
|
-
|
|
129
|
+
<!-- Button -->
|
|
130
|
+
<evoke-button>Solid primary</evoke-button>
|
|
131
|
+
<evoke-button variant="ghost" size="sm" icon="arrow-right">Ghost</evoke-button>
|
|
132
|
+
<evoke-button loading>Saving</evoke-button>
|
|
133
|
+
<evoke-button variant="ghost" icon="cart" icon-only accessible-label="Cart"></evoke-button>
|
|
87
134
|
|
|
88
|
-
|
|
89
|
-
|
|
135
|
+
<!-- Input -->
|
|
136
|
+
<evoke-input label="Email" icon="mail" hint="We never share it"></evoke-input>
|
|
137
|
+
<evoke-input label="Email" appearance="filled" error="Email is required"></evoke-input>
|
|
90
138
|
|
|
91
|
-
|
|
92
|
-
<evoke-
|
|
139
|
+
<!-- Select: set options as a property (Angular/React/Vue) or a JSON string (plain HTML) -->
|
|
140
|
+
<evoke-select label="Role" placeholder="Select your role" options='[{"label":"Developer","value":"dev"}]'></evoke-select>
|
|
141
|
+
<evoke-select label="Skills" multiple searchable options='[{"label":"Angular","value":"ng"},{"label":"React","value":"react"}]'></evoke-select>
|
|
93
142
|
|
|
94
|
-
|
|
95
|
-
|
|
143
|
+
<!-- Checkbox -->
|
|
144
|
+
<evoke-checkbox label="Remember me" checked></evoke-checkbox>
|
|
145
|
+
<evoke-checkbox label="Select all" indeterminate></evoke-checkbox>
|
|
146
|
+
|
|
147
|
+
<!-- Radio group -->
|
|
148
|
+
<evoke-radio-group label="Plan" inline options='[{"label":"Free","value":"free"},{"label":"Pro","value":"pro"}]'></evoke-radio-group>
|
|
149
|
+
<evoke-radio-group label="Billing" appearance="segmented" options='[{"label":"Monthly","value":"m"},{"label":"Yearly","value":"y"}]'></evoke-radio-group>
|
|
150
|
+
|
|
151
|
+
<!-- Card (the media slot is optional) -->
|
|
152
|
+
<evoke-card heading="Outlined">Body</evoke-card>
|
|
153
|
+
<evoke-card appearance="elevated" clickable heading="Product"><img slot="media" src="shoe.jpg" alt="" />Body</evoke-card>
|
|
154
|
+
|
|
155
|
+
<!-- Alert -->
|
|
156
|
+
<evoke-alert type="success" dismissible>Saved</evoke-alert>
|
|
157
|
+
<evoke-alert type="danger" appearance="solid">Payment failed</evoke-alert>
|
|
158
|
+
|
|
159
|
+
<!-- Modal: set `open`, listen for evokeClose. Focus is trapped and returned on close. -->
|
|
160
|
+
<evoke-modal open heading="Confirm">Centred dialog</evoke-modal>
|
|
161
|
+
<evoke-modal open heading="Cart" position="right" size="lg">Side drawer</evoke-modal>
|
|
162
|
+
|
|
163
|
+
<!-- Textarea -->
|
|
164
|
+
<evoke-textarea label="Notes" rows="3"></evoke-textarea>
|
|
165
|
+
<evoke-textarea label="Bio" auto-grow max-length="200"></evoke-textarea>
|
|
166
|
+
|
|
167
|
+
<!-- Switch -->
|
|
168
|
+
<evoke-switch accessible-label="Notifications"></evoke-switch>
|
|
169
|
+
<evoke-switch label="Email alerts" description="Get a message when an order ships"></evoke-switch>
|
|
170
|
+
|
|
171
|
+
<!-- Tabs: options are the tab list; put the active panel's content inside -->
|
|
172
|
+
<evoke-tabs label="Product" value="specs" options='[{"label":"Overview","value":"o"},{"label":"Specs","value":"specs"}]'>Panel content</evoke-tabs>
|
|
173
|
+
<evoke-tabs appearance="pill" options='[{"label":"All","value":"all"},{"label":"Sale","value":"sale"}]'></evoke-tabs>
|
|
174
|
+
|
|
175
|
+
<!-- Badge: wrap anything, or use it on its own -->
|
|
176
|
+
<evoke-badge count="3" label="3 items in cart"><evoke-button icon="cart" icon-only accessible-label="Cart"></evoke-button></evoke-badge>
|
|
177
|
+
<evoke-badge dot color="success" label="Online"></evoke-badge>
|
|
178
|
+
|
|
179
|
+
<!-- Tooltip: wrap the trigger; placement = top | bottom | left | right -->
|
|
180
|
+
<evoke-tooltip text="Delete item"><evoke-button variant="outline">Hover</evoke-button></evoke-tooltip>
|
|
181
|
+
<evoke-tooltip text="Details" theme="light" placement="bottom"><evoke-button variant="outline">Info</evoke-button></evoke-tooltip>
|
|
182
|
+
|
|
183
|
+
<!-- Toast: duration 0 keeps it open -->
|
|
184
|
+
<evoke-toast open message="Saved"></evoke-toast>
|
|
185
|
+
<evoke-toast open message="Added to cart" action="View cart" type="success"></evoke-toast>
|
|
186
|
+
|
|
187
|
+
<!-- Table: columns/rows as properties or JSON strings -->
|
|
188
|
+
<evoke-table columns='[{"key":"name","label":"Name"}]' rows='[{"name":"Maya"}]'></evoke-table>
|
|
189
|
+
<evoke-table striped sortable columns='[{"key":"name","label":"Name","sortable":true}]' rows='[{"name":"Maya"}]'></evoke-table>
|
|
190
|
+
|
|
191
|
+
<!-- Pagination: total = number of pages -->
|
|
192
|
+
<evoke-pagination page="2" total="10"></evoke-pagination>
|
|
193
|
+
<evoke-pagination page="2" total="10" appearance="compact"></evoke-pagination>
|
|
194
|
+
|
|
195
|
+
<!-- Chip -->
|
|
196
|
+
<evoke-chip label="In stock"></evoke-chip>
|
|
197
|
+
<evoke-chip label="Red" removable></evoke-chip>
|
|
198
|
+
|
|
199
|
+
<!-- Progress -->
|
|
200
|
+
<evoke-progress value="60" label="Uploading"></evoke-progress>
|
|
201
|
+
<evoke-progress type="circular" indeterminate label="Loading"></evoke-progress>
|
|
202
|
+
|
|
203
|
+
<!-- App bar -->
|
|
204
|
+
<evoke-app-bar sticky>
|
|
205
|
+
<span slot="logo">Evoke</span>
|
|
206
|
+
<span slot="nav"><a href="/" aria-current="page">Home</a><a href="/shop">Shop</a></span>
|
|
207
|
+
<span slot="actions"><evoke-button size="sm">Sign in</evoke-button></span>
|
|
208
|
+
</evoke-app-bar>
|
|
209
|
+
<evoke-app-bar appearance="dark">...</evoke-app-bar>
|
|
210
|
+
|
|
211
|
+
<!-- Quantity stepper -->
|
|
212
|
+
<evoke-quantity-stepper value="2" min="1" max="10"></evoke-quantity-stepper>
|
|
213
|
+
<evoke-quantity-stepper value="3" appearance="compact"></evoke-quantity-stepper>
|
|
96
214
|
```
|
|
97
215
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
| `evoke-checkbox` | `label`, `checked`, `disabled`, `error`, `input-class` | `evokeChange` (boolean) |
|
|
103
|
-
| `evoke-radio-group` | `label`, `options`, `value`, `name`, `inline`, `disabled`, `error` | `evokeChange` (string) |
|
|
216
|
+
Props that take lists (`options`, `columns`, `rows`) accept an array property or a JSON string. Bind them as properties in frameworks: `[options]="roles"` (Angular), `options={roles}` (React 19), `:options="roles"` (Vue).
|
|
217
|
+
|
|
218
|
+
### Accessibility
|
|
219
|
+
Real `<button>`, `<input>`, `<select>` and `<textarea>` elements; visible labels; `aria-label` on icon-only controls (`accessible-label`); `aria-invalid` + `role="alert"` for errors; arrow-key navigation for tabs, radios, select (multi/searchable) and the stepper; Esc to close modal, drawer, select and tooltip; focus trapped in modal/drawer and restored on close; `prefers-reduced-motion` respected.
|
|
104
220
|
|
|
105
|
-
`
|
|
221
|
+
Icons (`icon` prop): `mail`, `lock`, `user`, `search`, `plus`, `minus`, `check`, `x`, `arrow-right`, `arrow-up`, `arrow-down`, `cart`, `info`, `alert`, and the chevrons.
|
|
106
222
|
## Styling / themes
|
|
107
223
|
|
|
108
224
|
Components render in the **light DOM** (`shadow: false`), so global stylesheets reach them. Look and feel is driven by `--evoke-*` CSS variables. Pick **one** theme file and import it after the base CSS:
|
|
@@ -127,7 +243,7 @@ On top of the theme you can pass utility classes through the class props: `butto
|
|
|
127
243
|
<evoke-button button-class="btn btn-lg">Bootstrap</evoke-button>
|
|
128
244
|
```
|
|
129
245
|
|
|
130
|
-
Tokens: `--evoke-primary`, `-primary-contrast`, `-danger`, `-success`, `-warning`, `-info`, `-surface`, `-text`, `-border`, `-radius`, `-radius-field`, `-font`, `-focus-ring`.
|
|
246
|
+
Tokens: `--evoke-primary`, `-primary-contrast`, `-primary-text` (primary colour used for text on light backgrounds), `-surface-muted`, `-shadow`, `-text-muted`, `-danger`, `-success`, `-warning`, `-info`, `-surface`, `-text`, `-border`, `-radius`, `-radius-field`, `-font`, `-focus-ring`.
|
|
131
247
|
|
|
132
248
|
Light-DOM trade-off: component CSS is global, so it is prefixed with the tag name (`evoke-button .evoke-btn`) to avoid collisions.
|
|
133
249
|
|
|
@@ -182,7 +298,7 @@ Alternative: `npm link` (run `npm link` in the package folder, then `npm link @e
|
|
|
182
298
|
```
|
|
183
299
|
3. Confirm the package name is free (a 404 means it is available):
|
|
184
300
|
```bash
|
|
185
|
-
npm view @evoke-tech/stencil-ui-kit
|
|
301
|
+
npm view @evoke-tech/stencil-ui-kit
|
|
186
302
|
```
|
|
187
303
|
|
|
188
304
|
### Every release
|
|
@@ -212,4 +328,4 @@ Alternative: `npm link` (run `npm link` in the package folder, then `npm link @e
|
|
|
212
328
|
- Scoped packages are private by default, so the first publish needs `--access public` (see step 4). Later releases remember it.
|
|
213
329
|
- A published version can't be overwritten; fix problems by publishing a new version. Within 72 hours you can `npm unpublish @evoke-tech/stencil-ui-kit@0.1.0`.
|
|
214
330
|
- To try a release before going public, publish a pre-release under a tag: `npm version prerelease --preid=beta && npm publish --tag beta` (installed with `npm install @evoke-tech/stencil-ui-kit@beta`).
|
|
215
|
-
- Add `"repository"` and `"author"` fields to `package.json` so the npm page links to your source.
|
|
331
|
+
- Add `"repository"` and `"author"` fields to `package.json` so the npm page links to your source.
|