@bioturing/components 0.32.0 → 0.32.2
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/README.md +29 -0
- 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 +9 -12
- 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 +146 -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/stats.html +4949 -0
- package/dist/tailwind.css +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 +2 -2
- package/dist/tailwind.d.ts +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StackGap = 0 | 1 | 2 | 4 | 8 | 12 | 16 | 24 | 28 | 32 | 40 | 48;
|
|
3
|
+
export interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the stack should hug its content (inline-flex) instead of filling available space
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
hug?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Vertical alignment of items within the stack
|
|
11
|
+
* @default "flex-start"
|
|
12
|
+
*/
|
|
13
|
+
align?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
14
|
+
/**
|
|
15
|
+
* Horizontal alignment of items within the stack
|
|
16
|
+
* @default "flex-start"
|
|
17
|
+
*/
|
|
18
|
+
justify?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
19
|
+
/**
|
|
20
|
+
* Whether the stack should render items vertically
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
vertical?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Gap between stack items in pixels
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
gap?: StackGap;
|
|
29
|
+
/**
|
|
30
|
+
* Wrap items to multiple lines if needed
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
wrap?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Children of the stack
|
|
36
|
+
*/
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE5E,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IAEtE;;;OAGG;IACH,OAAO,CAAC,EACJ,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,eAAe,GACf,cAAc,GACd,cAAc,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,KAAK,mFAoCjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sources":["../../../src/components/stack/Stack.tsx"],"sourcesContent":["\"use client\";\nimport React, { forwardRef } from \"react\";\nimport { cn, useCls } from \"../utils\";\n\nexport type StackGap = 0 | 1 | 2 | 4 | 8 | 12 | 16 | 24 | 28 | 32 | 40 | 48;\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Whether the stack should hug its content (inline-flex) instead of filling available space\n * @default false\n */\n hug?: boolean;\n\n /**\n * Vertical alignment of items within the stack\n * @default \"flex-start\"\n */\n align?: \"flex-start\" | \"flex-end\" | \"center\" | \"stretch\" | \"baseline\";\n\n /**\n * Horizontal alignment of items within the stack\n * @default \"flex-start\"\n */\n justify?:\n | \"flex-start\"\n | \"flex-end\"\n | \"center\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\n /**\n * Whether the stack should render items vertically\n * @default false\n */\n vertical?: boolean;\n\n /**\n * Gap between stack items in pixels\n * @default 0\n */\n gap?: StackGap;\n\n /**\n * Wrap items to multiple lines if needed\n * @default false\n */\n wrap?: boolean;\n\n /**\n * Children of the stack\n */\n children?: React.ReactNode;\n}\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n hug = false,\n align = \"flex-start\",\n justify = \"flex-start\",\n vertical = false,\n gap = 0,\n wrap = false,\n className,\n children,\n ...rest\n },\n ref\n ) => {\n const cls = useCls();\n\n return (\n <div\n ref={ref}\n className={cn(\n cls(\"stack\"),\n hug ? cls(\"stack-hug\") : cls(\"stack-fill\"),\n cls(`stack-gap-${gap}`),\n vertical ? cls(\"stack-vertical\") : cls(\"stack-horizontal\"),\n wrap && cls(\"stack-wrap\"),\n cls(`stack-align-${align}`),\n cls(`stack-justify-${justify}`),\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n }\n);\n\nStack.displayName = \"Stack\";\n"],"names":["Stack","forwardRef","hug","align","justify","vertical","gap","wrap","className","children","rest","ref","cls","useCls","jsx","cn"],"mappings":";;;;;AAuDO,MAAMA,IAAQC;AAAA,EACnB,CACE;AAAA,IACE,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,KAAAC,IAAM;AAAA,IACN,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,
|
|
1
|
+
{"version":3,"file":"Stack.js","sources":["../../../src/components/stack/Stack.tsx"],"sourcesContent":["\"use client\";\nimport React, { forwardRef } from \"react\";\nimport { cn, useCls } from \"../utils\";\n\nexport type StackGap = 0 | 1 | 2 | 4 | 8 | 12 | 16 | 24 | 28 | 32 | 40 | 48;\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Whether the stack should hug its content (inline-flex) instead of filling available space\n * @default false\n */\n hug?: boolean;\n\n /**\n * Vertical alignment of items within the stack\n * @default \"flex-start\"\n */\n align?: \"flex-start\" | \"flex-end\" | \"center\" | \"stretch\" | \"baseline\";\n\n /**\n * Horizontal alignment of items within the stack\n * @default \"flex-start\"\n */\n justify?:\n | \"flex-start\"\n | \"flex-end\"\n | \"center\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\n /**\n * Whether the stack should render items vertically\n * @default false\n */\n vertical?: boolean;\n\n /**\n * Gap between stack items in pixels\n * @default 0\n */\n gap?: StackGap;\n\n /**\n * Wrap items to multiple lines if needed\n * @default false\n */\n wrap?: boolean;\n\n /**\n * Children of the stack\n */\n children?: React.ReactNode;\n}\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n hug = false,\n align = \"flex-start\",\n justify = \"flex-start\",\n vertical = false,\n gap = 0,\n wrap = false,\n className,\n children,\n ...rest\n },\n ref\n ) => {\n const cls = useCls();\n\n return (\n <div\n ref={ref}\n className={cn(\n cls(\"stack\"),\n hug ? cls(\"stack-hug\") : cls(\"stack-fill\"),\n cls(`stack-gap-${gap}`),\n vertical ? cls(\"stack-vertical\") : cls(\"stack-horizontal\"),\n wrap && cls(\"stack-wrap\"),\n cls(`stack-align-${align}`),\n cls(`stack-justify-${justify}`),\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n }\n);\n\nStack.displayName = \"Stack\";\n"],"names":["Stack","forwardRef","hug","align","justify","vertical","gap","wrap","className","children","rest","ref","cls","useCls","jsx","cn"],"mappings":";;;;;AAuDO,MAAMA,IAAQC;AAAA,EACnB,CACE;AAAA,IACE,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,KAAAC,IAAM;AAAA,IACN,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAMC,EAAA;AAEZ,WACE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,WAAWI;AAAA,UACTH,EAAI,OAAO;AAAA,UACLA,EAANV,IAAU,cAAmB,YAAR;AAAA,UACrBU,EAAI,aAAaN,CAAG,EAAE;AAAA,UACXM,EAAXP,IAAe,mBAAwB,kBAAR;AAAA,UAC/BE,KAAQK,EAAI,YAAY;AAAA,UACxBA,EAAI,eAAeT,CAAK,EAAE;AAAA,UAC1BS,EAAI,iBAAiBR,CAAO,EAAE;AAAA,UAC9BI;AAAA,QAAA;AAAA,QAED,GAAGE;AAAA,QAEH,UAAAD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAT,EAAM,cAAc;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StackProps } from './Stack';
|
|
3
|
+
export interface StackChildProps extends StackProps {
|
|
4
|
+
/**
|
|
5
|
+
* CSS flex property value (e.g. "1", "1 0 auto", "0 1 auto")
|
|
6
|
+
* When boolean: true = 1, false = 0
|
|
7
|
+
* @default undefined
|
|
8
|
+
*/
|
|
9
|
+
flex?: string | number | boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether this child should grow to fill available space
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
grow?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether this child should shrink if necessary
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
shrink?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Children of the stack child
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to render the child with a stack wrapper
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
stack?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const StackChild: React.ForwardRefExoticComponent<StackChildProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
//# sourceMappingURL=StackChild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StackChild.d.ts","sourceRoot":"","sources":["../../../src/components/stack/StackChild.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAEjC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,wFA+EtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackChild.js","sources":["../../../src/components/stack/StackChild.tsx"],"sourcesContent":["\"use client\";\nimport React, { forwardRef, useMemo } from \"react\";\nimport { cn, useCls } from \"../utils\";\nimport { useRender } from \"@base-ui-components/react/use-render\";\nimport { mergeProps } from \"@base-ui-components/react/merge-props\";\nimport { Stack, StackProps } from \"./Stack\";\n\nexport interface StackChildProps extends StackProps {\n /**\n * CSS flex property value (e.g. \"1\", \"1 0 auto\", \"0 1 auto\")\n * When boolean: true = 1, false = 0\n * @default undefined\n */\n flex?: string | number | boolean;\n\n /**\n * Whether this child should grow to fill available space\n * @default false\n */\n grow?: boolean;\n\n /**\n * Whether this child should shrink if necessary\n * @default false\n */\n shrink?: boolean;\n\n /**\n * Children of the stack child\n */\n children?: React.ReactNode;\n /**\n * Whether to render the child with a stack wrapper\n * @default false\n */\n stack?: boolean;\n}\n\nexport const StackChild = forwardRef<HTMLDivElement, StackChildProps>(\n (\n {\n flex,\n grow = false,\n shrink = false,\n children,\n style,\n stack = false,\n // stack props\n hug = false,\n align = \"flex-start\",\n justify = \"flex-start\",\n vertical = false,\n gap = 0,\n wrap = false,\n className,\n ...rest\n },\n ref\n ) => {\n const cls = useCls();\n const stackProps = {\n hug,\n align,\n justify,\n vertical,\n gap,\n wrap,\n };\n\n // Determine flex class based on flex prop type\n const flexClass = useMemo(() => {\n if (typeof flex === \"boolean\" || flex === 0 || flex === 1) {\n return flex === true || flex === 1\n ? cls(\"stack-child-flex-1\")\n : cls(\"stack-child-flex-0\");\n }\n return \"\";\n }, [flex, cls]);\n\n // Calculate the combined className\n const combinedClassName = cn(\n cls(\"stack-child\"),\n grow && cls(\"stack-child-grow\"),\n shrink && cls(\"stack-child-shrink\"),\n flexClass,\n className\n );\n\n // Calculate the flex style value\n const flexValue =\n flex && typeof flex !== \"boolean\" && !flexClass ? flex : undefined;\n\n // Use useRender to apply props directly to the child without creating a wrapper\n const renderedElement = useRender({\n render: React.isValidElement(children) ? children : <div>{children}</div>,\n ref,\n props: mergeProps<\"div\">(\n {\n className: combinedClassName,\n style: {\n ...style,\n flex: flexValue,\n },\n ...rest,\n },\n {}\n ),\n });\n\n return stack ? (\n <Stack {...stackProps} ref={ref} className={combinedClassName} {...rest}>\n {children}\n </Stack>\n ) : (\n renderedElement\n );\n }\n);\n\nStackChild.displayName = \"StackChild\";\n"],"names":["StackChild","forwardRef","flex","grow","shrink","children","style","stack","hug","align","justify","vertical","gap","wrap","className","rest","ref","cls","useCls","stackProps","flexClass","useMemo","combinedClassName","cn","flexValue","renderedElement","useRender","React","jsx","mergeProps","Stack"],"mappings":";;;;;;;;AAsCO,MAAMA,IAAaC;AAAA,EACxB,CACE;AAAA,IACE,MAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA;AAAA,IAER,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,KAAAC,IAAM;AAAA,IACN,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,GAAGC;AAAA,
|
|
1
|
+
{"version":3,"file":"StackChild.js","sources":["../../../src/components/stack/StackChild.tsx"],"sourcesContent":["\"use client\";\nimport React, { forwardRef, useMemo } from \"react\";\nimport { cn, useCls } from \"../utils\";\nimport { useRender } from \"@base-ui-components/react/use-render\";\nimport { mergeProps } from \"@base-ui-components/react/merge-props\";\nimport { Stack, StackProps } from \"./Stack\";\n\nexport interface StackChildProps extends StackProps {\n /**\n * CSS flex property value (e.g. \"1\", \"1 0 auto\", \"0 1 auto\")\n * When boolean: true = 1, false = 0\n * @default undefined\n */\n flex?: string | number | boolean;\n\n /**\n * Whether this child should grow to fill available space\n * @default false\n */\n grow?: boolean;\n\n /**\n * Whether this child should shrink if necessary\n * @default false\n */\n shrink?: boolean;\n\n /**\n * Children of the stack child\n */\n children?: React.ReactNode;\n /**\n * Whether to render the child with a stack wrapper\n * @default false\n */\n stack?: boolean;\n}\n\nexport const StackChild = forwardRef<HTMLDivElement, StackChildProps>(\n (\n {\n flex,\n grow = false,\n shrink = false,\n children,\n style,\n stack = false,\n // stack props\n hug = false,\n align = \"flex-start\",\n justify = \"flex-start\",\n vertical = false,\n gap = 0,\n wrap = false,\n className,\n ...rest\n },\n ref\n ) => {\n const cls = useCls();\n const stackProps = {\n hug,\n align,\n justify,\n vertical,\n gap,\n wrap,\n };\n\n // Determine flex class based on flex prop type\n const flexClass = useMemo(() => {\n if (typeof flex === \"boolean\" || flex === 0 || flex === 1) {\n return flex === true || flex === 1\n ? cls(\"stack-child-flex-1\")\n : cls(\"stack-child-flex-0\");\n }\n return \"\";\n }, [flex, cls]);\n\n // Calculate the combined className\n const combinedClassName = cn(\n cls(\"stack-child\"),\n grow && cls(\"stack-child-grow\"),\n shrink && cls(\"stack-child-shrink\"),\n flexClass,\n className\n );\n\n // Calculate the flex style value\n const flexValue =\n flex && typeof flex !== \"boolean\" && !flexClass ? flex : undefined;\n\n // Use useRender to apply props directly to the child without creating a wrapper\n const renderedElement = useRender({\n render: React.isValidElement(children) ? children : <div>{children}</div>,\n ref,\n props: mergeProps<\"div\">(\n {\n className: combinedClassName,\n style: {\n ...style,\n flex: flexValue,\n },\n ...rest,\n },\n {}\n ),\n });\n\n return stack ? (\n <Stack {...stackProps} ref={ref} className={combinedClassName} {...rest}>\n {children}\n </Stack>\n ) : (\n renderedElement\n );\n }\n);\n\nStackChild.displayName = \"StackChild\";\n"],"names":["StackChild","forwardRef","flex","grow","shrink","children","style","stack","hug","align","justify","vertical","gap","wrap","className","rest","ref","cls","useCls","stackProps","flexClass","useMemo","combinedClassName","cn","flexValue","renderedElement","useRender","React","jsx","mergeProps","Stack"],"mappings":";;;;;;;;AAsCO,MAAMA,IAAaC;AAAA,EACxB,CACE;AAAA,IACE,MAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA;AAAA,IAER,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,KAAAC,IAAM;AAAA,IACN,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAMC,EAAA,GACNC,IAAa;AAAA,MACjB,KAAAX;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,MACA,MAAAC;AAAA,IAAA,GAIIO,IAAYC,EAAQ,MACpB,OAAOnB,KAAS,aAAaA,MAAS,KAAKA,MAAS,IAElDe,EADGf,MAAS,MAAQA,MAAS,IACzB,uBACA,oBADoB,IAGvB,IACN,CAACA,GAAMe,CAAG,CAAC,GAGRK,IAAoBC;AAAA,MACxBN,EAAI,aAAa;AAAA,MACjBd,KAAQc,EAAI,kBAAkB;AAAA,MAC9Bb,KAAUa,EAAI,oBAAoB;AAAA,MAClCG;AAAA,MACAN;AAAA,IAAA,GAIIU,IACJtB,KAAQ,OAAOA,KAAS,aAAa,CAACkB,IAAYlB,IAAO,QAGrDuB,IAAkBC,EAAU;AAAA,MAChC,QAAQC,EAAM,eAAetB,CAAQ,IAAIA,IAAW,gBAAAuB,EAAC,SAAK,UAAAvB,GAAS;AAAA,MACnE,KAAAW;AAAA,MACA,OAAOa;AAAA,QACL;AAAA,UACE,WAAWP;AAAA,UACX,OAAO;AAAA,YACL,GAAGhB;AAAA,YACH,MAAMkB;AAAA,UAAA;AAAA,UAER,GAAGT;AAAA,QAAA;AAAA,QAEL,CAAA;AAAA,MAAC;AAAA,IACH,CACD;AAED,WAAOR,IACL,gBAAAqB,EAACE,GAAA,EAAO,GAAGX,GAAY,KAAAH,GAAU,WAAWM,GAAoB,GAAGP,GAChE,UAAAV,EAAA,CACH,IAEAoB;AAAA,EAEJ;AACF;AAEAzB,EAAW,cAAc;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StackProps } from './Stack';
|
|
2
|
+
import { StackChild, StackChildProps } from './StackChild';
|
|
3
|
+
export { StackChild };
|
|
4
|
+
export { StackProps, StackChildProps };
|
|
5
|
+
export declare const Stack: import('react').ForwardRefExoticComponent<StackProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
6
|
+
Child: import('react').ForwardRefExoticComponent<StackChildProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;AAEvC,eAAO,MAAM,KAAK;;CAAkD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/stack/index.ts"],"sourcesContent":["import { Stack as MainStack, type StackProps } from \"./Stack\";\nimport { StackChild, type StackChildProps } from \"./StackChild\";\n\nimport \"./style.css\";\n\nexport { StackChild };\nexport { StackProps, StackChildProps };\n\nexport const Stack = Object.assign(MainStack, { Child: StackChild });\n"],"names":["Stack","MainStack","StackChild"],"mappings":";;;AAQO,MAAMA,IAAQ,OAAO,OAAOC,GAAW,EAAE,OAAOC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/stack/index.ts"],"sourcesContent":["import { Stack as MainStack, type StackProps } from \"./Stack\";\nimport { StackChild, type StackChildProps } from \"./StackChild\";\n\nimport \"./style.css\";\n\nexport { StackChild };\nexport { StackProps, StackChildProps };\n\nexport const Stack = Object.assign(MainStack, { Child: StackChild });\n"],"names":["Stack","MainStack","StackChild"],"mappings":";;;AAQO,MAAMA,IAAQ,OAAO,OAAOC,GAAW,EAAE,OAAOC,GAAY;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface StatusIconProps extends React.ComponentPropsWithoutRef<"svg"> {
|
|
2
|
+
/**
|
|
3
|
+
* Status of the icon
|
|
4
|
+
* @default info
|
|
5
|
+
*/
|
|
6
|
+
status?: "success" | "error" | "warning" | "info" | "processing";
|
|
7
|
+
/**
|
|
8
|
+
* Size of the icon
|
|
9
|
+
* - small: 12px
|
|
10
|
+
* - medium: 16px
|
|
11
|
+
* - large: 20px
|
|
12
|
+
* - xlarge: 24px
|
|
13
|
+
* - xxlarge: 28px
|
|
14
|
+
* @default medium
|
|
15
|
+
*/
|
|
16
|
+
size?: "small" | "medium" | "large" | "xlarge";
|
|
17
|
+
/**
|
|
18
|
+
* Weight of the icon
|
|
19
|
+
*/
|
|
20
|
+
weight?: "regular" | "bold" | "fill" | "duotone";
|
|
21
|
+
}
|
|
22
|
+
export declare const StatusIcon: import('react').ForwardRefExoticComponent<StatusIconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
23
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/status-icon/component.tsx"],"names":[],"mappings":"AAUA,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC5E;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,CAAC;IACjE;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC/C;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAClD;AAUD,eAAO,MAAM,UAAU,2GAiBtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/status-icon/component.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n CheckCircleIcon,\n XCircleIcon,\n WarningIcon,\n InfoIcon,\n CircleNotchIcon,\n} from \"@bioturing/assets\";\nimport { useCls } from \"../utils\";\n\nimport \"./style.css\";\n\nexport interface StatusIconProps extends React.ComponentPropsWithoutRef<\"svg\"> {\n /**\n * Status of the icon\n * @default info\n */\n status?: \"success\" | \"error\" | \"warning\" | \"info\" | \"processing\";\n /**\n * Size of the icon\n * - small: 12px\n * - medium: 16px\n * - large: 20px\n * - xlarge: 24px\n * - xxlarge: 28px\n * @default medium\n */\n size?: \"small\" | \"medium\" | \"large\" | \"xlarge\";\n /**\n * Weight of the icon\n */\n weight?: \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n}\n\nconst STATUS_ICON_MAP = {\n success: CheckCircleIcon,\n error: XCircleIcon,\n warning: WarningIcon,\n info: InfoIcon,\n processing: CircleNotchIcon,\n};\n\nexport const StatusIcon = forwardRef<SVGSVGElement, StatusIconProps>(\n ({ status = \"info\", size = \"medium\", weight = \"regular\", ...props }, ref) => {\n const cls = useCls();\n const Icon = STATUS_ICON_MAP[status];\n return (\n <Icon\n ref={ref}\n className={cls(\n \"status-icon\",\n `status-icon-${status}`,\n `status-icon-${size}`\n )}\n weight={weight}\n {...props}\n />\n );\n }\n);\n\nStatusIcon.displayName = \"StatusIcon\";\n"],"names":["STATUS_ICON_MAP","CheckCircleIcon","XCircleIcon","WarningIcon","InfoIcon","CircleNotchIcon","StatusIcon","forwardRef","status","size","weight","props","ref","cls","useCls","Icon","jsx"],"mappings":";;;;;AAkCA,MAAMA,IAAkB;AAAA,EACtB,SAASC;AAAA,EACT,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,YAAYC;AACd,GAEaC,IAAaC;AAAA,EACxB,CAAC,EAAE,QAAAC,IAAS,QAAQ,MAAAC,IAAO,UAAU,QAAAC,IAAS,WAAW,GAAGC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/status-icon/component.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n CheckCircleIcon,\n XCircleIcon,\n WarningIcon,\n InfoIcon,\n CircleNotchIcon,\n} from \"@bioturing/assets\";\nimport { useCls } from \"../utils\";\n\nimport \"./style.css\";\n\nexport interface StatusIconProps extends React.ComponentPropsWithoutRef<\"svg\"> {\n /**\n * Status of the icon\n * @default info\n */\n status?: \"success\" | \"error\" | \"warning\" | \"info\" | \"processing\";\n /**\n * Size of the icon\n * - small: 12px\n * - medium: 16px\n * - large: 20px\n * - xlarge: 24px\n * - xxlarge: 28px\n * @default medium\n */\n size?: \"small\" | \"medium\" | \"large\" | \"xlarge\";\n /**\n * Weight of the icon\n */\n weight?: \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n}\n\nconst STATUS_ICON_MAP = {\n success: CheckCircleIcon,\n error: XCircleIcon,\n warning: WarningIcon,\n info: InfoIcon,\n processing: CircleNotchIcon,\n};\n\nexport const StatusIcon = forwardRef<SVGSVGElement, StatusIconProps>(\n ({ status = \"info\", size = \"medium\", weight = \"regular\", ...props }, ref) => {\n const cls = useCls();\n const Icon = STATUS_ICON_MAP[status];\n return (\n <Icon\n ref={ref}\n className={cls(\n \"status-icon\",\n `status-icon-${status}`,\n `status-icon-${size}`\n )}\n weight={weight}\n {...props}\n />\n );\n }\n);\n\nStatusIcon.displayName = \"StatusIcon\";\n"],"names":["STATUS_ICON_MAP","CheckCircleIcon","XCircleIcon","WarningIcon","InfoIcon","CircleNotchIcon","StatusIcon","forwardRef","status","size","weight","props","ref","cls","useCls","Icon","jsx"],"mappings":";;;;;AAkCA,MAAMA,IAAkB;AAAA,EACtB,SAASC;AAAA,EACT,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,YAAYC;AACd,GAEaC,IAAaC;AAAA,EACxB,CAAC,EAAE,QAAAC,IAAS,QAAQ,MAAAC,IAAO,UAAU,QAAAC,IAAS,WAAW,GAAGC,EAAA,GAASC,MAAQ;AAC3E,UAAMC,IAAMC,EAAA,GACNC,IAAOf,EAAgBQ,CAAM;AACnC,WACE,gBAAAQ;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,WAAWC;AAAA,UACT;AAAA,UACA,eAAeL,CAAM;AAAA,UACrB,eAAeC,CAAI;AAAA,QAAA;AAAA,QAErB,QAAAC;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAL,EAAW,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/status-icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as AntSwitch, SwitchProps as AntSwitchProps } from 'antd/es/switch';
|
|
2
|
+
export interface SwitchProps extends AntSwitchProps {
|
|
3
|
+
}
|
|
4
|
+
declare const MainSwitchInner: ({ ...rest }: SwitchProps, ref: React.Ref<React.ComponentRef<typeof AntSwitch>>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Switch: (props: SwitchProps & {
|
|
6
|
+
ref?: React.ForwardedRef<React.ComponentRef<typeof AntSwitch>>;
|
|
7
|
+
}) => ReturnType<typeof MainSwitchInner>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/switch/component.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,gBAAgB,CAAC;AAIxB,OAAO,aAAa,CAAC;AAGrB,MAAM,WAAW,WAAY,SAAQ,cAAc;CAAG;AAGtD,QAAA,MAAM,eAAe,GACnB,aAAa,WAAW,EACxB,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC,4CAGrD,CAAC;AASF,eAAO,MAAM,MAAM,UALV,WAAW,GAAG;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;CAChE,KACE,UAAU,CAAC,OAAO,eAAe,CAEN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/switch/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntSwitch,\n type SwitchProps as AntSwitchProps,\n} from \"antd/es/switch\";\nimport { forwardRef } from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's SwitchProps\nexport interface SwitchProps extends AntSwitchProps {}\n\n// Create inner function\nconst MainSwitchInner = (\n { ...rest }: SwitchProps,\n ref: React.Ref<React.ComponentRef<typeof AntSwitch>>\n) => {\n return <AntSwitch ref={ref} {...rest} />;\n};\n\n// Use forwardRef with type assertion\nconst MainSwitch = forwardRef(MainSwitchInner) as (\n props: SwitchProps & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntSwitch>>;\n }\n) => ReturnType<typeof MainSwitchInner>;\n\nexport const Switch = MainSwitch;\n"],"names":["MainSwitchInner","rest","ref","jsx","AntSwitch","MainSwitch","forwardRef","Switch"],"mappings":";;;;;AAcA,MAAMA,IAAkB,CACtB,EAAE,GAAGC,EAAA,GACLC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/switch/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntSwitch,\n type SwitchProps as AntSwitchProps,\n} from \"antd/es/switch\";\nimport { forwardRef } from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's SwitchProps\nexport interface SwitchProps extends AntSwitchProps {}\n\n// Create inner function\nconst MainSwitchInner = (\n { ...rest }: SwitchProps,\n ref: React.Ref<React.ComponentRef<typeof AntSwitch>>\n) => {\n return <AntSwitch ref={ref} {...rest} />;\n};\n\n// Use forwardRef with type assertion\nconst MainSwitch = forwardRef(MainSwitchInner) as (\n props: SwitchProps & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntSwitch>>;\n }\n) => ReturnType<typeof MainSwitchInner>;\n\nexport const Switch = MainSwitch;\n"],"names":["MainSwitchInner","rest","ref","jsx","AntSwitch","MainSwitch","forwardRef","Switch"],"mappings":";;;;;AAcA,MAAMA,IAAkB,CACtB,EAAE,GAAGC,EAAA,GACLC,MAEO,gBAAAC,EAACC,GAAA,EAAU,KAAAF,GAAW,GAAGD,EAAA,CAAM,GAIlCI,IAAaC,EAAWN,CAAe,GAMhCO,IAASF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as AntTable, TableProps as AntTableProps, TableRef } from 'antd/es/table';
|
|
2
|
+
import { Ref, ForwardedRef } from 'react';
|
|
3
|
+
export interface TableProps<RecordType extends object = object> extends AntTableProps<RecordType> {
|
|
4
|
+
/**
|
|
5
|
+
* Add empty description for the table
|
|
6
|
+
*/
|
|
7
|
+
emptyDescription?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Table ref
|
|
10
|
+
*/
|
|
11
|
+
tableRef?: React.Ref<HTMLDivElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Table style
|
|
14
|
+
*/
|
|
15
|
+
variant?: "default" | "zebra";
|
|
16
|
+
}
|
|
17
|
+
declare const InnerInternalTable: <RecordType extends object = object>({ columns, locale, emptyDescription, loading, virtual, scroll: scrollProp, className, variant, ...rest }: TableProps<RecordType>, ref: Ref<TableRef>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const InternalTable: <RecordType extends object = object>(props: TableProps<RecordType> & {
|
|
19
|
+
ref?: ForwardedRef<TableRef>;
|
|
20
|
+
}) => ReturnType<typeof InnerInternalTable>;
|
|
21
|
+
export declare const Table: typeof InternalTable & {
|
|
22
|
+
Column: typeof AntTable.Column;
|
|
23
|
+
ColumnGroup: typeof AntTable.ColumnGroup;
|
|
24
|
+
SELECTION_COLUMN: typeof AntTable.SELECTION_COLUMN;
|
|
25
|
+
EXPAND_COLUMN: typeof AntTable.EXPAND_COLUMN;
|
|
26
|
+
SELECTION_ALL: typeof AntTable.SELECTION_ALL;
|
|
27
|
+
SELECTION_INVERT: typeof AntTable.SELECTION_INVERT;
|
|
28
|
+
SELECTION_NONE: typeof AntTable.SELECTION_NONE;
|
|
29
|
+
Summary: typeof AntTable.Summary;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/table/component.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,IAAI,QAAQ,EAEnB,KAAK,UAAU,IAAI,aAAa,EAChC,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AAKvB,OAAO,EAIL,GAAG,EACH,YAAY,EAGb,MAAM,OAAO,CAAC;AAGf,OAAO,aAAa,CAAC;AAGrB,MAAM,WAAW,UAAU,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,CAC5D,SAAQ,aAAa,CAAC,UAAU,CAAC;IACjC;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC/B;AAGD,QAAA,MAAM,kBAAkB,GAAI,UAAU,SAAS,MAAM,GAAG,MAAM,EAC5D,0GAUG,UAAU,CAAC,UAAU,CAAC,EACzB,KAAK,GAAG,CAAC,QAAQ,CAAC,4CAsInB,CAAC;AAEF,QAAA,MAAM,aAAa,EAAqC,CACtD,UAAU,SAAS,MAAM,GAAG,MAAM,EAElC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;CAAE,KAC7D,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG3C,eAAO,MAAM,KAAK,EASZ,OAAO,aAAa,GAAG;IAC3B,MAAM,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE,OAAO,QAAQ,CAAC,WAAW,CAAC;IACzC,gBAAgB,EAAE,OAAO,QAAQ,CAAC,gBAAgB,CAAC;IACnD,aAAa,EAAE,OAAO,QAAQ,CAAC,aAAa,CAAC;IAC7C,aAAa,EAAE,OAAO,QAAQ,CAAC,aAAa,CAAC;IAC7C,gBAAgB,EAAE,OAAO,QAAQ,CAAC,gBAAgB,CAAC;IACnD,cAAc,EAAE,OAAO,QAAQ,CAAC,cAAc,CAAC;IAC/C,OAAO,EAAE,OAAO,QAAQ,CAAC,OAAO,CAAC;CAClC,CAAC"}
|
|
@@ -1,102 +1,101 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
2
|
+
import { jsx as t, jsxs as A, Fragment as U } from "react/jsx-runtime";
|
|
3
3
|
import o from "antd/es/table";
|
|
4
|
-
import { FunnelIcon as
|
|
5
|
-
import { Empty as
|
|
6
|
-
import { forwardRef as
|
|
4
|
+
import { FunnelIcon as z, CaretUpIcon as b, CaretDownIcon as I } from "@bioturing/assets";
|
|
5
|
+
import { Empty as H } from "../empty/component.js";
|
|
6
|
+
import { forwardRef as M, useState as P, useRef as g, useEffect as R, useCallback as D } from "react";
|
|
7
7
|
import './style.css';/* empty css */
|
|
8
|
-
import { useCls as
|
|
9
|
-
import { clsx as
|
|
10
|
-
const
|
|
11
|
-
columns:
|
|
12
|
-
locale:
|
|
13
|
-
emptyDescription:
|
|
8
|
+
import { useCls as $ } from "../utils/antdUtils.js";
|
|
9
|
+
import { clsx as k } from "../utils/cn.js";
|
|
10
|
+
const q = ({
|
|
11
|
+
columns: u,
|
|
12
|
+
locale: L,
|
|
13
|
+
emptyDescription: d,
|
|
14
14
|
loading: s,
|
|
15
15
|
virtual: i,
|
|
16
|
-
scroll:
|
|
17
|
-
className:
|
|
18
|
-
variant:
|
|
19
|
-
...
|
|
16
|
+
scroll: S = {},
|
|
17
|
+
className: T,
|
|
18
|
+
variant: h,
|
|
19
|
+
...y
|
|
20
20
|
}, c) => {
|
|
21
|
-
const r =
|
|
21
|
+
const r = $(), [O, _] = P(
|
|
22
22
|
i ? {} : {
|
|
23
23
|
x: "fit-content"
|
|
24
24
|
}
|
|
25
|
-
),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const l = e == null ? void 0 : e.querySelector(
|
|
25
|
+
), a = g(null), E = g(0);
|
|
26
|
+
R(() => {
|
|
27
|
+
if (!a.current || !i) return;
|
|
28
|
+
const n = a.current?.nativeElement, e = n?.parentElement;
|
|
29
|
+
if (!e) return;
|
|
30
|
+
const N = n?.querySelector(
|
|
32
31
|
`.${r("table-thead")}`
|
|
33
|
-
),
|
|
32
|
+
), l = n?.querySelector(
|
|
34
33
|
`.${r("table-pagination")}`
|
|
35
34
|
);
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
|
|
35
|
+
if (l) {
|
|
36
|
+
const f = getComputedStyle(l).marginTop, p = getComputedStyle(l).marginBottom;
|
|
37
|
+
E.current = l.offsetHeight + parseInt(f) + parseInt(p);
|
|
39
38
|
}
|
|
40
|
-
const
|
|
41
|
-
for (const
|
|
42
|
-
|
|
43
|
-
y:
|
|
39
|
+
const C = new ResizeObserver((f) => {
|
|
40
|
+
for (const p of f)
|
|
41
|
+
p.target && _({
|
|
42
|
+
y: e.offsetHeight - (N ? N?.offsetHeight : 0) - E.current
|
|
44
43
|
});
|
|
45
44
|
});
|
|
46
|
-
return
|
|
47
|
-
|
|
45
|
+
return e && i && C.observe(e), () => {
|
|
46
|
+
e && i && C.disconnect();
|
|
48
47
|
};
|
|
49
48
|
}, [i, r]);
|
|
50
|
-
const
|
|
51
|
-
sortIcon: ({ sortOrder:
|
|
49
|
+
const w = u ? u.map((n) => ({
|
|
50
|
+
sortIcon: ({ sortOrder: e }) => /* @__PURE__ */ t(
|
|
52
51
|
"span",
|
|
53
52
|
{
|
|
54
53
|
className: r(
|
|
55
54
|
"table-column-sort-icon",
|
|
56
|
-
|
|
55
|
+
e ? `table-column-sort-icon-${e}` : "table-column-sort-icon-none"
|
|
57
56
|
),
|
|
58
|
-
children:
|
|
59
|
-
/* @__PURE__ */ t(
|
|
57
|
+
children: e ? e === "ascend" ? /* @__PURE__ */ t(b, { weight: "fill" }) : /* @__PURE__ */ t(I, { weight: "fill" }) : /* @__PURE__ */ A(U, { children: [
|
|
58
|
+
/* @__PURE__ */ t(b, { weight: "fill" }),
|
|
60
59
|
" ",
|
|
61
|
-
/* @__PURE__ */ t(
|
|
60
|
+
/* @__PURE__ */ t(I, { weight: "fill" })
|
|
62
61
|
] })
|
|
63
62
|
}
|
|
64
63
|
),
|
|
65
|
-
filterIcon: (
|
|
66
|
-
...
|
|
67
|
-
})) : void 0,
|
|
68
|
-
emptyText: /* @__PURE__ */ t(
|
|
69
|
-
...
|
|
64
|
+
filterIcon: (e) => /* @__PURE__ */ t("span", { className: r("table-column-filter-icon"), children: /* @__PURE__ */ t(z, { weight: "fill" }) }),
|
|
65
|
+
...n
|
|
66
|
+
})) : void 0, x = {
|
|
67
|
+
emptyText: /* @__PURE__ */ t(H, { description: d }),
|
|
68
|
+
...L
|
|
70
69
|
};
|
|
71
|
-
let
|
|
72
|
-
typeof s == "boolean" ?
|
|
70
|
+
let m;
|
|
71
|
+
typeof s == "boolean" ? m = {
|
|
73
72
|
spinning: s,
|
|
74
73
|
indicator: /* @__PURE__ */ t("span", { className: r("spin-loader") })
|
|
75
|
-
} : typeof s == "object" && (
|
|
74
|
+
} : typeof s == "object" && (m = {
|
|
76
75
|
spinning: !0,
|
|
77
76
|
indicator: /* @__PURE__ */ t("span", { className: r("spin-loader") }),
|
|
78
77
|
...s
|
|
79
78
|
});
|
|
80
|
-
const
|
|
81
|
-
(
|
|
82
|
-
|
|
79
|
+
const j = D(
|
|
80
|
+
(n) => {
|
|
81
|
+
n && (typeof c == "function" && c(n), c && typeof c == "object" && "current" in c && (c.current = n), a.current = n);
|
|
83
82
|
},
|
|
84
83
|
[c]
|
|
85
84
|
);
|
|
86
85
|
return /* @__PURE__ */ t(
|
|
87
86
|
o,
|
|
88
87
|
{
|
|
89
|
-
ref:
|
|
90
|
-
columns:
|
|
91
|
-
loading:
|
|
92
|
-
locale:
|
|
88
|
+
ref: j,
|
|
89
|
+
columns: w,
|
|
90
|
+
loading: m,
|
|
91
|
+
locale: x,
|
|
93
92
|
virtual: i,
|
|
94
|
-
scroll: { ...
|
|
95
|
-
className:
|
|
96
|
-
...
|
|
93
|
+
scroll: { ...O, ...S },
|
|
94
|
+
className: k(h === "zebra" ? r("table-zebra") : "", T),
|
|
95
|
+
...y
|
|
97
96
|
}
|
|
98
97
|
);
|
|
99
|
-
},
|
|
98
|
+
}, F = M(q), W = Object.assign(F, {
|
|
100
99
|
Column: o.Column,
|
|
101
100
|
ColumnGroup: o.ColumnGroup,
|
|
102
101
|
SELECTION_COLUMN: o.SELECTION_COLUMN,
|
|
@@ -107,6 +106,6 @@ const F = ({
|
|
|
107
106
|
Summary: o.Summary
|
|
108
107
|
});
|
|
109
108
|
export {
|
|
110
|
-
|
|
109
|
+
W as Table
|
|
111
110
|
};
|
|
112
111
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/table/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTable,\n type ColumnType,\n type TableProps as AntTableProps,\n type TableRef,\n} from \"antd/es/table\";\nimport { CaretDownIcon, CaretUpIcon, FunnelIcon } from \"@bioturing/assets\";\nimport { clsx, useCls } from \"../utils\";\nimport Empty from \"../empty/component\";\nimport { SpinProps } from \"antd/es/spin\";\nimport {\n useState,\n useEffect,\n forwardRef,\n Ref,\n ForwardedRef,\n useCallback,\n useRef,\n} from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define interface with all the generic type parameters from AntTable without any\nexport interface TableProps<RecordType extends object = object>\n extends AntTableProps<RecordType> {\n /**\n * Add empty description for the table\n */\n emptyDescription?: React.ReactNode;\n /**\n * Table ref\n */\n tableRef?: React.Ref<HTMLDivElement>;\n /**\n * Table style\n */\n variant?: \"default\" | \"zebra\";\n}\n\n// Simple wrapper component with proper generics\nconst InnerInternalTable = <RecordType extends object = object>(\n {\n columns,\n locale,\n emptyDescription,\n loading,\n virtual,\n scroll: scrollProp = {},\n className,\n variant,\n ...rest\n }: TableProps<RecordType>,\n ref: Ref<TableRef>\n) => {\n const cls = useCls();\n const [scroll, setScroll] = useState<TableProps[\"scroll\"]>(\n virtual\n ? {}\n : {\n x: \"fit-content\",\n }\n );\n\n const innerRef = useRef<TableRef>(null);\n const tablePaginationHeight = useRef<number>(0);\n\n useEffect(() => {\n if (!innerRef.current || !virtual) return;\n const tableEl = innerRef.current?.nativeElement;\n const parentEl = tableEl?.parentElement;\n if (!parentEl) return;\n const thead = tableEl?.querySelector(\n `.${cls(\"table-thead\")}`\n ) as HTMLElement;\n const tpagination = tableEl?.querySelector(\n `.${cls(\"table-pagination\")}`\n ) as HTMLElement;\n if (tpagination) {\n const mt = getComputedStyle(tpagination).marginTop;\n const mb = getComputedStyle(tpagination).marginBottom;\n tablePaginationHeight.current =\n tpagination.offsetHeight + parseInt(mt) + parseInt(mb);\n }\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.target) {\n setScroll({\n y:\n parentEl.offsetHeight -\n (thead ? thead?.offsetHeight : 0) -\n tablePaginationHeight.current,\n });\n }\n }\n });\n if (parentEl && virtual) {\n resizeObserver.observe(parentEl);\n }\n return () => {\n if (parentEl && virtual) {\n resizeObserver.disconnect();\n }\n };\n }, [virtual, cls]);\n\n const modifiedColumns = columns\n ? columns.map((column: ColumnType<RecordType>): ColumnType<RecordType> => {\n return {\n sortIcon: ({ sortOrder }) => {\n return (\n <span\n className={cls(\n \"table-column-sort-icon\",\n sortOrder\n ? `table-column-sort-icon-${sortOrder}`\n : `table-column-sort-icon-none`\n )}\n >\n {!sortOrder ? (\n <>\n <CaretUpIcon weight=\"fill\" />{\" \"}\n <CaretDownIcon weight=\"fill\" />\n </>\n ) : sortOrder === \"ascend\" ? (\n <CaretUpIcon weight=\"fill\" />\n ) : (\n <CaretDownIcon weight=\"fill\" />\n )}\n </span>\n );\n },\n filterIcon: (_filtered) => {\n return (\n <span className={cls(\"table-column-filter-icon\")}>\n <FunnelIcon weight=\"fill\" />\n </span>\n );\n },\n ...column,\n };\n })\n : undefined;\n const modifiedLocale = {\n emptyText: <Empty description={emptyDescription} />,\n ...locale,\n };\n let spinProps: SpinProps | undefined;\n if (typeof loading === \"boolean\") {\n spinProps = {\n spinning: loading,\n indicator: <span className={cls(\"spin-loader\")} />,\n };\n } else if (typeof loading === \"object\") {\n spinProps = {\n spinning: true,\n indicator: <span className={cls(\"spin-loader\")} />,\n ...loading,\n };\n }\n const callbackRef = useCallback(\n (tableRef: TableRef) => {\n if (tableRef) {\n if (typeof ref === \"function\") {\n ref(tableRef);\n }\n if (ref && typeof ref === \"object\" && \"current\" in ref) {\n ref.current = tableRef;\n }\n innerRef.current = tableRef;\n }\n },\n [ref]\n );\n\n return (\n <AntTable\n ref={callbackRef}\n columns={modifiedColumns}\n loading={spinProps}\n locale={modifiedLocale}\n virtual={virtual}\n scroll={{ ...scroll, ...scrollProp }}\n className={clsx(variant === \"zebra\" ? cls(\"table-zebra\") : \"\", className)}\n {...rest}\n />\n );\n};\n\nconst InternalTable = forwardRef(InnerInternalTable) as <\n RecordType extends object = object\n>(\n props: TableProps<RecordType> & { ref?: ForwardedRef<TableRef> }\n) => ReturnType<typeof InnerInternalTable>;\n\n// Create the final component with all static properties\nexport const Table = Object.assign(InternalTable, {\n Column: AntTable.Column,\n ColumnGroup: AntTable.ColumnGroup,\n SELECTION_COLUMN: AntTable.SELECTION_COLUMN,\n EXPAND_COLUMN: AntTable.EXPAND_COLUMN,\n SELECTION_ALL: AntTable.SELECTION_ALL,\n SELECTION_INVERT: AntTable.SELECTION_INVERT,\n SELECTION_NONE: AntTable.SELECTION_NONE,\n Summary: AntTable.Summary,\n}) as typeof InternalTable & {\n Column: typeof AntTable.Column;\n ColumnGroup: typeof AntTable.ColumnGroup;\n SELECTION_COLUMN: typeof AntTable.SELECTION_COLUMN;\n EXPAND_COLUMN: typeof AntTable.EXPAND_COLUMN;\n SELECTION_ALL: typeof AntTable.SELECTION_ALL;\n SELECTION_INVERT: typeof AntTable.SELECTION_INVERT;\n SELECTION_NONE: typeof AntTable.SELECTION_NONE;\n Summary: typeof AntTable.Summary;\n};\n"],"names":["InnerInternalTable","columns","locale","emptyDescription","loading","virtual","scrollProp","className","variant","rest","ref","cls","useCls","scroll","setScroll","useState","innerRef","useRef","tablePaginationHeight","useEffect","tableEl","
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/table/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTable,\n type ColumnType,\n type TableProps as AntTableProps,\n type TableRef,\n} from \"antd/es/table\";\nimport { CaretDownIcon, CaretUpIcon, FunnelIcon } from \"@bioturing/assets\";\nimport { clsx, useCls } from \"../utils\";\nimport Empty from \"../empty/component\";\nimport { SpinProps } from \"antd/es/spin\";\nimport {\n useState,\n useEffect,\n forwardRef,\n Ref,\n ForwardedRef,\n useCallback,\n useRef,\n} from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define interface with all the generic type parameters from AntTable without any\nexport interface TableProps<RecordType extends object = object>\n extends AntTableProps<RecordType> {\n /**\n * Add empty description for the table\n */\n emptyDescription?: React.ReactNode;\n /**\n * Table ref\n */\n tableRef?: React.Ref<HTMLDivElement>;\n /**\n * Table style\n */\n variant?: \"default\" | \"zebra\";\n}\n\n// Simple wrapper component with proper generics\nconst InnerInternalTable = <RecordType extends object = object>(\n {\n columns,\n locale,\n emptyDescription,\n loading,\n virtual,\n scroll: scrollProp = {},\n className,\n variant,\n ...rest\n }: TableProps<RecordType>,\n ref: Ref<TableRef>\n) => {\n const cls = useCls();\n const [scroll, setScroll] = useState<TableProps[\"scroll\"]>(\n virtual\n ? {}\n : {\n x: \"fit-content\",\n }\n );\n\n const innerRef = useRef<TableRef>(null);\n const tablePaginationHeight = useRef<number>(0);\n\n useEffect(() => {\n if (!innerRef.current || !virtual) return;\n const tableEl = innerRef.current?.nativeElement;\n const parentEl = tableEl?.parentElement;\n if (!parentEl) return;\n const thead = tableEl?.querySelector(\n `.${cls(\"table-thead\")}`\n ) as HTMLElement;\n const tpagination = tableEl?.querySelector(\n `.${cls(\"table-pagination\")}`\n ) as HTMLElement;\n if (tpagination) {\n const mt = getComputedStyle(tpagination).marginTop;\n const mb = getComputedStyle(tpagination).marginBottom;\n tablePaginationHeight.current =\n tpagination.offsetHeight + parseInt(mt) + parseInt(mb);\n }\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.target) {\n setScroll({\n y:\n parentEl.offsetHeight -\n (thead ? thead?.offsetHeight : 0) -\n tablePaginationHeight.current,\n });\n }\n }\n });\n if (parentEl && virtual) {\n resizeObserver.observe(parentEl);\n }\n return () => {\n if (parentEl && virtual) {\n resizeObserver.disconnect();\n }\n };\n }, [virtual, cls]);\n\n const modifiedColumns = columns\n ? columns.map((column: ColumnType<RecordType>): ColumnType<RecordType> => {\n return {\n sortIcon: ({ sortOrder }) => {\n return (\n <span\n className={cls(\n \"table-column-sort-icon\",\n sortOrder\n ? `table-column-sort-icon-${sortOrder}`\n : `table-column-sort-icon-none`\n )}\n >\n {!sortOrder ? (\n <>\n <CaretUpIcon weight=\"fill\" />{\" \"}\n <CaretDownIcon weight=\"fill\" />\n </>\n ) : sortOrder === \"ascend\" ? (\n <CaretUpIcon weight=\"fill\" />\n ) : (\n <CaretDownIcon weight=\"fill\" />\n )}\n </span>\n );\n },\n filterIcon: (_filtered) => {\n return (\n <span className={cls(\"table-column-filter-icon\")}>\n <FunnelIcon weight=\"fill\" />\n </span>\n );\n },\n ...column,\n };\n })\n : undefined;\n const modifiedLocale = {\n emptyText: <Empty description={emptyDescription} />,\n ...locale,\n };\n let spinProps: SpinProps | undefined;\n if (typeof loading === \"boolean\") {\n spinProps = {\n spinning: loading,\n indicator: <span className={cls(\"spin-loader\")} />,\n };\n } else if (typeof loading === \"object\") {\n spinProps = {\n spinning: true,\n indicator: <span className={cls(\"spin-loader\")} />,\n ...loading,\n };\n }\n const callbackRef = useCallback(\n (tableRef: TableRef) => {\n if (tableRef) {\n if (typeof ref === \"function\") {\n ref(tableRef);\n }\n if (ref && typeof ref === \"object\" && \"current\" in ref) {\n ref.current = tableRef;\n }\n innerRef.current = tableRef;\n }\n },\n [ref]\n );\n\n return (\n <AntTable\n ref={callbackRef}\n columns={modifiedColumns}\n loading={spinProps}\n locale={modifiedLocale}\n virtual={virtual}\n scroll={{ ...scroll, ...scrollProp }}\n className={clsx(variant === \"zebra\" ? cls(\"table-zebra\") : \"\", className)}\n {...rest}\n />\n );\n};\n\nconst InternalTable = forwardRef(InnerInternalTable) as <\n RecordType extends object = object\n>(\n props: TableProps<RecordType> & { ref?: ForwardedRef<TableRef> }\n) => ReturnType<typeof InnerInternalTable>;\n\n// Create the final component with all static properties\nexport const Table = Object.assign(InternalTable, {\n Column: AntTable.Column,\n ColumnGroup: AntTable.ColumnGroup,\n SELECTION_COLUMN: AntTable.SELECTION_COLUMN,\n EXPAND_COLUMN: AntTable.EXPAND_COLUMN,\n SELECTION_ALL: AntTable.SELECTION_ALL,\n SELECTION_INVERT: AntTable.SELECTION_INVERT,\n SELECTION_NONE: AntTable.SELECTION_NONE,\n Summary: AntTable.Summary,\n}) as typeof InternalTable & {\n Column: typeof AntTable.Column;\n ColumnGroup: typeof AntTable.ColumnGroup;\n SELECTION_COLUMN: typeof AntTable.SELECTION_COLUMN;\n EXPAND_COLUMN: typeof AntTable.EXPAND_COLUMN;\n SELECTION_ALL: typeof AntTable.SELECTION_ALL;\n SELECTION_INVERT: typeof AntTable.SELECTION_INVERT;\n SELECTION_NONE: typeof AntTable.SELECTION_NONE;\n Summary: typeof AntTable.Summary;\n};\n"],"names":["InnerInternalTable","columns","locale","emptyDescription","loading","virtual","scrollProp","className","variant","rest","ref","cls","useCls","scroll","setScroll","useState","innerRef","useRef","tablePaginationHeight","useEffect","tableEl","parentEl","thead","tpagination","mt","mb","resizeObserver","entries","entry","modifiedColumns","column","sortOrder","jsx","CaretUpIcon","CaretDownIcon","jsxs","Fragment","_filtered","FunnelIcon","modifiedLocale","Empty","spinProps","callbackRef","useCallback","tableRef","AntTable","clsx","InternalTable","forwardRef","Table"],"mappings":";;;;;;;;;AA0CA,MAAMA,IAAqB,CACzB;AAAA,EACE,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAQC,IAAa,CAAA;AAAA,EACrB,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IAAMC,EAAA,GACN,CAACC,GAAQC,CAAS,IAAIC;AAAA,IAC1BV,IACI,CAAA,IACA;AAAA,MACE,GAAG;AAAA,IAAA;AAAA,EACL,GAGAW,IAAWC,EAAiB,IAAI,GAChCC,IAAwBD,EAAe,CAAC;AAE9C,EAAAE,EAAU,MAAM;AACd,QAAI,CAACH,EAAS,WAAW,CAACX,EAAS;AACnC,UAAMe,IAAUJ,EAAS,SAAS,eAC5BK,IAAWD,GAAS;AAC1B,QAAI,CAACC,EAAU;AACf,UAAMC,IAAQF,GAAS;AAAA,MACrB,IAAIT,EAAI,aAAa,CAAC;AAAA,IAAA,GAElBY,IAAcH,GAAS;AAAA,MAC3B,IAAIT,EAAI,kBAAkB,CAAC;AAAA,IAAA;AAE7B,QAAIY,GAAa;AACf,YAAMC,IAAK,iBAAiBD,CAAW,EAAE,WACnCE,IAAK,iBAAiBF,CAAW,EAAE;AACzC,MAAAL,EAAsB,UACpBK,EAAY,eAAe,SAASC,CAAE,IAAI,SAASC,CAAE;AAAA,IACzD;AACA,UAAMC,IAAiB,IAAI,eAAe,CAACC,MAAY;AACrD,iBAAWC,KAASD;AAClB,QAAIC,EAAM,UACRd,EAAU;AAAA,UACR,GACEO,EAAS,gBACRC,IAAQA,GAAO,eAAe,KAC/BJ,EAAsB;AAAA,QAAA,CACzB;AAAA,IAGP,CAAC;AACD,WAAIG,KAAYhB,KACdqB,EAAe,QAAQL,CAAQ,GAE1B,MAAM;AACX,MAAIA,KAAYhB,KACdqB,EAAe,WAAA;AAAA,IAEnB;AAAA,EACF,GAAG,CAACrB,GAASM,CAAG,CAAC;AAEjB,QAAMkB,IAAkB5B,IACpBA,EAAQ,IAAI,CAAC6B,OACJ;AAAA,IACL,UAAU,CAAC,EAAE,WAAAC,QAET,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWrB;AAAA,UACT;AAAA,UACAoB,IACI,0BAA0BA,CAAS,KACnC;AAAA,QAAA;AAAA,QAGL,UAACA,IAKEA,MAAc,WAChB,gBAAAC,EAACC,GAAA,EAAY,QAAO,OAAA,CAAO,IAE3B,gBAAAD,EAACE,GAAA,EAAc,QAAO,OAAA,CAAO,IAP7B,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,UAAA,gBAAAJ,EAACC,GAAA,EAAY,QAAO,OAAA,CAAO;AAAA,UAAG;AAAA,UAC9B,gBAAAD,EAACE,GAAA,EAAc,QAAO,OAAA,CAAO;AAAA,QAAA,EAAA,CAC/B;AAAA,MAI6B;AAAA,IAAA;AAAA,IAKrC,YAAY,CAACG,MAET,gBAAAL,EAAC,QAAA,EAAK,WAAWrB,EAAI,0BAA0B,GAC7C,UAAA,gBAAAqB,EAACM,GAAA,EAAW,QAAO,OAAA,CAAO,EAAA,CAC5B;AAAA,IAGJ,GAAGR;AAAA,EAAA,EAEN,IACD,QACES,IAAiB;AAAA,IACrB,WAAW,gBAAAP,EAACQ,GAAA,EAAM,aAAarC,EAAA,CAAkB;AAAA,IACjD,GAAGD;AAAA,EAAA;AAEL,MAAIuC;AACJ,EAAI,OAAOrC,KAAY,YACrBqC,IAAY;AAAA,IACV,UAAUrC;AAAA,IACV,WAAW,gBAAA4B,EAAC,QAAA,EAAK,WAAWrB,EAAI,aAAa,EAAA,CAAG;AAAA,EAAA,IAEzC,OAAOP,KAAY,aAC5BqC,IAAY;AAAA,IACV,UAAU;AAAA,IACV,WAAW,gBAAAT,EAAC,QAAA,EAAK,WAAWrB,EAAI,aAAa,GAAG;AAAA,IAChD,GAAGP;AAAA,EAAA;AAGP,QAAMsC,IAAcC;AAAA,IAClB,CAACC,MAAuB;AACtB,MAAIA,MACE,OAAOlC,KAAQ,cACjBA,EAAIkC,CAAQ,GAEVlC,KAAO,OAAOA,KAAQ,YAAY,aAAaA,MACjDA,EAAI,UAAUkC,IAEhB5B,EAAS,UAAU4B;AAAA,IAEvB;AAAA,IACA,CAAClC,CAAG;AAAA,EAAA;AAGN,SACE,gBAAAsB;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,KAAKH;AAAA,MACL,SAASb;AAAA,MACT,SAASY;AAAA,MACT,QAAQF;AAAA,MACR,SAAAlC;AAAA,MACA,QAAQ,EAAE,GAAGQ,GAAQ,GAAGP,EAAA;AAAA,MACxB,WAAWwC,EAAKtC,MAAY,UAAUG,EAAI,aAAa,IAAI,IAAIJ,CAAS;AAAA,MACvE,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV,GAEMsC,IAAgBC,EAAWhD,CAAkB,GAOtCiD,IAAQ,OAAO,OAAOF,GAAe;AAAA,EAChD,QAAQF,EAAS;AAAA,EACjB,aAAaA,EAAS;AAAA,EACtB,kBAAkBA,EAAS;AAAA,EAC3B,eAAeA,EAAS;AAAA,EACxB,eAAeA,EAAS;AAAA,EACxB,kBAAkBA,EAAS;AAAA,EAC3B,gBAAgBA,EAAS;AAAA,EACzB,SAASA,EAAS;AACpB,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TagProps as AntTagProps, TagType } from 'antd/es/tag';
|
|
2
|
+
import { CheckableTagProps as AntCheckableTagProps } from 'antd/es/tag/CheckableTag';
|
|
3
|
+
export { TagType };
|
|
4
|
+
export interface TagProps extends AntTagProps {
|
|
5
|
+
/**
|
|
6
|
+
* Indicates if the tag is active
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
active?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Size of the tag
|
|
12
|
+
* @default "small"
|
|
13
|
+
*/
|
|
14
|
+
size?: "small" | "medium" | "large";
|
|
15
|
+
}
|
|
16
|
+
export interface CheckableTagProps extends AntCheckableTagProps {
|
|
17
|
+
size?: "small" | "medium" | "large";
|
|
18
|
+
}
|
|
19
|
+
export declare const Tag: import('react').ForwardRefExoticComponent<TagProps & import('react').RefAttributes<HTMLSpanElement>> & {
|
|
20
|
+
CheckableTag: import('react').ForwardRefExoticComponent<CheckableTagProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/tag/component.tsx"],"names":[],"mappings":"AAQA,OAAe,EACb,KAAK,QAAQ,IAAI,WAAW,EAC5B,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AACrB,OAAwB,EACtB,KAAK,iBAAiB,IAAI,oBAAoB,EAC/C,MAAM,0BAA0B,CAAC;AAIlC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,EAAE,CAAC;AAGnB,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AA6ED,eAAO,MAAM,GAAG;;CAEd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/tag/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n cloneElement,\n isValidElement,\n HTMLAttributes,\n} from \"react\";\nimport { XIcon } from \"@bioturing/assets\";\nimport AntTag, {\n type TagProps as AntTagProps,\n type TagType,\n} from \"antd/es/tag\";\nimport AntCheckableTag, {\n type CheckableTagProps as AntCheckableTagProps,\n} from \"antd/es/tag/CheckableTag\";\nimport { clsx, useCls } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport { TagType };\n\n// Define props interface extending Ant Design's TagProps\nexport interface TagProps extends AntTagProps {\n /**\n * Indicates if the tag is active\n * @default false\n */\n active?: boolean;\n /**\n * Size of the tag\n * @default \"small\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nexport interface CheckableTagProps extends AntCheckableTagProps {\n size?: \"small\" | \"medium\" | \"large\";\n}\n\n// Create Tag component\nconst InternalTag = forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n className,\n active = false,\n color,\n style,\n closeIcon,\n closable,\n size = \"small\",\n children,\n icon,\n ...rest\n },\n ref,\n ) => {\n const renderedCloseIcon = <XIcon weight=\"bold\" />;\n const cls = useCls();\n const renderedIcon = isValidElement(icon)\n ? cloneElement<HTMLAttributes<SVGElement>>(icon, {\n className: clsx(\n cls(\"tag-icon\"),\n icon.props &&\n typeof icon.props === \"object\" &&\n \"className\" in icon.props &&\n typeof icon.props.className === \"string\"\n ? icon.props.className\n : \"\",\n ),\n })\n : icon;\n return (\n <AntTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className,\n )}\n color={color}\n style={style}\n closable={closable}\n closeIcon={closable ? closeIcon || renderedCloseIcon : undefined}\n icon={renderedIcon}\n {...(active ? { \"data-active\": \"true\" } : {})}\n {...rest}\n >\n {children}\n </AntTag>\n );\n },\n);\n\nconst CheckableTag = forwardRef<HTMLSpanElement, CheckableTagProps>(\n ({ className, size = \"small\", children, ...rest }, ref) => {\n const cls = useCls();\n return (\n <AntCheckableTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className,\n )}\n {...rest}\n >\n {children}\n </AntCheckableTag>\n );\n },\n);\n\nexport const Tag = Object.assign(InternalTag, {\n CheckableTag,\n});\n"],"names":["InternalTag","forwardRef","className","active","color","style","closeIcon","closable","size","children","icon","rest","ref","renderedCloseIcon","jsx","XIcon","cls","useCls","renderedIcon","isValidElement","cloneElement","clsx","AntTag","CheckableTag","AntCheckableTag","Tag"],"mappings":";;;;;;;;;AAyCA,MAAMA,IAAcC;AAAA,EAClB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,GAAGC;AAAA,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/tag/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n cloneElement,\n isValidElement,\n HTMLAttributes,\n} from \"react\";\nimport { XIcon } from \"@bioturing/assets\";\nimport AntTag, {\n type TagProps as AntTagProps,\n type TagType,\n} from \"antd/es/tag\";\nimport AntCheckableTag, {\n type CheckableTagProps as AntCheckableTagProps,\n} from \"antd/es/tag/CheckableTag\";\nimport { clsx, useCls } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport { TagType };\n\n// Define props interface extending Ant Design's TagProps\nexport interface TagProps extends AntTagProps {\n /**\n * Indicates if the tag is active\n * @default false\n */\n active?: boolean;\n /**\n * Size of the tag\n * @default \"small\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nexport interface CheckableTagProps extends AntCheckableTagProps {\n size?: \"small\" | \"medium\" | \"large\";\n}\n\n// Create Tag component\nconst InternalTag = forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n className,\n active = false,\n color,\n style,\n closeIcon,\n closable,\n size = \"small\",\n children,\n icon,\n ...rest\n },\n ref,\n ) => {\n const renderedCloseIcon = <XIcon weight=\"bold\" />;\n const cls = useCls();\n const renderedIcon = isValidElement(icon)\n ? cloneElement<HTMLAttributes<SVGElement>>(icon, {\n className: clsx(\n cls(\"tag-icon\"),\n icon.props &&\n typeof icon.props === \"object\" &&\n \"className\" in icon.props &&\n typeof icon.props.className === \"string\"\n ? icon.props.className\n : \"\",\n ),\n })\n : icon;\n return (\n <AntTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className,\n )}\n color={color}\n style={style}\n closable={closable}\n closeIcon={closable ? closeIcon || renderedCloseIcon : undefined}\n icon={renderedIcon}\n {...(active ? { \"data-active\": \"true\" } : {})}\n {...rest}\n >\n {children}\n </AntTag>\n );\n },\n);\n\nconst CheckableTag = forwardRef<HTMLSpanElement, CheckableTagProps>(\n ({ className, size = \"small\", children, ...rest }, ref) => {\n const cls = useCls();\n return (\n <AntCheckableTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className,\n )}\n {...rest}\n >\n {children}\n </AntCheckableTag>\n );\n },\n);\n\nexport const Tag = Object.assign(InternalTag, {\n CheckableTag,\n});\n"],"names":["InternalTag","forwardRef","className","active","color","style","closeIcon","closable","size","children","icon","rest","ref","renderedCloseIcon","jsx","XIcon","cls","useCls","renderedIcon","isValidElement","cloneElement","clsx","AntTag","CheckableTag","AntCheckableTag","Tag"],"mappings":";;;;;;;;;AAyCA,MAAMA,IAAcC;AAAA,EAClB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAoB,gBAAAC,EAACC,GAAA,EAAM,QAAO,OAAA,CAAO,GACzCC,IAAMC,EAAA,GACNC,IAAeC,EAAeT,CAAI,IACpCU,EAAyCV,GAAM;AAAA,MAC7C,WAAWW;AAAA,QACTL,EAAI,UAAU;AAAA,QACdN,EAAK,SACH,OAAOA,EAAK,SAAU,YACtB,eAAeA,EAAK,SACpB,OAAOA,EAAK,MAAM,aAAc,WAC9BA,EAAK,MAAM,YACX;AAAA,MAAA;AAAA,IACN,CACD,IACDA;AACJ,WACE,gBAAAI;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,KAAAV;AAAA,QACA,WAAWS;AAAA,UACTL,EAAI,KAAK;AAAA,UACTA,EAAI,OAAOR,CAAI,EAAE;AAAA,UACjB,CAACC,KAAYO,EAAI,WAAW;AAAA,UAC5Bd;AAAA,QAAA;AAAA,QAEF,OAAAE;AAAA,QACA,OAAAC;AAAA,QACA,UAAAE;AAAA,QACA,WAAWA,IAAWD,KAAaO,IAAoB;AAAA,QACvD,MAAMK;AAAA,QACL,GAAIf,IAAS,EAAE,eAAe,OAAA,IAAW,CAAA;AAAA,QACzC,GAAGQ;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF,GAEMc,IAAetB;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,MAAAM,IAAO,SAAS,UAAAC,GAAU,GAAGE,EAAA,GAAQC,MAAQ;AACzD,UAAMI,IAAMC,EAAA;AACZ,WACE,gBAAAH;AAAA,MAACU;AAAA,MAAA;AAAA,QACC,KAAAZ;AAAA,QACA,WAAWS;AAAA,UACTL,EAAI,KAAK;AAAA,UACTA,EAAI,OAAOR,CAAI,EAAE;AAAA,UACjB,CAACC,KAAYO,EAAI,WAAW;AAAA,UAC5Bd;AAAA,QAAA;AAAA,QAED,GAAGS;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF,GAEagB,IAAM,OAAO,OAAOzB,GAAa;AAAA,EAC5C,cAAAuB;AACF,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tag/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigProviderProps } from 'antd/es/config-provider';
|
|
2
|
+
export interface ThemeProviderProps extends Omit<ConfigProviderProps, "theme" | "prefixCls"> {
|
|
3
|
+
theme: "light" | "dark";
|
|
4
|
+
appendClassesTo?: string | HTMLElement;
|
|
5
|
+
}
|
|
6
|
+
export declare const ThemeProvider: ({ theme, appendClassesTo, children, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/theme-provider/component.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,WAAW,CAAC;IACxD,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACxC;AA2CD,eAAO,MAAM,aAAa,GAAI,uCAI3B,kBAAkB,4CAapB,CAAC"}
|