@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,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useRef as
|
|
3
|
-
const
|
|
2
|
+
import { useRef as u, useState as a, useMemo as h, useEffect as R } from "react";
|
|
3
|
+
const b = {
|
|
4
4
|
x: 0,
|
|
5
5
|
y: 0,
|
|
6
6
|
width: 0,
|
|
@@ -10,43 +10,42 @@ const S = {
|
|
|
10
10
|
bottom: 0,
|
|
11
11
|
right: 0
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
const n =
|
|
15
|
-
() => typeof window < "u" ? new ResizeObserver((
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
right: t.contentRect.right
|
|
13
|
+
function d(c) {
|
|
14
|
+
const n = u(0), t = u(null), [o, i] = a(b), s = h(
|
|
15
|
+
() => typeof window < "u" ? new ResizeObserver((f) => {
|
|
16
|
+
const e = f[0];
|
|
17
|
+
e && (cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
|
|
18
|
+
if (t.current) {
|
|
19
|
+
const r = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
|
|
20
|
+
if (r) {
|
|
21
|
+
const l = r.inlineSize, m = r.blockSize;
|
|
22
|
+
i({
|
|
23
|
+
width: l,
|
|
24
|
+
height: m,
|
|
25
|
+
x: e.contentRect.x,
|
|
26
|
+
y: e.contentRect.y,
|
|
27
|
+
top: e.contentRect.top,
|
|
28
|
+
left: e.contentRect.left,
|
|
29
|
+
bottom: e.contentRect.bottom,
|
|
30
|
+
right: e.contentRect.right
|
|
32
31
|
});
|
|
33
32
|
} else
|
|
34
|
-
|
|
33
|
+
i(e.contentRect);
|
|
35
34
|
}
|
|
36
35
|
}));
|
|
37
36
|
}) : null,
|
|
38
37
|
[]
|
|
39
38
|
);
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
}), [
|
|
39
|
+
return R(() => (t.current && s?.observe(t.current, c), () => {
|
|
40
|
+
s?.disconnect(), n.current && cancelAnimationFrame(n.current);
|
|
41
|
+
}), [t.current]), [t, o];
|
|
43
42
|
}
|
|
44
|
-
function
|
|
45
|
-
const [n, { width:
|
|
46
|
-
return { ref: n, width:
|
|
43
|
+
function S(c) {
|
|
44
|
+
const [n, { width: t, height: o }] = d(c);
|
|
45
|
+
return { ref: n, width: t, height: o };
|
|
47
46
|
}
|
|
48
47
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
S as useElementSize,
|
|
49
|
+
d as useResizeObserver
|
|
51
50
|
};
|
|
52
51
|
//# sourceMappingURL=useResizeObserver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.js","sources":["../../../src/components/hooks/useResizeObserver.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo, useRef, useState } from 'react';\n\ntype ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;\n\nconst defaultState: ObserverRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n};\n\nexport function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const frameID = useRef(0);\n const ref = useRef<T>(null);\n\n const [rect, setRect] = useState<ObserverRect>(defaultState);\n\n const observer = useMemo(\n () =>\n typeof window !== 'undefined'\n ? new ResizeObserver((entries) => {\n const entry = entries[0];\n\n if (entry) {\n cancelAnimationFrame(frameID.current);\n\n frameID.current = requestAnimationFrame(() => {\n if (ref.current) {\n const boxSize = entry.borderBoxSize?.[0] || entry.contentBoxSize?.[0];\n if (boxSize) {\n const width = boxSize.inlineSize;\n const height = boxSize.blockSize;\n\n setRect({\n width,\n height,\n x: entry.contentRect.x,\n y: entry.contentRect.y,\n top: entry.contentRect.top,\n left: entry.contentRect.left,\n bottom: entry.contentRect.bottom,\n right: entry.contentRect.right,\n });\n } else {\n setRect(entry.contentRect);\n }\n }\n });\n }\n })\n : null,\n []\n );\n\n useEffect(() => {\n if (ref.current) {\n observer?.observe(ref.current, options);\n }\n\n return () => {\n observer?.disconnect();\n\n if (frameID.current) {\n cancelAnimationFrame(frameID.current);\n }\n };\n }, [ref.current]);\n\n return [ref, rect] as const;\n}\n\nexport function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const [ref, { width, height }] = useResizeObserver<T>(options);\n return { ref, width, height };\n}\n"],"names":["defaultState","useResizeObserver","options","frameID","useRef","ref","rect","setRect","useState","observer","useMemo","entries","entry","boxSize","
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sources":["../../../src/components/hooks/useResizeObserver.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo, useRef, useState } from 'react';\n\ntype ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;\n\nconst defaultState: ObserverRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n};\n\nexport function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const frameID = useRef(0);\n const ref = useRef<T>(null);\n\n const [rect, setRect] = useState<ObserverRect>(defaultState);\n\n const observer = useMemo(\n () =>\n typeof window !== 'undefined'\n ? new ResizeObserver((entries) => {\n const entry = entries[0];\n\n if (entry) {\n cancelAnimationFrame(frameID.current);\n\n frameID.current = requestAnimationFrame(() => {\n if (ref.current) {\n const boxSize = entry.borderBoxSize?.[0] || entry.contentBoxSize?.[0];\n if (boxSize) {\n const width = boxSize.inlineSize;\n const height = boxSize.blockSize;\n\n setRect({\n width,\n height,\n x: entry.contentRect.x,\n y: entry.contentRect.y,\n top: entry.contentRect.top,\n left: entry.contentRect.left,\n bottom: entry.contentRect.bottom,\n right: entry.contentRect.right,\n });\n } else {\n setRect(entry.contentRect);\n }\n }\n });\n }\n })\n : null,\n []\n );\n\n useEffect(() => {\n if (ref.current) {\n observer?.observe(ref.current, options);\n }\n\n return () => {\n observer?.disconnect();\n\n if (frameID.current) {\n cancelAnimationFrame(frameID.current);\n }\n };\n }, [ref.current]);\n\n return [ref, rect] as const;\n}\n\nexport function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const [ref, { width, height }] = useResizeObserver<T>(options);\n return { ref, width, height };\n}\n"],"names":["defaultState","useResizeObserver","options","frameID","useRef","ref","rect","setRect","useState","observer","useMemo","entries","entry","boxSize","width","height","useEffect","useElementSize"],"mappings":";;AAKA,MAAMA,IAA6B;AAAA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EO,SAASW,EAA4Cf,GAAiC;AAC3F,QAAM,CAACG,GAAK,EAAE,OAAAS,GAAO,QAAAC,GAAQ,IAAId,EAAqBC,CAAO;AAC7D,SAAO,EAAE,KAAAG,GAAK,OAAAS,GAAO,QAAAC,EAAA;AACvB;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TransitionStatus = "starting" | "ending" | "idle" | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Provides a status string for CSS animations.
|
|
5
|
+
* @param open - a boolean that determines if the element is open.
|
|
6
|
+
* @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`
|
|
7
|
+
*/
|
|
8
|
+
export declare function useTransitionStatus(open: boolean, enableIdleState?: boolean, deferEndingState?: boolean): {
|
|
9
|
+
mounted: boolean;
|
|
10
|
+
setMounted: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
+
transitionStatus: TransitionStatus;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useTransitionStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransitionStatus.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useTransitionStatus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,eAAe,GAAE,OAAe,EAChC,gBAAgB,GAAE,OAAe;;;;EA6ElC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTransitionStatus.js","sources":["../../../src/components/hooks/useTransitionStatus.ts"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useIsoLayoutEffect } from \"@base-ui-components/utils/useIsoLayoutEffect\";\nimport { AnimationFrame } from \"@base-ui-components/utils/useAnimationFrame\";\n\nexport type TransitionStatus = \"starting\" | \"ending\" | \"idle\" | undefined;\n\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(\n open: boolean,\n enableIdleState: boolean = false,\n deferEndingState: boolean = false\n) {\n const [transitionStatus, setTransitionStatus] =\n React.useState<TransitionStatus>(\n open && enableIdleState ? \"idle\" : undefined\n );\n const [mounted, setMounted] = React.useState(open);\n\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus(\"starting\");\n }\n\n if (!open && mounted && transitionStatus !== \"ending\" && !deferEndingState) {\n setTransitionStatus(\"ending\");\n }\n\n if (!open && !mounted && transitionStatus === \"ending\") {\n setTransitionStatus(undefined);\n }\n\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== \"ending\" && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"ending\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n\n const frame = AnimationFrame.request(() => {\n ReactDOM.flushSync(() => {\n setTransitionStatus(undefined);\n });\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n\n if (open && mounted && transitionStatus !== \"idle\") {\n setTransitionStatus(\"starting\");\n }\n\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"idle\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);\n\n return React.useMemo(\n () => ({\n mounted,\n setMounted,\n transitionStatus,\n }),\n [mounted, transitionStatus]\n );\n}\n"],"names":["useTransitionStatus","open","enableIdleState","deferEndingState","transitionStatus","setTransitionStatus","React","mounted","setMounted","useIsoLayoutEffect","frame","AnimationFrame","ReactDOM"],"mappings":";;;;;AAaO,SAASA,EACdC,GACAC,IAA2B,IAC3BC,IAA4B,IAC5B;AACA,QAAM,CAACC,GAAkBC,CAAmB,IAC1CC,EAAM;AAAA,IACJL,KAAQC,IAAkB,SAAS;AAAA,
|
|
1
|
+
{"version":3,"file":"useTransitionStatus.js","sources":["../../../src/components/hooks/useTransitionStatus.ts"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useIsoLayoutEffect } from \"@base-ui-components/utils/useIsoLayoutEffect\";\nimport { AnimationFrame } from \"@base-ui-components/utils/useAnimationFrame\";\n\nexport type TransitionStatus = \"starting\" | \"ending\" | \"idle\" | undefined;\n\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(\n open: boolean,\n enableIdleState: boolean = false,\n deferEndingState: boolean = false\n) {\n const [transitionStatus, setTransitionStatus] =\n React.useState<TransitionStatus>(\n open && enableIdleState ? \"idle\" : undefined\n );\n const [mounted, setMounted] = React.useState(open);\n\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus(\"starting\");\n }\n\n if (!open && mounted && transitionStatus !== \"ending\" && !deferEndingState) {\n setTransitionStatus(\"ending\");\n }\n\n if (!open && !mounted && transitionStatus === \"ending\") {\n setTransitionStatus(undefined);\n }\n\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== \"ending\" && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"ending\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n\n const frame = AnimationFrame.request(() => {\n ReactDOM.flushSync(() => {\n setTransitionStatus(undefined);\n });\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n\n if (open && mounted && transitionStatus !== \"idle\") {\n setTransitionStatus(\"starting\");\n }\n\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"idle\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);\n\n return React.useMemo(\n () => ({\n mounted,\n setMounted,\n transitionStatus,\n }),\n [mounted, transitionStatus]\n );\n}\n"],"names":["useTransitionStatus","open","enableIdleState","deferEndingState","transitionStatus","setTransitionStatus","React","mounted","setMounted","useIsoLayoutEffect","frame","AnimationFrame","ReactDOM"],"mappings":";;;;;AAaO,SAASA,EACdC,GACAC,IAA2B,IAC3BC,IAA4B,IAC5B;AACA,QAAM,CAACC,GAAkBC,CAAmB,IAC1CC,EAAM;AAAA,IACJL,KAAQC,IAAkB,SAAS;AAAA,EAAA,GAEjC,CAACK,GAASC,CAAU,IAAIF,EAAM,SAASL,CAAI;AAEjD,SAAIA,KAAQ,CAACM,MACXC,EAAW,EAAI,GACfH,EAAoB,UAAU,IAG5B,CAACJ,KAAQM,KAAWH,MAAqB,YAAY,CAACD,KACxDE,EAAoB,QAAQ,GAG1B,CAACJ,KAAQ,CAACM,KAAWH,MAAqB,YAC5CC,EAAoB,MAAS,GAG/BI,EAAmB,MAAM;AACvB,QAAI,CAACR,KAAQM,KAAWH,MAAqB,YAAYD,GAAkB;AACzE,YAAMO,IAAQC,EAAe,QAAQ,MAAM;AACzC,QAAAN,EAAoB,QAAQ;AAAA,MAC9B,CAAC;AAED,aAAO,MAAM;AACX,QAAAM,EAAe,OAAOD,CAAK;AAAA,MAC7B;AAAA,IACF;AAAA,EAGF,GAAG,CAACT,GAAMM,GAASH,GAAkBD,CAAgB,CAAC,GAEtDM,EAAmB,MAAM;AACvB,QAAI,CAACR,KAAQC;AACX;AAGF,UAAMQ,IAAQC,EAAe,QAAQ,MAAM;AACzC,MAAAC,EAAS,UAAU,MAAM;AACvB,QAAAP,EAAoB,MAAS;AAAA,MAC/B,CAAC;AAAA,IACH,CAAC;AAED,WAAO,MAAM;AACX,MAAAM,EAAe,OAAOD,CAAK;AAAA,IAC7B;AAAA,EACF,GAAG,CAACR,GAAiBD,CAAI,CAAC,GAE1BQ,EAAmB,MAAM;AACvB,QAAI,CAACR,KAAQ,CAACC;AACZ;AAGF,IAAID,KAAQM,KAAWH,MAAqB,UAC1CC,EAAoB,UAAU;AAGhC,UAAMK,IAAQC,EAAe,QAAQ,MAAM;AACzC,MAAAN,EAAoB,MAAM;AAAA,IAC5B,CAAC;AAED,WAAO,MAAM;AACX,MAAAM,EAAe,OAAOD,CAAK;AAAA,IAC7B;AAAA,EACF,GAAG,CAACR,GAAiBD,GAAMM,GAASF,GAAqBD,CAAgB,CAAC,GAEnEE,EAAM;AAAA,IACX,OAAO;AAAA,MACL,SAAAC;AAAA,MACA,YAAAC;AAAA,MACA,kBAAAJ;AAAA,IAAA;AAAA,IAEF,CAACG,GAASH,CAAgB;AAAA,EAAA;AAE9B;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useWindowSize.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa;;;EAuB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowSize.js","sources":["../../../src/components/hooks/useWindowSize.ts"],"sourcesContent":["\"use client\";\nimport React from 'react';\n\nexport function useWindowSize() {\n const [size, setSize] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return size;\n}\n"],"names":["useWindowSize","size","setSize","React","handleResize"],"mappings":";;AAGO,SAASA,IAAgB;AAC9B,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS;AAAA,IACrC,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA,CACT;AAEDA,SAAAA,EAAM,gBAAgB,MAAM;AAC1B,UAAMC,IAAe,MAAM;
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","sources":["../../../src/components/hooks/useWindowSize.ts"],"sourcesContent":["\"use client\";\nimport React from 'react';\n\nexport function useWindowSize() {\n const [size, setSize] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return size;\n}\n"],"names":["useWindowSize","size","setSize","React","handleResize"],"mappings":";;AAGO,SAASA,IAAgB;AAC9B,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS;AAAA,IACrC,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA,CACT;AAEDA,SAAAA,EAAM,gBAAgB,MAAM;AAC1B,UAAMC,IAAe,MAAM;AACzB,MAAAF,EAAQ;AAAA,QACN,OAAO,OAAO;AAAA,QACd,QAAQ,OAAO;AAAA,MAAA,CAChB;AAAA,IACH;AAEA,WAAAE,EAAA,GACA,OAAO,iBAAiB,UAAUA,CAAY,GAEvC,MAAM;AACX,aAAO,oBAAoB,UAAUA,CAAY;AAAA,IACnD;AAAA,EACF,GAAG,CAAA,CAAE,GAEEH;AACT;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React, ElementType, Ref, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { TooltipProps } from '../tooltip';
|
|
3
|
+
import { WithRenderPropProps, ElementTypeToDOMType } from '../utils';
|
|
4
|
+
export type IconButtonProps<E extends ElementType = "button"> = WithRenderPropProps<E, {
|
|
5
|
+
loading: boolean;
|
|
6
|
+
}> & {
|
|
7
|
+
/**
|
|
8
|
+
* Label text or element to display within tooltip
|
|
9
|
+
* @default undefined
|
|
10
|
+
*/
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Size of the icon button: small (1.25rem) or medium (1.5rem)
|
|
14
|
+
* @default medium
|
|
15
|
+
*/
|
|
16
|
+
size?: "small" | "medium";
|
|
17
|
+
/**
|
|
18
|
+
* Whether to apply negative margin for better visual alignment
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
negativeMargin?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show loading state
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Props to pass to the Tooltip component when wrapping the button
|
|
29
|
+
*/
|
|
30
|
+
tooltipProps?: TooltipProps;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to show active state
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
active?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Implementation of the IconButton component
|
|
39
|
+
*/
|
|
40
|
+
declare const IconButtonImpl: <E extends ElementType = "button">({ label, size, negativeMargin, children, className, tooltipProps, active, as, href, target, rel, download, hrefLang, referrerPolicy, loading, render, ...rest }: IconButtonProps<E>, ref: Ref<ElementTypeToDOMType<E>>) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const IconButton: <E extends ElementType = "button">(props: IconButtonProps<E> & {
|
|
42
|
+
ref?: ComponentPropsWithRef<E>["ref"];
|
|
43
|
+
}) => ReturnType<typeof IconButtonImpl>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRo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file":"component.js","sources":["../../../src/components/icon-button/component.tsx"],"sourcesContent":["\"use client\";\nimport React, {\n forwardRef,\n type ElementType,\n type Ref,\n ComponentPropsWithRef,\n} from \"react\";\nimport { Tooltip, TooltipProps } from \"../tooltip\";\nimport {\n useCls,\n clsx,\n WithRenderPropProps,\n WithRenderProp,\n ElementTypeToDOMType,\n} from \"../utils\";\nimport { Spin } from \"../spin\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Base props without href/as handling\nexport type IconButtonProps<E extends ElementType = \"button\"> =\n WithRenderPropProps<E, { loading: boolean }> & {\n /**\n * Label text or element to display within tooltip\n * @default undefined\n */\n label?: React.ReactNode;\n /**\n * Size of the icon button: small (1.25rem) or medium (1.5rem)\n * @default medium\n */\n size?: \"small\" | \"medium\";\n /**\n * Whether to apply negative margin for better visual alignment\n * @default true\n */\n negativeMargin?: boolean;\n /**\n * Whether to show loading state\n * @default false\n */\n loading?: boolean;\n /**\n * Props to pass to the Tooltip component when wrapping the button\n */\n tooltipProps?: TooltipProps;\n /**\n * Whether to show active state\n * @default false\n */\n active?: boolean;\n };\n\n/**\n * Implementation of the IconButton component\n */\nconst IconButtonImpl = <E extends ElementType = \"button\">(\n {\n label,\n size = \"medium\",\n negativeMargin = true,\n children,\n className,\n tooltipProps = {},\n active = false,\n as,\n href,\n // Extract anchor-specific props\n target,\n rel,\n download,\n hrefLang,\n referrerPolicy,\n loading,\n render,\n ...rest\n }: IconButtonProps<E>,\n ref: Ref<ElementTypeToDOMType<E>>\n) => {\n const cls = useCls();\n const buttonClasses = clsx(\n cls(\n \"icon-button\",\n `icon-button-${size}`,\n active && \"icon-button-active\",\n negativeMargin && \"icon-button-negative-margin\"\n ),\n className\n );\n\n // Use a type assertion for the component to avoid TypeScript errors\n const Component = (as || (href ? \"a\" : \"button\")) as ElementType;\n\n const elementProps = {\n ref,\n className: buttonClasses,\n ...(Component === \"button\" && { type: \"button\" }),\n ...(Component === \"a\"\n ? {\n ...(href && { href }),\n ...(target !== undefined && { target }),\n ...(rel !== undefined && { rel }),\n ...(download !== undefined && { download }),\n ...(hrefLang !== undefined && { hrefLang }),\n ...(referrerPolicy !== undefined && { referrerPolicy }),\n }\n : {}),\n \"data-loading\": loading,\n children: loading ? <Spin /> : children,\n ...rest,\n };\n\n const element = (\n <WithRenderProp\n as={Component}\n render={render}\n {...elementProps}\n state={{\n loading,\n }}\n />\n );\n\n return label ? (\n <Tooltip title={label} arrow={false} {...tooltipProps}>\n {element}\n </Tooltip>\n ) : (\n element\n );\n};\n\n// Export with correct typing\nexport const IconButton = forwardRef(IconButtonImpl) as <\n E extends ElementType = \"button\"\n>(\n props: IconButtonProps<E> & { ref?: ComponentPropsWithRef<E>[\"ref\"] }\n) => ReturnType<typeof IconButtonImpl>;\n"],"names":["IconButtonImpl","label","size","negativeMargin","children","className","tooltipProps","active","as","href","target","rel","download","hrefLang","referrerPolicy","loading","render","rest","ref","cls","useCls","buttonClasses","clsx","Component","elementProps","jsx","Spin","element","WithRenderProp","Tooltip","IconButton","forwardRef"],"mappings":";;;;;;;;;AAyDA,MAAMA,IAAiB,CACrB;AAAA,EACE,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,gBAAAC,IAAiB;AAAA,EACjB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC,IAAe,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/icon-button/component.tsx"],"sourcesContent":["\"use client\";\nimport React, {\n forwardRef,\n type ElementType,\n type Ref,\n ComponentPropsWithRef,\n} from \"react\";\nimport { Tooltip, TooltipProps } from \"../tooltip\";\nimport {\n useCls,\n clsx,\n WithRenderPropProps,\n WithRenderProp,\n ElementTypeToDOMType,\n} from \"../utils\";\nimport { Spin } from \"../spin\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Base props without href/as handling\nexport type IconButtonProps<E extends ElementType = \"button\"> =\n WithRenderPropProps<E, { loading: boolean }> & {\n /**\n * Label text or element to display within tooltip\n * @default undefined\n */\n label?: React.ReactNode;\n /**\n * Size of the icon button: small (1.25rem) or medium (1.5rem)\n * @default medium\n */\n size?: \"small\" | \"medium\";\n /**\n * Whether to apply negative margin for better visual alignment\n * @default true\n */\n negativeMargin?: boolean;\n /**\n * Whether to show loading state\n * @default false\n */\n loading?: boolean;\n /**\n * Props to pass to the Tooltip component when wrapping the button\n */\n tooltipProps?: TooltipProps;\n /**\n * Whether to show active state\n * @default false\n */\n active?: boolean;\n };\n\n/**\n * Implementation of the IconButton component\n */\nconst IconButtonImpl = <E extends ElementType = \"button\">(\n {\n label,\n size = \"medium\",\n negativeMargin = true,\n children,\n className,\n tooltipProps = {},\n active = false,\n as,\n href,\n // Extract anchor-specific props\n target,\n rel,\n download,\n hrefLang,\n referrerPolicy,\n loading,\n render,\n ...rest\n }: IconButtonProps<E>,\n ref: Ref<ElementTypeToDOMType<E>>\n) => {\n const cls = useCls();\n const buttonClasses = clsx(\n cls(\n \"icon-button\",\n `icon-button-${size}`,\n active && \"icon-button-active\",\n negativeMargin && \"icon-button-negative-margin\"\n ),\n className\n );\n\n // Use a type assertion for the component to avoid TypeScript errors\n const Component = (as || (href ? \"a\" : \"button\")) as ElementType;\n\n const elementProps = {\n ref,\n className: buttonClasses,\n ...(Component === \"button\" && { type: \"button\" }),\n ...(Component === \"a\"\n ? {\n ...(href && { href }),\n ...(target !== undefined && { target }),\n ...(rel !== undefined && { rel }),\n ...(download !== undefined && { download }),\n ...(hrefLang !== undefined && { hrefLang }),\n ...(referrerPolicy !== undefined && { referrerPolicy }),\n }\n : {}),\n \"data-loading\": loading,\n children: loading ? <Spin /> : children,\n ...rest,\n };\n\n const element = (\n <WithRenderProp\n as={Component}\n render={render}\n {...elementProps}\n state={{\n loading,\n }}\n />\n );\n\n return label ? (\n <Tooltip title={label} arrow={false} {...tooltipProps}>\n {element}\n </Tooltip>\n ) : (\n element\n );\n};\n\n// Export with correct typing\nexport const IconButton = forwardRef(IconButtonImpl) as <\n E extends ElementType = \"button\"\n>(\n props: IconButtonProps<E> & { ref?: ComponentPropsWithRef<E>[\"ref\"] }\n) => ReturnType<typeof IconButtonImpl>;\n"],"names":["IconButtonImpl","label","size","negativeMargin","children","className","tooltipProps","active","as","href","target","rel","download","hrefLang","referrerPolicy","loading","render","rest","ref","cls","useCls","buttonClasses","clsx","Component","elementProps","jsx","Spin","element","WithRenderProp","Tooltip","IconButton","forwardRef"],"mappings":";;;;;;;;;AAyDA,MAAMA,IAAiB,CACrB;AAAA,EACE,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,gBAAAC,IAAiB;AAAA,EACjB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC,IAAe,CAAA;AAAA,EACf,QAAAC,IAAS;AAAA,EACT,IAAAC;AAAA,EACA,MAAAC;AAAA;AAAA,EAEA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IAAMC,EAAA,GACNC,IAAgBC;AAAA,IACpBH;AAAA,MACE;AAAA,MACA,eAAejB,CAAI;AAAA,MACnBK,KAAU;AAAA,MACVJ,KAAkB;AAAA,IAAA;AAAA,IAEpBE;AAAA,EAAA,GAIIkB,IAAaf,MAAOC,IAAO,MAAM,WAEjCe,IAAe;AAAA,IACnB,KAAAN;AAAA,IACA,WAAWG;AAAA,IACX,GAAIE,MAAc,YAAY,EAAE,MAAM,SAAA;AAAA,IACtC,GAAIA,MAAc,MACd;AAAA,MACE,GAAId,KAAQ,EAAE,MAAAA,EAAA;AAAA,MACd,GAAIC,MAAW,UAAa,EAAE,QAAAA,EAAA;AAAA,MAC9B,GAAIC,MAAQ,UAAa,EAAE,KAAAA,EAAA;AAAA,MAC3B,GAAIC,MAAa,UAAa,EAAE,UAAAA,EAAA;AAAA,MAChC,GAAIC,MAAa,UAAa,EAAE,UAAAA,EAAA;AAAA,MAChC,GAAIC,MAAmB,UAAa,EAAE,gBAAAA,EAAA;AAAA,IAAe,IAEvD,CAAA;AAAA,IACJ,gBAAgBC;AAAA,IAChB,UAAUA,IAAU,gBAAAU,EAACC,GAAA,CAAA,CAAK,IAAKtB;AAAA,IAC/B,GAAGa;AAAA,EAAA,GAGCU,IACJ,gBAAAF;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIL;AAAA,MACJ,QAAAP;AAAA,MACC,GAAGQ;AAAA,MACJ,OAAO;AAAA,QACL,SAAAT;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAIJ,SAAOd,IACL,gBAAAwB,EAACI,GAAA,EAAQ,OAAO5B,GAAO,OAAO,IAAQ,GAAGK,GACtC,UAAAqB,EAAA,CACH,IAEAA;AAEJ,GAGaG,IAAaC,EAAW/B,CAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BackTop, Calendar, Card, Carousel, Cascader, Col, ColorPicker, ConfigProvider, DatePicker, Descriptions, Divider, Drawer, Dropdown, Flex, FloatButton, Grid, InputNumber, Layout, List, Mentions, Menu, message, notification, Pagination, Popconfirm, Progress, QRCode, Rate, Result, Row, Skeleton, Space, Statistic, Steps, Tabs, theme, TimePicker, Timeline, Transfer, TreeSelect, Typography, version, Watermark, unstableSetRender, } from 'antd';
|
|
2
|
+
export type { AffixProps, AffixRef, AlertProps, AnchorLinkProps, AnchorProps, AppProps, AutoCompleteProps, AvatarProps, BackTopProps, CalendarMode, CalendarProps, CardProps, CarouselProps, CascaderProps, CascaderAutoProps, CascaderPanelProps, CascaderPanelAutoProps, CheckboxChangeEvent, CheckboxOptionType, CheckboxRef, ColProps, ColorPickerProps, ConfigProviderProps, ThemeConfig, DatePickerProps, DescriptionsProps, DividerProps, DrawerProps, DropDownProps, DropdownProps, FlexProps, FloatButtonGroupProps, FloatButtonProps, FloatButtonRef, FormInstance, FormListFieldData, FormListOperation, FormProps, InputNumberProps, LayoutProps, SiderProps, ListProps, MentionProps, MentionsProps, MenuItemProps, MenuProps, MenuRef, MenuTheme, SubMenuProps, MessageArgsProps, ModalFuncProps, NotificationArgsProps, PaginationProps, PopconfirmProps, ProgressProps, QRCodeProps, QRPropsCanvas, QRPropsSvg, RateProps, ResultProps, RowProps, RefSelectProps, SkeletonProps, SliderSingleProps, SpaceProps, CountdownProps, StatisticProps, StepProps, StepsProps, TableColumnGroupType, TableColumnProps, TableColumnType, TableColumnsType, TablePaginationConfig, TabPaneProps, TabsProps, TagType, GlobalToken, MappingAlgorithm, TimePickerProps, TimeRangePickerProps, TimelineItemProps, TimelineProps, TransferProps, TreeSelectProps, TypographyProps, UploadFile, WatermarkProps, } from 'antd';
|
|
3
|
+
export * from './select/index';
|
|
4
|
+
export * from './modal/index';
|
|
5
|
+
export * from './icon-button/index';
|
|
6
|
+
export * from './switch/component';
|
|
7
|
+
export * from './checkbox/index';
|
|
8
|
+
export * from './segmented/index';
|
|
9
|
+
export * from './table/component';
|
|
10
|
+
export * from './tag/component';
|
|
11
|
+
export * from './theme-provider/component';
|
|
12
|
+
export * from './splitter/component';
|
|
13
|
+
export * from './truncate/component';
|
|
14
|
+
export * from './dropdown-menu/index';
|
|
15
|
+
export * from './command-palette/index';
|
|
16
|
+
export * from './keyboard-shortcut/index';
|
|
17
|
+
export * from './transition/index';
|
|
18
|
+
export * from './upload/index';
|
|
19
|
+
export * from './scroll-area/index';
|
|
20
|
+
export * from './popover/index';
|
|
21
|
+
export * from './slider/component';
|
|
22
|
+
export * from './tooltip/component';
|
|
23
|
+
export * from './breadcrumb/index';
|
|
24
|
+
export * from './tree/index';
|
|
25
|
+
export * from './spin/index';
|
|
26
|
+
export * from './empty/component';
|
|
27
|
+
export * from './form/component';
|
|
28
|
+
export * from './field/component';
|
|
29
|
+
export * from './tour/component';
|
|
30
|
+
export * from './toast/index';
|
|
31
|
+
export * from './vertical-collapsible-panel/index';
|
|
32
|
+
export * from './popup-panel/index';
|
|
33
|
+
export * from './code-block/index';
|
|
34
|
+
export * from './stack/index';
|
|
35
|
+
export * from './collapse/index';
|
|
36
|
+
export * from './empty/index';
|
|
37
|
+
export * from './input/index';
|
|
38
|
+
export * from './badge/component';
|
|
39
|
+
export * from './radio/index';
|
|
40
|
+
export * from './button/component';
|
|
41
|
+
export * from './ds-root/index';
|
|
42
|
+
export * from './drag-drop/index';
|
|
43
|
+
export * from './color-select/index';
|
|
44
|
+
export * from './nav/index';
|
|
45
|
+
export * from './choice-list/index';
|
|
46
|
+
export * from './status-icon/index';
|
|
47
|
+
export * from './resizable/index';
|
|
48
|
+
export * from './combobox/index';
|
|
49
|
+
export * from './select-trigger/index';
|
|
50
|
+
export * from './loader/index';
|
|
51
|
+
export * from './utils/index';
|
|
52
|
+
export * from './hooks/index';
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,EACH,YAAY,EACZ,MAAM,EACN,OAAO,EAIP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,EAER,GAAG,EAEH,WAAW,EACX,cAAc,EACd,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,QAAQ,EAER,IAAI,EACJ,WAAW,EAEX,IAAI,EAGJ,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EAEP,YAAY,EACZ,UAAU,EACV,UAAU,EAEV,QAAQ,EACR,MAAM,EAEN,IAAI,EACJ,MAAM,EACN,GAAG,EAGH,QAAQ,EAER,KAAK,EAEL,SAAS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B,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InputProps as AntInputProps, InputRef } from 'antd';
|
|
2
|
+
import { PasswordProps as AntPasswordProps, SearchProps as AntSearchProps, TextAreaProps as AntTextAreaProps } from 'antd/es/input';
|
|
3
|
+
export interface InputProps extends AntInputProps {
|
|
4
|
+
}
|
|
5
|
+
export interface PasswordProps extends AntPasswordProps {
|
|
6
|
+
}
|
|
7
|
+
export interface TextAreaProps extends AntTextAreaProps {
|
|
8
|
+
}
|
|
9
|
+
export interface SearchProps extends AntSearchProps {
|
|
10
|
+
}
|
|
11
|
+
declare const MainInputInner: (props: InputProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const PasswordInner: (props: PasswordProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const SearchInner: ({ enterButton, onSearch, prefix, onPressEnter, onClear, loading, ...rest }: SearchProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const TextAreaInner: (props: TextAreaProps, ref: React.Ref<HTMLTextAreaElement>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Input: ((props: InputProps & {
|
|
16
|
+
ref?: React.ForwardedRef<InputRef>;
|
|
17
|
+
}) => ReturnType<typeof MainInputInner>) & {
|
|
18
|
+
Password: (props: PasswordProps & {
|
|
19
|
+
ref?: React.ForwardedRef<InputRef>;
|
|
20
|
+
}) => ReturnType<typeof PasswordInner>;
|
|
21
|
+
Search: (props: SearchProps & {
|
|
22
|
+
ref?: React.ForwardedRef<InputRef>;
|
|
23
|
+
}) => ReturnType<typeof SearchInner>;
|
|
24
|
+
TextArea: (props: TextAreaProps & {
|
|
25
|
+
ref?: React.ForwardedRef<HTMLTextAreaElement>;
|
|
26
|
+
}) => ReturnType<typeof TextAreaInner>;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/input/component.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,UAAU,IAAI,aAAa,EAChC,KAAK,QAAQ,EACd,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,aAAa,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,KAAK,aAAa,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKvE,OAAO,aAAa,CAAC;AAIrB,MAAM,WAAW,UAAW,SAAQ,aAAa;CAAG;AACpD,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CAAG;AAC1D,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CAAG;AAC1D,MAAM,WAAW,WAAY,SAAQ,cAAc;CAAG;AAGtD,QAAA,MAAM,cAAc,GAAI,OAAO,UAAU,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,4CAElE,CAAC;AAGF,QAAA,MAAM,aAAa,GAAI,OAAO,aAAa,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,4CAiBpE,CAAC;AAGF,QAAA,MAAM,WAAW,GACf,4EAQG,WAAW,EACd,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,4CA6CzB,CAAC;AAGF,QAAA,MAAM,aAAa,GACjB,OAAO,aAAa,EACpB,KAAK,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,4CAGpC,CAAC;AA+BF,eAAO,MAAM,KAAK,WA3BT,UAAU,GAAG;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;CACpC,KACE,UAAU,CAAC,OAAO,cAAc,CAAC;sBAI7B,aAAa,GAAG;QACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACpC,KACE,UAAU,CAAC,OAAO,aAAa,CAAC;oBAI5B,WAAW,GAAG;QACnB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACpC,KACE,UAAU,CAAC,OAAO,WAAW,CAAC;sBAI1B,aAAa,GAAG;QACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;KAC/C,KACE,UAAU,CAAC,OAAO,aAAa,CAAC;CAOnC,CAAC"}
|
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { MagnifyingGlassIcon as p, EyeIcon as x, EyeClosedIcon as C } from "@bioturing/assets";
|
|
4
|
-
import { Input as
|
|
5
|
-
import { forwardRef as
|
|
4
|
+
import { Input as o } from "antd";
|
|
5
|
+
import { forwardRef as a, useCallback as d, useMemo as P } from "react";
|
|
6
6
|
import './style.css';/* empty css */
|
|
7
7
|
import { useCls as g } from "../utils/antdUtils.js";
|
|
8
|
-
import { Spin as
|
|
9
|
-
import { IconButton as
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
iconRender: (
|
|
13
|
-
|
|
8
|
+
import { Spin as h } from "../spin/component.js";
|
|
9
|
+
import { IconButton as z } from "../icon-button/component.js";
|
|
10
|
+
const M = (s, r) => /* @__PURE__ */ e(o, { ref: r, ...s }), T = (s, r) => {
|
|
11
|
+
const t = P(() => ({
|
|
12
|
+
iconRender: (n) => /* @__PURE__ */ e(
|
|
13
|
+
z,
|
|
14
14
|
{
|
|
15
15
|
size: "small",
|
|
16
|
-
label:
|
|
17
|
-
children:
|
|
16
|
+
label: n ? "Hide password" : "Show password",
|
|
17
|
+
children: n ? /* @__PURE__ */ e(x, {}) : /* @__PURE__ */ e(C, {})
|
|
18
18
|
}
|
|
19
19
|
),
|
|
20
|
-
...
|
|
21
|
-
}), [
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
},
|
|
24
|
-
enterButton:
|
|
25
|
-
onSearch:
|
|
26
|
-
prefix:
|
|
27
|
-
onPressEnter:
|
|
28
|
-
onClear:
|
|
29
|
-
loading:
|
|
30
|
-
...
|
|
20
|
+
...s
|
|
21
|
+
}), [s]);
|
|
22
|
+
return /* @__PURE__ */ e(o.Password, { ref: r, ...t });
|
|
23
|
+
}, y = ({
|
|
24
|
+
enterButton: s = !1,
|
|
25
|
+
onSearch: r,
|
|
26
|
+
prefix: t,
|
|
27
|
+
onPressEnter: n,
|
|
28
|
+
onClear: c,
|
|
29
|
+
loading: i,
|
|
30
|
+
...u
|
|
31
31
|
}, l) => {
|
|
32
32
|
const I = g(), f = d(
|
|
33
33
|
(m) => {
|
|
34
|
-
|
|
34
|
+
r?.(m.currentTarget.value, m, { source: "input" });
|
|
35
35
|
},
|
|
36
|
-
[
|
|
36
|
+
[r]
|
|
37
37
|
), w = d(() => {
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
return
|
|
41
|
-
|
|
38
|
+
r?.("", void 0, { source: "clear" });
|
|
39
|
+
}, [r]);
|
|
40
|
+
return s === !1 ? /* @__PURE__ */ e(
|
|
41
|
+
o,
|
|
42
42
|
{
|
|
43
43
|
ref: l,
|
|
44
|
-
prefix:
|
|
45
|
-
onPressEnter:
|
|
46
|
-
onClear:
|
|
44
|
+
prefix: t || (i ? /* @__PURE__ */ e(h, { size: 16 }) : /* @__PURE__ */ e(p, { size: 16, className: I("input-search-icon") })),
|
|
45
|
+
onPressEnter: n || f,
|
|
46
|
+
onClear: c || w,
|
|
47
47
|
allowClear: !0,
|
|
48
|
-
...
|
|
48
|
+
...u
|
|
49
49
|
}
|
|
50
|
-
) : /* @__PURE__ */
|
|
51
|
-
|
|
50
|
+
) : /* @__PURE__ */ e(
|
|
51
|
+
o.Search,
|
|
52
52
|
{
|
|
53
53
|
ref: l,
|
|
54
|
-
prefix:
|
|
55
|
-
onPressEnter:
|
|
56
|
-
onSearch:
|
|
57
|
-
onClear:
|
|
58
|
-
loading:
|
|
59
|
-
enterButton:
|
|
60
|
-
...
|
|
54
|
+
prefix: t,
|
|
55
|
+
onPressEnter: n,
|
|
56
|
+
onSearch: r,
|
|
57
|
+
onClear: c,
|
|
58
|
+
loading: i,
|
|
59
|
+
enterButton: s === !0 ? /* @__PURE__ */ e(p, { size: 16 }) : s,
|
|
60
|
+
...u
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
},
|
|
64
|
-
Password:
|
|
65
|
-
Search:
|
|
66
|
-
TextArea:
|
|
63
|
+
}, A = (s, r) => /* @__PURE__ */ e(o.TextArea, { ref: r, ...s }), E = a(M), b = a(T), j = a(y), R = a(A), v = Object.assign(E, {
|
|
64
|
+
Password: b,
|
|
65
|
+
Search: j,
|
|
66
|
+
TextArea: R
|
|
67
67
|
});
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
v as Input
|
|
70
70
|
};
|
|
71
71
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/input/component.tsx"],"sourcesContent":["\"use client\";\nimport { EyeIcon, EyeClosedIcon, MagnifyingGlassIcon } from \"@bioturing/assets\";\nimport {\n Input as AntInput,\n type InputProps as AntInputProps,\n type InputRef,\n} from \"antd\";\nimport { type PasswordProps as AntPasswordProps } from \"antd/es/input\";\nimport { type SearchProps as AntSearchProps } from \"antd/es/input\";\nimport { type TextAreaProps as AntTextAreaProps } from \"antd/es/input\";\nimport { forwardRef, useCallback, useMemo } from \"react\";\nimport { useCls } from \"../utils\";\nimport { Spin } from \"../spin\";\n\nimport \"./style.css\";\nimport { IconButton } from \"../icon-button\";\n\n// Define props interfaces\nexport interface InputProps extends AntInputProps {}\nexport interface PasswordProps extends AntPasswordProps {}\nexport interface TextAreaProps extends AntTextAreaProps {}\nexport interface SearchProps extends AntSearchProps {}\n\n// Create inner function for main Input\nconst MainInputInner = (props: InputProps, ref: React.Ref<InputRef>) => {\n return <AntInput ref={ref} {...props} />;\n};\n\n// Create inner function for Password\nconst PasswordInner = (props: PasswordProps, ref: React.Ref<InputRef>) => {\n // Apply default iconRender unless overridden by props\n const mergedProps = useMemo(() => {\n return {\n iconRender: (visible: boolean) => (\n <IconButton\n size=\"small\"\n label={visible ? \"Hide password\" : \"Show password\"}\n >\n {visible ? <EyeIcon /> : <EyeClosedIcon />}\n </IconButton>\n ),\n ...props,\n };\n }, [props]);\n\n return <AntInput.Password ref={ref} {...mergedProps} />;\n};\n\n// Create inner function for Search\nconst SearchInner = (\n {\n enterButton = false,\n onSearch,\n prefix,\n onPressEnter,\n onClear,\n loading,\n ...rest\n }: SearchProps,\n ref: React.Ref<InputRef>\n) => {\n const cls = useCls();\n\n const handlePressEnter = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value, event, { source: \"input\" });\n },\n [onSearch]\n );\n\n const handleClear = useCallback(() => {\n onSearch?.(\"\", undefined, { source: \"clear\" });\n }, [onSearch]);\n\n return enterButton === false ? (\n <AntInput\n ref={ref}\n prefix={\n prefix ||\n (loading ? (\n <Spin size={16} />\n ) : (\n <MagnifyingGlassIcon size={16} className={cls(\"input-search-icon\")} />\n ))\n }\n onPressEnter={onPressEnter || handlePressEnter}\n onClear={onClear || handleClear}\n allowClear\n {...rest}\n />\n ) : (\n <AntInput.Search\n ref={ref}\n prefix={prefix}\n onPressEnter={onPressEnter}\n onSearch={onSearch}\n onClear={onClear}\n loading={loading}\n enterButton={\n enterButton === true ? <MagnifyingGlassIcon size={16} /> : enterButton\n }\n {...rest}\n />\n );\n};\n\n// Create inner function for TextArea\nconst TextAreaInner = (\n props: TextAreaProps,\n ref: React.Ref<HTMLTextAreaElement>\n) => {\n return <AntInput.TextArea ref={ref} {...props} />;\n};\n\n// Use forwardRef with type assertion for main Input\nconst MainInput = forwardRef(MainInputInner) as (\n props: InputProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof MainInputInner>;\n\n// Use forwardRef with type assertion for Password\nconst Password = forwardRef(PasswordInner) as (\n props: PasswordProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof PasswordInner>;\n\n// Use forwardRef with type assertion for Search\nconst Search = forwardRef(SearchInner) as (\n props: SearchProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof SearchInner>;\n\n// Use forwardRef with type assertion for TextArea\nconst TextArea = forwardRef(TextAreaInner) as (\n props: TextAreaProps & {\n ref?: React.ForwardedRef<HTMLTextAreaElement>;\n }\n) => ReturnType<typeof TextAreaInner>;\n\n// Export the final composed component\nexport const Input = Object.assign(MainInput, {\n Password,\n Search,\n TextArea,\n});\n"],"names":["MainInputInner","props","ref","jsx","AntInput","PasswordInner","mergedProps","useMemo","visible","IconButton","EyeIcon","EyeClosedIcon","SearchInner","enterButton","onSearch","prefix","onPressEnter","onClear","loading","rest","cls","useCls","handlePressEnter","useCallback","event","handleClear","Spin","MagnifyingGlassIcon","TextAreaInner","MainInput","forwardRef","Password","Search","TextArea","Input"],"mappings":";;;;;;;;;AAwBA,MAAMA,IAAiB,CAACC,GAAmBC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/input/component.tsx"],"sourcesContent":["\"use client\";\nimport { EyeIcon, EyeClosedIcon, MagnifyingGlassIcon } from \"@bioturing/assets\";\nimport {\n Input as AntInput,\n type InputProps as AntInputProps,\n type InputRef,\n} from \"antd\";\nimport { type PasswordProps as AntPasswordProps } from \"antd/es/input\";\nimport { type SearchProps as AntSearchProps } from \"antd/es/input\";\nimport { type TextAreaProps as AntTextAreaProps } from \"antd/es/input\";\nimport { forwardRef, useCallback, useMemo } from \"react\";\nimport { useCls } from \"../utils\";\nimport { Spin } from \"../spin\";\n\nimport \"./style.css\";\nimport { IconButton } from \"../icon-button\";\n\n// Define props interfaces\nexport interface InputProps extends AntInputProps {}\nexport interface PasswordProps extends AntPasswordProps {}\nexport interface TextAreaProps extends AntTextAreaProps {}\nexport interface SearchProps extends AntSearchProps {}\n\n// Create inner function for main Input\nconst MainInputInner = (props: InputProps, ref: React.Ref<InputRef>) => {\n return <AntInput ref={ref} {...props} />;\n};\n\n// Create inner function for Password\nconst PasswordInner = (props: PasswordProps, ref: React.Ref<InputRef>) => {\n // Apply default iconRender unless overridden by props\n const mergedProps = useMemo(() => {\n return {\n iconRender: (visible: boolean) => (\n <IconButton\n size=\"small\"\n label={visible ? \"Hide password\" : \"Show password\"}\n >\n {visible ? <EyeIcon /> : <EyeClosedIcon />}\n </IconButton>\n ),\n ...props,\n };\n }, [props]);\n\n return <AntInput.Password ref={ref} {...mergedProps} />;\n};\n\n// Create inner function for Search\nconst SearchInner = (\n {\n enterButton = false,\n onSearch,\n prefix,\n onPressEnter,\n onClear,\n loading,\n ...rest\n }: SearchProps,\n ref: React.Ref<InputRef>\n) => {\n const cls = useCls();\n\n const handlePressEnter = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value, event, { source: \"input\" });\n },\n [onSearch]\n );\n\n const handleClear = useCallback(() => {\n onSearch?.(\"\", undefined, { source: \"clear\" });\n }, [onSearch]);\n\n return enterButton === false ? (\n <AntInput\n ref={ref}\n prefix={\n prefix ||\n (loading ? (\n <Spin size={16} />\n ) : (\n <MagnifyingGlassIcon size={16} className={cls(\"input-search-icon\")} />\n ))\n }\n onPressEnter={onPressEnter || handlePressEnter}\n onClear={onClear || handleClear}\n allowClear\n {...rest}\n />\n ) : (\n <AntInput.Search\n ref={ref}\n prefix={prefix}\n onPressEnter={onPressEnter}\n onSearch={onSearch}\n onClear={onClear}\n loading={loading}\n enterButton={\n enterButton === true ? <MagnifyingGlassIcon size={16} /> : enterButton\n }\n {...rest}\n />\n );\n};\n\n// Create inner function for TextArea\nconst TextAreaInner = (\n props: TextAreaProps,\n ref: React.Ref<HTMLTextAreaElement>\n) => {\n return <AntInput.TextArea ref={ref} {...props} />;\n};\n\n// Use forwardRef with type assertion for main Input\nconst MainInput = forwardRef(MainInputInner) as (\n props: InputProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof MainInputInner>;\n\n// Use forwardRef with type assertion for Password\nconst Password = forwardRef(PasswordInner) as (\n props: PasswordProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof PasswordInner>;\n\n// Use forwardRef with type assertion for Search\nconst Search = forwardRef(SearchInner) as (\n props: SearchProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof SearchInner>;\n\n// Use forwardRef with type assertion for TextArea\nconst TextArea = forwardRef(TextAreaInner) as (\n props: TextAreaProps & {\n ref?: React.ForwardedRef<HTMLTextAreaElement>;\n }\n) => ReturnType<typeof TextAreaInner>;\n\n// Export the final composed component\nexport const Input = Object.assign(MainInput, {\n Password,\n Search,\n TextArea,\n});\n"],"names":["MainInputInner","props","ref","jsx","AntInput","PasswordInner","mergedProps","useMemo","visible","IconButton","EyeIcon","EyeClosedIcon","SearchInner","enterButton","onSearch","prefix","onPressEnter","onClear","loading","rest","cls","useCls","handlePressEnter","useCallback","event","handleClear","Spin","MagnifyingGlassIcon","TextAreaInner","MainInput","forwardRef","Password","Search","TextArea","Input"],"mappings":";;;;;;;;;AAwBA,MAAMA,IAAiB,CAACC,GAAmBC,MAClC,gBAAAC,EAACC,GAAA,EAAS,KAAAF,GAAW,GAAGD,EAAA,CAAO,GAIlCI,IAAgB,CAACJ,GAAsBC,MAA6B;AAExE,QAAMI,IAAcC,EAAQ,OACnB;AAAA,IACL,YAAY,CAACC,MACX,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOD,IAAU,kBAAkB;AAAA,QAElC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IAAKd;AAAA,MAE5D,GAAGM;AAAA,IAAA;AAAA,EAAA;AAGV,GAGMS,IAAgB,CACpB3B,GACAC,wBAEQE,EAAS,UAAT,EAAkB,KAAAF,GAAW,GAAGD,GAAO,GAI3C4B,IAAYC,EAAW9B,CAAc,GAOrC+B,IAAWD,EAAWzB,CAAa,GAOnC2B,IAASF,EAAWlB,CAAW,GAO/BqB,IAAWH,EAAWF,CAAa,GAO5BM,IAAQ,OAAO,OAAOL,GAAW;AAAA,EAC5C,UAAAE;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AACF,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface KeyboardShortcutProps {
|
|
3
|
+
/** The keyboard shortcut keys to display (optional if using children) */
|
|
4
|
+
keys?: string[];
|
|
5
|
+
/** Custom className */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Custom style */
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
/** Size variant */
|
|
10
|
+
size?: "small" | "medium" | "large";
|
|
11
|
+
/** Children to display as keyboard shortcuts */
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const KeyboardShortcut: React.FC<KeyboardShortcutProps>;
|
|
15
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,mBAAmB;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsF5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/keyboard-shortcut/component.tsx"],"sourcesContent":["import React from \"react\";\nimport { useCls, clsx } from \"../utils\";\nimport \"./style.css\";\n\nexport interface KeyboardShortcutProps {\n /** The keyboard shortcut keys to display (optional if using children) */\n keys?: string[];\n /** Custom className */\n className?: string;\n /** Custom style */\n style?: React.CSSProperties;\n /** Size variant */\n size?: \"small\" | \"medium\" | \"large\";\n /** Children to display as keyboard shortcuts */\n children?: React.ReactNode;\n}\n\nexport const KeyboardShortcut: React.FC<KeyboardShortcutProps> = ({\n keys,\n className,\n style,\n size = \"medium\",\n children,\n}) => {\n const cls = useCls();\n\n const formatKey = (key: string): string => {\n // Common key mappings for better display\n const keyMap: Record<string, string> = {\n meta: \"⌘\",\n cmd: \"⌘\",\n command: \"⌘\",\n ctrl: \"Ctrl\",\n control: \"Ctrl\",\n shift: \"⇧\",\n alt: \"⌥\",\n option: \"⌥\",\n enter: \"↵\",\n return: \"↵\",\n space: \"Space\",\n tab: \"⇥\",\n escape: \"Esc\",\n esc: \"Esc\",\n delete: \"⌫\",\n backspace: \"⌫\",\n arrowup: \"↑\",\n arrowdown: \"↓\",\n arrowleft: \"←\",\n arrowright: \"→\",\n up: \"↑\",\n down: \"↓\",\n left: \"←\",\n right: \"→\",\n };\n\n const lowerKey = key.toLowerCase();\n return keyMap[lowerKey] || key.toUpperCase();\n };\n\n // If children are provided, use them directly\n if (children) {\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {children}\n </kbd>\n </span>\n );\n }\n\n // If no keys provided, return null\n if (!keys || keys.length === 0) {\n return null;\n }\n\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n {keys.map((key, index) => (\n <React.Fragment key={index}>\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {formatKey(key)}\n </kbd>\n {index < keys.length - 1 && (\n <span className={cls(\"keyboard-shortcut-separator\")}>+</span>\n )}\n </React.Fragment>\n ))}\n </span>\n );\n};"],"names":["KeyboardShortcut","keys","className","style","size","children","cls","useCls","formatKey","key","keyMap","lowerKey","jsx","clsx","index","jsxs","React"],"mappings":";;;;;AAiBO,MAAMA,IAAoD,CAAC;AAAA,EAChE,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAMC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/keyboard-shortcut/component.tsx"],"sourcesContent":["import React from \"react\";\nimport { useCls, clsx } from \"../utils\";\nimport \"./style.css\";\n\nexport interface KeyboardShortcutProps {\n /** The keyboard shortcut keys to display (optional if using children) */\n keys?: string[];\n /** Custom className */\n className?: string;\n /** Custom style */\n style?: React.CSSProperties;\n /** Size variant */\n size?: \"small\" | \"medium\" | \"large\";\n /** Children to display as keyboard shortcuts */\n children?: React.ReactNode;\n}\n\nexport const KeyboardShortcut: React.FC<KeyboardShortcutProps> = ({\n keys,\n className,\n style,\n size = \"medium\",\n children,\n}) => {\n const cls = useCls();\n\n const formatKey = (key: string): string => {\n // Common key mappings for better display\n const keyMap: Record<string, string> = {\n meta: \"⌘\",\n cmd: \"⌘\",\n command: \"⌘\",\n ctrl: \"Ctrl\",\n control: \"Ctrl\",\n shift: \"⇧\",\n alt: \"⌥\",\n option: \"⌥\",\n enter: \"↵\",\n return: \"↵\",\n space: \"Space\",\n tab: \"⇥\",\n escape: \"Esc\",\n esc: \"Esc\",\n delete: \"⌫\",\n backspace: \"⌫\",\n arrowup: \"↑\",\n arrowdown: \"↓\",\n arrowleft: \"←\",\n arrowright: \"→\",\n up: \"↑\",\n down: \"↓\",\n left: \"←\",\n right: \"→\",\n };\n\n const lowerKey = key.toLowerCase();\n return keyMap[lowerKey] || key.toUpperCase();\n };\n\n // If children are provided, use them directly\n if (children) {\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {children}\n </kbd>\n </span>\n );\n }\n\n // If no keys provided, return null\n if (!keys || keys.length === 0) {\n return null;\n }\n\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n {keys.map((key, index) => (\n <React.Fragment key={index}>\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {formatKey(key)}\n </kbd>\n {index < keys.length - 1 && (\n <span className={cls(\"keyboard-shortcut-separator\")}>+</span>\n )}\n </React.Fragment>\n ))}\n </span>\n );\n};"],"names":["KeyboardShortcut","keys","className","style","size","children","cls","useCls","formatKey","key","keyMap","lowerKey","jsx","clsx","index","jsxs","React"],"mappings":";;;;;AAiBO,MAAMA,IAAoD,CAAC;AAAA,EAChE,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAMC,EAAA,GAENC,IAAY,CAACC,MAAwB;AAEzC,UAAMC,IAAiC;AAAA,MACrC,MAAM;AAAA,MACN,KAAK;AAAA,MACL,SAAS;AAAA,MACT,MAAM;AAAA,MACN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AOrB,CACD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface LoaderProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
2
|
+
text?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const Loader: import('react').ForwardRefExoticComponent<LoaderProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/loader/component.tsx"],"names":[],"mappings":"AAGA,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,MAAM,yGASlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/loader/component.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { useCls } from \"../utils\";\n\nimport \"./style.css\";\n\nexport interface LoaderProps extends React.ComponentPropsWithoutRef<\"span\"> {\n text?: string;\n}\n\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(\n ({ text = \"Loading\", ...rest }: LoaderProps, ref) => {\n const cls = useCls();\n return (\n <span ref={ref} role=\"status\" className={cls(\"loader\")} {...rest}>\n {text}\n </span>\n );\n },\n);\n\nLoader.displayName = \"Loader\";\n"],"names":["Loader","forwardRef","text","rest","ref","cls","useCls","jsx"],"mappings":";;;;AASO,MAAMA,IAASC;AAAA,EACpB,CAAC,EAAE,MAAAC,IAAO,WAAW,GAAGC,EAAA,GAAqBC,MAAQ;AACnD,UAAMC,IAAMC,
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/loader/component.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { useCls } from \"../utils\";\n\nimport \"./style.css\";\n\nexport interface LoaderProps extends React.ComponentPropsWithoutRef<\"span\"> {\n text?: string;\n}\n\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(\n ({ text = \"Loading\", ...rest }: LoaderProps, ref) => {\n const cls = useCls();\n return (\n <span ref={ref} role=\"status\" className={cls(\"loader\")} {...rest}>\n {text}\n </span>\n );\n },\n);\n\nLoader.displayName = \"Loader\";\n"],"names":["Loader","forwardRef","text","rest","ref","cls","useCls","jsx"],"mappings":";;;;AASO,MAAMA,IAASC;AAAA,EACpB,CAAC,EAAE,MAAAC,IAAO,WAAW,GAAGC,EAAA,GAAqBC,MAAQ;AACnD,UAAMC,IAAMC,EAAA;AACZ,WACE,gBAAAC,EAAC,QAAA,EAAK,KAAAH,GAAU,MAAK,UAAS,WAAWC,EAAI,QAAQ,GAAI,GAAGF,GACzD,UAAAD,EAAA,CACH;AAAA,EAEJ;AACF;AAEAF,EAAO,cAAc;"}
|