@chayns-components/core 5.0.25 → 5.0.27
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/lib/cjs/components/accordion/accordion-body/AccordionBody.js +1 -6
- package/lib/cjs/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js +0 -27
- package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-content/AccordionContent.js +6 -13
- package/lib/cjs/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-content/AccordionContent.styles.js +0 -27
- package/lib/cjs/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.js +6 -13
- package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.styles.js +1 -36
- package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.types.js +12 -0
- package/lib/cjs/components/combobox/ComboBox.types.js.map +1 -0
- package/lib/cjs/components/combobox/combobox-item/ComboBoxItem.js.map +1 -1
- package/lib/cjs/components/filter/filter-content/FIlterContent.js.map +1 -1
- package/lib/cjs/components/popup/popup-content-wrapper/PopupContentWrapper.js +1 -4
- package/lib/cjs/components/popup/popup-content-wrapper/PopupContentWrapper.js.map +1 -1
- package/lib/cjs/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js +0 -34
- package/lib/cjs/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js.map +1 -1
- package/lib/cjs/components/progress-bar/ProgressBar.js +30 -27
- package/lib/cjs/components/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/components/progress-bar/ProgressBar.styles.js +4 -2
- package/lib/cjs/components/progress-bar/ProgressBar.styles.js.map +1 -1
- package/lib/cjs/components/scroll-view/ScrollView.js +10 -16
- package/lib/cjs/components/scroll-view/ScrollView.js.map +1 -1
- package/lib/cjs/components/scroll-view/ScrollView.styles.js +3 -38
- package/lib/cjs/components/scroll-view/ScrollView.styles.js.map +1 -1
- package/lib/cjs/components/search-box/SearchBox.styles.js +2 -29
- package/lib/cjs/components/search-box/SearchBox.styles.js.map +1 -1
- package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.js +2 -6
- package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.js.map +1 -1
- package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.styles.js +0 -27
- package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.styles.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.js +2 -6
- package/lib/cjs/components/text-area/TextArea.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.styles.js +2 -31
- package/lib/cjs/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/cjs/index.js +3 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/calculate.js.map +1 -1
- package/lib/esm/components/accordion/accordion-body/AccordionBody.js +1 -6
- package/lib/esm/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js +0 -27
- package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/esm/components/accordion/accordion-content/AccordionContent.js +6 -13
- package/lib/esm/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/esm/components/accordion/accordion-content/AccordionContent.styles.js +0 -27
- package/lib/esm/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.js +5 -12
- package/lib/esm/components/combobox/ComboBox.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.styles.js +1 -36
- package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.types.js +6 -0
- package/lib/esm/components/combobox/ComboBox.types.js.map +1 -0
- package/lib/esm/components/combobox/combobox-item/ComboBoxItem.js.map +1 -1
- package/lib/esm/components/filter/filter-content/FIlterContent.js.map +1 -1
- package/lib/esm/components/popup/popup-content-wrapper/PopupContentWrapper.js +2 -5
- package/lib/esm/components/popup/popup-content-wrapper/PopupContentWrapper.js.map +1 -1
- package/lib/esm/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js +0 -34
- package/lib/esm/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js.map +1 -1
- package/lib/esm/components/progress-bar/ProgressBar.js +30 -27
- package/lib/esm/components/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/components/progress-bar/ProgressBar.styles.js +4 -2
- package/lib/esm/components/progress-bar/ProgressBar.styles.js.map +1 -1
- package/lib/esm/components/scroll-view/ScrollView.js +10 -16
- package/lib/esm/components/scroll-view/ScrollView.js.map +1 -1
- package/lib/esm/components/scroll-view/ScrollView.styles.js +3 -38
- package/lib/esm/components/scroll-view/ScrollView.styles.js.map +1 -1
- package/lib/esm/components/search-box/SearchBox.styles.js +1 -28
- package/lib/esm/components/search-box/SearchBox.styles.js.map +1 -1
- package/lib/esm/components/search-box/search-box-body/SearchBoxBody.js +2 -6
- package/lib/esm/components/search-box/search-box-body/SearchBoxBody.js.map +1 -1
- package/lib/esm/components/search-box/search-box-body/SearchBoxBody.styles.js +0 -27
- package/lib/esm/components/search-box/search-box-body/SearchBoxBody.styles.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.js +2 -6
- package/lib/esm/components/text-area/TextArea.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.styles.js +1 -30
- package/lib/esm/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/esm/index.js +2 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/calculate.js.map +1 -1
- package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +0 -2
- package/lib/types/components/accordion/accordion-content/AccordionContent.styles.d.ts +0 -2
- package/lib/types/components/combobox/ComboBox.d.ts +2 -139
- package/lib/types/components/combobox/ComboBox.styles.d.ts +1 -3
- package/lib/types/components/combobox/ComboBox.types.d.ts +139 -0
- package/lib/types/components/combobox/combobox-item/ComboBoxItem.d.ts +1 -1
- package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +0 -2
- package/lib/types/components/progress-bar/ProgressBar.d.ts +4 -0
- package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +1 -0
- package/lib/types/components/scroll-view/ScrollView.styles.d.ts +0 -2
- package/lib/types/components/search-box/SearchBox.styles.d.ts +0 -2
- package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +0 -2
- package/lib/types/components/text-area/TextArea.styles.d.ts +0 -2
- package/lib/types/index.d.ts +3 -1
- package/lib/types/utils/calculate.d.ts +1 -1
- package/package.json +2 -2
package/lib/cjs/index.js
CHANGED
|
@@ -108,7 +108,7 @@ Object.defineProperty(exports, "ComboBox", {
|
|
|
108
108
|
Object.defineProperty(exports, "ComboBoxSize", {
|
|
109
109
|
enumerable: true,
|
|
110
110
|
get: function () {
|
|
111
|
-
return
|
|
111
|
+
return _ComboBox2.ComboBoxSize;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "ContainerAnchor", {
|
|
@@ -571,7 +571,7 @@ var _AnimatedNumber = _interopRequireDefault(require("./components/animated-numb
|
|
|
571
571
|
var _FileList = _interopRequireDefault(require("./components/file-list/FileList"));
|
|
572
572
|
var _FileSelect = _interopRequireDefault(require("./components/file-select/FileSelect"));
|
|
573
573
|
var _DropdownBodyWrapper = _interopRequireDefault(require("./components/dropdown-body-wrapper/DropdownBodyWrapper"));
|
|
574
|
-
var _ComboBox =
|
|
574
|
+
var _ComboBox = _interopRequireDefault(require("./components/combobox/ComboBox"));
|
|
575
575
|
var _ContentCard = _interopRequireDefault(require("./components/content-card/ContentCard"));
|
|
576
576
|
var _HighlightSlider = _interopRequireDefault(require("./components/highlight-slider/HighlightSlider"));
|
|
577
577
|
var _ContextMenu = _interopRequireDefault(require("./components/context-menu/ContextMenu"));
|
|
@@ -625,6 +625,7 @@ var _fileDialog = require("./utils/fileDialog");
|
|
|
625
625
|
var _isTobitEmployee = require("./utils/isTobitEmployee");
|
|
626
626
|
var _pageProvider = require("./utils/pageProvider");
|
|
627
627
|
var _uploadFile = require("./utils/uploadFile");
|
|
628
|
+
var _ComboBox2 = require("./components/combobox/ComboBox.types");
|
|
628
629
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
629
630
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
630
631
|
//# sourceMappingURL=index.js.map
|
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","_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","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 {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n ComboBoxSize,\n} 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 {\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';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,CAAA,EAAAC,CAAA,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,SAAA/E,uBAAA8E,CAAA,WAAAA,CAAA,IAAAA,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","_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","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} 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 {\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAAsE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAxE,uBAAA,YAAAA,CAAAsE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,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,SAAAhF,uBAAA+E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculate.js","names":["_chaynsApi","require","_react","_interopRequireDefault","_server","_ColorSchemeProvider","e","__esModule","default","calculateMaxComboBoxItemWidth","functions","list","shouldShowBigImage","values","length","forEach","icons","imageUrl","rightElement","subtext","suffixElement","text","textStyles","tagName","styles","div","document","createElement","Object","assign","style","display","gap","position","visibility","whiteSpace","width","body","appendChild","innerText","innerHTML","renderToString","ChaynsProvider","data","isModule","offsetWidth","trim","push","removeChild","Math","max","apply","exports","calculateBiggestWidth","elements","container","padding","id","element","accessKey","calculateContentHeight","heights","offsetHeight","reduce","partialSum","a","getHeightOfSingleTextLine","height","getBoundingClientRect","getMaxHeightInPixels","maxHeight","rootElement","tempElement"],"sources":["../../../src/utils/calculate.tsx"],"sourcesContent":["import { ChaynsProvider, ChaynsReactFunctions, ChaynsReactValues } from 'chayns-api';\nimport React, { type CSSProperties } from 'react';\nimport { renderToString } from 'react-dom/server';\nimport ColorSchemeProvider from '../components/color-scheme-provider/ColorSchemeProvider';\nimport type { IComboBoxItem } from '../components/combobox/ComboBox';\nimport type { SliderButtonItem } from '../types/slider-button';\n\ninterface CalculateMaxComboBoxItemWidthOptions {\n functions: ChaynsReactFunctions;\n list: IComboBoxItem[];\n shouldShowBigImage?: boolean;\n values: ChaynsReactValues;\n}\n\nexport const calculateMaxComboBoxItemWidth = ({\n functions,\n list,\n shouldShowBigImage,\n values,\n}: CalculateMaxComboBoxItemWidthOptions) => {\n const length: number[] = [];\n\n list.forEach(({ icons, imageUrl, rightElement, subtext, suffixElement, text, textStyles }) => {\n const tagName = textStyles?.tagName ?? 'div';\n const styles = textStyles?.styles;\n\n const div = document.createElement(tagName);\n\n if (styles) {\n Object.assign(div.style, styles);\n }\n\n div.style.display = 'flex';\n div.style.gap = '10px';\n div.style.position = 'absolute';\n div.style.visibility = 'hidden';\n div.style.whiteSpace = 'nowrap';\n div.style.width = 'auto';\n\n document.body.appendChild(div);\n\n div.innerText = text;\n\n if (rightElement) {\n // ColorSchemeProvider is used to prevent missing scheme context error.\n // Due to the fact that the element is never rendered visible, the values are irrelevant.\n div.innerHTML += renderToString(\n <ChaynsProvider data={values} functions={functions} isModule>\n <ColorSchemeProvider>{rightElement}</ColorSchemeProvider>\n </ChaynsProvider>,\n );\n }\n\n if (suffixElement) {\n // ColorSchemeProvider is used to prevent missing scheme context error.\n // Due to the fact that the element is never rendered visible, the values are irrelevant.\n div.innerHTML += renderToString(\n <ChaynsProvider data={values} functions={functions} isModule>\n <ColorSchemeProvider>{suffixElement}</ColorSchemeProvider>\n </ChaynsProvider>,\n );\n }\n\n let width = div.offsetWidth;\n\n if (icons && icons.length > 0) {\n width += 20 + 10; // icon width + gap\n }\n\n if (imageUrl) {\n width +=\n (shouldShowBigImage || (typeof subtext === 'string' && subtext.trim() !== '')\n ? 40\n : 22) + 10; // image width + gap\n }\n\n length.push(width);\n\n document.body.removeChild(div);\n });\n\n return Math.max.apply(null, length);\n};\n\nexport const calculateBiggestWidth = (elements: SliderButtonItem[]) => {\n const container = document.createElement('div');\n\n container.style.visibility = 'hidden';\n container.style.position = 'absolute';\n container.style.width = 'auto';\n container.style.whiteSpace = 'nowrap';\n container.style.padding = '7px 12px';\n container.style.display = 'block';\n\n elements.forEach(({ text, id }) => {\n const element = document.createElement('div');\n\n element.accessKey = `slider-button-pseudo--${id}`;\n element.innerText = text;\n\n container.appendChild(element);\n });\n\n document.body.appendChild(container);\n\n const width = container.offsetWidth;\n\n document.body.removeChild(container);\n\n return width;\n};\n\nexport const calculateContentHeight = (elements: string[]) => {\n const heights: number[] = [];\n\n elements.forEach((element: string) => {\n const div = document.createElement('div');\n\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.width = 'auto';\n div.style.padding = '4px 10px';\n div.style.whiteSpace = 'nowrap';\n\n document.body.appendChild(div);\n\n div.innerText = element;\n\n heights.push(div.offsetHeight);\n\n document.body.removeChild(div);\n });\n\n return heights.reduce((partialSum, a) => partialSum + a, 0);\n};\n\ninterface GetHeightOfSingleTextLineOptions {\n container: Element;\n}\n\nexport const getHeightOfSingleTextLine = ({ container }: GetHeightOfSingleTextLineOptions) => {\n const div = document.createElement('div');\n\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.whiteSpace = 'nowrap';\n\n div.innerText = 'Single text line';\n\n container.appendChild(div);\n\n const { height } = div.getBoundingClientRect();\n\n container.removeChild(div);\n\n return height;\n};\n\nexport const getMaxHeightInPixels = (\n maxHeight: CSSProperties['maxHeight'],\n rootElement: Element,\n): number => {\n const tempElement = document.createElement('div');\n\n tempElement.style.position = 'absolute';\n tempElement.style.visibility = 'hidden';\n tempElement.style.height = '100vh';\n tempElement.style.maxHeight = maxHeight as string;\n\n rootElement.appendChild(tempElement);\n\n const { height } = tempElement.getBoundingClientRect();\n\n rootElement.removeChild(tempElement);\n\n return height;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA0F,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWnF,MAAMG,6BAA6B,GAAGA,CAAC;EAC1CC,SAAS;EACTC,IAAI;EACJC,kBAAkB;EAClBC;AACkC,CAAC,KAAK;EACxC,MAAMC,MAAgB,GAAG,EAAE;EAE3BH,IAAI,CAACI,OAAO,CAAC,CAAC;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,YAAY;IAAEC,OAAO;IAAEC,aAAa;IAAEC,IAAI;IAAEC;EAAW,CAAC,KAAK;IAC1F,MAAMC,OAAO,GAAG,CAAAD,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,OAAO,KAAI,KAAK;IAC5C,MAAMC,MAAM,GAAGF,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEE,MAAM;IAEjC,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAACJ,OAAO,CAAC;IAE3C,IAAIC,MAAM,EAAE;MACRI,MAAM,CAACC,MAAM,CAACJ,GAAG,CAACK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,KAAK,CAACI,UAAU,GAAG,QAAQ;EAC/BT,GAAG,CAACK,KAAK,CAACG,QAAQ,GAAG,UAAU;EAC/BR,GAAG,CAACK,KAAK,CAACK,UAAU,GAAG,QAAQ;EAE/BV,GAAG,CAACc,SAAS,GAAG,kBAAkB;EAElCgB,SAAS,CAACjB,WAAW,CAACb,GAAG,CAAC;EAE1B,MAAM;IAAE0C;EAAO,CAAC,GAAG1C,GAAG,CAAC2C,qBAAqB,CAAC,CAAC;EAE9Cb,SAAS,CAACP,WAAW,CAACvB,GAAG,CAAC;EAE1B,OAAO0C,MAAM;AACjB,CAAC;AAACf,OAAA,CAAAc,yBAAA,GAAAA,yBAAA;AAEK,MAAMG,oBAAoB,GAAGA,CAChCC,SAAqC,EACrCC,WAAoB,KACX;EACT,MAAMC,WAAW,GAAG9C,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAEjD6C,WAAW,CAAC1C,KAAK,CAACG,QAAQ,GAAG,UAAU;EACvCuC,WAAW,CAAC1C,KAAK,CAACI,UAAU,GAAG,QAAQ;EACvCsC,WAAW,CAAC1C,KAAK,CAACqC,MAAM,GAAG,OAAO;EAClCK,WAAW,CAAC1C,KAAK,CAACwC,SAAS,GAAGA,SAAmB;EAEjDC,WAAW,CAACjC,WAAW,CAACkC,WAAW,CAAC;EAEpC,MAAM;IAAEL;EAAO,CAAC,GAAGK,WAAW,CAACJ,qBAAqB,CAAC,CAAC;EAEtDG,WAAW,CAACvB,WAAW,CAACwB,WAAW,CAAC;EAEpC,OAAOL,MAAM;AACjB,CAAC;AAACf,OAAA,CAAAiB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"calculate.js","names":["_chaynsApi","require","_react","_interopRequireDefault","_server","_ColorSchemeProvider","e","__esModule","default","calculateMaxComboBoxItemWidth","functions","list","shouldShowBigImage","values","length","forEach","icons","imageUrl","rightElement","subtext","suffixElement","text","textStyles","tagName","styles","div","document","createElement","Object","assign","style","display","gap","position","visibility","whiteSpace","width","body","appendChild","innerText","innerHTML","renderToString","ChaynsProvider","data","isModule","offsetWidth","trim","push","removeChild","Math","max","apply","exports","calculateBiggestWidth","elements","container","padding","id","element","accessKey","calculateContentHeight","heights","offsetHeight","reduce","partialSum","a","getHeightOfSingleTextLine","height","getBoundingClientRect","getMaxHeightInPixels","maxHeight","rootElement","tempElement"],"sources":["../../../src/utils/calculate.tsx"],"sourcesContent":["import { ChaynsProvider, ChaynsReactFunctions, ChaynsReactValues } from 'chayns-api';\nimport React, { type CSSProperties } from 'react';\nimport { renderToString } from 'react-dom/server';\nimport ColorSchemeProvider from '../components/color-scheme-provider/ColorSchemeProvider';\nimport type { SliderButtonItem } from '../types/slider-button';\nimport { IComboBoxItem } from '../components/combobox/ComboBox.types';\n\ninterface CalculateMaxComboBoxItemWidthOptions {\n functions: ChaynsReactFunctions;\n list: IComboBoxItem[];\n shouldShowBigImage?: boolean;\n values: ChaynsReactValues;\n}\n\nexport const calculateMaxComboBoxItemWidth = ({\n functions,\n list,\n shouldShowBigImage,\n values,\n}: CalculateMaxComboBoxItemWidthOptions) => {\n const length: number[] = [];\n\n list.forEach(({ icons, imageUrl, rightElement, subtext, suffixElement, text, textStyles }) => {\n const tagName = textStyles?.tagName ?? 'div';\n const styles = textStyles?.styles;\n\n const div = document.createElement(tagName);\n\n if (styles) {\n Object.assign(div.style, styles);\n }\n\n div.style.display = 'flex';\n div.style.gap = '10px';\n div.style.position = 'absolute';\n div.style.visibility = 'hidden';\n div.style.whiteSpace = 'nowrap';\n div.style.width = 'auto';\n\n document.body.appendChild(div);\n\n div.innerText = text;\n\n if (rightElement) {\n // ColorSchemeProvider is used to prevent missing scheme context error.\n // Due to the fact that the element is never rendered visible, the values are irrelevant.\n div.innerHTML += renderToString(\n <ChaynsProvider data={values} functions={functions} isModule>\n <ColorSchemeProvider>{rightElement}</ColorSchemeProvider>\n </ChaynsProvider>,\n );\n }\n\n if (suffixElement) {\n // ColorSchemeProvider is used to prevent missing scheme context error.\n // Due to the fact that the element is never rendered visible, the values are irrelevant.\n div.innerHTML += renderToString(\n <ChaynsProvider data={values} functions={functions} isModule>\n <ColorSchemeProvider>{suffixElement}</ColorSchemeProvider>\n </ChaynsProvider>,\n );\n }\n\n let width = div.offsetWidth;\n\n if (icons && icons.length > 0) {\n width += 20 + 10; // icon width + gap\n }\n\n if (imageUrl) {\n width +=\n (shouldShowBigImage || (typeof subtext === 'string' && subtext.trim() !== '')\n ? 40\n : 22) + 10; // image width + gap\n }\n\n length.push(width);\n\n document.body.removeChild(div);\n });\n\n return Math.max.apply(null, length);\n};\n\nexport const calculateBiggestWidth = (elements: SliderButtonItem[]) => {\n const container = document.createElement('div');\n\n container.style.visibility = 'hidden';\n container.style.position = 'absolute';\n container.style.width = 'auto';\n container.style.whiteSpace = 'nowrap';\n container.style.padding = '7px 12px';\n container.style.display = 'block';\n\n elements.forEach(({ text, id }) => {\n const element = document.createElement('div');\n\n element.accessKey = `slider-button-pseudo--${id}`;\n element.innerText = text;\n\n container.appendChild(element);\n });\n\n document.body.appendChild(container);\n\n const width = container.offsetWidth;\n\n document.body.removeChild(container);\n\n return width;\n};\n\nexport const calculateContentHeight = (elements: string[]) => {\n const heights: number[] = [];\n\n elements.forEach((element: string) => {\n const div = document.createElement('div');\n\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.width = 'auto';\n div.style.padding = '4px 10px';\n div.style.whiteSpace = 'nowrap';\n\n document.body.appendChild(div);\n\n div.innerText = element;\n\n heights.push(div.offsetHeight);\n\n document.body.removeChild(div);\n });\n\n return heights.reduce((partialSum, a) => partialSum + a, 0);\n};\n\ninterface GetHeightOfSingleTextLineOptions {\n container: Element;\n}\n\nexport const getHeightOfSingleTextLine = ({ container }: GetHeightOfSingleTextLineOptions) => {\n const div = document.createElement('div');\n\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.whiteSpace = 'nowrap';\n\n div.innerText = 'Single text line';\n\n container.appendChild(div);\n\n const { height } = div.getBoundingClientRect();\n\n container.removeChild(div);\n\n return height;\n};\n\nexport const getMaxHeightInPixels = (\n maxHeight: CSSProperties['maxHeight'],\n rootElement: Element,\n): number => {\n const tempElement = document.createElement('div');\n\n tempElement.style.position = 'absolute';\n tempElement.style.visibility = 'hidden';\n tempElement.style.height = '100vh';\n tempElement.style.maxHeight = maxHeight as string;\n\n rootElement.appendChild(tempElement);\n\n const { height } = tempElement.getBoundingClientRect();\n\n rootElement.removeChild(tempElement);\n\n return height;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA0F,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWnF,MAAMG,6BAA6B,GAAGA,CAAC;EAC1CC,SAAS;EACTC,IAAI;EACJC,kBAAkB;EAClBC;AACkC,CAAC,KAAK;EACxC,MAAMC,MAAgB,GAAG,EAAE;EAE3BH,IAAI,CAACI,OAAO,CAAC,CAAC;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,YAAY;IAAEC,OAAO;IAAEC,aAAa;IAAEC,IAAI;IAAEC;EAAW,CAAC,KAAK;IAC1F,MAAMC,OAAO,GAAG,CAAAD,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,OAAO,KAAI,KAAK;IAC5C,MAAMC,MAAM,GAAGF,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEE,MAAM;IAEjC,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAACJ,OAAO,CAAC;IAE3C,IAAIC,MAAM,EAAE;MACRI,MAAM,CAACC,MAAM,CAACJ,GAAG,CAACK,KAAK,EAAEN,MAAM,CAAC;IACpC;IAEAC,GAAG,CAACK,KAAK,CA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AACG,QAAQ,GAAG,UAAU;EAC/BR,GAAG,CAACK,KAAK,CAACK,UAAU,GAAG,QAAQ;EAE/BV,GAAG,CAACc,SAAS,GAAG,kBAAkB;EAElCgB,SAAS,CAACjB,WAAW,CAACb,GAAG,CAAC;EAE1B,MAAM;IAAE0C;EAAO,CAAC,GAAG1C,GAAG,CAAC2C,qBAAqB,CAAC,CAAC;EAE9Cb,SAAS,CAACP,WAAW,CAACvB,GAAG,CAAC;EAE1B,OAAO0C,MAAM;AACjB,CAAC;AAACf,OAAA,CAAAc,yBAAA,GAAAA,yBAAA;AAEK,MAAMG,oBAAoB,GAAGA,CAChCC,SAAqC,EACrCC,WAAoB,KACX;EACT,MAAMC,WAAW,GAAG9C,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAEjD6C,WAAW,CAAC1C,KAAK,CAACG,QAAQ,GAAG,UAAU;EACvCuC,WAAW,CAAC1C,KAAK,CAACI,UAAU,GAAG,QAAQ;EACvCsC,WAAW,CAAC1C,KAAK,CAACqC,MAAM,GAAG,OAAO;EAClCK,WAAW,CAAC1C,KAAK,CAACwC,SAAS,GAAGA,SAAmB;EAEjDC,WAAW,CAACjC,WAAW,CAACkC,WAAW,CAAC;EAEpC,MAAM;IAAEL;EAAO,CAAC,GAAGK,WAAW,CAACJ,qBAAqB,CAAC,CAAC;EAEtDG,WAAW,CAACvB,WAAW,CAACwB,WAAW,CAAC;EAEpC,OAAOL,MAAM;AACjB,CAAC;AAACf,OAAA,CAAAiB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getDevice } from 'chayns-api';
|
|
2
1
|
import React, { useMemo } from 'react';
|
|
3
2
|
import { AccordionGroupContext } from '../accordion-group/AccordionGroup';
|
|
4
3
|
import { StyledMotionAccordionBody } from './AccordionBody.styles';
|
|
@@ -10,9 +9,6 @@ const AccordionBody = ({
|
|
|
10
9
|
shouldSkipAnimation,
|
|
11
10
|
onAnimationComplete
|
|
12
11
|
}) => {
|
|
13
|
-
const {
|
|
14
|
-
browser
|
|
15
|
-
} = getDevice();
|
|
16
12
|
const AccordionGroupContextProviderValue = useMemo(() => ({
|
|
17
13
|
openAccordionUuid: undefined
|
|
18
14
|
}), []);
|
|
@@ -45,9 +41,8 @@ const AccordionBody = ({
|
|
|
45
41
|
duration: 0.25
|
|
46
42
|
}
|
|
47
43
|
},
|
|
48
|
-
className: "beta-chayns-accordion-body",
|
|
44
|
+
className: "beta-chayns-accordion-body chayns-scrollbar",
|
|
49
45
|
$maxHeight: maxHeight,
|
|
50
|
-
$browser: browser?.name,
|
|
51
46
|
onAnimationComplete: onAnimationComplete,
|
|
52
47
|
onScroll: onScroll
|
|
53
48
|
}, /*#__PURE__*/React.createElement(AccordionGroupContext.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionBody.js","names":["
|
|
1
|
+
{"version":3,"file":"AccordionBody.js","names":["React","useMemo","AccordionGroupContext","StyledMotionAccordionBody","AccordionBody","children","maxHeight","onScroll","shouldHideBody","shouldSkipAnimation","onAnimationComplete","AccordionGroupContextProviderValue","openAccordionUuid","undefined","createElement","initial","height","opacity","animate","exit","transition","duration","ease","className","$maxHeight","Provider","value","displayName"],"sources":["../../../../../src/components/accordion/accordion-body/AccordionBody.tsx"],"sourcesContent":["import React, { FC, ReactNode, UIEvent, useMemo } from 'react';\nimport type { AccordionProps } from '../Accordion';\nimport { AccordionGroupContext } from '../accordion-group/AccordionGroup';\nimport { StyledMotionAccordionBody } from './AccordionBody.styles';\n\nexport type AccordionBodyProps = {\n /**\n * The elements that should be shown inside the body.\n */\n children: ReactNode;\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight: AccordionProps['bodyMaxHeight'];\n /**\n * Function that is executed when the element will be scrolled\n */\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n /**\n * Whether the body should be shown.\n */\n shouldHideBody: boolean;\n /**\n * Whether the animation should be skipped.\n */\n shouldSkipAnimation?: boolean;\n\n onAnimationComplete?: VoidFunction;\n};\n\nconst AccordionBody: FC<AccordionBodyProps> = ({\n children,\n maxHeight,\n onScroll,\n shouldHideBody,\n shouldSkipAnimation,\n onAnimationComplete,\n}) => {\n const AccordionGroupContextProviderValue = useMemo(\n () => ({ openAccordionUuid: undefined }),\n [],\n );\n\n return (\n <StyledMotionAccordionBody\n initial={\n shouldSkipAnimation ? { height: 'auto', opacity: 1 } : { height: 0, opacity: 0 }\n }\n animate={{ height: shouldHideBody ? 0 : 'auto', opacity: shouldHideBody ? 0 : 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={{\n height: shouldSkipAnimation ? { duration: 0, ease: 'linear' } : { duration: 0.25 },\n opacity: shouldSkipAnimation ? { duration: 0 } : { duration: 0.25 },\n }}\n className=\"beta-chayns-accordion-body chayns-scrollbar\"\n $maxHeight={maxHeight}\n onAnimationComplete={onAnimationComplete}\n onScroll={onScroll}\n >\n <AccordionGroupContext.Provider value={AccordionGroupContextProviderValue}>\n {children}\n </AccordionGroupContext.Provider>\n </StyledMotionAccordionBody>\n );\n};\n\nAccordionBody.displayName = 'AccordionBody';\n\nexport default AccordionBody;\n"],"mappings":"AAAA,OAAOA,KAAK,IAA4BC,OAAO,QAAQ,OAAO;AAE9D,SAASC,qBAAqB,QAAQ,mCAAmC;AACzE,SAASC,yBAAyB,QAAQ,wBAAwB;AA2BlE,MAAMC,aAAqC,GAAGA,CAAC;EAC3CC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,cAAc;EACdC,mBAAmB;EACnBC;AACJ,CAAC,KAAK;EACF,MAAMC,kCAAkC,GAAGV,OAAO,CAC9C,OAAO;IAAEW,iBAAiB,EAAEC;EAAU,CAAC,CAAC,EACxC,EACJ,CAAC;EAED,oBACIb,KAAA,CAAAc,aAAA,CAACX,yBAAyB;IACtBY,OAAO,EACHN,mBAAmB,GAAG;MAAEO,MAAM,EAAE,MAAM;MAAEC,OAAO,EAAE;IAAE,CAAC,GAAG;MAAED,MAAM,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAClF;IACDC,OAAO,EAAE;MAAEF,MAAM,EAAER,cAAc,GAAG,CAAC,GAAG,MAAM;MAAES,OAAO,EAAET,cAAc,GAAG,CAAC,GAAG;IAAE,CAAE;IAClFW,IAAI,EAAE;MAAEH,MAAM,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAAE;IAChCG,UAAU,EAAE;MACRJ,MAAM,EAAEP,mBAAmB,GAAG;QAAEY,QAAQ,EAAE,CAAC;QAAEC,IAAI,EAAE;MAAS,CAAC,GAAG;QAAED,QAAQ,EAAE;MAAK,CAAC;MAClFJ,OAAO,EAAER,mBAAmB,GAAG;QAAEY,QAAQ,EAAE;MAAE,CAAC,GAAG;QAAEA,QAAQ,EAAE;MAAK;IACtE,CAAE;IACFE,SAAS,EAAC,6CAA6C;IACvDC,UAAU,EAAElB,SAAU;IACtBI,mBAAmB,EAAEA,mBAAoB;IACzCH,QAAQ,EAAEA;EAAS,gBAEnBP,KAAA,CAAAc,aAAA,CAACZ,qBAAqB,CAACuB,QAAQ;IAACC,KAAK,EAAEf;EAAmC,GACrEN,QAC2B,CACT,CAAC;AAEpC,CAAC;AAEDD,aAAa,CAACuB,WAAW,GAAG,eAAe;AAE3C,eAAevB,aAAa","ignoreList":[]}
|
|
@@ -10,32 +10,5 @@ export const StyledMotionAccordionBody = styled(motion.div)`
|
|
|
10
10
|
max-height: ${$maxHeight}px;
|
|
11
11
|
overflow-y: scroll;
|
|
12
12
|
`}
|
|
13
|
-
|
|
14
|
-
// Styles for custom scrollbar
|
|
15
|
-
${({
|
|
16
|
-
$browser,
|
|
17
|
-
theme
|
|
18
|
-
}) => $browser === 'firefox' ? css`
|
|
19
|
-
scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;
|
|
20
|
-
scrollbar-width: thin;
|
|
21
|
-
` : css`
|
|
22
|
-
&::-webkit-scrollbar {
|
|
23
|
-
width: 5px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&::-webkit-scrollbar-track {
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&::-webkit-scrollbar-button {
|
|
31
|
-
background-color: transparent;
|
|
32
|
-
height: 5px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&::-webkit-scrollbar-thumb {
|
|
36
|
-
background-color: rgba(${theme['text-rgb']}, 0.15);
|
|
37
|
-
border-radius: 20px;
|
|
38
|
-
}
|
|
39
|
-
`}
|
|
40
13
|
`;
|
|
41
14
|
//# sourceMappingURL=AccordionBody.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionBody.styles.js","names":["motion","styled","css","StyledMotionAccordionBody","div","$maxHeight"
|
|
1
|
+
{"version":3,"file":"AccordionBody.styles.js","names":["motion","styled","css","StyledMotionAccordionBody","div","$maxHeight"],"sources":["../../../../../src/components/accordion/accordion-body/AccordionBody.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionBodyProps = WithTheme<{\n $maxHeight?: number;\n}>;\n\nexport const StyledMotionAccordionBody = styled(motion.div)<StyledMotionAccordionBodyProps>`\n overflow: hidden;\n transition: none !important;\n\n ${({ $maxHeight }) =>\n typeof $maxHeight === 'number' &&\n css`\n max-height: ${$maxHeight}px;\n overflow-y: scroll;\n `}\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAO/C,OAAO,MAAMC,yBAAyB,GAAGF,MAAM,CAACD,MAAM,CAACI,GAAG,CAAiC;AAC3F;AACA;AACA;AACA,MAAM,CAAC;EAAEC;AAAW,CAAC,KACb,OAAOA,UAAU,KAAK,QAAQ,IAC9BH,GAAG;AACX,0BAA0BG,UAAU;AACpC;AACA,SAAS;AACT,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getDevice } from 'chayns-api';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { StyledAccordionContent } from './AccordionContent.styles';
|
|
4
3
|
const AccordionContent = ({
|
|
@@ -6,18 +5,12 @@ const AccordionContent = ({
|
|
|
6
5
|
maxHeight,
|
|
7
6
|
onScroll,
|
|
8
7
|
shouldPreventBottomSpace = false
|
|
9
|
-
}) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
$browser: browser?.name,
|
|
16
|
-
$maxHeight: maxHeight,
|
|
17
|
-
onScroll: onScroll,
|
|
18
|
-
$shouldPreventBottomSpace: shouldPreventBottomSpace
|
|
19
|
-
}, children);
|
|
20
|
-
};
|
|
8
|
+
}) => /*#__PURE__*/React.createElement(StyledAccordionContent, {
|
|
9
|
+
className: "beta-chayns-accordion-content chayns-scrollbar",
|
|
10
|
+
$maxHeight: maxHeight,
|
|
11
|
+
onScroll: onScroll,
|
|
12
|
+
$shouldPreventBottomSpace: shouldPreventBottomSpace
|
|
13
|
+
}, children);
|
|
21
14
|
AccordionContent.displayName = 'AccordionContent';
|
|
22
15
|
export default AccordionContent;
|
|
23
16
|
//# sourceMappingURL=AccordionContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContent.js","names":["
|
|
1
|
+
{"version":3,"file":"AccordionContent.js","names":["React","StyledAccordionContent","AccordionContent","children","maxHeight","onScroll","shouldPreventBottomSpace","createElement","className","$maxHeight","$shouldPreventBottomSpace","displayName"],"sources":["../../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import React, { FC, ReactNode, UIEvent } from 'react';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight?: number;\n /**\n * Function that is executed when the element will be scrolled\n */\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n /**\n * Whether the bottom space should be removed.\n */\n shouldPreventBottomSpace?: boolean;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({\n children,\n maxHeight,\n onScroll,\n shouldPreventBottomSpace = false,\n}) => (\n <StyledAccordionContent\n className=\"beta-chayns-accordion-content chayns-scrollbar\"\n $maxHeight={maxHeight}\n onScroll={onScroll}\n $shouldPreventBottomSpace={shouldPreventBottomSpace}\n >\n {children}\n </StyledAccordionContent>\n);\n\nAccordionContent.displayName = 'AccordionContent';\n\nexport default AccordionContent;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAkC,OAAO;AACrD,SAASC,sBAAsB,QAAQ,2BAA2B;AAqBlE,MAAMC,gBAA2C,GAAGA,CAAC;EACjDC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,wBAAwB,GAAG;AAC/B,CAAC,kBACGN,KAAA,CAAAO,aAAA,CAACN,sBAAsB;EACnBO,SAAS,EAAC,gDAAgD;EAC1DC,UAAU,EAAEL,SAAU;EACtBC,QAAQ,EAAEA,QAAS;EACnBK,yBAAyB,EAAEJ;AAAyB,GAEnDH,QACmB,CAC3B;AAEDD,gBAAgB,CAACS,WAAW,GAAG,kBAAkB;AAEjD,eAAeT,gBAAgB","ignoreList":[]}
|
|
@@ -17,32 +17,5 @@ export const StyledAccordionContent = styled.div`
|
|
|
17
17
|
max-height: ${$maxHeight}px;
|
|
18
18
|
overflow-y: scroll;
|
|
19
19
|
`}
|
|
20
|
-
|
|
21
|
-
// Styles for custom scrollbar
|
|
22
|
-
${({
|
|
23
|
-
$browser,
|
|
24
|
-
theme
|
|
25
|
-
}) => $browser === 'firefox' ? css`
|
|
26
|
-
scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;
|
|
27
|
-
scrollbar-width: thin;
|
|
28
|
-
` : css`
|
|
29
|
-
&::-webkit-scrollbar {
|
|
30
|
-
width: 5px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&::-webkit-scrollbar-track {
|
|
34
|
-
background-color: transparent;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&::-webkit-scrollbar-button {
|
|
38
|
-
background-color: transparent;
|
|
39
|
-
height: 5px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&::-webkit-scrollbar-thumb {
|
|
43
|
-
background-color: rgba(${theme['text-rgb']}, 0.15);
|
|
44
|
-
border-radius: 20px;
|
|
45
|
-
}
|
|
46
|
-
`}
|
|
47
20
|
`;
|
|
48
21
|
//# sourceMappingURL=AccordionContent.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContent.styles.js","names":["styled","css","StyledAccordionContent","div","theme","text","$shouldPreventBottomSpace","$maxHeight"
|
|
1
|
+
{"version":3,"file":"AccordionContent.styles.js","names":["styled","css","StyledAccordionContent","div","theme","text","$shouldPreventBottomSpace","$maxHeight"],"sources":["../../../../../src/components/accordion/accordion-content/AccordionContent.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledAccordionContentProps = WithTheme<{\n $maxHeight?: number;\n $shouldPreventBottomSpace: boolean;\n}>;\n\nexport const StyledAccordionContent = styled.div<StyledAccordionContentProps>`\n color: ${({ theme }: StyledAccordionContentProps) => theme.text};\n padding: 0 9px 18px 26px;\n\n ${({ $shouldPreventBottomSpace }) =>\n $shouldPreventBottomSpace &&\n css`\n padding-bottom: 0;\n `}\n\n ${({ $maxHeight }) =>\n typeof $maxHeight === 'number' &&\n css`\n max-height: ${$maxHeight}px;\n overflow-y: scroll;\n `}\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAQ/C,OAAO,MAAMC,sBAAsB,GAAGF,MAAM,CAACG,GAAgC;AAC7E,aAAa,CAAC;EAAEC;AAAmC,CAAC,KAAKA,KAAK,CAACC,IAAI;AACnE;AACA;AACA,MAAM,CAAC;EAAEC;AAA0B,CAAC,KAC5BA,yBAAyB,IACzBL,GAAG;AACX;AACA,SAAS;AACT;AACA,MAAM,CAAC;EAAEM;AAAW,CAAC,KACb,OAAOA,UAAU,KAAK,QAAQ,IAC9BN,GAAG;AACX,0BAA0BM,UAAU;AACpC;AACA,SAAS;AACT,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useFunctions, useValues } from 'chayns-api';
|
|
2
2
|
import React, { forwardRef, Fragment, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { calculateMaxComboBoxItemWidth } from '../../utils/calculate';
|
|
4
4
|
import { useIsTouch } from '../../utils/environment';
|
|
@@ -9,11 +9,7 @@ import { StyledComboBox, StyledComboBoxBody, StyledComboBoxClearIconWrapper, Sty
|
|
|
9
9
|
import DropdownBodyWrapper from '../dropdown-body-wrapper/DropdownBodyWrapper';
|
|
10
10
|
import { DropdownDirection } from '../../types/dropdown';
|
|
11
11
|
import { useElementSize } from '../../hooks/element';
|
|
12
|
-
|
|
13
|
-
ComboBoxSize["NORMAL"] = "normal";
|
|
14
|
-
ComboBoxSize["SMALL"] = "small";
|
|
15
|
-
return ComboBoxSize;
|
|
16
|
-
}({});
|
|
12
|
+
import { ComboBoxSize } from './ComboBox.types';
|
|
17
13
|
const ComboBox = /*#__PURE__*/forwardRef(({
|
|
18
14
|
bodyWidth,
|
|
19
15
|
direction = DropdownDirection.RIGHT,
|
|
@@ -56,9 +52,6 @@ const ComboBox = /*#__PURE__*/forwardRef(({
|
|
|
56
52
|
const functions = useFunctions();
|
|
57
53
|
const values = useValues();
|
|
58
54
|
const isTouch = useIsTouch();
|
|
59
|
-
const {
|
|
60
|
-
browser
|
|
61
|
-
} = useDevice();
|
|
62
55
|
const areaProvider = useContext(AreaContext);
|
|
63
56
|
useEffect(() => {
|
|
64
57
|
if (shouldUseFullWidth && parentSize) {
|
|
@@ -128,7 +121,7 @@ const ComboBox = /*#__PURE__*/forwardRef(({
|
|
|
128
121
|
}
|
|
129
122
|
setInternalSelectedItem(itemToSelect);
|
|
130
123
|
handleClose();
|
|
131
|
-
}, [onSelect]);
|
|
124
|
+
}, [handleClose, onSelect]);
|
|
132
125
|
const handleClear = useCallback(event => {
|
|
133
126
|
event.preventDefault();
|
|
134
127
|
event.stopPropagation();
|
|
@@ -387,10 +380,10 @@ const ComboBox = /*#__PURE__*/forwardRef(({
|
|
|
387
380
|
$shouldUseCurrentItemWidth: shouldUseCurrentItemWidth,
|
|
388
381
|
$maxHeight: maxHeight,
|
|
389
382
|
$minWidth: bodyWidth ?? bodyMinWidth,
|
|
390
|
-
|
|
383
|
+
className: "chayns-scrollbar",
|
|
391
384
|
ref: contentRef,
|
|
392
385
|
tabIndex: 0
|
|
393
|
-
}, comboBoxGroups))), [minWidth, shouldUseFullWidth, shouldUseCurrentItemWidth, direction, handleHeaderClick, isAnimating, isTouch, size, shouldShowTransparentBackground, isDisabled, shouldChangeColor, shouldShowBigImage, prefix, prefixMinWidth, selectedItem, internalSelectedItem, placeholderImageUrl, shouldShowRoundPlaceholderImage, placeholderIcon, inputValue, onInputChange, handleInputBlur, handleInputFocus, placeholderText, shouldShowClearIcon, handleClear, shouldDisableActions, bodyWidth, contentHeight, handleClose, container, bodyMinWidth, maxHeight,
|
|
386
|
+
}, comboBoxGroups))), [minWidth, shouldUseFullWidth, shouldUseCurrentItemWidth, direction, handleHeaderClick, isAnimating, isTouch, size, shouldShowTransparentBackground, isDisabled, shouldChangeColor, shouldShowBigImage, prefix, prefixMinWidth, selectedItem, internalSelectedItem, placeholderImageUrl, shouldShowRoundPlaceholderImage, placeholderIcon, inputValue, onInputChange, handleInputBlur, handleInputFocus, placeholderText, shouldShowClearIcon, handleClear, shouldDisableActions, bodyWidth, contentHeight, shouldCaptureEvents, handleClose, container, bodyMinWidth, maxHeight, comboBoxGroups]);
|
|
394
387
|
});
|
|
395
388
|
ComboBox.displayName = 'ComboBox';
|
|
396
389
|
export default ComboBox;
|