@scouterna/ui-webc 1.0.0 → 2.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.
Files changed (214) hide show
  1. package/dist/cjs/{index-D42maJcS.js → index-5z4HClQY.js} +7 -8
  2. package/dist/cjs/index-5z4HClQY.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/scout-bottom-bar-item.cjs.entry.js +8 -2
  5. package/dist/cjs/scout-bottom-bar-item.entry.cjs.js.map +1 -1
  6. package/dist/cjs/scout-bottom-bar.cjs.entry.js +2 -2
  7. package/dist/cjs/scout-button.cjs.entry.js +18 -3
  8. package/dist/cjs/scout-button.entry.cjs.js.map +1 -1
  9. package/dist/cjs/scout-card.cjs.entry.js +2 -2
  10. package/dist/cjs/scout-checkbox.cjs.entry.js +53 -0
  11. package/dist/cjs/scout-checkbox.entry.cjs.js.map +1 -0
  12. package/dist/cjs/scout-divider.cjs.entry.js +19 -0
  13. package/dist/cjs/scout-divider.entry.cjs.js.map +1 -0
  14. package/dist/cjs/scout-field.cjs.entry.js +2 -2
  15. package/dist/cjs/scout-input.cjs.entry.js +1 -1
  16. package/dist/cjs/scout-link.cjs.entry.js +64 -0
  17. package/dist/cjs/scout-link.entry.cjs.js.map +1 -0
  18. package/dist/cjs/scout-list-view-item.cjs.entry.js +64 -0
  19. package/dist/cjs/scout-list-view-item.entry.cjs.js.map +1 -0
  20. package/dist/cjs/scout-list-view.cjs.entry.js +21 -0
  21. package/dist/cjs/scout-list-view.entry.cjs.js.map +1 -0
  22. package/dist/cjs/scout-loader.cjs.entry.js +73 -0
  23. package/dist/cjs/scout-loader.entry.cjs.js.map +1 -0
  24. package/dist/cjs/scout-select.cjs.entry.js +60 -0
  25. package/dist/cjs/scout-select.entry.cjs.js.map +1 -0
  26. package/dist/cjs/scout-stack.cjs.entry.js +39 -0
  27. package/dist/cjs/scout-stack.entry.cjs.js.map +1 -0
  28. package/dist/cjs/scout-switch.cjs.entry.js +49 -0
  29. package/dist/cjs/scout-switch.entry.cjs.js.map +1 -0
  30. package/dist/cjs/ui-webc.cjs.js +3 -3
  31. package/dist/cjs/ui-webc.cjs.js.map +1 -1
  32. package/dist/collection/collection-manifest.json +11 -2
  33. package/dist/collection/components/bottom-bar/bottom-bar.js +1 -1
  34. package/dist/collection/components/bottom-bar-item/bottom-bar-item.js +46 -2
  35. package/dist/collection/components/bottom-bar-item/bottom-bar-item.js.map +1 -1
  36. package/dist/collection/components/button/button.css +19 -17
  37. package/dist/collection/components/button/button.js +76 -4
  38. package/dist/collection/components/button/button.js.map +1 -1
  39. package/dist/collection/components/card/card.js +1 -1
  40. package/dist/collection/components/checkbox/checkbox.css +81 -0
  41. package/dist/collection/components/checkbox/checkbox.js +176 -0
  42. package/dist/collection/components/checkbox/checkbox.js.map +1 -0
  43. package/dist/collection/components/divider/divider.css +5 -0
  44. package/dist/collection/components/divider/divider.js +20 -0
  45. package/dist/collection/components/divider/divider.js.map +1 -0
  46. package/dist/collection/components/field/field.js +1 -1
  47. package/dist/collection/components/input/input.js +2 -2
  48. package/dist/collection/components/link/link.css +30 -0
  49. package/dist/collection/components/link/link.js +207 -0
  50. package/dist/collection/components/link/link.js.map +1 -0
  51. package/dist/collection/components/list-view/list-view.css +5 -0
  52. package/dist/collection/components/list-view/list-view.js +22 -0
  53. package/dist/collection/components/list-view/list-view.js.map +1 -0
  54. package/dist/collection/components/list-view-item/list-view-item.css +72 -0
  55. package/dist/collection/components/list-view-item/list-view-item.js +226 -0
  56. package/dist/collection/components/list-view-item/list-view-item.js.map +1 -0
  57. package/dist/collection/components/loader/loader.css +121 -0
  58. package/dist/collection/components/loader/loader.js +111 -0
  59. package/dist/collection/components/loader/loader.js.map +1 -0
  60. package/dist/collection/components/loader/symbols/adventurer.svg +22 -0
  61. package/dist/collection/components/loader/symbols/challenger.svg +22 -0
  62. package/dist/collection/components/loader/symbols/discoverer.svg +22 -0
  63. package/dist/collection/components/loader/symbols/family-scout.svg +22 -0
  64. package/dist/collection/components/loader/symbols/rover.svg +22 -0
  65. package/dist/collection/components/loader/symbols/tracker.svg +22 -0
  66. package/dist/collection/components/select/select.css +60 -0
  67. package/dist/collection/components/select/select.js +176 -0
  68. package/dist/collection/components/select/select.js.map +1 -0
  69. package/dist/collection/components/stack/stack.css +6 -0
  70. package/dist/collection/components/stack/stack.js +96 -0
  71. package/dist/collection/components/stack/stack.js.map +1 -0
  72. package/dist/collection/components/switch/switch.css +79 -0
  73. package/dist/collection/components/switch/switch.js +173 -0
  74. package/dist/collection/components/switch/switch.js.map +1 -0
  75. package/dist/components/index.js +1 -1
  76. package/dist/components/{p-MfRr-Vl1.js → p-S6Ssep7K.js} +7 -9
  77. package/dist/components/p-S6Ssep7K.js.map +1 -0
  78. package/dist/components/scout-bottom-bar-item.js +11 -3
  79. package/dist/components/scout-bottom-bar-item.js.map +1 -1
  80. package/dist/components/scout-bottom-bar.js +2 -2
  81. package/dist/components/scout-button.js +22 -4
  82. package/dist/components/scout-button.js.map +1 -1
  83. package/dist/components/scout-card.js +2 -2
  84. package/dist/components/scout-checkbox.d.ts +11 -0
  85. package/dist/components/scout-checkbox.js +78 -0
  86. package/dist/components/scout-checkbox.js.map +1 -0
  87. package/dist/components/scout-divider.d.ts +11 -0
  88. package/dist/components/scout-divider.js +39 -0
  89. package/dist/components/scout-divider.js.map +1 -0
  90. package/dist/components/scout-field.js +3 -3
  91. package/dist/components/scout-input.js +2 -2
  92. package/dist/components/scout-link.d.ts +11 -0
  93. package/dist/components/scout-link.js +91 -0
  94. package/dist/components/scout-link.js.map +1 -0
  95. package/dist/components/scout-list-view-item.d.ts +11 -0
  96. package/dist/components/scout-list-view-item.js +92 -0
  97. package/dist/components/scout-list-view-item.js.map +1 -0
  98. package/dist/components/scout-list-view.d.ts +11 -0
  99. package/dist/components/scout-list-view.js +41 -0
  100. package/dist/components/scout-list-view.js.map +1 -0
  101. package/dist/components/scout-loader.d.ts +11 -0
  102. package/dist/components/scout-loader.js +96 -0
  103. package/dist/components/scout-loader.js.map +1 -0
  104. package/dist/components/scout-select.d.ts +11 -0
  105. package/dist/components/scout-select.js +84 -0
  106. package/dist/components/scout-select.js.map +1 -0
  107. package/dist/components/scout-stack.d.ts +11 -0
  108. package/dist/components/scout-stack.js +62 -0
  109. package/dist/components/scout-stack.js.map +1 -0
  110. package/dist/components/scout-switch.d.ts +11 -0
  111. package/dist/components/scout-switch.js +75 -0
  112. package/dist/components/scout-switch.js.map +1 -0
  113. package/dist/custom-elements.json +1399 -133
  114. package/dist/esm/{index-DByXnE9g.js → index-BI7oh__S.js} +7 -9
  115. package/dist/esm/index-BI7oh__S.js.map +1 -0
  116. package/dist/esm/loader.js +3 -3
  117. package/dist/esm/scout-bottom-bar-item.entry.js +8 -2
  118. package/dist/esm/scout-bottom-bar-item.entry.js.map +1 -1
  119. package/dist/esm/scout-bottom-bar.entry.js +2 -2
  120. package/dist/esm/scout-button.entry.js +18 -3
  121. package/dist/esm/scout-button.entry.js.map +1 -1
  122. package/dist/esm/scout-card.entry.js +2 -2
  123. package/dist/esm/scout-checkbox.entry.js +51 -0
  124. package/dist/esm/scout-checkbox.entry.js.map +1 -0
  125. package/dist/esm/scout-divider.entry.js +17 -0
  126. package/dist/esm/scout-divider.entry.js.map +1 -0
  127. package/dist/esm/scout-field.entry.js +2 -2
  128. package/dist/esm/scout-input.entry.js +1 -1
  129. package/dist/esm/scout-link.entry.js +62 -0
  130. package/dist/esm/scout-link.entry.js.map +1 -0
  131. package/dist/esm/scout-list-view-item.entry.js +62 -0
  132. package/dist/esm/scout-list-view-item.entry.js.map +1 -0
  133. package/dist/esm/scout-list-view.entry.js +19 -0
  134. package/dist/esm/scout-list-view.entry.js.map +1 -0
  135. package/dist/esm/scout-loader.entry.js +71 -0
  136. package/dist/esm/scout-loader.entry.js.map +1 -0
  137. package/dist/esm/scout-select.entry.js +58 -0
  138. package/dist/esm/scout-select.entry.js.map +1 -0
  139. package/dist/esm/scout-stack.entry.js +37 -0
  140. package/dist/esm/scout-stack.entry.js.map +1 -0
  141. package/dist/esm/scout-switch.entry.js +47 -0
  142. package/dist/esm/scout-switch.entry.js.map +1 -0
  143. package/dist/esm/ui-webc.js +4 -4
  144. package/dist/esm/ui-webc.js.map +1 -1
  145. package/dist/types/components/bottom-bar-item/bottom-bar-item.d.ts +2 -0
  146. package/dist/types/components/button/button.d.ts +4 -1
  147. package/dist/types/components/checkbox/checkbox.d.ts +22 -0
  148. package/dist/types/components/divider/divider.d.ts +3 -0
  149. package/dist/types/components/link/link.d.ts +39 -0
  150. package/dist/types/components/list-view/list-view.d.ts +3 -0
  151. package/dist/types/components/list-view-item/list-view-item.d.ts +16 -0
  152. package/dist/types/components/loader/loader.d.ts +15 -0
  153. package/dist/types/components/select/select.d.ts +31 -0
  154. package/dist/types/components/stack/stack.d.ts +22 -0
  155. package/dist/types/components/switch/switch.d.ts +25 -0
  156. package/dist/types/components.d.ts +429 -2
  157. package/dist/types/stencil-public-runtime.d.ts +20 -11
  158. package/dist/ui-webc/p-15634492.entry.js +2 -0
  159. package/dist/ui-webc/p-15634492.entry.js.map +1 -0
  160. package/dist/ui-webc/{p-383736c1.entry.js → p-316eed06.entry.js} +2 -2
  161. package/dist/ui-webc/p-4064b941.entry.js +2 -0
  162. package/dist/ui-webc/p-4064b941.entry.js.map +1 -0
  163. package/dist/ui-webc/p-5e2c0abc.entry.js +2 -0
  164. package/dist/ui-webc/p-5e2c0abc.entry.js.map +1 -0
  165. package/dist/ui-webc/{p-9b7c270d.entry.js → p-662554f2.entry.js} +2 -2
  166. package/dist/ui-webc/p-72e5904f.entry.js +2 -0
  167. package/dist/ui-webc/p-72e5904f.entry.js.map +1 -0
  168. package/dist/ui-webc/p-939fb179.entry.js +2 -0
  169. package/dist/ui-webc/p-939fb179.entry.js.map +1 -0
  170. package/dist/ui-webc/p-93c5edd1.entry.js +2 -0
  171. package/dist/ui-webc/p-93c5edd1.entry.js.map +1 -0
  172. package/dist/ui-webc/p-9c2bb8d7.entry.js +2 -0
  173. package/dist/ui-webc/p-9c2bb8d7.entry.js.map +1 -0
  174. package/dist/ui-webc/p-BI7oh__S.js +3 -0
  175. package/dist/ui-webc/p-BI7oh__S.js.map +1 -0
  176. package/dist/ui-webc/{p-fb926c68.entry.js → p-b24cd5e8.entry.js} +2 -2
  177. package/dist/ui-webc/p-b7e542b2.entry.js +2 -0
  178. package/dist/ui-webc/p-b7e542b2.entry.js.map +1 -0
  179. package/dist/ui-webc/p-d0b4b8c4.entry.js +2 -0
  180. package/dist/ui-webc/p-df4ec2af.entry.js +2 -0
  181. package/dist/ui-webc/p-df4ec2af.entry.js.map +1 -0
  182. package/dist/ui-webc/p-eb235f73.entry.js +2 -0
  183. package/dist/ui-webc/p-eb235f73.entry.js.map +1 -0
  184. package/dist/ui-webc/p-f164c4f7.entry.js +2 -0
  185. package/dist/ui-webc/p-f164c4f7.entry.js.map +1 -0
  186. package/dist/ui-webc/scout-bottom-bar-item.entry.esm.js.map +1 -1
  187. package/dist/ui-webc/scout-button.entry.esm.js.map +1 -1
  188. package/dist/ui-webc/scout-checkbox.entry.esm.js.map +1 -0
  189. package/dist/ui-webc/scout-divider.entry.esm.js.map +1 -0
  190. package/dist/ui-webc/scout-link.entry.esm.js.map +1 -0
  191. package/dist/ui-webc/scout-list-view-item.entry.esm.js.map +1 -0
  192. package/dist/ui-webc/scout-list-view.entry.esm.js.map +1 -0
  193. package/dist/ui-webc/scout-loader.entry.esm.js.map +1 -0
  194. package/dist/ui-webc/scout-select.entry.esm.js.map +1 -0
  195. package/dist/ui-webc/scout-stack.entry.esm.js.map +1 -0
  196. package/dist/ui-webc/scout-switch.entry.esm.js.map +1 -0
  197. package/dist/ui-webc/ui-webc.css +2 -2
  198. package/dist/ui-webc/ui-webc.esm.js +1 -1
  199. package/dist/ui-webc/ui-webc.esm.js.map +1 -1
  200. package/package.json +10 -9
  201. package/dist/cjs/index-D42maJcS.js.map +0 -1
  202. package/dist/components/p-MfRr-Vl1.js.map +0 -1
  203. package/dist/esm/index-DByXnE9g.js.map +0 -1
  204. package/dist/ui-webc/p-99329c64.entry.js +0 -2
  205. package/dist/ui-webc/p-99329c64.entry.js.map +0 -1
  206. package/dist/ui-webc/p-DByXnE9g.js +0 -3
  207. package/dist/ui-webc/p-DByXnE9g.js.map +0 -1
  208. package/dist/ui-webc/p-c0c3a4af.entry.js +0 -2
  209. package/dist/ui-webc/p-e7602729.entry.js +0 -2
  210. package/dist/ui-webc/p-e7602729.entry.js.map +0 -1
  211. /package/dist/ui-webc/{p-383736c1.entry.js.map → p-316eed06.entry.js.map} +0 -0
  212. /package/dist/ui-webc/{p-9b7c270d.entry.js.map → p-662554f2.entry.js.map} +0 -0
  213. /package/dist/ui-webc/{p-fb926c68.entry.js.map → p-b24cd5e8.entry.js.map} +0 -0
  214. /package/dist/ui-webc/{p-c0c3a4af.entry.js.map → p-d0b4b8c4.entry.js.map} +0 -0
