@evoke-tech/stencil-ui-kit 0.0.0-stage → 0.1.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 +214 -2
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/evoke-alert_6.cjs.entry.js +172 -0
- package/dist/cjs/evoke-card.cjs.entry.js +20 -0
- package/dist/cjs/evoke-modal.cjs.entry.js +34 -0
- package/dist/cjs/evoke-ui.cjs.js +25 -0
- package/dist/cjs/index-B8xS0y1i.js +1989 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/collection-manifest.json +20 -0
- package/dist/collection/components/evoke-alert/evoke-alert.css +7 -0
- package/dist/collection/components/evoke-alert/evoke-alert.js +83 -0
- package/dist/collection/components/evoke-button/evoke-button.css +17 -0
- package/dist/collection/components/evoke-button/evoke-button.js +131 -0
- package/dist/collection/components/evoke-card/evoke-card.css +4 -0
- package/dist/collection/components/evoke-card/evoke-card.js +66 -0
- package/dist/collection/components/evoke-checkbox/evoke-checkbox.css +16 -0
- package/dist/collection/components/evoke-checkbox/evoke-checkbox.js +151 -0
- package/dist/collection/components/evoke-input/evoke-input.css +17 -0
- package/dist/collection/components/evoke-input/evoke-input.js +234 -0
- package/dist/collection/components/evoke-modal/evoke-modal.css +5 -0
- package/dist/collection/components/evoke-modal/evoke-modal.js +146 -0
- package/dist/collection/components/evoke-radio-group/evoke-radio-group.css +16 -0
- package/dist/collection/components/evoke-radio-group/evoke-radio-group.js +207 -0
- package/dist/collection/components/evoke-select/evoke-select.css +16 -0
- package/dist/collection/components/evoke-select/evoke-select.js +203 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/options.js +12 -0
- package/dist/components/evoke-alert.d.ts +11 -0
- package/dist/components/evoke-alert.js +1 -0
- package/dist/components/evoke-button.d.ts +11 -0
- package/dist/components/evoke-button.js +1 -0
- package/dist/components/evoke-card.d.ts +11 -0
- package/dist/components/evoke-card.js +1 -0
- package/dist/components/evoke-checkbox.d.ts +11 -0
- package/dist/components/evoke-checkbox.js +1 -0
- package/dist/components/evoke-input.d.ts +11 -0
- package/dist/components/evoke-input.js +1 -0
- package/dist/components/evoke-modal.d.ts +11 -0
- package/dist/components/evoke-modal.js +1 -0
- package/dist/components/evoke-radio-group.d.ts +11 -0
- package/dist/components/evoke-radio-group.js +1 -0
- package/dist/components/evoke-select.d.ts +11 -0
- package/dist/components/evoke-select.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/options.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/evoke-alert_6.entry.js +165 -0
- package/dist/esm/evoke-card.entry.js +18 -0
- package/dist/esm/evoke-modal.entry.js +32 -0
- package/dist/esm/evoke-ui.js +21 -0
- package/dist/esm/index-BtM1wZ-I.js +1982 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/evoke-ui/evoke-ui.css +1 -0
- package/dist/evoke-ui/evoke-ui.esm.js +1 -0
- package/dist/evoke-ui/index.esm.js +0 -0
- package/dist/evoke-ui/p-243075cd.entry.js +1 -0
- package/dist/evoke-ui/p-605d4757.entry.js +1 -0
- package/dist/evoke-ui/p-9a6eaeb6.entry.js +1 -0
- package/dist/evoke-ui/p-BtM1wZ-I.js +3 -0
- package/dist/evoke-ui/p-DQuL1Twl.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/themes/bootstrap.css +23 -0
- package/dist/themes/material.css +21 -0
- package/dist/themes/tailwind.css +24 -0
- package/dist/themes/tokens.css +26 -0
- package/dist/types/components/evoke-alert/evoke-alert.d.ts +8 -0
- package/dist/types/components/evoke-button/evoke-button.d.ts +11 -0
- package/dist/types/components/evoke-card/evoke-card.d.ts +6 -0
- package/dist/types/components/evoke-checkbox/evoke-checkbox.d.ts +13 -0
- package/dist/types/components/evoke-input/evoke-input.d.ts +19 -0
- package/dist/types/components/evoke-modal/evoke-modal.d.ts +14 -0
- package/dist/types/components/evoke-radio-group/evoke-radio-group.d.ts +18 -0
- package/dist/types/components/evoke-select/evoke-select.d.ts +18 -0
- package/dist/types/components.d.ts +657 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1879 -0
- package/dist/types/utils/options.d.ts +7 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +58 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-B8xS0y1i.js');
|
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
|
+
|
|
6
|
+
const defineCustomElements = async (win, options) => {
|
|
7
|
+
if (typeof window === 'undefined') return undefined;
|
|
8
|
+
await appGlobals.globalScripts();
|
|
9
|
+
return index.bootstrapLazy([["evoke-alert_6.cjs",[[260,"evoke-alert",{"type":[1],"dismissible":[4]}],[260,"evoke-button",{"variant":[1],"type":[1],"disabled":[4],"block":[516],"buttonClass":[1,"button-class"]}],[260,"evoke-checkbox",{"label":[1],"checked":[1540],"disabled":[4],"error":[1],"inputClass":[1,"input-class"]}],[0,"evoke-input",{"label":[1],"value":[1025],"type":[1],"placeholder":[1],"disabled":[4],"error":[1],"icon":[1],"inputClass":[1,"input-class"]}],[0,"evoke-radio-group",{"label":[1],"options":[1],"value":[1025],"name":[1],"disabled":[4],"inline":[4],"error":[1]}],[0,"evoke-select",{"label":[1],"options":[1],"value":[1025],"placeholder":[1],"disabled":[4],"error":[1],"selectClass":[1,"select-class"]}]]],["evoke-card.cjs",[[260,"evoke-card",{"heading":[1],"cardClass":[1,"card-class"]}]]],["evoke-modal.cjs",[[260,"evoke-modal",{"open":[1540],"heading":[1],"closeOnBackdrop":[4,"close-on-backdrop"],"modalClass":[1,"modal-class"]},[[8,"keydown","onKeydown"]]]]]], options);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.setNonce = index.setNonce;
|
|
13
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"components/evoke-alert/evoke-alert.js",
|
|
4
|
+
"components/evoke-button/evoke-button.js",
|
|
5
|
+
"components/evoke-card/evoke-card.js",
|
|
6
|
+
"components/evoke-checkbox/evoke-checkbox.js",
|
|
7
|
+
"components/evoke-input/evoke-input.js",
|
|
8
|
+
"components/evoke-modal/evoke-modal.js",
|
|
9
|
+
"components/evoke-radio-group/evoke-radio-group.js",
|
|
10
|
+
"components/evoke-select/evoke-select.js"
|
|
11
|
+
],
|
|
12
|
+
"mixins": [],
|
|
13
|
+
"compiler": {
|
|
14
|
+
"name": "@stencil/core",
|
|
15
|
+
"version": "4.45.2",
|
|
16
|
+
"typescriptVersion": "5.8.3"
|
|
17
|
+
},
|
|
18
|
+
"collections": [],
|
|
19
|
+
"bundles": []
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
evoke-alert { display: block; }
|
|
2
|
+
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); }
|
|
3
|
+
evoke-alert .evoke-alert--info { color: var(--evoke-info, #0891b2); background: #ecfeff; }
|
|
4
|
+
evoke-alert .evoke-alert--success { color: var(--evoke-success, #16a34a); background: #f0fdf4; }
|
|
5
|
+
evoke-alert .evoke-alert--warning { color: var(--evoke-warning, #d97706); background: #fffbeb; }
|
|
6
|
+
evoke-alert .evoke-alert--danger { color: var(--evoke-danger, #dc2626); background: #fef2f2; }
|
|
7
|
+
evoke-alert .evoke-alert__close { background: none; border: 0; color: inherit; font-size: 1.25rem; cursor: pointer; line-height: 1; }
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class EvokeAlert {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.type = 'info';
|
|
5
|
+
this.dismissible = false;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
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"))));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "evoke-alert"; }
|
|
11
|
+
static get originalStyleUrls() {
|
|
12
|
+
return {
|
|
13
|
+
"$": ["evoke-alert.css"]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static get styleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["evoke-alert.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get properties() {
|
|
22
|
+
return {
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"mutable": false,
|
|
26
|
+
"complexType": {
|
|
27
|
+
"original": "'info' | 'success' | 'warning' | 'danger'",
|
|
28
|
+
"resolved": "\"danger\" | \"info\" | \"success\" | \"warning\"",
|
|
29
|
+
"references": {}
|
|
30
|
+
},
|
|
31
|
+
"required": false,
|
|
32
|
+
"optional": false,
|
|
33
|
+
"docs": {
|
|
34
|
+
"tags": [],
|
|
35
|
+
"text": ""
|
|
36
|
+
},
|
|
37
|
+
"getter": false,
|
|
38
|
+
"setter": false,
|
|
39
|
+
"reflect": false,
|
|
40
|
+
"attribute": "type",
|
|
41
|
+
"defaultValue": "'info'"
|
|
42
|
+
},
|
|
43
|
+
"dismissible": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"mutable": false,
|
|
46
|
+
"complexType": {
|
|
47
|
+
"original": "boolean",
|
|
48
|
+
"resolved": "boolean",
|
|
49
|
+
"references": {}
|
|
50
|
+
},
|
|
51
|
+
"required": false,
|
|
52
|
+
"optional": false,
|
|
53
|
+
"docs": {
|
|
54
|
+
"tags": [],
|
|
55
|
+
"text": ""
|
|
56
|
+
},
|
|
57
|
+
"getter": false,
|
|
58
|
+
"setter": false,
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"attribute": "dismissible",
|
|
61
|
+
"defaultValue": "false"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static get events() {
|
|
66
|
+
return [{
|
|
67
|
+
"method": "evokeDismiss",
|
|
68
|
+
"name": "evokeDismiss",
|
|
69
|
+
"bubbles": true,
|
|
70
|
+
"cancelable": true,
|
|
71
|
+
"composed": true,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": "Fired when the dismiss button is clicked"
|
|
75
|
+
},
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "void",
|
|
78
|
+
"resolved": "void",
|
|
79
|
+
"references": {}
|
|
80
|
+
}
|
|
81
|
+
}];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
evoke-button { display: inline-block; }
|
|
2
|
+
evoke-button .evoke-btn {
|
|
3
|
+
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;
|
|
4
|
+
height: var(--evoke-control-height, 56px); padding: 0 var(--evoke-button-padding-x, 36px);
|
|
5
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
|
|
6
|
+
border: 1px solid transparent; border-radius: var(--evoke-radius-button, 9999px);
|
|
7
|
+
transition: filter 0.15s, box-shadow 0.15s;
|
|
8
|
+
}
|
|
9
|
+
evoke-button .evoke-btn:hover:not(:disabled) { filter: brightness(0.92); }
|
|
10
|
+
evoke-button .evoke-btn:focus-visible { outline: none; box-shadow: var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15)); }
|
|
11
|
+
evoke-button .evoke-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
12
|
+
evoke-button .evoke-btn--primary { background: var(--evoke-primary, #ff5316); color: var(--evoke-primary-contrast, #ffffff); }
|
|
13
|
+
evoke-button .evoke-btn--secondary { background: var(--evoke-secondary, #0b1560); color: var(--evoke-secondary-contrast, #ffffff); }
|
|
14
|
+
evoke-button .evoke-btn--danger { background: var(--evoke-danger, #dc2626); color: #fff; }
|
|
15
|
+
evoke-button .evoke-btn--outline { background: transparent; color: var(--evoke-primary, #ff5316); border-color: var(--evoke-primary, #ff5316); }
|
|
16
|
+
evoke-button[block] { display: block; }
|
|
17
|
+
evoke-button[block] .evoke-btn { width: 100%; }
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class EvokeButton {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Visual variant */
|
|
5
|
+
this.variant = 'primary';
|
|
6
|
+
this.type = 'button';
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
/** Stretch to the full width of the container */
|
|
9
|
+
this.block = false;
|
|
10
|
+
/** Extra classes for the inner <button>, e.g. "btn btn-lg" (Bootstrap) or "shadow-lg" (Tailwind) */
|
|
11
|
+
this.buttonClass = '';
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
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' })));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "evoke-button"; }
|
|
17
|
+
static get originalStyleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["evoke-button.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get styleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["evoke-button.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get properties() {
|
|
28
|
+
return {
|
|
29
|
+
"variant": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"mutable": false,
|
|
32
|
+
"complexType": {
|
|
33
|
+
"original": "'primary' | 'secondary' | 'danger' | 'outline'",
|
|
34
|
+
"resolved": "\"danger\" | \"outline\" | \"primary\" | \"secondary\"",
|
|
35
|
+
"references": {}
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"optional": false,
|
|
39
|
+
"docs": {
|
|
40
|
+
"tags": [],
|
|
41
|
+
"text": "Visual variant"
|
|
42
|
+
},
|
|
43
|
+
"getter": false,
|
|
44
|
+
"setter": false,
|
|
45
|
+
"reflect": false,
|
|
46
|
+
"attribute": "variant",
|
|
47
|
+
"defaultValue": "'primary'"
|
|
48
|
+
},
|
|
49
|
+
"type": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "'button' | 'submit' | 'reset'",
|
|
54
|
+
"resolved": "\"button\" | \"reset\" | \"submit\"",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": ""
|
|
62
|
+
},
|
|
63
|
+
"getter": false,
|
|
64
|
+
"setter": false,
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"attribute": "type",
|
|
67
|
+
"defaultValue": "'button'"
|
|
68
|
+
},
|
|
69
|
+
"disabled": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "boolean",
|
|
74
|
+
"resolved": "boolean",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"getter": false,
|
|
84
|
+
"setter": false,
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"attribute": "disabled",
|
|
87
|
+
"defaultValue": "false"
|
|
88
|
+
},
|
|
89
|
+
"block": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "boolean",
|
|
94
|
+
"resolved": "boolean",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "Stretch to the full width of the container"
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"reflect": true,
|
|
106
|
+
"attribute": "block",
|
|
107
|
+
"defaultValue": "false"
|
|
108
|
+
},
|
|
109
|
+
"buttonClass": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "string",
|
|
114
|
+
"resolved": "string",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Extra classes for the inner <button>, e.g. \"btn btn-lg\" (Bootstrap) or \"shadow-lg\" (Tailwind)"
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"reflect": false,
|
|
126
|
+
"attribute": "button-class",
|
|
127
|
+
"defaultValue": "''"
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
evoke-card { display: block; }
|
|
2
|
+
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; }
|
|
3
|
+
evoke-card .evoke-card__header { padding: 0.75rem 1rem; font-weight: 600; border-bottom: 1px solid var(--evoke-border, #dedede); }
|
|
4
|
+
evoke-card .evoke-card__body { padding: 1rem; }
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class EvokeCard {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.heading = '';
|
|
5
|
+
/** Extra classes for the card container, e.g. "shadow-md" (Tailwind) or "card" (Bootstrap) */
|
|
6
|
+
this.cardClass = '';
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
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' }))));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "evoke-card"; }
|
|
12
|
+
static get originalStyleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["evoke-card.css"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static get styleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["evoke-card.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get properties() {
|
|
23
|
+
return {
|
|
24
|
+
"heading": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"mutable": false,
|
|
27
|
+
"complexType": {
|
|
28
|
+
"original": "string",
|
|
29
|
+
"resolved": "string",
|
|
30
|
+
"references": {}
|
|
31
|
+
},
|
|
32
|
+
"required": false,
|
|
33
|
+
"optional": false,
|
|
34
|
+
"docs": {
|
|
35
|
+
"tags": [],
|
|
36
|
+
"text": ""
|
|
37
|
+
},
|
|
38
|
+
"getter": false,
|
|
39
|
+
"setter": false,
|
|
40
|
+
"reflect": false,
|
|
41
|
+
"attribute": "heading",
|
|
42
|
+
"defaultValue": "''"
|
|
43
|
+
},
|
|
44
|
+
"cardClass": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "string",
|
|
49
|
+
"resolved": "string",
|
|
50
|
+
"references": {}
|
|
51
|
+
},
|
|
52
|
+
"required": false,
|
|
53
|
+
"optional": false,
|
|
54
|
+
"docs": {
|
|
55
|
+
"tags": [],
|
|
56
|
+
"text": "Extra classes for the card container, e.g. \"shadow-md\" (Tailwind) or \"card\" (Bootstrap)"
|
|
57
|
+
},
|
|
58
|
+
"getter": false,
|
|
59
|
+
"setter": false,
|
|
60
|
+
"reflect": false,
|
|
61
|
+
"attribute": "card-class",
|
|
62
|
+
"defaultValue": "''"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
evoke-checkbox { display: block; }
|
|
2
|
+
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); }
|
|
3
|
+
evoke-checkbox .evoke-check__row { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; }
|
|
4
|
+
evoke-checkbox .evoke-check__row--disabled { opacity: 0.6; cursor: not-allowed; }
|
|
5
|
+
evoke-checkbox .evoke-check__input {
|
|
6
|
+
appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 16px; height: 16px;
|
|
7
|
+
border: 2px solid var(--evoke-primary, #ff5316); border-radius: 4px; background: var(--evoke-surface, #ffffff) center / 12px no-repeat;
|
|
8
|
+
cursor: inherit; transition: background-color 0.15s, box-shadow 0.15s;
|
|
9
|
+
}
|
|
10
|
+
evoke-checkbox .evoke-check__input:checked {
|
|
11
|
+
background-color: var(--evoke-primary, #ff5316);
|
|
12
|
+
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");
|
|
13
|
+
}
|
|
14
|
+
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)); }
|
|
15
|
+
evoke-checkbox .evoke-check__input--error { border-color: var(--evoke-danger, #dc2626); }
|
|
16
|
+
evoke-checkbox .evoke-check__error { color: var(--evoke-danger, #dc2626); font-size: 0.875rem; }
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class EvokeCheckbox {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = '';
|
|
5
|
+
this.checked = false;
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
/** Error message shown below the checkbox */
|
|
8
|
+
this.error = '';
|
|
9
|
+
/** Extra classes for the inner <input> */
|
|
10
|
+
this.inputClass = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
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) => {
|
|
14
|
+
this.checked = e.target.checked;
|
|
15
|
+
this.evokeChange.emit(this.checked);
|
|
16
|
+
} }), 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)));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "evoke-checkbox"; }
|
|
19
|
+
static get originalStyleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["evoke-checkbox.css"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get styleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["evoke-checkbox.css"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get properties() {
|
|
30
|
+
return {
|
|
31
|
+
"label": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"mutable": false,
|
|
34
|
+
"complexType": {
|
|
35
|
+
"original": "string",
|
|
36
|
+
"resolved": "string",
|
|
37
|
+
"references": {}
|
|
38
|
+
},
|
|
39
|
+
"required": false,
|
|
40
|
+
"optional": false,
|
|
41
|
+
"docs": {
|
|
42
|
+
"tags": [],
|
|
43
|
+
"text": ""
|
|
44
|
+
},
|
|
45
|
+
"getter": false,
|
|
46
|
+
"setter": false,
|
|
47
|
+
"reflect": false,
|
|
48
|
+
"attribute": "label",
|
|
49
|
+
"defaultValue": "''"
|
|
50
|
+
},
|
|
51
|
+
"checked": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"mutable": true,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "boolean",
|
|
56
|
+
"resolved": "boolean",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": ""
|
|
64
|
+
},
|
|
65
|
+
"getter": false,
|
|
66
|
+
"setter": false,
|
|
67
|
+
"reflect": true,
|
|
68
|
+
"attribute": "checked",
|
|
69
|
+
"defaultValue": "false"
|
|
70
|
+
},
|
|
71
|
+
"disabled": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "boolean",
|
|
76
|
+
"resolved": "boolean",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"getter": false,
|
|
86
|
+
"setter": false,
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"attribute": "disabled",
|
|
89
|
+
"defaultValue": "false"
|
|
90
|
+
},
|
|
91
|
+
"error": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"mutable": false,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "string",
|
|
96
|
+
"resolved": "string",
|
|
97
|
+
"references": {}
|
|
98
|
+
},
|
|
99
|
+
"required": false,
|
|
100
|
+
"optional": false,
|
|
101
|
+
"docs": {
|
|
102
|
+
"tags": [],
|
|
103
|
+
"text": "Error message shown below the checkbox"
|
|
104
|
+
},
|
|
105
|
+
"getter": false,
|
|
106
|
+
"setter": false,
|
|
107
|
+
"reflect": false,
|
|
108
|
+
"attribute": "error",
|
|
109
|
+
"defaultValue": "''"
|
|
110
|
+
},
|
|
111
|
+
"inputClass": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"mutable": false,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "string",
|
|
116
|
+
"resolved": "string",
|
|
117
|
+
"references": {}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": false,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "Extra classes for the inner <input>"
|
|
124
|
+
},
|
|
125
|
+
"getter": false,
|
|
126
|
+
"setter": false,
|
|
127
|
+
"reflect": false,
|
|
128
|
+
"attribute": "input-class",
|
|
129
|
+
"defaultValue": "''"
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
static get events() {
|
|
134
|
+
return [{
|
|
135
|
+
"method": "evokeChange",
|
|
136
|
+
"name": "evokeChange",
|
|
137
|
+
"bubbles": true,
|
|
138
|
+
"cancelable": true,
|
|
139
|
+
"composed": true,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "Emits the new checked state"
|
|
143
|
+
},
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "boolean",
|
|
146
|
+
"resolved": "boolean",
|
|
147
|
+
"references": {}
|
|
148
|
+
}
|
|
149
|
+
}];
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
evoke-input { display: block; }
|
|
2
|
+
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); }
|
|
3
|
+
evoke-input .evoke-field__label { color: var(--evoke-text, #1a1a1a); }
|
|
4
|
+
evoke-input .evoke-field__control { position: relative; }
|
|
5
|
+
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; }
|
|
6
|
+
evoke-input .evoke-field__input {
|
|
7
|
+
box-sizing: border-box; width: 100%; height: var(--evoke-control-height, 56px); padding: 0 24px;
|
|
8
|
+
border: 1px solid var(--evoke-border, #dedede); border-radius: var(--evoke-radius-field, 8px);
|
|
9
|
+
background: var(--evoke-surface, #ffffff); color: var(--evoke-text, #1a1a1a); font: inherit;
|
|
10
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
11
|
+
}
|
|
12
|
+
evoke-input .evoke-field__input--icon { padding-left: 44px; }
|
|
13
|
+
evoke-input .evoke-field__input::placeholder { color: var(--evoke-text-muted, #7a7a7a); }
|
|
14
|
+
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)); }
|
|
15
|
+
evoke-input .evoke-field__input:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
16
|
+
evoke-input .evoke-field__input--error { border-color: var(--evoke-danger, #dc2626); }
|
|
17
|
+
evoke-input .evoke-field__error { color: var(--evoke-danger, #dc2626); font-size: 0.875rem; }
|