@chayns-components/core 5.3.9 → 5.3.10
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/AGENTS.md +61 -2
- package/lib/cjs/components/masonry/Masonry.context.js +17 -0
- package/lib/cjs/components/masonry/Masonry.context.js.map +1 -0
- package/lib/cjs/components/masonry/Masonry.hooks.js +53 -0
- package/lib/cjs/components/masonry/Masonry.hooks.js.map +1 -0
- package/lib/cjs/components/masonry/Masonry.js +81 -0
- package/lib/cjs/components/masonry/Masonry.js.map +1 -0
- package/lib/cjs/components/masonry/Masonry.styles.js +16 -0
- package/lib/cjs/components/masonry/Masonry.styles.js.map +1 -0
- package/lib/cjs/components/masonry/Masonry.types.js +6 -0
- package/lib/cjs/components/masonry/Masonry.types.js.map +1 -0
- package/lib/cjs/components/masonry/Masonry.utils.js +121 -0
- package/lib/cjs/components/masonry/Masonry.utils.js.map +1 -0
- package/lib/cjs/components/masonry/masonry-item/MasonryItem.js +77 -0
- package/lib/cjs/components/masonry/masonry-item/MasonryItem.js.map +1 -0
- package/lib/cjs/components/masonry/masonry-item/MasonryItem.styles.js +17 -0
- package/lib/cjs/components/masonry/masonry-item/MasonryItem.styles.js.map +1 -0
- package/lib/cjs/index.js +7 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/masonry/Masonry.context.js +10 -0
- package/lib/esm/components/masonry/Masonry.context.js.map +1 -0
- package/lib/esm/components/masonry/Masonry.hooks.js +44 -0
- package/lib/esm/components/masonry/Masonry.hooks.js.map +1 -0
- package/lib/esm/components/masonry/Masonry.js +74 -0
- package/lib/esm/components/masonry/Masonry.js.map +1 -0
- package/lib/esm/components/masonry/Masonry.styles.js +9 -0
- package/lib/esm/components/masonry/Masonry.styles.js.map +1 -0
- package/lib/esm/components/masonry/Masonry.types.js +2 -0
- package/lib/esm/components/masonry/Masonry.types.js.map +1 -0
- package/lib/esm/components/masonry/Masonry.utils.js +110 -0
- package/lib/esm/components/masonry/Masonry.utils.js.map +1 -0
- package/lib/esm/components/masonry/masonry-item/MasonryItem.js +69 -0
- package/lib/esm/components/masonry/masonry-item/MasonryItem.js.map +1 -0
- package/lib/esm/components/masonry/masonry-item/MasonryItem.styles.js +10 -0
- package/lib/esm/components/masonry/masonry-item/MasonryItem.styles.js.map +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/masonry/Masonry.context.d.ts +3 -0
- package/lib/types/components/masonry/Masonry.d.ts +3 -0
- package/lib/types/components/masonry/Masonry.hooks.d.ts +22 -0
- package/lib/types/components/masonry/Masonry.styles.d.ts +5 -0
- package/lib/types/components/masonry/Masonry.types.d.ts +40 -0
- package/lib/types/components/masonry/Masonry.utils.d.ts +22 -0
- package/lib/types/components/masonry/masonry-item/MasonryItem.d.ts +5 -0
- package/lib/types/components/masonry/masonry-item/MasonryItem.styles.d.ts +5 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +2 -2
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_ListItem2","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","_skeleton","_types","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\nexport { default as Skeleton } from './components/skeleton';\nexport { SkeletonAnimationType } from './components/skeleton/types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_ListItem2","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","_skeleton","_types","_Masonry","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\nexport { default as Skeleton } from './components/skeleton';\nexport { SkeletonAnimationType } from './components/skeleton/types';\nexport { default as Masonry } from './components/masonry/Masonry';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,e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AAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAApF,uBAAAmF,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const MasonryContext = /*#__PURE__*/createContext(undefined);
|
|
3
|
+
export const useMasonryContext = () => {
|
|
4
|
+
const context = useContext(MasonryContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error('Masonry.Item must be used inside Masonry.');
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Masonry.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry.context.js","names":["createContext","useContext","MasonryContext","undefined","useMasonryContext","context","Error"],"sources":["../../../../src/components/masonry/Masonry.context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { MasonryContextValue } from './Masonry.types';\n\nexport const MasonryContext = createContext<MasonryContextValue | undefined>(undefined);\n\nexport const useMasonryContext = () => {\n const context = useContext(MasonryContext);\n\n if (!context) {\n throw new Error('Masonry.Item must be used inside Masonry.');\n }\n\n return context;\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAGjD,OAAO,MAAMC,cAAc,gBAAGF,aAAa,CAAkCG,SAAS,CAAC;AAEvF,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACnC,MAAMC,OAAO,GAAGJ,UAAU,CAACC,cAAc,CAAC;EAE1C,IAAI,CAACG,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;EAChE;EAEA,OAAOD,OAAO;AAClB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Children, useMemo } from 'react';
|
|
2
|
+
import { calculateColumnCount, calculateRowSpan, getMasonryItemKey, packMasonryGrid } from './Masonry.utils';
|
|
3
|
+
export const useMasonryItems = ({
|
|
4
|
+
children
|
|
5
|
+
}) => useMemo(() => Children.toArray(children), [children]);
|
|
6
|
+
export const useMasonryLayout = ({
|
|
7
|
+
items,
|
|
8
|
+
itemHeights,
|
|
9
|
+
columnCount,
|
|
10
|
+
columnWidth,
|
|
11
|
+
rowHeight,
|
|
12
|
+
gap
|
|
13
|
+
}) => useMemo(() => {
|
|
14
|
+
const layoutItems = items.map((item, index) => {
|
|
15
|
+
const key = getMasonryItemKey(item, index);
|
|
16
|
+
const height = itemHeights[key] ?? rowHeight;
|
|
17
|
+
return {
|
|
18
|
+
key,
|
|
19
|
+
columns: item.props.columns ?? 1,
|
|
20
|
+
rows: calculateRowSpan({
|
|
21
|
+
height,
|
|
22
|
+
rowHeight,
|
|
23
|
+
gap
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
return packMasonryGrid({
|
|
28
|
+
items: layoutItems,
|
|
29
|
+
columnCount,
|
|
30
|
+
columnWidth,
|
|
31
|
+
rowHeight,
|
|
32
|
+
gap
|
|
33
|
+
});
|
|
34
|
+
}, [items, itemHeights, columnCount, columnWidth, rowHeight, gap]);
|
|
35
|
+
export const useMasonryColumnCount = ({
|
|
36
|
+
containerWidth,
|
|
37
|
+
columnWidth,
|
|
38
|
+
gap
|
|
39
|
+
}) => useMemo(() => calculateColumnCount({
|
|
40
|
+
containerWidth,
|
|
41
|
+
columnWidth,
|
|
42
|
+
gap
|
|
43
|
+
}), [containerWidth, columnWidth, gap]);
|
|
44
|
+
//# sourceMappingURL=Masonry.hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry.hooks.js","names":["Children","useMemo","calculateColumnCount","calculateRowSpan","getMasonryItemKey","packMasonryGrid","useMasonryItems","children","toArray","useMasonryLayout","items","itemHeights","columnCount","columnWidth","rowHeight","gap","layoutItems","map","item","index","key","height","columns","props","rows","useMasonryColumnCount","containerWidth"],"sources":["../../../../src/components/masonry/Masonry.hooks.ts"],"sourcesContent":["import { Children, ReactNode, useMemo } from 'react';\nimport { MasonryChild, MasonryItemProps, MasonryLayoutItem } from './Masonry.types';\nimport {\n calculateColumnCount,\n calculateRowSpan,\n getMasonryItemKey,\n packMasonryGrid,\n} from './Masonry.utils';\n\ninterface UseMasonryItemsParams {\n children: ReactNode;\n}\n\nexport const useMasonryItems = ({ children }: UseMasonryItemsParams) =>\n useMemo(() => Children.toArray(children) as MasonryChild[], [children]);\n\ninterface UseMasonryLayoutParams {\n items: MasonryChild[];\n itemHeights: Record<string, number>;\n columnCount: number;\n columnWidth: number;\n rowHeight: number;\n gap: number;\n}\n\nexport const useMasonryLayout = ({\n items,\n itemHeights,\n columnCount,\n columnWidth,\n rowHeight,\n gap,\n}: UseMasonryLayoutParams) =>\n useMemo(() => {\n const layoutItems: MasonryLayoutItem[] = items.map((item, index) => {\n const key = getMasonryItemKey(item as React.ReactElement<MasonryItemProps>, index);\n\n const height = itemHeights[key] ?? rowHeight;\n\n return {\n key,\n columns: item.props.columns ?? 1,\n rows: calculateRowSpan({\n height,\n rowHeight,\n gap,\n }),\n };\n });\n\n return packMasonryGrid({\n items: layoutItems,\n columnCount,\n columnWidth,\n rowHeight,\n gap,\n });\n }, [items, itemHeights, columnCount, columnWidth, rowHeight, gap]);\n\ninterface UseMasonryColumnCountParams {\n containerWidth: number;\n columnWidth: number;\n gap: number;\n}\n\nexport const useMasonryColumnCount = ({\n containerWidth,\n columnWidth,\n gap,\n}: UseMasonryColumnCountParams) =>\n useMemo(\n () =>\n calculateColumnCount({\n containerWidth,\n columnWidth,\n gap,\n }),\n [containerWidth, columnWidth, gap],\n );\n"],"mappings":"AAAA,SAASA,QAAQ,EAAaC,OAAO,QAAQ,OAAO;AAEpD,SACIC,oBAAoB,EACpBC,gBAAgB,EAChBC,iBAAiB,EACjBC,eAAe,QACZ,iBAAiB;AAMxB,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAgC,CAAC,KAC/DN,OAAO,CAAC,MAAMD,QAAQ,CAACQ,OAAO,CAACD,QAAQ,CAAmB,EAAE,CAACA,QAAQ,CAAC,CAAC;AAW3E,OAAO,MAAME,gBAAgB,GAAGA,CAAC;EAC7BC,KAAK;EACLC,WAAW;EACXC,WAAW;EACXC,WAAW;EACXC,SAAS;EACTC;AACoB,CAAC,KACrBd,OAAO,CAAC,MAAM;EACV,MAAMe,WAAgC,GAAGN,KAAK,CAACO,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;IAChE,MAAMC,GAAG,GAAGhB,iBAAiB,CAACc,IAAI,EAA0CC,KAAK,CAAC;IAElF,MAAME,MAAM,GAAGV,WAAW,CAACS,GAAG,CAAC,IAAIN,SAAS;IAE5C,OAAO;MACHM,GAAG;MACHE,OAAO,EAAEJ,IAAI,CAACK,KAAK,CAACD,OAAO,IAAI,CAAC;MAChCE,IAAI,EAAErB,gBAAgB,CAAC;QACnBkB,MAAM;QACNP,SAAS;QACTC;MACJ,CAAC;IACL,CAAC;EACL,CAAC,CAAC;EAEF,OAAOV,eAAe,CAAC;IACnBK,KAAK,EAAEM,WAAW;IAClBJ,WAAW;IACXC,WAAW;IACXC,SAAS;IACTC;EACJ,CAAC,CAAC;AACN,CAAC,EAAE,CAACL,KAAK,EAAEC,WAAW,EAAEC,WAAW,EAAEC,WAAW,EAAEC,SAAS,EAAEC,GAAG,CAAC,CAAC;AAQtE,OAAO,MAAMU,qBAAqB,GAAGA,CAAC;EAClCC,cAAc;EACdb,WAAW;EACXE;AACyB,CAAC,KAC1Bd,OAAO,CACH,MACIC,oBAAoB,CAAC;EACjBwB,cAAc;EACdb,WAAW;EACXE;AACJ,CAAC,CAAC,EACN,CAACW,cAAc,EAAEb,WAAW,EAAEE,GAAG,CACrC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { AnimatePresence } from 'motion/react';
|
|
3
|
+
import { useElementSize } from '../../hooks/element';
|
|
4
|
+
import { MasonryContext } from './Masonry.context';
|
|
5
|
+
import { StyledMasonry } from './Masonry.styles';
|
|
6
|
+
import { useMasonryColumnCount, useMasonryItems, useMasonryLayout } from './Masonry.hooks';
|
|
7
|
+
import { getMasonryItemKey } from './Masonry.utils';
|
|
8
|
+
import MasonryItem, { InternalMasonryItem } from './masonry-item/MasonryItem';
|
|
9
|
+
const MasonryBase = ({
|
|
10
|
+
children,
|
|
11
|
+
gap = 8,
|
|
12
|
+
columnWidth = 80,
|
|
13
|
+
rowHeight = 80
|
|
14
|
+
}) => {
|
|
15
|
+
const ref = useRef(null);
|
|
16
|
+
const size = useElementSize(ref);
|
|
17
|
+
const containerWidth = size?.width ?? 0;
|
|
18
|
+
const [itemHeights, setItemHeights] = useState({});
|
|
19
|
+
const items = useMasonryItems({
|
|
20
|
+
children
|
|
21
|
+
});
|
|
22
|
+
const columnCount = useMasonryColumnCount({
|
|
23
|
+
containerWidth,
|
|
24
|
+
columnWidth,
|
|
25
|
+
gap
|
|
26
|
+
});
|
|
27
|
+
const layout = useMasonryLayout({
|
|
28
|
+
items,
|
|
29
|
+
itemHeights,
|
|
30
|
+
columnCount,
|
|
31
|
+
columnWidth,
|
|
32
|
+
rowHeight,
|
|
33
|
+
gap
|
|
34
|
+
});
|
|
35
|
+
const registerItem = useCallback((key, height) => {
|
|
36
|
+
setItemHeights(currentHeights => {
|
|
37
|
+
if (currentHeights[key] === height) {
|
|
38
|
+
return currentHeights;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
...currentHeights,
|
|
42
|
+
[key]: height
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}, []);
|
|
46
|
+
const contextValue = useMemo(() => ({
|
|
47
|
+
registerItem
|
|
48
|
+
}), [registerItem]);
|
|
49
|
+
return /*#__PURE__*/React.createElement(MasonryContext.Provider, {
|
|
50
|
+
value: contextValue
|
|
51
|
+
}, /*#__PURE__*/React.createElement(StyledMasonry, {
|
|
52
|
+
ref: ref,
|
|
53
|
+
$height: layout.height
|
|
54
|
+
}, /*#__PURE__*/React.createElement(AnimatePresence, null, items.map((item, index) => {
|
|
55
|
+
const key = getMasonryItemKey(item, index);
|
|
56
|
+
const packedItem = layout.items[key];
|
|
57
|
+
if (!packedItem) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return /*#__PURE__*/React.createElement(InternalMasonryItem, {
|
|
61
|
+
key: key,
|
|
62
|
+
itemKey: key,
|
|
63
|
+
x: packedItem.x,
|
|
64
|
+
y: packedItem.y,
|
|
65
|
+
width: packedItem.width
|
|
66
|
+
}, item.props.children);
|
|
67
|
+
}))));
|
|
68
|
+
};
|
|
69
|
+
MasonryBase.displayName = 'Masonry';
|
|
70
|
+
const Masonry = Object.assign(MasonryBase, {
|
|
71
|
+
Item: MasonryItem
|
|
72
|
+
});
|
|
73
|
+
export default Masonry;
|
|
74
|
+
//# sourceMappingURL=Masonry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry.js","names":["React","useCallback","useMemo","useRef","useState","AnimatePresence","useElementSize","MasonryContext","StyledMasonry","useMasonryColumnCount","useMasonryItems","useMasonryLayout","getMasonryItemKey","MasonryItem","InternalMasonryItem","MasonryBase","children","gap","columnWidth","rowHeight","ref","size","containerWidth","width","itemHeights","setItemHeights","items","columnCount","layout","registerItem","key","height","currentHeights","contextValue","createElement","Provider","value","$height","map","item","index","packedItem","itemKey","x","y","props","displayName","Masonry","Object","assign","Item"],"sources":["../../../../src/components/masonry/Masonry.tsx"],"sourcesContent":["import React, { FC, useCallback, useMemo, useRef, useState } from 'react';\nimport { AnimatePresence } from 'motion/react';\nimport { useElementSize } from '../../hooks/element';\nimport { MasonryComponent, MasonryItemProps, MasonryProps } from './Masonry.types';\nimport { MasonryContext } from './Masonry.context';\nimport { StyledMasonry } from './Masonry.styles';\nimport { useMasonryColumnCount, useMasonryItems, useMasonryLayout } from './Masonry.hooks';\nimport { getMasonryItemKey } from './Masonry.utils';\nimport MasonryItem, { InternalMasonryItem } from './masonry-item/MasonryItem';\n\nconst MasonryBase: FC<MasonryProps> = ({ children, gap = 8, columnWidth = 80, rowHeight = 80 }) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const size = useElementSize(ref);\n\n const containerWidth = size?.width ?? 0;\n\n const [itemHeights, setItemHeights] = useState<Record<string, number>>({});\n\n const items = useMasonryItems({ children });\n\n const columnCount = useMasonryColumnCount({\n containerWidth,\n columnWidth,\n gap,\n });\n\n const layout = useMasonryLayout({\n items,\n itemHeights,\n columnCount,\n columnWidth,\n rowHeight,\n gap,\n });\n\n const registerItem = useCallback((key: string, height: number) => {\n setItemHeights((currentHeights) => {\n if (currentHeights[key] === height) {\n return currentHeights;\n }\n\n return {\n ...currentHeights,\n [key]: height,\n };\n });\n }, []);\n\n const contextValue = useMemo(\n () => ({\n registerItem,\n }),\n [registerItem],\n );\n\n return (\n <MasonryContext.Provider value={contextValue}>\n <StyledMasonry ref={ref} $height={layout.height}>\n <AnimatePresence>\n {items.map((item, index) => {\n const key = getMasonryItemKey(\n item as React.ReactElement<MasonryItemProps>,\n index,\n );\n\n const packedItem = layout.items[key];\n\n if (!packedItem) {\n return null;\n }\n\n return (\n <InternalMasonryItem\n key={key}\n itemKey={key}\n x={packedItem.x}\n y={packedItem.y}\n width={packedItem.width}\n >\n {item.props.children}\n </InternalMasonryItem>\n );\n })}\n </AnimatePresence>\n </StyledMasonry>\n </MasonryContext.Provider>\n );\n};\n\nMasonryBase.displayName = 'Masonry';\n\nconst Masonry = Object.assign(MasonryBase, {\n Item: MasonryItem,\n}) as MasonryComponent;\n\nexport default Masonry;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SAASC,eAAe,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,qBAAqB;AAEpD,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,qBAAqB,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,iBAAiB;AAC1F,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,OAAOC,WAAW,IAAIC,mBAAmB,QAAQ,4BAA4B;AAE7E,MAAMC,WAA6B,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,GAAG,GAAG,CAAC;EAAEC,WAAW,GAAG,EAAE;EAAEC,SAAS,GAAG;AAAG,CAAC,KAAK;EAC/F,MAAMC,GAAG,GAAGjB,MAAM,CAAwB,IAAI,CAAC;EAC/C,MAAMkB,IAAI,GAAGf,cAAc,CAACc,GAAG,CAAC;EAEhC,MAAME,cAAc,GAAGD,IAAI,EAAEE,KAAK,IAAI,CAAC;EAEvC,MAAM,CAACC,WAA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AI;IACf;IAEA,oBACIzC,KAAA,CAAAkC,aAAA,CAACpB,mBAAmB;MAChBgB,GAAG,EAAEA,GAAI;MACTY,OAAO,EAAEZ,GAAI;MACba,CAAC,EAAEF,UAAU,CAACE,CAAE;MAChBC,CAAC,EAAEH,UAAU,CAACG,CAAE;MAChBrB,KAAK,EAAEkB,UAAU,CAAClB;IAAM,GAEvBgB,IAAI,CAACM,KAAK,CAAC7B,QACK,CAAC;EAE9B,CAAC,CACY,CACN,CACM,CAAC;AAElC,CAAC;AAEDD,WAAW,CAAC+B,WAAW,GAAG,SAAS;AAEnC,MAAMC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAClC,WAAW,EAAE;EACvCmC,IAAI,EAAErC;AACV,CAAC,CAAqB;AAEtB,eAAekC,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry.styles.js","names":["styled","StyledMasonry","div","$height"],"sources":["../../../../src/components/masonry/Masonry.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledMasonry = styled.div<{ $height: number }>`\n position: relative;\n width: 100%;\n height: ${({ $height }) => $height}px;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,aAAa,GAAGD,MAAM,CAACE,GAAwB;AAC5D;AACA;AACA,cAAc,CAAC;EAAEC;AAAQ,CAAC,KAAKA,OAAO;AACtC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry.types.js","names":[],"sources":["../../../../src/components/masonry/Masonry.types.ts"],"sourcesContent":["import { ReactElement, ReactNode } from 'react';\n\nexport interface MasonryProps {\n children: ReactNode;\n gap?: number;\n columnWidth?: number;\n rowHeight?: number;\n}\n\nexport interface MasonryItemProps {\n children: ReactNode;\n columns?: number;\n}\n\nexport interface MasonryContextValue {\n registerItem: (key: string, height: number) => void;\n}\n\nexport interface MasonryLayoutItem {\n key: string;\n columns: number;\n rows: number;\n}\n\nexport interface PackedMasonryItem {\n key: string;\n x: number;\n y: number;\n width: number;\n}\n\nexport interface PackedMasonryGrid {\n items: Record<string, PackedMasonryItem>;\n height: number;\n}\n\nexport interface InternalMasonryItemProps {\n children: ReactNode;\n itemKey: string;\n x: number;\n y: number;\n width: number;\n}\n\nexport type MasonryChild = ReactElement<MasonryItemProps>;\n\nexport type MasonryComponent = React.FC<MasonryProps> & {\n Item: React.FC<MasonryItemProps>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export const getMasonryItemKey = (item, index) => item.key != null ? String(item.key) : String(index);
|
|
2
|
+
const isAreaFree = ({
|
|
3
|
+
grid,
|
|
4
|
+
startColumn,
|
|
5
|
+
startRow,
|
|
6
|
+
columns,
|
|
7
|
+
rows,
|
|
8
|
+
columnCount
|
|
9
|
+
}) => {
|
|
10
|
+
if (startColumn + columns > columnCount) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
for (let row = startRow; row < startRow + rows; row += 1) {
|
|
14
|
+
for (let column = startColumn; column < startColumn + columns; column += 1) {
|
|
15
|
+
if (grid[row]?.[column]) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
};
|
|
22
|
+
const occupyArea = ({
|
|
23
|
+
grid,
|
|
24
|
+
startColumn,
|
|
25
|
+
startRow,
|
|
26
|
+
columns,
|
|
27
|
+
rows
|
|
28
|
+
}) => {
|
|
29
|
+
for (let row = startRow; row < startRow + rows; row += 1) {
|
|
30
|
+
if (!grid[row]) {
|
|
31
|
+
// eslint-disable-next-line no-param-reassign
|
|
32
|
+
grid[row] = [];
|
|
33
|
+
}
|
|
34
|
+
for (let column = startColumn; column < startColumn + columns; column += 1) {
|
|
35
|
+
// eslint-disable-next-line no-param-reassign
|
|
36
|
+
grid[row][column] = true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export const packMasonryGrid = ({
|
|
41
|
+
items,
|
|
42
|
+
columnCount,
|
|
43
|
+
columnWidth,
|
|
44
|
+
rowHeight,
|
|
45
|
+
gap
|
|
46
|
+
}) => {
|
|
47
|
+
const grid = [];
|
|
48
|
+
const packedItems = {};
|
|
49
|
+
let maxRow = 0;
|
|
50
|
+
items.forEach(item => {
|
|
51
|
+
const columns = Math.min(Math.max(item.columns, 1), columnCount);
|
|
52
|
+
const rows = Math.max(item.rows, 1);
|
|
53
|
+
let placed = false;
|
|
54
|
+
let row = 0;
|
|
55
|
+
while (!placed) {
|
|
56
|
+
for (let column = 0; column < columnCount; column += 1) {
|
|
57
|
+
const canPlaceItem = isAreaFree({
|
|
58
|
+
grid,
|
|
59
|
+
startColumn: column,
|
|
60
|
+
startRow: row,
|
|
61
|
+
columns,
|
|
62
|
+
rows,
|
|
63
|
+
columnCount
|
|
64
|
+
});
|
|
65
|
+
if (!canPlaceItem) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
occupyArea({
|
|
69
|
+
grid,
|
|
70
|
+
startColumn: column,
|
|
71
|
+
startRow: row,
|
|
72
|
+
columns,
|
|
73
|
+
rows
|
|
74
|
+
});
|
|
75
|
+
packedItems[item.key] = {
|
|
76
|
+
key: item.key,
|
|
77
|
+
x: column * (columnWidth + gap),
|
|
78
|
+
y: row * (rowHeight + gap),
|
|
79
|
+
width: columns * columnWidth + (columns - 1) * gap
|
|
80
|
+
};
|
|
81
|
+
maxRow = Math.max(maxRow, row + rows);
|
|
82
|
+
placed = true;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
if (!placed) {
|
|
86
|
+
row += 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
items: packedItems,
|
|
92
|
+
height: maxRow * rowHeight + Math.max(0, maxRow - 1) * gap
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export const calculateColumnCount = ({
|
|
96
|
+
containerWidth,
|
|
97
|
+
columnWidth,
|
|
98
|
+
gap
|
|
99
|
+
}) => {
|
|
100
|
+
if (!containerWidth) {
|
|
101
|
+
return 1;
|
|
102
|
+
}
|
|
103
|
+
return Math.max(1, Math.floor((containerWidth + gap) / (columnWidth + gap)));
|
|
104
|
+
};
|
|
105
|
+
export const calculateRowSpan = ({
|
|
106
|
+
height,
|
|
107
|
+
rowHeight,
|
|
108
|
+
gap
|
|
109
|
+
}) => Math.max(1, Math.ceil((height + gap) / (rowHeight + gap)));
|
|
110
|
+
//# sourceMappingURL=Masonry.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry.utils.js","names":["getMasonryItemKey","item","index","key","String","isAreaFree","grid","startColumn","startRow","columns","rows","columnCount","row","column","occupyArea","packMasonryGrid","items","columnWidth","rowHeight","gap","packedItems","maxRow","forEach","Math","min","max","placed","canPlaceItem","x","y","width","height","calculateColumnCount","containerWidth","floor","calculateRowSpan","ceil"],"sources":["../../../../src/components/masonry/Masonry.utils.ts"],"sourcesContent":["import { ReactElement } from 'react';\nimport {\n MasonryItemProps,\n MasonryLayoutItem,\n PackedMasonryGrid,\n PackedMasonryItem,\n} from './Masonry.types';\n\nexport const getMasonryItemKey = (item: ReactElement<MasonryItemProps>, index: number) =>\n item.key != null ? String(item.key) : String(index);\n\ninterface IsAreaFreeParams {\n grid: boolean[][];\n startColumn: number;\n startRow: number;\n columns: number;\n rows: number;\n columnCount: number;\n}\n\nconst isAreaFree = ({\n grid,\n startColumn,\n startRow,\n columns,\n rows,\n columnCount,\n}: IsAreaFreeParams) => {\n if (startColumn + columns > columnCount) {\n return false;\n }\n\n for (let row = startRow; row < startRow + rows; row += 1) {\n for (let column = startColumn; column < startColumn + columns; column += 1) {\n if (grid[row]?.[column]) {\n return false;\n }\n }\n }\n\n return true;\n};\n\ninterface OccupyAreaParams {\n grid: boolean[][];\n startColumn: number;\n startRow: number;\n columns: number;\n rows: number;\n}\n\nconst occupyArea = ({ grid, startColumn, startRow, columns, rows }: OccupyAreaParams) => {\n for (let row = startRow; row < startRow + rows; row += 1) {\n if (!grid[row]) {\n // eslint-disable-next-line no-param-reassign\n grid[row] = [];\n }\n\n for (let column = startColumn; column < startColumn + columns; column += 1) {\n // eslint-disable-next-line no-param-reassign\n (grid[row] as boolean[])[column] = true;\n }\n }\n};\n\ninterface PackMasonryGridParams {\n items: MasonryLayoutItem[];\n columnCount: number;\n columnWidth: number;\n rowHeight: number;\n gap: number;\n}\n\nexport const packMasonryGrid = ({\n items,\n columnCount,\n columnWidth,\n rowHeight,\n gap,\n}: PackMasonryGridParams): PackedMasonryGrid => {\n const grid: boolean[][] = [];\n const packedItems: Record<string, PackedMasonryItem> = {};\n\n let maxRow = 0;\n\n items.forEach((item) => {\n const columns = Math.min(Math.max(item.columns, 1), columnCount);\n const rows = Math.max(item.rows, 1);\n\n let placed = false;\n let row = 0;\n\n while (!placed) {\n for (let column = 0; column < columnCount; column += 1) {\n const canPlaceItem = isAreaFree({\n grid,\n startColumn: column,\n startRow: row,\n columns,\n rows,\n columnCount,\n });\n\n if (!canPlaceItem) {\n continue;\n }\n\n occupyArea({\n grid,\n startColumn: column,\n startRow: row,\n columns,\n rows,\n });\n\n packedItems[item.key] = {\n key: item.key,\n x: column * (columnWidth + gap),\n y: row * (rowHeight + gap),\n width: columns * columnWidth + (columns - 1) * gap,\n };\n\n maxRow = Math.max(maxRow, row + rows);\n placed = true;\n break;\n }\n\n if (!placed) {\n row += 1;\n }\n }\n });\n\n return {\n items: packedItems,\n height: maxRow * rowHeight + Math.max(0, maxRow - 1) * gap,\n };\n};\n\nexport const calculateColumnCount = ({\n containerWidth,\n columnWidth,\n gap,\n}: {\n containerWidth: number;\n columnWidth: number;\n gap: number;\n}) => {\n if (!containerWidth) {\n return 1;\n }\n\n return Math.max(1, Math.floor((containerWidth + gap) / (columnWidth + gap)));\n};\n\nexport const calculateRowSpan = ({\n height,\n rowHe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AW,GAAGE,GAAG,CAAC;UAC/BU,CAAC,EAAEjB,GAAG,IAAIM,SAAS,GAAGC,GAAG,CAAC;UAC1BW,KAAK,EAAErB,OAAO,GAAGQ,WAAW,GAAG,CAACR,OAAO,GAAG,CAAC,IAAIU;QACnD,CAAC;QAEDE,MAAM,GAAGE,IAAI,CAACE,GAAG,CAACJ,MAAM,EAAET,GAAG,GAAGF,IAAI,CAAC;QACrCgB,MAAM,GAAG,IAAI;QACb;MACJ;MAEA,IAAI,CAACA,MAAM,EAAE;QACTd,GAAG,IAAI,CAAC;MACZ;IACJ;EACJ,CAAC,CAAC;EAEF,OAAO;IACHI,KAAK,EAAEI,WAAW;IAClBW,MAAM,EAAEV,MAAM,GAAGH,SAAS,GAAGK,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEJ,MAAM,GAAG,CAAC,CAAC,GAAGF;EAC3D,CAAC;AACL,CAAC;AAED,OAAO,MAAMa,oBAAoB,GAAGA,CAAC;EACjCC,cAAc;EACdhB,WAAW;EACXE;AAKJ,CAAC,KAAK;EACF,IAAI,CAACc,cAAc,EAAE;IACjB,OAAO,CAAC;EACZ;EAEA,OAAOV,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEF,IAAI,CAACW,KAAK,CAAC,CAACD,cAAc,GAAGd,GAAG,KAAKF,WAAW,GAAGE,GAAG,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,OAAO,MAAMgB,gBAAgB,GAAGA,CAAC;EAC7BJ,MAAM;EACNb,SAAS;EACTC;AAKJ,CAAC,KAAKI,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEF,IAAI,CAACa,IAAI,CAAC,CAACL,MAAM,GAAGZ,GAAG,KAAKD,SAAS,GAAGC,GAAG,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { useMasonryContext } from '../Masonry.context';
|
|
3
|
+
import { StyledMasonryItem } from './MasonryItem.styles';
|
|
4
|
+
const MasonryItem = ({
|
|
5
|
+
children
|
|
6
|
+
}) => /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
7
|
+
export const InternalMasonryItem = ({
|
|
8
|
+
children,
|
|
9
|
+
itemKey,
|
|
10
|
+
x,
|
|
11
|
+
y,
|
|
12
|
+
width
|
|
13
|
+
}) => {
|
|
14
|
+
const ref = useRef(null);
|
|
15
|
+
const {
|
|
16
|
+
registerItem
|
|
17
|
+
} = useMasonryContext();
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const element = ref.current;
|
|
20
|
+
if (!element) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
let frameId;
|
|
24
|
+
const updateHeight = () => {
|
|
25
|
+
if (frameId) {
|
|
26
|
+
window.cancelAnimationFrame(frameId);
|
|
27
|
+
}
|
|
28
|
+
frameId = window.requestAnimationFrame(() => {
|
|
29
|
+
registerItem(itemKey, element.getBoundingClientRect().height);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
updateHeight();
|
|
33
|
+
const observer = new ResizeObserver(updateHeight);
|
|
34
|
+
observer.observe(element);
|
|
35
|
+
return () => {
|
|
36
|
+
if (frameId) {
|
|
37
|
+
window.cancelAnimationFrame(frameId);
|
|
38
|
+
}
|
|
39
|
+
observer.disconnect();
|
|
40
|
+
};
|
|
41
|
+
}, [itemKey, registerItem, width]);
|
|
42
|
+
return /*#__PURE__*/React.createElement(StyledMasonryItem, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
initial: {
|
|
45
|
+
opacity: 0,
|
|
46
|
+
scale: 0.96
|
|
47
|
+
},
|
|
48
|
+
animate: {
|
|
49
|
+
opacity: 1,
|
|
50
|
+
scale: 1,
|
|
51
|
+
x,
|
|
52
|
+
y,
|
|
53
|
+
width
|
|
54
|
+
},
|
|
55
|
+
exit: {
|
|
56
|
+
opacity: 0,
|
|
57
|
+
scale: 0.96
|
|
58
|
+
},
|
|
59
|
+
transition: {
|
|
60
|
+
type: 'spring',
|
|
61
|
+
stiffness: 320,
|
|
62
|
+
damping: 34,
|
|
63
|
+
mass: 0.85
|
|
64
|
+
}
|
|
65
|
+
}, children);
|
|
66
|
+
};
|
|
67
|
+
MasonryItem.displayName = 'Masonry.Item';
|
|
68
|
+
export default MasonryItem;
|
|
69
|
+
//# sourceMappingURL=MasonryItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasonryItem.js","names":["React","useEffect","useRef","useMasonryContext","StyledMasonryItem","MasonryItem","children","createElement","Fragment","InternalMasonryItem","itemKey","x","y","width","ref","registerItem","element","current","undefined","frameId","updateHeight","window","cancelAnimationFrame","requestAnimationFrame","getBoundingClientRect","height","observer","ResizeObserver","observe","disconnect","initial","opacity","scale","animate","exit","transition","type","stiffness","damping","mass","displayName"],"sources":["../../../../../src/components/masonry/masonry-item/MasonryItem.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef } from 'react';\nimport { InternalMasonryItemProps, MasonryItemProps } from '../Masonry.types';\nimport { useMasonryContext } from '../Masonry.context';\nimport { StyledMasonryItem } from './MasonryItem.styles';\n\nconst MasonryItem: FC<MasonryItemProps> = ({ children }) => <>{children}</>;\n\nexport const InternalMasonryItem: FC<InternalMasonryItemProps> = ({\n children,\n itemKey,\n x,\n y,\n width,\n}) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const { registerItem } = useMasonryContext();\n\n useEffect(() => {\n const element = ref.current;\n\n if (!element) {\n return undefined;\n }\n\n let frameId: number | undefined;\n\n const updateHeight = () => {\n if (frameId) {\n window.cancelAnimationFrame(frameId);\n }\n\n frameId = window.requestAnimationFrame(() => {\n registerItem(itemKey, element.getBoundingClientRect().height);\n });\n };\n\n updateHeight();\n\n const observer = new ResizeObserver(updateHeight);\n\n observer.observe(element);\n\n return () => {\n if (frameId) {\n window.cancelAnimationFrame(frameId);\n }\n\n observer.disconnect();\n };\n }, [itemKey, registerItem, width]);\n\n return (\n <StyledMasonryItem\n ref={ref}\n initial={{\n opacity: 0,\n scale: 0.96,\n }}\n animate={{\n opacity: 1,\n scale: 1,\n x,\n y,\n width,\n }}\n exit={{\n opacity: 0,\n scale: 0.96,\n }}\n transition={{\n type: 'spring',\n stiffness: 320,\n damping: 34,\n mass: 0.85,\n }}\n >\n {children}\n </StyledMasonryItem>\n );\n};\n\nMasonryItem.displayName = 'Masonry.Item';\n\nexport default MasonryItem;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEpD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,iBAAiB,QAAQ,sBAAsB;AAExD,MAAMC,WAAiC,GAAGA,CAAC;EAAEC;AAAS,CAAC,kBAAKN,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QAAGF,QAAW,CAAC;AAE3E,OAAO,MAAMG,mBAAiD,GAAGA,CAAC;EAC9DH,QAAQ;EACRI,OAAO;EACPC,CAAC;EACDC,CAAC;EACDC;AACJ,CAAC,KAAK;EACF,MAAMC,GAAG,GAAGZ,MAAM,CAAwB,IAAI,CAAC;EAC/C,MAAM;IAAEa;EAAa,CAAC,GAAGZ,iBAAiB,CAAC,CAAC;EAE5CF,SAAS,CAAC,MAAM;IACZ,MAAMe,OAAO,GAAGF,GAAG,CAACG,OAAO;IAE3B,IAAI,CAACD,OAAO,EAAE;MACV,OAAOE,SAAS;IACpB;IAEA,IAAIC,OAA2B;IAE/B,MAAMC,YAAY,GAAGA,CAAA,KAAM;MACvB,IAAID,OAAO,EAAE;QACTE,MAAM,CAACC,oBAAoB,CAACH,OAAO,CAAC;MACxC;MAEAA,OAAO,GAAGE,MAAM,CAACE,qBAAqB,CAAC,MAAM;QACzCR,YAAY,CAACL,OAAO,EAAEM,OAAO,CAACQ,qBAAqB,CAAC,CAAC,CAACC,MAAM,CAAC;MACjE,CAAC,CAAC;IACN,CAAC;IAEDL,YAAY,CAAC,CAAC;IAEd,MAAMM,QAAQ,GAAG,IAAIC,cAAc,CAACP,YAAY,CAAC;IAEjDM,QAAQ,CAACE,OAAO,CAACZ,OAAO,CAAC;IAEzB,OAAO,MAAM;MACT,IAAIG,OAAO,EAAE;QACTE,MAAM,CAACC,oBAAoB,CAACH,OAAO,CAAC;MACxC;MAEAO,QAAQ,CAACG,UAAU,CAAC,CAAC;IACzB,CAAC;EACL,CAAC,EAAE,CAACnB,OAAO,EAAEK,YAAY,EAAEF,KAAK,CAAC,CAAC;EAElC,oBACIb,KAAA,CAAAO,aAAA,CAACH,iBAAiB;IACdU,GAAG,EAAEA,GAAI;IACTgB,OAAO,EAAE;MACLC,OAAO,EAAE,CAAC;MACVC,KAAK,EAAE;IACX,CAAE;IACFC,OAAO,EAAE;MACLF,OAAO,EAAE,CAAC;MACVC,KAAK,EAAE,CAAC;MACRrB,CAAC;MACDC,CAAC;MACDC;IACJ,CAAE;IACFqB,IAAI,EAAE;MACFH,OAAO,EAAE,CAAC;MACVC,KAAK,EAAE;IACX,CAAE;IACFG,UAAU,EAAE;MACRC,IAAI,EAAE,QAAQ;MACdC,SAAS,EAAE,GAAG;MACdC,OAAO,EAAE,EAAE;MACXC,IAAI,EAAE;IACV;EAAE,GAEDjC,QACc,CAAC;AAE5B,CAAC;AAEDD,WAAW,CAACmC,WAAW,GAAG,cAAc;AAExC,eAAenC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { motion } from 'motion/react';
|
|
3
|
+
export const StyledMasonryItem = styled(motion.div)`
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
will-change: transform, width;
|
|
9
|
+
`;
|
|
10
|
+
//# sourceMappingURL=MasonryItem.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasonryItem.styles.js","names":["styled","motion","StyledMasonryItem","div"],"sources":["../../../../../src/components/masonry/masonry-item/MasonryItem.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { motion } from 'motion/react';\n\nexport const StyledMasonryItem = styled(motion.div)`\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n will-change: transform, width;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,QAAQ,cAAc;AAErC,OAAO,MAAMC,iBAAiB,GAAGF,MAAM,CAACC,MAAM,CAACE,GAAG,CAAC;AACnD;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
package/lib/esm/index.js
CHANGED
|
@@ -81,4 +81,5 @@ export { uploadFile } from './utils/uploadFile';
|
|
|
81
81
|
export { ComboBoxSize } from './components/combobox/ComboBox.types';
|
|
82
82
|
export { default as Skeleton } from './components/skeleton';
|
|
83
83
|
export { SkeletonAnimationType } from './components/skeleton/types';
|
|
84
|
+
export { default as Masonry } from './components/masonry/Masonry';
|
|
84
85
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","LIST_ITEM_MARKER","withListItemMarker","withListItemMarkerForwardRef","MentionFinder","MultiActionButton","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingContextMenu","SharingBar","SharingButton","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","MultiActionButtonHeight","MultiActionButtonStatusType","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile","ComboBoxSize","Skeleton","SkeletonAnimationType"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\nexport { default as Skeleton } from './components/skeleton';\nexport { SkeletonAnimationType } from './components/skeleton/types';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAAS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,uBAAuB;AAC3D,SAASC,qBAAqB,QAAQ,6BAA6B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","LIST_ITEM_MARKER","withListItemMarker","withListItemMarkerForwardRef","MentionFinder","MultiActionButton","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingContextMenu","SharingBar","SharingButton","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","MultiActionButtonHeight","MultiActionButtonStatusType","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile","ComboBoxSize","Skeleton","SkeletonAnimationType","Masonry"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\nexport { default as Skeleton } from './components/skeleton';\nexport { SkeletonAnimationType } from './components/skeleton/types';\nexport { default as Masonry } from './components/masonry/Masonry';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SAASN,OAAO,IAAIO,iBAAiB,QAAQ,mDAAmD;AAChG,SACIC,WAAW,EACXR,OAAO,IAAIS,YAAY,QACpB,gDAAgD;AACvD,SAAST,OAAO,IAAIU,KAAK,QAAQ,0BAA0B;AAC3D,SAASV,OAAO,IAAIW,MAAM,QAAQ,4BAA4B;AAC9D,SAASX,OAAO,IAAIY,QAAQ,QAAQ,gCAAgC;AACpE,SACIZ,OAAO,IAAIa,mBAAmB,EAC9BC,cAAc,QACX,wDAAwD;AAC/D,SAASC,SAAS,EAAEC,WAAW,QAAQ,gCAAgC;AAKvE,SAASC,YAAY,EAAEC,eAAe,QAAQ,mBAAmB;AACjE,SAASC,iBAAiB,QAAkC,kBAAkB;AAC9E,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,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rE,SAAS3E,OAAO,IAAI4E,OAAO,QAAQ,8BAA8B;AACjE,SAAS5E,OAAO,IAAI6E,UAAU,QAAQ,oCAAoC;AAC1E,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,cAAc,QAAQ,iBAAiB;AAEhD,SAASC,eAAe,QAAQ,qBAAqB;AAErD,SAASC,eAAe,QAAQ,cAAc;AAE9C,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAIIC,uBAAuB,EAGvBC,2BAA2B,QACxB,0DAA0D;AACjE,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,qBAAqB,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AAC7F,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,SAASC,YAAY,QAAQ,sCAAsC;AAOnE,SAAS9F,OAAO,IAAI+F,QAAQ,QAAQ,uBAAuB;AAC3D,SAASC,qBAAqB,QAAQ,6BAA6B;AACnE,SAAShG,OAAO,IAAIiG,OAAO,QAAQ,8BAA8B","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MasonryChild } from './Masonry.types';
|
|
3
|
+
interface UseMasonryItemsParams {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const useMasonryItems: ({ children }: UseMasonryItemsParams) => MasonryChild[];
|
|
7
|
+
interface UseMasonryLayoutParams {
|
|
8
|
+
items: MasonryChild[];
|
|
9
|
+
itemHeights: Record<string, number>;
|
|
10
|
+
columnCount: number;
|
|
11
|
+
columnWidth: number;
|
|
12
|
+
rowHeight: number;
|
|
13
|
+
gap: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const useMasonryLayout: ({ items, itemHeights, columnCount, columnWidth, rowHeight, gap, }: UseMasonryLayoutParams) => import("./Masonry.types").PackedMasonryGrid;
|
|
16
|
+
interface UseMasonryColumnCountParams {
|
|
17
|
+
containerWidth: number;
|
|
18
|
+
columnWidth: number;
|
|
19
|
+
gap: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const useMasonryColumnCount: ({ containerWidth, columnWidth, gap, }: UseMasonryColumnCountParams) => number;
|
|
22
|
+
export {};
|