@govbr-ds/webcomponents 2.0.0-next.21 → 2.0.0-next.23
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.
- package/LICENSE +1 -1
- package/README.md +99 -90
- package/package.json +16 -52
- package/dist/cjs/app-globals-77a217c6.js +0 -11
- package/dist/cjs/app-globals-77a217c6.js.map +0 -1
- package/dist/cjs/br-avatar.cjs.entry.js +0 -77
- package/dist/cjs/br-avatar.cjs.entry.js.map +0 -1
- package/dist/cjs/br-button_2.cjs.entry.js +0 -2491
- package/dist/cjs/br-button_2.cjs.entry.js.map +0 -1
- package/dist/cjs/br-checkbox_4.cjs.entry.js +0 -346
- package/dist/cjs/br-checkbox_4.cjs.entry.js.map +0 -1
- package/dist/cjs/br-dropdown.cjs.entry.js +0 -100
- package/dist/cjs/br-dropdown.cjs.entry.js.map +0 -1
- package/dist/cjs/br-item.cjs.entry.js +0 -146
- package/dist/cjs/br-item.cjs.entry.js.map +0 -1
- package/dist/cjs/br-loading.cjs.entry.js +0 -43
- package/dist/cjs/br-loading.cjs.entry.js.map +0 -1
- package/dist/cjs/br-message.cjs.entry.js +0 -68
- package/dist/cjs/br-message.cjs.entry.js.map +0 -1
- package/dist/cjs/br-select.cjs.entry.js +0 -281
- package/dist/cjs/br-select.cjs.entry.js.map +0 -1
- package/dist/cjs/br-switch.cjs.entry.js +0 -81
- package/dist/cjs/br-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/br-tag.cjs.entry.js +0 -88
- package/dist/cjs/br-tag.cjs.entry.js.map +0 -1
- package/dist/cjs/br-textarea.cjs.entry.js +0 -102
- package/dist/cjs/br-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/br-upload.cjs.entry.js +0 -168
- package/dist/cjs/br-upload.cjs.entry.js.map +0 -1
- package/dist/cjs/index-86e7422e.js +0 -1856
- package/dist/cjs/index-86e7422e.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -8
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/inherited-attributes-16f7d388.js +0 -107
- package/dist/cjs/inherited-attributes-16f7d388.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/v4-2a0fe526.js +0 -74
- package/dist/cjs/v4-2a0fe526.js.map +0 -1
- package/dist/cjs/webcomponents.cjs.js +0 -52
- package/dist/cjs/webcomponents.cjs.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -27
- package/dist/collection/components/avatar/avatar.css +0 -540
- package/dist/collection/components/avatar/avatar.js +0 -222
- package/dist/collection/components/avatar/avatar.js.map +0 -1
- package/dist/collection/components/button/button.css +0 -802
- package/dist/collection/components/button/button.js +0 -236
- package/dist/collection/components/button/button.js.map +0 -1
- package/dist/collection/components/checkbox/checkbox.css +0 -597
- package/dist/collection/components/checkbox/checkbox.js +0 -279
- package/dist/collection/components/checkbox/checkbox.js.map +0 -1
- package/dist/collection/components/dropdown/dropdown.css +0 -467
- package/dist/collection/components/dropdown/dropdown.js +0 -185
- package/dist/collection/components/dropdown/dropdown.js.map +0 -1
- package/dist/collection/components/icon/icon.css +0 -452
- package/dist/collection/components/icon/icon.js +0 -176
- package/dist/collection/components/icon/icon.js.map +0 -1
- package/dist/collection/components/input/input.css +0 -673
- package/dist/collection/components/input/input.js +0 -580
- package/dist/collection/components/input/input.js.map +0 -1
- package/dist/collection/components/item/item.css +0 -662
- package/dist/collection/components/item/item.js +0 -376
- package/dist/collection/components/item/item.js.map +0 -1
- package/dist/collection/components/list/list.css +0 -564
- package/dist/collection/components/list/list.js +0 -138
- package/dist/collection/components/list/list.js.map +0 -1
- package/dist/collection/components/loading/loading.css +0 -653
- package/dist/collection/components/loading/loading.js +0 -119
- package/dist/collection/components/loading/loading.js.map +0 -1
- package/dist/collection/components/message/message.css +0 -600
- package/dist/collection/components/message/message.js +0 -211
- package/dist/collection/components/message/message.js.map +0 -1
- package/dist/collection/components/radio/radio.css +0 -552
- package/dist/collection/components/radio/radio.js +0 -247
- package/dist/collection/components/radio/radio.js.map +0 -1
- package/dist/collection/components/select/select.css +0 -857
- package/dist/collection/components/select/select.js +0 -491
- package/dist/collection/components/select/select.js.map +0 -1
- package/dist/collection/components/switch/switch.css +0 -623
- package/dist/collection/components/switch/switch.js +0 -320
- package/dist/collection/components/switch/switch.js.map +0 -1
- package/dist/collection/components/tag/tag.css +0 -645
- package/dist/collection/components/tag/tag.js +0 -256
- package/dist/collection/components/tag/tag.js.map +0 -1
- package/dist/collection/components/textarea/textarea.css +0 -518
- package/dist/collection/components/textarea/textarea.js +0 -298
- package/dist/collection/components/textarea/textarea.js.map +0 -1
- package/dist/collection/components/upload/upload.css +0 -562
- package/dist/collection/components/upload/upload.js +0 -469
- package/dist/collection/components/upload/upload.js.map +0 -1
- package/dist/collection/index.js +0 -2
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/pages/components/button/index.js +0 -18
- package/dist/collection/pages/components/checkbox/index.js +0 -18
- package/dist/collection/pages/components/dropdown/index.js +0 -18
- package/dist/collection/pages/components/icon/index.js +0 -18
- package/dist/collection/pages/components/input/index.js +0 -27
- package/dist/collection/pages/components/item/index.js +0 -18
- package/dist/collection/pages/components/list/index.js +0 -19
- package/dist/collection/pages/components/message/index.js +0 -18
- package/dist/collection/pages/components/radio/index.js +0 -18
- package/dist/collection/pages/components/select/index.js +0 -18
- package/dist/collection/pages/components/switch/index.js +0 -18
- package/dist/collection/pages/components/tag/index.js +0 -18
- package/dist/collection/pages/components/textarea/index.js +0 -19
- package/dist/collection/pages/components/upload/index.js +0 -19
- package/dist/collection/pages/scripts/menu.js +0 -226
- package/dist/collection/pages/scripts/pageLoader.js +0 -180
- package/dist/collection/scripts/menu.js +0 -151
- package/dist/collection/utils/inherited-attributes.js +0 -102
- package/dist/collection/utils/inherited-attributes.js.map +0 -1
- package/dist/collection/utils/interfaces.js +0 -2
- package/dist/collection/utils/interfaces.js.map +0 -1
- package/dist/collection/utils/unique-id-generator.js +0 -13
- package/dist/collection/utils/unique-id-generator.js.map +0 -1
- package/dist/components/br-avatar.d.ts +0 -11
- package/dist/components/br-avatar.js +0 -6
- package/dist/components/br-avatar.js.map +0 -1
- package/dist/components/br-button.d.ts +0 -11
- package/dist/components/br-button.js +0 -6
- package/dist/components/br-button.js.map +0 -1
- package/dist/components/br-checkbox.d.ts +0 -11
- package/dist/components/br-checkbox.js +0 -6
- package/dist/components/br-checkbox.js.map +0 -1
- package/dist/components/br-dropdown.d.ts +0 -11
- package/dist/components/br-dropdown.js +0 -6
- package/dist/components/br-dropdown.js.map +0 -1
- package/dist/components/br-icon.d.ts +0 -11
- package/dist/components/br-icon.js +0 -6
- package/dist/components/br-icon.js.map +0 -1
- package/dist/components/br-input.d.ts +0 -11
- package/dist/components/br-input.js +0 -6
- package/dist/components/br-input.js.map +0 -1
- package/dist/components/br-item.d.ts +0 -11
- package/dist/components/br-item.js +0 -6
- package/dist/components/br-item.js.map +0 -1
- package/dist/components/br-list.d.ts +0 -11
- package/dist/components/br-list.js +0 -6
- package/dist/components/br-list.js.map +0 -1
- package/dist/components/br-loading.d.ts +0 -11
- package/dist/components/br-loading.js +0 -6
- package/dist/components/br-loading.js.map +0 -1
- package/dist/components/br-message.d.ts +0 -11
- package/dist/components/br-message.js +0 -6
- package/dist/components/br-message.js.map +0 -1
- package/dist/components/br-radio.d.ts +0 -11
- package/dist/components/br-radio.js +0 -6
- package/dist/components/br-radio.js.map +0 -1
- package/dist/components/br-select.d.ts +0 -11
- package/dist/components/br-select.js +0 -6
- package/dist/components/br-select.js.map +0 -1
- package/dist/components/br-switch.d.ts +0 -11
- package/dist/components/br-switch.js +0 -6
- package/dist/components/br-switch.js.map +0 -1
- package/dist/components/br-tag.d.ts +0 -11
- package/dist/components/br-tag.js +0 -6
- package/dist/components/br-tag.js.map +0 -1
- package/dist/components/br-textarea.d.ts +0 -11
- package/dist/components/br-textarea.js +0 -6
- package/dist/components/br-textarea.js.map +0 -1
- package/dist/components/br-upload.d.ts +0 -11
- package/dist/components/br-upload.js +0 -6
- package/dist/components/br-upload.js.map +0 -1
- package/dist/components/index.d.ts +0 -33
- package/dist/components/index.js +0 -6
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-22068d3c.js +0 -6
- package/dist/components/p-22068d3c.js.map +0 -1
- package/dist/components/p-62776355.js +0 -6
- package/dist/components/p-62776355.js.map +0 -1
- package/dist/components/p-67617725.js +0 -6
- package/dist/components/p-67617725.js.map +0 -1
- package/dist/components/p-74a4eb38.js +0 -6
- package/dist/components/p-74a4eb38.js.map +0 -1
- package/dist/components/p-7882cb21.js +0 -6
- package/dist/components/p-7882cb21.js.map +0 -1
- package/dist/components/p-7aca304a.js +0 -6
- package/dist/components/p-7aca304a.js.map +0 -1
- package/dist/components/p-b4b55ab7.js +0 -17
- package/dist/components/p-b4b55ab7.js.map +0 -1
- package/dist/components/p-d5a8d30c.js +0 -6
- package/dist/components/p-d5a8d30c.js.map +0 -1
- package/dist/components/p-fabd9bdd.js +0 -7
- package/dist/components/p-fabd9bdd.js.map +0 -1
- package/dist/esm/app-globals-72548b13.js +0 -9
- package/dist/esm/app-globals-72548b13.js.map +0 -1
- package/dist/esm/br-avatar.entry.js +0 -73
- package/dist/esm/br-avatar.entry.js.map +0 -1
- package/dist/esm/br-button_2.entry.js +0 -2486
- package/dist/esm/br-button_2.entry.js.map +0 -1
- package/dist/esm/br-checkbox_4.entry.js +0 -339
- package/dist/esm/br-checkbox_4.entry.js.map +0 -1
- package/dist/esm/br-dropdown.entry.js +0 -96
- package/dist/esm/br-dropdown.entry.js.map +0 -1
- package/dist/esm/br-item.entry.js +0 -142
- package/dist/esm/br-item.entry.js.map +0 -1
- package/dist/esm/br-loading.entry.js +0 -39
- package/dist/esm/br-loading.entry.js.map +0 -1
- package/dist/esm/br-message.entry.js +0 -64
- package/dist/esm/br-message.entry.js.map +0 -1
- package/dist/esm/br-select.entry.js +0 -277
- package/dist/esm/br-select.entry.js.map +0 -1
- package/dist/esm/br-switch.entry.js +0 -77
- package/dist/esm/br-switch.entry.js.map +0 -1
- package/dist/esm/br-tag.entry.js +0 -84
- package/dist/esm/br-tag.entry.js.map +0 -1
- package/dist/esm/br-textarea.entry.js +0 -98
- package/dist/esm/br-textarea.entry.js.map +0 -1
- package/dist/esm/br-upload.entry.js +0 -164
- package/dist/esm/br-upload.entry.js.map +0 -1
- package/dist/esm/index-14721f44.js +0 -1826
- package/dist/esm/index-14721f44.js.map +0 -1
- package/dist/esm/index.js +0 -6
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/inherited-attributes-553a7c36.js +0 -105
- package/dist/esm/inherited-attributes-553a7c36.js.map +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/v4-c99c1585.js +0 -72
- package/dist/esm/v4-c99c1585.js.map +0 -1
- package/dist/esm/webcomponents.js +0 -47
- package/dist/esm/webcomponents.js.map +0 -1
- package/dist/esm-es5/app-globals-72548b13.js +0 -6
- package/dist/esm-es5/app-globals-72548b13.js.map +0 -1
- package/dist/esm-es5/br-avatar.entry.js +0 -6
- package/dist/esm-es5/br-avatar.entry.js.map +0 -1
- package/dist/esm-es5/br-button_2.entry.js +0 -17
- package/dist/esm-es5/br-button_2.entry.js.map +0 -1
- package/dist/esm-es5/br-checkbox_4.entry.js +0 -6
- package/dist/esm-es5/br-checkbox_4.entry.js.map +0 -1
- package/dist/esm-es5/br-dropdown.entry.js +0 -6
- package/dist/esm-es5/br-dropdown.entry.js.map +0 -1
- package/dist/esm-es5/br-item.entry.js +0 -6
- package/dist/esm-es5/br-item.entry.js.map +0 -1
- package/dist/esm-es5/br-loading.entry.js +0 -6
- package/dist/esm-es5/br-loading.entry.js.map +0 -1
- package/dist/esm-es5/br-message.entry.js +0 -6
- package/dist/esm-es5/br-message.entry.js.map +0 -1
- package/dist/esm-es5/br-select.entry.js +0 -6
- package/dist/esm-es5/br-select.entry.js.map +0 -1
- package/dist/esm-es5/br-switch.entry.js +0 -6
- package/dist/esm-es5/br-switch.entry.js.map +0 -1
- package/dist/esm-es5/br-tag.entry.js +0 -6
- package/dist/esm-es5/br-tag.entry.js.map +0 -1
- package/dist/esm-es5/br-textarea.entry.js +0 -6
- package/dist/esm-es5/br-textarea.entry.js.map +0 -1
- package/dist/esm-es5/br-upload.entry.js +0 -6
- package/dist/esm-es5/br-upload.entry.js.map +0 -1
- package/dist/esm-es5/index-14721f44.js +0 -6
- package/dist/esm-es5/index-14721f44.js.map +0 -1
- package/dist/esm-es5/index.js +0 -5
- package/dist/esm-es5/index.js.map +0 -1
- package/dist/esm-es5/inherited-attributes-553a7c36.js +0 -6
- package/dist/esm-es5/inherited-attributes-553a7c36.js.map +0 -1
- package/dist/esm-es5/loader.js +0 -6
- package/dist/esm-es5/loader.js.map +0 -1
- package/dist/esm-es5/v4-c99c1585.js +0 -6
- package/dist/esm-es5/v4-c99c1585.js.map +0 -1
- package/dist/esm-es5/webcomponents.js +0 -6
- package/dist/esm-es5/webcomponents.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/playwright.config.js +0 -39
- package/dist/playwright.config.js.map +0 -1
- package/dist/types/builds/govbr-ds/bibliotecas/wbc/govbr-ds-wbc/packages/webcomponents/.stencil/playwright.config.d.ts +0 -5
- package/dist/types/components/avatar/avatar.d.ts +0 -60
- package/dist/types/components/button/button.d.ts +0 -64
- package/dist/types/components/checkbox/checkbox.d.ts +0 -78
- package/dist/types/components/dropdown/dropdown.d.ts +0 -64
- package/dist/types/components/icon/icon.d.ts +0 -58
- package/dist/types/components/input/input.d.ts +0 -151
- package/dist/types/components/item/item.d.ts +0 -96
- package/dist/types/components/list/list.d.ts +0 -34
- package/dist/types/components/loading/loading.d.ts +0 -34
- package/dist/types/components/message/message.d.ts +0 -62
- package/dist/types/components/radio/radio.d.ts +0 -75
- package/dist/types/components/select/select.d.ts +0 -98
- package/dist/types/components/switch/switch.d.ts +0 -78
- package/dist/types/components/tag/tag.d.ts +0 -73
- package/dist/types/components/textarea/textarea.d.ts +0 -66
- package/dist/types/components/upload/upload.d.ts +0 -160
- package/dist/types/components.d.ts +0 -1790
- package/dist/types/index.d.ts +0 -10
- package/dist/types/stencil-public-runtime.d.ts +0 -1680
- package/dist/types/utils/inherited-attributes.d.ts +0 -20
- package/dist/types/utils/interfaces.d.ts +0 -3
- package/dist/types/utils/unique-id-generator.d.ts +0 -1
- package/dist/webcomponents/index.esm.js +0 -6
- package/dist/webcomponents/index.esm.js.map +0 -1
- package/dist/webcomponents/p-11e8c72f.entry.js +0 -6
- package/dist/webcomponents/p-11e8c72f.entry.js.map +0 -1
- package/dist/webcomponents/p-1accc2ab.system.entry.js +0 -6
- package/dist/webcomponents/p-1accc2ab.system.entry.js.map +0 -1
- package/dist/webcomponents/p-254a2b7c.js +0 -6
- package/dist/webcomponents/p-254a2b7c.js.map +0 -1
- package/dist/webcomponents/p-36e48582.system.entry.js +0 -6
- package/dist/webcomponents/p-36e48582.system.entry.js.map +0 -1
- package/dist/webcomponents/p-37440256.entry.js +0 -6
- package/dist/webcomponents/p-37440256.entry.js.map +0 -1
- package/dist/webcomponents/p-44554246.system.entry.js +0 -6
- package/dist/webcomponents/p-44554246.system.entry.js.map +0 -1
- package/dist/webcomponents/p-55f80a96.system.entry.js +0 -6
- package/dist/webcomponents/p-55f80a96.system.entry.js.map +0 -1
- package/dist/webcomponents/p-563bea26.entry.js +0 -6
- package/dist/webcomponents/p-563bea26.entry.js.map +0 -1
- package/dist/webcomponents/p-58d37ac2.entry.js +0 -6
- package/dist/webcomponents/p-58d37ac2.entry.js.map +0 -1
- package/dist/webcomponents/p-64f4ecea.system.entry.js +0 -6
- package/dist/webcomponents/p-64f4ecea.system.entry.js.map +0 -1
- package/dist/webcomponents/p-6e286eba.system.js +0 -6
- package/dist/webcomponents/p-6e286eba.system.js.map +0 -1
- package/dist/webcomponents/p-703a633a.system.js +0 -6
- package/dist/webcomponents/p-703a633a.system.js.map +0 -1
- package/dist/webcomponents/p-74a4eb38.js +0 -6
- package/dist/webcomponents/p-74a4eb38.js.map +0 -1
- package/dist/webcomponents/p-76326737.system.entry.js +0 -6
- package/dist/webcomponents/p-76326737.system.entry.js.map +0 -1
- package/dist/webcomponents/p-797376a2.system.entry.js +0 -17
- package/dist/webcomponents/p-797376a2.system.entry.js.map +0 -1
- package/dist/webcomponents/p-7f8c5016.entry.js +0 -6
- package/dist/webcomponents/p-7f8c5016.entry.js.map +0 -1
- package/dist/webcomponents/p-90e2e623.system.js +0 -6
- package/dist/webcomponents/p-90e2e623.system.js.map +0 -1
- package/dist/webcomponents/p-a44ad074.entry.js +0 -6
- package/dist/webcomponents/p-a44ad074.entry.js.map +0 -1
- package/dist/webcomponents/p-a71689a5.system.js +0 -6
- package/dist/webcomponents/p-a71689a5.system.js.map +0 -1
- package/dist/webcomponents/p-aaa17439.entry.js +0 -6
- package/dist/webcomponents/p-aaa17439.entry.js.map +0 -1
- package/dist/webcomponents/p-aaca726d.system.js +0 -7
- package/dist/webcomponents/p-aaca726d.system.js.map +0 -1
- package/dist/webcomponents/p-aec894fa.system.entry.js +0 -6
- package/dist/webcomponents/p-aec894fa.system.entry.js.map +0 -1
- package/dist/webcomponents/p-b16b1de5.entry.js +0 -6
- package/dist/webcomponents/p-b16b1de5.entry.js.map +0 -1
- package/dist/webcomponents/p-b6af61ad.entry.js +0 -6
- package/dist/webcomponents/p-b6af61ad.entry.js.map +0 -1
- package/dist/webcomponents/p-c696c385.entry.js +0 -17
- package/dist/webcomponents/p-c696c385.entry.js.map +0 -1
- package/dist/webcomponents/p-d1e0a8ff.entry.js +0 -6
- package/dist/webcomponents/p-d1e0a8ff.entry.js.map +0 -1
- package/dist/webcomponents/p-d31732da.system.entry.js +0 -6
- package/dist/webcomponents/p-d31732da.system.entry.js.map +0 -1
- package/dist/webcomponents/p-d5a8d30c.js +0 -6
- package/dist/webcomponents/p-d5a8d30c.js.map +0 -1
- package/dist/webcomponents/p-db4b272c.system.entry.js +0 -6
- package/dist/webcomponents/p-db4b272c.system.entry.js.map +0 -1
- package/dist/webcomponents/p-dbd35139.js +0 -7
- package/dist/webcomponents/p-dbd35139.js.map +0 -1
- package/dist/webcomponents/p-e751c991.system.js +0 -6
- package/dist/webcomponents/p-e751c991.system.js.map +0 -1
- package/dist/webcomponents/p-e76f7113.system.entry.js +0 -6
- package/dist/webcomponents/p-e76f7113.system.entry.js.map +0 -1
- package/dist/webcomponents/p-f05d11f7.entry.js +0 -6
- package/dist/webcomponents/p-f05d11f7.entry.js.map +0 -1
- package/dist/webcomponents/p-f5412db6.system.entry.js +0 -6
- package/dist/webcomponents/p-f5412db6.system.entry.js.map +0 -1
- package/dist/webcomponents/webcomponents.esm.js +0 -6
- package/dist/webcomponents/webcomponents.esm.js.map +0 -1
- package/dist/webcomponents/webcomponents.js +0 -127
- package/hydrate/index.d.ts +0 -242
- package/hydrate/index.js +0 -22414
- package/hydrate/index.mjs +0 -22406
- package/hydrate/package.json +0 -12
- package/loader/cdn.js +0 -6
- package/loader/index.cjs.js +0 -6
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -6
- package/loader/index.js +0 -7
- package/loader/package.json +0 -11
- package/vscode-data.json +0 -960
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Construído com @govbr-ds/webcomponents
|
|
3
|
-
* Padrão Digital de Governo.
|
|
4
|
-
*/
|
|
5
|
-
import { h, Host } from "@stencil/core";
|
|
6
|
-
import { inheritAriaAttributes } from "../../utils/inherited-attributes";
|
|
7
|
-
/**
|
|
8
|
-
* Para uma descrição detalhada, consulte a [documentação do GovBR-DS](https://www.gov.br/ds/components/avatar?tab=designer).
|
|
9
|
-
*/
|
|
10
|
-
export class Avatar {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.iconSizes = {
|
|
13
|
-
small: { height: '32px', width: '40px' },
|
|
14
|
-
medium: { height: '80px', width: '88px' },
|
|
15
|
-
large: { height: '128px', width: '136px' },
|
|
16
|
-
};
|
|
17
|
-
this.iconMarginTops = {
|
|
18
|
-
small: '0.7em',
|
|
19
|
-
medium: '1em',
|
|
20
|
-
large: '0.62em',
|
|
21
|
-
};
|
|
22
|
-
this.inheritedAttributes = {};
|
|
23
|
-
this.density = 'medium';
|
|
24
|
-
this.image = undefined;
|
|
25
|
-
this.imageAlt = 'Imagem do avatar';
|
|
26
|
-
this.isIconic = false;
|
|
27
|
-
this.text = undefined;
|
|
28
|
-
this.iconWidth = undefined;
|
|
29
|
-
this.iconHeight = undefined;
|
|
30
|
-
this.marginTop = undefined;
|
|
31
|
-
}
|
|
32
|
-
componentWillLoad() {
|
|
33
|
-
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Gera um mapa de classes CSS com base nas propriedades do componente.
|
|
37
|
-
* O mapa de classes determina quais classes CSS devem ser aplicadas
|
|
38
|
-
* ao elemento host do componente, ajustando sua aparência.
|
|
39
|
-
*
|
|
40
|
-
* @returns {CssClassMap} Objeto contendo as classes CSS aplicadas.
|
|
41
|
-
*/
|
|
42
|
-
getCssClassMap() {
|
|
43
|
-
return {
|
|
44
|
-
'br-avatar': true,
|
|
45
|
-
small: this.density === 'small',
|
|
46
|
-
medium: this.density === 'medium',
|
|
47
|
-
large: this.density === 'large',
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
renderAvatar() {
|
|
51
|
-
var _a, _b, _c, _d, _e;
|
|
52
|
-
if (((_a = this.text) === null || _a === void 0 ? void 0 : _a.trim().length) > 0) {
|
|
53
|
-
return (h("span", { class: "content bg-support-01 text-pure-0", title: this.text }, this.text[0].toUpperCase()));
|
|
54
|
-
}
|
|
55
|
-
if (((_b = this.image) === null || _b === void 0 ? void 0 : _b.trim().length) > 0) {
|
|
56
|
-
return (h("span", { class: "content", title: this.imageAlt || this.text }, h("img", { src: this.image, alt: this.imageAlt, loading: "lazy" })));
|
|
57
|
-
}
|
|
58
|
-
if (this.isIconic) {
|
|
59
|
-
return (h("span", { class: "content", title: this.text }, h("br-icon", { "icon-name": "fa-solid:user", height: ((_c = this.iconHeight) === null || _c === void 0 ? void 0 : _c.length) > 0 ? this.iconHeight : this.iconSizes[this.density].height, width: ((_d = this.iconWidth) === null || _d === void 0 ? void 0 : _d.length) > 0 ? this.iconWidth : this.iconSizes[this.density].width, "aria-hidden": "true", style: { 'margin-top': ((_e = this.marginTop) === null || _e === void 0 ? void 0 : _e.length) > 0 ? this.marginTop : this.iconMarginTops[this.density] } })));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
render() {
|
|
63
|
-
return (h(Host, { key: '8e7d5a109467811e371dcfa56214f079b82970bb' }, h("span", Object.assign({ key: '63036c324a6be24469e6453a40af31e684973c1a', class: this.getCssClassMap() }, this.inheritedAttributes), this.renderAvatar())));
|
|
64
|
-
}
|
|
65
|
-
static get is() { return "br-avatar"; }
|
|
66
|
-
static get encapsulation() { return "shadow"; }
|
|
67
|
-
static get originalStyleUrls() {
|
|
68
|
-
return {
|
|
69
|
-
"$": ["avatar.scss"]
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
static get styleUrls() {
|
|
73
|
-
return {
|
|
74
|
-
"$": ["avatar.css"]
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
static get properties() {
|
|
78
|
-
return {
|
|
79
|
-
"density": {
|
|
80
|
-
"type": "string",
|
|
81
|
-
"mutable": false,
|
|
82
|
-
"complexType": {
|
|
83
|
-
"original": "'small' | 'medium' | 'large'",
|
|
84
|
-
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
85
|
-
"references": {}
|
|
86
|
-
},
|
|
87
|
-
"required": false,
|
|
88
|
-
"optional": false,
|
|
89
|
-
"docs": {
|
|
90
|
-
"tags": [],
|
|
91
|
-
"text": "Ajusta a densidade, alterando o espa\u00E7amento interno para um visual mais compacto ou mais expandido."
|
|
92
|
-
},
|
|
93
|
-
"attribute": "density",
|
|
94
|
-
"reflect": false,
|
|
95
|
-
"defaultValue": "'medium'"
|
|
96
|
-
},
|
|
97
|
-
"image": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"mutable": false,
|
|
100
|
-
"complexType": {
|
|
101
|
-
"original": "string",
|
|
102
|
-
"resolved": "string",
|
|
103
|
-
"references": {}
|
|
104
|
-
},
|
|
105
|
-
"required": false,
|
|
106
|
-
"optional": false,
|
|
107
|
-
"docs": {
|
|
108
|
-
"tags": [],
|
|
109
|
-
"text": "URL da imagem a ser exibida no avatar do tipo 'fotogr\u00E1fico'.\nDeve ser uma URL v\u00E1lida que aponta para a imagem desejada."
|
|
110
|
-
},
|
|
111
|
-
"attribute": "image",
|
|
112
|
-
"reflect": false
|
|
113
|
-
},
|
|
114
|
-
"imageAlt": {
|
|
115
|
-
"type": "string",
|
|
116
|
-
"mutable": false,
|
|
117
|
-
"complexType": {
|
|
118
|
-
"original": "string",
|
|
119
|
-
"resolved": "string",
|
|
120
|
-
"references": {}
|
|
121
|
-
},
|
|
122
|
-
"required": false,
|
|
123
|
-
"optional": false,
|
|
124
|
-
"docs": {
|
|
125
|
-
"tags": [],
|
|
126
|
-
"text": "Texto alternativo (alt) associado \u00E0 imagem do avatar. Essencial para acessibilidade e SEO.\nDeve descrever de forma clara e concisa o conte\u00FAdo da imagem, por exemplo: \"Foto de perfil de Jo\u00E3o Silva\"."
|
|
127
|
-
},
|
|
128
|
-
"attribute": "image-alt",
|
|
129
|
-
"reflect": false,
|
|
130
|
-
"defaultValue": "'Imagem do avatar'"
|
|
131
|
-
},
|
|
132
|
-
"isIconic": {
|
|
133
|
-
"type": "boolean",
|
|
134
|
-
"mutable": false,
|
|
135
|
-
"complexType": {
|
|
136
|
-
"original": "boolean",
|
|
137
|
-
"resolved": "boolean",
|
|
138
|
-
"references": {}
|
|
139
|
-
},
|
|
140
|
-
"required": false,
|
|
141
|
-
"optional": false,
|
|
142
|
-
"docs": {
|
|
143
|
-
"tags": [],
|
|
144
|
-
"text": "Indica se o avatar deve ser exibido como um \u00EDcone em vez de uma imagem fotogr\u00E1fica.\nSe definido como verdadeiro, o avatar ser\u00E1 exibido como um \u00EDcone."
|
|
145
|
-
},
|
|
146
|
-
"attribute": "is-iconic",
|
|
147
|
-
"reflect": false,
|
|
148
|
-
"defaultValue": "false"
|
|
149
|
-
},
|
|
150
|
-
"text": {
|
|
151
|
-
"type": "string",
|
|
152
|
-
"mutable": false,
|
|
153
|
-
"complexType": {
|
|
154
|
-
"original": "string",
|
|
155
|
-
"resolved": "string",
|
|
156
|
-
"references": {}
|
|
157
|
-
},
|
|
158
|
-
"required": false,
|
|
159
|
-
"optional": false,
|
|
160
|
-
"docs": {
|
|
161
|
-
"tags": [],
|
|
162
|
-
"text": "Texto exibido no avatar do tipo 'letra'.\nEsse texto ser\u00E1 mostrado em vez de uma imagem e pode ser usado para representar iniciais ou outras informa\u00E7\u00F5es textuais."
|
|
163
|
-
},
|
|
164
|
-
"attribute": "text",
|
|
165
|
-
"reflect": false
|
|
166
|
-
},
|
|
167
|
-
"iconWidth": {
|
|
168
|
-
"type": "string",
|
|
169
|
-
"mutable": false,
|
|
170
|
-
"complexType": {
|
|
171
|
-
"original": "string",
|
|
172
|
-
"resolved": "string",
|
|
173
|
-
"references": {}
|
|
174
|
-
},
|
|
175
|
-
"required": false,
|
|
176
|
-
"optional": false,
|
|
177
|
-
"docs": {
|
|
178
|
-
"tags": [],
|
|
179
|
-
"text": "Largura do \u00EDcone no avatar do tipo ic\u00F4nico"
|
|
180
|
-
},
|
|
181
|
-
"attribute": "icon-width",
|
|
182
|
-
"reflect": false
|
|
183
|
-
},
|
|
184
|
-
"iconHeight": {
|
|
185
|
-
"type": "string",
|
|
186
|
-
"mutable": false,
|
|
187
|
-
"complexType": {
|
|
188
|
-
"original": "string",
|
|
189
|
-
"resolved": "string",
|
|
190
|
-
"references": {}
|
|
191
|
-
},
|
|
192
|
-
"required": false,
|
|
193
|
-
"optional": false,
|
|
194
|
-
"docs": {
|
|
195
|
-
"tags": [],
|
|
196
|
-
"text": "Altura do \u00EDcone no avatar do tipo ic\u00F4nico"
|
|
197
|
-
},
|
|
198
|
-
"attribute": "icon-height",
|
|
199
|
-
"reflect": false
|
|
200
|
-
},
|
|
201
|
-
"marginTop": {
|
|
202
|
-
"type": "string",
|
|
203
|
-
"mutable": false,
|
|
204
|
-
"complexType": {
|
|
205
|
-
"original": "string",
|
|
206
|
-
"resolved": "string",
|
|
207
|
-
"references": {}
|
|
208
|
-
},
|
|
209
|
-
"required": false,
|
|
210
|
-
"optional": false,
|
|
211
|
-
"docs": {
|
|
212
|
-
"tags": [],
|
|
213
|
-
"text": "Ajuste para a margem de cima do \u00EDcone no avatar do tipo ic\u00F4nico"
|
|
214
|
-
},
|
|
215
|
-
"attribute": "margin-top",
|
|
216
|
-
"reflect": false
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
static get elementRef() { return "el"; }
|
|
221
|
-
}
|
|
222
|
-
//# sourceMappingURL=avatar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core'\nimport { Attributes, inheritAriaAttributes } from '../../utils/inherited-attributes'\nimport { CssClassMap } from '../../utils/interfaces'\n\n/**\n * Para uma descrição detalhada, consulte a [documentação do GovBR-DS](https://www.gov.br/ds/components/avatar?tab=designer).\n */\n@Component({\n tag: 'br-avatar',\n styleUrl: 'avatar.scss',\n shadow: true,\n})\nexport class Avatar {\n /**\n * Referência ao elemento host do componente.\n * Utilize esta propriedade para acessar e manipular o elemento do DOM associado ao componente.\n */\n @Element() el: HTMLBrAvatarElement\n\n /**\n * Ajusta a densidade, alterando o espaçamento interno para um visual mais compacto ou mais expandido.\n */\n @Prop() density: 'small' | 'medium' | 'large' = 'medium'\n\n /**\n * URL da imagem a ser exibida no avatar do tipo 'fotográfico'.\n * Deve ser uma URL válida que aponta para a imagem desejada.\n */\n @Prop() image: string\n\n /**\n * Texto alternativo (alt) associado à imagem do avatar. Essencial para acessibilidade e SEO.\n * Deve descrever de forma clara e concisa o conteúdo da imagem, por exemplo: \"Foto de perfil de João Silva\".\n */\n @Prop() imageAlt = 'Imagem do avatar'\n\n /**\n * Indica se o avatar deve ser exibido como um ícone em vez de uma imagem fotográfica.\n * Se definido como verdadeiro, o avatar será exibido como um ícone.\n */\n @Prop() isIconic: boolean = false\n\n /**\n * Texto exibido no avatar do tipo 'letra'.\n * Esse texto será mostrado em vez de uma imagem e pode ser usado para representar iniciais ou outras informações textuais.\n */\n @Prop() text: string\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAriaAttributes(this.el)\n }\n\n /**\n * Largura do ícone no avatar do tipo icônico\n * */\n @Prop() iconWidth: string\n\n /**\n * Altura do ícone no avatar do tipo icônico\n */\n @Prop() iconHeight: string\n\n /**\n * Ajuste para a margem de cima do ícone no avatar do tipo icônico\n */\n @Prop() marginTop: string\n\n /**\n * Gera um mapa de classes CSS com base nas propriedades do componente.\n * O mapa de classes determina quais classes CSS devem ser aplicadas\n * ao elemento host do componente, ajustando sua aparência.\n *\n * @returns {CssClassMap} Objeto contendo as classes CSS aplicadas.\n */\n private getCssClassMap(): CssClassMap {\n return {\n 'br-avatar': true,\n small: this.density === 'small',\n medium: this.density === 'medium',\n large: this.density === 'large',\n }\n }\n\n private readonly iconSizes = {\n small: { height: '32px', width: '40px' },\n medium: { height: '80px', width: '88px' },\n large: { height: '128px', width: '136px' },\n }\n\n private readonly iconMarginTops = {\n small: '0.7em',\n medium: '1em',\n large: '0.62em',\n }\n\n private inheritedAttributes: Attributes = {}\n\n private renderAvatar() {\n if (this.text?.trim().length > 0) {\n return (\n <span class=\"content bg-support-01 text-pure-0\" title={this.text}>\n {this.text[0].toUpperCase()}\n </span>\n )\n }\n\n if (this.image?.trim().length > 0) {\n return (\n <span class=\"content\" title={this.imageAlt || this.text}>\n <img src={this.image} alt={this.imageAlt} loading=\"lazy\" />\n </span>\n )\n }\n\n if (this.isIconic) {\n return (\n <span class=\"content\" title={this.text}>\n <br-icon\n icon-name=\"fa-solid:user\"\n height={this.iconHeight?.length > 0 ? this.iconHeight : this.iconSizes[this.density].height}\n width={this.iconWidth?.length > 0 ? this.iconWidth : this.iconSizes[this.density].width}\n aria-hidden=\"true\"\n style={{ 'margin-top': this.marginTop?.length > 0 ? this.marginTop : this.iconMarginTops[this.density] }}\n ></br-icon>\n </span>\n )\n }\n }\n\n render() {\n return (\n <Host>\n <span class={this.getCssClassMap()} {...this.inheritedAttributes}>\n {this.renderAvatar()}\n </span>\n </Host>\n )\n }\n}\n"]}
|