@govbr-ds/webcomponents 2.0.0-next.17 → 2.0.0-next.19
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/README.md +43 -11
- package/dist/cjs/app-globals-77a217c6.js +11 -0
- package/dist/cjs/app-globals-77a217c6.js.map +1 -0
- package/dist/cjs/br-avatar.cjs.entry.js +18 -68
- package/dist/cjs/br-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/br-button_2.cjs.entry.js +13 -93
- package/dist/cjs/br-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/br-checkbox.cjs.entry.js +11 -61
- package/dist/cjs/br-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/br-dropdown.cjs.entry.js +8 -50
- package/dist/cjs/br-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/br-input.cjs.entry.js +18 -67
- package/dist/cjs/br-input.cjs.entry.js.map +1 -1
- package/dist/cjs/br-item.cjs.entry.js +9 -53
- package/dist/cjs/br-item.cjs.entry.js.map +1 -1
- package/dist/cjs/br-list.cjs.entry.js +12 -56
- package/dist/cjs/br-list.cjs.entry.js.map +1 -1
- package/dist/cjs/br-loading.cjs.entry.js +10 -40
- package/dist/cjs/br-loading.cjs.entry.js.map +1 -1
- package/dist/cjs/br-message.cjs.entry.js +10 -40
- package/dist/cjs/br-message.cjs.entry.js.map +1 -1
- package/dist/cjs/br-radio.cjs.entry.js +13 -88
- package/dist/cjs/br-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/br-switch.cjs.entry.js +13 -68
- package/dist/cjs/br-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/br-textarea.cjs.entry.js +41 -97
- package/dist/cjs/br-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/br-upload.cjs.entry.js +168 -0
- package/dist/cjs/br-upload.cjs.entry.js.map +1 -0
- package/dist/cjs/{index-a1cc4aa4.js → index-81c11ce2.js} +149 -5
- package/dist/cjs/index-81c11ce2.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{inherited-attributes-61a2aff9.js → inherited-attributes-16f7d388.js} +5 -1
- package/dist/cjs/inherited-attributes-16f7d388.js.map +1 -0
- package/dist/cjs/loader.cjs.js +7 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{v4-c23234d2.js → v4-2a0fe526.js} +5 -1
- package/dist/cjs/v4-2a0fe526.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +29 -4
- package/dist/cjs/webcomponents.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/avatar/avatar.css +12 -0
- package/dist/collection/components/avatar/avatar.js +53 -187
- package/dist/collection/components/avatar/avatar.js.map +1 -1
- package/dist/collection/components/button/button.css +12 -35
- package/dist/collection/components/button/button.js +10 -257
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.css +12 -0
- package/dist/collection/components/checkbox/checkbox.js +13 -262
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.css +12 -0
- package/dist/collection/components/dropdown/dropdown.js +5 -246
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/icon/icon.css +12 -0
- package/dist/collection/components/icon/icon.js +9 -168
- package/dist/collection/components/icon/icon.js.map +1 -1
- package/dist/collection/components/input/input.css +12 -0
- package/dist/collection/components/input/input.js +26 -329
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/item/item.css +12 -0
- package/dist/collection/components/item/item.js +11 -253
- package/dist/collection/components/item/item.js.map +1 -1
- package/dist/collection/components/list/list.css +12 -0
- package/dist/collection/components/list/list.js +12 -258
- package/dist/collection/components/list/list.js.map +1 -1
- package/dist/collection/components/loading/loading.css +12 -35
- package/dist/collection/components/loading/loading.js +9 -170
- package/dist/collection/components/loading/loading.js.map +1 -1
- package/dist/collection/components/message/message.css +12 -0
- package/dist/collection/components/message/message.js +12 -170
- package/dist/collection/components/message/message.js.map +1 -1
- package/dist/collection/components/radio/radio.css +12 -0
- package/dist/collection/components/radio/radio.js +15 -289
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/switch/switch.css +12 -0
- package/dist/collection/components/switch/switch.js +15 -270
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/textarea/textarea.css +12 -0
- package/dist/collection/components/textarea/textarea.js +55 -323
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/components/upload/upload.css +560 -0
- package/dist/collection/components/upload/upload.js +469 -0
- package/dist/collection/components/upload/upload.js.map +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/pages/components/upload/index.js +19 -0
- package/dist/collection/pages/scripts/menu.js +221 -0
- package/dist/collection/pages/scripts/pageLoader.js +180 -0
- package/dist/collection/utils/inherited-attributes.js +4 -0
- package/dist/collection/utils/inherited-attributes.js.map +1 -1
- package/dist/collection/utils/interfaces.js.map +1 -1
- package/dist/collection/utils/unique-id-generator.js +4 -0
- package/dist/collection/utils/unique-id-generator.js.map +1 -1
- package/dist/components/br-avatar.js +5 -154
- package/dist/components/br-avatar.js.map +1 -1
- package/dist/components/br-button.js +5 -7
- package/dist/components/br-button.js.map +1 -1
- package/dist/components/br-checkbox.js +5 -145
- package/dist/components/br-checkbox.js.map +1 -1
- package/dist/components/br-dropdown.js +5 -155
- package/dist/components/br-dropdown.js.map +1 -1
- package/dist/components/br-icon.js +5 -7
- package/dist/components/br-icon.js.map +1 -1
- package/dist/components/br-input.js +5 -236
- package/dist/components/br-input.js.map +1 -1
- package/dist/components/br-item.js +5 -212
- package/dist/components/br-item.js.map +1 -1
- package/dist/components/br-list.js +5 -137
- package/dist/components/br-list.js.map +1 -1
- package/dist/components/br-loading.js +5 -91
- package/dist/components/br-loading.js.map +1 -1
- package/dist/components/br-message.js +5 -125
- package/dist/components/br-message.js.map +1 -1
- package/dist/components/br-radio.js +5 -173
- package/dist/components/br-radio.js.map +1 -1
- package/dist/components/br-switch.js +5 -158
- package/dist/components/br-switch.js.map +1 -1
- package/dist/components/br-textarea.js +5 -180
- package/dist/components/br-textarea.js.map +1 -1
- package/dist/components/br-upload.d.ts +11 -0
- package/dist/components/br-upload.js +6 -0
- package/dist/components/br-upload.js.map +1 -0
- package/dist/components/index.d.ts +0 -29
- package/dist/components/index.js +5 -15
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-2d8e59f6.js +7 -0
- package/dist/components/p-2d8e59f6.js.map +1 -0
- package/dist/{webcomponents/p-ee6f4f3f.js → components/p-74a4eb38.js} +5 -1
- package/dist/{webcomponents/p-ee6f4f3f.js.map → components/p-74a4eb38.js.map} +1 -1
- package/dist/components/p-a23c3f6b.js +17 -0
- package/dist/components/p-a23c3f6b.js.map +1 -0
- package/dist/{webcomponents/p-14616bce.js → components/p-d5a8d30c.js} +5 -1
- package/dist/{webcomponents/p-14616bce.js.map → components/p-d5a8d30c.js.map} +1 -1
- package/dist/components/p-e4af8eac.js +6 -0
- package/dist/components/p-e4af8eac.js.map +1 -0
- package/dist/esm/app-globals-72548b13.js +9 -0
- package/dist/esm/app-globals-72548b13.js.map +1 -0
- package/dist/esm/br-avatar.entry.js +18 -68
- package/dist/esm/br-avatar.entry.js.map +1 -1
- package/dist/esm/br-button_2.entry.js +13 -93
- package/dist/esm/br-button_2.entry.js.map +1 -1
- package/dist/esm/br-checkbox.entry.js +11 -61
- package/dist/esm/br-checkbox.entry.js.map +1 -1
- package/dist/esm/br-dropdown.entry.js +8 -50
- package/dist/esm/br-dropdown.entry.js.map +1 -1
- package/dist/esm/br-input.entry.js +18 -67
- package/dist/esm/br-input.entry.js.map +1 -1
- package/dist/esm/br-item.entry.js +9 -53
- package/dist/esm/br-item.entry.js.map +1 -1
- package/dist/esm/br-list.entry.js +12 -56
- package/dist/esm/br-list.entry.js.map +1 -1
- package/dist/esm/br-loading.entry.js +10 -40
- package/dist/esm/br-loading.entry.js.map +1 -1
- package/dist/esm/br-message.entry.js +10 -40
- package/dist/esm/br-message.entry.js.map +1 -1
- package/dist/esm/br-radio.entry.js +13 -88
- package/dist/esm/br-radio.entry.js.map +1 -1
- package/dist/esm/br-switch.entry.js +13 -68
- package/dist/esm/br-switch.entry.js.map +1 -1
- package/dist/esm/br-textarea.entry.js +41 -97
- package/dist/esm/br-textarea.entry.js.map +1 -1
- package/dist/esm/br-upload.entry.js +164 -0
- package/dist/esm/br-upload.entry.js.map +1 -0
- package/dist/esm/{index-cad6e6c3.js → index-aab4a630.js} +149 -6
- package/dist/esm/index-aab4a630.js.map +1 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{inherited-attributes-c856c729.js → inherited-attributes-553a7c36.js} +5 -1
- package/dist/esm/inherited-attributes-553a7c36.js.map +1 -0
- package/dist/esm/loader.js +8 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/{v4-23648a96.js → v4-c99c1585.js} +5 -1
- package/dist/esm/v4-c99c1585.js.map +1 -0
- package/dist/esm/webcomponents.js +30 -5
- package/dist/esm/webcomponents.js.map +1 -1
- package/dist/esm-es5/app-globals-72548b13.js +6 -0
- package/dist/esm-es5/app-globals-72548b13.js.map +1 -0
- package/dist/esm-es5/br-avatar.entry.js +6 -0
- package/dist/esm-es5/br-avatar.entry.js.map +1 -0
- package/dist/esm-es5/br-button_2.entry.js +17 -0
- package/dist/esm-es5/br-button_2.entry.js.map +1 -0
- package/dist/esm-es5/br-checkbox.entry.js +6 -0
- package/dist/esm-es5/br-checkbox.entry.js.map +1 -0
- package/dist/esm-es5/br-dropdown.entry.js +6 -0
- package/dist/esm-es5/br-dropdown.entry.js.map +1 -0
- package/dist/esm-es5/br-input.entry.js +6 -0
- package/dist/esm-es5/br-input.entry.js.map +1 -0
- package/dist/esm-es5/br-item.entry.js +6 -0
- package/dist/esm-es5/br-item.entry.js.map +1 -0
- package/dist/esm-es5/br-list.entry.js +6 -0
- package/dist/esm-es5/br-list.entry.js.map +1 -0
- package/dist/esm-es5/br-loading.entry.js +6 -0
- package/dist/esm-es5/br-loading.entry.js.map +1 -0
- package/dist/esm-es5/br-message.entry.js +6 -0
- package/dist/esm-es5/br-message.entry.js.map +1 -0
- package/dist/esm-es5/br-radio.entry.js +6 -0
- package/dist/esm-es5/br-radio.entry.js.map +1 -0
- package/dist/esm-es5/br-switch.entry.js +6 -0
- package/dist/esm-es5/br-switch.entry.js.map +1 -0
- package/dist/esm-es5/br-textarea.entry.js +6 -0
- package/dist/esm-es5/br-textarea.entry.js.map +1 -0
- package/dist/esm-es5/br-upload.entry.js +6 -0
- package/dist/esm-es5/br-upload.entry.js.map +1 -0
- package/dist/esm-es5/index-aab4a630.js +6 -0
- package/dist/esm-es5/index-aab4a630.js.map +1 -0
- package/dist/esm-es5/index.js +5 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/inherited-attributes-553a7c36.js +6 -0
- package/dist/esm-es5/inherited-attributes-553a7c36.js.map +1 -0
- package/dist/esm-es5/loader.js +6 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/v4-c99c1585.js +6 -0
- package/dist/esm-es5/v4-c99c1585.js.map +1 -0
- package/dist/esm-es5/webcomponents.js +6 -0
- package/dist/esm-es5/webcomponents.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/playwright.config.js +39 -0
- package/dist/playwright.config.js.map +1 -0
- package/dist/types/builds/govbr-ds/bibliotecas/wbc/govbr-ds-wbc/packages/webcomponents/.stencil/playwright.config.d.ts +5 -0
- package/dist/types/components/avatar/avatar.d.ts +8 -65
- package/dist/types/components/button/button.d.ts +1 -94
- package/dist/types/components/checkbox/checkbox.d.ts +4 -97
- package/dist/types/components/dropdown/dropdown.d.ts +0 -90
- package/dist/types/components/icon/icon.d.ts +2 -64
- package/dist/types/components/input/input.d.ts +11 -109
- package/dist/types/components/item/item.d.ts +1 -92
- package/dist/types/components/list/list.d.ts +2 -94
- package/dist/types/components/loading/loading.d.ts +0 -62
- package/dist/types/components/message/message.d.ts +2 -63
- package/dist/types/components/radio/radio.d.ts +4 -105
- package/dist/types/components/switch/switch.d.ts +2 -100
- package/dist/types/components/textarea/textarea.d.ts +9 -100
- package/dist/types/components/upload/upload.d.ts +160 -0
- package/dist/types/components.d.ts +209 -948
- package/dist/types/index.d.ts +10 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/webcomponents/index.esm.js +4 -0
- package/dist/webcomponents/p-05343155.system.entry.js +6 -0
- package/dist/webcomponents/p-05343155.system.entry.js.map +1 -0
- package/dist/webcomponents/p-155191ea.entry.js +6 -0
- package/dist/webcomponents/p-155191ea.entry.js.map +1 -0
- package/dist/webcomponents/p-183614c8.system.entry.js +6 -0
- package/dist/webcomponents/p-183614c8.system.entry.js.map +1 -0
- package/dist/webcomponents/p-2083ff7b.entry.js +6 -0
- package/dist/webcomponents/p-2083ff7b.entry.js.map +1 -0
- package/dist/webcomponents/p-24da392a.entry.js +6 -0
- package/dist/webcomponents/p-24da392a.entry.js.map +1 -0
- package/dist/webcomponents/p-254a2b7c.js +6 -0
- package/dist/webcomponents/{p-e1255160.js.map → p-254a2b7c.js.map} +1 -1
- package/dist/webcomponents/p-28aa7e4d.system.entry.js +6 -0
- package/dist/webcomponents/p-28aa7e4d.system.entry.js.map +1 -0
- package/dist/webcomponents/p-2c2c8629.js +7 -0
- package/dist/webcomponents/p-2c2c8629.js.map +1 -0
- package/dist/webcomponents/p-2cc63872.system.entry.js +6 -0
- package/dist/webcomponents/p-2cc63872.system.entry.js.map +1 -0
- package/dist/webcomponents/p-2cef0b07.system.entry.js +17 -0
- package/dist/webcomponents/p-2cef0b07.system.entry.js.map +1 -0
- package/dist/webcomponents/p-34cec0b3.system.entry.js +6 -0
- package/dist/webcomponents/p-34cec0b3.system.entry.js.map +1 -0
- package/dist/webcomponents/p-3c4dea67.entry.js +6 -0
- package/dist/webcomponents/p-3c4dea67.entry.js.map +1 -0
- package/dist/webcomponents/p-3f00a196.entry.js +6 -0
- package/dist/webcomponents/p-3f00a196.entry.js.map +1 -0
- package/dist/webcomponents/p-430afeb5.system.js +7 -0
- package/dist/webcomponents/p-430afeb5.system.js.map +1 -0
- package/dist/webcomponents/p-5539ffa8.entry.js +6 -0
- package/dist/webcomponents/p-5539ffa8.entry.js.map +1 -0
- package/dist/webcomponents/p-626fe2cb.entry.js +6 -0
- package/dist/webcomponents/p-626fe2cb.entry.js.map +1 -0
- package/dist/webcomponents/p-66b81760.entry.js +17 -0
- package/dist/webcomponents/p-66b81760.entry.js.map +1 -0
- package/dist/webcomponents/p-6a8226b3.system.entry.js +6 -0
- package/dist/webcomponents/p-6a8226b3.system.entry.js.map +1 -0
- package/dist/webcomponents/p-6e286eba.system.js +6 -0
- package/dist/webcomponents/p-6e286eba.system.js.map +1 -0
- package/dist/webcomponents/p-71be2e3f.system.entry.js +6 -0
- package/dist/webcomponents/p-71be2e3f.system.entry.js.map +1 -0
- package/dist/webcomponents/p-74a4eb38.js +6 -0
- package/dist/webcomponents/p-74a4eb38.js.map +1 -0
- package/dist/webcomponents/p-7a4e1265.system.entry.js +6 -0
- package/dist/webcomponents/p-7a4e1265.system.entry.js.map +1 -0
- package/dist/webcomponents/p-8039a644.system.entry.js +6 -0
- package/dist/webcomponents/p-8039a644.system.entry.js.map +1 -0
- package/dist/webcomponents/p-842b2513.entry.js +6 -0
- package/dist/webcomponents/p-842b2513.entry.js.map +1 -0
- package/dist/webcomponents/p-90e2e623.system.js +6 -0
- package/dist/webcomponents/p-90e2e623.system.js.map +1 -0
- package/dist/webcomponents/p-a71689a5.system.js +6 -0
- package/dist/webcomponents/p-a71689a5.system.js.map +1 -0
- package/dist/webcomponents/p-ae629243.system.entry.js +6 -0
- package/dist/webcomponents/p-ae629243.system.entry.js.map +1 -0
- package/dist/webcomponents/p-b88a5d9a.system.js +6 -0
- package/dist/webcomponents/p-b88a5d9a.system.js.map +1 -0
- package/dist/webcomponents/p-b9fd2bc0.system.entry.js +6 -0
- package/dist/webcomponents/p-b9fd2bc0.system.entry.js.map +1 -0
- package/dist/webcomponents/p-d5a8d30c.js +6 -0
- package/dist/webcomponents/p-d5a8d30c.js.map +1 -0
- package/dist/webcomponents/p-dcf41d91.entry.js +6 -0
- package/dist/webcomponents/p-dcf41d91.entry.js.map +1 -0
- package/dist/webcomponents/p-e027fca2.entry.js +6 -0
- package/dist/webcomponents/p-e027fca2.entry.js.map +1 -0
- package/dist/webcomponents/p-e751c991.system.js +6 -0
- package/dist/webcomponents/p-e751c991.system.js.map +1 -0
- package/dist/webcomponents/p-e8b5b14f.entry.js +6 -0
- package/dist/webcomponents/p-e8b5b14f.entry.js.map +1 -0
- package/dist/webcomponents/p-f5e674ba.system.entry.js +6 -0
- package/dist/webcomponents/p-f5e674ba.system.entry.js.map +1 -0
- package/dist/webcomponents/p-fd6c166e.entry.js +6 -0
- package/dist/webcomponents/p-fd6c166e.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +5 -1
- package/dist/webcomponents/webcomponents.esm.js.map +1 -1
- package/dist/webcomponents/webcomponents.js +127 -0
- package/hydrate/index.d.ts +6 -0
- package/hydrate/index.js +837 -1084
- package/hydrate/index.mjs +837 -1084
- package/loader/cdn.js +6 -1
- package/loader/index.cjs.js +6 -1
- package/loader/index.es2017.js +5 -0
- package/loader/index.js +6 -1
- package/package.json +21 -24
- package/vscode-data.json +119 -44
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/index-a1cc4aa4.js.map +0 -1
- package/dist/cjs/inherited-attributes-61a2aff9.js.map +0 -1
- package/dist/cjs/v4-c23234d2.js.map +0 -1
- package/dist/collection/scripts/menu.js +0 -132
- package/dist/collection/scripts/pageLoader.js +0 -64
- package/dist/collection/scripts/utils.js +0 -16
- package/dist/components/p-14616bce.js +0 -68
- package/dist/components/p-14616bce.js.map +0 -1
- package/dist/components/p-215ac56c.js +0 -2476
- package/dist/components/p-215ac56c.js.map +0 -1
- package/dist/components/p-62a01df5.js +0 -1518
- package/dist/components/p-62a01df5.js.map +0 -1
- package/dist/components/p-6eb1a607.js +0 -138
- package/dist/components/p-6eb1a607.js.map +0 -1
- package/dist/components/p-ee6f4f3f.js +0 -101
- package/dist/components/p-ee6f4f3f.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/index-cad6e6c3.js.map +0 -1
- package/dist/esm/inherited-attributes-c856c729.js.map +0 -1
- package/dist/esm/v4-23648a96.js.map +0 -1
- package/dist/webcomponents/p-35f43cf0.entry.js +0 -2
- package/dist/webcomponents/p-35f43cf0.entry.js.map +0 -1
- package/dist/webcomponents/p-3bbf9a07.entry.js +0 -2
- package/dist/webcomponents/p-3bbf9a07.entry.js.map +0 -1
- package/dist/webcomponents/p-70216f4a.entry.js +0 -13
- package/dist/webcomponents/p-70216f4a.entry.js.map +0 -1
- package/dist/webcomponents/p-7ef2814e.entry.js +0 -2
- package/dist/webcomponents/p-7ef2814e.entry.js.map +0 -1
- package/dist/webcomponents/p-8030cff4.entry.js +0 -2
- package/dist/webcomponents/p-8030cff4.entry.js.map +0 -1
- package/dist/webcomponents/p-80726c0b.entry.js +0 -2
- package/dist/webcomponents/p-80726c0b.entry.js.map +0 -1
- package/dist/webcomponents/p-8dfeb926.js +0 -3
- package/dist/webcomponents/p-8dfeb926.js.map +0 -1
- package/dist/webcomponents/p-9a6aecb4.entry.js +0 -2
- package/dist/webcomponents/p-9a6aecb4.entry.js.map +0 -1
- package/dist/webcomponents/p-a80407ae.entry.js +0 -2
- package/dist/webcomponents/p-a80407ae.entry.js.map +0 -1
- package/dist/webcomponents/p-a9efcaff.entry.js +0 -2
- package/dist/webcomponents/p-a9efcaff.entry.js.map +0 -1
- package/dist/webcomponents/p-c8bf074f.entry.js +0 -2
- package/dist/webcomponents/p-c8bf074f.entry.js.map +0 -1
- package/dist/webcomponents/p-d3bb77aa.entry.js +0 -2
- package/dist/webcomponents/p-d3bb77aa.entry.js.map +0 -1
- package/dist/webcomponents/p-e1255160.js +0 -2
- package/dist/webcomponents/p-e24e46e9.entry.js +0 -2
- package/dist/webcomponents/p-e24e46e9.entry.js.map +0 -1
- /package/dist/collection/pages/{button/button.js → components/button/index.js} +0 -0
- /package/dist/collection/pages/{checkbox/checkbox.js → components/checkbox/index.js} +0 -0
- /package/dist/collection/pages/{dropdown/dropdown.js → components/dropdown/index.js} +0 -0
- /package/dist/collection/pages/{icon/icon.js → components/icon/index.js} +0 -0
- /package/dist/collection/pages/{input/input.js → components/input/index.js} +0 -0
- /package/dist/collection/pages/{item/item.js → components/item/index.js} +0 -0
- /package/dist/collection/pages/{list/list.js → components/list/index.js} +0 -0
- /package/dist/collection/pages/{message/message.js → components/message/index.js} +0 -0
- /package/dist/collection/pages/{radio/radio.js → components/radio/index.js} +0 -0
- /package/dist/collection/pages/{switch/switch.js → components/switch/index.js} +0 -0
- /package/dist/collection/pages/{textarea/textarea.js → components/textarea/index.js} +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
const MENU_ITEMS = [
|
|
2
|
+
{
|
|
3
|
+
path: 'avatar',
|
|
4
|
+
name: 'Avatar',
|
|
5
|
+
files: ['photographic', 'iconic', 'letter'],
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
path: 'button',
|
|
9
|
+
name: 'Button',
|
|
10
|
+
files: ['color-mode', 'density', 'emphasis', 'icon-position', 'shape', 'state'],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
path: 'checkbox',
|
|
14
|
+
name: 'Checkbox',
|
|
15
|
+
files: ['hidden-label', 'horizontal', 'indeterminate', 'slotted', 'state', 'vertical'],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
path: 'dropdown',
|
|
19
|
+
name: 'Dropdown',
|
|
20
|
+
files: ['simples'],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
path: 'icon',
|
|
24
|
+
name: 'Icon',
|
|
25
|
+
files: ['flip', 'font-awesome', 'inline', 'rotate', 'width-height'],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
path: 'input',
|
|
29
|
+
name: 'Input',
|
|
30
|
+
files: ['state', 'with-button', 'highlight', 'inline', 'density'],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
path: 'item',
|
|
34
|
+
name: 'Item',
|
|
35
|
+
files: ['density', 'vertical', 'state', 'selectable'],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
path: 'list',
|
|
39
|
+
name: 'List',
|
|
40
|
+
files: ['selectable', 'density', 'grouped', 'horizontal'],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: 'loading',
|
|
44
|
+
name: 'Loading',
|
|
45
|
+
files: ['indeterminate', 'progress'],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
path: 'message',
|
|
49
|
+
name: 'Message',
|
|
50
|
+
files: ['feedback', 'message'],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
path: 'switch',
|
|
54
|
+
name: 'Switch',
|
|
55
|
+
files: ['label', 'has-icon', 'density', 'state'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: 'textarea',
|
|
59
|
+
name: 'Textarea',
|
|
60
|
+
files: [
|
|
61
|
+
'simples',
|
|
62
|
+
'contador',
|
|
63
|
+
'density',
|
|
64
|
+
'inline',
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
path: 'upload',
|
|
69
|
+
name: 'Upload',
|
|
70
|
+
files: ['single', 'multiple', 'restricted', 'disabled'],
|
|
71
|
+
},
|
|
72
|
+
// NOVOS COMPONENTES - NÃO DELETAR
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
const MENU_STATIC_ITEMS = [
|
|
76
|
+
{
|
|
77
|
+
path: 'all-component-events',
|
|
78
|
+
name: 'Eventos',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: 'all-component-methods',
|
|
82
|
+
name: 'Métodos',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: 'all-component-props',
|
|
86
|
+
name: 'Propriedades',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: 'all-component-slots',
|
|
90
|
+
name: 'Slots',
|
|
91
|
+
},
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
const MENU_BODY = document.querySelector('.menu-body')
|
|
95
|
+
const MENU_FILTER = document.getElementById('menu-filter')
|
|
96
|
+
const CLEAR_MENU_FILTER = document.getElementById('clear-menu-filter')
|
|
97
|
+
const menuButton = document.getElementById('menu-button')
|
|
98
|
+
const responsiveMenuButton = document.getElementById('responsive-menu-button')
|
|
99
|
+
const menuElement = document.getElementById('main-navigation')
|
|
100
|
+
const iconElement = menuButton.querySelector('i');
|
|
101
|
+
|
|
102
|
+
function setLinks() {
|
|
103
|
+
MENU_ITEMS.forEach((page) => {
|
|
104
|
+
const link = document.createElement('a')
|
|
105
|
+
link.href = `/${page.path}`
|
|
106
|
+
link.className = 'menu-item br-link'
|
|
107
|
+
link.textContent = page.name
|
|
108
|
+
link.addEventListener('click', (event) => {
|
|
109
|
+
event.preventDefault()
|
|
110
|
+
|
|
111
|
+
if (link.classList.contains('active')) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
removeAllActiveClasses()
|
|
116
|
+
link.classList.add('active')
|
|
117
|
+
loadPage(page.path, page.files)
|
|
118
|
+
window.history.pushState({}, '', `/${page.path}`)
|
|
119
|
+
|
|
120
|
+
if (window.innerWidth <= 575) {
|
|
121
|
+
toggleMenu();
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
MENU_BODY.appendChild(link)
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const divider = document.createElement('div')
|
|
129
|
+
divider.classList.add('br-divider')
|
|
130
|
+
MENU_BODY.appendChild(divider)
|
|
131
|
+
|
|
132
|
+
const staticHeader = document.createElement('div')
|
|
133
|
+
staticHeader.classList.add('menu-item')
|
|
134
|
+
staticHeader.innerHTML = 'Arquivos MD (precisa do <strong>build</strong>)'
|
|
135
|
+
MENU_BODY.appendChild(staticHeader)
|
|
136
|
+
|
|
137
|
+
MENU_STATIC_ITEMS.forEach((page) => {
|
|
138
|
+
const link = document.createElement('a')
|
|
139
|
+
link.href = `/${page.path}`
|
|
140
|
+
link.className = 'menu-item br-link'
|
|
141
|
+
link.textContent = page.name
|
|
142
|
+
link.addEventListener('click', (event) => {
|
|
143
|
+
event.preventDefault()
|
|
144
|
+
|
|
145
|
+
if (link.classList.contains('active')) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
removeAllActiveClasses()
|
|
150
|
+
link.classList.add('active')
|
|
151
|
+
loadMarkdown(page.path)
|
|
152
|
+
window.history.pushState({}, '', `/${page.path}`)
|
|
153
|
+
|
|
154
|
+
if (window.innerWidth <= 575) {
|
|
155
|
+
toggleMenu();
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
MENU_BODY.appendChild(link)
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function filterMenu() {
|
|
164
|
+
const filterValue = MENU_FILTER.value.toLowerCase()
|
|
165
|
+
const menuItems = MENU_BODY.querySelectorAll('.menu-item')
|
|
166
|
+
|
|
167
|
+
menuItems.forEach((item) => {
|
|
168
|
+
if (item.textContent.toLowerCase().includes(filterValue)) {
|
|
169
|
+
item.style.display = ''
|
|
170
|
+
} else {
|
|
171
|
+
item.style.display = 'none'
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
CLEAR_MENU_FILTER.style.display = filterValue ? 'block' : 'none'
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function clearInput() {
|
|
179
|
+
MENU_FILTER.value = ''
|
|
180
|
+
filterMenu()
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
window.addEventListener('load', () => {
|
|
184
|
+
setLinks()
|
|
185
|
+
loadPageFromURL()
|
|
186
|
+
|
|
187
|
+
menuButton.addEventListener('click', toggleMenu)
|
|
188
|
+
responsiveMenuButton.addEventListener('click', toggleMenu)
|
|
189
|
+
|
|
190
|
+
const mediaQuery = window.matchMedia("(min-width: 576px)");
|
|
191
|
+
mediaQuery.addEventListener('change', handleMediaChange);
|
|
192
|
+
|
|
193
|
+
function handleMediaChange(event) {
|
|
194
|
+
if (event.matches && responsiveMenuButton) responsiveMenuButton.style.display = 'none';
|
|
195
|
+
if (!event.matches && responsiveMenuButton) responsiveMenuButton.style.display = '';
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
handleMediaChange(mediaQuery);
|
|
199
|
+
|
|
200
|
+
MENU_FILTER.addEventListener('input', filterMenu)
|
|
201
|
+
CLEAR_MENU_FILTER.addEventListener('click', clearInput)
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
function removeAllActiveClasses() {
|
|
205
|
+
const menuItems = document.querySelectorAll('.menu-item')
|
|
206
|
+
menuItems.forEach((item) => {
|
|
207
|
+
item.classList.remove('active')
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function toggleMenu() {
|
|
212
|
+
menuElement.classList.toggle('active');
|
|
213
|
+
|
|
214
|
+
if (menuElement.classList.contains('active')) {
|
|
215
|
+
iconElement.classList.remove('fa-bars');
|
|
216
|
+
iconElement.classList.add('fa-times');
|
|
217
|
+
} else {
|
|
218
|
+
iconElement.classList.add('fa-bars');
|
|
219
|
+
iconElement.classList.remove('fa-times');
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
const CONTENT_ELEMENT = document.getElementById('content');
|
|
2
|
+
const COMPONENTS_FILTER = document.getElementById('components-filter');
|
|
3
|
+
const CLEAR_COMPONENTS_FILTER = document.getElementById('clear-components-filter');
|
|
4
|
+
|
|
5
|
+
let renderedFilesContent = {};
|
|
6
|
+
|
|
7
|
+
function loadPage(path, files) {
|
|
8
|
+
CONTENT_ELEMENT.innerHTML = '';
|
|
9
|
+
renderedFilesContent = {};
|
|
10
|
+
COMPONENTS_FILTER.value = ''; // Limpa o campo de busca ao trocar de página
|
|
11
|
+
CLEAR_COMPONENTS_FILTER.style.display = 'none'; // Esconde o botão de limpar
|
|
12
|
+
|
|
13
|
+
const promises = files.map((file) =>
|
|
14
|
+
fetch(`./pages/components/${path}/${file}.html`).then((response) =>
|
|
15
|
+
response.text().then((text) => ({ file, text }))
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
Promise.all(promises)
|
|
20
|
+
.then((results) => {
|
|
21
|
+
if (results.length > 0) {
|
|
22
|
+
results.forEach(({ file, text }) => {
|
|
23
|
+
const contentDiv = document.createElement('div');
|
|
24
|
+
contentDiv.classList.add('file', 'mt-2', 'mb-5');
|
|
25
|
+
|
|
26
|
+
const titleHTML = `<h3>${file}</h3><div class="br-divider"></div>`;
|
|
27
|
+
contentDiv.insertAdjacentHTML('beforeend', titleHTML + text);
|
|
28
|
+
|
|
29
|
+
renderedFilesContent[file] = { content: text.toLowerCase(), element: contentDiv };
|
|
30
|
+
|
|
31
|
+
CONTENT_ELEMENT.appendChild(contentDiv);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
loadRelatedScriptsFromContent();
|
|
36
|
+
})
|
|
37
|
+
.catch((error) => {
|
|
38
|
+
console.log('Erro ao carregar a página:', error);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function loadMarkdown(path) {
|
|
43
|
+
CONTENT_ELEMENT.innerHTML = '';
|
|
44
|
+
renderedFilesContent = {};
|
|
45
|
+
COMPONENTS_FILTER.value = ''; // Limpa o campo de busca ao trocar de página
|
|
46
|
+
CLEAR_COMPONENTS_FILTER.style.display = 'none'; // Esconde o botão de limpar
|
|
47
|
+
|
|
48
|
+
fetch(`./assets/stencil-generated-docs/${path}.md`)
|
|
49
|
+
.then((response) => response.text())
|
|
50
|
+
.then((text) => {
|
|
51
|
+
const contentDiv = document.createElement('div');
|
|
52
|
+
contentDiv.classList.add('file', 'mt-2', 'mb-5');
|
|
53
|
+
contentDiv.innerHTML = marked.parse(text);
|
|
54
|
+
CONTENT_ELEMENT.appendChild(contentDiv);
|
|
55
|
+
|
|
56
|
+
renderedFilesContent[path] = { content: contentDiv.innerHTML.toLowerCase(), element: contentDiv };
|
|
57
|
+
})
|
|
58
|
+
.catch((error) => {
|
|
59
|
+
console.error('Erro ao carregar a página:', error);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function loadRelatedScriptsFromContent() {
|
|
64
|
+
const contentHTML = CONTENT_ELEMENT.innerHTML;
|
|
65
|
+
const relatedPaths = contentHTML.match(/br-(\w+)/g);
|
|
66
|
+
|
|
67
|
+
if (relatedPaths) {
|
|
68
|
+
relatedPaths.forEach((relatedPath) => {
|
|
69
|
+
const normalizedPath = relatedPath.substring(3);
|
|
70
|
+
const relatedScript = document.createElement('script');
|
|
71
|
+
relatedScript.src = `./pages/components/${normalizedPath}/index.js`;
|
|
72
|
+
document.body.appendChild(relatedScript);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function filterContent() {
|
|
78
|
+
const filterValue = COMPONENTS_FILTER.value.toLowerCase();
|
|
79
|
+
const normalizedFilterValue = filterValue.normalize("NFD").replace(/[\u0300-\u036f]/g, '');
|
|
80
|
+
|
|
81
|
+
Object.values(renderedFilesContent).forEach(({ content, element }) => {
|
|
82
|
+
const titleElement = element.querySelector('h3');
|
|
83
|
+
const titleText = titleElement ? titleElement.textContent.toLowerCase() : '';
|
|
84
|
+
const normalizedTitleText = titleText.normalize("NFD").replace(/[\u0300-\u036f]/g, '');
|
|
85
|
+
|
|
86
|
+
// Inicializa o conteúdo do shadow DOM para componentes personalizados
|
|
87
|
+
let shadowContent = '';
|
|
88
|
+
|
|
89
|
+
// Função para coletar o conteúdo dos slots de um custom element
|
|
90
|
+
const collectSlotContent = (customElement) => {
|
|
91
|
+
if (customElement.shadowRoot) {
|
|
92
|
+
const slots = customElement.shadowRoot.querySelectorAll('slot');
|
|
93
|
+
slots.forEach(slot => {
|
|
94
|
+
const assignedNodes = slot.assignedNodes();
|
|
95
|
+
assignedNodes.forEach(node => {
|
|
96
|
+
shadowContent += node.textContent.toLowerCase() + ' ';
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Procura todos os custom elements dentro do elemento
|
|
103
|
+
const customElements = element.querySelectorAll('*');
|
|
104
|
+
customElements.forEach((customElement) => {
|
|
105
|
+
if (customElement.tagName.includes('-')) { // Identifica se é um custom element
|
|
106
|
+
collectSlotContent(customElement);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Filtra o conteúdo
|
|
111
|
+
const combinedContent = content + ' ' + shadowContent; // Combina conteúdo e shadow content
|
|
112
|
+
|
|
113
|
+
if (element.querySelector('table')) {
|
|
114
|
+
const rows = element.querySelectorAll('table tr');
|
|
115
|
+
rows.forEach((row, index) => {
|
|
116
|
+
if (index === 0) {
|
|
117
|
+
row.style.display = '';
|
|
118
|
+
} else {
|
|
119
|
+
const rowText = row.textContent.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, '');
|
|
120
|
+
row.style.display = rowText.includes(normalizedFilterValue) ? '' : 'none';
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
} else if (normalizedFilterValue && (combinedContent.includes(normalizedFilterValue) || normalizedTitleText.includes(normalizedFilterValue))) {
|
|
124
|
+
element.style.display = ''; // Exibe o elemento se o conteúdo combinado inclui o valor filtrado
|
|
125
|
+
} else {
|
|
126
|
+
element.style.display = normalizedFilterValue ? 'none' : ''; // Oculta se não houver filtro
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
CLEAR_COMPONENTS_FILTER.style.display = filterValue ? 'block' : 'none';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
COMPONENTS_FILTER.addEventListener('input', filterContent);
|
|
134
|
+
|
|
135
|
+
CLEAR_COMPONENTS_FILTER.addEventListener('click', () => {
|
|
136
|
+
COMPONENTS_FILTER.value = '';
|
|
137
|
+
filterContent();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
function loadPageFromURL() {
|
|
141
|
+
const currentPath = window.location.pathname.split('/').pop();
|
|
142
|
+
|
|
143
|
+
MENU_ITEMS.forEach((page) => {
|
|
144
|
+
if (page.path === currentPath) {
|
|
145
|
+
const link = Array.from(MENU_BODY.children).find((item) =>
|
|
146
|
+
item.getAttribute('href') === `/${page.path}`
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
if (link) {
|
|
150
|
+
link.classList.add('active');
|
|
151
|
+
loadPage(page.path, page.files);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
MENU_STATIC_ITEMS.forEach((page) => {
|
|
157
|
+
if (page.path === currentPath) {
|
|
158
|
+
const link = Array.from(MENU_BODY.children).find((item) =>
|
|
159
|
+
item.getAttribute('href') === `/${page.path}`
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
if (link) {
|
|
163
|
+
link.classList.add('active');
|
|
164
|
+
loadMarkdown(page.path);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
if (currentPath.trim().length === 0) {
|
|
170
|
+
const firstPage = MENU_ITEMS[0];
|
|
171
|
+
loadPage(firstPage.path, firstPage.files);
|
|
172
|
+
const firstLink = MENU_BODY.querySelector('.menu-item');
|
|
173
|
+
if (firstLink) {
|
|
174
|
+
firstLink.classList.add('active');
|
|
175
|
+
window.history.pushState({}, '', `/${firstPage.path}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
loadPageFromURL();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inherited-attributes.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"inherited-attributes.js","sourceRoot":"","sources":["../../../src/utils/inherited-attributes.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oFAAoF;AAIpF;;;;GAIG;AACH,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;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAe,EAAE,aAAuB,EAAE,EAAE,EAAE;IAC9E,MAAM,eAAe,GAAe,EAAE,CAAA;IAEtC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1B,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;YACnC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;YAC/C,CAAC;YACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,eAAe,CAAA;AACxB,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAe,EAAE,UAAqB,EAAE,EAAE;IAC9E,IAAI,mBAAmB,GAAG,cAAc,CAAA;IACxC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,iBAAiB,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAA;AACnD,CAAC,CAAA","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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/utils/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export type CssClassMap = { [className: string]: boolean }\n"]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Construído com @govbr-ds/webcomponents
|
|
3
|
+
* Padrão Digital de Governo.
|
|
4
|
+
*/
|
|
1
5
|
export default function generateUniqueId(prefix = 'id', randomPartLength = 30) {
|
|
2
6
|
// Cria uma parte aleatória do comprimento desejado
|
|
3
7
|
const randomPart = Array.from(crypto.getRandomValues(new Uint8Array(randomPartLength)))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id-generator.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"unique-id-generator.js","sourceRoot":"","sources":["../../../src/utils/unique-id-generator.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,SAAiB,IAAI,EAAE,mBAA2B,EAAE;IAC3F,mDAAmD;IACnD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;SACpF,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,uCAAuC;SAC7E,IAAI,CAAC,EAAE,CAAC,CAAA,CAAC,4CAA4C;IAExD,0CAA0C;IAC1C,OAAO,GAAG,MAAM,IAAI,UAAU,EAAE,CAAA;AAClC,CAAC","sourcesContent":["export default function generateUniqueId(prefix: string = 'id', randomPartLength: number = 30): string {\n // Cria uma parte aleatória do comprimento desejado\n const randomPart = Array.from(crypto.getRandomValues(new Uint8Array(randomPartLength)))\n .map((num) => (num % 16).toString(16)) // Converte os números para hexadecimal\n .join('') // Junta os caracteres para criar uma string\n\n // Concatena o prefixo e a parte aleatória\n return `${prefix}-${randomPart}`\n}\n"]}
|
|
@@ -1,155 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const avatarCss = "*,*::before,*::after{box-sizing:border-box}html{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}body{margin:0}a{background-color:transparent}strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}[hidden]{display:none}.d-flex{display:flex !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter) * 0.5);padding-right:calc(var(--grid-gutter) * 0.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.container{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter) * -0.5);margin-right:calc(var(--grid-gutter) * -0.5)}@media (min-width: 576px){.container{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}}@media (min-width: 992px){.container{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}}@media (min-width: 1600px){.container{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mr-2{margin-right:var(--spacing-scale-base) !important}.mb-3{margin-bottom:var(--spacing-scale-2x) !important}.pt-half{padding-top:var(--spacing-scale-half) !important}.py-3{padding-bottom:var(--spacing-scale-2x) !important;padding-top:var(--spacing-scale-2x) !important}.py-4{padding-bottom:var(--spacing-scale-3x) !important;padding-top:var(--spacing-scale-3x) !important}body{--bg-color:var(--background);--bg-color-rgb:var(--background-rgb);--bg-color-hsl:var(--background-hsl);--font-size:var(--font-size-scale-base);--font-weight:var(--font-weight-regular);--link-color:var(--interactive);--link-color-rgb:var(--interactive-rgb);--link-color-hsl:var(--interactive-hsl);--line-height:var(--font-line-height-medium);--text-color:var(--color);--text-color-rgb:var(--color-rgb);--text-color-hsl:var(--color-hsl);background:var(--bg-color);color:var(--text-color);font-family:var(--font-family-base);font-size:var(--font-size);font-weight:var(--font-weight);line-height:var(--line-height)}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half);color:var(--interactive);text-decoration:none}a:focus{outline:none}a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}button{cursor:pointer}img{max-width:100%;vertical-align:middle}ul{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}::-moz-placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}.text-pure-0{color:var(--pure-0) !important}.bg-support-01{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark);background:var(--color-support-01) !important}.text-nowrap{white-space:nowrap !important}.text-base{font-size:var(--font-size-scale-base) !important}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.br-avatar{--avatar-size:var(--avatar-small);--avatar-icon-size:var(--avatar-icon-small);--avatar-text-size:var(--avatar-text-small);--avatar-small:40px;--avatar-medium:100px;--avatar-large:160px;--avatar-icon-small:var(--icon-size-2x);--avatar-icon-medium:var(--icon-size-5x);--avatar-icon-large:var(--icon-size-8x);--avatar-text-small:var(--font-size-scale-up-03);--avatar-text-medium:var(--font-size-scale-up-07);--avatar-text-large:var(--font-size-scale-up-11);align-items:center;background-color:transparent;border:0;display:inline-flex;font-size:var(--avatar-text-size);font-weight:var(--font-weight-bold);justify-content:center;line-height:var(--avatar-size);vertical-align:middle}.br-avatar .content{align-items:center;background-color:var(--blue-10);border-radius:50%;color:var(--blue-warm-20);display:inline-flex;font-size:var(--avatar-text-size);height:var(--avatar-size);justify-content:center;overflow:hidden;text-align:center;text-transform:uppercase;vertical-align:inherit;width:var(--avatar-size)}.br-avatar .content img{height:var(--avatar-size);vertical-align:inherit;width:var(--avatar-size)}.br-avatar.small,.br-avatar[small]{--avatar-size:var(--avatar-small);--avatar-icon-size:var(--avatar-icon-small);--avatar-text-size:var(--avatar-text-small)}.br-avatar.is-medium,.br-avatar.medium,.br-avatar[medium]{--avatar-size:var(--avatar-medium);--avatar-icon-size:var(--avatar-icon-medium);--avatar-text-size:var(--avatar-text-medium)}.br-avatar.large,.br-avatar[large]{--avatar-size:var(--avatar-large);--avatar-icon-size:var(--avatar-icon-large);--avatar-text-size:var(--avatar-text-large)}.br-avatar[data-toggle=dropdown]:focus{outline:none}.br-avatar[data-toggle=dropdown]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}.br-avatar .image{align-items:center;background-color:var(--blue-10);border-radius:50%;color:var(--blue-warm-20);display:inline-flex;font-size:var(--avatar-text-size);height:var(--avatar-size);justify-content:center;overflow:hidden;text-align:center;text-transform:uppercase;vertical-align:inherit;width:var(--avatar-size)}.br-avatar .image img{height:var(--avatar-size);vertical-align:inherit;width:var(--avatar-size)}:host{display:block}";
|
|
6
|
-
const BrAvatarStyle0 = avatarCss;
|
|
7
|
-
|
|
8
|
-
var Density;
|
|
9
|
-
(function (Density) {
|
|
10
|
-
Density["Small"] = "small";
|
|
11
|
-
Density["Medium"] = "medium";
|
|
12
|
-
Density["Large"] = "large";
|
|
13
|
-
})(Density || (Density = {}));
|
|
14
|
-
const Avatar = /*@__PURE__*/ proxyCustomElement(class Avatar extends H {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
this.__registerHost();
|
|
18
|
-
this.__attachShadow();
|
|
19
|
-
this.brDidConnect = createEvent(this, "brDidConnect", 7);
|
|
20
|
-
this.brWillLoad = createEvent(this, "brWillLoad", 7);
|
|
21
|
-
this.brDidLoad = createEvent(this, "brDidLoad", 7);
|
|
22
|
-
this.brWillRender = createEvent(this, "brWillRender", 7);
|
|
23
|
-
this.brDidRender = createEvent(this, "brDidRender", 7);
|
|
24
|
-
this.brShouldUpdate = createEvent(this, "brShouldUpdate", 7);
|
|
25
|
-
this.brWillUpdate = createEvent(this, "brWillUpdate", 7);
|
|
26
|
-
this.brDidUpdate = createEvent(this, "brDidUpdate", 7);
|
|
27
|
-
this.brDidDisconnect = createEvent(this, "brDidDisconnect", 7);
|
|
28
|
-
/**
|
|
29
|
-
* Calcula o tamanho dos ícones de acordo com a classe de densidade
|
|
30
|
-
*/
|
|
31
|
-
this.iconSizes = {
|
|
32
|
-
small: { height: '32', width: '40' },
|
|
33
|
-
medium: { height: '80', width: '88' },
|
|
34
|
-
large: { height: '128', width: '136' },
|
|
35
|
-
};
|
|
36
|
-
this.iconMarginTops = {
|
|
37
|
-
small: '0.7em',
|
|
38
|
-
medium: '1em',
|
|
39
|
-
large: '0.62em',
|
|
40
|
-
};
|
|
41
|
-
this.inheritedAttributes = {};
|
|
42
|
-
this.density = Density.Medium;
|
|
43
|
-
this.image = undefined;
|
|
44
|
-
this.imageAlt = 'Imagem do avatar';
|
|
45
|
-
this.isIconic = false;
|
|
46
|
-
this.text = undefined;
|
|
47
|
-
this.iconWidth = undefined;
|
|
48
|
-
this.iconHeight = undefined;
|
|
49
|
-
}
|
|
50
|
-
connectedCallback() {
|
|
51
|
-
this.brDidConnect.emit();
|
|
52
|
-
}
|
|
53
|
-
componentWillLoad() {
|
|
54
|
-
this.brWillLoad.emit();
|
|
55
|
-
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
56
|
-
this.setIconSize();
|
|
57
|
-
}
|
|
58
|
-
componentDidLoad() {
|
|
59
|
-
this.brDidLoad.emit();
|
|
60
|
-
}
|
|
61
|
-
componentWillRender() {
|
|
62
|
-
this.brWillRender.emit();
|
|
63
|
-
}
|
|
64
|
-
componentDidRender() {
|
|
65
|
-
this.brDidRender.emit();
|
|
66
|
-
}
|
|
67
|
-
componentShouldUpdate() {
|
|
68
|
-
this.brShouldUpdate.emit();
|
|
69
|
-
}
|
|
70
|
-
componentWillUpdate() {
|
|
71
|
-
this.brWillUpdate.emit();
|
|
72
|
-
}
|
|
73
|
-
componentDidUpdate() {
|
|
74
|
-
this.brDidUpdate.emit();
|
|
75
|
-
}
|
|
76
|
-
disconnectedCallback() {
|
|
77
|
-
this.brDidDisconnect.emit();
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Gera um mapa de classes CSS com base nas propriedades do componente.
|
|
81
|
-
* O mapa de classes determina quais classes CSS devem ser aplicadas
|
|
82
|
-
* ao elemento host do componente, ajustando sua aparência.
|
|
83
|
-
*
|
|
84
|
-
* @returns {CssClassMap} Objeto contendo as classes CSS aplicadas.
|
|
85
|
-
*/
|
|
86
|
-
getCssClassMap() {
|
|
87
|
-
return {
|
|
88
|
-
'br-avatar': true,
|
|
89
|
-
small: this.density === Density.Small,
|
|
90
|
-
medium: this.density === Density.Medium,
|
|
91
|
-
large: this.density === Density.Large,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
setIconSize() {
|
|
95
|
-
var _a, _b;
|
|
96
|
-
if (((_a = this.image) === null || _a === void 0 ? void 0 : _a.trim().length) !== 0 && ((_b = this.text) === null || _b === void 0 ? void 0 : _b.trim().length) !== 0) {
|
|
97
|
-
const size = this.iconSizes[this.density];
|
|
98
|
-
this.iconHeight = size.height;
|
|
99
|
-
this.iconWidth = size.width;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
adjustIconStyle(density) {
|
|
103
|
-
return this.iconMarginTops[density] || '1em';
|
|
104
|
-
}
|
|
105
|
-
renderAvatar() {
|
|
106
|
-
var _a, _b;
|
|
107
|
-
if (((_a = this.text) === null || _a === void 0 ? void 0 : _a.trim().length) > 0) {
|
|
108
|
-
return (h("span", { class: "content bg-support-01 text-pure-0", title: this.text }, this.text[0].toUpperCase()));
|
|
109
|
-
}
|
|
110
|
-
if (((_b = this.image) === null || _b === void 0 ? void 0 : _b.trim().length) > 0) {
|
|
111
|
-
return (h("span", { class: "content", title: this.imageAlt || this.text }, h("img", { src: this.image, alt: this.imageAlt, loading: "lazy" })));
|
|
112
|
-
}
|
|
113
|
-
if (this.isIconic) {
|
|
114
|
-
return (h("span", { class: "content", title: this.text }, h("br-icon", { "icon-name": "fa-solid:user", height: this.iconHeight, width: this.iconWidth, "aria-hidden": "true", style: { 'margin-top': this.adjustIconStyle(this.density) } })));
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
return (h(Host, { key: '90d4903713585ba969eb111676d95f89c53522f5' }, h("span", Object.assign({ key: '3bb155bdc14da14da5bb576323446157636f3974', class: this.getCssClassMap() }, this.inheritedAttributes), this.renderAvatar())));
|
|
119
|
-
}
|
|
120
|
-
get el() { return this; }
|
|
121
|
-
static get style() { return BrAvatarStyle0; }
|
|
122
|
-
}, [1, "br-avatar", {
|
|
123
|
-
"density": [1],
|
|
124
|
-
"image": [1],
|
|
125
|
-
"imageAlt": [1, "image-alt"],
|
|
126
|
-
"isIconic": [4, "is-iconic"],
|
|
127
|
-
"text": [1],
|
|
128
|
-
"iconWidth": [32],
|
|
129
|
-
"iconHeight": [32]
|
|
130
|
-
}]);
|
|
131
|
-
function defineCustomElement$1() {
|
|
132
|
-
if (typeof customElements === "undefined") {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const components = ["br-avatar", "br-icon"];
|
|
136
|
-
components.forEach(tagName => { switch (tagName) {
|
|
137
|
-
case "br-avatar":
|
|
138
|
-
if (!customElements.get(tagName)) {
|
|
139
|
-
customElements.define(tagName, Avatar);
|
|
140
|
-
}
|
|
141
|
-
break;
|
|
142
|
-
case "br-icon":
|
|
143
|
-
if (!customElements.get(tagName)) {
|
|
144
|
-
defineCustomElement$2();
|
|
145
|
-
}
|
|
146
|
-
break;
|
|
147
|
-
} });
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const BrAvatar = Avatar;
|
|
151
|
-
const defineCustomElement = defineCustomElement$1;
|
|
152
|
-
|
|
153
|
-
export { BrAvatar, defineCustomElement };
|
|
154
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Construído com @govbr-ds/webcomponents
|
|
3
|
+
* Padrão Digital de Governo.
|
|
4
|
+
*/
|
|
5
|
+
import{p as a,H as t,h as r,c as e}from"./p-2d8e59f6.js";import{i}from"./p-74a4eb38.js";import{d as o}from"./p-a23c3f6b.js";const n="*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}html{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}body{margin:0}a{background-color:transparent}strong{font-weight:bolder}small{font-size:80%}img{border-style:none}button,input,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}[hidden]{display:none}.d-flex{display:-ms-flexbox !important;display:flex !important}.align-items-center{-ms-flex-align:center !important;align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter) * 0.5);padding-right:calc(var(--grid-gutter) * 0.5);width:100%}.col{-ms-flex:1 0 0%;flex:1 0 0%;min-width:8.3333333333%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.container{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:calc(var(--grid-gutter) * -0.5);margin-right:calc(var(--grid-gutter) * -0.5)}@media (min-width: 576px){.container{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}}@media (min-width: 992px){.container{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}}@media (min-width: 1600px){.container{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mr-2{margin-right:var(--spacing-scale-base) !important}.mr-n2{margin-right:calc(var(--spacing-scale-base) * -1) !important}.mb-3{margin-bottom:var(--spacing-scale-2x) !important}.mr-auto{margin-right:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}.py-3{padding-bottom:var(--spacing-scale-2x) !important;padding-top:var(--spacing-scale-2x) !important}.py-4{padding-bottom:var(--spacing-scale-3x) !important;padding-top:var(--spacing-scale-3x) !important}body{--bg-color:var(--background);--bg-color-rgb:var(--background-rgb);--bg-color-hsl:var(--background-hsl);--font-size:var(--font-size-scale-base);--font-weight:var(--font-weight-regular);--link-color:var(--interactive);--link-color-rgb:var(--interactive-rgb);--link-color-hsl:var(--interactive-hsl);--line-height:var(--font-line-height-medium);--text-color:var(--color);--text-color-rgb:var(--color-rgb);--text-color-hsl:var(--color-hsl);background:var(--bg-color);color:var(--text-color);font-family:var(--font-family-base);font-size:var(--font-size);font-weight:var(--font-weight);line-height:var(--line-height)}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half);color:var(--interactive);text-decoration:none}a:focus{outline:none}a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(var(--interactive-rgb), var(--hover))), to(rgba(var(--interactive-rgb), var(--hover))));background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(var(--interactive-rgb), var(--pressed))), to(rgba(var(--interactive-rgb), var(--pressed))));background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}button{cursor:pointer}img{max-width:100%;vertical-align:middle}ul{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}::-moz-placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}::-webkit-input-placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}:-ms-input-placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}::-ms-input-placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}.text-pure-0{color:var(--pure-0) !important}.text-primary-default{color:var(--color-primary-default) !important}.bg-support-01{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark);background:var(--color-support-01) !important}.text-nowrap{white-space:nowrap !important}.text-base{font-size:var(--font-size-scale-base) !important}.highlight{background:var(--status-highlight-background) -webkit-gradient(linear, left top, left bottom, from(var(--status-highlight-overlay)), to(var(--status-highlight-overlay)));background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{-webkit-box-shadow:var(--surface-shadow-sm);box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.br-avatar{--avatar-size:var(--avatar-small);--avatar-icon-size:var(--avatar-icon-small);--avatar-text-size:var(--avatar-text-small);--avatar-small:40px;--avatar-medium:100px;--avatar-large:160px;--avatar-icon-small:var(--icon-size-2x);--avatar-icon-medium:var(--icon-size-5x);--avatar-icon-large:var(--icon-size-8x);--avatar-text-small:var(--font-size-scale-up-03);--avatar-text-medium:var(--font-size-scale-up-07);--avatar-text-large:var(--font-size-scale-up-11);-ms-flex-align:center;align-items:center;background-color:transparent;border:0;display:-ms-inline-flexbox;display:inline-flex;font-size:var(--avatar-text-size);font-weight:var(--font-weight-bold);-ms-flex-pack:center;justify-content:center;line-height:var(--avatar-size);vertical-align:middle}.br-avatar .content{-ms-flex-align:center;align-items:center;background-color:var(--blue-10);border-radius:50%;color:var(--blue-warm-20);display:-ms-inline-flexbox;display:inline-flex;font-size:var(--avatar-text-size);height:var(--avatar-size);-ms-flex-pack:center;justify-content:center;overflow:hidden;text-align:center;text-transform:uppercase;vertical-align:inherit;width:var(--avatar-size)}.br-avatar .content img{height:var(--avatar-size);vertical-align:inherit;width:var(--avatar-size)}.br-avatar.small,.br-avatar[small]{--avatar-size:var(--avatar-small);--avatar-icon-size:var(--avatar-icon-small);--avatar-text-size:var(--avatar-text-small)}.br-avatar.is-medium,.br-avatar.medium,.br-avatar[medium]{--avatar-size:var(--avatar-medium);--avatar-icon-size:var(--avatar-icon-medium);--avatar-text-size:var(--avatar-text-medium)}.br-avatar.large,.br-avatar[large]{--avatar-size:var(--avatar-large);--avatar-icon-size:var(--avatar-icon-large);--avatar-text-size:var(--avatar-text-large)}.br-avatar[data-toggle=dropdown]:focus{outline:none}.br-avatar[data-toggle=dropdown]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}.br-avatar .image{-ms-flex-align:center;align-items:center;background-color:var(--blue-10);border-radius:50%;color:var(--blue-warm-20);display:-ms-inline-flexbox;display:inline-flex;font-size:var(--avatar-text-size);height:var(--avatar-size);-ms-flex-pack:center;justify-content:center;overflow:hidden;text-align:center;text-transform:uppercase;vertical-align:inherit;width:var(--avatar-size)}.br-avatar .image img{height:var(--avatar-size);vertical-align:inherit;width:var(--avatar-size)}:host{display:block}";const l=n;const s=a(class a extends t{constructor(){super();this.__registerHost();this.__attachShadow();this.iconSizes={small:{height:"32px",width:"40px"},medium:{height:"80px",width:"88px"},large:{height:"128px",width:"136px"}};this.iconMarginTops={small:"0.7em",medium:"1em",large:"0.62em"};this.inheritedAttributes={};this.density="medium";this.image=undefined;this.imageAlt="Imagem do avatar";this.isIconic=false;this.text=undefined;this.iconWidth=undefined;this.iconHeight=undefined;this.marginTop=undefined}componentWillLoad(){this.inheritedAttributes=i(this.el)}getCssClassMap(){return{"br-avatar":true,small:this.density==="small",medium:this.density==="medium",large:this.density==="large"}}renderAvatar(){var a,t,e,i,o;if(((a=this.text)===null||a===void 0?void 0:a.trim().length)>0){return r("span",{class:"content bg-support-01 text-pure-0",title:this.text},this.text[0].toUpperCase())}if(((t=this.image)===null||t===void 0?void 0:t.trim().length)>0){return r("span",{class:"content",title:this.imageAlt||this.text},r("img",{src:this.image,alt:this.imageAlt,loading:"lazy"}))}if(this.isIconic){return r("span",{class:"content",title:this.text},r("br-icon",{"icon-name":"fa-solid:user",height:((e=this.iconHeight)===null||e===void 0?void 0:e.length)>0?this.iconHeight:this.iconSizes[this.density].height,width:((i=this.iconWidth)===null||i===void 0?void 0:i.length)>0?this.iconWidth:this.iconSizes[this.density].width,"aria-hidden":"true",style:{"margin-top":((o=this.marginTop)===null||o===void 0?void 0:o.length)>0?this.marginTop:this.iconMarginTops[this.density]}}))}}render(){return r(e,{key:"8e7d5a109467811e371dcfa56214f079b82970bb"},r("span",Object.assign({key:"63036c324a6be24469e6453a40af31e684973c1a",class:this.getCssClassMap()},this.inheritedAttributes),this.renderAvatar()))}get el(){return this}static get style(){return l}},[1,"br-avatar",{density:[1],image:[1],imageAlt:[1,"image-alt"],isIconic:[4,"is-iconic"],text:[1],iconWidth:[1,"icon-width"],iconHeight:[1,"icon-height"],marginTop:[1,"margin-top"]}]);function c(){if(typeof customElements==="undefined"){return}const a=["br-avatar","br-icon"];a.forEach((a=>{switch(a){case"br-avatar":if(!customElements.get(a)){customElements.define(a,s)}break;case"br-icon":if(!customElements.get(a)){o()}break}}))}c();const g=s;const v=c;export{g as BrAvatar,v as defineCustomElement};
|
|
155
6
|
//# sourceMappingURL=br-avatar.js.map
|