@duskmoon-dev/components 0.6.4 → 2.0.0-rc.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/dist/{chunk-rd10x4gc.js → chunk-kpm1rq54.js} +9 -9
- package/dist/{chunk-fwjzvsrx.js → chunk-q5qdwm90.js} +4 -4
- package/dist/{chunk-kg46s2vk.js → chunk-yxp9gq2h.js} +11 -4
- package/dist/classes/alert.d.ts +1 -1
- package/dist/classes/auto-complete.d.ts +1 -1
- package/dist/classes/avatar.d.ts +1 -1
- package/dist/classes/badge.d.ts +1 -1
- package/dist/classes/button.d.ts +1 -1
- package/dist/classes/calendar.d.ts +1 -1
- package/dist/classes/card.d.ts +1 -1
- package/dist/classes/carousel.d.ts +1 -1
- package/dist/classes/cascader.d.ts +1 -1
- package/dist/classes/chat.d.ts +1 -1
- package/dist/classes/checkbox.d.ts +1 -1
- package/dist/classes/collapse.d.ts +1 -1
- package/dist/classes/color-picker.d.ts +1 -1
- package/dist/classes/date-picker.d.ts +1 -1
- package/dist/classes/descriptions.d.ts +1 -1
- package/dist/classes/divider.d.ts +1 -1
- package/dist/classes/dm-query.d.ts +1 -1
- package/dist/classes/dm-splitter.d.ts +1 -1
- package/dist/classes/dm-status.d.ts +1 -1
- package/dist/classes/dm-tabs.d.ts +1 -1
- package/dist/classes/drawer.d.ts +1 -1
- package/dist/classes/dropdown.d.ts +1 -1
- package/dist/classes/float-button.d.ts +1 -1
- package/dist/classes/index.d.ts +99 -99
- package/dist/classes/index.js +182 -182
- package/dist/classes/input-number.d.ts +1 -1
- package/dist/classes/input.d.ts +1 -1
- package/dist/classes/list.d.ts +1 -1
- package/dist/classes/mentions.d.ts +1 -1
- package/dist/classes/menu.d.ts +1 -1
- package/dist/classes/message.d.ts +1 -1
- package/dist/classes/notification.d.ts +1 -1
- package/dist/classes/otp-input.d.ts +1 -1
- package/dist/classes/pagination.d.ts +1 -1
- package/dist/classes/popconfirm.d.ts +1 -1
- package/dist/classes/popover.d.ts +1 -1
- package/dist/classes/progress.d.ts +1 -1
- package/dist/classes/qr-code.d.ts +1 -1
- package/dist/classes/radio.d.ts +1 -1
- package/dist/classes/rate.d.ts +1 -1
- package/dist/classes/result.d.ts +1 -1
- package/dist/classes/row.d.ts +1 -1
- package/dist/classes/segmented.d.ts +1 -1
- package/dist/classes/select.d.ts +1 -1
- package/dist/classes/skeleton.d.ts +1 -1
- package/dist/classes/slider.d.ts +1 -1
- package/dist/classes/space.d.ts +1 -1
- package/dist/classes/spin.d.ts +1 -1
- package/dist/classes/splitter.d.ts +1 -1
- package/dist/classes/steps.d.ts +1 -1
- package/dist/classes/switch.d.ts +1 -1
- package/dist/classes/tabs.d.ts +1 -1
- package/dist/classes/tag.d.ts +1 -1
- package/dist/classes/time-picker.d.ts +1 -1
- package/dist/classes/timeline.d.ts +1 -1
- package/dist/classes/tooltip.d.ts +1 -1
- package/dist/classes/tour.d.ts +1 -1
- package/dist/classes/typography.d.ts +1 -1
- package/dist/classes/upload.d.ts +1 -1
- package/dist/components/affix/Affix.d.ts +1 -1
- package/dist/components/affix/index.d.ts +2 -2
- package/dist/components/affix/index.js +1 -1
- package/dist/components/alert/Alert.d.ts +1 -1
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anchor/Anchor.d.ts +1 -1
- package/dist/components/anchor/index.d.ts +2 -2
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/app/App.d.ts +2 -2
- package/dist/components/app/App.types.d.ts +3 -3
- package/dist/components/app/index.d.ts +2 -2
- package/dist/components/app/index.js +82 -82
- package/dist/components/auto-complete/AutoComplete.d.ts +1 -1
- package/dist/components/auto-complete/index.d.ts +2 -2
- package/dist/components/auto-complete/index.js +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/back-top/BackTop.d.ts +1 -1
- package/dist/components/back-top/index.d.ts +2 -2
- package/dist/components/back-top/index.js +1 -1
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/calendar/Calendar.d.ts +1 -1
- package/dist/components/calendar/index.d.ts +2 -2
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/index.d.ts +2 -2
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/cascader/Cascader.d.ts +1 -1
- package/dist/components/cascader/index.d.ts +2 -2
- package/dist/components/cascader/index.js +3 -3
- package/dist/components/chat/Chat.d.ts +1 -1
- package/dist/components/chat/Chat.types.d.ts +5 -5
- package/dist/components/chat/ChatAuthoritativeQueue.d.ts +1 -1
- package/dist/components/chat/ChatComposer.d.ts +1 -1
- package/dist/components/chat/ChatPrimitives.d.ts +1 -1
- package/dist/components/chat/ChatSessionComposer.d.ts +2 -2
- package/dist/components/chat/ChatSessionComposer.types.d.ts +6 -6
- package/dist/components/chat/ComposerAttachment.types.d.ts +1 -1
- package/dist/components/chat/ComposerDraft.types.d.ts +1 -1
- package/dist/components/chat/ComposerProvider.types.d.ts +1 -1
- package/dist/components/chat/ComposerQueue.types.d.ts +1 -1
- package/dist/components/chat/ComposerSession.types.d.ts +1 -1
- package/dist/components/chat/ComposerSettings.d.ts +1 -1
- package/dist/components/chat/ComposerSettingsMenus.d.ts +1 -1
- package/dist/components/chat/composer/CompletionList.d.ts +1 -1
- package/dist/components/chat/composer/ComposerShell.d.ts +2 -2
- package/dist/components/chat/composer/DraftLifecycle.d.ts +3 -3
- package/dist/components/chat/composer/EditorAdapter.types.d.ts +2 -2
- package/dist/components/chat/composer/PlainEditor.d.ts +1 -1
- package/dist/components/chat/composer/PlainSemanticEditor.d.ts +2 -2
- package/dist/components/chat/composer/SemanticComposer.d.ts +2 -2
- package/dist/components/chat/composer/attachments.d.ts +1 -1
- package/dist/components/chat/composer/compatibility.types.d.ts +2 -2
- package/dist/components/chat/composer/document.d.ts +1 -1
- package/dist/components/chat/composer/drafts.d.ts +1 -1
- package/dist/components/chat/composer/legacy.d.ts +1 -1
- package/dist/components/chat/composer/providers.d.ts +2 -2
- package/dist/components/chat/composer/session.d.ts +2 -2
- package/dist/components/chat/composer/useComposerAttachments.d.ts +1 -1
- package/dist/components/chat/composer/useComposerDraft.d.ts +1 -1
- package/dist/components/chat/composer/useComposerProviders.d.ts +2 -2
- package/dist/components/chat/composer/useComposerSession.d.ts +1 -1
- package/dist/components/chat/index.d.ts +26 -26
- package/dist/components/chat/index.js +246 -248
- package/dist/components/chat/rich/LexicalEditor.d.ts +1 -1
- package/dist/components/chat/rich/RichChatComposer.d.ts +1 -1
- package/dist/components/chat/rich/index.d.ts +2 -2
- package/dist/components/chat/rich/index.js +17 -47
- package/dist/components/chat/rich/nodes.d.ts +2 -2
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/col/Col.d.ts +1 -1
- package/dist/components/col/index.d.ts +2 -2
- package/dist/components/col/index.js +1 -1
- package/dist/components/collapse/Collapse.d.ts +1 -1
- package/dist/components/collapse/index.d.ts +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +9 -9
- package/dist/components/config-provider/ConfigProvider.d.ts +1 -1
- package/dist/components/config-provider/index.d.ts +2 -2
- package/dist/components/config-provider/index.js +1 -1
- package/dist/components/console-page/ConsolePage.d.ts +1 -1
- package/dist/components/console-page/ConsolePage.types.d.ts +1 -1
- package/dist/components/console-page/index.d.ts +2 -2
- package/dist/components/console-page/index.js +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.js +4 -4
- package/dist/components/descriptions/Descriptions.d.ts +1 -1
- package/dist/components/descriptions/index.d.ts +2 -2
- package/dist/components/descriptions/index.js +1 -1
- package/dist/components/divider/Divider.d.ts +1 -1
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dm-auxiliary/DmAuxiliary.d.ts +1 -1
- package/dist/components/dm-auxiliary/index.d.ts +2 -2
- package/dist/components/dm-auxiliary/index.js +1 -1
- package/dist/components/dm-breadcrumb/DmBreadcrumb.d.ts +1 -1
- package/dist/components/dm-breadcrumb/DmBreadcrumb.types.d.ts +1 -1
- package/dist/components/dm-breadcrumb/index.d.ts +2 -2
- package/dist/components/dm-breadcrumb/index.js +19 -19
- package/dist/components/dm-date-picker/DmDatePicker.d.ts +2 -2
- package/dist/components/dm-date-picker/DmDatePicker.types.d.ts +1 -1
- package/dist/components/dm-date-picker/index.d.ts +2 -2
- package/dist/components/dm-date-picker/index.js +101 -101
- package/dist/components/dm-drawer/DmDrawer.d.ts +1 -1
- package/dist/components/dm-drawer/DmDrawer.types.d.ts +2 -2
- package/dist/components/dm-drawer/index.d.ts +2 -2
- package/dist/components/dm-drawer/index.js +20 -20
- package/dist/components/dm-infinite-scroll/DmInfiniteScroll.d.ts +1 -1
- package/dist/components/dm-infinite-scroll/index.d.ts +2 -2
- package/dist/components/dm-infinite-scroll/index.js +1 -1
- package/dist/components/dm-layout/DmLayout.d.ts +1 -1
- package/dist/components/dm-layout/DmLayout.types.d.ts +3 -3
- package/dist/components/dm-layout/index.d.ts +2 -2
- package/dist/components/dm-layout/index.js +646 -646
- package/dist/components/dm-menu/DmMenu.d.ts +2 -2
- package/dist/components/dm-menu/DmMenu.types.d.ts +1 -1
- package/dist/components/dm-menu/index.d.ts +2 -2
- package/dist/components/dm-menu/index.js +439 -439
- package/dist/components/dm-message/DmMessage.d.ts +7 -7
- package/dist/components/dm-message/DmMessage.types.d.ts +1 -1
- package/dist/components/dm-message/index.d.ts +2 -2
- package/dist/components/dm-message/index.js +17 -17
- package/dist/components/dm-page-header/DmPageHeader.d.ts +1 -1
- package/dist/components/dm-page-header/DmPageHeader.types.d.ts +2 -2
- package/dist/components/dm-page-header/index.d.ts +2 -2
- package/dist/components/dm-page-header/index.js +482 -482
- package/dist/components/dm-pagination/DmPagination.d.ts +1 -1
- package/dist/components/dm-pagination/DmPagination.types.d.ts +2 -2
- package/dist/components/dm-pagination/index.d.ts +2 -2
- package/dist/components/dm-pagination/index.js +40 -40
- package/dist/components/dm-pro-table/DmProTable.d.ts +2 -2
- package/dist/components/dm-pro-table/DmProTable.types.d.ts +3 -3
- package/dist/components/dm-pro-table/index.d.ts +2 -2
- package/dist/components/dm-pro-table/index.js +3259 -3259
- package/dist/components/dm-provider/DmProvider.d.ts +1 -1
- package/dist/components/dm-provider/DmProvider.types.d.ts +1 -1
- package/dist/components/dm-provider/index.d.ts +2 -2
- package/dist/components/dm-provider/index.js +95 -95
- package/dist/components/dm-query/DmQuery.d.ts +1 -1
- package/dist/components/dm-query/DmQuery.types.d.ts +1 -1
- package/dist/components/dm-query/index.d.ts +2 -2
- package/dist/components/dm-query/index.js +38 -40
- package/dist/components/dm-search/DmSearch.d.ts +1 -1
- package/dist/components/dm-search/DmSearch.types.d.ts +3 -3
- package/dist/components/dm-search/index.d.ts +2 -2
- package/dist/components/dm-search/index.js +32 -32
- package/dist/components/dm-splitter/DmSplitter.d.ts +1 -1
- package/dist/components/dm-splitter/DmSplitter.types.d.ts +1 -1
- package/dist/components/dm-splitter/index.d.ts +2 -2
- package/dist/components/dm-splitter/index.js +33 -33
- package/dist/components/dm-status/DmStatus.d.ts +1 -1
- package/dist/components/dm-status/DmStatus.types.d.ts +1 -1
- package/dist/components/dm-status/index.d.ts +2 -2
- package/dist/components/dm-status/index.js +26 -26
- package/dist/components/dm-table/DmTable.d.ts +2 -2
- package/dist/components/dm-table/DmTable.types.d.ts +3 -3
- package/dist/components/dm-table/index.d.ts +2 -2
- package/dist/components/dm-table/index.js +1196 -1196
- package/dist/components/dm-tabs/DmTabs.d.ts +1 -1
- package/dist/components/dm-tabs/DmTabs.types.d.ts +1 -1
- package/dist/components/dm-tabs/index.d.ts +2 -2
- package/dist/components/dm-tabs/index.js +35 -35
- package/dist/components/dm-toolbar/DmToolbar.d.ts +1 -1
- package/dist/components/dm-toolbar/DmToolbar.types.d.ts +2 -2
- package/dist/components/dm-toolbar/index.d.ts +2 -2
- package/dist/components/dm-toolbar/index.js +36 -36
- package/dist/components/dm-tree/DmTree.d.ts +1 -1
- package/dist/components/dm-tree/DmTree.types.d.ts +2 -2
- package/dist/components/dm-tree/index.d.ts +2 -2
- package/dist/components/dm-tree/index.js +93 -93
- package/dist/components/dm-truncate/DmTruncate.d.ts +1 -1
- package/dist/components/dm-truncate/DmTruncate.types.d.ts +1 -1
- package/dist/components/dm-truncate/index.d.ts +2 -2
- package/dist/components/dm-truncate/index.js +34 -34
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.types.d.ts +1 -1
- package/dist/components/dropdown/index.d.ts +2 -2
- package/dist/components/dropdown/index.js +94 -94
- package/dist/components/empty/Empty.d.ts +1 -1
- package/dist/components/empty/index.d.ts +2 -2
- package/dist/components/empty/index.js +1 -1
- package/dist/components/fab/Fab.d.ts +1 -1
- package/dist/components/fab/Fab.types.d.ts +1 -1
- package/dist/components/fab/index.d.ts +2 -2
- package/dist/components/fab/index.js +22 -22
- package/dist/components/flex/Flex.d.ts +1 -1
- package/dist/components/flex/index.d.ts +2 -2
- package/dist/components/flex/index.js +1 -1
- package/dist/components/float-button/FloatButton.d.ts +1 -1
- package/dist/components/float-button/index.d.ts +2 -2
- package/dist/components/float-button/index.js +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +1 -1
- package/dist/components/grid/Grid.d.ts +1 -1
- package/dist/components/grid/Grid.types.d.ts +1 -1
- package/dist/components/grid/index.d.ts +2 -2
- package/dist/components/image/Image.d.ts +1 -1
- package/dist/components/image/index.d.ts +2 -2
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/input-number/InputNumber.d.ts +1 -1
- package/dist/components/input-number/index.d.ts +2 -2
- package/dist/components/input-number/index.js +1 -1
- package/dist/components/json-schema-form/JsonSchemaForm.d.ts +1 -1
- package/dist/components/json-schema-form/JsonSchemaWidget.d.ts +1 -1
- package/dist/components/json-schema-form/index.d.ts +8 -8
- package/dist/components/json-schema-form/index.js +3791 -3791
- package/dist/components/json-schema-form/json-form-widgets.d.ts +1 -1
- package/dist/components/json-schema-form/json-schema-form.d.ts +1 -1
- package/dist/components/layout/Layout.d.ts +1 -1
- package/dist/components/layout/index.d.ts +2 -2
- package/dist/components/layout/index.js +1 -1
- package/dist/components/list/List.d.ts +1 -1
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/index.js +1 -1
- package/dist/components/markdown/Markdown.d.ts +1 -1
- package/dist/components/markdown/index.d.ts +2 -2
- package/dist/components/markdown/index.js +2 -2
- package/dist/components/megamenu/Megamenu.d.ts +1 -1
- package/dist/components/megamenu/index.d.ts +2 -2
- package/dist/components/megamenu/index.js +1 -1
- package/dist/components/mentions/Mentions.d.ts +1 -1
- package/dist/components/mentions/index.d.ts +2 -2
- package/dist/components/mentions/index.js +1 -1
- package/dist/components/menu/Menu.d.ts +1 -1
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message/Message.d.ts +1 -1
- package/dist/components/message/index.d.ts +2 -2
- package/dist/components/message/index.js +4 -4
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/modal/index.js +1 -1
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +2 -2
- package/dist/components/notification/index.js +1 -1
- package/dist/components/otp-input/OtpInput.d.ts +1 -1
- package/dist/components/otp-input/index.d.ts +2 -2
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/Pagination.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/popconfirm/Popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/Popconfirm.types.d.ts +1 -1
- package/dist/components/popconfirm/index.d.ts +2 -2
- package/dist/components/popconfirm/index.js +48 -48
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress/Progress.d.ts +1 -1
- package/dist/components/progress/index.d.ts +2 -2
- package/dist/components/progress/index.js +1 -1
- package/dist/components/qr-code/QRCode.d.ts +1 -1
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio/Radio.d.ts +1 -1
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/rate/Rate.d.ts +1 -1
- package/dist/components/rate/index.d.ts +2 -2
- package/dist/components/rate/index.js +1 -1
- package/dist/components/result/Result.d.ts +1 -1
- package/dist/components/result/index.d.ts +2 -2
- package/dist/components/result/index.js +1 -1
- package/dist/components/row/Row.d.ts +1 -1
- package/dist/components/row/index.d.ts +2 -2
- package/dist/components/row/index.js +1 -1
- package/dist/components/segmented/Segmented.d.ts +1 -1
- package/dist/components/segmented/index.d.ts +2 -2
- package/dist/components/segmented/index.js +1 -1
- package/dist/components/select/Select.d.ts +1 -1
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +2 -2
- package/dist/components/space/index.js +1 -1
- package/dist/components/spin/Spin.d.ts +1 -1
- package/dist/components/spin/index.d.ts +2 -2
- package/dist/components/spin/index.js +3 -3
- package/dist/components/splitter/Splitter.d.ts +1 -1
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/statistic/Statistic.d.ts +1 -1
- package/dist/components/statistic/index.d.ts +2 -2
- package/dist/components/statistic/index.js +1 -1
- package/dist/components/steps/Steps.d.ts +1 -1
- package/dist/components/steps/index.d.ts +2 -2
- package/dist/components/steps/index.js +1 -1
- package/dist/components/swap/Swap.d.ts +1 -1
- package/dist/components/swap/index.d.ts +2 -2
- package/dist/components/swap/index.js +1 -1
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/Tag.d.ts +1 -1
- package/dist/components/tag/index.d.ts +2 -2
- package/dist/components/tag/index.js +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +1 -1
- package/dist/components/time-picker/index.d.ts +2 -2
- package/dist/components/time-picker/index.js +3 -3
- package/dist/components/timeline/Timeline.d.ts +1 -1
- package/dist/components/timeline/index.d.ts +2 -2
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/Tour.d.ts +1 -1
- package/dist/components/tour/Tour.types.d.ts +1 -1
- package/dist/components/tour/index.d.ts +2 -2
- package/dist/components/tour/index.js +66 -66
- package/dist/components/transfer/Transfer.d.ts +1 -1
- package/dist/components/transfer/index.d.ts +2 -2
- package/dist/components/transfer/index.js +1 -1
- package/dist/components/tree/Tree.d.ts +1 -1
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree-select/TreeSelect.d.ts +1 -1
- package/dist/components/tree-select/index.d.ts +2 -2
- package/dist/components/tree-select/index.js +1 -1
- package/dist/components/typography/Typography.d.ts +1 -1
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/index.js +1 -1
- package/dist/components/upload/Upload.d.ts +1 -1
- package/dist/components/upload/index.d.ts +2 -2
- package/dist/components/upload/index.js +6 -6
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +2 -2
- package/dist/components/watermark/index.js +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/index.d.ts +105 -105
- package/dist/index.js +373 -373
- package/dist/infrastructure.d.ts +1 -1
- package/dist/infrastructure.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/index.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +5 -5
- package/package.json +218 -218
|
@@ -1,358 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/components/dm-page-header/DmPageHeader.tsx
|
|
4
|
-
import React5, { useMemo as useMemo2 } from "react";
|
|
5
|
-
|
|
6
|
-
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
7
|
-
function r(e) {
|
|
8
|
-
var t, f, n = "";
|
|
9
|
-
if (typeof e == "string" || typeof e == "number")
|
|
10
|
-
n += e;
|
|
11
|
-
else if (typeof e == "object")
|
|
12
|
-
if (Array.isArray(e)) {
|
|
13
|
-
var o = e.length;
|
|
14
|
-
for (t = 0;t < o; t++)
|
|
15
|
-
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
16
|
-
} else
|
|
17
|
-
for (f in e)
|
|
18
|
-
e[f] && (n && (n += " "), n += f);
|
|
19
|
-
return n;
|
|
20
|
-
}
|
|
21
|
-
function clsx() {
|
|
22
|
-
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
23
|
-
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
24
|
-
return n;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// src/utils/cn.ts
|
|
28
|
-
function cn(...inputs) {
|
|
29
|
-
return clsx(inputs);
|
|
30
|
-
}
|
|
31
|
-
// src/classes/dm-page-header.ts
|
|
32
|
-
var dmPageHeaderBaseClass = "dm-page-header";
|
|
33
|
-
var dmPageHeaderMainClass = "dm-page-header-main";
|
|
34
|
-
var dmPageHeaderBackClass = "dm-page-header-back";
|
|
35
|
-
var dmPageHeaderDividerClass = "dm-page-header-divider";
|
|
36
|
-
var dmPageHeaderContentClass = "dm-page-header-content";
|
|
37
|
-
var dmPageHeaderTitleClass = "dm-page-header-title";
|
|
38
|
-
var dmPageHeaderTitleListClass = "dm-page-header-title-list";
|
|
39
|
-
var dmPageHeaderTitleItemClass = "dm-page-header-title-item";
|
|
40
|
-
var dmPageHeaderExtraClass = "dm-page-header-extra";
|
|
41
|
-
var dmPageHeaderBodyClass = "dm-page-header-body";
|
|
42
|
-
var dmPageHeaderBreadcrumbClass = "dm-page-header-breadcrumb";
|
|
43
|
-
function getDmPageHeaderClasses({
|
|
44
|
-
hasExtra,
|
|
45
|
-
className
|
|
46
|
-
}) {
|
|
47
|
-
return cn(dmPageHeaderBaseClass, hasExtra && "dm-page-header-has-extra", className);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// src/components/breadcrumb/Breadcrumb.tsx
|
|
51
|
-
import React, { forwardRef } from "react";
|
|
52
|
-
|
|
53
|
-
// src/classes/breadcrumb.ts
|
|
54
|
-
var breadcrumbBaseClass = "breadcrumbs";
|
|
55
|
-
var breadcrumbItemClass = "breadcrumb-item";
|
|
56
|
-
var breadcrumbItemActiveClass = "breadcrumb-item-active";
|
|
57
|
-
var breadcrumbItemDisabledClass = "breadcrumb-item-disabled";
|
|
58
|
-
var breadcrumbLinkClass = "breadcrumb-link";
|
|
59
|
-
var breadcrumbSeparatorClass = "breadcrumb-separator";
|
|
60
|
-
var breadcrumbIconClass = "breadcrumb-icon";
|
|
61
|
-
var breadcrumbMenuClass = "breadcrumb-menu";
|
|
62
|
-
var breadcrumbMenuListClass = "breadcrumb-menu-list";
|
|
63
|
-
var breadcrumbMenuItemClass = "breadcrumb-menu-item";
|
|
64
|
-
function getBreadcrumbClasses({ className }) {
|
|
65
|
-
return cn(breadcrumbBaseClass, className);
|
|
66
|
-
}
|
|
67
|
-
function getBreadcrumbItemClasses({
|
|
68
|
-
active,
|
|
69
|
-
disabled,
|
|
70
|
-
className
|
|
71
|
-
}) {
|
|
72
|
-
return cn(breadcrumbItemClass, active && breadcrumbItemActiveClass, disabled && breadcrumbItemDisabledClass, className);
|
|
73
|
-
}
|
|
74
|
-
function getBreadcrumbLinkClasses({
|
|
75
|
-
disabled,
|
|
76
|
-
className
|
|
77
|
-
}) {
|
|
78
|
-
return cn(breadcrumbLinkClass, disabled && breadcrumbItemDisabledClass, className);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// src/components/breadcrumb/Breadcrumb.tsx
|
|
82
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
83
|
-
var defaultSeparator = "/";
|
|
84
|
-
function isSeparatorItem(item) {
|
|
85
|
-
return "type" in item && item.type === "separator";
|
|
86
|
-
}
|
|
87
|
-
function hasNode(node) {
|
|
88
|
-
return node !== undefined && node !== null && node !== false;
|
|
89
|
-
}
|
|
90
|
-
function getItemTitle(item) {
|
|
91
|
-
if ("breadcrumbName" in item && hasNode(item.breadcrumbName)) {
|
|
92
|
-
return item.breadcrumbName;
|
|
93
|
-
}
|
|
94
|
-
return item.title ?? item.label;
|
|
95
|
-
}
|
|
96
|
-
function replacePathParams(path, params) {
|
|
97
|
-
return path.replace(/:([^/]+)/g, (token, key) => {
|
|
98
|
-
const value = params?.[key];
|
|
99
|
-
return value === undefined ? token : encodeURIComponent(String(value));
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function normalizePathSegment(path) {
|
|
103
|
-
return path.replace(/^\/+|\/+$/g, "");
|
|
104
|
-
}
|
|
105
|
-
function buildPaths(routes, routeIndex, params) {
|
|
106
|
-
return routes.slice(0, routeIndex + 1).reduce((paths, route) => {
|
|
107
|
-
if (!route.path) {
|
|
108
|
-
return paths;
|
|
109
|
-
}
|
|
110
|
-
const path = normalizePathSegment(replacePathParams(route.path, params));
|
|
111
|
-
if (path) {
|
|
112
|
-
paths.push(path);
|
|
113
|
-
}
|
|
114
|
-
return paths;
|
|
115
|
-
}, []);
|
|
116
|
-
}
|
|
117
|
-
function getHref(item, paths) {
|
|
118
|
-
if (item.href) {
|
|
119
|
-
return item.href;
|
|
120
|
-
}
|
|
121
|
-
if (!item.path || paths.length === 0) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
return `/${paths.join("/")}`;
|
|
125
|
-
}
|
|
126
|
-
function activateOnKeyboard(event) {
|
|
127
|
-
if (event.key !== "Enter" && event.key !== " ") {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
event.preventDefault();
|
|
131
|
-
event.currentTarget.click();
|
|
132
|
-
}
|
|
133
|
-
function renderItemBody(item) {
|
|
134
|
-
const title = getItemTitle(item);
|
|
135
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
136
|
-
children: [
|
|
137
|
-
item.icon ? /* @__PURE__ */ jsx("span", {
|
|
138
|
-
className: breadcrumbIconClass,
|
|
139
|
-
"aria-hidden": "true",
|
|
140
|
-
children: item.icon
|
|
141
|
-
}) : null,
|
|
142
|
-
hasNode(title) ? title : null
|
|
143
|
-
]
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
function routeChildrenToMenu(children) {
|
|
147
|
-
if (!children?.length) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
items: children.map((child, index) => ({
|
|
152
|
-
key: child.key ?? child.path ?? index,
|
|
153
|
-
label: getItemTitle(child),
|
|
154
|
-
href: child.href,
|
|
155
|
-
path: child.path,
|
|
156
|
-
icon: child.icon,
|
|
157
|
-
disabled: child.disabled,
|
|
158
|
-
onClick: child.onClick,
|
|
159
|
-
children: child.children?.map((nested, nestedIndex) => ({
|
|
160
|
-
key: nested.key ?? nested.path ?? nestedIndex,
|
|
161
|
-
label: getItemTitle(nested),
|
|
162
|
-
href: nested.href,
|
|
163
|
-
path: nested.path,
|
|
164
|
-
icon: nested.icon,
|
|
165
|
-
disabled: nested.disabled,
|
|
166
|
-
onClick: nested.onClick
|
|
167
|
-
}))
|
|
168
|
-
}))
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function renderMenuItems(menu, items = []) {
|
|
172
|
-
return items.map((item, index) => {
|
|
173
|
-
const key = item.key ?? item.path ?? index;
|
|
174
|
-
const href = item.href ?? item.path;
|
|
175
|
-
const label = renderItemBody(item);
|
|
176
|
-
function handleClick(event) {
|
|
177
|
-
if (item.disabled) {
|
|
178
|
-
event.preventDefault();
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
item.onClick?.(event);
|
|
182
|
-
menu.onClick?.({ key, item, domEvent: event });
|
|
183
|
-
}
|
|
184
|
-
const content = item.disabled ? /* @__PURE__ */ jsx("span", {
|
|
185
|
-
role: "menuitem",
|
|
186
|
-
"aria-disabled": "true",
|
|
187
|
-
className: getBreadcrumbLinkClasses({
|
|
188
|
-
disabled: true,
|
|
189
|
-
className: breadcrumbMenuItemClass
|
|
190
|
-
}),
|
|
191
|
-
children: label
|
|
192
|
-
}) : href ? /* @__PURE__ */ jsx("a", {
|
|
193
|
-
role: "menuitem",
|
|
194
|
-
className: cn(breadcrumbMenuItemClass, getBreadcrumbLinkClasses({})),
|
|
195
|
-
href,
|
|
196
|
-
onClick: handleClick,
|
|
197
|
-
children: label
|
|
198
|
-
}) : /* @__PURE__ */ jsx("button", {
|
|
199
|
-
type: "button",
|
|
200
|
-
role: "menuitem",
|
|
201
|
-
className: cn(breadcrumbMenuItemClass, getBreadcrumbLinkClasses({})),
|
|
202
|
-
onClick: handleClick,
|
|
203
|
-
children: label
|
|
204
|
-
});
|
|
205
|
-
return /* @__PURE__ */ jsxs("li", {
|
|
206
|
-
children: [
|
|
207
|
-
content,
|
|
208
|
-
item.children?.length ? /* @__PURE__ */ jsx("ul", {
|
|
209
|
-
className: breadcrumbMenuListClass,
|
|
210
|
-
role: "menu",
|
|
211
|
-
children: renderMenuItems(menu, item.children)
|
|
212
|
-
}) : null
|
|
213
|
-
]
|
|
214
|
-
}, key);
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
function renderDefaultItemContent(item, paths, active) {
|
|
218
|
-
const body = renderItemBody(item);
|
|
219
|
-
if (item.disabled) {
|
|
220
|
-
return body;
|
|
221
|
-
}
|
|
222
|
-
const href = item.href ?? (!active ? getHref(item, paths) : undefined);
|
|
223
|
-
if (href) {
|
|
224
|
-
return /* @__PURE__ */ jsx("a", {
|
|
225
|
-
className: getBreadcrumbLinkClasses({}),
|
|
226
|
-
href,
|
|
227
|
-
onClick: item.onClick,
|
|
228
|
-
children: body
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
if (item.onClick) {
|
|
232
|
-
return /* @__PURE__ */ jsx("span", {
|
|
233
|
-
role: "button",
|
|
234
|
-
tabIndex: 0,
|
|
235
|
-
className: getBreadcrumbLinkClasses({}),
|
|
236
|
-
onClick: item.onClick,
|
|
237
|
-
onKeyDown: activateOnKeyboard,
|
|
238
|
-
children: body
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
return body;
|
|
242
|
-
}
|
|
243
|
-
function renderMenuItem(item, menu, children, disabled) {
|
|
244
|
-
return /* @__PURE__ */ jsxs("details", {
|
|
245
|
-
className: getBreadcrumbItemClasses({
|
|
246
|
-
disabled,
|
|
247
|
-
className: cn(breadcrumbMenuClass, item.className)
|
|
248
|
-
}),
|
|
249
|
-
"aria-disabled": disabled || undefined,
|
|
250
|
-
children: [
|
|
251
|
-
/* @__PURE__ */ jsx("summary", {
|
|
252
|
-
className: getBreadcrumbLinkClasses({ disabled }),
|
|
253
|
-
children
|
|
254
|
-
}),
|
|
255
|
-
/* @__PURE__ */ jsx("ul", {
|
|
256
|
-
className: breadcrumbMenuListClass,
|
|
257
|
-
role: "menu",
|
|
258
|
-
children: renderMenuItems(menu, menu.items)
|
|
259
|
-
})
|
|
260
|
-
]
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
var Breadcrumb = forwardRef(({
|
|
264
|
-
items,
|
|
265
|
-
routes,
|
|
266
|
-
params = {},
|
|
267
|
-
separator = defaultSeparator,
|
|
268
|
-
itemRender,
|
|
269
|
-
className,
|
|
270
|
-
children,
|
|
271
|
-
"aria-label": ariaLabel = "Breadcrumb",
|
|
272
|
-
...props
|
|
273
|
-
}, ref) => {
|
|
274
|
-
const entries = items ?? routes;
|
|
275
|
-
if (!entries?.length) {
|
|
276
|
-
return /* @__PURE__ */ jsx("nav", {
|
|
277
|
-
...props,
|
|
278
|
-
ref,
|
|
279
|
-
"aria-label": ariaLabel,
|
|
280
|
-
className: getBreadcrumbClasses({ className }),
|
|
281
|
-
children
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
const routeEntries = entries.filter((item) => !isSeparatorItem(item));
|
|
285
|
-
let routeIndex = -1;
|
|
286
|
-
let previousRenderedItemWasSeparator = true;
|
|
287
|
-
return /* @__PURE__ */ jsx("nav", {
|
|
288
|
-
...props,
|
|
289
|
-
ref,
|
|
290
|
-
"aria-label": ariaLabel,
|
|
291
|
-
className: getBreadcrumbClasses({ className }),
|
|
292
|
-
children: entries.map((entry, index) => {
|
|
293
|
-
if (isSeparatorItem(entry)) {
|
|
294
|
-
previousRenderedItemWasSeparator = true;
|
|
295
|
-
return /* @__PURE__ */ jsx("span", {
|
|
296
|
-
className: cn(breadcrumbSeparatorClass, entry.className),
|
|
297
|
-
"aria-hidden": "true",
|
|
298
|
-
children: entry.separator ?? separator
|
|
299
|
-
}, entry.key ?? `separator-${index}`);
|
|
300
|
-
}
|
|
301
|
-
routeIndex += 1;
|
|
302
|
-
const currentRouteIndex = routeIndex;
|
|
303
|
-
const paths = buildPaths(routeEntries, currentRouteIndex, params);
|
|
304
|
-
const active = currentRouteIndex === routeEntries.length - 1;
|
|
305
|
-
const menu = entry.menu ?? routeChildrenToMenu(entry.children);
|
|
306
|
-
const content = itemRender?.(entry, params, routeEntries, paths) ?? renderDefaultItemContent(entry, paths, active);
|
|
307
|
-
const applyActiveClass = active && !itemRender && !entry.href && !entry.onClick;
|
|
308
|
-
const insertSeparator = !previousRenderedItemWasSeparator;
|
|
309
|
-
previousRenderedItemWasSeparator = false;
|
|
310
|
-
return /* @__PURE__ */ jsxs(React.Fragment, {
|
|
311
|
-
children: [
|
|
312
|
-
insertSeparator ? /* @__PURE__ */ jsx("span", {
|
|
313
|
-
className: breadcrumbSeparatorClass,
|
|
314
|
-
"aria-hidden": "true",
|
|
315
|
-
children: separator
|
|
316
|
-
}) : null,
|
|
317
|
-
menu?.items?.length ? renderMenuItem(entry, menu, content, entry.disabled) : /* @__PURE__ */ jsx("span", {
|
|
318
|
-
className: getBreadcrumbItemClasses({
|
|
319
|
-
active: applyActiveClass,
|
|
320
|
-
disabled: entry.disabled,
|
|
321
|
-
className: entry.className
|
|
322
|
-
}),
|
|
323
|
-
"aria-current": active ? "page" : undefined,
|
|
324
|
-
"aria-disabled": entry.disabled || undefined,
|
|
325
|
-
children: content
|
|
326
|
-
})
|
|
327
|
-
]
|
|
328
|
-
}, entry.key ?? entry.href ?? entry.path ?? currentRouteIndex);
|
|
329
|
-
})
|
|
330
|
-
});
|
|
331
|
-
});
|
|
332
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
333
|
-
// src/components/dm-toolbar/DmToolbar.tsx
|
|
334
|
-
import { useMemo } from "react";
|
|
335
|
-
|
|
336
|
-
// src/classes/dm-toolbar.ts
|
|
337
|
-
var dmToolbarBaseClass = "dm-toolbar";
|
|
338
|
-
var dmToolbarItemClass = "dm-toolbar-item";
|
|
339
|
-
var dmToolbarPrimaryItemClass = "dm-toolbar-primary-item";
|
|
340
|
-
var dmToolbarSecondaryItemClass = "dm-toolbar-secondary-item";
|
|
341
|
-
var dmToolbarMoreClass = "dm-toolbar-more";
|
|
342
|
-
function getDmToolbarClasses({ className }) {
|
|
343
|
-
return cn(dmToolbarBaseClass, className);
|
|
344
|
-
}
|
|
345
|
-
function getDmToolbarItemClasses({
|
|
346
|
-
primary,
|
|
347
|
-
className
|
|
348
|
-
}) {
|
|
349
|
-
return cn(dmToolbarItemClass, primary ? dmToolbarPrimaryItemClass : dmToolbarSecondaryItemClass, className);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
3
|
// src/components/button/Button.tsx
|
|
353
|
-
import
|
|
4
|
+
import React from "react";
|
|
354
5
|
import { createPortal } from "react-dom";
|
|
355
6
|
|
|
7
|
+
// ../../../node_modules/clsx/dist/clsx.mjs
|
|
8
|
+
function r(e) {
|
|
9
|
+
var t, f, n = "";
|
|
10
|
+
if (typeof e == "string" || typeof e == "number")
|
|
11
|
+
n += e;
|
|
12
|
+
else if (typeof e == "object")
|
|
13
|
+
if (Array.isArray(e)) {
|
|
14
|
+
var o = e.length;
|
|
15
|
+
for (t = 0;t < o; t++)
|
|
16
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
17
|
+
} else
|
|
18
|
+
for (f in e)
|
|
19
|
+
e[f] && (n && (n += " "), n += f);
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
22
|
+
function clsx() {
|
|
23
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
24
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/utils/cn.ts
|
|
29
|
+
function cn(...inputs) {
|
|
30
|
+
return clsx(inputs);
|
|
31
|
+
}
|
|
356
32
|
// src/classes/button.ts
|
|
357
33
|
var buttonBaseClass = "btn";
|
|
358
34
|
var buttonColorClasses = {
|
|
@@ -400,7 +76,7 @@ function getButtonClasses({
|
|
|
400
76
|
}
|
|
401
77
|
|
|
402
78
|
// src/components/button/Button.tsx
|
|
403
|
-
import { jsx
|
|
79
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
404
80
|
function isPromiseLike(value) {
|
|
405
81
|
return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
406
82
|
}
|
|
@@ -421,18 +97,18 @@ function Button({
|
|
|
421
97
|
onClick,
|
|
422
98
|
...props
|
|
423
99
|
}) {
|
|
424
|
-
const buttonRef =
|
|
425
|
-
const popoverRef =
|
|
426
|
-
const cancelRef =
|
|
427
|
-
const approvalRef =
|
|
428
|
-
const pendingRef =
|
|
429
|
-
const actionRef =
|
|
430
|
-
const operationRef =
|
|
431
|
-
const mountedRef =
|
|
432
|
-
const [portalTarget, setPortalTarget] =
|
|
433
|
-
const [confirmLoading, setConfirmLoading] =
|
|
434
|
-
const [confirmError, setConfirmError] =
|
|
435
|
-
const generatedId =
|
|
100
|
+
const buttonRef = React.useRef(null);
|
|
101
|
+
const popoverRef = React.useRef(null);
|
|
102
|
+
const cancelRef = React.useRef(null);
|
|
103
|
+
const approvalRef = React.useRef("idle");
|
|
104
|
+
const pendingRef = React.useRef(false);
|
|
105
|
+
const actionRef = React.useRef(0);
|
|
106
|
+
const operationRef = React.useRef(0);
|
|
107
|
+
const mountedRef = React.useRef(false);
|
|
108
|
+
const [portalTarget, setPortalTarget] = React.useState(null);
|
|
109
|
+
const [confirmLoading, setConfirmLoading] = React.useState(false);
|
|
110
|
+
const [confirmError, setConfirmError] = React.useState(false);
|
|
111
|
+
const generatedId = React.useId().replace(/:/g, "");
|
|
436
112
|
const popoverId = `button-confirm-${generatedId}`;
|
|
437
113
|
const titleId = `${popoverId}-title`;
|
|
438
114
|
const descriptionId = `${popoverId}-description`;
|
|
@@ -443,7 +119,7 @@ function Button({
|
|
|
443
119
|
const hasTitle = title !== undefined && title !== null && title !== false && title !== "";
|
|
444
120
|
const content = confirmation?.component ?? confirmation?.message ?? confirmation?.description;
|
|
445
121
|
const hasContent = content !== undefined && content !== null && content !== false && content !== "";
|
|
446
|
-
const mergedRef =
|
|
122
|
+
const mergedRef = React.useCallback((node) => {
|
|
447
123
|
buttonRef.current = node;
|
|
448
124
|
if (!node) {
|
|
449
125
|
if (typeof ref === "function")
|
|
@@ -465,14 +141,14 @@ function Button({
|
|
|
465
141
|
ref.current = null;
|
|
466
142
|
};
|
|
467
143
|
}, [ref]);
|
|
468
|
-
|
|
144
|
+
React.useEffect(() => {
|
|
469
145
|
mountedRef.current = true;
|
|
470
146
|
return () => {
|
|
471
147
|
mountedRef.current = false;
|
|
472
148
|
operationRef.current += 1;
|
|
473
149
|
};
|
|
474
150
|
}, []);
|
|
475
|
-
|
|
151
|
+
React.useEffect(() => {
|
|
476
152
|
operationRef.current += 1;
|
|
477
153
|
approvalRef.current = "idle";
|
|
478
154
|
setConfirmError(false);
|
|
@@ -565,117 +241,400 @@ function Button({
|
|
|
565
241
|
approvalRef.current = "idle";
|
|
566
242
|
pendingRef.current = false;
|
|
567
243
|
}
|
|
568
|
-
}
|
|
569
|
-
const classes = getButtonClasses({
|
|
570
|
-
color,
|
|
571
|
-
appearance,
|
|
572
|
-
shape,
|
|
573
|
-
size,
|
|
574
|
-
block,
|
|
575
|
-
isLoading,
|
|
576
|
-
className
|
|
577
|
-
});
|
|
578
|
-
const confirmClasses = getButtonClasses({
|
|
579
|
-
color,
|
|
580
|
-
size: "sm",
|
|
581
|
-
isLoading: confirmLoading
|
|
244
|
+
}
|
|
245
|
+
const classes = getButtonClasses({
|
|
246
|
+
color,
|
|
247
|
+
appearance,
|
|
248
|
+
shape,
|
|
249
|
+
size,
|
|
250
|
+
block,
|
|
251
|
+
isLoading,
|
|
252
|
+
className
|
|
253
|
+
});
|
|
254
|
+
const confirmClasses = getButtonClasses({
|
|
255
|
+
color,
|
|
256
|
+
size: "sm",
|
|
257
|
+
isLoading: confirmLoading
|
|
258
|
+
});
|
|
259
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
260
|
+
children: [
|
|
261
|
+
/* @__PURE__ */ jsxs("button", {
|
|
262
|
+
ref: confirm ? mergedRef : ref,
|
|
263
|
+
className: classes,
|
|
264
|
+
disabled: disabled || isLoading,
|
|
265
|
+
"aria-busy": isLoading,
|
|
266
|
+
"aria-disabled": disabled || isLoading,
|
|
267
|
+
...props,
|
|
268
|
+
style: confirm ? { ...props.style, anchorName: anchor } : props.style,
|
|
269
|
+
"aria-haspopup": confirm ? "dialog" : props["aria-haspopup"],
|
|
270
|
+
"aria-controls": confirm ? popoverId : props["aria-controls"],
|
|
271
|
+
onClick: confirm ? handleClick : onClick,
|
|
272
|
+
children: [
|
|
273
|
+
isLoading && /* @__PURE__ */ jsx("span", {
|
|
274
|
+
className: "btn-spinner"
|
|
275
|
+
}),
|
|
276
|
+
!isLoading && leftIcon && /* @__PURE__ */ jsx("span", {
|
|
277
|
+
className: "btn-icon-left",
|
|
278
|
+
children: leftIcon
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ jsx("span", {
|
|
281
|
+
className: "btn-content",
|
|
282
|
+
children
|
|
283
|
+
}),
|
|
284
|
+
!isLoading && rightIcon && /* @__PURE__ */ jsx("span", {
|
|
285
|
+
className: "btn-icon-right",
|
|
286
|
+
children: rightIcon
|
|
287
|
+
})
|
|
288
|
+
]
|
|
289
|
+
}),
|
|
290
|
+
confirm && portalTarget && createPortal(/* @__PURE__ */ jsxs("form", {
|
|
291
|
+
id: popoverId,
|
|
292
|
+
ref: popoverRef,
|
|
293
|
+
popover: "auto",
|
|
294
|
+
role: "dialog",
|
|
295
|
+
"aria-labelledby": hasTitle ? titleId : undefined,
|
|
296
|
+
"aria-label": hasTitle ? undefined : "Confirm action",
|
|
297
|
+
"aria-describedby": hasContent ? descriptionId : undefined,
|
|
298
|
+
className: "popover popover-confirm popover-bottom",
|
|
299
|
+
style: { positionAnchor: anchor },
|
|
300
|
+
onSubmit: handleConfirm,
|
|
301
|
+
onClick: (event) => event.stopPropagation(),
|
|
302
|
+
onToggle: (event) => {
|
|
303
|
+
if (!event.currentTarget.matches(":popover-open")) {
|
|
304
|
+
operationRef.current += 1;
|
|
305
|
+
if (event.currentTarget.contains(document.activeElement) || document.activeElement === document.body) {
|
|
306
|
+
buttonRef.current?.focus();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
children: [
|
|
311
|
+
hasTitle && /* @__PURE__ */ jsx("div", {
|
|
312
|
+
className: "popover-header",
|
|
313
|
+
children: /* @__PURE__ */ jsx("h3", {
|
|
314
|
+
id: titleId,
|
|
315
|
+
className: "popover-title",
|
|
316
|
+
children: title
|
|
317
|
+
})
|
|
318
|
+
}),
|
|
319
|
+
hasContent && /* @__PURE__ */ jsx("div", {
|
|
320
|
+
id: descriptionId,
|
|
321
|
+
className: "popover-body",
|
|
322
|
+
children: content
|
|
323
|
+
}),
|
|
324
|
+
confirmError && /* @__PURE__ */ jsx("div", {
|
|
325
|
+
role: "alert",
|
|
326
|
+
className: "popover-body",
|
|
327
|
+
children: "The action failed. Please try again."
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ jsxs("div", {
|
|
330
|
+
className: "popover-footer",
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ jsx("button", {
|
|
333
|
+
ref: cancelRef,
|
|
334
|
+
type: "button",
|
|
335
|
+
className: "btn btn-text btn-sm",
|
|
336
|
+
popoverTarget: popoverId,
|
|
337
|
+
popoverTargetAction: "hide",
|
|
338
|
+
disabled: confirmLoading,
|
|
339
|
+
children: confirmation?.cancelText ?? "Cancel"
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ jsx("button", {
|
|
342
|
+
type: "submit",
|
|
343
|
+
className: confirmClasses,
|
|
344
|
+
disabled: disabled || isLoading || confirmLoading,
|
|
345
|
+
"aria-busy": confirmLoading,
|
|
346
|
+
children: confirmation?.confirmText ?? "Confirm"
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
})
|
|
350
|
+
]
|
|
351
|
+
}), portalTarget)
|
|
352
|
+
]
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
// src/components/breadcrumb/Breadcrumb.tsx
|
|
356
|
+
import React2, { forwardRef } from "react";
|
|
357
|
+
|
|
358
|
+
// src/classes/breadcrumb.ts
|
|
359
|
+
var breadcrumbBaseClass = "breadcrumbs";
|
|
360
|
+
var breadcrumbItemClass = "breadcrumb-item";
|
|
361
|
+
var breadcrumbItemActiveClass = "breadcrumb-item-active";
|
|
362
|
+
var breadcrumbItemDisabledClass = "breadcrumb-item-disabled";
|
|
363
|
+
var breadcrumbLinkClass = "breadcrumb-link";
|
|
364
|
+
var breadcrumbSeparatorClass = "breadcrumb-separator";
|
|
365
|
+
var breadcrumbIconClass = "breadcrumb-icon";
|
|
366
|
+
var breadcrumbMenuClass = "breadcrumb-menu";
|
|
367
|
+
var breadcrumbMenuListClass = "breadcrumb-menu-list";
|
|
368
|
+
var breadcrumbMenuItemClass = "breadcrumb-menu-item";
|
|
369
|
+
function getBreadcrumbClasses({ className }) {
|
|
370
|
+
return cn(breadcrumbBaseClass, className);
|
|
371
|
+
}
|
|
372
|
+
function getBreadcrumbItemClasses({
|
|
373
|
+
active,
|
|
374
|
+
disabled,
|
|
375
|
+
className
|
|
376
|
+
}) {
|
|
377
|
+
return cn(breadcrumbItemClass, active && breadcrumbItemActiveClass, disabled && breadcrumbItemDisabledClass, className);
|
|
378
|
+
}
|
|
379
|
+
function getBreadcrumbLinkClasses({
|
|
380
|
+
disabled,
|
|
381
|
+
className
|
|
382
|
+
}) {
|
|
383
|
+
return cn(breadcrumbLinkClass, disabled && breadcrumbItemDisabledClass, className);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// src/components/breadcrumb/Breadcrumb.tsx
|
|
387
|
+
import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
388
|
+
var defaultSeparator = "/";
|
|
389
|
+
function isSeparatorItem(item) {
|
|
390
|
+
return "type" in item && item.type === "separator";
|
|
391
|
+
}
|
|
392
|
+
function hasNode(node) {
|
|
393
|
+
return node !== undefined && node !== null && node !== false;
|
|
394
|
+
}
|
|
395
|
+
function getItemTitle(item) {
|
|
396
|
+
if ("breadcrumbName" in item && hasNode(item.breadcrumbName)) {
|
|
397
|
+
return item.breadcrumbName;
|
|
398
|
+
}
|
|
399
|
+
return item.title ?? item.label;
|
|
400
|
+
}
|
|
401
|
+
function replacePathParams(path, params) {
|
|
402
|
+
return path.replace(/:([^/]+)/g, (token, key) => {
|
|
403
|
+
const value = params?.[key];
|
|
404
|
+
return value === undefined ? token : encodeURIComponent(String(value));
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
function normalizePathSegment(path) {
|
|
408
|
+
return path.replace(/^\/+|\/+$/g, "");
|
|
409
|
+
}
|
|
410
|
+
function buildPaths(routes, routeIndex, params) {
|
|
411
|
+
return routes.slice(0, routeIndex + 1).reduce((paths, route) => {
|
|
412
|
+
if (!route.path) {
|
|
413
|
+
return paths;
|
|
414
|
+
}
|
|
415
|
+
const path = normalizePathSegment(replacePathParams(route.path, params));
|
|
416
|
+
if (path) {
|
|
417
|
+
paths.push(path);
|
|
418
|
+
}
|
|
419
|
+
return paths;
|
|
420
|
+
}, []);
|
|
421
|
+
}
|
|
422
|
+
function getHref(item, paths) {
|
|
423
|
+
if (item.href) {
|
|
424
|
+
return item.href;
|
|
425
|
+
}
|
|
426
|
+
if (!item.path || paths.length === 0) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
return `/${paths.join("/")}`;
|
|
430
|
+
}
|
|
431
|
+
function activateOnKeyboard(event) {
|
|
432
|
+
if (event.key !== "Enter" && event.key !== " ") {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
event.preventDefault();
|
|
436
|
+
event.currentTarget.click();
|
|
437
|
+
}
|
|
438
|
+
function renderItemBody(item) {
|
|
439
|
+
const title = getItemTitle(item);
|
|
440
|
+
return /* @__PURE__ */ jsxs2(Fragment2, {
|
|
441
|
+
children: [
|
|
442
|
+
item.icon ? /* @__PURE__ */ jsx2("span", {
|
|
443
|
+
className: breadcrumbIconClass,
|
|
444
|
+
"aria-hidden": "true",
|
|
445
|
+
children: item.icon
|
|
446
|
+
}) : null,
|
|
447
|
+
hasNode(title) ? title : null
|
|
448
|
+
]
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
function routeChildrenToMenu(children) {
|
|
452
|
+
if (!children?.length) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
return {
|
|
456
|
+
items: children.map((child, index) => ({
|
|
457
|
+
key: child.key ?? child.path ?? index,
|
|
458
|
+
label: getItemTitle(child),
|
|
459
|
+
href: child.href,
|
|
460
|
+
path: child.path,
|
|
461
|
+
icon: child.icon,
|
|
462
|
+
disabled: child.disabled,
|
|
463
|
+
onClick: child.onClick,
|
|
464
|
+
children: child.children?.map((nested, nestedIndex) => ({
|
|
465
|
+
key: nested.key ?? nested.path ?? nestedIndex,
|
|
466
|
+
label: getItemTitle(nested),
|
|
467
|
+
href: nested.href,
|
|
468
|
+
path: nested.path,
|
|
469
|
+
icon: nested.icon,
|
|
470
|
+
disabled: nested.disabled,
|
|
471
|
+
onClick: nested.onClick
|
|
472
|
+
}))
|
|
473
|
+
}))
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
function renderMenuItems(menu, items = []) {
|
|
477
|
+
return items.map((item, index) => {
|
|
478
|
+
const key = item.key ?? item.path ?? index;
|
|
479
|
+
const href = item.href ?? item.path;
|
|
480
|
+
const label = renderItemBody(item);
|
|
481
|
+
function handleClick(event) {
|
|
482
|
+
if (item.disabled) {
|
|
483
|
+
event.preventDefault();
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
item.onClick?.(event);
|
|
487
|
+
menu.onClick?.({ key, item, domEvent: event });
|
|
488
|
+
}
|
|
489
|
+
const content = item.disabled ? /* @__PURE__ */ jsx2("span", {
|
|
490
|
+
role: "menuitem",
|
|
491
|
+
"aria-disabled": "true",
|
|
492
|
+
className: getBreadcrumbLinkClasses({
|
|
493
|
+
disabled: true,
|
|
494
|
+
className: breadcrumbMenuItemClass
|
|
495
|
+
}),
|
|
496
|
+
children: label
|
|
497
|
+
}) : href ? /* @__PURE__ */ jsx2("a", {
|
|
498
|
+
role: "menuitem",
|
|
499
|
+
className: cn(breadcrumbMenuItemClass, getBreadcrumbLinkClasses({})),
|
|
500
|
+
href,
|
|
501
|
+
onClick: handleClick,
|
|
502
|
+
children: label
|
|
503
|
+
}) : /* @__PURE__ */ jsx2("button", {
|
|
504
|
+
type: "button",
|
|
505
|
+
role: "menuitem",
|
|
506
|
+
className: cn(breadcrumbMenuItemClass, getBreadcrumbLinkClasses({})),
|
|
507
|
+
onClick: handleClick,
|
|
508
|
+
children: label
|
|
509
|
+
});
|
|
510
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
511
|
+
children: [
|
|
512
|
+
content,
|
|
513
|
+
item.children?.length ? /* @__PURE__ */ jsx2("ul", {
|
|
514
|
+
className: breadcrumbMenuListClass,
|
|
515
|
+
role: "menu",
|
|
516
|
+
children: renderMenuItems(menu, item.children)
|
|
517
|
+
}) : null
|
|
518
|
+
]
|
|
519
|
+
}, key);
|
|
582
520
|
});
|
|
583
|
-
|
|
521
|
+
}
|
|
522
|
+
function renderDefaultItemContent(item, paths, active) {
|
|
523
|
+
const body = renderItemBody(item);
|
|
524
|
+
if (item.disabled) {
|
|
525
|
+
return body;
|
|
526
|
+
}
|
|
527
|
+
const href = item.href ?? (!active ? getHref(item, paths) : undefined);
|
|
528
|
+
if (href) {
|
|
529
|
+
return /* @__PURE__ */ jsx2("a", {
|
|
530
|
+
className: getBreadcrumbLinkClasses({}),
|
|
531
|
+
href,
|
|
532
|
+
onClick: item.onClick,
|
|
533
|
+
children: body
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
if (item.onClick) {
|
|
537
|
+
return /* @__PURE__ */ jsx2("span", {
|
|
538
|
+
role: "button",
|
|
539
|
+
tabIndex: 0,
|
|
540
|
+
className: getBreadcrumbLinkClasses({}),
|
|
541
|
+
onClick: item.onClick,
|
|
542
|
+
onKeyDown: activateOnKeyboard,
|
|
543
|
+
children: body
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
return body;
|
|
547
|
+
}
|
|
548
|
+
function renderMenuItem(item, menu, children, disabled) {
|
|
549
|
+
return /* @__PURE__ */ jsxs2("details", {
|
|
550
|
+
className: getBreadcrumbItemClasses({
|
|
551
|
+
disabled,
|
|
552
|
+
className: cn(breadcrumbMenuClass, item.className)
|
|
553
|
+
}),
|
|
554
|
+
"aria-disabled": disabled || undefined,
|
|
584
555
|
children: [
|
|
585
|
-
/* @__PURE__ */
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
disabled: disabled || isLoading,
|
|
589
|
-
"aria-busy": isLoading,
|
|
590
|
-
"aria-disabled": disabled || isLoading,
|
|
591
|
-
...props,
|
|
592
|
-
style: confirm ? { ...props.style, anchorName: anchor } : props.style,
|
|
593
|
-
"aria-haspopup": confirm ? "dialog" : props["aria-haspopup"],
|
|
594
|
-
"aria-controls": confirm ? popoverId : props["aria-controls"],
|
|
595
|
-
onClick: confirm ? handleClick : onClick,
|
|
596
|
-
children: [
|
|
597
|
-
isLoading && /* @__PURE__ */ jsx2("span", {
|
|
598
|
-
className: "btn-spinner"
|
|
599
|
-
}),
|
|
600
|
-
!isLoading && leftIcon && /* @__PURE__ */ jsx2("span", {
|
|
601
|
-
className: "btn-icon-left",
|
|
602
|
-
children: leftIcon
|
|
603
|
-
}),
|
|
604
|
-
/* @__PURE__ */ jsx2("span", {
|
|
605
|
-
className: "btn-content",
|
|
606
|
-
children
|
|
607
|
-
}),
|
|
608
|
-
!isLoading && rightIcon && /* @__PURE__ */ jsx2("span", {
|
|
609
|
-
className: "btn-icon-right",
|
|
610
|
-
children: rightIcon
|
|
611
|
-
})
|
|
612
|
-
]
|
|
556
|
+
/* @__PURE__ */ jsx2("summary", {
|
|
557
|
+
className: getBreadcrumbLinkClasses({ disabled }),
|
|
558
|
+
children
|
|
613
559
|
}),
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
560
|
+
/* @__PURE__ */ jsx2("ul", {
|
|
561
|
+
className: breadcrumbMenuListClass,
|
|
562
|
+
role: "menu",
|
|
563
|
+
children: renderMenuItems(menu, menu.items)
|
|
564
|
+
})
|
|
565
|
+
]
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
var Breadcrumb = forwardRef(({
|
|
569
|
+
items,
|
|
570
|
+
routes,
|
|
571
|
+
params = {},
|
|
572
|
+
separator = defaultSeparator,
|
|
573
|
+
itemRender,
|
|
574
|
+
className,
|
|
575
|
+
children,
|
|
576
|
+
"aria-label": ariaLabel = "Breadcrumb",
|
|
577
|
+
...props
|
|
578
|
+
}, ref) => {
|
|
579
|
+
const entries = items ?? routes;
|
|
580
|
+
if (!entries?.length) {
|
|
581
|
+
return /* @__PURE__ */ jsx2("nav", {
|
|
582
|
+
...props,
|
|
583
|
+
ref,
|
|
584
|
+
"aria-label": ariaLabel,
|
|
585
|
+
className: getBreadcrumbClasses({ className }),
|
|
586
|
+
children
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
const routeEntries = entries.filter((item) => !isSeparatorItem(item));
|
|
590
|
+
let routeIndex = -1;
|
|
591
|
+
let previousRenderedItemWasSeparator = true;
|
|
592
|
+
return /* @__PURE__ */ jsx2("nav", {
|
|
593
|
+
...props,
|
|
594
|
+
ref,
|
|
595
|
+
"aria-label": ariaLabel,
|
|
596
|
+
className: getBreadcrumbClasses({ className }),
|
|
597
|
+
children: entries.map((entry, index) => {
|
|
598
|
+
if (isSeparatorItem(entry)) {
|
|
599
|
+
previousRenderedItemWasSeparator = true;
|
|
600
|
+
return /* @__PURE__ */ jsx2("span", {
|
|
601
|
+
className: cn(breadcrumbSeparatorClass, entry.className),
|
|
602
|
+
"aria-hidden": "true",
|
|
603
|
+
children: entry.separator ?? separator
|
|
604
|
+
}, entry.key ?? `separator-${index}`);
|
|
605
|
+
}
|
|
606
|
+
routeIndex += 1;
|
|
607
|
+
const currentRouteIndex = routeIndex;
|
|
608
|
+
const paths = buildPaths(routeEntries, currentRouteIndex, params);
|
|
609
|
+
const active = currentRouteIndex === routeEntries.length - 1;
|
|
610
|
+
const menu = entry.menu ?? routeChildrenToMenu(entry.children);
|
|
611
|
+
const content = itemRender?.(entry, params, routeEntries, paths) ?? renderDefaultItemContent(entry, paths, active);
|
|
612
|
+
const applyActiveClass = active && !itemRender && !entry.href && !entry.onClick;
|
|
613
|
+
const insertSeparator = !previousRenderedItemWasSeparator;
|
|
614
|
+
previousRenderedItemWasSeparator = false;
|
|
615
|
+
return /* @__PURE__ */ jsxs2(React2.Fragment, {
|
|
634
616
|
children: [
|
|
635
|
-
|
|
636
|
-
className:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
617
|
+
insertSeparator ? /* @__PURE__ */ jsx2("span", {
|
|
618
|
+
className: breadcrumbSeparatorClass,
|
|
619
|
+
"aria-hidden": "true",
|
|
620
|
+
children: separator
|
|
621
|
+
}) : null,
|
|
622
|
+
menu?.items?.length ? renderMenuItem(entry, menu, content, entry.disabled) : /* @__PURE__ */ jsx2("span", {
|
|
623
|
+
className: getBreadcrumbItemClasses({
|
|
624
|
+
active: applyActiveClass,
|
|
625
|
+
disabled: entry.disabled,
|
|
626
|
+
className: entry.className
|
|
627
|
+
}),
|
|
628
|
+
"aria-current": active ? "page" : undefined,
|
|
629
|
+
"aria-disabled": entry.disabled || undefined,
|
|
646
630
|
children: content
|
|
647
|
-
}),
|
|
648
|
-
confirmError && /* @__PURE__ */ jsx2("div", {
|
|
649
|
-
role: "alert",
|
|
650
|
-
className: "popover-body",
|
|
651
|
-
children: "The action failed. Please try again."
|
|
652
|
-
}),
|
|
653
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
654
|
-
className: "popover-footer",
|
|
655
|
-
children: [
|
|
656
|
-
/* @__PURE__ */ jsx2("button", {
|
|
657
|
-
ref: cancelRef,
|
|
658
|
-
type: "button",
|
|
659
|
-
className: "btn btn-text btn-sm",
|
|
660
|
-
popoverTarget: popoverId,
|
|
661
|
-
popoverTargetAction: "hide",
|
|
662
|
-
disabled: confirmLoading,
|
|
663
|
-
children: confirmation?.cancelText ?? "Cancel"
|
|
664
|
-
}),
|
|
665
|
-
/* @__PURE__ */ jsx2("button", {
|
|
666
|
-
type: "submit",
|
|
667
|
-
className: confirmClasses,
|
|
668
|
-
disabled: disabled || isLoading || confirmLoading,
|
|
669
|
-
"aria-busy": confirmLoading,
|
|
670
|
-
children: confirmation?.confirmText ?? "Confirm"
|
|
671
|
-
})
|
|
672
|
-
]
|
|
673
631
|
})
|
|
674
632
|
]
|
|
675
|
-
}
|
|
676
|
-
|
|
633
|
+
}, entry.key ?? entry.href ?? entry.path ?? currentRouteIndex);
|
|
634
|
+
})
|
|
677
635
|
});
|
|
678
|
-
}
|
|
636
|
+
});
|
|
637
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
679
638
|
// src/components/dropdown/Dropdown.tsx
|
|
680
639
|
import {
|
|
681
640
|
cloneElement,
|
|
@@ -817,13 +776,13 @@ var DropdownRoot = forwardRef2(({
|
|
|
817
776
|
const anchorName = `--dm-dropdown-${popupId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
818
777
|
const clickTrigger = trigger.includes("click") || trigger.includes("hover");
|
|
819
778
|
useEffect(() => {
|
|
820
|
-
const
|
|
821
|
-
if (!
|
|
779
|
+
const popup2 = popupRef.current;
|
|
780
|
+
if (!popup2?.showPopover || !popup2?.hidePopover)
|
|
822
781
|
return;
|
|
823
|
-
if (visible && !
|
|
824
|
-
|
|
825
|
-
if (!visible &&
|
|
826
|
-
|
|
782
|
+
if (visible && !popup2.matches(":popover-open"))
|
|
783
|
+
popup2.showPopover();
|
|
784
|
+
if (!visible && popup2.matches(":popover-open"))
|
|
785
|
+
popup2.hidePopover();
|
|
827
786
|
}, [visible]);
|
|
828
787
|
function setVisible(nextOpen) {
|
|
829
788
|
if (open === undefined)
|
|
@@ -831,9 +790,9 @@ var DropdownRoot = forwardRef2(({
|
|
|
831
790
|
onOpenChange?.(nextOpen);
|
|
832
791
|
}
|
|
833
792
|
function close() {
|
|
834
|
-
const
|
|
835
|
-
if (
|
|
836
|
-
|
|
793
|
+
const popup2 = popupRef.current;
|
|
794
|
+
if (popup2?.matches(":popover-open"))
|
|
795
|
+
popup2.hidePopover();
|
|
837
796
|
else
|
|
838
797
|
setVisible(false);
|
|
839
798
|
}
|
|
@@ -1023,6 +982,25 @@ DropdownButton.displayName = "Dropdown.Button";
|
|
|
1023
982
|
var Dropdown = Object.assign(DropdownRoot, {
|
|
1024
983
|
Button: DropdownButton
|
|
1025
984
|
});
|
|
985
|
+
// src/components/dm-toolbar/DmToolbar.tsx
|
|
986
|
+
import { useMemo } from "react";
|
|
987
|
+
|
|
988
|
+
// src/classes/dm-toolbar.ts
|
|
989
|
+
var dmToolbarBaseClass = "dm-toolbar";
|
|
990
|
+
var dmToolbarItemClass = "dm-toolbar-item";
|
|
991
|
+
var dmToolbarPrimaryItemClass = "dm-toolbar-primary-item";
|
|
992
|
+
var dmToolbarSecondaryItemClass = "dm-toolbar-secondary-item";
|
|
993
|
+
var dmToolbarMoreClass = "dm-toolbar-more";
|
|
994
|
+
function getDmToolbarClasses({ className }) {
|
|
995
|
+
return cn(dmToolbarBaseClass, className);
|
|
996
|
+
}
|
|
997
|
+
function getDmToolbarItemClasses({
|
|
998
|
+
primary,
|
|
999
|
+
className
|
|
1000
|
+
}) {
|
|
1001
|
+
return cn(dmToolbarItemClass, primary ? dmToolbarPrimaryItemClass : dmToolbarSecondaryItemClass, className);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1026
1004
|
// src/components/dm-toolbar/DmToolbar.tsx
|
|
1027
1005
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1028
1006
|
function isPrimary(item) {
|
|
@@ -1076,12 +1054,12 @@ function DmToolbar({
|
|
|
1076
1054
|
maxVisibleSecondaryItems
|
|
1077
1055
|
}) {
|
|
1078
1056
|
const { visibleSecondaryItems, overflowSecondaryItems, primaryItems } = useMemo(() => {
|
|
1079
|
-
const
|
|
1057
|
+
const primaryItems2 = items.filter(isPrimary);
|
|
1080
1058
|
const secondaryItems = items.filter((item) => !isPrimary(item));
|
|
1081
1059
|
const visibleLimit = maxVisibleSecondaryItems === undefined ? secondaryItems.length : Math.max(0, maxVisibleSecondaryItems);
|
|
1082
|
-
const
|
|
1083
|
-
const
|
|
1084
|
-
return { visibleSecondaryItems, overflowSecondaryItems, primaryItems };
|
|
1060
|
+
const visibleSecondaryItems2 = visibleLimit === 0 ? [] : secondaryItems.slice(-visibleLimit);
|
|
1061
|
+
const overflowSecondaryItems2 = visibleLimit >= secondaryItems.length ? [] : secondaryItems.slice(0, secondaryItems.length - visibleLimit);
|
|
1062
|
+
return { visibleSecondaryItems: visibleSecondaryItems2, overflowSecondaryItems: overflowSecondaryItems2, primaryItems: primaryItems2 };
|
|
1085
1063
|
}, [items, maxVisibleSecondaryItems]);
|
|
1086
1064
|
const showMore = overflowSecondaryItems.length > 0;
|
|
1087
1065
|
return /* @__PURE__ */ jsxs4("div", {
|
|
@@ -1111,6 +1089,28 @@ function DmToolbar({
|
|
|
1111
1089
|
});
|
|
1112
1090
|
}
|
|
1113
1091
|
DmToolbar.displayName = "DmToolbar";
|
|
1092
|
+
// src/components/dm-page-header/DmPageHeader.tsx
|
|
1093
|
+
import React5, { useMemo as useMemo2 } from "react";
|
|
1094
|
+
|
|
1095
|
+
// src/classes/dm-page-header.ts
|
|
1096
|
+
var dmPageHeaderBaseClass = "dm-page-header";
|
|
1097
|
+
var dmPageHeaderMainClass = "dm-page-header-main";
|
|
1098
|
+
var dmPageHeaderBackClass = "dm-page-header-back";
|
|
1099
|
+
var dmPageHeaderDividerClass = "dm-page-header-divider";
|
|
1100
|
+
var dmPageHeaderContentClass = "dm-page-header-content";
|
|
1101
|
+
var dmPageHeaderTitleClass = "dm-page-header-title";
|
|
1102
|
+
var dmPageHeaderTitleListClass = "dm-page-header-title-list";
|
|
1103
|
+
var dmPageHeaderTitleItemClass = "dm-page-header-title-item";
|
|
1104
|
+
var dmPageHeaderExtraClass = "dm-page-header-extra";
|
|
1105
|
+
var dmPageHeaderBodyClass = "dm-page-header-body";
|
|
1106
|
+
var dmPageHeaderBreadcrumbClass = "dm-page-header-breadcrumb";
|
|
1107
|
+
function getDmPageHeaderClasses({
|
|
1108
|
+
hasExtra,
|
|
1109
|
+
className
|
|
1110
|
+
}) {
|
|
1111
|
+
return cn(dmPageHeaderBaseClass, hasExtra && "dm-page-header-has-extra", className);
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
1114
|
// src/components/dm-page-header/DmPageHeader.tsx
|
|
1115
1115
|
import { jsx as jsx5, jsxs as jsxs5, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
1116
1116
|
function isTitleList(title) {
|