@chayns-components/core 5.0.53 → 5.0.57

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.
Files changed (43) hide show
  1. package/AGENTS.md +42 -0
  2. package/lib/cjs/components/context-menu/ContextMenu.js +10 -4
  3. package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
  4. package/lib/cjs/components/context-menu/ContextMenu.styles.js +19 -7
  5. package/lib/cjs/components/context-menu/ContextMenu.styles.js.map +1 -1
  6. package/lib/cjs/components/context-menu/ContextMenu.types.js.map +1 -1
  7. package/lib/cjs/components/multi-action-button/MultiActionButton.js +69 -21
  8. package/lib/cjs/components/multi-action-button/MultiActionButton.js.map +1 -1
  9. package/lib/cjs/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  10. package/lib/cjs/components/multi-action-button/MultiActionButton.utils.js +44 -0
  11. package/lib/cjs/components/multi-action-button/MultiActionButton.utils.js.map +1 -0
  12. package/lib/cjs/components/popup/Popup.js +1 -1
  13. package/lib/cjs/components/popup/Popup.js.map +1 -1
  14. package/lib/cjs/components/progress-bar/ProgressBar.js.map +1 -1
  15. package/lib/cjs/components/slider/Slider.js.map +1 -1
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/cjs/utils/slider.js +1 -1
  18. package/lib/cjs/utils/slider.js.map +1 -1
  19. package/lib/esm/components/context-menu/ContextMenu.js +10 -4
  20. package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
  21. package/lib/esm/components/context-menu/ContextMenu.styles.js +19 -7
  22. package/lib/esm/components/context-menu/ContextMenu.styles.js.map +1 -1
  23. package/lib/esm/components/context-menu/ContextMenu.types.js.map +1 -1
  24. package/lib/esm/components/multi-action-button/MultiActionButton.js +65 -18
  25. package/lib/esm/components/multi-action-button/MultiActionButton.js.map +1 -1
  26. package/lib/esm/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  27. package/lib/esm/components/multi-action-button/MultiActionButton.utils.js +37 -0
  28. package/lib/esm/components/multi-action-button/MultiActionButton.utils.js.map +1 -0
  29. package/lib/esm/components/popup/Popup.js +1 -1
  30. package/lib/esm/components/popup/Popup.js.map +1 -1
  31. package/lib/esm/components/progress-bar/ProgressBar.js.map +1 -1
  32. package/lib/esm/components/slider/Slider.js.map +1 -1
  33. package/lib/esm/index.js.map +1 -1
  34. package/lib/esm/utils/slider.js +1 -1
  35. package/lib/esm/utils/slider.js.map +1 -1
  36. package/lib/types/components/context-menu/ContextMenu.styles.d.ts +1 -0
  37. package/lib/types/components/context-menu/ContextMenu.types.d.ts +27 -1
  38. package/lib/types/components/multi-action-button/MultiActionButton.types.d.ts +10 -0
  39. package/lib/types/components/multi-action-button/MultiActionButton.utils.d.ts +8 -0
  40. package/lib/types/components/slider/Slider.d.ts +1 -1
  41. package/lib/types/index.d.ts +1 -1
  42. package/lib/types/utils/slider.d.ts +1 -1
  43. package/package.json +2 -2
