@telesign/boreal-web-components 0.1.0-alpha.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 (216) hide show
  1. package/LICENSE +21 -0
  2. package/components-build/bds-banner.d.ts +11 -0
  3. package/components-build/bds-banner.js +1 -0
  4. package/components-build/bds-typography.d.ts +11 -0
  5. package/components-build/bds-typography.js +1 -0
  6. package/components-build/index.d.ts +35 -0
  7. package/components-build/index.js +1 -0
  8. package/components-build/my-component.d.ts +11 -0
  9. package/components-build/my-component.js +1 -0
  10. package/components-build/p-B9wshZ_4.js +1 -0
  11. package/components-build/p-noyWJ11s.js +1 -0
  12. package/custom-elements.json +764 -0
  13. package/dist/boreal-web-components/boreal-web-components.css +1 -0
  14. package/dist/boreal-web-components/boreal-web-components.esm.js +1 -0
  15. package/dist/boreal-web-components/boreal-web-components.js +127 -0
  16. package/dist/boreal-web-components/css/boreal.css +1594 -0
  17. package/dist/boreal-web-components/css/global.css +682 -0
  18. package/dist/boreal-web-components/css/theme-connect.css +227 -0
  19. package/dist/boreal-web-components/css/theme-engage.css +227 -0
  20. package/dist/boreal-web-components/css/theme-protect.css +227 -0
  21. package/dist/boreal-web-components/css/theme-proximus.css +227 -0
  22. package/dist/boreal-web-components/index.esm.js +0 -0
  23. package/dist/boreal-web-components/p-412d037b.system.entry.js +1 -0
  24. package/dist/boreal-web-components/p-527a761b.entry.js +1 -0
  25. package/dist/boreal-web-components/p-5666a22a.system.entry.js +1 -0
  26. package/dist/boreal-web-components/p-B-PpI2Xv.system.js +1 -0
  27. package/dist/boreal-web-components/p-B9wshZ_4.js +1 -0
  28. package/dist/boreal-web-components/p-BQdH0ijK.system.js +2 -0
  29. package/dist/boreal-web-components/p-BbPAtVJG.system.js +1 -0
  30. package/dist/boreal-web-components/p-CMd-Mv-5.system.js +1 -0
  31. package/dist/boreal-web-components/p-CaVEtaG3.system.js +1 -0
  32. package/dist/boreal-web-components/p-DQuL1Twl.js +1 -0
  33. package/dist/boreal-web-components/p-DgFiTd6X.js +2 -0
  34. package/dist/boreal-web-components/p-YWpyar7R.system.js +1 -0
  35. package/dist/boreal-web-components/p-b818618b.entry.js +1 -0
  36. package/dist/boreal-web-components/p-d596406b.entry.js +1 -0
  37. package/dist/boreal-web-components/p-e37e7dba.system.entry.js +1 -0
  38. package/dist/boreal-web-components/p-noyWJ11s.js +1 -0
  39. package/dist/boreal-web-components/scss/global/_fonts.scss +1 -0
  40. package/dist/boreal-web-components/scss/global/_index.scss +3 -0
  41. package/dist/boreal-web-components/scss/global/_reset.scss +50 -0
  42. package/dist/boreal-web-components/scss/global/_typography.scss +156 -0
  43. package/dist/boreal-web-components/scss/maps/_primitives.scss +461 -0
  44. package/dist/boreal-web-components/scss/maps/_theme-connect.scss +227 -0
  45. package/dist/boreal-web-components/scss/maps/_theme-engage.scss +227 -0
  46. package/dist/boreal-web-components/scss/maps/_theme-protect.scss +227 -0
  47. package/dist/boreal-web-components/scss/maps/_theme-proximus.scss +227 -0
  48. package/dist/boreal-web-components/scss/variables/_primitives.scss +459 -0
  49. package/dist/boreal-web-components/scss/variables/_theme-connect.scss +225 -0
  50. package/dist/boreal-web-components/scss/variables/_theme-engage.scss +225 -0
  51. package/dist/boreal-web-components/scss/variables/_theme-protect.scss +225 -0
  52. package/dist/boreal-web-components/scss/variables/_theme-proximus.scss +225 -0
  53. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  54. package/dist/cjs/attributes-RPVEtBdj.js +90 -0
  55. package/dist/cjs/bds-banner.cjs.entry.js +130 -0
  56. package/dist/cjs/bds-typography.cjs.entry.js +167 -0
  57. package/dist/cjs/boreal-web-components.cjs.js +46 -0
  58. package/dist/cjs/index-CD9v53WJ.js +133 -0
  59. package/dist/cjs/index-Cdb66Tqj.js +2342 -0
  60. package/dist/cjs/index.cjs.js +2 -0
  61. package/dist/cjs/loader.cjs.js +13 -0
  62. package/dist/cjs/my-component.cjs.entry.js +29 -0
  63. package/dist/collection/collection-manifest.json +14 -0
  64. package/dist/collection/components/feedback/bds-banner/bds-banner.css +101 -0
  65. package/dist/collection/components/feedback/bds-banner/bds-banner.js +266 -0
  66. package/dist/collection/components/feedback/bds-banner/types/IBanner.js +1 -0
  67. package/dist/collection/components/my-component/my-component.css +3 -0
  68. package/dist/collection/components/my-component/my-component.js +95 -0
  69. package/dist/collection/components/titles-text/bds-typography/bds-typography.css +183 -0
  70. package/dist/collection/components/titles-text/bds-typography/bds-typography.js +577 -0
  71. package/dist/collection/components/titles-text/bds-typography/types/ITypography.js +1 -0
  72. package/dist/collection/components/titles-text/bds-typography/types/enum.js +23 -0
  73. package/dist/collection/components/titles-text/bds-typography/types/types.js +1 -0
  74. package/dist/collection/components/titles-text/bds-typography/utils/bds-typography-utils.js +41 -0
  75. package/dist/collection/css/boreal.css +1594 -0
  76. package/dist/collection/css/global.css +682 -0
  77. package/dist/collection/css/theme-connect.css +227 -0
  78. package/dist/collection/css/theme-engage.css +227 -0
  79. package/dist/collection/css/theme-protect.css +227 -0
  80. package/dist/collection/css/theme-proximus.css +227 -0
  81. package/dist/collection/index.js +1 -0
  82. package/dist/collection/mixins/anchored.mixin.js +272 -0
  83. package/dist/collection/mixins/floating.mixin.js +181 -0
  84. package/dist/collection/mixins/form-associated.mixin.js +95 -0
  85. package/dist/collection/mixins/index.js +3 -0
  86. package/dist/collection/scss/global/_fonts.scss +1 -0
  87. package/dist/collection/scss/global/_index.scss +3 -0
  88. package/dist/collection/scss/global/_reset.scss +50 -0
  89. package/dist/collection/scss/global/_typography.scss +156 -0
  90. package/dist/collection/scss/maps/_primitives.scss +461 -0
  91. package/dist/collection/scss/maps/_theme-connect.scss +227 -0
  92. package/dist/collection/scss/maps/_theme-engage.scss +227 -0
  93. package/dist/collection/scss/maps/_theme-protect.scss +227 -0
  94. package/dist/collection/scss/maps/_theme-proximus.scss +227 -0
  95. package/dist/collection/scss/variables/_primitives.scss +459 -0
  96. package/dist/collection/scss/variables/_theme-connect.scss +225 -0
  97. package/dist/collection/scss/variables/_theme-engage.scss +225 -0
  98. package/dist/collection/scss/variables/_theme-protect.scss +225 -0
  99. package/dist/collection/scss/variables/_theme-proximus.scss +225 -0
  100. package/dist/collection/services/floating/interfaces/Floating.js +1 -0
  101. package/dist/collection/services/floating/interfaces/Positioning.js +1 -0
  102. package/dist/collection/services/floating/interfaces/Props.js +1 -0
  103. package/dist/collection/services/floating/positioning.service.js +71 -0
  104. package/dist/collection/services/floating/types/Arrow.js +1 -0
  105. package/dist/collection/services/logger/Logger.js +47 -0
  106. package/dist/collection/types/alignment.js +6 -0
  107. package/dist/collection/types/form.js +1 -0
  108. package/dist/collection/types/index.js +5 -0
  109. package/dist/collection/types/position.js +11 -0
  110. package/dist/collection/types/size.js +7 -0
  111. package/dist/collection/types/states.js +22 -0
  112. package/dist/collection/types/stylesMap.js +1 -0
  113. package/dist/collection/utils/a11y/attributes.js +80 -0
  114. package/dist/collection/utils/a11y/index.js +1 -0
  115. package/dist/collection/utils/constants/common/Events.js +10 -0
  116. package/dist/collection/utils/constants/common/Keys.js +16 -0
  117. package/dist/collection/utils/dom/elements.js +22 -0
  118. package/dist/collection/utils/dom/index.js +1 -0
  119. package/dist/collection/utils/form/index.js +1 -0
  120. package/dist/collection/utils/form/internals.js +79 -0
  121. package/dist/collection/utils/helpers/common/BaseAttributes.js +17 -0
  122. package/dist/collection/utils/index.js +3 -0
  123. package/dist/css/boreal.css +1594 -0
  124. package/dist/css/global.css +682 -0
  125. package/dist/css/theme-connect.css +227 -0
  126. package/dist/css/theme-engage.css +227 -0
  127. package/dist/css/theme-protect.css +227 -0
  128. package/dist/css/theme-proximus.css +227 -0
  129. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  130. package/dist/esm/attributes-B9wshZ_4.js +86 -0
  131. package/dist/esm/bds-banner.entry.js +128 -0
  132. package/dist/esm/bds-typography.entry.js +165 -0
  133. package/dist/esm/boreal-web-components.js +42 -0
  134. package/dist/esm/index-DgFiTd6X.js +2332 -0
  135. package/dist/esm/index-noyWJ11s.js +131 -0
  136. package/dist/esm/index.js +1 -0
  137. package/dist/esm/loader.js +11 -0
  138. package/dist/esm/my-component.entry.js +27 -0
  139. package/dist/esm/polyfills/core-js.js +11 -0
  140. package/dist/esm/polyfills/dom.js +79 -0
  141. package/dist/esm/polyfills/es5-html-element.js +1 -0
  142. package/dist/esm/polyfills/index.js +34 -0
  143. package/dist/esm/polyfills/system.js +6 -0
  144. package/dist/esm-es5/app-globals-DQuL1Twl.js +1 -0
  145. package/dist/esm-es5/attributes-B9wshZ_4.js +1 -0
  146. package/dist/esm-es5/bds-banner.entry.js +1 -0
  147. package/dist/esm-es5/bds-typography.entry.js +1 -0
  148. package/dist/esm-es5/boreal-web-components.js +1 -0
  149. package/dist/esm-es5/index-DgFiTd6X.js +2 -0
  150. package/dist/esm-es5/index-noyWJ11s.js +1 -0
  151. package/dist/esm-es5/index.js +0 -0
  152. package/dist/esm-es5/loader.js +1 -0
  153. package/dist/esm-es5/my-component.entry.js +1 -0
  154. package/dist/index.cjs.js +1 -0
  155. package/dist/index.js +1 -0
  156. package/dist/scss/global/_fonts.scss +1 -0
  157. package/dist/scss/global/_index.scss +3 -0
  158. package/dist/scss/global/_reset.scss +50 -0
  159. package/dist/scss/global/_typography.scss +156 -0
  160. package/dist/scss/maps/_primitives.scss +461 -0
  161. package/dist/scss/maps/_theme-connect.scss +227 -0
  162. package/dist/scss/maps/_theme-engage.scss +227 -0
  163. package/dist/scss/maps/_theme-protect.scss +227 -0
  164. package/dist/scss/maps/_theme-proximus.scss +227 -0
  165. package/dist/scss/variables/_primitives.scss +459 -0
  166. package/dist/scss/variables/_theme-connect.scss +225 -0
  167. package/dist/scss/variables/_theme-engage.scss +225 -0
  168. package/dist/scss/variables/_theme-protect.scss +225 -0
  169. package/dist/scss/variables/_theme-proximus.scss +225 -0
  170. package/dist/types/components/feedback/bds-banner/bds-banner.d.ts +71 -0
  171. package/dist/types/components/feedback/bds-banner/types/IBanner.d.ts +10 -0
  172. package/dist/types/components/my-component/my-component.d.ts +16 -0
  173. package/dist/types/components/titles-text/bds-typography/bds-typography.d.ts +99 -0
  174. package/dist/types/components/titles-text/bds-typography/types/ITypography.d.ts +22 -0
  175. package/dist/types/components/titles-text/bds-typography/types/enum.d.ts +24 -0
  176. package/dist/types/components/titles-text/bds-typography/types/types.d.ts +4 -0
  177. package/dist/types/components/titles-text/bds-typography/utils/bds-typography-utils.d.ts +15 -0
  178. package/dist/types/components.d.ts +565 -0
  179. package/dist/types/index.d.ts +11 -0
  180. package/dist/types/mixins/anchored.mixin.d.ts +228 -0
  181. package/dist/types/mixins/floating.mixin.d.ts +158 -0
  182. package/dist/types/mixins/form-associated.mixin.d.ts +127 -0
  183. package/dist/types/mixins/index.d.ts +4 -0
  184. package/dist/types/services/floating/interfaces/Floating.d.ts +38 -0
  185. package/dist/types/services/floating/interfaces/Positioning.d.ts +22 -0
  186. package/dist/types/services/floating/interfaces/Props.d.ts +35 -0
  187. package/dist/types/services/floating/positioning.service.d.ts +45 -0
  188. package/dist/types/services/floating/types/Arrow.d.ts +7 -0
  189. package/dist/types/services/logger/Logger.d.ts +50 -0
  190. package/dist/types/stencil-public-runtime.d.ts +1858 -0
  191. package/dist/types/types/alignment.d.ts +8 -0
  192. package/dist/types/types/form.d.ts +7 -0
  193. package/dist/types/types/index.d.ts +6 -0
  194. package/dist/types/types/position.d.ts +13 -0
  195. package/dist/types/types/size.d.ts +9 -0
  196. package/dist/types/types/states.d.ts +26 -0
  197. package/dist/types/types/stylesMap.d.ts +2 -0
  198. package/dist/types/utils/a11y/attributes.d.ts +13 -0
  199. package/dist/types/utils/a11y/index.d.ts +2 -0
  200. package/dist/types/utils/constants/common/Events.d.ts +14 -0
  201. package/dist/types/utils/constants/common/Keys.d.ts +18 -0
  202. package/dist/types/utils/dom/elements.d.ts +12 -0
  203. package/dist/types/utils/dom/index.d.ts +2 -0
  204. package/dist/types/utils/form/index.d.ts +2 -0
  205. package/dist/types/utils/form/internals.d.ts +66 -0
  206. package/dist/types/utils/helpers/common/BaseAttributes.d.ts +16 -0
  207. package/dist/types/utils/index.d.ts +4 -0
  208. package/loader/cdn.js +2 -0
  209. package/loader/index.cjs.js +2 -0
  210. package/loader/index.d.ts +24 -0
  211. package/loader/index.es2017.js +2 -0
  212. package/loader/index.js +3 -0
  213. package/package.json +96 -0
  214. package/readme.md +111 -0
  215. package/scripts/copy-styles.js +18 -0
  216. package/scripts/postbuild.js +21 -0
