@bioturing/components 0.32.0 → 0.32.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/components/badge/component.d.ts +7 -0
- package/dist/components/badge/component.d.ts.map +1 -0
- package/dist/components/badge/component.js.map +1 -1
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/component.d.ts +6 -0
- package/dist/components/breadcrumb/component.d.ts.map +1 -0
- package/dist/components/breadcrumb/component.js.map +1 -1
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/types.d.ts +19 -0
- package/dist/components/breadcrumb/types.d.ts.map +1 -0
- package/dist/components/breadcrumb/useItemRender.d.ts +7 -0
- package/dist/components/breadcrumb/useItemRender.d.ts.map +1 -0
- package/dist/components/breadcrumb/useItemRender.js.map +1 -1
- package/dist/components/button/component.d.ts +14 -0
- package/dist/components/button/component.d.ts.map +1 -0
- package/dist/components/button/component.js.map +1 -1
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/checkbox/component.d.ts +16 -0
- package/dist/components/checkbox/component.d.ts.map +1 -0
- package/dist/components/checkbox/component.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/choice-list/component.d.ts +35 -0
- package/dist/components/choice-list/component.d.ts.map +1 -0
- package/dist/components/choice-list/component.js.map +1 -1
- package/dist/components/choice-list/index.d.ts +2 -0
- package/dist/components/choice-list/index.d.ts.map +1 -0
- package/dist/components/cmdk/command-score.d.ts +2 -0
- package/dist/components/cmdk/command-score.d.ts.map +1 -0
- package/dist/components/cmdk/command-score.js.map +1 -1
- package/dist/components/cmdk/index.d.ts +440 -0
- package/dist/components/cmdk/index.d.ts.map +1 -0
- package/dist/components/cmdk/index.js +332 -348
- package/dist/components/cmdk/index.js.map +1 -1
- package/dist/components/code-block/component.d.ts +3 -0
- package/dist/components/code-block/component.d.ts.map +1 -0
- package/dist/components/code-block/component.js +83 -84
- package/dist/components/code-block/component.js.map +1 -1
- package/dist/components/code-block/index.d.ts +3 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/code-block/types.d.ts +64 -0
- package/dist/components/code-block/types.d.ts.map +1 -0
- package/dist/components/collapse/component.d.ts +14 -0
- package/dist/components/collapse/component.d.ts.map +1 -0
- package/dist/components/collapse/component.js.map +1 -1
- package/dist/components/collapse/index.d.ts +2 -0
- package/dist/components/collapse/index.d.ts.map +1 -0
- package/dist/components/color-select/component.d.ts +36 -0
- package/dist/components/color-select/component.d.ts.map +1 -0
- package/dist/components/color-select/component.js +28 -30
- package/dist/components/color-select/component.js.map +1 -1
- package/dist/components/color-select/index.d.ts +2 -0
- package/dist/components/color-select/index.d.ts.map +1 -0
- package/dist/components/combobox/component.d.ts +119 -0
- package/dist/components/combobox/component.d.ts.map +1 -0
- package/dist/components/combobox/component.js +129 -129
- package/dist/components/combobox/component.js.map +1 -1
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/command-palette/component.d.ts +41 -0
- package/dist/components/command-palette/component.d.ts.map +1 -0
- package/dist/components/command-palette/component.js +36 -36
- package/dist/components/command-palette/component.js.map +1 -1
- package/dist/components/command-palette/index.d.ts +2 -0
- package/dist/components/command-palette/index.d.ts.map +1 -0
- package/dist/components/command-palette/style.css +1 -1
- package/dist/components/drag-drop/context.d.ts +10 -0
- package/dist/components/drag-drop/context.d.ts.map +1 -0
- package/dist/components/drag-drop/context.js.map +1 -1
- package/dist/components/drag-drop/draggable.d.ts +6 -0
- package/dist/components/drag-drop/draggable.d.ts.map +1 -0
- package/dist/components/drag-drop/draggable.js.map +1 -1
- package/dist/components/drag-drop/droppable.d.ts +9 -0
- package/dist/components/drag-drop/droppable.d.ts.map +1 -0
- package/dist/components/drag-drop/droppable.js.map +1 -1
- package/dist/components/drag-drop/hooks.d.ts +42 -0
- package/dist/components/drag-drop/hooks.d.ts.map +1 -0
- package/dist/components/drag-drop/hooks.js +71 -73
- package/dist/components/drag-drop/hooks.js.map +1 -1
- package/dist/components/drag-drop/index.d.ts +26 -0
- package/dist/components/drag-drop/index.d.ts.map +1 -0
- package/dist/components/drag-drop/index.js.map +1 -1
- package/dist/components/drag-drop/types.d.ts +232 -0
- package/dist/components/drag-drop/types.d.ts.map +1 -0
- package/dist/components/drag-drop/value.d.ts +8 -0
- package/dist/components/drag-drop/value.d.ts.map +1 -0
- package/dist/components/drag-drop/value.js +66 -66
- package/dist/components/drag-drop/value.js.map +1 -1
- package/dist/components/dropdown-menu/component.d.ts +79 -0
- package/dist/components/dropdown-menu/component.d.ts.map +1 -0
- package/dist/components/dropdown-menu/component.js +108 -108
- package/dist/components/dropdown-menu/component.js.map +1 -1
- package/dist/components/dropdown-menu/divider.d.ts +6 -0
- package/dist/components/dropdown-menu/divider.d.ts.map +1 -0
- package/dist/components/dropdown-menu/divider.js.map +1 -1
- package/dist/components/dropdown-menu/index.d.ts +4 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/item.d.ts +56 -0
- package/dist/components/dropdown-menu/item.d.ts.map +1 -0
- package/dist/components/dropdown-menu/item.js +75 -78
- package/dist/components/dropdown-menu/item.js.map +1 -1
- package/dist/components/dropdown-menu/types.d.ts +88 -0
- package/dist/components/dropdown-menu/types.d.ts.map +1 -0
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +58 -0
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/useDropdownMenu.js +80 -80
- package/dist/components/dropdown-menu/useDropdownMenu.js.map +1 -1
- package/dist/components/ds-root/component.d.ts +14 -0
- package/dist/components/ds-root/component.d.ts.map +1 -0
- package/dist/components/ds-root/component.js.map +1 -1
- package/dist/components/ds-root/context.d.ts +8 -0
- package/dist/components/ds-root/context.d.ts.map +1 -0
- package/dist/components/ds-root/index.d.ts +3 -0
- package/dist/components/ds-root/index.d.ts.map +1 -0
- package/dist/components/empty/component.d.ts +13 -0
- package/dist/components/empty/component.d.ts.map +1 -0
- package/dist/components/empty/component.js.map +1 -1
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/empty/index.d.ts.map +1 -0
- package/dist/components/field/component.d.ts +42 -0
- package/dist/components/field/component.d.ts.map +1 -0
- package/dist/components/field/component.js.map +1 -1
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/form/component.d.ts +22 -0
- package/dist/components/form/component.d.ts.map +1 -0
- package/dist/components/form/component.js.map +1 -1
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/item.d.ts +24 -0
- package/dist/components/form/item.d.ts.map +1 -0
- package/dist/components/form/item.js +24 -24
- package/dist/components/form/item.js.map +1 -1
- package/dist/components/form/label.d.ts +32 -0
- package/dist/components/form/label.d.ts.map +1 -0
- package/dist/components/form/label.js.map +1 -1
- package/dist/components/hooks/antd.d.ts +11 -0
- package/dist/components/hooks/antd.d.ts.map +1 -0
- package/dist/components/hooks/antd.js.map +1 -1
- package/dist/components/hooks/base-ui.d.ts +11 -0
- package/dist/components/hooks/base-ui.d.ts.map +1 -0
- package/dist/components/hooks/base-ui.js +22 -25
- package/dist/components/hooks/base-ui.js.map +1 -1
- package/dist/components/hooks/index.d.ts +11 -0
- package/dist/components/hooks/index.d.ts.map +1 -0
- package/dist/components/hooks/useBreakpoint.d.ts +39 -0
- package/dist/components/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/components/hooks/useBreakpoint.js +14 -15
- package/dist/components/hooks/useBreakpoint.js.map +1 -1
- package/dist/components/hooks/useCSSVariables.d.ts +7 -0
- package/dist/components/hooks/useCSSVariables.d.ts.map +1 -0
- package/dist/components/hooks/useCSSVariables.js.map +1 -1
- package/dist/components/hooks/useCharts.d.ts +41 -0
- package/dist/components/hooks/useCharts.d.ts.map +1 -0
- package/dist/components/hooks/useCharts.js.map +1 -1
- package/dist/components/hooks/useControlledState.d.ts +13 -0
- package/dist/components/hooks/useControlledState.d.ts.map +1 -0
- package/dist/components/hooks/useControlledState.js.map +1 -1
- package/dist/components/hooks/useDraggable.d.ts +4 -0
- package/dist/components/hooks/useDraggable.d.ts.map +1 -0
- package/dist/components/hooks/useDraggable.js +19 -20
- package/dist/components/hooks/useDraggable.js.map +1 -1
- package/dist/components/hooks/useHover.d.ts +5 -0
- package/dist/components/hooks/useHover.d.ts.map +1 -0
- package/dist/components/hooks/useHover.js +16 -17
- package/dist/components/hooks/useHover.js.map +1 -1
- package/dist/components/hooks/useResizeObserver.d.ts +9 -0
- package/dist/components/hooks/useResizeObserver.d.ts.map +1 -0
- package/dist/components/hooks/useResizeObserver.js +29 -30
- package/dist/components/hooks/useResizeObserver.js.map +1 -1
- package/dist/components/hooks/useTransitionStatus.d.ts +13 -0
- package/dist/components/hooks/useTransitionStatus.d.ts.map +1 -0
- package/dist/components/hooks/useTransitionStatus.js.map +1 -1
- package/dist/components/hooks/useWindowSize.d.ts +5 -0
- package/dist/components/hooks/useWindowSize.d.ts.map +1 -0
- package/dist/components/hooks/useWindowSize.js.map +1 -1
- package/dist/components/icon-button/component.d.ts +45 -0
- package/dist/components/icon-button/component.d.ts.map +1 -0
- package/dist/components/icon-button/component.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +53 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/component.d.ts +29 -0
- package/dist/components/input/component.d.ts.map +1 -0
- package/dist/components/input/component.js +46 -46
- package/dist/components/input/component.js.map +1 -1
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/keyboard-shortcut/component.d.ts +15 -0
- package/dist/components/keyboard-shortcut/component.d.ts.map +1 -0
- package/dist/components/keyboard-shortcut/component.js.map +1 -1
- package/dist/components/keyboard-shortcut/index.d.ts +2 -0
- package/dist/components/keyboard-shortcut/index.d.ts.map +1 -0
- package/dist/components/loader/component.d.ts +5 -0
- package/dist/components/loader/component.d.ts.map +1 -0
- package/dist/components/loader/component.js.map +1 -1
- package/dist/components/loader/index.d.ts +2 -0
- package/dist/components/loader/index.d.ts.map +1 -0
- package/dist/components/modal/Modal.d.ts +85 -0
- package/dist/components/modal/Modal.d.ts.map +1 -0
- package/dist/components/modal/Modal.js +75 -75
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/ModalProvider.d.ts +6 -0
- package/dist/components/modal/ModalProvider.d.ts.map +1 -0
- package/dist/components/modal/ModalProvider.js +25 -25
- package/dist/components/modal/ModalProvider.js.map +1 -1
- package/dist/components/modal/ModalService.d.ts +34 -0
- package/dist/components/modal/ModalService.d.ts.map +1 -0
- package/dist/components/modal/ModalService.js +5 -10
- package/dist/components/modal/ModalService.js.map +1 -1
- package/dist/components/modal/constants.d.ts +10 -0
- package/dist/components/modal/constants.d.ts.map +1 -0
- package/dist/components/modal/constants.js.map +1 -1
- package/dist/components/modal/functions.d.ts +28 -0
- package/dist/components/modal/functions.d.ts.map +1 -0
- package/dist/components/modal/functions.js.map +1 -1
- package/dist/components/modal/index.d.ts +16 -0
- package/dist/components/modal/index.d.ts.map +1 -0
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/nav/context.d.ts +10 -0
- package/dist/components/nav/context.d.ts.map +1 -0
- package/dist/components/nav/context.js.map +1 -1
- package/dist/components/nav/group.d.ts +15 -0
- package/dist/components/nav/group.d.ts.map +1 -0
- package/dist/components/nav/group.js.map +1 -1
- package/dist/components/nav/heading.d.ts +6 -0
- package/dist/components/nav/heading.d.ts.map +1 -0
- package/dist/components/nav/heading.js.map +1 -1
- package/dist/components/nav/index.d.ts +12 -0
- package/dist/components/nav/index.d.ts.map +1 -0
- package/dist/components/nav/item.d.ts +35 -0
- package/dist/components/nav/item.d.ts.map +1 -0
- package/dist/components/nav/item.js.map +1 -1
- package/dist/components/popover/component.d.ts +10 -0
- package/dist/components/popover/component.d.ts.map +1 -0
- package/dist/components/popover/component.js.map +1 -1
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popup-panel/component.d.ts +100 -0
- package/dist/components/popup-panel/component.d.ts.map +1 -0
- package/dist/components/popup-panel/component.js +105 -105
- package/dist/components/popup-panel/component.js.map +1 -1
- package/dist/components/popup-panel/constants.d.ts +8 -0
- package/dist/components/popup-panel/constants.d.ts.map +1 -0
- package/dist/components/popup-panel/constants.js.map +1 -1
- package/dist/components/popup-panel/index.d.ts +2 -0
- package/dist/components/popup-panel/index.d.ts.map +1 -0
- package/dist/components/radio/component.d.ts +8 -0
- package/dist/components/radio/component.d.ts.map +1 -0
- package/dist/components/radio/component.js.map +1 -1
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio/index.d.ts.map +1 -0
- package/dist/components/radio/interface.d.ts +6 -0
- package/dist/components/radio/interface.d.ts.map +1 -0
- package/dist/components/resizable/component.d.ts +70 -0
- package/dist/components/resizable/component.d.ts.map +1 -0
- package/dist/components/resizable/component.js +147 -147
- package/dist/components/resizable/component.js.map +1 -1
- package/dist/components/resizable/index.d.ts +3 -0
- package/dist/components/resizable/index.d.ts.map +1 -0
- package/dist/components/scroll-area/component.d.ts +67 -0
- package/dist/components/scroll-area/component.d.ts.map +1 -0
- package/dist/components/scroll-area/component.js +69 -69
- package/dist/components/scroll-area/component.js.map +1 -1
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/segmented/component.d.ts +10 -0
- package/dist/components/segmented/component.d.ts.map +1 -0
- package/dist/components/segmented/component.js.map +1 -1
- package/dist/components/segmented/index.d.ts +2 -0
- package/dist/components/segmented/index.d.ts.map +1 -0
- package/dist/components/select/component.d.ts +48 -0
- package/dist/components/select/component.d.ts.map +1 -0
- package/dist/components/select/component.js +93 -94
- package/dist/components/select/component.js.map +1 -1
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/item.d.ts +14 -0
- package/dist/components/select/item.d.ts.map +1 -0
- package/dist/components/select/item.js.map +1 -1
- package/dist/components/select-trigger/component.d.ts +45 -0
- package/dist/components/select-trigger/component.d.ts.map +1 -0
- package/dist/components/select-trigger/component.js +96 -96
- package/dist/components/select-trigger/component.js.map +1 -1
- package/dist/components/select-trigger/index.d.ts +3 -0
- package/dist/components/select-trigger/index.d.ts.map +1 -0
- package/dist/components/slider/component.d.ts +6 -0
- package/dist/components/slider/component.d.ts.map +1 -0
- package/dist/components/slider/component.js.map +1 -1
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/spin/component.d.ts +6 -0
- package/dist/components/spin/component.d.ts.map +1 -0
- package/dist/components/spin/component.js.map +1 -1
- package/dist/components/spin/index.d.ts +2 -0
- package/dist/components/spin/index.d.ts.map +1 -0
- package/dist/components/splitter/component.d.ts +10 -0
- package/dist/components/splitter/component.d.ts.map +1 -0
- package/dist/components/splitter/component.js +7 -7
- package/dist/components/splitter/component.js.map +1 -1
- package/dist/components/splitter/context.d.ts +5 -0
- package/dist/components/splitter/context.d.ts.map +1 -0
- package/dist/components/splitter/context.js.map +1 -1
- package/dist/components/splitter/index.d.ts +2 -0
- package/dist/components/splitter/index.d.ts.map +1 -0
- package/dist/components/splitter/splitter-panel.d.ts +12 -0
- package/dist/components/splitter/splitter-panel.d.ts.map +1 -0
- package/dist/components/splitter/splitter-panel.js.map +1 -1
- package/dist/components/splitter/splitter.d.ts +11 -0
- package/dist/components/splitter/splitter.d.ts.map +1 -0
- package/dist/components/splitter/splitter.js +112 -112
- package/dist/components/splitter/splitter.js.map +1 -1
- package/dist/components/splitter/useSizes.d.ts +9 -0
- package/dist/components/splitter/useSizes.d.ts.map +1 -0
- package/dist/components/splitter/useSizes.js +35 -35
- package/dist/components/splitter/useSizes.js.map +1 -1
- package/dist/components/stack/Stack.d.ts +40 -0
- package/dist/components/stack/Stack.d.ts.map +1 -0
- package/dist/components/stack/Stack.js.map +1 -1
- package/dist/components/stack/StackChild.d.ts +31 -0
- package/dist/components/stack/StackChild.d.ts.map +1 -0
- package/dist/components/stack/StackChild.js.map +1 -1
- package/dist/components/stack/index.d.ts +8 -0
- package/dist/components/stack/index.d.ts.map +1 -0
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/status-icon/component.d.ts +23 -0
- package/dist/components/status-icon/component.d.ts.map +1 -0
- package/dist/components/status-icon/component.js.map +1 -1
- package/dist/components/status-icon/index.d.ts +2 -0
- package/dist/components/status-icon/index.d.ts.map +1 -0
- package/dist/components/switch/component.d.ts +9 -0
- package/dist/components/switch/component.d.ts.map +1 -0
- package/dist/components/switch/component.js.map +1 -1
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/table/component.d.ts +32 -0
- package/dist/components/table/component.d.ts.map +1 -0
- package/dist/components/table/component.js +57 -58
- package/dist/components/table/component.js.map +1 -1
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/tag/component.d.ts +22 -0
- package/dist/components/tag/component.d.ts.map +1 -0
- package/dist/components/tag/component.js.map +1 -1
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/index.d.ts.map +1 -0
- package/dist/components/theme-provider/component.d.ts +7 -0
- package/dist/components/theme-provider/component.d.ts.map +1 -0
- package/dist/components/theme-provider/component.js.map +1 -1
- package/dist/components/theme-provider/index.d.ts +2 -0
- package/dist/components/theme-provider/index.d.ts.map +1 -0
- package/dist/components/toast/component.d.ts +15 -0
- package/dist/components/toast/component.d.ts.map +1 -0
- package/dist/components/toast/component.js +49 -50
- package/dist/components/toast/component.js.map +1 -1
- package/dist/components/toast/function.d.ts +11 -0
- package/dist/components/toast/function.d.ts.map +1 -0
- package/dist/components/toast/function.js.map +1 -1
- package/dist/components/toast/index.d.ts +4 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/types.d.ts +4 -0
- package/dist/components/toast/types.d.ts.map +1 -0
- package/dist/components/tooltip/component.d.ts +10 -0
- package/dist/components/tooltip/component.d.ts.map +1 -0
- package/dist/components/tooltip/component.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tour/component.d.ts +8 -0
- package/dist/components/tour/component.d.ts.map +1 -0
- package/dist/components/tour/component.js.map +1 -1
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.d.ts.map +1 -0
- package/dist/components/transition/component.d.ts +30 -0
- package/dist/components/transition/component.d.ts.map +1 -0
- package/dist/components/transition/component.js +32 -32
- package/dist/components/transition/component.js.map +1 -1
- package/dist/components/transition/index.d.ts +2 -0
- package/dist/components/transition/index.d.ts.map +1 -0
- package/dist/components/tree/components.d.ts +14 -0
- package/dist/components/tree/components.d.ts.map +1 -0
- package/dist/components/tree/components.js.map +1 -1
- package/dist/components/tree/helpers.d.ts +6 -0
- package/dist/components/tree/helpers.d.ts.map +1 -0
- package/dist/components/tree/helpers.js.map +1 -1
- package/dist/components/tree/index.d.ts +5 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/components/tree/types.d.ts +56 -0
- package/dist/components/tree/types.d.ts.map +1 -0
- package/dist/components/tree/useTreeCommon.d.ts +179 -0
- package/dist/components/tree/useTreeCommon.d.ts.map +1 -0
- package/dist/components/tree/useTreeCommon.js +29 -29
- package/dist/components/tree/useTreeCommon.js.map +1 -1
- package/dist/components/tree/useUniqueKeysTree.d.ts +34 -0
- package/dist/components/tree/useUniqueKeysTree.d.ts.map +1 -0
- package/dist/components/tree/useUniqueKeysTree.js.map +1 -1
- package/dist/components/truncate/component.d.ts +17 -0
- package/dist/components/truncate/component.d.ts.map +1 -0
- package/dist/components/truncate/component.js +38 -39
- package/dist/components/truncate/component.js.map +1 -1
- package/dist/components/truncate/helpers.d.ts +17 -0
- package/dist/components/truncate/helpers.d.ts.map +1 -0
- package/dist/components/truncate/helpers.js +27 -30
- package/dist/components/truncate/helpers.js.map +1 -1
- package/dist/components/truncate/index.d.ts +2 -0
- package/dist/components/truncate/index.d.ts.map +1 -0
- package/dist/components/upload/component.d.ts +17 -0
- package/dist/components/upload/component.d.ts.map +1 -0
- package/dist/components/upload/component.js.map +1 -1
- package/dist/components/upload/dragger.d.ts +14 -0
- package/dist/components/upload/dragger.d.ts.map +1 -0
- package/dist/components/upload/dragger.js.map +1 -1
- package/dist/components/upload/hooks.d.ts +6 -0
- package/dist/components/upload/hooks.d.ts.map +1 -0
- package/dist/components/upload/hooks.js.map +1 -1
- package/dist/components/upload/index.d.ts +4 -0
- package/dist/components/upload/index.d.ts.map +1 -0
- package/dist/components/upload/item.d.ts +12 -0
- package/dist/components/upload/item.d.ts.map +1 -0
- package/dist/components/upload/item.js.map +1 -1
- package/dist/components/upload/utils.d.ts +2 -0
- package/dist/components/upload/utils.d.ts.map +1 -0
- package/dist/components/upload/utils.js.map +1 -1
- package/dist/components/utils/WithAntdTokens.d.ts +8 -0
- package/dist/components/utils/WithAntdTokens.d.ts.map +1 -0
- package/dist/components/utils/WithAntdTokens.js.map +1 -1
- package/dist/components/utils/WithRenderProp.d.ts +14 -0
- package/dist/components/utils/WithRenderProp.d.ts.map +1 -0
- package/dist/components/utils/WithRenderProp.js.map +1 -1
- package/dist/components/utils/antdUtils.d.ts +11 -0
- package/dist/components/utils/antdUtils.d.ts.map +1 -0
- package/dist/components/utils/antdUtils.js +9 -12
- package/dist/components/utils/antdUtils.js.map +1 -1
- package/dist/components/utils/client.d.ts +6 -0
- package/dist/components/utils/client.d.ts.map +1 -0
- package/dist/components/utils/cn.d.ts +5 -0
- package/dist/components/utils/cn.d.ts.map +1 -0
- package/dist/components/utils/cn.js.map +1 -1
- package/dist/components/utils/colors.d.ts +2 -0
- package/dist/components/utils/colors.d.ts.map +1 -0
- package/dist/components/utils/constants.d.ts +15 -0
- package/dist/components/utils/constants.d.ts.map +1 -0
- package/dist/components/utils/index.d.ts +6 -0
- package/dist/components/utils/index.d.ts.map +1 -0
- package/dist/components/utils/isTracebackError.d.ts +2 -0
- package/dist/components/utils/isTracebackError.d.ts.map +1 -0
- package/dist/components/utils/isTracebackError.js.map +1 -1
- package/dist/components/utils/main.d.ts +7 -0
- package/dist/components/utils/main.d.ts.map +1 -0
- package/dist/components/utils/placement.d.ts +21 -0
- package/dist/components/utils/placement.d.ts.map +1 -0
- package/dist/components/utils/placement.js.map +1 -1
- package/dist/components/utils/reactElement.d.ts +2 -0
- package/dist/components/utils/reactElement.d.ts.map +1 -0
- package/dist/components/utils/reactToString.d.ts +3 -0
- package/dist/components/utils/reactToString.d.ts.map +1 -0
- package/dist/components/utils/reactToString.js.map +1 -1
- package/dist/components/utils/selectionRange.d.ts +2 -0
- package/dist/components/utils/selectionRange.d.ts.map +1 -0
- package/dist/components/utils/selectionRange.js.map +1 -1
- package/dist/components/utils/theme.d.ts +6 -0
- package/dist/components/utils/theme.d.ts.map +1 -0
- package/dist/components/utils/theme.js.map +1 -1
- package/dist/components/utils/types.d.ts +12 -0
- package/dist/components/utils/types.d.ts.map +1 -0
- package/dist/components/vertical-collapsible-panel/component.d.ts +65 -0
- package/dist/components/vertical-collapsible-panel/component.d.ts.map +1 -0
- package/dist/components/vertical-collapsible-panel/component.js.map +1 -1
- package/dist/components/vertical-collapsible-panel/index.d.ts +2 -0
- package/dist/components/vertical-collapsible-panel/index.d.ts.map +1 -0
- package/dist/index.d.ts +4 -4431
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +166 -164
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +446 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js.map +1 -1
- package/dist/tokens/and-theme/index.d.ts +2 -0
- package/dist/tokens/and-theme/index.d.ts.map +1 -0
- package/dist/tokens/and-theme/tokens.d.ts +6 -0
- package/dist/tokens/and-theme/tokens.d.ts.map +1 -0
- package/dist/tokens/and-theme/tokens.js.map +1 -1
- package/dist/tokens/charts/index.d.ts +5 -0
- package/dist/tokens/charts/index.d.ts.map +1 -0
- package/dist/tokens/charts/palettes/cloudscape.d.ts +460 -0
- package/dist/tokens/charts/palettes/cloudscape.d.ts.map +1 -0
- package/dist/tokens/charts/palettes/cloudscape.js.map +1 -1
- package/dist/tokens/charts/palettes/colorbrewer.d.ts +338 -0
- package/dist/tokens/charts/palettes/colorbrewer.d.ts.map +1 -0
- package/dist/tokens/charts/palettes/colorbrewer.js.map +1 -1
- package/dist/tokens/charts/palettes/index.d.ts +24 -0
- package/dist/tokens/charts/palettes/index.d.ts.map +1 -0
- package/dist/tokens/charts/palettes/index.js.map +1 -1
- package/dist/tokens/charts/palettes/tableau.d.ts +11 -0
- package/dist/tokens/charts/palettes/tableau.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +5 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/types.d.ts +10 -0
- package/dist/tokens/types.d.ts.map +1 -0
- package/dist/tokens/utils.d.ts +9 -0
- package/dist/tokens/utils.d.ts.map +1 -0
- package/dist/tokens/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/tailwind.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/theme-provider/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as ConfigProvider,\n type ConfigProviderProps,\n} from \"antd/es/config-provider\";\nimport { Children, cloneElement, isValidElement, useLayoutEffect } from \"react\";\nimport { darkTheme, lightTheme } from \"../../tokens/and-theme/tokens\";\nimport { useCls, clsx, useAntdCssVarClassname } from \"../utils\";\nimport { StyleProvider } from \"@ant-design/cssinjs\";\n// Import component-specific styles\nimport \"./style.css\";\n\nexport interface ThemeProviderProps\n extends Omit<ConfigProviderProps, \"theme\" | \"prefixCls\"> {\n theme: \"light\" | \"dark\";\n appendClassesTo?: string | HTMLElement;\n}\n\nconst DSWrapper = ({\n children,\n theme,\n appendClassesTo,\n}: {\n children: React.ReactNode;\n theme: \"light\" | \"dark\";\n appendClassesTo?: string | HTMLElement;\n}) => {\n const cls = useCls();\n const cssVars = useAntdCssVarClassname();\n const className = clsx(cls(\"theme-provider\"), theme.toString(), cssVars);\n useLayoutEffect(() => {\n const classes = className.split(\" \");\n const el =\n typeof appendClassesTo === \"string\"\n ? document.querySelector(appendClassesTo)\n : appendClassesTo;\n if (el) {\n el.classList.add(...classes);\n }\n return () => {\n if (el) {\n el.classList.remove(...classes);\n }\n };\n }, [appendClassesTo, className]);\n return appendClassesTo === undefined\n ? Children.map(children, (child) => {\n if (isValidElement(child))\n return cloneElement(child, {\n className: clsx(\n (child.props as { className?: string }).className,\n className,\n ),\n } as { className: string });\n return child;\n })\n : children;\n};\n\nexport const ThemeProvider = ({\n theme,\n appendClassesTo,\n children,\n}: ThemeProviderProps) => {\n return (\n <StyleProvider layer>\n <ConfigProvider\n theme={theme == \"light\" ? lightTheme : darkTheme}\n prefixCls=\"ds\"\n >\n <DSWrapper theme={theme} appendClassesTo={appendClassesTo}>\n {children}\n </DSWrapper>\n </ConfigProvider>\n </StyleProvider>\n );\n};\n"],"names":["DSWrapper","children","theme","appendClassesTo","cls","useCls","cssVars","useAntdCssVarClassname","className","clsx","useLayoutEffect","classes","el","Children","child","isValidElement","cloneElement","ThemeProvider","jsx","StyleProvider","ConfigProvider","lightTheme","darkTheme"],"mappings":";;;;;;;;;AAkBA,MAAMA,IAAY,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AACF,MAIM;AACJ,QAAMC,IAAMC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/theme-provider/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as ConfigProvider,\n type ConfigProviderProps,\n} from \"antd/es/config-provider\";\nimport { Children, cloneElement, isValidElement, useLayoutEffect } from \"react\";\nimport { darkTheme, lightTheme } from \"../../tokens/and-theme/tokens\";\nimport { useCls, clsx, useAntdCssVarClassname } from \"../utils\";\nimport { StyleProvider } from \"@ant-design/cssinjs\";\n// Import component-specific styles\nimport \"./style.css\";\n\nexport interface ThemeProviderProps\n extends Omit<ConfigProviderProps, \"theme\" | \"prefixCls\"> {\n theme: \"light\" | \"dark\";\n appendClassesTo?: string | HTMLElement;\n}\n\nconst DSWrapper = ({\n children,\n theme,\n appendClassesTo,\n}: {\n children: React.ReactNode;\n theme: \"light\" | \"dark\";\n appendClassesTo?: string | HTMLElement;\n}) => {\n const cls = useCls();\n const cssVars = useAntdCssVarClassname();\n const className = clsx(cls(\"theme-provider\"), theme.toString(), cssVars);\n useLayoutEffect(() => {\n const classes = className.split(\" \");\n const el =\n typeof appendClassesTo === \"string\"\n ? document.querySelector(appendClassesTo)\n : appendClassesTo;\n if (el) {\n el.classList.add(...classes);\n }\n return () => {\n if (el) {\n el.classList.remove(...classes);\n }\n };\n }, [appendClassesTo, className]);\n return appendClassesTo === undefined\n ? Children.map(children, (child) => {\n if (isValidElement(child))\n return cloneElement(child, {\n className: clsx(\n (child.props as { className?: string }).className,\n className,\n ),\n } as { className: string });\n return child;\n })\n : children;\n};\n\nexport const ThemeProvider = ({\n theme,\n appendClassesTo,\n children,\n}: ThemeProviderProps) => {\n return (\n <StyleProvider layer>\n <ConfigProvider\n theme={theme == \"light\" ? lightTheme : darkTheme}\n prefixCls=\"ds\"\n >\n <DSWrapper theme={theme} appendClassesTo={appendClassesTo}>\n {children}\n </DSWrapper>\n </ConfigProvider>\n </StyleProvider>\n );\n};\n"],"names":["DSWrapper","children","theme","appendClassesTo","cls","useCls","cssVars","useAntdCssVarClassname","className","clsx","useLayoutEffect","classes","el","Children","child","isValidElement","cloneElement","ThemeProvider","jsx","StyleProvider","ConfigProvider","lightTheme","darkTheme"],"mappings":";;;;;;;;;AAkBA,MAAMA,IAAY,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AACF,MAIM;AACJ,QAAMC,IAAMC,EAAA,GACNC,IAAUC,EAAA,GACVC,IAAYC,EAAKL,EAAI,gBAAgB,GAAGF,EAAM,SAAA,GAAYI,CAAO;AACvE,SAAAI,EAAgB,MAAM;AACpB,UAAMC,IAAUH,EAAU,MAAM,GAAG,GAC7BI,IACJ,OAAOT,KAAoB,WACvB,SAAS,cAAcA,CAAe,IACtCA;AACN,WAAIS,KACFA,EAAG,UAAU,IAAI,GAAGD,CAAO,GAEtB,MAAM;AACX,MAAIC,KACFA,EAAG,UAAU,OAAO,GAAGD,CAAO;AAAA,IAElC;AAAA,EACF,GAAG,CAACR,GAAiBK,CAAS,CAAC,GACxBL,MAAoB,SACvBU,EAAS,IAAIZ,GAAU,CAACa,MAClBC,EAAeD,CAAK,IACfE,EAAaF,GAAO;AAAA,IACzB,WAAWL;AAAA,MACRK,EAAM,MAAiC;AAAA,MACxCN;AAAA,IAAA;AAAA,EACF,CACwB,IACrBM,CACR,IACDb;AACN,GAEagB,IAAgB,CAAC;AAAA,EAC5B,OAAAf;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAF;AACF,MAEI,gBAAAiB,EAACC,GAAA,EAAc,OAAK,IAClB,UAAA,gBAAAD;AAAA,EAACE;AAAA,EAAA;AAAA,IACC,OAAOlB,KAAS,UAAUmB,IAAaC;AAAA,IACvC,WAAU;AAAA,IAEV,UAAA,gBAAAJ,EAAClB,GAAA,EAAU,OAAAE,GAAc,iBAAAC,GACtB,UAAAF,EAAA,CACH;AAAA,EAAA;AAAA,GAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme-provider/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Toast as BaseToast } from '@base-ui-components/react';
|
|
2
|
+
import { ToastData } from './types';
|
|
3
|
+
declare function InnerToast({ toast, }: {
|
|
4
|
+
toast: BaseToast.Root.ToastObject<ToastData>;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ToastList({ className }: {
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function ToastProvider(props: BaseToast.Provider.Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Toast: typeof InnerToast & {
|
|
11
|
+
List: typeof ToastList;
|
|
12
|
+
Provider: typeof ToastProvider;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/toast/component.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AASpC,OAAO,aAAa,CAAC;AAErB,iBAAS,UAAU,CAAC,EAClB,KAAK,GACN,EAAE;IACD,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;CAC9C,2CAsFA;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAavD;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,2CAErD;AAED,eAAO,MAAM,KAAK;;;CAGhB,CAAC"}
|
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { XIcon as
|
|
3
|
+
import { XIcon as N, CircleNotchIcon as g, CheckCircleIcon as w, XCircleIcon as C, WarningCircleIcon as I, InfoIcon as T } from "@bioturing/assets";
|
|
4
4
|
import { Toast as t } from "@base-ui-components/react";
|
|
5
5
|
import { toastManager as a } from "./function.js";
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Modal as
|
|
6
|
+
import { useEffect as k, useCallback as b } from "react";
|
|
7
|
+
import { Button as v } from "../button/component.js";
|
|
8
|
+
import { Modal as x } from "../modal/index.js";
|
|
9
9
|
import './style.css';/* empty css */
|
|
10
|
-
import { isTracebackError as
|
|
11
|
-
import { CodeBlock as
|
|
12
|
-
import { useCls as
|
|
13
|
-
import { IconButton as
|
|
14
|
-
import { clsx as
|
|
15
|
-
function
|
|
16
|
-
toast:
|
|
10
|
+
import { isTracebackError as P } from "../utils/isTracebackError.js";
|
|
11
|
+
import { CodeBlock as B } from "../code-block/component.js";
|
|
12
|
+
import { useCls as p } from "../utils/antdUtils.js";
|
|
13
|
+
import { IconButton as M } from "../icon-button/component.js";
|
|
14
|
+
import { clsx as j } from "../utils/cn.js";
|
|
15
|
+
function f({
|
|
16
|
+
toast: o
|
|
17
17
|
}) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const { children: d, className: m, ...p } = N;
|
|
18
|
+
const e = p(), n = {
|
|
19
|
+
info: /* @__PURE__ */ r(T, { weight: "fill" }),
|
|
20
|
+
warning: /* @__PURE__ */ r(I, { weight: "fill" }),
|
|
21
|
+
error: /* @__PURE__ */ r(C, { weight: "fill" }),
|
|
22
|
+
success: /* @__PURE__ */ r(w, { weight: "fill" }),
|
|
23
|
+
progress: /* @__PURE__ */ r(g, {})
|
|
24
|
+
}, i = o.data?.type || "info", s = P(o?.description);
|
|
25
|
+
k(() => {
|
|
26
|
+
s && a.update(o.id, { timeout: 0 });
|
|
27
|
+
}, [s, o.id]);
|
|
28
|
+
const u = b(
|
|
29
|
+
(h) => {
|
|
30
|
+
const { children: l, className: d, ...m } = h;
|
|
32
31
|
return s ? /* @__PURE__ */ c(
|
|
33
32
|
"div",
|
|
34
33
|
{
|
|
35
|
-
...
|
|
36
|
-
className:
|
|
34
|
+
...m,
|
|
35
|
+
className: e(
|
|
37
36
|
"toast-description",
|
|
38
37
|
s ? "toast-description-traceback" : "",
|
|
39
|
-
|
|
38
|
+
d
|
|
40
39
|
),
|
|
41
40
|
children: [
|
|
42
41
|
/* @__PURE__ */ c("p", { children: [
|
|
@@ -45,52 +44,52 @@ function u({
|
|
|
45
44
|
"Please contact us with error details for support."
|
|
46
45
|
] }),
|
|
47
46
|
/* @__PURE__ */ r("p", { children: /* @__PURE__ */ r(
|
|
48
|
-
|
|
47
|
+
v,
|
|
49
48
|
{
|
|
50
49
|
size: "small",
|
|
51
50
|
onClick: () => {
|
|
52
|
-
|
|
51
|
+
x.open({
|
|
53
52
|
title: "Error details",
|
|
54
|
-
content: /* @__PURE__ */ r(
|
|
53
|
+
content: /* @__PURE__ */ r(B, { children: l }),
|
|
55
54
|
hideOkButton: !0
|
|
56
|
-
}), a.close(
|
|
55
|
+
}), a.close(o.id);
|
|
57
56
|
},
|
|
58
57
|
children: "View error details"
|
|
59
58
|
}
|
|
60
59
|
) })
|
|
61
60
|
]
|
|
62
61
|
}
|
|
63
|
-
) : /* @__PURE__ */ r("p", { ...
|
|
62
|
+
) : /* @__PURE__ */ r("p", { ...m, className: e("toast-description", d), children: l });
|
|
64
63
|
},
|
|
65
|
-
[s,
|
|
64
|
+
[s, e, o.id]
|
|
66
65
|
);
|
|
67
|
-
return /* @__PURE__ */ c(t.Root, { toast:
|
|
68
|
-
/* @__PURE__ */ r("span", { className:
|
|
69
|
-
/* @__PURE__ */ c("div", { className:
|
|
70
|
-
/* @__PURE__ */ r(t.Title, { className:
|
|
71
|
-
/* @__PURE__ */ r(t.Description, { render:
|
|
66
|
+
return /* @__PURE__ */ c(t.Root, { toast: o, className: e("toast"), children: [
|
|
67
|
+
/* @__PURE__ */ r("span", { className: e("toast-icon-wrap"), children: /* @__PURE__ */ r("span", { className: e("toast-icon", `toast-icon-${i}`), children: n[i] }) }),
|
|
68
|
+
/* @__PURE__ */ c("div", { className: e("toast-content"), children: [
|
|
69
|
+
/* @__PURE__ */ r(t.Title, { className: e("toast-title") }),
|
|
70
|
+
/* @__PURE__ */ r(t.Description, { render: u })
|
|
72
71
|
] }),
|
|
73
72
|
/* @__PURE__ */ r(
|
|
74
73
|
t.Close,
|
|
75
74
|
{
|
|
76
|
-
className:
|
|
77
|
-
render: /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(
|
|
75
|
+
className: e("toast-close"),
|
|
76
|
+
render: /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(M, { size: "small", children: /* @__PURE__ */ r(N, {}) }) })
|
|
78
77
|
}
|
|
79
78
|
)
|
|
80
79
|
] });
|
|
81
80
|
}
|
|
82
|
-
function
|
|
83
|
-
const { toasts:
|
|
84
|
-
return /* @__PURE__ */ r(t.Portal, { children: /* @__PURE__ */ r(t.Viewport, { className:
|
|
81
|
+
function E({ className: o }) {
|
|
82
|
+
const { toasts: e } = t.useToastManager(), n = p();
|
|
83
|
+
return /* @__PURE__ */ r(t.Portal, { children: /* @__PURE__ */ r(t.Viewport, { className: j(n("toast-viewport"), o), children: e.map((i) => /* @__PURE__ */ r(f, { toast: i }, i.id)) }) });
|
|
85
84
|
}
|
|
86
|
-
function
|
|
87
|
-
return /* @__PURE__ */ r(t.Provider, { toastManager: a, ...
|
|
85
|
+
function y(o) {
|
|
86
|
+
return /* @__PURE__ */ r(t.Provider, { toastManager: a, ...o });
|
|
88
87
|
}
|
|
89
|
-
const
|
|
90
|
-
List:
|
|
91
|
-
Provider:
|
|
88
|
+
const H = Object.assign(f, {
|
|
89
|
+
List: E,
|
|
90
|
+
Provider: y
|
|
92
91
|
});
|
|
93
92
|
export {
|
|
94
|
-
|
|
93
|
+
H as Toast
|
|
95
94
|
};
|
|
96
95
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/toast/component.tsx"],"sourcesContent":["\"use client\";\nimport { useCls, clsx } from \"../utils\";\nimport {\n CheckCircleIcon,\n CircleNotchIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n} from \"@bioturing/assets\";\nimport { Toast as BaseToast } from \"@base-ui-components/react\";\nimport { IconButton } from \"../icon-button\";\nimport { ToastData } from \"./types\";\nimport { toastManager } from \"./function\";\nimport { isTracebackError, type GenericHTMLProps } from \"../utils\";\nimport { useCallback, useEffect } from \"react\";\nimport { Button } from \"../button/component\";\nimport { Modal } from \"../modal\";\nimport { CodeBlock } from \"../code-block\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nfunction InnerToast({\n toast,\n}: {\n toast: BaseToast.Root.ToastObject<ToastData>;\n}) {\n const cls = useCls();\n const toastIconMap = {\n info: <InfoIcon weight=\"fill\" />,\n warning: <WarningCircleIcon weight=\"fill\" />,\n error: <XCircleIcon weight=\"fill\" />,\n success: <CheckCircleIcon weight=\"fill\" />,\n progress: <CircleNotchIcon />,\n };\n const type = toast.data?.type || \"info\";\n const isTraceback = isTracebackError(toast?.description);\n\n // Update manager timeout for traceback to disable auto-dismiss\n useEffect(() => {\n if (isTraceback) {\n toastManager.update(toast.id, { timeout: 0 });\n }\n }, [isTraceback, toast.id]);\n // console.log(toast);\n const renderDescription: BaseToast.Description.Props[\"render\"] = useCallback(\n (props: GenericHTMLProps) => {\n const { children, className, ...rest } = props;\n if (isTraceback) {\n return (\n <div\n {...rest}\n className={cls(\n \"toast-description\",\n isTraceback ? \"toast-description-traceback\" : \"\",\n className\n )}\n >\n <p>\n An unexpected error occurred.\n <br />\n Please contact us with error details for support.\n </p>\n <p>\n <Button\n size=\"small\"\n onClick={() => {\n Modal.open({\n title: \"Error details\",\n content: <CodeBlock>{children}</CodeBlock>,\n hideOkButton: true,\n });\n toastManager.close(toast.id);\n }}\n >\n View error details\n </Button>\n </p>\n </div>\n );\n }\n return (\n <p {...rest} className={cls(\"toast-description\", className)}>\n {children}\n </p>\n );\n },\n [isTraceback, cls, toast.id]\n );\n return (\n <BaseToast.Root toast={toast} className={cls(\"toast\")}>\n <span className={cls(\"toast-icon-wrap\")}>\n <span className={cls(\"toast-icon\", `toast-icon-${type}`)}>\n {toastIconMap[type]}\n </span>\n </span>\n <div className={cls(\"toast-content\")}>\n <BaseToast.Title className={cls(\"toast-title\")} />\n <BaseToast.Description render={renderDescription} />\n </div>\n <BaseToast.Close\n className={cls(\"toast-close\")}\n render={\n <span>\n <IconButton size=\"small\">\n <XIcon />\n </IconButton>\n </span>\n }\n ></BaseToast.Close>\n </BaseToast.Root>\n );\n}\n\nfunction ToastList({ className }: { className?: string }) {\n const { toasts } = BaseToast.useToastManager();\n const cls = useCls();\n\n return (\n <BaseToast.Portal>\n <BaseToast.Viewport className={clsx(cls(\"toast-viewport\"), className)}>\n {toasts.map((toast) => (\n <InnerToast key={toast.id} toast={toast} />\n ))}\n </BaseToast.Viewport>\n </BaseToast.Portal>\n );\n}\n\nfunction ToastProvider(props: BaseToast.Provider.Props) {\n return <BaseToast.Provider toastManager={toastManager} {...props} />;\n}\n\nexport const Toast = Object.assign(InnerToast, {\n List: ToastList,\n Provider: ToastProvider,\n});\n"],"names":["InnerToast","toast","cls","useCls","toastIconMap","jsx","InfoIcon","WarningCircleIcon","XCircleIcon","CheckCircleIcon","CircleNotchIcon","type","
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/toast/component.tsx"],"sourcesContent":["\"use client\";\nimport { useCls, clsx } from \"../utils\";\nimport {\n CheckCircleIcon,\n CircleNotchIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n} from \"@bioturing/assets\";\nimport { Toast as BaseToast } from \"@base-ui-components/react\";\nimport { IconButton } from \"../icon-button\";\nimport { ToastData } from \"./types\";\nimport { toastManager } from \"./function\";\nimport { isTracebackError, type GenericHTMLProps } from \"../utils\";\nimport { useCallback, useEffect } from \"react\";\nimport { Button } from \"../button/component\";\nimport { Modal } from \"../modal\";\nimport { CodeBlock } from \"../code-block\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nfunction InnerToast({\n toast,\n}: {\n toast: BaseToast.Root.ToastObject<ToastData>;\n}) {\n const cls = useCls();\n const toastIconMap = {\n info: <InfoIcon weight=\"fill\" />,\n warning: <WarningCircleIcon weight=\"fill\" />,\n error: <XCircleIcon weight=\"fill\" />,\n success: <CheckCircleIcon weight=\"fill\" />,\n progress: <CircleNotchIcon />,\n };\n const type = toast.data?.type || \"info\";\n const isTraceback = isTracebackError(toast?.description);\n\n // Update manager timeout for traceback to disable auto-dismiss\n useEffect(() => {\n if (isTraceback) {\n toastManager.update(toast.id, { timeout: 0 });\n }\n }, [isTraceback, toast.id]);\n // console.log(toast);\n const renderDescription: BaseToast.Description.Props[\"render\"] = useCallback(\n (props: GenericHTMLProps) => {\n const { children, className, ...rest } = props;\n if (isTraceback) {\n return (\n <div\n {...rest}\n className={cls(\n \"toast-description\",\n isTraceback ? \"toast-description-traceback\" : \"\",\n className\n )}\n >\n <p>\n An unexpected error occurred.\n <br />\n Please contact us with error details for support.\n </p>\n <p>\n <Button\n size=\"small\"\n onClick={() => {\n Modal.open({\n title: \"Error details\",\n content: <CodeBlock>{children}</CodeBlock>,\n hideOkButton: true,\n });\n toastManager.close(toast.id);\n }}\n >\n View error details\n </Button>\n </p>\n </div>\n );\n }\n return (\n <p {...rest} className={cls(\"toast-description\", className)}>\n {children}\n </p>\n );\n },\n [isTraceback, cls, toast.id]\n );\n return (\n <BaseToast.Root toast={toast} className={cls(\"toast\")}>\n <span className={cls(\"toast-icon-wrap\")}>\n <span className={cls(\"toast-icon\", `toast-icon-${type}`)}>\n {toastIconMap[type]}\n </span>\n </span>\n <div className={cls(\"toast-content\")}>\n <BaseToast.Title className={cls(\"toast-title\")} />\n <BaseToast.Description render={renderDescription} />\n </div>\n <BaseToast.Close\n className={cls(\"toast-close\")}\n render={\n <span>\n <IconButton size=\"small\">\n <XIcon />\n </IconButton>\n </span>\n }\n ></BaseToast.Close>\n </BaseToast.Root>\n );\n}\n\nfunction ToastList({ className }: { className?: string }) {\n const { toasts } = BaseToast.useToastManager();\n const cls = useCls();\n\n return (\n <BaseToast.Portal>\n <BaseToast.Viewport className={clsx(cls(\"toast-viewport\"), className)}>\n {toasts.map((toast) => (\n <InnerToast key={toast.id} toast={toast} />\n ))}\n </BaseToast.Viewport>\n </BaseToast.Portal>\n );\n}\n\nfunction ToastProvider(props: BaseToast.Provider.Props) {\n return <BaseToast.Provider toastManager={toastManager} {...props} />;\n}\n\nexport const Toast = Object.assign(InnerToast, {\n List: ToastList,\n Provider: ToastProvider,\n});\n"],"names":["InnerToast","toast","cls","useCls","toastIconMap","jsx","InfoIcon","WarningCircleIcon","XCircleIcon","CheckCircleIcon","CircleNotchIcon","type","isTraceback","isTracebackError","useEffect","toastManager","renderDescription","useCallback","props","children","className","rest","jsxs","Button","Modal","CodeBlock","BaseToast","IconButton","XIcon","ToastList","toasts","clsx","ToastProvider","Toast"],"mappings":";;;;;;;;;;;;;;AAuBA,SAASA,EAAW;AAAA,EAClB,OAAAC;AACF,GAEG;AACD,QAAMC,IAAMC,EAAA,GACNC,IAAe;AAAA,IACnB,MAAM,gBAAAC,EAACC,GAAA,EAAS,QAAO,OAAA,CAAO;AAAA,IAC9B,SAAS,gBAAAD,EAACE,GAAA,EAAkB,QAAO,OAAA,CAAO;AAAA,IAC1C,OAAO,gBAAAF,EAACG,GAAA,EAAY,QAAO,OAAA,CAAO;AAAA,IAClC,SAAS,gBAAAH,EAACI,GAAA,EAAgB,QAAO,OAAA,CAAO;AAAA,IACxC,4BAAWC,GAAA,CAAA,CAAgB;AAAA,EAAA,GAEvBC,IAAOV,EAAM,MAAM,QAAQ,QAC3BW,IAAcC,EAAiBZ,GAAO,WAAW;AAGvD,EAAAa,EAAU,MAAM;AACd,IAAIF,KACFG,EAAa,OAAOd,EAAM,IAAI,EAAE,SAAS,GAAG;AAAA,EAEhD,GAAG,CAACW,GAAaX,EAAM,EAAE,CAAC;AAE1B,QAAMe,IAA2DC;AAAA,IAC/D,CAACC,MAA4B;AAC3B,YAAM,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,MAASH;AACzC,aAAIN,IAEA,gBAAAU;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,GAAGD;AAAA,UACJ,WAAWnB;AAAA,YACT;AAAA,YACAU,IAAc,gCAAgC;AAAA,YAC9CQ;AAAA,UAAA;AAAA,UAGF,UAAA;AAAA,YAAA,gBAAAE,EAAC,KAAA,EAAE,UAAA;AAAA,cAAA;AAAA,gCAEA,MAAA,EAAG;AAAA,cAAE;AAAA,YAAA,GAER;AAAA,8BACC,KAAA,EACC,UAAA,gBAAAjB;AAAA,cAACkB;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS,MAAM;AACb,kBAAAC,EAAM,KAAK;AAAA,oBACT,OAAO;AAAA,oBACP,SAAS,gBAAAnB,EAACoB,GAAA,EAAW,UAAAN,EAAA,CAAS;AAAA,oBAC9B,cAAc;AAAA,kBAAA,CACf,GACDJ,EAAa,MAAMd,EAAM,EAAE;AAAA,gBAC7B;AAAA,gBACD,UAAA;AAAA,cAAA;AAAA,YAAA,EAED,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,IAKJ,gBAAAI,EAAC,OAAG,GAAGgB,GAAM,WAAWnB,EAAI,qBAAqBkB,CAAS,GACvD,UAAAD,GACH;AAAA,IAEJ;AAAA,IACA,CAACP,GAAaV,GAAKD,EAAM,EAAE;AAAA,EAAA;AAE7B,SACE,gBAAAqB,EAACI,EAAU,MAAV,EAAe,OAAAzB,GAAc,WAAWC,EAAI,OAAO,GAClD,UAAA;AAAA,IAAA,gBAAAG,EAAC,UAAK,WAAWH,EAAI,iBAAiB,GACpC,4BAAC,QAAA,EAAK,WAAWA,EAAI,cAAc,cAAcS,CAAI,EAAE,GACpD,UAAAP,EAAaO,CAAI,GACpB,GACF;AAAA,IACA,gBAAAW,EAAC,OAAA,EAAI,WAAWpB,EAAI,eAAe,GACjC,UAAA;AAAA,MAAA,gBAAAG,EAACqB,EAAU,OAAV,EAAgB,WAAWxB,EAAI,aAAa,GAAG;AAAA,MAChD,gBAAAG,EAACqB,EAAU,aAAV,EAAsB,QAAQV,EAAA,CAAmB;AAAA,IAAA,GACpD;AAAA,IACA,gBAAAX;AAAA,MAACqB,EAAU;AAAA,MAAV;AAAA,QACC,WAAWxB,EAAI,aAAa;AAAA,QAC5B,QACE,gBAAAG,EAAC,QAAA,EACC,UAAA,gBAAAA,EAACsB,GAAA,EAAW,MAAK,SACf,UAAA,gBAAAtB,EAACuB,GAAA,CAAA,CAAM,EAAA,CACT,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAEH,GACH;AAEJ;AAEA,SAASC,EAAU,EAAE,WAAAT,KAAqC;AACxD,QAAM,EAAE,QAAAU,EAAA,IAAWJ,EAAU,gBAAA,GACvBxB,IAAMC,EAAA;AAEZ,SACE,gBAAAE,EAACqB,EAAU,QAAV,EACC,UAAA,gBAAArB,EAACqB,EAAU,UAAV,EAAmB,WAAWK,EAAK7B,EAAI,gBAAgB,GAAGkB,CAAS,GACjE,UAAAU,EAAO,IAAI,CAAC7B,MACX,gBAAAI,EAACL,GAAA,EAA0B,OAAAC,EAAA,GAAVA,EAAM,EAAkB,CAC1C,EAAA,CACH,EAAA,CACF;AAEJ;AAEA,SAAS+B,EAAcd,GAAiC;AACtD,2BAAQQ,EAAU,UAAV,EAAmB,cAAAX,GAA6B,GAAGG,GAAO;AACpE;AAEO,MAAMe,IAAQ,OAAO,OAAOjC,GAAY;AAAA,EAC7C,MAAM6B;AAAA,EACN,UAAUG;AACZ,CAAC;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Toast as BaseToast } from '@base-ui-components/react';
|
|
2
|
+
import { ToastData } from './types';
|
|
3
|
+
export declare const toastManager: BaseToast.createToastManager.ToastManager;
|
|
4
|
+
export declare const toast: ((message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string) & {
|
|
5
|
+
info: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
|
|
6
|
+
success: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
|
|
7
|
+
error: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
|
|
8
|
+
warning: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
|
|
9
|
+
progress: (message: string, options?: Omit<BaseToast.useToastManager.AddOptions<ToastData>, "data" | "description">) => string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../src/components/toast/function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,YAAY,2CAAiC,CAAC;AAuB3D,eAAO,MAAM,KAAK,aAnBL,MAAM,YACL,IAAI,CACZ,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,EAC/C,MAAM,GAAG,aAAa,CACvB;oBAJQ,MAAM,YACL,IAAI,CACZ,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,EAC/C,MAAM,GAAG,aAAa,CACvB;uBAJQ,MAAM,YACL,IAAI,CACZ,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,EAC/C,MAAM,GAAG,aAAa,CACvB;qBAJQ,MAAM,YACL,IAAI,CACZ,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,EAC/C,MAAM,GAAG,aAAa,CACvB;uBAJQ,MAAM,YACL,IAAI,CACZ,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,EAC/C,MAAM,GAAG,aAAa,CACvB;wBAJQ,MAAM,YACL,IAAI,CACZ,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,EAC/C,MAAM,GAAG,aAAa,CACvB;CAqBH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.js","sources":["../../../src/components/toast/function.ts"],"sourcesContent":["\"use client\";\nimport { Toast as BaseToast } from \"@base-ui-components/react\";\nimport type { ToastData } from \"./types\";\n\nexport const toastManager = BaseToast.createToastManager();\n\nfunction createToastTypeFunction(type: ToastData[\"type\"]) {\n return (\n message: string,\n options?: Omit<\n BaseToast.useToastManager.AddOptions<ToastData>,\n \"data\" | \"description\"\n >\n ) => {\n const toastId = toastManager.add<ToastData>({\n description: message,\n data: {\n type: type,\n },\n // progress and error toasts should not auto close\n ...(type === \"progress\" || type === \"error\" ? { timeout: 0 } : {}),\n ...options,\n });\n return toastId;\n };\n}\n\nexport const toast = Object.assign(createToastTypeFunction(\"info\"), {\n info: createToastTypeFunction(\"info\"),\n success: createToastTypeFunction(\"success\"),\n error: createToastTypeFunction(\"error\"),\n warning: createToastTypeFunction(\"warning\"),\n progress: createToastTypeFunction(\"progress\"),\n});\n"],"names":["toastManager","BaseToast","createToastTypeFunction","type","message","options","toast"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"function.js","sources":["../../../src/components/toast/function.ts"],"sourcesContent":["\"use client\";\nimport { Toast as BaseToast } from \"@base-ui-components/react\";\nimport type { ToastData } from \"./types\";\n\nexport const toastManager = BaseToast.createToastManager();\n\nfunction createToastTypeFunction(type: ToastData[\"type\"]) {\n return (\n message: string,\n options?: Omit<\n BaseToast.useToastManager.AddOptions<ToastData>,\n \"data\" | \"description\"\n >\n ) => {\n const toastId = toastManager.add<ToastData>({\n description: message,\n data: {\n type: type,\n },\n // progress and error toasts should not auto close\n ...(type === \"progress\" || type === \"error\" ? { timeout: 0 } : {}),\n ...options,\n });\n return toastId;\n };\n}\n\nexport const toast = Object.assign(createToastTypeFunction(\"info\"), {\n info: createToastTypeFunction(\"info\"),\n success: createToastTypeFunction(\"success\"),\n error: createToastTypeFunction(\"error\"),\n warning: createToastTypeFunction(\"warning\"),\n progress: createToastTypeFunction(\"progress\"),\n});\n"],"names":["toastManager","BaseToast","createToastTypeFunction","type","message","options","toast"],"mappings":";;AAIO,MAAMA,IAAeC,EAAU,mBAAA;AAEtC,SAASC,EAAwBC,GAAyB;AACxD,SAAO,CACLC,GACAC,MAKgBL,EAAa,IAAe;AAAA,IAC1C,aAAaI;AAAA,IACb,MAAM;AAAA,MACJ,MAAAD;AAAA,IAAA;AAAA;AAAA,IAGF,GAAIA,MAAS,cAAcA,MAAS,UAAU,EAAE,SAAS,EAAA,IAAM,CAAA;AAAA,IAC/D,GAAGE;AAAA,EAAA,CACJ;AAGL;AAEO,MAAMC,IAAQ,OAAO,OAAOJ,EAAwB,MAAM,GAAG;AAAA,EAClE,MAAMA,EAAwB,MAAM;AAAA,EACpC,SAASA,EAAwB,SAAS;AAAA,EAC1C,OAAOA,EAAwB,OAAO;AAAA,EACtC,SAASA,EAAwB,SAAS;AAAA,EAC1C,UAAUA,EAAwB,UAAU;AAC9C,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TooltipProps as AntTooltipProps } from 'antd/es/tooltip';
|
|
2
|
+
export type TooltipProps = AntTooltipProps & {
|
|
3
|
+
/**
|
|
4
|
+
* Arrow config for of the tooltip
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
arrow?: AntTooltipProps["arrow"];
|
|
8
|
+
};
|
|
9
|
+
export declare const Tooltip: ({ arrow, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/component.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,YAAY,IAAI,eAAe,EACrC,MAAM,iBAAiB,CAAC;AAGzB,OAAO,aAAa,CAAC;AAGrB,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,oBAA4B,YAAY,4CAE/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/tooltip/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTooltip,\n type TooltipProps as AntTooltipProps,\n} from \"antd/es/tooltip\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's TooltipProps\nexport type TooltipProps = AntTooltipProps & {\n /**\n * Arrow config for of the tooltip\n * @default false\n */\n arrow?: AntTooltipProps[\"arrow\"];\n};\n\n// Create Tooltip component\nexport const Tooltip = ({ arrow = false, ...rest }: TooltipProps) => {\n return <AntTooltip arrow={arrow} {...rest} />;\n};\n"],"names":["Tooltip","arrow","rest","jsx","AntTooltip"],"mappings":";;;;AAmBO,MAAMA,IAAU,CAAC,EAAE,OAAAC,IAAQ,IAAO,GAAGC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/tooltip/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTooltip,\n type TooltipProps as AntTooltipProps,\n} from \"antd/es/tooltip\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's TooltipProps\nexport type TooltipProps = AntTooltipProps & {\n /**\n * Arrow config for of the tooltip\n * @default false\n */\n arrow?: AntTooltipProps[\"arrow\"];\n};\n\n// Create Tooltip component\nexport const Tooltip = ({ arrow = false, ...rest }: TooltipProps) => {\n return <AntTooltip arrow={arrow} {...rest} />;\n};\n"],"names":["Tooltip","arrow","rest","jsx","AntTooltip"],"mappings":";;;;AAmBO,MAAMA,IAAU,CAAC,EAAE,OAAAC,IAAQ,IAAO,GAAGC,QACnC,gBAAAC,EAACC,GAAA,EAAW,OAAAH,GAAe,GAAGC,EAAA,CAAM;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TourProps as AntTourProps, TourStepProps as AntTourStepProps } from 'antd/es/tour/interface';
|
|
2
|
+
export interface TourProps extends AntTourProps {
|
|
3
|
+
}
|
|
4
|
+
export interface TourStepProps extends AntTourStepProps {
|
|
5
|
+
}
|
|
6
|
+
declare const Tour: ({ indicatorsRender, ...rest }: TourProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tour };
|
|
8
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/tour/component.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,IAAI,YAAY,EAC9B,KAAK,aAAa,IAAI,gBAAgB,EACvC,MAAM,wBAAwB,CAAC;AAIhC,OAAO,aAAa,CAAC;AAGrB,MAAM,WAAW,SAAU,SAAQ,YAAY;CAAG;AAGlD,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CAAG;AAG1D,QAAA,MAAM,IAAI,GAAI,+BAA+B,SAAS,4CA0BrD,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/tour/component.tsx"],"sourcesContent":["\"use client\";\nimport { default as AntTour } from \"antd/es/tour\";\nimport {\n type TourProps as AntTourProps,\n type TourStepProps as AntTourStepProps,\n} from \"antd/es/tour/interface\";\nimport { useCls, clsx } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's TourProps\nexport interface TourProps extends AntTourProps {}\n\n// Define props interface for TourStepProps\nexport interface TourStepProps extends AntTourStepProps {}\n\n// Create Tour component\nconst Tour = ({ indicatorsRender, ...rest }: TourProps) => {\n const cls = useCls();\n const defaultIndicatorRender = (current: number, total: number) => (\n <div className={cls(\"tour-indicator-wrapper\")}>\n <span className={cls(\"tour-indicator-summary-text\")}>\n {current + 1}/{total}\n </span>\n <div>\n {Array.from({ length: total }).map<React.ReactNode>((_, index) => (\n <span\n key={index}\n className={clsx(\n index === current && cls(`tour-indicator-active`),\n cls(\"tour-indicator\")\n )}\n />\n ))}\n </div>\n </div>\n );\n return (\n <AntTour\n indicatorsRender={indicatorsRender || defaultIndicatorRender}\n {...rest}\n />\n );\n};\n\nexport { Tour };\n"],"names":["Tour","indicatorsRender","rest","cls","useCls","jsx","AntTour","current","total","jsxs","_","index","clsx"],"mappings":";;;;;;AAkBA,MAAMA,IAAO,CAAC,EAAE,kBAAAC,GAAkB,GAAGC,QAAsB;AACzD,QAAMC,IAAMC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/tour/component.tsx"],"sourcesContent":["\"use client\";\nimport { default as AntTour } from \"antd/es/tour\";\nimport {\n type TourProps as AntTourProps,\n type TourStepProps as AntTourStepProps,\n} from \"antd/es/tour/interface\";\nimport { useCls, clsx } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's TourProps\nexport interface TourProps extends AntTourProps {}\n\n// Define props interface for TourStepProps\nexport interface TourStepProps extends AntTourStepProps {}\n\n// Create Tour component\nconst Tour = ({ indicatorsRender, ...rest }: TourProps) => {\n const cls = useCls();\n const defaultIndicatorRender = (current: number, total: number) => (\n <div className={cls(\"tour-indicator-wrapper\")}>\n <span className={cls(\"tour-indicator-summary-text\")}>\n {current + 1}/{total}\n </span>\n <div>\n {Array.from({ length: total }).map<React.ReactNode>((_, index) => (\n <span\n key={index}\n className={clsx(\n index === current && cls(`tour-indicator-active`),\n cls(\"tour-indicator\")\n )}\n />\n ))}\n </div>\n </div>\n );\n return (\n <AntTour\n indicatorsRender={indicatorsRender || defaultIndicatorRender}\n {...rest}\n />\n );\n};\n\nexport { Tour };\n"],"names":["Tour","indicatorsRender","rest","cls","useCls","jsx","AntTour","current","total","jsxs","_","index","clsx"],"mappings":";;;;;;AAkBA,MAAMA,IAAO,CAAC,EAAE,kBAAAC,GAAkB,GAAGC,QAAsB;AACzD,QAAMC,IAAMC,EAAA;AAmBZ,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,kBAAkBL,MApBS,CAACM,GAAiBC,wBAC9C,OAAA,EAAI,WAAWL,EAAI,wBAAwB,GAC1C,UAAA;AAAA,QAAA,gBAAAM,EAAC,QAAA,EAAK,WAAWN,EAAI,6BAA6B,GAC/C,UAAA;AAAA,UAAAI,IAAU;AAAA,UAAE;AAAA,UAAEC;AAAA,QAAA,GACjB;AAAA,QACA,gBAAAH,EAAC,OAAA,EACE,UAAA,MAAM,KAAK,EAAE,QAAQG,EAAA,CAAO,EAAE,IAAqB,CAACE,GAAGC,MACtD,gBAAAN;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAWO;AAAA,cACTD,MAAUJ,KAAWJ,EAAI,uBAAuB;AAAA,cAChDA,EAAI,gBAAgB;AAAA,YAAA;AAAA,UACtB;AAAA,UAJKQ;AAAA,QAAA,CAMR,EAAA,CACH;AAAA,MAAA,GACF;AAAA,MAKG,GAAGT;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tour/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { useRender } from '@base-ui-components/react/use-render';
|
|
3
|
+
export type TransitionProps = Omit<useRender.ComponentProps<"div">, "render" | "children"> & {
|
|
4
|
+
/** Whether the component should be shown */
|
|
5
|
+
show?: boolean;
|
|
6
|
+
/** CSS classes to apply when the component is opened */
|
|
7
|
+
starting?: string | CSSProperties;
|
|
8
|
+
/** CSS classes to apply when the component is closed */
|
|
9
|
+
ending?: string | CSSProperties;
|
|
10
|
+
/** CSS classes to apply to the component */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Keep mounted */
|
|
13
|
+
keepMounted?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Callback function to be called when the transition ends
|
|
16
|
+
*/
|
|
17
|
+
onTransitionComplete?: (show?: boolean) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to listen for animations in child elements
|
|
20
|
+
*/
|
|
21
|
+
listenToChildAnimations?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to render the child as a child element
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
children?: React.ReactNode | useRender.ComponentProps<"div">["render"];
|
|
28
|
+
};
|
|
29
|
+
export declare function Transition({ children, className, starting, ending, show, keepMounted, onTransitionComplete, listenToChildAnimations, asChild, ...otherProps }: TransitionProps): null;
|
|
30
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/transition/component.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EAMd,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAMjE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,EAC/B,QAAQ,GAAG,UAAU,CACtB,GAAG;IACF,4CAA4C;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IAClC,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IAChC,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;CACxE,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,QAAkB,EAClB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,IAAW,EACX,WAAmB,EACnB,oBAAoB,EACpB,uBAA+B,EAC/B,OAAc,EACd,GAAG,UAAU,EACd,EAAE,eAAe,QAyEjB"}
|
|
@@ -2,63 +2,63 @@
|
|
|
2
2
|
import { jsx as y } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as j, useRef as F, useCallback as A, isValidElement as E, useEffect as N } from "react";
|
|
4
4
|
import { useRender as S } from "@base-ui-components/react/use-render";
|
|
5
|
-
import { mergeProps as
|
|
6
|
-
import { useTransitionStatus as
|
|
5
|
+
import { mergeProps as T } from "@base-ui-components/react/merge-props";
|
|
6
|
+
import { useTransitionStatus as C } from "../hooks/useTransitionStatus.js";
|
|
7
7
|
import './style.css';/* empty css */
|
|
8
|
-
import { useLatestRef as
|
|
9
|
-
import { useCls as
|
|
10
|
-
import { clsx as
|
|
11
|
-
function
|
|
12
|
-
children:
|
|
13
|
-
className:
|
|
14
|
-
starting:
|
|
15
|
-
ending:
|
|
8
|
+
import { useLatestRef as L, useAnimationsFinished as O } from "../hooks/base-ui.js";
|
|
9
|
+
import { useCls as P } from "../utils/antdUtils.js";
|
|
10
|
+
import { clsx as V } from "../utils/cn.js";
|
|
11
|
+
function Q({
|
|
12
|
+
children: r = /* @__PURE__ */ y("div", {}),
|
|
13
|
+
className: f,
|
|
14
|
+
starting: o,
|
|
15
|
+
ending: s,
|
|
16
16
|
show: t = !0,
|
|
17
|
-
keepMounted:
|
|
18
|
-
onTransitionComplete:
|
|
17
|
+
keepMounted: i = !1,
|
|
18
|
+
onTransitionComplete: u,
|
|
19
19
|
listenToChildAnimations: b = !1,
|
|
20
20
|
asChild: m = !0,
|
|
21
21
|
...v
|
|
22
22
|
}) {
|
|
23
|
-
const { mounted:
|
|
24
|
-
() =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const { mounted: n, setMounted: a, transitionStatus: e } = C(t), c = L(t), p = P(), R = j(
|
|
24
|
+
() => V(
|
|
25
|
+
f,
|
|
26
|
+
e === "starting" && typeof o == "string" && o,
|
|
27
|
+
e === "ending" && typeof s == "string" && s,
|
|
28
28
|
// hide by display: none when not mounted and keepMounted is true
|
|
29
|
-
|
|
29
|
+
n == !1 && i ? p("transition-hidden") : void 0
|
|
30
30
|
),
|
|
31
|
-
[
|
|
32
|
-
),
|
|
31
|
+
[f, o, s, e, n, i, p]
|
|
32
|
+
), d = F(null), l = O(d, {
|
|
33
33
|
waitForNextTick: t,
|
|
34
34
|
subtree: b
|
|
35
|
-
}), g = A(() => typeof
|
|
35
|
+
}), g = A(() => typeof r == "function" || m && E(r) ? r : /* @__PURE__ */ y("div", { children: r }), [r, m]), x = S({
|
|
36
36
|
render: g(),
|
|
37
|
-
props:
|
|
38
|
-
ref:
|
|
37
|
+
props: T(v, {
|
|
38
|
+
ref: d,
|
|
39
39
|
className: R,
|
|
40
|
-
"data-starting":
|
|
41
|
-
"data-ending":
|
|
40
|
+
"data-starting": e === "starting" ? "true" : void 0,
|
|
41
|
+
"data-ending": e === "ending" ? "true" : void 0,
|
|
42
42
|
style: {
|
|
43
|
-
...
|
|
44
|
-
...
|
|
43
|
+
...e === "starting" && typeof o == "object" ? o : {},
|
|
44
|
+
...e === "ending" && typeof s == "object" ? s : {}
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
});
|
|
48
48
|
return N(() => {
|
|
49
49
|
l(() => {
|
|
50
|
-
t === c.current && (a(t),
|
|
50
|
+
t === c.current && (a(t), u?.(t));
|
|
51
51
|
});
|
|
52
52
|
}, [
|
|
53
53
|
t,
|
|
54
|
-
|
|
54
|
+
i,
|
|
55
55
|
l,
|
|
56
56
|
a,
|
|
57
57
|
c,
|
|
58
|
-
|
|
59
|
-
]),
|
|
58
|
+
u
|
|
59
|
+
]), n || i ? x : null;
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
Q as Transition
|
|
63
63
|
};
|
|
64
64
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/transition/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n CSSProperties,\n isValidElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from \"react\";\nimport { useRender } from \"@base-ui-components/react/use-render\";\nimport { mergeProps } from \"@base-ui-components/react/merge-props\";\nimport { useTransitionStatus } from \"../hooks/useTransitionStatus\";\nimport { clsx, useCls } from \"../utils\";\nimport { useAnimationsFinished, useLatestRef } from \"../hooks\";\n\nimport \"./style.css\";\n\nexport type TransitionProps = Omit<\n useRender.ComponentProps<\"div\">,\n \"render\" | \"children\"\n> & {\n /** Whether the component should be shown */\n show?: boolean;\n /** CSS classes to apply when the component is opened */\n starting?: string | CSSProperties;\n /** CSS classes to apply when the component is closed */\n ending?: string | CSSProperties;\n /** CSS classes to apply to the component */\n className?: string;\n /** Keep mounted */\n keepMounted?: boolean;\n /**\n * Callback function to be called when the transition ends\n */\n onTransitionComplete?: (show?: boolean) => void;\n /**\n * Whether to listen for animations in child elements\n */\n listenToChildAnimations?: boolean;\n /**\n * Whether to render the child as a child element\n * @default true\n */\n asChild?: boolean;\n children?: React.ReactNode | useRender.ComponentProps<\"div\">[\"render\"];\n};\n\nexport function Transition({\n children = <div />,\n className,\n starting,\n ending,\n show = true,\n keepMounted = false,\n onTransitionComplete,\n listenToChildAnimations = false,\n asChild = true,\n ...otherProps\n}: TransitionProps) {\n const { mounted, setMounted, transitionStatus } = useTransitionStatus(show);\n const showRef = useLatestRef(show);\n\n const cls = useCls();\n\n const combinedClassName = useMemo(\n () =>\n clsx(\n className,\n transitionStatus === \"starting\" &&\n typeof starting == \"string\" &&\n starting,\n transitionStatus === \"ending\" && typeof ending == \"string\" && ending,\n // hide by display: none when not mounted and keepMounted is true\n mounted == false && keepMounted ? cls(\"transition-hidden\") : undefined\n ),\n [className, starting, ending, transitionStatus, mounted, keepMounted, cls]\n );\n\n const ref = useRef<HTMLDivElement>(null);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, {\n waitForNextTick: show,\n subtree: listenToChildAnimations,\n });\n\n const getRender = useCallback(() => {\n if (typeof children === \"function\") {\n return children;\n }\n if (asChild && isValidElement(children)) {\n return children;\n }\n return <div>{children}</div>;\n }, [children, asChild]);\n\n const rendered = useRender({\n render: getRender(),\n props: mergeProps<\"div\">(otherProps, {\n ref,\n className: combinedClassName,\n ...{\n \"data-starting\": transitionStatus === \"starting\" ? \"true\" : undefined,\n \"data-ending\": transitionStatus === \"ending\" ? \"true\" : undefined,\n },\n style: {\n ...(transitionStatus === \"starting\" && typeof starting === \"object\"\n ? starting\n : {}),\n ...(transitionStatus === \"ending\" && typeof ending === \"object\"\n ? ending\n : {}),\n },\n }),\n });\n\n useEffect(() => {\n runOnceAnimationsFinish(() => {\n if (show === showRef.current) {\n setMounted(show);\n onTransitionComplete?.(show);\n }\n });\n }, [\n show,\n keepMounted,\n runOnceAnimationsFinish,\n setMounted,\n showRef,\n onTransitionComplete,\n ]);\n\n return mounted || keepMounted ? rendered : null;\n}\n"],"names":["Transition","children","className","starting","ending","show","keepMounted","onTransitionComplete","listenToChildAnimations","asChild","otherProps","mounted","setMounted","transitionStatus","useTransitionStatus","showRef","useLatestRef","cls","useCls","combinedClassName","useMemo","clsx","ref","useRef","runOnceAnimationsFinish","useAnimationsFinished","getRender","useCallback","isValidElement","jsx","rendered","useRender","mergeProps","useEffect"],"mappings":";;;;;;;;;;AA+CO,SAASA,EAAW;AAAA,EACzB,UAAAC,sBAAY,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/transition/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n CSSProperties,\n isValidElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from \"react\";\nimport { useRender } from \"@base-ui-components/react/use-render\";\nimport { mergeProps } from \"@base-ui-components/react/merge-props\";\nimport { useTransitionStatus } from \"../hooks/useTransitionStatus\";\nimport { clsx, useCls } from \"../utils\";\nimport { useAnimationsFinished, useLatestRef } from \"../hooks\";\n\nimport \"./style.css\";\n\nexport type TransitionProps = Omit<\n useRender.ComponentProps<\"div\">,\n \"render\" | \"children\"\n> & {\n /** Whether the component should be shown */\n show?: boolean;\n /** CSS classes to apply when the component is opened */\n starting?: string | CSSProperties;\n /** CSS classes to apply when the component is closed */\n ending?: string | CSSProperties;\n /** CSS classes to apply to the component */\n className?: string;\n /** Keep mounted */\n keepMounted?: boolean;\n /**\n * Callback function to be called when the transition ends\n */\n onTransitionComplete?: (show?: boolean) => void;\n /**\n * Whether to listen for animations in child elements\n */\n listenToChildAnimations?: boolean;\n /**\n * Whether to render the child as a child element\n * @default true\n */\n asChild?: boolean;\n children?: React.ReactNode | useRender.ComponentProps<\"div\">[\"render\"];\n};\n\nexport function Transition({\n children = <div />,\n className,\n starting,\n ending,\n show = true,\n keepMounted = false,\n onTransitionComplete,\n listenToChildAnimations = false,\n asChild = true,\n ...otherProps\n}: TransitionProps) {\n const { mounted, setMounted, transitionStatus } = useTransitionStatus(show);\n const showRef = useLatestRef(show);\n\n const cls = useCls();\n\n const combinedClassName = useMemo(\n () =>\n clsx(\n className,\n transitionStatus === \"starting\" &&\n typeof starting == \"string\" &&\n starting,\n transitionStatus === \"ending\" && typeof ending == \"string\" && ending,\n // hide by display: none when not mounted and keepMounted is true\n mounted == false && keepMounted ? cls(\"transition-hidden\") : undefined\n ),\n [className, starting, ending, transitionStatus, mounted, keepMounted, cls]\n );\n\n const ref = useRef<HTMLDivElement>(null);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, {\n waitForNextTick: show,\n subtree: listenToChildAnimations,\n });\n\n const getRender = useCallback(() => {\n if (typeof children === \"function\") {\n return children;\n }\n if (asChild && isValidElement(children)) {\n return children;\n }\n return <div>{children}</div>;\n }, [children, asChild]);\n\n const rendered = useRender({\n render: getRender(),\n props: mergeProps<\"div\">(otherProps, {\n ref,\n className: combinedClassName,\n ...{\n \"data-starting\": transitionStatus === \"starting\" ? \"true\" : undefined,\n \"data-ending\": transitionStatus === \"ending\" ? \"true\" : undefined,\n },\n style: {\n ...(transitionStatus === \"starting\" && typeof starting === \"object\"\n ? starting\n : {}),\n ...(transitionStatus === \"ending\" && typeof ending === \"object\"\n ? ending\n : {}),\n },\n }),\n });\n\n useEffect(() => {\n runOnceAnimationsFinish(() => {\n if (show === showRef.current) {\n setMounted(show);\n onTransitionComplete?.(show);\n }\n });\n }, [\n show,\n keepMounted,\n runOnceAnimationsFinish,\n setMounted,\n showRef,\n onTransitionComplete,\n ]);\n\n return mounted || keepMounted ? rendered : null;\n}\n"],"names":["Transition","children","className","starting","ending","show","keepMounted","onTransitionComplete","listenToChildAnimations","asChild","otherProps","mounted","setMounted","transitionStatus","useTransitionStatus","showRef","useLatestRef","cls","useCls","combinedClassName","useMemo","clsx","ref","useRef","runOnceAnimationsFinish","useAnimationsFinished","getRender","useCallback","isValidElement","jsx","rendered","useRender","mergeProps","useEffect"],"mappings":";;;;;;;;;;AA+CO,SAASA,EAAW;AAAA,EACzB,UAAAC,sBAAY,OAAA,EAAI;AAAA,EAChB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,aAAAC,IAAc;AAAA,EACd,sBAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,GAAoB;AAClB,QAAM,EAAE,SAAAC,GAAS,YAAAC,GAAY,kBAAAC,EAAA,IAAqBC,EAAoBT,CAAI,GACpEU,IAAUC,EAAaX,CAAI,GAE3BY,IAAMC,EAAA,GAENC,IAAoBC;AAAA,IACxB,MACEC;AAAA,MACEnB;AAAA,MACAW,MAAqB,cACnB,OAAOV,KAAY,YACnBA;AAAA,MACFU,MAAqB,YAAY,OAAOT,KAAU,YAAYA;AAAA;AAAA,MAE9DO,KAAW,MAASL,IAAcW,EAAI,mBAAmB,IAAI;AAAA,IAAA;AAAA,IAEjE,CAACf,GAAWC,GAAUC,GAAQS,GAAkBF,GAASL,GAAaW,CAAG;AAAA,EAAA,GAGrEK,IAAMC,EAAuB,IAAI,GACjCC,IAA0BC,EAAsBH,GAAK;AAAA,IACzD,iBAAiBjB;AAAA,IACjB,SAASG;AAAA,EAAA,CACV,GAEKkB,IAAYC,EAAY,MACxB,OAAO1B,KAAa,cAGpBQ,KAAWmB,EAAe3B,CAAQ,IAC7BA,IAEF,gBAAA4B,EAAC,SAAK,UAAA5B,GAAS,GACrB,CAACA,GAAUQ,CAAO,CAAC,GAEhBqB,IAAWC,EAAU;AAAA,IACzB,QAAQL,EAAA;AAAA,IACR,OAAOM,EAAkBtB,GAAY;AAAA,MACnC,KAAAY;AAAA,MACA,WAAWH;AAAA,MAET,iBAAiBN,MAAqB,aAAa,SAAS;AAAA,MAC5D,eAAeA,MAAqB,WAAW,SAAS;AAAA,MAE1D,OAAO;AAAA,QACL,GAAIA,MAAqB,cAAc,OAAOV,KAAa,WACvDA,IACA,CAAA;AAAA,QACJ,GAAIU,MAAqB,YAAY,OAAOT,KAAW,WACnDA,IACA,CAAA;AAAA,MAAC;AAAA,IACP,CACD;AAAA,EAAA,CACF;AAED,SAAA6B,EAAU,MAAM;AACd,IAAAT,EAAwB,MAAM;AAC5B,MAAInB,MAASU,EAAQ,YACnBH,EAAWP,CAAI,GACfE,IAAuBF,CAAI;AAAA,IAE/B,CAAC;AAAA,EACH,GAAG;AAAA,IACDA;AAAA,IACAC;AAAA,IACAkB;AAAA,IACAZ;AAAA,IACAG;AAAA,IACAR;AAAA,EAAA,CACD,GAEMI,KAAWL,IAAcwB,IAAW;AAC7C;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/transition/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as AntTree, DataNode as AntTreeDataNode } from 'antd/es/tree';
|
|
2
|
+
import { TreeDataNode, TreeProps, DirectoryTreeProps } from './types';
|
|
3
|
+
declare const MainTreeInner: <T extends AntTreeDataNode = TreeDataNode>(props: TreeProps<T>, ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const DirectoryTreeInner: <T extends AntTreeDataNode = TreeDataNode>(props: DirectoryTreeProps<T>, ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Tree: (<T extends AntTreeDataNode = AntTreeDataNode>(props: TreeProps<T> & {
|
|
6
|
+
ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>;
|
|
7
|
+
}) => ReturnType<typeof MainTreeInner<T>>) & {
|
|
8
|
+
DirectoryTree: <T extends AntTreeDataNode = AntTreeDataNode>(props: DirectoryTreeProps<T> & {
|
|
9
|
+
ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>;
|
|
10
|
+
}) => ReturnType<typeof DirectoryTreeInner<T>>;
|
|
11
|
+
TreeNode: import('react').FC<Readonly<import('rc-tree').TreeNodeProps<AntTreeDataNode>>>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/tree/components.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,QAAQ,IAAI,eAAe,EACjC,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG3E,OAAO,aAAa,CAAC;AAIrB,QAAA,MAAM,aAAa,GAAI,CAAC,SAAS,eAAe,GAAG,YAAY,EAC7D,OAAO,SAAS,CAAC,CAAC,CAAC,EACnB,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,4CA8BtD,CAAC;AAGF,QAAA,MAAM,kBAAkB,GAAI,CAAC,SAAS,eAAe,GAAG,YAAY,EAClE,OAAO,kBAAkB,CAAC,CAAC,CAAC,EAC5B,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,4CA8BtD,CAAC;AAsBF,eAAO,MAAM,IAAI,IAjBf,CAAC,SAAS,eAAe,2BAElB,SAAS,CAAC,CAAC,CAAC,GAAG;IACpB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACjE,KACE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;oBAItC,CAAC,SAAS,eAAe,2BAElB,kBAAkB,CAAC,CAAC,CAAC,GAAG;QAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACjE,KACE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;;CAM3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sources":["../../../src/components/tree/components.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTree,\n type DataNode as AntTreeDataNode,\n} from \"antd/es/tree\";\n\nimport { forwardRef } from \"react\";\nimport { clsx } from \"../utils\";\nimport type { TreeDataNode, TreeProps, DirectoryTreeProps } from \"./types\";\nimport { useTreeCommon } from \"./useTreeCommon\";\n\nimport \"./style.css\";\n\n// Create inner function for main Tree with forwarded ref\n// Ensure generic constraint matches TreeProps if it uses AntTreeDataNode\nconst MainTreeInner = <T extends AntTreeDataNode = TreeDataNode>(\n props: TreeProps<T>,\n ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>\n) => {\n const {\n cls,\n customSwitcherIcon,\n processedTreeData,\n currentUniqueExpandedKeys,\n currentUniqueCheckedKeys,\n handleAntTreeExpand,\n handleAntTreeCheck,\n restProps,\n className,\n switcherIcon,\n } = useTreeCommon(props);\n\n return (\n <AntTree\n ref={ref}\n className={clsx(cls(\"tree\"), className)}\n switcherIcon={switcherIcon || customSwitcherIcon}\n // Pass processed props to AntTree\n treeData={processedTreeData}\n expandedKeys={currentUniqueExpandedKeys}\n onExpand={handleAntTreeExpand}\n // Pass checked keys in the object format\n checkedKeys={{ checked: currentUniqueCheckedKeys, halfChecked: [] }}\n onCheck={handleAntTreeCheck}\n {...restProps} // Pass other props like checkable, showLine, etc.\n />\n );\n};\n\n// Create inner function for DirectoryTree with forwarded ref\nconst DirectoryTreeInner = <T extends AntTreeDataNode = TreeDataNode>(\n props: DirectoryTreeProps<T>,\n ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>\n) => {\n const {\n cls,\n customSwitcherIcon,\n processedTreeData,\n currentUniqueExpandedKeys,\n currentUniqueCheckedKeys,\n handleAntTreeExpand,\n handleAntTreeCheck,\n restProps,\n className,\n switcherIcon,\n } = useTreeCommon(props as any);\n\n return (\n <AntTree.DirectoryTree\n ref={ref}\n className={clsx(cls(\"directory-tree\"), className)}\n switcherIcon={switcherIcon || customSwitcherIcon}\n // Pass processed props to AntTree.DirectoryTree\n treeData={processedTreeData as T[]}\n expandedKeys={currentUniqueExpandedKeys}\n onExpand={handleAntTreeExpand}\n // Pass checked keys in the object format\n checkedKeys={{ checked: currentUniqueCheckedKeys, halfChecked: [] }}\n onCheck={handleAntTreeCheck}\n {...restProps} // Pass other props like checkable, showLine, etc.\n />\n );\n};\n\n// Use forwardRef with type assertion for main Tree\n// Ensure the generic constraint here matches TreeProps\nconst MainTree = forwardRef(MainTreeInner) as <\n T extends AntTreeDataNode = TreeDataNode // Use AntTreeDataNode if TreeProps uses it\n>(\n props: TreeProps<T> & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>;\n }\n) => ReturnType<typeof MainTreeInner<T>>;\n\n// Use forwardRef with type assertion for DirectoryTree\nconst DirectoryTree = forwardRef(DirectoryTreeInner) as <\n T extends AntTreeDataNode = AntTreeDataNode\n>(\n props: DirectoryTreeProps<T> & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>; // Check ref type consistency\n }\n) => ReturnType<typeof DirectoryTreeInner<T>>;\n\n// Create the final component with DirectoryTree property\nexport const Tree = Object.assign(MainTree, {\n DirectoryTree,\n TreeNode: AntTree.TreeNode,\n});\n"],"names":["MainTreeInner","props","ref","cls","customSwitcherIcon","processedTreeData","currentUniqueExpandedKeys","currentUniqueCheckedKeys","handleAntTreeExpand","handleAntTreeCheck","restProps","className","switcherIcon","useTreeCommon","jsx","AntTree","clsx","DirectoryTreeInner","MainTree","forwardRef","DirectoryTree","Tree"],"mappings":";;;;;;;AAeA,MAAMA,IAAgB,CACpBC,GACAC,MACG;
|
|
1
|
+
{"version":3,"file":"components.js","sources":["../../../src/components/tree/components.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTree,\n type DataNode as AntTreeDataNode,\n} from \"antd/es/tree\";\n\nimport { forwardRef } from \"react\";\nimport { clsx } from \"../utils\";\nimport type { TreeDataNode, TreeProps, DirectoryTreeProps } from \"./types\";\nimport { useTreeCommon } from \"./useTreeCommon\";\n\nimport \"./style.css\";\n\n// Create inner function for main Tree with forwarded ref\n// Ensure generic constraint matches TreeProps if it uses AntTreeDataNode\nconst MainTreeInner = <T extends AntTreeDataNode = TreeDataNode>(\n props: TreeProps<T>,\n ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>\n) => {\n const {\n cls,\n customSwitcherIcon,\n processedTreeData,\n currentUniqueExpandedKeys,\n currentUniqueCheckedKeys,\n handleAntTreeExpand,\n handleAntTreeCheck,\n restProps,\n className,\n switcherIcon,\n } = useTreeCommon(props);\n\n return (\n <AntTree\n ref={ref}\n className={clsx(cls(\"tree\"), className)}\n switcherIcon={switcherIcon || customSwitcherIcon}\n // Pass processed props to AntTree\n treeData={processedTreeData}\n expandedKeys={currentUniqueExpandedKeys}\n onExpand={handleAntTreeExpand}\n // Pass checked keys in the object format\n checkedKeys={{ checked: currentUniqueCheckedKeys, halfChecked: [] }}\n onCheck={handleAntTreeCheck}\n {...restProps} // Pass other props like checkable, showLine, etc.\n />\n );\n};\n\n// Create inner function for DirectoryTree with forwarded ref\nconst DirectoryTreeInner = <T extends AntTreeDataNode = TreeDataNode>(\n props: DirectoryTreeProps<T>,\n ref: React.Ref<React.ComponentRef<typeof AntTree<T>>>\n) => {\n const {\n cls,\n customSwitcherIcon,\n processedTreeData,\n currentUniqueExpandedKeys,\n currentUniqueCheckedKeys,\n handleAntTreeExpand,\n handleAntTreeCheck,\n restProps,\n className,\n switcherIcon,\n } = useTreeCommon(props as any);\n\n return (\n <AntTree.DirectoryTree\n ref={ref}\n className={clsx(cls(\"directory-tree\"), className)}\n switcherIcon={switcherIcon || customSwitcherIcon}\n // Pass processed props to AntTree.DirectoryTree\n treeData={processedTreeData as T[]}\n expandedKeys={currentUniqueExpandedKeys}\n onExpand={handleAntTreeExpand}\n // Pass checked keys in the object format\n checkedKeys={{ checked: currentUniqueCheckedKeys, halfChecked: [] }}\n onCheck={handleAntTreeCheck}\n {...restProps} // Pass other props like checkable, showLine, etc.\n />\n );\n};\n\n// Use forwardRef with type assertion for main Tree\n// Ensure the generic constraint here matches TreeProps\nconst MainTree = forwardRef(MainTreeInner) as <\n T extends AntTreeDataNode = TreeDataNode // Use AntTreeDataNode if TreeProps uses it\n>(\n props: TreeProps<T> & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>;\n }\n) => ReturnType<typeof MainTreeInner<T>>;\n\n// Use forwardRef with type assertion for DirectoryTree\nconst DirectoryTree = forwardRef(DirectoryTreeInner) as <\n T extends AntTreeDataNode = AntTreeDataNode\n>(\n props: DirectoryTreeProps<T> & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntTree<T>>>; // Check ref type consistency\n }\n) => ReturnType<typeof DirectoryTreeInner<T>>;\n\n// Create the final component with DirectoryTree property\nexport const Tree = Object.assign(MainTree, {\n DirectoryTree,\n TreeNode: AntTree.TreeNode,\n});\n"],"names":["MainTreeInner","props","ref","cls","customSwitcherIcon","processedTreeData","currentUniqueExpandedKeys","currentUniqueCheckedKeys","handleAntTreeExpand","handleAntTreeCheck","restProps","className","switcherIcon","useTreeCommon","jsx","AntTree","clsx","DirectoryTreeInner","MainTree","forwardRef","DirectoryTree","Tree"],"mappings":";;;;;;;AAeA,MAAMA,IAAgB,CACpBC,GACAC,MACG;AACH,QAAM;AAAA,IACJ,KAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAcZ,CAAK;AAEvB,SACE,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAb;AAAA,MACA,WAAWc,EAAKb,EAAI,MAAM,GAAGQ,CAAS;AAAA,MACtC,cAAcC,KAAgBR;AAAA,MAE9B,UAAUC;AAAA,MACV,cAAcC;AAAA,MACd,UAAUE;AAAA,MAEV,aAAa,EAAE,SAASD,GAA0B,aAAa,CAAA,EAAC;AAAA,MAChE,SAASE;AAAA,MACR,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV,GAGMO,IAAqB,CACzBhB,GACAC,MACG;AACH,QAAM;AAAA,IACJ,KAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAcZ,CAAY;AAE9B,SACE,gBAAAa;AAAA,IAACC,EAAQ;AAAA,IAAR;AAAA,MACC,KAAAb;AAAA,MACA,WAAWc,EAAKb,EAAI,gBAAgB,GAAGQ,CAAS;AAAA,MAChD,cAAcC,KAAgBR;AAAA,MAE9B,UAAUC;AAAA,MACV,cAAcC;AAAA,MACd,UAAUE;AAAA,MAEV,aAAa,EAAE,SAASD,GAA0B,aAAa,CAAA,EAAC;AAAA,MAChE,SAASE;AAAA,MACR,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV,GAIMQ,IAAWC,EAAWnB,CAAa,GASnCoB,IAAgBD,EAAWF,CAAkB,GAStCI,IAAO,OAAO,OAAOH,GAAU;AAAA,EAC1C,eAAAE;AAAA,EACA,UAAUL,EAAQ;AACpB,CAAC;"}
|