@plusui/library 0.1.3 → 0.1.4
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/cdn/components/accordion/accordion.js +34 -9
- package/cdn/components/accordion/accordion.style.js +2 -2
- package/cdn/components/accordion/index.js +4 -3
- package/cdn/components/accordion-group/accordion-group.js +5 -4
- package/cdn/components/accordion-group/index.js +4 -3
- package/cdn/components/alert/alert.js +25 -14
- package/cdn/components/alert/index.js +5 -4
- package/cdn/components/avatar/avatar.js +26 -11
- package/cdn/components/avatar/avatar.style.js +1 -1
- package/cdn/components/avatar/index.js +6 -5
- package/cdn/components/badge/badge.host.style.js +1 -1
- package/cdn/components/badge/badge.js +5 -5
- package/cdn/components/badge/index.js +5 -5
- package/cdn/components/base/index.js +2 -2
- package/cdn/components/base/tailwind-base.js +3 -3
- package/cdn/components/breadcrumb/breadcrumb.js +3 -3
- package/cdn/components/breadcrumb/index.js +3 -3
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +9 -8
- package/cdn/components/breadcrumb-item/index.js +5 -4
- package/cdn/components/button/button.js +12 -8
- package/cdn/components/button/index.js +5 -4
- package/cdn/components/button-group/button-group.js +19 -29
- package/cdn/components/button-group/index.js +5 -4
- package/cdn/components/checkbox/checkbox.js +13 -16
- package/cdn/components/checkbox/index.js +6 -9
- package/cdn/components/checkbox-group/checkbox-group.js +41 -20
- package/cdn/components/checkbox-group/index.js +4 -3
- package/cdn/components/chip/chip.js +9 -8
- package/cdn/components/chip/index.js +5 -4
- package/cdn/components/divider/divider.js +4 -4
- package/cdn/components/divider/divider.style.js +1 -1
- package/cdn/components/divider/index.js +4 -4
- package/cdn/components/drawer/drawer.js +12 -6
- package/cdn/components/drawer/index.js +5 -4
- package/cdn/components/dropdown/dropdown.js +10 -9
- package/cdn/components/dropdown/index.js +6 -5
- package/cdn/components/dropdown-item/dropdown-item.js +8 -7
- package/cdn/components/dropdown-item/index.js +6 -5
- package/cdn/components/icon/icon-registry.js +103 -0
- package/cdn/components/icon/icon.js +198 -2956
- package/cdn/components/icon/index.js +10 -3
- package/cdn/components/icon/light-icons.js +8 -0
- package/cdn/components/icon/regular-icons.js +10 -0
- package/cdn/components/icon/solid-icons.js +34 -0
- package/cdn/components/index.js +15 -14
- package/cdn/components/input/index.js +7 -6
- package/cdn/components/input/input.js +48 -23
- package/cdn/components/link/index.js +4 -3
- package/cdn/components/link/link.js +8 -7
- package/cdn/components/list-box-item/index.js +5 -4
- package/cdn/components/list-box-item/list-box-item.js +9 -16
- package/cdn/components/modal/index.js +5 -4
- package/cdn/components/modal/modal.js +20 -9
- package/cdn/components/popconfirm/index.js +6 -5
- package/cdn/components/popconfirm/popconfirm.js +16 -19
- package/cdn/components/popover/index.js +6 -5
- package/cdn/components/popover/popover.js +29 -14
- package/cdn/components/radio/index.js +6 -5
- package/cdn/components/radio/radio.js +18 -35
- package/cdn/components/radio-group/index.js +4 -3
- package/cdn/components/radio-group/radio-group.js +10 -9
- package/cdn/components/rating/index.js +7 -9
- package/cdn/components/rating/rating.js +12 -16
- package/cdn/components/segmented-picker/index.js +3 -3
- package/cdn/components/segmented-picker/segmented-picker.component.js +3 -3
- package/cdn/components/segmented-picker-item/index.js +5 -4
- package/cdn/components/segmented-picker-item/segmented-picker-item.component.js +10 -16
- package/cdn/components/select/index.js +6 -5
- package/cdn/components/select/select.js +34 -18
- package/cdn/components/select/select.style.js +5 -1
- package/cdn/components/select-item/index.js +6 -5
- package/cdn/components/select-item/select-item.js +8 -7
- package/cdn/components/service/index.js +5 -8
- package/cdn/components/service/service.js +6 -9
- package/cdn/components/tab/index.js +5 -4
- package/cdn/components/tab/tab.js +15 -11
- package/cdn/components/tab-group/index.js +5 -4
- package/cdn/components/tab-group/tab-group.js +11 -8
- package/cdn/components/tab-panel/index.js +4 -3
- package/cdn/components/tab-panel/tab-panel.js +7 -7
- package/cdn/components/tag/index.js +5 -4
- package/cdn/components/tag/tag.js +7 -9
- package/cdn/components/text/index.js +3 -3
- package/cdn/components/text/text.js +3 -3
- package/cdn/components/textarea/index.js +7 -6
- package/cdn/components/textarea/textarea.js +18 -12
- package/cdn/components/toast/index.js +4 -7
- package/cdn/components/toast/toast.js +9 -12
- package/cdn/components/toast-container/index.js +5 -8
- package/cdn/components/toast-container/toast-container.js +5 -8
- package/cdn/components/toggle/index.js +8 -11
- package/cdn/components/toggle/toggle.js +24 -26
- package/cdn/components/tooltip/index.js +5 -5
- package/cdn/components/tooltip/tooltip.js +5 -5
- package/cdn/factory/tailwind-factory.js +7 -7
- package/cdn/floating-ui.dom-CXNHR8n2.js +1 -0
- package/cdn/{floating-ui.dom-BpzIshEG.js → floating-ui.dom-OBaMlALa.js} +14 -26
- package/cdn/global-CFlb4NrK.js +31 -0
- package/cdn/global-DJT9VHCE.js +1 -0
- package/cdn/{if-defined-CIB8OTrH.js → if-defined-CQ5F5a3V.js} +1 -1
- package/{dist/if-defined-DpyZ37D-.js → cdn/if-defined-D-m3dgRf.js} +1 -1
- package/cdn/lit-element-ByzbtpGk.js +27 -0
- package/cdn/lit-element-DNNEDGnu.js +23 -0
- package/cdn/{live-C1eBrEBV.js → live-BOAtKRUN.js} +1 -1
- package/cdn/{live-CYp4nasd.js → live-Ba4FL2pG.js} +1 -1
- package/cdn/loader.js +3 -7
- package/cdn/property-DLlzgs39.js +7 -0
- package/cdn/{property-Dz31PgR6.js → property-DiPQx9S3.js} +2 -2
- package/{dist/query-assigned-elements-BjEeiBhg.js → cdn/query-assigned-elements-D78NayL0.js} +1 -1
- package/{dist/state-CQcls-Yf.js → cdn/state-CoIPL7X5.js} +1 -1
- package/cdn/{state-BRspp5eU.js → state-D1d5Sfj8.js} +1 -1
- package/{dist/style-map-Cgr6kXUm.js → cdn/style-map-DC_vNus2.js} +1 -1
- package/cdn/{style-map-BYRi_l0u.js → style-map-Z-XBeQmS.js} +1 -1
- package/cdn/utils/boolean-converter.js +30 -0
- package/custom-elements.json +663 -355
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +33 -8
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/accordion/accordion.style.js +2 -2
- package/dist/components/accordion/accordion.style.js.map +1 -1
- package/dist/components/accordion/index.js +3 -2
- package/dist/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/components/accordion-group/accordion-group.d.ts.map +1 -1
- package/dist/components/accordion-group/accordion-group.js +4 -3
- package/dist/components/accordion-group/accordion-group.js.map +1 -1
- package/dist/components/accordion-group/index.js +3 -2
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +24 -13
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/index.js +4 -3
- package/dist/components/avatar/avatar.d.ts +4 -3
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +25 -10
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/avatar.style.js +1 -1
- package/dist/components/avatar/avatar.style.js.map +1 -1
- package/dist/components/avatar/index.js +5 -4
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.host.style.js +1 -1
- package/dist/components/badge/badge.js +4 -4
- package/dist/components/badge/index.js +4 -4
- package/dist/components/base/index.js +1 -1
- package/dist/components/base/tailwind-base.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/components/breadcrumb/index.js +2 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts.map +1 -1
- package/dist/components/breadcrumb-item/breadcrumb-item.js +8 -7
- package/dist/components/breadcrumb-item/breadcrumb-item.js.map +1 -1
- package/dist/components/breadcrumb-item/index.js +4 -3
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +11 -7
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/index.js +4 -3
- package/dist/components/button-group/button-group.d.ts +2 -2
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +18 -28
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/button-group/index.js +4 -3
- package/dist/components/checkbox/checkbox.d.ts +1 -2
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.js +12 -15
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox/index.js +5 -8
- package/dist/components/checkbox-group/checkbox-group.d.ts +2 -3
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +40 -19
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/index.js +3 -2
- package/dist/components/chip/chip.d.ts +1 -1
- package/dist/components/chip/chip.d.ts.map +1 -1
- package/dist/components/chip/chip.js +8 -7
- package/dist/components/chip/chip.js.map +1 -1
- package/dist/components/chip/index.js +4 -3
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/divider/divider.style.js +1 -1
- package/dist/components/divider/index.js +3 -3
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +11 -5
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/drawer/index.js +4 -3
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.js +9 -8
- package/dist/components/dropdown/dropdown.js.map +1 -1
- package/dist/components/dropdown/index.js +5 -4
- package/dist/components/dropdown-item/dropdown-item.d.ts +1 -1
- package/dist/components/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/dist/components/dropdown-item/dropdown-item.js +7 -6
- package/dist/components/dropdown-item/dropdown-item.js.map +1 -1
- package/dist/components/dropdown-item/index.js +5 -4
- package/dist/components/icon/icon-registry.d.ts +50 -0
- package/dist/components/icon/icon-registry.d.ts.map +1 -0
- package/dist/components/icon/icon-registry.js +103 -0
- package/dist/components/icon/icon-registry.js.map +1 -0
- package/dist/components/icon/icon.d.ts +55 -7
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +198 -2956
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/icon/index.d.ts +3 -1
- package/dist/components/icon/index.d.ts.map +1 -1
- package/dist/components/icon/index.js +10 -3
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/icon/light-icons.d.ts +7 -0
- package/dist/components/icon/light-icons.d.ts.map +1 -0
- package/dist/components/icon/light-icons.js +8 -0
- package/dist/components/icon/light-icons.js.map +1 -0
- package/dist/components/icon/regular-icons.d.ts +9 -0
- package/dist/components/icon/regular-icons.d.ts.map +1 -0
- package/dist/components/icon/regular-icons.js +10 -0
- package/dist/components/icon/regular-icons.js.map +1 -0
- package/dist/components/icon/solid-icons.d.ts +28 -0
- package/dist/components/icon/solid-icons.d.ts.map +1 -0
- package/dist/components/icon/solid-icons.js +34 -0
- package/dist/components/icon/solid-icons.js.map +1 -0
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +14 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/input/index.js +6 -5
- package/dist/components/input/input.d.ts +10 -3
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +47 -22
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/link/index.js +3 -2
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/link/link.js +7 -6
- package/dist/components/link/link.js.map +1 -1
- package/dist/components/list-box-item/index.js +4 -3
- package/dist/components/list-box-item/list-box-item.d.ts +3 -11
- package/dist/components/list-box-item/list-box-item.d.ts.map +1 -1
- package/dist/components/list-box-item/list-box-item.js +8 -15
- package/dist/components/list-box-item/list-box-item.js.map +1 -1
- package/dist/components/modal/index.js +4 -3
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +19 -8
- package/dist/components/modal/modal.js.map +1 -1
- package/dist/components/popconfirm/index.js +5 -4
- package/dist/components/popconfirm/popconfirm.d.ts +1 -7
- package/dist/components/popconfirm/popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/popconfirm.js +15 -18
- package/dist/components/popconfirm/popconfirm.js.map +1 -1
- package/dist/components/popover/index.js +5 -4
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +28 -13
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/index.js +5 -4
- package/dist/components/radio/radio.d.ts +8 -26
- package/dist/components/radio/radio.d.ts.map +1 -1
- package/dist/components/radio/radio.js +17 -34
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/radio-group/index.js +3 -2
- package/dist/components/radio-group/radio-group.d.ts +4 -4
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +9 -8
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/rating/index.js +6 -8
- package/dist/components/rating/rating.d.ts +1 -2
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/rating/rating.js +11 -15
- package/dist/components/rating/rating.js.map +1 -1
- package/dist/components/segmented-picker/index.js +2 -2
- package/dist/components/segmented-picker/segmented-picker.component.d.ts +1 -1
- package/dist/components/segmented-picker/segmented-picker.component.js +2 -2
- package/dist/components/segmented-picker-item/index.js +4 -3
- package/dist/components/segmented-picker-item/segmented-picker-item.component.d.ts +4 -11
- package/dist/components/segmented-picker-item/segmented-picker-item.component.d.ts.map +1 -1
- package/dist/components/segmented-picker-item/segmented-picker-item.component.js +9 -15
- package/dist/components/segmented-picker-item/segmented-picker-item.component.js.map +1 -1
- package/dist/components/select/index.js +5 -4
- package/dist/components/select/select.d.ts +6 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +33 -17
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.style.d.ts +28 -0
- package/dist/components/select/select.style.d.ts.map +1 -1
- package/dist/components/select/select.style.js +5 -1
- package/dist/components/select/select.style.js.map +1 -1
- package/dist/components/select-item/index.js +5 -4
- package/dist/components/select-item/select-item.d.ts +1 -1
- package/dist/components/select-item/select-item.d.ts.map +1 -1
- package/dist/components/select-item/select-item.js +7 -6
- package/dist/components/select-item/select-item.js.map +1 -1
- package/dist/components/service/index.js +4 -7
- package/dist/components/service/service.d.ts +1 -1
- package/dist/components/service/service.js +5 -8
- package/dist/components/tab/index.js +4 -3
- package/dist/components/tab/tab.d.ts +3 -3
- package/dist/components/tab/tab.d.ts.map +1 -1
- package/dist/components/tab/tab.js +14 -10
- package/dist/components/tab/tab.js.map +1 -1
- package/dist/components/tab-group/index.js +4 -3
- package/dist/components/tab-group/tab-group.d.ts +2 -2
- package/dist/components/tab-group/tab-group.d.ts.map +1 -1
- package/dist/components/tab-group/tab-group.js +10 -7
- package/dist/components/tab-group/tab-group.js.map +1 -1
- package/dist/components/tab-panel/index.js +3 -2
- package/dist/components/tab-panel/tab-panel.d.ts +3 -4
- package/dist/components/tab-panel/tab-panel.d.ts.map +1 -1
- package/dist/components/tab-panel/tab-panel.js +6 -6
- package/dist/components/tab-panel/tab-panel.js.map +1 -1
- package/dist/components/tag/index.js +4 -3
- package/dist/components/tag/tag.d.ts +2 -5
- package/dist/components/tag/tag.d.ts.map +1 -1
- package/dist/components/tag/tag.js +6 -8
- package/dist/components/tag/tag.js.map +1 -1
- package/dist/components/text/index.js +2 -2
- package/dist/components/text/text.d.ts +1 -1
- package/dist/components/text/text.js +2 -2
- package/dist/components/textarea/index.js +6 -5
- package/dist/components/textarea/textarea.d.ts +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/textarea/textarea.js +17 -11
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/toast/index.js +3 -6
- package/dist/components/toast/toast.d.ts +1 -2
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toast/toast.js +8 -11
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toast-container/index.js +4 -7
- package/dist/components/toast-container/toast-container.d.ts +1 -1
- package/dist/components/toast-container/toast-container.js +4 -7
- package/dist/components/toggle/index.js +7 -10
- package/dist/components/toggle/toggle.d.ts +2 -4
- package/dist/components/toggle/toggle.d.ts.map +1 -1
- package/dist/components/toggle/toggle.js +23 -25
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/index.js +4 -4
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/factory/tailwind-factory.d.ts.map +1 -1
- package/dist/factory/tailwind-factory.js +6 -6
- package/dist/floating-ui.dom-D2kZGcxs.js +1 -0
- package/dist/{floating-ui.dom-BpzIshEG.js → floating-ui.dom-OBaMlALa.js} +14 -26
- package/{cdn/if-defined-DpyZ37D-.js → dist/if-defined-D-m3dgRf.js} +1 -1
- package/dist/{if-defined-ByWlXMXY.js → if-defined-Lnht-wFh.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/lit-element-BrXyG1pe.js +23 -0
- package/dist/lit-element-ByzbtpGk.js +27 -0
- package/dist/{live-C1eBrEBV.js → live-BOAtKRUN.js} +1 -1
- package/dist/{live-pVFa0Jqn.js → live-BmuA0KMh.js} +1 -1
- package/dist/model/plus.d.ts.map +1 -1
- package/dist/property-B6euWYsa.js +7 -0
- package/dist/{property-Dz31PgR6.js → property-DiPQx9S3.js} +2 -2
- package/dist/{query-RRtZCxQ7.js → query-CS0ORr77.js} +1 -1
- package/{cdn/query-assigned-elements-BVENYXMn.js → dist/query-assigned-elements-kixPV2ud.js} +2 -2
- package/{cdn/state-hFbsBSdV.js → dist/state-CLE0KCMj.js} +1 -1
- package/dist/{state-BRspp5eU.js → state-D1d5Sfj8.js} +1 -1
- package/{cdn/style-map-Cgr6kXUm.js → dist/style-map-DC_vNus2.js} +1 -1
- package/dist/{style-map-BRcUXxgF.js → style-map-YDK_mtXK.js} +1 -1
- package/dist/styles/global.js +2 -2
- package/dist/utils/boolean-converter.d.ts +21 -0
- package/dist/utils/boolean-converter.d.ts.map +1 -0
- package/dist/utils/boolean-converter.js +30 -0
- package/dist/utils/boolean-converter.js.map +1 -0
- package/eslint/custom-element-eslint-rules.js +9 -9
- package/package.json +2 -6
- package/public/html/index.js +15772 -0
- package/public/react/index.d.ts +6908 -0
- package/public/react/index.js +17355 -0
- package/react/PlusAccordion.js +9 -9
- package/react/PlusAccordionGroup.js +3 -1
- package/react/PlusAlert.js +9 -9
- package/react/PlusAvatar.d.ts +1 -1
- package/react/PlusAvatar.js +3 -1
- package/react/PlusBadge.js +3 -1
- package/react/PlusBreadcrumb.js +3 -1
- package/react/PlusBreadcrumbItem.js +3 -1
- package/react/PlusButton.js +3 -1
- package/react/PlusButtonGroup.js +3 -1
- package/react/PlusCheckbox.js +17 -9
- package/react/PlusCheckboxGroup.js +9 -9
- package/react/PlusChip.js +3 -1
- package/react/PlusDivider.js +9 -9
- package/react/PlusDrawer.js +7 -1
- package/react/PlusDropDownItem.js +9 -9
- package/react/PlusDropdown.js +9 -9
- package/react/PlusIcon.d.ts +17 -3
- package/react/PlusIcon.js +8 -4
- package/react/PlusInput.d.ts +5 -8
- package/react/PlusInput.js +16 -13
- package/react/PlusLink.js +3 -1
- package/react/PlusListBoxItem.d.ts +2 -4
- package/react/PlusListBoxItem.js +9 -9
- package/react/PlusModal.js +7 -1
- package/react/PlusPopconfirm.d.ts +2 -8
- package/react/PlusPopconfirm.js +9 -9
- package/react/PlusPopover.js +11 -11
- package/react/PlusRadio.d.ts +7 -7
- package/react/PlusRadio.js +12 -9
- package/react/PlusRadioGroup.d.ts +3 -3
- package/react/PlusRadioGroup.js +3 -1
- package/react/PlusRating.js +12 -9
- package/react/PlusSegmentedPicker.js +9 -9
- package/react/PlusSegmentedPickerItem.d.ts +5 -2
- package/react/PlusSegmentedPickerItem.js +3 -1
- package/react/PlusSelect.d.ts +3 -0
- package/react/PlusSelect.js +11 -9
- package/react/PlusSelectItem.js +9 -9
- package/react/PlusService.js +3 -1
- package/react/PlusTab.d.ts +2 -2
- package/react/PlusTab.js +3 -1
- package/react/PlusTabGroup.d.ts +1 -1
- package/react/PlusTabGroup.js +9 -9
- package/react/PlusTabPanel.d.ts +2 -2
- package/react/PlusTabPanel.js +3 -1
- package/react/PlusTag.js +3 -1
- package/react/PlusText.js +3 -1
- package/react/PlusTextarea.js +14 -9
- package/react/PlusToast.js +9 -9
- package/react/PlusToastContainer.js +3 -1
- package/react/PlusToggle.d.ts +0 -3
- package/react/PlusToggle.js +14 -11
- package/react/PlusTooltip.js +3 -1
- package/react/Tailwind.js +3 -1
- package/react/index.d.ts +1 -2
- package/react/index.js +1 -2
- package/types/custom-element-jsx.d.ts +61 -68
- package/types/custom-element-solidjs.d.ts +64 -73
- package/types/custom-element-svelte.d.ts +61 -68
- package/types/custom-element-vuejs.d.ts +61 -68
- package/vscode.css-custom-data.json +17 -0
- package/vscode.html-custom-data.json +103 -78
- package/web-types.json +163 -120
- package/cdn/components/svg-icon/icons.js +0 -31
- package/cdn/components/svg-icon/index.js +0 -8
- package/cdn/components/svg-icon/svg-icon.js +0 -31
- package/cdn/floating-ui.dom-BYyWpmHF.js +0 -1
- package/cdn/global-CvNEUQeA.js +0 -31
- package/cdn/global-DePk2FdN.js +0 -1
- package/cdn/lit-element-BNK__jO-.js +0 -27
- package/cdn/lit-element-CSuLHuHb.js +0 -22
- package/cdn/property-B8EDuyz_.js +0 -7
- package/cdn/unsafe-html-BXTWMFA8.js +0 -10
- package/cdn/unsafe-html-CFzahWAO.js +0 -6
- package/dist/components/svg-icon/icons.d.ts +0 -25
- package/dist/components/svg-icon/icons.d.ts.map +0 -1
- package/dist/components/svg-icon/icons.js +0 -31
- package/dist/components/svg-icon/icons.js.map +0 -1
- package/dist/components/svg-icon/index.d.ts +0 -3
- package/dist/components/svg-icon/index.d.ts.map +0 -1
- package/dist/components/svg-icon/index.js +0 -8
- package/dist/components/svg-icon/index.js.map +0 -1
- package/dist/components/svg-icon/svg-icon.d.ts +0 -9
- package/dist/components/svg-icon/svg-icon.d.ts.map +0 -1
- package/dist/components/svg-icon/svg-icon.js +0 -31
- package/dist/components/svg-icon/svg-icon.js.map +0 -1
- package/dist/floating-ui.dom-CC_JVmd9.js +0 -1
- package/dist/lit-element-B7kcWHze.js +0 -22
- package/dist/lit-element-BNK__jO-.js +0 -27
- package/dist/property-Bb1Db6at.js +0 -7
- package/dist/unsafe-html-BXTWMFA8.js +0 -10
- package/dist/unsafe-html-CglCgc9K.js +0 -6
- package/react/PlusSvgIcon.d.ts +0 -52
- package/react/PlusSvgIcon.js +0 -21
- /package/dist/{base-DxcUbjR1.js → base-AyU8eeio.js} +0 -0
- /package/dist/{directive-BnoBrrxd.js → directive-D_Ke56J1.js} +0 -0
- /package/dist/{index-DHCwMC4J.js → index-CsKO2ZpR.js} +0 -0
|
@@ -1,2999 +1,241 @@
|
|
|
1
|
-
import { _ as __decorate, n } from '../../property-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '../../directive-DZCF8pFJ.js';
|
|
1
|
+
import { _ as __decorate, n } from '../../property-DiPQx9S3.js';
|
|
2
|
+
import { E, T, i as i$1, r as r$1, x } from '../../lit-element-ByzbtpGk.js';
|
|
3
|
+
import { r } from '../../state-D1d5Sfj8.js';
|
|
4
|
+
import { i, t, e as e$1 } from '../../directive-DZCF8pFJ.js';
|
|
5
|
+
import { getIcon } from './icon-registry.js';
|
|
6
|
+
import './solid-icons.js';
|
|
7
|
+
import './regular-icons.js';
|
|
8
|
+
import './light-icons.js';
|
|
5
9
|
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
function _defineProperty(e, r, t) {
|
|
12
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
13
|
-
value: t,
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true
|
|
17
|
-
}) : e[r] = t, e;
|
|
18
|
-
}
|
|
19
|
-
function ownKeys(e, r) {
|
|
20
|
-
var t = Object.keys(e);
|
|
21
|
-
if (Object.getOwnPropertySymbols) {
|
|
22
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
23
|
-
r && (o = o.filter(function (r) {
|
|
24
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
25
|
-
})), t.push.apply(t, o);
|
|
26
|
-
}
|
|
27
|
-
return t;
|
|
28
|
-
}
|
|
29
|
-
function _objectSpread2(e) {
|
|
30
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
31
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
32
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
33
|
-
_defineProperty(e, r, t[r]);
|
|
34
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
35
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return e;
|
|
39
|
-
}
|
|
40
|
-
function _toPrimitive(t, r) {
|
|
41
|
-
if ("object" != typeof t || !t) return t;
|
|
42
|
-
var e = t[Symbol.toPrimitive];
|
|
43
|
-
if (void 0 !== e) {
|
|
44
|
-
var i = e.call(t, r);
|
|
45
|
-
if ("object" != typeof i) return i;
|
|
46
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
47
|
-
}
|
|
48
|
-
return ("string" === r ? String : Number)(t);
|
|
49
|
-
}
|
|
50
|
-
function _toPropertyKey(t) {
|
|
51
|
-
var i = _toPrimitive(t, "string");
|
|
52
|
-
return "symbol" == typeof i ? i : i + "";
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const noop = () => {};
|
|
56
|
-
let _WINDOW = {};
|
|
57
|
-
let _DOCUMENT = {};
|
|
58
|
-
let _MUTATION_OBSERVER = null;
|
|
59
|
-
let _PERFORMANCE = {
|
|
60
|
-
mark: noop,
|
|
61
|
-
measure: noop
|
|
62
|
-
};
|
|
63
|
-
try {
|
|
64
|
-
if (typeof window !== 'undefined') _WINDOW = window;
|
|
65
|
-
if (typeof document !== 'undefined') _DOCUMENT = document;
|
|
66
|
-
if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;
|
|
67
|
-
if (typeof performance !== 'undefined') _PERFORMANCE = performance;
|
|
68
|
-
} catch (e) {}
|
|
69
|
-
const {
|
|
70
|
-
userAgent = ''
|
|
71
|
-
} = _WINDOW.navigator || {};
|
|
72
|
-
const WINDOW = _WINDOW;
|
|
73
|
-
const DOCUMENT = _DOCUMENT;
|
|
74
|
-
const MUTATION_OBSERVER = _MUTATION_OBSERVER;
|
|
75
|
-
const PERFORMANCE = _PERFORMANCE;
|
|
76
|
-
!!WINDOW.document;
|
|
77
|
-
const IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';
|
|
78
|
-
const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
|
|
79
|
-
|
|
80
|
-
var p = /fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,
|
|
81
|
-
g = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;
|
|
82
|
-
var S = {
|
|
83
|
-
classic: {
|
|
84
|
-
fa: "solid",
|
|
85
|
-
fas: "solid",
|
|
86
|
-
"fa-solid": "solid",
|
|
87
|
-
far: "regular",
|
|
88
|
-
"fa-regular": "regular",
|
|
89
|
-
fal: "light",
|
|
90
|
-
"fa-light": "light",
|
|
91
|
-
fat: "thin",
|
|
92
|
-
"fa-thin": "thin",
|
|
93
|
-
fab: "brands",
|
|
94
|
-
"fa-brands": "brands"
|
|
95
|
-
},
|
|
96
|
-
duotone: {
|
|
97
|
-
fa: "solid",
|
|
98
|
-
fad: "solid",
|
|
99
|
-
"fa-solid": "solid",
|
|
100
|
-
"fa-duotone": "solid",
|
|
101
|
-
fadr: "regular",
|
|
102
|
-
"fa-regular": "regular",
|
|
103
|
-
fadl: "light",
|
|
104
|
-
"fa-light": "light",
|
|
105
|
-
fadt: "thin",
|
|
106
|
-
"fa-thin": "thin"
|
|
107
|
-
},
|
|
108
|
-
sharp: {
|
|
109
|
-
fa: "solid",
|
|
110
|
-
fass: "solid",
|
|
111
|
-
"fa-solid": "solid",
|
|
112
|
-
fasr: "regular",
|
|
113
|
-
"fa-regular": "regular",
|
|
114
|
-
fasl: "light",
|
|
115
|
-
"fa-light": "light",
|
|
116
|
-
fast: "thin",
|
|
117
|
-
"fa-thin": "thin"
|
|
118
|
-
},
|
|
119
|
-
"sharp-duotone": {
|
|
120
|
-
fa: "solid",
|
|
121
|
-
fasds: "solid",
|
|
122
|
-
"fa-solid": "solid",
|
|
123
|
-
fasdr: "regular",
|
|
124
|
-
"fa-regular": "regular",
|
|
125
|
-
fasdl: "light",
|
|
126
|
-
"fa-light": "light",
|
|
127
|
-
fasdt: "thin",
|
|
128
|
-
"fa-thin": "thin"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
A = {
|
|
132
|
-
GROUP: "duotone-group",
|
|
133
|
-
PRIMARY: "primary",
|
|
134
|
-
SECONDARY: "secondary"
|
|
135
|
-
},
|
|
136
|
-
P = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone"];
|
|
137
|
-
var s = "classic",
|
|
138
|
-
t = "duotone",
|
|
139
|
-
r = "sharp",
|
|
140
|
-
o = "sharp-duotone",
|
|
141
|
-
L = [s, t, r, o];
|
|
142
|
-
var G = {
|
|
143
|
-
classic: {
|
|
144
|
-
900: "fas",
|
|
145
|
-
400: "far",
|
|
146
|
-
normal: "far",
|
|
147
|
-
300: "fal",
|
|
148
|
-
100: "fat"
|
|
149
|
-
},
|
|
150
|
-
duotone: {
|
|
151
|
-
900: "fad",
|
|
152
|
-
400: "fadr",
|
|
153
|
-
300: "fadl",
|
|
154
|
-
100: "fadt"
|
|
155
|
-
},
|
|
156
|
-
sharp: {
|
|
157
|
-
900: "fass",
|
|
158
|
-
400: "fasr",
|
|
159
|
-
300: "fasl",
|
|
160
|
-
100: "fast"
|
|
161
|
-
},
|
|
162
|
-
"sharp-duotone": {
|
|
163
|
-
900: "fasds",
|
|
164
|
-
400: "fasdr",
|
|
165
|
-
300: "fasdl",
|
|
166
|
-
100: "fasdt"
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
var lt = {
|
|
170
|
-
"Font Awesome 6 Free": {
|
|
171
|
-
900: "fas",
|
|
172
|
-
400: "far"
|
|
173
|
-
},
|
|
174
|
-
"Font Awesome 6 Pro": {
|
|
175
|
-
900: "fas",
|
|
176
|
-
400: "far",
|
|
177
|
-
normal: "far",
|
|
178
|
-
300: "fal",
|
|
179
|
-
100: "fat"
|
|
180
|
-
},
|
|
181
|
-
"Font Awesome 6 Brands": {
|
|
182
|
-
400: "fab",
|
|
183
|
-
normal: "fab"
|
|
184
|
-
},
|
|
185
|
-
"Font Awesome 6 Duotone": {
|
|
186
|
-
900: "fad",
|
|
187
|
-
400: "fadr",
|
|
188
|
-
normal: "fadr",
|
|
189
|
-
300: "fadl",
|
|
190
|
-
100: "fadt"
|
|
191
|
-
},
|
|
192
|
-
"Font Awesome 6 Sharp": {
|
|
193
|
-
900: "fass",
|
|
194
|
-
400: "fasr",
|
|
195
|
-
normal: "fasr",
|
|
196
|
-
300: "fasl",
|
|
197
|
-
100: "fast"
|
|
198
|
-
},
|
|
199
|
-
"Font Awesome 6 Sharp Duotone": {
|
|
200
|
-
900: "fasds",
|
|
201
|
-
400: "fasdr",
|
|
202
|
-
normal: "fasdr",
|
|
203
|
-
300: "fasdl",
|
|
204
|
-
100: "fasdt"
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
var pt = new Map([["classic", {
|
|
208
|
-
defaultShortPrefixId: "fas",
|
|
209
|
-
defaultStyleId: "solid",
|
|
210
|
-
styleIds: ["solid", "regular", "light", "thin", "brands"],
|
|
211
|
-
futureStyleIds: [],
|
|
212
|
-
defaultFontWeight: 900
|
|
213
|
-
}], ["sharp", {
|
|
214
|
-
defaultShortPrefixId: "fass",
|
|
215
|
-
defaultStyleId: "solid",
|
|
216
|
-
styleIds: ["solid", "regular", "light", "thin"],
|
|
217
|
-
futureStyleIds: [],
|
|
218
|
-
defaultFontWeight: 900
|
|
219
|
-
}], ["duotone", {
|
|
220
|
-
defaultShortPrefixId: "fad",
|
|
221
|
-
defaultStyleId: "solid",
|
|
222
|
-
styleIds: ["solid", "regular", "light", "thin"],
|
|
223
|
-
futureStyleIds: [],
|
|
224
|
-
defaultFontWeight: 900
|
|
225
|
-
}], ["sharp-duotone", {
|
|
226
|
-
defaultShortPrefixId: "fasds",
|
|
227
|
-
defaultStyleId: "solid",
|
|
228
|
-
styleIds: ["solid", "regular", "light", "thin"],
|
|
229
|
-
futureStyleIds: [],
|
|
230
|
-
defaultFontWeight: 900
|
|
231
|
-
}]]),
|
|
232
|
-
xt = {
|
|
233
|
-
classic: {
|
|
234
|
-
solid: "fas",
|
|
235
|
-
regular: "far",
|
|
236
|
-
light: "fal",
|
|
237
|
-
thin: "fat",
|
|
238
|
-
brands: "fab"
|
|
239
|
-
},
|
|
240
|
-
duotone: {
|
|
241
|
-
solid: "fad",
|
|
242
|
-
regular: "fadr",
|
|
243
|
-
light: "fadl",
|
|
244
|
-
thin: "fadt"
|
|
245
|
-
},
|
|
246
|
-
sharp: {
|
|
247
|
-
solid: "fass",
|
|
248
|
-
regular: "fasr",
|
|
249
|
-
light: "fasl",
|
|
250
|
-
thin: "fast"
|
|
251
|
-
},
|
|
252
|
-
"sharp-duotone": {
|
|
253
|
-
solid: "fasds",
|
|
254
|
-
regular: "fasdr",
|
|
255
|
-
light: "fasdl",
|
|
256
|
-
thin: "fasdt"
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
var Ft = ["fak", "fa-kit", "fakd", "fa-kit-duotone"],
|
|
260
|
-
St = {
|
|
261
|
-
kit: {
|
|
262
|
-
fak: "kit",
|
|
263
|
-
"fa-kit": "kit"
|
|
264
|
-
},
|
|
265
|
-
"kit-duotone": {
|
|
266
|
-
fakd: "kit-duotone",
|
|
267
|
-
"fa-kit-duotone": "kit-duotone"
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
At = ["kit"];
|
|
271
|
-
var Ct = {
|
|
272
|
-
kit: {
|
|
273
|
-
"fa-kit": "fak"
|
|
274
|
-
}};
|
|
275
|
-
var Lt = ["fak", "fakd"],
|
|
276
|
-
Wt = {
|
|
277
|
-
kit: {
|
|
278
|
-
fak: "fa-kit"
|
|
279
|
-
}};
|
|
280
|
-
var Et = {
|
|
281
|
-
kit: {
|
|
282
|
-
kit: "fak"
|
|
283
|
-
},
|
|
284
|
-
"kit-duotone": {
|
|
285
|
-
"kit-duotone": "fakd"
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
var t$1 = {
|
|
290
|
-
GROUP: "duotone-group",
|
|
291
|
-
SWAP_OPACITY: "swap-opacity",
|
|
292
|
-
PRIMARY: "primary",
|
|
293
|
-
SECONDARY: "secondary"
|
|
294
|
-
},
|
|
295
|
-
r$1 = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone"];
|
|
296
|
-
var bt$1 = ["fak", "fa-kit", "fakd", "fa-kit-duotone"];
|
|
297
|
-
var Yt = {
|
|
298
|
-
"Font Awesome Kit": {
|
|
299
|
-
400: "fak",
|
|
300
|
-
normal: "fak"
|
|
301
|
-
},
|
|
302
|
-
"Font Awesome Kit Duotone": {
|
|
303
|
-
400: "fakd",
|
|
304
|
-
normal: "fakd"
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
var ua = {
|
|
308
|
-
classic: {
|
|
309
|
-
"fa-brands": "fab",
|
|
310
|
-
"fa-duotone": "fad",
|
|
311
|
-
"fa-light": "fal",
|
|
312
|
-
"fa-regular": "far",
|
|
313
|
-
"fa-solid": "fas",
|
|
314
|
-
"fa-thin": "fat"
|
|
315
|
-
},
|
|
316
|
-
duotone: {
|
|
317
|
-
"fa-regular": "fadr",
|
|
318
|
-
"fa-light": "fadl",
|
|
319
|
-
"fa-thin": "fadt"
|
|
320
|
-
},
|
|
321
|
-
sharp: {
|
|
322
|
-
"fa-solid": "fass",
|
|
323
|
-
"fa-regular": "fasr",
|
|
324
|
-
"fa-light": "fasl",
|
|
325
|
-
"fa-thin": "fast"
|
|
326
|
-
},
|
|
327
|
-
"sharp-duotone": {
|
|
328
|
-
"fa-solid": "fasds",
|
|
329
|
-
"fa-regular": "fasdr",
|
|
330
|
-
"fa-light": "fasdl",
|
|
331
|
-
"fa-thin": "fasdt"
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
I$1 = {
|
|
335
|
-
classic: ["fas", "far", "fal", "fat", "fad"],
|
|
336
|
-
duotone: ["fadr", "fadl", "fadt"],
|
|
337
|
-
sharp: ["fass", "fasr", "fasl", "fast"],
|
|
338
|
-
"sharp-duotone": ["fasds", "fasdr", "fasdl", "fasdt"]
|
|
339
|
-
},
|
|
340
|
-
ga = {
|
|
341
|
-
classic: {
|
|
342
|
-
fab: "fa-brands",
|
|
343
|
-
fad: "fa-duotone",
|
|
344
|
-
fal: "fa-light",
|
|
345
|
-
far: "fa-regular",
|
|
346
|
-
fas: "fa-solid",
|
|
347
|
-
fat: "fa-thin"
|
|
348
|
-
},
|
|
349
|
-
duotone: {
|
|
350
|
-
fadr: "fa-regular",
|
|
351
|
-
fadl: "fa-light",
|
|
352
|
-
fadt: "fa-thin"
|
|
353
|
-
},
|
|
354
|
-
sharp: {
|
|
355
|
-
fass: "fa-solid",
|
|
356
|
-
fasr: "fa-regular",
|
|
357
|
-
fasl: "fa-light",
|
|
358
|
-
fast: "fa-thin"
|
|
359
|
-
},
|
|
360
|
-
"sharp-duotone": {
|
|
361
|
-
fasds: "fa-solid",
|
|
362
|
-
fasdr: "fa-regular",
|
|
363
|
-
fasdl: "fa-light",
|
|
364
|
-
fasdt: "fa-thin"
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
x = ["fa-solid", "fa-regular", "fa-light", "fa-thin", "fa-duotone", "fa-brands"],
|
|
368
|
-
Ia = ["fa", "fas", "far", "fal", "fat", "fad", "fadr", "fadl", "fadt", "fab", "fass", "fasr", "fasl", "fast", "fasds", "fasdr", "fasdl", "fasdt", ...r$1, ...x],
|
|
369
|
-
m$1 = ["solid", "regular", "light", "thin", "duotone", "brands"],
|
|
370
|
-
c$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
371
|
-
F$1 = c$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),
|
|
372
|
-
ma = [...Object.keys(I$1), ...m$1, "2xs", "xs", "sm", "lg", "xl", "2xl", "beat", "border", "fade", "beat-fade", "bounce", "flip-both", "flip-horizontal", "flip-vertical", "flip", "fw", "inverse", "layers-counter", "layers-text", "layers", "li", "pull-left", "pull-right", "pulse", "rotate-180", "rotate-270", "rotate-90", "rotate-by", "shake", "spin-pulse", "spin-reverse", "spin", "stack-1x", "stack-2x", "stack", "ul", t$1.GROUP, t$1.SWAP_OPACITY, t$1.PRIMARY, t$1.SECONDARY].concat(c$1.map(a => "".concat(a, "x"))).concat(F$1.map(a => "w-".concat(a)));
|
|
373
|
-
var wa = {
|
|
374
|
-
"Font Awesome 5 Free": {
|
|
375
|
-
900: "fas",
|
|
376
|
-
400: "far"
|
|
377
|
-
},
|
|
378
|
-
"Font Awesome 5 Pro": {
|
|
379
|
-
900: "fas",
|
|
380
|
-
400: "far",
|
|
381
|
-
normal: "far",
|
|
382
|
-
300: "fal"
|
|
383
|
-
},
|
|
384
|
-
"Font Awesome 5 Brands": {
|
|
385
|
-
400: "fab",
|
|
386
|
-
normal: "fab"
|
|
387
|
-
},
|
|
388
|
-
"Font Awesome 5 Duotone": {
|
|
389
|
-
900: "fad"
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
|
|
394
|
-
const UNITS_IN_GRID = 16;
|
|
395
|
-
const DEFAULT_CSS_PREFIX = 'fa';
|
|
396
|
-
const DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';
|
|
397
|
-
const DATA_FA_I2SVG = 'data-fa-i2svg';
|
|
398
|
-
const DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';
|
|
399
|
-
const DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';
|
|
400
|
-
const DATA_PREFIX = 'data-prefix';
|
|
401
|
-
const DATA_ICON = 'data-icon';
|
|
402
|
-
const HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';
|
|
403
|
-
const MUTATION_APPROACH_ASYNC = 'async';
|
|
404
|
-
const TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];
|
|
405
|
-
const PRODUCTION = (() => {
|
|
406
|
-
try {
|
|
407
|
-
return process.env.NODE_ENV === 'production';
|
|
408
|
-
} catch (e$$1) {
|
|
409
|
-
return false;
|
|
410
|
-
}
|
|
411
|
-
})();
|
|
412
|
-
function familyProxy(obj) {
|
|
413
|
-
// Defaults to the classic family if family is not available
|
|
414
|
-
return new Proxy(obj, {
|
|
415
|
-
get(target, prop) {
|
|
416
|
-
return prop in target ? target[prop] : target[s];
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
const _PREFIX_TO_STYLE = _objectSpread2({}, S);
|
|
421
|
-
|
|
422
|
-
// We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any
|
|
423
|
-
// duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding
|
|
424
|
-
// {'fa-duotone': 'duotone'}
|
|
425
|
-
_PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
426
|
-
'fa-duotone': 'duotone'
|
|
427
|
-
}), S[s]), St['kit']), St['kit-duotone']);
|
|
428
|
-
const PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE);
|
|
429
|
-
const _STYLE_TO_PREFIX = _objectSpread2({}, xt);
|
|
430
|
-
|
|
431
|
-
// We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any
|
|
432
|
-
// duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'}
|
|
433
|
-
_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
434
|
-
duotone: 'fad'
|
|
435
|
-
}), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']);
|
|
436
|
-
const STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX);
|
|
437
|
-
const _PREFIX_TO_LONG_STYLE = _objectSpread2({}, ga);
|
|
438
|
-
_PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']);
|
|
439
|
-
const PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE);
|
|
440
|
-
const _LONG_STYLE_TO_PREFIX = _objectSpread2({}, ua);
|
|
441
|
-
_LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']);
|
|
442
|
-
familyProxy(_LONG_STYLE_TO_PREFIX);
|
|
443
|
-
const ICON_SELECTION_SYNTAX_PATTERN = p; // eslint-disable-line no-useless-escape
|
|
444
|
-
|
|
445
|
-
const LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
|
|
446
|
-
const FONT_FAMILY_PATTERN = g;
|
|
447
|
-
const _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G);
|
|
448
|
-
familyProxy(_FONT_WEIGHT_TO_PREFIX);
|
|
449
|
-
const ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];
|
|
450
|
-
const DUOTONE_CLASSES = A;
|
|
451
|
-
const RESERVED_CLASSES = [...At, ...ma];
|
|
452
|
-
|
|
453
|
-
const initial = WINDOW.FontAwesomeConfig || {};
|
|
454
|
-
function getAttrConfig(attr) {
|
|
455
|
-
var element = DOCUMENT.querySelector('script[' + attr + ']');
|
|
456
|
-
if (element) {
|
|
457
|
-
return element.getAttribute(attr);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
function coerce(val) {
|
|
461
|
-
// Getting an empty string will occur if the attribute is set on the HTML tag but without a value
|
|
462
|
-
// We'll assume that this is an indication that it should be toggled to true
|
|
463
|
-
if (val === '') return true;
|
|
464
|
-
if (val === 'false') return false;
|
|
465
|
-
if (val === 'true') return true;
|
|
466
|
-
return val;
|
|
467
|
-
}
|
|
468
|
-
if (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {
|
|
469
|
-
const attrs = [['data-family-prefix', 'familyPrefix'], ['data-css-prefix', 'cssPrefix'], ['data-family-default', 'familyDefault'], ['data-style-default', 'styleDefault'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];
|
|
470
|
-
attrs.forEach(_ref => {
|
|
471
|
-
let [attr, key] = _ref;
|
|
472
|
-
const val = coerce(getAttrConfig(attr));
|
|
473
|
-
if (val !== undefined && val !== null) {
|
|
474
|
-
initial[key] = val;
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
const _default = {
|
|
479
|
-
styleDefault: 'solid',
|
|
480
|
-
familyDefault: s,
|
|
481
|
-
cssPrefix: DEFAULT_CSS_PREFIX,
|
|
482
|
-
replacementClass: DEFAULT_REPLACEMENT_CLASS,
|
|
483
|
-
autoReplaceSvg: true,
|
|
484
|
-
autoAddCss: true,
|
|
485
|
-
autoA11y: true,
|
|
486
|
-
searchPseudoElements: false,
|
|
487
|
-
observeMutations: true,
|
|
488
|
-
mutateApproach: 'async',
|
|
489
|
-
keepOriginalSource: true,
|
|
490
|
-
measurePerformance: false,
|
|
491
|
-
showMissingIcons: true
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
// familyPrefix is deprecated but we must still support it if present
|
|
495
|
-
if (initial.familyPrefix) {
|
|
496
|
-
initial.cssPrefix = initial.familyPrefix;
|
|
497
|
-
}
|
|
498
|
-
const _config = _objectSpread2(_objectSpread2({}, _default), initial);
|
|
499
|
-
if (!_config.autoReplaceSvg) _config.observeMutations = false;
|
|
500
|
-
const config = {};
|
|
501
|
-
Object.keys(_default).forEach(key => {
|
|
502
|
-
Object.defineProperty(config, key, {
|
|
503
|
-
enumerable: true,
|
|
504
|
-
set: function (val) {
|
|
505
|
-
_config[key] = val;
|
|
506
|
-
_onChangeCb.forEach(cb => cb(config));
|
|
507
|
-
},
|
|
508
|
-
get: function () {
|
|
509
|
-
return _config[key];
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
});
|
|
513
|
-
|
|
514
|
-
// familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0
|
|
515
|
-
Object.defineProperty(config, 'familyPrefix', {
|
|
516
|
-
enumerable: true,
|
|
517
|
-
set: function (val) {
|
|
518
|
-
_config.cssPrefix = val;
|
|
519
|
-
_onChangeCb.forEach(cb => cb(config));
|
|
520
|
-
},
|
|
521
|
-
get: function () {
|
|
522
|
-
return _config.cssPrefix;
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
WINDOW.FontAwesomeConfig = config;
|
|
526
|
-
const _onChangeCb = [];
|
|
527
|
-
function onChange(cb) {
|
|
528
|
-
_onChangeCb.push(cb);
|
|
529
|
-
return () => {
|
|
530
|
-
_onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
const d$2 = UNITS_IN_GRID;
|
|
535
|
-
const meaninglessTransform = {
|
|
536
|
-
size: 16,
|
|
537
|
-
x: 0,
|
|
538
|
-
y: 0,
|
|
539
|
-
rotate: 0,
|
|
540
|
-
flipX: false,
|
|
541
|
-
flipY: false
|
|
542
|
-
};
|
|
543
|
-
function insertCss(css) {
|
|
544
|
-
if (!css || !IS_DOM) {
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
const style = DOCUMENT.createElement('style');
|
|
548
|
-
style.setAttribute('type', 'text/css');
|
|
549
|
-
style.innerHTML = css;
|
|
550
|
-
const headChildren = DOCUMENT.head.childNodes;
|
|
551
|
-
let beforeChild = null;
|
|
552
|
-
for (let i = headChildren.length - 1; i > -1; i--) {
|
|
553
|
-
const child = headChildren[i];
|
|
554
|
-
const tagName = (child.tagName || '').toUpperCase();
|
|
555
|
-
if (['STYLE', 'LINK'].indexOf(tagName) > -1) {
|
|
556
|
-
beforeChild = child;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
DOCUMENT.head.insertBefore(style, beforeChild);
|
|
560
|
-
return css;
|
|
561
|
-
}
|
|
562
|
-
const idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
563
|
-
function nextUniqueId() {
|
|
564
|
-
let size = 12;
|
|
565
|
-
let id = '';
|
|
566
|
-
while (size-- > 0) {
|
|
567
|
-
id += idPool[Math.random() * 62 | 0];
|
|
568
|
-
}
|
|
569
|
-
return id;
|
|
570
|
-
}
|
|
571
|
-
function toArray(obj) {
|
|
572
|
-
const array = [];
|
|
573
|
-
for (let i = (obj || []).length >>> 0; i--;) {
|
|
574
|
-
array[i] = obj[i];
|
|
575
|
-
}
|
|
576
|
-
return array;
|
|
577
|
-
}
|
|
578
|
-
function classArray(node) {
|
|
579
|
-
if (node.classList) {
|
|
580
|
-
return toArray(node.classList);
|
|
581
|
-
} else {
|
|
582
|
-
return (node.getAttribute('class') || '').split(' ').filter(i => i);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
function htmlEscape(str) {
|
|
586
|
-
return "".concat(str).replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>');
|
|
587
|
-
}
|
|
588
|
-
function joinAttributes(attributes) {
|
|
589
|
-
return Object.keys(attributes || {}).reduce((acc, attributeName) => {
|
|
590
|
-
return acc + "".concat(attributeName, "=\"").concat(htmlEscape(attributes[attributeName]), "\" ");
|
|
591
|
-
}, '').trim();
|
|
592
|
-
}
|
|
593
|
-
function joinStyles(styles) {
|
|
594
|
-
return Object.keys(styles || {}).reduce((acc, styleName) => {
|
|
595
|
-
return acc + "".concat(styleName, ": ").concat(styles[styleName].trim(), ";");
|
|
596
|
-
}, '');
|
|
597
|
-
}
|
|
598
|
-
function transformIsMeaningful(transform) {
|
|
599
|
-
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
|
|
600
|
-
}
|
|
601
|
-
function transformForSvg(_ref) {
|
|
602
|
-
let {
|
|
603
|
-
transform,
|
|
604
|
-
containerWidth,
|
|
605
|
-
iconWidth
|
|
606
|
-
} = _ref;
|
|
607
|
-
const outer = {
|
|
608
|
-
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
609
|
-
};
|
|
610
|
-
const innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
611
|
-
const innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
612
|
-
const innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
613
|
-
const inner = {
|
|
614
|
-
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
615
|
-
};
|
|
616
|
-
const path = {
|
|
617
|
-
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
618
|
-
};
|
|
619
|
-
return {
|
|
620
|
-
outer,
|
|
621
|
-
inner,
|
|
622
|
-
path
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
function transformForCss(_ref2) {
|
|
626
|
-
let {
|
|
627
|
-
transform,
|
|
628
|
-
width = UNITS_IN_GRID,
|
|
629
|
-
height = UNITS_IN_GRID,
|
|
630
|
-
startCentered = false
|
|
631
|
-
} = _ref2;
|
|
632
|
-
let val = '';
|
|
633
|
-
if (startCentered && IS_IE) {
|
|
634
|
-
val += "translate(".concat(transform.x / d$2 - width / 2, "em, ").concat(transform.y / d$2 - height / 2, "em) ");
|
|
635
|
-
} else if (startCentered) {
|
|
636
|
-
val += "translate(calc(-50% + ".concat(transform.x / d$2, "em), calc(-50% + ").concat(transform.y / d$2, "em)) ");
|
|
637
|
-
} else {
|
|
638
|
-
val += "translate(".concat(transform.x / d$2, "em, ").concat(transform.y / d$2, "em) ");
|
|
639
|
-
}
|
|
640
|
-
val += "scale(".concat(transform.size / d$2 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d$2 * (transform.flipY ? -1 : 1), ") ");
|
|
641
|
-
val += "rotate(".concat(transform.rotate, "deg) ");
|
|
642
|
-
return val;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
var baseStyles = ":root, :host {\n --fa-font-solid: normal 900 1em/1 \"Font Awesome 6 Free\";\n --fa-font-regular: normal 400 1em/1 \"Font Awesome 6 Free\";\n --fa-font-light: normal 300 1em/1 \"Font Awesome 6 Pro\";\n --fa-font-thin: normal 100 1em/1 \"Font Awesome 6 Pro\";\n --fa-font-duotone: normal 900 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-duotone-regular: normal 400 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-duotone-light: normal 300 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-duotone-thin: normal 100 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-brands: normal 400 1em/1 \"Font Awesome 6 Brands\";\n --fa-font-sharp-solid: normal 900 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-regular: normal 400 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-light: normal 300 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-thin: normal 100 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 \"Font Awesome 6 Sharp Duotone\";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 \"Font Awesome 6 Sharp Duotone\";\n --fa-font-sharp-duotone-light: normal 300 1em/1 \"Font Awesome 6 Sharp Duotone\";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 \"Font Awesome 6 Sharp Duotone\";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}";
|
|
646
|
-
|
|
647
|
-
function css() {
|
|
648
|
-
const dcp = DEFAULT_CSS_PREFIX;
|
|
649
|
-
const drc = DEFAULT_REPLACEMENT_CLASS;
|
|
650
|
-
const fp = config.cssPrefix;
|
|
651
|
-
const rc = config.replacementClass;
|
|
652
|
-
let s = baseStyles;
|
|
653
|
-
if (fp !== dcp || rc !== drc) {
|
|
654
|
-
const dPatt = new RegExp("\\.".concat(dcp, "\\-"), 'g');
|
|
655
|
-
const customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), 'g');
|
|
656
|
-
const rPatt = new RegExp("\\.".concat(drc), 'g');
|
|
657
|
-
s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
|
|
658
|
-
}
|
|
659
|
-
return s;
|
|
660
|
-
}
|
|
661
|
-
let _cssInserted = false;
|
|
662
|
-
function ensureCss() {
|
|
663
|
-
if (config.autoAddCss && !_cssInserted) {
|
|
664
|
-
insertCss(css());
|
|
665
|
-
_cssInserted = true;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
var InjectCSS = {
|
|
669
|
-
mixout() {
|
|
670
|
-
return {
|
|
671
|
-
dom: {
|
|
672
|
-
css,
|
|
673
|
-
insertCss: ensureCss
|
|
674
|
-
}
|
|
675
|
-
};
|
|
676
|
-
},
|
|
677
|
-
hooks() {
|
|
678
|
-
return {
|
|
679
|
-
beforeDOMElementCreation() {
|
|
680
|
-
ensureCss();
|
|
681
|
-
},
|
|
682
|
-
beforeI2svg() {
|
|
683
|
-
ensureCss();
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
|
|
689
|
-
const w = WINDOW || {};
|
|
690
|
-
if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
|
|
691
|
-
if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
|
|
692
|
-
if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
|
|
693
|
-
if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
|
|
694
|
-
var namespace = w[NAMESPACE_IDENTIFIER];
|
|
695
|
-
|
|
696
|
-
const functions = [];
|
|
697
|
-
const listener = function () {
|
|
698
|
-
DOCUMENT.removeEventListener('DOMContentLoaded', listener);
|
|
699
|
-
loaded = 1;
|
|
700
|
-
functions.map(fn => fn());
|
|
701
|
-
};
|
|
702
|
-
let loaded = false;
|
|
703
|
-
if (IS_DOM) {
|
|
704
|
-
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
|
|
705
|
-
if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);
|
|
706
|
-
}
|
|
707
|
-
function domready (fn) {
|
|
708
|
-
if (!IS_DOM) return;
|
|
709
|
-
loaded ? setTimeout(fn, 0) : functions.push(fn);
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
function toHtml(abstractNodes) {
|
|
713
|
-
const {
|
|
714
|
-
tag,
|
|
715
|
-
attributes = {},
|
|
716
|
-
children = []
|
|
717
|
-
} = abstractNodes;
|
|
718
|
-
if (typeof abstractNodes === 'string') {
|
|
719
|
-
return htmlEscape(abstractNodes);
|
|
720
|
-
} else {
|
|
721
|
-
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(''), "</").concat(tag, ">");
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
function iconFromMapping(mapping, prefix, iconName) {
|
|
726
|
-
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
727
|
-
return {
|
|
728
|
-
prefix,
|
|
729
|
-
iconName,
|
|
730
|
-
icon: mapping[prefix][iconName]
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
}
|
|
10
|
+
/**
|
|
11
|
+
* @license
|
|
12
|
+
* Copyright 2017 Google LLC
|
|
13
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
+
*/class e extends i{constructor(i){if(super(i),this.it=E,i.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===E||null==r)return this._t=void 0,this.it=r;if(r===T)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const o=e$1(e);
|
|
734
15
|
|
|
735
16
|
/**
|
|
736
|
-
*
|
|
17
|
+
* @tag plus-icon
|
|
18
|
+
* @since 0.0.0
|
|
19
|
+
* @status stable
|
|
737
20
|
*
|
|
738
|
-
*
|
|
21
|
+
* PlusIcon component provides a consistent way to render SVG icons across the system.
|
|
22
|
+
* Supports size variants, style variants (solid, regular, light), and CDN fallback.
|
|
739
23
|
*
|
|
740
|
-
* @
|
|
741
|
-
* @
|
|
742
|
-
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
|
|
743
|
-
* @param {Object} thisContext The context for the reducer.
|
|
744
|
-
* @return {mixed} The final result.
|
|
745
|
-
*/
|
|
746
|
-
var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
747
|
-
var keys = Object.keys(subject),
|
|
748
|
-
length = keys.length,
|
|
749
|
-
iterator = fn,
|
|
750
|
-
i,
|
|
751
|
-
key,
|
|
752
|
-
result;
|
|
753
|
-
if (initialValue === undefined) {
|
|
754
|
-
i = 1;
|
|
755
|
-
result = subject[keys[0]];
|
|
756
|
-
} else {
|
|
757
|
-
i = 0;
|
|
758
|
-
result = initialValue;
|
|
759
|
-
}
|
|
760
|
-
for (; i < length; i++) {
|
|
761
|
-
key = keys[i];
|
|
762
|
-
result = iterator(result, subject[key], key, subject);
|
|
763
|
-
}
|
|
764
|
-
return result;
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* ucs2decode() and codePointAt() are both works of Mathias Bynens and licensed under MIT
|
|
24
|
+
* @csspart base - The component's base wrapper
|
|
25
|
+
* @csspart icon - The SVG icon element
|
|
769
26
|
*
|
|
770
|
-
*
|
|
771
|
-
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
|
|
783
|
-
*
|
|
784
|
-
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
788
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
789
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
* @cssproperty --icon-size - Custom icon size (overrides size variants)
|
|
28
|
+
* @cssproperty --icon-color - Custom icon color (overrides currentColor)
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```html
|
|
32
|
+
* <!-- Default solid icon -->
|
|
33
|
+
* <plus-icon icon-name="star"></plus-icon>
|
|
34
|
+
*
|
|
35
|
+
* <!-- Different style -->
|
|
36
|
+
* <plus-icon icon-name="heart" style="regular"></plus-icon>
|
|
37
|
+
*
|
|
38
|
+
* <!-- With size -->
|
|
39
|
+
* <plus-icon icon-name="user" size="lg"></plus-icon>
|
|
40
|
+
*
|
|
41
|
+
* <!-- Custom size -->
|
|
42
|
+
* <plus-icon icon-name="home" style="--icon-size: 32px;"></plus-icon>
|
|
43
|
+
* ```
|
|
790
44
|
*/
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
}
|
|
842
|
-
function defineIcons(prefix, icons) {
|
|
843
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
844
|
-
const {
|
|
845
|
-
skipHooks = false
|
|
846
|
-
} = params;
|
|
847
|
-
const normalized = normalizeIcons(icons);
|
|
848
|
-
if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {
|
|
849
|
-
namespace.hooks.addPack(prefix, normalizeIcons(icons));
|
|
850
|
-
} else {
|
|
851
|
-
namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
/**
|
|
855
|
-
* Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
|
|
856
|
-
* of new styles we needed to differentiate between them. Prefix `fa` is now an alias
|
|
857
|
-
* for `fas` so we'll ease the upgrade process for our users by automatically defining
|
|
858
|
-
* this as well.
|
|
859
|
-
*/
|
|
860
|
-
if (prefix === 'fas') {
|
|
861
|
-
defineIcons('fa', icons);
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
const {
|
|
866
|
-
styles,
|
|
867
|
-
shims
|
|
868
|
-
} = namespace;
|
|
869
|
-
const FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE);
|
|
870
|
-
const PREFIXES_FOR_FAMILY = FAMILY_NAMES.reduce((acc, familyId) => {
|
|
871
|
-
acc[familyId] = Object.keys(PREFIX_TO_LONG_STYLE[familyId]);
|
|
872
|
-
return acc;
|
|
873
|
-
}, {});
|
|
874
|
-
let _defaultUsablePrefix = null;
|
|
875
|
-
let _byUnicode = {};
|
|
876
|
-
let _byLigature = {};
|
|
877
|
-
let _byOldName = {};
|
|
878
|
-
let _byOldUnicode = {};
|
|
879
|
-
let _byAlias = {};
|
|
880
|
-
function isReserved(name) {
|
|
881
|
-
return ~RESERVED_CLASSES.indexOf(name);
|
|
882
|
-
}
|
|
883
|
-
function getIconName(cssPrefix, cls) {
|
|
884
|
-
const parts = cls.split('-');
|
|
885
|
-
const prefix = parts[0];
|
|
886
|
-
const iconName = parts.slice(1).join('-');
|
|
887
|
-
if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) {
|
|
888
|
-
return iconName;
|
|
889
|
-
} else {
|
|
890
|
-
return null;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
const build = () => {
|
|
894
|
-
const lookup = reducer => {
|
|
895
|
-
return reduce(styles, (o$$1, style, prefix) => {
|
|
896
|
-
o$$1[prefix] = reduce(style, reducer, {});
|
|
897
|
-
return o$$1;
|
|
898
|
-
}, {});
|
|
899
|
-
};
|
|
900
|
-
_byUnicode = lookup((acc, icon, iconName) => {
|
|
901
|
-
if (icon[3]) {
|
|
902
|
-
acc[icon[3]] = iconName;
|
|
903
|
-
}
|
|
904
|
-
if (icon[2]) {
|
|
905
|
-
const aliases = icon[2].filter(a$$1 => {
|
|
906
|
-
return typeof a$$1 === 'number';
|
|
907
|
-
});
|
|
908
|
-
aliases.forEach(alias => {
|
|
909
|
-
acc[alias.toString(16)] = iconName;
|
|
910
|
-
});
|
|
911
|
-
}
|
|
912
|
-
return acc;
|
|
913
|
-
});
|
|
914
|
-
_byLigature = lookup((acc, icon, iconName) => {
|
|
915
|
-
acc[iconName] = iconName;
|
|
916
|
-
if (icon[2]) {
|
|
917
|
-
const aliases = icon[2].filter(a$$1 => {
|
|
918
|
-
return typeof a$$1 === 'string';
|
|
919
|
-
});
|
|
920
|
-
aliases.forEach(alias => {
|
|
921
|
-
acc[alias] = iconName;
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
return acc;
|
|
925
|
-
});
|
|
926
|
-
_byAlias = lookup((acc, icon, iconName) => {
|
|
927
|
-
const aliases = icon[2];
|
|
928
|
-
acc[iconName] = iconName;
|
|
929
|
-
aliases.forEach(alias => {
|
|
930
|
-
acc[alias] = iconName;
|
|
931
|
-
});
|
|
932
|
-
return acc;
|
|
933
|
-
});
|
|
934
|
-
|
|
935
|
-
// If we have a Kit, we can't determine if regular is available since we
|
|
936
|
-
// could be auto-fetching it. We'll have to assume that it is available.
|
|
937
|
-
const hasRegular = 'far' in styles || config.autoFetchSvg;
|
|
938
|
-
const shimLookups = reduce(shims, (acc, shim) => {
|
|
939
|
-
const maybeNameMaybeUnicode = shim[0];
|
|
940
|
-
let prefix = shim[1];
|
|
941
|
-
const iconName = shim[2];
|
|
942
|
-
if (prefix === 'far' && !hasRegular) {
|
|
943
|
-
prefix = 'fas';
|
|
944
|
-
}
|
|
945
|
-
if (typeof maybeNameMaybeUnicode === 'string') {
|
|
946
|
-
acc.names[maybeNameMaybeUnicode] = {
|
|
947
|
-
prefix,
|
|
948
|
-
iconName
|
|
949
|
-
};
|
|
950
|
-
}
|
|
951
|
-
if (typeof maybeNameMaybeUnicode === 'number') {
|
|
952
|
-
acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
|
|
953
|
-
prefix,
|
|
954
|
-
iconName
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
return acc;
|
|
958
|
-
}, {
|
|
959
|
-
names: {},
|
|
960
|
-
unicodes: {}
|
|
961
|
-
});
|
|
962
|
-
_byOldName = shimLookups.names;
|
|
963
|
-
_byOldUnicode = shimLookups.unicodes;
|
|
964
|
-
_defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {
|
|
965
|
-
family: config.familyDefault
|
|
966
|
-
});
|
|
967
|
-
};
|
|
968
|
-
onChange(c$$1 => {
|
|
969
|
-
_defaultUsablePrefix = getCanonicalPrefix(c$$1.styleDefault, {
|
|
970
|
-
family: config.familyDefault
|
|
971
|
-
});
|
|
972
|
-
});
|
|
973
|
-
build();
|
|
974
|
-
function byUnicode(prefix, unicode) {
|
|
975
|
-
return (_byUnicode[prefix] || {})[unicode];
|
|
976
|
-
}
|
|
977
|
-
function byLigature(prefix, ligature) {
|
|
978
|
-
return (_byLigature[prefix] || {})[ligature];
|
|
979
|
-
}
|
|
980
|
-
function byAlias(prefix, alias) {
|
|
981
|
-
return (_byAlias[prefix] || {})[alias];
|
|
982
|
-
}
|
|
983
|
-
function byOldName(name) {
|
|
984
|
-
return _byOldName[name] || {
|
|
985
|
-
prefix: null,
|
|
986
|
-
iconName: null
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
function byOldUnicode(unicode) {
|
|
990
|
-
const oldUnicode = _byOldUnicode[unicode];
|
|
991
|
-
const newUnicode = byUnicode('fas', unicode);
|
|
992
|
-
return oldUnicode || (newUnicode ? {
|
|
993
|
-
prefix: 'fas',
|
|
994
|
-
iconName: newUnicode
|
|
995
|
-
} : null) || {
|
|
996
|
-
prefix: null,
|
|
997
|
-
iconName: null
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
function getDefaultUsablePrefix() {
|
|
1001
|
-
return _defaultUsablePrefix;
|
|
1002
|
-
}
|
|
1003
|
-
const emptyCanonicalIcon = () => {
|
|
1004
|
-
return {
|
|
1005
|
-
prefix: null,
|
|
1006
|
-
iconName: null,
|
|
1007
|
-
rest: []
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
|
-
function getFamilyId(values) {
|
|
1011
|
-
let family = s;
|
|
1012
|
-
const famProps = FAMILY_NAMES.reduce((acc, familyId) => {
|
|
1013
|
-
acc[familyId] = "".concat(config.cssPrefix, "-").concat(familyId);
|
|
1014
|
-
return acc;
|
|
1015
|
-
}, {});
|
|
1016
|
-
L.forEach(familyId => {
|
|
1017
|
-
if (values.includes(famProps[familyId]) || values.some(v$$1 => PREFIXES_FOR_FAMILY[familyId].includes(v$$1))) {
|
|
1018
|
-
family = familyId;
|
|
1019
|
-
}
|
|
1020
|
-
});
|
|
1021
|
-
return family;
|
|
1022
|
-
}
|
|
1023
|
-
function getCanonicalPrefix(styleOrPrefix) {
|
|
1024
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1025
|
-
const {
|
|
1026
|
-
family = s
|
|
1027
|
-
} = params;
|
|
1028
|
-
const style = PREFIX_TO_STYLE[family][styleOrPrefix];
|
|
1029
|
-
|
|
1030
|
-
// handles the exception of passing in only a family of 'duotone' with no style
|
|
1031
|
-
if (family === t && !styleOrPrefix) {
|
|
1032
|
-
return 'fad';
|
|
1033
|
-
}
|
|
1034
|
-
const prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];
|
|
1035
|
-
const defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
|
|
1036
|
-
const result = prefix || defined || null;
|
|
1037
|
-
return result;
|
|
1038
|
-
}
|
|
1039
|
-
function moveNonFaClassesToRest(classNames) {
|
|
1040
|
-
let rest = [];
|
|
1041
|
-
let iconName = null;
|
|
1042
|
-
classNames.forEach(cls => {
|
|
1043
|
-
const result = getIconName(config.cssPrefix, cls);
|
|
1044
|
-
if (result) {
|
|
1045
|
-
iconName = result;
|
|
1046
|
-
} else if (cls) {
|
|
1047
|
-
rest.push(cls);
|
|
1048
|
-
}
|
|
1049
|
-
});
|
|
1050
|
-
return {
|
|
1051
|
-
iconName,
|
|
1052
|
-
rest
|
|
1053
|
-
};
|
|
1054
|
-
}
|
|
1055
|
-
function sortedUniqueValues(arr) {
|
|
1056
|
-
return arr.sort().filter((value, index, arr) => {
|
|
1057
|
-
return arr.indexOf(value) === index;
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
function getCanonicalIcon(values) {
|
|
1061
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1062
|
-
const {
|
|
1063
|
-
skipLookups = false
|
|
1064
|
-
} = params;
|
|
1065
|
-
let givenPrefix = null;
|
|
1066
|
-
const faCombinedClasses = Ia.concat(bt$1);
|
|
1067
|
-
const faStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => faCombinedClasses.includes(cls)));
|
|
1068
|
-
const nonStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => !Ia.includes(cls)));
|
|
1069
|
-
const faStyles = faStyleOrFamilyClasses.filter(cls => {
|
|
1070
|
-
givenPrefix = cls;
|
|
1071
|
-
return !P.includes(cls);
|
|
1072
|
-
});
|
|
1073
|
-
const [styleFromValues = null] = faStyles;
|
|
1074
|
-
const family = getFamilyId(faStyleOrFamilyClasses);
|
|
1075
|
-
const canonical = _objectSpread2(_objectSpread2({}, moveNonFaClassesToRest(nonStyleOrFamilyClasses)), {}, {
|
|
1076
|
-
prefix: getCanonicalPrefix(styleFromValues, {
|
|
1077
|
-
family
|
|
1078
|
-
})
|
|
1079
|
-
});
|
|
1080
|
-
return _objectSpread2(_objectSpread2(_objectSpread2({}, canonical), getDefaultCanonicalPrefix({
|
|
1081
|
-
values,
|
|
1082
|
-
family,
|
|
1083
|
-
styles,
|
|
1084
|
-
config,
|
|
1085
|
-
canonical,
|
|
1086
|
-
givenPrefix
|
|
1087
|
-
})), applyShimAndAlias(skipLookups, givenPrefix, canonical));
|
|
1088
|
-
}
|
|
1089
|
-
function applyShimAndAlias(skipLookups, givenPrefix, canonical) {
|
|
1090
|
-
let {
|
|
1091
|
-
prefix,
|
|
1092
|
-
iconName
|
|
1093
|
-
} = canonical;
|
|
1094
|
-
if (skipLookups || !prefix || !iconName) {
|
|
1095
|
-
return {
|
|
1096
|
-
prefix,
|
|
1097
|
-
iconName
|
|
1098
|
-
};
|
|
1099
|
-
}
|
|
1100
|
-
const shim = givenPrefix === 'fa' ? byOldName(iconName) : {};
|
|
1101
|
-
const aliasIconName = byAlias(prefix, iconName);
|
|
1102
|
-
iconName = shim.iconName || aliasIconName || iconName;
|
|
1103
|
-
prefix = shim.prefix || prefix;
|
|
1104
|
-
if (prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {
|
|
1105
|
-
// Allow a fallback from the regular style to solid if regular is not available
|
|
1106
|
-
// but only if we aren't auto-fetching SVGs
|
|
1107
|
-
prefix = 'fas';
|
|
1108
|
-
}
|
|
1109
|
-
return {
|
|
1110
|
-
prefix,
|
|
1111
|
-
iconName
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
const newCanonicalFamilies = L.filter(familyId => {
|
|
1115
|
-
return familyId !== s || familyId !== t;
|
|
1116
|
-
});
|
|
1117
|
-
const newCanonicalStyles = Object.keys(ga).filter(key => key !== s).map(key => Object.keys(ga[key])).flat();
|
|
1118
|
-
function getDefaultCanonicalPrefix(prefixOptions) {
|
|
1119
|
-
const {
|
|
1120
|
-
values,
|
|
1121
|
-
family,
|
|
1122
|
-
canonical,
|
|
1123
|
-
givenPrefix = '',
|
|
1124
|
-
styles = {},
|
|
1125
|
-
config: config$$1 = {}
|
|
1126
|
-
} = prefixOptions;
|
|
1127
|
-
const isDuotoneFamily = family === t;
|
|
1128
|
-
const valuesHasDuotone = values.includes('fa-duotone') || values.includes('fad');
|
|
1129
|
-
const defaultFamilyIsDuotone = config$$1.familyDefault === 'duotone';
|
|
1130
|
-
const canonicalPrefixIsDuotone = canonical.prefix === 'fad' || canonical.prefix === 'fa-duotone';
|
|
1131
|
-
if (!isDuotoneFamily && (valuesHasDuotone || defaultFamilyIsDuotone || canonicalPrefixIsDuotone)) {
|
|
1132
|
-
canonical.prefix = 'fad';
|
|
1133
|
-
}
|
|
1134
|
-
if (values.includes('fa-brands') || values.includes('fab')) {
|
|
1135
|
-
canonical.prefix = 'fab';
|
|
1136
|
-
}
|
|
1137
|
-
if (!canonical.prefix && newCanonicalFamilies.includes(family)) {
|
|
1138
|
-
const validPrefix = Object.keys(styles).find(key => newCanonicalStyles.includes(key));
|
|
1139
|
-
if (validPrefix || config$$1.autoFetchSvg) {
|
|
1140
|
-
const defaultPrefix = pt.get(family).defaultShortPrefixId;
|
|
1141
|
-
canonical.prefix = defaultPrefix;
|
|
1142
|
-
canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
if (canonical.prefix === 'fa' || givenPrefix === 'fa') {
|
|
1146
|
-
// The fa prefix is not canonical. So if it has made it through until this point
|
|
1147
|
-
// we will shift it to the correct prefix.
|
|
1148
|
-
canonical.prefix = getDefaultUsablePrefix() || 'fas';
|
|
1149
|
-
}
|
|
1150
|
-
return canonical;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
class Library {
|
|
1154
|
-
constructor() {
|
|
1155
|
-
this.definitions = {};
|
|
1156
|
-
}
|
|
1157
|
-
add() {
|
|
1158
|
-
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1159
|
-
definitions[_key] = arguments[_key];
|
|
1160
|
-
}
|
|
1161
|
-
const additions = definitions.reduce(this._pullDefinitions, {});
|
|
1162
|
-
Object.keys(additions).forEach(key => {
|
|
1163
|
-
this.definitions[key] = _objectSpread2(_objectSpread2({}, this.definitions[key] || {}), additions[key]);
|
|
1164
|
-
defineIcons(key, additions[key]);
|
|
1165
|
-
|
|
1166
|
-
// TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change
|
|
1167
|
-
const longPrefix = PREFIX_TO_LONG_STYLE[s][key];
|
|
1168
|
-
if (longPrefix) defineIcons(longPrefix, additions[key]);
|
|
1169
|
-
build();
|
|
1170
|
-
});
|
|
1171
|
-
}
|
|
1172
|
-
reset() {
|
|
1173
|
-
this.definitions = {};
|
|
1174
|
-
}
|
|
1175
|
-
_pullDefinitions(additions, definition) {
|
|
1176
|
-
const normalized = definition.prefix && definition.iconName && definition.icon ? {
|
|
1177
|
-
0: definition
|
|
1178
|
-
} : definition;
|
|
1179
|
-
Object.keys(normalized).map(key => {
|
|
1180
|
-
const {
|
|
1181
|
-
prefix,
|
|
1182
|
-
iconName,
|
|
1183
|
-
icon
|
|
1184
|
-
} = normalized[key];
|
|
1185
|
-
const aliases = icon[2];
|
|
1186
|
-
if (!additions[prefix]) additions[prefix] = {};
|
|
1187
|
-
if (aliases.length > 0) {
|
|
1188
|
-
aliases.forEach(alias => {
|
|
1189
|
-
if (typeof alias === 'string') {
|
|
1190
|
-
additions[prefix][alias] = icon;
|
|
1191
|
-
}
|
|
1192
|
-
});
|
|
1193
|
-
}
|
|
1194
|
-
additions[prefix][iconName] = icon;
|
|
1195
|
-
});
|
|
1196
|
-
return additions;
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
let _plugins = [];
|
|
1201
|
-
let _hooks = {};
|
|
1202
|
-
const providers = {};
|
|
1203
|
-
const defaultProviderKeys = Object.keys(providers);
|
|
1204
|
-
function registerPlugins(nextPlugins, _ref) {
|
|
1205
|
-
let {
|
|
1206
|
-
mixoutsTo: obj
|
|
1207
|
-
} = _ref;
|
|
1208
|
-
_plugins = nextPlugins;
|
|
1209
|
-
_hooks = {};
|
|
1210
|
-
Object.keys(providers).forEach(k => {
|
|
1211
|
-
if (defaultProviderKeys.indexOf(k) === -1) {
|
|
1212
|
-
delete providers[k];
|
|
1213
|
-
}
|
|
1214
|
-
});
|
|
1215
|
-
_plugins.forEach(plugin => {
|
|
1216
|
-
const mixout = plugin.mixout ? plugin.mixout() : {};
|
|
1217
|
-
Object.keys(mixout).forEach(tk => {
|
|
1218
|
-
if (typeof mixout[tk] === 'function') {
|
|
1219
|
-
obj[tk] = mixout[tk];
|
|
1220
|
-
}
|
|
1221
|
-
if (typeof mixout[tk] === 'object') {
|
|
1222
|
-
Object.keys(mixout[tk]).forEach(sk => {
|
|
1223
|
-
if (!obj[tk]) {
|
|
1224
|
-
obj[tk] = {};
|
|
1225
|
-
}
|
|
1226
|
-
obj[tk][sk] = mixout[tk][sk];
|
|
1227
|
-
});
|
|
1228
|
-
}
|
|
1229
|
-
});
|
|
1230
|
-
if (plugin.hooks) {
|
|
1231
|
-
const hooks = plugin.hooks();
|
|
1232
|
-
Object.keys(hooks).forEach(hook => {
|
|
1233
|
-
if (!_hooks[hook]) {
|
|
1234
|
-
_hooks[hook] = [];
|
|
45
|
+
class PlusIcon extends r$1 {
|
|
46
|
+
constructor() {
|
|
47
|
+
super(...arguments);
|
|
48
|
+
/**
|
|
49
|
+
* Name of the icon to display
|
|
50
|
+
*/
|
|
51
|
+
this.iconName = '';
|
|
52
|
+
/**
|
|
53
|
+
* Style variant of the icon: solid, regular, or light
|
|
54
|
+
* @default 'solid'
|
|
55
|
+
*/
|
|
56
|
+
this.iconStyle = 'solid';
|
|
57
|
+
/**
|
|
58
|
+
* Size variant for the icon
|
|
59
|
+
* @default 'md'
|
|
60
|
+
*/
|
|
61
|
+
this.size = 'md';
|
|
62
|
+
this.svgContent = '';
|
|
63
|
+
this.isLoading = false;
|
|
64
|
+
this.hasError = false;
|
|
65
|
+
}
|
|
66
|
+
updated(changedProperties) {
|
|
67
|
+
if (changedProperties.has('iconName') ||
|
|
68
|
+
changedProperties.has('iconStyle')) {
|
|
69
|
+
this.loadIcon();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async loadIcon() {
|
|
73
|
+
if (!this.iconName) {
|
|
74
|
+
this.svgContent = '';
|
|
75
|
+
this.hasError = false;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.isLoading = true;
|
|
79
|
+
this.hasError = false;
|
|
80
|
+
const { iconName, iconStyle } = this;
|
|
81
|
+
try {
|
|
82
|
+
const iconSvg = await getIcon(iconName, iconStyle);
|
|
83
|
+
if (iconName === this.iconName && iconStyle === this.iconStyle) {
|
|
84
|
+
this.svgContent = iconSvg || '';
|
|
85
|
+
this.hasError = !iconSvg;
|
|
86
|
+
this.isLoading = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (iconName === this.iconName && iconStyle === this.iconStyle) {
|
|
91
|
+
console.warn(`Failed to load icon: ${iconName} (${iconStyle})`, error);
|
|
92
|
+
this.hasError = true;
|
|
93
|
+
this.isLoading = false;
|
|
94
|
+
}
|
|
1235
95
|
}
|
|
1236
|
-
_hooks[hook].push(hooks[hook]);
|
|
1237
|
-
});
|
|
1238
96
|
}
|
|
1239
|
-
|
|
1240
|
-
|
|
97
|
+
render() {
|
|
98
|
+
if (!this.iconName) {
|
|
99
|
+
return E;
|
|
100
|
+
}
|
|
101
|
+
if (this.hasError) {
|
|
102
|
+
return x `
|
|
103
|
+
<div
|
|
104
|
+
part="base error"
|
|
105
|
+
class="base error"
|
|
106
|
+
role="img"
|
|
107
|
+
aria-label=${this.label || `Icon ${this.iconName} not found`}
|
|
108
|
+
></div>
|
|
109
|
+
`;
|
|
110
|
+
}
|
|
111
|
+
if (this.isLoading) {
|
|
112
|
+
return x `
|
|
113
|
+
<div
|
|
114
|
+
part="base loading"
|
|
115
|
+
class="base loading"
|
|
116
|
+
role="img"
|
|
117
|
+
aria-label=${this.label || `Loading ${this.iconName} icon`}
|
|
118
|
+
>
|
|
119
|
+
<div class="icon"></div>
|
|
120
|
+
</div>
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
return x `
|
|
124
|
+
<div
|
|
125
|
+
part="base"
|
|
126
|
+
class="base"
|
|
127
|
+
role="img"
|
|
128
|
+
aria-label=${this.label || `${this.iconName} icon`}
|
|
129
|
+
>
|
|
130
|
+
<div part="icon" class="icon">
|
|
131
|
+
${this.svgContent ? o(this.svgContent) : E}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
PlusIcon.styles = i$1 `
|
|
138
|
+
:host {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
vertical-align: middle;
|
|
143
|
+
color: currentColor;
|
|
144
|
+
width: var(--icon-size, 1em);
|
|
145
|
+
height: var(--icon-size, 1em);
|
|
1241
146
|
}
|
|
1242
|
-
});
|
|
1243
|
-
return obj;
|
|
1244
|
-
}
|
|
1245
|
-
function chainHooks(hook, accumulator) {
|
|
1246
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1247
|
-
args[_key - 2] = arguments[_key];
|
|
1248
|
-
}
|
|
1249
|
-
const hookFns = _hooks[hook] || [];
|
|
1250
|
-
hookFns.forEach(hookFn => {
|
|
1251
|
-
accumulator = hookFn.apply(null, [accumulator, ...args]); // eslint-disable-line no-useless-call
|
|
1252
|
-
});
|
|
1253
|
-
return accumulator;
|
|
1254
|
-
}
|
|
1255
|
-
function callHooks(hook) {
|
|
1256
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1257
|
-
args[_key2 - 1] = arguments[_key2];
|
|
1258
|
-
}
|
|
1259
|
-
const hookFns = _hooks[hook] || [];
|
|
1260
|
-
hookFns.forEach(hookFn => {
|
|
1261
|
-
hookFn.apply(null, args);
|
|
1262
|
-
});
|
|
1263
|
-
return undefined;
|
|
1264
|
-
}
|
|
1265
|
-
function callProvided() {
|
|
1266
|
-
const hook = arguments[0];
|
|
1267
|
-
const args = Array.prototype.slice.call(arguments, 1);
|
|
1268
|
-
return providers[hook] ? providers[hook].apply(null, args) : undefined;
|
|
1269
|
-
}
|
|
1270
147
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
iconLookup.prefix = 'fas';
|
|
1274
|
-
}
|
|
1275
|
-
let {
|
|
1276
|
-
iconName
|
|
1277
|
-
} = iconLookup;
|
|
1278
|
-
const prefix = iconLookup.prefix || getDefaultUsablePrefix();
|
|
1279
|
-
if (!iconName) return;
|
|
1280
|
-
iconName = byAlias(prefix, iconName) || iconName;
|
|
1281
|
-
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
1282
|
-
}
|
|
1283
|
-
const library = new Library();
|
|
1284
|
-
const noAuto = () => {
|
|
1285
|
-
config.autoReplaceSvg = false;
|
|
1286
|
-
config.observeMutations = false;
|
|
1287
|
-
callHooks('noAuto');
|
|
1288
|
-
};
|
|
1289
|
-
const dom = {
|
|
1290
|
-
i2svg: function () {
|
|
1291
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1292
|
-
if (IS_DOM) {
|
|
1293
|
-
callHooks('beforeI2svg', params);
|
|
1294
|
-
callProvided('pseudoElements2svg', params);
|
|
1295
|
-
return callProvided('i2svg', params);
|
|
1296
|
-
} else {
|
|
1297
|
-
return Promise.reject(new Error('Operation requires a DOM of some kind.'));
|
|
148
|
+
:host([size='xs']) {
|
|
149
|
+
--icon-size: 0.75rem; /* 12px */
|
|
1298
150
|
}
|
|
1299
|
-
},
|
|
1300
|
-
watch: function () {
|
|
1301
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1302
|
-
const {
|
|
1303
|
-
autoReplaceSvgRoot
|
|
1304
|
-
} = params;
|
|
1305
|
-
if (config.autoReplaceSvg === false) {
|
|
1306
|
-
config.autoReplaceSvg = true;
|
|
1307
|
-
}
|
|
1308
|
-
config.observeMutations = true;
|
|
1309
|
-
domready(() => {
|
|
1310
|
-
autoReplace({
|
|
1311
|
-
autoReplaceSvgRoot
|
|
1312
|
-
});
|
|
1313
|
-
callHooks('watch', params);
|
|
1314
|
-
});
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
const parse = {
|
|
1318
|
-
icon: icon => {
|
|
1319
|
-
if (icon === null) {
|
|
1320
|
-
return null;
|
|
1321
|
-
}
|
|
1322
|
-
if (typeof icon === 'object' && icon.prefix && icon.iconName) {
|
|
1323
|
-
return {
|
|
1324
|
-
prefix: icon.prefix,
|
|
1325
|
-
iconName: byAlias(icon.prefix, icon.iconName) || icon.iconName
|
|
1326
|
-
};
|
|
1327
|
-
}
|
|
1328
|
-
if (Array.isArray(icon) && icon.length === 2) {
|
|
1329
|
-
const iconName = icon[1].indexOf('fa-') === 0 ? icon[1].slice(3) : icon[1];
|
|
1330
|
-
const prefix = getCanonicalPrefix(icon[0]);
|
|
1331
|
-
return {
|
|
1332
|
-
prefix,
|
|
1333
|
-
iconName: byAlias(prefix, iconName) || iconName
|
|
1334
|
-
};
|
|
1335
|
-
}
|
|
1336
|
-
if (typeof icon === 'string' && (icon.indexOf("".concat(config.cssPrefix, "-")) > -1 || icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
|
|
1337
|
-
const canonicalIcon = getCanonicalIcon(icon.split(' '), {
|
|
1338
|
-
skipLookups: true
|
|
1339
|
-
});
|
|
1340
|
-
return {
|
|
1341
|
-
prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
|
|
1342
|
-
iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
|
|
1343
|
-
};
|
|
1344
|
-
}
|
|
1345
|
-
if (typeof icon === 'string') {
|
|
1346
|
-
const prefix = getDefaultUsablePrefix();
|
|
1347
|
-
return {
|
|
1348
|
-
prefix,
|
|
1349
|
-
iconName: byAlias(prefix, icon) || icon
|
|
1350
|
-
};
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
};
|
|
1354
|
-
const api = {
|
|
1355
|
-
noAuto,
|
|
1356
|
-
config,
|
|
1357
|
-
dom,
|
|
1358
|
-
parse,
|
|
1359
|
-
library,
|
|
1360
|
-
findIconDefinition,
|
|
1361
|
-
toHtml
|
|
1362
|
-
};
|
|
1363
|
-
const autoReplace = function () {
|
|
1364
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1365
|
-
const {
|
|
1366
|
-
autoReplaceSvgRoot = DOCUMENT
|
|
1367
|
-
} = params;
|
|
1368
|
-
if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({
|
|
1369
|
-
node: autoReplaceSvgRoot
|
|
1370
|
-
});
|
|
1371
|
-
};
|
|
1372
151
|
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
get: abstractCreator
|
|
1376
|
-
});
|
|
1377
|
-
Object.defineProperty(val, 'html', {
|
|
1378
|
-
get: function () {
|
|
1379
|
-
return val.abstract.map(a => toHtml(a));
|
|
1380
|
-
}
|
|
1381
|
-
});
|
|
1382
|
-
Object.defineProperty(val, 'node', {
|
|
1383
|
-
get: function () {
|
|
1384
|
-
if (!IS_DOM) return;
|
|
1385
|
-
const container = DOCUMENT.createElement('div');
|
|
1386
|
-
container.innerHTML = val.html;
|
|
1387
|
-
return container.children;
|
|
152
|
+
:host([size='sm']) {
|
|
153
|
+
--icon-size: 0.875rem; /* 14px */
|
|
1388
154
|
}
|
|
1389
|
-
});
|
|
1390
|
-
return val;
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
function asIcon (_ref) {
|
|
1394
|
-
let {
|
|
1395
|
-
children,
|
|
1396
|
-
main,
|
|
1397
|
-
mask,
|
|
1398
|
-
attributes,
|
|
1399
|
-
styles,
|
|
1400
|
-
transform
|
|
1401
|
-
} = _ref;
|
|
1402
|
-
if (transformIsMeaningful(transform) && main.found && !mask.found) {
|
|
1403
|
-
const {
|
|
1404
|
-
width,
|
|
1405
|
-
height
|
|
1406
|
-
} = main;
|
|
1407
|
-
const offset = {
|
|
1408
|
-
x: width / height / 2,
|
|
1409
|
-
y: 0.5
|
|
1410
|
-
};
|
|
1411
|
-
attributes['style'] = joinStyles(_objectSpread2(_objectSpread2({}, styles), {}, {
|
|
1412
|
-
'transform-origin': "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
|
|
1413
|
-
}));
|
|
1414
|
-
}
|
|
1415
|
-
return [{
|
|
1416
|
-
tag: 'svg',
|
|
1417
|
-
attributes,
|
|
1418
|
-
children
|
|
1419
|
-
}];
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
function asSymbol (_ref) {
|
|
1423
|
-
let {
|
|
1424
|
-
prefix,
|
|
1425
|
-
iconName,
|
|
1426
|
-
children,
|
|
1427
|
-
attributes,
|
|
1428
|
-
symbol
|
|
1429
|
-
} = _ref;
|
|
1430
|
-
const id = symbol === true ? "".concat(prefix, "-").concat(config.cssPrefix, "-").concat(iconName) : symbol;
|
|
1431
|
-
return [{
|
|
1432
|
-
tag: 'svg',
|
|
1433
|
-
attributes: {
|
|
1434
|
-
style: 'display: none;'
|
|
1435
|
-
},
|
|
1436
|
-
children: [{
|
|
1437
|
-
tag: 'symbol',
|
|
1438
|
-
attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {
|
|
1439
|
-
id
|
|
1440
|
-
}),
|
|
1441
|
-
children
|
|
1442
|
-
}]
|
|
1443
|
-
}];
|
|
1444
|
-
}
|
|
1445
155
|
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
icons: {
|
|
1449
|
-
main,
|
|
1450
|
-
mask
|
|
1451
|
-
},
|
|
1452
|
-
prefix,
|
|
1453
|
-
iconName,
|
|
1454
|
-
transform,
|
|
1455
|
-
symbol,
|
|
1456
|
-
title,
|
|
1457
|
-
maskId,
|
|
1458
|
-
titleId,
|
|
1459
|
-
extra,
|
|
1460
|
-
watchable = false
|
|
1461
|
-
} = params;
|
|
1462
|
-
const {
|
|
1463
|
-
width,
|
|
1464
|
-
height
|
|
1465
|
-
} = mask.found ? mask : main;
|
|
1466
|
-
const isUploadedIcon = Lt.includes(prefix);
|
|
1467
|
-
const attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ''].filter(c$$1 => extra.classes.indexOf(c$$1) === -1).filter(c$$1 => c$$1 !== '' || !!c$$1).concat(extra.classes).join(' ');
|
|
1468
|
-
let content = {
|
|
1469
|
-
children: [],
|
|
1470
|
-
attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
|
|
1471
|
-
'data-prefix': prefix,
|
|
1472
|
-
'data-icon': iconName,
|
|
1473
|
-
'class': attrClass,
|
|
1474
|
-
'role': extra.attributes.role || 'img',
|
|
1475
|
-
'xmlns': 'http://www.w3.org/2000/svg',
|
|
1476
|
-
'viewBox': "0 0 ".concat(width, " ").concat(height)
|
|
1477
|
-
})
|
|
1478
|
-
};
|
|
1479
|
-
const uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {
|
|
1480
|
-
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
1481
|
-
} : {};
|
|
1482
|
-
if (watchable) {
|
|
1483
|
-
content.attributes[DATA_FA_I2SVG] = '';
|
|
1484
|
-
}
|
|
1485
|
-
if (title) {
|
|
1486
|
-
content.children.push({
|
|
1487
|
-
tag: 'title',
|
|
1488
|
-
attributes: {
|
|
1489
|
-
id: content.attributes['aria-labelledby'] || "title-".concat(titleId || nextUniqueId())
|
|
1490
|
-
},
|
|
1491
|
-
children: [title]
|
|
1492
|
-
});
|
|
1493
|
-
delete content.attributes.title;
|
|
1494
|
-
}
|
|
1495
|
-
const args = _objectSpread2(_objectSpread2({}, content), {}, {
|
|
1496
|
-
prefix,
|
|
1497
|
-
iconName,
|
|
1498
|
-
main,
|
|
1499
|
-
mask,
|
|
1500
|
-
maskId,
|
|
1501
|
-
transform,
|
|
1502
|
-
symbol,
|
|
1503
|
-
styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)
|
|
1504
|
-
});
|
|
1505
|
-
const {
|
|
1506
|
-
children,
|
|
1507
|
-
attributes
|
|
1508
|
-
} = mask.found && main.found ? callProvided('generateAbstractMask', args) || {
|
|
1509
|
-
children: [],
|
|
1510
|
-
attributes: {}
|
|
1511
|
-
} : callProvided('generateAbstractIcon', args) || {
|
|
1512
|
-
children: [],
|
|
1513
|
-
attributes: {}
|
|
1514
|
-
};
|
|
1515
|
-
args.children = children;
|
|
1516
|
-
args.attributes = attributes;
|
|
1517
|
-
if (symbol) {
|
|
1518
|
-
return asSymbol(args);
|
|
1519
|
-
} else {
|
|
1520
|
-
return asIcon(args);
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
function makeLayersTextAbstract(params) {
|
|
1524
|
-
const {
|
|
1525
|
-
content,
|
|
1526
|
-
width,
|
|
1527
|
-
height,
|
|
1528
|
-
transform,
|
|
1529
|
-
title,
|
|
1530
|
-
extra,
|
|
1531
|
-
watchable = false
|
|
1532
|
-
} = params;
|
|
1533
|
-
const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
1534
|
-
'title': title
|
|
1535
|
-
} : {}), {}, {
|
|
1536
|
-
'class': extra.classes.join(' ')
|
|
1537
|
-
});
|
|
1538
|
-
if (watchable) {
|
|
1539
|
-
attributes[DATA_FA_I2SVG] = '';
|
|
1540
|
-
}
|
|
1541
|
-
const styles = _objectSpread2({}, extra.styles);
|
|
1542
|
-
if (transformIsMeaningful(transform)) {
|
|
1543
|
-
styles['transform'] = transformForCss({
|
|
1544
|
-
transform,
|
|
1545
|
-
startCentered: true,
|
|
1546
|
-
width,
|
|
1547
|
-
height
|
|
1548
|
-
});
|
|
1549
|
-
styles['-webkit-transform'] = styles['transform'];
|
|
1550
|
-
}
|
|
1551
|
-
const styleString = joinStyles(styles);
|
|
1552
|
-
if (styleString.length > 0) {
|
|
1553
|
-
attributes['style'] = styleString;
|
|
1554
|
-
}
|
|
1555
|
-
const val = [];
|
|
1556
|
-
val.push({
|
|
1557
|
-
tag: 'span',
|
|
1558
|
-
attributes,
|
|
1559
|
-
children: [content]
|
|
1560
|
-
});
|
|
1561
|
-
if (title) {
|
|
1562
|
-
val.push({
|
|
1563
|
-
tag: 'span',
|
|
1564
|
-
attributes: {
|
|
1565
|
-
class: 'sr-only'
|
|
1566
|
-
},
|
|
1567
|
-
children: [title]
|
|
1568
|
-
});
|
|
1569
|
-
}
|
|
1570
|
-
return val;
|
|
1571
|
-
}
|
|
1572
|
-
function makeLayersCounterAbstract(params) {
|
|
1573
|
-
const {
|
|
1574
|
-
content,
|
|
1575
|
-
title,
|
|
1576
|
-
extra
|
|
1577
|
-
} = params;
|
|
1578
|
-
const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
1579
|
-
'title': title
|
|
1580
|
-
} : {}), {}, {
|
|
1581
|
-
'class': extra.classes.join(' ')
|
|
1582
|
-
});
|
|
1583
|
-
const styleString = joinStyles(extra.styles);
|
|
1584
|
-
if (styleString.length > 0) {
|
|
1585
|
-
attributes['style'] = styleString;
|
|
1586
|
-
}
|
|
1587
|
-
const val = [];
|
|
1588
|
-
val.push({
|
|
1589
|
-
tag: 'span',
|
|
1590
|
-
attributes,
|
|
1591
|
-
children: [content]
|
|
1592
|
-
});
|
|
1593
|
-
if (title) {
|
|
1594
|
-
val.push({
|
|
1595
|
-
tag: 'span',
|
|
1596
|
-
attributes: {
|
|
1597
|
-
class: 'sr-only'
|
|
1598
|
-
},
|
|
1599
|
-
children: [title]
|
|
1600
|
-
});
|
|
1601
|
-
}
|
|
1602
|
-
return val;
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
const {
|
|
1606
|
-
styles: styles$1
|
|
1607
|
-
} = namespace;
|
|
1608
|
-
function asFoundIcon(icon) {
|
|
1609
|
-
const width = icon[0];
|
|
1610
|
-
const height = icon[1];
|
|
1611
|
-
const [vectorData] = icon.slice(4);
|
|
1612
|
-
let element = null;
|
|
1613
|
-
if (Array.isArray(vectorData)) {
|
|
1614
|
-
element = {
|
|
1615
|
-
tag: 'g',
|
|
1616
|
-
attributes: {
|
|
1617
|
-
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
1618
|
-
},
|
|
1619
|
-
children: [{
|
|
1620
|
-
tag: 'path',
|
|
1621
|
-
attributes: {
|
|
1622
|
-
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
1623
|
-
fill: 'currentColor',
|
|
1624
|
-
d: vectorData[0]
|
|
1625
|
-
}
|
|
1626
|
-
}, {
|
|
1627
|
-
tag: 'path',
|
|
1628
|
-
attributes: {
|
|
1629
|
-
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
1630
|
-
fill: 'currentColor',
|
|
1631
|
-
d: vectorData[1]
|
|
1632
|
-
}
|
|
1633
|
-
}]
|
|
1634
|
-
};
|
|
1635
|
-
} else {
|
|
1636
|
-
element = {
|
|
1637
|
-
tag: 'path',
|
|
1638
|
-
attributes: {
|
|
1639
|
-
fill: 'currentColor',
|
|
1640
|
-
d: vectorData
|
|
1641
|
-
}
|
|
1642
|
-
};
|
|
1643
|
-
}
|
|
1644
|
-
return {
|
|
1645
|
-
found: true,
|
|
1646
|
-
width,
|
|
1647
|
-
height,
|
|
1648
|
-
icon: element
|
|
1649
|
-
};
|
|
1650
|
-
}
|
|
1651
|
-
const missingIconResolutionMixin = {
|
|
1652
|
-
found: false,
|
|
1653
|
-
width: 512,
|
|
1654
|
-
height: 512
|
|
1655
|
-
};
|
|
1656
|
-
function maybeNotifyMissing(iconName, prefix) {
|
|
1657
|
-
if (!PRODUCTION && !config.showMissingIcons && iconName) {
|
|
1658
|
-
console.error("Icon with name \"".concat(iconName, "\" and prefix \"").concat(prefix, "\" is missing."));
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
function findIcon(iconName, prefix) {
|
|
1662
|
-
let givenPrefix = prefix;
|
|
1663
|
-
if (prefix === 'fa' && config.styleDefault !== null) {
|
|
1664
|
-
prefix = getDefaultUsablePrefix();
|
|
1665
|
-
}
|
|
1666
|
-
return new Promise((resolve, reject) => {
|
|
1667
|
-
if (givenPrefix === 'fa') {
|
|
1668
|
-
const shim = byOldName(iconName) || {};
|
|
1669
|
-
iconName = shim.iconName || iconName;
|
|
1670
|
-
prefix = shim.prefix || prefix;
|
|
1671
|
-
}
|
|
1672
|
-
if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
|
|
1673
|
-
const icon = styles$1[prefix][iconName];
|
|
1674
|
-
return resolve(asFoundIcon(icon));
|
|
156
|
+
:host([size='md']) {
|
|
157
|
+
--icon-size: 1rem; /* 16px - default */
|
|
1675
158
|
}
|
|
1676
|
-
maybeNotifyMissing(iconName, prefix);
|
|
1677
|
-
resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {
|
|
1678
|
-
icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {}
|
|
1679
|
-
}));
|
|
1680
|
-
});
|
|
1681
|
-
}
|
|
1682
159
|
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
mark: noop$1,
|
|
1686
|
-
measure: noop$1
|
|
1687
|
-
};
|
|
1688
|
-
const preamble = "FA \"6.7.2\"";
|
|
1689
|
-
const begin = name => {
|
|
1690
|
-
p$2.mark("".concat(preamble, " ").concat(name, " begins"));
|
|
1691
|
-
return () => end(name);
|
|
1692
|
-
};
|
|
1693
|
-
const end = name => {
|
|
1694
|
-
p$2.mark("".concat(preamble, " ").concat(name, " ends"));
|
|
1695
|
-
p$2.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
|
|
1696
|
-
};
|
|
1697
|
-
var perf = {
|
|
1698
|
-
begin,
|
|
1699
|
-
end
|
|
1700
|
-
};
|
|
1701
|
-
|
|
1702
|
-
const noop$2 = () => {};
|
|
1703
|
-
function isWatched(node) {
|
|
1704
|
-
const i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
|
|
1705
|
-
return typeof i2svg === 'string';
|
|
1706
|
-
}
|
|
1707
|
-
function hasPrefixAndIcon(node) {
|
|
1708
|
-
const prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
|
|
1709
|
-
const icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
|
|
1710
|
-
return prefix && icon;
|
|
1711
|
-
}
|
|
1712
|
-
function hasBeenReplaced(node) {
|
|
1713
|
-
return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
|
|
1714
|
-
}
|
|
1715
|
-
function getMutator() {
|
|
1716
|
-
if (config.autoReplaceSvg === true) {
|
|
1717
|
-
return mutators.replace;
|
|
1718
|
-
}
|
|
1719
|
-
const mutator = mutators[config.autoReplaceSvg];
|
|
1720
|
-
return mutator || mutators.replace;
|
|
1721
|
-
}
|
|
1722
|
-
function createElementNS(tag) {
|
|
1723
|
-
return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
1724
|
-
}
|
|
1725
|
-
function createElement(tag) {
|
|
1726
|
-
return DOCUMENT.createElement(tag);
|
|
1727
|
-
}
|
|
1728
|
-
function convertSVG(abstractObj) {
|
|
1729
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1730
|
-
const {
|
|
1731
|
-
ceFn = abstractObj.tag === 'svg' ? createElementNS : createElement
|
|
1732
|
-
} = params;
|
|
1733
|
-
if (typeof abstractObj === 'string') {
|
|
1734
|
-
return DOCUMENT.createTextNode(abstractObj);
|
|
1735
|
-
}
|
|
1736
|
-
const tag = ceFn(abstractObj.tag);
|
|
1737
|
-
Object.keys(abstractObj.attributes || []).forEach(function (key) {
|
|
1738
|
-
tag.setAttribute(key, abstractObj.attributes[key]);
|
|
1739
|
-
});
|
|
1740
|
-
const children = abstractObj.children || [];
|
|
1741
|
-
children.forEach(function (child) {
|
|
1742
|
-
tag.appendChild(convertSVG(child, {
|
|
1743
|
-
ceFn
|
|
1744
|
-
}));
|
|
1745
|
-
});
|
|
1746
|
-
return tag;
|
|
1747
|
-
}
|
|
1748
|
-
function nodeAsComment(node) {
|
|
1749
|
-
let comment = " ".concat(node.outerHTML, " ");
|
|
1750
|
-
/* BEGIN.ATTRIBUTION */
|
|
1751
|
-
comment = "".concat(comment, "Font Awesome fontawesome.com ");
|
|
1752
|
-
/* END.ATTRIBUTION */
|
|
1753
|
-
return comment;
|
|
1754
|
-
}
|
|
1755
|
-
const mutators = {
|
|
1756
|
-
replace: function (mutation) {
|
|
1757
|
-
const node = mutation[0];
|
|
1758
|
-
if (node.parentNode) {
|
|
1759
|
-
mutation[1].forEach(abstract => {
|
|
1760
|
-
node.parentNode.insertBefore(convertSVG(abstract), node);
|
|
1761
|
-
});
|
|
1762
|
-
if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
|
|
1763
|
-
let comment = DOCUMENT.createComment(nodeAsComment(node));
|
|
1764
|
-
node.parentNode.replaceChild(comment, node);
|
|
1765
|
-
} else {
|
|
1766
|
-
node.remove();
|
|
1767
|
-
}
|
|
160
|
+
:host([size='lg']) {
|
|
161
|
+
--icon-size: 1.25rem; /* 20px */
|
|
1768
162
|
}
|
|
1769
|
-
},
|
|
1770
|
-
nest: function (mutation) {
|
|
1771
|
-
const node = mutation[0];
|
|
1772
|
-
const abstract = mutation[1];
|
|
1773
163
|
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
if (~classArray(node).indexOf(config.replacementClass)) {
|
|
1777
|
-
return mutators.replace(mutation);
|
|
1778
|
-
}
|
|
1779
|
-
const forSvg = new RegExp("".concat(config.cssPrefix, "-.*"));
|
|
1780
|
-
delete abstract[0].attributes.id;
|
|
1781
|
-
if (abstract[0].attributes.class) {
|
|
1782
|
-
const splitClasses = abstract[0].attributes.class.split(' ').reduce((acc, cls) => {
|
|
1783
|
-
if (cls === config.replacementClass || cls.match(forSvg)) {
|
|
1784
|
-
acc.toSvg.push(cls);
|
|
1785
|
-
} else {
|
|
1786
|
-
acc.toNode.push(cls);
|
|
1787
|
-
}
|
|
1788
|
-
return acc;
|
|
1789
|
-
}, {
|
|
1790
|
-
toNode: [],
|
|
1791
|
-
toSvg: []
|
|
1792
|
-
});
|
|
1793
|
-
abstract[0].attributes.class = splitClasses.toSvg.join(' ');
|
|
1794
|
-
if (splitClasses.toNode.length === 0) {
|
|
1795
|
-
node.removeAttribute('class');
|
|
1796
|
-
} else {
|
|
1797
|
-
node.setAttribute('class', splitClasses.toNode.join(' '));
|
|
1798
|
-
}
|
|
164
|
+
:host([size='xl']) {
|
|
165
|
+
--icon-size: 1.5rem; /* 24px */
|
|
1799
166
|
}
|
|
1800
|
-
const newInnerHTML = abstract.map(a => toHtml(a)).join('\n');
|
|
1801
|
-
node.setAttribute(DATA_FA_I2SVG, '');
|
|
1802
|
-
node.innerHTML = newInnerHTML;
|
|
1803
|
-
}
|
|
1804
|
-
};
|
|
1805
|
-
function performOperationSync(op) {
|
|
1806
|
-
op();
|
|
1807
|
-
}
|
|
1808
|
-
function perform(mutations, callback) {
|
|
1809
|
-
const callbackFunction = typeof callback === 'function' ? callback : noop$2;
|
|
1810
|
-
if (mutations.length === 0) {
|
|
1811
|
-
callbackFunction();
|
|
1812
|
-
} else {
|
|
1813
|
-
let frame = performOperationSync;
|
|
1814
|
-
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
|
|
1815
|
-
frame = WINDOW.requestAnimationFrame || performOperationSync;
|
|
1816
|
-
}
|
|
1817
|
-
frame(() => {
|
|
1818
|
-
const mutator = getMutator();
|
|
1819
|
-
const mark = perf.begin('mutate');
|
|
1820
|
-
mutations.map(mutator);
|
|
1821
|
-
mark();
|
|
1822
|
-
callbackFunction();
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
let disabled = false;
|
|
1827
|
-
function disableObservation() {
|
|
1828
|
-
disabled = true;
|
|
1829
|
-
}
|
|
1830
|
-
function enableObservation() {
|
|
1831
|
-
disabled = false;
|
|
1832
|
-
}
|
|
1833
|
-
let mo = null;
|
|
1834
|
-
function observe(options) {
|
|
1835
|
-
if (!MUTATION_OBSERVER) {
|
|
1836
|
-
return;
|
|
1837
|
-
}
|
|
1838
|
-
if (!config.observeMutations) {
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
const {
|
|
1842
|
-
treeCallback = noop$2,
|
|
1843
|
-
nodeCallback = noop$2,
|
|
1844
|
-
pseudoElementsCallback = noop$2,
|
|
1845
|
-
observeMutationsRoot = DOCUMENT
|
|
1846
|
-
} = options;
|
|
1847
|
-
mo = new MUTATION_OBSERVER(objects => {
|
|
1848
|
-
if (disabled) return;
|
|
1849
|
-
const defaultPrefix = getDefaultUsablePrefix();
|
|
1850
|
-
toArray(objects).forEach(mutationRecord => {
|
|
1851
|
-
if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
|
1852
|
-
if (config.searchPseudoElements) {
|
|
1853
|
-
pseudoElementsCallback(mutationRecord.target);
|
|
1854
|
-
}
|
|
1855
|
-
treeCallback(mutationRecord.target);
|
|
1856
|
-
}
|
|
1857
|
-
if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {
|
|
1858
|
-
pseudoElementsCallback(mutationRecord.target.parentNode);
|
|
1859
|
-
}
|
|
1860
|
-
if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
|
|
1861
|
-
if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) {
|
|
1862
|
-
const {
|
|
1863
|
-
prefix,
|
|
1864
|
-
iconName
|
|
1865
|
-
} = getCanonicalIcon(classArray(mutationRecord.target));
|
|
1866
|
-
mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
|
|
1867
|
-
if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);
|
|
1868
|
-
} else if (hasBeenReplaced(mutationRecord.target)) {
|
|
1869
|
-
nodeCallback(mutationRecord.target);
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
});
|
|
1873
|
-
});
|
|
1874
|
-
if (!IS_DOM) return;
|
|
1875
|
-
mo.observe(observeMutationsRoot, {
|
|
1876
|
-
childList: true,
|
|
1877
|
-
attributes: true,
|
|
1878
|
-
characterData: true,
|
|
1879
|
-
subtree: true
|
|
1880
|
-
});
|
|
1881
|
-
}
|
|
1882
|
-
function disconnect() {
|
|
1883
|
-
if (!mo) return;
|
|
1884
|
-
mo.disconnect();
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
function styleParser (node) {
|
|
1888
|
-
const style = node.getAttribute('style');
|
|
1889
|
-
let val = [];
|
|
1890
|
-
if (style) {
|
|
1891
|
-
val = style.split(';').reduce((acc, style) => {
|
|
1892
|
-
const styles = style.split(':');
|
|
1893
|
-
const prop = styles[0];
|
|
1894
|
-
const value = styles.slice(1);
|
|
1895
|
-
if (prop && value.length > 0) {
|
|
1896
|
-
acc[prop] = value.join(':').trim();
|
|
1897
|
-
}
|
|
1898
|
-
return acc;
|
|
1899
|
-
}, {});
|
|
1900
|
-
}
|
|
1901
|
-
return val;
|
|
1902
|
-
}
|
|
1903
167
|
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
const existingIconName = node.getAttribute('data-icon');
|
|
1907
|
-
const innerText = node.innerText !== undefined ? node.innerText.trim() : '';
|
|
1908
|
-
let val = getCanonicalIcon(classArray(node));
|
|
1909
|
-
if (!val.prefix) {
|
|
1910
|
-
val.prefix = getDefaultUsablePrefix();
|
|
1911
|
-
}
|
|
1912
|
-
if (existingPrefix && existingIconName) {
|
|
1913
|
-
val.prefix = existingPrefix;
|
|
1914
|
-
val.iconName = existingIconName;
|
|
1915
|
-
}
|
|
1916
|
-
if (val.iconName && val.prefix) {
|
|
1917
|
-
return val;
|
|
1918
|
-
}
|
|
1919
|
-
if (val.prefix && innerText.length > 0) {
|
|
1920
|
-
val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
|
|
1921
|
-
}
|
|
1922
|
-
if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {
|
|
1923
|
-
val.iconName = node.firstChild.data;
|
|
1924
|
-
}
|
|
1925
|
-
return val;
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
function attributesParser (node) {
|
|
1929
|
-
const extraAttributes = toArray(node.attributes).reduce((acc, attr) => {
|
|
1930
|
-
if (acc.name !== 'class' && acc.name !== 'style') {
|
|
1931
|
-
acc[attr.name] = attr.value;
|
|
1932
|
-
}
|
|
1933
|
-
return acc;
|
|
1934
|
-
}, {});
|
|
1935
|
-
const title = node.getAttribute('title');
|
|
1936
|
-
const titleId = node.getAttribute('data-fa-title-id');
|
|
1937
|
-
if (config.autoA11y) {
|
|
1938
|
-
if (title) {
|
|
1939
|
-
extraAttributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
1940
|
-
} else {
|
|
1941
|
-
extraAttributes['aria-hidden'] = 'true';
|
|
1942
|
-
extraAttributes['focusable'] = 'false';
|
|
168
|
+
:host([size='2xl']) {
|
|
169
|
+
--icon-size: 2rem; /* 32px */
|
|
1943
170
|
}
|
|
1944
|
-
}
|
|
1945
|
-
return extraAttributes;
|
|
1946
|
-
}
|
|
1947
171
|
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
iconName: null,
|
|
1951
|
-
title: null,
|
|
1952
|
-
titleId: null,
|
|
1953
|
-
prefix: null,
|
|
1954
|
-
transform: meaninglessTransform,
|
|
1955
|
-
symbol: false,
|
|
1956
|
-
mask: {
|
|
1957
|
-
iconName: null,
|
|
1958
|
-
prefix: null,
|
|
1959
|
-
rest: []
|
|
1960
|
-
},
|
|
1961
|
-
maskId: null,
|
|
1962
|
-
extra: {
|
|
1963
|
-
classes: [],
|
|
1964
|
-
styles: {},
|
|
1965
|
-
attributes: {}
|
|
172
|
+
:host([size='3xl']) {
|
|
173
|
+
--icon-size: 2.5rem; /* 40px */
|
|
1966
174
|
}
|
|
1967
|
-
};
|
|
1968
|
-
}
|
|
1969
|
-
function parseMeta(node) {
|
|
1970
|
-
let parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
1971
|
-
styleParser: true
|
|
1972
|
-
};
|
|
1973
|
-
const {
|
|
1974
|
-
iconName,
|
|
1975
|
-
prefix,
|
|
1976
|
-
rest: extraClasses
|
|
1977
|
-
} = classParser(node);
|
|
1978
|
-
const extraAttributes = attributesParser(node);
|
|
1979
|
-
const pluginMeta = chainHooks('parseNodeAttributes', {}, node);
|
|
1980
|
-
let extraStyles = parser.styleParser ? styleParser(node) : [];
|
|
1981
|
-
return _objectSpread2({
|
|
1982
|
-
iconName,
|
|
1983
|
-
title: node.getAttribute('title'),
|
|
1984
|
-
titleId: node.getAttribute('data-fa-title-id'),
|
|
1985
|
-
prefix,
|
|
1986
|
-
transform: meaninglessTransform,
|
|
1987
|
-
mask: {
|
|
1988
|
-
iconName: null,
|
|
1989
|
-
prefix: null,
|
|
1990
|
-
rest: []
|
|
1991
|
-
},
|
|
1992
|
-
maskId: null,
|
|
1993
|
-
symbol: false,
|
|
1994
|
-
extra: {
|
|
1995
|
-
classes: extraClasses,
|
|
1996
|
-
styles: extraStyles,
|
|
1997
|
-
attributes: extraAttributes
|
|
1998
|
-
}
|
|
1999
|
-
}, pluginMeta);
|
|
2000
|
-
}
|
|
2001
175
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
|
|
2010
|
-
return callProvided('generateLayersText', node, nodeMeta);
|
|
2011
|
-
} else {
|
|
2012
|
-
return callProvided('generateSvgReplacementMutation', node, nodeMeta);
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
function getKnownPrefixes() {
|
|
2016
|
-
return [...Ft, ...Ia];
|
|
2017
|
-
}
|
|
2018
|
-
function onTree(root) {
|
|
2019
|
-
let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
2020
|
-
if (!IS_DOM) return Promise.resolve();
|
|
2021
|
-
const htmlClassList = DOCUMENT.documentElement.classList;
|
|
2022
|
-
const hclAdd = suffix => htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
2023
|
-
const hclRemove = suffix => htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
2024
|
-
const prefixes = config.autoFetchSvg ? getKnownPrefixes() : P.concat(Object.keys(styles$2));
|
|
2025
|
-
if (!prefixes.includes('fa')) {
|
|
2026
|
-
prefixes.push('fa');
|
|
2027
|
-
}
|
|
2028
|
-
const prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(p$$1 => ".".concat(p$$1, ":not([").concat(DATA_FA_I2SVG, "])"))).join(', ');
|
|
2029
|
-
if (prefixesDomQuery.length === 0) {
|
|
2030
|
-
return Promise.resolve();
|
|
2031
|
-
}
|
|
2032
|
-
let candidates = [];
|
|
2033
|
-
try {
|
|
2034
|
-
candidates = toArray(root.querySelectorAll(prefixesDomQuery));
|
|
2035
|
-
} catch (e$$1) {
|
|
2036
|
-
// noop
|
|
2037
|
-
}
|
|
2038
|
-
if (candidates.length > 0) {
|
|
2039
|
-
hclAdd('pending');
|
|
2040
|
-
hclRemove('complete');
|
|
2041
|
-
} else {
|
|
2042
|
-
return Promise.resolve();
|
|
2043
|
-
}
|
|
2044
|
-
const mark = perf.begin('onTree');
|
|
2045
|
-
const mutations = candidates.reduce((acc, node) => {
|
|
2046
|
-
try {
|
|
2047
|
-
const mutation = generateMutation(node);
|
|
2048
|
-
if (mutation) {
|
|
2049
|
-
acc.push(mutation);
|
|
2050
|
-
}
|
|
2051
|
-
} catch (e$$1) {
|
|
2052
|
-
if (!PRODUCTION) {
|
|
2053
|
-
if (e$$1.name === 'MissingIcon') {
|
|
2054
|
-
console.error(e$$1);
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
return acc;
|
|
2059
|
-
}, []);
|
|
2060
|
-
return new Promise((resolve, reject) => {
|
|
2061
|
-
Promise.all(mutations).then(resolvedMutations => {
|
|
2062
|
-
perform(resolvedMutations, () => {
|
|
2063
|
-
hclAdd('active');
|
|
2064
|
-
hclAdd('complete');
|
|
2065
|
-
hclRemove('pending');
|
|
2066
|
-
if (typeof callback === 'function') callback();
|
|
2067
|
-
mark();
|
|
2068
|
-
resolve();
|
|
2069
|
-
});
|
|
2070
|
-
}).catch(e$$1 => {
|
|
2071
|
-
mark();
|
|
2072
|
-
reject(e$$1);
|
|
2073
|
-
});
|
|
2074
|
-
});
|
|
2075
|
-
}
|
|
2076
|
-
function onNode(node) {
|
|
2077
|
-
let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
2078
|
-
generateMutation(node).then(mutation => {
|
|
2079
|
-
if (mutation) {
|
|
2080
|
-
perform([mutation], callback);
|
|
2081
|
-
}
|
|
2082
|
-
});
|
|
2083
|
-
}
|
|
2084
|
-
function resolveIcons(next) {
|
|
2085
|
-
return function (maybeIconDefinition) {
|
|
2086
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2087
|
-
const iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
2088
|
-
let {
|
|
2089
|
-
mask
|
|
2090
|
-
} = params;
|
|
2091
|
-
if (mask) {
|
|
2092
|
-
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
2093
|
-
}
|
|
2094
|
-
return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
2095
|
-
mask
|
|
2096
|
-
}));
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
const render = function (iconDefinition) {
|
|
2100
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2101
|
-
const {
|
|
2102
|
-
transform = meaninglessTransform,
|
|
2103
|
-
symbol = false,
|
|
2104
|
-
mask = null,
|
|
2105
|
-
maskId = null,
|
|
2106
|
-
title = null,
|
|
2107
|
-
titleId = null,
|
|
2108
|
-
classes = [],
|
|
2109
|
-
attributes = {},
|
|
2110
|
-
styles = {}
|
|
2111
|
-
} = params;
|
|
2112
|
-
if (!iconDefinition) return;
|
|
2113
|
-
const {
|
|
2114
|
-
prefix,
|
|
2115
|
-
iconName,
|
|
2116
|
-
icon
|
|
2117
|
-
} = iconDefinition;
|
|
2118
|
-
return domVariants(_objectSpread2({
|
|
2119
|
-
type: 'icon'
|
|
2120
|
-
}, iconDefinition), () => {
|
|
2121
|
-
callHooks('beforeDOMElementCreation', {
|
|
2122
|
-
iconDefinition,
|
|
2123
|
-
params
|
|
2124
|
-
});
|
|
2125
|
-
if (config.autoA11y) {
|
|
2126
|
-
if (title) {
|
|
2127
|
-
attributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
2128
|
-
} else {
|
|
2129
|
-
attributes['aria-hidden'] = 'true';
|
|
2130
|
-
attributes['focusable'] = 'false';
|
|
2131
|
-
}
|
|
176
|
+
.base {
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 100%;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
justify-content: center;
|
|
182
|
+
color: var(--icon-color, currentColor);
|
|
2132
183
|
}
|
|
2133
|
-
return makeInlineSvgAbstract({
|
|
2134
|
-
icons: {
|
|
2135
|
-
main: asFoundIcon(icon),
|
|
2136
|
-
mask: mask ? asFoundIcon(mask.icon) : {
|
|
2137
|
-
found: false,
|
|
2138
|
-
width: null,
|
|
2139
|
-
height: null,
|
|
2140
|
-
icon: {}
|
|
2141
|
-
}
|
|
2142
|
-
},
|
|
2143
|
-
prefix,
|
|
2144
|
-
iconName,
|
|
2145
|
-
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
2146
|
-
symbol,
|
|
2147
|
-
title,
|
|
2148
|
-
maskId,
|
|
2149
|
-
titleId,
|
|
2150
|
-
extra: {
|
|
2151
|
-
attributes,
|
|
2152
|
-
styles,
|
|
2153
|
-
classes
|
|
2154
|
-
}
|
|
2155
|
-
});
|
|
2156
|
-
});
|
|
2157
|
-
};
|
|
2158
|
-
var ReplaceElements = {
|
|
2159
|
-
mixout() {
|
|
2160
|
-
return {
|
|
2161
|
-
icon: resolveIcons(render)
|
|
2162
|
-
};
|
|
2163
|
-
},
|
|
2164
|
-
hooks() {
|
|
2165
|
-
return {
|
|
2166
|
-
mutationObserverCallbacks(accumulator) {
|
|
2167
|
-
accumulator.treeCallback = onTree;
|
|
2168
|
-
accumulator.nodeCallback = onNode;
|
|
2169
|
-
return accumulator;
|
|
2170
|
-
}
|
|
2171
|
-
};
|
|
2172
|
-
},
|
|
2173
|
-
provides(providers$$1) {
|
|
2174
|
-
providers$$1.i2svg = function (params) {
|
|
2175
|
-
const {
|
|
2176
|
-
node = DOCUMENT,
|
|
2177
|
-
callback = () => {}
|
|
2178
|
-
} = params;
|
|
2179
|
-
return onTree(node, callback);
|
|
2180
|
-
};
|
|
2181
|
-
providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) {
|
|
2182
|
-
const {
|
|
2183
|
-
iconName,
|
|
2184
|
-
title,
|
|
2185
|
-
titleId,
|
|
2186
|
-
prefix,
|
|
2187
|
-
transform,
|
|
2188
|
-
symbol,
|
|
2189
|
-
mask,
|
|
2190
|
-
maskId,
|
|
2191
|
-
extra
|
|
2192
|
-
} = nodeMeta;
|
|
2193
|
-
return new Promise((resolve, reject) => {
|
|
2194
|
-
Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
|
|
2195
|
-
found: false,
|
|
2196
|
-
width: 512,
|
|
2197
|
-
height: 512,
|
|
2198
|
-
icon: {}
|
|
2199
|
-
})]).then(_ref => {
|
|
2200
|
-
let [main, mask] = _ref;
|
|
2201
|
-
resolve([node, makeInlineSvgAbstract({
|
|
2202
|
-
icons: {
|
|
2203
|
-
main,
|
|
2204
|
-
mask
|
|
2205
|
-
},
|
|
2206
|
-
prefix,
|
|
2207
|
-
iconName,
|
|
2208
|
-
transform,
|
|
2209
|
-
symbol,
|
|
2210
|
-
maskId,
|
|
2211
|
-
title,
|
|
2212
|
-
titleId,
|
|
2213
|
-
extra,
|
|
2214
|
-
watchable: true
|
|
2215
|
-
})]);
|
|
2216
|
-
}).catch(reject);
|
|
2217
|
-
});
|
|
2218
|
-
};
|
|
2219
|
-
providers$$1.generateAbstractIcon = function (_ref2) {
|
|
2220
|
-
let {
|
|
2221
|
-
children,
|
|
2222
|
-
attributes,
|
|
2223
|
-
main,
|
|
2224
|
-
transform,
|
|
2225
|
-
styles
|
|
2226
|
-
} = _ref2;
|
|
2227
|
-
const styleString = joinStyles(styles);
|
|
2228
|
-
if (styleString.length > 0) {
|
|
2229
|
-
attributes['style'] = styleString;
|
|
2230
|
-
}
|
|
2231
|
-
let nextChild;
|
|
2232
|
-
if (transformIsMeaningful(transform)) {
|
|
2233
|
-
nextChild = callProvided('generateAbstractTransformGrouping', {
|
|
2234
|
-
main,
|
|
2235
|
-
transform,
|
|
2236
|
-
containerWidth: main.width,
|
|
2237
|
-
iconWidth: main.width
|
|
2238
|
-
});
|
|
2239
|
-
}
|
|
2240
|
-
children.push(nextChild || main.icon);
|
|
2241
|
-
return {
|
|
2242
|
-
children,
|
|
2243
|
-
attributes
|
|
2244
|
-
};
|
|
2245
|
-
};
|
|
2246
|
-
}
|
|
2247
|
-
};
|
|
2248
|
-
|
|
2249
|
-
var Layers = {
|
|
2250
|
-
mixout() {
|
|
2251
|
-
return {
|
|
2252
|
-
layer(assembler) {
|
|
2253
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2254
|
-
const {
|
|
2255
|
-
classes = []
|
|
2256
|
-
} = params;
|
|
2257
|
-
return domVariants({
|
|
2258
|
-
type: 'layer'
|
|
2259
|
-
}, () => {
|
|
2260
|
-
callHooks('beforeDOMElementCreation', {
|
|
2261
|
-
assembler,
|
|
2262
|
-
params
|
|
2263
|
-
});
|
|
2264
|
-
let children = [];
|
|
2265
|
-
assembler(args => {
|
|
2266
|
-
Array.isArray(args) ? args.map(a => {
|
|
2267
|
-
children = children.concat(a.abstract);
|
|
2268
|
-
}) : children = children.concat(args.abstract);
|
|
2269
|
-
});
|
|
2270
|
-
return [{
|
|
2271
|
-
tag: 'span',
|
|
2272
|
-
attributes: {
|
|
2273
|
-
class: ["".concat(config.cssPrefix, "-layers"), ...classes].join(' ')
|
|
2274
|
-
},
|
|
2275
|
-
children
|
|
2276
|
-
}];
|
|
2277
|
-
});
|
|
2278
|
-
}
|
|
2279
|
-
};
|
|
2280
|
-
}
|
|
2281
|
-
};
|
|
2282
|
-
|
|
2283
|
-
var LayersCounter = {
|
|
2284
|
-
mixout() {
|
|
2285
|
-
return {
|
|
2286
|
-
counter(content) {
|
|
2287
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2288
|
-
const {
|
|
2289
|
-
title = null,
|
|
2290
|
-
classes = [],
|
|
2291
|
-
attributes = {},
|
|
2292
|
-
styles = {}
|
|
2293
|
-
} = params;
|
|
2294
|
-
return domVariants({
|
|
2295
|
-
type: 'counter',
|
|
2296
|
-
content
|
|
2297
|
-
}, () => {
|
|
2298
|
-
callHooks('beforeDOMElementCreation', {
|
|
2299
|
-
content,
|
|
2300
|
-
params
|
|
2301
|
-
});
|
|
2302
|
-
return makeLayersCounterAbstract({
|
|
2303
|
-
content: content.toString(),
|
|
2304
|
-
title,
|
|
2305
|
-
extra: {
|
|
2306
|
-
attributes,
|
|
2307
|
-
styles,
|
|
2308
|
-
classes: ["".concat(config.cssPrefix, "-layers-counter"), ...classes]
|
|
2309
|
-
}
|
|
2310
|
-
});
|
|
2311
|
-
});
|
|
2312
|
-
}
|
|
2313
|
-
};
|
|
2314
|
-
}
|
|
2315
|
-
};
|
|
2316
184
|
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
const {
|
|
2323
|
-
transform = meaninglessTransform,
|
|
2324
|
-
title = null,
|
|
2325
|
-
classes = [],
|
|
2326
|
-
attributes = {},
|
|
2327
|
-
styles = {}
|
|
2328
|
-
} = params;
|
|
2329
|
-
return domVariants({
|
|
2330
|
-
type: 'text',
|
|
2331
|
-
content
|
|
2332
|
-
}, () => {
|
|
2333
|
-
callHooks('beforeDOMElementCreation', {
|
|
2334
|
-
content,
|
|
2335
|
-
params
|
|
2336
|
-
});
|
|
2337
|
-
return makeLayersTextAbstract({
|
|
2338
|
-
content,
|
|
2339
|
-
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
2340
|
-
title,
|
|
2341
|
-
extra: {
|
|
2342
|
-
attributes,
|
|
2343
|
-
styles,
|
|
2344
|
-
classes: ["".concat(config.cssPrefix, "-layers-text"), ...classes]
|
|
2345
|
-
}
|
|
2346
|
-
});
|
|
2347
|
-
});
|
|
2348
|
-
}
|
|
2349
|
-
};
|
|
2350
|
-
},
|
|
2351
|
-
provides(providers$$1) {
|
|
2352
|
-
providers$$1.generateLayersText = function (node, nodeMeta) {
|
|
2353
|
-
const {
|
|
2354
|
-
title,
|
|
2355
|
-
transform,
|
|
2356
|
-
extra
|
|
2357
|
-
} = nodeMeta;
|
|
2358
|
-
let width = null;
|
|
2359
|
-
let height = null;
|
|
2360
|
-
if (IS_IE) {
|
|
2361
|
-
const computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
|
|
2362
|
-
const boundingClientRect = node.getBoundingClientRect();
|
|
2363
|
-
width = boundingClientRect.width / computedFontSize;
|
|
2364
|
-
height = boundingClientRect.height / computedFontSize;
|
|
2365
|
-
}
|
|
2366
|
-
if (config.autoA11y && !title) {
|
|
2367
|
-
extra.attributes['aria-hidden'] = 'true';
|
|
2368
|
-
}
|
|
2369
|
-
return Promise.resolve([node, makeLayersTextAbstract({
|
|
2370
|
-
content: node.innerHTML,
|
|
2371
|
-
width,
|
|
2372
|
-
height,
|
|
2373
|
-
transform,
|
|
2374
|
-
title,
|
|
2375
|
-
extra,
|
|
2376
|
-
watchable: true
|
|
2377
|
-
})]);
|
|
2378
|
-
};
|
|
2379
|
-
}
|
|
2380
|
-
};
|
|
2381
|
-
|
|
2382
|
-
const CLEAN_CONTENT_PATTERN = new RegExp('\u{22}', 'ug');
|
|
2383
|
-
const SECONDARY_UNICODE_RANGE = [1105920, 1112319];
|
|
2384
|
-
const _FONT_FAMILY_WEIGHT_TO_PREFIX = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
2385
|
-
FontAwesome: {
|
|
2386
|
-
normal: 'fas',
|
|
2387
|
-
400: 'fas'
|
|
2388
|
-
}
|
|
2389
|
-
}), lt), wa), Yt);
|
|
2390
|
-
const FONT_FAMILY_WEIGHT_TO_PREFIX = Object.keys(_FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, key) => {
|
|
2391
|
-
acc[key.toLowerCase()] = _FONT_FAMILY_WEIGHT_TO_PREFIX[key];
|
|
2392
|
-
return acc;
|
|
2393
|
-
}, {});
|
|
2394
|
-
const FONT_FAMILY_WEIGHT_FALLBACK = Object.keys(FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, fontFamily) => {
|
|
2395
|
-
const weights = FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamily];
|
|
2396
|
-
acc[fontFamily] = weights[900] || [...Object.entries(weights)][0][1];
|
|
2397
|
-
return acc;
|
|
2398
|
-
}, {});
|
|
2399
|
-
function hexValueFromContent(content) {
|
|
2400
|
-
const cleaned = content.replace(CLEAN_CONTENT_PATTERN, '');
|
|
2401
|
-
const codePoint = codePointAt(cleaned, 0);
|
|
2402
|
-
const isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
|
|
2403
|
-
const isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
|
|
2404
|
-
return {
|
|
2405
|
-
value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
|
|
2406
|
-
isSecondary: isPrependTen || isDoubled
|
|
2407
|
-
};
|
|
2408
|
-
}
|
|
2409
|
-
function getPrefix(fontFamily, fontWeight) {
|
|
2410
|
-
const fontFamilySanitized = fontFamily.replace(/^['"]|['"]$/g, '').toLowerCase();
|
|
2411
|
-
const fontWeightInteger = parseInt(fontWeight);
|
|
2412
|
-
const fontWeightSanitized = isNaN(fontWeightInteger) ? 'normal' : fontWeightInteger;
|
|
2413
|
-
return (FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamilySanitized] || {})[fontWeightSanitized] || FONT_FAMILY_WEIGHT_FALLBACK[fontFamilySanitized];
|
|
2414
|
-
}
|
|
2415
|
-
function replaceForPosition(node, position) {
|
|
2416
|
-
const pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));
|
|
2417
|
-
return new Promise((resolve, reject) => {
|
|
2418
|
-
if (node.getAttribute(pendingAttribute) !== null) {
|
|
2419
|
-
// This node is already being processed
|
|
2420
|
-
return resolve();
|
|
185
|
+
.icon {
|
|
186
|
+
width: 100%;
|
|
187
|
+
height: 100%;
|
|
188
|
+
fill: currentColor;
|
|
189
|
+
display: block;
|
|
2421
190
|
}
|
|
2422
|
-
const children = toArray(node.children);
|
|
2423
|
-
const alreadyProcessedPseudoElement = children.filter(c$$1 => c$$1.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position)[0];
|
|
2424
|
-
const styles = WINDOW.getComputedStyle(node, position);
|
|
2425
|
-
const fontFamily = styles.getPropertyValue('font-family');
|
|
2426
|
-
const fontFamilyMatch = fontFamily.match(FONT_FAMILY_PATTERN);
|
|
2427
|
-
const fontWeight = styles.getPropertyValue('font-weight');
|
|
2428
|
-
const content = styles.getPropertyValue('content');
|
|
2429
|
-
if (alreadyProcessedPseudoElement && !fontFamilyMatch) {
|
|
2430
|
-
// If we've already processed it but the current computed style does not result in a font-family,
|
|
2431
|
-
// that probably means that a class name that was previously present to make the icon has been
|
|
2432
|
-
// removed. So we now should delete the icon.
|
|
2433
|
-
node.removeChild(alreadyProcessedPseudoElement);
|
|
2434
|
-
return resolve();
|
|
2435
|
-
} else if (fontFamilyMatch && content !== 'none' && content !== '') {
|
|
2436
|
-
const content = styles.getPropertyValue('content');
|
|
2437
|
-
let prefix = getPrefix(fontFamily, fontWeight);
|
|
2438
|
-
const {
|
|
2439
|
-
value: hexValue,
|
|
2440
|
-
isSecondary
|
|
2441
|
-
} = hexValueFromContent(content);
|
|
2442
|
-
const isV4 = fontFamilyMatch[0].startsWith('FontAwesome');
|
|
2443
|
-
let iconName = byUnicode(prefix, hexValue);
|
|
2444
|
-
let iconIdentifier = iconName;
|
|
2445
|
-
if (isV4) {
|
|
2446
|
-
const iconName4 = byOldUnicode(hexValue);
|
|
2447
|
-
if (iconName4.iconName && iconName4.prefix) {
|
|
2448
|
-
iconName = iconName4.iconName;
|
|
2449
|
-
prefix = iconName4.prefix;
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
2452
191
|
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
if (alreadyProcessedPseudoElement) {
|
|
2458
|
-
// Delete the old one, since we're replacing it with a new one
|
|
2459
|
-
node.removeChild(alreadyProcessedPseudoElement);
|
|
2460
|
-
}
|
|
2461
|
-
const meta = blankMeta();
|
|
2462
|
-
const {
|
|
2463
|
-
extra
|
|
2464
|
-
} = meta;
|
|
2465
|
-
extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
|
|
2466
|
-
findIcon(iconName, prefix).then(main => {
|
|
2467
|
-
const abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
|
|
2468
|
-
icons: {
|
|
2469
|
-
main,
|
|
2470
|
-
mask: emptyCanonicalIcon()
|
|
2471
|
-
},
|
|
2472
|
-
prefix,
|
|
2473
|
-
iconName: iconIdentifier,
|
|
2474
|
-
extra,
|
|
2475
|
-
watchable: true
|
|
2476
|
-
}));
|
|
2477
|
-
const element = DOCUMENT.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
2478
|
-
if (position === '::before') {
|
|
2479
|
-
node.insertBefore(element, node.firstChild);
|
|
2480
|
-
} else {
|
|
2481
|
-
node.appendChild(element);
|
|
2482
|
-
}
|
|
2483
|
-
element.outerHTML = abstract.map(a$$1 => toHtml(a$$1)).join('\n');
|
|
2484
|
-
node.removeAttribute(pendingAttribute);
|
|
2485
|
-
resolve();
|
|
2486
|
-
}).catch(reject);
|
|
2487
|
-
} else {
|
|
2488
|
-
resolve();
|
|
2489
|
-
}
|
|
2490
|
-
} else {
|
|
2491
|
-
resolve();
|
|
192
|
+
.icon svg {
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: 100%;
|
|
195
|
+
display: block;
|
|
2492
196
|
}
|
|
2493
|
-
});
|
|
2494
|
-
}
|
|
2495
|
-
function replace(node) {
|
|
2496
|
-
return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]);
|
|
2497
|
-
}
|
|
2498
|
-
function processable(node) {
|
|
2499
|
-
return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');
|
|
2500
|
-
}
|
|
2501
|
-
function searchPseudoElements(root) {
|
|
2502
|
-
if (!IS_DOM) return;
|
|
2503
|
-
return new Promise((resolve, reject) => {
|
|
2504
|
-
const operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);
|
|
2505
|
-
const end = perf.begin('searchPseudoElements');
|
|
2506
|
-
disableObservation();
|
|
2507
|
-
Promise.all(operations).then(() => {
|
|
2508
|
-
end();
|
|
2509
|
-
enableObservation();
|
|
2510
|
-
resolve();
|
|
2511
|
-
}).catch(() => {
|
|
2512
|
-
end();
|
|
2513
|
-
enableObservation();
|
|
2514
|
-
reject();
|
|
2515
|
-
});
|
|
2516
|
-
});
|
|
2517
|
-
}
|
|
2518
|
-
var PseudoElements = {
|
|
2519
|
-
hooks() {
|
|
2520
|
-
return {
|
|
2521
|
-
mutationObserverCallbacks(accumulator) {
|
|
2522
|
-
accumulator.pseudoElementsCallback = searchPseudoElements;
|
|
2523
|
-
return accumulator;
|
|
2524
|
-
}
|
|
2525
|
-
};
|
|
2526
|
-
},
|
|
2527
|
-
provides(providers) {
|
|
2528
|
-
providers.pseudoElements2svg = function (params) {
|
|
2529
|
-
const {
|
|
2530
|
-
node = DOCUMENT
|
|
2531
|
-
} = params;
|
|
2532
|
-
if (config.searchPseudoElements) {
|
|
2533
|
-
searchPseudoElements(node);
|
|
2534
|
-
}
|
|
2535
|
-
};
|
|
2536
|
-
}
|
|
2537
|
-
};
|
|
2538
197
|
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
return {
|
|
2543
|
-
dom: {
|
|
2544
|
-
unwatch() {
|
|
2545
|
-
disableObservation();
|
|
2546
|
-
_unwatched = true;
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
};
|
|
2550
|
-
},
|
|
2551
|
-
hooks() {
|
|
2552
|
-
return {
|
|
2553
|
-
bootstrap() {
|
|
2554
|
-
observe(chainHooks('mutationObserverCallbacks', {}));
|
|
2555
|
-
},
|
|
2556
|
-
noAuto() {
|
|
2557
|
-
disconnect();
|
|
2558
|
-
},
|
|
2559
|
-
watch(params) {
|
|
2560
|
-
const {
|
|
2561
|
-
observeMutationsRoot
|
|
2562
|
-
} = params;
|
|
2563
|
-
if (_unwatched) {
|
|
2564
|
-
enableObservation();
|
|
2565
|
-
} else {
|
|
2566
|
-
observe(chainHooks('mutationObserverCallbacks', {
|
|
2567
|
-
observeMutationsRoot
|
|
2568
|
-
}));
|
|
2569
|
-
}
|
|
2570
|
-
}
|
|
2571
|
-
};
|
|
2572
|
-
}
|
|
2573
|
-
};
|
|
2574
|
-
|
|
2575
|
-
const parseTransformString = transformString => {
|
|
2576
|
-
let transform = {
|
|
2577
|
-
size: 16,
|
|
2578
|
-
x: 0,
|
|
2579
|
-
y: 0,
|
|
2580
|
-
flipX: false,
|
|
2581
|
-
flipY: false,
|
|
2582
|
-
rotate: 0
|
|
2583
|
-
};
|
|
2584
|
-
return transformString.toLowerCase().split(' ').reduce((acc, n) => {
|
|
2585
|
-
const parts = n.toLowerCase().split('-');
|
|
2586
|
-
const first = parts[0];
|
|
2587
|
-
let rest = parts.slice(1).join('-');
|
|
2588
|
-
if (first && rest === 'h') {
|
|
2589
|
-
acc.flipX = true;
|
|
2590
|
-
return acc;
|
|
2591
|
-
}
|
|
2592
|
-
if (first && rest === 'v') {
|
|
2593
|
-
acc.flipY = true;
|
|
2594
|
-
return acc;
|
|
2595
|
-
}
|
|
2596
|
-
rest = parseFloat(rest);
|
|
2597
|
-
if (isNaN(rest)) {
|
|
2598
|
-
return acc;
|
|
198
|
+
/* Loading state */
|
|
199
|
+
.loading {
|
|
200
|
+
opacity: 0.5;
|
|
2599
201
|
}
|
|
2600
|
-
switch (first) {
|
|
2601
|
-
case 'grow':
|
|
2602
|
-
acc.size = acc.size + rest;
|
|
2603
|
-
break;
|
|
2604
|
-
case 'shrink':
|
|
2605
|
-
acc.size = acc.size - rest;
|
|
2606
|
-
break;
|
|
2607
|
-
case 'left':
|
|
2608
|
-
acc.x = acc.x - rest;
|
|
2609
|
-
break;
|
|
2610
|
-
case 'right':
|
|
2611
|
-
acc.x = acc.x + rest;
|
|
2612
|
-
break;
|
|
2613
|
-
case 'up':
|
|
2614
|
-
acc.y = acc.y - rest;
|
|
2615
|
-
break;
|
|
2616
|
-
case 'down':
|
|
2617
|
-
acc.y = acc.y + rest;
|
|
2618
|
-
break;
|
|
2619
|
-
case 'rotate':
|
|
2620
|
-
acc.rotate = acc.rotate + rest;
|
|
2621
|
-
break;
|
|
2622
|
-
}
|
|
2623
|
-
return acc;
|
|
2624
|
-
}, transform);
|
|
2625
|
-
};
|
|
2626
|
-
var PowerTransforms = {
|
|
2627
|
-
mixout() {
|
|
2628
|
-
return {
|
|
2629
|
-
parse: {
|
|
2630
|
-
transform: transformString => {
|
|
2631
|
-
return parseTransformString(transformString);
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
};
|
|
2635
|
-
},
|
|
2636
|
-
hooks() {
|
|
2637
|
-
return {
|
|
2638
|
-
parseNodeAttributes(accumulator, node) {
|
|
2639
|
-
const transformString = node.getAttribute('data-fa-transform');
|
|
2640
|
-
if (transformString) {
|
|
2641
|
-
accumulator.transform = parseTransformString(transformString);
|
|
2642
|
-
}
|
|
2643
|
-
return accumulator;
|
|
2644
|
-
}
|
|
2645
|
-
};
|
|
2646
|
-
},
|
|
2647
|
-
provides(providers) {
|
|
2648
|
-
providers.generateAbstractTransformGrouping = function (_ref) {
|
|
2649
|
-
let {
|
|
2650
|
-
main,
|
|
2651
|
-
transform,
|
|
2652
|
-
containerWidth,
|
|
2653
|
-
iconWidth
|
|
2654
|
-
} = _ref;
|
|
2655
|
-
const outer = {
|
|
2656
|
-
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
2657
|
-
};
|
|
2658
|
-
const innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
2659
|
-
const innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
2660
|
-
const innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
2661
|
-
const inner = {
|
|
2662
|
-
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
2663
|
-
};
|
|
2664
|
-
const path = {
|
|
2665
|
-
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
2666
|
-
};
|
|
2667
|
-
const operations = {
|
|
2668
|
-
outer,
|
|
2669
|
-
inner,
|
|
2670
|
-
path
|
|
2671
|
-
};
|
|
2672
|
-
return {
|
|
2673
|
-
tag: 'g',
|
|
2674
|
-
attributes: _objectSpread2({}, operations.outer),
|
|
2675
|
-
children: [{
|
|
2676
|
-
tag: 'g',
|
|
2677
|
-
attributes: _objectSpread2({}, operations.inner),
|
|
2678
|
-
children: [{
|
|
2679
|
-
tag: main.icon.tag,
|
|
2680
|
-
children: main.icon.children,
|
|
2681
|
-
attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
|
|
2682
|
-
}]
|
|
2683
|
-
}]
|
|
2684
|
-
};
|
|
2685
|
-
};
|
|
2686
|
-
}
|
|
2687
|
-
};
|
|
2688
202
|
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
if (abstract.attributes && (abstract.attributes.fill || force)) {
|
|
2698
|
-
abstract.attributes.fill = 'black';
|
|
2699
|
-
}
|
|
2700
|
-
return abstract;
|
|
2701
|
-
}
|
|
2702
|
-
function deGroup(abstract) {
|
|
2703
|
-
if (abstract.tag === 'g') {
|
|
2704
|
-
return abstract.children;
|
|
2705
|
-
} else {
|
|
2706
|
-
return [abstract];
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
var Masks = {
|
|
2710
|
-
hooks() {
|
|
2711
|
-
return {
|
|
2712
|
-
parseNodeAttributes(accumulator, node) {
|
|
2713
|
-
const maskData = node.getAttribute('data-fa-mask');
|
|
2714
|
-
const mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(i => i.trim()));
|
|
2715
|
-
if (!mask.prefix) {
|
|
2716
|
-
mask.prefix = getDefaultUsablePrefix();
|
|
2717
|
-
}
|
|
2718
|
-
accumulator.mask = mask;
|
|
2719
|
-
accumulator.maskId = node.getAttribute('data-fa-mask-id');
|
|
2720
|
-
return accumulator;
|
|
2721
|
-
}
|
|
2722
|
-
};
|
|
2723
|
-
},
|
|
2724
|
-
provides(providers) {
|
|
2725
|
-
providers.generateAbstractMask = function (_ref) {
|
|
2726
|
-
let {
|
|
2727
|
-
children,
|
|
2728
|
-
attributes,
|
|
2729
|
-
main,
|
|
2730
|
-
mask,
|
|
2731
|
-
maskId: explicitMaskId,
|
|
2732
|
-
transform
|
|
2733
|
-
} = _ref;
|
|
2734
|
-
const {
|
|
2735
|
-
width: mainWidth,
|
|
2736
|
-
icon: mainPath
|
|
2737
|
-
} = main;
|
|
2738
|
-
const {
|
|
2739
|
-
width: maskWidth,
|
|
2740
|
-
icon: maskPath
|
|
2741
|
-
} = mask;
|
|
2742
|
-
const trans = transformForSvg({
|
|
2743
|
-
transform,
|
|
2744
|
-
containerWidth: maskWidth,
|
|
2745
|
-
iconWidth: mainWidth
|
|
2746
|
-
});
|
|
2747
|
-
const maskRect = {
|
|
2748
|
-
tag: 'rect',
|
|
2749
|
-
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
2750
|
-
fill: 'white'
|
|
2751
|
-
})
|
|
2752
|
-
};
|
|
2753
|
-
const maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
2754
|
-
children: mainPath.children.map(fillBlack)
|
|
2755
|
-
} : {};
|
|
2756
|
-
const maskInnerGroup = {
|
|
2757
|
-
tag: 'g',
|
|
2758
|
-
attributes: _objectSpread2({}, trans.inner),
|
|
2759
|
-
children: [fillBlack(_objectSpread2({
|
|
2760
|
-
tag: mainPath.tag,
|
|
2761
|
-
attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
|
|
2762
|
-
}, maskInnerGroupChildrenMixin))]
|
|
2763
|
-
};
|
|
2764
|
-
const maskOuterGroup = {
|
|
2765
|
-
tag: 'g',
|
|
2766
|
-
attributes: _objectSpread2({}, trans.outer),
|
|
2767
|
-
children: [maskInnerGroup]
|
|
2768
|
-
};
|
|
2769
|
-
const maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
2770
|
-
const clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
2771
|
-
const maskTag = {
|
|
2772
|
-
tag: 'mask',
|
|
2773
|
-
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
2774
|
-
id: maskId,
|
|
2775
|
-
maskUnits: 'userSpaceOnUse',
|
|
2776
|
-
maskContentUnits: 'userSpaceOnUse'
|
|
2777
|
-
}),
|
|
2778
|
-
children: [maskRect, maskOuterGroup]
|
|
2779
|
-
};
|
|
2780
|
-
const defs = {
|
|
2781
|
-
tag: 'defs',
|
|
2782
|
-
children: [{
|
|
2783
|
-
tag: 'clipPath',
|
|
2784
|
-
attributes: {
|
|
2785
|
-
id: clipId
|
|
2786
|
-
},
|
|
2787
|
-
children: deGroup(maskPath)
|
|
2788
|
-
}, maskTag]
|
|
2789
|
-
};
|
|
2790
|
-
children.push(defs, {
|
|
2791
|
-
tag: 'rect',
|
|
2792
|
-
attributes: _objectSpread2({
|
|
2793
|
-
fill: 'currentColor',
|
|
2794
|
-
'clip-path': "url(#".concat(clipId, ")"),
|
|
2795
|
-
mask: "url(#".concat(maskId, ")")
|
|
2796
|
-
}, ALL_SPACE)
|
|
2797
|
-
});
|
|
2798
|
-
return {
|
|
2799
|
-
children,
|
|
2800
|
-
attributes
|
|
2801
|
-
};
|
|
2802
|
-
};
|
|
2803
|
-
}
|
|
2804
|
-
};
|
|
2805
|
-
|
|
2806
|
-
var MissingIconIndicator = {
|
|
2807
|
-
provides(providers) {
|
|
2808
|
-
let reduceMotion = false;
|
|
2809
|
-
if (WINDOW.matchMedia) {
|
|
2810
|
-
reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
203
|
+
/* Error state - show placeholder */
|
|
204
|
+
.error {
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
background: var(--icon-error-bg, #f3f4f6);
|
|
209
|
+
color: var(--icon-error-color, #6b7280);
|
|
210
|
+
border-radius: 2px;
|
|
2811
211
|
}
|
|
2812
|
-
providers.missingIconAbstract = function () {
|
|
2813
|
-
const gChildren = [];
|
|
2814
|
-
const FILL = {
|
|
2815
|
-
fill: 'currentColor'
|
|
2816
|
-
};
|
|
2817
|
-
const ANIMATION_BASE = {
|
|
2818
|
-
attributeType: 'XML',
|
|
2819
|
-
repeatCount: 'indefinite',
|
|
2820
|
-
dur: '2s'
|
|
2821
|
-
};
|
|
2822
|
-
|
|
2823
|
-
// Ring
|
|
2824
|
-
gChildren.push({
|
|
2825
|
-
tag: 'path',
|
|
2826
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2827
|
-
d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'
|
|
2828
|
-
})
|
|
2829
|
-
});
|
|
2830
|
-
const OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
2831
|
-
attributeName: 'opacity'
|
|
2832
|
-
});
|
|
2833
|
-
const dot = {
|
|
2834
|
-
tag: 'circle',
|
|
2835
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2836
|
-
cx: '256',
|
|
2837
|
-
cy: '364',
|
|
2838
|
-
r: '28'
|
|
2839
|
-
}),
|
|
2840
|
-
children: []
|
|
2841
|
-
};
|
|
2842
|
-
if (!reduceMotion) {
|
|
2843
|
-
dot.children.push({
|
|
2844
|
-
tag: 'animate',
|
|
2845
|
-
attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
2846
|
-
attributeName: 'r',
|
|
2847
|
-
values: '28;14;28;28;14;28;'
|
|
2848
|
-
})
|
|
2849
|
-
}, {
|
|
2850
|
-
tag: 'animate',
|
|
2851
|
-
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2852
|
-
values: '1;0;1;1;0;1;'
|
|
2853
|
-
})
|
|
2854
|
-
});
|
|
2855
|
-
}
|
|
2856
|
-
gChildren.push(dot);
|
|
2857
|
-
gChildren.push({
|
|
2858
|
-
tag: 'path',
|
|
2859
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2860
|
-
opacity: '1',
|
|
2861
|
-
d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'
|
|
2862
|
-
}),
|
|
2863
|
-
children: reduceMotion ? [] : [{
|
|
2864
|
-
tag: 'animate',
|
|
2865
|
-
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2866
|
-
values: '1;0;0;0;0;1;'
|
|
2867
|
-
})
|
|
2868
|
-
}]
|
|
2869
|
-
});
|
|
2870
|
-
if (!reduceMotion) {
|
|
2871
|
-
// Exclamation
|
|
2872
|
-
gChildren.push({
|
|
2873
|
-
tag: 'path',
|
|
2874
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2875
|
-
opacity: '0',
|
|
2876
|
-
d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'
|
|
2877
|
-
}),
|
|
2878
|
-
children: [{
|
|
2879
|
-
tag: 'animate',
|
|
2880
|
-
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2881
|
-
values: '0;0;1;1;0;0;'
|
|
2882
|
-
})
|
|
2883
|
-
}]
|
|
2884
|
-
});
|
|
2885
|
-
}
|
|
2886
|
-
return {
|
|
2887
|
-
tag: 'g',
|
|
2888
|
-
attributes: {
|
|
2889
|
-
'class': 'missing'
|
|
2890
|
-
},
|
|
2891
|
-
children: gChildren
|
|
2892
|
-
};
|
|
2893
|
-
};
|
|
2894
|
-
}
|
|
2895
|
-
};
|
|
2896
|
-
|
|
2897
|
-
var SvgSymbols = {
|
|
2898
|
-
hooks() {
|
|
2899
|
-
return {
|
|
2900
|
-
parseNodeAttributes(accumulator, node) {
|
|
2901
|
-
const symbolData = node.getAttribute('data-fa-symbol');
|
|
2902
|
-
const symbol = symbolData === null ? false : symbolData === '' ? true : symbolData;
|
|
2903
|
-
accumulator['symbol'] = symbol;
|
|
2904
|
-
return accumulator;
|
|
2905
|
-
}
|
|
2906
|
-
};
|
|
2907
|
-
}
|
|
2908
|
-
};
|
|
2909
|
-
|
|
2910
|
-
var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
|
|
2911
|
-
|
|
2912
|
-
registerPlugins(plugins, {
|
|
2913
|
-
mixoutsTo: api
|
|
2914
|
-
});
|
|
2915
|
-
api.noAuto;
|
|
2916
|
-
api.config;
|
|
2917
|
-
const library$1 = api.library;
|
|
2918
|
-
api.dom;
|
|
2919
|
-
api.parse;
|
|
2920
|
-
api.findIconDefinition;
|
|
2921
|
-
api.toHtml;
|
|
2922
|
-
const icon = api.icon;
|
|
2923
|
-
api.layer;
|
|
2924
|
-
api.text;
|
|
2925
|
-
api.counter;
|
|
2926
212
|
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
*/
|
|
2932
|
-
const faUser = {
|
|
2933
|
-
prefix: 'fas',
|
|
2934
|
-
iconName: 'user',
|
|
2935
|
-
icon: [448, 512, [128100, 62144], "f007", "M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"]
|
|
2936
|
-
};
|
|
2937
|
-
const faHeart = {
|
|
2938
|
-
prefix: 'fas',
|
|
2939
|
-
iconName: 'heart',
|
|
2940
|
-
icon: [512, 512, [128153, 128154, 128155, 128156, 128420, 129293, 129294, 129505, 9829, 10084, 61578], "f004", "M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"]
|
|
2941
|
-
};
|
|
2942
|
-
const faHouse = {
|
|
2943
|
-
prefix: 'fas',
|
|
2944
|
-
iconName: 'house',
|
|
2945
|
-
icon: [576, 512, [127968, 63498, 63500, "home", "home-alt", "home-lg-alt"], "f015", "M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]
|
|
2946
|
-
};
|
|
2947
|
-
const faHome = faHouse;
|
|
2948
|
-
const faXmark = {
|
|
2949
|
-
prefix: 'fas',
|
|
2950
|
-
iconName: 'xmark',
|
|
2951
|
-
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]
|
|
2952
|
-
};
|
|
2953
|
-
|
|
2954
|
-
library$1.add(faUser, faHeart, faHome, faXmark);
|
|
2955
|
-
class PlusIcon extends i$1 {
|
|
2956
|
-
constructor() {
|
|
2957
|
-
super();
|
|
2958
|
-
this.prefix = 'fas';
|
|
2959
|
-
}
|
|
2960
|
-
getIconHtml() {
|
|
2961
|
-
if (!this.iconName)
|
|
2962
|
-
return '';
|
|
2963
|
-
try {
|
|
2964
|
-
const lookup = {
|
|
2965
|
-
prefix: this.prefix,
|
|
2966
|
-
iconName: this.iconName,
|
|
2967
|
-
};
|
|
2968
|
-
const result = icon(lookup);
|
|
2969
|
-
return result ? o$1(result.html[0]) : '';
|
|
2970
|
-
}
|
|
2971
|
-
catch (error) {
|
|
2972
|
-
console.error('Icon not found:', error);
|
|
2973
|
-
return '';
|
|
2974
|
-
}
|
|
2975
|
-
}
|
|
2976
|
-
render() {
|
|
2977
|
-
return x$1 ` ${this.getIconHtml()} `;
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
PlusIcon.styles = i `
|
|
2981
|
-
:host {
|
|
2982
|
-
display: inline-block;
|
|
2983
|
-
height: fit-content;
|
|
2984
|
-
width: fit-content;
|
|
2985
|
-
}
|
|
2986
|
-
svg {
|
|
2987
|
-
height: 1em;
|
|
2988
|
-
width: 1em;
|
|
2989
|
-
vertical-align: initial;
|
|
213
|
+
.error::before {
|
|
214
|
+
content: '?';
|
|
215
|
+
font-size: 0.75em;
|
|
216
|
+
font-weight: bold;
|
|
2990
217
|
}
|
|
2991
218
|
`;
|
|
2992
219
|
__decorate([
|
|
2993
|
-
n({ type: String })
|
|
220
|
+
n({ type: String, attribute: 'icon-name' })
|
|
2994
221
|
], PlusIcon.prototype, "iconName", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
n({ type: String, attribute: 'icon-style' })
|
|
224
|
+
], PlusIcon.prototype, "iconStyle", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
n({ type: String })
|
|
227
|
+
], PlusIcon.prototype, "size", void 0);
|
|
2995
228
|
__decorate([
|
|
2996
229
|
n({ type: String })
|
|
2997
|
-
], PlusIcon.prototype, "
|
|
230
|
+
], PlusIcon.prototype, "label", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
r()
|
|
233
|
+
], PlusIcon.prototype, "svgContent", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
r()
|
|
236
|
+
], PlusIcon.prototype, "isLoading", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
r()
|
|
239
|
+
], PlusIcon.prototype, "hasError", void 0);
|
|
2998
240
|
|
|
2999
241
|
export { PlusIcon, PlusIcon as default };
|