@@ -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","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"],"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} from './components/list/list-item/ListItem';\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 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';\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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D;AAEvD,SAAStE,OAAO,IAAIuE,QAAQ,QAAQ,iCAAiC;AAErE,SAASvE,OAAO,IAAIwE,QAAQ,QAAQ,iCAAiC;AACrE,SAASxE,OAAO,IAAIyE,OAAO,QAAQ,8BAA8B;AACjE,SAASzE,OAAO,IAAI0E,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,EAEvBC,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","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","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"],"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} from './components/list/list-item/ListItem';\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';\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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kC;AAEvE,SAASjE,OAAO,IAAIkE,YAAY,QAAQ,yCAAyC;AACjF,SAASlE,OAAO,IAAImE,MAAM,QAAQ,4BAA4B;AAC9D,SACInE,OAAO,IAAIoE,eAAe,EAC1BC,mBAAmB,EACnBC,oBAAoB,QACjB,gDAAgD;AAEvD,SAAStE,OAAO,IAAIuE,QAAQ,QAAQ,iCAAiC;AAErE,SAASvE,OAAO,IAAIwE,QAAQ,QAAQ,iCAAiC;AACrE,SAASxE,OAAO,IAAIyE,OAAO,QAAQ,8BAA8B;AACjE,SAASzE,OAAO,IAAI0E,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","ignoreList":[]}
@@ -63,7 +63,7 @@ export const getThumbMaxWidth = ({
63
63
  element.style.minWidth = '20px';
64
64
  element.style.opacity = '0';
65
65
  element.style.position = 'absolute';
66
- element.textContent = typeof thumbLabelFormatter === 'function' ? thumbLabelFormatter(maxNumber) : String(maxNumber);
66
+ element.textContent = typeof thumbLabelFormatter === 'function' ? thumbLabelFormatter(maxNumber, true) : String(maxNumber);
67
67
  document.body.appendChild(element);
68
68
  const width = element.offsetWidth;
69
69
  document.body.removeChild(element);
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","names":["fillSlider","fromSlider","toSlider","theme","fromValue","toValue","rangeDistance","Number","max","min","fromPosition","value","toPosition","backgroundColor","trackColor","gradient","style","background","calculateGradientOffset","maxValue","minValue","sliderWidth","thumbWidth","wrapperWidth","offset","percentage","calculatePopupPosition","sliderValue","popupWidth","leftAtMin","leftAtMax","getThumbMaxWidth","maxNumber","thumbLabelFormatter","element","document","createElement","height","display","padding","whiteSpace","minWidth","opacity","position","textContent","String","body","appendChild","width","offsetWidth","removeChild"],"sources":["../../../src/utils/slider.ts"],"sourcesContent":["import type { Theme } from '../components/color-scheme-provider/ColorSchemeProvider';\n\nexport interface FillSlider {\n fromSlider: HTMLInputElement;\n toSlider: HTMLInputElement;\n fromValue?: number;\n toValue?: number;\n theme: Theme;\n}\n\nexport const fillSlider = ({ fromSlider, toSlider, theme, fromValue, toValue }: FillSlider) => {\n const rangeDistance = Number(toSlider.max) - Number(toSlider.min);\n const fromPosition = Number(fromValue ?? fromSlider.value) - Number(toSlider.min);\n const toPosition = Number(toValue ?? toSlider.value) - Number(toSlider.min);\n\n const backgroundColor = theme['403'];\n const trackColor = theme['409'];\n\n if (!backgroundColor || !trackColor) {\n return;\n }\n\n const gradient = `linear-gradient(\n to right,\n ${backgroundColor} 0%,\n ${backgroundColor} ${(fromPosition / rangeDistance) * 100}%,\n ${trackColor} ${(fromPosition / rangeDistance) * 100}%,\n ${trackColor} ${(toPosition / rangeDistance) * 100}%,\n ${backgroundColor} ${(toPosition / rangeDistance) * 100}%,\n ${backgroundColor} 100%)`;\n\n // Apply the gradient to the appropriate slider\n // eslint-disable-next-line no-param-reassign\n toSlider.style.background = gradient;\n // eslint-disable-next-line no-param-reassign\n fromSlider.style.background = gradient;\n};\n\ninterface CalculateGradientOffset {\n maxValue: number;\n minValue: number;\n sliderWidth: number;\n thumbWidth: number;\n value: number;\n wrapperWidth: number;\n}\n\nexport const calculateGradientOffset = ({\n maxValue,\n minValue,\n sliderWidth,\n thumbWidth,\n value,\n wrapperWidth,\n}: CalculateGradientOffset): number => {\n const offset = (wrapperWidth - sliderWidth) / 2;\n const percentage = (value - minValue) / (maxValue - minValue);\n\n return offset - thumbWidth / 2 + percentage * sliderWidth;\n};\n\ninterface GetThumbMaxWidthOptions {\n maxNumber: number;\n thumbLabelFormatter?: (value: number) => string;\n}\n\ninterface CalculatePopupPositionOptions {\n sliderValue: number;\n min: number;\n max: number;\n popupWidth: number;\n}\n\nexport const calculatePopupPosition = ({\n sliderValue,\n min,\n max,\n popupWidth,\n}: CalculatePopupPositionOptions) => {\n const percentage = (sliderValue - min) / (max - min);\n\n const leftAtMin = -10;\n const leftAtMax = -popupWidth + 25;\n\n return leftAtMin + percentage * (leftAtMax - leftAtMin);\n};\n\nexport const getThumbMaxWidth = ({ maxNumber, thumbLabelFormatter }: GetThumbMaxWidthOptions) => {\n const element = document.createElement('span');\n\n element.style.height = '20px';\n element.style.display = 'flex';\n element.style.padding = '16px';\n element.style.whiteSpace = 'nowrap';\n element.style.minWidth = '20px';\n element.style.opacity = '0';\n element.style.position = 'absolute';\n\n element.textContent =\n typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(maxNumber)\n : String(maxNumber);\n\n document.body.appendChild(element);\n\n const width = element.offsetWidth;\n\n document.body.removeChild(element);\n\n return width;\n};\n"],"mappings":"AAUA,OAAO,MAAMA,UAAU,GAAGA,CAAC;EAAEC,UAAU;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,SAAS;EAAEC;AAAoB,CAAC,KAAK;EAC3F,MAAMC,aAAa,GAAGC,MAAM,CAACL,QAAQ,CAACM,GAAG,CAAC,GAAGD,MAAM,CAACL,QAAQ,CAACO,GAAG,CAAC;EACjE,MAAMC,YAAY,GAAGH,MAAM,CAACH,SAAS,IAAIH,UAAU,CAACU,KAAK,CAAC,GAAGJ,MAAM,CAACL,QAAQ,CAACO,GAAG,CAAC;EACjF,MAAMG,UAAU,GAAGL,MAAM,CAACF,OAAO,IAAIH,QAAQ,CAACS,K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pD,MAAMoB,SAAS,GAAG,CAAC,EAAE;EACrB,MAAMC,SAAS,GAAG,CAACF,UAAU,GAAG,EAAE;EAElC,OAAOC,SAAS,GAAGJ,UAAU,IAAIK,SAAS,GAAGD,SAAS,CAAC;AAC3D,CAAC;AAED,OAAO,MAAME,gBAAgB,GAAGA,CAAC;EAAEC,SAAS;EAAEC;AAA6C,CAAC,KAAK;EAC7F,MAAMC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;EAE9CF,OAAO,CAAClB,KAAK,CAACqB,MAAM,GAAG,MAAM;EAC7BH,OAAO,CAAClB,KAAK,CAACsB,OAAO,GAAG,MAAM;EAC9BJ,OAAO,CAAClB,KAAK,CAACuB,OAAO,GAAG,MAAM;EAC9BL,OAAO,CAAClB,KAAK,CAACwB,UAAU,GAAG,QAAQ;EACnCN,OAAO,CAAClB,KAAK,CAACyB,QAAQ,GAAG,MAAM;EAC/BP,OAAO,CAAClB,KAAK,CAAC0B,OAAO,GAAG,GAAG;EAC3BR,OAAO,CAAClB,KAAK,CAAC2B,QAAQ,GAAG,UAAU;EAEnCT,OAAO,CAACU,WAAW,GACf,OAAOX,mBAAmB,KAAK,UAAU,GACnCA,mBAAmB,CAACD,SAAS,CAAC,GAC9Ba,MAAM,CAACb,SAAS,CAAC;EAE3BG,QAAQ,CAACW,IAAI,CAACC,WAAW,CAACb,OAAO,CAAC;EAElC,MAAMc,KAAK,GAAGd,OAAO,CAACe,WAAW;EAEjCd,QAAQ,CAACW,IAAI,CAACI,WAAW,CAAChB,OAAO,CAAC;EAElC,OAAOc,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"slider.js","names":["fillSlider","fromSlider","toSlider","theme","fromValue","toValue","rangeDistance","Number","max","min","fromPosition","value","toPosition","backgroundColor","trackColor","gradient","style","background","calculateGradientOffset","maxValue","minValue","sliderWidth","thumbWidth","wrapperWidth","offset","percentage","calculatePopupPosition","sliderValue","popupWidth","leftAtMin","leftAtMax","getThumbMaxWidth","maxNumber","thumbLabelFormatter","element","document","createElement","height","display","padding","whiteSpace","minWidth","opacity","position","textContent","String","body","appendChild","width","offsetWidth","removeChild"],"sources":["../../../src/utils/slider.ts"],"sourcesContent":["import type { Theme } from '../components/color-scheme-provider/ColorSchemeProvider';\n\nexport interface FillSlider {\n fromSlider: HTMLInputElement;\n toSlider: HTMLInputElement;\n fromValue?: number;\n toValue?: number;\n theme: Theme;\n}\n\nexport const fillSlider = ({ fromSlider, toSlider, theme, fromValue, toValue }: FillSlider) => {\n const rangeDistance = Number(toSlider.max) - Number(toSlider.min);\n const fromPosition = Number(fromValue ?? fromSlider.value) - Number(toSlider.min);\n const toPosition = Number(toValue ?? toSlider.value) - Number(toSlider.min);\n\n const backgroundColor = theme['403'];\n const trackColor = theme['409'];\n\n if (!backgroundColor || !trackColor) {\n return;\n }\n\n const gradient = `linear-gradient(\n to right,\n ${backgroundColor} 0%,\n ${backgroundColor} ${(fromPosition / rangeDistance) * 100}%,\n ${trackColor} ${(fromPosition / rangeDistance) * 100}%,\n ${trackColor} ${(toPosition / rangeDistance) * 100}%,\n ${backgroundColor} ${(toPosition / rangeDistance) * 100}%,\n ${backgroundColor} 100%)`;\n\n // Apply the gradient to the appropriate slider\n // eslint-disable-next-line no-param-reassign\n toSlider.style.background = gradient;\n // eslint-disable-next-line no-param-reassign\n fromSlider.style.background = gradient;\n};\n\ninterface CalculateGradientOffset {\n maxValue: number;\n minValue: number;\n sliderWidth: number;\n thumbWidth: number;\n value: number;\n wrapperWidth: number;\n}\n\nexport const calculateGradientOffset = ({\n maxValue,\n minValue,\n sliderWidth,\n thumbWidth,\n value,\n wrapperWidth,\n}: CalculateGradientOffset): number => {\n const offset = (wrapperWidth - sliderWidth) / 2;\n const percentage = (value - minValue) / (maxValue - minValue);\n\n return offset - thumbWidth / 2 + percentage * sliderWidth;\n};\n\ninterface GetThumbMaxWidthOptions {\n maxNumber: number;\n thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;\n}\n\ninterface CalculatePopupPositionOptions {\n sliderValue: number;\n min: number;\n max: number;\n popupWidth: number;\n}\n\nexport const calculatePopupPosition = ({\n sliderValue,\n min,\n max,\n popupWidth,\n}: CalculatePopupPositionOptions) => {\n const percentage = (sliderValue - min) / (max - min);\n\n const leftAtMin = -10;\n const leftAtMax = -popupWidth + 25;\n\n return leftAtMin + percentage * (leftAtMax - leftAtMin);\n};\n\nexport const getThumbMaxWidth = ({ maxNumber, thumbLabelFormatter }: GetThumbMaxWidthOptions) => {\n const element = document.createElement('span');\n\n element.style.height = '20px';\n element.style.display = 'flex';\n element.style.padding = '16px';\n element.style.whiteSpace = 'nowrap';\n element.style.minWidth = '20px';\n element.style.opacity = '0';\n element.style.position = 'absolute';\n\n element.textContent =\n typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(maxNumber, true)\n : String(maxNumber);\n\n document.body.appendChild(element);\n\n const width = element.offsetWidth;\n\n document.body.removeChild(element);\n\n return width;\n};\n"],"mappings":"AAUA,OAAO,MAAMA,UAAU,GAAGA,CAAC;EAAEC,UAAU;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,SAAS;EAAEC;AAAoB,CAAC,KAAK;EAC3F,MAAMC,aAAa,GAAGC,MAAM,CAACL,QAAQ,CAACM,GAAG,CAAC,GAAGD,MAAM,CAACL,QAAQ,CAACO,GAAG,CAAC;EACjE,MAAMC,YAAY,GAAGH,MAAM,CAACH,SAAS,IAAIH,UAAU,CAACU,KAAK,CAAC,GAAGJ,MAAM,CAACL,QAAQ,CAACO,GAAG,CAAC;EACjF,MAAMG,UAAU,GAAGL,MAAM,CAACF,OAAO,IAAIH,QAAQ,CAACS,KAAK,CAAC,GAAGJ,MAAM,CAACL,QAAQ,CAACO,GAAG,CAAC;EAE3E,MAAMI,eAAe,GAAGV,KAAK,CAAC,KAAK,CAAC;EACpC,MAAMW,UAAU,GAAGX,KAAK,CAAC,KAAK,CAAC;EAE/B,IAAI,CAACU,eAAe,IAAI,CAACC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A,CAAC;EAAEC,SAAS;EAAEC;AAA6C,CAAC,KAAK;EAC7F,MAAMC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;EAE9CF,OAAO,CAAClB,KAAK,CAACqB,MAAM,GAAG,MAAM;EAC7BH,OAAO,CAAClB,KAAK,CAACsB,OAAO,GAAG,MAAM;EAC9BJ,OAAO,CAAClB,KAAK,CAACuB,OAAO,GAAG,MAAM;EAC9BL,OAAO,CAAClB,KAAK,CAACwB,UAAU,GAAG,QAAQ;EACnCN,OAAO,CAAClB,KAAK,CAACyB,QAAQ,GAAG,MAAM;EAC/BP,OAAO,CAAClB,KAAK,CAAC0B,OAAO,GAAG,GAAG;EAC3BR,OAAO,CAAClB,KAAK,CAAC2B,QAAQ,GAAG,UAAU;EAEnCT,OAAO,CAACU,WAAW,GACf,OAAOX,mBAAmB,KAAK,UAAU,GACnCA,mBAAmB,CAACD,SAAS,EAAE,IAAI,CAAC,GACpCa,MAAM,CAACb,SAAS,CAAC;EAE3BG,QAAQ,CAACW,IAAI,CAACC,WAAW,CAACb,OAAO,CAAC;EAElC,MAAMc,KAAK,GAAGd,OAAO,CAACe,WAAW;EAEjCd,QAAQ,CAACW,IAAI,CAACI,WAAW,CAAChB,OAAO,CAAC;EAElC,OAAOc,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@ import { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
2
2
  type StyledContextMenuProps = WithTheme<{
3
3
  $isActive: boolean;
4
4
  $shouldAddHoverEffect: boolean;
5
+ $shouldUseDefaultTriggerStyles: boolean;
5
6
  }>;
6
7
  export declare const StyledContextMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, StyledContextMenuProps>> & string;
7
8
  export {};
@@ -1,4 +1,4 @@
1
- import type { MouseEvent, ReactNode } from 'react';
1
+ import type { CSSProperties, MouseEvent, ReactNode } from 'react';
2
2
  /**
3
3
  * Enum representing the possible alignments for the context menu.
4
4
  */
@@ -48,6 +48,11 @@ export type ContextMenuProps = {
48
48
  * @optional
49
49
  */
50
50
  alignment?: ContextMenuAlignment;
51
+ /**
52
+ * Additional class name applied to the trigger wrapper.
53
+ * @optional
54
+ */
55
+ className?: string;
51
56
  /**
52
57
  * Children element
53
58
  * @description The element over which the content of the ContextMenu should be displayed.
@@ -120,6 +125,13 @@ export type ContextMenuProps = {
120
125
  * @optional
121
126
  */
122
127
  shouldHidePopupArrow?: boolean;
128
+ /**
129
+ * Whether the default trigger padding/background styles should be applied.
130
+ * @description Disable this when the trigger child already provides its own full visual styling.
131
+ * @default true
132
+ * @optional
133
+ */
134
+ shouldUseDefaultTriggerStyles?: boolean;
123
135
  /**
124
136
  * Show hover effect flag
125
137
  * @description Whether the hover effect should be shown.
@@ -127,6 +139,20 @@ export type ContextMenuProps = {
127
139
  * @optional
128
140
  */
129
141
  shouldShowHoverEffect?: boolean;
142
+ /**
143
+ * Inline styles applied to the trigger wrapper.
144
+ * @optional
145
+ */
146
+ style?: CSSProperties;
147
+ /**
148
+ * Vertical offset between the trigger element and the context menu.
149
+ * @description Use this prop to fine-tune the context menu position on the Y axis. Positive and
150
+ * negative values can be used depending on the desired spacing.
151
+ * @default 0
152
+ * @example yOffset={8}
153
+ * @optional
154
+ */
155
+ yOffset?: number;
130
156
  /**
131
157
  * Z-index value
132
158
  * @description The z-index of the popup.
@@ -1,5 +1,6 @@
1
1
  import type { MouseEvent, ReactElement, ReactNode } from 'react';
2
2
  import type { MotionValue } from 'motion/react';
3
+ import type { ContextMenuItem } from '../context-menu/ContextMenu.types';
3
4
  /**
4
5
  * Supported status types for the multi action button.
5
6
  */
@@ -125,6 +126,7 @@ export type MultiActionButtonAction = {
125
126
  */
126
127
  status?: MultiActionButtonActionStatus;
127
128
  };
129
+ export type MultiActionButtonSecondaryContextMenu = ContextMenuItem[];
128
130
  /**
129
131
  * Props for the MultiActionButton component.
130
132
  */
@@ -196,6 +198,14 @@ export type MultiActionButtonProps = {
196
198
  * @optional
197
199
  */
198
200
  secondaryAction?: MultiActionButtonAction;
201
+ /**
202
+ * Context menu rendered as the secondary action.
203
+ * @description When the list contains entries, the secondary slot renders a fixed down-arrow
204
+ * trigger that opens a ContextMenu. If the list is empty or undefined, no context menu trigger
205
+ * is shown and `secondaryAction` can be used as usual.
206
+ * @optional
207
+ */
208
+ secondaryContextMenu?: MultiActionButtonSecondaryContextMenu;
199
209
  /**
200
210
  * Whether the button should take the full width of its parent.
201
211
  * @description When true, the control stretches to 100% width unless `width` is provided.
@@ -0,0 +1,8 @@
1
+ import type { CSSProperties } from 'react';
2
+ export interface GetSecondaryContextMenuTriggerStyleOptions {
3
+ height: number;
4
+ isCollapsed: boolean;
5
+ isExpanded: boolean;
6
+ shouldUseContentWidth: boolean;
7
+ }
8
+ export declare const getSecondaryContextMenuTriggerStyle: ({ height, isCollapsed, isExpanded, shouldUseContentWidth, }: GetSecondaryContextMenuTriggerStyleOptions) => CSSProperties;
@@ -130,7 +130,7 @@ export type SliderProps = {
130
130
  * <Slider thumbLabelFormatter={(value) => `${value} €`} />
131
131
  * @optional
132
132
  */
133
- thumbLabelFormatter?: (value: number) => string;
133
+ thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;
134
134
  /**
135
135
  * The current value of the slider.
136
136
  * @description
@@ -87,7 +87,7 @@ export type { RadioButtonItem } from './types/radioButton';
87
87
  export type { ISearchBoxItem as SearchBoxItem, ISearchBoxItems as SearchBoxItems, } from './types/searchBox';
88
88
  export type { SelectButtonItem } from './types/selectButton';
89
89
  export type { SliderButtonItem } from './types/slider-button';
90
- export { type MultiActionButtonAction, type MultiActionButtonActionEvent, type MultiActionButtonActionStatus, MultiActionButtonHeight, type MultiActionButtonProps, MultiActionButtonStatusType, } from './components/multi-action-button/MultiActionButton.types';
90
+ export { type MultiActionButtonAction, type MultiActionButtonActionEvent, type MultiActionButtonActionStatus, MultiActionButtonHeight, type MultiActionButtonProps, type MultiActionButtonSecondaryContextMenu, MultiActionButtonStatusType, } from './components/multi-action-button/MultiActionButton.types';
91
91
  export { ClampPosition } from './types/truncation';
92
92
  export { useIsTouch } from './utils/environment';
93
93
  export { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';
@@ -18,7 +18,7 @@ interface CalculateGradientOffset {
18
18
  export declare const calculateGradientOffset: ({ maxValue, minValue, sliderWidth, thumbWidth, value, wrapperWidth, }: CalculateGradientOffset) => number;
19
19
  interface GetThumbMaxWidthOptions {
20
20
  maxNumber: number;
21
- thumbLabelFormatter?: (value: number) => string;
21
+ thumbLabelFormatter?: (value: number, isMeasuring?: boolean) => string;
22
22
  }
23
23
  interface CalculatePopupPositionOptions {
24
24
  sliderValue: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.53",
3
+ "version": "5.0.57",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -87,5 +87,5 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "gitHead": "8ece3beb8424358b883a16a87419ef35303be612"
90
+ "gitHead": "3f21d528f8c7bb7ebbc02507785cad7c2d18299a"
91
91
  }