@smwb/ui-solid 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/headless/source/components/base/animateHeight/animateHeight.jsx +177 -0
- package/dist/headless/source/components/base/animateHeight/animateHeight.jsx.map +1 -0
- package/dist/headless/source/components/base/animateHeight/index.js +6 -0
- package/dist/headless/source/components/base/animateHeight/index.js.map +7 -0
- package/dist/headless/source/components/base/icon/icon.jsx +60 -0
- package/dist/headless/source/components/base/icon/icon.jsx.map +1 -0
- package/dist/headless/source/components/base/icon/index.js +6 -0
- package/dist/headless/source/components/base/icon/index.js.map +7 -0
- package/dist/headless/source/components/base/ripple/index.js +6 -0
- package/dist/headless/source/components/base/ripple/index.js.map +7 -0
- package/dist/headless/source/components/base/ripple/ripple.jsx +63 -0
- package/dist/headless/source/components/base/ripple/ripple.jsx.map +1 -0
- package/dist/headless/source/components/clickAwayListener/clickAwayListener.jsx +73 -0
- package/dist/headless/source/components/clickAwayListener/clickAwayListener.jsx.map +1 -0
- package/dist/headless/source/components/clickAwayListener/index.js +6 -0
- package/dist/headless/source/components/clickAwayListener/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/accordion/accordion.jsx +82 -0
- package/dist/headless/source/components/dataDisplay/accordion/accordion.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/accordion/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/accordion/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/avatar/avatar.jsx +95 -0
- package/dist/headless/source/components/dataDisplay/avatar/avatar.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/avatar/index.js +7 -0
- package/dist/headless/source/components/dataDisplay/avatar/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/badge/badge.jsx +56 -0
- package/dist/headless/source/components/dataDisplay/badge/badge.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/badge/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/badge/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/card/card.jsx +54 -0
- package/dist/headless/source/components/dataDisplay/card/card.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/card/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/card/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/carousel/carousel.jsx +407 -0
- package/dist/headless/source/components/dataDisplay/carousel/carousel.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/carousel/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/carousel/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/carousel/utils.js +76 -0
- package/dist/headless/source/components/dataDisplay/carousel/utils.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chat/chat.jsx +155 -0
- package/dist/headless/source/components/dataDisplay/chat/chat.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatAttachmentImage.jsx +53 -0
- package/dist/headless/source/components/dataDisplay/chat/chatAttachmentImage.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatAttachments.jsx +35 -0
- package/dist/headless/source/components/dataDisplay/chat/chatAttachments.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatComposer.jsx +170 -0
- package/dist/headless/source/components/dataDisplay/chat/chatComposer.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatHeader.jsx +55 -0
- package/dist/headless/source/components/dataDisplay/chat/chatHeader.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatIconButton.jsx +38 -0
- package/dist/headless/source/components/dataDisplay/chat/chatIconButton.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatLayout.jsx +121 -0
- package/dist/headless/source/components/dataDisplay/chat/chatLayout.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageAvatar.jsx +19 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageAvatar.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageBubble.jsx +56 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageBubble.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageIncoming.jsx +21 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageIncoming.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageItem.jsx +56 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageItem.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageOutgoing.jsx +25 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageOutgoing.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageSkeleton.jsx +33 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageSkeleton.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageStatus.jsx +35 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageStatus.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageSystem.jsx +17 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessageSystem.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessages.jsx +63 -0
- package/dist/headless/source/components/dataDisplay/chat/chatMessages.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatOverlayLayout.jsx +60 -0
- package/dist/headless/source/components/dataDisplay/chat/chatOverlayLayout.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatShell.jsx +66 -0
- package/dist/headless/source/components/dataDisplay/chat/chatShell.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/index.js +82 -0
- package/dist/headless/source/components/dataDisplay/chat/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chat/types.js +25 -0
- package/dist/headless/source/components/dataDisplay/chat/types.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chat/useChatFileUpload.js +49 -0
- package/dist/headless/source/components/dataDisplay/chat/useChatFileUpload.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chat/useChatInfiniteScroll.js +27 -0
- package/dist/headless/source/components/dataDisplay/chat/useChatInfiniteScroll.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chat/useChatStickToBottom.js +54 -0
- package/dist/headless/source/components/dataDisplay/chat/useChatStickToBottom.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chat/utils.js +103 -0
- package/dist/headless/source/components/dataDisplay/chat/utils.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/chip/chip.jsx +119 -0
- package/dist/headless/source/components/dataDisplay/chip/chip.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/chip/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/chip/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/expansionPanel/expansionPanel.jsx +164 -0
- package/dist/headless/source/components/dataDisplay/expansionPanel/expansionPanel.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/expansionPanel/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/expansionPanel/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesList.jsx +25 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesList.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesList.types.js +1 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesList.types.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesListContext.js +8 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesListContext.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx +55 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx +30 -0
- package/dist/headless/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/imagesList/index.js +12 -0
- package/dist/headless/source/components/dataDisplay/imagesList/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/list/index.js +8 -0
- package/dist/headless/source/components/dataDisplay/list/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/list/list.jsx +24 -0
- package/dist/headless/source/components/dataDisplay/list/list.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/list/listItem.jsx +53 -0
- package/dist/headless/source/components/dataDisplay/list/listItem.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/index.js +17 -0
- package/dist/headless/source/components/dataDisplay/table/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/table/table.jsx +46 -0
- package/dist/headless/source/components/dataDisplay/table/table.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/tableBody.jsx +15 -0
- package/dist/headless/source/components/dataDisplay/table/tableBody.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/tableCell.jsx +16 -0
- package/dist/headless/source/components/dataDisplay/table/tableCell.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/tableHead.jsx +15 -0
- package/dist/headless/source/components/dataDisplay/table/tableHead.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/tableHeadCell.jsx +53 -0
- package/dist/headless/source/components/dataDisplay/table/tableHeadCell.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/tablePagination/tablePagination.jsx +47 -0
- package/dist/headless/source/components/dataDisplay/table/tablePagination/tablePagination.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/table/tableRow.jsx +25 -0
- package/dist/headless/source/components/dataDisplay/table/tableRow.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/treeView/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/treeView/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/treeView/treeView.jsx +172 -0
- package/dist/headless/source/components/dataDisplay/treeView/treeView.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/typography/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/typography/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/typography/typography.jsx +57 -0
- package/dist/headless/source/components/dataDisplay/typography/typography.jsx.map +1 -0
- package/dist/headless/source/components/feedBack/message/index.js +7 -0
- package/dist/headless/source/components/feedBack/message/index.js.map +7 -0
- package/dist/headless/source/components/feedBack/message/message.jsx +51 -0
- package/dist/headless/source/components/feedBack/message/message.jsx.map +1 -0
- package/dist/headless/source/components/feedBack/modal/index.js +6 -0
- package/dist/headless/source/components/feedBack/modal/index.js.map +7 -0
- package/dist/headless/source/components/feedBack/modal/modal.jsx +101 -0
- package/dist/headless/source/components/feedBack/modal/modal.jsx.map +1 -0
- package/dist/headless/source/components/feedBack/progressIndicator/index.js +7 -0
- package/dist/headless/source/components/feedBack/progressIndicator/index.js.map +7 -0
- package/dist/headless/source/components/feedBack/progressIndicator/progressIndicator.jsx +68 -0
- package/dist/headless/source/components/feedBack/progressIndicator/progressIndicator.jsx.map +1 -0
- package/dist/headless/source/components/feedBack/skeleton/index.js +6 -0
- package/dist/headless/source/components/feedBack/skeleton/index.js.map +7 -0
- package/dist/headless/source/components/feedBack/skeleton/skeleton.jsx +65 -0
- package/dist/headless/source/components/feedBack/skeleton/skeleton.jsx.map +1 -0
- package/dist/headless/source/components/feedBack/snackbar/index.js +10 -0
- package/dist/headless/source/components/feedBack/snackbar/index.js.map +7 -0
- package/dist/headless/source/components/feedBack/snackbar/snackbar.jsx +196 -0
- package/dist/headless/source/components/feedBack/snackbar/snackbar.jsx.map +1 -0
- package/dist/headless/source/components/feedBack/snackbar/useSnackbarsPortal.js +21 -0
- package/dist/headless/source/components/feedBack/snackbar/useSnackbarsPortal.js.map +7 -0
- package/dist/headless/source/components/feedBack/tooltip/index.js +6 -0
- package/dist/headless/source/components/feedBack/tooltip/index.js.map +7 -0
- package/dist/headless/source/components/feedBack/tooltip/tooltip.jsx +92 -0
- package/dist/headless/source/components/feedBack/tooltip/tooltip.jsx.map +1 -0
- package/dist/headless/source/components/inputs/button/button.jsx +101 -0
- package/dist/headless/source/components/inputs/button/button.jsx.map +1 -0
- package/dist/headless/source/components/inputs/button/index.js +6 -0
- package/dist/headless/source/components/inputs/button/index.js.map +7 -0
- package/dist/headless/source/components/inputs/buttonGroups/buttonGroup.jsx +72 -0
- package/dist/headless/source/components/inputs/buttonGroups/buttonGroup.jsx.map +1 -0
- package/dist/headless/source/components/inputs/buttonGroups/buttonGroupContext.js +8 -0
- package/dist/headless/source/components/inputs/buttonGroups/buttonGroupContext.js.map +7 -0
- package/dist/headless/source/components/inputs/buttonGroups/index.js +9 -0
- package/dist/headless/source/components/inputs/buttonGroups/index.js.map +7 -0
- package/dist/headless/source/components/inputs/checkbox/checkbox.jsx +86 -0
- package/dist/headless/source/components/inputs/checkbox/checkbox.jsx.map +1 -0
- package/dist/headless/source/components/inputs/checkbox/index.js +6 -0
- package/dist/headless/source/components/inputs/checkbox/index.js.map +7 -0
- package/dist/headless/source/components/inputs/datePicker/dataPickerDays.jsx +87 -0
- package/dist/headless/source/components/inputs/datePicker/dataPickerDays.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/dataPickerHeader.jsx +40 -0
- package/dist/headless/source/components/inputs/datePicker/dataPickerHeader.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/dataPickerInput.jsx +57 -0
- package/dist/headless/source/components/inputs/datePicker/dataPickerInput.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/dateFormat.js +89 -0
- package/dist/headless/source/components/inputs/datePicker/dateFormat.js.map +7 -0
- package/dist/headless/source/components/inputs/datePicker/datePicker.jsx +241 -0
- package/dist/headless/source/components/inputs/datePicker/datePicker.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerActionLabel.jsx +48 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerActionLabel.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerDay.jsx +52 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerDay.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerIconButton.jsx +36 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerIconButton.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerList.jsx +44 -0
- package/dist/headless/source/components/inputs/datePicker/datePickerList.jsx.map +1 -0
- package/dist/headless/source/components/inputs/datePicker/dateUtils.js +232 -0
- package/dist/headless/source/components/inputs/datePicker/dateUtils.js.map +7 -0
- package/dist/headless/source/components/inputs/datePicker/index.js +24 -0
- package/dist/headless/source/components/inputs/datePicker/index.js.map +7 -0
- package/dist/headless/source/components/inputs/datePicker/openView.js +10 -0
- package/dist/headless/source/components/inputs/datePicker/openView.js.map +7 -0
- package/dist/headless/source/components/inputs/datePicker/useDateInput.js +56 -0
- package/dist/headless/source/components/inputs/datePicker/useDateInput.js.map +7 -0
- package/dist/headless/source/components/inputs/dateTimePicker/dateTimeFormat.js +119 -0
- package/dist/headless/source/components/inputs/dateTimePicker/dateTimeFormat.js.map +7 -0
- package/dist/headless/source/components/inputs/dateTimePicker/dateTimePicker.jsx +200 -0
- package/dist/headless/source/components/inputs/dateTimePicker/dateTimePicker.jsx.map +1 -0
- package/dist/headless/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx +57 -0
- package/dist/headless/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx.map +1 -0
- package/dist/headless/source/components/inputs/dateTimePicker/index.js +20 -0
- package/dist/headless/source/components/inputs/dateTimePicker/index.js.map +7 -0
- package/dist/headless/source/components/inputs/dateTimePicker/useDateTimeInput.js +85 -0
- package/dist/headless/source/components/inputs/dateTimePicker/useDateTimeInput.js.map +7 -0
- package/dist/headless/source/components/inputs/fileDrop/countPreview.jsx +17 -0
- package/dist/headless/source/components/inputs/fileDrop/countPreview.jsx.map +1 -0
- package/dist/headless/source/components/inputs/fileDrop/fileDrop.jsx +72 -0
- package/dist/headless/source/components/inputs/fileDrop/fileDrop.jsx.map +1 -0
- package/dist/headless/source/components/inputs/fileDrop/index.js +14 -0
- package/dist/headless/source/components/inputs/fileDrop/index.js.map +7 -0
- package/dist/headless/source/components/inputs/fileDrop/preview.jsx +41 -0
- package/dist/headless/source/components/inputs/fileDrop/preview.jsx.map +1 -0
- package/dist/headless/source/components/inputs/fileDrop/previewWrapper.jsx +27 -0
- package/dist/headless/source/components/inputs/fileDrop/previewWrapper.jsx.map +1 -0
- package/dist/headless/source/components/inputs/fileDrop/utils.js +7 -0
- package/dist/headless/source/components/inputs/fileDrop/utils.js.map +7 -0
- package/dist/headless/source/components/inputs/fileInput/fileInput.jsx +46 -0
- package/dist/headless/source/components/inputs/fileInput/fileInput.jsx.map +1 -0
- package/dist/headless/source/components/inputs/fileInput/index.js +6 -0
- package/dist/headless/source/components/inputs/fileInput/index.js.map +7 -0
- package/dist/headless/source/components/inputs/floatingButton/floatingButton.jsx +30 -0
- package/dist/headless/source/components/inputs/floatingButton/floatingButton.jsx.map +1 -0
- package/dist/headless/source/components/inputs/floatingButton/index.js +6 -0
- package/dist/headless/source/components/inputs/floatingButton/index.js.map +7 -0
- package/dist/headless/source/components/inputs/radioButton/index.js +6 -0
- package/dist/headless/source/components/inputs/radioButton/index.js.map +7 -0
- package/dist/headless/source/components/inputs/radioButton/radioButton.jsx +75 -0
- package/dist/headless/source/components/inputs/radioButton/radioButton.jsx.map +1 -0
- package/dist/headless/source/components/inputs/rating/index.js +6 -0
- package/dist/headless/source/components/inputs/rating/index.js.map +7 -0
- package/dist/headless/source/components/inputs/rating/rating.jsx +124 -0
- package/dist/headless/source/components/inputs/rating/rating.jsx.map +1 -0
- package/dist/headless/source/components/inputs/selectField/dropdownMenu.jsx +141 -0
- package/dist/headless/source/components/inputs/selectField/dropdownMenu.jsx.map +1 -0
- package/dist/headless/source/components/inputs/selectField/index.js +8 -0
- package/dist/headless/source/components/inputs/selectField/index.js.map +7 -0
- package/dist/headless/source/components/inputs/selectField/selectField.jsx +272 -0
- package/dist/headless/source/components/inputs/selectField/selectField.jsx.map +1 -0
- package/dist/headless/source/components/inputs/slider/index.js +6 -0
- package/dist/headless/source/components/inputs/slider/index.js.map +7 -0
- package/dist/headless/source/components/inputs/slider/slider.jsx +404 -0
- package/dist/headless/source/components/inputs/slider/slider.jsx.map +1 -0
- package/dist/headless/source/components/inputs/slider/utils.js +49 -0
- package/dist/headless/source/components/inputs/slider/utils.js.map +7 -0
- package/dist/headless/source/components/inputs/textField/index.js +9 -0
- package/dist/headless/source/components/inputs/textField/index.js.map +7 -0
- package/dist/headless/source/components/inputs/textField/textField.jsx +137 -0
- package/dist/headless/source/components/inputs/textField/textField.jsx.map +1 -0
- package/dist/headless/source/components/inputs/textField/textFieldAdornment.jsx +31 -0
- package/dist/headless/source/components/inputs/textField/textFieldAdornment.jsx.map +1 -0
- package/dist/headless/source/components/inputs/textField/textFieldWrapper.jsx +83 -0
- package/dist/headless/source/components/inputs/textField/textFieldWrapper.jsx.map +1 -0
- package/dist/headless/source/components/inputs/textField/types.js +1 -0
- package/dist/headless/source/components/inputs/textField/types.js.map +7 -0
- package/dist/headless/source/components/inputs/textField/utils.js +13 -0
- package/dist/headless/source/components/inputs/textField/utils.js.map +7 -0
- package/dist/headless/source/components/inputs/timePicker/index.js +14 -0
- package/dist/headless/source/components/inputs/timePicker/index.js.map +7 -0
- package/dist/headless/source/components/inputs/timePicker/timeFormat.js +78 -0
- package/dist/headless/source/components/inputs/timePicker/timeFormat.js.map +7 -0
- package/dist/headless/source/components/inputs/timePicker/timePicker.jsx +114 -0
- package/dist/headless/source/components/inputs/timePicker/timePicker.jsx.map +1 -0
- package/dist/headless/source/components/inputs/timePicker/timePickerColumns.jsx +42 -0
- package/dist/headless/source/components/inputs/timePicker/timePickerColumns.jsx.map +1 -0
- package/dist/headless/source/components/inputs/timePicker/timePickerInput.jsx +57 -0
- package/dist/headless/source/components/inputs/timePicker/timePickerInput.jsx.map +1 -0
- package/dist/headless/source/components/inputs/timePicker/timePickerList.jsx +36 -0
- package/dist/headless/source/components/inputs/timePicker/timePickerList.jsx.map +1 -0
- package/dist/headless/source/components/inputs/timePicker/timeUtils.js +96 -0
- package/dist/headless/source/components/inputs/timePicker/timeUtils.js.map +7 -0
- package/dist/headless/source/components/inputs/timePicker/useTimeInput.js +57 -0
- package/dist/headless/source/components/inputs/timePicker/useTimeInput.js.map +7 -0
- package/dist/headless/source/components/inputs/toggle/index.js +6 -0
- package/dist/headless/source/components/inputs/toggle/index.js.map +7 -0
- package/dist/headless/source/components/inputs/toggle/toggle.jsx +77 -0
- package/dist/headless/source/components/inputs/toggle/toggle.jsx.map +1 -0
- package/dist/headless/source/components/layout/appLayout/appLayout.jsx +101 -0
- package/dist/headless/source/components/layout/appLayout/appLayout.jsx.map +1 -0
- package/dist/headless/source/components/layout/appLayout/index.js +6 -0
- package/dist/headless/source/components/layout/appLayout/index.js.map +7 -0
- package/dist/headless/source/components/layout/divider/divider.jsx +68 -0
- package/dist/headless/source/components/layout/divider/divider.jsx.map +1 -0
- package/dist/headless/source/components/layout/divider/index.js +6 -0
- package/dist/headless/source/components/layout/divider/index.js.map +7 -0
- package/dist/headless/source/components/layout/grid/grid.jsx +112 -0
- package/dist/headless/source/components/layout/grid/grid.jsx.map +1 -0
- package/dist/headless/source/components/layout/grid/index.js +8 -0
- package/dist/headless/source/components/layout/grid/index.js.map +7 -0
- package/dist/headless/source/components/layout/page/index.js +6 -0
- package/dist/headless/source/components/layout/page/index.js.map +7 -0
- package/dist/headless/source/components/layout/page/page.jsx +28 -0
- package/dist/headless/source/components/layout/page/page.jsx.map +1 -0
- package/dist/headless/source/components/layout/pageHeader/index.js +6 -0
- package/dist/headless/source/components/layout/pageHeader/index.js.map +7 -0
- package/dist/headless/source/components/layout/pageHeader/pageHeader.jsx +52 -0
- package/dist/headless/source/components/layout/pageHeader/pageHeader.jsx.map +1 -0
- package/dist/headless/source/components/layout/screenDivider/index.js +6 -0
- package/dist/headless/source/components/layout/screenDivider/index.js.map +7 -0
- package/dist/headless/source/components/layout/screenDivider/screenDivider.jsx +129 -0
- package/dist/headless/source/components/layout/screenDivider/screenDivider.jsx.map +1 -0
- package/dist/headless/source/components/layout/sheet/index.js +6 -0
- package/dist/headless/source/components/layout/sheet/index.js.map +7 -0
- package/dist/headless/source/components/layout/sheet/sheet.jsx +261 -0
- package/dist/headless/source/components/layout/sheet/sheet.jsx.map +1 -0
- package/dist/headless/source/components/layout/stack/index.js +6 -0
- package/dist/headless/source/components/layout/stack/index.js.map +7 -0
- package/dist/headless/source/components/layout/stack/stack.jsx +53 -0
- package/dist/headless/source/components/layout/stack/stack.jsx.map +1 -0
- package/dist/headless/source/components/navigation/appBar/appBar.jsx +65 -0
- package/dist/headless/source/components/navigation/appBar/appBar.jsx.map +1 -0
- package/dist/headless/source/components/navigation/appBar/index.js +6 -0
- package/dist/headless/source/components/navigation/appBar/index.js.map +7 -0
- package/dist/headless/source/components/navigation/bottomBar/bottomBar.jsx +134 -0
- package/dist/headless/source/components/navigation/bottomBar/bottomBar.jsx.map +1 -0
- package/dist/headless/source/components/navigation/bottomBar/index.js +6 -0
- package/dist/headless/source/components/navigation/bottomBar/index.js.map +7 -0
- package/dist/headless/source/components/navigation/breadcrumbs/breadcrumbs.jsx +62 -0
- package/dist/headless/source/components/navigation/breadcrumbs/breadcrumbs.jsx.map +1 -0
- package/dist/headless/source/components/navigation/breadcrumbs/index.js +6 -0
- package/dist/headless/source/components/navigation/breadcrumbs/index.js.map +7 -0
- package/dist/headless/source/components/navigation/menu/index.js +23 -0
- package/dist/headless/source/components/navigation/menu/index.js.map +7 -0
- package/dist/headless/source/components/navigation/menu/menu.jsx +27 -0
- package/dist/headless/source/components/navigation/menu/menu.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuComponent.jsx +18 -0
- package/dist/headless/source/components/navigation/menu/menuComponent.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuContext.js +14 -0
- package/dist/headless/source/components/navigation/menu/menuContext.js.map +7 -0
- package/dist/headless/source/components/navigation/menu/menuDivider.jsx +19 -0
- package/dist/headless/source/components/navigation/menu/menuDivider.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuFloating.jsx +84 -0
- package/dist/headless/source/components/navigation/menu/menuFloating.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuItem.jsx +68 -0
- package/dist/headless/source/components/navigation/menu/menuItem.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuItemIcon.jsx +25 -0
- package/dist/headless/source/components/navigation/menu/menuItemIcon.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuItemText.jsx +25 -0
- package/dist/headless/source/components/navigation/menu/menuItemText.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuList.jsx +46 -0
- package/dist/headless/source/components/navigation/menu/menuList.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuSubmenu.jsx +86 -0
- package/dist/headless/source/components/navigation/menu/menuSubmenu.jsx.map +1 -0
- package/dist/headless/source/components/navigation/pagination/index.js +6 -0
- package/dist/headless/source/components/navigation/pagination/index.js.map +7 -0
- package/dist/headless/source/components/navigation/pagination/pagination.jsx +142 -0
- package/dist/headless/source/components/navigation/pagination/pagination.jsx.map +1 -0
- package/dist/headless/source/components/navigation/sidebar/index.js +6 -0
- package/dist/headless/source/components/navigation/sidebar/index.js.map +7 -0
- package/dist/headless/source/components/navigation/sidebar/sidebar.jsx +114 -0
- package/dist/headless/source/components/navigation/sidebar/sidebar.jsx.map +1 -0
- package/dist/headless/source/components/navigation/stepper/index.js +6 -0
- package/dist/headless/source/components/navigation/stepper/index.js.map +7 -0
- package/dist/headless/source/components/navigation/stepper/stepper.jsx +82 -0
- package/dist/headless/source/components/navigation/stepper/stepper.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/index.js +10 -0
- package/dist/headless/source/components/navigation/tabs/index.js.map +7 -0
- package/dist/headless/source/components/navigation/tabs/tab/tab.jsx +75 -0
- package/dist/headless/source/components/navigation/tabs/tab/tab.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/tabs.jsx +141 -0
- package/dist/headless/source/components/navigation/tabs/tabs.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/tabsContext.js +8 -0
- package/dist/headless/source/components/navigation/tabs/tabsContext.js.map +7 -0
- package/dist/headless/source/index.js +309 -0
- package/dist/headless/source/index.js.map +7 -0
- package/dist/headless/source/primitives/callHandler.js +12 -0
- package/dist/headless/source/primitives/callHandler.js.map +7 -0
- package/dist/headless/source/primitives/createControllableState.js +19 -0
- package/dist/headless/source/primitives/createControllableState.js.map +7 -0
- package/dist/headless/source/primitives/createCssTransition.js +59 -0
- package/dist/headless/source/primitives/createCssTransition.js.map +7 -0
- package/dist/headless/source/primitives/createDropzone.js +46 -0
- package/dist/headless/source/primitives/createDropzone.js.map +7 -0
- package/dist/headless/source/primitives/createFloating.js +48 -0
- package/dist/headless/source/primitives/createFloating.js.map +7 -0
- package/dist/headless/source/primitives/createFocusTrap.js +50 -0
- package/dist/headless/source/primitives/createFocusTrap.js.map +7 -0
- package/dist/headless/source/primitives/createId.js +9 -0
- package/dist/headless/source/primitives/createId.js.map +7 -0
- package/dist/headless/source/primitives/createMaskedInput.js +35 -0
- package/dist/headless/source/primitives/createMaskedInput.js.map +7 -0
- package/dist/headless/source/primitives/createTheme.js +51 -0
- package/dist/headless/source/primitives/createTheme.js.map +7 -0
- package/dist/headless/source/primitives/createVirtualList.js +19 -0
- package/dist/headless/source/primitives/createVirtualList.js.map +7 -0
- package/dist/headless/source/primitives/mergeRefs.js +13 -0
- package/dist/headless/source/primitives/mergeRefs.js.map +7 -0
- package/dist/headless/source/ssr-published.ssr-spec.jsx +35 -0
- package/dist/headless/source/ssr-published.ssr-spec.jsx.map +1 -0
- package/dist/headless/source/ssr.ssr-spec.jsx +113 -0
- package/dist/headless/source/ssr.ssr-spec.jsx.map +1 -0
- package/dist/headless/source/utils/animate.js +35 -0
- package/dist/headless/source/utils/animate.js.map +7 -0
- package/dist/headless/source/utils/debounce.js +23 -0
- package/dist/headless/source/utils/debounce.js.map +7 -0
- package/dist/headless/source/utils/floating.js +42 -0
- package/dist/headless/source/utils/floating.js.map +7 -0
- package/dist/headless/source/utils/throttle.js +41 -0
- package/dist/headless/source/utils/throttle.js.map +7 -0
- package/dist/source/components/base/animateHeight/animateHeight.jsx +177 -0
- package/dist/source/components/base/animateHeight/animateHeight.jsx.map +1 -0
- package/dist/source/components/base/animateHeight/index.js +6 -0
- package/dist/source/components/base/animateHeight/index.js.map +7 -0
- package/dist/source/components/base/icon/icon.jsx +61 -0
- package/dist/source/components/base/icon/icon.jsx.map +1 -0
- package/dist/source/components/base/icon/index.js +6 -0
- package/dist/source/components/base/icon/index.js.map +7 -0
- package/dist/source/components/base/ripple/index.js +6 -0
- package/dist/source/components/base/ripple/index.js.map +7 -0
- package/dist/source/components/base/ripple/ripple.jsx +64 -0
- package/dist/source/components/base/ripple/ripple.jsx.map +1 -0
- package/dist/source/components/clickAwayListener/clickAwayListener.jsx +73 -0
- package/dist/source/components/clickAwayListener/clickAwayListener.jsx.map +1 -0
- package/dist/source/components/clickAwayListener/index.js +6 -0
- package/dist/source/components/clickAwayListener/index.js.map +7 -0
- package/dist/source/components/dataDisplay/accordion/accordion.jsx +83 -0
- package/dist/source/components/dataDisplay/accordion/accordion.jsx.map +1 -0
- package/dist/source/components/dataDisplay/accordion/index.js +6 -0
- package/dist/source/components/dataDisplay/accordion/index.js.map +7 -0
- package/dist/source/components/dataDisplay/avatar/avatar.jsx +96 -0
- package/dist/source/components/dataDisplay/avatar/avatar.jsx.map +1 -0
- package/dist/source/components/dataDisplay/avatar/index.js +7 -0
- package/dist/source/components/dataDisplay/avatar/index.js.map +7 -0
- package/dist/source/components/dataDisplay/badge/badge.jsx +57 -0
- package/dist/source/components/dataDisplay/badge/badge.jsx.map +1 -0
- package/dist/source/components/dataDisplay/badge/index.js +6 -0
- package/dist/source/components/dataDisplay/badge/index.js.map +7 -0
- package/dist/source/components/dataDisplay/card/card.jsx +55 -0
- package/dist/source/components/dataDisplay/card/card.jsx.map +1 -0
- package/dist/source/components/dataDisplay/card/index.js +6 -0
- package/dist/source/components/dataDisplay/card/index.js.map +7 -0
- package/dist/source/components/dataDisplay/carousel/carousel.jsx +408 -0
- package/dist/source/components/dataDisplay/carousel/carousel.jsx.map +1 -0
- package/dist/source/components/dataDisplay/carousel/index.js +6 -0
- package/dist/source/components/dataDisplay/carousel/index.js.map +7 -0
- package/dist/source/components/dataDisplay/carousel/utils.js +76 -0
- package/dist/source/components/dataDisplay/carousel/utils.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/chat.jsx +156 -0
- package/dist/source/components/dataDisplay/chat/chat.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatAttachmentImage.jsx +53 -0
- package/dist/source/components/dataDisplay/chat/chatAttachmentImage.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatAttachments.jsx +35 -0
- package/dist/source/components/dataDisplay/chat/chatAttachments.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatComposer.jsx +170 -0
- package/dist/source/components/dataDisplay/chat/chatComposer.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatHeader.jsx +55 -0
- package/dist/source/components/dataDisplay/chat/chatHeader.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatIconButton.jsx +38 -0
- package/dist/source/components/dataDisplay/chat/chatIconButton.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatLayout.jsx +121 -0
- package/dist/source/components/dataDisplay/chat/chatLayout.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageAvatar.jsx +19 -0
- package/dist/source/components/dataDisplay/chat/chatMessageAvatar.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageBubble.jsx +56 -0
- package/dist/source/components/dataDisplay/chat/chatMessageBubble.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageIncoming.jsx +21 -0
- package/dist/source/components/dataDisplay/chat/chatMessageIncoming.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageItem.jsx +56 -0
- package/dist/source/components/dataDisplay/chat/chatMessageItem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageOutgoing.jsx +25 -0
- package/dist/source/components/dataDisplay/chat/chatMessageOutgoing.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSkeleton.jsx +33 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSkeleton.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageStatus.jsx +35 -0
- package/dist/source/components/dataDisplay/chat/chatMessageStatus.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSystem.jsx +17 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSystem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessages.jsx +63 -0
- package/dist/source/components/dataDisplay/chat/chatMessages.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatOverlayLayout.jsx +60 -0
- package/dist/source/components/dataDisplay/chat/chatOverlayLayout.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatShell.jsx +66 -0
- package/dist/source/components/dataDisplay/chat/chatShell.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/index.js +82 -0
- package/dist/source/components/dataDisplay/chat/index.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/types.js +25 -0
- package/dist/source/components/dataDisplay/chat/types.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/useChatFileUpload.js +49 -0
- package/dist/source/components/dataDisplay/chat/useChatFileUpload.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/useChatInfiniteScroll.js +27 -0
- package/dist/source/components/dataDisplay/chat/useChatInfiniteScroll.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/useChatStickToBottom.js +54 -0
- package/dist/source/components/dataDisplay/chat/useChatStickToBottom.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/utils.js +103 -0
- package/dist/source/components/dataDisplay/chat/utils.js.map +7 -0
- package/dist/source/components/dataDisplay/chip/chip.jsx +120 -0
- package/dist/source/components/dataDisplay/chip/chip.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chip/index.js +6 -0
- package/dist/source/components/dataDisplay/chip/index.js.map +7 -0
- package/dist/source/components/dataDisplay/expansionPanel/expansionPanel.jsx +165 -0
- package/dist/source/components/dataDisplay/expansionPanel/expansionPanel.jsx.map +1 -0
- package/dist/source/components/dataDisplay/expansionPanel/index.js +6 -0
- package/dist/source/components/dataDisplay/expansionPanel/index.js.map +7 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.jsx +26 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.jsx.map +1 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.types.js +1 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.types.js.map +7 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListContext.js +8 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListContext.js.map +7 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx +56 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx +30 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx.map +1 -0
- package/dist/source/components/dataDisplay/imagesList/index.js +12 -0
- package/dist/source/components/dataDisplay/imagesList/index.js.map +7 -0
- package/dist/source/components/dataDisplay/list/index.js +8 -0
- package/dist/source/components/dataDisplay/list/index.js.map +7 -0
- package/dist/source/components/dataDisplay/list/list.jsx +25 -0
- package/dist/source/components/dataDisplay/list/list.jsx.map +1 -0
- package/dist/source/components/dataDisplay/list/listItem.jsx +53 -0
- package/dist/source/components/dataDisplay/list/listItem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/index.js +17 -0
- package/dist/source/components/dataDisplay/table/index.js.map +7 -0
- package/dist/source/components/dataDisplay/table/table.jsx +47 -0
- package/dist/source/components/dataDisplay/table/table.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableBody.jsx +15 -0
- package/dist/source/components/dataDisplay/table/tableBody.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableCell.jsx +16 -0
- package/dist/source/components/dataDisplay/table/tableCell.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableHead.jsx +15 -0
- package/dist/source/components/dataDisplay/table/tableHead.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableHeadCell.jsx +53 -0
- package/dist/source/components/dataDisplay/table/tableHeadCell.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tablePagination/tablePagination.jsx +48 -0
- package/dist/source/components/dataDisplay/table/tablePagination/tablePagination.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableRow.jsx +25 -0
- package/dist/source/components/dataDisplay/table/tableRow.jsx.map +1 -0
- package/dist/source/components/dataDisplay/treeView/index.js +6 -0
- package/dist/source/components/dataDisplay/treeView/index.js.map +7 -0
- package/dist/source/components/dataDisplay/treeView/treeView.jsx +173 -0
- package/dist/source/components/dataDisplay/treeView/treeView.jsx.map +1 -0
- package/dist/source/components/dataDisplay/typography/index.js +6 -0
- package/dist/source/components/dataDisplay/typography/index.js.map +7 -0
- package/dist/source/components/dataDisplay/typography/typography.jsx +58 -0
- package/dist/source/components/dataDisplay/typography/typography.jsx.map +1 -0
- package/dist/source/components/feedBack/message/index.js +7 -0
- package/dist/source/components/feedBack/message/index.js.map +7 -0
- package/dist/source/components/feedBack/message/message.jsx +52 -0
- package/dist/source/components/feedBack/message/message.jsx.map +1 -0
- package/dist/source/components/feedBack/modal/index.js +6 -0
- package/dist/source/components/feedBack/modal/index.js.map +7 -0
- package/dist/source/components/feedBack/modal/modal.jsx +102 -0
- package/dist/source/components/feedBack/modal/modal.jsx.map +1 -0
- package/dist/source/components/feedBack/progressIndicator/index.js +7 -0
- package/dist/source/components/feedBack/progressIndicator/index.js.map +7 -0
- package/dist/source/components/feedBack/progressIndicator/progressIndicator.jsx +69 -0
- package/dist/source/components/feedBack/progressIndicator/progressIndicator.jsx.map +1 -0
- package/dist/source/components/feedBack/skeleton/index.js +6 -0
- package/dist/source/components/feedBack/skeleton/index.js.map +7 -0
- package/dist/source/components/feedBack/skeleton/skeleton.jsx +66 -0
- package/dist/source/components/feedBack/skeleton/skeleton.jsx.map +1 -0
- package/dist/source/components/feedBack/snackbar/index.js +10 -0
- package/dist/source/components/feedBack/snackbar/index.js.map +7 -0
- package/dist/source/components/feedBack/snackbar/snackbar.jsx +197 -0
- package/dist/source/components/feedBack/snackbar/snackbar.jsx.map +1 -0
- package/dist/source/components/feedBack/snackbar/useSnackbarsPortal.js +21 -0
- package/dist/source/components/feedBack/snackbar/useSnackbarsPortal.js.map +7 -0
- package/dist/source/components/feedBack/tooltip/index.js +6 -0
- package/dist/source/components/feedBack/tooltip/index.js.map +7 -0
- package/dist/source/components/feedBack/tooltip/tooltip.jsx +93 -0
- package/dist/source/components/feedBack/tooltip/tooltip.jsx.map +1 -0
- package/dist/source/components/inputs/button/button.jsx +102 -0
- package/dist/source/components/inputs/button/button.jsx.map +1 -0
- package/dist/source/components/inputs/button/index.js +6 -0
- package/dist/source/components/inputs/button/index.js.map +7 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroup.jsx +73 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroup.jsx.map +1 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroupContext.js +8 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroupContext.js.map +7 -0
- package/dist/source/components/inputs/buttonGroups/index.js +9 -0
- package/dist/source/components/inputs/buttonGroups/index.js.map +7 -0
- package/dist/source/components/inputs/checkbox/checkbox.jsx +87 -0
- package/dist/source/components/inputs/checkbox/checkbox.jsx.map +1 -0
- package/dist/source/components/inputs/checkbox/index.js +6 -0
- package/dist/source/components/inputs/checkbox/index.js.map +7 -0
- package/dist/source/components/inputs/datePicker/dataPickerDays.jsx +87 -0
- package/dist/source/components/inputs/datePicker/dataPickerDays.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dataPickerHeader.jsx +40 -0
- package/dist/source/components/inputs/datePicker/dataPickerHeader.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dataPickerInput.jsx +57 -0
- package/dist/source/components/inputs/datePicker/dataPickerInput.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dateFormat.js +89 -0
- package/dist/source/components/inputs/datePicker/dateFormat.js.map +7 -0
- package/dist/source/components/inputs/datePicker/datePicker.jsx +242 -0
- package/dist/source/components/inputs/datePicker/datePicker.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerActionLabel.jsx +48 -0
- package/dist/source/components/inputs/datePicker/datePickerActionLabel.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerDay.jsx +52 -0
- package/dist/source/components/inputs/datePicker/datePickerDay.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerIconButton.jsx +36 -0
- package/dist/source/components/inputs/datePicker/datePickerIconButton.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerList.jsx +44 -0
- package/dist/source/components/inputs/datePicker/datePickerList.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dateUtils.js +232 -0
- package/dist/source/components/inputs/datePicker/dateUtils.js.map +7 -0
- package/dist/source/components/inputs/datePicker/index.js +24 -0
- package/dist/source/components/inputs/datePicker/index.js.map +7 -0
- package/dist/source/components/inputs/datePicker/openView.js +10 -0
- package/dist/source/components/inputs/datePicker/openView.js.map +7 -0
- package/dist/source/components/inputs/datePicker/useDateInput.js +56 -0
- package/dist/source/components/inputs/datePicker/useDateInput.js.map +7 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimeFormat.js +119 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimeFormat.js.map +7 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePicker.jsx +200 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePicker.jsx.map +1 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx +57 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx.map +1 -0
- package/dist/source/components/inputs/dateTimePicker/index.js +20 -0
- package/dist/source/components/inputs/dateTimePicker/index.js.map +7 -0
- package/dist/source/components/inputs/dateTimePicker/useDateTimeInput.js +85 -0
- package/dist/source/components/inputs/dateTimePicker/useDateTimeInput.js.map +7 -0
- package/dist/source/components/inputs/fileDrop/countPreview.jsx +17 -0
- package/dist/source/components/inputs/fileDrop/countPreview.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/fileDrop.jsx +73 -0
- package/dist/source/components/inputs/fileDrop/fileDrop.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/index.js +14 -0
- package/dist/source/components/inputs/fileDrop/index.js.map +7 -0
- package/dist/source/components/inputs/fileDrop/preview.jsx +41 -0
- package/dist/source/components/inputs/fileDrop/preview.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/previewWrapper.jsx +27 -0
- package/dist/source/components/inputs/fileDrop/previewWrapper.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/utils.js +7 -0
- package/dist/source/components/inputs/fileDrop/utils.js.map +7 -0
- package/dist/source/components/inputs/fileInput/fileInput.jsx +47 -0
- package/dist/source/components/inputs/fileInput/fileInput.jsx.map +1 -0
- package/dist/source/components/inputs/fileInput/index.js +6 -0
- package/dist/source/components/inputs/fileInput/index.js.map +7 -0
- package/dist/source/components/inputs/floatingButton/floatingButton.jsx +31 -0
- package/dist/source/components/inputs/floatingButton/floatingButton.jsx.map +1 -0
- package/dist/source/components/inputs/floatingButton/index.js +6 -0
- package/dist/source/components/inputs/floatingButton/index.js.map +7 -0
- package/dist/source/components/inputs/radioButton/index.js +6 -0
- package/dist/source/components/inputs/radioButton/index.js.map +7 -0
- package/dist/source/components/inputs/radioButton/radioButton.jsx +76 -0
- package/dist/source/components/inputs/radioButton/radioButton.jsx.map +1 -0
- package/dist/source/components/inputs/rating/index.js +6 -0
- package/dist/source/components/inputs/rating/index.js.map +7 -0
- package/dist/source/components/inputs/rating/rating.jsx +125 -0
- package/dist/source/components/inputs/rating/rating.jsx.map +1 -0
- package/dist/source/components/inputs/selectField/dropdownMenu.jsx +141 -0
- package/dist/source/components/inputs/selectField/dropdownMenu.jsx.map +1 -0
- package/dist/source/components/inputs/selectField/index.js +8 -0
- package/dist/source/components/inputs/selectField/index.js.map +7 -0
- package/dist/source/components/inputs/selectField/selectField.jsx +273 -0
- package/dist/source/components/inputs/selectField/selectField.jsx.map +1 -0
- package/dist/source/components/inputs/slider/index.js +6 -0
- package/dist/source/components/inputs/slider/index.js.map +7 -0
- package/dist/source/components/inputs/slider/slider.jsx +405 -0
- package/dist/source/components/inputs/slider/slider.jsx.map +1 -0
- package/dist/source/components/inputs/slider/utils.js +49 -0
- package/dist/source/components/inputs/slider/utils.js.map +7 -0
- package/dist/source/components/inputs/textField/index.js +9 -0
- package/dist/source/components/inputs/textField/index.js.map +7 -0
- package/dist/source/components/inputs/textField/textField.jsx +138 -0
- package/dist/source/components/inputs/textField/textField.jsx.map +1 -0
- package/dist/source/components/inputs/textField/textFieldAdornment.jsx +31 -0
- package/dist/source/components/inputs/textField/textFieldAdornment.jsx.map +1 -0
- package/dist/source/components/inputs/textField/textFieldWrapper.jsx +83 -0
- package/dist/source/components/inputs/textField/textFieldWrapper.jsx.map +1 -0
- package/dist/source/components/inputs/textField/types.js +1 -0
- package/dist/source/components/inputs/textField/types.js.map +7 -0
- package/dist/source/components/inputs/textField/utils.js +13 -0
- package/dist/source/components/inputs/textField/utils.js.map +7 -0
- package/dist/source/components/inputs/timePicker/index.js +14 -0
- package/dist/source/components/inputs/timePicker/index.js.map +7 -0
- package/dist/source/components/inputs/timePicker/timeFormat.js +78 -0
- package/dist/source/components/inputs/timePicker/timeFormat.js.map +7 -0
- package/dist/source/components/inputs/timePicker/timePicker.jsx +115 -0
- package/dist/source/components/inputs/timePicker/timePicker.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timePickerColumns.jsx +42 -0
- package/dist/source/components/inputs/timePicker/timePickerColumns.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timePickerInput.jsx +57 -0
- package/dist/source/components/inputs/timePicker/timePickerInput.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timePickerList.jsx +36 -0
- package/dist/source/components/inputs/timePicker/timePickerList.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timeUtils.js +96 -0
- package/dist/source/components/inputs/timePicker/timeUtils.js.map +7 -0
- package/dist/source/components/inputs/timePicker/useTimeInput.js +57 -0
- package/dist/source/components/inputs/timePicker/useTimeInput.js.map +7 -0
- package/dist/source/components/inputs/toggle/index.js +6 -0
- package/dist/source/components/inputs/toggle/index.js.map +7 -0
- package/dist/source/components/inputs/toggle/toggle.jsx +78 -0
- package/dist/source/components/inputs/toggle/toggle.jsx.map +1 -0
- package/dist/source/components/layout/appLayout/appLayout.jsx +102 -0
- package/dist/source/components/layout/appLayout/appLayout.jsx.map +1 -0
- package/dist/source/components/layout/appLayout/index.js +6 -0
- package/dist/source/components/layout/appLayout/index.js.map +7 -0
- package/dist/source/components/layout/divider/divider.jsx +69 -0
- package/dist/source/components/layout/divider/divider.jsx.map +1 -0
- package/dist/source/components/layout/divider/index.js +6 -0
- package/dist/source/components/layout/divider/index.js.map +7 -0
- package/dist/source/components/layout/grid/grid.jsx +113 -0
- package/dist/source/components/layout/grid/grid.jsx.map +1 -0
- package/dist/source/components/layout/grid/index.js +8 -0
- package/dist/source/components/layout/grid/index.js.map +7 -0
- package/dist/source/components/layout/page/index.js +6 -0
- package/dist/source/components/layout/page/index.js.map +7 -0
- package/dist/source/components/layout/page/page.jsx +29 -0
- package/dist/source/components/layout/page/page.jsx.map +1 -0
- package/dist/source/components/layout/pageHeader/index.js +6 -0
- package/dist/source/components/layout/pageHeader/index.js.map +7 -0
- package/dist/source/components/layout/pageHeader/pageHeader.jsx +53 -0
- package/dist/source/components/layout/pageHeader/pageHeader.jsx.map +1 -0
- package/dist/source/components/layout/screenDivider/index.js +6 -0
- package/dist/source/components/layout/screenDivider/index.js.map +7 -0
- package/dist/source/components/layout/screenDivider/screenDivider.jsx +130 -0
- package/dist/source/components/layout/screenDivider/screenDivider.jsx.map +1 -0
- package/dist/source/components/layout/sheet/index.js +6 -0
- package/dist/source/components/layout/sheet/index.js.map +7 -0
- package/dist/source/components/layout/sheet/sheet.jsx +262 -0
- package/dist/source/components/layout/sheet/sheet.jsx.map +1 -0
- package/dist/source/components/layout/stack/index.js +6 -0
- package/dist/source/components/layout/stack/index.js.map +7 -0
- package/dist/source/components/layout/stack/stack.jsx +54 -0
- package/dist/source/components/layout/stack/stack.jsx.map +1 -0
- package/dist/source/components/navigation/appBar/appBar.jsx +66 -0
- package/dist/source/components/navigation/appBar/appBar.jsx.map +1 -0
- package/dist/source/components/navigation/appBar/index.js +6 -0
- package/dist/source/components/navigation/appBar/index.js.map +7 -0
- package/dist/source/components/navigation/bottomBar/bottomBar.jsx +135 -0
- package/dist/source/components/navigation/bottomBar/bottomBar.jsx.map +1 -0
- package/dist/source/components/navigation/bottomBar/index.js +6 -0
- package/dist/source/components/navigation/bottomBar/index.js.map +7 -0
- package/dist/source/components/navigation/breadcrumbs/breadcrumbs.jsx +63 -0
- package/dist/source/components/navigation/breadcrumbs/breadcrumbs.jsx.map +1 -0
- package/dist/source/components/navigation/breadcrumbs/index.js +6 -0
- package/dist/source/components/navigation/breadcrumbs/index.js.map +7 -0
- package/dist/source/components/navigation/menu/index.js +23 -0
- package/dist/source/components/navigation/menu/index.js.map +7 -0
- package/dist/source/components/navigation/menu/menu.jsx +28 -0
- package/dist/source/components/navigation/menu/menu.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuComponent.jsx +18 -0
- package/dist/source/components/navigation/menu/menuComponent.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuContext.js +14 -0
- package/dist/source/components/navigation/menu/menuContext.js.map +7 -0
- package/dist/source/components/navigation/menu/menuDivider.jsx +19 -0
- package/dist/source/components/navigation/menu/menuDivider.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuFloating.jsx +84 -0
- package/dist/source/components/navigation/menu/menuFloating.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuItem.jsx +68 -0
- package/dist/source/components/navigation/menu/menuItem.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuItemIcon.jsx +25 -0
- package/dist/source/components/navigation/menu/menuItemIcon.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuItemText.jsx +25 -0
- package/dist/source/components/navigation/menu/menuItemText.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuList.jsx +46 -0
- package/dist/source/components/navigation/menu/menuList.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuSubmenu.jsx +86 -0
- package/dist/source/components/navigation/menu/menuSubmenu.jsx.map +1 -0
- package/dist/source/components/navigation/pagination/index.js +6 -0
- package/dist/source/components/navigation/pagination/index.js.map +7 -0
- package/dist/source/components/navigation/pagination/pagination.jsx +143 -0
- package/dist/source/components/navigation/pagination/pagination.jsx.map +1 -0
- package/dist/source/components/navigation/sidebar/index.js +6 -0
- package/dist/source/components/navigation/sidebar/index.js.map +7 -0
- package/dist/source/components/navigation/sidebar/sidebar.jsx +115 -0
- package/dist/source/components/navigation/sidebar/sidebar.jsx.map +1 -0
- package/dist/source/components/navigation/stepper/index.js +6 -0
- package/dist/source/components/navigation/stepper/index.js.map +7 -0
- package/dist/source/components/navigation/stepper/stepper.jsx +83 -0
- package/dist/source/components/navigation/stepper/stepper.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/index.js +10 -0
- package/dist/source/components/navigation/tabs/index.js.map +7 -0
- package/dist/source/components/navigation/tabs/tab/tab.jsx +76 -0
- package/dist/source/components/navigation/tabs/tab/tab.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/tabs.jsx +142 -0
- package/dist/source/components/navigation/tabs/tabs.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/tabsContext.js +8 -0
- package/dist/source/components/navigation/tabs/tabsContext.js.map +7 -0
- package/dist/source/index.js +309 -0
- package/dist/source/index.js.map +7 -0
- package/dist/source/primitives/callHandler.js +12 -0
- package/dist/source/primitives/callHandler.js.map +7 -0
- package/dist/source/primitives/createControllableState.js +19 -0
- package/dist/source/primitives/createControllableState.js.map +7 -0
- package/dist/source/primitives/createCssTransition.js +59 -0
- package/dist/source/primitives/createCssTransition.js.map +7 -0
- package/dist/source/primitives/createDropzone.js +46 -0
- package/dist/source/primitives/createDropzone.js.map +7 -0
- package/dist/source/primitives/createFloating.js +48 -0
- package/dist/source/primitives/createFloating.js.map +7 -0
- package/dist/source/primitives/createFocusTrap.js +50 -0
- package/dist/source/primitives/createFocusTrap.js.map +7 -0
- package/dist/source/primitives/createId.js +9 -0
- package/dist/source/primitives/createId.js.map +7 -0
- package/dist/source/primitives/createMaskedInput.js +35 -0
- package/dist/source/primitives/createMaskedInput.js.map +7 -0
- package/dist/source/primitives/createTheme.js +51 -0
- package/dist/source/primitives/createTheme.js.map +7 -0
- package/dist/source/primitives/createVirtualList.js +19 -0
- package/dist/source/primitives/createVirtualList.js.map +7 -0
- package/dist/source/primitives/mergeRefs.js +13 -0
- package/dist/source/primitives/mergeRefs.js.map +7 -0
- package/dist/source/ssr-published.ssr-spec.jsx +35 -0
- package/dist/source/ssr-published.ssr-spec.jsx.map +1 -0
- package/dist/source/ssr.ssr-spec.jsx +113 -0
- package/dist/source/ssr.ssr-spec.jsx.map +1 -0
- package/dist/source/utils/animate.js +35 -0
- package/dist/source/utils/animate.js.map +7 -0
- package/dist/source/utils/debounce.js +23 -0
- package/dist/source/utils/debounce.js.map +7 -0
- package/dist/source/utils/floating.js +42 -0
- package/dist/source/utils/floating.js.map +7 -0
- package/dist/source/utils/throttle.js +41 -0
- package/dist/source/utils/throttle.js.map +7 -0
- package/package.json +7 -3
- package/dist/ssr.ssr-spec.d.ts +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function debounce(fn, wait) {
|
|
2
|
+
let timer;
|
|
3
|
+
const debounced = (...args) => {
|
|
4
|
+
if (timer !== void 0) {
|
|
5
|
+
clearTimeout(timer);
|
|
6
|
+
}
|
|
7
|
+
timer = setTimeout(() => {
|
|
8
|
+
timer = void 0;
|
|
9
|
+
fn(...args);
|
|
10
|
+
}, wait);
|
|
11
|
+
};
|
|
12
|
+
debounced.cancel = () => {
|
|
13
|
+
if (timer !== void 0) {
|
|
14
|
+
clearTimeout(timer);
|
|
15
|
+
timer = void 0;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return debounced;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
debounce
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=debounce.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/utils/debounce.ts"],
|
|
4
|
+
"sourcesContent": ["export interface DebouncedFunction<A extends unknown[]> {\n (...args: A): void;\n cancel(): void;\n}\n\nexport function debounce<A extends unknown[]>(fn: (...args: A) => void, wait: number): DebouncedFunction<A> {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const debounced = (...args: A): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n }\n timer = setTimeout(() => {\n timer = undefined;\n fn(...args);\n }, wait);\n };\n\n debounced.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n return debounced;\n}\n"],
|
|
5
|
+
"mappings": "AAKO,SAAS,SAA8B,IAA0B,MAAoC;AAC1G,MAAI;AAEJ,QAAM,YAAY,IAAI,SAAkB;AACtC,QAAI,UAAU,QAAW;AACvB,mBAAa,KAAK;AAAA,IACpB;AACA,YAAQ,WAAW,MAAM;AACvB,cAAQ;AACR,SAAG,GAAG,IAAI;AAAA,IACZ,GAAG,IAAI;AAAA,EACT;AAEA,YAAU,SAAS,MAAY;AAC7B,QAAI,UAAU,QAAW;AACvB,mBAAa,KAAK;AAClB,cAAQ;AAAA,IACV;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { autoPlacement, flip, offset, shift } from "@floating-ui/dom";
|
|
2
|
+
const placements = [
|
|
3
|
+
"auto",
|
|
4
|
+
"auto-start",
|
|
5
|
+
"auto-end",
|
|
6
|
+
"top",
|
|
7
|
+
"top-start",
|
|
8
|
+
"top-end",
|
|
9
|
+
"bottom",
|
|
10
|
+
"bottom-start",
|
|
11
|
+
"bottom-end",
|
|
12
|
+
"right",
|
|
13
|
+
"right-start",
|
|
14
|
+
"right-end",
|
|
15
|
+
"left",
|
|
16
|
+
"left-start",
|
|
17
|
+
"left-end"
|
|
18
|
+
];
|
|
19
|
+
function resolvePlacement(placement) {
|
|
20
|
+
if (placement === "auto" || placement === "auto-start" || placement === "auto-end") {
|
|
21
|
+
const alignment = placement === "auto-start" ? "start" : placement === "auto-end" ? "end" : null;
|
|
22
|
+
return { autoMiddleware: autoPlacement({ alignment }) };
|
|
23
|
+
}
|
|
24
|
+
return { placement };
|
|
25
|
+
}
|
|
26
|
+
const FLOATING_OFFSET_PX = 4;
|
|
27
|
+
const FLOATING_SHIFT_PADDING_PX = 8;
|
|
28
|
+
function buildFloatingMiddleware(resolved, custom) {
|
|
29
|
+
if (custom?.length) {
|
|
30
|
+
return [...custom, flip(), shift({ padding: FLOATING_SHIFT_PADDING_PX })];
|
|
31
|
+
}
|
|
32
|
+
if (resolved.autoMiddleware) {
|
|
33
|
+
return [offset(FLOATING_OFFSET_PX), shift({ padding: FLOATING_SHIFT_PADDING_PX }), resolved.autoMiddleware];
|
|
34
|
+
}
|
|
35
|
+
return [offset(FLOATING_OFFSET_PX), flip(), shift({ padding: FLOATING_SHIFT_PADDING_PX })];
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
buildFloatingMiddleware,
|
|
39
|
+
placements,
|
|
40
|
+
resolvePlacement
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=floating.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/utils/floating.ts"],
|
|
4
|
+
"sourcesContent": ["import { autoPlacement, flip, type Middleware, offset, type Placement as FloatingUiPlacement, shift } from \"@floating-ui/dom\";\n\nexport type Placement = FloatingUiPlacement | \"auto\" | \"auto-start\" | \"auto-end\";\n\nexport const placements: Placement[] = [\n \"auto\",\n \"auto-start\",\n \"auto-end\",\n \"top\",\n \"top-start\",\n \"top-end\",\n \"bottom\",\n \"bottom-start\",\n \"bottom-end\",\n \"right\",\n \"right-start\",\n \"right-end\",\n \"left\",\n \"left-start\",\n \"left-end\",\n];\n\nexport interface ResolvedPlacement {\n placement?: FloatingUiPlacement;\n autoMiddleware?: Middleware;\n}\n\nexport function resolvePlacement(placement: Placement): ResolvedPlacement {\n if (placement === \"auto\" || placement === \"auto-start\" || placement === \"auto-end\") {\n const alignment = placement === \"auto-start\" ? \"start\" : placement === \"auto-end\" ? \"end\" : null;\n return { autoMiddleware: autoPlacement({ alignment }) };\n }\n return { placement };\n}\n\nconst FLOATING_OFFSET_PX = 4;\nconst FLOATING_SHIFT_PADDING_PX = 8;\n\nexport function buildFloatingMiddleware(resolved: ResolvedPlacement, custom?: Middleware[]): Middleware[] {\n if (custom?.length) {\n return [...custom, flip(), shift({ padding: FLOATING_SHIFT_PADDING_PX })];\n }\n if (resolved.autoMiddleware) {\n return [offset(FLOATING_OFFSET_PX), shift({ padding: FLOATING_SHIFT_PADDING_PX }), resolved.autoMiddleware];\n }\n return [offset(FLOATING_OFFSET_PX), flip(), shift({ padding: FLOATING_SHIFT_PADDING_PX })];\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAe,MAAuB,QAA+C,aAAa;AAIpG,MAAM,aAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAOO,SAAS,iBAAiB,WAAyC;AACxE,MAAI,cAAc,UAAU,cAAc,gBAAgB,cAAc,YAAY;AAClF,UAAM,YAAY,cAAc,eAAe,UAAU,cAAc,aAAa,QAAQ;AAC5F,WAAO,EAAE,gBAAgB,cAAc,EAAE,UAAU,CAAC,EAAE;AAAA,EACxD;AACA,SAAO,EAAE,UAAU;AACrB;AAEA,MAAM,qBAAqB;AAC3B,MAAM,4BAA4B;AAE3B,SAAS,wBAAwB,UAA6B,QAAqC;AACxG,MAAI,QAAQ,QAAQ;AAClB,WAAO,CAAC,GAAG,QAAQ,KAAK,GAAG,MAAM,EAAE,SAAS,0BAA0B,CAAC,CAAC;AAAA,EAC1E;AACA,MAAI,SAAS,gBAAgB;AAC3B,WAAO,CAAC,OAAO,kBAAkB,GAAG,MAAM,EAAE,SAAS,0BAA0B,CAAC,GAAG,SAAS,cAAc;AAAA,EAC5G;AACA,SAAO,CAAC,OAAO,kBAAkB,GAAG,KAAK,GAAG,MAAM,EAAE,SAAS,0BAA0B,CAAC,CAAC;AAC3F;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function throttle(fn, wait) {
|
|
2
|
+
let lastCall = 0;
|
|
3
|
+
let timer;
|
|
4
|
+
let lastArgs;
|
|
5
|
+
const invoke = (time, args) => {
|
|
6
|
+
lastCall = time;
|
|
7
|
+
fn(...args);
|
|
8
|
+
};
|
|
9
|
+
const throttled = (...args) => {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
const remaining = wait - (now - lastCall);
|
|
12
|
+
lastArgs = args;
|
|
13
|
+
if (remaining <= 0 || remaining > wait) {
|
|
14
|
+
if (timer !== void 0) {
|
|
15
|
+
clearTimeout(timer);
|
|
16
|
+
timer = void 0;
|
|
17
|
+
}
|
|
18
|
+
invoke(now, args);
|
|
19
|
+
} else if (timer === void 0) {
|
|
20
|
+
timer = setTimeout(() => {
|
|
21
|
+
timer = void 0;
|
|
22
|
+
if (lastArgs !== void 0) {
|
|
23
|
+
invoke(Date.now(), lastArgs);
|
|
24
|
+
}
|
|
25
|
+
}, remaining);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
throttled.cancel = () => {
|
|
29
|
+
if (timer !== void 0) {
|
|
30
|
+
clearTimeout(timer);
|
|
31
|
+
timer = void 0;
|
|
32
|
+
}
|
|
33
|
+
lastCall = 0;
|
|
34
|
+
lastArgs = void 0;
|
|
35
|
+
};
|
|
36
|
+
return throttled;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
throttle
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=throttle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/utils/throttle.ts"],
|
|
4
|
+
"sourcesContent": ["export interface ThrottledFunction<A extends unknown[]> {\n (...args: A): void;\n cancel(): void;\n}\n\nexport function throttle<A extends unknown[]>(fn: (...args: A) => void, wait: number): ThrottledFunction<A> {\n let lastCall = 0;\n let timer: ReturnType<typeof setTimeout> | undefined;\n let lastArgs: A | undefined;\n\n const invoke = (time: number, args: A): void => {\n lastCall = time;\n fn(...args);\n };\n\n const throttled = (...args: A): void => {\n const now = Date.now();\n const remaining = wait - (now - lastCall);\n lastArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n invoke(now, args);\n } else if (timer === undefined) {\n timer = setTimeout(() => {\n timer = undefined;\n if (lastArgs !== undefined) {\n invoke(Date.now(), lastArgs);\n }\n }, remaining);\n }\n };\n\n throttled.cancel = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n lastCall = 0;\n lastArgs = undefined;\n };\n\n return throttled;\n}\n"],
|
|
5
|
+
"mappings": "AAKO,SAAS,SAA8B,IAA0B,MAAoC;AAC1G,MAAI,WAAW;AACf,MAAI;AACJ,MAAI;AAEJ,QAAM,SAAS,CAAC,MAAc,SAAkB;AAC9C,eAAW;AACX,OAAG,GAAG,IAAI;AAAA,EACZ;AAEA,QAAM,YAAY,IAAI,SAAkB;AACtC,UAAM,MAAM,KAAK,IAAI;AACrB,UAAM,YAAY,QAAQ,MAAM;AAChC,eAAW;AAEX,QAAI,aAAa,KAAK,YAAY,MAAM;AACtC,UAAI,UAAU,QAAW;AACvB,qBAAa,KAAK;AAClB,gBAAQ;AAAA,MACV;AACA,aAAO,KAAK,IAAI;AAAA,IAClB,WAAW,UAAU,QAAW;AAC9B,cAAQ,WAAW,MAAM;AACvB,gBAAQ;AACR,YAAI,aAAa,QAAW;AAC1B,iBAAO,KAAK,IAAI,GAAG,QAAQ;AAAA,QAC7B;AAAA,MACF,GAAG,SAAS;AAAA,IACd;AAAA,EACF;AAEA,YAAU,SAAS,MAAY;AAC7B,QAAI,UAAU,QAAW;AACvB,mBAAa,KAAK;AAClB,cAAQ;AAAA,IACV;AACA,eAAW;AACX,eAAW;AAAA,EACb;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { createEffect, createSignal, mergeProps, onCleanup, onMount, splitProps } from "solid-js";
|
|
2
|
+
import cn from "clsx";
|
|
3
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
4
|
+
const isNumberString = (n) => {
|
|
5
|
+
const number = parseFloat(n);
|
|
6
|
+
return !isNaN(number) && isFinite(number);
|
|
7
|
+
};
|
|
8
|
+
const isPercentage = (height) => typeof height === "string" && height[height.length - 1] === "%" && isNumberString(height.substring(0, height.length - 1));
|
|
9
|
+
const hideContent = (element, height) => {
|
|
10
|
+
if (height === 0 && element?.style) element.style.display = "none";
|
|
11
|
+
};
|
|
12
|
+
const showContent = (element, height) => {
|
|
13
|
+
if (height === 0 && element?.style) element.style.display = "";
|
|
14
|
+
};
|
|
15
|
+
const ANIMATION_STATE_CLASSES = {
|
|
16
|
+
animating: "rah-animating",
|
|
17
|
+
animatingUp: "rah-animating--up",
|
|
18
|
+
animatingDown: "rah-animating--down",
|
|
19
|
+
animatingToHeightZero: "rah-animating--to-height-zero",
|
|
20
|
+
animatingToHeightAuto: "rah-animating--to-height-auto",
|
|
21
|
+
animatingToHeightSpecific: "rah-animating--to-height-specific",
|
|
22
|
+
static: "rah-static",
|
|
23
|
+
staticHeightZero: "rah-static--height-zero",
|
|
24
|
+
staticHeightAuto: "rah-static--height-auto",
|
|
25
|
+
staticHeightSpecific: "rah-static--height-specific"
|
|
26
|
+
};
|
|
27
|
+
const getStaticStateClasses = (s, height) => cn({
|
|
28
|
+
[s.static]: true,
|
|
29
|
+
[s.staticHeightZero]: height === 0,
|
|
30
|
+
[s.staticHeightSpecific]: typeof height === "number" && height > 0,
|
|
31
|
+
[s.staticHeightAuto]: height === "auto"
|
|
32
|
+
});
|
|
33
|
+
const toCssHeight = (height) => typeof height === "number" ? `${height}px` : height;
|
|
34
|
+
function AnimateHeight(props) {
|
|
35
|
+
const merged = mergeProps(
|
|
36
|
+
{ animateOpacity: false, applyInlineTransitions: true, delay: 0, duration: 300, easing: "ease" },
|
|
37
|
+
props
|
|
38
|
+
);
|
|
39
|
+
const [local, rest] = splitProps(merged, [
|
|
40
|
+
"animateOpacity",
|
|
41
|
+
"animationStateClasses",
|
|
42
|
+
"applyInlineTransitions",
|
|
43
|
+
"children",
|
|
44
|
+
"class",
|
|
45
|
+
"contentClassName",
|
|
46
|
+
"delay",
|
|
47
|
+
"duration",
|
|
48
|
+
"easing",
|
|
49
|
+
"height",
|
|
50
|
+
"onHeightAnimationEnd",
|
|
51
|
+
"onHeightAnimationStart",
|
|
52
|
+
"style",
|
|
53
|
+
"ref"
|
|
54
|
+
]);
|
|
55
|
+
const stateClasses = { ...ANIMATION_STATE_CLASSES, ...local.animationStateClasses };
|
|
56
|
+
let contentEl;
|
|
57
|
+
let prevHeight = local.height;
|
|
58
|
+
let timeoutId;
|
|
59
|
+
let classesTimeoutId;
|
|
60
|
+
let initHeight = local.height;
|
|
61
|
+
let initOverflow = "visible";
|
|
62
|
+
if (typeof initHeight === "number") {
|
|
63
|
+
initHeight = initHeight < 0 ? 0 : initHeight;
|
|
64
|
+
initOverflow = "hidden";
|
|
65
|
+
} else if (isPercentage(initHeight)) {
|
|
66
|
+
initHeight = initHeight === "0%" ? 0 : initHeight;
|
|
67
|
+
initOverflow = "hidden";
|
|
68
|
+
}
|
|
69
|
+
const [currentHeight, setCurrentHeight] = createSignal(initHeight);
|
|
70
|
+
const [overflow, setOverflow] = createSignal(initOverflow);
|
|
71
|
+
const [useTransitions, setUseTransitions] = createSignal(false);
|
|
72
|
+
const [stateClassNames, setStateClassNames] = createSignal(getStaticStateClasses(stateClasses, local.height));
|
|
73
|
+
onMount(() => hideContent(contentEl, currentHeight()));
|
|
74
|
+
createEffect(() => {
|
|
75
|
+
const height = local.height;
|
|
76
|
+
if (height !== prevHeight && contentEl) {
|
|
77
|
+
showContent(contentEl, prevHeight);
|
|
78
|
+
contentEl.style.overflow = "hidden";
|
|
79
|
+
const contentHeight = contentEl.offsetHeight;
|
|
80
|
+
contentEl.style.overflow = "";
|
|
81
|
+
const totalDuration = local.duration + local.delay;
|
|
82
|
+
let newHeight;
|
|
83
|
+
let timeoutHeight;
|
|
84
|
+
let timeoutOverflow = "hidden";
|
|
85
|
+
const isCurrentHeightAuto = prevHeight === "auto";
|
|
86
|
+
if (typeof height === "number") {
|
|
87
|
+
newHeight = height < 0 ? 0 : height;
|
|
88
|
+
timeoutHeight = newHeight;
|
|
89
|
+
} else if (isPercentage(height)) {
|
|
90
|
+
newHeight = height === "0%" ? 0 : height;
|
|
91
|
+
timeoutHeight = newHeight;
|
|
92
|
+
} else {
|
|
93
|
+
newHeight = contentHeight;
|
|
94
|
+
timeoutHeight = "auto";
|
|
95
|
+
timeoutOverflow = void 0;
|
|
96
|
+
}
|
|
97
|
+
if (isCurrentHeightAuto) {
|
|
98
|
+
timeoutHeight = newHeight;
|
|
99
|
+
newHeight = contentHeight;
|
|
100
|
+
}
|
|
101
|
+
const animatingClassNames = cn({
|
|
102
|
+
[stateClasses.animating]: true,
|
|
103
|
+
[stateClasses.animatingUp]: prevHeight === "auto" || typeof prevHeight === "number" && typeof height === "number" && height < prevHeight,
|
|
104
|
+
[stateClasses.animatingDown]: height === "auto" || typeof prevHeight === "number" && typeof height === "number" && height > prevHeight,
|
|
105
|
+
[stateClasses.animatingToHeightZero]: timeoutHeight === 0,
|
|
106
|
+
[stateClasses.animatingToHeightAuto]: timeoutHeight === "auto",
|
|
107
|
+
[stateClasses.animatingToHeightSpecific]: typeof timeoutHeight === "number" && timeoutHeight > 0
|
|
108
|
+
});
|
|
109
|
+
const finalClassNames = getStaticStateClasses(stateClasses, timeoutHeight);
|
|
110
|
+
setCurrentHeight(newHeight);
|
|
111
|
+
setOverflow("hidden");
|
|
112
|
+
setUseTransitions(!isCurrentHeightAuto);
|
|
113
|
+
setStateClassNames(animatingClassNames);
|
|
114
|
+
clearTimeout(timeoutId);
|
|
115
|
+
clearTimeout(classesTimeoutId);
|
|
116
|
+
if (isCurrentHeightAuto) {
|
|
117
|
+
timeoutId = setTimeout(() => {
|
|
118
|
+
setCurrentHeight(timeoutHeight);
|
|
119
|
+
setOverflow(timeoutOverflow);
|
|
120
|
+
setUseTransitions(true);
|
|
121
|
+
local.onHeightAnimationStart?.(timeoutHeight);
|
|
122
|
+
}, 50);
|
|
123
|
+
classesTimeoutId = setTimeout(() => {
|
|
124
|
+
setUseTransitions(false);
|
|
125
|
+
setStateClassNames(finalClassNames);
|
|
126
|
+
hideContent(contentEl, timeoutHeight);
|
|
127
|
+
local.onHeightAnimationEnd?.(timeoutHeight);
|
|
128
|
+
}, totalDuration);
|
|
129
|
+
} else {
|
|
130
|
+
local.onHeightAnimationStart?.(newHeight);
|
|
131
|
+
timeoutId = setTimeout(() => {
|
|
132
|
+
setCurrentHeight(timeoutHeight);
|
|
133
|
+
setOverflow(timeoutOverflow);
|
|
134
|
+
setUseTransitions(false);
|
|
135
|
+
setStateClassNames(finalClassNames);
|
|
136
|
+
if (height !== "auto") hideContent(contentEl, newHeight);
|
|
137
|
+
local.onHeightAnimationEnd?.(newHeight);
|
|
138
|
+
}, totalDuration);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
prevHeight = height;
|
|
142
|
+
});
|
|
143
|
+
onCleanup(() => {
|
|
144
|
+
clearTimeout(timeoutId);
|
|
145
|
+
clearTimeout(classesTimeoutId);
|
|
146
|
+
});
|
|
147
|
+
const componentStyle = () => {
|
|
148
|
+
const base = {
|
|
149
|
+
...typeof local.style === "object" && local.style ? local.style : {},
|
|
150
|
+
height: toCssHeight(currentHeight()),
|
|
151
|
+
overflow: overflow() ?? "visible"
|
|
152
|
+
};
|
|
153
|
+
if (useTransitions() && local.applyInlineTransitions) {
|
|
154
|
+
base.transition = `height ${local.duration}ms ${local.easing} ${local.delay}ms`;
|
|
155
|
+
}
|
|
156
|
+
return base;
|
|
157
|
+
};
|
|
158
|
+
const contentStyle = () => {
|
|
159
|
+
if (!local.animateOpacity) return {};
|
|
160
|
+
return {
|
|
161
|
+
transition: `opacity ${local.duration}ms ${local.easing} ${local.delay}ms`,
|
|
162
|
+
...currentHeight() === 0 ? { opacity: 0 } : {}
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
const ariaHidden = () => rest["aria-hidden"] !== void 0 ? rest["aria-hidden"] : local.height === 0;
|
|
166
|
+
return <div {...rest} ref={mergeRefs(local.ref)} aria-hidden={ariaHidden()} class={cn(stateClassNames(), local.class)} style={componentStyle()}>
|
|
167
|
+
<div class={local.contentClassName} style={contentStyle()} ref={contentEl}>
|
|
168
|
+
{local.children}
|
|
169
|
+
</div>
|
|
170
|
+
</div>;
|
|
171
|
+
}
|
|
172
|
+
var animateHeight_default = AnimateHeight;
|
|
173
|
+
export {
|
|
174
|
+
AnimateHeight,
|
|
175
|
+
animateHeight_default as default
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=animateHeight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/base/animateHeight/animateHeight.tsx"],"sourcesContent":["// Solid port of react-animate-height (MIT, © Stanko Tadić)\n// https://github.com/Stanko/react-animate-height\nimport { type JSX, type ParentProps, createEffect, createSignal, mergeProps, onCleanup, onMount, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type Height = \"auto\" | number | `${number}%`;\ntype Overflow = \"auto\" | \"visible\" | \"hidden\" | undefined;\n\ninterface AnimationStateClasses {\n animating: string;\n animatingUp: string;\n animatingDown: string;\n animatingToHeightZero: string;\n animatingToHeightAuto: string;\n animatingToHeightSpecific: string;\n static: string;\n staticHeightZero: string;\n staticHeightAuto: string;\n staticHeightSpecific: string;\n}\n\nconst isNumberString = (n: string): boolean => {\n const number = parseFloat(n);\n return !isNaN(number) && isFinite(number);\n};\n\nconst isPercentage = (height: Height): height is `${number}%` =>\n typeof height === \"string\" && height[height.length - 1] === \"%\" && isNumberString(height.substring(0, height.length - 1));\n\nconst hideContent = (element: HTMLDivElement | undefined, height: Height): void => {\n if (height === 0 && element?.style) element.style.display = \"none\";\n};\nconst showContent = (element: HTMLDivElement | undefined, height: Height): void => {\n if (height === 0 && element?.style) element.style.display = \"\";\n};\n\nconst ANIMATION_STATE_CLASSES: AnimationStateClasses = {\n animating: \"rah-animating\",\n animatingUp: \"rah-animating--up\",\n animatingDown: \"rah-animating--down\",\n animatingToHeightZero: \"rah-animating--to-height-zero\",\n animatingToHeightAuto: \"rah-animating--to-height-auto\",\n animatingToHeightSpecific: \"rah-animating--to-height-specific\",\n static: \"rah-static\",\n staticHeightZero: \"rah-static--height-zero\",\n staticHeightAuto: \"rah-static--height-auto\",\n staticHeightSpecific: \"rah-static--height-specific\",\n};\n\nconst getStaticStateClasses = (s: AnimationStateClasses, height: Height): string =>\n cn({\n [s.static]: true,\n [s.staticHeightZero]: height === 0,\n [s.staticHeightSpecific]: typeof height === \"number\" && height > 0,\n [s.staticHeightAuto]: height === \"auto\",\n });\n\nconst toCssHeight = (height: Height): string => (typeof height === \"number\" ? `${height}px` : height);\n\nexport interface AnimateHeightProps extends JSX.HTMLAttributes<HTMLDivElement> {\n animateOpacity?: boolean;\n animationStateClasses?: Partial<AnimationStateClasses>;\n applyInlineTransitions?: boolean;\n contentClassName?: string;\n delay?: number;\n duration?: number;\n easing?: string;\n height: Height;\n onHeightAnimationEnd?: (newHeight: Height) => void;\n onHeightAnimationStart?: (newHeight: Height) => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function AnimateHeight(props: ParentProps<AnimateHeightProps>): JSX.Element {\n const merged = mergeProps(\n { animateOpacity: false, applyInlineTransitions: true, delay: 0, duration: 300, easing: \"ease\" },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"animateOpacity\",\n \"animationStateClasses\",\n \"applyInlineTransitions\",\n \"children\",\n \"class\",\n \"contentClassName\",\n \"delay\",\n \"duration\",\n \"easing\",\n \"height\",\n \"onHeightAnimationEnd\",\n \"onHeightAnimationStart\",\n \"style\",\n \"ref\",\n ]);\n\n const stateClasses: AnimationStateClasses = { ...ANIMATION_STATE_CLASSES, ...local.animationStateClasses };\n\n let contentEl: HTMLDivElement | undefined;\n let prevHeight: Height = local.height;\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n let classesTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n let initHeight: Height = local.height;\n let initOverflow: Overflow = \"visible\";\n if (typeof initHeight === \"number\") {\n initHeight = initHeight < 0 ? 0 : initHeight;\n initOverflow = \"hidden\";\n } else if (isPercentage(initHeight)) {\n initHeight = initHeight === \"0%\" ? 0 : initHeight;\n initOverflow = \"hidden\";\n }\n\n const [currentHeight, setCurrentHeight] = createSignal<Height>(initHeight);\n const [overflow, setOverflow] = createSignal<Overflow>(initOverflow);\n const [useTransitions, setUseTransitions] = createSignal(false);\n const [stateClassNames, setStateClassNames] = createSignal(getStaticStateClasses(stateClasses, local.height));\n\n onMount(() => hideContent(contentEl, currentHeight()));\n\n createEffect(() => {\n const height = local.height;\n if (height !== prevHeight && contentEl) {\n showContent(contentEl, prevHeight);\n contentEl.style.overflow = \"hidden\";\n const contentHeight = contentEl.offsetHeight;\n contentEl.style.overflow = \"\";\n\n const totalDuration = local.duration + local.delay;\n let newHeight: Height;\n let timeoutHeight: Height;\n let timeoutOverflow: Overflow = \"hidden\";\n const isCurrentHeightAuto = prevHeight === \"auto\";\n\n if (typeof height === \"number\") {\n newHeight = height < 0 ? 0 : height;\n timeoutHeight = newHeight;\n } else if (isPercentage(height)) {\n newHeight = height === \"0%\" ? 0 : height;\n timeoutHeight = newHeight;\n } else {\n newHeight = contentHeight;\n timeoutHeight = \"auto\";\n timeoutOverflow = undefined;\n }\n\n if (isCurrentHeightAuto) {\n timeoutHeight = newHeight;\n newHeight = contentHeight;\n }\n\n const animatingClassNames = cn({\n [stateClasses.animating]: true,\n [stateClasses.animatingUp]:\n prevHeight === \"auto\" || (typeof prevHeight === \"number\" && typeof height === \"number\" && height < prevHeight),\n [stateClasses.animatingDown]:\n height === \"auto\" || (typeof prevHeight === \"number\" && typeof height === \"number\" && height > prevHeight),\n [stateClasses.animatingToHeightZero]: timeoutHeight === 0,\n [stateClasses.animatingToHeightAuto]: timeoutHeight === \"auto\",\n [stateClasses.animatingToHeightSpecific]: typeof timeoutHeight === \"number\" && timeoutHeight > 0,\n });\n const finalClassNames = getStaticStateClasses(stateClasses, timeoutHeight);\n\n setCurrentHeight(newHeight);\n setOverflow(\"hidden\");\n setUseTransitions(!isCurrentHeightAuto);\n setStateClassNames(animatingClassNames);\n\n clearTimeout(timeoutId);\n clearTimeout(classesTimeoutId);\n\n if (isCurrentHeightAuto) {\n timeoutId = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(true);\n local.onHeightAnimationStart?.(timeoutHeight);\n }, 50);\n classesTimeoutId = setTimeout(() => {\n setUseTransitions(false);\n setStateClassNames(finalClassNames);\n hideContent(contentEl, timeoutHeight);\n local.onHeightAnimationEnd?.(timeoutHeight);\n }, totalDuration);\n } else {\n local.onHeightAnimationStart?.(newHeight);\n timeoutId = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(false);\n setStateClassNames(finalClassNames);\n if (height !== \"auto\") hideContent(contentEl, newHeight);\n local.onHeightAnimationEnd?.(newHeight);\n }, totalDuration);\n }\n }\n prevHeight = height;\n });\n\n onCleanup(() => {\n clearTimeout(timeoutId);\n clearTimeout(classesTimeoutId);\n });\n\n const componentStyle = (): JSX.CSSProperties => {\n const base: JSX.CSSProperties = {\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n height: toCssHeight(currentHeight()),\n overflow: overflow() ?? \"visible\",\n };\n if (useTransitions() && local.applyInlineTransitions) {\n base.transition = `height ${local.duration}ms ${local.easing} ${local.delay}ms`;\n }\n return base;\n };\n\n const contentStyle = (): JSX.CSSProperties => {\n if (!local.animateOpacity) return {};\n return {\n transition: `opacity ${local.duration}ms ${local.easing} ${local.delay}ms`,\n ...(currentHeight() === 0 ? { opacity: 0 } : {}),\n };\n };\n\n const ariaHidden = (): boolean | undefined =>\n rest[\"aria-hidden\"] !== undefined ? (rest[\"aria-hidden\"] as boolean) : local.height === 0;\n\n return (\n <div {...rest} ref={mergeRefs(local.ref)} aria-hidden={ariaHidden()} class={cn(stateClassNames(), local.class)} style={componentStyle()}>\n <div class={local.contentClassName} style={contentStyle()} ref={contentEl}>\n {local.children}\n </div>\n </div>\n );\n}\n\nexport default AnimateHeight;\n"],"mappings":"AAEA,SAAqC,cAAc,cAAc,YAAY,WAAW,SAAS,kBAAkB;AACnH,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAkBpC,MA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/components/base/animateHeight/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { AnimateHeight, default } from \"./animateHeight\";\nexport type { AnimateHeightProps, Height } from \"./animateHeight\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAe,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "/sourcecraft/workspace/packages/styles/less/components/icon/icon.entry.less";
|
|
2
|
+
import { mergeProps, splitProps } from "solid-js";
|
|
3
|
+
import cn from "clsx";
|
|
4
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
5
|
+
const COLOR_TOKENS = [
|
|
6
|
+
"primary",
|
|
7
|
+
"secondary",
|
|
8
|
+
"error",
|
|
9
|
+
"success",
|
|
10
|
+
"warning",
|
|
11
|
+
"info",
|
|
12
|
+
"disabled"
|
|
13
|
+
];
|
|
14
|
+
function Icon(props) {
|
|
15
|
+
const merged = mergeProps(
|
|
16
|
+
{ weight: 400, fill: 0, size: 20, grade: 100, color: "inherit" },
|
|
17
|
+
props
|
|
18
|
+
);
|
|
19
|
+
const [local, rest] = splitProps(merged, [
|
|
20
|
+
"class",
|
|
21
|
+
"weight",
|
|
22
|
+
"fill",
|
|
23
|
+
"size",
|
|
24
|
+
"grade",
|
|
25
|
+
"name",
|
|
26
|
+
"color",
|
|
27
|
+
"title",
|
|
28
|
+
"style",
|
|
29
|
+
"ref"
|
|
30
|
+
]);
|
|
31
|
+
const decorative = () => local.title === void 0;
|
|
32
|
+
const colorClass = () => typeof local.color === "string" && COLOR_TOKENS.includes(local.color) ? `smwb-icon_color-${local.color}` : void 0;
|
|
33
|
+
const styleObject = () => typeof local.style === "object" && local.style ? local.style : {};
|
|
34
|
+
return <span
|
|
35
|
+
{...rest}
|
|
36
|
+
ref={mergeRefs(local.ref)}
|
|
37
|
+
data-testid="icon"
|
|
38
|
+
role={decorative() ? void 0 : "img"}
|
|
39
|
+
aria-hidden={decorative() ? true : void 0}
|
|
40
|
+
aria-label={local.title}
|
|
41
|
+
title={local.title}
|
|
42
|
+
style={{
|
|
43
|
+
...styleObject(),
|
|
44
|
+
"font-variation-settings": `'FILL' ${local.fill}, 'wght' ${local.weight}, 'GRAD' ${local.grade}, 'opsz' 48`
|
|
45
|
+
}}
|
|
46
|
+
class={cn("smwb-icon__wrapper", colorClass(), local.class)}
|
|
47
|
+
>
|
|
48
|
+
<span
|
|
49
|
+
class="material-symbols-outlined"
|
|
50
|
+
style={{ "font-size": typeof local.size === "number" ? `${local.size}px` : local.size }}
|
|
51
|
+
>
|
|
52
|
+
{local.name}
|
|
53
|
+
</span>
|
|
54
|
+
</span>;
|
|
55
|
+
}
|
|
56
|
+
var icon_default = Icon;
|
|
57
|
+
export {
|
|
58
|
+
Icon,
|
|
59
|
+
icon_default as default
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/base/icon/icon.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/icon/icon.entry.less\";\nimport { type JSX, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport type IconColor = \"inherit\" | \"primary\" | \"secondary\" | \"error\" | \"success\" | \"warning\" | \"info\" | \"disabled\";\n\nconst COLOR_TOKENS: ReadonlyArray<string> = [\n \"primary\",\n \"secondary\",\n \"error\",\n \"success\",\n \"warning\",\n \"info\",\n \"disabled\",\n];\n\nexport interface IconProps extends JSX.HTMLAttributes<HTMLSpanElement> {\n /**\n * Icon name from https://fonts.google.com/icons\n * Example: name={\"arrow_right_alt\"}\n */\n name: string;\n weight?: number;\n fill?: 0 | 1;\n /** Pixel number or any CSS length (e.g. \"1.5rem\"). */\n size?: number | string;\n grade?: number;\n /**\n * Semantic color token; `inherit` (default) keeps the text color. Any string\n * is accepted for backward compatibility, but only known {@link IconColor}\n * tokens emit a color class.\n */\n color?: IconColor | (string & {});\n /**\n * Accessible name. When provided the icon is exposed as `role=\"img\"`;\n * otherwise it is `aria-hidden` (decorative).\n */\n title?: string;\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport function Icon(props: IconProps): JSX.Element {\n const merged = mergeProps(\n { weight: 400, fill: 0 as 0 | 1, size: 20 as number | string, grade: 100, color: \"inherit\" as IconProps[\"color\"] },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"weight\",\n \"fill\",\n \"size\",\n \"grade\",\n \"name\",\n \"color\",\n \"title\",\n \"style\",\n \"ref\",\n ]);\n\n const decorative = (): boolean => local.title === undefined;\n const colorClass = (): string | undefined =>\n typeof local.color === \"string\" && COLOR_TOKENS.includes(local.color) ? `smwb-icon_color-${local.color}` : undefined;\n const styleObject = (): JSX.CSSProperties => (typeof local.style === \"object\" && local.style ? local.style : {});\n\n return (\n <span\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"icon\"\n role={decorative() ? undefined : \"img\"}\n aria-hidden={decorative() ? true : undefined}\n aria-label={local.title}\n title={local.title}\n style={{\n ...styleObject(),\n \"font-variation-settings\": `'FILL' ${local.fill}, 'wght' ${local.weight}, 'GRAD' ${local.grade}, 'opsz' 48`,\n }}\n class={cn(\"smwb-icon__wrapper\", colorClass(), local.class)}\n >\n <span\n class=\"material-symbols-outlined\"\n style={{ \"font-size\": typeof local.size === \"number\" ? `${local.size}px` : local.size }}\n >\n {local.name}\n </span>\n </span>\n );\n}\n\nexport default Icon;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,YAAY,kBAAkB;AACjD,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAIpC,MAAM,eAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA2BO,SAAS,KAAK,OAA+B;AAClD,QAAM,SAAS;AAAA,IACb,EAAE,QAAQ,KAAK,MAAM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ent": ["export { Icon, default } from \"./icon\";\nexport type { IconProps, IconColor } from \"./icon\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,MAAM,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/base/ripple/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { Ripple, default } from \"./ripple\";\nexport type { RippleProps, RippleActionsRef, RippleClasses } from \"./ripple\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,QAAQ,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import "/sourcecraft/workspace/packages/styles/less/components/ripple/ripple.entry.less";
|
|
2
|
+
import { For, createSignal, mergeProps, splitProps } from "solid-js";
|
|
3
|
+
import cn from "clsx";
|
|
4
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
5
|
+
function Ripple(props) {
|
|
6
|
+
const merged = mergeProps({ duration: 600 }, props);
|
|
7
|
+
const [local, rest] = splitProps(merged, [
|
|
8
|
+
"actionRef",
|
|
9
|
+
"class",
|
|
10
|
+
"classes",
|
|
11
|
+
"center",
|
|
12
|
+
"duration",
|
|
13
|
+
"color",
|
|
14
|
+
"ref",
|
|
15
|
+
"style"
|
|
16
|
+
]);
|
|
17
|
+
const [ripples, setRipples] = createSignal([]);
|
|
18
|
+
let nextKey = 0;
|
|
19
|
+
const onRipple = (event) => {
|
|
20
|
+
const target = event.currentTarget;
|
|
21
|
+
const rect = target.getBoundingClientRect();
|
|
22
|
+
const diameter = Math.max(rect.width, rect.height);
|
|
23
|
+
const radius = diameter / 2;
|
|
24
|
+
let coordX;
|
|
25
|
+
let coordY;
|
|
26
|
+
if (local.center) {
|
|
27
|
+
coordX = rect.width > rect.height ? 0 : rect.width / 2 - radius;
|
|
28
|
+
coordY = rect.height > rect.width ? 0 : rect.height / 2 - radius;
|
|
29
|
+
} else {
|
|
30
|
+
coordX = event.clientX - rect.left - radius;
|
|
31
|
+
coordY = event.clientY - rect.top - radius;
|
|
32
|
+
}
|
|
33
|
+
const key = nextKey++;
|
|
34
|
+
setRipples((prev) => [...prev, { key, x: coordX, y: coordY, size: diameter }]);
|
|
35
|
+
setTimeout(() => setRipples((prev) => prev.slice(1)), local.duration);
|
|
36
|
+
};
|
|
37
|
+
local.actionRef?.({ onRipple });
|
|
38
|
+
return <span
|
|
39
|
+
{...rest}
|
|
40
|
+
ref={mergeRefs(local.ref)}
|
|
41
|
+
class={cn("smwb-ripple", local.class, local.classes?.ripple)}
|
|
42
|
+
data-testid="ripple"
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
>
|
|
45
|
+
<For each={ripples()}>
|
|
46
|
+
{(ripple) => <span
|
|
47
|
+
class={cn("smwb-ripple__child", local.classes?.child)}
|
|
48
|
+
style={{
|
|
49
|
+
left: `${ripple.x}px`,
|
|
50
|
+
top: `${ripple.y}px`,
|
|
51
|
+
width: `${ripple.size}px`,
|
|
52
|
+
height: `${ripple.size}px`,
|
|
53
|
+
"background-color": local.color
|
|
54
|
+
}}
|
|
55
|
+
/>}
|
|
56
|
+
</For>
|
|
57
|
+
</span>;
|
|
58
|
+
}
|
|
59
|
+
var ripple_default = Ripple;
|
|
60
|
+
export {
|
|
61
|
+
Ripple,
|
|
62
|
+
ripple_default as default
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=ripple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/base/ripple/ripple.tsx"],"sourcesContent":["import \"/sourcecraft/workspace/packages/styles/less/components/ripple/ripple.entry.less\";\nimport { type JSX, For, createSignal, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface RippleActionsRef {\n onRipple: (event: MouseEvent) => void;\n}\n\nexport interface RippleClasses {\n ripple?: string;\n child?: string;\n}\n\nexport interface RippleProps extends JSX.HTMLAttributes<HTMLSpanElement> {\n /** Receives the imperative API once on mount. */\n actionRef?: (actions: RippleActionsRef) => void;\n classes?: RippleClasses;\n center?: boolean | undefined;\n /** Ripple lifetime in ms. */\n duration?: number;\n /** Ripple color (any CSS color). Defaults to inherited currentColor. */\n color?: string | undefined;\n ref?: Ref<HTMLSpanElement>;\n}\n\ninterface RippleEntry {\n key: number;\n x: number;\n y: number;\n size: number;\n}\n\n/**\n * ⚠️ For this effect to work, the parent element must have CSS\n * `position: relative;`.\n */\nexport function Ripple(props: RippleProps): JSX.Element {\n const merged = mergeProps({ duration: 600 }, props);\n const [local, rest] = splitProps(merged, [\n \"actionRef\",\n \"class\",\n \"classes\",\n \"center\",\n \"duration\",\n \"color\",\n \"ref\",\n \"style\",\n ]);\n\n const [ripples, setRipples] = createSignal<RippleEntry[]>([]);\n let nextKey = 0;\n\n const onRipple = (event: MouseEvent): void => {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const diameter = Math.max(rect.width, rect.height);\n const radius = diameter / 2;\n\n let coordX: number;\n let coordY: number;\n if (local.center) {\n coordX = rect.width > rect.height ? 0 : rect.width / 2 - radius;\n coordY = rect.height > rect.width ? 0 : rect.height / 2 - radius;\n } else {\n coordX = event.clientX - rect.left - radius;\n coordY = event.clientY - rect.top - radius;\n }\n\n const key = nextKey++;\n setRipples((prev) => [...prev, { key, x: coordX, y: coordY, size: diameter }]);\n setTimeout(() => setRipples((prev) => prev.slice(1)), local.duration);\n };\n\n local.actionRef?.({ onRipple });\n\n return (\n <span\n {...rest}\n ref={mergeRefs(local.ref)}\n class={cn(\"smwb-ripple\", local.class, local.classes?.ripple)}\n data-testid=\"ripple\"\n aria-hidden=\"true\"\n >\n <For each={ripples()}>\n {(ripple) => (\n <span\n class={cn(\"smwb-ripple__child\", local.classes?.child)}\n style={{\n left: `${ripple.x}px`,\n top: `${ripple.y}px`,\n width: `${ripple.size}px`,\n height: `${ripple.size}px`,\n \"background-color\": local.color,\n }}\n />\n )}\n </For>\n </span>\n );\n}\n\nexport default Ripple;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,KAAK,cAAc,YAAY,kBAAkB;AACpE,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAkC7B,SAAS,OAAO,OAAiC;AACtD,QAAM,SAAS,WAAW,EAAE,UAAU,IAAI,GAAG,KAAK;AAClD,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,CAAC,SAAS,UAAU,IAAI,aAA4B,CAAC,CAAC;AAC5D,MAAI,UAAU;AAEd,QAAM,WAAW,CAAC,UAA4B;AAC5C,UAAM,SAAS,MAAM;AACrB,UAAM,OAAO,OAAO,sBAAsB;AAC1C,UAAM,WAAW,KAAK,IAAI,KAAK,OAAO,KAAK,MAAM;AACjD,UAAM,SAAS,WAAW;AAE1B,QAAI;AACJ,QAAI;AACJ,QAAI,MAAM,QAAQ;AAChB,eAAS,KAAK,QAAQ,KAAK,SAAS,IAAI,KAAK,QAAQ,IAAI;AACzD,eAAS,KAAK,SAAS,KAAK,QAAQ,IAAI,KAAK,SAAS,IAAI;AAAA,IAC5D,OAAO;AACL,eAAS,MAAM,UAAU,KAAK,OAAO;AACrC,eAAS,MAAM,UAAU,KAAK,MAAM;AAAA,IACtC;AAEA,UAAM,MAAM;AACZ,eAAW,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,MAAM,SAAS,CAAC,CAAC;AAC7E,eAAW,MAAM,WAAW,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,GAAG,MAAM,QAAQ;AAAA,EACtE;AAEA,QAAM,YAAY,EAAE,SAAS,CAAC;AAE9B,SACE,CAAC;AAAA,QACK;AAAA,IACJ,KAAK,UAAU,MAAM,GAAG;AAAA,IACxB,OAAO,GAAG,eAAe,MAAM,OAAO,MAAM,SAAS,MAAM;AAAA,IAC3D,YAAY;AAAA,IACZ,YAAY;AAAA,GACb;AAAA,MACC,CAAC,IAAI,MAAM,QAAQ,GAAG;AAAA,SACnB,CAAC,WACA,CAAC;AAAA,IACC,OAAO,GAAG,sBAAsB,MAAM,SAAS,KAAK;AAAA,IACpD,OAAO;AAAA,MACL,MAAM,GAAG,OAAO,CAAC;AAAA,MACjB,KAAK,GAAG,OAAO,CAAC;AAAA,MAChB,OAAO,GAAG,OAAO,IAAI;AAAA,MACrB,QAAQ,GAAG,OAAO,IAAI;AAAA,MACtB,oBAAoB,MAAM;AAAA,IAC5B;AAAA,EACF,GACA;AAAA,MACJ,EAbC,IAaK;AAAA,IACR,EArBC;AAuBL;AAEA,IAAO,iBAAQ;","names":[],"file":"ripple.jsx"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { children as resolveChildren, createEffect, mergeProps, onCleanup, onMount } from "solid-js";
|
|
2
|
+
function mapEventPropToEvent(eventProp) {
|
|
3
|
+
return eventProp.substring(2).toLowerCase();
|
|
4
|
+
}
|
|
5
|
+
function clickedRootScrollbar(event, doc) {
|
|
6
|
+
return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
|
|
7
|
+
}
|
|
8
|
+
function ClickAwayListener(props) {
|
|
9
|
+
const merged = mergeProps(
|
|
10
|
+
{ mouseEvent: "onMouseUp", touchEvent: "onTouchEnd", enabled: true },
|
|
11
|
+
props
|
|
12
|
+
);
|
|
13
|
+
const resolved = resolveChildren(() => merged.children);
|
|
14
|
+
const getNode = () => {
|
|
15
|
+
const c = resolved();
|
|
16
|
+
const el = Array.isArray(c) ? c.find((x) => x instanceof Element) : c;
|
|
17
|
+
return el instanceof Element ? el : void 0;
|
|
18
|
+
};
|
|
19
|
+
let activated = false;
|
|
20
|
+
let moved = false;
|
|
21
|
+
onMount(() => {
|
|
22
|
+
const timer = setTimeout(() => {
|
|
23
|
+
activated = true;
|
|
24
|
+
}, 0);
|
|
25
|
+
onCleanup(() => clearTimeout(timer));
|
|
26
|
+
});
|
|
27
|
+
const handleClickAway = (event) => {
|
|
28
|
+
const node = getNode();
|
|
29
|
+
if (!merged.enabled || !activated || !node || "clientX" in event && clickedRootScrollbar(event, document)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (moved) {
|
|
33
|
+
moved = false;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
let insideDOM;
|
|
37
|
+
if (event.composedPath) {
|
|
38
|
+
insideDOM = event.composedPath().indexOf(node) > -1;
|
|
39
|
+
} else {
|
|
40
|
+
const target = event.target;
|
|
41
|
+
insideDOM = !document.documentElement.contains(target) || node.contains(target);
|
|
42
|
+
}
|
|
43
|
+
if (!insideDOM) {
|
|
44
|
+
merged.onClickAway(event);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
createEffect(() => {
|
|
48
|
+
const handleTouchMove = () => {
|
|
49
|
+
moved = true;
|
|
50
|
+
};
|
|
51
|
+
if (merged.touchEvent !== false) {
|
|
52
|
+
const mapped = mapEventPropToEvent(merged.touchEvent);
|
|
53
|
+
document.addEventListener(mapped, handleClickAway);
|
|
54
|
+
document.addEventListener("touchmove", handleTouchMove);
|
|
55
|
+
onCleanup(() => {
|
|
56
|
+
document.removeEventListener(mapped, handleClickAway);
|
|
57
|
+
document.removeEventListener("touchmove", handleTouchMove);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (merged.mouseEvent !== false) {
|
|
61
|
+
const mapped = mapEventPropToEvent(merged.mouseEvent);
|
|
62
|
+
document.addEventListener(mapped, handleClickAway);
|
|
63
|
+
onCleanup(() => document.removeEventListener(mapped, handleClickAway));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return <>{resolved()}</>;
|
|
67
|
+
}
|
|
68
|
+
var clickAwayListener_default = ClickAwayListener;
|
|
69
|
+
export {
|
|
70
|
+
ClickAwayListener,
|
|
71
|
+
clickAwayListener_default as default
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=clickAwayListener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/clickAwayListener/clickAwayListener.tsx"],"sourcesContent":["import { type JSX, children as resolveChildren, createEffect, mergeProps, onCleanup, onMount } from \"solid-js\";\n\ntype ClickAwayMouseEventHandler = \"onClick\" | \"onMouseDown\" | \"onMouseUp\" | \"onPointerDown\" | \"onPointerUp\";\ntype ClickAwayTouchEventHandler = \"onTouchStart\" | \"onTouchEnd\";\n\ntype MappedEvent = \"click\" | \"mousedown\" | \"mouseup\" | \"touchstart\" | \"touchend\" | \"pointerdown\" | \"pointerup\";\n\nfunction mapEventPropToEvent(eventProp: ClickAwayMouseEventHandler | ClickAwayTouchEventHandler): MappedEvent {\n return eventProp.substring(2).toLowerCase() as MappedEvent;\n}\n\nfunction clickedRootScrollbar(event: MouseEvent, doc: Document): boolean {\n return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;\n}\n\nexport interface ClickAwayListenerProps {\n children: JSX.Element;\n mouseEvent?: ClickAwayMouseEventHandler | false;\n onClickAway: (event: MouseEvent | TouchEvent) => void;\n touchEvent?: ClickAwayTouchEventHandler | false;\n /** When false, the listener is inert without unmounting the child. */\n enabled?: boolean;\n}\n\n/**\n * Solid redesign of MUI's ClickAwayListener. React's version cloned the child\n * to inject a ref + synthetic handlers; Solid resolves the child to its DOM\n * node and uses `composedPath`/`contains` containment checks against document\n * listeners — no element cloning.\n */\nexport function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element {\n const merged = mergeProps(\n { mouseEvent: \"onMouseUp\" as ClickAwayMouseEventHandler, touchEvent: \"onTouchEnd\" as ClickAwayTouchEventHandler, enabled: true },\n props\n );\n const resolved = resolveChildren(() => merged.children);\n\n const getNode = (): Element | undefined => {\n const c = resolved();\n const el = Array.isArray(c) ? c.find((x) => x instanceof Element) : c;\n return el instanceof Element ? el : undefined;\n };\n\n let activated = false;\n let moved = false;\n\n onMount(() => {\n // Defer activation a tick so the opening interaction doesn't immediately\n // trigger a click-away (see facebook/react#20074).\n const timer = setTimeout(() => {\n activated = true;\n }, 0);\n onCleanup(() => clearTimeout(timer));\n });\n\n const handleClickAway = (event: MouseEvent | TouchEvent): void => {\n const node = getNode();\n if (!merged.enabled || !activated || !node || (\"clientX\" in event && clickedRootScrollbar(event, document))) {\n return;\n }\n if (moved) {\n moved = false;\n return;\n }\n let insideDOM: boolean;\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(node) > -1;\n } else {\n const target = event.target as HTMLElement;\n insideDOM = !document.documentElement.contains(target) || node.contains(target);\n }\n if (!insideDOM) {\n merged.onClickAway(event);\n }\n };\n\n createEffect(() => {\n const handleTouchMove = (): void => {\n moved = true;\n };\n if (merged.touchEvent !== false) {\n const mapped = mapEventPropToEvent(merged.touchEvent);\n document.addEventListener(mapped, handleClickAway as EventListener);\n document.addEventListener(\"touchmove\", handleTouchMove);\n onCleanup(() => {\n document.removeEventListener(mapped, handleClickAway as EventListener);\n document.removeEventListener(\"touchmove\", handleTouchMove);\n });\n }\n if (merged.mouseEvent !== false) {\n const mapped = mapEventPropToEvent(merged.mouseEvent);\n document.addEventListener(mapped, handleClickAway as EventListener);\n onCleanup(() => document.removeEventListener(mapped, handleClickAway as EventListener));\n }\n });\n\n return <>{resolved()}</>;\n}\n\nexport default ClickAwayListener;\n"],"mappings":"AAAA,SAAmB,YAAY,iBAAiB,cAAc,YAAY,WAAW,eAAe;AAOpG,SAAS,oBAAoB,WAAiF;AAC5G,SAAO,UAAU,UAAU,CAAC,EAAE,YAAY;AAC5C;AAEA,SAAS,qBAAqB,OAAmB,KAAwB;AACvE,SAAO,IAAI,gBAAgB,cAAc,MAAM,WAAW,IAAI,gBAAgB,eAAe,MAAM;AACrG;AAiBO,SAA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