@govbr-ds/webcomponents 2.0.0-next.3 → 2.0.0-next.5

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 (135) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +104 -81
  3. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  4. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  5. package/dist/cjs/br-button.cjs.entry.js +116 -0
  6. package/dist/cjs/br-button.cjs.entry.js.map +1 -0
  7. package/dist/cjs/br-checkbox.cjs.entry.js +98 -0
  8. package/dist/cjs/br-checkbox.cjs.entry.js.map +1 -0
  9. package/dist/cjs/br-input.cjs.entry.js +116 -0
  10. package/dist/cjs/br-input.cjs.entry.js.map +1 -0
  11. package/dist/cjs/br-item.cjs.entry.js +87 -0
  12. package/dist/cjs/br-item.cjs.entry.js.map +1 -0
  13. package/dist/cjs/index-c5475da7.js +1476 -0
  14. package/dist/cjs/index-c5475da7.js.map +1 -0
  15. package/dist/cjs/index.cjs.js +4 -0
  16. package/dist/cjs/index.cjs.js.map +1 -0
  17. package/dist/cjs/inherited-attributes-61a2aff9.js +103 -0
  18. package/dist/cjs/inherited-attributes-61a2aff9.js.map +1 -0
  19. package/dist/cjs/loader.cjs.js +17 -0
  20. package/dist/cjs/loader.cjs.js.map +1 -0
  21. package/dist/cjs/webcomponents.cjs.js +27 -0
  22. package/dist/cjs/webcomponents.cjs.js.map +1 -0
  23. package/dist/collection/collection-manifest.json +15 -0
  24. package/dist/collection/components/button/button.css +24213 -0
  25. package/dist/collection/components/button/button.js +454 -0
  26. package/dist/collection/components/button/button.js.map +1 -0
  27. package/dist/collection/components/checkbox/checkbox.css +23375 -0
  28. package/dist/collection/components/checkbox/checkbox.js +392 -0
  29. package/dist/collection/components/checkbox/checkbox.js.map +1 -0
  30. package/dist/collection/components/input/input.css +23428 -0
  31. package/dist/collection/components/input/input.js +631 -0
  32. package/dist/collection/components/input/input.js.map +1 -0
  33. package/dist/collection/components/item/item.css +23596 -0
  34. package/dist/collection/components/item/item.js +297 -0
  35. package/dist/collection/components/item/item.js.map +1 -0
  36. package/dist/collection/index.js +2 -0
  37. package/dist/collection/index.js.map +1 -0
  38. package/dist/collection/pages/button/button.js +32 -0
  39. package/dist/collection/pages/checkbox/checkbox.js +34 -0
  40. package/dist/collection/pages/input/input.js +35 -0
  41. package/dist/collection/pages/item/item.js +0 -0
  42. package/dist/collection/utils/inherited-attributes.js +98 -0
  43. package/dist/collection/utils/inherited-attributes.js.map +1 -0
  44. package/dist/collection/utils/interfaces.js +2 -0
  45. package/dist/collection/utils/interfaces.js.map +1 -0
  46. package/dist/components/br-button.d.ts +11 -0
  47. package/dist/components/br-button.js +8 -0
  48. package/dist/components/br-button.js.map +1 -0
  49. package/dist/components/br-checkbox.d.ts +11 -0
  50. package/dist/components/br-checkbox.js +114 -0
  51. package/dist/components/br-checkbox.js.map +1 -0
  52. package/dist/components/br-input.d.ts +11 -0
  53. package/dist/components/br-input.js +150 -0
  54. package/dist/components/br-input.js.map +1 -0
  55. package/dist/components/br-item.d.ts +11 -0
  56. package/dist/components/br-item.js +99 -0
  57. package/dist/components/br-item.js.map +1 -0
  58. package/dist/components/button.js +132 -0
  59. package/dist/components/button.js.map +1 -0
  60. package/dist/components/index.d.ts +44 -0
  61. package/dist/components/index.js +7 -0
  62. package/dist/components/index.js.map +1 -0
  63. package/dist/components/inherited-attributes.js +101 -0
  64. package/dist/components/inherited-attributes.js.map +1 -0
  65. package/dist/esm/app-globals-0f993ce5.js +5 -0
  66. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  67. package/dist/esm/br-button.entry.js +112 -0
  68. package/dist/esm/br-button.entry.js.map +1 -0
  69. package/dist/esm/br-checkbox.entry.js +94 -0
  70. package/dist/esm/br-checkbox.entry.js.map +1 -0
  71. package/dist/esm/br-input.entry.js +112 -0
  72. package/dist/esm/br-input.entry.js.map +1 -0
  73. package/dist/esm/br-item.entry.js +83 -0
  74. package/dist/esm/br-item.entry.js.map +1 -0
  75. package/dist/esm/index-57007b22.js +1447 -0
  76. package/dist/esm/index-57007b22.js.map +1 -0
  77. package/dist/esm/index.js +3 -0
  78. package/dist/esm/index.js.map +1 -0
  79. package/dist/esm/inherited-attributes-c856c729.js +101 -0
  80. package/dist/esm/inherited-attributes-c856c729.js.map +1 -0
  81. package/dist/esm/loader.js +13 -0
  82. package/dist/esm/loader.js.map +1 -0
  83. package/dist/esm/polyfills/core-js.js +11 -0
  84. package/dist/esm/polyfills/dom.js +79 -0
  85. package/dist/esm/polyfills/es5-html-element.js +1 -0
  86. package/dist/esm/polyfills/index.js +34 -0
  87. package/dist/esm/polyfills/system.js +6 -0
  88. package/dist/esm/webcomponents.js +22 -0
  89. package/dist/esm/webcomponents.js.map +1 -0
  90. package/dist/index.cjs.js +1 -0
  91. package/dist/index.js +1 -0
  92. package/dist/types/components/button/button.d.ts +68 -0
  93. package/dist/types/components/checkbox/checkbox.d.ts +54 -0
  94. package/dist/types/components/input/input.d.ts +85 -0
  95. package/dist/types/components/item/item.d.ts +50 -0
  96. package/dist/types/components.d.ts +649 -0
  97. package/dist/types/index.d.ts +1 -0
  98. package/dist/types/stencil-public-runtime.d.ts +1681 -0
  99. package/dist/types/utils/inherited-attributes.d.ts +20 -0
  100. package/dist/types/utils/interfaces.d.ts +3 -0
  101. package/dist/webcomponents/index.esm.js +2 -0
  102. package/dist/webcomponents/index.esm.js.map +1 -0
  103. package/dist/webcomponents/p-1b276845.entry.js +2 -0
  104. package/dist/webcomponents/p-1b276845.entry.js.map +1 -0
  105. package/dist/webcomponents/p-5f162437.entry.js +2 -0
  106. package/dist/webcomponents/p-5f162437.entry.js.map +1 -0
  107. package/dist/webcomponents/p-6d857090.entry.js +2 -0
  108. package/dist/webcomponents/p-6d857090.entry.js.map +1 -0
  109. package/dist/webcomponents/p-a0b98f14.entry.js +2 -0
  110. package/dist/webcomponents/p-a0b98f14.entry.js.map +1 -0
  111. package/dist/webcomponents/p-a3d8d916.js +3 -0
  112. package/dist/webcomponents/p-a3d8d916.js.map +1 -0
  113. package/dist/webcomponents/p-e1255160.js +2 -0
  114. package/dist/webcomponents/p-e1255160.js.map +1 -0
  115. package/dist/webcomponents/p-ee6f4f3f.js +2 -0
  116. package/dist/webcomponents/p-ee6f4f3f.js.map +1 -0
  117. package/dist/webcomponents/webcomponents.esm.js +2 -0
  118. package/dist/webcomponents/webcomponents.esm.js.map +1 -0
  119. package/hydrate/index.d.ts +218 -0
  120. package/hydrate/index.js +14213 -0
  121. package/hydrate/package.json +6 -0
  122. package/loader/cdn.js +3 -0
  123. package/loader/index.cjs.js +3 -0
  124. package/loader/index.d.ts +21 -0
  125. package/loader/index.es2017.js +3 -0
  126. package/loader/index.js +4 -0
  127. package/loader/package.json +11 -0
  128. package/package.json +42 -86
  129. package/vscode-data.json +272 -0
  130. package/dist/webcomponents.common.js +0 -24619
  131. package/dist/webcomponents.common.js.map +0 -1
  132. package/dist/webcomponents.umd.js +0 -24630
  133. package/dist/webcomponents.umd.js.map +0 -1
  134. package/dist/webcomponents.umd.min.js +0 -10
  135. package/dist/webcomponents.umd.min.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"file":"button.js","mappings":"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","names":[],"sources":["src/components/button/button.scss?tag=br-button&encapsulation=shadow","src/components/button/button.tsx"],"sourcesContent":["@import \"../../../../../node_modules/@govbr-ds/core/src/components/button/button.scss\";\n@import \"../../../../../node_modules/@govbr-ds/core/src/components/loading/loading.scss\";\n\n:host {\n display: block;\n}\n","import { AttachInternals, Component, Element, Event, EventEmitter, Host, Prop, h } from '@stencil/core'\nimport { Attributes, inheritAriaAttributes } from '../../utils/inherited-attributes'\nimport { CssClassMap } from '../../utils/interfaces'\n\n/**\n * Consulte a [documentação GovBR-DS](https://www.gov.br/ds/components/button?tab=designer) para mais detalhes.\n *\n * @slot default Conteúdo do Button\n */\n@Component({\n tag: 'br-button',\n styleUrl: 'button.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Button {\n /** Elemento host */\n @Element() el: HTMLButtonElement\n\n @AttachInternals() elementInternals: ElementInternals\n\n /** Tipo: circular */\n @Prop({ reflect: true }) circle: boolean = false\n\n /** Ênfase */\n @Prop({ reflect: true }) emphasis: 'primary' | 'secondary' = null\n\n /** Comportamento: bloco */\n @Prop({ reflect: true }) block: boolean = false\n\n /** Comportamento: densidade */\n @Prop({ reflect: true }) density: 'small' | 'large' | null = null\n\n /** Estado: loading/progresso */\n @Prop({ reflect: true }) loading: boolean = false\n\n /** Estado: desabilitado */\n @Prop({ reflect: true }) disabled: boolean = false\n\n /** Estado: ativo */\n @Prop({ reflect: true }) active: boolean = false\n\n /** [Tipo](https://developer.mozilla.org/pt-BR/docs/Web/HTML/Element/button#type) do botão. */\n @Prop({ reflect: true }) type: 'button' | 'reset' | 'submit' = 'button'\n\n /** Valor do botão */\n @Prop({ reflect: true }) value: string\n\n /** Habilita botão para fundos escuros (dark mode/invertido) */\n @Prop({ reflect: true }) darkMode: boolean = false\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brConnectedCallback: EventEmitter<this>\n connectedCallback() {\n this.brConnectedCallback.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillLoad: EventEmitter<this>\n componentWillLoad() {\n this.brComponentWillLoad.emit(this)\n this.inheritedAttributes = inheritAriaAttributes(this.el)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidLoad: EventEmitter<this>\n componentDidLoad() {\n this.brComponentDidLoad.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillRender: EventEmitter<this>\n componentWillRender() {\n this.brComponentWillRender.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidRender: EventEmitter<this>\n componentDidRender() {\n this.brComponentDidRender.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentShouldUpdate: EventEmitter<this>\n componentShouldUpdate() {\n this.brComponentShouldUpdate.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentWillUpdate: EventEmitter<this>\n componentWillUpdate() {\n this.brComponentWillUpdate.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brComponentDidUpdate: EventEmitter<this>\n componentDidUpdate() {\n this.brComponentDidUpdate.emit(this)\n }\n\n /** Consulte a documentação do [StencilJS](https://stenciljs.com/docs/component-lifecycle#connectedcallback). */\n @Event() brDisconnectedCallback: EventEmitter<this>\n disconnectedCallback() {\n this.brDisconnectedCallback.emit(this)\n }\n\n /** Componente foi inserido em um `<form>` */\n @Event() formAssociatedCallback: EventEmitter<this>\n onFormAssociatedCallback(form) {\n this.formAssociatedCallback.emit(form)\n }\n\n /** Componente foi removido de um `<form>` */\n @Event() formDisassociatedCallback: EventEmitter<this>\n onFormDisassociatedCallback(form) {\n this.formDisassociatedCallback.emit(form)\n }\n\n private handleClick() {\n if (this.type === 'submit') {\n const submitEvent = new SubmitEvent('submit', {\n submitter: this.elementInternals.form,\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n this.elementInternals.form.dispatchEvent(submitEvent)\n }\n\n if (this.type === 'reset') {\n this.elementInternals.form.reset()\n }\n }\n\n private getCssClassMap(): CssClassMap {\n return {\n 'br-button': true,\n primary: this.emphasis === 'primary',\n secondary: this.emphasis === 'secondary',\n large: this.density === 'large',\n small: this.density === 'small',\n block: this.block,\n circle: this.circle,\n active: this.active,\n loading: this.loading,\n 'dark-mode': this.darkMode,\n }\n }\n\n private inheritedAttributes: Attributes = {}\n\n render() {\n return (\n <Host aria-disabled={this.disabled ? 'true' : null}>\n <button\n class={this.getCssClassMap()}\n type={this.type}\n disabled={this.disabled}\n value={this.value}\n onClick={() => this.handleClick()}\n {...this.inheritedAttributes}\n >\n <slot></slot>\n </button>\n </Host>\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,44 @@
1
+ /* webcomponents custom elements */
2
+ export { Button as BrButton } from '../types/components/button/button';
3
+ export { defineCustomElement as defineCustomElementBrButton } from './br-button';
4
+ export { Checkbox as BrCheckbox } from '../types/components/checkbox/checkbox';
5
+ export { defineCustomElement as defineCustomElementBrCheckbox } from './br-checkbox';
6
+ export { Input as BrInput } from '../types/components/input/input';
7
+ export { defineCustomElement as defineCustomElementBrInput } from './br-input';
8
+ export { Item as BrItem } from '../types/components/item/item';
9
+ export { defineCustomElement as defineCustomElementBrItem } from './br-item';
10
+
11
+ /**
12
+ * Get the base path to where the assets can be found. Use "setAssetPath(path)"
13
+ * if the path needs to be customized.
14
+ */
15
+ export declare const getAssetPath: (path: string) => string;
16
+
17
+ /**
18
+ * Used to manually set the base path where assets can be found.
19
+ * If the script is used as "module", it's recommended to use "import.meta.url",
20
+ * such as "setAssetPath(import.meta.url)". Other options include
21
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
22
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
23
+ * But do note that this configuration depends on how your script is bundled, or lack of
24
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
25
+ * will have to ensure the static assets are copied to its build directory.
26
+ */
27
+ export declare const setAssetPath: (path: string) => void;
28
+
29
+ /**
30
+ * Used to specify a nonce value that corresponds with an application's CSP.
31
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
32
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
33
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
34
+ * will result in the same behavior.
35
+ */
36
+ export declare const setNonce: (nonce: string) => void
37
+
38
+ export interface SetPlatformOptions {
39
+ raf?: (c: FrameRequestCallback) => number;
40
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
41
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
42
+ }
43
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
44
+ export * from '../types';
@@ -0,0 +1,7 @@
1
+ export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
+ export { BrButton, defineCustomElement as defineCustomElementBrButton } from './br-button.js';
3
+ export { BrCheckbox, defineCustomElement as defineCustomElementBrCheckbox } from './br-checkbox.js';
4
+ export { BrInput, defineCustomElement as defineCustomElementBrInput } from './br-input.js';
5
+ export { BrItem, defineCustomElement as defineCustomElementBrItem } from './br-item.js';
6
+
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"file":"index.js","mappings":";;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,101 @@
1
+ // This file was based on the core/utils/helpers from the Ionic Framework (MIT)
2
+ // https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts
3
+ /**
4
+ * List of available ARIA attributes + `role`.
5
+ * Removed deprecated attributes.
6
+ * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes
7
+ */
8
+ const ariaAttributes = [
9
+ 'role',
10
+ 'aria-activedescendant',
11
+ 'aria-atomic',
12
+ 'aria-autocomplete',
13
+ 'aria-braillelabel',
14
+ 'aria-brailleroledescription',
15
+ 'aria-busy',
16
+ 'aria-checked',
17
+ 'aria-colcount',
18
+ 'aria-colindex',
19
+ 'aria-colindextext',
20
+ 'aria-colspan',
21
+ 'aria-controls',
22
+ 'aria-current',
23
+ 'aria-describedby',
24
+ 'aria-description',
25
+ 'aria-details',
26
+ 'aria-disabled',
27
+ 'aria-errormessage',
28
+ 'aria-expanded',
29
+ 'aria-flowto',
30
+ 'aria-haspopup',
31
+ 'aria-hidden',
32
+ 'aria-invalid',
33
+ 'aria-keyshortcuts',
34
+ 'aria-label',
35
+ 'aria-labelledby',
36
+ 'aria-level',
37
+ 'aria-live',
38
+ 'aria-multiline',
39
+ 'aria-multiselectable',
40
+ 'aria-orientation',
41
+ 'aria-owns',
42
+ 'aria-placeholder',
43
+ 'aria-posinset',
44
+ 'aria-pressed',
45
+ 'aria-readonly',
46
+ 'aria-relevant',
47
+ 'aria-required',
48
+ 'aria-roledescription',
49
+ 'aria-rowcount',
50
+ 'aria-rowindex',
51
+ 'aria-rowindextext',
52
+ 'aria-rowspan',
53
+ 'aria-selected',
54
+ 'aria-setsize',
55
+ 'aria-sort',
56
+ 'aria-valuemax',
57
+ 'aria-valuemin',
58
+ 'aria-valuenow',
59
+ 'aria-valuetext',
60
+ ];
61
+ /**
62
+ * Elements inside of web components sometimes need to inherit global attributes
63
+ * set on the host. For example, the inner input in `ion-input` should inherit
64
+ * the `title` attribute that developers set directly on `ion-input`. This
65
+ * helper function should be called in componentWillLoad and assigned to a variable
66
+ * that is later used in the render function.
67
+ *
68
+ * This does not need to be reactive as changing attributes on the host element
69
+ * does not trigger a re-render.
70
+ */
71
+ const inheritAttributes = (el, attributes = []) => {
72
+ const attributeObject = {};
73
+ attributes.forEach((attr) => {
74
+ if (el.hasAttribute(attr)) {
75
+ const value = el.getAttribute(attr);
76
+ if (value !== null) {
77
+ attributeObject[attr] = el.getAttribute(attr);
78
+ }
79
+ el.removeAttribute(attr);
80
+ }
81
+ });
82
+ return attributeObject;
83
+ };
84
+ /**
85
+ * Returns an array of aria attributes that should be copied from
86
+ * the shadow host element to a target within the light DOM.
87
+ * @param el The element that the attributes should be copied from.
88
+ * @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.
89
+ * Use this in instances where we manually specify aria attributes on the `<Host>` element.
90
+ */
91
+ const inheritAriaAttributes = (el, ignoreList) => {
92
+ let attributesToInherit = ariaAttributes;
93
+ if (ignoreList && ignoreList.length > 0) {
94
+ attributesToInherit = attributesToInherit.filter((attr) => !ignoreList.includes(attr));
95
+ }
96
+ return inheritAttributes(el, attributesToInherit);
97
+ };
98
+
99
+ export { inheritAriaAttributes as i };
100
+
101
+ //# sourceMappingURL=inherited-attributes.js.map
@@ -0,0 +1 @@
1
+ {"file":"inherited-attributes.js","mappings":"AAAA;AACA;AAIA;;;;;AAKA,MAAM,cAAc,GAAG;IACrB,MAAM;IACN,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,6BAA6B;IAC7B,WAAW;IACX,cAAc;IACd,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb,eAAe;IACf,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,sBAAsB;IACtB,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,WAAW;IACX,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;CACjB,CAAA;AAED;;;;;;;;;;AAUO,MAAM,iBAAiB,GAAG,CAAC,EAAe,EAAE,aAAuB,EAAE;IAC1E,MAAM,eAAe,GAAe,EAAE,CAAA;IAEtC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI;QACtB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;YACzB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;YACnC,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;aAC9C;YACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;SACzB;KACF,CAAC,CAAA;IAEF,OAAO,eAAe,CAAA;AACxB,CAAC,CAAA;AAED;;;;;;;MAOa,qBAAqB,GAAG,CAAC,EAAe,EAAE,UAAqB;IAC1E,IAAI,mBAAmB,GAAG,cAAc,CAAA;IACxC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACvC,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;KACvF;IACD,OAAO,iBAAiB,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAA;AACnD;;;;","names":[],"sources":["src/utils/inherited-attributes.ts"],"sourcesContent":["// This file was based on the core/utils/helpers from the Ionic Framework (MIT)\n// https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts\n\nexport type Attributes = Record<string, any>\n\n/**\n * List of available ARIA attributes + `role`.\n * Removed deprecated attributes.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes\n */\nconst ariaAttributes = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n]\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: Attributes = {}\n\n attributes.forEach((attr) => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr)\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr)\n }\n el.removeAttribute(attr)\n }\n })\n\n return attributeObject\n}\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n * @param el The element that the attributes should be copied from.\n * @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.\n * Use this in instances where we manually specify aria attributes on the `<Host>` element.\n */\nexport const inheritAriaAttributes = (el: HTMLElement, ignoreList?: string[]) => {\n let attributesToInherit = ariaAttributes\n if (ignoreList && ignoreList.length > 0) {\n attributesToInherit = attributesToInherit.filter((attr) => !ignoreList.includes(attr))\n }\n return inheritAttributes(el, attributesToInherit)\n}\n"],"version":3}
@@ -0,0 +1,5 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };
4
+
5
+ //# sourceMappingURL=app-globals-0f993ce5.js.map
@@ -0,0 +1 @@
1
+ {"file":"app-globals-0f993ce5.js","mappings":"AAAY,MAAC,aAAa,GAAG,MAAM;;;;","names":[],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["export const globalScripts = () => {};\n"],"version":3}