@duskmoon-dev/components 0.6.3 → 2.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +70 -3
- package/dist/components/markdown/remarkCjkAutolink.d.ts +24 -0
- 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 +442 -375
- 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,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/components/
|
|
4
|
-
import
|
|
3
|
+
// src/components/button/Button.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { createPortal } from "react-dom";
|
|
5
6
|
|
|
6
|
-
//
|
|
7
|
+
// ../../../node_modules/clsx/dist/clsx.mjs
|
|
7
8
|
function r(e) {
|
|
8
9
|
var t, f, n = "";
|
|
9
10
|
if (typeof e == "string" || typeof e == "number")
|
|
@@ -28,180 +29,362 @@ function clsx() {
|
|
|
28
29
|
function cn(...inputs) {
|
|
29
30
|
return clsx(inputs);
|
|
30
31
|
}
|
|
31
|
-
// src/classes/
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
32
|
+
// src/classes/button.ts
|
|
33
|
+
var buttonBaseClass = "btn";
|
|
34
|
+
var buttonColorClasses = {
|
|
35
|
+
primary: "btn-primary",
|
|
36
|
+
secondary: "btn-secondary",
|
|
37
|
+
tertiary: "btn-tertiary",
|
|
38
|
+
accent: "btn-accent",
|
|
39
|
+
neutral: "btn-neutral",
|
|
40
|
+
base: "btn-base",
|
|
41
|
+
info: "btn-info",
|
|
42
|
+
success: "btn-success",
|
|
43
|
+
warning: "btn-warning",
|
|
44
|
+
error: "btn-error"
|
|
45
|
+
};
|
|
46
|
+
var buttonAppearanceClasses = {
|
|
47
|
+
filled: "",
|
|
48
|
+
outline: "btn-outline",
|
|
49
|
+
tonal: "btn-tonal",
|
|
50
|
+
ghost: "btn-ghost",
|
|
51
|
+
text: "btn-text"
|
|
52
|
+
};
|
|
53
|
+
var buttonShapeClasses = {
|
|
54
|
+
rect: "",
|
|
55
|
+
circle: "btn-circle btn-icon",
|
|
56
|
+
square: "btn-square"
|
|
57
|
+
};
|
|
58
|
+
var buttonSizeClasses = {
|
|
59
|
+
xs: "btn-xs",
|
|
60
|
+
sm: "btn-sm",
|
|
61
|
+
md: "btn-md",
|
|
62
|
+
lg: "btn-lg"
|
|
63
|
+
};
|
|
64
|
+
var buttonBlockClass = "btn-block";
|
|
65
|
+
var buttonIsLoadingClass = "btn-loading";
|
|
66
|
+
function getButtonClasses({
|
|
67
|
+
color = "primary",
|
|
68
|
+
appearance = "filled",
|
|
69
|
+
shape = "rect",
|
|
70
|
+
size = "md",
|
|
71
|
+
block,
|
|
72
|
+
isLoading,
|
|
64
73
|
className
|
|
65
74
|
}) {
|
|
66
|
-
return cn(
|
|
75
|
+
return cn(buttonBaseClass, buttonColorClasses[color], buttonAppearanceClasses[appearance], buttonShapeClasses[shape], buttonSizeClasses[size], shape === "circle" && size === "xs" && "btn-icon-sm", shape === "circle" && size === "sm" && "btn-icon-sm", shape === "circle" && size === "lg" && "btn-icon-lg", block && buttonBlockClass, isLoading && buttonIsLoadingClass, className);
|
|
67
76
|
}
|
|
68
77
|
|
|
69
|
-
// src/components/
|
|
70
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
71
|
-
function
|
|
72
|
-
return typeof value === "
|
|
78
|
+
// src/components/button/Button.tsx
|
|
79
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
80
|
+
function isPromiseLike(value) {
|
|
81
|
+
return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
73
82
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
className: cn(layoutContentClass, className)
|
|
84
|
-
}));
|
|
85
|
-
Content.displayName = "Layout.Content";
|
|
86
|
-
var Footer = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
87
|
-
...props,
|
|
88
|
-
ref,
|
|
89
|
-
className: cn(layoutFooterClass, className)
|
|
90
|
-
}));
|
|
91
|
-
Footer.displayName = "Layout.Footer";
|
|
92
|
-
var Sider = forwardRef(({
|
|
93
|
-
children,
|
|
94
|
-
collapsible,
|
|
95
|
-
collapsed,
|
|
96
|
-
defaultCollapsed,
|
|
97
|
-
onCollapse,
|
|
98
|
-
width = 200,
|
|
99
|
-
collapsedWidth = 80,
|
|
100
|
-
trigger,
|
|
101
|
-
breakpoint,
|
|
83
|
+
function Button({
|
|
84
|
+
color = "primary",
|
|
85
|
+
appearance = "filled",
|
|
86
|
+
shape = "rect",
|
|
87
|
+
size = "md",
|
|
88
|
+
block,
|
|
89
|
+
isLoading,
|
|
90
|
+
leftIcon,
|
|
91
|
+
rightIcon,
|
|
102
92
|
className,
|
|
103
|
-
|
|
93
|
+
children,
|
|
94
|
+
disabled,
|
|
95
|
+
ref,
|
|
96
|
+
confirm,
|
|
97
|
+
onClick,
|
|
104
98
|
...props
|
|
105
|
-
}
|
|
106
|
-
const
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
99
|
+
}) {
|
|
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, "");
|
|
112
|
+
const popoverId = `button-confirm-${generatedId}`;
|
|
113
|
+
const titleId = `${popoverId}-title`;
|
|
114
|
+
const descriptionId = `${popoverId}-description`;
|
|
115
|
+
const anchor = `--${popoverId}-anchor`;
|
|
116
|
+
const hasConfirm = Boolean(confirm);
|
|
117
|
+
const confirmation = confirm && typeof confirm === "object" ? confirm : undefined;
|
|
118
|
+
const title = confirmation ? confirmation.title : "Confirm action";
|
|
119
|
+
const hasTitle = title !== undefined && title !== null && title !== false && title !== "";
|
|
120
|
+
const content = confirmation?.component ?? confirmation?.message ?? confirmation?.description;
|
|
121
|
+
const hasContent = content !== undefined && content !== null && content !== false && content !== "";
|
|
122
|
+
const mergedRef = React.useCallback((node) => {
|
|
123
|
+
buttonRef.current = node;
|
|
124
|
+
if (!node) {
|
|
125
|
+
if (typeof ref === "function")
|
|
126
|
+
ref(null);
|
|
127
|
+
else if (ref)
|
|
128
|
+
ref.current = null;
|
|
129
|
+
return;
|
|
114
130
|
}
|
|
115
|
-
|
|
131
|
+
const cleanup = typeof ref === "function" ? ref(node) : undefined;
|
|
132
|
+
if (ref && typeof ref !== "function")
|
|
133
|
+
ref.current = node;
|
|
134
|
+
return () => {
|
|
135
|
+
buttonRef.current = null;
|
|
136
|
+
if (typeof cleanup === "function")
|
|
137
|
+
cleanup();
|
|
138
|
+
else if (typeof ref === "function")
|
|
139
|
+
ref(null);
|
|
140
|
+
else if (ref)
|
|
141
|
+
ref.current = null;
|
|
142
|
+
};
|
|
143
|
+
}, [ref]);
|
|
144
|
+
React.useEffect(() => {
|
|
145
|
+
mountedRef.current = true;
|
|
146
|
+
return () => {
|
|
147
|
+
mountedRef.current = false;
|
|
148
|
+
operationRef.current += 1;
|
|
149
|
+
};
|
|
150
|
+
}, []);
|
|
151
|
+
React.useEffect(() => {
|
|
152
|
+
operationRef.current += 1;
|
|
153
|
+
approvalRef.current = "idle";
|
|
154
|
+
setConfirmError(false);
|
|
155
|
+
setPortalTarget(hasConfirm ? document.body : null);
|
|
156
|
+
}, [hasConfirm]);
|
|
157
|
+
function closePopover() {
|
|
158
|
+
if (popoverRef.current?.matches(":popover-open")) {
|
|
159
|
+
popoverRef.current.hidePopover();
|
|
160
|
+
}
|
|
161
|
+
buttonRef.current?.focus();
|
|
116
162
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
163
|
+
function handleClick(event) {
|
|
164
|
+
if (!confirm) {
|
|
165
|
+
onClick?.(event);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (approvalRef.current === "native") {
|
|
169
|
+
approvalRef.current = "idle";
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (approvalRef.current === "action") {
|
|
173
|
+
approvalRef.current = "idle";
|
|
174
|
+
let result;
|
|
175
|
+
try {
|
|
176
|
+
result = onClick?.(event);
|
|
177
|
+
} catch {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
pendingRef.current = false;
|
|
180
|
+
setConfirmError(true);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (!isPromiseLike(result)) {
|
|
184
|
+
pendingRef.current = false;
|
|
185
|
+
closePopover();
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const userPreventedDefault = event.defaultPrevented;
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
setConfirmLoading(true);
|
|
191
|
+
const action = actionRef.current;
|
|
192
|
+
const operation = operationRef.current;
|
|
193
|
+
Promise.resolve(result).then(() => {
|
|
194
|
+
if (!mountedRef.current || action !== actionRef.current)
|
|
195
|
+
return;
|
|
196
|
+
pendingRef.current = false;
|
|
197
|
+
setConfirmLoading(false);
|
|
198
|
+
if (operation !== operationRef.current)
|
|
199
|
+
return;
|
|
200
|
+
closePopover();
|
|
201
|
+
if (!userPreventedDefault && !buttonRef.current?.disabled) {
|
|
202
|
+
approvalRef.current = "native";
|
|
203
|
+
buttonRef.current?.click();
|
|
204
|
+
approvalRef.current = "idle";
|
|
205
|
+
}
|
|
206
|
+
}, () => {
|
|
207
|
+
if (!mountedRef.current || action !== actionRef.current)
|
|
208
|
+
return;
|
|
209
|
+
pendingRef.current = false;
|
|
210
|
+
setConfirmLoading(false);
|
|
211
|
+
if (operation !== operationRef.current)
|
|
212
|
+
return;
|
|
213
|
+
setConfirmError(true);
|
|
214
|
+
cancelRef.current?.focus();
|
|
215
|
+
});
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
if (disabled || isLoading || pendingRef.current)
|
|
220
|
+
return;
|
|
221
|
+
if (popoverRef.current?.matches(":popover-open")) {
|
|
222
|
+
closePopover();
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
setConfirmError(false);
|
|
226
|
+
popoverRef.current?.showPopover();
|
|
227
|
+
cancelRef.current?.focus();
|
|
228
|
+
}
|
|
229
|
+
function handleConfirm(event) {
|
|
230
|
+
event.preventDefault();
|
|
231
|
+
event.stopPropagation();
|
|
232
|
+
const trigger = buttonRef.current;
|
|
233
|
+
if (disabled || isLoading || pendingRef.current || !trigger || trigger.disabled || !event.currentTarget.matches(":popover-open"))
|
|
234
|
+
return;
|
|
235
|
+
setConfirmError(false);
|
|
236
|
+
pendingRef.current = true;
|
|
237
|
+
actionRef.current += 1;
|
|
238
|
+
approvalRef.current = "action";
|
|
239
|
+
trigger.click();
|
|
240
|
+
if (approvalRef.current === "action") {
|
|
241
|
+
approvalRef.current = "idle";
|
|
242
|
+
pendingRef.current = false;
|
|
243
|
+
}
|
|
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,
|
|
198
381
|
className
|
|
199
382
|
}) {
|
|
200
383
|
return cn(breadcrumbLinkClass, disabled && breadcrumbItemDisabledClass, className);
|
|
201
384
|
}
|
|
202
385
|
|
|
203
386
|
// src/components/breadcrumb/Breadcrumb.tsx
|
|
204
|
-
import { jsx as jsx2, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
387
|
+
import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
205
388
|
var defaultSeparator = "/";
|
|
206
389
|
function isSeparatorItem(item) {
|
|
207
390
|
return "type" in item && item.type === "separator";
|
|
@@ -254,7 +437,7 @@ function activateOnKeyboard(event) {
|
|
|
254
437
|
}
|
|
255
438
|
function renderItemBody(item) {
|
|
256
439
|
const title = getItemTitle(item);
|
|
257
|
-
return /* @__PURE__ */ jsxs2(
|
|
440
|
+
return /* @__PURE__ */ jsxs2(Fragment2, {
|
|
258
441
|
children: [
|
|
259
442
|
item.icon ? /* @__PURE__ */ jsx2("span", {
|
|
260
443
|
className: breadcrumbIconClass,
|
|
@@ -382,7 +565,7 @@ function renderMenuItem(item, menu, children, disabled) {
|
|
|
382
565
|
]
|
|
383
566
|
});
|
|
384
567
|
}
|
|
385
|
-
var Breadcrumb =
|
|
568
|
+
var Breadcrumb = forwardRef(({
|
|
386
569
|
items,
|
|
387
570
|
routes,
|
|
388
571
|
params = {},
|
|
@@ -452,6 +635,22 @@ var Breadcrumb = forwardRef2(({
|
|
|
452
635
|
});
|
|
453
636
|
});
|
|
454
637
|
Breadcrumb.displayName = "Breadcrumb";
|
|
638
|
+
// src/components/dm-breadcrumb/DmBreadcrumb.tsx
|
|
639
|
+
import { forwardRef as forwardRef2, useEffect, useMemo, useState } from "react";
|
|
640
|
+
|
|
641
|
+
// src/classes/dm-breadcrumb.ts
|
|
642
|
+
var dmBreadcrumbClass = "dm-breadcrumb";
|
|
643
|
+
var dmBreadcrumbCompactClass = "dm-breadcrumb-compact";
|
|
644
|
+
var dmBreadcrumbRecentClass = "dm-breadcrumb-recent";
|
|
645
|
+
var dmBreadcrumbValueClass = "dm-breadcrumb-value";
|
|
646
|
+
function getDmBreadcrumbClasses({
|
|
647
|
+
compact,
|
|
648
|
+
recent,
|
|
649
|
+
className
|
|
650
|
+
}) {
|
|
651
|
+
return cn(dmBreadcrumbClass, compact && dmBreadcrumbCompactClass, recent && dmBreadcrumbRecentClass, className);
|
|
652
|
+
}
|
|
653
|
+
|
|
455
654
|
// src/components/dm-breadcrumb/DmBreadcrumb.tsx
|
|
456
655
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
457
656
|
var defaultStorageKey = "dm-breadcrumb-history-list";
|
|
@@ -524,7 +723,7 @@ function collapseItems(items, maxVisibleItems) {
|
|
|
524
723
|
...items.slice(-tailCount)
|
|
525
724
|
];
|
|
526
725
|
}
|
|
527
|
-
var DmBreadcrumb =
|
|
726
|
+
var DmBreadcrumb = forwardRef2(({
|
|
528
727
|
items,
|
|
529
728
|
isStoragePath = true,
|
|
530
729
|
storageKey = defaultStorageKey,
|
|
@@ -536,7 +735,7 @@ var DmBreadcrumb = forwardRef3(({
|
|
|
536
735
|
separator,
|
|
537
736
|
...props
|
|
538
737
|
}, ref) => {
|
|
539
|
-
const [currentHistory, setCurrentHistory] =
|
|
738
|
+
const [currentHistory, setCurrentHistory] = useState(() => history ?? readHistory(storageKey));
|
|
540
739
|
useEffect(() => {
|
|
541
740
|
if (history) {
|
|
542
741
|
setCurrentHistory(history);
|
|
@@ -583,30 +782,122 @@ var DmBreadcrumb = forwardRef3(({
|
|
|
583
782
|
});
|
|
584
783
|
});
|
|
585
784
|
DmBreadcrumb.displayName = "DmBreadcrumb";
|
|
586
|
-
// src/components/
|
|
587
|
-
import { forwardRef as
|
|
785
|
+
// src/components/layout/Layout.tsx
|
|
786
|
+
import { forwardRef as forwardRef3, useState as useState2 } from "react";
|
|
588
787
|
|
|
589
|
-
// src/classes/
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var
|
|
595
|
-
var
|
|
596
|
-
var
|
|
597
|
-
var
|
|
598
|
-
function
|
|
599
|
-
|
|
600
|
-
inlineCollapsed,
|
|
788
|
+
// src/classes/layout.ts
|
|
789
|
+
var layoutBaseClass = "layout";
|
|
790
|
+
var layoutHasSiderClass = "layout-has-sider";
|
|
791
|
+
var layoutHeaderClass = "layout-header";
|
|
792
|
+
var layoutSiderClass = "layout-sider";
|
|
793
|
+
var layoutSiderCollapsedClass = "layout-sider-collapsed";
|
|
794
|
+
var layoutContentClass = "layout-content";
|
|
795
|
+
var layoutFooterClass = "layout-footer";
|
|
796
|
+
var layoutTriggerClass = "layout-trigger";
|
|
797
|
+
function getLayoutClasses({
|
|
798
|
+
hasSider,
|
|
601
799
|
className
|
|
602
800
|
}) {
|
|
603
|
-
return cn(
|
|
801
|
+
return cn(layoutBaseClass, hasSider && layoutHasSiderClass, className);
|
|
802
|
+
}
|
|
803
|
+
function getLayoutSiderClasses({
|
|
804
|
+
collapsed,
|
|
805
|
+
className
|
|
806
|
+
}) {
|
|
807
|
+
return cn(layoutSiderClass, collapsed && layoutSiderCollapsedClass, className);
|
|
604
808
|
}
|
|
605
809
|
|
|
606
|
-
// src/components/
|
|
607
|
-
import {
|
|
608
|
-
|
|
609
|
-
|
|
810
|
+
// src/components/layout/Layout.tsx
|
|
811
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
812
|
+
function toSize(value) {
|
|
813
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
814
|
+
}
|
|
815
|
+
var Header = forwardRef3(({ className, ...props }, ref) => /* @__PURE__ */ jsx4("div", {
|
|
816
|
+
...props,
|
|
817
|
+
ref,
|
|
818
|
+
className: cn(layoutHeaderClass, className)
|
|
819
|
+
}));
|
|
820
|
+
Header.displayName = "Layout.Header";
|
|
821
|
+
var Content = forwardRef3(({ className, ...props }, ref) => /* @__PURE__ */ jsx4("div", {
|
|
822
|
+
...props,
|
|
823
|
+
ref,
|
|
824
|
+
className: cn(layoutContentClass, className)
|
|
825
|
+
}));
|
|
826
|
+
Content.displayName = "Layout.Content";
|
|
827
|
+
var Footer = forwardRef3(({ className, ...props }, ref) => /* @__PURE__ */ jsx4("div", {
|
|
828
|
+
...props,
|
|
829
|
+
ref,
|
|
830
|
+
className: cn(layoutFooterClass, className)
|
|
831
|
+
}));
|
|
832
|
+
Footer.displayName = "Layout.Footer";
|
|
833
|
+
var Sider = forwardRef3(({
|
|
834
|
+
children,
|
|
835
|
+
collapsible,
|
|
836
|
+
collapsed,
|
|
837
|
+
defaultCollapsed,
|
|
838
|
+
onCollapse,
|
|
839
|
+
width = 200,
|
|
840
|
+
collapsedWidth = 80,
|
|
841
|
+
trigger,
|
|
842
|
+
breakpoint,
|
|
843
|
+
className,
|
|
844
|
+
style,
|
|
845
|
+
...props
|
|
846
|
+
}, ref) => {
|
|
847
|
+
const controlled = collapsed !== undefined;
|
|
848
|
+
const [internalCollapsed, setInternalCollapsed] = useState2(() => defaultCollapsed ?? false);
|
|
849
|
+
const mergedCollapsed = controlled ? collapsed : internalCollapsed;
|
|
850
|
+
const siderWidth = toSize(mergedCollapsed ? collapsedWidth : width);
|
|
851
|
+
function toggleCollapsed() {
|
|
852
|
+
const nextCollapsed = !mergedCollapsed;
|
|
853
|
+
if (!controlled) {
|
|
854
|
+
setInternalCollapsed(nextCollapsed);
|
|
855
|
+
}
|
|
856
|
+
onCollapse?.(nextCollapsed, "clickTrigger");
|
|
857
|
+
}
|
|
858
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
859
|
+
...props,
|
|
860
|
+
ref,
|
|
861
|
+
"data-breakpoint": breakpoint,
|
|
862
|
+
className: getLayoutSiderClasses({
|
|
863
|
+
collapsed: mergedCollapsed,
|
|
864
|
+
className
|
|
865
|
+
}),
|
|
866
|
+
style: {
|
|
867
|
+
flex: `0 0 ${siderWidth}`,
|
|
868
|
+
maxWidth: siderWidth,
|
|
869
|
+
minWidth: siderWidth,
|
|
870
|
+
width: siderWidth,
|
|
871
|
+
...style
|
|
872
|
+
},
|
|
873
|
+
children: [
|
|
874
|
+
children,
|
|
875
|
+
collapsible && trigger !== null ? /* @__PURE__ */ jsx4("button", {
|
|
876
|
+
type: "button",
|
|
877
|
+
className: layoutTriggerClass,
|
|
878
|
+
"aria-label": mergedCollapsed ? "Expand sider" : "Collapse sider",
|
|
879
|
+
onClick: toggleCollapsed,
|
|
880
|
+
children: trigger ?? (mergedCollapsed ? ">" : "<")
|
|
881
|
+
}) : null
|
|
882
|
+
]
|
|
883
|
+
});
|
|
884
|
+
});
|
|
885
|
+
Sider.displayName = "Layout.Sider";
|
|
886
|
+
var LayoutRoot = forwardRef3(({ hasSider, className, ...props }, ref) => /* @__PURE__ */ jsx4("div", {
|
|
887
|
+
...props,
|
|
888
|
+
ref,
|
|
889
|
+
className: getLayoutClasses({ hasSider, className })
|
|
890
|
+
}));
|
|
891
|
+
LayoutRoot.displayName = "Layout";
|
|
892
|
+
LayoutRoot.Header = Header;
|
|
893
|
+
LayoutRoot.Sider = Sider;
|
|
894
|
+
LayoutRoot.Content = Content;
|
|
895
|
+
LayoutRoot.Footer = Footer;
|
|
896
|
+
var Layout = LayoutRoot;
|
|
897
|
+
// src/components/menu/Menu.tsx
|
|
898
|
+
import { forwardRef as forwardRef4, useState as useState3 } from "react";
|
|
899
|
+
|
|
900
|
+
// src/classes/menu.ts
|
|
610
901
|
var menuBaseClass = "menu";
|
|
611
902
|
var menuShowClass = "menu-show";
|
|
612
903
|
var menuItemClass = "menu-item";
|
|
@@ -655,7 +946,7 @@ function getMenuItemClasses({
|
|
|
655
946
|
}
|
|
656
947
|
|
|
657
948
|
// src/components/menu/Menu.tsx
|
|
658
|
-
import { jsx as
|
|
949
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
659
950
|
function normalizeKeys(keys) {
|
|
660
951
|
return keys?.map(String) ?? [];
|
|
661
952
|
}
|
|
@@ -678,7 +969,7 @@ var MenuItem = forwardRef4(({
|
|
|
678
969
|
className,
|
|
679
970
|
role,
|
|
680
971
|
...props
|
|
681
|
-
}, ref) => /* @__PURE__ */
|
|
972
|
+
}, ref) => /* @__PURE__ */ jsxs5("li", {
|
|
682
973
|
...props,
|
|
683
974
|
ref,
|
|
684
975
|
role: role ?? "menuitem",
|
|
@@ -690,37 +981,37 @@ var MenuItem = forwardRef4(({
|
|
|
690
981
|
className
|
|
691
982
|
}),
|
|
692
983
|
children: [
|
|
693
|
-
icon ? /* @__PURE__ */
|
|
984
|
+
icon ? /* @__PURE__ */ jsx5("span", {
|
|
694
985
|
className: menuItemIconClass,
|
|
695
986
|
children: icon
|
|
696
987
|
}) : null,
|
|
697
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ jsx5("span", {
|
|
698
989
|
children
|
|
699
990
|
}),
|
|
700
|
-
extra ? /* @__PURE__ */
|
|
991
|
+
extra ? /* @__PURE__ */ jsx5("span", {
|
|
701
992
|
className: menuItemTrailingClass,
|
|
702
993
|
children: extra
|
|
703
994
|
}) : null
|
|
704
995
|
]
|
|
705
996
|
}));
|
|
706
997
|
MenuItem.displayName = "Menu.Item";
|
|
707
|
-
var MenuDivider = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */
|
|
998
|
+
var MenuDivider = forwardRef4(({ className, ...props }, ref) => /* @__PURE__ */ jsx5("li", {
|
|
708
999
|
...props,
|
|
709
1000
|
ref,
|
|
710
1001
|
role: "separator",
|
|
711
1002
|
className: cn(menuDividerClass, className)
|
|
712
1003
|
}));
|
|
713
1004
|
MenuDivider.displayName = "Menu.Divider";
|
|
714
|
-
var MenuItemGroup = forwardRef4(({ title, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1005
|
+
var MenuItemGroup = forwardRef4(({ title, children, className, ...props }, ref) => /* @__PURE__ */ jsxs5("li", {
|
|
715
1006
|
...props,
|
|
716
1007
|
ref,
|
|
717
1008
|
className: cn("menu-group", className),
|
|
718
1009
|
children: [
|
|
719
|
-
hasNode2(title) ? /* @__PURE__ */
|
|
1010
|
+
hasNode2(title) ? /* @__PURE__ */ jsx5("div", {
|
|
720
1011
|
className: menuLabelClass,
|
|
721
1012
|
children: title
|
|
722
1013
|
}) : null,
|
|
723
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ jsx5("ul", {
|
|
724
1015
|
className: cn(menuSubmenuClass, "menu-show"),
|
|
725
1016
|
children
|
|
726
1017
|
})
|
|
@@ -753,470 +1044,163 @@ var MenuRoot = forwardRef4(({
|
|
|
753
1044
|
const [internalSelectedKeys, setInternalSelectedKeys] = useState3(() => normalizeKeys(defaultSelectedKeys));
|
|
754
1045
|
const [internalOpenKeys, setInternalOpenKeys] = useState3(() => normalizeKeys(defaultOpenKeys));
|
|
755
1046
|
const currentSelectedKeys = selectedControlled ? normalizeKeys(selectedKeys) : internalSelectedKeys;
|
|
756
|
-
const currentOpenKeys = openControlled ? normalizeKeys(openKeys) : internalOpenKeys;
|
|
757
|
-
function setNextSelectedKeys(nextSelectedKeys) {
|
|
758
|
-
if (!selectedControlled) {
|
|
759
|
-
setInternalSelectedKeys(nextSelectedKeys);
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
function setNextOpenKeys(nextOpenKeys) {
|
|
763
|
-
if (!openControlled) {
|
|
764
|
-
setInternalOpenKeys(nextOpenKeys);
|
|
765
|
-
}
|
|
766
|
-
onOpenChange?.(nextOpenKeys);
|
|
767
|
-
}
|
|
768
|
-
function buildInfo(item, key, keyPath, domEvent, nextSelectedKeys = currentSelectedKeys) {
|
|
769
|
-
return {
|
|
770
|
-
key,
|
|
771
|
-
keyPath,
|
|
772
|
-
item,
|
|
773
|
-
selectedKeys: nextSelectedKeys,
|
|
774
|
-
domEvent
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
function activateItem(item, key, keyPath, event) {
|
|
778
|
-
if (disabled || item.disabled) {
|
|
779
|
-
event.preventDefault();
|
|
780
|
-
return;
|
|
781
|
-
}
|
|
782
|
-
let nextSelectedKeys = currentSelectedKeys;
|
|
783
|
-
const selected = currentSelectedKeys.includes(key);
|
|
784
|
-
if (selectable) {
|
|
785
|
-
if (selected && multiple) {
|
|
786
|
-
nextSelectedKeys = currentSelectedKeys.filter((selectedKey) => selectedKey !== key);
|
|
787
|
-
setNextSelectedKeys(nextSelectedKeys);
|
|
788
|
-
onDeselect?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
789
|
-
} else if (!selected) {
|
|
790
|
-
nextSelectedKeys = multiple ? [...currentSelectedKeys, key] : [key];
|
|
791
|
-
setNextSelectedKeys(nextSelectedKeys);
|
|
792
|
-
onSelect?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
onClick?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
796
|
-
}
|
|
797
|
-
function toggleSubmenu(key) {
|
|
798
|
-
const open = currentOpenKeys.includes(key);
|
|
799
|
-
setNextOpenKeys(open ? currentOpenKeys.filter((openKey) => openKey !== key) : [...currentOpenKeys, key]);
|
|
800
|
-
}
|
|
801
|
-
function renderItem(item, indexPath, parentKeyPath = []) {
|
|
802
|
-
if (item.type === "divider") {
|
|
803
|
-
return /* @__PURE__ */ jsx4(MenuDivider, {}, `divider-${indexPath.join("-")}`);
|
|
804
|
-
}
|
|
805
|
-
const key = keyForItem(item, indexPath);
|
|
806
|
-
const keyPath = [key, ...parentKeyPath];
|
|
807
|
-
if (item.type === "group") {
|
|
808
|
-
return /* @__PURE__ */ jsx4(MenuItemGroup, {
|
|
809
|
-
title: item.label ?? item.title,
|
|
810
|
-
children: item.children?.map((child, childIndex) => renderItem(child, [...indexPath, childIndex], keyPath))
|
|
811
|
-
}, key);
|
|
812
|
-
}
|
|
813
|
-
const hasChildren = Boolean(item.children?.length);
|
|
814
|
-
const selected = currentSelectedKeys.includes(key);
|
|
815
|
-
const open = currentOpenKeys.includes(key);
|
|
816
|
-
const itemDisabled = disabled || item.disabled;
|
|
817
|
-
if (hasChildren) {
|
|
818
|
-
return /* @__PURE__ */ jsxs4("li", {
|
|
819
|
-
className: cn("menu-submenu-wrapper", item.className),
|
|
820
|
-
children: [
|
|
821
|
-
/* @__PURE__ */ jsxs4("button", {
|
|
822
|
-
type: "button",
|
|
823
|
-
className: getMenuItemClasses({
|
|
824
|
-
active: selected,
|
|
825
|
-
disabled: itemDisabled,
|
|
826
|
-
danger: item.danger,
|
|
827
|
-
submenu: true
|
|
828
|
-
}),
|
|
829
|
-
disabled: itemDisabled,
|
|
830
|
-
"aria-expanded": open,
|
|
831
|
-
onClick: () => toggleSubmenu(key),
|
|
832
|
-
children: [
|
|
833
|
-
item.icon ? /* @__PURE__ */ jsx4("span", {
|
|
834
|
-
className: menuItemIconClass,
|
|
835
|
-
children: item.icon
|
|
836
|
-
}) : null,
|
|
837
|
-
/* @__PURE__ */ jsx4("span", {
|
|
838
|
-
children: item.label ?? item.title
|
|
839
|
-
}),
|
|
840
|
-
item.extra ? /* @__PURE__ */ jsx4("span", {
|
|
841
|
-
className: menuItemTrailingClass,
|
|
842
|
-
children: item.extra
|
|
843
|
-
}) : null
|
|
844
|
-
]
|
|
845
|
-
}),
|
|
846
|
-
open ? /* @__PURE__ */ jsx4("ul", {
|
|
847
|
-
className: cn(menuSubmenuClass, "menu-show"),
|
|
848
|
-
children: item.children?.map((child, childIndex) => renderItem(child, [...indexPath, childIndex], keyPath))
|
|
849
|
-
}) : null
|
|
850
|
-
]
|
|
851
|
-
}, key);
|
|
852
|
-
}
|
|
853
|
-
return /* @__PURE__ */ jsx4(MenuItem, {
|
|
854
|
-
role: "menuitem",
|
|
855
|
-
tabIndex: itemDisabled ? undefined : 0,
|
|
856
|
-
active: selected,
|
|
857
|
-
disabled: itemDisabled,
|
|
858
|
-
danger: item.danger,
|
|
859
|
-
icon: item.icon,
|
|
860
|
-
extra: item.extra,
|
|
861
|
-
className: item.className,
|
|
862
|
-
onClick: (event) => activateItem(item, key, keyPath, event),
|
|
863
|
-
onKeyDown: (event) => {
|
|
864
|
-
if (!isActivationKey(event.key)) {
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
event.preventDefault();
|
|
868
|
-
activateItem(item, key, keyPath, event);
|
|
869
|
-
},
|
|
870
|
-
children: item.label
|
|
871
|
-
}, key);
|
|
872
|
-
}
|
|
873
|
-
return /* @__PURE__ */ jsx4("ul", {
|
|
874
|
-
...props,
|
|
875
|
-
ref,
|
|
876
|
-
role: props.role ?? "menu",
|
|
877
|
-
className: getMenuClasses({
|
|
878
|
-
mode,
|
|
879
|
-
theme,
|
|
880
|
-
size,
|
|
881
|
-
inlineCollapsed,
|
|
882
|
-
disabled,
|
|
883
|
-
className
|
|
884
|
-
}),
|
|
885
|
-
children: items ? items.map((item, index) => renderItem(item, [index])) : children
|
|
886
|
-
});
|
|
887
|
-
});
|
|
888
|
-
MenuRoot.displayName = "Menu";
|
|
889
|
-
MenuRoot.Item = MenuItem;
|
|
890
|
-
MenuRoot.Divider = MenuDivider;
|
|
891
|
-
MenuRoot.ItemGroup = MenuItemGroup;
|
|
892
|
-
var Menu = MenuRoot;
|
|
893
|
-
// src/components/button/Button.tsx
|
|
894
|
-
import React5 from "react";
|
|
895
|
-
import { createPortal } from "react-dom";
|
|
896
|
-
|
|
897
|
-
// src/classes/button.ts
|
|
898
|
-
var buttonBaseClass = "btn";
|
|
899
|
-
var buttonColorClasses = {
|
|
900
|
-
primary: "btn-primary",
|
|
901
|
-
secondary: "btn-secondary",
|
|
902
|
-
tertiary: "btn-tertiary",
|
|
903
|
-
accent: "btn-accent",
|
|
904
|
-
neutral: "btn-neutral",
|
|
905
|
-
base: "btn-base",
|
|
906
|
-
info: "btn-info",
|
|
907
|
-
success: "btn-success",
|
|
908
|
-
warning: "btn-warning",
|
|
909
|
-
error: "btn-error"
|
|
910
|
-
};
|
|
911
|
-
var buttonAppearanceClasses = {
|
|
912
|
-
filled: "",
|
|
913
|
-
outline: "btn-outline",
|
|
914
|
-
tonal: "btn-tonal",
|
|
915
|
-
ghost: "btn-ghost",
|
|
916
|
-
text: "btn-text"
|
|
917
|
-
};
|
|
918
|
-
var buttonShapeClasses = {
|
|
919
|
-
rect: "",
|
|
920
|
-
circle: "btn-circle btn-icon",
|
|
921
|
-
square: "btn-square"
|
|
922
|
-
};
|
|
923
|
-
var buttonSizeClasses = {
|
|
924
|
-
xs: "btn-xs",
|
|
925
|
-
sm: "btn-sm",
|
|
926
|
-
md: "btn-md",
|
|
927
|
-
lg: "btn-lg"
|
|
928
|
-
};
|
|
929
|
-
var buttonBlockClass = "btn-block";
|
|
930
|
-
var buttonIsLoadingClass = "btn-loading";
|
|
931
|
-
function getButtonClasses({
|
|
932
|
-
color = "primary",
|
|
933
|
-
appearance = "filled",
|
|
934
|
-
shape = "rect",
|
|
935
|
-
size = "md",
|
|
936
|
-
block,
|
|
937
|
-
isLoading,
|
|
938
|
-
className
|
|
939
|
-
}) {
|
|
940
|
-
return cn(buttonBaseClass, buttonColorClasses[color], buttonAppearanceClasses[appearance], buttonShapeClasses[shape], buttonSizeClasses[size], shape === "circle" && size === "xs" && "btn-icon-sm", shape === "circle" && size === "sm" && "btn-icon-sm", shape === "circle" && size === "lg" && "btn-icon-lg", block && buttonBlockClass, isLoading && buttonIsLoadingClass, className);
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
// src/components/button/Button.tsx
|
|
944
|
-
import { jsx as jsx5, jsxs as jsxs5, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
945
|
-
function isPromiseLike(value) {
|
|
946
|
-
return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
947
|
-
}
|
|
948
|
-
function Button({
|
|
949
|
-
color = "primary",
|
|
950
|
-
appearance = "filled",
|
|
951
|
-
shape = "rect",
|
|
952
|
-
size = "md",
|
|
953
|
-
block,
|
|
954
|
-
isLoading,
|
|
955
|
-
leftIcon,
|
|
956
|
-
rightIcon,
|
|
957
|
-
className,
|
|
958
|
-
children,
|
|
959
|
-
disabled,
|
|
960
|
-
ref,
|
|
961
|
-
confirm,
|
|
962
|
-
onClick,
|
|
963
|
-
...props
|
|
964
|
-
}) {
|
|
965
|
-
const buttonRef = React5.useRef(null);
|
|
966
|
-
const popoverRef = React5.useRef(null);
|
|
967
|
-
const cancelRef = React5.useRef(null);
|
|
968
|
-
const approvalRef = React5.useRef("idle");
|
|
969
|
-
const pendingRef = React5.useRef(false);
|
|
970
|
-
const actionRef = React5.useRef(0);
|
|
971
|
-
const operationRef = React5.useRef(0);
|
|
972
|
-
const mountedRef = React5.useRef(false);
|
|
973
|
-
const [portalTarget, setPortalTarget] = React5.useState(null);
|
|
974
|
-
const [confirmLoading, setConfirmLoading] = React5.useState(false);
|
|
975
|
-
const [confirmError, setConfirmError] = React5.useState(false);
|
|
976
|
-
const generatedId = React5.useId().replace(/:/g, "");
|
|
977
|
-
const popoverId = `button-confirm-${generatedId}`;
|
|
978
|
-
const titleId = `${popoverId}-title`;
|
|
979
|
-
const descriptionId = `${popoverId}-description`;
|
|
980
|
-
const anchor = `--${popoverId}-anchor`;
|
|
981
|
-
const hasConfirm = Boolean(confirm);
|
|
982
|
-
const confirmation = confirm && typeof confirm === "object" ? confirm : undefined;
|
|
983
|
-
const title = confirmation ? confirmation.title : "Confirm action";
|
|
984
|
-
const hasTitle = title !== undefined && title !== null && title !== false && title !== "";
|
|
985
|
-
const content = confirmation?.component ?? confirmation?.message ?? confirmation?.description;
|
|
986
|
-
const hasContent = content !== undefined && content !== null && content !== false && content !== "";
|
|
987
|
-
const mergedRef = React5.useCallback((node) => {
|
|
988
|
-
buttonRef.current = node;
|
|
989
|
-
if (!node) {
|
|
990
|
-
if (typeof ref === "function")
|
|
991
|
-
ref(null);
|
|
992
|
-
else if (ref)
|
|
993
|
-
ref.current = null;
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
const cleanup = typeof ref === "function" ? ref(node) : undefined;
|
|
997
|
-
if (ref && typeof ref !== "function")
|
|
998
|
-
ref.current = node;
|
|
999
|
-
return () => {
|
|
1000
|
-
buttonRef.current = null;
|
|
1001
|
-
if (typeof cleanup === "function")
|
|
1002
|
-
cleanup();
|
|
1003
|
-
else if (typeof ref === "function")
|
|
1004
|
-
ref(null);
|
|
1005
|
-
else if (ref)
|
|
1006
|
-
ref.current = null;
|
|
1007
|
-
};
|
|
1008
|
-
}, [ref]);
|
|
1009
|
-
React5.useEffect(() => {
|
|
1010
|
-
mountedRef.current = true;
|
|
1011
|
-
return () => {
|
|
1012
|
-
mountedRef.current = false;
|
|
1013
|
-
operationRef.current += 1;
|
|
1014
|
-
};
|
|
1015
|
-
}, []);
|
|
1016
|
-
React5.useEffect(() => {
|
|
1017
|
-
operationRef.current += 1;
|
|
1018
|
-
approvalRef.current = "idle";
|
|
1019
|
-
setConfirmError(false);
|
|
1020
|
-
setPortalTarget(hasConfirm ? document.body : null);
|
|
1021
|
-
}, [hasConfirm]);
|
|
1022
|
-
function closePopover() {
|
|
1023
|
-
if (popoverRef.current?.matches(":popover-open")) {
|
|
1024
|
-
popoverRef.current.hidePopover();
|
|
1025
|
-
}
|
|
1026
|
-
buttonRef.current?.focus();
|
|
1027
|
-
}
|
|
1028
|
-
function handleClick(event) {
|
|
1029
|
-
if (!confirm) {
|
|
1030
|
-
onClick?.(event);
|
|
1031
|
-
return;
|
|
1032
|
-
}
|
|
1033
|
-
if (approvalRef.current === "native") {
|
|
1034
|
-
approvalRef.current = "idle";
|
|
1035
|
-
return;
|
|
1036
|
-
}
|
|
1037
|
-
if (approvalRef.current === "action") {
|
|
1038
|
-
approvalRef.current = "idle";
|
|
1039
|
-
let result;
|
|
1040
|
-
try {
|
|
1041
|
-
result = onClick?.(event);
|
|
1042
|
-
} catch {
|
|
1043
|
-
event.preventDefault();
|
|
1044
|
-
pendingRef.current = false;
|
|
1045
|
-
setConfirmError(true);
|
|
1046
|
-
return;
|
|
1047
|
-
}
|
|
1048
|
-
if (!isPromiseLike(result)) {
|
|
1049
|
-
pendingRef.current = false;
|
|
1050
|
-
closePopover();
|
|
1051
|
-
return;
|
|
1052
|
-
}
|
|
1053
|
-
const userPreventedDefault = event.defaultPrevented;
|
|
1054
|
-
event.preventDefault();
|
|
1055
|
-
setConfirmLoading(true);
|
|
1056
|
-
const action = actionRef.current;
|
|
1057
|
-
const operation = operationRef.current;
|
|
1058
|
-
Promise.resolve(result).then(() => {
|
|
1059
|
-
if (!mountedRef.current || action !== actionRef.current)
|
|
1060
|
-
return;
|
|
1061
|
-
pendingRef.current = false;
|
|
1062
|
-
setConfirmLoading(false);
|
|
1063
|
-
if (operation !== operationRef.current)
|
|
1064
|
-
return;
|
|
1065
|
-
closePopover();
|
|
1066
|
-
if (!userPreventedDefault && !buttonRef.current?.disabled) {
|
|
1067
|
-
approvalRef.current = "native";
|
|
1068
|
-
buttonRef.current?.click();
|
|
1069
|
-
approvalRef.current = "idle";
|
|
1070
|
-
}
|
|
1071
|
-
}, () => {
|
|
1072
|
-
if (!mountedRef.current || action !== actionRef.current)
|
|
1073
|
-
return;
|
|
1074
|
-
pendingRef.current = false;
|
|
1075
|
-
setConfirmLoading(false);
|
|
1076
|
-
if (operation !== operationRef.current)
|
|
1077
|
-
return;
|
|
1078
|
-
setConfirmError(true);
|
|
1079
|
-
cancelRef.current?.focus();
|
|
1080
|
-
});
|
|
1081
|
-
return;
|
|
1082
|
-
}
|
|
1083
|
-
event.preventDefault();
|
|
1084
|
-
if (disabled || isLoading || pendingRef.current)
|
|
1085
|
-
return;
|
|
1086
|
-
if (popoverRef.current?.matches(":popover-open")) {
|
|
1087
|
-
closePopover();
|
|
1088
|
-
return;
|
|
1047
|
+
const currentOpenKeys = openControlled ? normalizeKeys(openKeys) : internalOpenKeys;
|
|
1048
|
+
function setNextSelectedKeys(nextSelectedKeys) {
|
|
1049
|
+
if (!selectedControlled) {
|
|
1050
|
+
setInternalSelectedKeys(nextSelectedKeys);
|
|
1089
1051
|
}
|
|
1090
|
-
setConfirmError(false);
|
|
1091
|
-
popoverRef.current?.showPopover();
|
|
1092
|
-
cancelRef.current?.focus();
|
|
1093
1052
|
}
|
|
1094
|
-
function
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1053
|
+
function setNextOpenKeys(nextOpenKeys) {
|
|
1054
|
+
if (!openControlled) {
|
|
1055
|
+
setInternalOpenKeys(nextOpenKeys);
|
|
1056
|
+
}
|
|
1057
|
+
onOpenChange?.(nextOpenKeys);
|
|
1058
|
+
}
|
|
1059
|
+
function buildInfo(item, key, keyPath, domEvent, nextSelectedKeys = currentSelectedKeys) {
|
|
1060
|
+
return {
|
|
1061
|
+
key,
|
|
1062
|
+
keyPath,
|
|
1063
|
+
item,
|
|
1064
|
+
selectedKeys: nextSelectedKeys,
|
|
1065
|
+
domEvent
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
function activateItem(item, key, keyPath, event) {
|
|
1069
|
+
if (disabled || item.disabled) {
|
|
1070
|
+
event.preventDefault();
|
|
1099
1071
|
return;
|
|
1100
|
-
setConfirmError(false);
|
|
1101
|
-
pendingRef.current = true;
|
|
1102
|
-
actionRef.current += 1;
|
|
1103
|
-
approvalRef.current = "action";
|
|
1104
|
-
trigger.click();
|
|
1105
|
-
if (approvalRef.current === "action") {
|
|
1106
|
-
approvalRef.current = "idle";
|
|
1107
|
-
pendingRef.current = false;
|
|
1108
1072
|
}
|
|
1073
|
+
let nextSelectedKeys = currentSelectedKeys;
|
|
1074
|
+
const selected = currentSelectedKeys.includes(key);
|
|
1075
|
+
if (selectable) {
|
|
1076
|
+
if (selected && multiple) {
|
|
1077
|
+
nextSelectedKeys = currentSelectedKeys.filter((selectedKey) => selectedKey !== key);
|
|
1078
|
+
setNextSelectedKeys(nextSelectedKeys);
|
|
1079
|
+
onDeselect?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
1080
|
+
} else if (!selected) {
|
|
1081
|
+
nextSelectedKeys = multiple ? [...currentSelectedKeys, key] : [key];
|
|
1082
|
+
setNextSelectedKeys(nextSelectedKeys);
|
|
1083
|
+
onSelect?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
onClick?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
1109
1087
|
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
style: confirm ? { ...props.style, anchorName: anchor } : props.style,
|
|
1134
|
-
"aria-haspopup": confirm ? "dialog" : props["aria-haspopup"],
|
|
1135
|
-
"aria-controls": confirm ? popoverId : props["aria-controls"],
|
|
1136
|
-
onClick: confirm ? handleClick : onClick,
|
|
1137
|
-
children: [
|
|
1138
|
-
isLoading && /* @__PURE__ */ jsx5("span", {
|
|
1139
|
-
className: "btn-spinner"
|
|
1140
|
-
}),
|
|
1141
|
-
!isLoading && leftIcon && /* @__PURE__ */ jsx5("span", {
|
|
1142
|
-
className: "btn-icon-left",
|
|
1143
|
-
children: leftIcon
|
|
1144
|
-
}),
|
|
1145
|
-
/* @__PURE__ */ jsx5("span", {
|
|
1146
|
-
className: "btn-content",
|
|
1147
|
-
children
|
|
1148
|
-
}),
|
|
1149
|
-
!isLoading && rightIcon && /* @__PURE__ */ jsx5("span", {
|
|
1150
|
-
className: "btn-icon-right",
|
|
1151
|
-
children: rightIcon
|
|
1152
|
-
})
|
|
1153
|
-
]
|
|
1154
|
-
}),
|
|
1155
|
-
confirm && portalTarget && createPortal(/* @__PURE__ */ jsxs5("form", {
|
|
1156
|
-
id: popoverId,
|
|
1157
|
-
ref: popoverRef,
|
|
1158
|
-
popover: "auto",
|
|
1159
|
-
role: "dialog",
|
|
1160
|
-
"aria-labelledby": hasTitle ? titleId : undefined,
|
|
1161
|
-
"aria-label": hasTitle ? undefined : "Confirm action",
|
|
1162
|
-
"aria-describedby": hasContent ? descriptionId : undefined,
|
|
1163
|
-
className: "popover popover-confirm popover-bottom",
|
|
1164
|
-
style: { positionAnchor: anchor },
|
|
1165
|
-
onSubmit: handleConfirm,
|
|
1166
|
-
onClick: (event) => event.stopPropagation(),
|
|
1167
|
-
onToggle: (event) => {
|
|
1168
|
-
if (!event.currentTarget.matches(":popover-open")) {
|
|
1169
|
-
operationRef.current += 1;
|
|
1170
|
-
if (event.currentTarget.contains(document.activeElement) || document.activeElement === document.body) {
|
|
1171
|
-
buttonRef.current?.focus();
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
},
|
|
1088
|
+
function toggleSubmenu(key) {
|
|
1089
|
+
const open = currentOpenKeys.includes(key);
|
|
1090
|
+
setNextOpenKeys(open ? currentOpenKeys.filter((openKey) => openKey !== key) : [...currentOpenKeys, key]);
|
|
1091
|
+
}
|
|
1092
|
+
function renderItem(item, indexPath, parentKeyPath = []) {
|
|
1093
|
+
if (item.type === "divider") {
|
|
1094
|
+
return /* @__PURE__ */ jsx5(MenuDivider, {}, `divider-${indexPath.join("-")}`);
|
|
1095
|
+
}
|
|
1096
|
+
const key = keyForItem(item, indexPath);
|
|
1097
|
+
const keyPath = [key, ...parentKeyPath];
|
|
1098
|
+
if (item.type === "group") {
|
|
1099
|
+
return /* @__PURE__ */ jsx5(MenuItemGroup, {
|
|
1100
|
+
title: item.label ?? item.title,
|
|
1101
|
+
children: item.children?.map((child, childIndex) => renderItem(child, [...indexPath, childIndex], keyPath))
|
|
1102
|
+
}, key);
|
|
1103
|
+
}
|
|
1104
|
+
const hasChildren = Boolean(item.children?.length);
|
|
1105
|
+
const selected = currentSelectedKeys.includes(key);
|
|
1106
|
+
const open = currentOpenKeys.includes(key);
|
|
1107
|
+
const itemDisabled = disabled || item.disabled;
|
|
1108
|
+
if (hasChildren) {
|
|
1109
|
+
return /* @__PURE__ */ jsxs5("li", {
|
|
1110
|
+
className: cn("menu-submenu-wrapper", item.className),
|
|
1175
1111
|
children: [
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
children: content
|
|
1188
|
-
}),
|
|
1189
|
-
confirmError && /* @__PURE__ */ jsx5("div", {
|
|
1190
|
-
role: "alert",
|
|
1191
|
-
className: "popover-body",
|
|
1192
|
-
children: "The action failed. Please try again."
|
|
1193
|
-
}),
|
|
1194
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1195
|
-
className: "popover-footer",
|
|
1112
|
+
/* @__PURE__ */ jsxs5("button", {
|
|
1113
|
+
type: "button",
|
|
1114
|
+
className: getMenuItemClasses({
|
|
1115
|
+
active: selected,
|
|
1116
|
+
disabled: itemDisabled,
|
|
1117
|
+
danger: item.danger,
|
|
1118
|
+
submenu: true
|
|
1119
|
+
}),
|
|
1120
|
+
disabled: itemDisabled,
|
|
1121
|
+
"aria-expanded": open,
|
|
1122
|
+
onClick: () => toggleSubmenu(key),
|
|
1196
1123
|
children: [
|
|
1197
|
-
/* @__PURE__ */ jsx5("
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
disabled: confirmLoading,
|
|
1204
|
-
children: confirmation?.cancelText ?? "Cancel"
|
|
1124
|
+
item.icon ? /* @__PURE__ */ jsx5("span", {
|
|
1125
|
+
className: menuItemIconClass,
|
|
1126
|
+
children: item.icon
|
|
1127
|
+
}) : null,
|
|
1128
|
+
/* @__PURE__ */ jsx5("span", {
|
|
1129
|
+
children: item.label ?? item.title
|
|
1205
1130
|
}),
|
|
1206
|
-
/* @__PURE__ */ jsx5("
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
"aria-busy": confirmLoading,
|
|
1211
|
-
children: confirmation?.confirmText ?? "Confirm"
|
|
1212
|
-
})
|
|
1131
|
+
item.extra ? /* @__PURE__ */ jsx5("span", {
|
|
1132
|
+
className: menuItemTrailingClass,
|
|
1133
|
+
children: item.extra
|
|
1134
|
+
}) : null
|
|
1213
1135
|
]
|
|
1214
|
-
})
|
|
1136
|
+
}),
|
|
1137
|
+
open ? /* @__PURE__ */ jsx5("ul", {
|
|
1138
|
+
className: cn(menuSubmenuClass, "menu-show"),
|
|
1139
|
+
children: item.children?.map((child, childIndex) => renderItem(child, [...indexPath, childIndex], keyPath))
|
|
1140
|
+
}) : null
|
|
1215
1141
|
]
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1142
|
+
}, key);
|
|
1143
|
+
}
|
|
1144
|
+
return /* @__PURE__ */ jsx5(MenuItem, {
|
|
1145
|
+
role: "menuitem",
|
|
1146
|
+
tabIndex: itemDisabled ? undefined : 0,
|
|
1147
|
+
active: selected,
|
|
1148
|
+
disabled: itemDisabled,
|
|
1149
|
+
danger: item.danger,
|
|
1150
|
+
icon: item.icon,
|
|
1151
|
+
extra: item.extra,
|
|
1152
|
+
className: item.className,
|
|
1153
|
+
onClick: (event) => activateItem(item, key, keyPath, event),
|
|
1154
|
+
onKeyDown: (event) => {
|
|
1155
|
+
if (!isActivationKey(event.key)) {
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
event.preventDefault();
|
|
1159
|
+
activateItem(item, key, keyPath, event);
|
|
1160
|
+
},
|
|
1161
|
+
children: item.label
|
|
1162
|
+
}, key);
|
|
1163
|
+
}
|
|
1164
|
+
return /* @__PURE__ */ jsx5("ul", {
|
|
1165
|
+
...props,
|
|
1166
|
+
ref,
|
|
1167
|
+
role: props.role ?? "menu",
|
|
1168
|
+
className: getMenuClasses({
|
|
1169
|
+
mode,
|
|
1170
|
+
theme,
|
|
1171
|
+
size,
|
|
1172
|
+
inlineCollapsed,
|
|
1173
|
+
disabled,
|
|
1174
|
+
className
|
|
1175
|
+
}),
|
|
1176
|
+
children: items ? items.map((item, index) => renderItem(item, [index])) : children
|
|
1218
1177
|
});
|
|
1178
|
+
});
|
|
1179
|
+
MenuRoot.displayName = "Menu";
|
|
1180
|
+
MenuRoot.Item = MenuItem;
|
|
1181
|
+
MenuRoot.Divider = MenuDivider;
|
|
1182
|
+
MenuRoot.ItemGroup = MenuItemGroup;
|
|
1183
|
+
var Menu = MenuRoot;
|
|
1184
|
+
// src/components/dm-menu/DmMenu.tsx
|
|
1185
|
+
import { forwardRef as forwardRef5, useMemo as useMemo2 } from "react";
|
|
1186
|
+
|
|
1187
|
+
// src/classes/dm-menu.ts
|
|
1188
|
+
var dmMenuClass = "dm-menu";
|
|
1189
|
+
var dmMenuNoHeaderClass = "dm-menu-no-header";
|
|
1190
|
+
var dmMenuCollapsedClass = "dm-menu-collapsed";
|
|
1191
|
+
var dmMenuHeaderClass = "dm-menu-header";
|
|
1192
|
+
var dmMenuProductIconClass = "dm-menu-product-icon";
|
|
1193
|
+
var dmMenuContentClass = "dm-menu-content";
|
|
1194
|
+
var dmMenuFooterClass = "dm-menu-footer";
|
|
1195
|
+
var dmMenuCollapseButtonClass = "dm-menu-collapse-button";
|
|
1196
|
+
function getDmMenuClasses({
|
|
1197
|
+
hideProductHeader,
|
|
1198
|
+
inlineCollapsed,
|
|
1199
|
+
className
|
|
1200
|
+
}) {
|
|
1201
|
+
return cn(dmMenuClass, hideProductHeader && dmMenuNoHeaderClass, inlineCollapsed && dmMenuCollapsedClass, className);
|
|
1219
1202
|
}
|
|
1203
|
+
|
|
1220
1204
|
// src/components/dm-menu/DmMenu.tsx
|
|
1221
1205
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1222
1206
|
function getMenuLabel(menu, locale) {
|
|
@@ -1363,6 +1347,22 @@ var DmMenu = forwardRef5(({
|
|
|
1363
1347
|
});
|
|
1364
1348
|
});
|
|
1365
1349
|
DmMenu.displayName = "DmMenu";
|
|
1350
|
+
// src/components/dm-layout/DmLayout.tsx
|
|
1351
|
+
import { forwardRef as forwardRef6, useEffect as useEffect2, useMemo as useMemo3, useState as useState4 } from "react";
|
|
1352
|
+
|
|
1353
|
+
// src/classes/dm-layout.ts
|
|
1354
|
+
var dmLayoutClass = "dm-layout";
|
|
1355
|
+
var dmLayoutShellClass = "dm-layout-shell";
|
|
1356
|
+
var dmLayoutMainClass = "dm-layout-main";
|
|
1357
|
+
var dmLayoutSiderClass = "dm-layout-sider";
|
|
1358
|
+
var dmLayoutBodyClass = "dm-layout-body";
|
|
1359
|
+
var dmLayoutBreadcrumbClass = "dm-layout-breadcrumb";
|
|
1360
|
+
var dmLayoutContentClass = "dm-layout-content";
|
|
1361
|
+
var dmLayoutAuxiliaryClass = "dm-layout-auxiliary";
|
|
1362
|
+
function getDmLayoutClasses({ className }) {
|
|
1363
|
+
return cn(dmLayoutClass, className);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
1366
|
// src/components/dm-layout/DmLayout.tsx
|
|
1367
1367
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1368
1368
|
function getLabel(menu, locale) {
|