@@ -14,6 +14,8 @@ export class ScoutBottomBarItem {
14
14
  * `type` is set to "link".
15
15
  */
16
16
  href;
17
+ target;
18
+ rel;
17
19
  /**
18
20
  * An icon to display above the label. Must be an SVG string.
19
21
  */
@@ -33,9 +35,13 @@ export class ScoutBottomBarItem {
33
35
  const props = this.type === "link"
34
36
  ? {
35
37
  href: this.href,
38
+ target: this.target,
39
+ // This might not be our job, but better safe than sorry.
40
+ rel: this.rel ??
41
+ (this.target === "_blank" ? "noopener noreferrer" : undefined),
36
42
  }
37
43
  : {};
38
- return (h(Tag, { key: 'da439bd71733883dd610eb24b9ffffb9bb2369e1', class: clsx("button", this.active && "active"), onClick: () => this.scoutClick.emit(), ...props }, h("span", { key: 'e3267d4487d643265984555155760cbdb242ef81', class: "icon", innerHTML: this.icon }), h("span", { key: '02ade513642f237b24ef25856bf4b56e386b7b2a', class: "label" }, this.label)));
44
+ return (h(Tag, { key: 'd6accb2a7bb0af55f33dba3299749b7ec5ba68a4', class: clsx("button", this.active && "active"), onClick: () => this.scoutClick.emit(), ...props }, h("span", { key: '419edd0be8ff7a4f91aeb1641afffb9d949efba2', class: "icon", innerHTML: this.icon }), h("span", { key: 'e1e40f9a192ffe8a0152a1d0333fbedf174e7bea', class: "label" }, this.label)));
39
45
  }
40
46
  static get is() { return "scout-bottom-bar-item"; }
41
47
  static get encapsulation() { return "shadow"; }
@@ -61,7 +67,7 @@ export class ScoutBottomBarItem {
61
67
  "references": {
62
68
  "ItemType": {
63
69
  "location": "local",
64
- "path": "/home/runner/work/j26-web-components/j26-web-components/packages/ui-webc/src/components/bottom-bar-item/bottom-bar-item.tsx",
70
+ "path": "/home/runner/work/j26-components/j26-components/packages/ui-webc/src/components/bottom-bar-item/bottom-bar-item.tsx",
65
71
  "id": "src/components/bottom-bar-item/bottom-bar-item.tsx::ItemType"
66
72
  }
67
73
  }
@@ -97,6 +103,44 @@ export class ScoutBottomBarItem {
97
103
  "reflect": false,
98
104
  "attribute": "href"
99
105
  },
106
+ "target": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "string",
111
+ "resolved": "string",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": true,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": ""
119
+ },
120
+ "getter": false,
121
+ "setter": false,
122
+ "reflect": false,
123
+ "attribute": "target"
124
+ },
125
+ "rel": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "string",
130
+ "resolved": "string",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": true,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": ""
138
+ },
139
+ "getter": false,
140
+ "setter": false,
141
+ "reflect": false,
142
+ "attribute": "rel"
143
+ },
100
144
  "icon": {
101
145
  "type": "string",
102
146
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-bar-item.js","sourceRoot":"","sources":["../../../src/components/bottom-bar-item/bottom-bar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB;;;GAGG;AAQH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACK,IAAI,GAAa,QAAQ,CAAC;IAElC;;;OAGG;IACK,IAAI,CAAU;IAEtB;;OAEG;IACK,IAAI,CAAU;IAEtB;;OAEG;IACK,KAAK,CAAU;IAEvB;;;OAGG;IACK,MAAM,CAAW;IAEhB,UAAU,CAAqB;IAExC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;QAElD,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,MAAM;YAClB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;YACH,CAAC,CAAC,EAAE,CAAC;QAET,OAAO,CACL,EAAC,GAAG,qDACF,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KACjC,KAAK;YAET,6DAAM,KAAK,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,IAAI,GAAI;YAC3C,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, type EventEmitter, h, Prop } from \"@stencil/core\";\nimport clsx from \"clsx\";\n\nexport type ItemType = \"button\" | \"link\";\n\n/**\n * A bottom bar item used within the bottom bar for navigation. Should not be\n * used outside of a bottom bar.\n */\n@Component({\n tag: \"scout-bottom-bar-item\",\n styleUrl: \"bottom-bar-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ScoutBottomBarItem {\n /**\n * The type of the bottom bar item, either a button or a link.\n */\n @Prop() type: ItemType = \"button\";\n\n /**\n * An optional link to navigate to when the item is clicked. Only used when\n * `type` is set to \"link\".\n */\n @Prop() href?: string;\n\n /**\n * An icon to display above the label. Must be an SVG string.\n */\n @Prop() icon!: string;\n\n /**\n * The label to display below the icon.\n */\n @Prop() label!: string;\n\n /**\n * Whether the item is currently active. Should be set to true when the item\n * represents the current page.\n */\n @Prop() active?: boolean;\n\n @Event() scoutClick: EventEmitter<void>;\n\n render() {\n const Tag = this.type === \"link\" ? \"a\" : \"button\";\n\n const props =\n this.type === \"link\"\n ? {\n href: this.href,\n }\n : {};\n\n return (\n <Tag\n class={clsx(\"button\", this.active && \"active\")}\n onClick={() => this.scoutClick.emit()}\n {...props}\n >\n <span class=\"icon\" innerHTML={this.icon} />\n <span class=\"label\">{this.label}</span>\n </Tag>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bottom-bar-item.js","sourceRoot":"","sources":["../../../src/components/bottom-bar-item/bottom-bar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB;;;GAGG;AAQH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACK,IAAI,GAAa,QAAQ,CAAC;IAElC;;;OAGG;IACK,IAAI,CAAU;IACd,MAAM,CAAU;IAChB,GAAG,CAAU;IAErB;;OAEG;IACK,IAAI,CAAU;IAEtB;;OAEG;IACK,KAAK,CAAU;IAEvB;;;OAGG;IACK,MAAM,CAAW;IAEhB,UAAU,CAAqB;IAExC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;QAElD,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,MAAM;YAClB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,yDAAyD;gBACzD,GAAG,EACD,IAAI,CAAC,GAAG;oBACR,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;aACjE;YACH,CAAC,CAAC,EAAE,CAAC;QAET,OAAO,CACL,EAAC,GAAG,qDACF,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KACjC,KAAK;YAET,6DAAM,KAAK,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,IAAI,GAAI;YAC3C,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, type EventEmitter, h, Prop } from \"@stencil/core\";\nimport clsx from \"clsx\";\n\nexport type ItemType = \"button\" | \"link\";\n\n/**\n * A bottom bar item used within the bottom bar for navigation. Should not be\n * used outside of a bottom bar.\n */\n@Component({\n tag: \"scout-bottom-bar-item\",\n styleUrl: \"bottom-bar-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ScoutBottomBarItem {\n /**\n * The type of the bottom bar item, either a button or a link.\n */\n @Prop() type: ItemType = \"button\";\n\n /**\n * An optional link to navigate to when the item is clicked. Only used when\n * `type` is set to \"link\".\n */\n @Prop() href?: string;\n @Prop() target?: string;\n @Prop() rel?: string;\n\n /**\n * An icon to display above the label. Must be an SVG string.\n */\n @Prop() icon!: string;\n\n /**\n * The label to display below the icon.\n */\n @Prop() label!: string;\n\n /**\n * Whether the item is currently active. Should be set to true when the item\n * represents the current page.\n */\n @Prop() active?: boolean;\n\n @Event() scoutClick: EventEmitter<void>;\n\n render() {\n const Tag = this.type === \"link\" ? \"a\" : \"button\";\n\n const props =\n this.type === \"link\"\n ? {\n href: this.href,\n target: this.target,\n // This might not be our job, but better safe than sorry.\n rel:\n this.rel ??\n (this.target === \"_blank\" ? \"noopener noreferrer\" : undefined),\n }\n : {};\n\n return (\n <Tag\n class={clsx(\"button\", this.active && \"active\")}\n onClick={() => this.scoutClick.emit()}\n {...props}\n >\n <span class=\"icon\" innerHTML={this.icon} />\n <span class=\"label\">{this.label}</span>\n </Tag>\n );\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  display: inline-flex;
3
3
  }
