@xlabs-store/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/components/index.d.ts +35 -0
- package/components/index.js +1 -0
- package/components/p-5c86X8JO.js +1 -0
- package/components/p-6KpqCGp9.js +1 -0
- package/components/p-ADwHM_jT.js +1 -0
- package/components/p-AgSyA7Ia.js +1 -0
- package/components/p-B-7Hwizp.js +1 -0
- package/components/p-B-ClGFfy.js +1 -0
- package/components/p-B4R9Mtmk.js +1 -0
- package/components/p-B4rO7Sgt.js +1 -0
- package/components/p-B5Syz0fw.js +1 -0
- package/components/p-B6p-mzW-.js +1 -0
- package/components/p-B8SZP5Xz.js +1 -0
- package/components/p-BBGHXZqR.js +1 -0
- package/components/p-BHLvuyOq.js +1 -0
- package/components/p-BM-ap7lt.js +1 -0
- package/components/p-BOCR5Zk0.js +1 -0
- package/components/p-BPeosvTA.js +1 -0
- package/components/p-BRBrLtOz.js +1 -0
- package/components/p-BSRP2TGa.js +1 -0
- package/components/p-BUjRcJoK.js +1 -0
- package/components/p-BVeQ5W_G.js +1 -0
- package/components/p-BVnVlCcd.js +1 -0
- package/components/p-BZQcq9R_.js +1 -0
- package/components/p-BeIFU-wn.js +1 -0
- package/components/p-BkEgl31q.js +1 -0
- package/components/p-BkPJ1Whr.js +1 -0
- package/components/p-BkevSugc.js +1 -0
- package/components/p-BkiOFW3H.js +1 -0
- package/components/p-BskMfHyY.js +1 -0
- package/components/p-Bu2JqZs8.js +1 -0
- package/components/p-BvjR2Q5Q.js +1 -0
- package/components/p-Bz7MhZ4K.js +1 -0
- package/components/p-C3gvR6nN.js +1 -0
- package/components/p-C70KKm8p.js +1 -0
- package/components/p-C7csgUoA.js +1 -0
- package/components/p-CAPfC5Vn.js +1 -0
- package/components/p-CEBSDVyp.js +1 -0
- package/components/p-CFB6xkAX.js +1 -0
- package/components/p-CGIxdOEm.js +1 -0
- package/components/p-CGYOWZnh.js +1 -0
- package/components/p-CHRrsVXB.js +1 -0
- package/components/p-CKUzvJue.js +1 -0
- package/components/p-CKVSyuIH.js +1 -0
- package/components/p-COpzIi1n.js +1 -0
- package/components/p-CRBPzT4B.js +1 -0
- package/components/p-CSfrs76m.js +1 -0
- package/components/p-C_ZBjXFP.js +1 -0
- package/components/p-Cd919NAP.js +1 -0
- package/components/p-Ce32Mo_Q.js +1 -0
- package/components/p-Ce5L9qbY.js +1 -0
- package/components/p-CeBfFEIa.js +1 -0
- package/components/p-CfhgoXyB.js +1 -0
- package/components/p-Ck6SW8G3.js +1 -0
- package/components/p-Co3Y9VjQ.js +1 -0
- package/components/p-D66tF8_2.js +1 -0
- package/components/p-D7ijqXRY.js +1 -0
- package/components/p-D7n-26Q5.js +1 -0
- package/components/p-D8ew7Rgv.js +1 -0
- package/components/p-DBk4T-b-.js +1 -0
- package/components/p-DD-W_fMF.js +1 -0
- package/components/p-DElCk9ta.js +1 -0
- package/components/p-DEumEVI3.js +1 -0
- package/components/p-DGqQ8PT4.js +1 -0
- package/components/p-DJ1WhSJ4.js +1 -0
- package/components/p-DOxXxhXb.js +1 -0
- package/components/p-DRa4o4c6.js +1 -0
- package/components/p-DTlSrH8_.js +1 -0
- package/components/p-DTvD0UO5.js +1 -0
- package/components/p-DVz50Dd3.js +1 -0
- package/components/p-DZFphzg1.js +1 -0
- package/components/p-DZPUUptR.js +1 -0
- package/components/p-D_xaGiZU.js +1 -0
- package/components/p-DaL42JUi.js +1 -0
- package/components/p-DbRpEXwX.js +1 -0
- package/components/p-DcRlYBIl.js +1 -0
- package/components/p-Dg0xgMke.js +1 -0
- package/components/p-Dgxy93Bg.js +1 -0
- package/components/p-Dky_8i8S.js +1 -0
- package/components/p-DlwlBBr4.js +1 -0
- package/components/p-DoTf8yXn.js +1 -0
- package/components/p-DphUq6Z5.js +1 -0
- package/components/p-DsgWQbJY.js +1 -0
- package/components/p-Dx3yBe39.js +1 -0
- package/components/p-DxKMnrS8.js +1 -0
- package/components/p-O88oQkR1.js +1 -0
- package/components/p-PlUkLT0A.js +1 -0
- package/components/p-QTSiPk0I.js +1 -0
- package/components/p-TC9DZAbC.js +1 -0
- package/components/p-XBF88YT_.js +1 -0
- package/components/p-bVsOg7S9.js +1 -0
- package/components/p-ccpcKv5U.js +1 -0
- package/components/p-en06CSUT.js +1 -0
- package/components/p-g6ZBqIze.js +1 -0
- package/components/p-noTpj1Kh.js +1 -0
- package/components/x-address.d.ts +11 -0
- package/components/x-address.js +1 -0
- package/components/x-affix.d.ts +11 -0
- package/components/x-affix.js +1 -0
- package/components/x-alert.d.ts +11 -0
- package/components/x-alert.js +1 -0
- package/components/x-anchor-link.d.ts +11 -0
- package/components/x-anchor-link.js +1 -0
- package/components/x-anchor.d.ts +11 -0
- package/components/x-anchor.js +1 -0
- package/components/x-app.d.ts +11 -0
- package/components/x-app.js +1 -0
- package/components/x-auto-complete-dropdown-content.d.ts +11 -0
- package/components/x-auto-complete-dropdown-content.js +1 -0
- package/components/x-auto-complete.d.ts +11 -0
- package/components/x-auto-complete.js +1 -0
- package/components/x-avatar.d.ts +11 -0
- package/components/x-avatar.js +1 -0
- package/components/x-back-top.d.ts +11 -0
- package/components/x-back-top.js +1 -0
- package/components/x-badge.d.ts +11 -0
- package/components/x-badge.js +1 -0
- package/components/x-breadcrumb-item.d.ts +11 -0
- package/components/x-breadcrumb-item.js +1 -0
- package/components/x-breadcrumb.d.ts +11 -0
- package/components/x-breadcrumb.js +1 -0
- package/components/x-button.d.ts +11 -0
- package/components/x-button.js +1 -0
- package/components/x-captcha.d.ts +11 -0
- package/components/x-captcha.js +1 -0
- package/components/x-card.d.ts +11 -0
- package/components/x-card.js +1 -0
- package/components/x-carousel.d.ts +11 -0
- package/components/x-carousel.js +1 -0
- package/components/x-cascader-dropdown-content.d.ts +11 -0
- package/components/x-cascader-dropdown-content.js +1 -0
- package/components/x-cascader.d.ts +11 -0
- package/components/x-cascader.js +1 -0
- package/components/x-checkbox.d.ts +11 -0
- package/components/x-checkbox.js +1 -0
- package/components/x-col.d.ts +11 -0
- package/components/x-col.js +1 -0
- package/components/x-collapse-panel.d.ts +11 -0
- package/components/x-collapse-panel.js +1 -0
- package/components/x-collapse.d.ts +11 -0
- package/components/x-collapse.js +1 -0
- package/components/x-color-picker-panel.d.ts +11 -0
- package/components/x-color-picker-panel.js +1 -0
- package/components/x-color-picker.d.ts +11 -0
- package/components/x-color-picker.js +1 -0
- package/components/x-comment.d.ts +11 -0
- package/components/x-comment.js +1 -0
- package/components/x-content.d.ts +11 -0
- package/components/x-content.js +1 -0
- package/components/x-date-picker-dropdown-content.d.ts +11 -0
- package/components/x-date-picker-dropdown-content.js +1 -0
- package/components/x-date-picker.d.ts +11 -0
- package/components/x-date-picker.js +1 -0
- package/components/x-descriptions-item.d.ts +11 -0
- package/components/x-descriptions-item.js +1 -0
- package/components/x-descriptions.d.ts +11 -0
- package/components/x-descriptions.js +1 -0
- package/components/x-divider.d.ts +11 -0
- package/components/x-divider.js +1 -0
- package/components/x-drawer-content.d.ts +11 -0
- package/components/x-drawer-content.js +1 -0
- package/components/x-drawer.d.ts +11 -0
- package/components/x-drawer.js +1 -0
- package/components/x-dropdown-content.d.ts +11 -0
- package/components/x-dropdown-content.js +1 -0
- package/components/x-dropdown.d.ts +11 -0
- package/components/x-dropdown.js +1 -0
- package/components/x-editor.d.ts +11 -0
- package/components/x-editor.js +1 -0
- package/components/x-empty.d.ts +11 -0
- package/components/x-empty.js +1 -0
- package/components/x-finder.d.ts +11 -0
- package/components/x-finder.js +1 -0
- package/components/x-flex.d.ts +11 -0
- package/components/x-flex.js +1 -0
- package/components/x-float-button.d.ts +11 -0
- package/components/x-float-button.js +1 -0
- package/components/x-footer.d.ts +11 -0
- package/components/x-footer.js +1 -0
- package/components/x-form-builder.d.ts +11 -0
- package/components/x-form-builder.js +1 -0
- package/components/x-form-item.d.ts +11 -0
- package/components/x-form-item.js +1 -0
- package/components/x-form.d.ts +11 -0
- package/components/x-form.js +1 -0
- package/components/x-header.d.ts +11 -0
- package/components/x-header.js +1 -0
- package/components/x-icon.d.ts +11 -0
- package/components/x-icon.js +1 -0
- package/components/x-image.d.ts +11 -0
- package/components/x-image.js +1 -0
- package/components/x-infinite-scroll.d.ts +11 -0
- package/components/x-infinite-scroll.js +1 -0
- package/components/x-input-number.d.ts +11 -0
- package/components/x-input-number.js +1 -0
- package/components/x-input.d.ts +11 -0
- package/components/x-input.js +1 -0
- package/components/x-layout.d.ts +11 -0
- package/components/x-layout.js +1 -0
- package/components/x-list-item.d.ts +11 -0
- package/components/x-list-item.js +1 -0
- package/components/x-list.d.ts +11 -0
- package/components/x-list.js +1 -0
- package/components/x-mentions.d.ts +11 -0
- package/components/x-mentions.js +1 -0
- package/components/x-menu-divider.d.ts +11 -0
- package/components/x-menu-divider.js +1 -0
- package/components/x-menu-item-group.d.ts +11 -0
- package/components/x-menu-item-group.js +1 -0
- package/components/x-menu-item.d.ts +11 -0
- package/components/x-menu-item.js +1 -0
- package/components/x-menu-submenu.d.ts +11 -0
- package/components/x-menu-submenu.js +1 -0
- package/components/x-menu.d.ts +11 -0
- package/components/x-menu.js +1 -0
- package/components/x-message.d.ts +11 -0
- package/components/x-message.js +1 -0
- package/components/x-modal-content.d.ts +11 -0
- package/components/x-modal-content.js +1 -0
- package/components/x-modal.d.ts +11 -0
- package/components/x-modal.js +1 -0
- package/components/x-notification.d.ts +11 -0
- package/components/x-notification.js +1 -0
- package/components/x-page-header.d.ts +11 -0
- package/components/x-page-header.js +1 -0
- package/components/x-pagination.d.ts +11 -0
- package/components/x-pagination.js +1 -0
- package/components/x-popconfirm-content.d.ts +11 -0
- package/components/x-popconfirm-content.js +1 -0
- package/components/x-popconfirm.d.ts +11 -0
- package/components/x-popconfirm.js +1 -0
- package/components/x-popover-content.d.ts +11 -0
- package/components/x-popover-content.js +1 -0
- package/components/x-popover.d.ts +11 -0
- package/components/x-popover.js +1 -0
- package/components/x-progress.d.ts +11 -0
- package/components/x-progress.js +1 -0
- package/components/x-qr-code.d.ts +11 -0
- package/components/x-qr-code.js +1 -0
- package/components/x-radio-group.d.ts +11 -0
- package/components/x-radio-group.js +1 -0
- package/components/x-radio.d.ts +11 -0
- package/components/x-radio.js +1 -0
- package/components/x-range-picker-dropdown-content.d.ts +11 -0
- package/components/x-range-picker-dropdown-content.js +1 -0
- package/components/x-range-picker.d.ts +11 -0
- package/components/x-range-picker.js +1 -0
- package/components/x-rate.d.ts +11 -0
- package/components/x-rate.js +1 -0
- package/components/x-result.d.ts +11 -0
- package/components/x-result.js +1 -0
- package/components/x-row.d.ts +11 -0
- package/components/x-row.js +1 -0
- package/components/x-segmented.d.ts +11 -0
- package/components/x-segmented.js +1 -0
- package/components/x-select-dropdown-content.d.ts +11 -0
- package/components/x-select-dropdown-content.js +1 -0
- package/components/x-select-option.d.ts +11 -0
- package/components/x-select-option.js +1 -0
- package/components/x-select.d.ts +11 -0
- package/components/x-select.js +1 -0
- package/components/x-sider.d.ts +11 -0
- package/components/x-sider.js +1 -0
- package/components/x-skeleton.d.ts +11 -0
- package/components/x-skeleton.js +1 -0
- package/components/x-slider.d.ts +11 -0
- package/components/x-slider.js +1 -0
- package/components/x-space.d.ts +11 -0
- package/components/x-space.js +1 -0
- package/components/x-spin.d.ts +11 -0
- package/components/x-spin.js +1 -0
- package/components/x-splitter-panel.d.ts +11 -0
- package/components/x-splitter-panel.js +1 -0
- package/components/x-splitter.d.ts +11 -0
- package/components/x-splitter.js +1 -0
- package/components/x-statistic.d.ts +11 -0
- package/components/x-statistic.js +1 -0
- package/components/x-step.d.ts +11 -0
- package/components/x-step.js +1 -0
- package/components/x-steps.d.ts +11 -0
- package/components/x-steps.js +1 -0
- package/components/x-switch.d.ts +11 -0
- package/components/x-switch.js +1 -0
- package/components/x-tab-pane.d.ts +11 -0
- package/components/x-tab-pane.js +1 -0
- package/components/x-table-cell.d.ts +11 -0
- package/components/x-table-cell.js +1 -0
- package/components/x-table-row.d.ts +11 -0
- package/components/x-table-row.js +1 -0
- package/components/x-table.d.ts +11 -0
- package/components/x-table.js +1 -0
- package/components/x-tabs.d.ts +11 -0
- package/components/x-tabs.js +1 -0
- package/components/x-tag.d.ts +11 -0
- package/components/x-tag.js +1 -0
- package/components/x-textarea.d.ts +11 -0
- package/components/x-textarea.js +1 -0
- package/components/x-time-picker-dropdown-content.d.ts +11 -0
- package/components/x-time-picker-dropdown-content.js +1 -0
- package/components/x-time-picker.d.ts +11 -0
- package/components/x-time-picker.js +1 -0
- package/components/x-timeline-item.d.ts +11 -0
- package/components/x-timeline-item.js +1 -0
- package/components/x-timeline.d.ts +11 -0
- package/components/x-timeline.js +1 -0
- package/components/x-tooltip-content.d.ts +11 -0
- package/components/x-tooltip-content.js +1 -0
- package/components/x-tooltip.d.ts +11 -0
- package/components/x-tooltip.js +1 -0
- package/components/x-tour-panel.d.ts +11 -0
- package/components/x-tour-panel.js +1 -0
- package/components/x-tour.d.ts +11 -0
- package/components/x-tour.js +1 -0
- package/components/x-transfer.d.ts +11 -0
- package/components/x-transfer.js +1 -0
- package/components/x-tree-select-dropdown-content.d.ts +11 -0
- package/components/x-tree-select-dropdown-content.js +1 -0
- package/components/x-tree-select.d.ts +11 -0
- package/components/x-tree-select.js +1 -0
- package/components/x-tree.d.ts +11 -0
- package/components/x-tree.js +1 -0
- package/components/x-typography.d.ts +11 -0
- package/components/x-typography.js +1 -0
- package/components/x-upload.d.ts +11 -0
- package/components/x-upload.js +1 -0
- package/components/x-virtual-scroll.d.ts +11 -0
- package/components/x-virtual-scroll.js +1 -0
- package/components/x-workflow-builder.d.ts +11 -0
- package/components/x-workflow-builder.js +1 -0
- package/components/x-workflow.d.ts +11 -0
- package/components/x-workflow.js +1 -0
- package/dist/cjs/abstract-control-C4D0eNCC.js +277 -0
- package/dist/cjs/config-BP9bROYD.js +63 -0
- package/dist/cjs/index-C7sKs9A2.js +2170 -0
- package/dist/cjs/index.cjs.js +14 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/locale.service-Cz-aZQnr.js +8203 -0
- package/dist/cjs/modal-service-BtAF0mFq.js +399 -0
- package/dist/cjs/notification-service-m6I5U9aG.js +602 -0
- package/dist/cjs/portal-controller-CtYVbhXL.js +504 -0
- package/dist/cjs/schema-builder-CYnX7lKi.js +1505 -0
- package/dist/cjs/tree.service-fxLOCSpD.js +339 -0
- package/dist/cjs/types-DQ-V76ZQ.js +255 -0
- package/dist/cjs/x-address_14.cjs.entry.js +12577 -0
- package/dist/cjs/x-affix.cjs.entry.js +182 -0
- package/dist/cjs/x-alert_11.cjs.entry.js +3239 -0
- package/dist/cjs/x-anchor-link.cjs.entry.js +67 -0
- package/dist/cjs/x-anchor.cjs.entry.js +158 -0
- package/dist/cjs/x-app.cjs.entry.js +137 -0
- package/dist/cjs/x-auto-complete-dropdown-content.cjs.entry.js +69 -0
- package/dist/cjs/x-avatar.cjs.entry.js +269 -0
- package/dist/cjs/x-back-top.cjs.entry.js +89 -0
- package/dist/cjs/x-breadcrumb_5.cjs.entry.js +1554 -0
- package/dist/cjs/x-button.cjs.entry.js +174 -0
- package/dist/cjs/x-card_12.cjs.entry.js +1386 -0
- package/dist/cjs/x-carousel.cjs.entry.js +147 -0
- package/dist/cjs/x-cascader-dropdown-content.cjs.entry.js +364 -0
- package/dist/cjs/x-checkbox_5.cjs.entry.js +1376 -0
- package/dist/cjs/x-collapse-panel.cjs.entry.js +243 -0
- package/dist/cjs/x-collapse.cjs.entry.js +291 -0
- package/dist/cjs/x-color-picker-panel_2.cjs.entry.js +873 -0
- package/dist/cjs/x-color-picker_9.cjs.entry.js +3085 -0
- package/dist/cjs/x-comment.cjs.entry.js +189 -0
- package/dist/cjs/x-date-picker-dropdown-content.cjs.entry.js +757 -0
- package/dist/cjs/x-descriptions-item.cjs.entry.js +108 -0
- package/dist/cjs/x-drawer-content.cjs.entry.js +197 -0
- package/dist/cjs/x-drawer.cjs.entry.js +294 -0
- package/dist/cjs/x-dropdown_2.cjs.entry.js +735 -0
- package/dist/cjs/x-empty.cjs.entry.js +64 -0
- package/dist/cjs/x-finder.cjs.entry.js +647 -0
- package/dist/cjs/x-form-builder.cjs.entry.js +807 -0
- package/dist/cjs/x-icon.cjs.entry.js +144 -0
- package/dist/cjs/x-infinite-scroll.cjs.entry.js +129 -0
- package/dist/cjs/x-list-item.cjs.entry.js +27 -0
- package/dist/cjs/x-list.cjs.entry.js +138 -0
- package/dist/cjs/x-mentions.cjs.entry.js +275 -0
- package/dist/cjs/x-menu-divider.cjs.entry.js +49 -0
- package/dist/cjs/x-menu-item-group.cjs.entry.js +149 -0
- package/dist/cjs/x-menu-submenu.cjs.entry.js +373 -0
- package/dist/cjs/x-message.cjs.entry.js +219 -0
- package/dist/cjs/x-modal-content.cjs.entry.js +217 -0
- package/dist/cjs/x-notification.cjs.entry.js +325 -0
- package/dist/cjs/x-page-header.cjs.entry.js +67 -0
- package/dist/cjs/x-popconfirm-content.cjs.entry.js +72 -0
- package/dist/cjs/x-popconfirm.cjs.entry.js +181 -0
- package/dist/cjs/x-progress.cjs.entry.js +136 -0
- package/dist/cjs/x-qr-code.cjs.entry.js +446 -0
- package/dist/cjs/x-range-picker-dropdown-content.cjs.entry.js +821 -0
- package/dist/cjs/x-select_2.cjs.entry.js +1316 -0
- package/dist/cjs/x-skeleton.cjs.entry.js +75 -0
- package/dist/cjs/x-spin.cjs.entry.js +62 -0
- package/dist/cjs/x-splitter-panel.cjs.entry.js +91 -0
- package/dist/cjs/x-splitter.cjs.entry.js +612 -0
- package/dist/cjs/x-statistic.cjs.entry.js +104 -0
- package/dist/cjs/x-step.cjs.entry.js +179 -0
- package/dist/cjs/x-steps.cjs.entry.js +439 -0
- package/dist/cjs/x-tab-pane.cjs.entry.js +73 -0
- package/dist/cjs/x-table-cell.cjs.entry.js +45 -0
- package/dist/cjs/x-table-row.cjs.entry.js +85 -0
- package/dist/cjs/x-tabs.cjs.entry.js +609 -0
- package/dist/cjs/x-time-picker-dropdown-content.cjs.entry.js +389 -0
- package/dist/cjs/x-timeline-item.cjs.entry.js +50 -0
- package/dist/cjs/x-timeline.cjs.entry.js +52 -0
- package/dist/cjs/x-tour-panel.cjs.entry.js +89 -0
- package/dist/cjs/x-tour.cjs.entry.js +344 -0
- package/dist/cjs/x-tree-select-dropdown-content.cjs.entry.js +439 -0
- package/dist/cjs/x-virtual-scroll.cjs.entry.js +203 -0
- package/dist/cjs/x-workflow-builder.cjs.entry.js +366 -0
- package/dist/cjs/xlabs-store.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +130 -0
- package/dist/collection/components/x-address/vietnam-data.js +28 -0
- package/dist/collection/components/x-address/x-address.css +367 -0
- package/dist/collection/components/x-address/x-address.js +403 -0
- package/dist/collection/components/x-affix/x-affix.css +27 -0
- package/dist/collection/components/x-affix/x-affix.js +299 -0
- package/dist/collection/components/x-alert/x-alert.css +475 -0
- package/dist/collection/components/x-alert/x-alert.js +273 -0
- package/dist/collection/components/x-anchor/x-anchor.css +74 -0
- package/dist/collection/components/x-anchor/x-anchor.js +371 -0
- package/dist/collection/components/x-anchor-link/x-anchor-link.css +43 -0
- package/dist/collection/components/x-anchor-link/x-anchor-link.js +145 -0
- package/dist/collection/components/x-app/x-app.css +14 -0
- package/dist/collection/components/x-app/x-app.js +308 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.css +410 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.js +166 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-auto-complete/types.js +61 -0
- package/dist/collection/components/x-auto-complete/x-auto-complete.css +535 -0
- package/dist/collection/components/x-auto-complete/x-auto-complete.js +1829 -0
- package/dist/collection/components/x-avatar/types.js +1 -0
- package/dist/collection/components/x-avatar/x-avatar.css +128 -0
- package/dist/collection/components/x-avatar/x-avatar.js +533 -0
- package/dist/collection/components/x-back-top/x-back-top.css +56 -0
- package/dist/collection/components/x-back-top/x-back-top.js +148 -0
- package/dist/collection/components/x-badge/types.js +1 -0
- package/dist/collection/components/x-badge/x-badge.css +233 -0
- package/dist/collection/components/x-badge/x-badge.js +618 -0
- package/dist/collection/components/x-breadcrumb/x-breadcrumb.css +44 -0
- package/dist/collection/components/x-breadcrumb/x-breadcrumb.js +96 -0
- package/dist/collection/components/x-breadcrumb-item/x-breadcrumb-item.css +63 -0
- package/dist/collection/components/x-breadcrumb-item/x-breadcrumb-item.js +147 -0
- package/dist/collection/components/x-button/x-button.css +278 -0
- package/dist/collection/components/x-button/x-button.js +488 -0
- package/dist/collection/components/x-captcha/x-captcha.css +125 -0
- package/dist/collection/components/x-captcha/x-captcha.js +408 -0
- package/dist/collection/components/x-card/x-card.css +523 -0
- package/dist/collection/components/x-card/x-card.js +389 -0
- package/dist/collection/components/x-carousel/x-carousel.css +417 -0
- package/dist/collection/components/x-carousel/x-carousel.js +257 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.css +529 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.js +771 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/index.js +2 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-cascader/types.js +1 -0
- package/dist/collection/components/x-cascader/x-cascader.css +691 -0
- package/dist/collection/components/x-cascader/x-cascader.js +1841 -0
- package/dist/collection/components/x-checkbox/types.js +1 -0
- package/dist/collection/components/x-checkbox/x-checkbox.css +541 -0
- package/dist/collection/components/x-checkbox/x-checkbox.js +681 -0
- package/dist/collection/components/x-col/x-col.css +1704 -0
- package/dist/collection/components/x-col/x-col.js +479 -0
- package/dist/collection/components/x-collapse/types.js +1 -0
- package/dist/collection/components/x-collapse/x-collapse.css +384 -0
- package/dist/collection/components/x-collapse/x-collapse.js +579 -0
- package/dist/collection/components/x-collapse-panel/x-collapse-panel.css +486 -0
- package/dist/collection/components/x-collapse-panel/x-collapse-panel.js +500 -0
- package/dist/collection/components/x-color-picker/types.js +251 -0
- package/dist/collection/components/x-color-picker/x-color-picker-panel.css +310 -0
- package/dist/collection/components/x-color-picker/x-color-picker-panel.js +575 -0
- package/dist/collection/components/x-color-picker/x-color-picker.css +446 -0
- package/dist/collection/components/x-color-picker/x-color-picker.js +1209 -0
- package/dist/collection/components/x-comment/types.js +1 -0
- package/dist/collection/components/x-comment/x-comment.css +442 -0
- package/dist/collection/components/x-comment/x-comment.js +306 -0
- package/dist/collection/components/x-content/types.js +1 -0
- package/dist/collection/components/x-content/x-content.css +361 -0
- package/dist/collection/components/x-content/x-content.js +402 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.css +691 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.js +1496 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-date-picker/types.js +1 -0
- package/dist/collection/components/x-date-picker/x-date-picker.css +804 -0
- package/dist/collection/components/x-date-picker/x-date-picker.js +2110 -0
- package/dist/collection/components/x-descriptions/types.js +1 -0
- package/dist/collection/components/x-descriptions/x-descriptions.css +417 -0
- package/dist/collection/components/x-descriptions/x-descriptions.js +494 -0
- package/dist/collection/components/x-descriptions-item/x-descriptions-item.css +387 -0
- package/dist/collection/components/x-descriptions-item/x-descriptions-item.js +238 -0
- package/dist/collection/components/x-divider/x-divider.css +417 -0
- package/dist/collection/components/x-divider/x-divider.js +263 -0
- package/dist/collection/components/x-drawer/x-drawer.css +333 -0
- package/dist/collection/components/x-drawer/x-drawer.js +623 -0
- package/dist/collection/components/x-drawer-content/x-drawer-content.css +481 -0
- package/dist/collection/components/x-drawer-content/x-drawer-content.js +579 -0
- package/dist/collection/components/x-dropdown/dropdown-content/dropdown-content.css +673 -0
- package/dist/collection/components/x-dropdown/dropdown-content/dropdown-content.js +294 -0
- package/dist/collection/components/x-dropdown/dropdown-content/types.js +1 -0
- package/dist/collection/components/x-dropdown/types.js +1 -0
- package/dist/collection/components/x-dropdown/x-dropdown.css +669 -0
- package/dist/collection/components/x-dropdown/x-dropdown.js +1004 -0
- package/dist/collection/components/x-editor/editor-history.js +118 -0
- package/dist/collection/components/x-editor/editor-normalizer.js +263 -0
- package/dist/collection/components/x-editor/editor-parser.js +326 -0
- package/dist/collection/components/x-editor/editor-selection.js +415 -0
- package/dist/collection/components/x-editor/types.js +33 -0
- package/dist/collection/components/x-editor/x-editor.css +599 -0
- package/dist/collection/components/x-editor/x-editor.js +1636 -0
- package/dist/collection/components/x-empty/x-empty.css +357 -0
- package/dist/collection/components/x-empty/x-empty.js +117 -0
- package/dist/collection/components/x-finder/services/finder-service.js +250 -0
- package/dist/collection/components/x-finder/types.js +1 -0
- package/dist/collection/components/x-finder/x-finder.css +633 -0
- package/dist/collection/components/x-finder/x-finder.js +540 -0
- package/dist/collection/components/x-flex/x-flex.css +344 -0
- package/dist/collection/components/x-flex/x-flex.js +285 -0
- package/dist/collection/components/x-float-button/x-float-button.css +389 -0
- package/dist/collection/components/x-float-button/x-float-button.js +265 -0
- package/dist/collection/components/x-footer/x-footer.css +346 -0
- package/dist/collection/components/x-footer/x-footer.js +29 -0
- package/dist/collection/components/x-form/x-form.css +365 -0
- package/dist/collection/components/x-form/x-form.js +355 -0
- package/dist/collection/components/x-form-builder/services/apis/api-client.js +240 -0
- package/dist/collection/components/x-form-builder/services/constants/index.js +33 -0
- package/dist/collection/components/x-form-builder/services/forms/abstract-control.js +175 -0
- package/dist/collection/components/x-form-builder/services/forms/form-array.js +92 -0
- package/dist/collection/components/x-form-builder/services/forms/form-builder.js +40 -0
- package/dist/collection/components/x-form-builder/services/forms/form-control.js +33 -0
- package/dist/collection/components/x-form-builder/services/forms/form-group.js +150 -0
- package/dist/collection/components/x-form-builder/services/forms/index.js +7 -0
- package/dist/collection/components/x-form-builder/services/forms/types.js +1 -0
- package/dist/collection/components/x-form-builder/services/forms/validators.js +83 -0
- package/dist/collection/components/x-form-builder/services/schema/condition-builder.js +337 -0
- package/dist/collection/components/x-form-builder/services/schema/default-registry.js +440 -0
- package/dist/collection/components/x-form-builder/services/schema/form-mapping.js +176 -0
- package/dist/collection/components/x-form-builder/services/schema/form-registry.js +30 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-actions.js +3 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-builder.js +52 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-validator.js +53 -0
- package/dist/collection/components/x-form-builder/types/api/api-common-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/api/api-interfaces.js +1 -0
- package/dist/collection/components/x-form-builder/types/api/index.js +2 -0
- package/dist/collection/components/x-form-builder/types/common/common-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/condition-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/field-types-enum.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/index.js +7 -0
- package/dist/collection/components/x-form-builder/types/common/shared-interfaces.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/validation-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/value-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/event/event-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/event/index.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/advanced-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/base-field.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/datetime-file-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/display-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/form-field-union.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/index.js +9 -0
- package/dist/collection/components/x-form-builder/types/fields/input-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/layout-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/selection-fields.js +10 -0
- package/dist/collection/components/x-form-builder/types/fields/special-input-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/form/events-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/form/form-config.js +50 -0
- package/dist/collection/components/x-form-builder/types/form/index.js +2 -0
- package/dist/collection/components/x-form-builder/types/form/schema-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/index.js +4 -0
- package/dist/collection/components/x-form-builder/utils/condition-engine.js +118 -0
- package/dist/collection/components/x-form-builder/utils/utils.js +138 -0
- package/dist/collection/components/x-form-builder/utils/values.js +36 -0
- package/dist/collection/components/x-form-builder/x-form-builder.css +3 -0
- package/dist/collection/components/x-form-builder/x-form-builder.js +1017 -0
- package/dist/collection/components/x-form-item/x-form-item.css +564 -0
- package/dist/collection/components/x-form-item/x-form-item.js +538 -0
- package/dist/collection/components/x-header/x-header.css +344 -0
- package/dist/collection/components/x-header/x-header.js +29 -0
- package/dist/collection/components/x-icon/fonts/xlabs-outlined.woff2 +0 -0
- package/dist/collection/components/x-icon/fonts/xlabs-rounded.woff2 +0 -0
- package/dist/collection/components/x-icon/fonts/xlabs-solided.woff2 +0 -0
- package/dist/collection/components/x-icon/icons.js +2716 -0
- package/dist/collection/components/x-icon/x-icon.css +378 -0
- package/dist/collection/components/x-icon/x-icon.js +353 -0
- package/dist/collection/components/x-image/types.js +1 -0
- package/dist/collection/components/x-image/x-image.css +556 -0
- package/dist/collection/components/x-image/x-image.js +628 -0
- package/dist/collection/components/x-infinite-scroll/x-infinite-scroll.css +345 -0
- package/dist/collection/components/x-infinite-scroll/x-infinite-scroll.js +294 -0
- package/dist/collection/components/x-input/types.js +1 -0
- package/dist/collection/components/x-input/x-input.css +640 -0
- package/dist/collection/components/x-input/x-input.js +1449 -0
- package/dist/collection/components/x-input-number/types.js +96 -0
- package/dist/collection/components/x-input-number/x-input-number.css +612 -0
- package/dist/collection/components/x-input-number/x-input-number.js +1488 -0
- package/dist/collection/components/x-layout/x-layout.css +361 -0
- package/dist/collection/components/x-layout/x-layout.js +188 -0
- package/dist/collection/components/x-list/x-list.css +382 -0
- package/dist/collection/components/x-list/x-list.js +373 -0
- package/dist/collection/components/x-list-item/x-list-item.css +351 -0
- package/dist/collection/components/x-list-item/x-list-item.js +31 -0
- package/dist/collection/components/x-mentions/types.js +1 -0
- package/dist/collection/components/x-mentions/x-mentions.css +388 -0
- package/dist/collection/components/x-mentions/x-mentions.js +528 -0
- package/dist/collection/components/x-menu/types.js +1 -0
- package/dist/collection/components/x-menu/x-menu.css +78 -0
- package/dist/collection/components/x-menu/x-menu.js +793 -0
- package/dist/collection/components/x-menu-divider/types.js +1 -0
- package/dist/collection/components/x-menu-divider/x-menu-divider.css +31 -0
- package/dist/collection/components/x-menu-divider/x-menu-divider.js +126 -0
- package/dist/collection/components/x-menu-item/types.js +1 -0
- package/dist/collection/components/x-menu-item/x-menu-item.css +183 -0
- package/dist/collection/components/x-menu-item/x-menu-item.js +449 -0
- package/dist/collection/components/x-menu-item-group/types.js +1 -0
- package/dist/collection/components/x-menu-item-group/x-menu-item-group.css +45 -0
- package/dist/collection/components/x-menu-item-group/x-menu-item-group.js +299 -0
- package/dist/collection/components/x-menu-submenu/types.js +1 -0
- package/dist/collection/components/x-menu-submenu/x-menu-submenu.css +236 -0
- package/dist/collection/components/x-menu-submenu/x-menu-submenu.js +775 -0
- package/dist/collection/components/x-message/message-service.js +263 -0
- package/dist/collection/components/x-message/types.js +1 -0
- package/dist/collection/components/x-message/x-message.css +402 -0
- package/dist/collection/components/x-message/x-message.js +487 -0
- package/dist/collection/components/x-modal/modal-service.js +402 -0
- package/dist/collection/components/x-modal/modal-service.types.js +1 -0
- package/dist/collection/components/x-modal/x-modal.css +468 -0
- package/dist/collection/components/x-modal/x-modal.js +683 -0
- package/dist/collection/components/x-modal-content/index.js +1 -0
- package/dist/collection/components/x-modal-content/types.js +1 -0
- package/dist/collection/components/x-modal-content/x-modal-content.css +749 -0
- package/dist/collection/components/x-modal-content/x-modal-content.js +701 -0
- package/dist/collection/components/x-notification/notification-service.js +335 -0
- package/dist/collection/components/x-notification/types.js +1 -0
- package/dist/collection/components/x-notification/x-notification.css +486 -0
- package/dist/collection/components/x-notification/x-notification.js +788 -0
- package/dist/collection/components/x-page-header/x-page-header.css +406 -0
- package/dist/collection/components/x-page-header/x-page-header.js +159 -0
- package/dist/collection/components/x-pagination/types.js +1 -0
- package/dist/collection/components/x-pagination/x-pagination.css +705 -0
- package/dist/collection/components/x-pagination/x-pagination.js +1241 -0
- package/dist/collection/components/x-popconfirm/popconfirm-content/popconfirm-content.css +456 -0
- package/dist/collection/components/x-popconfirm/popconfirm-content/popconfirm-content.js +244 -0
- package/dist/collection/components/x-popconfirm/x-popconfirm.css +412 -0
- package/dist/collection/components/x-popconfirm/x-popconfirm.js +355 -0
- package/dist/collection/components/x-popover/popover-content/popover-content.css +437 -0
- package/dist/collection/components/x-popover/popover-content/popover-content.js +261 -0
- package/dist/collection/components/x-popover/x-popover.css +442 -0
- package/dist/collection/components/x-popover/x-popover.js +390 -0
- package/dist/collection/components/x-portal/debug.js +42 -0
- package/dist/collection/components/x-portal/index.js +1 -0
- package/dist/collection/components/x-portal/portal-controller.js +146 -0
- package/dist/collection/components/x-portal/positioning.js +332 -0
- package/dist/collection/components/x-portal/types.js +1 -0
- package/dist/collection/components/x-portal/x-portal.js +21 -0
- package/dist/collection/components/x-progress/x-progress.css +424 -0
- package/dist/collection/components/x-progress/x-progress.js +326 -0
- package/dist/collection/components/x-qr-code/x-qr-code.css +37 -0
- package/dist/collection/components/x-qr-code/x-qr-code.js +292 -0
- package/dist/collection/components/x-radio/types.js +1 -0
- package/dist/collection/components/x-radio/x-radio.css +523 -0
- package/dist/collection/components/x-radio/x-radio.js +689 -0
- package/dist/collection/components/x-radio-group/types.js +1 -0
- package/dist/collection/components/x-radio-group/x-radio-group.css +326 -0
- package/dist/collection/components/x-radio-group/x-radio-group.js +531 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.css +609 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.js +1497 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-range-picker/types.js +1 -0
- package/dist/collection/components/x-range-picker/x-range-picker.css +775 -0
- package/dist/collection/components/x-range-picker/x-range-picker.js +1883 -0
- package/dist/collection/components/x-rate/x-rate.css +396 -0
- package/dist/collection/components/x-rate/x-rate.js +445 -0
- package/dist/collection/components/x-result/types.js +1 -0
- package/dist/collection/components/x-result/x-result.css +434 -0
- package/dist/collection/components/x-result/x-result.js +376 -0
- package/dist/collection/components/x-row/x-row.css +345 -0
- package/dist/collection/components/x-row/x-row.js +196 -0
- package/dist/collection/components/x-segmented/types.js +1 -0
- package/dist/collection/components/x-segmented/x-segmented.css +407 -0
- package/dist/collection/components/x-segmented/x-segmented.js +414 -0
- package/dist/collection/components/x-select/select-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-select/select-dropdown-content/select-dropdown-content.css +827 -0
- package/dist/collection/components/x-select/select-dropdown-content/select-dropdown-content.js +163 -0
- package/dist/collection/components/x-select/select-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-select/types.js +9 -0
- package/dist/collection/components/x-select/x-select.css +823 -0
- package/dist/collection/components/x-select/x-select.js +2247 -0
- package/dist/collection/components/x-select-option/x-select-option.css +379 -0
- package/dist/collection/components/x-select-option/x-select-option.js +207 -0
- package/dist/collection/components/x-sider/x-sider.css +379 -0
- package/dist/collection/components/x-sider/x-sider.js +379 -0
- package/dist/collection/components/x-skeleton/x-skeleton.css +400 -0
- package/dist/collection/components/x-skeleton/x-skeleton.js +221 -0
- package/dist/collection/components/x-slider/types.js +1 -0
- package/dist/collection/components/x-slider/x-slider.css +511 -0
- package/dist/collection/components/x-slider/x-slider.js +785 -0
- package/dist/collection/components/x-space/x-space.css +339 -0
- package/dist/collection/components/x-space/x-space.js +228 -0
- package/dist/collection/components/x-spin/x-spin.css +465 -0
- package/dist/collection/components/x-spin/x-spin.js +142 -0
- package/dist/collection/components/x-splitter/types.js +1 -0
- package/dist/collection/components/x-splitter/x-splitter.css +181 -0
- package/dist/collection/components/x-splitter/x-splitter.js +884 -0
- package/dist/collection/components/x-splitter-panel/types.js +1 -0
- package/dist/collection/components/x-splitter-panel/x-splitter-panel.css +25 -0
- package/dist/collection/components/x-splitter-panel/x-splitter-panel.js +292 -0
- package/dist/collection/components/x-statistic/x-statistic.css +366 -0
- package/dist/collection/components/x-statistic/x-statistic.js +291 -0
- package/dist/collection/components/x-step/types.js +1 -0
- package/dist/collection/components/x-step/x-step.css +801 -0
- package/dist/collection/components/x-step/x-step.js +539 -0
- package/dist/collection/components/x-steps/types.js +1 -0
- package/dist/collection/components/x-steps/x-steps.css +830 -0
- package/dist/collection/components/x-steps/x-steps.js +1032 -0
- package/dist/collection/components/x-switch/types.js +1 -0
- package/dist/collection/components/x-switch/x-switch.css +463 -0
- package/dist/collection/components/x-switch/x-switch.js +356 -0
- package/dist/collection/components/x-tab-pane/x-tab-pane.css +337 -0
- package/dist/collection/components/x-tab-pane/x-tab-pane.js +243 -0
- package/dist/collection/components/x-table/column-util.js +87 -0
- package/dist/collection/components/x-table/types.js +1 -0
- package/dist/collection/components/x-table/x-table.css +898 -0
- package/dist/collection/components/x-table/x-table.js +2464 -0
- package/dist/collection/components/x-table-cell/x-table-cell.css +337 -0
- package/dist/collection/components/x-table-cell/x-table-cell.js +167 -0
- package/dist/collection/components/x-table-row/x-table-row.css +336 -0
- package/dist/collection/components/x-table-row/x-table-row.js +172 -0
- package/dist/collection/components/x-tabs/types.js +1 -0
- package/dist/collection/components/x-tabs/x-tabs.css +664 -0
- package/dist/collection/components/x-tabs/x-tabs.js +1264 -0
- package/dist/collection/components/x-tag/types.js +1 -0
- package/dist/collection/components/x-tag/x-tag.css +1047 -0
- package/dist/collection/components/x-tag/x-tag.js +535 -0
- package/dist/collection/components/x-textarea/x-textarea.css +446 -0
- package/dist/collection/components/x-textarea/x-textarea.js +553 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.css +409 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.js +855 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-time-picker/types.js +1 -0
- package/dist/collection/components/x-time-picker/x-time-picker.css +653 -0
- package/dist/collection/components/x-time-picker/x-time-picker.js +1454 -0
- package/dist/collection/components/x-timeline/x-timeline.css +404 -0
- package/dist/collection/components/x-timeline/x-timeline.js +129 -0
- package/dist/collection/components/x-timeline-item/x-timeline-item.css +400 -0
- package/dist/collection/components/x-timeline-item/x-timeline-item.js +125 -0
- package/dist/collection/components/x-tooltip/types.js +1 -0
- package/dist/collection/components/x-tooltip/x-tooltip.css +528 -0
- package/dist/collection/components/x-tooltip/x-tooltip.js +1006 -0
- package/dist/collection/components/x-tooltip-content/index.js +1 -0
- package/dist/collection/components/x-tooltip-content/types.js +1 -0
- package/dist/collection/components/x-tooltip-content/x-tooltip-content.css +217 -0
- package/dist/collection/components/x-tooltip-content/x-tooltip-content.js +238 -0
- package/dist/collection/components/x-tour/index.js +1 -0
- package/dist/collection/components/x-tour/types.js +1 -0
- package/dist/collection/components/x-tour/x-tour-panel.css +467 -0
- package/dist/collection/components/x-tour/x-tour-panel.js +265 -0
- package/dist/collection/components/x-tour/x-tour.css +353 -0
- package/dist/collection/components/x-tour/x-tour.js +555 -0
- package/dist/collection/components/x-transfer/types.js +1 -0
- package/dist/collection/components/x-transfer/x-transfer.css +626 -0
- package/dist/collection/components/x-transfer/x-transfer.js +956 -0
- package/dist/collection/components/x-tree/types.js +1 -0
- package/dist/collection/components/x-tree/x-tree.css +703 -0
- package/dist/collection/components/x-tree/x-tree.js +1793 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/index.js +2 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.css +635 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.js +890 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-tree-select/types.js +2 -0
- package/dist/collection/components/x-tree-select/x-tree-select.css +790 -0
- package/dist/collection/components/x-tree-select/x-tree-select.js +2750 -0
- package/dist/collection/components/x-typography/x-typography.css +409 -0
- package/dist/collection/components/x-typography/x-typography.js +431 -0
- package/dist/collection/components/x-upload/types.js +1 -0
- package/dist/collection/components/x-upload/x-upload.css +774 -0
- package/dist/collection/components/x-upload/x-upload.js +1452 -0
- package/dist/collection/components/x-virtual-scroll/x-virtual-scroll.css +79 -0
- package/dist/collection/components/x-virtual-scroll/x-virtual-scroll.js +478 -0
- package/dist/collection/components/x-workflow/x-workflow.css +486 -0
- package/dist/collection/components/x-workflow/x-workflow.js +1403 -0
- package/dist/collection/components/x-workflow-builder/x-workflow-builder.css +538 -0
- package/dist/collection/components/x-workflow-builder/x-workflow-builder.js +468 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/locales/index.js +2 -0
- package/dist/collection/locales/languages/ar_EG.js +120 -0
- package/dist/collection/locales/languages/az_AZ.js +120 -0
- package/dist/collection/locales/languages/bg_BG.js +120 -0
- package/dist/collection/locales/languages/bn_BD.js +120 -0
- package/dist/collection/locales/languages/by_BY.js +120 -0
- package/dist/collection/locales/languages/ca_ES.js +120 -0
- package/dist/collection/locales/languages/cs_CZ.js +120 -0
- package/dist/collection/locales/languages/da_DK.js +120 -0
- package/dist/collection/locales/languages/de_DE.js +120 -0
- package/dist/collection/locales/languages/el_GR.js +120 -0
- package/dist/collection/locales/languages/en_AU.js +120 -0
- package/dist/collection/locales/languages/en_GB.js +120 -0
- package/dist/collection/locales/languages/en_US.js +120 -0
- package/dist/collection/locales/languages/es_ES.js +120 -0
- package/dist/collection/locales/languages/et_EE.js +120 -0
- package/dist/collection/locales/languages/fa_IR.js +120 -0
- package/dist/collection/locales/languages/fi_FI.js +120 -0
- package/dist/collection/locales/languages/fr_BE.js +120 -0
- package/dist/collection/locales/languages/fr_CA.js +120 -0
- package/dist/collection/locales/languages/fr_FR.js +120 -0
- package/dist/collection/locales/languages/ga_IE.js +120 -0
- package/dist/collection/locales/languages/gl_ES.js +120 -0
- package/dist/collection/locales/languages/he_IL.js +120 -0
- package/dist/collection/locales/languages/hi_IN.js +120 -0
- package/dist/collection/locales/languages/hr_HR.js +120 -0
- package/dist/collection/locales/languages/hu_HU.js +120 -0
- package/dist/collection/locales/languages/hy_AM.js +120 -0
- package/dist/collection/locales/languages/id_ID.js +120 -0
- package/dist/collection/locales/languages/index.js +137 -0
- package/dist/collection/locales/languages/is_IS.js +120 -0
- package/dist/collection/locales/languages/it_IT.js +120 -0
- package/dist/collection/locales/languages/ja_JP.js +120 -0
- package/dist/collection/locales/languages/ka_GE.js +120 -0
- package/dist/collection/locales/languages/kk_KZ.js +120 -0
- package/dist/collection/locales/languages/km_KH.js +120 -0
- package/dist/collection/locales/languages/kmr_IQ.js +120 -0
- package/dist/collection/locales/languages/kn_IN.js +120 -0
- package/dist/collection/locales/languages/ko_KR.js +120 -0
- package/dist/collection/locales/languages/ku_IQ.js +120 -0
- package/dist/collection/locales/languages/lt_LT.js +120 -0
- package/dist/collection/locales/languages/lv_LV.js +120 -0
- package/dist/collection/locales/languages/mk_MK.js +120 -0
- package/dist/collection/locales/languages/ml_IN.js +120 -0
- package/dist/collection/locales/languages/mn_MN.js +120 -0
- package/dist/collection/locales/languages/ms_MY.js +120 -0
- package/dist/collection/locales/languages/nb_NO.js +120 -0
- package/dist/collection/locales/languages/ne_NP.js +120 -0
- package/dist/collection/locales/languages/nl_BE.js +120 -0
- package/dist/collection/locales/languages/nl_NL.js +120 -0
- package/dist/collection/locales/languages/pl_PL.js +120 -0
- package/dist/collection/locales/languages/pt_BR.js +120 -0
- package/dist/collection/locales/languages/pt_PT.js +120 -0
- package/dist/collection/locales/languages/ro_RO.js +120 -0
- package/dist/collection/locales/languages/ru_RU.js +120 -0
- package/dist/collection/locales/languages/sk_SK.js +120 -0
- package/dist/collection/locales/languages/sl_SI.js +120 -0
- package/dist/collection/locales/languages/sr_RS.js +120 -0
- package/dist/collection/locales/languages/sv_SE.js +120 -0
- package/dist/collection/locales/languages/ta_IN.js +120 -0
- package/dist/collection/locales/languages/th_TH.js +120 -0
- package/dist/collection/locales/languages/tr_TR.js +120 -0
- package/dist/collection/locales/languages/uk_UA.js +120 -0
- package/dist/collection/locales/languages/ur_PK.js +120 -0
- package/dist/collection/locales/languages/vi_VN.js +120 -0
- package/dist/collection/locales/languages/zh_CN.js +120 -0
- package/dist/collection/locales/languages/zh_HK.js +120 -0
- package/dist/collection/locales/languages/zh_TW.js +120 -0
- package/dist/collection/locales/locale.service.js +179 -0
- package/dist/collection/types.js +11 -0
- package/dist/collection/utils/app-service.js +19 -0
- package/dist/collection/utils/cascader.service.js +142 -0
- package/dist/collection/utils/config.js +59 -0
- package/dist/collection/utils/form/core/abstract-control.js +273 -0
- package/dist/collection/utils/form/core/form-array.js +131 -0
- package/dist/collection/utils/form/core/form-builder.js +56 -0
- package/dist/collection/utils/form/core/form-control.js +69 -0
- package/dist/collection/utils/form/core/form-group.js +163 -0
- package/dist/collection/utils/form/frameworks.js +37 -0
- package/dist/collection/utils/form/types.js +1 -0
- package/dist/collection/utils/form/validators/validators.js +198 -0
- package/dist/collection/utils/index.js +3 -0
- package/dist/collection/utils/qr-code/cache/qr.cache.js +20 -0
- package/dist/collection/utils/qr-code/engine/qr.engine.js +130 -0
- package/dist/collection/utils/qr-code/engine/qr.gf.js +22 -0
- package/dist/collection/utils/qr-code/engine/qr.mask.js +54 -0
- package/dist/collection/utils/qr-code/engine/qr.rs.js +29 -0
- package/dist/collection/utils/qr-code/engine/qr.util.js +0 -0
- package/dist/collection/utils/qr-code/engine/qr.version.js +11 -0
- package/dist/collection/utils/qr-code/renderer/canvas.renderer.js +36 -0
- package/dist/collection/utils/qr-code/renderer/svg.renderer.js +33 -0
- package/dist/collection/utils/qr-code/worker/worker.manager.js +24 -0
- package/dist/collection/utils/table.service.js +150 -0
- package/dist/collection/utils/tree.service.js +335 -0
- package/dist/collection/utils/workflow/flow.service.js +382 -0
- package/dist/collection/utils/workflow/types.js +1 -0
- package/dist/esm/abstract-control-XBF88YT_.js +275 -0
- package/dist/esm/config-BPeosvTA.js +60 -0
- package/dist/esm/index-ig_mFsVk.js +2159 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/locale.service-D66tF8_2.js +8199 -0
- package/dist/esm/modal-service-C_e0SaFZ.js +397 -0
- package/dist/esm/notification-service-DJTSPOq7.js +599 -0
- package/dist/esm/portal-controller-COpzIi1n.js +499 -0
- package/dist/esm/schema-builder-DBPGgJBx.js +1502 -0
- package/dist/esm/tree.service-Dgxy93Bg.js +337 -0
- package/dist/esm/types-C_QdJRdB.js +253 -0
- package/dist/esm/x-address_14.entry.js +12562 -0
- package/dist/esm/x-affix.entry.js +180 -0
- package/dist/esm/x-alert_11.entry.js +3227 -0
- package/dist/esm/x-anchor-link.entry.js +65 -0
- package/dist/esm/x-anchor.entry.js +156 -0
- package/dist/esm/x-app.entry.js +135 -0
- package/dist/esm/x-auto-complete-dropdown-content.entry.js +67 -0
- package/dist/esm/x-avatar.entry.js +267 -0
- package/dist/esm/x-back-top.entry.js +87 -0
- package/dist/esm/x-breadcrumb_5.entry.js +1548 -0
- package/dist/esm/x-button.entry.js +172 -0
- package/dist/esm/x-card_12.entry.js +1373 -0
- package/dist/esm/x-carousel.entry.js +145 -0
- package/dist/esm/x-cascader-dropdown-content.entry.js +362 -0
- package/dist/esm/x-checkbox_5.entry.js +1370 -0
- package/dist/esm/x-collapse-panel.entry.js +241 -0
- package/dist/esm/x-collapse.entry.js +289 -0
- package/dist/esm/x-color-picker-panel_2.entry.js +870 -0
- package/dist/esm/x-color-picker_9.entry.js +3075 -0
- package/dist/esm/x-comment.entry.js +187 -0
- package/dist/esm/x-date-picker-dropdown-content.entry.js +755 -0
- package/dist/esm/x-descriptions-item.entry.js +106 -0
- package/dist/esm/x-drawer-content.entry.js +195 -0
- package/dist/esm/x-drawer.entry.js +292 -0
- package/dist/esm/x-dropdown_2.entry.js +732 -0
- package/dist/esm/x-empty.entry.js +62 -0
- package/dist/esm/x-finder.entry.js +645 -0
- package/dist/esm/x-form-builder.entry.js +805 -0
- package/dist/esm/x-icon.entry.js +142 -0
- package/dist/esm/x-infinite-scroll.entry.js +127 -0
- package/dist/esm/x-list-item.entry.js +25 -0
- package/dist/esm/x-list.entry.js +136 -0
- package/dist/esm/x-mentions.entry.js +273 -0
- package/dist/esm/x-menu-divider.entry.js +47 -0
- package/dist/esm/x-menu-item-group.entry.js +147 -0
- package/dist/esm/x-menu-submenu.entry.js +371 -0
- package/dist/esm/x-message.entry.js +217 -0
- package/dist/esm/x-modal-content.entry.js +215 -0
- package/dist/esm/x-notification.entry.js +323 -0
- package/dist/esm/x-page-header.entry.js +65 -0
- package/dist/esm/x-popconfirm-content.entry.js +70 -0
- package/dist/esm/x-popconfirm.entry.js +179 -0
- package/dist/esm/x-progress.entry.js +134 -0
- package/dist/esm/x-qr-code.entry.js +444 -0
- package/dist/esm/x-range-picker-dropdown-content.entry.js +819 -0
- package/dist/esm/x-select_2.entry.js +1313 -0
- package/dist/esm/x-skeleton.entry.js +73 -0
- package/dist/esm/x-spin.entry.js +60 -0
- package/dist/esm/x-splitter-panel.entry.js +89 -0
- package/dist/esm/x-splitter.entry.js +610 -0
- package/dist/esm/x-statistic.entry.js +102 -0
- package/dist/esm/x-step.entry.js +177 -0
- package/dist/esm/x-steps.entry.js +437 -0
- package/dist/esm/x-tab-pane.entry.js +71 -0
- package/dist/esm/x-table-cell.entry.js +43 -0
- package/dist/esm/x-table-row.entry.js +83 -0
- package/dist/esm/x-tabs.entry.js +607 -0
- package/dist/esm/x-time-picker-dropdown-content.entry.js +387 -0
- package/dist/esm/x-timeline-item.entry.js +48 -0
- package/dist/esm/x-timeline.entry.js +50 -0
- package/dist/esm/x-tour-panel.entry.js +87 -0
- package/dist/esm/x-tour.entry.js +342 -0
- package/dist/esm/x-tree-select-dropdown-content.entry.js +437 -0
- package/dist/esm/x-virtual-scroll.entry.js +201 -0
- package/dist/esm/x-workflow-builder.entry.js +364 -0
- package/dist/esm/xlabs-store.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/x-address/vietnam-data.d.ts +14 -0
- package/dist/types/components/x-address/x-address.d.ts +64 -0
- package/dist/types/components/x-affix/x-affix.d.ts +111 -0
- package/dist/types/components/x-alert/x-alert.d.ts +74 -0
- package/dist/types/components/x-anchor/x-anchor.d.ts +120 -0
- package/dist/types/components/x-anchor-link/x-anchor-link.d.ts +47 -0
- package/dist/types/components/x-app/x-app.d.ts +93 -0
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.d.ts +58 -0
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/types.d.ts +14 -0
- package/dist/types/components/x-auto-complete/types.d.ts +150 -0
- package/dist/types/components/x-auto-complete/x-auto-complete.d.ts +480 -0
- package/dist/types/components/x-avatar/types.d.ts +38 -0
- package/dist/types/components/x-avatar/x-avatar.d.ts +171 -0
- package/dist/types/components/x-back-top/x-back-top.d.ts +59 -0
- package/dist/types/components/x-badge/types.d.ts +23 -0
- package/dist/types/components/x-badge/x-badge.d.ts +184 -0
- package/dist/types/components/x-breadcrumb/x-breadcrumb.d.ts +43 -0
- package/dist/types/components/x-breadcrumb-item/x-breadcrumb-item.d.ts +43 -0
- package/dist/types/components/x-button/x-button.d.ts +121 -0
- package/dist/types/components/x-captcha/x-captcha.d.ts +78 -0
- package/dist/types/components/x-card/x-card.d.ts +139 -0
- package/dist/types/components/x-carousel/x-carousel.d.ts +104 -0
- package/dist/types/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.d.ts +255 -0
- package/dist/types/components/x-cascader/cascader-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-cascader/cascader-dropdown-content/types.d.ts +20 -0
- package/dist/types/components/x-cascader/types.d.ts +143 -0
- package/dist/types/components/x-cascader/x-cascader.d.ts +520 -0
- package/dist/types/components/x-checkbox/types.d.ts +83 -0
- package/dist/types/components/x-checkbox/x-checkbox.d.ts +156 -0
- package/dist/types/components/x-col/x-col.d.ts +89 -0
- package/dist/types/components/x-collapse/types.d.ts +55 -0
- package/dist/types/components/x-collapse/x-collapse.d.ts +157 -0
- package/dist/types/components/x-collapse-panel/x-collapse-panel.d.ts +143 -0
- package/dist/types/components/x-color-picker/types.d.ts +135 -0
- package/dist/types/components/x-color-picker/x-color-picker-panel.d.ts +80 -0
- package/dist/types/components/x-color-picker/x-color-picker.d.ts +328 -0
- package/dist/types/components/x-comment/types.d.ts +20 -0
- package/dist/types/components/x-comment/x-comment.d.ts +111 -0
- package/dist/types/components/x-content/types.d.ts +6 -0
- package/dist/types/components/x-content/x-content.d.ts +64 -0
- package/dist/types/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.d.ts +376 -0
- package/dist/types/components/x-date-picker/date-picker-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-date-picker/date-picker-dropdown-content/types.d.ts +61 -0
- package/dist/types/components/x-date-picker/types.d.ts +28 -0
- package/dist/types/components/x-date-picker/x-date-picker.d.ts +512 -0
- package/dist/types/components/x-descriptions/types.d.ts +41 -0
- package/dist/types/components/x-descriptions/x-descriptions.d.ts +141 -0
- package/dist/types/components/x-descriptions-item/x-descriptions-item.d.ts +70 -0
- package/dist/types/components/x-divider/x-divider.d.ts +82 -0
- package/dist/types/components/x-drawer/x-drawer.d.ts +156 -0
- package/dist/types/components/x-drawer-content/x-drawer-content.d.ts +142 -0
- package/dist/types/components/x-dropdown/dropdown-content/dropdown-content.d.ts +83 -0
- package/dist/types/components/x-dropdown/dropdown-content/types.d.ts +16 -0
- package/dist/types/components/x-dropdown/types.d.ts +119 -0
- package/dist/types/components/x-dropdown/x-dropdown.d.ts +292 -0
- package/dist/types/components/x-editor/editor-history.d.ts +62 -0
- package/dist/types/components/x-editor/editor-normalizer.d.ts +70 -0
- package/dist/types/components/x-editor/editor-parser.d.ts +34 -0
- package/dist/types/components/x-editor/editor-selection.d.ts +92 -0
- package/dist/types/components/x-editor/types.d.ts +62 -0
- package/dist/types/components/x-editor/x-editor.d.ts +279 -0
- package/dist/types/components/x-empty/x-empty.d.ts +45 -0
- package/dist/types/components/x-finder/services/finder-service.d.ts +38 -0
- package/dist/types/components/x-finder/types.d.ts +63 -0
- package/dist/types/components/x-finder/x-finder.d.ts +66 -0
- package/dist/types/components/x-flex/x-flex.d.ts +62 -0
- package/dist/types/components/x-float-button/x-float-button.d.ts +66 -0
- package/dist/types/components/x-footer/x-footer.d.ts +11 -0
- package/dist/types/components/x-form/x-form.d.ts +64 -0
- package/dist/types/components/x-form-builder/services/apis/api-client.d.ts +63 -0
- package/dist/types/components/x-form-builder/services/constants/index.d.ts +2 -0
- package/dist/types/components/x-form-builder/services/forms/abstract-control.d.ts +59 -0
- package/dist/types/components/x-form-builder/services/forms/form-array.d.ts +25 -0
- package/dist/types/components/x-form-builder/services/forms/form-builder.d.ts +17 -0
- package/dist/types/components/x-form-builder/services/forms/form-control.d.ts +14 -0
- package/dist/types/components/x-form-builder/services/forms/form-group.d.ts +33 -0
- package/dist/types/components/x-form-builder/services/forms/index.d.ts +11 -0
- package/dist/types/components/x-form-builder/services/forms/types.d.ts +11 -0
- package/dist/types/components/x-form-builder/services/forms/validators.d.ts +16 -0
- package/dist/types/components/x-form-builder/services/schema/condition-builder.d.ts +39 -0
- package/dist/types/components/x-form-builder/services/schema/default-registry.d.ts +1 -0
- package/dist/types/components/x-form-builder/services/schema/form-mapping.d.ts +26 -0
- package/dist/types/components/x-form-builder/services/schema/form-registry.d.ts +27 -0
- package/dist/types/components/x-form-builder/services/schema/schema-actions.d.ts +3 -0
- package/dist/types/components/x-form-builder/services/schema/schema-builder.d.ts +19 -0
- package/dist/types/components/x-form-builder/services/schema/schema-validator.d.ts +9 -0
- package/dist/types/components/x-form-builder/types/api/api-common-types.d.ts +5 -0
- package/dist/types/components/x-form-builder/types/api/api-interfaces.d.ts +52 -0
- package/dist/types/components/x-form-builder/types/api/index.d.ts +2 -0
- package/dist/types/components/x-form-builder/types/common/common-types.d.ts +49 -0
- package/dist/types/components/x-form-builder/types/common/condition-types.d.ts +53 -0
- package/dist/types/components/x-form-builder/types/common/field-types-enum.d.ts +2 -0
- package/dist/types/components/x-form-builder/types/common/index.d.ts +7 -0
- package/dist/types/components/x-form-builder/types/common/shared-interfaces.d.ts +37 -0
- package/dist/types/components/x-form-builder/types/common/validation-types.d.ts +36 -0
- package/dist/types/components/x-form-builder/types/common/value-types.d.ts +15 -0
- package/dist/types/components/x-form-builder/types/event/event-types.d.ts +16 -0
- package/dist/types/components/x-form-builder/types/event/index.d.ts +1 -0
- package/dist/types/components/x-form-builder/types/fields/advanced-fields.d.ts +125 -0
- package/dist/types/components/x-form-builder/types/fields/base-field.d.ts +49 -0
- package/dist/types/components/x-form-builder/types/fields/datetime-file-fields.d.ts +37 -0
- package/dist/types/components/x-form-builder/types/fields/display-fields.d.ts +92 -0
- package/dist/types/components/x-form-builder/types/fields/form-field-union.d.ts +9 -0
- package/dist/types/components/x-form-builder/types/fields/index.d.ts +9 -0
- package/dist/types/components/x-form-builder/types/fields/input-fields.d.ts +53 -0
- package/dist/types/components/x-form-builder/types/fields/layout-fields.d.ts +55 -0
- package/dist/types/components/x-form-builder/types/fields/selection-fields.d.ts +130 -0
- package/dist/types/components/x-form-builder/types/fields/special-input-fields.d.ts +99 -0
- package/dist/types/components/x-form-builder/types/form/events-types.d.ts +29 -0
- package/dist/types/components/x-form-builder/types/form/form-config.d.ts +0 -0
- package/dist/types/components/x-form-builder/types/form/index.d.ts +2 -0
- package/dist/types/components/x-form-builder/types/form/schema-types.d.ts +134 -0
- package/dist/types/components/x-form-builder/types/index.d.ts +4 -0
- package/dist/types/components/x-form-builder/utils/condition-engine.d.ts +23 -0
- package/dist/types/components/x-form-builder/utils/utils.d.ts +19 -0
- package/dist/types/components/x-form-builder/utils/values.d.ts +8 -0
- package/dist/types/components/x-form-builder/x-form-builder.d.ts +65 -0
- package/dist/types/components/x-form-item/x-form-item.d.ts +94 -0
- package/dist/types/components/x-header/x-header.d.ts +11 -0
- package/dist/types/components/x-icon/icons.d.ts +2717 -0
- package/dist/types/components/x-icon/x-icon.d.ts +89 -0
- package/dist/types/components/x-image/types.d.ts +94 -0
- package/dist/types/components/x-image/x-image.d.ts +150 -0
- package/dist/types/components/x-infinite-scroll/x-infinite-scroll.d.ts +75 -0
- package/dist/types/components/x-input/types.d.ts +14 -0
- package/dist/types/components/x-input/x-input.d.ts +385 -0
- package/dist/types/components/x-input-number/types.d.ts +98 -0
- package/dist/types/components/x-input-number/x-input-number.d.ts +395 -0
- package/dist/types/components/x-layout/x-layout.d.ts +61 -0
- package/dist/types/components/x-list/x-list.d.ts +100 -0
- package/dist/types/components/x-list-item/x-list-item.d.ts +13 -0
- package/dist/types/components/x-mentions/types.d.ts +7 -0
- package/dist/types/components/x-mentions/x-mentions.d.ts +159 -0
- package/dist/types/components/x-menu/types.d.ts +83 -0
- package/dist/types/components/x-menu/x-menu.d.ts +153 -0
- package/dist/types/components/x-menu-divider/types.d.ts +6 -0
- package/dist/types/components/x-menu-divider/x-menu-divider.d.ts +19 -0
- package/dist/types/components/x-menu-item/types.d.ts +8 -0
- package/dist/types/components/x-menu-item/x-menu-item.d.ts +80 -0
- package/dist/types/components/x-menu-item-group/types.d.ts +6 -0
- package/dist/types/components/x-menu-item-group/x-menu-item-group.d.ts +60 -0
- package/dist/types/components/x-menu-submenu/types.d.ts +15 -0
- package/dist/types/components/x-menu-submenu/x-menu-submenu.d.ts +135 -0
- package/dist/types/components/x-message/message-service.d.ts +58 -0
- package/dist/types/components/x-message/types.d.ts +90 -0
- package/dist/types/components/x-message/x-message.d.ts +133 -0
- package/dist/types/components/x-modal/modal-service.d.ts +6 -0
- package/dist/types/components/x-modal/modal-service.types.d.ts +278 -0
- package/dist/types/components/x-modal/x-modal.d.ts +160 -0
- package/dist/types/components/x-modal-content/index.d.ts +1 -0
- package/dist/types/components/x-modal-content/types.d.ts +83 -0
- package/dist/types/components/x-modal-content/x-modal-content.d.ts +174 -0
- package/dist/types/components/x-notification/notification-service.d.ts +83 -0
- package/dist/types/components/x-notification/types.d.ts +112 -0
- package/dist/types/components/x-notification/x-notification.d.ts +212 -0
- package/dist/types/components/x-page-header/x-page-header.d.ts +51 -0
- package/dist/types/components/x-pagination/types.d.ts +104 -0
- package/dist/types/components/x-pagination/x-pagination.d.ts +274 -0
- package/dist/types/components/x-popconfirm/popconfirm-content/popconfirm-content.d.ts +62 -0
- package/dist/types/components/x-popconfirm/x-popconfirm.d.ts +97 -0
- package/dist/types/components/x-popover/popover-content/popover-content.d.ts +71 -0
- package/dist/types/components/x-popover/x-popover.d.ts +99 -0
- package/dist/types/components/x-portal/debug.d.ts +5 -0
- package/dist/types/components/x-portal/index.d.ts +2 -0
- package/dist/types/components/x-portal/portal-controller.d.ts +20 -0
- package/dist/types/components/x-portal/positioning.d.ts +102 -0
- package/dist/types/components/x-portal/types.d.ts +43 -0
- package/dist/types/components/x-portal/x-portal.d.ts +19 -0
- package/dist/types/components/x-progress/x-progress.d.ts +85 -0
- package/dist/types/components/x-qr-code/x-qr-code.d.ts +26 -0
- package/dist/types/components/x-radio/types.d.ts +94 -0
- package/dist/types/components/x-radio/x-radio.d.ts +186 -0
- package/dist/types/components/x-radio-group/types.d.ts +20 -0
- package/dist/types/components/x-radio-group/x-radio-group.d.ts +90 -0
- package/dist/types/components/x-range-picker/range-picker-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.d.ts +437 -0
- package/dist/types/components/x-range-picker/range-picker-dropdown-content/types.d.ts +48 -0
- package/dist/types/components/x-range-picker/types.d.ts +35 -0
- package/dist/types/components/x-range-picker/x-range-picker.d.ts +457 -0
- package/dist/types/components/x-rate/x-rate.d.ts +129 -0
- package/dist/types/components/x-result/types.d.ts +45 -0
- package/dist/types/components/x-result/x-result.d.ts +120 -0
- package/dist/types/components/x-row/x-row.d.ts +44 -0
- package/dist/types/components/x-segmented/types.d.ts +10 -0
- package/dist/types/components/x-segmented/x-segmented.d.ts +128 -0
- package/dist/types/components/x-select/select-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-select/select-dropdown-content/select-dropdown-content.d.ts +52 -0
- package/dist/types/components/x-select/select-dropdown-content/types.d.ts +14 -0
- package/dist/types/components/x-select/types.d.ts +41 -0
- package/dist/types/components/x-select/x-select.d.ts +635 -0
- package/dist/types/components/x-select-option/x-select-option.d.ts +51 -0
- package/dist/types/components/x-sider/x-sider.d.ts +99 -0
- package/dist/types/components/x-skeleton/x-skeleton.d.ts +54 -0
- package/dist/types/components/x-slider/types.d.ts +1 -0
- package/dist/types/components/x-slider/x-slider.d.ts +240 -0
- package/dist/types/components/x-space/x-space.d.ts +54 -0
- package/dist/types/components/x-spin/x-spin.d.ts +41 -0
- package/dist/types/components/x-splitter/types.d.ts +41 -0
- package/dist/types/components/x-splitter/x-splitter.d.ts +187 -0
- package/dist/types/components/x-splitter-panel/types.d.ts +23 -0
- package/dist/types/components/x-splitter-panel/x-splitter-panel.d.ts +67 -0
- package/dist/types/components/x-statistic/x-statistic.d.ts +80 -0
- package/dist/types/components/x-step/types.d.ts +14 -0
- package/dist/types/components/x-step/x-step.d.ts +104 -0
- package/dist/types/components/x-steps/types.d.ts +124 -0
- package/dist/types/components/x-steps/x-steps.d.ts +270 -0
- package/dist/types/components/x-switch/types.d.ts +5 -0
- package/dist/types/components/x-switch/x-switch.d.ts +92 -0
- package/dist/types/components/x-tab-pane/x-tab-pane.d.ts +55 -0
- package/dist/types/components/x-table/column-util.d.ts +26 -0
- package/dist/types/components/x-table/types.d.ts +386 -0
- package/dist/types/components/x-table/x-table.d.ts +552 -0
- package/dist/types/components/x-table-cell/x-table-cell.d.ts +27 -0
- package/dist/types/components/x-table-row/x-table-row.d.ts +24 -0
- package/dist/types/components/x-tabs/types.d.ts +190 -0
- package/dist/types/components/x-tabs/x-tabs.d.ts +359 -0
- package/dist/types/components/x-tag/types.d.ts +27 -0
- package/dist/types/components/x-tag/x-tag.d.ts +148 -0
- package/dist/types/components/x-textarea/x-textarea.d.ts +165 -0
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.d.ts +239 -0
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/types.d.ts +28 -0
- package/dist/types/components/x-time-picker/types.d.ts +18 -0
- package/dist/types/components/x-time-picker/x-time-picker.d.ts +378 -0
- package/dist/types/components/x-timeline/x-timeline.d.ts +33 -0
- package/dist/types/components/x-timeline-item/x-timeline-item.d.ts +33 -0
- package/dist/types/components/x-tooltip/types.d.ts +53 -0
- package/dist/types/components/x-tooltip/x-tooltip.d.ts +274 -0
- package/dist/types/components/x-tooltip-content/index.d.ts +1 -0
- package/dist/types/components/x-tooltip-content/types.d.ts +25 -0
- package/dist/types/components/x-tooltip-content/x-tooltip-content.d.ts +57 -0
- package/dist/types/components/x-tour/index.d.ts +1 -0
- package/dist/types/components/x-tour/types.d.ts +71 -0
- package/dist/types/components/x-tour/x-tour-panel.d.ts +73 -0
- package/dist/types/components/x-tour/x-tour.d.ts +158 -0
- package/dist/types/components/x-transfer/types.d.ts +89 -0
- package/dist/types/components/x-transfer/x-transfer.d.ts +291 -0
- package/dist/types/components/x-tree/types.d.ts +163 -0
- package/dist/types/components/x-tree/x-tree.d.ts +406 -0
- package/dist/types/components/x-tree-select/tree-select-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.d.ts +268 -0
- package/dist/types/components/x-tree-select/tree-select-dropdown-content/types.d.ts +24 -0
- package/dist/types/components/x-tree-select/types.d.ts +100 -0
- package/dist/types/components/x-tree-select/x-tree-select.d.ts +750 -0
- package/dist/types/components/x-typography/x-typography.d.ts +89 -0
- package/dist/types/components/x-upload/types.d.ts +177 -0
- package/dist/types/components/x-upload/x-upload.d.ts +361 -0
- package/dist/types/components/x-virtual-scroll/x-virtual-scroll.d.ts +127 -0
- package/dist/types/components/x-workflow/x-workflow.d.ts +126 -0
- package/dist/types/components/x-workflow-builder/x-workflow-builder.d.ts +69 -0
- package/dist/types/components.d.ts +19048 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/locales/index.d.ts +2 -0
- package/dist/types/locales/languages/ar_EG.d.ts +119 -0
- package/dist/types/locales/languages/az_AZ.d.ts +119 -0
- package/dist/types/locales/languages/bg_BG.d.ts +119 -0
- package/dist/types/locales/languages/bn_BD.d.ts +119 -0
- package/dist/types/locales/languages/by_BY.d.ts +119 -0
- package/dist/types/locales/languages/ca_ES.d.ts +119 -0
- package/dist/types/locales/languages/cs_CZ.d.ts +119 -0
- package/dist/types/locales/languages/da_DK.d.ts +119 -0
- package/dist/types/locales/languages/de_DE.d.ts +119 -0
- package/dist/types/locales/languages/el_GR.d.ts +119 -0
- package/dist/types/locales/languages/en_AU.d.ts +119 -0
- package/dist/types/locales/languages/en_GB.d.ts +119 -0
- package/dist/types/locales/languages/en_US.d.ts +119 -0
- package/dist/types/locales/languages/es_ES.d.ts +119 -0
- package/dist/types/locales/languages/et_EE.d.ts +119 -0
- package/dist/types/locales/languages/fa_IR.d.ts +119 -0
- package/dist/types/locales/languages/fi_FI.d.ts +119 -0
- package/dist/types/locales/languages/fr_BE.d.ts +119 -0
- package/dist/types/locales/languages/fr_CA.d.ts +119 -0
- package/dist/types/locales/languages/fr_FR.d.ts +119 -0
- package/dist/types/locales/languages/ga_IE.d.ts +119 -0
- package/dist/types/locales/languages/gl_ES.d.ts +119 -0
- package/dist/types/locales/languages/he_IL.d.ts +119 -0
- package/dist/types/locales/languages/hi_IN.d.ts +119 -0
- package/dist/types/locales/languages/hr_HR.d.ts +119 -0
- package/dist/types/locales/languages/hu_HU.d.ts +119 -0
- package/dist/types/locales/languages/hy_AM.d.ts +119 -0
- package/dist/types/locales/languages/id_ID.d.ts +119 -0
- package/dist/types/locales/languages/index.d.ts +13 -0
- package/dist/types/locales/languages/is_IS.d.ts +119 -0
- package/dist/types/locales/languages/it_IT.d.ts +119 -0
- package/dist/types/locales/languages/ja_JP.d.ts +119 -0
- package/dist/types/locales/languages/ka_GE.d.ts +119 -0
- package/dist/types/locales/languages/kk_KZ.d.ts +119 -0
- package/dist/types/locales/languages/km_KH.d.ts +119 -0
- package/dist/types/locales/languages/kmr_IQ.d.ts +119 -0
- package/dist/types/locales/languages/kn_IN.d.ts +119 -0
- package/dist/types/locales/languages/ko_KR.d.ts +119 -0
- package/dist/types/locales/languages/ku_IQ.d.ts +119 -0
- package/dist/types/locales/languages/lt_LT.d.ts +119 -0
- package/dist/types/locales/languages/lv_LV.d.ts +119 -0
- package/dist/types/locales/languages/mk_MK.d.ts +119 -0
- package/dist/types/locales/languages/ml_IN.d.ts +119 -0
- package/dist/types/locales/languages/mn_MN.d.ts +119 -0
- package/dist/types/locales/languages/ms_MY.d.ts +119 -0
- package/dist/types/locales/languages/nb_NO.d.ts +119 -0
- package/dist/types/locales/languages/ne_NP.d.ts +119 -0
- package/dist/types/locales/languages/nl_BE.d.ts +119 -0
- package/dist/types/locales/languages/nl_NL.d.ts +119 -0
- package/dist/types/locales/languages/pl_PL.d.ts +119 -0
- package/dist/types/locales/languages/pt_BR.d.ts +119 -0
- package/dist/types/locales/languages/pt_PT.d.ts +119 -0
- package/dist/types/locales/languages/ro_RO.d.ts +119 -0
- package/dist/types/locales/languages/ru_RU.d.ts +119 -0
- package/dist/types/locales/languages/sk_SK.d.ts +119 -0
- package/dist/types/locales/languages/sl_SI.d.ts +119 -0
- package/dist/types/locales/languages/sr_RS.d.ts +119 -0
- package/dist/types/locales/languages/sv_SE.d.ts +119 -0
- package/dist/types/locales/languages/ta_IN.d.ts +119 -0
- package/dist/types/locales/languages/th_TH.d.ts +119 -0
- package/dist/types/locales/languages/tr_TR.d.ts +119 -0
- package/dist/types/locales/languages/uk_UA.d.ts +119 -0
- package/dist/types/locales/languages/ur_PK.d.ts +119 -0
- package/dist/types/locales/languages/vi_VN.d.ts +119 -0
- package/dist/types/locales/languages/zh_CN.d.ts +119 -0
- package/dist/types/locales/languages/zh_HK.d.ts +119 -0
- package/dist/types/locales/languages/zh_TW.d.ts +119 -0
- package/dist/types/locales/locale.service.d.ts +93 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types.d.ts +59 -0
- package/dist/types/utils/app-service.d.ts +20 -0
- package/dist/types/utils/cascader.service.d.ts +45 -0
- package/dist/types/utils/config.d.ts +47 -0
- package/dist/types/utils/form/core/abstract-control.d.ts +121 -0
- package/dist/types/utils/form/core/form-array.d.ts +51 -0
- package/dist/types/utils/form/core/form-builder.d.ts +45 -0
- package/dist/types/utils/form/core/form-control.d.ts +37 -0
- package/dist/types/utils/form/core/form-group.d.ts +63 -0
- package/dist/types/utils/form/frameworks.d.ts +18 -0
- package/dist/types/utils/form/types.d.ts +8 -0
- package/dist/types/utils/form/validators/validators.d.ts +39 -0
- package/dist/types/utils/index.d.ts +10 -0
- package/dist/types/utils/qr-code/cache/qr.cache.d.ts +7 -0
- package/dist/types/utils/qr-code/engine/qr.engine.d.ts +15 -0
- package/dist/types/utils/qr-code/engine/qr.gf.d.ts +4 -0
- package/dist/types/utils/qr-code/engine/qr.mask.d.ts +2 -0
- package/dist/types/utils/qr-code/engine/qr.rs.d.ts +1 -0
- package/dist/types/utils/qr-code/engine/qr.util.d.ts +0 -0
- package/dist/types/utils/qr-code/engine/qr.version.d.ts +16 -0
- package/dist/types/utils/qr-code/renderer/canvas.renderer.d.ts +6 -0
- package/dist/types/utils/qr-code/renderer/svg.renderer.d.ts +7 -0
- package/dist/types/utils/qr-code/worker/worker.manager.d.ts +12 -0
- package/dist/types/utils/table.service.d.ts +48 -0
- package/dist/types/utils/tree.service.d.ts +85 -0
- package/dist/types/utils/workflow/flow.service.d.ts +61 -0
- package/dist/types/utils/workflow/types.d.ts +120 -0
- package/dist/xlabs-store/fonts/xlabs-outlined.woff2 +0 -0
- package/dist/xlabs-store/fonts/xlabs-rounded.woff2 +0 -0
- package/dist/xlabs-store/fonts/xlabs-solided.woff2 +0 -0
- package/dist/xlabs-store/index.esm.js +1 -0
- package/dist/xlabs-store/p-016194dc.entry.js +1 -0
- package/dist/xlabs-store/p-023259c9.entry.js +1 -0
- package/dist/xlabs-store/p-04a3721a.entry.js +1 -0
- package/dist/xlabs-store/p-072445b7.entry.js +1 -0
- package/dist/xlabs-store/p-0ec21454.entry.js +1 -0
- package/dist/xlabs-store/p-12b6a843.entry.js +1 -0
- package/dist/xlabs-store/p-1a81cf09.entry.js +1 -0
- package/dist/xlabs-store/p-1b019aeb.entry.js +1 -0
- package/dist/xlabs-store/p-262a0673.entry.js +1 -0
- package/dist/xlabs-store/p-34cce823.entry.js +1 -0
- package/dist/xlabs-store/p-3a9fdefe.entry.js +1 -0
- package/dist/xlabs-store/p-40036100.entry.js +1 -0
- package/dist/xlabs-store/p-45f04e8d.entry.js +1 -0
- package/dist/xlabs-store/p-48ba7c34.entry.js +1 -0
- package/dist/xlabs-store/p-48e2c26e.entry.js +1 -0
- package/dist/xlabs-store/p-4ac2e915.entry.js +1 -0
- package/dist/xlabs-store/p-4d7c2a35.entry.js +1 -0
- package/dist/xlabs-store/p-4f67cb33.entry.js +1 -0
- package/dist/xlabs-store/p-502b345e.entry.js +1 -0
- package/dist/xlabs-store/p-555c5e48.entry.js +1 -0
- package/dist/xlabs-store/p-5878525f.entry.js +1 -0
- package/dist/xlabs-store/p-5abbdca7.entry.js +1 -0
- package/dist/xlabs-store/p-6243ca69.entry.js +1 -0
- package/dist/xlabs-store/p-64e7a057.entry.js +1 -0
- package/dist/xlabs-store/p-6530d2ef.entry.js +1 -0
- package/dist/xlabs-store/p-675a39e1.entry.js +1 -0
- package/dist/xlabs-store/p-689c52ef.entry.js +1 -0
- package/dist/xlabs-store/p-69b8cb7d.entry.js +1 -0
- package/dist/xlabs-store/p-6b121c60.entry.js +1 -0
- package/dist/xlabs-store/p-6c75fc39.entry.js +1 -0
- package/dist/xlabs-store/p-6f705deb.entry.js +1 -0
- package/dist/xlabs-store/p-723d362c.entry.js +1 -0
- package/dist/xlabs-store/p-783545e3.entry.js +1 -0
- package/dist/xlabs-store/p-7a8f11b4.entry.js +1 -0
- package/dist/xlabs-store/p-81fb4caf.entry.js +1 -0
- package/dist/xlabs-store/p-863dd67d.entry.js +1 -0
- package/dist/xlabs-store/p-8bcbb4e3.entry.js +1 -0
- package/dist/xlabs-store/p-8bcc219a.entry.js +1 -0
- package/dist/xlabs-store/p-914b0ae2.entry.js +1 -0
- package/dist/xlabs-store/p-96b1939d.entry.js +1 -0
- package/dist/xlabs-store/p-9ac291ea.entry.js +1 -0
- package/dist/xlabs-store/p-9de03a07.entry.js +1 -0
- package/dist/xlabs-store/p-BPeosvTA.js +1 -0
- package/dist/xlabs-store/p-COpzIi1n.js +1 -0
- package/dist/xlabs-store/p-C_QdJRdB.js +1 -0
- package/dist/xlabs-store/p-Ce5L9qbY.js +1 -0
- package/dist/xlabs-store/p-Co3Y9VjQ.js +1 -0
- package/dist/xlabs-store/p-D66tF8_2.js +1 -0
- package/dist/xlabs-store/p-DElCk9ta.js +1 -0
- package/dist/xlabs-store/p-Dgxy93Bg.js +1 -0
- package/dist/xlabs-store/p-XBF88YT_.js +1 -0
- package/dist/xlabs-store/p-a4223feb.entry.js +1 -0
- package/dist/xlabs-store/p-a8c2eca7.entry.js +1 -0
- package/dist/xlabs-store/p-ac9ba3aa.entry.js +1 -0
- package/dist/xlabs-store/p-bd5084b8.entry.js +1 -0
- package/dist/xlabs-store/p-bda322db.entry.js +1 -0
- package/dist/xlabs-store/p-c0ca6f7d.entry.js +1 -0
- package/dist/xlabs-store/p-c4c8840c.entry.js +1 -0
- package/dist/xlabs-store/p-c4d0ce0d.entry.js +1 -0
- package/dist/xlabs-store/p-cd3c3374.entry.js +1 -0
- package/dist/xlabs-store/p-cf4697bc.entry.js +1 -0
- package/dist/xlabs-store/p-d2ec3d4a.entry.js +1 -0
- package/dist/xlabs-store/p-d4d00aff.entry.js +1 -0
- package/dist/xlabs-store/p-d9d0147b.entry.js +1 -0
- package/dist/xlabs-store/p-dd930f2a.entry.js +1 -0
- package/dist/xlabs-store/p-e04836e8.entry.js +1 -0
- package/dist/xlabs-store/p-e14b5f6d.entry.js +1 -0
- package/dist/xlabs-store/p-eb1dd3c2.entry.js +1 -0
- package/dist/xlabs-store/p-f02155e4.entry.js +1 -0
- package/dist/xlabs-store/p-f1331938.entry.js +1 -0
- package/dist/xlabs-store/p-fac0b689.entry.js +1 -0
- package/dist/xlabs-store/p-fd2e1d9c.entry.js +1 -0
- package/dist/xlabs-store/p-fdec5d89.entry.js +1 -0
- package/dist/xlabs-store/p-ffba56b2.entry.js +1 -0
- package/dist/xlabs-store/p-ig_mFsVk.js +2 -0
- package/dist/xlabs-store/xlabs-store.css +1 -0
- package/dist/xlabs-store/xlabs-store.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +69 -0
- package/readme.md +50 -0
|
@@ -0,0 +1,1370 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-ig_mFsVk.js';
|
|
2
|
+
import { t as translate } from './locale.service-D66tF8_2.js';
|
|
3
|
+
import { g as getIcon } from './config-BPeosvTA.js';
|
|
4
|
+
import { P as PortalController } from './portal-controller-COpzIi1n.js';
|
|
5
|
+
|
|
6
|
+
const xCheckboxCss = () => `@charset "UTF-8";:root{--x-color-primary:#1677ff;--x-color-primary-rgb:22, 119, 255;--x-color-primary-contrast:#ffffff;--x-color-primary-contrast-rgb:255, 255, 255;--x-color-primary-shade:#0958d9;--x-color-primary-tint:#4096ff;--x-color-primary-bg:#e6f4ff;--x-color-primary-bg-hover:#bae0ff;--x-color-primary-border:#91caff;--x-color-primary-border-hover:#69b1ff;--x-color-primary-hover:#4096ff;--x-color-primary-active:#0958d9;--x-color-primary-text:#1677ff;--x-color-primary-text-hover:#4096ff;--x-color-primary-text-active:#0958d9;--x-color-secondary:#3dc2ff;--x-color-secondary-rgb:61, 194, 255;--x-color-secondary-contrast:#ffffff;--x-color-secondary-contrast-rgb:255, 255, 255;--x-color-secondary-shade:#36abe0;--x-color-secondary-tint:#50c8ff;--x-color-success:#52c41a;--x-color-success-rgb:82, 196, 26;--x-color-success-contrast:#ffffff;--x-color-success-contrast-rgb:255, 255, 255;--x-color-success-shade:#389e0d;--x-color-success-tint:#73d13d;--x-color-success-bg:#f6ffed;--x-color-success-bg-hover:#d9f7be;--x-color-success-border:#b7eb8f;--x-color-success-border-hover:#95de64;--x-color-success-hover:#73d13d;--x-color-success-active:#389e0d;--x-color-success-text:#52c41a;--x-color-success-text-hover:#73d13d;--x-color-success-text-active:#389e0d;--x-color-warning:#faad14;--x-color-warning-rgb:250, 173, 20;--x-color-warning-contrast:#000000;--x-color-warning-contrast-rgb:0, 0, 0;--x-color-warning-shade:#d48806;--x-color-warning-tint:#ffc53d;--x-color-warning-bg:#fffbe6;--x-color-warning-bg-hover:#fff1b8;--x-color-warning-border:#ffe58f;--x-color-warning-border-hover:#ffd666;--x-color-warning-hover:#ffc53d;--x-color-warning-active:#d48806;--x-color-warning-text:#faad14;--x-color-warning-text-hover:#ffc53d;--x-color-warning-text-active:#d48806;--x-color-danger:#ff4d4f;--x-color-danger-rgb:255, 77, 79;--x-color-danger-contrast:#ffffff;--x-color-danger-contrast-rgb:255, 255, 255;--x-color-danger-shade:#cf1322;--x-color-danger-tint:#ff7875;--x-color-error:#ff4d4f;--x-color-error-rgb:255, 77, 79;--x-color-error-bg:#fff2f0;--x-color-error-bg-hover:#ffccc7;--x-color-error-border:#ffa39e;--x-color-error-border-hover:#ff7875;--x-color-error-hover:#ff7875;--x-color-error-active:#d9363e;--x-color-error-text:#ff4d4f;--x-color-error-text-hover:#ff7875;--x-color-error-text-active:#d9363e;--x-color-info:#1677ff;--x-color-info-rgb:22, 119, 255;--x-color-info-bg:#e6f4ff;--x-color-info-bg-hover:#bae0ff;--x-color-info-border:#91caff;--x-color-info-border-hover:#69b1ff;--x-color-info-hover:#69b1ff;--x-color-info-active:#0958d9;--x-color-info-text:#1677ff;--x-color-info-text-hover:#69b1ff;--x-color-info-text-active:#0958d9;--x-color-text:rgba(0, 0, 0, 0.88);--x-color-text-secondary:rgba(0, 0, 0, 0.65);--x-color-text-tertiary:rgba(0, 0, 0, 0.45);--x-color-text-quaternary:rgba(0, 0, 0, 0.25);--x-color-text-disabled:rgba(0, 0, 0, 0.25);--x-color-text-placeholder:rgba(0, 0, 0, 0.25);--x-color-text-heading:rgba(0, 0, 0, 0.88);--x-color-text-label:rgba(0, 0, 0, 0.65);--x-color-text-description:rgba(0, 0, 0, 0.45);--x-color-text-light-solid:#ffffff;--x-color-bg-container:#ffffff;--x-color-bg-elevated:#ffffff;--x-color-bg-layout:#f5f5f5;--x-color-bg-spotlight:rgba(0, 0, 0, 0.85);--x-color-bg-mask:rgba(0, 0, 0, 0.45);--x-color-bg-base:#ffffff;--x-color-bg-container-disabled:#f5f5f5;--x-color-bg-container-loading:rgba(255, 255, 255, 0.65);--x-color-white:#ffffff;--x-color-fill:rgba(0, 0, 0, 0.15);--x-color-fill-secondary:rgba(0, 0, 0, 0.06);--x-color-fill-tertiary:rgba(0, 0, 0, 0.04);--x-color-fill-quaternary:rgba(0, 0, 0, 0.02);--x-color-border:#d9d9d9;--x-color-border-secondary:#f0f0f0;--x-color-border-bg:#ffffff;--x-color-split:rgba(5, 5, 5, 0.06);--x-color-dark:#222428;--x-color-dark-rgb:34, 36, 40;--x-color-dark-contrast:#ffffff;--x-color-dark-contrast-rgb:255, 255, 255;--x-color-dark-shade:#1e2023;--x-color-dark-tint:#383a3e;--x-color-medium:#92949c;--x-color-medium-rgb:146, 148, 156;--x-color-medium-contrast:#ffffff;--x-color-medium-contrast-rgb:255, 255, 255;--x-color-medium-shade:#808289;--x-color-medium-tint:#9d9fa6;--x-color-light:#f4f5f8;--x-color-light-rgb:244, 245, 248;--x-color-light-contrast:#000000;--x-color-light-contrast-rgb:0, 0, 0;--x-color-light-shade:#d7d8da;--x-color-light-tint:#f5f6f9;--x-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--x-font-family-code:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--x-font-size:14px;--x-font-size-sm:12px;--x-font-size-lg:16px;--x-font-size-xl:20px;--x-font-size-heading-1:38px;--x-font-size-heading-2:30px;--x-font-size-heading-3:24px;--x-font-size-heading-4:20px;--x-font-size-heading-5:16px;--x-line-height:1.5714285714285714;--x-line-height-lg:1.5;--x-line-height-sm:1.6666666666666667;--x-line-height-heading-1:1.2105263157894737;--x-line-height-heading-2:1.2666666666666666;--x-line-height-heading-3:1.3333333333333333;--x-line-height-heading-4:1.4;--x-line-height-heading-5:1.5;--x-font-weight-normal:400;--x-font-weight-medium:500;--x-font-weight-semibold:600;--x-font-weight-strong:600;--x-font-size-base:14px;--x-font-size-xxl:24px;--x-line-height-base:1.5714285714285714;--x-spacing-xxs:4px;--x-spacing-xs:8px;--x-spacing-sm:12px;--x-spacing-md:16px;--x-spacing-lg:20px;--x-spacing-xl:24px;--x-spacing-xxl:32px;--x-spacing-xxxl:48px;--x-margin-xxs:4px;--x-margin-xs:8px;--x-margin-sm:12px;--x-margin-md:16px;--x-margin-lg:24px;--x-margin-xl:32px;--x-margin-xxl:48px;--x-padding-xxs:4px;--x-padding-xs:8px;--x-padding-sm:12px;--x-padding-md:16px;--x-padding-lg:24px;--x-padding-content-horizontal-lg:24px;--x-padding-content-vertical-lg:12px;--x-padding-content-horizontal:16px;--x-padding-content-vertical:12px;--x-padding-content-horizontal-sm:16px;--x-padding-content-vertical-sm:8px;--x-border-radius:6px;--x-border-radius-xs:2px;--x-border-radius-sm:4px;--x-border-radius-lg:8px;--x-border-radius-xl:12px;--x-border-radius-outer:4px;--x-border-radius-base:6px;--x-border-width:1px;--x-border-width-base:1px;--x-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-shadow-lg:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-box-shadow-popover-arrow:2px 2px 5px rgba(0, 0, 0, 0.05);--x-box-shadow-card:0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);--x-box-shadow-drawer-right:-6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-left:6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-up:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-down:0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);--x-motion-duration-fast:0.1s;--x-motion-duration-mid:0.2s;--x-motion-duration-slow:0.3s;--x-motion-ease-in-out:cubic-bezier(0.645, 0.045, 0.355, 1);--x-motion-ease-out:cubic-bezier(0.215, 0.61, 0.355, 1);--x-motion-ease-in:cubic-bezier(0.55, 0.055, 0.675, 0.19);--x-motion-ease-out-back:cubic-bezier(0.12, 0.4, 0.29, 1.46);--x-motion-ease-in-back:cubic-bezier(0.71, -0.46, 0.88, 0.6);--x-motion-ease-in-out-circle:cubic-bezier(0.78, 0.14, 0.15, 0.86);--x-motion-ease-out-circle:cubic-bezier(0.08, 0.82, 0.17, 1);--x-motion-ease-in-circle:cubic-bezier(0.6, 0.04, 0.98, 0.34);--x-motion-ease-in-quint:cubic-bezier(0.755, 0.05, 0.855, 0.06);--x-motion-ease-out-quint:cubic-bezier(0.23, 1, 0.32, 1);--x-z-index-base:0;--x-z-index-popup-base:1000;--x-z-index-popup:1030;--x-z-index-affix:10;--x-z-index-modal:1000;--x-z-index-modal-mask:1000;--x-z-index-drawer:1000;--x-z-index-popover:1030;--x-z-index-dropdown:1050;--x-z-index-tooltip:1070;--x-z-index-notification:1080;--x-z-index-message:1090;--x-z-index-popconfirm:1060;--x-z-index-table-fixed:10;--x-opacity-loading:0.65;--x-opacity-image:1;--x-opacity-disabled:0.5;--x-control-height:32px;--x-control-height-xs:24px;--x-control-height-sm:24px;--x-control-height-lg:40px;--x-control-radio-size:16px;--x-control-checkbox-size:16px;--x-control-padding-horizontal:12px;--x-control-padding-horizontal-sm:8px;--x-control-outline-width:2px;--x-control-outline:rgba(5, 145, 255, 0.1);--x-control-item-bg-hover:rgba(0, 0, 0, 0.04);--x-control-item-bg-active:#e6f4ff;--x-control-item-bg-active-hover:#bae0ff;--x-control-item-bg-active-disabled:rgba(0, 0, 0, 0.15);--x-control-tmp-outline:rgba(0, 0, 0, 0.02);--x-color-yellow:#fadb14;--x-color-yellow-rgb:250, 219, 20;--x-font-family-base:var(--x-font-family);--x-color-link:#1677ff;--x-color-link-hover:#69b1ff;--x-color-link-active:#0958d9;--x-color-icon:rgba(0, 0, 0, 0.45);--x-color-icon-hover:rgba(0, 0, 0, 0.88);--x-color-highlight:#ff4d4f;--x-color-bg-text-hover:rgba(0, 0, 0, 0.06);--x-color-bg-text-active:rgba(0, 0, 0, 0.15);--x-screen-xs:480px;--x-screen-xs-min:480px;--x-screen-xs-max:575px;--x-screen-sm:576px;--x-screen-sm-min:576px;--x-screen-sm-max:767px;--x-screen-md:768px;--x-screen-md-min:768px;--x-screen-md-max:991px;--x-screen-lg:992px;--x-screen-lg-min:992px;--x-screen-lg-max:1199px;--x-screen-xl:1200px;--x-screen-xl-min:1200px;--x-screen-xl-max:1599px;--x-screen-xxl:1600px;--x-screen-xxl-min:1600px;--x-color-fill-content:rgba(0, 0, 0, 0.06);--x-color-fill-content-hover:rgba(0, 0, 0, 0.15);--x-color-fill-alter:rgba(0, 0, 0, 0.02);--x-scrollbar-width:12px;--x-scrollbar-track-bg:rgba(0, 0, 0, 0.04);--x-scrollbar-thumb-bg:rgba(0, 0, 0, 0.25);--x-scrollbar-thumb-bg-hover:rgba(0, 0, 0, 0.35);--x-menu-dark-bg:#001529;--x-menu-dark-item-bg:#001529;--x-menu-dark-popup-bg:#001529;--x-menu-dark-submenu-item-bg:#000c17}:host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;line-height:1;cursor:pointer;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;font-size:var(--x-checkbox-font-size, var(--x-font-size, 14px));font-family:inherit;color:var(--x-checkbox-label-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));list-style:none;outline:none}:host(:focus-visible){outline:2px solid var(--x-color-primary-border, #91caff);outline-offset:1px;border-radius:4px}:host(.x-checkbox-wrapper-disabled){cursor:not-allowed;color:var(--x-checkbox-label-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;line-height:1;white-space:nowrap;outline:none;cursor:pointer;vertical-align:sub}.x-checkbox-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0;margin:0;padding:0}.x-checkbox-inner{position:relative;top:0;left:0;display:block;width:var(--x-checkbox-size, var(--x-control-checkbox-size, 16px));height:var(--x-checkbox-size, var(--x-control-checkbox-size, 16px));direction:ltr;background-color:var(--x-checkbox-bg, var(--x-color-bg-container, #ffffff));border:var(--x-checkbox-border-width, var(--x-border-width-base, 1px)) solid var(--x-checkbox-border-color, var(--x-color-border, #d9d9d9));border-radius:var(--x-checkbox-border-radius, var(--x-border-radius-xs, 2px));border-collapse:separate;-webkit-transition:all var(--x-checkbox-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-checkbox-motion-timing, var(--x-motion-ease-in-out, cubic-bezier(0.645, 0.045, 0.355, 1)));transition:all var(--x-checkbox-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-checkbox-motion-timing, var(--x-motion-ease-in-out, cubic-bezier(0.645, 0.045, 0.355, 1)))}.x-checkbox-inner::after{position:absolute;top:50%;left:21.5%;display:table;width:5.71428571px;height:9.14285714px;border:2px solid var(--x-checkbox-check-color, var(--x-color-white, #ffffff));border-top:0;border-left:0;-webkit-transform:rotate(45deg) scale(0) translate(-50%, -50%);transform:rotate(45deg) scale(0) translate(-50%, -50%);opacity:0;-webkit-transition:all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;transition:all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;content:""}.x-checkbox:not(.x-checkbox-disabled):hover .x-checkbox-inner{border-color:var(--x-checkbox-border-color-hover, var(--x-color-primary, #1677ff))}:host(.x-checkbox-wrapper-checked) .x-checkbox-inner,.x-checkbox-checked .x-checkbox-inner{background-color:var(--x-checkbox-color, var(--x-color-primary, #1677ff));border-color:var(--x-checkbox-color, var(--x-color-primary, #1677ff))}:host(.x-checkbox-wrapper-checked) .x-checkbox-inner::after,.x-checkbox-checked .x-checkbox-inner::after{position:absolute;display:table;border:2px solid var(--x-checkbox-check-color, var(--x-color-white, #ffffff));border-top:0;border-left:0;-webkit-transform:rotate(45deg) scale(1) translate(-50%, -50%);transform:rotate(45deg) scale(1) translate(-50%, -50%);opacity:1;-webkit-transition:all var(--x-checkbox-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-checkbox-motion-timing-bounce, cubic-bezier(0.12, 0.4, 0.29, 1.46)) 0.1s;transition:all var(--x-checkbox-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-checkbox-motion-timing-bounce, cubic-bezier(0.12, 0.4, 0.29, 1.46)) 0.1s}:host(.x-checkbox-wrapper-checked) .x-checkbox:not(.x-checkbox-disabled):hover .x-checkbox-inner,.x-checkbox-checked:not(.x-checkbox-disabled):hover .x-checkbox-inner{background-color:var(--x-checkbox-color-hover, var(--x-color-primary-hover, #4096ff));border-color:var(--x-checkbox-color-hover, var(--x-color-primary-hover, #4096ff))}:host(.x-checkbox-wrapper-indeterminate:not(.x-checkbox-wrapper-checked)) .x-checkbox-inner,.x-checkbox-indeterminate .x-checkbox-inner{background-color:var(--x-checkbox-bg, var(--x-color-bg-container, #ffffff));border-color:var(--x-checkbox-color, var(--x-color-primary, #1677ff))}:host(.x-checkbox-wrapper-indeterminate:not(.x-checkbox-wrapper-checked)) .x-checkbox-inner::after,.x-checkbox-indeterminate .x-checkbox-inner::after{top:50%;left:50%;width:var(--x-checkbox-inner-size, var(--x-spacing-xs, 8px));height:var(--x-checkbox-inner-size, var(--x-spacing-xs, 8px));background-color:var(--x-checkbox-color, var(--x-color-primary, #1677ff));border:0;border-radius:0;-webkit-transform:translate(-50%, -50%) scale(1);transform:translate(-50%, -50%) scale(1);opacity:1;content:""}:host(.x-checkbox-wrapper-disabled) .x-checkbox,.x-checkbox-disabled{cursor:not-allowed}:host(.x-checkbox-wrapper-disabled) .x-checkbox-input,.x-checkbox-disabled .x-checkbox-input{cursor:not-allowed}:host(.x-checkbox-wrapper-disabled) .x-checkbox-inner,.x-checkbox-disabled .x-checkbox-inner{background-color:var(--x-checkbox-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));border-color:var(--x-checkbox-border-color-disabled, var(--x-color-border, #d9d9d9)) !important}:host(.x-checkbox-wrapper-disabled) .x-checkbox-inner::after,.x-checkbox-disabled .x-checkbox-inner::after{border-color:var(--x-checkbox-check-color-disabled, var(--x-color-text-quaternary, rgba(0, 0, 0, 0.25)))}:host(.x-checkbox-wrapper-disabled.x-checkbox-wrapper-checked) .x-checkbox-inner,.x-checkbox-disabled.x-checkbox-checked .x-checkbox-inner{background-color:var(--x-checkbox-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));border-color:var(--x-checkbox-border-color-disabled, var(--x-color-border, #d9d9d9)) !important}:host(.x-checkbox-wrapper-disabled.x-checkbox-wrapper-checked) .x-checkbox-inner::after,.x-checkbox-disabled.x-checkbox-checked .x-checkbox-inner::after{border-color:var(--x-checkbox-check-color-disabled, var(--x-color-text-quaternary, rgba(0, 0, 0, 0.25)))}.x-checkbox-label{line-height:1.5715;word-break:break-all}:host(.x-checkbox-wrapper-disabled) .x-checkbox-label{color:var(--x-checkbox-label-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}:host(.x-checkbox-placement-start){-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.x-checkbox-placement-start) .x-checkbox-label{padding-right:var(--x-checkbox-label-padding, var(--x-spacing-xs, 8px));padding-left:0}:host(.x-checkbox-placement-end){-ms-flex-direction:row;flex-direction:row}:host(.x-checkbox-placement-end) .x-checkbox-label{padding-left:var(--x-checkbox-label-padding, var(--x-spacing-xs, 8px));padding-right:0}:host(.x-checkbox-placement-fixed){-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.x-checkbox-placement-fixed) .x-checkbox-label{padding-right:var(--x-checkbox-label-padding, var(--x-spacing-xs, 8px));padding-left:0;width:var(--x-checkbox-label-width, 100px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}:host(.x-checkbox-placement-stacked){-ms-flex-direction:column-reverse;flex-direction:column-reverse;gap:var(--x-checkbox-label-padding, var(--x-spacing-xs, 8px))}:host(.x-checkbox-placement-stacked) .x-checkbox-label{padding:0;width:100%;text-align:center}:host(.x-checkbox-alignment-start){-ms-flex-align:start;align-items:flex-start}:host(.x-checkbox-alignment-center){-ms-flex-align:center;align-items:center}:host(.x-checkbox-alignment-end){-ms-flex-align:end;align-items:flex-end}`;
|
|
7
|
+
|
|
8
|
+
const XCheckbox = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.xChange = createEvent(this, "xChange", 7);
|
|
12
|
+
this.xFocus = createEvent(this, "xFocus", 7);
|
|
13
|
+
this.xBlur = createEvent(this, "xBlur", 7);
|
|
14
|
+
}
|
|
15
|
+
get el() { return getElement(this); }
|
|
16
|
+
inputEl;
|
|
17
|
+
// ==================== Props ====================
|
|
18
|
+
/**
|
|
19
|
+
* Whether the checkbox is automatically focused on mount.
|
|
20
|
+
* @default false
|
|
21
|
+
* @example
|
|
22
|
+
* <x-checkbox autoFocus>Auto focus</x-checkbox>
|
|
23
|
+
*/
|
|
24
|
+
autoFocus = false;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the checkbox is checked (controlled mode).
|
|
27
|
+
* @example
|
|
28
|
+
* <x-checkbox checked>Checked</x-checkbox>
|
|
29
|
+
*/
|
|
30
|
+
checked = false;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the checkbox is checked by default (uncontrolled mode).
|
|
33
|
+
* @default false
|
|
34
|
+
* @example
|
|
35
|
+
* <x-checkbox defaultChecked>Default</x-checkbox>
|
|
36
|
+
*/
|
|
37
|
+
defaultChecked = false;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the checkbox is disabled.
|
|
40
|
+
* @default false
|
|
41
|
+
* @example
|
|
42
|
+
* <x-checkbox disabled>Disabled</x-checkbox>
|
|
43
|
+
*/
|
|
44
|
+
disabled = false;
|
|
45
|
+
/**
|
|
46
|
+
* The indeterminate state of checkbox.
|
|
47
|
+
* Used when only some child checkboxes are checked.
|
|
48
|
+
* @default false
|
|
49
|
+
* @example
|
|
50
|
+
* <x-checkbox indeterminate>Select all</x-checkbox>
|
|
51
|
+
*/
|
|
52
|
+
indeterminate = false;
|
|
53
|
+
/**
|
|
54
|
+
* The name attribute of the checkbox input.
|
|
55
|
+
* @example
|
|
56
|
+
* <x-checkbox name="fruits">Apple</x-checkbox>
|
|
57
|
+
*/
|
|
58
|
+
name;
|
|
59
|
+
/**
|
|
60
|
+
* The value of the checkbox.
|
|
61
|
+
* @example
|
|
62
|
+
* <x-checkbox value="apple">Apple</x-checkbox>
|
|
63
|
+
*/
|
|
64
|
+
value;
|
|
65
|
+
/**
|
|
66
|
+
* Custom class names for checkbox parts.
|
|
67
|
+
* @example
|
|
68
|
+
* <x-checkbox classNames={{ root: 'my-checkbox' }}>Custom</x-checkbox>
|
|
69
|
+
*/
|
|
70
|
+
classNames;
|
|
71
|
+
/**
|
|
72
|
+
* Custom styles for checkbox parts.
|
|
73
|
+
* @example
|
|
74
|
+
* <x-checkbox styles={{ root: { marginRight: '8px' } }}>Styled</x-checkbox>
|
|
75
|
+
*/
|
|
76
|
+
styles;
|
|
77
|
+
/**
|
|
78
|
+
* Unique identifier for the checkbox.
|
|
79
|
+
* @example
|
|
80
|
+
* <x-checkbox checkboxId="agree">Agree</x-checkbox>
|
|
81
|
+
*/
|
|
82
|
+
checkboxId;
|
|
83
|
+
/**
|
|
84
|
+
* The placement of the label relative to the checkbox.
|
|
85
|
+
* @default 'start'
|
|
86
|
+
*/
|
|
87
|
+
placement = 'start';
|
|
88
|
+
/**
|
|
89
|
+
* The alignment of the label relative to the checkbox.
|
|
90
|
+
* @default 'center'
|
|
91
|
+
*/
|
|
92
|
+
alignment = 'center';
|
|
93
|
+
// ==================== Events ====================
|
|
94
|
+
/**
|
|
95
|
+
* Callback fired when the checkbox state changes.
|
|
96
|
+
* @example
|
|
97
|
+
* <x-checkbox onXChange={(ev) => console.log(ev.detail)}>Change</x-checkbox>
|
|
98
|
+
*/
|
|
99
|
+
xChange;
|
|
100
|
+
/**
|
|
101
|
+
* Callback fired when the checkbox is focused.
|
|
102
|
+
* @example
|
|
103
|
+
* <x-checkbox onXFocus={() => {}}>Focus</x-checkbox>
|
|
104
|
+
*/
|
|
105
|
+
xFocus;
|
|
106
|
+
/**
|
|
107
|
+
* Callback fired when the checkbox loses focus.
|
|
108
|
+
* @example
|
|
109
|
+
* <x-checkbox onXBlur={() => {}}>Blur</x-checkbox>
|
|
110
|
+
*/
|
|
111
|
+
xBlur;
|
|
112
|
+
// ==================== Lifecycle ====================
|
|
113
|
+
componentWillLoad() {
|
|
114
|
+
if (this.defaultChecked && !this.checked) {
|
|
115
|
+
this.checked = true;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
componentDidLoad() {
|
|
119
|
+
if (this.autoFocus && this.inputEl) {
|
|
120
|
+
this.inputEl.focus();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ==================== Watchers ====================
|
|
124
|
+
handleCheckedChange() {
|
|
125
|
+
// Sync with parent if needed
|
|
126
|
+
}
|
|
127
|
+
handleIndeterminateChange(newValue) {
|
|
128
|
+
if (this.inputEl) {
|
|
129
|
+
this.inputEl.indeterminate = newValue;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// ==================== Methods ====================
|
|
133
|
+
/**
|
|
134
|
+
* Focus the checkbox input.
|
|
135
|
+
* @example
|
|
136
|
+
* await el.setFocus()
|
|
137
|
+
*/
|
|
138
|
+
async setFocus() {
|
|
139
|
+
this.inputEl?.focus();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Remove focus from the checkbox input.
|
|
143
|
+
* @example
|
|
144
|
+
* await el.removeFocus()
|
|
145
|
+
*/
|
|
146
|
+
async removeFocus() {
|
|
147
|
+
this.inputEl?.blur();
|
|
148
|
+
}
|
|
149
|
+
// ==================== Private Methods ====================
|
|
150
|
+
/**
|
|
151
|
+
* Handle mouse click event on the checkbox host.
|
|
152
|
+
*
|
|
153
|
+
* Flow:
|
|
154
|
+
* 1. Checks if checkbox is disabled.
|
|
155
|
+
* 2. If enabled:
|
|
156
|
+
* - Toggles `checked` state.
|
|
157
|
+
* - Emits `xChange` event with new value and native event.
|
|
158
|
+
*
|
|
159
|
+
* @param e - Mouse event.
|
|
160
|
+
*/
|
|
161
|
+
handleClick = (e) => {
|
|
162
|
+
if (this.disabled) {
|
|
163
|
+
e.preventDefault();
|
|
164
|
+
e.stopPropagation();
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const newChecked = !this.checked;
|
|
168
|
+
this.checked = newChecked;
|
|
169
|
+
this.xChange.emit({
|
|
170
|
+
value: this.value,
|
|
171
|
+
checked: newChecked,
|
|
172
|
+
nativeEvent: e,
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
handleFocus = () => {
|
|
176
|
+
this.xFocus.emit();
|
|
177
|
+
};
|
|
178
|
+
handleBlur = () => {
|
|
179
|
+
this.xBlur.emit();
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Handle keydown event for accessibility (Space/Enter).
|
|
183
|
+
*
|
|
184
|
+
* Flow:
|
|
185
|
+
* 1. Checks if checkbox is disabled.
|
|
186
|
+
* 2. Checks if key is 'Space' or 'Enter'.
|
|
187
|
+
* 3. If match:
|
|
188
|
+
* - Prevents default scrolling/submission.
|
|
189
|
+
* - Toggles `checked` state.
|
|
190
|
+
* - Emits `xChange` event.
|
|
191
|
+
*
|
|
192
|
+
* @param e - Keyboard event.
|
|
193
|
+
*/
|
|
194
|
+
handleKeyDown = (e) => {
|
|
195
|
+
if (this.disabled)
|
|
196
|
+
return;
|
|
197
|
+
if (e.key === ' ' || e.key === 'Enter') {
|
|
198
|
+
e.preventDefault();
|
|
199
|
+
const newChecked = !this.checked;
|
|
200
|
+
this.checked = newChecked;
|
|
201
|
+
this.xChange.emit({
|
|
202
|
+
value: this.value,
|
|
203
|
+
checked: newChecked,
|
|
204
|
+
nativeEvent: e,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
// ==================== Render ====================
|
|
209
|
+
render() {
|
|
210
|
+
const wrapperClasses = {
|
|
211
|
+
'x-checkbox-wrapper': true,
|
|
212
|
+
'x-checkbox-wrapper-checked': this.checked,
|
|
213
|
+
'x-checkbox-wrapper-disabled': this.disabled,
|
|
214
|
+
'x-checkbox-wrapper-indeterminate': this.indeterminate,
|
|
215
|
+
[`x-checkbox-placement-${this.placement}`]: true,
|
|
216
|
+
[`x-checkbox-alignment-${this.alignment}`]: true,
|
|
217
|
+
[this.classNames?.root ?? '']: !!this.classNames?.root,
|
|
218
|
+
};
|
|
219
|
+
const checkboxClasses = {
|
|
220
|
+
'x-checkbox': true,
|
|
221
|
+
'x-checkbox-checked': this.checked,
|
|
222
|
+
'x-checkbox-disabled': this.disabled,
|
|
223
|
+
'x-checkbox-indeterminate': this.indeterminate && !this.checked,
|
|
224
|
+
[this.classNames?.checkbox ?? '']: !!this.classNames?.checkbox,
|
|
225
|
+
};
|
|
226
|
+
const innerClasses = {
|
|
227
|
+
'x-checkbox-inner': true,
|
|
228
|
+
[this.classNames?.inner ?? '']: !!this.classNames?.inner,
|
|
229
|
+
};
|
|
230
|
+
const labelClasses = {
|
|
231
|
+
'x-checkbox-label': true,
|
|
232
|
+
[this.classNames?.label ?? '']: !!this.classNames?.label,
|
|
233
|
+
};
|
|
234
|
+
const wrapperStyles = this.styles?.root;
|
|
235
|
+
const checkboxStyles = this.styles?.checkbox;
|
|
236
|
+
const innerStyles = this.styles?.inner;
|
|
237
|
+
const labelStyles = this.styles?.label;
|
|
238
|
+
return (h(Host, { key: 'a1c7291fd6e4031b6c8d0bea308dd6aea7153ad4', class: wrapperClasses, style: wrapperStyles, onClick: this.handleClick, onKeyDown: this.handleKeyDown, role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0 }, h("span", { key: '59675b4f86cdda584c581cbe30f802d68f6d60e9', class: checkboxClasses, style: checkboxStyles }, h("input", { key: 'ff2ff95534df771155a1b2ebd415d8fa0cec147b', ref: (el) => (this.inputEl = el), type: "checkbox", class: "x-checkbox-input", id: this.checkboxId, checked: this.checked, disabled: this.disabled, name: this.name, value: this.value, tabIndex: -1, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: (e) => e.stopPropagation() }), h("span", { key: '3649f0c10c84cd790968df35463c86cbebb16063', class: innerClasses, style: innerStyles })), h("span", { key: '29926839fb6291c5cddbf64dcfdfa67ac003729f', class: labelClasses, style: labelStyles }, h("slot", { key: 'b8f3d955db9c3370c9bb0f18ef158f64341619b6' }))));
|
|
239
|
+
}
|
|
240
|
+
static get watchers() { return {
|
|
241
|
+
"checked": [{
|
|
242
|
+
"handleCheckedChange": 0
|
|
243
|
+
}],
|
|
244
|
+
"indeterminate": [{
|
|
245
|
+
"handleIndeterminateChange": 0
|
|
246
|
+
}]
|
|
247
|
+
}; }
|
|
248
|
+
};
|
|
249
|
+
XCheckbox.style = xCheckboxCss();
|
|
250
|
+
|
|
251
|
+
const xPaginationCss = () => `@charset "UTF-8";:root{--x-color-primary:#1677ff;--x-color-primary-rgb:22, 119, 255;--x-color-primary-contrast:#ffffff;--x-color-primary-contrast-rgb:255, 255, 255;--x-color-primary-shade:#0958d9;--x-color-primary-tint:#4096ff;--x-color-primary-bg:#e6f4ff;--x-color-primary-bg-hover:#bae0ff;--x-color-primary-border:#91caff;--x-color-primary-border-hover:#69b1ff;--x-color-primary-hover:#4096ff;--x-color-primary-active:#0958d9;--x-color-primary-text:#1677ff;--x-color-primary-text-hover:#4096ff;--x-color-primary-text-active:#0958d9;--x-color-secondary:#3dc2ff;--x-color-secondary-rgb:61, 194, 255;--x-color-secondary-contrast:#ffffff;--x-color-secondary-contrast-rgb:255, 255, 255;--x-color-secondary-shade:#36abe0;--x-color-secondary-tint:#50c8ff;--x-color-success:#52c41a;--x-color-success-rgb:82, 196, 26;--x-color-success-contrast:#ffffff;--x-color-success-contrast-rgb:255, 255, 255;--x-color-success-shade:#389e0d;--x-color-success-tint:#73d13d;--x-color-success-bg:#f6ffed;--x-color-success-bg-hover:#d9f7be;--x-color-success-border:#b7eb8f;--x-color-success-border-hover:#95de64;--x-color-success-hover:#73d13d;--x-color-success-active:#389e0d;--x-color-success-text:#52c41a;--x-color-success-text-hover:#73d13d;--x-color-success-text-active:#389e0d;--x-color-warning:#faad14;--x-color-warning-rgb:250, 173, 20;--x-color-warning-contrast:#000000;--x-color-warning-contrast-rgb:0, 0, 0;--x-color-warning-shade:#d48806;--x-color-warning-tint:#ffc53d;--x-color-warning-bg:#fffbe6;--x-color-warning-bg-hover:#fff1b8;--x-color-warning-border:#ffe58f;--x-color-warning-border-hover:#ffd666;--x-color-warning-hover:#ffc53d;--x-color-warning-active:#d48806;--x-color-warning-text:#faad14;--x-color-warning-text-hover:#ffc53d;--x-color-warning-text-active:#d48806;--x-color-danger:#ff4d4f;--x-color-danger-rgb:255, 77, 79;--x-color-danger-contrast:#ffffff;--x-color-danger-contrast-rgb:255, 255, 255;--x-color-danger-shade:#cf1322;--x-color-danger-tint:#ff7875;--x-color-error:#ff4d4f;--x-color-error-rgb:255, 77, 79;--x-color-error-bg:#fff2f0;--x-color-error-bg-hover:#ffccc7;--x-color-error-border:#ffa39e;--x-color-error-border-hover:#ff7875;--x-color-error-hover:#ff7875;--x-color-error-active:#d9363e;--x-color-error-text:#ff4d4f;--x-color-error-text-hover:#ff7875;--x-color-error-text-active:#d9363e;--x-color-info:#1677ff;--x-color-info-rgb:22, 119, 255;--x-color-info-bg:#e6f4ff;--x-color-info-bg-hover:#bae0ff;--x-color-info-border:#91caff;--x-color-info-border-hover:#69b1ff;--x-color-info-hover:#69b1ff;--x-color-info-active:#0958d9;--x-color-info-text:#1677ff;--x-color-info-text-hover:#69b1ff;--x-color-info-text-active:#0958d9;--x-color-text:rgba(0, 0, 0, 0.88);--x-color-text-secondary:rgba(0, 0, 0, 0.65);--x-color-text-tertiary:rgba(0, 0, 0, 0.45);--x-color-text-quaternary:rgba(0, 0, 0, 0.25);--x-color-text-disabled:rgba(0, 0, 0, 0.25);--x-color-text-placeholder:rgba(0, 0, 0, 0.25);--x-color-text-heading:rgba(0, 0, 0, 0.88);--x-color-text-label:rgba(0, 0, 0, 0.65);--x-color-text-description:rgba(0, 0, 0, 0.45);--x-color-text-light-solid:#ffffff;--x-color-bg-container:#ffffff;--x-color-bg-elevated:#ffffff;--x-color-bg-layout:#f5f5f5;--x-color-bg-spotlight:rgba(0, 0, 0, 0.85);--x-color-bg-mask:rgba(0, 0, 0, 0.45);--x-color-bg-base:#ffffff;--x-color-bg-container-disabled:#f5f5f5;--x-color-bg-container-loading:rgba(255, 255, 255, 0.65);--x-color-white:#ffffff;--x-color-fill:rgba(0, 0, 0, 0.15);--x-color-fill-secondary:rgba(0, 0, 0, 0.06);--x-color-fill-tertiary:rgba(0, 0, 0, 0.04);--x-color-fill-quaternary:rgba(0, 0, 0, 0.02);--x-color-border:#d9d9d9;--x-color-border-secondary:#f0f0f0;--x-color-border-bg:#ffffff;--x-color-split:rgba(5, 5, 5, 0.06);--x-color-dark:#222428;--x-color-dark-rgb:34, 36, 40;--x-color-dark-contrast:#ffffff;--x-color-dark-contrast-rgb:255, 255, 255;--x-color-dark-shade:#1e2023;--x-color-dark-tint:#383a3e;--x-color-medium:#92949c;--x-color-medium-rgb:146, 148, 156;--x-color-medium-contrast:#ffffff;--x-color-medium-contrast-rgb:255, 255, 255;--x-color-medium-shade:#808289;--x-color-medium-tint:#9d9fa6;--x-color-light:#f4f5f8;--x-color-light-rgb:244, 245, 248;--x-color-light-contrast:#000000;--x-color-light-contrast-rgb:0, 0, 0;--x-color-light-shade:#d7d8da;--x-color-light-tint:#f5f6f9;--x-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--x-font-family-code:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--x-font-size:14px;--x-font-size-sm:12px;--x-font-size-lg:16px;--x-font-size-xl:20px;--x-font-size-heading-1:38px;--x-font-size-heading-2:30px;--x-font-size-heading-3:24px;--x-font-size-heading-4:20px;--x-font-size-heading-5:16px;--x-line-height:1.5714285714285714;--x-line-height-lg:1.5;--x-line-height-sm:1.6666666666666667;--x-line-height-heading-1:1.2105263157894737;--x-line-height-heading-2:1.2666666666666666;--x-line-height-heading-3:1.3333333333333333;--x-line-height-heading-4:1.4;--x-line-height-heading-5:1.5;--x-font-weight-normal:400;--x-font-weight-medium:500;--x-font-weight-semibold:600;--x-font-weight-strong:600;--x-font-size-base:14px;--x-font-size-xxl:24px;--x-line-height-base:1.5714285714285714;--x-spacing-xxs:4px;--x-spacing-xs:8px;--x-spacing-sm:12px;--x-spacing-md:16px;--x-spacing-lg:20px;--x-spacing-xl:24px;--x-spacing-xxl:32px;--x-spacing-xxxl:48px;--x-margin-xxs:4px;--x-margin-xs:8px;--x-margin-sm:12px;--x-margin-md:16px;--x-margin-lg:24px;--x-margin-xl:32px;--x-margin-xxl:48px;--x-padding-xxs:4px;--x-padding-xs:8px;--x-padding-sm:12px;--x-padding-md:16px;--x-padding-lg:24px;--x-padding-content-horizontal-lg:24px;--x-padding-content-vertical-lg:12px;--x-padding-content-horizontal:16px;--x-padding-content-vertical:12px;--x-padding-content-horizontal-sm:16px;--x-padding-content-vertical-sm:8px;--x-border-radius:6px;--x-border-radius-xs:2px;--x-border-radius-sm:4px;--x-border-radius-lg:8px;--x-border-radius-xl:12px;--x-border-radius-outer:4px;--x-border-radius-base:6px;--x-border-width:1px;--x-border-width-base:1px;--x-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-shadow-lg:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-box-shadow-popover-arrow:2px 2px 5px rgba(0, 0, 0, 0.05);--x-box-shadow-card:0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);--x-box-shadow-drawer-right:-6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-left:6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-up:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-down:0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);--x-motion-duration-fast:0.1s;--x-motion-duration-mid:0.2s;--x-motion-duration-slow:0.3s;--x-motion-ease-in-out:cubic-bezier(0.645, 0.045, 0.355, 1);--x-motion-ease-out:cubic-bezier(0.215, 0.61, 0.355, 1);--x-motion-ease-in:cubic-bezier(0.55, 0.055, 0.675, 0.19);--x-motion-ease-out-back:cubic-bezier(0.12, 0.4, 0.29, 1.46);--x-motion-ease-in-back:cubic-bezier(0.71, -0.46, 0.88, 0.6);--x-motion-ease-in-out-circle:cubic-bezier(0.78, 0.14, 0.15, 0.86);--x-motion-ease-out-circle:cubic-bezier(0.08, 0.82, 0.17, 1);--x-motion-ease-in-circle:cubic-bezier(0.6, 0.04, 0.98, 0.34);--x-motion-ease-in-quint:cubic-bezier(0.755, 0.05, 0.855, 0.06);--x-motion-ease-out-quint:cubic-bezier(0.23, 1, 0.32, 1);--x-z-index-base:0;--x-z-index-popup-base:1000;--x-z-index-popup:1030;--x-z-index-affix:10;--x-z-index-modal:1000;--x-z-index-modal-mask:1000;--x-z-index-drawer:1000;--x-z-index-popover:1030;--x-z-index-dropdown:1050;--x-z-index-tooltip:1070;--x-z-index-notification:1080;--x-z-index-message:1090;--x-z-index-popconfirm:1060;--x-z-index-table-fixed:10;--x-opacity-loading:0.65;--x-opacity-image:1;--x-opacity-disabled:0.5;--x-control-height:32px;--x-control-height-xs:24px;--x-control-height-sm:24px;--x-control-height-lg:40px;--x-control-radio-size:16px;--x-control-checkbox-size:16px;--x-control-padding-horizontal:12px;--x-control-padding-horizontal-sm:8px;--x-control-outline-width:2px;--x-control-outline:rgba(5, 145, 255, 0.1);--x-control-item-bg-hover:rgba(0, 0, 0, 0.04);--x-control-item-bg-active:#e6f4ff;--x-control-item-bg-active-hover:#bae0ff;--x-control-item-bg-active-disabled:rgba(0, 0, 0, 0.15);--x-control-tmp-outline:rgba(0, 0, 0, 0.02);--x-color-yellow:#fadb14;--x-color-yellow-rgb:250, 219, 20;--x-font-family-base:var(--x-font-family);--x-color-link:#1677ff;--x-color-link-hover:#69b1ff;--x-color-link-active:#0958d9;--x-color-icon:rgba(0, 0, 0, 0.45);--x-color-icon-hover:rgba(0, 0, 0, 0.88);--x-color-highlight:#ff4d4f;--x-color-bg-text-hover:rgba(0, 0, 0, 0.06);--x-color-bg-text-active:rgba(0, 0, 0, 0.15);--x-screen-xs:480px;--x-screen-xs-min:480px;--x-screen-xs-max:575px;--x-screen-sm:576px;--x-screen-sm-min:576px;--x-screen-sm-max:767px;--x-screen-md:768px;--x-screen-md-min:768px;--x-screen-md-max:991px;--x-screen-lg:992px;--x-screen-lg-min:992px;--x-screen-lg-max:1199px;--x-screen-xl:1200px;--x-screen-xl-min:1200px;--x-screen-xl-max:1599px;--x-screen-xxl:1600px;--x-screen-xxl-min:1600px;--x-color-fill-content:rgba(0, 0, 0, 0.06);--x-color-fill-content-hover:rgba(0, 0, 0, 0.15);--x-color-fill-alter:rgba(0, 0, 0, 0.02);--x-scrollbar-width:12px;--x-scrollbar-track-bg:rgba(0, 0, 0, 0.04);--x-scrollbar-thumb-bg:rgba(0, 0, 0, 0.25);--x-scrollbar-thumb-bg-hover:rgba(0, 0, 0, 0.35);--x-menu-dark-bg:#001529;--x-menu-dark-item-bg:#001529;--x-menu-dark-popup-bg:#001529;--x-menu-dark-submenu-item-bg:#000c17}:host{display:-ms-flexbox;display:flex;font-size:var(--x-pagination-font-size, var(--x-font-size-base, 14px));line-height:var(--x-pagination-line-height, var(--x-line-height-base, 1.5714));color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));-webkit-box-sizing:border-box;box-sizing:border-box}:host(.x-pagination-align-start){-ms-flex-pack:start;justify-content:flex-start}:host(.x-pagination-align-center){-ms-flex-pack:center;justify-content:center}:host(.x-pagination-align-end){-ms-flex-pack:end;justify-content:flex-end}:host(.x-pagination-disabled){cursor:not-allowed;opacity:0.65}:host(.x-pagination-disabled) .x-pagination-item,:host(.x-pagination-disabled) .x-pagination-prev,:host(.x-pagination-disabled) .x-pagination-next,:host(.x-pagination-disabled) .x-pagination-jump-prev,:host(.x-pagination-disabled) .x-pagination-jump-next{cursor:not-allowed;pointer-events:none}:host(.x-pagination-small){font-size:var(--x-pagination-font-size-sm, var(--x-font-size-sm, 12px))}:host(.x-pagination-small) .x-pagination-item,:host(.x-pagination-small) .x-pagination-prev,:host(.x-pagination-small) .x-pagination-next,:host(.x-pagination-small) .x-pagination-jump-prev,:host(.x-pagination-small) .x-pagination-jump-next{min-width:var(--x-pagination-item-size-sm, var(--x-control-height-sm, 24px));height:var(--x-pagination-item-size-sm, var(--x-control-height-sm, 24px));line-height:calc(var(--x-pagination-item-size-sm, var(--x-control-height-sm, 24px)) - 2px)}:host(.x-pagination-small) .x-pagination-options-quick-jumper input{height:var(--x-pagination-item-size-sm, var(--x-control-height-sm, 24px));font-size:var(--x-pagination-font-size-sm, var(--x-font-size-sm, 12px))}:host(.x-pagination-small) .x-pagination-simple-pager-input{width:var(--x-pagination-simple-input-width-sm, 40px);height:var(--x-pagination-item-size-sm, var(--x-control-height-sm, 24px));font-size:var(--x-pagination-font-size-sm, var(--x-font-size-sm, 12px))}:host(.x-pagination-large){font-size:var(--x-pagination-font-size-lg, var(--x-font-size-lg, 16px))}:host(.x-pagination-large) .x-pagination-item,:host(.x-pagination-large) .x-pagination-prev,:host(.x-pagination-large) .x-pagination-next,:host(.x-pagination-large) .x-pagination-jump-prev,:host(.x-pagination-large) .x-pagination-jump-next{min-width:var(--x-pagination-item-size-lg, var(--x-control-height-lg, 40px));height:var(--x-pagination-item-size-lg, var(--x-control-height-lg, 40px));line-height:calc(var(--x-pagination-item-size-lg, var(--x-control-height-lg, 40px)) - 2px)}:host(.x-pagination-large) .x-pagination-options-quick-jumper input{height:var(--x-pagination-item-size-lg, var(--x-control-height-lg, 40px));font-size:var(--x-pagination-font-size-lg, var(--x-font-size-lg, 16px))}:host(.x-pagination-large) .x-pagination-simple-pager-input{width:var(--x-pagination-simple-input-width-lg, 60px);height:var(--x-pagination-item-size-lg, var(--x-control-height-lg, 40px));font-size:var(--x-pagination-font-size-lg, var(--x-font-size-lg, 16px))}.x-pagination{margin:0;padding:0;list-style:none;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--x-pagination-item-margin, var(--x-spacing-xs, 8px))}.x-pagination-item{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--x-pagination-item-size, var(--x-control-height, 32px));height:var(--x-pagination-item-size, var(--x-control-height, 32px));font-family:var(--x-pagination-font-family, var(--x-font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));text-align:center;vertical-align:middle;list-style:none;background-color:var(--x-pagination-item-bg, var(--x-color-bg-container, #ffffff));border:var(--x-pagination-border-width, var(--x-border-width-base, 1px)) solid var(--x-pagination-border-color, var(--x-color-border, #d9d9d9));border-radius:var(--x-pagination-border-radius, var(--x-border-radius-base, 6px));outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s));transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s))}.x-pagination-item .x-pagination-item-link{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;padding:0 var(--x-pagination-item-padding, var(--x-spacing-xs, 8px));color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)))}.x-pagination-item:hover:not(.x-pagination-item-active){border-color:var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-item:hover:not(.x-pagination-item-active) .x-pagination-item-link{color:var(--x-pagination-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-item:focus-visible{outline:2px solid var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff));outline-offset:2px}.x-pagination-item-active{font-weight:var(--x-pagination-font-weight-active, var(--x-font-weight-semibold, 600));background-color:var(--x-pagination-item-bg-active, var(--x-color-bg-container, #ffffff));border-color:var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff))}.x-pagination-item-active .x-pagination-item-link{color:var(--x-pagination-color-active, var(--x-color-primary, #1677ff))}.x-pagination-item-active:hover{border-color:var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff))}.x-pagination-item-active:hover .x-pagination-item-link{color:var(--x-pagination-color-active, var(--x-color-primary, #1677ff))}.x-pagination-prev,.x-pagination-next{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--x-pagination-item-size, var(--x-control-height, 32px));height:var(--x-pagination-item-size, var(--x-control-height, 32px));text-align:center;vertical-align:middle;list-style:none;background-color:var(--x-pagination-item-bg, var(--x-color-bg-container, #ffffff));border:var(--x-pagination-border-width, var(--x-border-width-base, 1px)) solid var(--x-pagination-border-color, var(--x-color-border, #d9d9d9));border-radius:var(--x-pagination-border-radius, var(--x-border-radius-base, 6px));outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s));transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s))}.x-pagination-prev button,.x-pagination-next button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;padding:0;color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));font-size:inherit;background:transparent;border:none;cursor:inherit}.x-pagination-prev .x-pagination-prev-icon,.x-pagination-prev .x-pagination-next-icon,.x-pagination-next .x-pagination-prev-icon,.x-pagination-next .x-pagination-next-icon{font-size:var(--x-pagination-jump-icon-size, 12px);font-weight:bold}.x-pagination-prev:hover:not(.x-pagination-disabled),.x-pagination-next:hover:not(.x-pagination-disabled){border-color:var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-prev:hover:not(.x-pagination-disabled) button,.x-pagination-next:hover:not(.x-pagination-disabled) button{color:var(--x-pagination-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-prev:focus-visible,.x-pagination-next:focus-visible{outline:2px solid var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff));outline-offset:2px}.x-pagination-disabled{cursor:not-allowed;background-color:var(--x-pagination-item-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));border-color:var(--x-pagination-border-color, var(--x-color-border, #d9d9d9))}.x-pagination-disabled button{color:var(--x-pagination-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)));cursor:not-allowed}.x-pagination-disabled:hover{border-color:var(--x-pagination-border-color, var(--x-color-border, #d9d9d9))}.x-pagination-disabled:hover button{color:var(--x-pagination-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-pagination-jump-prev,.x-pagination-jump-next{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:var(--x-pagination-item-size, var(--x-control-height, 32px));height:var(--x-pagination-item-size, var(--x-control-height, 32px));text-align:center;vertical-align:middle;list-style:none;color:var(--x-pagination-color-quaternary, var(--x-color-text-quaternary, rgba(0, 0, 0, 0.25)));background-color:transparent;border:var(--x-pagination-border-width, var(--x-border-width-base, 1px)) solid transparent;border-radius:var(--x-pagination-border-radius, var(--x-border-radius-base, 6px));cursor:pointer;-webkit-transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s));transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s))}.x-pagination-jump-prev .x-pagination-item-ellipsis,.x-pagination-jump-next .x-pagination-item-ellipsis{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.x-pagination-jump-prev .x-pagination-item-ellipsis-dot,.x-pagination-jump-next .x-pagination-item-ellipsis-dot{display:block;letter-spacing:2px}.x-pagination-jump-prev .x-pagination-item-ellipsis-icon,.x-pagination-jump-next .x-pagination-item-ellipsis-icon{display:none;color:var(--x-pagination-color-hover, var(--x-color-primary-hover, #4096ff));font-size:var(--x-pagination-jump-icon-size, 12px);font-weight:bold}.x-pagination-jump-prev:hover .x-pagination-item-ellipsis-dot,.x-pagination-jump-next:hover .x-pagination-item-ellipsis-dot{display:none}.x-pagination-jump-prev:hover .x-pagination-item-ellipsis-icon,.x-pagination-jump-next:hover .x-pagination-item-ellipsis-icon{display:block}.x-pagination-jump-prev:focus-visible,.x-pagination-jump-next:focus-visible{outline:2px solid var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff));outline-offset:2px}.x-pagination-total-text{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:var(--x-pagination-item-size, var(--x-control-height, 32px));color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)))}.x-pagination-options{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;list-style:none}.x-pagination-options-quick-jumper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;list-style:none;gap:8px}.x-pagination-options-quick-jumper span{color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)))}.x-pagination-options-quick-jumper input{width:var(--x-pagination-simple-input-width, 50px);height:var(--x-pagination-item-size, var(--x-control-height, 32px));padding:0 8px;font-size:var(--x-pagination-font-size, var(--x-font-size-base, 14px));color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));text-align:center;background-color:var(--x-pagination-item-bg, var(--x-color-bg-container, #ffffff));border:var(--x-pagination-border-width, var(--x-border-width-base, 1px)) solid var(--x-pagination-border-color, var(--x-color-border, #d9d9d9));border-radius:var(--x-pagination-border-radius, var(--x-border-radius-base, 6px));-webkit-transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s));transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s))}.x-pagination-options-quick-jumper input:hover{border-color:var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-options-quick-jumper input:focus{outline:none;border-color:var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff));-webkit-box-shadow:0 0 0 2px rgba(var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff)), 0.2);box-shadow:0 0 0 2px rgba(var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff)), 0.2)}.x-pagination-options-quick-jumper input:disabled{cursor:not-allowed;background-color:var(--x-pagination-item-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));color:var(--x-pagination-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-pagination-options-quick-jumper .x-pagination-options-quick-jumper-button{height:var(--x-pagination-item-size, var(--x-control-height, 32px));padding:0 12px;font-size:var(--x-pagination-font-size, var(--x-font-size-base, 14px));color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));background-color:var(--x-pagination-item-bg, var(--x-color-bg-container, #ffffff));border:var(--x-pagination-border-width, var(--x-border-width-base, 1px)) solid var(--x-pagination-border-color, var(--x-color-border, #d9d9d9));border-radius:var(--x-pagination-border-radius, var(--x-border-radius-base, 6px));cursor:pointer;-webkit-transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s));transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s))}.x-pagination-options-quick-jumper .x-pagination-options-quick-jumper-button:hover{border-color:var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff));color:var(--x-pagination-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-options-quick-jumper .x-pagination-options-quick-jumper-button:disabled{cursor:not-allowed;background-color:var(--x-pagination-item-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));color:var(--x-pagination-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-pagination-simple .x-pagination-prev,.x-pagination-simple .x-pagination-next{background:transparent;border-color:transparent}.x-pagination-simple .x-pagination-prev:hover:not(.x-pagination-disabled),.x-pagination-simple .x-pagination-next:hover:not(.x-pagination-disabled){background-color:var(--x-pagination-item-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)))}.x-pagination-simple-pager{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px;list-style:none}.x-pagination-simple-pager-input{width:var(--x-pagination-simple-input-width, 50px);height:var(--x-pagination-item-size, var(--x-control-height, 32px));padding:0 8px;font-size:var(--x-pagination-font-size, var(--x-font-size-base, 14px));color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));text-align:center;background-color:var(--x-pagination-item-bg, var(--x-color-bg-container, #ffffff));border:var(--x-pagination-border-width, var(--x-border-width-base, 1px)) solid var(--x-pagination-border-color, var(--x-color-border, #d9d9d9));border-radius:var(--x-pagination-border-radius, var(--x-border-radius-base, 6px));-webkit-transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s));transition:all var(--x-pagination-motion-duration, var(--x-motion-duration-mid, 0.2s))}.x-pagination-simple-pager-input:hover{border-color:var(--x-pagination-border-color-hover, var(--x-color-primary-hover, #4096ff))}.x-pagination-simple-pager-input:focus{outline:none;border-color:var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff));-webkit-box-shadow:0 0 0 2px rgba(var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff)), 0.2);box-shadow:0 0 0 2px rgba(var(--x-pagination-border-color-active, var(--x-color-primary, #1677ff)), 0.2)}.x-pagination-simple-pager-input:-moz-read-only{cursor:not-allowed;background-color:var(--x-pagination-item-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));color:var(--x-pagination-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-pagination-simple-pager-input:disabled,.x-pagination-simple-pager-input:read-only{cursor:not-allowed;background-color:var(--x-pagination-item-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));color:var(--x-pagination-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-pagination-simple-pager-slash{color:var(--x-pagination-color-quaternary, var(--x-color-text-quaternary, rgba(0, 0, 0, 0.25)))}.x-pagination-simple-pager-total{color:var(--x-pagination-color, var(--x-color-text, rgba(0, 0, 0, 0.88)))}`;
|
|
252
|
+
|
|
253
|
+
const XPagination = class {
|
|
254
|
+
constructor(hostRef) {
|
|
255
|
+
registerInstance(this, hostRef);
|
|
256
|
+
this.xChange = createEvent(this, "xChange", 7);
|
|
257
|
+
this.xShowSizeChange = createEvent(this, "xShowSizeChange", 7);
|
|
258
|
+
}
|
|
259
|
+
// ==================== Props ====================
|
|
260
|
+
/**
|
|
261
|
+
* Current page number (controlled).
|
|
262
|
+
* @type {number}
|
|
263
|
+
* @example
|
|
264
|
+
* <x-pagination current={2}></x-pagination>
|
|
265
|
+
*/
|
|
266
|
+
current;
|
|
267
|
+
/**
|
|
268
|
+
* Default initial page number (uncontrolled).
|
|
269
|
+
* @type {number}
|
|
270
|
+
* @default 1
|
|
271
|
+
* @example
|
|
272
|
+
* <x-pagination defaultCurrent={1}></x-pagination>
|
|
273
|
+
*/
|
|
274
|
+
defaultCurrent = 1;
|
|
275
|
+
/**
|
|
276
|
+
* Default number of data items per page.
|
|
277
|
+
* @type {number}
|
|
278
|
+
* @default 10
|
|
279
|
+
* @example
|
|
280
|
+
* <x-pagination defaultPageSize={20}></x-pagination>
|
|
281
|
+
*/
|
|
282
|
+
defaultPageSize = 10;
|
|
283
|
+
/**
|
|
284
|
+
* Disable pagination interaction.
|
|
285
|
+
* @type {boolean}
|
|
286
|
+
* @default false
|
|
287
|
+
* @example
|
|
288
|
+
* <x-pagination disabled></x-pagination>
|
|
289
|
+
*/
|
|
290
|
+
disabled = false;
|
|
291
|
+
/**
|
|
292
|
+
* Whether to hide pager when there is only one page.
|
|
293
|
+
* @type {boolean}
|
|
294
|
+
* @default false
|
|
295
|
+
* @example
|
|
296
|
+
* <x-pagination hideOnSinglePage></x-pagination>
|
|
297
|
+
*/
|
|
298
|
+
hideOnSinglePage = false;
|
|
299
|
+
/**
|
|
300
|
+
* Number of data items per page (controlled).
|
|
301
|
+
* @type {number}
|
|
302
|
+
* @example
|
|
303
|
+
* <x-pagination pageSize={50}></x-pagination>
|
|
304
|
+
*/
|
|
305
|
+
pageSize;
|
|
306
|
+
/**
|
|
307
|
+
* Options providing selectable page sizes.
|
|
308
|
+
* @type {number[]}
|
|
309
|
+
* @default [10, 20, 50, 100]
|
|
310
|
+
* @example
|
|
311
|
+
* <x-pagination pageSizeOptions={[10, 20, 50, 100]}></x-pagination>
|
|
312
|
+
*/
|
|
313
|
+
pageSizeOptions = [10, 20, 50, 100];
|
|
314
|
+
/**
|
|
315
|
+
* Minimum total items required to automatically show the size changer.
|
|
316
|
+
* @type {number}
|
|
317
|
+
* @default 50
|
|
318
|
+
* @example
|
|
319
|
+
* <x-pagination totalBoundaryShowSizeChanger={100}></x-pagination>
|
|
320
|
+
*/
|
|
321
|
+
totalBoundaryShowSizeChanger = 50;
|
|
322
|
+
/**
|
|
323
|
+
* Force show/hide size changer regardless of total items.
|
|
324
|
+
* @type {boolean}
|
|
325
|
+
* @example
|
|
326
|
+
* <x-pagination showSizeChanger={true}></x-pagination>
|
|
327
|
+
*/
|
|
328
|
+
showSizeChanger;
|
|
329
|
+
/**
|
|
330
|
+
* Show quick jumper to skip to a specific page.
|
|
331
|
+
* @type {boolean | PaginationQuickJumper}
|
|
332
|
+
* @default false
|
|
333
|
+
* @example
|
|
334
|
+
* <x-pagination showQuickJumper></x-pagination>
|
|
335
|
+
*/
|
|
336
|
+
showQuickJumper = false;
|
|
337
|
+
/**
|
|
338
|
+
* Function to customize the display of total items and current range.
|
|
339
|
+
* @type {(total: number, range: [number, number]) => string}
|
|
340
|
+
* @example
|
|
341
|
+
* <x-pagination showTotal={(total, range) => `${range[0]}-${range[1]} of ${total} items`}></x-pagination>
|
|
342
|
+
*/
|
|
343
|
+
showTotal;
|
|
344
|
+
/**
|
|
345
|
+
* Show fewer items in the pager (useful for narrow spaces).
|
|
346
|
+
* @type {boolean}
|
|
347
|
+
* @default false
|
|
348
|
+
* @example
|
|
349
|
+
* <x-pagination showLessItems></x-pagination>
|
|
350
|
+
*/
|
|
351
|
+
showLessItems = false;
|
|
352
|
+
/**
|
|
353
|
+
* Whether to show title attributes on the pager elements.
|
|
354
|
+
* @type {boolean}
|
|
355
|
+
* @default true
|
|
356
|
+
* @example
|
|
357
|
+
* <x-pagination showTitle={false}></x-pagination>
|
|
358
|
+
*/
|
|
359
|
+
showTitle = true;
|
|
360
|
+
/**
|
|
361
|
+
* Enable simple mode navigation.
|
|
362
|
+
* @type {boolean | PaginationSimple}
|
|
363
|
+
* @default false
|
|
364
|
+
* @example
|
|
365
|
+
* <x-pagination simple></x-pagination>
|
|
366
|
+
*/
|
|
367
|
+
simple = false;
|
|
368
|
+
/**
|
|
369
|
+
* Component size: 'small', 'middle', or 'large'.
|
|
370
|
+
* @type {PaginationSize}
|
|
371
|
+
* @default 'middle'
|
|
372
|
+
* @example
|
|
373
|
+
* <x-pagination size="small"></x-pagination>
|
|
374
|
+
*/
|
|
375
|
+
size = 'middle';
|
|
376
|
+
/**
|
|
377
|
+
* Total number of data items.
|
|
378
|
+
* @type {number}
|
|
379
|
+
* @default 0
|
|
380
|
+
* @example
|
|
381
|
+
* <x-pagination total={120}></x-pagination>
|
|
382
|
+
*/
|
|
383
|
+
total = 0;
|
|
384
|
+
/**
|
|
385
|
+
* Alignment of the pagination container.
|
|
386
|
+
* @type {PaginationAlign}
|
|
387
|
+
* @default 'start'
|
|
388
|
+
* @example
|
|
389
|
+
* <x-pagination align="center"></x-pagination>
|
|
390
|
+
*/
|
|
391
|
+
align = 'start';
|
|
392
|
+
/**
|
|
393
|
+
* If set, pagination will be responsive and adjust its UI.
|
|
394
|
+
* @type {boolean}
|
|
395
|
+
* @default false
|
|
396
|
+
* @example
|
|
397
|
+
* <x-pagination responsive></x-pagination>
|
|
398
|
+
*/
|
|
399
|
+
responsive = false;
|
|
400
|
+
/**
|
|
401
|
+
* Custom CSS class names for internal sub-components.
|
|
402
|
+
* @type {PaginationClassNames}
|
|
403
|
+
* @example
|
|
404
|
+
* <x-pagination classNames={{ root: 'my-pg', item: 'pg-item' }}></x-pagination>
|
|
405
|
+
*/
|
|
406
|
+
classNames = {};
|
|
407
|
+
/**
|
|
408
|
+
* Inline styles for internal sub-components.
|
|
409
|
+
* @type {PaginationStyles}
|
|
410
|
+
* @example
|
|
411
|
+
* <x-pagination styles={{ root: 'margin-top: 10px;' }}></x-pagination>
|
|
412
|
+
*/
|
|
413
|
+
styles = {};
|
|
414
|
+
// ==================== Events ====================
|
|
415
|
+
/**
|
|
416
|
+
* Emitted when current page number or page size is changed.
|
|
417
|
+
* Useful for triggering data re-fetching.
|
|
418
|
+
* @event xChange
|
|
419
|
+
*/
|
|
420
|
+
xChange;
|
|
421
|
+
/**
|
|
422
|
+
* Emitted specifically when the page size is changed via the selector.
|
|
423
|
+
* @event xShowSizeChange
|
|
424
|
+
*/
|
|
425
|
+
xShowSizeChange;
|
|
426
|
+
// ==================== State ====================
|
|
427
|
+
/** Internal state tracking current page to handle uncontrolled/controlled logic sync. */
|
|
428
|
+
internalCurrent = 1;
|
|
429
|
+
/** Internal state tracking current items per page. */
|
|
430
|
+
internalPageSize = 10;
|
|
431
|
+
/** Temporary string value typed into the jump input before confirming (Enter/Go). */
|
|
432
|
+
jumpValue = '';
|
|
433
|
+
// ==================== Lifecycle ====================
|
|
434
|
+
/** Sets up initial internal state from props during component initialization. */
|
|
435
|
+
componentWillLoad() {
|
|
436
|
+
this.internalCurrent = this.current ?? this.defaultCurrent;
|
|
437
|
+
this.internalPageSize = this.pageSize ?? this.defaultPageSize;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Syncs internal page state when the 'current' prop is updated externally.
|
|
441
|
+
* @param {number} newValue - The new page number.
|
|
442
|
+
*/
|
|
443
|
+
watchCurrent(newValue) {
|
|
444
|
+
if (newValue !== undefined) {
|
|
445
|
+
this.internalCurrent = newValue;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Syncs internal page size when the 'pageSize' prop is updated externally.
|
|
450
|
+
* @param {number} newValue - The new number of items per page.
|
|
451
|
+
*/
|
|
452
|
+
watchPageSize(newValue) {
|
|
453
|
+
if (newValue !== undefined) {
|
|
454
|
+
this.internalPageSize = newValue;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
// ==================== Helpers ====================
|
|
458
|
+
/** @returns {number} The total number of pages based on total items and current page size. */
|
|
459
|
+
get totalPages() {
|
|
460
|
+
return Math.max(1, Math.ceil(this.total / this.internalPageSize));
|
|
461
|
+
}
|
|
462
|
+
/** @returns {boolean} True if the current page is the first page. */
|
|
463
|
+
get isFirstPage() {
|
|
464
|
+
return this.internalCurrent === 1;
|
|
465
|
+
}
|
|
466
|
+
/** @returns {boolean} True if the current page is the last page. */
|
|
467
|
+
get isLastPage() {
|
|
468
|
+
return this.internalCurrent === this.totalPages;
|
|
469
|
+
}
|
|
470
|
+
/** @returns {boolean} Determines if the page size changer dropdown should be rendered. */
|
|
471
|
+
get shouldShowSizeChanger() {
|
|
472
|
+
// If explicitly set via prop, use that value
|
|
473
|
+
if (this.showSizeChanger !== undefined) {
|
|
474
|
+
return this.showSizeChanger;
|
|
475
|
+
}
|
|
476
|
+
// Otherwise, show it only if the total item count exceeds the boundary threshold
|
|
477
|
+
return this.total > this.totalBoundaryShowSizeChanger;
|
|
478
|
+
}
|
|
479
|
+
/** @returns {[number, number]} The start and end item indices for the current page. */
|
|
480
|
+
get range() {
|
|
481
|
+
const start = (this.internalCurrent - 1) * this.internalPageSize + 1;
|
|
482
|
+
const end = Math.min(this.internalCurrent * this.internalPageSize, this.total);
|
|
483
|
+
return [start, end];
|
|
484
|
+
}
|
|
485
|
+
// ==================== Handlers ====================
|
|
486
|
+
/**
|
|
487
|
+
* Validates and processes a request to change the current page.
|
|
488
|
+
* @param {number} page - The target page number.
|
|
489
|
+
*/
|
|
490
|
+
handlePageChange = (page) => {
|
|
491
|
+
// Block navigation if component is disabled
|
|
492
|
+
if (this.disabled)
|
|
493
|
+
return;
|
|
494
|
+
// Clamp the page number between 1 and the maximum total pages
|
|
495
|
+
const validPage = Math.max(1, Math.min(page, this.totalPages));
|
|
496
|
+
// Only trigger update if the page is actually different from the current one
|
|
497
|
+
if (validPage !== this.internalCurrent) {
|
|
498
|
+
this.internalCurrent = validPage;
|
|
499
|
+
this.xChange.emit({
|
|
500
|
+
current: validPage,
|
|
501
|
+
pageSize: this.internalPageSize,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
/** Navigates to the previous page if available. */
|
|
506
|
+
handlePrev = () => {
|
|
507
|
+
if (!this.isFirstPage && !this.disabled) {
|
|
508
|
+
this.handlePageChange(this.internalCurrent - 1);
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
/** Navigates to the next page if available. */
|
|
512
|
+
handleNext = () => {
|
|
513
|
+
if (!this.isLastPage && !this.disabled) {
|
|
514
|
+
this.handlePageChange(this.internalCurrent + 1);
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
/** Skips backward by a set amount of pages (3 or 5). */
|
|
518
|
+
handleJumpPrev = () => {
|
|
519
|
+
const jumpSize = this.showLessItems ? 3 : 5;
|
|
520
|
+
this.handlePageChange(Math.max(1, this.internalCurrent - jumpSize));
|
|
521
|
+
};
|
|
522
|
+
/** Skips forward by a set amount of pages (3 or 5). */
|
|
523
|
+
handleJumpNext = () => {
|
|
524
|
+
const jumpSize = this.showLessItems ? 3 : 5;
|
|
525
|
+
this.handlePageChange(Math.min(this.totalPages, this.internalCurrent + jumpSize));
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* Handles page size selection changes.
|
|
529
|
+
* Recalculates the current page to keep the first visible item consistent.
|
|
530
|
+
*/
|
|
531
|
+
handleSizeChange = (e) => {
|
|
532
|
+
const newSize = Number(e.detail.value);
|
|
533
|
+
if (newSize !== this.internalPageSize) {
|
|
534
|
+
// Calculate the current page in the new sizing to keep the user at the same data point
|
|
535
|
+
const newCurrent = Math.ceil((this.range[0]) / newSize);
|
|
536
|
+
this.internalPageSize = newSize;
|
|
537
|
+
this.internalCurrent = newCurrent;
|
|
538
|
+
this.xShowSizeChange.emit({
|
|
539
|
+
current: newCurrent,
|
|
540
|
+
size: newSize,
|
|
541
|
+
});
|
|
542
|
+
this.xChange.emit({
|
|
543
|
+
current: newCurrent,
|
|
544
|
+
pageSize: newSize,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
/** Updates the temporary jump input value on every keystroke. */
|
|
549
|
+
handleJumpInputChange = (e) => {
|
|
550
|
+
const target = e.target;
|
|
551
|
+
this.jumpValue = target.value;
|
|
552
|
+
};
|
|
553
|
+
/** Listens for 'Enter' key on the jump input to trigger navigation. */
|
|
554
|
+
handleJumpInputKeyDown = (e) => {
|
|
555
|
+
if (e.key === 'Enter') {
|
|
556
|
+
this.handleJump();
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
/** Executes the jump to the page number currently in the jump input. */
|
|
560
|
+
handleJump = () => {
|
|
561
|
+
const page = parseInt(this.jumpValue, 10);
|
|
562
|
+
// Validate that the input is a valid number within page bounds
|
|
563
|
+
if (!isNaN(page) && page >= 1 && page <= this.totalPages) {
|
|
564
|
+
this.handlePageChange(page);
|
|
565
|
+
}
|
|
566
|
+
// Reset the input field after attempt
|
|
567
|
+
this.jumpValue = '';
|
|
568
|
+
};
|
|
569
|
+
// ==================== Render Helpers ====================
|
|
570
|
+
/**
|
|
571
|
+
* Logic to determine which page numbers should be displayed in the pager.
|
|
572
|
+
* Automatically handles ellipsis ('jump-prev', 'jump-next') for large datasets.
|
|
573
|
+
*
|
|
574
|
+
* Flow:
|
|
575
|
+
* 1. Check if total pages fits within the maximum count (5 or 7).
|
|
576
|
+
* 2. If it fits, show all pages.
|
|
577
|
+
* 3. Else, calculate left/right bounds around the current page.
|
|
578
|
+
* 4. Add ellipses if the bounds don't reach the first or last page.
|
|
579
|
+
*
|
|
580
|
+
* @returns {(number | string)[]} Array of page numbers or jump string identifiers.
|
|
581
|
+
*/
|
|
582
|
+
getPageNumbers() {
|
|
583
|
+
const { totalPages, internalCurrent, showLessItems } = this;
|
|
584
|
+
const pages = [];
|
|
585
|
+
// Determine maximum visible slots based on showLessItems prop
|
|
586
|
+
const pagerCount = showLessItems ? 5 : 7;
|
|
587
|
+
const halfPagerCount = Math.floor(pagerCount / 2);
|
|
588
|
+
if (totalPages <= pagerCount) {
|
|
589
|
+
// Total count is small enough: render the full list without ellipsis
|
|
590
|
+
for (let i = 1; i <= totalPages; i++) {
|
|
591
|
+
pages.push(i);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
else {
|
|
595
|
+
// Always keep the first page visible
|
|
596
|
+
pages.push(1);
|
|
597
|
+
// Calculate the sliding window of middle pages
|
|
598
|
+
let left = Math.max(2, internalCurrent - halfPagerCount + 1);
|
|
599
|
+
let right = Math.min(totalPages - 1, internalCurrent + halfPagerCount - 1);
|
|
600
|
+
// Shift indices if we are too close to either boundary
|
|
601
|
+
if (internalCurrent - 1 <= halfPagerCount) {
|
|
602
|
+
right = pagerCount - 2;
|
|
603
|
+
}
|
|
604
|
+
if (totalPages - internalCurrent <= halfPagerCount) {
|
|
605
|
+
left = totalPages - pagerCount + 3;
|
|
606
|
+
}
|
|
607
|
+
// Add left ellipsis if it bypasses pages 2...
|
|
608
|
+
if (left > 2) {
|
|
609
|
+
pages.push('jump-prev');
|
|
610
|
+
}
|
|
611
|
+
// Render the middle block of numbers
|
|
612
|
+
for (let i = left; i <= right; i++) {
|
|
613
|
+
pages.push(i);
|
|
614
|
+
}
|
|
615
|
+
// Add right ellipsis if it skips pages before the last page
|
|
616
|
+
if (right < totalPages - 1) {
|
|
617
|
+
pages.push('jump-next');
|
|
618
|
+
}
|
|
619
|
+
// Always keep the last page visible
|
|
620
|
+
pages.push(totalPages);
|
|
621
|
+
}
|
|
622
|
+
return pages;
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Renders a single page item (number or jump button).
|
|
626
|
+
* @param {number | string} page - Page number or identifier.
|
|
627
|
+
* @param {PaginationItemType} type - Type of the item ('page', 'jump-prev', etc.).
|
|
628
|
+
* @param {number} index - For key tracking.
|
|
629
|
+
*/
|
|
630
|
+
renderItem(page, type, index) {
|
|
631
|
+
const { disabled, internalCurrent, showTitle, classNames, styles } = this;
|
|
632
|
+
const isPage = typeof page === 'number';
|
|
633
|
+
const isActive = isPage && page === internalCurrent;
|
|
634
|
+
const itemClasses = {
|
|
635
|
+
'x-pagination-item': true,
|
|
636
|
+
'x-pagination-item-active': isActive,
|
|
637
|
+
'x-pagination-jump-prev': type === 'jump-prev',
|
|
638
|
+
'x-pagination-jump-next': type === 'jump-next',
|
|
639
|
+
[classNames.item || '']: !!classNames.item,
|
|
640
|
+
};
|
|
641
|
+
// Handle click based on item type
|
|
642
|
+
// Flow:
|
|
643
|
+
// 1. Checks disabled state.
|
|
644
|
+
// 2. If page number, navigates to that page.
|
|
645
|
+
// 3. If jump button, navigates forward/backward by jump size.
|
|
646
|
+
const handleClick = () => {
|
|
647
|
+
if (disabled)
|
|
648
|
+
return;
|
|
649
|
+
if (isPage) {
|
|
650
|
+
this.handlePageChange(page);
|
|
651
|
+
}
|
|
652
|
+
else if (type === 'jump-prev') {
|
|
653
|
+
this.handleJumpPrev();
|
|
654
|
+
}
|
|
655
|
+
else if (type === 'jump-next') {
|
|
656
|
+
this.handleJumpNext();
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
const getTitle = () => {
|
|
660
|
+
if (!showTitle)
|
|
661
|
+
return undefined;
|
|
662
|
+
if (isPage)
|
|
663
|
+
return String(page);
|
|
664
|
+
if (type === 'jump-prev')
|
|
665
|
+
return `${translate('Pagination.prev_page', {}, 'Previous')} ${this.showLessItems ? 3 : 5} ${translate('Pagination.page', {}, 'pages')}`;
|
|
666
|
+
if (type === 'jump-next')
|
|
667
|
+
return `${translate('Pagination.next_page', {}, 'Next')} ${this.showLessItems ? 3 : 5} ${translate('Pagination.page', {}, 'pages')}`;
|
|
668
|
+
return undefined;
|
|
669
|
+
};
|
|
670
|
+
const renderContent = () => {
|
|
671
|
+
if (isPage) {
|
|
672
|
+
return h("span", { class: "x-pagination-item-link" }, page);
|
|
673
|
+
}
|
|
674
|
+
// Ellipsis with double arrow on hover
|
|
675
|
+
return (h("span", { class: "x-pagination-item-link x-pagination-item-ellipsis" }, h("span", { class: "x-pagination-item-ellipsis-dot" }, h("x-icon", { name: getIcon('more'), rotate: 90 })), h("span", { class: "x-pagination-item-ellipsis-icon" }, type === 'jump-prev' ? h("x-icon", { name: getIcon('doubleArrowLeft') }) : h("x-icon", { name: getIcon('doubleArrowRight') }))));
|
|
676
|
+
};
|
|
677
|
+
return (h("li", { "data-key": `page-${index}`, class: itemClasses, style: styles.item, title: getTitle(), tabIndex: disabled ? -1 : 0, onClick: handleClick, onKeyDown: (e) => e.key === 'Enter' && handleClick(), part: "item", "aria-current": isActive ? 'page' : undefined }, renderContent()));
|
|
678
|
+
}
|
|
679
|
+
/** Renders the 'backward' navigation button. */
|
|
680
|
+
renderPrev() {
|
|
681
|
+
const { disabled, isFirstPage, showTitle, classNames, styles } = this;
|
|
682
|
+
const isDisabled = disabled || isFirstPage;
|
|
683
|
+
const prevClasses = {
|
|
684
|
+
'x-pagination-prev': true,
|
|
685
|
+
'x-pagination-disabled': isDisabled,
|
|
686
|
+
[classNames.prev || '']: !!classNames.prev,
|
|
687
|
+
};
|
|
688
|
+
return (h("li", { class: prevClasses, style: styles.prev, title: showTitle ? translate('Pagination.prev_page', {}, 'Previous Page') : undefined, tabIndex: isDisabled ? -1 : 0, onClick: this.handlePrev, onKeyDown: (e) => e.key === 'Enter' && this.handlePrev(), part: "prev", "aria-disabled": isDisabled ? 'true' : undefined }, h("button", { type: "button", disabled: isDisabled, class: "x-pagination-item-link" }, h("span", { class: "x-pagination-prev-icon" }, h("x-icon", { name: getIcon('arrowLeft') })))));
|
|
689
|
+
}
|
|
690
|
+
/** Renders the 'forward' navigation button. */
|
|
691
|
+
renderNext() {
|
|
692
|
+
const { disabled, isLastPage, showTitle, classNames, styles } = this;
|
|
693
|
+
const isDisabled = disabled || isLastPage;
|
|
694
|
+
const nextClasses = {
|
|
695
|
+
'x-pagination-next': true,
|
|
696
|
+
'x-pagination-disabled': isDisabled,
|
|
697
|
+
[classNames.next || '']: !!classNames.next,
|
|
698
|
+
};
|
|
699
|
+
return (h("li", { class: nextClasses, style: styles.next, title: showTitle ? translate('Pagination.next_page', {}, 'Next Page') : undefined, tabIndex: isDisabled ? -1 : 0, onClick: this.handleNext, onKeyDown: (e) => e.key === 'Enter' && this.handleNext(), part: "next", "aria-disabled": isDisabled ? 'true' : undefined }, h("button", { type: "button", disabled: isDisabled, class: "x-pagination-item-link" }, h("span", { class: "x-pagination-next-icon" }, h("x-icon", { name: getIcon('arrowRight') })))));
|
|
700
|
+
}
|
|
701
|
+
/** Renders the dropdown for selecting items-per-page. */
|
|
702
|
+
renderSizeChanger() {
|
|
703
|
+
const { disabled, internalPageSize, pageSizeOptions, classNames, styles } = this;
|
|
704
|
+
const optionsClasses = {
|
|
705
|
+
'x-pagination-options': true,
|
|
706
|
+
[classNames.options || '']: !!classNames.options,
|
|
707
|
+
};
|
|
708
|
+
const options = pageSizeOptions.map((size) => ({
|
|
709
|
+
value: size,
|
|
710
|
+
label: `${size} ${translate('Pagination.items_per_page', {}, '/ page')}`,
|
|
711
|
+
}));
|
|
712
|
+
return (h("li", { class: optionsClasses, style: styles.options, part: "options" }, h("x-select", { class: "x-pagination-options-size-changer", disabled: disabled, value: internalPageSize, onXChange: this.handleSizeChange, options: options })));
|
|
713
|
+
}
|
|
714
|
+
/** Renders the numeric input for jumping to a specific page. */
|
|
715
|
+
renderQuickJumper() {
|
|
716
|
+
const { disabled, showQuickJumper, classNames, styles } = this;
|
|
717
|
+
const goButton = typeof showQuickJumper === 'object'
|
|
718
|
+
? showQuickJumper.goButton
|
|
719
|
+
: translate('global.go', {}, 'Go');
|
|
720
|
+
const jumperClasses = {
|
|
721
|
+
'x-pagination-options-quick-jumper': true,
|
|
722
|
+
[classNames.jumper || '']: !!classNames.jumper,
|
|
723
|
+
};
|
|
724
|
+
return (h("li", { class: jumperClasses, style: styles.jumper, part: "jumper" }, h("span", null, translate('Pagination.jump_to', {}, 'Go to')), h("input", { type: "text", value: this.jumpValue, disabled: disabled, onInput: this.handleJumpInputChange, onKeyDown: this.handleJumpInputKeyDown }), goButton && (h("button", { type: "button", class: "x-pagination-options-quick-jumper-button", disabled: disabled, onClick: this.handleJump }, goButton))));
|
|
725
|
+
}
|
|
726
|
+
/** Renders the total summary text. */
|
|
727
|
+
renderTotal() {
|
|
728
|
+
const { showTotal, total, range, classNames, styles } = this;
|
|
729
|
+
if (!showTotal)
|
|
730
|
+
return null;
|
|
731
|
+
const totalText = showTotal(total, range);
|
|
732
|
+
const totalClasses = {
|
|
733
|
+
'x-pagination-total-text': true,
|
|
734
|
+
[classNames.total || '']: !!classNames.total,
|
|
735
|
+
};
|
|
736
|
+
return (h("li", { class: totalClasses, style: styles.total, part: "total" }, totalText));
|
|
737
|
+
}
|
|
738
|
+
/** Renders the minimalist 'simple' mode variant. */
|
|
739
|
+
renderSimple() {
|
|
740
|
+
const { disabled, internalCurrent, totalPages, simple, showTitle, classNames, styles } = this;
|
|
741
|
+
const isReadOnly = typeof simple === 'object' && simple.readOnly;
|
|
742
|
+
return (h("ul", { class: "x-pagination x-pagination-simple", style: styles.root }, this.renderPrev(), h("li", { class: "x-pagination-simple-pager", title: showTitle ? `${internalCurrent}/${totalPages}` : undefined }, h("input", { type: "text", value: internalCurrent, disabled: disabled, readOnly: isReadOnly, onInput: (e) => {
|
|
743
|
+
if (!isReadOnly && !disabled) {
|
|
744
|
+
const target = e.target;
|
|
745
|
+
const page = parseInt(target.value, 10);
|
|
746
|
+
if (!isNaN(page)) {
|
|
747
|
+
this.handlePageChange(page);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}, onKeyDown: (e) => {
|
|
751
|
+
if (e.key === 'Enter' && !isReadOnly && !disabled) {
|
|
752
|
+
const target = e.target;
|
|
753
|
+
const page = parseInt(target.value, 10);
|
|
754
|
+
if (!isNaN(page)) {
|
|
755
|
+
this.handlePageChange(page);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}, class: {
|
|
759
|
+
'x-pagination-simple-pager-input': true,
|
|
760
|
+
[classNames.item || '']: !!classNames.item,
|
|
761
|
+
}, style: styles.item }), h("span", { class: "x-pagination-simple-pager-slash" }, "/"), h("span", { class: "x-pagination-simple-pager-total" }, totalPages)), this.renderNext(), this.shouldShowSizeChanger && this.renderSizeChanger()));
|
|
762
|
+
}
|
|
763
|
+
// ==================== Render ====================
|
|
764
|
+
/** Main render entry point. Manages visibility and switcher between mode layouts. */
|
|
765
|
+
render() {
|
|
766
|
+
const { hideOnSinglePage, disabled, size, align, simple, showQuickJumper, classNames, styles, } = this;
|
|
767
|
+
// Hide on single page
|
|
768
|
+
if (hideOnSinglePage && this.totalPages <= 1) {
|
|
769
|
+
return null;
|
|
770
|
+
}
|
|
771
|
+
// Simple mode
|
|
772
|
+
if (simple) {
|
|
773
|
+
return (h(Host, { class: {
|
|
774
|
+
'x-pagination-disabled': disabled,
|
|
775
|
+
'x-pagination-small': size === 'small',
|
|
776
|
+
'x-pagination-large': size === 'large',
|
|
777
|
+
[`x-pagination-align-${align}`]: true,
|
|
778
|
+
[classNames.root || '']: !!classNames.root,
|
|
779
|
+
} }, this.renderSimple()));
|
|
780
|
+
}
|
|
781
|
+
// Full mode
|
|
782
|
+
const pageNumbers = this.getPageNumbers();
|
|
783
|
+
return (h(Host, { class: {
|
|
784
|
+
'x-pagination-disabled': disabled,
|
|
785
|
+
'x-pagination-small': size === 'small',
|
|
786
|
+
'x-pagination-large': size === 'large',
|
|
787
|
+
[`x-pagination-align-${align}`]: true,
|
|
788
|
+
[classNames.root || '']: !!classNames.root,
|
|
789
|
+
} }, h("ul", { class: "x-pagination", style: styles.root, part: "pagination", role: "navigation", "aria-label": "Pagination" }, this.renderTotal(), this.renderPrev(), pageNumbers.map((page, index) => {
|
|
790
|
+
const type = typeof page === 'number'
|
|
791
|
+
? 'page'
|
|
792
|
+
: page;
|
|
793
|
+
return this.renderItem(page, type, index);
|
|
794
|
+
}), this.renderNext(), this.shouldShowSizeChanger && this.renderSizeChanger(), showQuickJumper && this.renderQuickJumper())));
|
|
795
|
+
}
|
|
796
|
+
static get watchers() { return {
|
|
797
|
+
"current": [{
|
|
798
|
+
"watchCurrent": 0
|
|
799
|
+
}],
|
|
800
|
+
"pageSize": [{
|
|
801
|
+
"watchPageSize": 0
|
|
802
|
+
}]
|
|
803
|
+
}; }
|
|
804
|
+
};
|
|
805
|
+
XPagination.style = xPaginationCss();
|
|
806
|
+
|
|
807
|
+
const xPopoverCss = () => `@charset "UTF-8";:root{--x-color-primary:#1677ff;--x-color-primary-rgb:22, 119, 255;--x-color-primary-contrast:#ffffff;--x-color-primary-contrast-rgb:255, 255, 255;--x-color-primary-shade:#0958d9;--x-color-primary-tint:#4096ff;--x-color-primary-bg:#e6f4ff;--x-color-primary-bg-hover:#bae0ff;--x-color-primary-border:#91caff;--x-color-primary-border-hover:#69b1ff;--x-color-primary-hover:#4096ff;--x-color-primary-active:#0958d9;--x-color-primary-text:#1677ff;--x-color-primary-text-hover:#4096ff;--x-color-primary-text-active:#0958d9;--x-color-secondary:#3dc2ff;--x-color-secondary-rgb:61, 194, 255;--x-color-secondary-contrast:#ffffff;--x-color-secondary-contrast-rgb:255, 255, 255;--x-color-secondary-shade:#36abe0;--x-color-secondary-tint:#50c8ff;--x-color-success:#52c41a;--x-color-success-rgb:82, 196, 26;--x-color-success-contrast:#ffffff;--x-color-success-contrast-rgb:255, 255, 255;--x-color-success-shade:#389e0d;--x-color-success-tint:#73d13d;--x-color-success-bg:#f6ffed;--x-color-success-bg-hover:#d9f7be;--x-color-success-border:#b7eb8f;--x-color-success-border-hover:#95de64;--x-color-success-hover:#73d13d;--x-color-success-active:#389e0d;--x-color-success-text:#52c41a;--x-color-success-text-hover:#73d13d;--x-color-success-text-active:#389e0d;--x-color-warning:#faad14;--x-color-warning-rgb:250, 173, 20;--x-color-warning-contrast:#000000;--x-color-warning-contrast-rgb:0, 0, 0;--x-color-warning-shade:#d48806;--x-color-warning-tint:#ffc53d;--x-color-warning-bg:#fffbe6;--x-color-warning-bg-hover:#fff1b8;--x-color-warning-border:#ffe58f;--x-color-warning-border-hover:#ffd666;--x-color-warning-hover:#ffc53d;--x-color-warning-active:#d48806;--x-color-warning-text:#faad14;--x-color-warning-text-hover:#ffc53d;--x-color-warning-text-active:#d48806;--x-color-danger:#ff4d4f;--x-color-danger-rgb:255, 77, 79;--x-color-danger-contrast:#ffffff;--x-color-danger-contrast-rgb:255, 255, 255;--x-color-danger-shade:#cf1322;--x-color-danger-tint:#ff7875;--x-color-error:#ff4d4f;--x-color-error-rgb:255, 77, 79;--x-color-error-bg:#fff2f0;--x-color-error-bg-hover:#ffccc7;--x-color-error-border:#ffa39e;--x-color-error-border-hover:#ff7875;--x-color-error-hover:#ff7875;--x-color-error-active:#d9363e;--x-color-error-text:#ff4d4f;--x-color-error-text-hover:#ff7875;--x-color-error-text-active:#d9363e;--x-color-info:#1677ff;--x-color-info-rgb:22, 119, 255;--x-color-info-bg:#e6f4ff;--x-color-info-bg-hover:#bae0ff;--x-color-info-border:#91caff;--x-color-info-border-hover:#69b1ff;--x-color-info-hover:#69b1ff;--x-color-info-active:#0958d9;--x-color-info-text:#1677ff;--x-color-info-text-hover:#69b1ff;--x-color-info-text-active:#0958d9;--x-color-text:rgba(0, 0, 0, 0.88);--x-color-text-secondary:rgba(0, 0, 0, 0.65);--x-color-text-tertiary:rgba(0, 0, 0, 0.45);--x-color-text-quaternary:rgba(0, 0, 0, 0.25);--x-color-text-disabled:rgba(0, 0, 0, 0.25);--x-color-text-placeholder:rgba(0, 0, 0, 0.25);--x-color-text-heading:rgba(0, 0, 0, 0.88);--x-color-text-label:rgba(0, 0, 0, 0.65);--x-color-text-description:rgba(0, 0, 0, 0.45);--x-color-text-light-solid:#ffffff;--x-color-bg-container:#ffffff;--x-color-bg-elevated:#ffffff;--x-color-bg-layout:#f5f5f5;--x-color-bg-spotlight:rgba(0, 0, 0, 0.85);--x-color-bg-mask:rgba(0, 0, 0, 0.45);--x-color-bg-base:#ffffff;--x-color-bg-container-disabled:#f5f5f5;--x-color-bg-container-loading:rgba(255, 255, 255, 0.65);--x-color-white:#ffffff;--x-color-fill:rgba(0, 0, 0, 0.15);--x-color-fill-secondary:rgba(0, 0, 0, 0.06);--x-color-fill-tertiary:rgba(0, 0, 0, 0.04);--x-color-fill-quaternary:rgba(0, 0, 0, 0.02);--x-color-border:#d9d9d9;--x-color-border-secondary:#f0f0f0;--x-color-border-bg:#ffffff;--x-color-split:rgba(5, 5, 5, 0.06);--x-color-dark:#222428;--x-color-dark-rgb:34, 36, 40;--x-color-dark-contrast:#ffffff;--x-color-dark-contrast-rgb:255, 255, 255;--x-color-dark-shade:#1e2023;--x-color-dark-tint:#383a3e;--x-color-medium:#92949c;--x-color-medium-rgb:146, 148, 156;--x-color-medium-contrast:#ffffff;--x-color-medium-contrast-rgb:255, 255, 255;--x-color-medium-shade:#808289;--x-color-medium-tint:#9d9fa6;--x-color-light:#f4f5f8;--x-color-light-rgb:244, 245, 248;--x-color-light-contrast:#000000;--x-color-light-contrast-rgb:0, 0, 0;--x-color-light-shade:#d7d8da;--x-color-light-tint:#f5f6f9;--x-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--x-font-family-code:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--x-font-size:14px;--x-font-size-sm:12px;--x-font-size-lg:16px;--x-font-size-xl:20px;--x-font-size-heading-1:38px;--x-font-size-heading-2:30px;--x-font-size-heading-3:24px;--x-font-size-heading-4:20px;--x-font-size-heading-5:16px;--x-line-height:1.5714285714285714;--x-line-height-lg:1.5;--x-line-height-sm:1.6666666666666667;--x-line-height-heading-1:1.2105263157894737;--x-line-height-heading-2:1.2666666666666666;--x-line-height-heading-3:1.3333333333333333;--x-line-height-heading-4:1.4;--x-line-height-heading-5:1.5;--x-font-weight-normal:400;--x-font-weight-medium:500;--x-font-weight-semibold:600;--x-font-weight-strong:600;--x-font-size-base:14px;--x-font-size-xxl:24px;--x-line-height-base:1.5714285714285714;--x-spacing-xxs:4px;--x-spacing-xs:8px;--x-spacing-sm:12px;--x-spacing-md:16px;--x-spacing-lg:20px;--x-spacing-xl:24px;--x-spacing-xxl:32px;--x-spacing-xxxl:48px;--x-margin-xxs:4px;--x-margin-xs:8px;--x-margin-sm:12px;--x-margin-md:16px;--x-margin-lg:24px;--x-margin-xl:32px;--x-margin-xxl:48px;--x-padding-xxs:4px;--x-padding-xs:8px;--x-padding-sm:12px;--x-padding-md:16px;--x-padding-lg:24px;--x-padding-content-horizontal-lg:24px;--x-padding-content-vertical-lg:12px;--x-padding-content-horizontal:16px;--x-padding-content-vertical:12px;--x-padding-content-horizontal-sm:16px;--x-padding-content-vertical-sm:8px;--x-border-radius:6px;--x-border-radius-xs:2px;--x-border-radius-sm:4px;--x-border-radius-lg:8px;--x-border-radius-xl:12px;--x-border-radius-outer:4px;--x-border-radius-base:6px;--x-border-width:1px;--x-border-width-base:1px;--x-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-shadow-lg:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-box-shadow-popover-arrow:2px 2px 5px rgba(0, 0, 0, 0.05);--x-box-shadow-card:0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);--x-box-shadow-drawer-right:-6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-left:6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-up:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-down:0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);--x-motion-duration-fast:0.1s;--x-motion-duration-mid:0.2s;--x-motion-duration-slow:0.3s;--x-motion-ease-in-out:cubic-bezier(0.645, 0.045, 0.355, 1);--x-motion-ease-out:cubic-bezier(0.215, 0.61, 0.355, 1);--x-motion-ease-in:cubic-bezier(0.55, 0.055, 0.675, 0.19);--x-motion-ease-out-back:cubic-bezier(0.12, 0.4, 0.29, 1.46);--x-motion-ease-in-back:cubic-bezier(0.71, -0.46, 0.88, 0.6);--x-motion-ease-in-out-circle:cubic-bezier(0.78, 0.14, 0.15, 0.86);--x-motion-ease-out-circle:cubic-bezier(0.08, 0.82, 0.17, 1);--x-motion-ease-in-circle:cubic-bezier(0.6, 0.04, 0.98, 0.34);--x-motion-ease-in-quint:cubic-bezier(0.755, 0.05, 0.855, 0.06);--x-motion-ease-out-quint:cubic-bezier(0.23, 1, 0.32, 1);--x-z-index-base:0;--x-z-index-popup-base:1000;--x-z-index-popup:1030;--x-z-index-affix:10;--x-z-index-modal:1000;--x-z-index-modal-mask:1000;--x-z-index-drawer:1000;--x-z-index-popover:1030;--x-z-index-dropdown:1050;--x-z-index-tooltip:1070;--x-z-index-notification:1080;--x-z-index-message:1090;--x-z-index-popconfirm:1060;--x-z-index-table-fixed:10;--x-opacity-loading:0.65;--x-opacity-image:1;--x-opacity-disabled:0.5;--x-control-height:32px;--x-control-height-xs:24px;--x-control-height-sm:24px;--x-control-height-lg:40px;--x-control-radio-size:16px;--x-control-checkbox-size:16px;--x-control-padding-horizontal:12px;--x-control-padding-horizontal-sm:8px;--x-control-outline-width:2px;--x-control-outline:rgba(5, 145, 255, 0.1);--x-control-item-bg-hover:rgba(0, 0, 0, 0.04);--x-control-item-bg-active:#e6f4ff;--x-control-item-bg-active-hover:#bae0ff;--x-control-item-bg-active-disabled:rgba(0, 0, 0, 0.15);--x-control-tmp-outline:rgba(0, 0, 0, 0.02);--x-color-yellow:#fadb14;--x-color-yellow-rgb:250, 219, 20;--x-font-family-base:var(--x-font-family);--x-color-link:#1677ff;--x-color-link-hover:#69b1ff;--x-color-link-active:#0958d9;--x-color-icon:rgba(0, 0, 0, 0.45);--x-color-icon-hover:rgba(0, 0, 0, 0.88);--x-color-highlight:#ff4d4f;--x-color-bg-text-hover:rgba(0, 0, 0, 0.06);--x-color-bg-text-active:rgba(0, 0, 0, 0.15);--x-screen-xs:480px;--x-screen-xs-min:480px;--x-screen-xs-max:575px;--x-screen-sm:576px;--x-screen-sm-min:576px;--x-screen-sm-max:767px;--x-screen-md:768px;--x-screen-md-min:768px;--x-screen-md-max:991px;--x-screen-lg:992px;--x-screen-lg-min:992px;--x-screen-lg-max:1199px;--x-screen-xl:1200px;--x-screen-xl-min:1200px;--x-screen-xl-max:1599px;--x-screen-xxl:1600px;--x-screen-xxl-min:1600px;--x-color-fill-content:rgba(0, 0, 0, 0.06);--x-color-fill-content-hover:rgba(0, 0, 0, 0.15);--x-color-fill-alter:rgba(0, 0, 0, 0.02);--x-scrollbar-width:12px;--x-scrollbar-track-bg:rgba(0, 0, 0, 0.04);--x-scrollbar-thumb-bg:rgba(0, 0, 0, 0.25);--x-scrollbar-thumb-bg-hover:rgba(0, 0, 0, 0.35);--x-menu-dark-bg:#001529;--x-menu-dark-item-bg:#001529;--x-menu-dark-popup-bg:#001529;--x-menu-dark-submenu-item-bg:#000c17}:host{display:inline-block;position:relative;font-family:var(--x-popover-font-family, var(--x-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}.x-popover-trigger{display:inline-block}.x-popover-content{position:relative;z-index:var(--x-popover-z-index, 1030);display:block;visibility:visible;font-size:var(--x-popover-font-size, var(--x-font-size-base, 14px));line-height:var(--x-popover-line-height, var(--x-line-height-base, 1.5714));word-wrap:break-word;opacity:1;-webkit-transition:opacity var(--x-popover-motion-duration, var(--x-motion-duration-fast, 0.2s)), visibility var(--x-popover-motion-duration, var(--x-motion-duration-fast, 0.2s));transition:opacity var(--x-popover-motion-duration, var(--x-motion-duration-fast, 0.2s)), visibility var(--x-popover-motion-duration, var(--x-motion-duration-fast, 0.2s));white-space:normal}.x-popover-content.x-popover-hidden{opacity:0;visibility:hidden;pointer-events:none}.x-popover-placement-bottom,.x-popover-placement-bottomLeft,.x-popover-placement-bottomRight{-webkit-transform-origin:top center;transform-origin:top center}.x-popover-placement-top,.x-popover-placement-topLeft,.x-popover-placement-topRight{-webkit-transform-origin:bottom center;transform-origin:bottom center}.x-popover-placement-left,.x-popover-placement-leftTop,.x-popover-placement-leftBottom{-webkit-transform-origin:right center;transform-origin:right center}.x-popover-placement-right,.x-popover-placement-rightTop,.x-popover-placement-rightBottom{-webkit-transform-origin:left center;transform-origin:left center}.x-popover-inner{background-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff));background-clip:padding-box;border-radius:var(--x-popover-border-radius, var(--x-border-radius-lg, 8px));-webkit-box-shadow:var(--x-popover-shadow, var(--x-box-shadow-secondary, 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)));box-shadow:var(--x-popover-shadow, var(--x-box-shadow-secondary, 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)))}.x-popover-title{min-width:var(--x-popover-min-width, 177px);min-height:var(--x-popover-min-height, var(--x-control-height, 32px));margin:0;padding:var(--x-popover-title-padding-block, var(--x-spacing-xxs, 4px)) var(--x-popover-title-padding-inline, var(--x-spacing-md, 16px));color:var(--x-popover-title-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));font-weight:var(--x-popover-title-font-weight, var(--x-font-weight-semibold, 600));border-bottom:var(--x-popover-border-width, var(--x-border-width-base, 1px)) solid var(--x-popover-border-color, var(--x-color-border-secondary, #f0f0f0))}.x-popover-inner-content{padding:var(--x-popover-content-padding-block, var(--x-spacing-sm, 8px)) var(--x-popover-content-padding-inline, var(--x-spacing-md, 16px));color:var(--x-popover-color, var(--x-color-text, rgba(0, 0, 0, 0.88)))}.x-popover-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}[data-placement^=top] .x-popover-arrow{bottom:0;left:50%;-webkit-transform:translateX(-50%) translateY(100%);transform:translateX(-50%) translateY(100%);border-width:var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px) 0;border-top-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}[data-placement^=bottom] .x-popover-arrow{top:0;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);border-width:0 var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px);border-bottom-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}[data-placement^=left] .x-popover-arrow{right:0;top:50%;-webkit-transform:translateY(-50%) translateX(100%);transform:translateY(-50%) translateX(100%);border-width:var(--x-popover-arrow-size, 6px) 0 var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px);border-left-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}[data-placement^=right] .x-popover-arrow{left:0;top:50%;-webkit-transform:translateY(-50%) translateX(-100%);transform:translateY(-50%) translateX(-100%);border-width:var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px) 0;border-right-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}`;
|
|
808
|
+
|
|
809
|
+
const XPopover = class {
|
|
810
|
+
constructor(hostRef) {
|
|
811
|
+
registerInstance(this, hostRef);
|
|
812
|
+
this.xOpenChange = createEvent(this, "xOpenChange", 7);
|
|
813
|
+
}
|
|
814
|
+
get el() { return getElement(this); }
|
|
815
|
+
/**
|
|
816
|
+
* Title of the popover
|
|
817
|
+
* @example
|
|
818
|
+
* <x-popover popoverTitle="Notification" />
|
|
819
|
+
*/
|
|
820
|
+
popoverTitle;
|
|
821
|
+
/**
|
|
822
|
+
* Content of the popover
|
|
823
|
+
* @example
|
|
824
|
+
* <x-popover content="You have 3 new messages." />
|
|
825
|
+
*/
|
|
826
|
+
content;
|
|
827
|
+
/**
|
|
828
|
+
* The position of the popover relative to the target
|
|
829
|
+
* @example
|
|
830
|
+
* <x-popover placement="bottomRight" />
|
|
831
|
+
*/
|
|
832
|
+
placement = 'top';
|
|
833
|
+
/**
|
|
834
|
+
* Trigger mode
|
|
835
|
+
* @example
|
|
836
|
+
* <x-popover trigger="hover" />
|
|
837
|
+
*/
|
|
838
|
+
trigger = 'click';
|
|
839
|
+
/**
|
|
840
|
+
* Whether the popover is visible (controlled)
|
|
841
|
+
* @example
|
|
842
|
+
* <x-popover open={true} />
|
|
843
|
+
*/
|
|
844
|
+
open;
|
|
845
|
+
/**
|
|
846
|
+
* Callback when open state changes
|
|
847
|
+
* @example
|
|
848
|
+
* <x-popover onXOpenChange={(e) => console.log(e.detail)} />
|
|
849
|
+
*/
|
|
850
|
+
xOpenChange;
|
|
851
|
+
visible = false;
|
|
852
|
+
timer;
|
|
853
|
+
portalInstance = null;
|
|
854
|
+
triggerEl = null;
|
|
855
|
+
watchOpen(newValue) {
|
|
856
|
+
if (newValue !== undefined) {
|
|
857
|
+
this.visible = newValue;
|
|
858
|
+
this.updatePortal();
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
componentWillLoad() {
|
|
862
|
+
if (this.open !== undefined) {
|
|
863
|
+
this.visible = this.open;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
handleClick(ev) {
|
|
867
|
+
if (this.trigger === 'click') {
|
|
868
|
+
const target = ev.target;
|
|
869
|
+
// Check if click is inside portal content
|
|
870
|
+
if (this.isClickInPortal(target)) {
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
this.toggle(!this.visible);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
handleMouseEnter() {
|
|
877
|
+
if (this.trigger === 'hover') {
|
|
878
|
+
this.show();
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
handleMouseLeave() {
|
|
882
|
+
if (this.trigger === 'hover') {
|
|
883
|
+
this.hide();
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
isClickInPortal(target) {
|
|
887
|
+
const portalEl = this.portalInstance?.getElement();
|
|
888
|
+
return portalEl ? portalEl.contains(target) : false;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Toggles the visibility state.
|
|
892
|
+
*
|
|
893
|
+
* Flow:
|
|
894
|
+
* 1. Checks if `open` prop is controlled (not undefined).
|
|
895
|
+
* 2. If controlled: Emits `xOpenChange` event with the new state.
|
|
896
|
+
* 3. If uncontrolled:
|
|
897
|
+
* - Updates internal `visible` state.
|
|
898
|
+
* - Calls `updatePortal` to reflect the change in the UI.
|
|
899
|
+
*
|
|
900
|
+
* @param visible - The desired visibility state.
|
|
901
|
+
*/
|
|
902
|
+
toggle(visible) {
|
|
903
|
+
if (this.open !== undefined) {
|
|
904
|
+
this.xOpenChange.emit(visible);
|
|
905
|
+
}
|
|
906
|
+
else {
|
|
907
|
+
this.visible = visible;
|
|
908
|
+
this.updatePortal();
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Shows the popover.
|
|
913
|
+
* Clears any pending hide timer and calls `toggle(true)`.
|
|
914
|
+
*/
|
|
915
|
+
show() {
|
|
916
|
+
clearTimeout(this.timer);
|
|
917
|
+
this.toggle(true);
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Hides the popover with a small delay.
|
|
921
|
+
* The delay prevents flickering when moving mouse quickly between trigger and content.
|
|
922
|
+
*/
|
|
923
|
+
hide() {
|
|
924
|
+
this.timer = setTimeout(() => {
|
|
925
|
+
this.toggle(false);
|
|
926
|
+
}, 100);
|
|
927
|
+
}
|
|
928
|
+
getTriggerEl() {
|
|
929
|
+
if (!this.triggerEl) {
|
|
930
|
+
this.triggerEl = this.el.shadowRoot?.querySelector('.x-popover-trigger');
|
|
931
|
+
}
|
|
932
|
+
return this.triggerEl;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Build popover content element.
|
|
936
|
+
*
|
|
937
|
+
* Flow:
|
|
938
|
+
* 1. Creates `x-popover-content` element.
|
|
939
|
+
* 2. Assigns props (title, content, placement).
|
|
940
|
+
* 3. If trigger is hover, attaches mouse enter/leave handlers to content (to prevent closing when moving mouse to popover).
|
|
941
|
+
* 4. Clones `slot="content"` nodes and appends to popover content if present.
|
|
942
|
+
*
|
|
943
|
+
* @returns HTMLElement
|
|
944
|
+
*/
|
|
945
|
+
buildPopoverContent() {
|
|
946
|
+
const popoverContent = document.createElement('x-popover-content');
|
|
947
|
+
// Set properties
|
|
948
|
+
popoverContent.popoverTitle = this.popoverTitle;
|
|
949
|
+
popoverContent.content = this.content;
|
|
950
|
+
popoverContent.placement = this.placement;
|
|
951
|
+
popoverContent.hidden = !this.visible;
|
|
952
|
+
// Add hover handlers to keep popover open
|
|
953
|
+
if (this.trigger === 'hover') {
|
|
954
|
+
popoverContent.mouseEnterPopover = () => {
|
|
955
|
+
clearTimeout(this.timer);
|
|
956
|
+
};
|
|
957
|
+
popoverContent.mouseLeavePopover = () => {
|
|
958
|
+
this.hide();
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
// Clone slot content if available
|
|
962
|
+
const contentSlot = this.el.querySelector('[slot="content"]');
|
|
963
|
+
if (contentSlot) {
|
|
964
|
+
const cloned = contentSlot.cloneNode(true);
|
|
965
|
+
popoverContent.appendChild(cloned);
|
|
966
|
+
}
|
|
967
|
+
return popoverContent;
|
|
968
|
+
}
|
|
969
|
+
updatePortal() {
|
|
970
|
+
if (!this.visible) {
|
|
971
|
+
if (this.portalInstance) {
|
|
972
|
+
this.portalInstance.destroy();
|
|
973
|
+
this.portalInstance = null;
|
|
974
|
+
}
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
const contentElement = this.buildPopoverContent();
|
|
978
|
+
if (!this.portalInstance) {
|
|
979
|
+
this.portalInstance = PortalController.create({
|
|
980
|
+
open: this.visible,
|
|
981
|
+
target: this.getTriggerEl(),
|
|
982
|
+
placement: this.placement,
|
|
983
|
+
zIndex: 1050,
|
|
984
|
+
offset: 8, // arrow size + small gap
|
|
985
|
+
content: contentElement,
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
this.portalInstance.update({
|
|
990
|
+
open: this.visible,
|
|
991
|
+
target: this.getTriggerEl(),
|
|
992
|
+
placement: this.placement,
|
|
993
|
+
offset: 8,
|
|
994
|
+
content: contentElement,
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
disconnectedCallback() {
|
|
999
|
+
clearTimeout(this.timer);
|
|
1000
|
+
if (this.portalInstance) {
|
|
1001
|
+
this.portalInstance.destroy();
|
|
1002
|
+
this.portalInstance = null;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* Renders the trigger element wrapper.
|
|
1007
|
+
*
|
|
1008
|
+
* Flow:
|
|
1009
|
+
* 1. Renders a Host element with `x-popover-wrapper` class.
|
|
1010
|
+
* 2. Renders a `div` acting as the trigger container.
|
|
1011
|
+
* 3. Projects the default slot content (the trigger element).
|
|
1012
|
+
*
|
|
1013
|
+
* @returns {JSX.Element} The component tree.
|
|
1014
|
+
*/
|
|
1015
|
+
render() {
|
|
1016
|
+
return (h(Host, { key: '37bcdc5da5a0ff94640494ac499ba599d6f27900', class: "x-popover-wrapper" }, h("div", { key: 'ce22172182c96e972e4621bd49609baaf08932c0', class: "x-popover-trigger" }, h("slot", { key: 'cc3860811241624a4df21471b9f6359477412dd0' }))));
|
|
1017
|
+
}
|
|
1018
|
+
static get watchers() { return {
|
|
1019
|
+
"open": [{
|
|
1020
|
+
"watchOpen": 0
|
|
1021
|
+
}]
|
|
1022
|
+
}; }
|
|
1023
|
+
};
|
|
1024
|
+
XPopover.style = xPopoverCss();
|
|
1025
|
+
|
|
1026
|
+
const popoverContentCss = () => `@charset "UTF-8";:root{--x-color-primary:#1677ff;--x-color-primary-rgb:22, 119, 255;--x-color-primary-contrast:#ffffff;--x-color-primary-contrast-rgb:255, 255, 255;--x-color-primary-shade:#0958d9;--x-color-primary-tint:#4096ff;--x-color-primary-bg:#e6f4ff;--x-color-primary-bg-hover:#bae0ff;--x-color-primary-border:#91caff;--x-color-primary-border-hover:#69b1ff;--x-color-primary-hover:#4096ff;--x-color-primary-active:#0958d9;--x-color-primary-text:#1677ff;--x-color-primary-text-hover:#4096ff;--x-color-primary-text-active:#0958d9;--x-color-secondary:#3dc2ff;--x-color-secondary-rgb:61, 194, 255;--x-color-secondary-contrast:#ffffff;--x-color-secondary-contrast-rgb:255, 255, 255;--x-color-secondary-shade:#36abe0;--x-color-secondary-tint:#50c8ff;--x-color-success:#52c41a;--x-color-success-rgb:82, 196, 26;--x-color-success-contrast:#ffffff;--x-color-success-contrast-rgb:255, 255, 255;--x-color-success-shade:#389e0d;--x-color-success-tint:#73d13d;--x-color-success-bg:#f6ffed;--x-color-success-bg-hover:#d9f7be;--x-color-success-border:#b7eb8f;--x-color-success-border-hover:#95de64;--x-color-success-hover:#73d13d;--x-color-success-active:#389e0d;--x-color-success-text:#52c41a;--x-color-success-text-hover:#73d13d;--x-color-success-text-active:#389e0d;--x-color-warning:#faad14;--x-color-warning-rgb:250, 173, 20;--x-color-warning-contrast:#000000;--x-color-warning-contrast-rgb:0, 0, 0;--x-color-warning-shade:#d48806;--x-color-warning-tint:#ffc53d;--x-color-warning-bg:#fffbe6;--x-color-warning-bg-hover:#fff1b8;--x-color-warning-border:#ffe58f;--x-color-warning-border-hover:#ffd666;--x-color-warning-hover:#ffc53d;--x-color-warning-active:#d48806;--x-color-warning-text:#faad14;--x-color-warning-text-hover:#ffc53d;--x-color-warning-text-active:#d48806;--x-color-danger:#ff4d4f;--x-color-danger-rgb:255, 77, 79;--x-color-danger-contrast:#ffffff;--x-color-danger-contrast-rgb:255, 255, 255;--x-color-danger-shade:#cf1322;--x-color-danger-tint:#ff7875;--x-color-error:#ff4d4f;--x-color-error-rgb:255, 77, 79;--x-color-error-bg:#fff2f0;--x-color-error-bg-hover:#ffccc7;--x-color-error-border:#ffa39e;--x-color-error-border-hover:#ff7875;--x-color-error-hover:#ff7875;--x-color-error-active:#d9363e;--x-color-error-text:#ff4d4f;--x-color-error-text-hover:#ff7875;--x-color-error-text-active:#d9363e;--x-color-info:#1677ff;--x-color-info-rgb:22, 119, 255;--x-color-info-bg:#e6f4ff;--x-color-info-bg-hover:#bae0ff;--x-color-info-border:#91caff;--x-color-info-border-hover:#69b1ff;--x-color-info-hover:#69b1ff;--x-color-info-active:#0958d9;--x-color-info-text:#1677ff;--x-color-info-text-hover:#69b1ff;--x-color-info-text-active:#0958d9;--x-color-text:rgba(0, 0, 0, 0.88);--x-color-text-secondary:rgba(0, 0, 0, 0.65);--x-color-text-tertiary:rgba(0, 0, 0, 0.45);--x-color-text-quaternary:rgba(0, 0, 0, 0.25);--x-color-text-disabled:rgba(0, 0, 0, 0.25);--x-color-text-placeholder:rgba(0, 0, 0, 0.25);--x-color-text-heading:rgba(0, 0, 0, 0.88);--x-color-text-label:rgba(0, 0, 0, 0.65);--x-color-text-description:rgba(0, 0, 0, 0.45);--x-color-text-light-solid:#ffffff;--x-color-bg-container:#ffffff;--x-color-bg-elevated:#ffffff;--x-color-bg-layout:#f5f5f5;--x-color-bg-spotlight:rgba(0, 0, 0, 0.85);--x-color-bg-mask:rgba(0, 0, 0, 0.45);--x-color-bg-base:#ffffff;--x-color-bg-container-disabled:#f5f5f5;--x-color-bg-container-loading:rgba(255, 255, 255, 0.65);--x-color-white:#ffffff;--x-color-fill:rgba(0, 0, 0, 0.15);--x-color-fill-secondary:rgba(0, 0, 0, 0.06);--x-color-fill-tertiary:rgba(0, 0, 0, 0.04);--x-color-fill-quaternary:rgba(0, 0, 0, 0.02);--x-color-border:#d9d9d9;--x-color-border-secondary:#f0f0f0;--x-color-border-bg:#ffffff;--x-color-split:rgba(5, 5, 5, 0.06);--x-color-dark:#222428;--x-color-dark-rgb:34, 36, 40;--x-color-dark-contrast:#ffffff;--x-color-dark-contrast-rgb:255, 255, 255;--x-color-dark-shade:#1e2023;--x-color-dark-tint:#383a3e;--x-color-medium:#92949c;--x-color-medium-rgb:146, 148, 156;--x-color-medium-contrast:#ffffff;--x-color-medium-contrast-rgb:255, 255, 255;--x-color-medium-shade:#808289;--x-color-medium-tint:#9d9fa6;--x-color-light:#f4f5f8;--x-color-light-rgb:244, 245, 248;--x-color-light-contrast:#000000;--x-color-light-contrast-rgb:0, 0, 0;--x-color-light-shade:#d7d8da;--x-color-light-tint:#f5f6f9;--x-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--x-font-family-code:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--x-font-size:14px;--x-font-size-sm:12px;--x-font-size-lg:16px;--x-font-size-xl:20px;--x-font-size-heading-1:38px;--x-font-size-heading-2:30px;--x-font-size-heading-3:24px;--x-font-size-heading-4:20px;--x-font-size-heading-5:16px;--x-line-height:1.5714285714285714;--x-line-height-lg:1.5;--x-line-height-sm:1.6666666666666667;--x-line-height-heading-1:1.2105263157894737;--x-line-height-heading-2:1.2666666666666666;--x-line-height-heading-3:1.3333333333333333;--x-line-height-heading-4:1.4;--x-line-height-heading-5:1.5;--x-font-weight-normal:400;--x-font-weight-medium:500;--x-font-weight-semibold:600;--x-font-weight-strong:600;--x-font-size-base:14px;--x-font-size-xxl:24px;--x-line-height-base:1.5714285714285714;--x-spacing-xxs:4px;--x-spacing-xs:8px;--x-spacing-sm:12px;--x-spacing-md:16px;--x-spacing-lg:20px;--x-spacing-xl:24px;--x-spacing-xxl:32px;--x-spacing-xxxl:48px;--x-margin-xxs:4px;--x-margin-xs:8px;--x-margin-sm:12px;--x-margin-md:16px;--x-margin-lg:24px;--x-margin-xl:32px;--x-margin-xxl:48px;--x-padding-xxs:4px;--x-padding-xs:8px;--x-padding-sm:12px;--x-padding-md:16px;--x-padding-lg:24px;--x-padding-content-horizontal-lg:24px;--x-padding-content-vertical-lg:12px;--x-padding-content-horizontal:16px;--x-padding-content-vertical:12px;--x-padding-content-horizontal-sm:16px;--x-padding-content-vertical-sm:8px;--x-border-radius:6px;--x-border-radius-xs:2px;--x-border-radius-sm:4px;--x-border-radius-lg:8px;--x-border-radius-xl:12px;--x-border-radius-outer:4px;--x-border-radius-base:6px;--x-border-width:1px;--x-border-width-base:1px;--x-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-shadow-lg:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-box-shadow-popover-arrow:2px 2px 5px rgba(0, 0, 0, 0.05);--x-box-shadow-card:0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);--x-box-shadow-drawer-right:-6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-left:6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-up:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-down:0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);--x-motion-duration-fast:0.1s;--x-motion-duration-mid:0.2s;--x-motion-duration-slow:0.3s;--x-motion-ease-in-out:cubic-bezier(0.645, 0.045, 0.355, 1);--x-motion-ease-out:cubic-bezier(0.215, 0.61, 0.355, 1);--x-motion-ease-in:cubic-bezier(0.55, 0.055, 0.675, 0.19);--x-motion-ease-out-back:cubic-bezier(0.12, 0.4, 0.29, 1.46);--x-motion-ease-in-back:cubic-bezier(0.71, -0.46, 0.88, 0.6);--x-motion-ease-in-out-circle:cubic-bezier(0.78, 0.14, 0.15, 0.86);--x-motion-ease-out-circle:cubic-bezier(0.08, 0.82, 0.17, 1);--x-motion-ease-in-circle:cubic-bezier(0.6, 0.04, 0.98, 0.34);--x-motion-ease-in-quint:cubic-bezier(0.755, 0.05, 0.855, 0.06);--x-motion-ease-out-quint:cubic-bezier(0.23, 1, 0.32, 1);--x-z-index-base:0;--x-z-index-popup-base:1000;--x-z-index-popup:1030;--x-z-index-affix:10;--x-z-index-modal:1000;--x-z-index-modal-mask:1000;--x-z-index-drawer:1000;--x-z-index-popover:1030;--x-z-index-dropdown:1050;--x-z-index-tooltip:1070;--x-z-index-notification:1080;--x-z-index-message:1090;--x-z-index-popconfirm:1060;--x-z-index-table-fixed:10;--x-opacity-loading:0.65;--x-opacity-image:1;--x-opacity-disabled:0.5;--x-control-height:32px;--x-control-height-xs:24px;--x-control-height-sm:24px;--x-control-height-lg:40px;--x-control-radio-size:16px;--x-control-checkbox-size:16px;--x-control-padding-horizontal:12px;--x-control-padding-horizontal-sm:8px;--x-control-outline-width:2px;--x-control-outline:rgba(5, 145, 255, 0.1);--x-control-item-bg-hover:rgba(0, 0, 0, 0.04);--x-control-item-bg-active:#e6f4ff;--x-control-item-bg-active-hover:#bae0ff;--x-control-item-bg-active-disabled:rgba(0, 0, 0, 0.15);--x-control-tmp-outline:rgba(0, 0, 0, 0.02);--x-color-yellow:#fadb14;--x-color-yellow-rgb:250, 219, 20;--x-font-family-base:var(--x-font-family);--x-color-link:#1677ff;--x-color-link-hover:#69b1ff;--x-color-link-active:#0958d9;--x-color-icon:rgba(0, 0, 0, 0.45);--x-color-icon-hover:rgba(0, 0, 0, 0.88);--x-color-highlight:#ff4d4f;--x-color-bg-text-hover:rgba(0, 0, 0, 0.06);--x-color-bg-text-active:rgba(0, 0, 0, 0.15);--x-screen-xs:480px;--x-screen-xs-min:480px;--x-screen-xs-max:575px;--x-screen-sm:576px;--x-screen-sm-min:576px;--x-screen-sm-max:767px;--x-screen-md:768px;--x-screen-md-min:768px;--x-screen-md-max:991px;--x-screen-lg:992px;--x-screen-lg-min:992px;--x-screen-lg-max:1199px;--x-screen-xl:1200px;--x-screen-xl-min:1200px;--x-screen-xl-max:1599px;--x-screen-xxl:1600px;--x-screen-xxl-min:1600px;--x-color-fill-content:rgba(0, 0, 0, 0.06);--x-color-fill-content-hover:rgba(0, 0, 0, 0.15);--x-color-fill-alter:rgba(0, 0, 0, 0.02);--x-scrollbar-width:12px;--x-scrollbar-track-bg:rgba(0, 0, 0, 0.04);--x-scrollbar-thumb-bg:rgba(0, 0, 0, 0.25);--x-scrollbar-thumb-bg-hover:rgba(0, 0, 0, 0.35);--x-menu-dark-bg:#001529;--x-menu-dark-item-bg:#001529;--x-menu-dark-popup-bg:#001529;--x-menu-dark-submenu-item-bg:#000c17}:host{display:block;font-family:var(--x-popover-font-family, var(--x-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));font-size:var(--x-popover-font-size, var(--x-font-size-base, 14px));line-height:var(--x-popover-line-height, var(--x-line-height-base, 1.5714));color:var(--x-popover-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));pointer-events:auto;z-index:var(--x-popover-z-index, 1030)}.x-popover-content{position:relative;display:block;-webkit-animation:x-popover-fade-in 0.2s cubic-bezier(0.23, 1, 0.32, 1);animation:x-popover-fade-in 0.2s cubic-bezier(0.23, 1, 0.32, 1)}@-webkit-keyframes x-popover-fade-in{from{opacity:0;-webkit-transform:scale(0.95);transform:scale(0.95)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes x-popover-fade-in{from{opacity:0;-webkit-transform:scale(0.95);transform:scale(0.95)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.x-popover-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;z-index:10}.x-popover-inner{background-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff));background-clip:padding-box;border-radius:var(--x-popover-border-radius, var(--x-border-radius-lg, 8px));-webkit-box-shadow:var(--x-popover-shadow, var(--x-box-shadow-secondary, 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)));box-shadow:var(--x-popover-shadow, var(--x-box-shadow-secondary, 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)));overflow:hidden;border:var(--x-popover-border-width, var(--x-border-width-base, 1px)) solid var(--x-popover-border-color, var(--x-color-border-secondary, #f0f0f0))}.x-popover-title{min-width:var(--x-popover-min-width, 177px);margin:0;padding:var(--x-popover-title-padding-block, var(--x-spacing-xxs, 4px)) var(--x-popover-title-padding-inline, var(--x-spacing-md, 16px));color:var(--x-popover-title-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));font-weight:var(--x-popover-title-font-weight, var(--x-font-weight-semibold, 600));border-bottom:var(--x-popover-border-width, var(--x-border-width-base, 1px)) solid var(--x-popover-border-color, var(--x-color-border-secondary, #f0f0f0));background:transparent}.x-popover-inner-content{padding:var(--x-popover-content-padding-block, var(--x-spacing-sm, 8px)) var(--x-popover-content-padding-inline, var(--x-spacing-md, 16px));color:var(--x-popover-color, var(--x-color-text, rgba(0, 0, 0, 0.88)))}[class*=x-popover-placement-bottom]{-webkit-transform-origin:top center;transform-origin:top center;padding-top:var(--x-popover-arrow-size, 6px)}[class*=x-popover-placement-bottom] .x-popover-arrow{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);border-width:0 var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px);border-bottom-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}[class*=x-popover-placement-top]{-webkit-transform-origin:bottom center;transform-origin:bottom center;padding-bottom:var(--x-popover-arrow-size, 6px)}[class*=x-popover-placement-top] .x-popover-arrow{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);border-width:var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px) 0;border-top-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}[class*=x-popover-placement-left]{-webkit-transform-origin:right center;transform-origin:right center;padding-right:var(--x-popover-arrow-size, 6px)}[class*=x-popover-placement-left] .x-popover-arrow{right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);border-width:var(--x-popover-arrow-size, 6px) 0 var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px);border-left-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}[class*=x-popover-placement-right]{-webkit-transform-origin:left center;transform-origin:left center;padding-left:var(--x-popover-arrow-size, 6px)}[class*=x-popover-placement-right] .x-popover-arrow{left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);border-width:var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px) var(--x-popover-arrow-size, 6px) 0;border-right-color:var(--x-popover-bg, var(--x-color-bg-container, #ffffff))}.x-popover-hidden{display:none !important;opacity:0}`;
|
|
1027
|
+
|
|
1028
|
+
const XPopoverContent = class {
|
|
1029
|
+
constructor(hostRef) {
|
|
1030
|
+
registerInstance(this, hostRef);
|
|
1031
|
+
}
|
|
1032
|
+
get el() { return getElement(this); }
|
|
1033
|
+
/**
|
|
1034
|
+
* Title of the popover.
|
|
1035
|
+
* @example
|
|
1036
|
+
* <x-popover-content popoverTitle="Title"></x-popover-content>
|
|
1037
|
+
*/
|
|
1038
|
+
popoverTitle;
|
|
1039
|
+
/**
|
|
1040
|
+
* Content text.
|
|
1041
|
+
* @example
|
|
1042
|
+
* <x-popover-content content="Details"></x-popover-content>
|
|
1043
|
+
*/
|
|
1044
|
+
content;
|
|
1045
|
+
/**
|
|
1046
|
+
* Placement of the popover.
|
|
1047
|
+
* @example
|
|
1048
|
+
* <x-popover-content placement="right"></x-popover-content>
|
|
1049
|
+
*/
|
|
1050
|
+
placement = 'top';
|
|
1051
|
+
/**
|
|
1052
|
+
* Whether the popover is hidden.
|
|
1053
|
+
* @example
|
|
1054
|
+
* <x-popover-content hidden></x-popover-content>
|
|
1055
|
+
*/
|
|
1056
|
+
hidden = false;
|
|
1057
|
+
/**
|
|
1058
|
+
* Custom class for the content.
|
|
1059
|
+
* @example
|
|
1060
|
+
* <x-popover-content contentClass="my-popover"></x-popover-content>
|
|
1061
|
+
*/
|
|
1062
|
+
contentClass;
|
|
1063
|
+
/**
|
|
1064
|
+
* Mouse enter handler.
|
|
1065
|
+
* @example
|
|
1066
|
+
* <x-popover-content mouseEnterPopover={(ev) => console.log(ev)}></x-popover-content>
|
|
1067
|
+
*/
|
|
1068
|
+
mouseEnterPopover;
|
|
1069
|
+
/**
|
|
1070
|
+
* Mouse leave handler.
|
|
1071
|
+
* @example
|
|
1072
|
+
* <x-popover-content mouseLeavePopover={(ev) => console.log(ev)}></x-popover-content>
|
|
1073
|
+
*/
|
|
1074
|
+
mouseLeavePopover;
|
|
1075
|
+
/**
|
|
1076
|
+
* Render popover content, arrow, and slots.
|
|
1077
|
+
*
|
|
1078
|
+
* Flow:
|
|
1079
|
+
* 1. Constructs dynamic class map based on placement and hidden state.
|
|
1080
|
+
* 2. Renders Host element with mouse enter/leave listeners (for hover trigger support).
|
|
1081
|
+
* 3. Renders the arrow indicator.
|
|
1082
|
+
* 4. Renders the inner content wrapper:
|
|
1083
|
+
* - Title (if provided).
|
|
1084
|
+
* - Content body (text prop + named slot "content").
|
|
1085
|
+
*
|
|
1086
|
+
* @returns {JSX.Element} The rendered content.
|
|
1087
|
+
* @example
|
|
1088
|
+
* <x-popover-content content="Hello"></x-popover-content>
|
|
1089
|
+
*/
|
|
1090
|
+
render() {
|
|
1091
|
+
const classes = {
|
|
1092
|
+
'x-popover-content': true,
|
|
1093
|
+
[`x-popover-placement-${this.placement}`]: true,
|
|
1094
|
+
'x-popover-hidden': this.hidden,
|
|
1095
|
+
[this.contentClass || '']: !!this.contentClass,
|
|
1096
|
+
};
|
|
1097
|
+
return (h(Host, { key: 'b948dbdb61a8213de272d33c24a3ec20254ee6ff', class: classes, onMouseEnter: (ev) => this.mouseEnterPopover?.(ev), onMouseLeave: (ev) => this.mouseLeavePopover?.(ev) }, h("div", { key: '996a05418f154b8a76ec40bc762e82d021672562', class: "x-popover-arrow" }), h("div", { key: '48ca4c9f425c776e9422b99627a146bfd18382d7', class: "x-popover-inner" }, this.popoverTitle && (h("div", { key: 'e2d31f80e31df45c4415309ac3518a01dd749c0f', class: "x-popover-title" }, this.popoverTitle)), h("div", { key: 'e8727b440e39c0f04dba02dfa802ee9c7735adec', class: "x-popover-inner-content" }, this.content, h("slot", { key: 'c4872c221f2e639ef106b31589e6f638b1bd8995', name: "content" })))));
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
XPopoverContent.style = popoverContentCss();
|
|
1101
|
+
|
|
1102
|
+
const xRadioCss = () => `@charset "UTF-8";:root{--x-color-primary:#1677ff;--x-color-primary-rgb:22, 119, 255;--x-color-primary-contrast:#ffffff;--x-color-primary-contrast-rgb:255, 255, 255;--x-color-primary-shade:#0958d9;--x-color-primary-tint:#4096ff;--x-color-primary-bg:#e6f4ff;--x-color-primary-bg-hover:#bae0ff;--x-color-primary-border:#91caff;--x-color-primary-border-hover:#69b1ff;--x-color-primary-hover:#4096ff;--x-color-primary-active:#0958d9;--x-color-primary-text:#1677ff;--x-color-primary-text-hover:#4096ff;--x-color-primary-text-active:#0958d9;--x-color-secondary:#3dc2ff;--x-color-secondary-rgb:61, 194, 255;--x-color-secondary-contrast:#ffffff;--x-color-secondary-contrast-rgb:255, 255, 255;--x-color-secondary-shade:#36abe0;--x-color-secondary-tint:#50c8ff;--x-color-success:#52c41a;--x-color-success-rgb:82, 196, 26;--x-color-success-contrast:#ffffff;--x-color-success-contrast-rgb:255, 255, 255;--x-color-success-shade:#389e0d;--x-color-success-tint:#73d13d;--x-color-success-bg:#f6ffed;--x-color-success-bg-hover:#d9f7be;--x-color-success-border:#b7eb8f;--x-color-success-border-hover:#95de64;--x-color-success-hover:#73d13d;--x-color-success-active:#389e0d;--x-color-success-text:#52c41a;--x-color-success-text-hover:#73d13d;--x-color-success-text-active:#389e0d;--x-color-warning:#faad14;--x-color-warning-rgb:250, 173, 20;--x-color-warning-contrast:#000000;--x-color-warning-contrast-rgb:0, 0, 0;--x-color-warning-shade:#d48806;--x-color-warning-tint:#ffc53d;--x-color-warning-bg:#fffbe6;--x-color-warning-bg-hover:#fff1b8;--x-color-warning-border:#ffe58f;--x-color-warning-border-hover:#ffd666;--x-color-warning-hover:#ffc53d;--x-color-warning-active:#d48806;--x-color-warning-text:#faad14;--x-color-warning-text-hover:#ffc53d;--x-color-warning-text-active:#d48806;--x-color-danger:#ff4d4f;--x-color-danger-rgb:255, 77, 79;--x-color-danger-contrast:#ffffff;--x-color-danger-contrast-rgb:255, 255, 255;--x-color-danger-shade:#cf1322;--x-color-danger-tint:#ff7875;--x-color-error:#ff4d4f;--x-color-error-rgb:255, 77, 79;--x-color-error-bg:#fff2f0;--x-color-error-bg-hover:#ffccc7;--x-color-error-border:#ffa39e;--x-color-error-border-hover:#ff7875;--x-color-error-hover:#ff7875;--x-color-error-active:#d9363e;--x-color-error-text:#ff4d4f;--x-color-error-text-hover:#ff7875;--x-color-error-text-active:#d9363e;--x-color-info:#1677ff;--x-color-info-rgb:22, 119, 255;--x-color-info-bg:#e6f4ff;--x-color-info-bg-hover:#bae0ff;--x-color-info-border:#91caff;--x-color-info-border-hover:#69b1ff;--x-color-info-hover:#69b1ff;--x-color-info-active:#0958d9;--x-color-info-text:#1677ff;--x-color-info-text-hover:#69b1ff;--x-color-info-text-active:#0958d9;--x-color-text:rgba(0, 0, 0, 0.88);--x-color-text-secondary:rgba(0, 0, 0, 0.65);--x-color-text-tertiary:rgba(0, 0, 0, 0.45);--x-color-text-quaternary:rgba(0, 0, 0, 0.25);--x-color-text-disabled:rgba(0, 0, 0, 0.25);--x-color-text-placeholder:rgba(0, 0, 0, 0.25);--x-color-text-heading:rgba(0, 0, 0, 0.88);--x-color-text-label:rgba(0, 0, 0, 0.65);--x-color-text-description:rgba(0, 0, 0, 0.45);--x-color-text-light-solid:#ffffff;--x-color-bg-container:#ffffff;--x-color-bg-elevated:#ffffff;--x-color-bg-layout:#f5f5f5;--x-color-bg-spotlight:rgba(0, 0, 0, 0.85);--x-color-bg-mask:rgba(0, 0, 0, 0.45);--x-color-bg-base:#ffffff;--x-color-bg-container-disabled:#f5f5f5;--x-color-bg-container-loading:rgba(255, 255, 255, 0.65);--x-color-white:#ffffff;--x-color-fill:rgba(0, 0, 0, 0.15);--x-color-fill-secondary:rgba(0, 0, 0, 0.06);--x-color-fill-tertiary:rgba(0, 0, 0, 0.04);--x-color-fill-quaternary:rgba(0, 0, 0, 0.02);--x-color-border:#d9d9d9;--x-color-border-secondary:#f0f0f0;--x-color-border-bg:#ffffff;--x-color-split:rgba(5, 5, 5, 0.06);--x-color-dark:#222428;--x-color-dark-rgb:34, 36, 40;--x-color-dark-contrast:#ffffff;--x-color-dark-contrast-rgb:255, 255, 255;--x-color-dark-shade:#1e2023;--x-color-dark-tint:#383a3e;--x-color-medium:#92949c;--x-color-medium-rgb:146, 148, 156;--x-color-medium-contrast:#ffffff;--x-color-medium-contrast-rgb:255, 255, 255;--x-color-medium-shade:#808289;--x-color-medium-tint:#9d9fa6;--x-color-light:#f4f5f8;--x-color-light-rgb:244, 245, 248;--x-color-light-contrast:#000000;--x-color-light-contrast-rgb:0, 0, 0;--x-color-light-shade:#d7d8da;--x-color-light-tint:#f5f6f9;--x-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--x-font-family-code:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--x-font-size:14px;--x-font-size-sm:12px;--x-font-size-lg:16px;--x-font-size-xl:20px;--x-font-size-heading-1:38px;--x-font-size-heading-2:30px;--x-font-size-heading-3:24px;--x-font-size-heading-4:20px;--x-font-size-heading-5:16px;--x-line-height:1.5714285714285714;--x-line-height-lg:1.5;--x-line-height-sm:1.6666666666666667;--x-line-height-heading-1:1.2105263157894737;--x-line-height-heading-2:1.2666666666666666;--x-line-height-heading-3:1.3333333333333333;--x-line-height-heading-4:1.4;--x-line-height-heading-5:1.5;--x-font-weight-normal:400;--x-font-weight-medium:500;--x-font-weight-semibold:600;--x-font-weight-strong:600;--x-font-size-base:14px;--x-font-size-xxl:24px;--x-line-height-base:1.5714285714285714;--x-spacing-xxs:4px;--x-spacing-xs:8px;--x-spacing-sm:12px;--x-spacing-md:16px;--x-spacing-lg:20px;--x-spacing-xl:24px;--x-spacing-xxl:32px;--x-spacing-xxxl:48px;--x-margin-xxs:4px;--x-margin-xs:8px;--x-margin-sm:12px;--x-margin-md:16px;--x-margin-lg:24px;--x-margin-xl:32px;--x-margin-xxl:48px;--x-padding-xxs:4px;--x-padding-xs:8px;--x-padding-sm:12px;--x-padding-md:16px;--x-padding-lg:24px;--x-padding-content-horizontal-lg:24px;--x-padding-content-vertical-lg:12px;--x-padding-content-horizontal:16px;--x-padding-content-vertical:12px;--x-padding-content-horizontal-sm:16px;--x-padding-content-vertical-sm:8px;--x-border-radius:6px;--x-border-radius-xs:2px;--x-border-radius-sm:4px;--x-border-radius-lg:8px;--x-border-radius-xl:12px;--x-border-radius-outer:4px;--x-border-radius-base:6px;--x-border-width:1px;--x-border-width-base:1px;--x-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-shadow-lg:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-box-shadow-popover-arrow:2px 2px 5px rgba(0, 0, 0, 0.05);--x-box-shadow-card:0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);--x-box-shadow-drawer-right:-6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-left:6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-up:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-down:0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);--x-motion-duration-fast:0.1s;--x-motion-duration-mid:0.2s;--x-motion-duration-slow:0.3s;--x-motion-ease-in-out:cubic-bezier(0.645, 0.045, 0.355, 1);--x-motion-ease-out:cubic-bezier(0.215, 0.61, 0.355, 1);--x-motion-ease-in:cubic-bezier(0.55, 0.055, 0.675, 0.19);--x-motion-ease-out-back:cubic-bezier(0.12, 0.4, 0.29, 1.46);--x-motion-ease-in-back:cubic-bezier(0.71, -0.46, 0.88, 0.6);--x-motion-ease-in-out-circle:cubic-bezier(0.78, 0.14, 0.15, 0.86);--x-motion-ease-out-circle:cubic-bezier(0.08, 0.82, 0.17, 1);--x-motion-ease-in-circle:cubic-bezier(0.6, 0.04, 0.98, 0.34);--x-motion-ease-in-quint:cubic-bezier(0.755, 0.05, 0.855, 0.06);--x-motion-ease-out-quint:cubic-bezier(0.23, 1, 0.32, 1);--x-z-index-base:0;--x-z-index-popup-base:1000;--x-z-index-popup:1030;--x-z-index-affix:10;--x-z-index-modal:1000;--x-z-index-modal-mask:1000;--x-z-index-drawer:1000;--x-z-index-popover:1030;--x-z-index-dropdown:1050;--x-z-index-tooltip:1070;--x-z-index-notification:1080;--x-z-index-message:1090;--x-z-index-popconfirm:1060;--x-z-index-table-fixed:10;--x-opacity-loading:0.65;--x-opacity-image:1;--x-opacity-disabled:0.5;--x-control-height:32px;--x-control-height-xs:24px;--x-control-height-sm:24px;--x-control-height-lg:40px;--x-control-radio-size:16px;--x-control-checkbox-size:16px;--x-control-padding-horizontal:12px;--x-control-padding-horizontal-sm:8px;--x-control-outline-width:2px;--x-control-outline:rgba(5, 145, 255, 0.1);--x-control-item-bg-hover:rgba(0, 0, 0, 0.04);--x-control-item-bg-active:#e6f4ff;--x-control-item-bg-active-hover:#bae0ff;--x-control-item-bg-active-disabled:rgba(0, 0, 0, 0.15);--x-control-tmp-outline:rgba(0, 0, 0, 0.02);--x-color-yellow:#fadb14;--x-color-yellow-rgb:250, 219, 20;--x-font-family-base:var(--x-font-family);--x-color-link:#1677ff;--x-color-link-hover:#69b1ff;--x-color-link-active:#0958d9;--x-color-icon:rgba(0, 0, 0, 0.45);--x-color-icon-hover:rgba(0, 0, 0, 0.88);--x-color-highlight:#ff4d4f;--x-color-bg-text-hover:rgba(0, 0, 0, 0.06);--x-color-bg-text-active:rgba(0, 0, 0, 0.15);--x-screen-xs:480px;--x-screen-xs-min:480px;--x-screen-xs-max:575px;--x-screen-sm:576px;--x-screen-sm-min:576px;--x-screen-sm-max:767px;--x-screen-md:768px;--x-screen-md-min:768px;--x-screen-md-max:991px;--x-screen-lg:992px;--x-screen-lg-min:992px;--x-screen-lg-max:1199px;--x-screen-xl:1200px;--x-screen-xl-min:1200px;--x-screen-xl-max:1599px;--x-screen-xxl:1600px;--x-screen-xxl-min:1600px;--x-color-fill-content:rgba(0, 0, 0, 0.06);--x-color-fill-content-hover:rgba(0, 0, 0, 0.15);--x-color-fill-alter:rgba(0, 0, 0, 0.02);--x-scrollbar-width:12px;--x-scrollbar-track-bg:rgba(0, 0, 0, 0.04);--x-scrollbar-thumb-bg:rgba(0, 0, 0, 0.25);--x-scrollbar-thumb-bg-hover:rgba(0, 0, 0, 0.35);--x-menu-dark-bg:#001529;--x-menu-dark-item-bg:#001529;--x-menu-dark-popup-bg:#001529;--x-menu-dark-submenu-item-bg:#000c17}:host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;line-height:1;cursor:pointer;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;font-size:var(--x-radio-font-size, var(--x-font-size, 14px));font-family:inherit;color:var(--x-radio-label-color, var(--x-color-text, rgba(0, 0, 0, 0.88)));list-style:none;outline:none}:host(:focus-visible){outline:2px solid var(--x-color-primary-border, #91caff);outline-offset:1px;border-radius:4px}:host(.x-radio-wrapper-disabled){cursor:not-allowed;color:var(--x-radio-label-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)))}.x-radio{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;line-height:1;white-space:nowrap;outline:none;cursor:pointer;vertical-align:sub}.x-radio-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0;margin:0;padding:0}.x-radio-inner{position:relative;top:0;left:0;display:block;width:var(--x-radio-size, var(--x-control-radio-size, 16px));height:var(--x-radio-size, var(--x-control-radio-size, 16px));background-color:var(--x-radio-bg, var(--x-color-bg-container, #ffffff));border:var(--x-radio-border-width, var(--x-border-width-base, 1px)) solid var(--x-radio-border-color, var(--x-color-border, #d9d9d9));border-radius:50%;-webkit-transition:all var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)));transition:all var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)))}.x-radio-inner::after{position:absolute;top:50%;left:50%;display:block;width:var(--x-radio-dot-size, var(--x-spacing-xs, 8px));height:var(--x-radio-dot-size, var(--x-spacing-xs, 8px));margin-top:calc(var(--x-radio-dot-size, var(--x-spacing-xs, 8px)) / -2);margin-left:calc(var(--x-radio-dot-size, var(--x-spacing-xs, 8px)) / -2);background-color:var(--x-radio-dot-color, var(--x-color-primary, #1677ff));border-top:0;border-left:0;border-radius:50%;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:all var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)));transition:all var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)));content:""}.x-radio:not(.x-radio-disabled):hover .x-radio-inner{border-color:var(--x-radio-border-color-hover, var(--x-color-primary, #1677ff))}:host(.x-radio-wrapper-checked) .x-radio-inner,.x-radio-checked .x-radio-inner{border-color:var(--x-radio-color, var(--x-color-primary, #1677ff));background-color:var(--x-radio-bg, var(--x-color-bg-container, #ffffff))}:host(.x-radio-wrapper-checked) .x-radio-inner::after,.x-radio-checked .x-radio-inner::after{-webkit-transform:scale(0.625);transform:scale(0.625);-webkit-transform:scale(1);transform:scale(1);opacity:1;-webkit-transition:opacity var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), background-color var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), -webkit-transform var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)));transition:opacity var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), background-color var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), -webkit-transform var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)));transition:transform var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), opacity var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), background-color var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)));transition:transform var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), opacity var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), background-color var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86))), -webkit-transform var(--x-radio-motion-duration, var(--x-motion-duration-mid, 0.2s)) var(--x-radio-motion-timing, var(--x-motion-ease-in-out-circle, cubic-bezier(0.78, 0.14, 0.15, 0.86)))}:host(.x-radio-wrapper-checked) .x-radio:not(.x-radio-disabled):hover .x-radio-inner,.x-radio-checked:not(.x-radio-disabled):hover .x-radio-inner{border-color:var(--x-radio-color-hover, var(--x-color-primary-hover, #4096ff))}:host(:focus-visible) .x-radio-inner,.x-radio-input:focus-visible+.x-radio-inner{-webkit-box-shadow:0 0 0 3px var(--x-color-primary-shadow, rgba(22, 119, 255, 0.12));box-shadow:0 0 0 3px var(--x-color-primary-shadow, rgba(22, 119, 255, 0.12))}:host(.x-radio-wrapper-disabled) .x-radio,.x-radio-disabled{cursor:not-allowed}:host(.x-radio-wrapper-disabled) .x-radio-input,.x-radio-disabled .x-radio-input{cursor:not-allowed}:host(.x-radio-wrapper-disabled) .x-radio-inner,.x-radio-disabled .x-radio-inner{background-color:var(--x-radio-bg-disabled, var(--x-color-bg-container-disabled, rgba(0, 0, 0, 0.04)));border-color:var(--x-radio-border-color-disabled, var(--x-color-border, #d9d9d9)) !important;cursor:not-allowed}:host(.x-radio-wrapper-disabled) .x-radio-inner::after,.x-radio-disabled .x-radio-inner::after{background-color:var(--x-radio-dot-color-disabled, var(--x-color-text-quaternary, rgba(0, 0, 0, 0.25)))}:host(.x-radio-wrapper-disabled.x-radio-wrapper-checked) .x-radio-inner::after,.x-radio-disabled.x-radio-checked .x-radio-inner::after{-webkit-transform:scale(1);transform:scale(1);opacity:1}.x-radio-label{padding-right:var(--x-radio-label-padding, var(--x-spacing-xs, 8px));padding-left:var(--x-radio-label-padding, var(--x-spacing-xs, 8px));line-height:1.5715;word-break:break-all}:host(.x-radio-wrapper-disabled) .x-radio-label{color:var(--x-radio-label-color-disabled, var(--x-color-text-disabled, rgba(0, 0, 0, 0.25)));cursor:not-allowed}:host(.x-radio-placement-start){-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.x-radio-placement-start) .x-radio-label{padding-right:var(--x-radio-label-padding, var(--x-spacing-xs, 8px));padding-left:0}:host(.x-radio-placement-end){-ms-flex-direction:row;flex-direction:row}:host(.x-radio-placement-end) .x-radio-label{padding-left:var(--x-radio-label-padding, var(--x-spacing-xs, 8px));padding-right:0}:host(.x-radio-placement-fixed){-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.x-radio-placement-fixed) .x-radio-label{padding-right:var(--x-radio-label-padding, var(--x-spacing-xs, 8px));padding-left:0;width:var(--x-radio-label-width, 100px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}:host(.x-radio-placement-stacked){-ms-flex-direction:column-reverse;flex-direction:column-reverse;gap:var(--x-radio-label-padding, var(--x-spacing-xs, 8px))}:host(.x-radio-placement-stacked) .x-radio-label{padding:0;width:100%;text-align:center}:host(.x-radio-alignment-start){-ms-flex-align:start;align-items:flex-start}:host(.x-radio-alignment-center){-ms-flex-align:center;align-items:center}:host(.x-radio-alignment-end){-ms-flex-align:end;align-items:flex-end}`;
|
|
1103
|
+
|
|
1104
|
+
const XRadio = class {
|
|
1105
|
+
constructor(hostRef) {
|
|
1106
|
+
registerInstance(this, hostRef);
|
|
1107
|
+
this.xChange = createEvent(this, "xChange", 7);
|
|
1108
|
+
this.xFocus = createEvent(this, "xFocus", 7);
|
|
1109
|
+
this.xBlur = createEvent(this, "xBlur", 7);
|
|
1110
|
+
}
|
|
1111
|
+
get el() { return getElement(this); }
|
|
1112
|
+
/**
|
|
1113
|
+
* Input element reference for focus management.
|
|
1114
|
+
*/
|
|
1115
|
+
inputEl;
|
|
1116
|
+
// ==================== Props ====================
|
|
1117
|
+
/**
|
|
1118
|
+
* Whether the radio is automatically focused on mount.
|
|
1119
|
+
* @default false
|
|
1120
|
+
* @example
|
|
1121
|
+
* <x-radio autoFocus></x-radio>
|
|
1122
|
+
*/
|
|
1123
|
+
autoFocus = false;
|
|
1124
|
+
/**
|
|
1125
|
+
* Whether the radio is checked (controlled mode).
|
|
1126
|
+
* @example
|
|
1127
|
+
* <x-radio checked></x-radio>
|
|
1128
|
+
*/
|
|
1129
|
+
checked = false;
|
|
1130
|
+
/**
|
|
1131
|
+
* Whether the radio is checked by default (uncontrolled mode).
|
|
1132
|
+
* @default false
|
|
1133
|
+
* @example
|
|
1134
|
+
* <x-radio defaultChecked></x-radio>
|
|
1135
|
+
*/
|
|
1136
|
+
defaultChecked = false;
|
|
1137
|
+
/**
|
|
1138
|
+
* Whether the radio is disabled.
|
|
1139
|
+
* @default false
|
|
1140
|
+
* @example
|
|
1141
|
+
* <x-radio disabled></x-radio>
|
|
1142
|
+
*/
|
|
1143
|
+
disabled = false;
|
|
1144
|
+
/**
|
|
1145
|
+
* The name attribute of the radio input.
|
|
1146
|
+
* @example
|
|
1147
|
+
* <x-radio name="group1"></x-radio>
|
|
1148
|
+
*/
|
|
1149
|
+
name;
|
|
1150
|
+
/**
|
|
1151
|
+
* Radio label placement.
|
|
1152
|
+
* @default 'start'
|
|
1153
|
+
* @example
|
|
1154
|
+
* <x-radio placement="end"></x-radio>
|
|
1155
|
+
*/
|
|
1156
|
+
placement = 'start';
|
|
1157
|
+
/**
|
|
1158
|
+
* Radio label alignment.
|
|
1159
|
+
* @default 'center'
|
|
1160
|
+
*/
|
|
1161
|
+
alignment = 'center';
|
|
1162
|
+
/**
|
|
1163
|
+
* The value of the radio.
|
|
1164
|
+
* @example
|
|
1165
|
+
* <x-radio value="A"></x-radio>
|
|
1166
|
+
*/
|
|
1167
|
+
value;
|
|
1168
|
+
/**
|
|
1169
|
+
* Custom class names for radio parts.
|
|
1170
|
+
* @example
|
|
1171
|
+
* <x-radio classNames={{ root: 'my-radio' }}></x-radio>
|
|
1172
|
+
*/
|
|
1173
|
+
classNames;
|
|
1174
|
+
/**
|
|
1175
|
+
* Custom styles for radio parts.
|
|
1176
|
+
* @example
|
|
1177
|
+
* <x-radio styles={{ root: 'margin: 4px;' }}></x-radio>
|
|
1178
|
+
*/
|
|
1179
|
+
styles;
|
|
1180
|
+
/**
|
|
1181
|
+
* Unique identifier for the radio.
|
|
1182
|
+
* @example
|
|
1183
|
+
* <x-radio radioId="opt-a"></x-radio>
|
|
1184
|
+
*/
|
|
1185
|
+
radioId;
|
|
1186
|
+
// ==================== Events ====================
|
|
1187
|
+
/**
|
|
1188
|
+
* Callback fired when the radio state changes.
|
|
1189
|
+
* @example
|
|
1190
|
+
* <x-radio onXChange={(ev) => console.log(ev.detail)}></x-radio>
|
|
1191
|
+
*/
|
|
1192
|
+
xChange;
|
|
1193
|
+
/**
|
|
1194
|
+
* Callback fired when the radio is focused.
|
|
1195
|
+
* @example
|
|
1196
|
+
* <x-radio onXFocus={() => {}}></x-radio>
|
|
1197
|
+
*/
|
|
1198
|
+
xFocus;
|
|
1199
|
+
/**
|
|
1200
|
+
* Callback fired when the radio loses focus.
|
|
1201
|
+
* @example
|
|
1202
|
+
* <x-radio onXBlur={() => {}}></x-radio>
|
|
1203
|
+
*/
|
|
1204
|
+
xBlur;
|
|
1205
|
+
// ==================== Lifecycle ====================
|
|
1206
|
+
/**
|
|
1207
|
+
* Component lifecycle method called before loading.
|
|
1208
|
+
* Syncs the internal checked state with defaultChecked if provided.
|
|
1209
|
+
*/
|
|
1210
|
+
componentWillLoad() {
|
|
1211
|
+
if (this.defaultChecked && !this.checked) {
|
|
1212
|
+
this.checked = true;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* Component lifecycle method called after loading.
|
|
1217
|
+
* Handles auto-focus behavior if enabled.
|
|
1218
|
+
*/
|
|
1219
|
+
componentDidLoad() {
|
|
1220
|
+
if (this.autoFocus && this.inputEl) {
|
|
1221
|
+
this.inputEl.focus();
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
// ==================== Watchers ====================
|
|
1225
|
+
/**
|
|
1226
|
+
* Watcher for checked prop changes.
|
|
1227
|
+
* Can be used to sync with parent components or trigger side effects.
|
|
1228
|
+
*/
|
|
1229
|
+
handleCheckedChange() {
|
|
1230
|
+
// Sync with parent if needed
|
|
1231
|
+
}
|
|
1232
|
+
// ==================== Methods ====================
|
|
1233
|
+
/**
|
|
1234
|
+
* Focus the radio input programmatically.
|
|
1235
|
+
* @returns Promise<void> - Resolves when focus is set.
|
|
1236
|
+
* @example
|
|
1237
|
+
* const radio = document.querySelector('x-radio');
|
|
1238
|
+
* await radio.setFocus();
|
|
1239
|
+
*/
|
|
1240
|
+
async setFocus() {
|
|
1241
|
+
this.inputEl?.focus();
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Remove focus from the radio input programmatically.
|
|
1245
|
+
* @returns Promise<void> - Resolves when focus is removed.
|
|
1246
|
+
* @example
|
|
1247
|
+
* const radio = document.querySelector('x-radio');
|
|
1248
|
+
* await radio.removeFocus();
|
|
1249
|
+
*/
|
|
1250
|
+
async removeFocus() {
|
|
1251
|
+
this.inputEl?.blur();
|
|
1252
|
+
}
|
|
1253
|
+
// ==================== Private Methods ====================
|
|
1254
|
+
/**
|
|
1255
|
+
* Handles click events on the radio component.
|
|
1256
|
+
*
|
|
1257
|
+
* Flow:
|
|
1258
|
+
* 1. Checks if the component is disabled; if so, prevents default action and stops propagation.
|
|
1259
|
+
* 2. Checks if the radio is currently unchecked (since radio buttons cannot be unchecked by clicking).
|
|
1260
|
+
* 3. If unchecked, updates the checked state to true.
|
|
1261
|
+
* 4. Emits the `xChange` event with the new state and original event.
|
|
1262
|
+
*
|
|
1263
|
+
* @param e - The mouse event triggered by user click.
|
|
1264
|
+
*/
|
|
1265
|
+
handleClick = (e) => {
|
|
1266
|
+
if (this.disabled) {
|
|
1267
|
+
e.preventDefault();
|
|
1268
|
+
e.stopPropagation();
|
|
1269
|
+
return;
|
|
1270
|
+
}
|
|
1271
|
+
// Radio buttons can only be checked, not unchecked
|
|
1272
|
+
if (!this.checked) {
|
|
1273
|
+
this.checked = true;
|
|
1274
|
+
this.xChange.emit({
|
|
1275
|
+
value: this.value,
|
|
1276
|
+
checked: true,
|
|
1277
|
+
nativeEvent: e,
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
/**
|
|
1282
|
+
* Handles focus events on the internal input element.
|
|
1283
|
+
* Emits the `xFocus` event to notify parent components.
|
|
1284
|
+
*/
|
|
1285
|
+
handleFocus = () => {
|
|
1286
|
+
this.xFocus.emit();
|
|
1287
|
+
};
|
|
1288
|
+
/**
|
|
1289
|
+
* Handles blur events on the internal input element.
|
|
1290
|
+
* Emits the `xBlur` event to notify parent components.
|
|
1291
|
+
*/
|
|
1292
|
+
handleBlur = () => {
|
|
1293
|
+
this.xBlur.emit();
|
|
1294
|
+
};
|
|
1295
|
+
/**
|
|
1296
|
+
* Handles keyboard events for accessibility.
|
|
1297
|
+
*
|
|
1298
|
+
* Flow:
|
|
1299
|
+
* 1. Checks if the component is disabled.
|
|
1300
|
+
* 2. Listens for 'Space' or 'Enter' keys.
|
|
1301
|
+
* 3. If triggered, prevents default browser behavior.
|
|
1302
|
+
* 4. If currently unchecked, updates state to checked and emits change event.
|
|
1303
|
+
*
|
|
1304
|
+
* @param e - The keyboard event.
|
|
1305
|
+
*/
|
|
1306
|
+
handleKeyDown = (e) => {
|
|
1307
|
+
if (this.disabled)
|
|
1308
|
+
return;
|
|
1309
|
+
if (e.key === ' ' || e.key === 'Enter') {
|
|
1310
|
+
e.preventDefault();
|
|
1311
|
+
if (!this.checked) {
|
|
1312
|
+
this.checked = true;
|
|
1313
|
+
this.xChange.emit({
|
|
1314
|
+
value: this.value,
|
|
1315
|
+
checked: true,
|
|
1316
|
+
nativeEvent: e,
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
// ==================== Render ====================
|
|
1322
|
+
/**
|
|
1323
|
+
* Renders the component.
|
|
1324
|
+
*
|
|
1325
|
+
* Structure:
|
|
1326
|
+
* - Host element serves as the wrapper with ARIA roles.
|
|
1327
|
+
* - Contains a visual radio indicator (input + inner span).
|
|
1328
|
+
* - Contains a label slot for content.
|
|
1329
|
+
*
|
|
1330
|
+
* @returns JSX.Element
|
|
1331
|
+
*/
|
|
1332
|
+
render() {
|
|
1333
|
+
// Build class maps based on checked and disabled state.
|
|
1334
|
+
const wrapperClasses = {
|
|
1335
|
+
'x-radio-wrapper': true,
|
|
1336
|
+
'x-radio-wrapper-checked': this.checked,
|
|
1337
|
+
'x-radio-wrapper-disabled': this.disabled,
|
|
1338
|
+
[`x-radio-placement-${this.placement}`]: !!this.placement,
|
|
1339
|
+
[`x-radio-alignment-${this.alignment}`]: !!this.alignment,
|
|
1340
|
+
[this.classNames?.root ?? '']: !!this.classNames?.root,
|
|
1341
|
+
};
|
|
1342
|
+
const radioClasses = {
|
|
1343
|
+
'x-radio': true,
|
|
1344
|
+
'x-radio-checked': this.checked,
|
|
1345
|
+
'x-radio-disabled': this.disabled,
|
|
1346
|
+
[this.classNames?.radio ?? '']: !!this.classNames?.radio,
|
|
1347
|
+
};
|
|
1348
|
+
const innerClasses = {
|
|
1349
|
+
'x-radio-inner': true,
|
|
1350
|
+
[this.classNames?.inner ?? '']: !!this.classNames?.inner,
|
|
1351
|
+
};
|
|
1352
|
+
const labelClasses = {
|
|
1353
|
+
'x-radio-label': true,
|
|
1354
|
+
[this.classNames?.label ?? '']: !!this.classNames?.label,
|
|
1355
|
+
};
|
|
1356
|
+
const wrapperStyles = this.styles?.root;
|
|
1357
|
+
const radioStyles = this.styles?.radio;
|
|
1358
|
+
const innerStyles = this.styles?.inner;
|
|
1359
|
+
const labelStyles = this.styles?.label;
|
|
1360
|
+
return (h(Host, { key: '73c3b076a9ec6eddd0978ff6aa8cca6e8f776526', class: wrapperClasses, style: wrapperStyles, onClick: this.handleClick, onKeyDown: this.handleKeyDown, role: "radio", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0 }, h("span", { key: '99b9cf1d6c8a56ad7c868d6b4a6d0dbda220c9f4', class: radioClasses, style: radioStyles }, h("input", { key: '68e873e4984a6f972dfa9531de6d387db4400bf7', ref: (el) => (this.inputEl = el), type: "radio", class: "x-radio-input", id: this.radioId, checked: this.checked, disabled: this.disabled, name: this.name, value: this.value, tabIndex: -1, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: (e) => e.stopPropagation() }), h("span", { key: 'b74110568edc7a6c43a42efed8bf0788e6f932c9', class: innerClasses, style: innerStyles })), h("span", { key: '1d6a28efc70aadf65bccceb22c8ccbc294c9987b', class: labelClasses, style: labelStyles }, h("slot", { key: 'eb70a0875223ff3b54ae4d3cc0d0d6b3ee6629e5' }))));
|
|
1361
|
+
}
|
|
1362
|
+
static get watchers() { return {
|
|
1363
|
+
"checked": [{
|
|
1364
|
+
"handleCheckedChange": 0
|
|
1365
|
+
}]
|
|
1366
|
+
}; }
|
|
1367
|
+
};
|
|
1368
|
+
XRadio.style = xRadioCss();
|
|
1369
|
+
|
|
1370
|
+
export { XCheckbox as x_checkbox, XPagination as x_pagination, XPopover as x_popover, XPopoverContent as x_popover_content, XRadio as x_radio };
|