@@ -0,0 +1,8 @@
1
+ export declare const ALIGNMENT: {
2
+ readonly START: "start";
3
+ readonly CENTER: "center";
4
+ readonly END: "end";
5
+ readonly INHERIT: "inherit";
6
+ };
7
+ export type Alignment = (typeof ALIGNMENT)[keyof typeof ALIGNMENT];
8
+ //# sourceMappingURL=alignment.d.ts.map
@@ -0,0 +1,7 @@
1
+ export type ValidationTiming = 'blur' | 'input' | 'submit';
2
+ export interface IFormValidator {
3
+ key: keyof ValidityStateFlags;
4
+ isValid: (el: HTMLElement) => boolean;
5
+ message: string;
6
+ }
7
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1,6 @@
1
+ export * from './alignment';
2
+ export * from './form';
3
+ export * from './size';
4
+ export * from './states';
5
+ export * from './stylesMap';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Define the possible positions of the floating element.
3
+ * This could be used to position the floating element relative to the trigger element.
4
+ * Are blocked posittions like 'top-start', 'top-end', 'bottom-start', and 'bottom-end'.
5
+ */
6
+ export declare const POSITION: {
7
+ readonly TOP: "top";
8
+ readonly BOTTOM: "bottom";
9
+ readonly LEFT: "left";
10
+ readonly RIGHT: "right";
11
+ };
12
+ export type Position = (typeof POSITION)[keyof typeof POSITION];
13
+ //# sourceMappingURL=position.d.ts.map
@@ -0,0 +1,9 @@
1
+ export declare const SIZES: {
2
+ readonly XS: "xs";
3
+ readonly S: "sm";
4
+ readonly M: "md";
5
+ readonly L: "lg";
6
+ readonly XL: "xl";
7
+ };
8
+ export type Size = (typeof SIZES)[keyof typeof SIZES];
9
+ //# sourceMappingURL=size.d.ts.map
@@ -0,0 +1,26 @@
1
+ export declare const STATES: {
2
+ readonly DEFAULT: "default";
3
+ readonly ERROR: "error";
4
+ readonly DISABLED: "disabled";
5
+ readonly HOVER: "hover";
6
+ readonly ACTIVE: "active";
7
+ readonly FOCUS: "focus";
8
+ readonly VISITED: "visited";
9
+ };
10
+ export type State = (typeof STATES)[keyof typeof STATES];
11
+ export declare const PROCESS_STATUS: {
12
+ readonly NEUTRAL: "neutral";
13
+ readonly PENDING: "pending";
14
+ readonly IN_PROGRESS: "in-progress";
15
+ readonly COMPLETE: "complete";
16
+ readonly CANCEL: "cancel";
17
+ };
18
+ export type Status = (typeof PROCESS_STATUS)[keyof typeof PROCESS_STATUS];
19
+ export declare const STATUS_VARIANT: {
20
+ readonly INFO: "info";
21
+ readonly SUCCESS: "success";
22
+ readonly WARNING: "warning";
23
+ readonly DANGER: "danger";
24
+ };
25
+ export type StatusVariant = (typeof STATUS_VARIANT)[keyof typeof STATUS_VARIANT];
26
+ //# sourceMappingURL=states.d.ts.map
@@ -0,0 +1,2 @@
1
+ export type StyleModifiers = Record<string, boolean>;
2
+ //# sourceMappingURL=stylesMap.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Taken from StencilJS Ionic team
3
+ * This helper pass the attributes passed to components directly to the inner element
4
+ * e.g. <my-component aria-hidden="true">Text</my-component>
5
+ * will pass the aria-hidden to the inner element inside my-component
6
+ * <span { ...myComponentAttr }>Hidden</span>
7
+ */
8
+ export interface Attributes {
9
+ [key: string]: string;
10
+ }
11
+ export declare const inheritAttributes: (el: HTMLElement, attributes?: readonly string[]) => Attributes;
12
+ export declare const inheritAriaAttributes: (el: HTMLElement, ignoreList?: readonly string[]) => Attributes;
13
+ //# sourceMappingURL=attributes.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './attributes';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Type to add events to the component.
3
+ */
4
+ type Events = {
5
+ [key: string]: string;
6
+ };
7
+ /**
8
+ * Centralize list of events to add listeners to the component.
9
+ * Add Native or Custom events to the `EVENTS` object.
10
+ * This prevent typing errors when using the event name in the component, creating listeners, etc.
11
+ */
12
+ export declare const EVENTS: Events;
13
+ export {};
14
+ //# sourceMappingURL=Events.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Type to add keyboard keys to the component.
3
+ */
4
+ type Key = {
5
+ [key: string]: {
6
+ key: string;
7
+ code: number;
8
+ };
9
+ };
10
+ /**
11
+ * Default keyboard keys.
12
+ * Add more keys to the `KEYBOARD` object to add more keyboard shortcuts.
13
+ * This prevents key name typing errors and provides a centralized definition of the keys available for implementation.
14
+ * Can use this page to find the keycodes: https://keycode.info/
15
+ */
16
+ export declare const KEYBOARD: Key;
17
+ export {};
18
+ //# sourceMappingURL=Keys.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Detects whether a slot has assigned content in the host element's light DOM.
3
+ *
4
+ * Whitespace-only text nodes and comment nodes are ignored — only element nodes
5
+ * and non-empty text nodes are considered meaningful slot content.
6
+ *
7
+ * @param el - The host element to query.
8
+ * @param slotName - Named slot to check. Omit to check the default slot.
9
+ * @returns `true` if the slot has meaningful content, `false` otherwise.
10
+ */
11
+ export declare function hasSlotContent(el: HTMLElement, slotName?: string): boolean;
12
+ //# sourceMappingURL=elements.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './elements';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './internals';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,66 @@
1
+ import type { IFormValidator } from "../../types/form";
2
+ /**
3
+ * Registers the component's current value with the browser's form machinery.
4
+ *
5
+ * Wraps `ElementInternals.setFormValue()` so the value appears in `FormData`
6
+ * under the component's `name` attribute when the form is submitted.
7
+ * Pass `null` to remove the component's contribution from `FormData`
8
+ * (e.g. an unchecked checkbox).
9
+ *
10
+ * @param internals - The component's `ElementInternals` instance (from `@AttachInternals()`).
11
+ * @param value - The value to register, or `null` to deregister.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // Register a string value on every value change
16
+ * @Watch('value')
17
+ * onValueChange(next: string) {
18
+ * setFormValue(this.internals, next);
19
+ * }
20
+ *
21
+ * // Deregister when unchecked
22
+ * setFormValue(this.internals, null);
23
+ * ```
24
+ */
25
+ export declare function setFormValue(internals: ElementInternals, value: FormDataEntryValue | null): void;
26
+ /**
27
+ * Runs an array of validators against the host element and reports the combined
28
+ * result to `ElementInternals.setValidity()`.
29
+ *
30
+ * All validators are evaluated regardless of order. The first failing validator's
31
+ * message is used as the validation message, matching native browser behaviour
32
+ * (one message surfaced at a time). When all validators pass, the component is
33
+ * marked valid and any previous invalid state is cleared.
34
+ *
35
+ * @param internals - The component's `ElementInternals` instance (from `@AttachInternals()`).
36
+ * @param validators - Array of `IFormValidator` objects to evaluate.
37
+ * @param el - The host element passed to each validator's `isValid` function.
38
+ * @returns `true` if all validators pass, `false` if any fail.
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * private get validators(): IFormValidator[] {
43
+ * return [
44
+ * {
45
+ * key: 'valueMissing',
46
+ * isValid: (el) => !(el as BdsTextField).required || (el as BdsTextField).value !== '',
47
+ * message: 'This field is required.',
48
+ * },
49
+ * {
50
+ * key: 'tooShort',
51
+ * isValid: (el) => {
52
+ * const { value, minLength } = el as BdsTextField;
53
+ * return minLength === undefined || value.length >= minLength;
54
+ * },
55
+ * message: `Minimum length not reached.`,
56
+ * },
57
+ * ];
58
+ * }
59
+ *
60
+ * private updateValidity() {
61
+ * runValidators(this.internals, this.validators, this.el);
62
+ * }
63
+ * ```
64
+ */
65
+ export declare function runValidators(internals: ElementInternals, validators: IFormValidator[], el: HTMLElement): boolean;
66
+ //# sourceMappingURL=internals.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Ensure the given component instance has an auto-generated id if one wasn't provided.
3
+ * Designed to be called from `componentWillLoad` on a Stencil component.
4
+ */
5
+ export declare function createId(component: {
6
+ idComponent?: string;
7
+ }): void;
8
+ /**
9
+ * Components can spread the result into their host.
10
+ */
11
+ export declare function getBaseAttributes(component: {
12
+ idComponent: string;
13
+ }): {
14
+ id: string;
15
+ };
16
+ //# sourceMappingURL=BaseAttributes.d.ts.map
@@ -0,0 +1,4 @@
1
+ export * from './a11y';
2
+ export * from './dom';
3
+ export * from './form';
4
+ //# sourceMappingURL=index.d.ts.map
package/loader/cdn.js ADDED
@@ -0,0 +1,2 @@
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
2
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,2 @@
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
2
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,24 @@
1
+ export * from '../dist/types/components';
2
+ export interface CustomElementsDefineOptions {
3
+ exclude?: string[];
4
+ resourcesUrl?: string;
5
+ syncQueue?: boolean;
6
+ jmp?: (c: Function) => any;
7
+ raf?: (c: FrameRequestCallback) => number;
8
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
+ }
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ /**
13
+ * @deprecated
14
+ */
15
+ export declare function applyPolyfills(): Promise<void>;
16
+
17
+ /**
18
+ * Used to specify a nonce value that corresponds with an application's CSP.
19
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
20
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
21
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
22
+ * will result in the same behavior.
23
+ */
24
+ export declare function setNonce(nonce: string): void;
@@ -0,0 +1,2 @@
1
+ export * from '../dist/esm/polyfills/index.js';
2
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,3 @@
1
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
2
+ export * from '../dist/esm/polyfills/index.js';
3
+ export * from '../dist/esm-es5/loader.js';
package/package.json ADDED
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "@telesign/boreal-web-components",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Stencil Component Starter",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "collection": "dist/collection/collection-manifest.json",
9
+ "collection:main": "dist/collection/index.js",
10
+ "unpkg": "dist/boreal-web-components/boreal-web-components.esm.js",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/boreal-web-components/boreal-web-components.esm.js",
14
+ "require": "./dist/boreal-web-components/boreal-web-components.cjs.js",
15
+ "types": "./dist/types/components.d.ts"
16
+ },
17
+ "./loader": {
18
+ "import": "./loader/index.js",
19
+ "require": "./loader/index.cjs",
20
+ "types": "./loader/index.d.ts"
21
+ },
22
+ "./components/*": {
23
+ "import": "./components-build/*"
24
+ },
25
+ "./types": {
26
+ "import": "./dist/collection/types/index.js",
27
+ "types": "./dist/types/types/index.d.ts"
28
+ },
29
+ "./css/*": "./dist/css/*",
30
+ "./scss/*": "./dist/scss/*",
31
+ "./styles/*": "./dist/boreal-web-components/*",
32
+ "./dist/*": "./dist/*",
33
+ "./scripts/copy-styles": "./scripts/copy-styles.js"
34
+ },
35
+ "bin": {
36
+ "boreal-copy-styles": "./scripts/copy-styles.js"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/stenciljs/component-starter.git"
41
+ },
42
+ "files": [
43
+ "dist/",
44
+ "loader/",
45
+ "components-build/",
46
+ "custom-elements.json",
47
+ "scripts/copy-styles.js",
48
+ "scripts/postbuild.js"
49
+ ],
50
+ "scripts": {
51
+ "build": "stencil build",
52
+ "postbuild": "node scripts/postbuild.js",
53
+ "dev": "stencil build --dev --watch --serve",
54
+ "test": "stencil test --spec",
55
+ "test:watch": "stencil test --spec --watchAll",
56
+ "test:coverage": "stencil test --spec --coverage",
57
+ "e2e": "stencil test --e2e",
58
+ "e2e:watch": "stencil test --e2e --watchAll",
59
+ "generate": "stencil generate",
60
+ "release": "release-it",
61
+ "check:cem": "tsx scripts/check-cem-changes.ts",
62
+ "test:scripts": "stencil test --spec --testPathPattern=scripts/",
63
+ "lint": "eslint",
64
+ "lint:fix": "eslint --fix",
65
+ "format": "prettier --write 'src/**/*.{ts,tsx,css,scss,json}'",
66
+ "format:check": "prettier --check 'src/**/*.{ts,tsx,css,scss,json}'"
67
+ },
68
+ "dependencies": {
69
+ "@braintree/sanitize-url": "^7.1.2",
70
+ "@floating-ui/dom": "^1.7.5"
71
+ },
72
+ "devDependencies": {
73
+ "@eslint/js": "^9.39.2",
74
+ "@stencil/core": "^4.27.1",
75
+ "@stencil/eslint-plugin": "^1.1.0",
76
+ "@stencil/react-output-target": "^1.3.2",
77
+ "@stencil/sass": "^3.2.3",
78
+ "@stencil/vue-output-target": "^0.11.8",
79
+ "@telesign/boreal-style-guidelines": "workspace:*",
80
+ "@types/jest": "^29.5.14",
81
+ "@types/node": "^22.13.5",
82
+ "eslint": "^9.39.2",
83
+ "eslint-plugin-jsdoc": "^62.7.1",
84
+ "jest": "^29.7.0",
85
+ "jest-cli": "^29.7.0",
86
+ "prettier": "3.8.0",
87
+ "puppeteer": "^24.3.0",
88
+ "tsx": "^4.21.0",
89
+ "typescript": "^5.9.3",
90
+ "typescript-eslint": "^8.50.0"
91
+ },
92
+ "license": "MIT",
93
+ "publishConfig": {
94
+ "access": "public"
95
+ }
96
+ }
package/readme.md ADDED
@@ -0,0 +1,111 @@
1
+ [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
2
+
3
+ # Stencil Component Starter
4
+
5
+ > This is a starter project for building a standalone Web Components using Stencil.
6
+
7
+ Stencil is a compiler for building fast web apps using Web Components.
8
+
9
+ Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than runtime tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements specification.
10
+
11
+ Stencil components are just Web Components, so they work in any major framework or with no framework at all.
12
+
13
+ ## Getting Started
14
+
15
+ To start building a new web component using Stencil, clone this repo to a new directory:
16
+
17
+ ```bash
18
+ git clone https://github.com/stenciljs/component-starter.git my-component
19
+ cd my-component
20
+ git remote rm origin
21
+ ```
22
+
23
+ and run:
24
+
25
+ ```bash
26
+ npm install
27
+ npm start
28
+ ```
29
+
30
+ To build the component for production, run:
31
+
32
+ ```bash
33
+ npm run build
34
+ ```
35
+
36
+ To run the unit tests for the components, run:
37
+
38
+ ```bash
39
+ npm test
40
+ ```
41
+
42
+ Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
43
+
44
+ ## Naming Components
45
+
46
+ When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
47
+
48
+ Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the [Ionic-generated](https://ionicframework.com/) web components use the prefix `ion`.
49
+
50
+ ## Using this component
51
+
52
+ There are two strategies we recommend for using web components built with Stencil.
53
+
54
+ The first step for all two of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
55
+
56
+ You can read more about these different approaches in the [Stencil docs](https://stenciljs.com/docs/publishing).
57
+
58
+ ### Lazy Loading
59
+
60
+ If your Stencil project is built with the [`dist`](https://stenciljs.com/docs/distribution) output target, you can import a small bootstrap script that registers all components and allows you to load individual component scripts lazily.
61
+
62
+ For example, given your Stencil project namespace is called `my-design-system`, to use `my-component` on any website, inject this into your HTML:
63
+
64
+ ```html
65
+ <script type="module" src="https://unpkg.com/my-design-system"></script>
66
+ <!--
67
+ To avoid unpkg.com redirects to the actual file, you can also directly import:
68
+ https://unpkg.com/foobar-design-system@0.0.1/dist/foobar-design-system/foobar-design-system.esm.js
69
+ -->
70
+ <my-component first="Stencil" middle="'Don't call me a framework'" last="JS"></my-component>
71
+ ```
72
+
73
+ This will only load the necessary scripts needed to render `<my-component />`. Once more components of this package are used, they will automatically be loaded lazily.
74
+
75
+ You can also import the script as part of your `node_modules` in your applications entry file:
76
+
77
+ ```tsx
78
+ import 'foobar-design-system/dist/foobar-design-system/foobar-design-system.esm.js';
79
+ ```
80
+
81
+ Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-y6v26a?file=src%2Fmain.tsx).
82
+
83
+ ### Standalone
84
+
85
+ If you are using a Stencil component library with `dist-custom-elements`, we recommend importing Stencil components individually in those files where they are needed.
86
+
87
+ To export Stencil components as standalone components make sure you have the [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output target defined in your `stencil.config.ts`.
88
+
89
+ For example, given you'd like to use `<my-component />` as part of a React component, you can import the component directly via:
90
+
91
+ ```tsx
92
+ import 'foobar-design-system/my-component';
93
+
94
+ function App() {
95
+ return (
96
+ <>
97
+ <div>
98
+ <my-component
99
+ first="Stencil"
100
+ middle="'Don't call me a framework'"
101
+ last="JS"
102
+ ></my-component>
103
+ </div>
104
+ </>
105
+ );
106
+ }
107
+
108
+ export default App;
109
+ ```
110
+
111
+ Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-b6zuds?file=src%2FApp.tsx).
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { cpSync, existsSync } = require('fs');
5
+ const { resolve } = require('path');
6
+
7
+ // Primary source: boreal-web-components dist (populated by the Stencil build copy task).
8
+ // Fallback source: boreal-styleguidelines dist (always available as a direct dependency).
9
+ const wcDist = resolve(__dirname, '../dist');
10
+ const sgDist = resolve(__dirname, '../node_modules/@telesign/boreal-style-guidelines/dist');
11
+
12
+ const src = existsSync(`${wcDist}/css`) ? wcDist : sgDist;
13
+ const label = src === wcDist ? '@telesign/boreal-web-components' : '@telesign/boreal-style-guidelines';
14
+
15
+ cpSync(`${src}/css`, 'dist/css', { recursive: true });
16
+ cpSync(`${src}/scss`, 'dist/scss', { recursive: true });
17
+
18
+ console.log(`Styles copied from ${label}.`);
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { cpSync, rmSync, existsSync } = require('fs');
5
+ const { resolve } = require('path');
6
+
7
+ const distDir = resolve(__dirname, '../dist');
8
+ const namespacedDir = resolve(distDir, 'boreal-web-components');
9
+
10
+ for (const folder of ['css', 'scss']) {
11
+ const src = resolve(namespacedDir, folder);
12
+ const dest = resolve(distDir, folder);
13
+ if (!existsSync(src)) {
14
+ console.error(`postbuild: source not found: ${src}`);
15
+ process.exit(1);
16
+ }
17
+ if (existsSync(dest)) rmSync(dest, { recursive: true });
18
+ cpSync(src, dest, { recursive: true });
19
+ }
20
+
21
+ console.log('postbuild: css and scss promoted to dist/ root.');