@affinda/wc 0.0.1 → 0.0.3

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 (227) hide show
  1. package/dist/affinda/af-aspect-ratio.entry.esm.js.map +1 -0
  2. package/dist/affinda/af-button-group.entry.esm.js.map +1 -0
  3. package/dist/affinda/af-button.entry.esm.js.map +1 -0
  4. package/dist/affinda/af-color-swatch.entry.esm.js.map +1 -0
  5. package/dist/affinda/af-container.entry.esm.js.map +1 -0
  6. package/dist/affinda/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.esm.js.map +1 -0
  7. package/dist/affinda/af-icon-button.entry.esm.js.map +1 -0
  8. package/dist/affinda/af-typography-lockup.entry.esm.js.map +1 -0
  9. package/dist/affinda/affinda.css +1 -1
  10. package/dist/affinda/affinda.esm.js +1 -1
  11. package/dist/affinda/index.esm.js +1 -1
  12. package/dist/affinda/index.esm.js.map +1 -1
  13. package/dist/affinda/p-540af9d9.entry.js +2 -0
  14. package/dist/affinda/p-540af9d9.entry.js.map +1 -0
  15. package/dist/affinda/p-619bc077.entry.js +2 -0
  16. package/dist/affinda/p-619bc077.entry.js.map +1 -0
  17. package/dist/affinda/p-6b07f590.entry.js +2 -0
  18. package/dist/affinda/p-6b07f590.entry.js.map +1 -0
  19. package/dist/affinda/p-8d3b4917.entry.js +2 -0
  20. package/dist/affinda/p-8d3b4917.entry.js.map +1 -0
  21. package/dist/affinda/p-9d0e6ed1.entry.js +2 -0
  22. package/dist/affinda/p-9d0e6ed1.entry.js.map +1 -0
  23. package/dist/affinda/p-DxVtR6vj.js +3 -0
  24. package/dist/affinda/p-DxVtR6vj.js.map +1 -0
  25. package/dist/affinda/p-afbe9cb3.entry.js +2 -0
  26. package/dist/affinda/p-afbe9cb3.entry.js.map +1 -0
  27. package/dist/affinda/p-cbb06a14.entry.js +2 -0
  28. package/dist/affinda/p-cbb06a14.entry.js.map +1 -0
  29. package/dist/affinda/p-e274e11a.entry.js +2 -0
  30. package/dist/affinda/p-e274e11a.entry.js.map +1 -0
  31. package/dist/cjs/af-aspect-ratio.cjs.entry.js +83 -0
  32. package/dist/cjs/af-aspect-ratio.entry.cjs.js.map +1 -0
  33. package/dist/cjs/af-button-group.cjs.entry.js +30 -0
  34. package/dist/cjs/af-button-group.entry.cjs.js.map +1 -0
  35. package/dist/cjs/af-button.cjs.entry.js +48 -0
  36. package/dist/cjs/af-button.entry.cjs.js.map +1 -0
  37. package/dist/cjs/af-color-swatch.cjs.entry.js +23 -0
  38. package/dist/cjs/af-color-swatch.entry.cjs.js.map +1 -0
  39. package/dist/cjs/af-container.cjs.entry.js +26 -0
  40. package/dist/cjs/af-container.entry.cjs.js.map +1 -0
  41. package/dist/cjs/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.cjs.js.map +1 -0
  42. package/dist/cjs/af-heading_5.cjs.entry.js +128 -0
  43. package/dist/cjs/af-icon-button.cjs.entry.js +44 -0
  44. package/dist/cjs/af-icon-button.entry.cjs.js.map +1 -0
  45. package/dist/cjs/af-typography-lockup.cjs.entry.js +45 -0
  46. package/dist/cjs/af-typography-lockup.entry.cjs.js.map +1 -0
  47. package/dist/cjs/affinda.cjs.js +2 -2
  48. package/dist/cjs/{index-5BGpYleS.js → index-E2jkaTPt.js} +92 -61
  49. package/dist/cjs/index-E2jkaTPt.js.map +1 -0
  50. package/dist/cjs/index.cjs.js +24 -136
  51. package/dist/cjs/index.cjs.js.map +1 -1
  52. package/dist/cjs/loader.cjs.js +2 -2
  53. package/dist/collection/collection-manifest.json +10 -3
  54. package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.css +17 -0
  55. package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.js +117 -0
  56. package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.js.map +1 -0
  57. package/dist/collection/components/af-button/af-button.css +151 -42
  58. package/dist/collection/components/af-button/af-button.js +62 -57
  59. package/dist/collection/components/af-button/af-button.js.map +1 -1
  60. package/dist/collection/components/af-button-group/af-button-group.css +22 -0
  61. package/dist/collection/components/af-button-group/af-button-group.js +77 -0
  62. package/dist/collection/components/af-button-group/af-button-group.js.map +1 -0
  63. package/dist/collection/components/af-color-swatch/af-color-swatch.css +42 -0
  64. package/dist/collection/components/af-color-swatch/af-color-swatch.js +88 -0
  65. package/dist/collection/components/af-color-swatch/af-color-swatch.js.map +1 -0
  66. package/dist/collection/components/af-container/af-container.css +76 -0
  67. package/dist/collection/components/af-container/af-container.js +57 -0
  68. package/dist/collection/components/af-container/af-container.js.map +1 -0
  69. package/dist/collection/components/af-heading/af-heading.css +99 -0
  70. package/dist/collection/components/af-heading/af-heading.js +86 -0
  71. package/dist/collection/components/af-heading/af-heading.js.map +1 -0
  72. package/dist/collection/components/af-icon-button/af-icon-button.css +140 -41
  73. package/dist/collection/components/af-icon-button/af-icon-button.js +81 -57
  74. package/dist/collection/components/af-icon-button/af-icon-button.js.map +1 -1
  75. package/dist/collection/components/af-logo/af-logo.css +10 -0
  76. package/dist/collection/components/af-logo/af-logo.js +22 -0
  77. package/dist/collection/components/af-logo/af-logo.js.map +1 -0
  78. package/dist/collection/components/af-nav-item/af-nav-item.css +146 -0
  79. package/dist/collection/components/af-nav-item/af-nav-item.js +134 -0
  80. package/dist/collection/components/af-nav-item/af-nav-item.js.map +1 -0
  81. package/dist/collection/components/af-navbar/af-navbar.css +119 -0
  82. package/dist/collection/components/af-navbar/af-navbar.js +23 -0
  83. package/dist/collection/components/af-navbar/af-navbar.js.map +1 -0
  84. package/dist/collection/components/af-text/af-text.css +61 -0
  85. package/dist/collection/components/af-text/af-text.js +96 -0
  86. package/dist/collection/components/af-text/af-text.js.map +1 -0
  87. package/dist/collection/components/af-typography-lockup/af-typography-lockup.css +168 -0
  88. package/dist/collection/components/af-typography-lockup/af-typography-lockup.js +151 -0
  89. package/dist/collection/components/af-typography-lockup/af-typography-lockup.js.map +1 -0
  90. package/dist/collection/components.js +10 -3
  91. package/dist/collection/components.js.map +1 -1
  92. package/dist/components/af-aspect-ratio.d.ts +11 -0
  93. package/dist/components/af-aspect-ratio.js +9 -0
  94. package/dist/components/af-aspect-ratio.js.map +1 -0
  95. package/dist/components/af-button-group.d.ts +11 -0
  96. package/dist/components/af-button-group.js +9 -0
  97. package/dist/components/af-button-group.js.map +1 -0
  98. package/dist/components/af-button.js +1 -1
  99. package/dist/components/af-color-swatch.d.ts +11 -0
  100. package/dist/components/af-color-swatch.js +9 -0
  101. package/dist/components/af-color-swatch.js.map +1 -0
  102. package/dist/components/af-container.d.ts +11 -0
  103. package/dist/components/af-container.js +9 -0
  104. package/dist/components/af-container.js.map +1 -0
  105. package/dist/components/af-heading.d.ts +11 -0
  106. package/dist/components/af-heading.js +9 -0
  107. package/dist/components/af-heading.js.map +1 -0
  108. package/dist/components/af-icon-button.js +1 -1
  109. package/dist/components/{af-card.d.ts → af-logo.d.ts} +4 -4
  110. package/dist/components/af-logo.js +9 -0
  111. package/dist/components/af-logo.js.map +1 -0
  112. package/dist/components/af-nav-item.d.ts +11 -0
  113. package/dist/components/af-nav-item.js +9 -0
  114. package/dist/components/af-nav-item.js.map +1 -0
  115. package/dist/components/{af-badge.d.ts → af-navbar.d.ts} +4 -4
  116. package/dist/components/af-navbar.js +9 -0
  117. package/dist/components/af-navbar.js.map +1 -0
  118. package/dist/components/{af-input.d.ts → af-text.d.ts} +4 -4
  119. package/dist/components/af-text.js +9 -0
  120. package/dist/components/af-text.js.map +1 -0
  121. package/dist/components/af-typography-lockup.d.ts +11 -0
  122. package/dist/components/af-typography-lockup.js +9 -0
  123. package/dist/components/af-typography-lockup.js.map +1 -0
  124. package/dist/components/index.js +13 -6
  125. package/dist/components/index.js.map +1 -1
  126. package/dist/components/p-B17zxKkI.js +35 -0
  127. package/dist/components/p-B17zxKkI.js.map +1 -0
  128. package/dist/components/p-BJDmHNDi.js +59 -0
  129. package/dist/components/p-BJDmHNDi.js.map +1 -0
  130. package/dist/components/p-BfmeW04T.js +50 -0
  131. package/dist/components/p-BfmeW04T.js.map +1 -0
  132. package/dist/components/p-BoU5qaPt.js +68 -0
  133. package/dist/components/p-BoU5qaPt.js.map +1 -0
  134. package/dist/components/p-CT_9_xN3.js +50 -0
  135. package/dist/components/p-CT_9_xN3.js.map +1 -0
  136. package/dist/components/{p-DOtgsZRB.js → p-CzaQ1fCu.js} +92 -65
  137. package/dist/components/p-CzaQ1fCu.js.map +1 -0
  138. package/dist/components/p-DG7Mtz0G.js +66 -0
  139. package/dist/components/p-DG7Mtz0G.js.map +1 -0
  140. package/dist/components/p-DcFGu6up.js +68 -0
  141. package/dist/components/p-DcFGu6up.js.map +1 -0
  142. package/dist/components/p-DfIqdEs7.js +45 -0
  143. package/dist/components/p-DfIqdEs7.js.map +1 -0
  144. package/dist/components/p-DqIqR4VU.js +102 -0
  145. package/dist/components/p-DqIqR4VU.js.map +1 -0
  146. package/dist/components/p-LEksuu7O.js +44 -0
  147. package/dist/components/p-LEksuu7O.js.map +1 -0
  148. package/dist/components/p-uhOM63Ux.js +71 -0
  149. package/dist/components/p-uhOM63Ux.js.map +1 -0
  150. package/dist/components/p-zBrKMKWE.js +35 -0
  151. package/dist/components/p-zBrKMKWE.js.map +1 -0
  152. package/dist/esm/af-aspect-ratio.entry.js +81 -0
  153. package/dist/esm/af-aspect-ratio.entry.js.map +1 -0
  154. package/dist/esm/af-button-group.entry.js +28 -0
  155. package/dist/esm/af-button-group.entry.js.map +1 -0
  156. package/dist/esm/af-button.entry.js +46 -0
  157. package/dist/esm/af-button.entry.js.map +1 -0
  158. package/dist/esm/af-color-swatch.entry.js +21 -0
  159. package/dist/esm/af-color-swatch.entry.js.map +1 -0
  160. package/dist/esm/af-container.entry.js +24 -0
  161. package/dist/esm/af-container.entry.js.map +1 -0
  162. package/dist/esm/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.js.map +1 -0
  163. package/dist/esm/af-heading_5.entry.js +122 -0
  164. package/dist/esm/af-icon-button.entry.js +42 -0
  165. package/dist/esm/af-icon-button.entry.js.map +1 -0
  166. package/dist/esm/af-typography-lockup.entry.js +43 -0
  167. package/dist/esm/af-typography-lockup.entry.js.map +1 -0
  168. package/dist/esm/affinda.js +3 -3
  169. package/dist/esm/{index-o0tfWqnY.js → index-DxVtR6vj.js} +92 -61
  170. package/dist/esm/index-DxVtR6vj.js.map +1 -0
  171. package/dist/esm/index.js +9 -132
  172. package/dist/esm/index.js.map +1 -1
  173. package/dist/esm/loader.js +3 -3
  174. package/dist/types/components/af-aspect-ratio/af-aspect-ratio.d.ts +18 -0
  175. package/dist/types/components/af-button/af-button.d.ts +19 -11
  176. package/dist/types/components/af-button-group/af-button-group.d.ts +11 -0
  177. package/dist/types/components/af-color-swatch/af-color-swatch.d.ts +9 -0
  178. package/dist/types/components/af-container/af-container.d.ts +15 -0
  179. package/dist/types/components/af-heading/af-heading.d.ts +8 -0
  180. package/dist/types/components/af-icon-button/af-icon-button.d.ts +23 -11
  181. package/dist/types/components/af-logo/af-logo.d.ts +6 -0
  182. package/dist/types/components/af-nav-item/af-nav-item.d.ts +27 -0
  183. package/dist/types/components/af-navbar/af-navbar.d.ts +7 -0
  184. package/dist/types/components/af-text/af-text.d.ts +9 -0
  185. package/dist/types/components/af-typography-lockup/af-typography-lockup.d.ts +23 -0
  186. package/dist/types/components.d.ts +416 -163
  187. package/package.json +13 -13
  188. package/dist/affinda/af-badge.af-button.af-card.af-icon-button.af-input.entry.esm.js.map +0 -1
  189. package/dist/affinda/p-bca10492.entry.js +0 -2
  190. package/dist/affinda/p-bca10492.entry.js.map +0 -1
  191. package/dist/affinda/p-o0tfWqnY.js +0 -3
  192. package/dist/affinda/p-o0tfWqnY.js.map +0 -1
  193. package/dist/cjs/af-badge.af-button.af-card.af-icon-button.af-input.entry.cjs.js.map +0 -1
  194. package/dist/cjs/af-badge_5.cjs.entry.js +0 -13
  195. package/dist/cjs/index-5BGpYleS.js.map +0 -1
  196. package/dist/collection/components/af-badge/af-badge.css +0 -29
  197. package/dist/collection/components/af-badge/af-badge.js +0 -47
  198. package/dist/collection/components/af-badge/af-badge.js.map +0 -1
  199. package/dist/collection/components/af-card/af-card.css +0 -69
  200. package/dist/collection/components/af-card/af-card.js +0 -70
  201. package/dist/collection/components/af-card/af-card.js.map +0 -1
  202. package/dist/collection/components/af-input/af-input.css +0 -57
  203. package/dist/collection/components/af-input/af-input.js +0 -193
  204. package/dist/collection/components/af-input/af-input.js.map +0 -1
  205. package/dist/components/af-badge.js +0 -9
  206. package/dist/components/af-badge.js.map +0 -1
  207. package/dist/components/af-card.js +0 -9
  208. package/dist/components/af-card.js.map +0 -1
  209. package/dist/components/af-input.js +0 -9
  210. package/dist/components/af-input.js.map +0 -1
  211. package/dist/components/p-B7I93sz2.js +0 -39
  212. package/dist/components/p-B7I93sz2.js.map +0 -1
  213. package/dist/components/p-CZd1ieht.js +0 -62
  214. package/dist/components/p-CZd1ieht.js.map +0 -1
  215. package/dist/components/p-D6PwARU0.js +0 -59
  216. package/dist/components/p-D6PwARU0.js.map +0 -1
  217. package/dist/components/p-DOtgsZRB.js.map +0 -1
  218. package/dist/components/p-DZIXhvI0.js +0 -44
  219. package/dist/components/p-DZIXhvI0.js.map +0 -1
  220. package/dist/components/p-zIKPa48S.js +0 -62
  221. package/dist/components/p-zIKPa48S.js.map +0 -1
  222. package/dist/esm/af-badge.af-button.af-card.af-icon-button.af-input.entry.js.map +0 -1
  223. package/dist/esm/af-badge_5.entry.js +0 -3
  224. package/dist/esm/index-o0tfWqnY.js.map +0 -1
  225. package/dist/types/components/af-badge/af-badge.d.ts +0 -5
  226. package/dist/types/components/af-card/af-card.d.ts +0 -7
  227. package/dist/types/components/af-input/af-input.d.ts +0 -24
