@xplor-education/core-stencil-components 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.js +1 -1
- package/components/index.js.map +1 -1
- package/components/{p-B1W2qj2l.js → p-B3zR7peH.js} +4 -4
- package/components/p-B3zR7peH.js.map +1 -0
- package/components/{p-Ddr35stE.js → p-BRWe4TXp.js} +65 -5
- package/components/p-BRWe4TXp.js.map +1 -0
- package/components/{p-CBSi5kQB.js → p-Bs_ocvfe.js} +7 -3
- package/components/p-Bs_ocvfe.js.map +1 -0
- package/components/{p-CTD6SyTD.js → p-D4jVa8dE.js} +20 -4
- package/components/p-D4jVa8dE.js.map +1 -0
- package/components/{p-x30CgLRv.js → p-DURNLP66.js} +71 -6
- package/components/p-DURNLP66.js.map +1 -0
- package/components/{p-BK_ATKuB.js → p-DxxjL3sU.js} +3 -3
- package/components/{p-BK_ATKuB.js.map → p-DxxjL3sU.js.map} +1 -1
- package/components/xplor-alert-dialog.js +60 -3
- package/components/xplor-alert-dialog.js.map +1 -1
- package/components/xplor-assistant.js +3 -3
- package/components/xplor-assistant.js.map +1 -1
- package/components/xplor-autocomplete.js +15 -9
- package/components/xplor-autocomplete.js.map +1 -1
- package/components/xplor-avatar-and-name.js +1 -1
- package/components/xplor-avatar.js +1 -1
- package/components/xplor-btn-back-to-parent.js +7 -2
- package/components/xplor-btn-back-to-parent.js.map +1 -1
- package/components/xplor-btn-icon.js +3 -2
- package/components/xplor-btn-icon.js.map +1 -1
- package/components/xplor-btn-menu.js +103 -6
- package/components/xplor-btn-menu.js.map +1 -1
- package/components/xplor-btn-tooltip.js +2 -2
- package/components/xplor-button.js +1 -1
- package/components/xplor-chat-widget.js +2 -2
- package/components/xplor-checkbox.js +3 -1
- package/components/xplor-checkbox.js.map +1 -1
- package/components/xplor-combobox.js +20 -10
- package/components/xplor-combobox.js.map +1 -1
- package/components/xplor-datatable.js +10 -4
- package/components/xplor-datatable.js.map +1 -1
- package/components/xplor-date-picker.js +9 -5
- package/components/xplor-date-picker.js.map +1 -1
- package/components/xplor-drag-and-drop-input.js +43 -5
- package/components/xplor-drag-and-drop-input.js.map +1 -1
- package/components/xplor-dropdown.js +1 -1
- package/components/xplor-expansion-panel.js +4 -4
- package/components/xplor-expansion-panel.js.map +1 -1
- package/components/xplor-expansion-panels.js +1 -1
- package/components/xplor-expansion-panels.js.map +1 -1
- package/components/xplor-file-upload.js +2 -2
- package/components/xplor-file-upload.js.map +1 -1
- package/components/xplor-inline-checkbox.js +2 -2
- package/components/xplor-inline-date-picker.js +1 -1
- package/components/xplor-inline-switch.js +1 -1
- package/components/xplor-input-file.js +3 -1
- package/components/xplor-input-file.js.map +1 -1
- package/components/xplor-input-search.js +4 -2
- package/components/xplor-input-search.js.map +1 -1
- package/components/xplor-input-select.js +127 -7
- package/components/xplor-input-select.js.map +1 -1
- package/components/xplor-input-send.js +3 -3
- package/components/xplor-input-send.js.map +1 -1
- package/components/xplor-input-text-area.js +6 -2
- package/components/xplor-input-text-area.js.map +1 -1
- package/components/xplor-input-text-secondary.js +6 -2
- package/components/xplor-input-text-secondary.js.map +1 -1
- package/components/xplor-input-text.js +6 -2
- package/components/xplor-input-text.js.map +1 -1
- package/components/xplor-input-title.js +7 -2
- package/components/xplor-input-title.js.map +1 -1
- package/components/xplor-links.js +5 -2
- package/components/xplor-links.js.map +1 -1
- package/components/xplor-modal-persistent.js +2 -2
- package/components/xplor-modal.js +1 -1
- package/components/xplor-nav-tabs.js +41 -3
- package/components/xplor-nav-tabs.js.map +1 -1
- package/components/xplor-radio-btn.d.ts +11 -0
- package/components/xplor-radio-btn.js +131 -0
- package/components/xplor-radio-btn.js.map +1 -0
- package/components/xplor-section-card.js +2 -2
- package/components/xplor-section-card.js.map +1 -1
- package/components/xplor-section-heading.js +9 -3
- package/components/xplor-section-heading.js.map +1 -1
- package/components/xplor-table.js +14 -9
- package/components/xplor-table.js.map +1 -1
- package/components/xplor-text-bubble.js +2 -2
- package/components/xplor-text-field.js +2 -2
- package/components/xplor-time-picker.js +6 -6
- package/components/xplor-tooltip.js +1 -1
- package/dist/cjs/{index-Bc5o_4vY.js → index-BjAapk2n.js} +5 -5
- package/dist/cjs/index-BjAapk2n.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xplor-alert-dialog_57.cjs.entry.js → xplor-alert-dialog_58.cjs.entry.js} +747 -108
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +1 -0
- package/dist/cjs/xplor-component-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xplor-alert-dialog/xplor-alert-dialog.js +85 -1
- package/dist/collection/components/xplor-alert-dialog/xplor-alert-dialog.js.map +1 -1
- package/dist/collection/components/xplor-assistant/internal/AssistantInput.js +1 -1
- package/dist/collection/components/xplor-assistant/internal/AssistantInput.js.map +1 -1
- package/dist/collection/components/xplor-assistant/xplor-assistant.js +1 -1
- package/dist/collection/components/xplor-assistant/xplor-assistant.js.map +1 -1
- package/dist/collection/components/xplor-autocomplete/xplor-autocomplete.js +33 -9
- package/dist/collection/components/xplor-autocomplete/xplor-autocomplete.js.map +1 -1
- package/dist/collection/components/xplor-avatar/xplor-avatar.js +2 -2
- package/dist/collection/components/xplor-avatar/xplor-avatar.js.map +1 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js +25 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js.map +1 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js +20 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js.map +1 -1
- package/dist/collection/components/xplor-btn-menu/xplor-btn-menu.js +129 -5
- package/dist/collection/components/xplor-btn-menu/xplor-btn-menu.js.map +1 -1
- package/dist/collection/components/xplor-button/xplor-button.js +42 -1
- package/dist/collection/components/xplor-button/xplor-button.js.map +1 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js +3 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js.map +1 -1
- package/dist/collection/components/xplor-combobox/xplor-combobox.js +38 -10
- package/dist/collection/components/xplor-combobox/xplor-combobox.js.map +1 -1
- package/dist/collection/components/xplor-datatable/xplor-datatable.js +10 -4
- package/dist/collection/components/xplor-datatable/xplor-datatable.js.map +1 -1
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js +8 -4
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js.map +1 -1
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +125 -21
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +79 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/collection/components/xplor-dropdown/xplor-dropdown.js +1 -1
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js +4 -4
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js.map +1 -1
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js +1 -1
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js.map +1 -1
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js +2 -2
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js.map +1 -1
- package/dist/collection/components/xplor-inline-checkbox/xplor-inline-checkbox.js +2 -2
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js +77 -3
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js.map +1 -1
- package/dist/collection/components/xplor-inline-switch/xplor-inline-switch.js +1 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js +3 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js.map +1 -1
- package/dist/collection/components/xplor-input-search/xplor-input-search.js +4 -2
- package/dist/collection/components/xplor-input-search/xplor-input-search.js.map +1 -1
- package/dist/collection/components/xplor-input-select/xplor-input-select.css +1 -6
- package/dist/collection/components/xplor-input-select/xplor-input-select.js +152 -5
- package/dist/collection/components/xplor-input-select/xplor-input-select.js.map +1 -1
- package/dist/collection/components/xplor-input-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-send/xplor-input-send.js.map +1 -1
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +6 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js.map +1 -1
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +6 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js.map +1 -1
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js +6 -2
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js.map +1 -1
- package/dist/collection/components/xplor-input-title/xplor-input-title.js +25 -1
- package/dist/collection/components/xplor-input-title/xplor-input-title.js.map +1 -1
- package/dist/collection/components/xplor-links/xplor-links.js +25 -1
- package/dist/collection/components/xplor-links/xplor-links.js.map +1 -1
- package/dist/collection/components/xplor-modal/xplor-modal.js +88 -1
- package/dist/collection/components/xplor-modal/xplor-modal.js.map +1 -1
- package/dist/collection/components/xplor-modal-persistent/xplor-modal-persistent.js +1 -1
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js +49 -2
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js.map +1 -1
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.css +386 -0
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js +275 -0
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js.map +1 -0
- package/dist/collection/components/xplor-section-card/xplor-section-card.js +2 -2
- package/dist/collection/components/xplor-section-card/xplor-section-card.js.map +1 -1
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js +27 -2
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js.map +1 -1
- package/dist/collection/components/xplor-table/xplor-table.js +14 -9
- package/dist/collection/components/xplor-table/xplor-table.js.map +1 -1
- package/dist/collection/components/xplor-text-bubble/xplor-text-bubble.js +2 -2
- package/dist/collection/components/xplor-text-field/xplor-text-field.js +2 -2
- package/dist/collection/components/xplor-time-picker/xplor-time-picker.js +6 -6
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js +18 -2
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-BHdeGt6k.js → p--zhT6rvJ.js} +4 -4
- package/dist/components/p--zhT6rvJ.js.map +1 -0
- package/dist/components/{p-DKh6y3GY.js → p-04oMLTZR.js} +65 -5
- package/dist/components/p-04oMLTZR.js.map +1 -0
- package/dist/components/{p-DIv_A5Gj.js → p-B5rS_jjI.js} +7 -3
- package/dist/components/p-B5rS_jjI.js.map +1 -0
- package/dist/components/{p-4l9DAhAo.js → p-DbQ6ZNvh.js} +20 -4
- package/dist/components/p-DbQ6ZNvh.js.map +1 -0
- package/dist/components/{p-BIFlTsO8.js → p-Dh0wQJt6.js} +71 -6
- package/dist/components/p-Dh0wQJt6.js.map +1 -0
- package/dist/components/{p-CJGP2_5k.js → p-oOSnPjGy.js} +3 -3
- package/dist/components/{p-CJGP2_5k.js.map → p-oOSnPjGy.js.map} +1 -1
- package/dist/components/xplor-alert-dialog.js +60 -3
- package/dist/components/xplor-alert-dialog.js.map +1 -1
- package/dist/components/xplor-assistant.js +3 -3
- package/dist/components/xplor-assistant.js.map +1 -1
- package/dist/components/xplor-autocomplete.js +15 -9
- package/dist/components/xplor-autocomplete.js.map +1 -1
- package/dist/components/xplor-avatar-and-name.js +1 -1
- package/dist/components/xplor-avatar.js +1 -1
- package/dist/components/xplor-btn-back-to-parent.js +7 -2
- package/dist/components/xplor-btn-back-to-parent.js.map +1 -1
- package/dist/components/xplor-btn-icon.js +3 -2
- package/dist/components/xplor-btn-icon.js.map +1 -1
- package/dist/components/xplor-btn-menu.js +103 -6
- package/dist/components/xplor-btn-menu.js.map +1 -1
- package/dist/components/xplor-btn-tooltip.js +2 -2
- package/dist/components/xplor-button.js +1 -1
- package/dist/components/xplor-chat-widget.js +2 -2
- package/dist/components/xplor-checkbox.js +3 -1
- package/dist/components/xplor-checkbox.js.map +1 -1
- package/dist/components/xplor-combobox.js +20 -10
- package/dist/components/xplor-combobox.js.map +1 -1
- package/dist/components/xplor-datatable.js +10 -4
- package/dist/components/xplor-datatable.js.map +1 -1
- package/dist/components/xplor-date-picker.js +9 -5
- package/dist/components/xplor-date-picker.js.map +1 -1
- package/dist/components/xplor-drag-and-drop-input.js +43 -5
- package/dist/components/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/components/xplor-dropdown.js +1 -1
- package/dist/components/xplor-expansion-panel.js +4 -4
- package/dist/components/xplor-expansion-panel.js.map +1 -1
- package/dist/components/xplor-expansion-panels.js +1 -1
- package/dist/components/xplor-expansion-panels.js.map +1 -1
- package/dist/components/xplor-file-upload.js +2 -2
- package/dist/components/xplor-file-upload.js.map +1 -1
- package/dist/components/xplor-inline-checkbox.js +2 -2
- package/dist/components/xplor-inline-date-picker.js +1 -1
- package/dist/components/xplor-inline-switch.js +1 -1
- package/dist/components/xplor-input-file.js +3 -1
- package/dist/components/xplor-input-file.js.map +1 -1
- package/dist/components/xplor-input-search.js +4 -2
- package/dist/components/xplor-input-search.js.map +1 -1
- package/dist/components/xplor-input-select.js +127 -7
- package/dist/components/xplor-input-select.js.map +1 -1
- package/dist/components/xplor-input-send.js +3 -3
- package/dist/components/xplor-input-send.js.map +1 -1
- package/dist/components/xplor-input-text-area.js +6 -2
- package/dist/components/xplor-input-text-area.js.map +1 -1
- package/dist/components/xplor-input-text-secondary.js +6 -2
- package/dist/components/xplor-input-text-secondary.js.map +1 -1
- package/dist/components/xplor-input-text.js +6 -2
- package/dist/components/xplor-input-text.js.map +1 -1
- package/dist/components/xplor-input-title.js +7 -2
- package/dist/components/xplor-input-title.js.map +1 -1
- package/dist/components/xplor-links.js +5 -2
- package/dist/components/xplor-links.js.map +1 -1
- package/dist/components/xplor-modal-persistent.js +2 -2
- package/dist/components/xplor-modal.js +1 -1
- package/dist/components/xplor-nav-tabs.js +41 -3
- package/dist/components/xplor-nav-tabs.js.map +1 -1
- package/dist/components/xplor-radio-btn.d.ts +11 -0
- package/dist/components/xplor-radio-btn.js +132 -0
- package/dist/components/xplor-radio-btn.js.map +1 -0
- package/dist/components/xplor-section-card.js +2 -2
- package/dist/components/xplor-section-card.js.map +1 -1
- package/dist/components/xplor-section-heading.js +9 -3
- package/dist/components/xplor-section-heading.js.map +1 -1
- package/dist/components/xplor-table.js +14 -9
- package/dist/components/xplor-table.js.map +1 -1
- package/dist/components/xplor-text-bubble.js +2 -2
- package/dist/components/xplor-text-field.js +2 -2
- package/dist/components/xplor-time-picker.js +6 -6
- package/dist/components/xplor-tooltip.js +1 -1
- package/dist/esm/{index-Zkk2NJif.js → index-KRfMjDC2.js} +5 -5
- package/dist/esm/index-KRfMjDC2.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xplor-alert-dialog_57.entry.js → xplor-alert-dialog_58.entry.js} +747 -109
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +1 -0
- package/dist/esm/xplor-component-library.js +3 -3
- package/dist/hydrate/index.js +798 -120
- package/dist/hydrate/index.mjs +798 -120
- package/dist/types/components/xplor-alert-dialog/xplor-alert-dialog.d.ts +11 -0
- package/dist/types/components/xplor-autocomplete/xplor-autocomplete.d.ts +4 -0
- package/dist/types/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.d.ts +4 -0
- package/dist/types/components/xplor-btn-icon/xplor-btn-icon.d.ts +4 -0
- package/dist/types/components/xplor-btn-menu/xplor-btn-menu.d.ts +19 -0
- package/dist/types/components/xplor-button/xplor-button.d.ts +4 -0
- package/dist/types/components/xplor-checkbox/xplor-checkbox.d.ts +1 -0
- package/dist/types/components/xplor-combobox/xplor-combobox.d.ts +4 -0
- package/dist/types/components/xplor-date-picker/xplor-date-picker.d.ts +3 -0
- package/dist/types/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.d.ts +11 -0
- package/dist/types/components/xplor-inline-date-picker/xplor-inline-date-picker.d.ts +3 -0
- package/dist/types/components/xplor-input-file/xplor-input-file.d.ts +1 -0
- package/dist/types/components/xplor-input-search/xplor-input-search.d.ts +1 -0
- package/dist/types/components/xplor-input-select/xplor-input-select.d.ts +15 -0
- package/dist/types/components/xplor-input-text/xplor-input-text.d.ts +3 -0
- package/dist/types/components/xplor-input-text-area/xplor-input-text-area.d.ts +3 -0
- package/dist/types/components/xplor-input-text-secondary/xplor-input-text-secondary.d.ts +3 -0
- package/dist/types/components/xplor-input-title/xplor-input-title.d.ts +4 -0
- package/dist/types/components/xplor-links/xplor-links.d.ts +2 -0
- package/dist/types/components/xplor-modal/xplor-modal.d.ts +11 -0
- package/dist/types/components/xplor-nav-tabs/xplor-nav-tabs.d.ts +2 -0
- package/dist/types/components/xplor-radio-btn/xplor-radio-btn.d.ts +35 -0
- package/dist/types/components/xplor-section-heading/xplor-section-heading.d.ts +4 -0
- package/dist/types/components/xplor-tooltip/xplor-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +230 -2
- package/dist/xplor-component-library/p-0df9ea5d.entry.js +2 -0
- package/dist/xplor-component-library/p-0df9ea5d.entry.js.map +1 -0
- package/dist/xplor-component-library/{p-Zkk2NJif.js → p-KRfMjDC2.js} +3 -3
- package/dist/xplor-component-library/p-KRfMjDC2.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.css +1 -1
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +1 -1
- package/components/p-B1W2qj2l.js.map +0 -1
- package/components/p-CBSi5kQB.js.map +0 -1
- package/components/p-CTD6SyTD.js.map +0 -1
- package/components/p-Ddr35stE.js.map +0 -1
- package/components/p-x30CgLRv.js.map +0 -1
- package/dist/cjs/index-Bc5o_4vY.js.map +0 -1
- package/dist/cjs/xplor-alert-dialog_57.cjs.entry.js.map +0 -1
- package/dist/components/p-4l9DAhAo.js.map +0 -1
- package/dist/components/p-BHdeGt6k.js.map +0 -1
- package/dist/components/p-BIFlTsO8.js.map +0 -1
- package/dist/components/p-DIv_A5Gj.js.map +0 -1
- package/dist/components/p-DKh6y3GY.js.map +0 -1
- package/dist/esm/index-Zkk2NJif.js.map +0 -1
- package/dist/esm/xplor-alert-dialog_57.entry.js.map +0 -1
- package/dist/xplor-component-library/p-25fa8553.entry.js +0 -2
- package/dist/xplor-component-library/p-25fa8553.entry.js.map +0 -1
- package/dist/xplor-component-library/p-Zkk2NJif.js.map +0 -1
|
@@ -16,8 +16,8 @@ const XplorAvatar = /*@__PURE__*/ proxyCustomElement(class XplorAvatar extends H
|
|
|
16
16
|
className += ` xpl-avatar--${this.size}`;
|
|
17
17
|
if (this.color)
|
|
18
18
|
className += ` xpl-avatar--${this.color}`;
|
|
19
|
-
const inner = (h("div", { key: '2e2722f2649108b7fdc3fd51375e17ac47e6f1ff' }, this.src ? (h("img", { alt: this.name, src: this.src })) : (h("div", { class: "xpl-avatar__placeholder" }, h("slot", null))), this.status && h("div", { key: '
|
|
20
|
-
return (h(Host, { key: '
|
|
19
|
+
const inner = (h("div", { key: '2e2722f2649108b7fdc3fd51375e17ac47e6f1ff' }, this.src ? (h("img", { alt: this.name, src: this.src })) : (h("div", { class: "xpl-avatar__placeholder" }, h("slot", null))), this.status && h("div", { key: '26fa57a9a697a110ef73434376715eda0e5134a5', class: `xpl-avatar__dot--${this.status}`, "aria-label": `Status: ${this.status}`, role: "img" })));
|
|
20
|
+
return (h(Host, { key: '9c99cec20679f0d10fbcf9dffc70877c0dc879f9' }, this.href && !this.disabled ? (h("a", { href: this.href, class: className, target: this.target }, inner)) : this.href && this.disabled ? (h("div", { class: className + ' xpl-avatar--disabled' }, inner)) : (h("div", { class: className }, inner))));
|
|
21
21
|
}
|
|
22
22
|
static get style() { return xplorAvatarCss; }
|
|
23
23
|
}, [1, "xplor-avatar", {
|
|
@@ -46,6 +46,6 @@ function defineCustomElement() {
|
|
|
46
46
|
defineCustomElement();
|
|
47
47
|
|
|
48
48
|
export { XplorAvatar as X, defineCustomElement as d };
|
|
49
|
-
//# sourceMappingURL=p
|
|
49
|
+
//# sourceMappingURL=p--zhT6rvJ.js.map
|
|
50
50
|
|
|
51
|
-
//# sourceMappingURL=p
|
|
51
|
+
//# sourceMappingURL=p--zhT6rvJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p--zhT6rvJ.js","mappings":";;AAAA,MAAM,cAAc,GAAG,mnNAAmnN;;MCO7nN,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,GAAA;;;;;AASU,QAAA,IAAQ,CAAA,QAAA,GAAa,KAAK;AAiDnC;IAhCC,MAAM,GAAA;QACJ,IAAI,SAAS,GAAG,YAAY;QAC5B,IAAI,IAAI,CAAC,IAAI;AAAE,YAAA,SAAS,IAAI,CAAgB,aAAA,EAAA,IAAI,CAAC,IAAI,EAAE;QACvD,IAAI,IAAI,CAAC,KAAK;AAAE,YAAA,SAAS,IAAI,CAAgB,aAAA,EAAA,IAAI,CAAC,KAAK,EAAE;QAEzD,MAAM,KAAK,IACT,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACG,IAAI,CAAC,GAAG,IACP,CAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAA,CAAI,KAEtC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,yBAAyB,EAAA,EAClC,CAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACT,CACP,EACA,IAAI,CAAC,MAAM,IAAI,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,oBAAoB,IAAI,CAAC,MAAM,CAAE,CAAA,EAAA,YAAA,EAAc,CAAW,QAAA,EAAA,IAAI,CAAC,MAAM,CAAA,CAAE,EAAE,IAAI,EAAC,KAAK,EAAA,CAAO,CAClH,CACP;QAED,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACF,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAC1B,CAAA,CAAA,GAAA,EAAA,EAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EACtD,EAAA,KAAK,CACJ,IACF,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,IAC5B,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,SAAS,GAAG,uBAAuB,EAAG,EAAA,KAAK,CAAO,KAE9D,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,SAAS,IAAG,KAAK,CAAO,CACrC,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-avatar/xplor-avatar.scss?tag=xplor-avatar&encapsulation=shadow","src/components/xplor-avatar/xplor-avatar.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'xplor-avatar',\n styleUrl: 'xplor-avatar.scss',\n shadow: true,\n})\nexport class XplorAvatar {\n /** Background color when there is no image src */\n @Prop() color?: 'green' | 'yellow' | 'pink' | 'primary' | 'secondary';\n // eslint-disable-next-line @stencil/required-jsdoc\n @Prop() disabled?: boolean = false;\n /** The URL if the avatar should be hyperlinked */\n @Prop() href?: string;\n /** Alt text for the image if there is an image src */\n @Prop() name?: string;\n /** Size of the avatar */\n @Prop() size?: 'md' | 'sm';\n /** The image URL */\n @Prop() src?: string;\n /** Color styles for the dot indicator to indicate varied states */\n @Prop() status?: 'active' | 'warning' | 'inactive';\n /**\n * Where to open the URL chosen for the `href` prop:\n * `_self` (default), `_blank`, `_parent`, or `_top`\n */\n @Prop() target?: string;\n\n render() {\n let className = 'xpl-avatar';\n if (this.size) className += ` xpl-avatar--${this.size}`;\n if (this.color) className += ` xpl-avatar--${this.color}`;\n\n const inner = (\n <div>\n {this.src ? (\n <img alt={this.name} src={this.src} />\n ) : (\n <div class=\"xpl-avatar__placeholder\">\n <slot></slot>\n </div>\n )}\n {this.status && <div class={`xpl-avatar__dot--${this.status}`} aria-label={`Status: ${this.status}`} role=\"img\"></div>}\n </div>\n );\n\n return (\n <Host>\n {this.href && !this.disabled ? (\n <a href={this.href} class={className} target={this.target}>\n {inner}\n </a>\n ) : this.href && this.disabled ? (\n <div class={className + ' xpl-avatar--disabled'}>{inner}</div>\n ) : (\n <div class={className}>{inner}</div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -39,6 +39,7 @@ const XplorModal = /*@__PURE__*/ proxyCustomElement(class XplorModal extends H {
|
|
|
39
39
|
* Whether to show the title area (for spacing)
|
|
40
40
|
*/
|
|
41
41
|
this.showTitle = true;
|
|
42
|
+
this.previouslyFocusedElement = null;
|
|
42
43
|
this.handleBackdropClick = () => {
|
|
43
44
|
if (!this.persistent) {
|
|
44
45
|
this.closeModal();
|
|
@@ -55,14 +56,68 @@ const XplorModal = /*@__PURE__*/ proxyCustomElement(class XplorModal extends H {
|
|
|
55
56
|
handleOpenChange(newValue) {
|
|
56
57
|
if (newValue) {
|
|
57
58
|
document.body.style.overflow = 'hidden';
|
|
59
|
+
this.previouslyFocusedElement = document.activeElement;
|
|
60
|
+
requestAnimationFrame(() => {
|
|
61
|
+
this.setInitialFocus();
|
|
62
|
+
});
|
|
58
63
|
}
|
|
59
64
|
else {
|
|
60
65
|
document.body.style.overflow = '';
|
|
66
|
+
if (this.previouslyFocusedElement) {
|
|
67
|
+
this.previouslyFocusedElement.focus();
|
|
68
|
+
this.previouslyFocusedElement = null;
|
|
69
|
+
}
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
72
|
disconnectedCallback() {
|
|
64
73
|
document.body.style.overflow = '';
|
|
65
74
|
}
|
|
75
|
+
handleKeyDown(event) {
|
|
76
|
+
if (!this.open)
|
|
77
|
+
return;
|
|
78
|
+
if (event.key === 'Escape' && !this.persistent) {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
this.closeModal();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (event.key === 'Tab') {
|
|
84
|
+
this.trapFocus(event);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
getFocusableElements() {
|
|
88
|
+
if (!this.dialogEl)
|
|
89
|
+
return [];
|
|
90
|
+
const selectors = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
91
|
+
return Array.from(this.dialogEl.querySelectorAll(selectors));
|
|
92
|
+
}
|
|
93
|
+
trapFocus(event) {
|
|
94
|
+
const focusableElements = this.getFocusableElements();
|
|
95
|
+
if (focusableElements.length === 0)
|
|
96
|
+
return;
|
|
97
|
+
const firstElement = focusableElements[0];
|
|
98
|
+
const lastElement = focusableElements[focusableElements.length - 1];
|
|
99
|
+
if (event.shiftKey) {
|
|
100
|
+
if (document.activeElement === firstElement) {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
lastElement.focus();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
if (document.activeElement === lastElement) {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
firstElement.focus();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
setInitialFocus() {
|
|
113
|
+
const focusableElements = this.getFocusableElements();
|
|
114
|
+
if (focusableElements.length > 0) {
|
|
115
|
+
focusableElements[0].focus();
|
|
116
|
+
}
|
|
117
|
+
else if (this.dialogEl) {
|
|
118
|
+
this.dialogEl.focus();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
66
121
|
render() {
|
|
67
122
|
if (!this.open) {
|
|
68
123
|
return null;
|
|
@@ -79,8 +134,12 @@ const XplorModal = /*@__PURE__*/ proxyCustomElement(class XplorModal extends H {
|
|
|
79
134
|
width: this.width,
|
|
80
135
|
maxWidth: this.maxWidth,
|
|
81
136
|
maxHeight: this.maxHeight,
|
|
82
|
-
}, onClick: this.handleCardClick }, h("button", { type: "button", class: "xplor-modal__close-btn", onClick: this.closeModal, "aria-label": "Close modal", "data-testid": "common-modal-close-button" }, "\u2715"), h("div", { class: "xplor-modal__title" }, h("slot", { name: "title" })), h("div", { class: "xplor-modal__subtitle" }, h("slot", { name: "subtitle" })), h("div", { class: bodyClasses }, this.loading ? (h("div", { class: "xplor-modal__loading"
|
|
137
|
+
}, onClick: this.handleCardClick, role: "dialog", "aria-modal": "true", "aria-labelledby": this.ariaLabel ? undefined : 'xplor-modal-title', "aria-label": this.ariaLabel, tabindex: "-1", ref: (el) => (this.dialogEl = el) }, h("button", { type: "button", class: "xplor-modal__close-btn", onClick: this.closeModal, "aria-label": "Close modal", "data-testid": "common-modal-close-button" }, "\u2715"), h("div", { class: "xplor-modal__title", id: "xplor-modal-title" }, h("slot", { name: "title" })), h("div", { class: "xplor-modal__subtitle" }, h("slot", { name: "subtitle" })), h("div", { class: bodyClasses }, this.loading ? (h("div", { class: "xplor-modal__loading", role: "status", "aria-label": "Loading" }, h("div", { class: "xplor-modal__spinner" }))) : ([
|
|
138
|
+
h("slot", { name: "body" }),
|
|
139
|
+
h("slot", null)
|
|
140
|
+
])), h("div", { class: "xplor-modal__actions" }, h("slot", { name: "actions" }))))));
|
|
83
141
|
}
|
|
142
|
+
get el() { return this; }
|
|
84
143
|
static get watchers() { return {
|
|
85
144
|
"open": ["handleOpenChange"]
|
|
86
145
|
}; }
|
|
@@ -93,8 +152,9 @@ const XplorModal = /*@__PURE__*/ proxyCustomElement(class XplorModal extends H {
|
|
|
93
152
|
"scrollable": [4],
|
|
94
153
|
"persistent": [4],
|
|
95
154
|
"loading": [4],
|
|
96
|
-
"showTitle": [4, "show-title"]
|
|
97
|
-
|
|
155
|
+
"showTitle": [4, "show-title"],
|
|
156
|
+
"ariaLabel": [1, "aria-label"]
|
|
157
|
+
}, [[0, "keydown", "handleKeyDown"]], {
|
|
98
158
|
"open": ["handleOpenChange"]
|
|
99
159
|
}]);
|
|
100
160
|
function defineCustomElement() {
|
|
@@ -113,6 +173,6 @@ function defineCustomElement() {
|
|
|
113
173
|
defineCustomElement();
|
|
114
174
|
|
|
115
175
|
export { XplorModal as X, defineCustomElement as d };
|
|
116
|
-
//# sourceMappingURL=p-
|
|
176
|
+
//# sourceMappingURL=p-04oMLTZR.js.map
|
|
117
177
|
|
|
118
|
-
//# sourceMappingURL=p-
|
|
178
|
+
//# sourceMappingURL=p-04oMLTZR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-04oMLTZR.js","mappings":";;AAAA,MAAM,aAAa,GAAG,06RAA06R;;MCOn7R,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,GAAA;;;;AAME;;AAEG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAY,KAAK;AAE9C;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAW,OAAO;AAE/B;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAW,KAAK;AAEhC;;AAEG;AACK,QAAA,IAAS,CAAA,SAAA,GAAW,KAAK;AAEjC;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI;AAElC;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAEnC;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAEhC;;AAEG;AACK,QAAA,IAAS,CAAA,SAAA,GAAY,IAAI;AAczB,QAAA,IAAwB,CAAA,wBAAA,GAAuB,IAAI;AA0EnD,QAAA,IAAmB,CAAA,mBAAA,GAAG,MAAK;AACjC,YAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,IAAI,CAAC,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AA,KAAA,EAAA,EAAA,KAAK,EAAE,WAAW,EAAA,EACpB,IAAI,CAAC,OAAO,IACX,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,QAAQ,gBAAY,SAAS,EAAA,EAClE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,sBAAsB,EAAA,CAAO,CACpC,KACH;YACH,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,MAAM,EAAG,CAAA;AACpB,YAAA,CAAQ,CAAA,MAAA,EAAA,IAAA;SACT,CAAC,CACE,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,sBAAsB,EAAA,EAC/B,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,SAAS,EAAA,CAAG,CACnB,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-modal/xplor-modal.scss?tag=xplor-modal&encapsulation=scoped","src/components/xplor-modal/xplor-modal.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.xplor-modal {\n &__backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2000;\n padding: 1rem;\n }\n\n &__card {\n position: relative;\n background-color: white;\n border-radius: 1rem;\n padding: 1rem;\n max-width: 90vw;\n display: flex;\n flex-direction: column;\n box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2),\n 0px 24px 38px 3px rgba(0, 0, 0, 0.14),\n 0px 9px 46px 8px rgba(0, 0, 0, 0.12);\n animation: xplor-modal-fade-in 0.2s ease-out;\n\n &--scrollable {\n overflow: hidden;\n }\n }\n\n &__close-btn {\n position: absolute;\n top: 1rem;\n right: 1rem;\n width: 2.25rem;\n height: 2.25rem;\n border: none;\n background-color: white;\n color: #008480;\n font-size: 1rem;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n z-index: 1;\n\n &:hover {\n background-color: #E6F7F7;\n }\n\n &:active {\n background-color: #D0EBD2;\n }\n }\n\n &__title {\n padding-right: 3rem;\n margin-bottom: 0.5rem;\n font-size: 1.5rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.87);\n white-space: normal;\n word-wrap: break-word;\n }\n\n &__subtitle {\n margin: 0.5rem;\n margin-bottom: 1rem;\n font-size: 0.875rem;\n color: rgba(0, 0, 0, 0.6);\n }\n\n &__body {\n flex: 1;\n overflow-y: auto;\n margin-bottom: 1rem;\n\n &--no-title {\n margin-top: 3.5rem;\n }\n }\n\n &__actions {\n display: flex;\n gap: 0.5rem;\n justify-content: flex-end;\n margin: 1rem 0;\n }\n\n &__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 3rem;\n }\n\n &__spinner {\n width: 3rem;\n height: 3rem;\n border: 4px solid rgba(0, 0, 0, 0.1);\n border-top-color: #008480;\n border-radius: 50%;\n animation: xplor-spinner-rotate 0.8s linear infinite;\n }\n}\n\n@keyframes xplor-modal-fade-in {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes xplor-spinner-rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Watch, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'xplor-modal',\n styleUrl: 'xplor-modal.scss',\n scoped: true,\n})\nexport class XplorModal {\n /**\n * Whether the modal is open\n */\n @Prop({ mutable: true }) open: boolean = false;\n\n /**\n * Modal width\n */\n @Prop() width: string = '600px';\n\n /**\n * Maximum width\n */\n @Prop() maxWidth: string = '90%';\n\n /**\n * Maximum height\n */\n @Prop() maxHeight: string = '90%';\n\n /**\n * Whether the modal content is scrollable\n */\n @Prop() scrollable: boolean = true;\n\n /**\n * Persistent mode - prevents closing on backdrop click\n */\n @Prop() persistent: boolean = false;\n\n /**\n * Loading state\n */\n @Prop() loading: boolean = false;\n\n /**\n * Whether to show the title area (for spacing)\n */\n @Prop() showTitle: boolean = true;\n\n /**\n * Accessible label for the modal (used if no title slot)\n */\n @Prop() ariaLabel: string;\n\n /**\n * Close event\n */\n @Event() xplorClose: EventEmitter<void>;\n\n @Element() el: HTMLElement;\n\n private previouslyFocusedElement: HTMLElement | null = null;\n private dialogEl: HTMLElement;\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n document.body.style.overflow = 'hidden';\n this.previouslyFocusedElement = document.activeElement as HTMLElement;\n requestAnimationFrame(() => {\n this.setInitialFocus();\n });\n } else {\n document.body.style.overflow = '';\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = null;\n }\n }\n }\n\n disconnectedCallback() {\n document.body.style.overflow = '';\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) return;\n\n if (event.key === 'Escape' && !this.persistent) {\n event.preventDefault();\n this.closeModal();\n return;\n }\n\n if (event.key === 'Tab') {\n this.trapFocus(event);\n }\n }\n\n private getFocusableElements(): HTMLElement[] {\n if (!this.dialogEl) return [];\n const selectors = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n return Array.from(this.dialogEl.querySelectorAll(selectors)) as HTMLElement[];\n }\n\n private trapFocus(event: KeyboardEvent) {\n const focusableElements = this.getFocusableElements();\n if (focusableElements.length === 0) return;\n\n const firstElement = focusableElements[0];\n const lastElement = focusableElements[focusableElements.length - 1];\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else {\n if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n }\n\n private setInitialFocus() {\n const focusableElements = this.getFocusableElements();\n if (focusableElements.length > 0) {\n focusableElements[0].focus();\n } else if (this.dialogEl) {\n this.dialogEl.focus();\n }\n }\n\n private handleBackdropClick = () => {\n if (!this.persistent) {\n this.closeModal();\n }\n };\n\n private handleCardClick = (event: Event) => {\n event.stopPropagation();\n };\n\n private closeModal = () => {\n this.open = false;\n this.xplorClose.emit();\n };\n\n render() {\n if (!this.open) {\n return null;\n }\n\n const cardClasses = {\n 'xplor-modal__card': true,\n 'xplor-modal__card--scrollable': this.scrollable,\n };\n\n const bodyClasses = {\n 'xplor-modal__body': true,\n 'xplor-modal__body--no-title': !this.showTitle,\n };\n\n return (\n <Host>\n <div class=\"xplor-modal__backdrop\" onClick={this.handleBackdropClick}>\n <div\n class={cardClasses}\n style={{\n width: this.width,\n maxWidth: this.maxWidth,\n maxHeight: this.maxHeight,\n }}\n onClick={this.handleCardClick}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={this.ariaLabel ? undefined : 'xplor-modal-title'}\n aria-label={this.ariaLabel}\n tabindex=\"-1\"\n ref={(el) => (this.dialogEl = el)}\n >\n <button\n type=\"button\"\n class=\"xplor-modal__close-btn\"\n onClick={this.closeModal}\n aria-label=\"Close modal\"\n data-testid=\"common-modal-close-button\"\n >\n ✕\n </button>\n\n <div class=\"xplor-modal__title\" id=\"xplor-modal-title\">\n <slot name=\"title\" />\n </div>\n\n <div class=\"xplor-modal__subtitle\">\n <slot name=\"subtitle\" />\n </div>\n\n <div class={bodyClasses}>\n {this.loading ? (\n <div class=\"xplor-modal__loading\" role=\"status\" aria-label=\"Loading\">\n <div class=\"xplor-modal__spinner\"></div>\n </div>\n ) : ([\n <slot name=\"body\" />,\n <slot />\n ])}\n </div>\n\n <div class=\"xplor-modal__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -8,6 +8,8 @@ const XplorButton = /*@__PURE__*/ proxyCustomElement(class XplorButton extends H
|
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.type = 'secondary';
|
|
10
10
|
this.mode = 'pg'; // 'dark', 'pg', 'office' (default: 'dark')
|
|
11
|
+
/** Whether the button is disabled */
|
|
12
|
+
this.disabled = false;
|
|
11
13
|
/**
|
|
12
14
|
* Icon to display (defaults to plus sign)
|
|
13
15
|
*/
|
|
@@ -22,7 +24,7 @@ const XplorButton = /*@__PURE__*/ proxyCustomElement(class XplorButton extends H
|
|
|
22
24
|
render() {
|
|
23
25
|
const isIconOnly = !this.text && this.iconPosition !== null;
|
|
24
26
|
const hasIcon = this.iconPosition !== null;
|
|
25
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '193c8139b43bdbaf108bf09d220b20d746f72cd7' }, h("slot", { key: '61b731d8173a15bcd76fbbf16f0d1d97cbab6e34' }, h("button", { key: '04486cbf547798161e7756a5999898bc46b298b5', role: "button", class: Object.assign({ 'x-button': true, [this.type]: true, 'shadow': this.type !== 'minimal' && this.type !== 'text', 'x-button--icon-only': isIconOnly, 'x-button--with-icon': hasIcon && !isIconOnly, 'x-button--icon-start': this.iconPosition === 'start' && !isIconOnly, 'x-button--icon-end': this.iconPosition === 'end' && !isIconOnly }, (this.styles ? { [this.styles]: true } : {})), onClick: () => this.clickAction && this.clickAction(), "aria-label": this.ariaLabel, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled }, hasIcon && this.iconPosition === 'start' && this.renderIcon(), this.text && h("span", { key: '07e204d356d830444e1b26979be6f1f3926ba551', class: "button-text" }, this.text), hasIcon && this.iconPosition === 'end' && this.renderIcon()))));
|
|
26
28
|
}
|
|
27
29
|
static get style() { return xplorButtonCss; }
|
|
28
30
|
}, [6, "xplor-button", {
|
|
@@ -32,6 +34,8 @@ const XplorButton = /*@__PURE__*/ proxyCustomElement(class XplorButton extends H
|
|
|
32
34
|
"size": [1],
|
|
33
35
|
"styles": [1],
|
|
34
36
|
"clickAction": [16, "click-action"],
|
|
37
|
+
"ariaLabel": [1, "aria-label"],
|
|
38
|
+
"disabled": [4],
|
|
35
39
|
"iconPosition": [1, "icon-position"],
|
|
36
40
|
"icon": [1],
|
|
37
41
|
"iconSvg": [1, "icon-svg"]
|
|
@@ -52,6 +56,6 @@ function defineCustomElement() {
|
|
|
52
56
|
defineCustomElement();
|
|
53
57
|
|
|
54
58
|
export { XplorButton as X, defineCustomElement as d };
|
|
55
|
-
//# sourceMappingURL=p-
|
|
59
|
+
//# sourceMappingURL=p-B5rS_jjI.js.map
|
|
56
60
|
|
|
57
|
-
//# sourceMappingURL=p-
|
|
61
|
+
//# sourceMappingURL=p-B5rS_jjI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-B5rS_jjI.js","mappings":";;AAAA,MAAM,cAAc,GAAG,kywBAAkywB;;MCe5ywB,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AAbxB,IAAA,WAAA,GAAA;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAoF,WAAW;AACnG,QAAA,IAAA,CAAA,IAAI,GAA8B,IAAI,CAAC;;AASvC,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAOjC;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAW,GAAG;AAgD3B;IA7CS,UAAU,GAAA;QAChB,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;AACvC,YAAA,QACE,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,+BAA+B,EAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAA,CAAS;;AAGhF,QAAA,QACE,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,aAAa,EACtB,EAAA,IAAI,CAAC,IAAI,CACL;;IAIX,MAAM,GAAA;AACJ,QAAA,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI;AAC3D,QAAA,MAAM,OAAO,GAAG,IAAI,C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AU,EAAE,CACrD,CACJ,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-button/xplor-button.scss?tag=xplor-button&encapsulation=scoped","src/components/xplor-button/xplor-button.tsx"],"sourcesContent":["@use '../../styles/colours.scss' as colours-pg;\n@use '../../styles/spacing.scss' as spacing;\n\n:host {\n display: block;\n}\n\n.x-button {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: 1px solid;\n border-radius: 1rem;\n cursor: pointer;\n display: block;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n font-size: 1rem;\n font-weight: 500;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-letter-spacing: 0.75px;\n -moz-letter-spacing: 0.75px;\n -ms-letter-spacing: 0.75px;\n padding: spacing.$spacing-12 spacing.$spacing-24;\n letter-spacing: 0.75px;\n overflow: hidden;\n position: relative;\n -webkit-transition:\n background-color 0.2s,\n border-color 0.2s,\n color 0.2s;\n transition:\n background-color 0.2s,\n border-color 0.2s,\n color 0.2s;\n\n // Icon Only Button (Circular)\n &.x-button--icon-only {\n width: 48px;\n height: 48px;\n padding: 0;\n border-radius: 50%;\n min-width: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n .button-icon {\n font-size: 20px;\n font-weight: 300;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.button-icon--svg {\n svg {\n width: spacing.$spacing-16;\n height: spacing.$spacing-16;\n display: block;\n }\n }\n }\n }\n\n // Regular Button with Icon\n &.x-button--with-icon {\n .button-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n line-height: 1;\n }\n\n // SVG icon styles\n &.x-button--icon-start {\n .button-icon--svg {\n margin-right: spacing.$spacing-8 ;\n }\n }\n\n &.x-button--icon-end {\n .button-icon--svg {\n margin-left: spacing.$spacing-8 ;\n }\n }\n\n .button-icon--svg {\n\n\n svg {\n display: block;\n width: 14px;\n height: 14px;\n\n\n path {\n fill: currentColor;\n }\n }\n }\n\n .button-text {\n line-height: 1;\n }\n }\n\n // Icon positioning\n &.x-button--icon-start {\n flex-direction: row;\n }\n\n &.x-button--icon-end {\n flex-direction: row;\n }\n\n &.shadow {\n box-shadow:\n 0px 2.30969px 4.25707px rgba(20, 20, 21, 0.28),\n 0px 6.38599px 11.7703px rgba(20, 20, 21, 0.0521271),\n 0px 15.375px 28.3382px rgba(20, 20, 21, 0.04),\n 0px 32px 94px rgba(20, 20, 21, 0.0278729);\n }\n\n &.primary {\n background-color: colours-pg.$primary;\n border-color: colours-pg.$primary;\n color: white;\n\n &:hover {\n background-color: colours-pg.$primary-50;\n border-color: colours-pg.$primary-50;\n color: white;\n }\n }\n\n &.secondary {\n background-color: colours-pg.$secondary;\n border-color: colours-pg.$secondary;\n color: white;\n\n &:hover {\n background-color: colours-pg.$secondary-50;\n border-color: colours-pg.$secondary-50;\n color: white;\n ;\n }\n }\n\n &.ghost {\n background-color: #fff;\n border-color: colours-pg.$secondary;\n color: colours-pg.$secondary;\n\n &:hover {\n background-color: #DFF2F1;\n border-color: colours-pg.$secondary;\n color: colours-pg.$secondary;\n\n }\n\n &:active {\n background-color: #BEE6E4;\n border-color: colours-pg.$secondary;\n color: colours-pg.$secondary;\n\n }\n }\n\n &.minimal {\n background-color: transparent;\n border-color: transparent;\n color: colours-pg.$primary;\n }\n\n &.success {\n background-color: transparent;\n border-color: colours-pg.$success;\n color: colours-pg.$success;\n\n &:hover {\n background-color: colours-pg.$success-50;\n border-color: colours-pg.$success;\n color: colours-pg.$success;\n }\n\n &:active {\n background-color: colours-pg.$success-100;\n }\n }\n\n &.text {\n background-color: transparent;\n border-color: transparent;\n color: colours-pg.$secondary;\n\n &:hover {\n background-color: colours-pg.$secondary-50;\n }\n\n &:active {\n background-color: colours-pg.$secondary-100;\n }\n }\n\n &.disabled {\n background-color: #f6f6f6;\n border-color: #a0a0a0;\n color: #a0a0a0;\n }\n}\n\n.icon {\n background-color: #ffffff;\n bottom: 0px;\n left: 0px;\n opacity: 0;\n position: absolute;\n right: 0px;\n top: 0px;\n -webkit-transition: opacity 0.2s;\n transition: opacity 0.2s;\n}\n\n// Size variations for icon-only buttons\n.x-button--icon-only {\n &.small {\n width: 36px;\n height: 36px;\n padding: spacing.$spacing-4;\n\n .button-icon {\n font-size: 16px;\n }\n }\n\n &.button-icon--svg {\n padding: spacing.$spacing-4;\n\n svg {\n width: 16px;\n height: 16px;\n\n }\n }\n\n &.large {\n width: 56px;\n height: 56px;\n\n .button-icon {\n font-size: 24px;\n }\n }\n}\n\n// Ensure disabled state works with icon buttons\n.x-button.disabled {\n\n &.x-button--icon-only,\n &.x-button--with-icon {\n cursor: not-allowed;\n opacity: 0.6;\n }\n}","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'xplor-button',\n styleUrl: 'xplor-button.scss',\n // we cant use multiple styleUrls because the mode property is not reactive only in stencilJS and once the component is rendered it wont change the css file\n // so we are using only one styleUrl and changing the styles based on the mode property in the class\n // styleUrls: {\n // default: 'xplor-button.scss',\n // dark: 'xplor-button-pg.scss',\n // pg: 'xplor-button-pg.scss',\n // office: 'xplor-button-office.scss',\n // },\n scoped: true,\n})\nexport class XplorButton {\n @Prop() text: string;\n @Prop() type: 'minimal' | 'primary' | 'secondary' | 'ghost' | 'disabled' | 'success' | 'text' = 'secondary';\n @Prop() mode?: 'dark' | 'pg' | 'office' = 'pg'; // 'dark', 'pg', 'office' (default: 'dark')\n @Prop() size?: string; // 'small', 'medium', 'large' (default:'medium')\n @Prop() styles?: string;\n @Prop() clickAction: () => void;\n\n /** Accessible label for icon-only buttons */\n @Prop() ariaLabel: string;\n\n /** Whether the button is disabled */\n @Prop() disabled: boolean = false;\n\n /**\n * Icon position: 'start' | 'end' | null\n */\n @Prop() iconPosition: 'start' | 'end' | null;\n\n /**\n * Icon to display (defaults to plus sign)\n */\n @Prop() icon: string = '+';\n @Prop() iconSvg?: string;\n\n private renderIcon() {\n if (this.icon === 'svg' && this.iconSvg) {\n return (\n <span class=\"button-icon button-icon--svg \" innerHTML={this.iconSvg}></span>\n );\n }\n return (\n <span class=\"button-icon\">\n {this.icon}\n </span>\n );\n }\n\n render() {\n const isIconOnly = !this.text && this.iconPosition !== null;\n const hasIcon = this.iconPosition !== null;\n\n return (\n <Host>\n <slot>\n <button\n role=\"button\"\n class={{\n 'x-button': true,\n [this.type]: true,\n 'shadow': this.type !== 'minimal' && this.type !== 'text',\n 'x-button--icon-only': isIconOnly,\n 'x-button--with-icon': hasIcon && !isIconOnly,\n 'x-button--icon-start': this.iconPosition === 'start' && !isIconOnly,\n 'x-button--icon-end': this.iconPosition === 'end' && !isIconOnly,\n ...(this.styles ? { [this.styles]: true } : {}),\n }}\n onClick={() => this.clickAction && this.clickAction()}\n aria-label={this.ariaLabel}\n aria-disabled={this.disabled ? 'true' : null}\n disabled={this.disabled}\n >\n {hasIcon && this.iconPosition === 'start' && this.renderIcon()}\n {this.text && <span class=\"button-text\">{this.text}</span>}\n {hasIcon && this.iconPosition === 'end' && this.renderIcon()}\n </button>\n </slot>\n </Host>\n );\n }\n}"],"version":3}
|
|
@@ -2,6 +2,7 @@ import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
|
2
2
|
|
|
3
3
|
const xplorTooltipCss = "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n@layer base {\n \n :root {\n --color-primary: #db3b03;\n --color-primary-50: rgba(255, 152, 0, 1);\n --color-secondary: rgb(0, 119, 107);\n --color-secondary-50: rgba(1, 163, 157, 1);\n --color-tertiary: rgb(128, 104, 186);\n --color-tertiary: rgb(223, 242, 241);\n --color-white: white;\n --color-emphasis: rgb(8, 8, 9);\n --color-supergiant: rgb(213, 66, 99);\n --color-orange: rgb(250, 200, 127);\n --color-buttons: #fbbc05;\n --color-typography: #ea4335;\n --background: 20 66% 99%;\n --foreground: 20 51% 4%;\n --muted: 20 25% 86%;\n --muted-foreground: 20 7% 25%;\n --popover: 20 66% 98%;\n --popover-foreground: 20 51% 3%;\n --card: 20 66% 98%;\n --card-foreground: 20 51% 3%;\n --border: 20 15% 94%;\n --input: 20 15% 94%;\n --primary: 20 48% 72%;\n --primary-foreground: 20 48% 12%;\n --secondary: 20 12% 92%;\n --secondary-foreground: 20 12% 32%;\n --accent: 20 12% 92%;\n --accent-foreground: 20 12% 32%;\n --destructive: 11 80% 22%;\n --destructive-foreground: 11 80% 82%;\n --ring: 20 48% 72%;\n --radius: 0.5rem;\n --chart-1: 12 76% 61%;\n --chart-2: 173 58% 39%;\n --chart-3: 197 37% 24%;\n --chart-4: 43 74% 66%;\n --chart-5: 27 87% 67%;\n }\n .dark {\n --background: 253 43% 3%;\n --foreground: 253 31% 98%;\n --muted: 253 7% 13%;\n --muted-foreground: 253 13% 63%;\n --popover: 253 43% 3%;\n --popover-foreground: 253 31% 98%;\n --card: 253 43% 4%;\n --card-foreground: 253 31% 99%;\n --border: 215 27.9% 16.9%;\n --input: 215 27.9% 16.9%;\n --primary: 253 91% 58%;\n --primary-foreground: 253 91% 98%;\n --secondary: 253 7% 9%;\n --secondary-foreground: 253 7% 69%;\n --accent: 253 13% 14%;\n --accent-foreground: 253 13% 74%;\n --destructive: 339.2 90.36% 51.18%;\n --destructive-foreground: 0 0% 100%;\n --ring: 253 91% 58%;\n --chart-1: 220 70% 50%;\n --chart-2: 160 60% 45%;\n --chart-3: 30 80% 55%;\n --chart-4: 280 65% 60%;\n --chart-5: 340 75% 55%;\n }\n}\n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply box-border bg-background text-foreground;\n }\n}\n@layer utilities {\n .min-h-screen {\n min-height: 100vh;\n \n min-height: 100dvh;\n }\n .h-screen {\n height: 100vh;\n \n height: 100dvh;\n }\n}\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n@layer components {\n .glass {\n border: none;\n backdrop-filter: blur(var(--glass-blur, 40px));\n background-color: transparent;\n background-image: linear-gradient(135deg, rgb(255, 255, 255, var(--glass-opacity, 30%)), transparent), linear-gradient(var(--glass-reflex-degree, 100deg), rgb(255, 255, 255, var(--glass-reflex-opacity, 10%)) 25%, transparent 0);\n box-shadow: 0 0 0 1px rgb(255, 255, 255, var(--glass-border-opacity, 10%)) inset, 0 0 0 2px rgba(0, 0, 0, 0.05);\n text-shadow: 0 1px rgb(0, 0, 0, var(--glass-text-shadow-opacity, 5%));\n }\n}\n.tox.tox-tinymce.sc-xplor-tooltip {\n width: 50% !important;\n height: 400px !important;\n display: inline-flex;\n}\n\n\n@media only screen and (min-width: 600px) {\n .tox.tox-tinymce.sc-xplor-tooltip {\n width: 600px !important;\n }\n}\nh1.sc-xplor-tooltip {\n color: var(--color-primary);\n \n font-family: Inter;\n font-size: 48px;\n font-style: normal;\n font-weight: 400;\n line-height: 56px; \n}\n\nh2.sc-xplor-tooltip {\n color: var(--grey-1100252525, #252525);\n \n font-family: Inter;\n font-size: 32px;\n font-style: normal;\n font-weight: 600;\n line-height: 38px; \n letter-spacing: 0.25px;\n}\n\nh3.sc-xplor-tooltip {\n color: var(--grey-1100252525, #252525);\n \n font-family: Inter;\n font-size: 24px;\n font-style: normal;\n font-weight: 400;\n line-height: 32px; \n}\n\n.overline.sc-xplor-tooltip {\n color: var(--grey-1100252525, #252525);\n \n font-family: Inter;\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 16px; \n letter-spacing: 3.2px;\n text-transform: uppercase;\n}\n\nol.sc-xplor-tooltip, ul.sc-xplor-tooltip {\n list-style: none;\n margin: 1rem;\n padding: 0;\n}\nol.sc-xplor-tooltip li.sc-xplor-tooltip, ul.sc-xplor-tooltip li.sc-xplor-tooltip {\n margin: 1rem;\n padding: 0;\n}\nol.mdc-list.sc-xplor-tooltip, ul.mdc-list.sc-xplor-tooltip {\n list-style-type: none;\n list-style: none;\n}\nol.mdc-list.sc-xplor-tooltip li.mdc-list-item.sc-xplor-tooltip, ul.mdc-list.sc-xplor-tooltip li.mdc-list-item.sc-xplor-tooltip {\n list-style-type: none;\n list-style: none !important;\n}\n\n.orange-label.sc-xplor-tooltip {\n color: var(--Orange-900-Primary, #db3b03);\n \n font-family: Inter;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px; \n letter-spacing: 0.4px;\n margin: 0px 0 -9px 16px;\n z-index: 1 !important;\n position: relative;\n width: fit-content;\n}\n.orange-label.grey-bg.sc-xplor-tooltip {\n background-color: #fefcfb;\n}\n\n#spinnerLoader.sc-xplor-tooltip {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: #fff;\n padding: 20px;\n border-radius: 5px;\n box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100;\n pointer-events: none;\n}\n\n#textfield-Title-label.sc-xplor-tooltip {\n background-color: white;\n}\n\n.mdc-ripple-upgraded.sc-xplor-tooltip .mdc-text-field--outlined.sc-xplor-tooltip .mdc-notched-outline__notch.sc-xplor-tooltip {\n border: 0px solid transparent !important;\n border-bottom: 1px solid #db3b03 !important;\n padding: 0;\n height: 0;\n}\n\n.mdc-text-field--focused.sc-xplor-tooltip .mdc-notched-outline__notch.sc-xplor-tooltip {\n border: 0px solid transparent !important;\n border-bottom: 2px solid #db3b03 !important;\n}\n\n.mdc-text-field--outlined.sc-xplor-tooltip .mdc-notched-outline.sc-xplor-tooltip .mdc-notched-outline__notch.sc-xplor-tooltip {\n max-width: calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2);\n border-top: transparent;\n}\n\n.generate-btn.sc-xplor-tooltip {\n display: flex;\n height: 48px;\n padding: 12px 24px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 16px;\n}\n.generate-btn.link.sc-xplor-tooltip:hover {\n background-color: var(--Cyan-700-Secondary, #e27046);\n color: var(--Cyan-700-Secondary-Text, #fff);\n}\n\n.bg-green.sc-xplor-tooltip {\n background: var(--Cyan-700-Secondary, #00776b);\n}\n\n.sc-xplor-tooltip-h {\n display: inline-block;\n position: relative;\n}\n\n.tooltip-trigger.sc-xplor-tooltip {\n display: inline-flex;\n cursor: pointer;\n}\n\n.tooltip.sc-xplor-tooltip {\n position: fixed;\n z-index: 9999;\n background-color: #424242;\n color: #fff;\n border-radius: 4px;\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1.4;\n max-width: 300px;\n word-wrap: break-word;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n pointer-events: none;\n opacity: 0;\n animation: tooltipFadeIn 0.2s ease forwards;\n}\n\n@keyframes tooltipFadeIn {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.tooltip__content.sc-xplor-tooltip {\n position: relative;\n z-index: 1;\n}\n\n.tooltip__arrow.sc-xplor-tooltip {\n position: absolute;\n width: 12px;\n height: 12px;\n background-color: #424242;\n z-index: 0;\n}\n\n.tooltip--top.sc-xplor-tooltip .tooltip__arrow.sc-xplor-tooltip {\n margin-top: -6px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.tooltip--bottom.sc-xplor-tooltip .tooltip__arrow.sc-xplor-tooltip {\n box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.tooltip--left.sc-xplor-tooltip .tooltip__arrow.sc-xplor-tooltip {\n margin-left: -6px;\n display: block;\n box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.tooltip--right.sc-xplor-tooltip .tooltip__arrow.sc-xplor-tooltip {\n box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.1);\n}";
|
|
4
4
|
|
|
5
|
+
let tooltipIdCounter = 0;
|
|
5
6
|
const XplorTooltip = /*@__PURE__*/ proxyCustomElement(class XplorTooltip extends H {
|
|
6
7
|
constructor() {
|
|
7
8
|
super();
|
|
@@ -13,6 +14,7 @@ const XplorTooltip = /*@__PURE__*/ proxyCustomElement(class XplorTooltip extends
|
|
|
13
14
|
this.disabled = false;
|
|
14
15
|
this.tooltipStyle = {};
|
|
15
16
|
this.arrowStyle = {};
|
|
17
|
+
this.tooltipId = `xplor-tooltip-${++tooltipIdCounter}`;
|
|
16
18
|
this.handleMouseEnter = () => {
|
|
17
19
|
if (this.disabled)
|
|
18
20
|
return;
|
|
@@ -28,6 +30,16 @@ const XplorTooltip = /*@__PURE__*/ proxyCustomElement(class XplorTooltip extends
|
|
|
28
30
|
this.hideTooltip();
|
|
29
31
|
}, 100);
|
|
30
32
|
};
|
|
33
|
+
this.handleFocusIn = () => {
|
|
34
|
+
if (this.disabled)
|
|
35
|
+
return;
|
|
36
|
+
this.showTooltip();
|
|
37
|
+
};
|
|
38
|
+
this.handleFocusOut = () => {
|
|
39
|
+
if (this.disabled)
|
|
40
|
+
return;
|
|
41
|
+
this.hideTooltip();
|
|
42
|
+
};
|
|
31
43
|
this.handleClick = () => {
|
|
32
44
|
if (this.disabled)
|
|
33
45
|
return;
|
|
@@ -54,12 +66,16 @@ const XplorTooltip = /*@__PURE__*/ proxyCustomElement(class XplorTooltip extends
|
|
|
54
66
|
if (this.triggerEl) {
|
|
55
67
|
this.triggerEl.addEventListener('mouseenter', this.handleMouseEnter);
|
|
56
68
|
this.triggerEl.addEventListener('mouseleave', this.handleMouseLeave);
|
|
69
|
+
this.triggerEl.addEventListener('focusin', this.handleFocusIn);
|
|
70
|
+
this.triggerEl.addEventListener('focusout', this.handleFocusOut);
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
cleanupListeners() {
|
|
60
74
|
if (this.triggerEl) {
|
|
61
75
|
this.triggerEl.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
62
76
|
this.triggerEl.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
77
|
+
this.triggerEl.removeEventListener('focusin', this.handleFocusIn);
|
|
78
|
+
this.triggerEl.removeEventListener('focusout', this.handleFocusOut);
|
|
63
79
|
}
|
|
64
80
|
}
|
|
65
81
|
handleDocumentClick(event) {
|
|
@@ -144,10 +160,10 @@ const XplorTooltip = /*@__PURE__*/ proxyCustomElement(class XplorTooltip extends
|
|
|
144
160
|
};
|
|
145
161
|
}
|
|
146
162
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: '135c627d93956798eef4e842ec256a0f156c771a' }, h("div", { key: '1a4253fa4f893d7726227c346c9ebc850c7ee463', class: "tooltip-trigger", ref: (el) => (this.triggerEl = el), onClick: this.handleClick, "aria-describedby": this.open ? this.tooltipId : undefined }, h("slot", { key: '8970f94fa612b40e573a66102533b1f54387b9b2', name: "trigger" })), this.open && (h("div", { key: 'c1b873e3b9ccaf8747c772672282e63615528be7', class: {
|
|
148
164
|
'tooltip': true,
|
|
149
165
|
[`tooltip--${this.position}`]: true,
|
|
150
|
-
}, style: this.tooltipStyle, ref: (el) => (this.tooltipEl = el), role: "tooltip" }, h("div", { key: '
|
|
166
|
+
}, style: this.tooltipStyle, ref: (el) => (this.tooltipEl = el), role: "tooltip", id: this.tooltipId }, h("div", { key: '93af160a6f7fc1776ca358f3f91f0fecb381ce8d', class: "tooltip__content" }, h("slot", { key: 'cb1c56d228c3f494d668dad73e2af6b303af9f42' }, this.content)), this.arrow && (h("div", { key: '9d528e58c6b772c4b72096533bdb1f0df710aa8f', class: "tooltip__arrow", style: this.arrowStyle }))))));
|
|
151
167
|
}
|
|
152
168
|
get el() { return this; }
|
|
153
169
|
static get style() { return xplorTooltipCss; }
|
|
@@ -177,6 +193,6 @@ function defineCustomElement() {
|
|
|
177
193
|
defineCustomElement();
|
|
178
194
|
|
|
179
195
|
export { XplorTooltip as X, defineCustomElement as d };
|
|
180
|
-
//# sourceMappingURL=p-
|
|
196
|
+
//# sourceMappingURL=p-DbQ6ZNvh.js.map
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AA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACI,KAAK,EAAE;AACH,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,CAAC,YAAY,IAAI,CAAC,QAAQ,CAAE,CAAA,GAAG,IAAI;aACtC,EACD,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,IAAI,CAAC,SAAS,EAAA,EAElB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAA,EACzB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,IAAI,CAAC,OAAO,CAAQ,CACzB,EACL,IAAI,CAAC,KAAK,KACP,4DACI,KAAK,EAAC,gBAAgB,EACtB,KAAK,EAAE,IAAI,CAAC,UAAU,EACxB,CAAA,CACL,CACC,CACT,CACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-tooltip/xplor-tooltip.scss?tag=xplor-tooltip&encapsulation=scoped","src/components/xplor-tooltip/xplor-tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n}\n\n.tooltip-trigger {\n display: inline-flex;\n cursor: pointer;\n}\n\n.tooltip {\n position: fixed;\n z-index: 9999;\n background-color: #424242;\n color: #fff;\n border-radius: 4px;\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1.4;\n max-width: 300px;\n word-wrap: break-word;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n pointer-events: none;\n opacity: 0;\n animation: tooltipFadeIn 0.2s ease forwards;\n}\n\n@keyframes tooltipFadeIn {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n.tooltip__content {\n position: relative;\n z-index: 1;\n}\n\n.tooltip__arrow {\n position: absolute;\n width: 12px;\n height: 12px;\n background-color: #424242;\n z-index: 0;\n}\n\n.tooltip--top .tooltip__arrow {\n margin-top: -6px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.tooltip--bottom .tooltip__arrow {\n box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.tooltip--left .tooltip__arrow {\n margin-left: -6px;\n display: block;\n box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.tooltip--right .tooltip__arrow {\n box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.1);\n}","import { Component, Host, h, Prop, State, Element, Listen } from '@stencil/core';\n\nlet tooltipIdCounter = 0;\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\nexport type TooltipTrigger = 'hover' | 'click' | 'manual';\n\n@Component({\n tag: 'xplor-tooltip',\n styleUrl: 'xplor-tooltip.scss',\n scoped: true,\n})\nexport class XplorTooltip {\n @Element() el: HTMLElement;\n\n @Prop() position: TooltipPosition = 'top';\n @Prop() trigger: TooltipTrigger = 'hover';\n @Prop() arrow: boolean = true;\n @Prop({ mutable: true }) open: boolean = false;\n @Prop() content: string;\n @Prop() disabled: boolean = false;\n\n @State() tooltipStyle: any = {};\n @State() arrowStyle: any = {};\n\n private tooltipId = `xplor-tooltip-${++tooltipIdCounter}`;\n\n private triggerEl: HTMLDivElement;\n private tooltipEl: HTMLDivElement;\n private hideTimeout: any;\n\n componentDidLoad() {\n if (this.trigger === 'hover') {\n this.setupHoverListeners();\n }\n }\n\n disconnectedCallback() {\n this.cleanupListeners();\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n }\n }\n\n private setupHoverListeners() {\n if (this.triggerEl) {\n this.triggerEl.addEventListener('mouseenter', this.handleMouseEnter);\n this.triggerEl.addEventListener('mouseleave', this.handleMouseLeave);\n this.triggerEl.addEventListener('focusin', this.handleFocusIn);\n this.triggerEl.addEventListener('focusout', this.handleFocusOut);\n }\n }\n\n private cleanupListeners() {\n if (this.triggerEl) {\n this.triggerEl.removeEventListener('mouseenter', this.handleMouseEnter);\n this.triggerEl.removeEventListener('mouseleave', this.handleMouseLeave);\n this.triggerEl.removeEventListener('focusin', this.handleFocusIn);\n this.triggerEl.removeEventListener('focusout', this.handleFocusOut);\n }\n }\n\n private handleMouseEnter = () => {\n if (this.disabled) return;\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n }\n this.showTooltip();\n };\n\n private handleMouseLeave = () => {\n if (this.disabled) return;\n this.hideTimeout = setTimeout(() => {\n this.hideTooltip();\n }, 100);\n };\n\n private handleFocusIn = () => {\n if (this.disabled) return;\n this.showTooltip();\n };\n\n private handleFocusOut = () => {\n if (this.disabled) return;\n this.hideTooltip();\n };\n\n private handleClick = () => {\n if (this.disabled) return;\n if (this.trigger === 'click') {\n this.open = !this.open;\n if (this.open) {\n requestAnimationFrame(() => this.updatePosition());\n }\n }\n };\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (this.trigger === 'click' && this.open) {\n const target = event.target as Node;\n if (!this.el.contains(target)) {\n this.open = false;\n }\n }\n }\n\n private showTooltip() {\n this.open = true;\n requestAnimationFrame(() => this.updatePosition());\n }\n\n private hideTooltip() {\n this.open = false;\n }\n\n private updatePosition() {\n if (!this.triggerEl || !this.tooltipEl) return;\n\n const triggerRect = this.triggerEl.getBoundingClientRect();\n const tooltipRect = this.tooltipEl.getBoundingClientRect();\n const gap = 8; // Space between trigger and tooltip\n const arrowSize = this.arrow ? 6 : 0;\n\n let top = 0;\n let left = 0;\n let arrowTop = '';\n let arrowLeft = '';\n let arrowTransform = '';\n\n switch (this.position) {\n case 'top':\n top = triggerRect.top - tooltipRect.height - gap - arrowSize;\n left = triggerRect.left + triggerRect.width / 2 - tooltipRect.width / 2;\n arrowTop = '100%';\n arrowLeft = '50%';\n arrowTransform = 'translateX(-50%) rotate(45deg)';\n break;\n\n case 'bottom':\n top = triggerRect.bottom + gap + arrowSize;\n left = triggerRect.left + triggerRect.width / 2 - tooltipRect.width / 2;\n arrowTop = '-6px';\n arrowLeft = '50%';\n arrowTransform = 'translateX(-50%) rotate(45deg)';\n break;\n\n case 'left':\n top = triggerRect.top + triggerRect.height / 2 - tooltipRect.height / 2;\n left = triggerRect.left - tooltipRect.width - gap - arrowSize;\n arrowTop = '50%';\n arrowLeft = '100%';\n arrowTransform = 'translateY(-50%) rotate(45deg)';\n break;\n\n case 'right':\n top = triggerRect.top + triggerRect.height / 2 - tooltipRect.height / 2;\n left = triggerRect.right + gap + arrowSize;\n arrowTop = '50%';\n arrowLeft = '-6px';\n arrowTransform = 'translateY(-50%) rotate(45deg)';\n break;\n }\n\n // Keep tooltip within viewport\n const viewportPadding = 8;\n if (left < viewportPadding) {\n left = viewportPadding;\n } else if (left + tooltipRect.width > window.innerWidth - viewportPadding) {\n left = window.innerWidth - tooltipRect.width - viewportPadding;\n }\n\n if (top < viewportPadding) {\n top = viewportPadding;\n } else if (top + tooltipRect.height > window.innerHeight - viewportPadding) {\n top = window.innerHeight - tooltipRect.height - viewportPadding;\n }\n\n this.tooltipStyle = {\n top: `${top}px`,\n left: `${left}px`,\n };\n\n this.arrowStyle = {\n top: arrowTop,\n left: arrowLeft,\n transform: arrowTransform,\n };\n }\n\n render() {\n return (\n <Host>\n <div\n class=\"tooltip-trigger\"\n ref={(el) => (this.triggerEl = el)}\n onClick={this.handleClick}\n aria-describedby={this.open ? this.tooltipId : undefined}\n >\n <slot name=\"trigger\" />\n </div>\n\n {this.open && (\n <div\n class={{\n 'tooltip': true,\n [`tooltip--${this.position}`]: true,\n }}\n style={this.tooltipStyle}\n ref={(el) => (this.tooltipEl = el)}\n role=\"tooltip\"\n id={this.tooltipId}\n >\n <div class=\"tooltip__content\">\n <slot>{this.content}</slot>\n </div>\n {this.arrow && (\n <div\n class=\"tooltip__arrow\"\n style={this.arrowStyle}\n />\n )}\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -32,6 +32,7 @@ const XplorInlineDatePicker = /*@__PURE__*/ proxyCustomElement(class XplorInline
|
|
|
32
32
|
* Whether to start week on Sunday (default: true)
|
|
33
33
|
*/
|
|
34
34
|
this.startWeekOnSunday = true;
|
|
35
|
+
this.focusedDay = 0;
|
|
35
36
|
this.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
36
37
|
this.dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
37
38
|
this.dayNamesStartMonday = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
@@ -126,7 +127,7 @@ const XplorInlineDatePicker = /*@__PURE__*/ proxyCustomElement(class XplorInline
|
|
|
126
127
|
'xplor-inline-date-picker__day--today': isToday,
|
|
127
128
|
'xplor-inline-date-picker__day--selected': isSelected,
|
|
128
129
|
'xplor-inline-date-picker__day--disabled': isDisabled,
|
|
129
|
-
}, onClick: () => !isDisabled && this.selectDate(day) }, day));
|
|
130
|
+
}, onClick: () => !isDisabled && this.selectDate(day), role: "gridcell", "aria-selected": isSelected ? 'true' : 'false', "aria-current": isToday ? 'date' : undefined, "aria-disabled": isDisabled ? 'true' : undefined, tabIndex: day === this.focusedDay ? 0 : -1, "data-day": day }, day));
|
|
130
131
|
}
|
|
131
132
|
return days;
|
|
132
133
|
};
|
|
@@ -146,12 +147,75 @@ const XplorInlineDatePicker = /*@__PURE__*/ proxyCustomElement(class XplorInline
|
|
|
146
147
|
this.currentYear = date.getFullYear();
|
|
147
148
|
this.currentMonth = date.getMonth();
|
|
148
149
|
this.viewDate = new Date(this.currentYear, this.currentMonth, 1);
|
|
150
|
+
this.focusedDay = date.getDate();
|
|
151
|
+
}
|
|
152
|
+
handleKeyDown(event) {
|
|
153
|
+
const daysInMonth = this.getDaysInMonth();
|
|
154
|
+
switch (event.key) {
|
|
155
|
+
case 'ArrowLeft':
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
if (this.focusedDay > 1) {
|
|
158
|
+
this.focusedDay--;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
this.previousMonth();
|
|
162
|
+
this.focusedDay = this.getDaysInMonth();
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
case 'ArrowRight':
|
|
166
|
+
event.preventDefault();
|
|
167
|
+
if (this.focusedDay < daysInMonth) {
|
|
168
|
+
this.focusedDay++;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.nextMonth();
|
|
172
|
+
this.focusedDay = 1;
|
|
173
|
+
}
|
|
174
|
+
break;
|
|
175
|
+
case 'ArrowUp':
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
if (this.focusedDay > 7) {
|
|
178
|
+
this.focusedDay -= 7;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.previousMonth();
|
|
182
|
+
this.focusedDay = this.getDaysInMonth() - (7 - this.focusedDay);
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
185
|
+
case 'ArrowDown':
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
if (this.focusedDay + 7 <= daysInMonth) {
|
|
188
|
+
this.focusedDay += 7;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
const remainder = this.focusedDay + 7 - daysInMonth;
|
|
192
|
+
this.nextMonth();
|
|
193
|
+
this.focusedDay = remainder;
|
|
194
|
+
}
|
|
195
|
+
break;
|
|
196
|
+
case 'Enter':
|
|
197
|
+
case ' ':
|
|
198
|
+
event.preventDefault();
|
|
199
|
+
if (this.focusedDay >= 1 && this.focusedDay <= daysInMonth) {
|
|
200
|
+
this.selectDate(this.focusedDay);
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
default:
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
// Focus the day cell after render
|
|
207
|
+
requestAnimationFrame(() => {
|
|
208
|
+
const dayEl = this.el.querySelector(`[data-day="${this.focusedDay}"]`);
|
|
209
|
+
if (dayEl)
|
|
210
|
+
dayEl.focus();
|
|
211
|
+
});
|
|
149
212
|
}
|
|
150
213
|
render() {
|
|
151
214
|
const sidebarDate = this.getSidebarDate();
|
|
152
215
|
const dayHeaders = this.startWeekOnSunday ? this.dayNames : this.dayNamesStartMonday;
|
|
153
|
-
return (h(Host, { key: '
|
|
216
|
+
return (h(Host, { key: '80febb025a7aa5f0ca6f1e2370eb4258bee8d248' }, h("div", { key: 'debf9345ef19400a3eaefeff63e41639e6fd0a81', class: "xplor-inline-date-picker", style: { '--picker-color': this.color } }, h("div", { key: 'c3580aeec39d5305aa9b03e1198ed98ef7321a5d', class: "xplor-inline-date-picker__sidebar" }, h("div", { key: 'f657dcf267477af5390386d61aaa01836b3e70a5', class: "xplor-inline-date-picker__sidebar-year" }, sidebarDate.year), h("div", { key: '66283f6555f37ba7100be5af9d21ac3a7c99f3fa', class: "xplor-inline-date-picker__sidebar-day" }, sidebarDate.day, ","), h("div", { key: 'f479af2fc60e60060a4b43f62b18d1164b762efd', class: "xplor-inline-date-picker__sidebar-date" }, sidebarDate.date)), h("div", { key: '7c60d94c66b60653cd03c0b7e0585bef5cf4fdb0', class: "xplor-inline-date-picker__calendar" }, h("div", { key: 'ac94d2e0c42be967c28af3fa2ccad0316f7220a6', class: "xplor-inline-date-picker__header" }, h("button", { key: '02ab5127e6d25a6832277997177ae760f9e3e602', type: "button", class: "xplor-inline-date-picker__arrow", onClick: this.previousMonth, "aria-label": "Previous month" }, "\u2039"), h("div", { key: '11ec1328d212eea25df1d30e5608ac744a91a74b', class: "xplor-inline-date-picker__title" }, this.monthNames[this.currentMonth], " ", this.currentYear), h("button", { key: '40a7d69baca4784254fbde45a5b2488c6ee94c2c', type: "button", class: "xplor-inline-date-picker__arrow", onClick: this.nextMonth, "aria-label": "Next month" }, "\u203A")), h("div", { key: 'ee2b65a6d095192b41c1f2f81dc326fee817ddda', class: "xplor-inline-date-picker__weekdays" }, dayHeaders.map((day) => (h("div", { class: "xplor-inline-date-picker__weekday" }, day)))), h("div", { key: 'a789c627f00ff649d40fe099b53fa35bc561a148', class: "xplor-inline-date-picker__days", role: "grid" }, this.renderCalendarDays())))));
|
|
154
217
|
}
|
|
218
|
+
get el() { return this; }
|
|
155
219
|
static get style() { return xplorInlineDatePickerCss; }
|
|
156
220
|
}, [2, "xplor-inline-date-picker", {
|
|
157
221
|
"selectedDate": [1025, "selected-date"],
|
|
@@ -162,8 +226,9 @@ const XplorInlineDatePicker = /*@__PURE__*/ proxyCustomElement(class XplorInline
|
|
|
162
226
|
"startWeekOnSunday": [4, "start-week-on-sunday"],
|
|
163
227
|
"currentYear": [32],
|
|
164
228
|
"currentMonth": [32],
|
|
165
|
-
"viewDate": [32]
|
|
166
|
-
|
|
229
|
+
"viewDate": [32],
|
|
230
|
+
"focusedDay": [32]
|
|
231
|
+
}, [[0, "keydown", "handleKeyDown"]]]);
|
|
167
232
|
function defineCustomElement() {
|
|
168
233
|
if (typeof customElements === "undefined") {
|
|
169
234
|
return;
|
|
@@ -180,6 +245,6 @@ function defineCustomElement() {
|
|
|
180
245
|
defineCustomElement();
|
|
181
246
|
|
|
182
247
|
export { XplorInlineDatePicker as X, defineCustomElement as d };
|
|
183
|
-
//# sourceMappingURL=p-
|
|
248
|
+
//# sourceMappingURL=p-Dh0wQJt6.js.map
|
|
184
249
|
|
|
185
|
-
//# sourceMappingURL=p-
|
|
250
|
+
//# sourceMappingURL=p-Dh0wQJt6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-Dh0wQJt6.js","mappings":";;AAAA,MAAM,wBAAwB,GAAG,i8VAAi8V;;MCOr9V,qBAAqB,iBAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AALlC,IAAA,WAAA,GAAA;;;;;AAOE;;AAEG;AACsB,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAElD;;AAEG;AACK,QAAA,IAA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A,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,iCAAiC,EACvC,OAAO,EAAE,IAAI,CAAC,SAAS,EACZ,YAAA,EAAA,YAAY,aAGhB,CACL,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oCAAoC,EAAA,EAC5C,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,MAClB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,mCAAmC,IAAE,GAAG,CAAO,CAC3D,CAAC,CACE,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,MAAM,EAAA,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAO,CACrF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-inline-date-picker/xplor-inline-date-picker.scss?tag=xplor-inline-date-picker&encapsulation=scoped","src/components/xplor-inline-date-picker/xplor-inline-date-picker.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.xplor-inline-date-picker {\n --picker-color: #008480;\n display: flex;\n border-radius: 1rem;\n background-color: white;\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n overflow: hidden;\n\n &__sidebar {\n background-color: var(--picker-color);\n color: white;\n padding: 1rem;\n min-width: 180px;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n\n &__sidebar-year {\n font-size: 0.875rem;\n font-weight: 700;\n }\n\n &__sidebar-day {\n font-size: 1.75rem;\n font-weight: 700;\n }\n\n &__sidebar-date {\n font-size: 1.75rem;\n font-weight: 700;\n }\n\n &__calendar {\n display: flex;\n flex-direction: column;\n width: 320px;\n padding: 1rem;\n }\n\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n padding: 0.5rem 0;\n }\n\n &__title {\n font-size: 1rem;\n font-weight: 700;\n color: rgba(0, 0, 0, 0.87);\n }\n\n &__arrow {\n width: 2rem;\n height: 2rem;\n border: none;\n background: transparent;\n font-size: 1.5rem;\n color: rgba(0, 0, 0, 0.54);\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &:active {\n background-color: rgba(0, 0, 0, 0.08);\n }\n }\n\n &__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n margin-bottom: 0.5rem;\n }\n\n &__weekday {\n text-align: center;\n font-size: 0.75rem;\n font-weight: 700;\n color: rgba(0, 0, 0, 0.6);\n padding: 0.5rem 0;\n }\n\n &__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n }\n\n &__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.875rem;\n font-weight: 500;\n border-radius: 50%;\n cursor: pointer;\n transition: background-color 0.2s ease;\n position: relative;\n\n &:not(&--empty):not(&--disabled):hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &--empty {\n cursor: default;\n }\n\n &--today {\n color: var(--picker-color);\n font-weight: 700;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border: 2px solid var(--picker-color);\n border-radius: 50%;\n }\n }\n\n &--selected {\n background-color: var(--picker-color);\n color: white;\n font-weight: 700;\n\n &:hover {\n background-color: var(--picker-color);\n opacity: 0.9;\n }\n\n &::before {\n display: none;\n }\n }\n\n &--disabled {\n color: rgba(0, 0, 0, 0.38);\n cursor: not-allowed;\n pointer-events: none;\n }\n }\n}\n\n// Compact variant (no sidebar)\n:host([compact]) {\n .xplor-inline-date-picker {\n &__sidebar {\n display: none;\n }\n\n &__calendar {\n width: 280px;\n }\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, State, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'xplor-inline-date-picker',\n styleUrl: 'xplor-inline-date-picker.scss',\n scoped: true,\n})\nexport class XplorInlineDatePicker {\n @Element() el: HTMLElement;\n /**\n * Selected date (YYYY-MM-DD format)\n */\n @Prop({ mutable: true }) selectedDate: string = '';\n\n /**\n * Minimum selectable date (YYYY-MM-DD format)\n */\n @Prop() min: string = '';\n\n /**\n * Maximum selectable date (YYYY-MM-DD format)\n */\n @Prop() max: string = '';\n\n /**\n * Whether the date picker is readonly\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Primary color\n */\n @Prop() color: string = '#008480';\n\n /**\n * Whether to start week on Sunday (default: true)\n */\n @Prop() startWeekOnSunday: boolean = true;\n\n /**\n * Date selection event\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Month change event\n */\n @Event() monthChanged: EventEmitter<{ year: number; month: number }>;\n\n @State() currentYear: number;\n @State() currentMonth: number;\n @State() viewDate: Date;\n @State() focusedDay: number = 0;\n\n private monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n private dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n private dayNamesStartMonday = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];\n\n componentWillLoad() {\n const date = this.selectedDate ? new Date(this.selectedDate) : new Date();\n this.currentYear = date.getFullYear();\n this.currentMonth = date.getMonth();\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.focusedDay = date.getDate();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n const daysInMonth = this.getDaysInMonth();\n\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusedDay > 1) {\n this.focusedDay--;\n } else {\n this.previousMonth();\n this.focusedDay = this.getDaysInMonth();\n }\n break;\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusedDay < daysInMonth) {\n this.focusedDay++;\n } else {\n this.nextMonth();\n this.focusedDay = 1;\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.focusedDay > 7) {\n this.focusedDay -= 7;\n } else {\n this.previousMonth();\n this.focusedDay = this.getDaysInMonth() - (7 - this.focusedDay);\n }\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (this.focusedDay + 7 <= daysInMonth) {\n this.focusedDay += 7;\n } else {\n const remainder = this.focusedDay + 7 - daysInMonth;\n this.nextMonth();\n this.focusedDay = remainder;\n }\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (this.focusedDay >= 1 && this.focusedDay <= daysInMonth) {\n this.selectDate(this.focusedDay);\n }\n break;\n default:\n return;\n }\n\n // Focus the day cell after render\n requestAnimationFrame(() => {\n const dayEl = this.el.querySelector(`[data-day=\"${this.focusedDay}\"]`) as HTMLElement;\n if (dayEl) dayEl.focus();\n });\n }\n\n private previousMonth = () => {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.monthChanged.emit({ year: this.currentYear, month: this.currentMonth });\n };\n\n private nextMonth = () => {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.monthChanged.emit({ year: this.currentYear, month: this.currentMonth });\n };\n\n private selectDate = (day: number) => {\n if (this.readonly) return;\n\n const date = new Date(this.currentYear, this.currentMonth, day);\n const dateString = this.formatDate(date);\n\n if (this.isDateDisabled(date)) return;\n\n this.selectedDate = dateString;\n this.dateSelected.emit(dateString);\n };\n\n private formatDate = (date: Date): string => {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n };\n\n private isDateDisabled = (date: Date): boolean => {\n if (this.min) {\n const minDate = new Date(this.min);\n if (date < minDate) return true;\n }\n if (this.max) {\n const maxDate = new Date(this.max);\n if (date > maxDate) return true;\n }\n return false;\n };\n\n private isToday = (day: number): boolean => {\n const today = new Date();\n return (\n day === today.getDate() &&\n this.currentMonth === today.getMonth() &&\n this.currentYear === today.getFullYear()\n );\n };\n\n private isSelected = (day: number): boolean => {\n if (!this.selectedDate) return false;\n const selected = new Date(this.selectedDate);\n return (\n day === selected.getDate() &&\n this.currentMonth === selected.getMonth() &&\n this.currentYear === selected.getFullYear()\n );\n };\n\n private getDaysInMonth = (): number => {\n return new Date(this.currentYear, this.currentMonth + 1, 0).getDate();\n };\n\n private getFirstDayOfMonth = (): number => {\n const firstDay = new Date(this.currentYear, this.currentMonth, 1).getDay();\n return this.startWeekOnSunday ? firstDay : (firstDay === 0 ? 6 : firstDay - 1);\n };\n\n private renderCalendarDays = () => {\n const daysInMonth = this.getDaysInMonth();\n const firstDay = this.getFirstDayOfMonth();\n const days = [];\n\n // Empty cells for days before the first of the month\n for (let i = 0; i < firstDay; i++) {\n days.push(<div class=\"xplor-inline-date-picker__day xplor-inline-date-picker__day--empty\"></div>);\n }\n\n // Days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(this.currentYear, this.currentMonth, day);\n const isDisabled = this.isDateDisabled(date);\n const isToday = this.isToday(day);\n const isSelected = this.isSelected(day);\n\n days.push(\n <div\n class={{\n 'xplor-inline-date-picker__day': true,\n 'xplor-inline-date-picker__day--today': isToday,\n 'xplor-inline-date-picker__day--selected': isSelected,\n 'xplor-inline-date-picker__day--disabled': isDisabled,\n }}\n onClick={() => !isDisabled && this.selectDate(day)}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-current={isToday ? 'date' : undefined}\n aria-disabled={isDisabled ? 'true' : undefined}\n tabIndex={day === this.focusedDay ? 0 : -1}\n data-day={day}\n >\n {day}\n </div>\n );\n }\n\n return days;\n };\n\n private getSidebarDate = () => {\n const date = this.selectedDate ? new Date(this.selectedDate) : new Date();\n const dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return {\n year: date.getFullYear(),\n day: dayNames[date.getDay()],\n date: `${monthNames[date.getMonth()]} ${date.getDate()}`,\n };\n };\n\n render() {\n const sidebarDate = this.getSidebarDate();\n const dayHeaders = this.startWeekOnSunday ? this.dayNames : this.dayNamesStartMonday;\n\n return (\n <Host>\n <div class=\"xplor-inline-date-picker\" style={{ '--picker-color': this.color }}>\n <div class=\"xplor-inline-date-picker__sidebar\">\n <div class=\"xplor-inline-date-picker__sidebar-year\">{sidebarDate.year}</div>\n <div class=\"xplor-inline-date-picker__sidebar-day\">{sidebarDate.day},</div>\n <div class=\"xplor-inline-date-picker__sidebar-date\">{sidebarDate.date}</div>\n </div>\n\n <div class=\"xplor-inline-date-picker__calendar\">\n <div class=\"xplor-inline-date-picker__header\">\n <button\n type=\"button\"\n class=\"xplor-inline-date-picker__arrow\"\n onClick={this.previousMonth}\n aria-label=\"Previous month\"\n >\n ‹\n </button>\n <div class=\"xplor-inline-date-picker__title\">\n {this.monthNames[this.currentMonth]} {this.currentYear}\n </div>\n <button\n type=\"button\"\n class=\"xplor-inline-date-picker__arrow\"\n onClick={this.nextMonth}\n aria-label=\"Next month\"\n >\n ›\n </button>\n </div>\n\n <div class=\"xplor-inline-date-picker__weekdays\">\n {dayHeaders.map((day) => (\n <div class=\"xplor-inline-date-picker__weekday\">{day}</div>\n ))}\n </div>\n\n <div class=\"xplor-inline-date-picker__days\" role=\"grid\">{this.renderCalendarDays()}</div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -9,7 +9,7 @@ const XplorDropdown = /*@__PURE__*/ proxyCustomElement(class XplorDropdown exten
|
|
|
9
9
|
this.__attachShadow();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'bfd5bc76c18f4c7882ec47389978338eec81b1d1' }, h("select", { key: '54310c80fdda944ca6d9cc8faaf643e79d4a5f32', class: "xplor-dropdown", onChange: this.handleChange }, this.options.map((option) => (h("option", { value: option, selected: this.selected === option }, option))))));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return xplorDropdownCss; }
|
|
15
15
|
}, [1, "xplor-dropdown", {
|
|
@@ -33,6 +33,6 @@ function defineCustomElement() {
|
|
|
33
33
|
defineCustomElement();
|
|
34
34
|
|
|
35
35
|
export { XplorDropdown as X, defineCustomElement as d };
|
|
36
|
-
//# sourceMappingURL=p-
|
|
36
|
+
//# sourceMappingURL=p-oOSnPjGy.js.map
|
|
37
37
|
|
|
38
|
-
//# sourceMappingURL=p-
|
|
38
|
+
//# sourceMappingURL=p-oOSnPjGy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-oOSnPjGy.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,66NAA66N;;MCOz7N,aAAa,iBAAAA,kBAAA,CAAA,MAAA,aAAA,SAAAC,CAAA,CAAA;;;;;;IAKxB,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,gBAAgB,EAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,IACvD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MACvB,CAAA,CAAA,QAAA,EAAA,EAAQ,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,KAAK,MAAM,EAAA,EACtD,MAAM,CACA,CACV,CAAC,CACK,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-dropdown/xplor-dropdown.scss?tag=xplor-dropdown&encapsulation=shadow","src/components/xplor-dropdown/xplor-dropdown.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.xplor-dropdown {\n display: block;\n cursor: pointer;\n margin-right: 10px;\n border: 1px solid;\n border-radius: 1rem;\n font-size: 14px;\n font-weight: 500;\n -webkit-box-pack: center;\n letter-spacing: 0.75px;\n height: 45px;\n text-align: center;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'xplor-dropdown',\n styleUrl: 'xplor-dropdown.scss',\n shadow: true,\n})\nexport class XplorDropdown {\n @Prop() options: string[];\n @Prop() selected: string;\n @Prop() handleChange: (event: Event) => void;\n\n render() {\n return (\n <Host>\n <select class=\"xplor-dropdown\" onChange={this.handleChange}>\n {this.options.map((option) => (\n <option value={option} selected={this.selected === option}>\n {option}\n </option>\n ))}\n </select>\n </Host>\n );\n }\n}\n"],"version":3}
|