@evoke-tech/stencil-ui-kit 0.0.0-stage → 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.
Files changed (144) hide show
  1. package/README.md +314 -2
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/evoke-alert_20.cjs.entry.js +1047 -0
  4. package/dist/cjs/evoke-ui.cjs.js +25 -0
  5. package/dist/cjs/index-BpJ5gu8f.js +2130 -0
  6. package/dist/cjs/index.cjs.js +2 -0
  7. package/dist/cjs/loader.cjs.js +13 -0
  8. package/dist/collection/collection-manifest.json +32 -0
  9. package/dist/collection/components/evoke-alert/evoke-alert.css +18 -0
  10. package/dist/collection/components/evoke-alert/evoke-alert.js +107 -0
  11. package/dist/collection/components/evoke-app-bar/evoke-app-bar.css +13 -0
  12. package/dist/collection/components/evoke-app-bar/evoke-app-bar.js +94 -0
  13. package/dist/collection/components/evoke-badge/evoke-badge.css +13 -0
  14. package/dist/collection/components/evoke-badge/evoke-badge.js +162 -0
  15. package/dist/collection/components/evoke-button/evoke-button.css +31 -0
  16. package/dist/collection/components/evoke-button/evoke-button.js +243 -0
  17. package/dist/collection/components/evoke-card/evoke-card.css +12 -0
  18. package/dist/collection/components/evoke-card/evoke-card.js +140 -0
  19. package/dist/collection/components/evoke-checkbox/evoke-checkbox.css +22 -0
  20. package/dist/collection/components/evoke-checkbox/evoke-checkbox.js +180 -0
  21. package/dist/collection/components/evoke-chip/evoke-chip.css +16 -0
  22. package/dist/collection/components/evoke-chip/evoke-chip.js +149 -0
  23. package/dist/collection/components/evoke-input/evoke-input.css +25 -0
  24. package/dist/collection/components/evoke-input/evoke-input.js +324 -0
  25. package/dist/collection/components/evoke-modal/evoke-modal.css +21 -0
  26. package/dist/collection/components/evoke-modal/evoke-modal.js +271 -0
  27. package/dist/collection/components/evoke-pagination/evoke-pagination.css +12 -0
  28. package/dist/collection/components/evoke-pagination/evoke-pagination.js +156 -0
  29. package/dist/collection/components/evoke-progress/evoke-progress.css +12 -0
  30. package/dist/collection/components/evoke-progress/evoke-progress.js +146 -0
  31. package/dist/collection/components/evoke-quantity-stepper/evoke-quantity-stepper.css +20 -0
  32. package/dist/collection/components/evoke-quantity-stepper/evoke-quantity-stepper.js +201 -0
  33. package/dist/collection/components/evoke-radio-group/evoke-radio-group.css +29 -0
  34. package/dist/collection/components/evoke-radio-group/evoke-radio-group.js +233 -0
  35. package/dist/collection/components/evoke-select/evoke-select.css +37 -0
  36. package/dist/collection/components/evoke-select/evoke-select.js +433 -0
  37. package/dist/collection/components/evoke-switch/evoke-switch.css +16 -0
  38. package/dist/collection/components/evoke-switch/evoke-switch.js +151 -0
  39. package/dist/collection/components/evoke-table/evoke-table.css +20 -0
  40. package/dist/collection/components/evoke-table/evoke-table.js +222 -0
  41. package/dist/collection/components/evoke-tabs/evoke-tabs.css +20 -0
  42. package/dist/collection/components/evoke-tabs/evoke-tabs.js +179 -0
  43. package/dist/collection/components/evoke-textarea/evoke-textarea.css +19 -0
  44. package/dist/collection/components/evoke-textarea/evoke-textarea.js +328 -0
  45. package/dist/collection/components/evoke-toast/evoke-toast.css +24 -0
  46. package/dist/collection/components/evoke-toast/evoke-toast.js +225 -0
  47. package/dist/collection/components/evoke-tooltip/evoke-tooltip.css +22 -0
  48. package/dist/collection/components/evoke-tooltip/evoke-tooltip.js +119 -0
  49. package/dist/collection/index.js +1 -0
  50. package/dist/collection/utils/icons.js +29 -0
  51. package/dist/collection/utils/options.js +12 -0
  52. package/dist/components/evoke-alert.d.ts +11 -0
  53. package/dist/components/evoke-alert.js +1 -0
  54. package/dist/components/evoke-app-bar.d.ts +11 -0
  55. package/dist/components/evoke-app-bar.js +1 -0
  56. package/dist/components/evoke-badge.d.ts +11 -0
  57. package/dist/components/evoke-badge.js +1 -0
  58. package/dist/components/evoke-button.d.ts +11 -0
  59. package/dist/components/evoke-button.js +1 -0
  60. package/dist/components/evoke-card.d.ts +11 -0
  61. package/dist/components/evoke-card.js +1 -0
  62. package/dist/components/evoke-checkbox.d.ts +11 -0
  63. package/dist/components/evoke-checkbox.js +1 -0
  64. package/dist/components/evoke-chip.d.ts +11 -0
  65. package/dist/components/evoke-chip.js +1 -0
  66. package/dist/components/evoke-input.d.ts +11 -0
  67. package/dist/components/evoke-input.js +1 -0
  68. package/dist/components/evoke-modal.d.ts +11 -0
  69. package/dist/components/evoke-modal.js +1 -0
  70. package/dist/components/evoke-pagination.d.ts +11 -0
  71. package/dist/components/evoke-pagination.js +1 -0
  72. package/dist/components/evoke-progress.d.ts +11 -0
  73. package/dist/components/evoke-progress.js +1 -0
  74. package/dist/components/evoke-quantity-stepper.d.ts +11 -0
  75. package/dist/components/evoke-quantity-stepper.js +1 -0
  76. package/dist/components/evoke-radio-group.d.ts +11 -0
  77. package/dist/components/evoke-radio-group.js +1 -0
  78. package/dist/components/evoke-select.d.ts +11 -0
  79. package/dist/components/evoke-select.js +1 -0
  80. package/dist/components/evoke-switch.d.ts +11 -0
  81. package/dist/components/evoke-switch.js +1 -0
  82. package/dist/components/evoke-table.d.ts +11 -0
  83. package/dist/components/evoke-table.js +1 -0
  84. package/dist/components/evoke-tabs.d.ts +11 -0
  85. package/dist/components/evoke-tabs.js +1 -0
  86. package/dist/components/evoke-textarea.d.ts +11 -0
  87. package/dist/components/evoke-textarea.js +1 -0
  88. package/dist/components/evoke-toast.d.ts +11 -0
  89. package/dist/components/evoke-toast.js +1 -0
  90. package/dist/components/evoke-tooltip.d.ts +11 -0
  91. package/dist/components/evoke-tooltip.js +1 -0
  92. package/dist/components/icons.js +1 -0
  93. package/dist/components/index.d.ts +35 -0
  94. package/dist/components/index.js +1 -0
  95. package/dist/components/options.js +1 -0
  96. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  97. package/dist/esm/evoke-alert_20.entry.js +1026 -0
  98. package/dist/esm/evoke-ui.js +21 -0
  99. package/dist/esm/index-C-5sEjU8.js +2122 -0
  100. package/dist/esm/index.js +1 -0
  101. package/dist/esm/loader.js +11 -0
  102. package/dist/evoke-ui/evoke-ui.css +1 -0
  103. package/dist/evoke-ui/evoke-ui.esm.js +1 -0
  104. package/dist/evoke-ui/index.esm.js +0 -0
  105. package/dist/evoke-ui/p-0841be89.entry.js +1 -0
  106. package/dist/evoke-ui/p-C-5sEjU8.js +3 -0
  107. package/dist/evoke-ui/p-DQuL1Twl.js +1 -0
  108. package/dist/index.cjs.js +1 -0
  109. package/dist/index.js +1 -0
  110. package/dist/themes/bootstrap.css +26 -0
  111. package/dist/themes/material.css +24 -0
  112. package/dist/themes/tailwind.css +27 -0
  113. package/dist/themes/tokens.css +29 -0
  114. package/dist/types/components/evoke-alert/evoke-alert.d.ts +10 -0
  115. package/dist/types/components/evoke-app-bar/evoke-app-bar.d.ts +14 -0
  116. package/dist/types/components/evoke-badge/evoke-badge.d.ts +17 -0
  117. package/dist/types/components/evoke-button/evoke-button.d.ts +21 -0
  118. package/dist/types/components/evoke-card/evoke-card.d.ts +15 -0
  119. package/dist/types/components/evoke-checkbox/evoke-checkbox.d.ts +18 -0
  120. package/dist/types/components/evoke-chip/evoke-chip.d.ts +14 -0
  121. package/dist/types/components/evoke-input/evoke-input.d.ts +27 -0
  122. package/dist/types/components/evoke-modal/evoke-modal.d.ts +32 -0
  123. package/dist/types/components/evoke-pagination/evoke-pagination.d.ts +15 -0
  124. package/dist/types/components/evoke-progress/evoke-progress.d.ts +13 -0
  125. package/dist/types/components/evoke-quantity-stepper/evoke-quantity-stepper.d.ts +18 -0
  126. package/dist/types/components/evoke-radio-group/evoke-radio-group.d.ts +20 -0
  127. package/dist/types/components/evoke-select/evoke-select.d.ts +43 -0
  128. package/dist/types/components/evoke-switch/evoke-switch.d.ts +15 -0
  129. package/dist/types/components/evoke-table/evoke-table.d.ts +29 -0
  130. package/dist/types/components/evoke-tabs/evoke-tabs.d.ts +21 -0
  131. package/dist/types/components/evoke-textarea/evoke-textarea.d.ts +28 -0
  132. package/dist/types/components/evoke-toast/evoke-toast.d.ts +24 -0
  133. package/dist/types/components/evoke-tooltip/evoke-tooltip.d.ts +17 -0
  134. package/dist/types/components.d.ts +1876 -0
  135. package/dist/types/index.d.ts +2 -0
  136. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  137. package/dist/types/utils/icons.d.ts +25 -0
  138. package/dist/types/utils/options.d.ts +7 -0
  139. package/loader/cdn.js +1 -0
  140. package/loader/index.cjs.js +1 -0
  141. package/loader/index.d.ts +24 -0
  142. package/loader/index.es2017.js +1 -0
  143. package/loader/index.js +2 -0
  144. package/package.json +65 -4
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BpJ5gu8f.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_20.cjs",[[260,"evoke-alert",{"type":[1],"appearance":[1],"dismissible":[4]}],[260,"evoke-app-bar",{"appearance":[1],"sticky":[516],"navLabel":[1,"nav-label"]}],[260,"evoke-badge",{"count":[2],"max":[2],"dot":[4],"showZero":[4,"show-zero"],"color":[1],"label":[1]}],[260,"evoke-button",{"variant":[1],"size":[1],"type":[1],"disabled":[4],"loading":[4],"icon":[1],"iconOnly":[516,"icon-only"],"accessibleLabel":[1,"accessible-label"],"block":[516],"buttonClass":[1,"button-class"]}],[260,"evoke-card",{"heading":[1],"appearance":[1],"clickable":[4],"cardClass":[1,"card-class"]}],[260,"evoke-checkbox",{"label":[1],"checked":[1540],"indeterminate":[1540],"disabled":[4],"error":[1],"inputClass":[1,"input-class"]}],[260,"evoke-chip",{"label":[1],"selected":[1540],"removable":[4],"disabled":[4]}],[0,"evoke-input",{"label":[1],"value":[1025],"type":[1],"name":[1],"placeholder":[1],"disabled":[4],"required":[4],"appearance":[1],"error":[1],"hint":[1],"icon":[1],"inputClass":[1,"input-class"]}],[260,"evoke-modal",{"open":[1540],"heading":[1],"position":[1],"size":[1],"closeOnBackdrop":[4,"close-on-backdrop"],"modalClass":[1,"modal-class"]},[[8,"keydown","onKeydown"]],{"open":[{"onOpenChange":0}]}],[0,"evoke-pagination",{"page":[1026],"total":[2],"appearance":[1],"disabled":[4]}],[0,"evoke-progress",{"type":[1],"value":[2],"indeterminate":[4],"label":[1],"size":[2]}],[0,"evoke-quantity-stepper",{"value":[1026],"min":[2],"max":[2],"appearance":[1],"disabled":[4],"label":[1]}],[0,"evoke-radio-group",{"label":[1],"options":[1],"value":[1025],"name":[1],"disabled":[4],"appearance":[1],"inline":[4],"error":[1]}],[0,"evoke-select",{"label":[1],"options":[1],"value":[1025],"placeholder":[1],"multiple":[4],"searchable":[4],"disabled":[4],"error":[1],"hint":[1],"selectClass":[1,"select-class"],"isOpen":[32],"query":[32],"activeIndex":[32]},[[4,"click","onDocClick"]]],[0,"evoke-switch",{"checked":[1540],"label":[1],"description":[1],"disabled":[4],"accessibleLabel":[1,"accessible-label"]}],[0,"evoke-table",{"columns":[1],"rows":[1],"striped":[4],"sortable":[4],"caption":[1],"emptyText":[1,"empty-text"],"sortKey":[32],"sortDir":[32]}],[260,"evoke-tabs",{"options":[1],"value":[1025],"appearance":[1],"label":[1]}],[0,"evoke-textarea",{"label":[1],"value":[1025],"name":[1],"placeholder":[1],"rows":[2],"autoGrow":[4,"auto-grow"],"maxLength":[2,"max-length"],"disabled":[4],"required":[4],"error":[1],"hint":[1],"textareaClass":[1,"textarea-class"]}],[260,"evoke-toast",{"open":[1540],"message":[1],"type":[1],"action":[1],"duration":[2],"position":[1]},null,{"open":[{"onOpen":0}]}],[260,"evoke-tooltip",{"text":[1],"placement":[1],"theme":[1],"visible":[32]}]]]], options);
10
+ };
11
+
12
+ exports.setNonce = index.setNonce;
13
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,32 @@
1
+ {
2
+ "entries": [
3
+ "components/evoke-alert/evoke-alert.js",
4
+ "components/evoke-app-bar/evoke-app-bar.js",
5
+ "components/evoke-badge/evoke-badge.js",
6
+ "components/evoke-button/evoke-button.js",
7
+ "components/evoke-card/evoke-card.js",
8
+ "components/evoke-checkbox/evoke-checkbox.js",
9
+ "components/evoke-chip/evoke-chip.js",
10
+ "components/evoke-input/evoke-input.js",
11
+ "components/evoke-modal/evoke-modal.js",
12
+ "components/evoke-pagination/evoke-pagination.js",
13
+ "components/evoke-progress/evoke-progress.js",
14
+ "components/evoke-quantity-stepper/evoke-quantity-stepper.js",
15
+ "components/evoke-radio-group/evoke-radio-group.js",
16
+ "components/evoke-select/evoke-select.js",
17
+ "components/evoke-switch/evoke-switch.js",
18
+ "components/evoke-table/evoke-table.js",
19
+ "components/evoke-tabs/evoke-tabs.js",
20
+ "components/evoke-textarea/evoke-textarea.js",
21
+ "components/evoke-toast/evoke-toast.js",
22
+ "components/evoke-tooltip/evoke-tooltip.js"
23
+ ],
24
+ "mixins": [],
25
+ "compiler": {
26
+ "name": "@stencil/core",
27
+ "version": "4.45.2",
28
+ "typescriptVersion": "5.8.3"
29
+ },
30
+ "collections": [],
31
+ "bundles": []
32
+ }
@@ -0,0 +1,18 @@
1
+ evoke-alert { display: block; }
2
+ evoke-alert .evoke-alert { --_c: var(--evoke-info, #0891b2); display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--evoke-radius, 8px); border: 1px solid var(--_c); font-family: var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif); }
3
+ evoke-alert .evoke-alert--info { --_c: var(--evoke-info, #0891b2); }
4
+ evoke-alert .evoke-alert--success { --_c: var(--evoke-success, #16a34a); }
5
+ evoke-alert .evoke-alert--warning { --_c: var(--evoke-warning, #d97706); }
6
+ evoke-alert .evoke-alert--danger { --_c: var(--evoke-danger, #dc2626); }
7
+ /* subtle: tinted background, dark text (keeps 4.5:1 contrast), coloured border + icon */
8
+ evoke-alert .evoke-alert--subtle { background: color-mix(in srgb, var(--_c) 12%, var(--evoke-surface, #ffffff)); color: var(--evoke-text, #1a1a1a); }
9
+ evoke-alert .evoke-alert--subtle .evoke-alert__icon { color: var(--_c); }
10
+ /* solid: filled colour, white text */
11
+ evoke-alert .evoke-alert--solid { background: color-mix(in srgb, var(--_c) 78%, #000); border-color: color-mix(in srgb, var(--_c) 78%, #000); color: #fff; }
12
+ evoke-alert .evoke-alert__icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
13
+ evoke-alert .evoke-alert__content { flex: 1; min-width: 0; }
14
+ evoke-alert .evoke-alert__close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; background: none; border: 0; border-radius: 50%; color: inherit; cursor: pointer; }
15
+ evoke-alert .evoke-alert__close:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
16
+ evoke-alert .evoke-alert__close:active { background: color-mix(in srgb, currentColor 24%, transparent); }
17
+ evoke-alert .evoke-alert__close:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 40%, transparent); }
18
+ evoke-alert .evoke-alert__close .evoke-icon { width: 16px; height: 16px; }
@@ -0,0 +1,107 @@
1
+ import { h } from "@stencil/core";
2
+ import { renderIcon } from "../../utils/icons";
3
+ const TYPE_ICON = { info: 'info', success: 'check', warning: 'alert', danger: 'alert' };
4
+ export class EvokeAlert {
5
+ constructor() {
6
+ this.type = 'info';
7
+ /** Subtle (tinted background) or solid (filled colour) */
8
+ this.appearance = 'subtle';
9
+ this.dismissible = false;
10
+ }
11
+ render() {
12
+ return (h("div", { key: 'a1b27ec91bb55baeacdcf9547f5a6680faad87e6', class: `evoke-alert evoke-alert--${this.type} evoke-alert--${this.appearance}`, role: this.type === 'danger' || this.type === 'warning' ? 'alert' : 'status' }, renderIcon(TYPE_ICON[this.type], 'evoke-alert__icon'), h("div", { key: '499700905c4cd7ca6de877185ed0b8a02d1d1ed9', class: "evoke-alert__content" }, h("slot", { key: '122793b5693dc905c6bfbd680ae050a12be57400' })), this.dismissible && (h("button", { key: 'a6bd557fdefc34efcf8b87552130b9a55425c381', type: "button", class: "evoke-alert__close", "aria-label": "Dismiss", onClick: () => this.evokeDismiss.emit() }, renderIcon('x', 'evoke-icon')))));
13
+ }
14
+ static get is() { return "evoke-alert"; }
15
+ static get originalStyleUrls() {
16
+ return {
17
+ "$": ["evoke-alert.css"]
18
+ };
19
+ }
20
+ static get styleUrls() {
21
+ return {
22
+ "$": ["evoke-alert.css"]
23
+ };
24
+ }
25
+ static get properties() {
26
+ return {
27
+ "type": {
28
+ "type": "string",
29
+ "mutable": false,
30
+ "complexType": {
31
+ "original": "'info' | 'success' | 'warning' | 'danger'",
32
+ "resolved": "\"danger\" | \"info\" | \"success\" | \"warning\"",
33
+ "references": {}
34
+ },
35
+ "required": false,
36
+ "optional": false,
37
+ "docs": {
38
+ "tags": [],
39
+ "text": ""
40
+ },
41
+ "getter": false,
42
+ "setter": false,
43
+ "reflect": false,
44
+ "attribute": "type",
45
+ "defaultValue": "'info'"
46
+ },
47
+ "appearance": {
48
+ "type": "string",
49
+ "mutable": false,
50
+ "complexType": {
51
+ "original": "'subtle' | 'solid'",
52
+ "resolved": "\"solid\" | \"subtle\"",
53
+ "references": {}
54
+ },
55
+ "required": false,
56
+ "optional": false,
57
+ "docs": {
58
+ "tags": [],
59
+ "text": "Subtle (tinted background) or solid (filled colour)"
60
+ },
61
+ "getter": false,
62
+ "setter": false,
63
+ "reflect": false,
64
+ "attribute": "appearance",
65
+ "defaultValue": "'subtle'"
66
+ },
67
+ "dismissible": {
68
+ "type": "boolean",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "boolean",
72
+ "resolved": "boolean",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": false,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": ""
80
+ },
81
+ "getter": false,
82
+ "setter": false,
83
+ "reflect": false,
84
+ "attribute": "dismissible",
85
+ "defaultValue": "false"
86
+ }
87
+ };
88
+ }
89
+ static get events() {
90
+ return [{
91
+ "method": "evokeDismiss",
92
+ "name": "evokeDismiss",
93
+ "bubbles": true,
94
+ "cancelable": true,
95
+ "composed": true,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "Fired when the dismiss button is clicked"
99
+ },
100
+ "complexType": {
101
+ "original": "void",
102
+ "resolved": "void",
103
+ "references": {}
104
+ }
105
+ }];
106
+ }
107
+ }
@@ -0,0 +1,13 @@
1
+ evoke-app-bar { display: block; }
2
+ evoke-app-bar[sticky] { position: sticky; top: 0; z-index: 50; }
3
+ evoke-app-bar .evoke-appbar { --_fg: var(--evoke-text, #1a1a1a); box-sizing: border-box; display: flex; align-items: center; gap: 24px; min-height: 64px; padding: 8px 24px; font-family: var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif); background: var(--evoke-surface, #ffffff); color: var(--_fg); border-bottom: 1px solid var(--evoke-border, #dedede); }
4
+ evoke-app-bar .evoke-appbar--dark { --_fg: var(--evoke-secondary-contrast, #ffffff); background: var(--evoke-secondary, #0b1560); border-bottom-color: transparent; }
5
+ evoke-app-bar .evoke-appbar__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; flex: none; }
6
+ evoke-app-bar .evoke-appbar__nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
7
+ evoke-app-bar .evoke-appbar__actions { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
8
+ /* slotted nav links get consistent styling and states */
9
+ evoke-app-bar .evoke-appbar__nav a, evoke-app-bar .evoke-appbar__nav button { display: inline-flex; align-items: center; padding: 8px 14px; font: inherit; color: inherit; text-decoration: none; background: none; border: 0; border-radius: var(--evoke-radius-field, 8px); cursor: pointer; opacity: 0.85; transition: background-color 0.15s, opacity 0.15s; }
10
+ evoke-app-bar .evoke-appbar__nav a:hover, evoke-app-bar .evoke-appbar__nav button:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
11
+ evoke-app-bar .evoke-appbar__nav a:active, evoke-app-bar .evoke-appbar__nav button:active { background: color-mix(in srgb, currentColor 18%, transparent); }
12
+ evoke-app-bar .evoke-appbar__nav a[aria-current], evoke-app-bar .evoke-appbar__nav a.active { opacity: 1; font-weight: 600; box-shadow: inset 0 -2px 0 var(--evoke-primary, #ff5316); border-radius: 0; }
13
+ evoke-app-bar .evoke-appbar__nav a:focus-visible, evoke-app-bar .evoke-appbar__nav button:focus-visible { outline: 2px solid var(--evoke-primary, #ff5316); outline-offset: 1px; }
@@ -0,0 +1,94 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * @slot logo - brand/logo on the left
4
+ * @slot nav - navigation links in the middle (wrapped in a <nav>)
5
+ * @slot actions - buttons, badges or icons on the right
6
+ */
7
+ export class EvokeAppBar {
8
+ constructor() {
9
+ /** Light surface, or dark / brand-coloured (navy) */
10
+ this.appearance = 'light';
11
+ /** Stick to the top of the viewport while scrolling */
12
+ this.sticky = false;
13
+ /** Accessible name for the navigation landmark */
14
+ this.navLabel = 'Main';
15
+ }
16
+ render() {
17
+ return (h("header", { key: '11366baa08e286c8412eefbf82660f289fe42738', class: `evoke-appbar evoke-appbar--${this.appearance}` }, h("div", { key: '4a44bb53fc220b2c880fbafa79aecb2d195b2b85', class: "evoke-appbar__logo" }, h("slot", { key: 'bb727e24bb1058f0a6b6b4ffbe78616f639b15bd', name: "logo" })), h("nav", { key: '6d2023a4dad87266641d3cb2747218926c1750c7', class: "evoke-appbar__nav", "aria-label": this.navLabel }, h("slot", { key: 'ce4f50acddb09ebbc0c03538052cbd69e231fd2e', name: "nav" })), h("div", { key: 'ff64630598e48bf5b0b6708799247e8bcf54b184', class: "evoke-appbar__actions" }, h("slot", { key: 'e782ff890c366a72fe65df8f0544ad09c0818cc6', name: "actions" }))));
18
+ }
19
+ static get is() { return "evoke-app-bar"; }
20
+ static get originalStyleUrls() {
21
+ return {
22
+ "$": ["evoke-app-bar.css"]
23
+ };
24
+ }
25
+ static get styleUrls() {
26
+ return {
27
+ "$": ["evoke-app-bar.css"]
28
+ };
29
+ }
30
+ static get properties() {
31
+ return {
32
+ "appearance": {
33
+ "type": "string",
34
+ "mutable": false,
35
+ "complexType": {
36
+ "original": "'light' | 'dark'",
37
+ "resolved": "\"dark\" | \"light\"",
38
+ "references": {}
39
+ },
40
+ "required": false,
41
+ "optional": false,
42
+ "docs": {
43
+ "tags": [],
44
+ "text": "Light surface, or dark / brand-coloured (navy)"
45
+ },
46
+ "getter": false,
47
+ "setter": false,
48
+ "reflect": false,
49
+ "attribute": "appearance",
50
+ "defaultValue": "'light'"
51
+ },
52
+ "sticky": {
53
+ "type": "boolean",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "boolean",
57
+ "resolved": "boolean",
58
+ "references": {}
59
+ },
60
+ "required": false,
61
+ "optional": false,
62
+ "docs": {
63
+ "tags": [],
64
+ "text": "Stick to the top of the viewport while scrolling"
65
+ },
66
+ "getter": false,
67
+ "setter": false,
68
+ "reflect": true,
69
+ "attribute": "sticky",
70
+ "defaultValue": "false"
71
+ },
72
+ "navLabel": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": "Accessible name for the navigation landmark"
85
+ },
86
+ "getter": false,
87
+ "setter": false,
88
+ "reflect": false,
89
+ "attribute": "nav-label",
90
+ "defaultValue": "'Main'"
91
+ }
92
+ };
93
+ }
94
+ }
@@ -0,0 +1,13 @@
1
+ evoke-badge { display: inline-block; }
2
+ evoke-badge .evoke-badge-wrap { position: relative; display: inline-flex; vertical-align: middle; }
3
+ evoke-badge .evoke-badge { --_bg: var(--evoke-danger, #dc2626); --_fg: #fff; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; background: var(--_bg); color: var(--_fg); font-family: var(--evoke-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif); font-weight: 600; }
4
+ evoke-badge .evoke-badge--primary { --_bg: color-mix(in srgb, var(--evoke-primary, #ff5316) 82%, #000); }
5
+ evoke-badge .evoke-badge--secondary { --_bg: var(--evoke-secondary, #0b1560); --_fg: var(--evoke-secondary-contrast, #ffffff); }
6
+ evoke-badge .evoke-badge--danger { --_bg: color-mix(in srgb, var(--evoke-danger, #dc2626) 85%, #000); }
7
+ evoke-badge .evoke-badge--success { --_bg: color-mix(in srgb, var(--evoke-success, #16a34a) 78%, #000); }
8
+ evoke-badge .evoke-badge--warning { --_bg: color-mix(in srgb, var(--evoke-warning, #d97706) 78%, #000); }
9
+ evoke-badge .evoke-badge--info { --_bg: color-mix(in srgb, var(--evoke-info, #0891b2) 78%, #000); }
10
+ evoke-badge .evoke-badge--count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 9999px; font-size: 0.75rem; line-height: 1; }
11
+ evoke-badge .evoke-badge--dot { width: 10px; height: 10px; border-radius: 50%; }
12
+ evoke-badge .evoke-badge-wrap--anchored > .evoke-badge { position: absolute; top: 0; right: 0; transform: translate(35%, -35%); box-shadow: 0 0 0 2px var(--evoke-surface, #ffffff); }
13
+ evoke-badge .evoke-badge__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@@ -0,0 +1,162 @@
1
+ import { h } from "@stencil/core";
2
+ export class EvokeBadge {
3
+ constructor() {
4
+ /** Number to show (count badge) */
5
+ this.count = 0;
6
+ /** Counts above this show as "max+" (e.g. 99+) */
7
+ this.max = 99;
8
+ /** Show a small status dot instead of a number */
9
+ this.dot = false;
10
+ /** Show the badge even when the count is 0 */
11
+ this.showZero = false;
12
+ this.color = 'danger';
13
+ /** Screen-reader text, e.g. "3 items in cart". A dot without a label is treated as decorative. */
14
+ this.label = '';
15
+ this.hasContent = false;
16
+ }
17
+ componentWillLoad() {
18
+ this.hasContent = Array.from(this.el.childNodes).some((n) => { var _a; return n.nodeType === 1 || (n.nodeType === 3 && !!((_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim())); });
19
+ }
20
+ render() {
21
+ const text = this.count > this.max ? `${this.max}+` : String(this.count);
22
+ const showCount = !this.dot && (this.count > 0 || this.showZero);
23
+ const bubble = this.dot ? (h("span", { class: `evoke-badge evoke-badge--dot evoke-badge--${this.color}`, role: this.label ? 'status' : undefined, "aria-label": this.label || undefined, "aria-hidden": this.label ? undefined : 'true' })) : showCount ? (h("span", { class: `evoke-badge evoke-badge--count evoke-badge--${this.color}` }, h("span", { "aria-hidden": this.label ? 'true' : undefined }, text), this.label && h("span", { class: "evoke-badge__sr" }, this.label))) : null;
24
+ return (h("span", { key: 'c49ac8a3361b9dcdfa3ebc3eacfca2079a3da60f', class: `evoke-badge-wrap ${this.hasContent ? 'evoke-badge-wrap--anchored' : ''}`.trim() }, h("slot", { key: 'b25c9150dcca4299ccae5735dcd0ea9a0c7e973a' }), bubble));
25
+ }
26
+ static get is() { return "evoke-badge"; }
27
+ static get originalStyleUrls() {
28
+ return {
29
+ "$": ["evoke-badge.css"]
30
+ };
31
+ }
32
+ static get styleUrls() {
33
+ return {
34
+ "$": ["evoke-badge.css"]
35
+ };
36
+ }
37
+ static get properties() {
38
+ return {
39
+ "count": {
40
+ "type": "number",
41
+ "mutable": false,
42
+ "complexType": {
43
+ "original": "number",
44
+ "resolved": "number",
45
+ "references": {}
46
+ },
47
+ "required": false,
48
+ "optional": false,
49
+ "docs": {
50
+ "tags": [],
51
+ "text": "Number to show (count badge)"
52
+ },
53
+ "getter": false,
54
+ "setter": false,
55
+ "reflect": false,
56
+ "attribute": "count",
57
+ "defaultValue": "0"
58
+ },
59
+ "max": {
60
+ "type": "number",
61
+ "mutable": false,
62
+ "complexType": {
63
+ "original": "number",
64
+ "resolved": "number",
65
+ "references": {}
66
+ },
67
+ "required": false,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": "Counts above this show as \"max+\" (e.g. 99+)"
72
+ },
73
+ "getter": false,
74
+ "setter": false,
75
+ "reflect": false,
76
+ "attribute": "max",
77
+ "defaultValue": "99"
78
+ },
79
+ "dot": {
80
+ "type": "boolean",
81
+ "mutable": false,
82
+ "complexType": {
83
+ "original": "boolean",
84
+ "resolved": "boolean",
85
+ "references": {}
86
+ },
87
+ "required": false,
88
+ "optional": false,
89
+ "docs": {
90
+ "tags": [],
91
+ "text": "Show a small status dot instead of a number"
92
+ },
93
+ "getter": false,
94
+ "setter": false,
95
+ "reflect": false,
96
+ "attribute": "dot",
97
+ "defaultValue": "false"
98
+ },
99
+ "showZero": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "Show the badge even when the count is 0"
112
+ },
113
+ "getter": false,
114
+ "setter": false,
115
+ "reflect": false,
116
+ "attribute": "show-zero",
117
+ "defaultValue": "false"
118
+ },
119
+ "color": {
120
+ "type": "string",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'info'",
124
+ "resolved": "\"danger\" | \"info\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
125
+ "references": {}
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": ""
132
+ },
133
+ "getter": false,
134
+ "setter": false,
135
+ "reflect": false,
136
+ "attribute": "color",
137
+ "defaultValue": "'danger'"
138
+ },
139
+ "label": {
140
+ "type": "string",
141
+ "mutable": false,
142
+ "complexType": {
143
+ "original": "string",
144
+ "resolved": "string",
145
+ "references": {}
146
+ },
147
+ "required": false,
148
+ "optional": false,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": "Screen-reader text, e.g. \"3 items in cart\". A dot without a label is treated as decorative."
152
+ },
153
+ "getter": false,
154
+ "setter": false,
155
+ "reflect": false,
156
+ "attribute": "label",
157
+ "defaultValue": "''"
158
+ }
159
+ };
160
+ }
161
+ static get elementRef() { return "el"; }
162
+ }
@@ -0,0 +1,31 @@
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, background-color 0.15s, box-shadow 0.15s, transform 0.05s;
8
+ }
9
+ evoke-button .evoke-btn--sm { height: calc(var(--evoke-control-height, 56px) * 0.75); padding: 0 calc(var(--evoke-button-padding-x, 36px) * 0.6); font-size: 0.875rem; }
10
+ evoke-button .evoke-btn--lg { height: calc(var(--evoke-control-height, 56px) * 1.15); padding: 0 calc(var(--evoke-button-padding-x, 36px) * 1.2); font-size: 1.125rem; }
11
+ evoke-button .evoke-btn--icon { padding: 0; width: var(--evoke-control-height, 56px); }
12
+ evoke-button .evoke-btn--icon.evoke-btn--sm { width: calc(var(--evoke-control-height, 56px) * 0.75); }
13
+ evoke-button .evoke-btn--icon.evoke-btn--lg { width: calc(var(--evoke-control-height, 56px) * 1.15); }
14
+ evoke-button .evoke-icon { width: 1.1em; height: 1.1em; flex: none; }
15
+ evoke-button .evoke-btn:hover:not(:disabled) { filter: brightness(0.92); }
16
+ evoke-button .evoke-btn:active:not(:disabled) { filter: brightness(0.82); transform: translateY(1px); }
17
+ evoke-button .evoke-btn:focus-visible { outline: none; box-shadow: var(--evoke-focus-ring, 0 0 0 3px rgba(11, 21, 96, 0.15)); }
18
+ evoke-button .evoke-btn:disabled { opacity: 0.5; cursor: not-allowed; }
19
+ evoke-button .evoke-btn--loading:disabled { cursor: progress; opacity: 0.8; }
20
+ evoke-button .evoke-btn--primary { background: var(--evoke-primary, #ff5316); color: var(--evoke-primary-contrast, #ffffff); }
21
+ evoke-button .evoke-btn--secondary { background: var(--evoke-secondary, #0b1560); color: var(--evoke-secondary-contrast, #ffffff); }
22
+ evoke-button .evoke-btn--danger { background: var(--evoke-danger, #dc2626); color: #fff; }
23
+ evoke-button .evoke-btn--outline { background: transparent; color: var(--evoke-primary-text, #cc3d0d); border-color: var(--evoke-primary, #ff5316); }
24
+ evoke-button .evoke-btn--ghost { background: transparent; color: var(--evoke-primary-text, #cc3d0d); border-color: transparent; }
25
+ evoke-button .evoke-btn--ghost:hover:not(:disabled) { filter: none; background: color-mix(in srgb, var(--evoke-primary, #ff5316) 10%, transparent); }
26
+ evoke-button .evoke-btn--ghost:active:not(:disabled) { filter: none; background: color-mix(in srgb, var(--evoke-primary, #ff5316) 18%, transparent); }
27
+ evoke-button .evoke-spinner { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: evoke-spin 0.7s linear infinite; }
28
+ @keyframes evoke-spin { to { transform: rotate(360deg); } }
29
+ @media (prefers-reduced-motion: reduce) { evoke-button .evoke-spinner { animation-duration: 2s; } }
30
+ evoke-button[block] { display: block; }
31
+ evoke-button[block] .evoke-btn { width: 100%; }