@@ -1,47 +0,0 @@
1
- import { h } from "@stencil/core";
2
- export class AfBadge {
3
- constructor() {
4
- /** Color theme of the badge */
5
- this.tone = 'brand';
6
- }
7
- render() {
8
- return (h("span", { key: '1f9d4015b429e012eade75e331c991d5c785482d', class: `tone-${this.tone}`, part: "base" }, h("slot", { key: 'b69b37a3e996c43cb16d04d829232d9539f45e06' })));
9
- }
10
- static get is() { return "af-badge"; }
11
- static get encapsulation() { return "shadow"; }
12
- static get originalStyleUrls() {
13
- return {
14
- "$": ["af-badge.css"]
15
- };
16
- }
17
- static get styleUrls() {
18
- return {
19
- "$": ["af-badge.css"]
20
- };
21
- }
22
- static get properties() {
23
- return {
24
- "tone": {
25
- "type": "string",
26
- "mutable": false,
27
- "complexType": {
28
- "original": "'brand' | 'neutral' | 'success'",
29
- "resolved": "\"brand\" | \"neutral\" | \"success\"",
30
- "references": {}
31
- },
32
- "required": false,
33
- "optional": false,
34
- "docs": {
35
- "tags": [],
36
- "text": "Color theme of the badge"
37
- },
38
- "getter": false,
39
- "setter": false,
40
- "reflect": false,
41
- "attribute": "tone",
42
- "defaultValue": "'brand'"
43
- }
44
- };
45
- }
46
- }
47
- //# sourceMappingURL=af-badge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"af-badge.js","sourceRoot":"","sources":["../../../src/components/af-badge/af-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,OAAO;IALpB;QAME,+BAA+B;QACvB,SAAI,GAAoC,OAAO,CAAC;KASzD;IAPC,MAAM;QACJ,OAAO,CACL,6DAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,MAAM;YAC3C,8DAAQ,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-badge',\n styleUrl: 'af-badge.css',\n shadow: true\n})\nexport class AfBadge {\n /** Color theme of the badge */\n @Prop() tone: 'brand' | 'neutral' | 'success' = 'brand';\n\n render() {\n return (\n <span class={`tone-${this.tone}`} part=\"base\">\n <slot />\n </span>\n );\n }\n}\n"]}
@@ -1,69 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- article {
6
- position: relative;
7
- border-radius: var(--af-radius-md);
8
- background: var(--af-color-bg-surface);
9
- color: var(--af-color-fg-default);
10
- padding: calc(var(--af-space-4) * 1.5);
11
- box-shadow: none;
12
- border: 1px solid rgba(18, 15, 31, 0.06);
13
- transition: box-shadow 160ms ease, transform 160ms ease;
14
- display: block;
15
- overflow: hidden;
16
- }
17
-
18
- article.variant-elevated {
19
- box-shadow: 0 18px 36px rgba(47, 22, 94, 0.18);
20
- border: none;
21
- }
22
-
23
- article:hover {
24
- transform: translateY(-2px);
25
- box-shadow: 0 24px 44px rgba(47, 22, 94, 0.24);
26
- }
27
-
28
- .accent {
29
- position: absolute;
30
- inset: 0;
31
- width: 6px;
32
- left: 0;
33
- right: auto;
34
- background: linear-gradient(180deg, var(--af-color-brand-primary-500), var(--af-color-brand-primary-600));
35
- }
36
-
37
- article.accent-brand .accent {
38
- background: linear-gradient(180deg, var(--af-color-brand-primary-500), var(--af-color-brand-primary-600));
39
- }
40
-
41
- article.accent-success .accent {
42
- background: linear-gradient(180deg, #22c55e, #16a34a);
43
- }
44
-
45
- article.accent-neutral .accent {
46
- background: rgba(18, 15, 31, 0.18);
47
- }
48
-
49
- .content {
50
- margin-left: 12px;
51
- display: grid;
52
- gap: var(--af-space-3);
53
- }
54
-
55
- .header:empty,
56
- .footer:empty {
57
- display: none;
58
- }
59
-
60
- .header ::slotted(*) {
61
- font-size: 1.125rem;
62
- font-weight: var(--af-font-weight-semibold);
63
- }
64
-
65
- .footer ::slotted(*) {
66
- display: inline-flex;
67
- gap: var(--af-space-2);
68
- align-items: center;
69
- }
@@ -1,70 +0,0 @@
1
- import { h } from "@stencil/core";
2
- export class AfCard {
3
- constructor() {
4
- /** Visual style of the card */
5
- this.variant = 'surface';
6
- }
7
- render() {
8
- const classes = {
9
- [`variant-${this.variant}`]: true,
10
- [`accent-${this.accent}`]: Boolean(this.accent)
11
- };
12
- return (h("article", { key: '6341b7150eb902027923228343dd017fee6aef32', class: classes, part: "base" }, this.accent ? h("span", { class: "accent", part: "accent", "aria-hidden": "true" }) : null, h("div", { key: '06256637c0e9e3a150b59fbc6f73d5b2867729ad', class: "content", part: "content" }, h("header", { key: '8f8c893d528cece13d1e9de7115b490a5ed84c88', class: "header", part: "header" }, h("slot", { key: 'b404fcc38918bb952678d78c035e9e7ad6e797ef', name: "header" })), h("div", { key: '2028736e547446fe12469cf74aec97daf6e3f10a', class: "body", part: "body" }, h("slot", { key: 'a2110bc4cfa174e4514d572d7a9cd28652c7da9a' })), h("footer", { key: '221a8202625e2794846ff7d68af45f9046fcfe58', class: "footer", part: "footer" }, h("slot", { key: 'b20d0e41962dbe766116845e2ef20c68003be7a7', name: "footer" })))));
13
- }
14
- static get is() { return "af-card"; }
15
- static get encapsulation() { return "shadow"; }
16
- static get originalStyleUrls() {
17
- return {
18
- "$": ["af-card.css"]
19
- };
20
- }
21
- static get styleUrls() {
22
- return {
23
- "$": ["af-card.css"]
24
- };
25
- }
26
- static get properties() {
27
- return {
28
- "variant": {
29
- "type": "string",
30
- "mutable": false,
31
- "complexType": {
32
- "original": "'surface' | 'elevated'",
33
- "resolved": "\"elevated\" | \"surface\"",
34
- "references": {}
35
- },
36
- "required": false,
37
- "optional": false,
38
- "docs": {
39
- "tags": [],
40
- "text": "Visual style of the card"
41
- },
42
- "getter": false,
43
- "setter": false,
44
- "reflect": false,
45
- "attribute": "variant",
46
- "defaultValue": "'surface'"
47
- },
48
- "accent": {
49
- "type": "string",
50
- "mutable": false,
51
- "complexType": {
52
- "original": "'brand' | 'success' | 'neutral'",
53
- "resolved": "\"brand\" | \"neutral\" | \"success\" | undefined",
54
- "references": {}
55
- },
56
- "required": false,
57
- "optional": true,
58
- "docs": {
59
- "tags": [],
60
- "text": "Optional accent colour strip"
61
- },
62
- "getter": false,
63
- "setter": false,
64
- "reflect": false,
65
- "attribute": "accent"
66
- }
67
- };
68
- }
69
- }
70
- //# sourceMappingURL=af-card.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"af-card.js","sourceRoot":"","sources":["../../../src/components/af-card/af-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,MAAM;IALnB;QAME,+BAA+B;QACvB,YAAO,GAA2B,SAAS,CAAC;KA4BrD;IAvBC,MAAM;QACJ,MAAM,OAAO,GAAG;YACd,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI;YACjC,CAAC,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;SAChD,CAAC;QAEF,OAAO,CACL,gEAAS,KAAK,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM;YACjC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,YAAM,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,iBAAa,MAAM,GAAQ,CAAC,CAAC,CAAC,IAAI;YACnF,4DAAK,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS;gBACjC,+DAAQ,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ;oBAClC,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB;gBACT,4DAAK,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM;oBAC3B,8DAAa,CACT;gBACN,+DAAQ,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ;oBAClC,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB,CACL,CACE,CACX,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-card',\n styleUrl: 'af-card.css',\n shadow: true\n})\nexport class AfCard {\n /** Visual style of the card */\n @Prop() variant: 'surface' | 'elevated' = 'surface';\n\n /** Optional accent colour strip */\n @Prop() accent?: 'brand' | 'success' | 'neutral';\n\n render() {\n const classes = {\n [`variant-${this.variant}`]: true,\n [`accent-${this.accent}`]: Boolean(this.accent)\n };\n\n return (\n <article class={classes} part=\"base\">\n {this.accent ? <span class=\"accent\" part=\"accent\" aria-hidden=\"true\"></span> : null}\n <div class=\"content\" part=\"content\">\n <header class=\"header\" part=\"header\">\n <slot name=\"header\"></slot>\n </header>\n <div class=\"body\" part=\"body\">\n <slot></slot>\n </div>\n <footer class=\"footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </article>\n );\n }\n}\n"]}
@@ -1,57 +0,0 @@
1
- :host {
2
- display: block;
3
- font-family: var(--af-font-family-sans);
4
- }
5
-
6
- label {
7
- display: grid;
8
- gap: var(--af-space-2);
9
- color: var(--af-color-fg-default);
10
- }
11
-
12
- .label {
13
- font-size: 0.95rem;
14
- font-weight: var(--af-font-weight-semibold);
15
- }
16
-
17
- .control {
18
- position: relative;
19
- }
20
-
21
- input {
22
- width: 100%;
23
- padding: calc(var(--af-space-2) + 2px) calc(var(--af-space-4) + 8px);
24
- border-radius: var(--af-radius-md);
25
- border: 1px solid rgba(18, 15, 31, 0.18);
26
- background: rgba(255, 255, 255, 0.9);
27
- color: inherit;
28
- font: inherit;
29
- transition: border-color 160ms ease, box-shadow 160ms ease;
30
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
31
- }
32
-
33
- input::placeholder {
34
- color: var(--af-color-fg-muted);
35
- opacity: 0.8;
36
- }
37
-
38
- input:focus-visible {
39
- outline: none;
40
- border-color: var(--af-color-brand-primary-500);
41
- box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
42
- }
43
-
44
- label.disabled {
45
- opacity: 0.55;
46
- cursor: not-allowed;
47
- }
48
-
49
- input:disabled {
50
- background: rgba(241, 240, 247, 0.7);
51
- cursor: not-allowed;
52
- }
53
-
54
- .description {
55
- font-size: 0.825rem;
56
- color: var(--af-color-fg-muted);
57
- }
@@ -1,193 +0,0 @@
1
- import { h } from "@stencil/core";
2
- let inputIds = 0;
3
- export class AfInput {
4
- constructor() {
5
- this.inputId = `af-input-${++inputIds}`;
6
- this.descriptionId = `${this.inputId}-desc`;
7
- /** Input type attribute */
8
- this.type = 'text';
9
- /** Current value (mutable so the component stays in sync) */
10
- this.value = '';
11
- /** Disabled state */
12
- this.disabled = false;
13
- this.handleInput = (event) => {
14
- const target = event.target;
15
- this.value = target.value;
16
- this.afInput.emit(this.value);
17
- };
18
- this.handleChange = () => {
19
- this.afChange.emit(this.value);
20
- };
21
- }
22
- render() {
23
- const describedBy = this.description ? this.descriptionId : undefined;
24
- return (h("label", { key: 'd14267dee125c07311c07bc31f0151448095dba6', part: "label", class: { disabled: this.disabled }, htmlFor: this.inputId }, this.label ? (h("span", { class: "label", part: "label-text" }, this.label)) : null, h("div", { key: 'd3b6428100e25c981650f5faa23df549d587ac10', class: "control" }, h("input", { key: '9e26981c32775b79ce9c3458a4890968fab04ef6', part: "field", id: this.inputId, type: this.type, placeholder: this.placeholder, value: this.value, disabled: this.disabled, "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleChange })), this.description ? (h("p", { id: this.descriptionId, class: "description", part: "description" }, this.description)) : null));
25
- }
26
- static get is() { return "af-input"; }
27
- static get encapsulation() { return "shadow"; }
28
- static get originalStyleUrls() {
29
- return {
30
- "$": ["af-input.css"]
31
- };
32
- }
33
- static get styleUrls() {
34
- return {
35
- "$": ["af-input.css"]
36
- };
37
- }
38
- static get properties() {
39
- return {
40
- "label": {
41
- "type": "string",
42
- "mutable": false,
43
- "complexType": {
44
- "original": "string",
45
- "resolved": "string | undefined",
46
- "references": {}
47
- },
48
- "required": false,
49
- "optional": true,
50
- "docs": {
51
- "tags": [],
52
- "text": "Optional label text"
53
- },
54
- "getter": false,
55
- "setter": false,
56
- "reflect": false,
57
- "attribute": "label"
58
- },
59
- "description": {
60
- "type": "string",
61
- "mutable": false,
62
- "complexType": {
63
- "original": "string",
64
- "resolved": "string | undefined",
65
- "references": {}
66
- },
67
- "required": false,
68
- "optional": true,
69
- "docs": {
70
- "tags": [],
71
- "text": "Assistive description shown below the field"
72
- },
73
- "getter": false,
74
- "setter": false,
75
- "reflect": false,
76
- "attribute": "description"
77
- },
78
- "type": {
79
- "type": "string",
80
- "mutable": false,
81
- "complexType": {
82
- "original": "'text' | 'email' | 'password' | 'search'",
83
- "resolved": "\"email\" | \"password\" | \"search\" | \"text\"",
84
- "references": {}
85
- },
86
- "required": false,
87
- "optional": false,
88
- "docs": {
89
- "tags": [],
90
- "text": "Input type attribute"
91
- },
92
- "getter": false,
93
- "setter": false,
94
- "reflect": false,
95
- "attribute": "type",
96
- "defaultValue": "'text'"
97
- },
98
- "placeholder": {
99
- "type": "string",
100
- "mutable": false,
101
- "complexType": {
102
- "original": "string",
103
- "resolved": "string | undefined",
104
- "references": {}
105
- },
106
- "required": false,
107
- "optional": true,
108
- "docs": {
109
- "tags": [],
110
- "text": "Placeholder text"
111
- },
112
- "getter": false,
113
- "setter": false,
114
- "reflect": false,
115
- "attribute": "placeholder"
116
- },
117
- "value": {
118
- "type": "string",
119
- "mutable": true,
120
- "complexType": {
121
- "original": "string",
122
- "resolved": "string",
123
- "references": {}
124
- },
125
- "required": false,
126
- "optional": false,
127
- "docs": {
128
- "tags": [],
129
- "text": "Current value (mutable so the component stays in sync)"
130
- },
131
- "getter": false,
132
- "setter": false,
133
- "reflect": false,
134
- "attribute": "value",
135
- "defaultValue": "''"
136
- },
137
- "disabled": {
138
- "type": "boolean",
139
- "mutable": false,
140
- "complexType": {
141
- "original": "boolean",
142
- "resolved": "boolean",
143
- "references": {}
144
- },
145
- "required": false,
146
- "optional": false,
147
- "docs": {
148
- "tags": [],
149
- "text": "Disabled state"
150
- },
151
- "getter": false,
152
- "setter": false,
153
- "reflect": true,
154
- "attribute": "disabled",
155
- "defaultValue": "false"
156
- }
157
- };
158
- }
159
- static get events() {
160
- return [{
161
- "method": "afInput",
162
- "name": "afInput",
163
- "bubbles": true,
164
- "cancelable": true,
165
- "composed": true,
166
- "docs": {
167
- "tags": [],
168
- "text": "Fired as the user types"
169
- },
170
- "complexType": {
171
- "original": "string",
172
- "resolved": "string",
173
- "references": {}
174
- }
175
- }, {
176
- "method": "afChange",
177
- "name": "afChange",
178
- "bubbles": true,
179
- "cancelable": true,
180
- "composed": true,
181
- "docs": {
182
- "tags": [],
183
- "text": "Fired when the field loses focus after a change"
184
- },
185
- "complexType": {
186
- "original": "string",
187
- "resolved": "string",
188
- "references": {}
189
- }
190
- }];
191
- }
192
- }
193
- //# sourceMappingURL=af-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"af-input.js","sourceRoot":"","sources":["../../../src/components/af-input/af-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAExE,IAAI,QAAQ,GAAG,CAAC,CAAC;AAOjB,MAAM,OAAO,OAAO;IALpB;QAMU,YAAO,GAAG,YAAY,EAAE,QAAQ,EAAE,CAAC;QACnC,kBAAa,GAAG,GAAG,IAAI,CAAC,OAAO,OAAO,CAAC;QAQ/C,2BAA2B;QACnB,SAAI,GAA6C,MAAM,CAAC;QAKhE,6DAA6D;QACpC,UAAK,GAAG,EAAE,CAAC;QAEpC,qBAAqB;QACI,aAAQ,GAAG,KAAK,CAAC;QAQlC,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,KAAK,CAAC,MAA0B,CAAC;YAChD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC;QAEM,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC;KAiCH;IA/BC,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QAEtE,OAAO,CACL,8DAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO;YAC1E,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACZ,YAAM,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY,IAClC,IAAI,CAAC,KAAK,CACN,CACR,CAAC,CAAC,CAAC,IAAI;YACR,4DAAK,KAAK,EAAC,SAAS;gBAClB,8DACE,IAAI,EAAC,OAAO,EACZ,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,sBACL,WAAW,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC3B,CACE;YACL,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAClB,SAAG,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,IAC9D,IAAI,CAAC,WAAW,CACf,CACL,CAAC,CAAC,CAAC,IAAI,CACF,CACT,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'af-input',\n styleUrl: 'af-input.css',\n shadow: true\n})\nexport class AfInput {\n private inputId = `af-input-${++inputIds}`;\n private descriptionId = `${this.inputId}-desc`;\n\n /** Optional label text */\n @Prop() label?: string;\n\n /** Assistive description shown below the field */\n @Prop() description?: string;\n\n /** Input type attribute */\n @Prop() type: 'text' | 'email' | 'password' | 'search' = 'text';\n\n /** Placeholder text */\n @Prop() placeholder?: string;\n\n /** Current value (mutable so the component stays in sync) */\n @Prop({ mutable: true }) value = '';\n\n /** Disabled state */\n @Prop({ reflect: true }) disabled = false;\n\n /** Fired as the user types */\n @Event() afInput!: EventEmitter<string>;\n\n /** Fired when the field loses focus after a change */\n @Event() afChange!: EventEmitter<string>;\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.value = target.value;\n this.afInput.emit(this.value);\n };\n\n private handleChange = () => {\n this.afChange.emit(this.value);\n };\n\n render() {\n const describedBy = this.description ? this.descriptionId : undefined;\n\n return (\n <label part=\"label\" class={{ disabled: this.disabled }} htmlFor={this.inputId}>\n {this.label ? (\n <span class=\"label\" part=\"label-text\">\n {this.label}\n </span>\n ) : null}\n <div class=\"control\">\n <input\n part=\"field\"\n id={this.inputId}\n type={this.type}\n placeholder={this.placeholder}\n value={this.value}\n disabled={this.disabled}\n aria-describedby={describedBy}\n onInput={this.handleInput}\n onChange={this.handleChange}\n />\n </div>\n {this.description ? (\n <p id={this.descriptionId} class=\"description\" part=\"description\">\n {this.description}\n </p>\n ) : null}\n </label>\n );\n }\n}\n"]}
@@ -1,9 +0,0 @@
1
- import { A as AfBadge$1, d as defineCustomElement$1 } from './p-B7I93sz2.js';
2
-
3
- const AfBadge = AfBadge$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { AfBadge, defineCustomElement };
7
- //# sourceMappingURL=af-badge.js.map
8
-
9
- //# sourceMappingURL=af-badge.js.map
@@ -1 +0,0 @@
1
- {"file":"af-badge.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,9 +0,0 @@
1
- import { A as AfCard$1, d as defineCustomElement$1 } from './p-DZIXhvI0.js';
2
-
3
- const AfCard = AfCard$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { AfCard, defineCustomElement };
7
- //# sourceMappingURL=af-card.js.map
8
-
9
- //# sourceMappingURL=af-card.js.map
@@ -1 +0,0 @@
1
- {"file":"af-card.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,9 +0,0 @@
1
- import { A as AfInput$1, d as defineCustomElement$1 } from './p-CZd1ieht.js';
2
-
3
- const AfInput = AfInput$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { AfInput, defineCustomElement };
7
- //# sourceMappingURL=af-input.js.map
8
-
9
- //# sourceMappingURL=af-input.js.map
@@ -1 +0,0 @@
1
- {"file":"af-input.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,39 +0,0 @@
1
- import { p as proxyCustomElement, H, h } from './p-DOtgsZRB.js';
2
-
3
- const afBadgeCss = ":host{display:inline-block}span{display:inline-flex;align-items:center;justify-content:center;padding:2px var(--af-space-2);border-radius:var(--af-radius-pill);font:var(--af-font-weight-semibold) var(--af-size-font-sm) / 1 var(--af-font-family-sans);letter-spacing:0.02em;text-transform:uppercase}span.tone-brand{background:rgba(124, 58, 237, 0.12);color:var(--af-color-brand-primary-500)}span.tone-neutral{background:rgba(18, 15, 31, 0.1);color:var(--af-color-fg-default)}span.tone-success{background:rgba(16, 185, 129, 0.12);color:#0f766e}";
4
-
5
- const AfBadge = /*@__PURE__*/ proxyCustomElement(class AfBadge extends H {
6
- constructor(registerHost) {
7
- super();
8
- if (registerHost !== false) {
9
- this.__registerHost();
10
- }
11
- this.__attachShadow();
12
- /** Color theme of the badge */
13
- this.tone = 'brand';
14
- }
15
- render() {
16
- return (h("span", { key: '1f9d4015b429e012eade75e331c991d5c785482d', class: `tone-${this.tone}`, part: "base" }, h("slot", { key: 'b69b37a3e996c43cb16d04d829232d9539f45e06' })));
17
- }
18
- static get style() { return afBadgeCss; }
19
- }, [257, "af-badge", {
20
- "tone": [1]
21
- }]);
22
- function defineCustomElement() {
23
- if (typeof customElements === "undefined") {
24
- return;
25
- }
26
- const components = ["af-badge"];
27
- components.forEach(tagName => { switch (tagName) {
28
- case "af-badge":
29
- if (!customElements.get(tagName)) {
30
- customElements.define(tagName, AfBadge);
31
- }
32
- break;
33
- } });
34
- }
35
-
36
- export { AfBadge as A, defineCustomElement as d };
37
- //# sourceMappingURL=p-B7I93sz2.js.map
38
-
39
- //# sourceMappingURL=p-B7I93sz2.js.map
@@ -1 +0,0 @@
1
- {"file":"p-B7I93sz2.js","mappings":";;AAAA,MAAM,UAAU,GAAG,+hBAA+hB;;MCOriB,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAOU,QAAA,IAAI,CAAA,IAAA,GAAoC,OAAO;AASxD;IAPC,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,CAAQ,KAAA,EAAA,IAAI,CAAC,IAAI,CAAA,CAAE,EAAE,IAAI,EAAC,MAAM,EAAA,EAC3C,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACH;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/af-badge/af-badge.css?tag=af-badge&encapsulation=shadow","src/components/af-badge/af-badge.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\nspan {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px var(--af-space-2);\n border-radius: var(--af-radius-pill);\n font: var(--af-font-weight-semibold) var(--af-size-font-sm) / 1 var(--af-font-family-sans);\n letter-spacing: 0.02em;\n text-transform: uppercase;\n}\n\nspan.tone-brand {\n background: rgba(124, 58, 237, 0.12);\n color: var(--af-color-brand-primary-500);\n}\n\nspan.tone-neutral {\n background: rgba(18, 15, 31, 0.1);\n color: var(--af-color-fg-default);\n}\n\nspan.tone-success {\n background: rgba(16, 185, 129, 0.12);\n color: #0f766e;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'af-badge',\n styleUrl: 'af-badge.css',\n shadow: true\n})\nexport class AfBadge {\n /** Color theme of the badge */\n @Prop() tone: 'brand' | 'neutral' | 'success' = 'brand';\n\n render() {\n return (\n <span class={`tone-${this.tone}`} part=\"base\">\n <slot />\n </span>\n );\n }\n}\n"],"version":3}
@@ -1,62 +0,0 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-DOtgsZRB.js';
2
-
3
- const afInputCss = ":host{display:block;font-family:var(--af-font-family-sans)}label{display:grid;gap:var(--af-space-2);color:var(--af-color-fg-default)}.label{font-size:0.95rem;font-weight:var(--af-font-weight-semibold)}.control{position:relative}input{width:100%;padding:calc(var(--af-space-2) + 2px) calc(var(--af-space-4) + 8px);border-radius:var(--af-radius-md);border:1px solid rgba(18, 15, 31, 0.18);background:rgba(255, 255, 255, 0.9);color:inherit;font:inherit;transition:border-color 160ms ease, box-shadow 160ms ease;box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.6)}input::placeholder{color:var(--af-color-fg-muted);opacity:0.8}input:focus-visible{outline:none;border-color:var(--af-color-brand-primary-500);box-shadow:0 0 0 4px rgba(124, 58, 237, 0.18)}label.disabled{opacity:0.55;cursor:not-allowed}input:disabled{background:rgba(241, 240, 247, 0.7);cursor:not-allowed}.description{font-size:0.825rem;color:var(--af-color-fg-muted)}";
4
-
5
- let inputIds = 0;
6
- const AfInput = /*@__PURE__*/ proxyCustomElement(class AfInput extends H {
7
- constructor(registerHost) {
8
- super();
9
- if (registerHost !== false) {
10
- this.__registerHost();
11
- }
12
- this.__attachShadow();
13
- this.afInput = createEvent(this, "afInput");
14
- this.afChange = createEvent(this, "afChange");
15
- this.inputId = `af-input-${++inputIds}`;
16
- this.descriptionId = `${this.inputId}-desc`;
17
- /** Input type attribute */
18
- this.type = 'text';
19
- /** Current value (mutable so the component stays in sync) */
20
- this.value = '';
21
- /** Disabled state */
22
- this.disabled = false;
23
- this.handleInput = (event) => {
24
- const target = event.target;
25
- this.value = target.value;
26
- this.afInput.emit(this.value);
27
- };
28
- this.handleChange = () => {
29
- this.afChange.emit(this.value);
30
- };
31
- }
32
- render() {
33
- const describedBy = this.description ? this.descriptionId : undefined;
34
- return (h("label", { key: 'd14267dee125c07311c07bc31f0151448095dba6', part: "label", class: { disabled: this.disabled }, htmlFor: this.inputId }, this.label ? (h("span", { class: "label", part: "label-text" }, this.label)) : null, h("div", { key: 'd3b6428100e25c981650f5faa23df549d587ac10', class: "control" }, h("input", { key: '9e26981c32775b79ce9c3458a4890968fab04ef6', part: "field", id: this.inputId, type: this.type, placeholder: this.placeholder, value: this.value, disabled: this.disabled, "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleChange })), this.description ? (h("p", { id: this.descriptionId, class: "description", part: "description" }, this.description)) : null));
35
- }
36
- static get style() { return afInputCss; }
37
- }, [257, "af-input", {
38
- "label": [1],
39
- "description": [1],
40
- "type": [1],
41
- "placeholder": [1],
42
- "value": [1025],
43
- "disabled": [516]
44
- }]);
45
- function defineCustomElement() {
46
- if (typeof customElements === "undefined") {
47
- return;
48
- }
49
- const components = ["af-input"];
50
- components.forEach(tagName => { switch (tagName) {
51
- case "af-input":
52
- if (!customElements.get(tagName)) {
53
- customElements.define(tagName, AfInput);
54
- }
55
- break;
56
- } });
57
- }
58
-
59
- export { AfInput as A, defineCustomElement as d };
60
- //# sourceMappingURL=p-CZd1ieht.js.map
61
-
62
- //# sourceMappingURL=p-CZd1ieht.js.map
@@ -1 +0,0 @@
1
- {"file":"p-CZd1ieht.js","mappings":";;AAAA,MAAM,UAAU,GAAG,g6BAAg6B;;ACEn7B,IAAI,QAAQ,GAAG,CAAC;MAOH,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAMU,QAAA,IAAA,CAAA,OAAO,GAAG,YAAY,EAAE,QAAQ,EAAE;QAClC,IAAA,CAAA,aAAa,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,OAAO;;AAStC,QAAA,IAAI,CAAA,IAAA,GAA6C,MAAM;;AAMtC,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE;;AAGV,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAQjC,QAAA,IAAA,CAAA,WAAW,GAAG,CAAC,KAAY,KAAI;AACrC,YAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAA0B;AAC/C,YAAA,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;YACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;AAC/B,SAAC;AAEO,QAAA,IAAY,CAAA,YAAA,GAAG,MAAK;YAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;AAChC,SAAC;AAiCF;IA/BC,MAAM,GAAA;AACJ,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,GAAG,SAAS;AAErE,QAAA,QACE,8DAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAA,EAC1E,IAAI,CAAC,KAAK,IACT,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY,EAClC,EAAA,IAAI,CAAC,KAAK,CACN,IACL,IAAI,EACR,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CACE,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EACZ,EAAE,EAAE,IAAI,CAAC,OAAO,EAChB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACL,kBAAA,EAAA,WAAW,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAA,CAC3B,CACE,EACL,IAAI,CAAC,WAAW,IACf,CAAA,CAAA,GAAA,EAAA,EAAG,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,EAC9D,EAAA,IAAI,CAAC,WAAW,CACf,IACF,IAAI,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/af-input/af-input.css?tag=af-input&encapsulation=shadow","src/components/af-input/af-input.tsx"],"sourcesContent":[":host {\n display: block;\n font-family: var(--af-font-family-sans);\n}\n\nlabel {\n display: grid;\n gap: var(--af-space-2);\n color: var(--af-color-fg-default);\n}\n\n.label {\n font-size: 0.95rem;\n font-weight: var(--af-font-weight-semibold);\n}\n\n.control {\n position: relative;\n}\n\ninput {\n width: 100%;\n padding: calc(var(--af-space-2) + 2px) calc(var(--af-space-4) + 8px);\n border-radius: var(--af-radius-md);\n border: 1px solid rgba(18, 15, 31, 0.18);\n background: rgba(255, 255, 255, 0.9);\n color: inherit;\n font: inherit;\n transition: border-color 160ms ease, box-shadow 160ms ease;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);\n}\n\ninput::placeholder {\n color: var(--af-color-fg-muted);\n opacity: 0.8;\n}\n\ninput:focus-visible {\n outline: none;\n border-color: var(--af-color-brand-primary-500);\n box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);\n}\n\nlabel.disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\ninput:disabled {\n background: rgba(241, 240, 247, 0.7);\n cursor: not-allowed;\n}\n\n.description {\n font-size: 0.825rem;\n color: var(--af-color-fg-muted);\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'af-input',\n styleUrl: 'af-input.css',\n shadow: true\n})\nexport class AfInput {\n private inputId = `af-input-${++inputIds}`;\n private descriptionId = `${this.inputId}-desc`;\n\n /** Optional label text */\n @Prop() label?: string;\n\n /** Assistive description shown below the field */\n @Prop() description?: string;\n\n /** Input type attribute */\n @Prop() type: 'text' | 'email' | 'password' | 'search' = 'text';\n\n /** Placeholder text */\n @Prop() placeholder?: string;\n\n /** Current value (mutable so the component stays in sync) */\n @Prop({ mutable: true }) value = '';\n\n /** Disabled state */\n @Prop({ reflect: true }) disabled = false;\n\n /** Fired as the user types */\n @Event() afInput!: EventEmitter<string>;\n\n /** Fired when the field loses focus after a change */\n @Event() afChange!: EventEmitter<string>;\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.value = target.value;\n this.afInput.emit(this.value);\n };\n\n private handleChange = () => {\n this.afChange.emit(this.value);\n };\n\n render() {\n const describedBy = this.description ? this.descriptionId : undefined;\n\n return (\n <label part=\"label\" class={{ disabled: this.disabled }} htmlFor={this.inputId}>\n {this.label ? (\n <span class=\"label\" part=\"label-text\">\n {this.label}\n </span>\n ) : null}\n <div class=\"control\">\n <input\n part=\"field\"\n id={this.inputId}\n type={this.type}\n placeholder={this.placeholder}\n value={this.value}\n disabled={this.disabled}\n aria-describedby={describedBy}\n onInput={this.handleInput}\n onChange={this.handleChange}\n />\n </div>\n {this.description ? (\n <p id={this.descriptionId} class=\"description\" part=\"description\">\n {this.description}\n </p>\n ) : null}\n </label>\n );\n }\n}\n"],"version":3}