@evoke-tech/stencil-ui-kit 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/README.md +120 -20
- 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 +3 -0
- 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/package.json +11 -4
- 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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const PATHS: {
|
|
2
|
+
mail: string[];
|
|
3
|
+
lock: string[];
|
|
4
|
+
user: string[];
|
|
5
|
+
search: string[];
|
|
6
|
+
plus: string[];
|
|
7
|
+
minus: string[];
|
|
8
|
+
check: string[];
|
|
9
|
+
x: string[];
|
|
10
|
+
'chevron-down': string[];
|
|
11
|
+
'chevron-up': string[];
|
|
12
|
+
'chevron-left': string[];
|
|
13
|
+
'chevron-right': string[];
|
|
14
|
+
'arrow-right': string[];
|
|
15
|
+
'arrow-up': string[];
|
|
16
|
+
'arrow-down': string[];
|
|
17
|
+
sort: string[];
|
|
18
|
+
cart: string[];
|
|
19
|
+
info: string[];
|
|
20
|
+
alert: string[];
|
|
21
|
+
};
|
|
22
|
+
export type EvokeIcon = keyof typeof PATHS;
|
|
23
|
+
/** Renders a decorative inline SVG icon. */
|
|
24
|
+
export declare function renderIcon(name: EvokeIcon | undefined, cls?: string): any;
|
|
25
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evoke-tech/stencil-ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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)",
|
|
@@ -51,10 +51,17 @@
|
|
|
51
51
|
"test": "stencil test --spec",
|
|
52
52
|
"prepublishOnly": "npm run build"
|
|
53
53
|
},
|
|
54
|
-
"keywords": [
|
|
54
|
+
"keywords": [
|
|
55
|
+
"stencil",
|
|
56
|
+
"web-components",
|
|
57
|
+
"angular",
|
|
58
|
+
"react",
|
|
59
|
+
"vue",
|
|
60
|
+
"tailwind",
|
|
61
|
+
"bootstrap",
|
|
62
|
+
"angular-material"
|
|
63
|
+
],
|
|
55
64
|
"devDependencies": {
|
|
56
65
|
"@stencil/core": "^4.45.2"
|
|
57
66
|
}
|
|
58
67
|
}
|
|
59
|
-
|
|
60
|
-
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-B8xS0y1i.js');
|
|
4
|
-
|
|
5
|
-
const evokeAlertCss = () => `evoke-alert{display:block}evoke-alert .evoke-alert{display:flex;justify-content:space-between;gap:1rem;padding:0.75rem 1rem;border-radius:var(--evoke-radius, 8px);border:1px solid currentColor;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif)}evoke-alert .evoke-alert--info{color:var(--evoke-info, #0891b2);background:#ecfeff}evoke-alert .evoke-alert--success{color:var(--evoke-success, #16a34a);background:#f0fdf4}evoke-alert .evoke-alert--warning{color:var(--evoke-warning, #d97706);background:#fffbeb}evoke-alert .evoke-alert--danger{color:var(--evoke-danger, #dc2626);background:#fef2f2}evoke-alert .evoke-alert__close{background:none;border:0;color:inherit;font-size:1.25rem;cursor:pointer;line-height:1}`;
|
|
6
|
-
|
|
7
|
-
const EvokeAlert = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.evokeDismiss = index.createEvent(this, "evokeDismiss");
|
|
11
|
-
this.type = 'info';
|
|
12
|
-
this.dismissible = false;
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return (index.h("div", { key: 'aa100cfbdf5f8551d0a46c50aa649a523bd05da7', class: `evoke-alert evoke-alert--${this.type}`, role: "alert" }, index.h("div", { key: '93c4881344307580c8d1411259651f5eb22a72f5', class: "evoke-alert__content" }, index.h("slot", { key: 'ba362718033dff392088efed51e8332b8cccfa2d' })), this.dismissible && (index.h("button", { key: '5dcdd2e50ca6df6e430f59a4f88b63b3419c42b3', type: "button", class: "evoke-alert__close", "aria-label": "Dismiss", onClick: () => this.evokeDismiss.emit() }, "\u00D7"))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
EvokeAlert.style = evokeAlertCss();
|
|
19
|
-
|
|
20
|
-
const evokeButtonCss = () => `evoke-button{display:inline-block}evoke-button .evoke-btn{box-sizing:border-box;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);line-height:1.5;cursor:pointer;height:var(--evoke-control-height, 56px);padding:0 var(--evoke-button-padding-x, 36px);display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;border:1px solid transparent;border-radius:var(--evoke-radius-button, 9999px);transition:filter 0.15s, box-shadow 0.15s}evoke-button .evoke-btn:hover:not(:disabled){filter:brightness(0.92)}evoke-button .evoke-btn:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-button .evoke-btn:disabled{opacity:0.5;cursor:not-allowed}evoke-button .evoke-btn--primary{background:var(--evoke-primary, #ff5316);color:var(--evoke-primary-contrast, #ffffff)}evoke-button .evoke-btn--secondary{background:var(--evoke-secondary, #0b1560);color:var(--evoke-secondary-contrast, #ffffff)}evoke-button .evoke-btn--danger{background:var(--evoke-danger, #dc2626);color:#fff}evoke-button .evoke-btn--outline{background:transparent;color:var(--evoke-primary, #ff5316);border-color:var(--evoke-primary, #ff5316)}evoke-button[block]{display:block}evoke-button[block] .evoke-btn{width:100%}`;
|
|
21
|
-
|
|
22
|
-
const EvokeButton = class {
|
|
23
|
-
constructor(hostRef) {
|
|
24
|
-
index.registerInstance(this, hostRef);
|
|
25
|
-
/** Visual variant */
|
|
26
|
-
this.variant = 'primary';
|
|
27
|
-
this.type = 'button';
|
|
28
|
-
this.disabled = false;
|
|
29
|
-
/** Stretch to the full width of the container */
|
|
30
|
-
this.block = false;
|
|
31
|
-
/** Extra classes for the inner <button>, e.g. "btn btn-lg" (Bootstrap) or "shadow-lg" (Tailwind) */
|
|
32
|
-
this.buttonClass = '';
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (index.h("button", { key: 'b48e546fa722334e82989fe1125d7c9ab3fb4b17', type: this.type, disabled: this.disabled, class: `evoke-btn evoke-btn--${this.variant} ${this.buttonClass}`.trim() }, index.h("slot", { key: '04716e70e788b071b67bbb25b8bc9d57b5066641' })));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
EvokeButton.style = evokeButtonCss();
|
|
39
|
-
|
|
40
|
-
const evokeCheckboxCss = () => `evoke-checkbox{display:block}evoke-checkbox .evoke-check{display:flex;flex-direction:column;gap:0.25rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);color:var(--evoke-text, #1a1a1a)}evoke-checkbox .evoke-check__row{display:inline-flex;align-items:center;gap:0.5rem;cursor:pointer;font-size:0.875rem}evoke-checkbox .evoke-check__row--disabled{opacity:0.6;cursor:not-allowed}evoke-checkbox .evoke-check__input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:16px;height:16px;border:2px solid var(--evoke-primary, #ff5316);border-radius:4px;background:var(--evoke-surface, #ffffff) center / 12px no-repeat;cursor:inherit;transition:background-color 0.15s, box-shadow 0.15s}evoke-checkbox .evoke-check__input:checked{background-color:var(--evoke-primary, #ff5316);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}evoke-checkbox .evoke-check__input:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-checkbox .evoke-check__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-checkbox .evoke-check__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
41
|
-
|
|
42
|
-
const EvokeCheckbox = class {
|
|
43
|
-
constructor(hostRef) {
|
|
44
|
-
index.registerInstance(this, hostRef);
|
|
45
|
-
this.evokeChange = index.createEvent(this, "evokeChange");
|
|
46
|
-
this.label = '';
|
|
47
|
-
this.checked = false;
|
|
48
|
-
this.disabled = false;
|
|
49
|
-
/** Error message shown below the checkbox */
|
|
50
|
-
this.error = '';
|
|
51
|
-
/** Extra classes for the inner <input> */
|
|
52
|
-
this.inputClass = '';
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
return (index.h("div", { key: '873dc82ace76a0e84e3ee13e9275b9db130e96eb', class: "evoke-check" }, index.h("label", { key: '26b9e5ee359f855eca9f8e7722c06e62d6856005', class: `evoke-check__row ${this.disabled ? 'evoke-check__row--disabled' : ''}` }, index.h("input", { key: 'a338d54a0d91b8f2766dc540a0af2defa1241aa0', type: "checkbox", class: `evoke-check__input ${this.error ? 'evoke-check__input--error' : ''} ${this.inputClass}`.trim(), checked: this.checked, disabled: this.disabled, "aria-invalid": this.error ? 'true' : undefined, onChange: (e) => {
|
|
56
|
-
this.checked = e.target.checked;
|
|
57
|
-
this.evokeChange.emit(this.checked);
|
|
58
|
-
} }), index.h("span", { key: '7036e0576bb0fcf561f1fa5a970409bd419cd363', class: "evoke-check__label" }, this.label, index.h("slot", { key: 'fba4bd96cecebce1b68297a7a59bbc660ad00107' }))), this.error && index.h("span", { key: '924e7ca9becb279c733b9fa79daea6c1f7b4d140', class: "evoke-check__error", role: "alert" }, this.error)));
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
EvokeCheckbox.style = evokeCheckboxCss();
|
|
62
|
-
|
|
63
|
-
const evokeInputCss = () => `evoke-input{display:block}evoke-input .evoke-field{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);color:var(--evoke-text, #1a1a1a)}evoke-input .evoke-field__label{color:var(--evoke-text, #1a1a1a)}evoke-input .evoke-field__control{position:relative}evoke-input .evoke-field__icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--evoke-text-muted, #7a7a7a);pointer-events:none}evoke-input .evoke-field__input{box-sizing:border-box;width:100%;height:var(--evoke-control-height, 56px);padding:0 24px;border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);font:inherit;transition:border-color 0.15s, box-shadow 0.15s}evoke-input .evoke-field__input--icon{padding-left:44px}evoke-input .evoke-field__input::placeholder{color:var(--evoke-text-muted, #7a7a7a)}evoke-input .evoke-field__input:focus{outline:none;border-color:var(--evoke-secondary, #0b1560);box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-input .evoke-field__input:disabled{opacity:0.6;cursor:not-allowed}evoke-input .evoke-field__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-input .evoke-field__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
64
|
-
|
|
65
|
-
const ICONS = {
|
|
66
|
-
mail: ['M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z', 'm22 7-10 6L2 7'],
|
|
67
|
-
lock: ['M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z', 'M7 11V7a5 5 0 0 1 10 0v4'],
|
|
68
|
-
user: ['M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2', 'M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z'],
|
|
69
|
-
search: ['M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z', 'm21 21-4.3-4.3'],
|
|
70
|
-
};
|
|
71
|
-
const EvokeInput = class {
|
|
72
|
-
constructor(hostRef) {
|
|
73
|
-
index.registerInstance(this, hostRef);
|
|
74
|
-
this.evokeInput = index.createEvent(this, "evokeInput");
|
|
75
|
-
this.evokeChange = index.createEvent(this, "evokeChange");
|
|
76
|
-
this.label = '';
|
|
77
|
-
this.value = '';
|
|
78
|
-
this.type = 'text';
|
|
79
|
-
this.placeholder = '';
|
|
80
|
-
this.disabled = false;
|
|
81
|
-
this.error = '';
|
|
82
|
-
/** Extra classes for the inner <input>, e.g. "form-control" (Bootstrap) */
|
|
83
|
-
this.inputClass = '';
|
|
84
|
-
this.inputId = `evoke-input-${Math.random().toString(36).slice(2, 9)}`;
|
|
85
|
-
}
|
|
86
|
-
render() {
|
|
87
|
-
const iconPaths = this.icon ? ICONS[this.icon] : undefined;
|
|
88
|
-
return (index.h("div", { key: '1d86d23ab15a3f626d9fb970032d5214a94df0ef', class: "evoke-field" }, this.label && index.h("label", { key: 'c3fea666855f42bf73dafb585645cb9035191d03', htmlFor: this.inputId, class: "evoke-field__label" }, this.label), index.h("div", { key: '78656110961b784f80ce1a6efd5152452bff5f08', class: "evoke-field__control" }, iconPaths && (index.h("svg", { key: '5635c5c5066042ea8c8a7a11067a1b00e6d92915', class: "evoke-field__icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, iconPaths.map((d) => index.h("path", { d: d })))), index.h("input", { key: '33ce669be666a515f053173c2a6f3105b4f806c9', id: this.inputId, class: `evoke-field__input ${iconPaths ? 'evoke-field__input--icon' : ''} ${this.error ? 'evoke-field__input--error' : ''} ${this.inputClass}`.trim(), type: this.type, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.error ? 'true' : undefined, onInput: (e) => {
|
|
89
|
-
this.value = e.target.value;
|
|
90
|
-
this.evokeInput.emit(this.value);
|
|
91
|
-
}, onChange: (e) => this.evokeChange.emit(e.target.value) })), this.error && index.h("span", { key: 'c396800cb6a6f10309e936b1300ed9652e56d153', class: "evoke-field__error", role: "alert" }, this.error)));
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
EvokeInput.style = evokeInputCss();
|
|
95
|
-
|
|
96
|
-
/** Accepts an array, or a JSON string (so options can be set as an HTML attribute). */
|
|
97
|
-
function parseOptions(options) {
|
|
98
|
-
if (Array.isArray(options))
|
|
99
|
-
return options;
|
|
100
|
-
try {
|
|
101
|
-
const parsed = JSON.parse(options);
|
|
102
|
-
return Array.isArray(parsed) ? parsed : [];
|
|
103
|
-
}
|
|
104
|
-
catch (_a) {
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const evokeRadioGroupCss = () => `evoke-radio-group{display:block}evoke-radio-group .evoke-radio{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);color:var(--evoke-text, #1a1a1a)}evoke-radio-group .evoke-radio__label{font-size:var(--evoke-font-size, 16px)}evoke-radio-group .evoke-radio__options{display:flex;flex-direction:column;gap:0.5rem}evoke-radio-group .evoke-radio__options--inline{flex-direction:row;flex-wrap:wrap;gap:1.25rem}evoke-radio-group .evoke-radio__row{display:inline-flex;align-items:center;gap:0.5rem;cursor:pointer;font-size:0.875rem}evoke-radio-group .evoke-radio__row--disabled{opacity:0.6;cursor:not-allowed}evoke-radio-group .evoke-radio__input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:16px;height:16px;border:2px solid var(--evoke-primary, #ff5316);border-radius:50%;background:var(--evoke-surface, #ffffff);cursor:inherit;transition:box-shadow 0.15s}evoke-radio-group .evoke-radio__input:checked{background:radial-gradient(circle, var(--evoke-primary, #ff5316) 0 40%, var(--evoke-surface, #ffffff) 45%)}evoke-radio-group .evoke-radio__input:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-radio-group .evoke-radio__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-radio-group .evoke-radio__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
110
|
-
|
|
111
|
-
const EvokeRadioGroup = class {
|
|
112
|
-
constructor(hostRef) {
|
|
113
|
-
index.registerInstance(this, hostRef);
|
|
114
|
-
this.evokeChange = index.createEvent(this, "evokeChange");
|
|
115
|
-
this.label = '';
|
|
116
|
-
/** Options as an array of { label, value, disabled? } or a JSON string of the same */
|
|
117
|
-
this.options = [];
|
|
118
|
-
this.value = '';
|
|
119
|
-
this.name = '';
|
|
120
|
-
this.disabled = false;
|
|
121
|
-
/** Lay options out in a row instead of a column */
|
|
122
|
-
this.inline = false;
|
|
123
|
-
/** Error message shown below the group */
|
|
124
|
-
this.error = '';
|
|
125
|
-
this.groupName = `evoke-radio-${Math.random().toString(36).slice(2, 9)}`;
|
|
126
|
-
}
|
|
127
|
-
render() {
|
|
128
|
-
const name = this.name || this.groupName;
|
|
129
|
-
return (index.h("div", { key: 'f90c5bee5d2eff847373e075c32689be55ded5b7', class: "evoke-radio", role: "radiogroup", "aria-label": this.label || undefined }, this.label && index.h("span", { key: '1fbc7f744f3ec03637afce04a0dba2ee7beeec37', class: "evoke-radio__label" }, this.label), index.h("div", { key: 'cec0e44939dbca02e5623ce9b49c5c074f7c6fa7', class: `evoke-radio__options ${this.inline ? 'evoke-radio__options--inline' : ''}` }, parseOptions(this.options).map((o) => {
|
|
130
|
-
const off = this.disabled || o.disabled;
|
|
131
|
-
return (index.h("label", { class: `evoke-radio__row ${off ? 'evoke-radio__row--disabled' : ''}` }, index.h("input", { type: "radio", class: `evoke-radio__input ${this.error ? 'evoke-radio__input--error' : ''}`.trim(), name: name, value: o.value, checked: o.value === this.value, disabled: off, onChange: () => {
|
|
132
|
-
this.value = o.value;
|
|
133
|
-
this.evokeChange.emit(this.value);
|
|
134
|
-
} }), index.h("span", null, o.label)));
|
|
135
|
-
})), this.error && index.h("span", { key: 'd19f6043ee840711e62a6feb577a3f44dbed48be', class: "evoke-radio__error", role: "alert" }, this.error)));
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
EvokeRadioGroup.style = evokeRadioGroupCss();
|
|
139
|
-
|
|
140
|
-
const evokeSelectCss = () => `evoke-select{display:block}evoke-select .evoke-field{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);color:var(--evoke-text, #1a1a1a)}evoke-select .evoke-field__control{position:relative}evoke-select .evoke-field__input{box-sizing:border-box;width:100%;height:var(--evoke-control-height, 56px);padding:0 48px 0 24px;border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);font:inherit;appearance:none;-webkit-appearance:none;cursor:pointer;transition:border-color 0.15s, box-shadow 0.15s}evoke-select .evoke-field__select--empty{color:var(--evoke-text-muted, #7a7a7a)}evoke-select .evoke-field__input:focus{outline:none;border-color:var(--evoke-secondary, #0b1560);box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-select .evoke-field__input:disabled{opacity:0.6;cursor:not-allowed}evoke-select .evoke-field__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-select .evoke-field__chevron{position:absolute;right:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--evoke-text-muted, #7a7a7a);pointer-events:none}evoke-select .evoke-field__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
141
|
-
|
|
142
|
-
const EvokeSelect = class {
|
|
143
|
-
constructor(hostRef) {
|
|
144
|
-
index.registerInstance(this, hostRef);
|
|
145
|
-
this.evokeChange = index.createEvent(this, "evokeChange");
|
|
146
|
-
this.label = '';
|
|
147
|
-
/** Options as an array of { label, value, disabled? } or a JSON string of the same */
|
|
148
|
-
this.options = [];
|
|
149
|
-
this.value = '';
|
|
150
|
-
this.placeholder = 'Select an option';
|
|
151
|
-
this.disabled = false;
|
|
152
|
-
/** Error message shown below the field */
|
|
153
|
-
this.error = '';
|
|
154
|
-
/** Extra classes for the inner <select>, e.g. "form-select" (Bootstrap) */
|
|
155
|
-
this.selectClass = '';
|
|
156
|
-
this.selectId = `evoke-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
157
|
-
}
|
|
158
|
-
render() {
|
|
159
|
-
return (index.h("div", { key: '4a1543d6630c1594254213c2cafcfc6883f32ce2', class: "evoke-field" }, this.label && index.h("label", { key: 'e387eb1dd52bd755ad848908603c06f45e99a9d8', htmlFor: this.selectId, class: "evoke-field__label" }, this.label), index.h("div", { key: '4a23b2f05d408cd8f5d4942dc578e5a07233d17d', class: "evoke-field__control" }, index.h("select", { key: '3aae8448326e8e4008570b07320f28a576d4c08c', id: this.selectId, class: `evoke-field__input evoke-field__select ${this.value === '' ? 'evoke-field__select--empty' : ''} ${this.error ? 'evoke-field__input--error' : ''} ${this.selectClass}`.trim(), disabled: this.disabled, "aria-invalid": this.error ? 'true' : undefined, onChange: (e) => {
|
|
160
|
-
this.value = e.target.value;
|
|
161
|
-
this.evokeChange.emit(this.value);
|
|
162
|
-
} }, index.h("option", { key: '04defa87db88f21fc5bec7577afb7bb2ded1d6c6', value: "", disabled: true, selected: this.value === '' }, this.placeholder), parseOptions(this.options).map((o) => (index.h("option", { value: o.value, disabled: o.disabled, selected: o.value === this.value }, o.label)))), index.h("svg", { key: '35046765ad125b7c7bfc66b3a55e8c2dfeae05a0', class: "evoke-field__chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { key: 'e65fd0cf45dd70061f37afa51db756906fe819d0', d: "m6 9 6 6 6-6" }))), this.error && index.h("span", { key: '055c84a93853e14c2d1ec7c493c59f2d864c071a', class: "evoke-field__error", role: "alert" }, this.error)));
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
EvokeSelect.style = evokeSelectCss();
|
|
166
|
-
|
|
167
|
-
exports.evoke_alert = EvokeAlert;
|
|
168
|
-
exports.evoke_button = EvokeButton;
|
|
169
|
-
exports.evoke_checkbox = EvokeCheckbox;
|
|
170
|
-
exports.evoke_input = EvokeInput;
|
|
171
|
-
exports.evoke_radio_group = EvokeRadioGroup;
|
|
172
|
-
exports.evoke_select = EvokeSelect;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-B8xS0y1i.js');
|
|
4
|
-
|
|
5
|
-
const evokeCardCss = () => `evoke-card{display:block}evoke-card .evoke-card{background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);overflow:hidden}evoke-card .evoke-card__header{padding:0.75rem 1rem;font-weight:600;border-bottom:1px solid var(--evoke-border, #dedede)}evoke-card .evoke-card__body{padding:1rem}`;
|
|
6
|
-
|
|
7
|
-
const EvokeCard = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.heading = '';
|
|
11
|
-
/** Extra classes for the card container, e.g. "shadow-md" (Tailwind) or "card" (Bootstrap) */
|
|
12
|
-
this.cardClass = '';
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return (index.h("div", { key: 'cc5ba924fc7779952a0677c2e70303781928fe48', class: `evoke-card ${this.cardClass}`.trim() }, this.heading && index.h("div", { key: 'bc64916a89f0309642d9b255c424e6764efbe76b', class: "evoke-card__header" }, this.heading), index.h("div", { key: 'bf3c54ab8eed335f9ce9143b8a29168563c1773f', class: "evoke-card__body" }, index.h("slot", { key: 'e4668d5c4fc9bd870012c84780918de81fb7a8f3' }))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
EvokeCard.style = evokeCardCss();
|
|
19
|
-
|
|
20
|
-
exports.evoke_card = EvokeCard;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-B8xS0y1i.js');
|
|
4
|
-
|
|
5
|
-
const evokeModalCss = () => `evoke-modal .evoke-modal__backdrop{position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000}evoke-modal .evoke-modal{background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);border-radius:var(--evoke-radius-field, 8px);font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);min-width:min(90vw, 360px);max-width:90vw;max-height:90vh;overflow:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.25)}evoke-modal .evoke-modal__header{display:flex;justify-content:space-between;align-items:center;padding:0.75rem 1rem;font-weight:600;border-bottom:1px solid var(--evoke-border, #dedede)}evoke-modal .evoke-modal__close{background:none;border:0;color:inherit;font-size:1.25rem;cursor:pointer;line-height:1}evoke-modal .evoke-modal__body{padding:1rem}`;
|
|
6
|
-
|
|
7
|
-
const EvokeModal = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.evokeClose = index.createEvent(this, "evokeClose");
|
|
11
|
-
/** Whether the modal is visible */
|
|
12
|
-
this.open = false;
|
|
13
|
-
this.heading = '';
|
|
14
|
-
this.closeOnBackdrop = true;
|
|
15
|
-
/** Extra classes for the dialog panel */
|
|
16
|
-
this.modalClass = '';
|
|
17
|
-
}
|
|
18
|
-
onKeydown(e) {
|
|
19
|
-
if (this.open && e.key === 'Escape')
|
|
20
|
-
this.close();
|
|
21
|
-
}
|
|
22
|
-
close() {
|
|
23
|
-
this.open = false;
|
|
24
|
-
this.evokeClose.emit();
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
if (!this.open)
|
|
28
|
-
return null;
|
|
29
|
-
return (index.h("div", { class: "evoke-modal__backdrop", onClick: () => this.closeOnBackdrop && this.close() }, index.h("div", { class: `evoke-modal ${this.modalClass}`.trim(), role: "dialog", "aria-modal": "true", "aria-label": this.heading || undefined, onClick: (e) => e.stopPropagation() }, index.h("div", { class: "evoke-modal__header" }, index.h("span", null, this.heading), index.h("button", { type: "button", class: "evoke-modal__close", "aria-label": "Close", onClick: () => this.close() }, "\u00D7")), index.h("div", { class: "evoke-modal__body" }, index.h("slot", null)))));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
EvokeModal.style = evokeModalCss();
|
|
33
|
-
|
|
34
|
-
exports.evoke_modal = EvokeModal;
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-BtM1wZ-I.js';
|
|
2
|
-
|
|
3
|
-
const evokeAlertCss = () => `evoke-alert{display:block}evoke-alert .evoke-alert{display:flex;justify-content:space-between;gap:1rem;padding:0.75rem 1rem;border-radius:var(--evoke-radius, 8px);border:1px solid currentColor;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif)}evoke-alert .evoke-alert--info{color:var(--evoke-info, #0891b2);background:#ecfeff}evoke-alert .evoke-alert--success{color:var(--evoke-success, #16a34a);background:#f0fdf4}evoke-alert .evoke-alert--warning{color:var(--evoke-warning, #d97706);background:#fffbeb}evoke-alert .evoke-alert--danger{color:var(--evoke-danger, #dc2626);background:#fef2f2}evoke-alert .evoke-alert__close{background:none;border:0;color:inherit;font-size:1.25rem;cursor:pointer;line-height:1}`;
|
|
4
|
-
|
|
5
|
-
const EvokeAlert = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.evokeDismiss = createEvent(this, "evokeDismiss");
|
|
9
|
-
this.type = 'info';
|
|
10
|
-
this.dismissible = false;
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return (h("div", { key: 'aa100cfbdf5f8551d0a46c50aa649a523bd05da7', class: `evoke-alert evoke-alert--${this.type}`, role: "alert" }, h("div", { key: '93c4881344307580c8d1411259651f5eb22a72f5', class: "evoke-alert__content" }, h("slot", { key: 'ba362718033dff392088efed51e8332b8cccfa2d' })), this.dismissible && (h("button", { key: '5dcdd2e50ca6df6e430f59a4f88b63b3419c42b3', type: "button", class: "evoke-alert__close", "aria-label": "Dismiss", onClick: () => this.evokeDismiss.emit() }, "\u00D7"))));
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
EvokeAlert.style = evokeAlertCss();
|
|
17
|
-
|
|
18
|
-
const evokeButtonCss = () => `evoke-button{display:inline-block}evoke-button .evoke-btn{box-sizing:border-box;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);line-height:1.5;cursor:pointer;height:var(--evoke-control-height, 56px);padding:0 var(--evoke-button-padding-x, 36px);display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;border:1px solid transparent;border-radius:var(--evoke-radius-button, 9999px);transition:filter 0.15s, box-shadow 0.15s}evoke-button .evoke-btn:hover:not(:disabled){filter:brightness(0.92)}evoke-button .evoke-btn:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-button .evoke-btn:disabled{opacity:0.5;cursor:not-allowed}evoke-button .evoke-btn--primary{background:var(--evoke-primary, #ff5316);color:var(--evoke-primary-contrast, #ffffff)}evoke-button .evoke-btn--secondary{background:var(--evoke-secondary, #0b1560);color:var(--evoke-secondary-contrast, #ffffff)}evoke-button .evoke-btn--danger{background:var(--evoke-danger, #dc2626);color:#fff}evoke-button .evoke-btn--outline{background:transparent;color:var(--evoke-primary, #ff5316);border-color:var(--evoke-primary, #ff5316)}evoke-button[block]{display:block}evoke-button[block] .evoke-btn{width:100%}`;
|
|
19
|
-
|
|
20
|
-
const EvokeButton = class {
|
|
21
|
-
constructor(hostRef) {
|
|
22
|
-
registerInstance(this, hostRef);
|
|
23
|
-
/** Visual variant */
|
|
24
|
-
this.variant = 'primary';
|
|
25
|
-
this.type = 'button';
|
|
26
|
-
this.disabled = false;
|
|
27
|
-
/** Stretch to the full width of the container */
|
|
28
|
-
this.block = false;
|
|
29
|
-
/** Extra classes for the inner <button>, e.g. "btn btn-lg" (Bootstrap) or "shadow-lg" (Tailwind) */
|
|
30
|
-
this.buttonClass = '';
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
return (h("button", { key: 'b48e546fa722334e82989fe1125d7c9ab3fb4b17', type: this.type, disabled: this.disabled, class: `evoke-btn evoke-btn--${this.variant} ${this.buttonClass}`.trim() }, h("slot", { key: '04716e70e788b071b67bbb25b8bc9d57b5066641' })));
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
EvokeButton.style = evokeButtonCss();
|
|
37
|
-
|
|
38
|
-
const evokeCheckboxCss = () => `evoke-checkbox{display:block}evoke-checkbox .evoke-check{display:flex;flex-direction:column;gap:0.25rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);color:var(--evoke-text, #1a1a1a)}evoke-checkbox .evoke-check__row{display:inline-flex;align-items:center;gap:0.5rem;cursor:pointer;font-size:0.875rem}evoke-checkbox .evoke-check__row--disabled{opacity:0.6;cursor:not-allowed}evoke-checkbox .evoke-check__input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:16px;height:16px;border:2px solid var(--evoke-primary, #ff5316);border-radius:4px;background:var(--evoke-surface, #ffffff) center / 12px no-repeat;cursor:inherit;transition:background-color 0.15s, box-shadow 0.15s}evoke-checkbox .evoke-check__input:checked{background-color:var(--evoke-primary, #ff5316);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}evoke-checkbox .evoke-check__input:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-checkbox .evoke-check__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-checkbox .evoke-check__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
39
|
-
|
|
40
|
-
const EvokeCheckbox = class {
|
|
41
|
-
constructor(hostRef) {
|
|
42
|
-
registerInstance(this, hostRef);
|
|
43
|
-
this.evokeChange = createEvent(this, "evokeChange");
|
|
44
|
-
this.label = '';
|
|
45
|
-
this.checked = false;
|
|
46
|
-
this.disabled = false;
|
|
47
|
-
/** Error message shown below the checkbox */
|
|
48
|
-
this.error = '';
|
|
49
|
-
/** Extra classes for the inner <input> */
|
|
50
|
-
this.inputClass = '';
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
return (h("div", { key: '873dc82ace76a0e84e3ee13e9275b9db130e96eb', class: "evoke-check" }, h("label", { key: '26b9e5ee359f855eca9f8e7722c06e62d6856005', class: `evoke-check__row ${this.disabled ? 'evoke-check__row--disabled' : ''}` }, h("input", { key: 'a338d54a0d91b8f2766dc540a0af2defa1241aa0', type: "checkbox", class: `evoke-check__input ${this.error ? 'evoke-check__input--error' : ''} ${this.inputClass}`.trim(), checked: this.checked, disabled: this.disabled, "aria-invalid": this.error ? 'true' : undefined, onChange: (e) => {
|
|
54
|
-
this.checked = e.target.checked;
|
|
55
|
-
this.evokeChange.emit(this.checked);
|
|
56
|
-
} }), h("span", { key: '7036e0576bb0fcf561f1fa5a970409bd419cd363', class: "evoke-check__label" }, this.label, h("slot", { key: 'fba4bd96cecebce1b68297a7a59bbc660ad00107' }))), this.error && h("span", { key: '924e7ca9becb279c733b9fa79daea6c1f7b4d140', class: "evoke-check__error", role: "alert" }, this.error)));
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
EvokeCheckbox.style = evokeCheckboxCss();
|
|
60
|
-
|
|
61
|
-
const evokeInputCss = () => `evoke-input{display:block}evoke-input .evoke-field{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);color:var(--evoke-text, #1a1a1a)}evoke-input .evoke-field__label{color:var(--evoke-text, #1a1a1a)}evoke-input .evoke-field__control{position:relative}evoke-input .evoke-field__icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--evoke-text-muted, #7a7a7a);pointer-events:none}evoke-input .evoke-field__input{box-sizing:border-box;width:100%;height:var(--evoke-control-height, 56px);padding:0 24px;border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);font:inherit;transition:border-color 0.15s, box-shadow 0.15s}evoke-input .evoke-field__input--icon{padding-left:44px}evoke-input .evoke-field__input::placeholder{color:var(--evoke-text-muted, #7a7a7a)}evoke-input .evoke-field__input:focus{outline:none;border-color:var(--evoke-secondary, #0b1560);box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-input .evoke-field__input:disabled{opacity:0.6;cursor:not-allowed}evoke-input .evoke-field__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-input .evoke-field__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
62
|
-
|
|
63
|
-
const ICONS = {
|
|
64
|
-
mail: ['M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z', 'm22 7-10 6L2 7'],
|
|
65
|
-
lock: ['M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z', 'M7 11V7a5 5 0 0 1 10 0v4'],
|
|
66
|
-
user: ['M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2', 'M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z'],
|
|
67
|
-
search: ['M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z', 'm21 21-4.3-4.3'],
|
|
68
|
-
};
|
|
69
|
-
const EvokeInput = class {
|
|
70
|
-
constructor(hostRef) {
|
|
71
|
-
registerInstance(this, hostRef);
|
|
72
|
-
this.evokeInput = createEvent(this, "evokeInput");
|
|
73
|
-
this.evokeChange = createEvent(this, "evokeChange");
|
|
74
|
-
this.label = '';
|
|
75
|
-
this.value = '';
|
|
76
|
-
this.type = 'text';
|
|
77
|
-
this.placeholder = '';
|
|
78
|
-
this.disabled = false;
|
|
79
|
-
this.error = '';
|
|
80
|
-
/** Extra classes for the inner <input>, e.g. "form-control" (Bootstrap) */
|
|
81
|
-
this.inputClass = '';
|
|
82
|
-
this.inputId = `evoke-input-${Math.random().toString(36).slice(2, 9)}`;
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
const iconPaths = this.icon ? ICONS[this.icon] : undefined;
|
|
86
|
-
return (h("div", { key: '1d86d23ab15a3f626d9fb970032d5214a94df0ef', class: "evoke-field" }, this.label && h("label", { key: 'c3fea666855f42bf73dafb585645cb9035191d03', htmlFor: this.inputId, class: "evoke-field__label" }, this.label), h("div", { key: '78656110961b784f80ce1a6efd5152452bff5f08', class: "evoke-field__control" }, iconPaths && (h("svg", { key: '5635c5c5066042ea8c8a7a11067a1b00e6d92915', class: "evoke-field__icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, iconPaths.map((d) => h("path", { d: d })))), h("input", { key: '33ce669be666a515f053173c2a6f3105b4f806c9', id: this.inputId, class: `evoke-field__input ${iconPaths ? 'evoke-field__input--icon' : ''} ${this.error ? 'evoke-field__input--error' : ''} ${this.inputClass}`.trim(), type: this.type, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.error ? 'true' : undefined, onInput: (e) => {
|
|
87
|
-
this.value = e.target.value;
|
|
88
|
-
this.evokeInput.emit(this.value);
|
|
89
|
-
}, onChange: (e) => this.evokeChange.emit(e.target.value) })), this.error && h("span", { key: 'c396800cb6a6f10309e936b1300ed9652e56d153', class: "evoke-field__error", role: "alert" }, this.error)));
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
EvokeInput.style = evokeInputCss();
|
|
93
|
-
|
|
94
|
-
/** Accepts an array, or a JSON string (so options can be set as an HTML attribute). */
|
|
95
|
-
function parseOptions(options) {
|
|
96
|
-
if (Array.isArray(options))
|
|
97
|
-
return options;
|
|
98
|
-
try {
|
|
99
|
-
const parsed = JSON.parse(options);
|
|
100
|
-
return Array.isArray(parsed) ? parsed : [];
|
|
101
|
-
}
|
|
102
|
-
catch (_a) {
|
|
103
|
-
return [];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const evokeRadioGroupCss = () => `evoke-radio-group{display:block}evoke-radio-group .evoke-radio{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);color:var(--evoke-text, #1a1a1a)}evoke-radio-group .evoke-radio__label{font-size:var(--evoke-font-size, 16px)}evoke-radio-group .evoke-radio__options{display:flex;flex-direction:column;gap:0.5rem}evoke-radio-group .evoke-radio__options--inline{flex-direction:row;flex-wrap:wrap;gap:1.25rem}evoke-radio-group .evoke-radio__row{display:inline-flex;align-items:center;gap:0.5rem;cursor:pointer;font-size:0.875rem}evoke-radio-group .evoke-radio__row--disabled{opacity:0.6;cursor:not-allowed}evoke-radio-group .evoke-radio__input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:16px;height:16px;border:2px solid var(--evoke-primary, #ff5316);border-radius:50%;background:var(--evoke-surface, #ffffff);cursor:inherit;transition:box-shadow 0.15s}evoke-radio-group .evoke-radio__input:checked{background:radial-gradient(circle, var(--evoke-primary, #ff5316) 0 40%, var(--evoke-surface, #ffffff) 45%)}evoke-radio-group .evoke-radio__input:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-radio-group .evoke-radio__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-radio-group .evoke-radio__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
108
|
-
|
|
109
|
-
const EvokeRadioGroup = class {
|
|
110
|
-
constructor(hostRef) {
|
|
111
|
-
registerInstance(this, hostRef);
|
|
112
|
-
this.evokeChange = createEvent(this, "evokeChange");
|
|
113
|
-
this.label = '';
|
|
114
|
-
/** Options as an array of { label, value, disabled? } or a JSON string of the same */
|
|
115
|
-
this.options = [];
|
|
116
|
-
this.value = '';
|
|
117
|
-
this.name = '';
|
|
118
|
-
this.disabled = false;
|
|
119
|
-
/** Lay options out in a row instead of a column */
|
|
120
|
-
this.inline = false;
|
|
121
|
-
/** Error message shown below the group */
|
|
122
|
-
this.error = '';
|
|
123
|
-
this.groupName = `evoke-radio-${Math.random().toString(36).slice(2, 9)}`;
|
|
124
|
-
}
|
|
125
|
-
render() {
|
|
126
|
-
const name = this.name || this.groupName;
|
|
127
|
-
return (h("div", { key: 'f90c5bee5d2eff847373e075c32689be55ded5b7', class: "evoke-radio", role: "radiogroup", "aria-label": this.label || undefined }, this.label && h("span", { key: '1fbc7f744f3ec03637afce04a0dba2ee7beeec37', class: "evoke-radio__label" }, this.label), h("div", { key: 'cec0e44939dbca02e5623ce9b49c5c074f7c6fa7', class: `evoke-radio__options ${this.inline ? 'evoke-radio__options--inline' : ''}` }, parseOptions(this.options).map((o) => {
|
|
128
|
-
const off = this.disabled || o.disabled;
|
|
129
|
-
return (h("label", { class: `evoke-radio__row ${off ? 'evoke-radio__row--disabled' : ''}` }, h("input", { type: "radio", class: `evoke-radio__input ${this.error ? 'evoke-radio__input--error' : ''}`.trim(), name: name, value: o.value, checked: o.value === this.value, disabled: off, onChange: () => {
|
|
130
|
-
this.value = o.value;
|
|
131
|
-
this.evokeChange.emit(this.value);
|
|
132
|
-
} }), h("span", null, o.label)));
|
|
133
|
-
})), this.error && h("span", { key: 'd19f6043ee840711e62a6feb577a3f44dbed48be', class: "evoke-radio__error", role: "alert" }, this.error)));
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
EvokeRadioGroup.style = evokeRadioGroupCss();
|
|
137
|
-
|
|
138
|
-
const evokeSelectCss = () => `evoke-select{display:block}evoke-select .evoke-field{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);color:var(--evoke-text, #1a1a1a)}evoke-select .evoke-field__control{position:relative}evoke-select .evoke-field__input{box-sizing:border-box;width:100%;height:var(--evoke-control-height, 56px);padding:0 48px 0 24px;border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);font:inherit;appearance:none;-webkit-appearance:none;cursor:pointer;transition:border-color 0.15s, box-shadow 0.15s}evoke-select .evoke-field__select--empty{color:var(--evoke-text-muted, #7a7a7a)}evoke-select .evoke-field__input:focus{outline:none;border-color:var(--evoke-secondary, #0b1560);box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-select .evoke-field__input:disabled{opacity:0.6;cursor:not-allowed}evoke-select .evoke-field__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-select .evoke-field__chevron{position:absolute;right:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--evoke-text-muted, #7a7a7a);pointer-events:none}evoke-select .evoke-field__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}`;
|
|
139
|
-
|
|
140
|
-
const EvokeSelect = class {
|
|
141
|
-
constructor(hostRef) {
|
|
142
|
-
registerInstance(this, hostRef);
|
|
143
|
-
this.evokeChange = createEvent(this, "evokeChange");
|
|
144
|
-
this.label = '';
|
|
145
|
-
/** Options as an array of { label, value, disabled? } or a JSON string of the same */
|
|
146
|
-
this.options = [];
|
|
147
|
-
this.value = '';
|
|
148
|
-
this.placeholder = 'Select an option';
|
|
149
|
-
this.disabled = false;
|
|
150
|
-
/** Error message shown below the field */
|
|
151
|
-
this.error = '';
|
|
152
|
-
/** Extra classes for the inner <select>, e.g. "form-select" (Bootstrap) */
|
|
153
|
-
this.selectClass = '';
|
|
154
|
-
this.selectId = `evoke-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
155
|
-
}
|
|
156
|
-
render() {
|
|
157
|
-
return (h("div", { key: '4a1543d6630c1594254213c2cafcfc6883f32ce2', class: "evoke-field" }, this.label && h("label", { key: 'e387eb1dd52bd755ad848908603c06f45e99a9d8', htmlFor: this.selectId, class: "evoke-field__label" }, this.label), h("div", { key: '4a23b2f05d408cd8f5d4942dc578e5a07233d17d', class: "evoke-field__control" }, h("select", { key: '3aae8448326e8e4008570b07320f28a576d4c08c', id: this.selectId, class: `evoke-field__input evoke-field__select ${this.value === '' ? 'evoke-field__select--empty' : ''} ${this.error ? 'evoke-field__input--error' : ''} ${this.selectClass}`.trim(), disabled: this.disabled, "aria-invalid": this.error ? 'true' : undefined, onChange: (e) => {
|
|
158
|
-
this.value = e.target.value;
|
|
159
|
-
this.evokeChange.emit(this.value);
|
|
160
|
-
} }, h("option", { key: '04defa87db88f21fc5bec7577afb7bb2ded1d6c6', value: "", disabled: true, selected: this.value === '' }, this.placeholder), parseOptions(this.options).map((o) => (h("option", { value: o.value, disabled: o.disabled, selected: o.value === this.value }, o.label)))), h("svg", { key: '35046765ad125b7c7bfc66b3a55e8c2dfeae05a0', class: "evoke-field__chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: 'e65fd0cf45dd70061f37afa51db756906fe819d0', d: "m6 9 6 6 6-6" }))), this.error && h("span", { key: '055c84a93853e14c2d1ec7c493c59f2d864c071a', class: "evoke-field__error", role: "alert" }, this.error)));
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
EvokeSelect.style = evokeSelectCss();
|
|
164
|
-
|
|
165
|
-
export { EvokeAlert as evoke_alert, EvokeButton as evoke_button, EvokeCheckbox as evoke_checkbox, EvokeInput as evoke_input, EvokeRadioGroup as evoke_radio_group, EvokeSelect as evoke_select };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-BtM1wZ-I.js';
|
|
2
|
-
|
|
3
|
-
const evokeCardCss = () => `evoke-card{display:block}evoke-card .evoke-card{background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);overflow:hidden}evoke-card .evoke-card__header{padding:0.75rem 1rem;font-weight:600;border-bottom:1px solid var(--evoke-border, #dedede)}evoke-card .evoke-card__body{padding:1rem}`;
|
|
4
|
-
|
|
5
|
-
const EvokeCard = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.heading = '';
|
|
9
|
-
/** Extra classes for the card container, e.g. "shadow-md" (Tailwind) or "card" (Bootstrap) */
|
|
10
|
-
this.cardClass = '';
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return (h("div", { key: 'cc5ba924fc7779952a0677c2e70303781928fe48', class: `evoke-card ${this.cardClass}`.trim() }, this.heading && h("div", { key: 'bc64916a89f0309642d9b255c424e6764efbe76b', class: "evoke-card__header" }, this.heading), h("div", { key: 'bf3c54ab8eed335f9ce9143b8a29168563c1773f', class: "evoke-card__body" }, h("slot", { key: 'e4668d5c4fc9bd870012c84780918de81fb7a8f3' }))));
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
EvokeCard.style = evokeCardCss();
|
|
17
|
-
|
|
18
|
-
export { EvokeCard as evoke_card };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-BtM1wZ-I.js';
|
|
2
|
-
|
|
3
|
-
const evokeModalCss = () => `evoke-modal .evoke-modal__backdrop{position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000}evoke-modal .evoke-modal{background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);border-radius:var(--evoke-radius-field, 8px);font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);min-width:min(90vw, 360px);max-width:90vw;max-height:90vh;overflow:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.25)}evoke-modal .evoke-modal__header{display:flex;justify-content:space-between;align-items:center;padding:0.75rem 1rem;font-weight:600;border-bottom:1px solid var(--evoke-border, #dedede)}evoke-modal .evoke-modal__close{background:none;border:0;color:inherit;font-size:1.25rem;cursor:pointer;line-height:1}evoke-modal .evoke-modal__body{padding:1rem}`;
|
|
4
|
-
|
|
5
|
-
const EvokeModal = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.evokeClose = createEvent(this, "evokeClose");
|
|
9
|
-
/** Whether the modal is visible */
|
|
10
|
-
this.open = false;
|
|
11
|
-
this.heading = '';
|
|
12
|
-
this.closeOnBackdrop = true;
|
|
13
|
-
/** Extra classes for the dialog panel */
|
|
14
|
-
this.modalClass = '';
|
|
15
|
-
}
|
|
16
|
-
onKeydown(e) {
|
|
17
|
-
if (this.open && e.key === 'Escape')
|
|
18
|
-
this.close();
|
|
19
|
-
}
|
|
20
|
-
close() {
|
|
21
|
-
this.open = false;
|
|
22
|
-
this.evokeClose.emit();
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
if (!this.open)
|
|
26
|
-
return null;
|
|
27
|
-
return (h("div", { class: "evoke-modal__backdrop", onClick: () => this.closeOnBackdrop && this.close() }, h("div", { class: `evoke-modal ${this.modalClass}`.trim(), role: "dialog", "aria-modal": "true", "aria-label": this.heading || undefined, onClick: (e) => e.stopPropagation() }, h("div", { class: "evoke-modal__header" }, h("span", null, this.heading), h("button", { type: "button", class: "evoke-modal__close", "aria-label": "Close", onClick: () => this.close() }, "\u00D7")), h("div", { class: "evoke-modal__body" }, h("slot", null)))));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
EvokeModal.style = evokeModalCss();
|
|
31
|
-
|
|
32
|
-
export { EvokeModal as evoke_modal };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as o,h as r}from"./p-BtM1wZ-I.js";const a=class{constructor(r){e(this,r),this.evokeDismiss=o(this,"evokeDismiss"),this.type="info",this.dismissible=!1}render(){return r("div",{key:"aa100cfbdf5f8551d0a46c50aa649a523bd05da7",class:`evoke-alert evoke-alert--${this.type}`,role:"alert"},r("div",{key:"93c4881344307580c8d1411259651f5eb22a72f5",class:"evoke-alert__content"},r("slot",{key:"ba362718033dff392088efed51e8332b8cccfa2d"})),this.dismissible&&r("button",{key:"5dcdd2e50ca6df6e430f59a4f88b63b3419c42b3",type:"button",class:"evoke-alert__close","aria-label":"Dismiss",onClick:()=>this.evokeDismiss.emit()},"×"))}};a.style="evoke-alert{display:block}evoke-alert .evoke-alert{display:flex;justify-content:space-between;gap:1rem;padding:0.75rem 1rem;border-radius:var(--evoke-radius, 8px);border:1px solid currentColor;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif)}evoke-alert .evoke-alert--info{color:var(--evoke-info, #0891b2);background:#ecfeff}evoke-alert .evoke-alert--success{color:var(--evoke-success, #16a34a);background:#f0fdf4}evoke-alert .evoke-alert--warning{color:var(--evoke-warning, #d97706);background:#fffbeb}evoke-alert .evoke-alert--danger{color:var(--evoke-danger, #dc2626);background:#fef2f2}evoke-alert .evoke-alert__close{background:none;border:0;color:inherit;font-size:1.25rem;cursor:pointer;line-height:1}";const i=class{constructor(o){e(this,o),this.variant="primary",this.type="button",this.disabled=!1,this.block=!1,this.buttonClass=""}render(){return r("button",{key:"b48e546fa722334e82989fe1125d7c9ab3fb4b17",type:this.type,disabled:this.disabled,class:`evoke-btn evoke-btn--${this.variant} ${this.buttonClass}`.trim()},r("slot",{key:"04716e70e788b071b67bbb25b8bc9d57b5066641"}))}};i.style="evoke-button{display:inline-block}evoke-button .evoke-btn{box-sizing:border-box;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);line-height:1.5;cursor:pointer;height:var(--evoke-control-height, 56px);padding:0 var(--evoke-button-padding-x, 36px);display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;border:1px solid transparent;border-radius:var(--evoke-radius-button, 9999px);transition:filter 0.15s, box-shadow 0.15s}evoke-button .evoke-btn:hover:not(:disabled){filter:brightness(0.92)}evoke-button .evoke-btn:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-button .evoke-btn:disabled{opacity:0.5;cursor:not-allowed}evoke-button .evoke-btn--primary{background:var(--evoke-primary, #ff5316);color:var(--evoke-primary-contrast, #ffffff)}evoke-button .evoke-btn--secondary{background:var(--evoke-secondary, #0b1560);color:var(--evoke-secondary-contrast, #ffffff)}evoke-button .evoke-btn--danger{background:var(--evoke-danger, #dc2626);color:#fff}evoke-button .evoke-btn--outline{background:transparent;color:var(--evoke-primary, #ff5316);border-color:var(--evoke-primary, #ff5316)}evoke-button[block]{display:block}evoke-button[block] .evoke-btn{width:100%}";const t=class{constructor(r){e(this,r),this.evokeChange=o(this,"evokeChange"),this.label="",this.checked=!1,this.disabled=!1,this.error="",this.inputClass=""}render(){return r("div",{key:"873dc82ace76a0e84e3ee13e9275b9db130e96eb",class:"evoke-check"},r("label",{key:"26b9e5ee359f855eca9f8e7722c06e62d6856005",class:"evoke-check__row "+(this.disabled?"evoke-check__row--disabled":"")},r("input",{key:"a338d54a0d91b8f2766dc540a0af2defa1241aa0",type:"checkbox",class:`evoke-check__input ${this.error?"evoke-check__input--error":""} ${this.inputClass}`.trim(),checked:this.checked,disabled:this.disabled,"aria-invalid":this.error?"true":void 0,onChange:e=>{this.checked=e.target.checked,this.evokeChange.emit(this.checked)}}),r("span",{key:"7036e0576bb0fcf561f1fa5a970409bd419cd363",class:"evoke-check__label"},this.label,r("slot",{key:"fba4bd96cecebce1b68297a7a59bbc660ad00107"}))),this.error&&r("span",{key:"924e7ca9becb279c733b9fa79daea6c1f7b4d140",class:"evoke-check__error",role:"alert"},this.error))}};t.style="evoke-checkbox{display:block}evoke-checkbox .evoke-check{display:flex;flex-direction:column;gap:0.25rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);color:var(--evoke-text, #1a1a1a)}evoke-checkbox .evoke-check__row{display:inline-flex;align-items:center;gap:0.5rem;cursor:pointer;font-size:0.875rem}evoke-checkbox .evoke-check__row--disabled{opacity:0.6;cursor:not-allowed}evoke-checkbox .evoke-check__input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:16px;height:16px;border:2px solid var(--evoke-primary, #ff5316);border-radius:4px;background:var(--evoke-surface, #ffffff) center / 12px no-repeat;cursor:inherit;transition:background-color 0.15s, box-shadow 0.15s}evoke-checkbox .evoke-check__input:checked{background-color:var(--evoke-primary, #ff5316);background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E\")}evoke-checkbox .evoke-check__input:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-checkbox .evoke-check__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-checkbox .evoke-check__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}";const s={mail:["M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z","m22 7-10 6L2 7"],lock:["M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z","M7 11V7a5 5 0 0 1 10 0v4"],user:["M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2","M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"],search:["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z","m21 21-4.3-4.3"]},n=class{constructor(r){e(this,r),this.evokeInput=o(this,"evokeInput"),this.evokeChange=o(this,"evokeChange"),this.label="",this.value="",this.type="text",this.placeholder="",this.disabled=!1,this.error="",this.inputClass="",this.inputId=`evoke-input-${Math.random().toString(36).slice(2,9)}`}render(){const e=this.icon?s[this.icon]:void 0;return r("div",{key:"1d86d23ab15a3f626d9fb970032d5214a94df0ef",class:"evoke-field"},this.label&&r("label",{key:"c3fea666855f42bf73dafb585645cb9035191d03",htmlFor:this.inputId,class:"evoke-field__label"},this.label),r("div",{key:"78656110961b784f80ce1a6efd5152452bff5f08",class:"evoke-field__control"},e&&r("svg",{key:"5635c5c5066042ea8c8a7a11067a1b00e6d92915",class:"evoke-field__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},e.map((e=>r("path",{d:e})))),r("input",{key:"33ce669be666a515f053173c2a6f3105b4f806c9",id:this.inputId,class:`evoke-field__input ${e?"evoke-field__input--icon":""} ${this.error?"evoke-field__input--error":""} ${this.inputClass}`.trim(),type:this.type,value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-invalid":this.error?"true":void 0,onInput:e=>{this.value=e.target.value,this.evokeInput.emit(this.value)},onChange:e=>this.evokeChange.emit(e.target.value)})),this.error&&r("span",{key:"c396800cb6a6f10309e936b1300ed9652e56d153",class:"evoke-field__error",role:"alert"},this.error))}};function c(e){if(Array.isArray(e))return e;try{const o=JSON.parse(e);return Array.isArray(o)?o:[]}catch(e){return[]}}n.style="evoke-input{display:block}evoke-input .evoke-field{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);color:var(--evoke-text, #1a1a1a)}evoke-input .evoke-field__label{color:var(--evoke-text, #1a1a1a)}evoke-input .evoke-field__control{position:relative}evoke-input .evoke-field__icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--evoke-text-muted, #7a7a7a);pointer-events:none}evoke-input .evoke-field__input{box-sizing:border-box;width:100%;height:var(--evoke-control-height, 56px);padding:0 24px;border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);font:inherit;transition:border-color 0.15s, box-shadow 0.15s}evoke-input .evoke-field__input--icon{padding-left:44px}evoke-input .evoke-field__input::placeholder{color:var(--evoke-text-muted, #7a7a7a)}evoke-input .evoke-field__input:focus{outline:none;border-color:var(--evoke-secondary, #0b1560);box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-input .evoke-field__input:disabled{opacity:0.6;cursor:not-allowed}evoke-input .evoke-field__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-input .evoke-field__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}";const d=class{constructor(r){e(this,r),this.evokeChange=o(this,"evokeChange"),this.label="",this.options=[],this.value="",this.name="",this.disabled=!1,this.inline=!1,this.error="",this.groupName=`evoke-radio-${Math.random().toString(36).slice(2,9)}`}render(){const e=this.name||this.groupName;return r("div",{key:"f90c5bee5d2eff847373e075c32689be55ded5b7",class:"evoke-radio",role:"radiogroup","aria-label":this.label||void 0},this.label&&r("span",{key:"1fbc7f744f3ec03637afce04a0dba2ee7beeec37",class:"evoke-radio__label"},this.label),r("div",{key:"cec0e44939dbca02e5623ce9b49c5c074f7c6fa7",class:"evoke-radio__options "+(this.inline?"evoke-radio__options--inline":"")},c(this.options).map((o=>{const a=this.disabled||o.disabled;return r("label",{class:"evoke-radio__row "+(a?"evoke-radio__row--disabled":"")},r("input",{type:"radio",class:("evoke-radio__input "+(this.error?"evoke-radio__input--error":"")).trim(),name:e,value:o.value,checked:o.value===this.value,disabled:a,onChange:()=>{this.value=o.value,this.evokeChange.emit(this.value)}}),r("span",null,o.label))}))),this.error&&r("span",{key:"d19f6043ee840711e62a6feb577a3f44dbed48be",class:"evoke-radio__error",role:"alert"},this.error))}};d.style="evoke-radio-group{display:block}evoke-radio-group .evoke-radio{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);color:var(--evoke-text, #1a1a1a)}evoke-radio-group .evoke-radio__label{font-size:var(--evoke-font-size, 16px)}evoke-radio-group .evoke-radio__options{display:flex;flex-direction:column;gap:0.5rem}evoke-radio-group .evoke-radio__options--inline{flex-direction:row;flex-wrap:wrap;gap:1.25rem}evoke-radio-group .evoke-radio__row{display:inline-flex;align-items:center;gap:0.5rem;cursor:pointer;font-size:0.875rem}evoke-radio-group .evoke-radio__row--disabled{opacity:0.6;cursor:not-allowed}evoke-radio-group .evoke-radio__input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:16px;height:16px;border:2px solid var(--evoke-primary, #ff5316);border-radius:50%;background:var(--evoke-surface, #ffffff);cursor:inherit;transition:box-shadow 0.15s}evoke-radio-group .evoke-radio__input:checked{background:radial-gradient(circle, var(--evoke-primary, #ff5316) 0 40%, var(--evoke-surface, #ffffff) 45%)}evoke-radio-group .evoke-radio__input:focus-visible{outline:none;box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-radio-group .evoke-radio__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-radio-group .evoke-radio__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}";const l=class{constructor(r){e(this,r),this.evokeChange=o(this,"evokeChange"),this.label="",this.options=[],this.value="",this.placeholder="Select an option",this.disabled=!1,this.error="",this.selectClass="",this.selectId=`evoke-select-${Math.random().toString(36).slice(2,9)}`}render(){return r("div",{key:"4a1543d6630c1594254213c2cafcfc6883f32ce2",class:"evoke-field"},this.label&&r("label",{key:"e387eb1dd52bd755ad848908603c06f45e99a9d8",htmlFor:this.selectId,class:"evoke-field__label"},this.label),r("div",{key:"4a23b2f05d408cd8f5d4942dc578e5a07233d17d",class:"evoke-field__control"},r("select",{key:"3aae8448326e8e4008570b07320f28a576d4c08c",id:this.selectId,class:`evoke-field__input evoke-field__select ${""===this.value?"evoke-field__select--empty":""} ${this.error?"evoke-field__input--error":""} ${this.selectClass}`.trim(),disabled:this.disabled,"aria-invalid":this.error?"true":void 0,onChange:e=>{this.value=e.target.value,this.evokeChange.emit(this.value)}},r("option",{key:"04defa87db88f21fc5bec7577afb7bb2ded1d6c6",value:"",disabled:!0,selected:""===this.value},this.placeholder),c(this.options).map((e=>r("option",{value:e.value,disabled:e.disabled,selected:e.value===this.value},e.label)))),r("svg",{key:"35046765ad125b7c7bfc66b3a55e8c2dfeae05a0",class:"evoke-field__chevron",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{key:"e65fd0cf45dd70061f37afa51db756906fe819d0",d:"m6 9 6 6 6-6"}))),this.error&&r("span",{key:"055c84a93853e14c2d1ec7c493c59f2d864c071a",class:"evoke-field__error",role:"alert"},this.error))}};l.style="evoke-select{display:block}evoke-select .evoke-field{display:flex;flex-direction:column;gap:0.5rem;font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);font-size:var(--evoke-font-size, 16px);color:var(--evoke-text, #1a1a1a)}evoke-select .evoke-field__control{position:relative}evoke-select .evoke-field__input{box-sizing:border-box;width:100%;height:var(--evoke-control-height, 56px);padding:0 48px 0 24px;border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);font:inherit;appearance:none;-webkit-appearance:none;cursor:pointer;transition:border-color 0.15s, box-shadow 0.15s}evoke-select .evoke-field__select--empty{color:var(--evoke-text-muted, #7a7a7a)}evoke-select .evoke-field__input:focus{outline:none;border-color:var(--evoke-secondary, #0b1560);box-shadow:var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15))}evoke-select .evoke-field__input:disabled{opacity:0.6;cursor:not-allowed}evoke-select .evoke-field__input--error{border-color:var(--evoke-danger, #dc2626)}evoke-select .evoke-field__chevron{position:absolute;right:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--evoke-text-muted, #7a7a7a);pointer-events:none}evoke-select .evoke-field__error{color:var(--evoke-danger, #dc2626);font-size:0.875rem}";export{a as evoke_alert,i as evoke_button,t as evoke_checkbox,n as evoke_input,d as evoke_radio_group,l as evoke_select}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as o,h as a}from"./p-BtM1wZ-I.js";const s=class{constructor(a){e(this,a),this.evokeClose=o(this,"evokeClose"),this.open=!1,this.heading="",this.closeOnBackdrop=!0,this.modalClass=""}onKeydown(e){this.open&&"Escape"===e.key&&this.close()}close(){this.open=!1,this.evokeClose.emit()}render(){return this.open?a("div",{class:"evoke-modal__backdrop",onClick:()=>this.closeOnBackdrop&&this.close()},a("div",{class:`evoke-modal ${this.modalClass}`.trim(),role:"dialog","aria-modal":"true","aria-label":this.heading||void 0,onClick:e=>e.stopPropagation()},a("div",{class:"evoke-modal__header"},a("span",null,this.heading),a("button",{type:"button",class:"evoke-modal__close","aria-label":"Close",onClick:()=>this.close()},"×")),a("div",{class:"evoke-modal__body"},a("slot",null)))):null}};s.style="evoke-modal .evoke-modal__backdrop{position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000}evoke-modal .evoke-modal{background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);border-radius:var(--evoke-radius-field, 8px);font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);min-width:min(90vw, 360px);max-width:90vw;max-height:90vh;overflow:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.25)}evoke-modal .evoke-modal__header{display:flex;justify-content:space-between;align-items:center;padding:0.75rem 1rem;font-weight:600;border-bottom:1px solid var(--evoke-border, #dedede)}evoke-modal .evoke-modal__close{background:none;border:0;color:inherit;font-size:1.25rem;cursor:pointer;line-height:1}evoke-modal .evoke-modal__body{padding:1rem}";export{s as evoke_modal}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as r}from"./p-BtM1wZ-I.js";const d=class{constructor(r){e(this,r),this.heading="",this.cardClass=""}render(){return r("div",{key:"cc5ba924fc7779952a0677c2e70303781928fe48",class:`evoke-card ${this.cardClass}`.trim()},this.heading&&r("div",{key:"bc64916a89f0309642d9b255c424e6764efbe76b",class:"evoke-card__header"},this.heading),r("div",{key:"bf3c54ab8eed335f9ce9143b8a29168563c1773f",class:"evoke-card__body"},r("slot",{key:"e4668d5c4fc9bd870012c84780918de81fb7a8f3"})))}};d.style="evoke-card{display:block}evoke-card .evoke-card{background:var(--evoke-surface, #ffffff);color:var(--evoke-text, #1a1a1a);border:1px solid var(--evoke-border, #dedede);border-radius:var(--evoke-radius-field, 8px);font-family:var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);overflow:hidden}evoke-card .evoke-card__header{padding:0.75rem 1rem;font-weight:600;border-bottom:1px solid var(--evoke-border, #dedede)}evoke-card .evoke-card__body{padding:1rem}";export{d as evoke_card}
|