4
4
 
5
- button {
5
+ .button {
6
6
  display: inline-flex;
7
7
  align-items: center;
8
8
  justify-content: center;
@@ -13,6 +13,8 @@ button {
13
13
  border-radius: var(--spacing-2);
14
14
  border: 1px solid transparent;
15
15
  cursor: pointer;
16
+ -webkit-text-decoration: none;
17
+ text-decoration: none;
16
18
  }
17
19
 
18
20
  .icon {
@@ -26,69 +28,69 @@ button {
26
28
  height: 100%;
27
29
  }
28
30
 
29
- button.primary {
31
+ .button.primary {
30
32
  background-color: var(--color-background-brand-base);
31
33
  color: var(--color-text-brand-inverse);
32
34
  }
33
35
 
34
- button.primary:hover {
36
+ .button.primary:hover {
35
37
  background-color: var(--color-background-brand-hovered);
36
38
  }
37
39
 
38
- button.primary:active {
40
+ .button.primary:active {
39
41
  background-color: var(--color-background-brand-pressed);
40
42
  }
41
43
 
42
- button.outlined {
44
+ .button.outlined {
43
45
  background-color: transparent;
44
46
  border-color: var(--color-background-brand-subtle-base);
45
47
  color: var(--color-text-brand-base);
46
48
  }
47
49
 
48
- button.outlined:hover {
50
+ .button.outlined:hover {
49
51
  background-color: var(--color-background-brand-subtle-hovered);
50
52
  }
51
53
 
52
- button.outlined:active {
54
+ .button.outlined:active {
53
55
  background-color: var(--color-background-brand-subtle-pressed);
54
56
  }
55
57
 
56
- button.text {
58
+ .button.text {
57
59
  background-color: transparent;
58
60
  border-color: transparent;
59
61
  color: var(--color-text-brand-base);
60
62
  }
61
63
 
62
- button.text:hover {
64
+ .button.text:hover {
63
65
  background-color: var(--color-background-brand-subtle-hovered);
64
66
  }
65
67
 
66
- button.text:active {
68
+ .button.text:active {
67
69
  background-color: var(--color-background-brand-subtle-pressed);
68
70
  }
69
71
 
70
- button.caution {
72
+ .button.caution {
71
73
  background-color: var(--color-background-caution-bold-base);
72
74
  color: var(--color-text-caution-bold-base);
73
75
  }
74
76
 
75
- button.caution:hover {
77
+ .button.caution:hover {
76
78
  background-color: var(--color-background-caution-bold-hovered);
77
79
  }
78
80
 
79
- button.caution:active {
81
+ .button.caution:active {
80
82
  background-color: var(--color-background-caution-bold-pressed);
81
83
  }
82
84
 
83
- button.danger {
85
+ .button.danger {
84
86
  background-color: var(--color-background-danger-bold-base);
85
87
  color: var(--color-text-danger-bold-base);
86
88
  }
87
89
 
88
- button.danger:hover {
90
+ .button.danger:hover {
89
91
  background-color: var(--color-background-danger-bold-hovered);
90
92
  }
91
93
 
92
- button.danger:active {
94
+ .button.danger:active {
93
95
  background-color: var(--color-background-danger-bold-pressed);
94
- }
96
+ }
@@ -4,6 +4,9 @@ import { h } from "@stencil/core";
4
4
  */
5
5
  export class ScoutButton {
6
6
  type = "button";
7
+ href;
8
+ target;
9
+ rel;
7
10
  /**
8
11
  * The variant primarily affects the color of the button.
9
12
  */
@@ -14,7 +17,19 @@ export class ScoutButton {
14
17
  icon;
15
18
  scoutClick;
16
19
  render() {
17
- return (h("button", { key: '7c5b9b8b4dbb40537b923585af17c81dc6ee1644', type: this.type, class: this.variant, onClick: () => this.scoutClick.emit() }, h("slot", { key: 'a89b795dbbd004cd8d9123bacf338cb87cca4953' }), this.icon && h("span", { key: '12ac9a0668ebd4d84fd02e5065f1c9802d188171', class: "icon", innerHTML: this.icon })));
20
+ const Tag = this.type === "link" ? "a" : "button";
21
+ const props = this.type === "link"
22
+ ? {
23
+ href: this.href,
24
+ target: this.target,
25
+ // This might not be our job, but better safe than sorry.
26
+ rel: this.rel ??
27
+ (this.target === "_blank" ? "noopener noreferrer" : undefined),
28
+ }
29
+ : {
30
+ type: this.type,
31
+ };
32
+ return (h(Tag, { key: 'fc7b2867c649782e166b7a363c5e3b43955a8011', class: `button ${this.variant}`, onClick: () => this.scoutClick.emit(), ...props }, h("slot", { key: '60d6e548ddf0da4bca40f1daea0fb656da8fb733' }), this.icon && h("span", { key: 'aef054b5de8cc20f5f26a9e2e82b76f43a9d3f32', class: "icon", innerHTML: this.icon })));
18
33
  }
19
34
  static get is() { return "scout-button"; }
20
35
  static get encapsulation() { return "shadow"; }
@@ -35,8 +50,8 @@ export class ScoutButton {
35
50
  "type": "string",
36
51
  "mutable": false,
37
52
  "complexType": {
38
- "original": "\"button\" | \"submit\" | \"reset\"",
39
- "resolved": "\"button\" | \"reset\" | \"submit\"",
53
+ "original": "\"button\" | \"submit\" | \"reset\" | \"link\"",
54
+ "resolved": "\"button\" | \"link\" | \"reset\" | \"submit\"",
40
55
  "references": {}
41
56
  },
42
57
  "required": false,
@@ -51,6 +66,63 @@ export class ScoutButton {
51
66
  "attribute": "type",
52
67
  "defaultValue": "\"button\""
53
68
  },
69
+ "href": {
70
+ "type": "string",
71
+ "mutable": false,
72
+ "complexType": {
73
+ "original": "string",
74
+ "resolved": "string",
75
+ "references": {}
76
+ },
77
+ "required": false,
78
+ "optional": true,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": ""
82
+ },
83
+ "getter": false,
84
+ "setter": false,
85
+ "reflect": false,
86
+ "attribute": "href"
87
+ },
88
+ "target": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": false,
97
+ "optional": true,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": ""
101
+ },
102
+ "getter": false,
103
+ "setter": false,
104
+ "reflect": false,
105
+ "attribute": "target"
106
+ },
107
+ "rel": {
108
+ "type": "string",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "string",
112
+ "resolved": "string",
113
+ "references": {}
114
+ },
115
+ "required": false,
116
+ "optional": true,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": ""
120
+ },
121
+ "getter": false,
122
+ "setter": false,
123
+ "reflect": false,
124
+ "attribute": "rel"
125
+ },
54
126
  "variant": {
55
127
  "type": "string",
56
128
  "mutable": false,
@@ -60,7 +132,7 @@ export class ScoutButton {
60
132
  "references": {
61
133
  "Variant": {
62
134
  "location": "local",
63
- "path": "/home/runner/work/j26-web-components/j26-web-components/packages/ui-webc/src/components/button/button.tsx",
135
+ "path": "/home/runner/work/j26-components/j26-components/packages/ui-webc/src/components/button/button.tsx",
64
136
  "id": "src/components/button/button.tsx::Variant"
65
137
  }
66
138
  }
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI7E;;GAEG;AAQH,MAAM,OAAO,WAAW;IACd,IAAI,GAAkC,QAAQ,CAAC;IAEvD;;OAEG;IACK,OAAO,GAAY,UAAU,CAAC;IAEtC;;OAEG;IACK,IAAI,CAAU;IAEb,UAAU,CAAqB;IAExC,MAAM;QACJ,OAAO,CACL,+DACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YAErC,8DAAQ;YACP,IAAI,CAAC,IAAI,IAAI,6DAAM,KAAK,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,IAAI,GAAI,CAClD,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, type EventEmitter, h, Prop } from \"@stencil/core\";\n\nexport type Variant = \"primary\" | \"outlined\" | \"text\" | \"caution\" | \"danger\";\n\n/**\n * A simple button component.\n */\n@Component({\n tag: \"scout-button\",\n styleUrl: \"button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ScoutButton {\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /**\n * The variant primarily affects the color of the button.\n */\n @Prop() variant: Variant = \"outlined\";\n\n /**\n * An optional icon to display alongside the button text. Must be an SVG string.\n */\n @Prop() icon?: string;\n\n @Event() scoutClick: EventEmitter<void>;\n\n render() {\n return (\n <button\n type={this.type}\n class={this.variant}\n onClick={() => this.scoutClick.emit()}\n >\n <slot />\n {this.icon && <span class=\"icon\" innerHTML={this.icon} />}\n </button>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI7E;;GAEG;AAQH,MAAM,OAAO,WAAW;IACd,IAAI,GAA2C,QAAQ,CAAC;IAExD,IAAI,CAAU;IACd,MAAM,CAAU;IAChB,GAAG,CAAU;IAErB;;OAEG;IACK,OAAO,GAAY,UAAU,CAAC;IAEtC;;OAEG;IACK,IAAI,CAAU;IAEb,UAAU,CAAqB;IAExC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;QAElD,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,MAAM;YAClB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,yDAAyD;gBACzD,GAAG,EACD,IAAI,CAAC,GAAG;oBACR,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;aACjE;YACH,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC;QAER,OAAO,CACL,EAAC,GAAG,qDACF,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,EAAE,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KACjC,KAAK;YAET,8DAAQ;YACP,IAAI,CAAC,IAAI,IAAI,6DAAM,KAAK,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,IAAI,GAAI,CACrD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, type EventEmitter, h, Prop } from \"@stencil/core\";\n\nexport type Variant = \"primary\" | \"outlined\" | \"text\" | \"caution\" | \"danger\";\n\n/**\n * A simple button component.\n */\n@Component({\n tag: \"scout-button\",\n styleUrl: \"button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ScoutButton {\n @Prop() type: \"button\" | \"submit\" | \"reset\" | \"link\" = \"button\";\n\n @Prop() href?: string;\n @Prop() target?: string;\n @Prop() rel?: string;\n\n /**\n * The variant primarily affects the color of the button.\n */\n @Prop() variant: Variant = \"outlined\";\n\n /**\n * An optional icon to display alongside the button text. Must be an SVG string.\n */\n @Prop() icon?: string;\n\n @Event() scoutClick: EventEmitter<void>;\n\n render() {\n const Tag = this.type === \"link\" ? \"a\" : \"button\";\n\n const props =\n this.type === \"link\"\n ? {\n href: this.href,\n target: this.target,\n // This might not be our job, but better safe than sorry.\n rel:\n this.rel ??\n (this.target === \"_blank\" ? \"noopener noreferrer\" : undefined),\n }\n : {\n type: this.type,\n };\n\n return (\n <Tag\n class={`button ${this.variant}`}\n onClick={() => this.scoutClick.emit()}\n {...props}\n >\n <slot />\n {this.icon && <span class=\"icon\" innerHTML={this.icon} />}\n </Tag>\n );\n }\n}\n"]}
@@ -4,7 +4,7 @@ import { h } from "@stencil/core";
4
4
  */
5
5
  export class ScoutCard {
6
6
  render() {
7
- return h("slot", { key: 'bde708b7482da31d53fbc29581bed3f068e26279' });
7
+ return h("slot", { key: '44e84e98fac4b83c20fdec40a532c752f41dffd7' });
8
8
  }
9
9
  static get is() { return "scout-card"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,81 @@
1
+ .checkbox {
2
+ width: var(--spacing-6);
3
+ height: var(--spacing-6);
4
+ -moz-appearance: none;
5
+ appearance: none;
6
+ -webkit-appearance: none;
7
+ display: flex;
8
+ align-content: center;
9
+ justify-content: center;
10
+ border-radius: 3px;
11
+ background-color: var(--color-text-brand-inverse);
12
+ border: 2px solid var(--color-gray-300);
13
+ position: relative;
14
+ }
15
+
16
+ .checkbox:hover {
17
+ border: 2px solid var(--color-gray-400);
18
+ box-shadow: inset 0px 0px 5px 5px var(--color-background-brand-subtle-hovered);
19
+ cursor: pointer;
20
+ }
21
+
22
+ .checkbox:active {
23
+ background-color: var(--color-background-brand-subtle-pressed);
24
+ }
25
+
26
+ .checkbox:checked:hover {
27
+ background-color: var(--color-background-brand-hovered);
28
+ border: 2px solid var(--color-background-brand-hovered);
29
+ box-shadow: none;
30
+ }
31
+
32
+ .checkbox:checked {
33
+ background-color: var(--color-background-brand-base);
34
+ border-color: var(--color-background-brand-base);
35
+ }
36
+
37
+ .checkbox::after {
38
+ content: "";
39
+ position: absolute;
40
+ width: var(--spacing-10);
41
+ height: var(--spacing-10);
42
+ top: 50%;
43
+ left: 50%;
44
+ transform: translate(-50%, -50%);
45
+ }
46
+
47
+ .checkbox:checked::before {
48
+ content: "";
49
+ background-color: var(--color-text-brand-inverse);
50
+ width: var(--spacing-6);
51
+ height: var(--spacing-6);
52
+ position: absolute;
53
+ /* Needed because of the border */
54
+ top: 50%;
55
+ left: 50%;
56
+ right: 0;
57
+ bottom: 0;
58
+ transform: translate(-50%, -50%);
59
+ -webkit-mask-image: var(--icon-checkbox);
60
+ mask-image: var(--icon-checkbox);
61
+ -webkit-mask-repeat: no-repeat;
62
+ mask-repeat: no-repeat;
63
+ }
64
+
65
+ .checkbox:disabled {
66
+ pointer-events: none;
67
+ background-color: var(--color-gray-100);
68
+ border-color: var(--color-gray-100);
69
+ }
70
+
71
+ label {
72
+ display: flex;
73
+ flex-direction: row-reverse;
74
+ align-items: center;
75
+ font: var(--type-label-base);
76
+ color: var(--color-text-base);
77
+ }
78
+
79
+ .inlineDivider {
80
+ width: var(--spacing-2);
81
+ }
@@ -0,0 +1,176 @@
1
+ import { h, } from "@stencil/core";
2
+ import checkIcon from "@tabler/icons/outline/check.svg";
3
+ export class ScoutCheckbox {
4
+ checked = false;
5
+ disabled = false;
6
+ /**
7
+ * Use this prop if you need to connect your checkbox with another element describing its use, other than the property label.
8
+ */
9
+ ariaLabelledby;
10
+ label;
11
+ ariaId;
12
+ scoutCheckboxChecked;
13
+ /**
14
+ * Internal event used for form field association.
15
+ */
16
+ _fieldId;
17
+ componentWillLoad() {
18
+ this.ariaId = `_${Math.random().toString(36).substring(2, 9)}`;
19
+ this._fieldId.emit(this.ariaId);
20
+ }
21
+ onClick(event) {
22
+ const checkbox = event.target;
23
+ console.log("checkbox", checkbox.checked);
24
+ this.scoutCheckboxChecked.emit({
25
+ checked: checkbox.checked,
26
+ element: checkbox,
27
+ });
28
+ }
29
+ /*
30
+ todo:
31
+ - Wrap checkbox with label if used.
32
+ - make sure it works with field nicely with label.
33
+ */
34
+ render() {
35
+ const Tag = this.label && this.label.length ? "label" : "div";
36
+ return (h(Tag, { key: '39d7814c3af4261c7b60423464d5b3167ad96003' }, this.label, h("span", { key: '10375644d673913047c66460c2c0395f0110b644', class: "inlineDivider" }), h("input", { key: '3e5c5fa2571874e75325a7a3161a15e00332cd36', class: "checkbox", onChange: (event) => this.onClick(event), style: { "--icon-checkbox": `url(${checkIcon})` }, type: "checkbox", id: this.ariaId, "aria-labelledby": this.ariaLabelledby, "aria-disabled": this.disabled, disabled: this.disabled, checked: this.checked })));
37
+ }
38
+ static get is() { return "scout-checkbox"; }
39
+ static get encapsulation() { return "scoped"; }
40
+ static get originalStyleUrls() {
41
+ return {
42
+ "$": ["checkbox.css"]
43
+ };
44
+ }
45
+ static get styleUrls() {
46
+ return {
47
+ "$": ["checkbox.css"]
48
+ };
49
+ }
50
+ static get properties() {
51
+ return {
52
+ "checked": {
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": ""
65
+ },
66
+ "getter": false,
67
+ "setter": false,
68
+ "reflect": false,
69
+ "attribute": "checked",
70
+ "defaultValue": "false"
71
+ },
72
+ "disabled": {
73
+ "type": "boolean",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "boolean",
77
+ "resolved": "boolean",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": ""
85
+ },
86
+ "getter": false,
87
+ "setter": false,
88
+ "reflect": false,
89
+ "attribute": "disabled",
90
+ "defaultValue": "false"
91
+ },
92
+ "ariaLabelledby": {
93
+ "type": "string",
94
+ "mutable": false,
95
+ "complexType": {
96
+ "original": "string",
97
+ "resolved": "string",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": false,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": "Use this prop if you need to connect your checkbox with another element describing its use, other than the property label."
105
+ },
106
+ "getter": false,
107
+ "setter": false,
108
+ "reflect": false,
109
+ "attribute": "aria-labelledby"
110
+ },
111
+ "label": {
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": ""
124
+ },
125
+ "getter": false,
126
+ "setter": false,
127
+ "reflect": false,
128
+ "attribute": "label"
129
+ }
130
+ };
131
+ }
132
+ static get states() {
133
+ return {
134
+ "ariaId": {}
135
+ };
136
+ }
137
+ static get events() {
138
+ return [{
139
+ "method": "scoutCheckboxChecked",
140
+ "name": "scoutCheckboxChecked",
141
+ "bubbles": true,
142
+ "cancelable": true,
143
+ "composed": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": ""
147
+ },
148
+ "complexType": {
149
+ "original": "{\n checked: boolean;\n element: HTMLInputElement;\n }",
150
+ "resolved": "{ checked: boolean; element: HTMLInputElement; }",
151
+ "references": {
152
+ "HTMLInputElement": {
153
+ "location": "global",
154
+ "id": "global::HTMLInputElement"
155
+ }
156
+ }
157
+ }
158
+ }, {
159
+ "method": "_fieldId",
160
+ "name": "_fieldId",
161
+ "bubbles": true,
162
+ "cancelable": true,
163
+ "composed": true,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": "Internal event used for form field association."
167
+ },
168
+ "complexType": {
169
+ "original": "string",
170
+ "resolved": "string",
171
+ "references": {}
172
+ }
173
+ }];
174
+ }
175
+ }
176
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,SAAS,MAAM,iCAAiC,CAAC;AAOxD,MAAM,OAAO,aAAa;IAChB,OAAO,GAAY,KAAK,CAAC;IAEzB,QAAQ,GAAY,KAAK,CAAC;IAElC;;OAEG;IACK,cAAc,CAAS;IAEvB,KAAK,CAAS;IAEb,MAAM,CAAS;IAEf,oBAAoB,CAG1B;IACH;;OAEG;IACM,QAAQ,CAAuB;IAExC,iBAAiB;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAC/D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,CAAC,KAAY;QAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA0B,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE1C,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAC7B,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;IACL,CAAC;IACD;;;;MAIE;IAEF,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;QAC9D,OAAO,CACL,EAAC,GAAG;YACD,IAAI,CAAC,KAAK;YACX,6DAAM,KAAK,EAAC,eAAe,GAAQ;YACnC,8DACE,KAAK,EAAC,UAAU,EAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EACxC,KAAK,EAAE,EAAE,iBAAiB,EAAE,OAAO,SAAS,GAAG,EAAE,EACjD,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,IAAI,CAAC,MAAM,qBACE,IAAI,CAAC,cAAc,mBACrB,IAAI,CAAC,QAAQ,EAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,GACrB,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Event,\n type EventEmitter,\n h,\n Prop,\n State,\n} from \"@stencil/core\";\nimport checkIcon from \"@tabler/icons/outline/check.svg\";\n\n@Component({\n tag: \"scout-checkbox\",\n styleUrl: \"checkbox.css\",\n scoped: true,\n})\nexport class ScoutCheckbox {\n @Prop() checked: boolean = false;\n\n @Prop() disabled: boolean = false;\n\n /**\n * Use this prop if you need to connect your checkbox with another element describing its use, other than the property label.\n */\n @Prop() ariaLabelledby: string;\n\n @Prop() label: string;\n\n @State() ariaId: string;\n\n @Event() scoutCheckboxChecked: EventEmitter<{\n checked: boolean;\n element: HTMLInputElement;\n }>;\n /**\n * Internal event used for form field association.\n */\n @Event() _fieldId: EventEmitter<string>;\n\n componentWillLoad(): Promise<void> | void {\n this.ariaId = `_${Math.random().toString(36).substring(2, 9)}`;\n this._fieldId.emit(this.ariaId);\n }\n\n onClick(event: Event) {\n const checkbox = event.target as HTMLInputElement;\n console.log(\"checkbox\", checkbox.checked);\n\n this.scoutCheckboxChecked.emit({\n checked: checkbox.checked,\n element: checkbox,\n });\n }\n /*\n todo:\n - Wrap checkbox with label if used.\n - make sure it works with field nicely with label.\n */\n\n render() {\n const Tag = this.label && this.label.length ? \"label\" : \"div\";\n return (\n <Tag>\n {this.label}\n <span class=\"inlineDivider\"></span>\n <input\n class=\"checkbox\"\n onChange={(event) => this.onClick(event)}\n style={{ \"--icon-checkbox\": `url(${checkIcon})` }}\n type=\"checkbox\"\n id={this.ariaId}\n aria-labelledby={this.ariaLabelledby}\n aria-disabled={this.disabled}\n disabled={this.disabled}\n checked={this.checked}\n />\n </Tag>\n );\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ :host {
2
+ display: block;
3
+ height: 1px;
4
+ background-color: var(--color-gray-200);
5
+ }
@@ -0,0 +1,20 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class ScoutDivider {
3
+ render() {
4
+ return h(Host, { key: '78c9366fcd393e53b579481d31feafa643b63690' });
5
+ }
6
+ static get is() { return "scout-divider"; }
7
+ static get encapsulation() { return "shadow"; }
8
+ static get delegatesFocus() { return true; }
9
+ static get originalStyleUrls() {
10
+ return {
11
+ "$": ["divider.css"]
12
+ };
13
+ }
14
+ static get styleUrls() {
15
+ return {
16
+ "$": ["divider.css"]
17
+ };
18
+ }
19
+ }
20
+ //# sourceMappingURL=divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/components/divider/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AASnD,MAAM,OAAO,YAAY;IACvB,MAAM;QACJ,OAAO,EAAC,IAAI,sDAAG,CAAC;IAClB,CAAC;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h } from \"@stencil/core\";\n\n@Component({\n tag: \"scout-divider\",\n styleUrl: \"divider.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ScoutDivider {\n render() {\n return <Host />;\n }\n}\n"]}
@@ -30,7 +30,7 @@ export class ScoutField {
30
30
  this.errorHidden = false;
31
31
  }
32
32
  render() {
33
- return (h("div", { key: 'bcd308f7ff69063860281b7f4f48ef2baa608308', class: "field" }, h("label", { key: '756d4a97399ed94970b3d39850dd5c4d0e155a99', htmlFor: this.inputId, class: "label" }, this.label), h("slot", { key: '3700f8aba58c90b14224e0d35a147f1a11ba7f98' }), h("p", { key: '60a70a27e3b7811accc657bbe49405306d342d9d', class: "error-text", "aria-live": "polite" }, !this.errorHidden && this.errorText), this.helpText && h("p", { key: '44f8377005f43ca1a332d6c4d8aec48e5aafb3c4', class: "help-text" }, this.helpText)));
33
+ return (h("div", { key: 'e38499f35a268b15962a31a2dc45361fb803a8e3', class: "field" }, h("label", { key: '3e6ba58b91285a082964bd01336fd4c7d8260835', htmlFor: this.inputId, class: "label" }, this.label), h("slot", { key: '75de87617caef28b9d90d0e112870a5cf2b08bfc' }), h("p", { key: 'f152609ade3a840a4bfd6bfef5f5aadf8060fab2', class: "error-text", "aria-live": "polite" }, !this.errorHidden && this.errorText), this.helpText && h("p", { key: '86069ef5f19840e44e79a274152742070b51e7a8', class: "help-text" }, this.helpText)));
34
34
  }
35
35
  static get is() { return "scout-field"; }
36
36
  static get encapsulation() { return "scoped"; }