@smwb/ui-solid 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/styles/less/components/appBar/appBar.entry.css +1 -1
- package/dist/components/layout/appLayout/appLayout.js +43 -43
- package/dist/components/layout/appLayout/appLayout.js.map +1 -1
- package/dist/components/navigation/bottomBar/bottomBar.js +31 -30
- package/dist/components/navigation/bottomBar/bottomBar.js.map +1 -1
- package/dist/components/navigation/sidebar/sidebar.js +48 -47
- package/dist/components/navigation/sidebar/sidebar.js.map +1 -1
- package/dist/headless/components/layout/appLayout/appLayout.js +43 -43
- package/dist/headless/components/layout/appLayout/appLayout.js.map +1 -1
- package/dist/headless/components/navigation/bottomBar/bottomBar.js +31 -30
- package/dist/headless/components/navigation/bottomBar/bottomBar.js.map +1 -1
- package/dist/headless/components/navigation/sidebar/sidebar.js +48 -47
- package/dist/headless/components/navigation/sidebar/sidebar.js.map +1 -1
- 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 +104 -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 +135 -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 +115 -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/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 +105 -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 +136 -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 +116 -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/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 +11 -5
- package/dist/ssr.ssr-spec.d.ts +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import "@smwb/ui-styles/less/components/modal/modal.entry.less";
|
|
2
|
+
import { Show, createEffect, mergeProps, onCleanup, splitProps } from "solid-js";
|
|
3
|
+
import { Dynamic, Portal, isServer } from "solid-js/web";
|
|
4
|
+
import cn from "clsx";
|
|
5
|
+
import { createCssTransition } from "../../../primitives/createCssTransition";
|
|
6
|
+
import { createFocusTrap } from "../../../primitives/createFocusTrap";
|
|
7
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
8
|
+
const OVERLAY_CLASSNAMES = {
|
|
9
|
+
appear: "smwb-modal__overlay-appear",
|
|
10
|
+
appearActive: "smwb-modal__overlay-appear-active",
|
|
11
|
+
appearDone: "smwb-modal__overlay-appear-done",
|
|
12
|
+
enter: "smwb-modal__overlay-enter",
|
|
13
|
+
enterActive: "smwb-modal__overlay-enter-active",
|
|
14
|
+
enterDone: "smwb-modal__overlay-enter-done",
|
|
15
|
+
exit: "smwb-modal__overlay-exit",
|
|
16
|
+
exitActive: "smwb-modal__overlay-exit-active"
|
|
17
|
+
};
|
|
18
|
+
function ModalBase(props) {
|
|
19
|
+
const merged = mergeProps(
|
|
20
|
+
{
|
|
21
|
+
animation: "fade",
|
|
22
|
+
backdrop: "dark",
|
|
23
|
+
size: "large",
|
|
24
|
+
closeOnOutsideClick: true,
|
|
25
|
+
asForm: false,
|
|
26
|
+
disableAppearAnimation: false,
|
|
27
|
+
role: "dialog",
|
|
28
|
+
closeOnEsc: true
|
|
29
|
+
},
|
|
30
|
+
props
|
|
31
|
+
);
|
|
32
|
+
const [local, rest] = splitProps(merged, [
|
|
33
|
+
"children",
|
|
34
|
+
"onClose",
|
|
35
|
+
"open",
|
|
36
|
+
"class",
|
|
37
|
+
"animation",
|
|
38
|
+
"backdrop",
|
|
39
|
+
"size",
|
|
40
|
+
"closeOnOutsideClick",
|
|
41
|
+
"asForm",
|
|
42
|
+
"disableAppearAnimation",
|
|
43
|
+
"role",
|
|
44
|
+
"closeOnEsc",
|
|
45
|
+
"ref"
|
|
46
|
+
]);
|
|
47
|
+
let contentEl;
|
|
48
|
+
const transition = createCssTransition({
|
|
49
|
+
in: () => local.open,
|
|
50
|
+
timeout: { appear: 225, enter: 225, exit: 150 },
|
|
51
|
+
classNames: OVERLAY_CLASSNAMES,
|
|
52
|
+
appear: !local.disableAppearAnimation
|
|
53
|
+
});
|
|
54
|
+
createFocusTrap({ active: () => local.open && transition.mounted(), container: () => contentEl });
|
|
55
|
+
createEffect(() => {
|
|
56
|
+
if (!local.open || !local.closeOnEsc || !local.onClose) return;
|
|
57
|
+
const onKeyDown = (event) => {
|
|
58
|
+
if (event.key === "Escape") local.onClose?.();
|
|
59
|
+
};
|
|
60
|
+
document.addEventListener("keydown", onKeyDown);
|
|
61
|
+
onCleanup(() => document.removeEventListener("keydown", onKeyDown));
|
|
62
|
+
});
|
|
63
|
+
return <Show when={transition.mounted()}>
|
|
64
|
+
<Portal mount={isServer ? void 0 : document.body}>
|
|
65
|
+
<div
|
|
66
|
+
class={cn("smwb-modal__overlay", `smwb-${local.backdrop}`, `smwb-${local.size}`, transition.classes())}
|
|
67
|
+
onClick={local.closeOnOutsideClick && local.onClose ? () => local.onClose?.() : void 0}
|
|
68
|
+
>
|
|
69
|
+
<Dynamic
|
|
70
|
+
component={local.asForm ? "form" : "div"}
|
|
71
|
+
{...rest}
|
|
72
|
+
ref={mergeRefs(local.ref, (el) => contentEl = el)}
|
|
73
|
+
class={cn("smwb-modal", `smwb-${local.size}`, `smwb-${local.animation}`, local.class)}
|
|
74
|
+
onClick={(event) => event.stopPropagation()}
|
|
75
|
+
role={local.role}
|
|
76
|
+
aria-modal="true"
|
|
77
|
+
>
|
|
78
|
+
{local.children}
|
|
79
|
+
</Dynamic>
|
|
80
|
+
</div>
|
|
81
|
+
</Portal>
|
|
82
|
+
</Show>;
|
|
83
|
+
}
|
|
84
|
+
function Header(props) {
|
|
85
|
+
return <div class={cn("smwb-modal__header", props.class)}>{props.children}</div>;
|
|
86
|
+
}
|
|
87
|
+
function Content(props) {
|
|
88
|
+
return <div class={cn("smwb-modal__content", props.class)}>{props.children}</div>;
|
|
89
|
+
}
|
|
90
|
+
function Footer(props) {
|
|
91
|
+
return <div class={cn("smwb-modal__footer", props.class)}>{props.children}</div>;
|
|
92
|
+
}
|
|
93
|
+
const Modal = Object.assign(ModalBase, { Footer, Header, Content });
|
|
94
|
+
var modal_default = Modal;
|
|
95
|
+
export {
|
|
96
|
+
Content,
|
|
97
|
+
Footer,
|
|
98
|
+
Header,
|
|
99
|
+
Modal,
|
|
100
|
+
modal_default as default
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=modal.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/feedBack/modal/modal.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/modal/modal.entry.less\";\nimport { type JSX, type ParentProps, Show, createEffect, mergeProps, onCleanup, splitProps } from \"solid-js\";\nimport { Dynamic, Portal, isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { createCssTransition } from \"../../../primitives/createCssTransition\";\nimport { createFocusTrap } from \"../../../primitives/createFocusTrap\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface ModalProps {\n size?: \"small\" | \"medium\" | \"large\" | \"fullscreen\";\n closeOnOutsideClick?: boolean;\n onClose?: () => void;\n open: boolean;\n animation?: \"fade\" | \"scale\" | \"drop\";\n class?: string;\n backdrop?: \"blured\" | \"dark\" | \"transparent\" | \"darkBlured\";\n asForm?: boolean;\n disableAppearAnimation?: boolean;\n /** ARIA role of the dialog. */\n role?: \"dialog\" | \"alertdialog\";\n /** Close the modal when Escape is pressed. */\n closeOnEsc?: boolean;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n \"aria-describedby\"?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst OVERLAY_CLASSNAMES = {\n appear: \"smwb-modal__overlay-appear\",\n appearActive: \"smwb-modal__overlay-appear-active\",\n appearDone: \"smwb-modal__overlay-appear-done\",\n enter: \"smwb-modal__overlay-enter\",\n enterActive: \"smwb-modal__overlay-enter-active\",\n enterDone: \"smwb-modal__overlay-enter-done\",\n exit: \"smwb-modal__overlay-exit\",\n exitActive: \"smwb-modal__overlay-exit-active\",\n};\n\nfunction ModalBase(props: ParentProps<ModalProps>): JSX.Element {\n const merged = mergeProps(\n {\n animation: \"fade\" as const,\n backdrop: \"dark\" as const,\n size: \"large\" as const,\n closeOnOutsideClick: true,\n asForm: false,\n disableAppearAnimation: false,\n role: \"dialog\" as const,\n closeOnEsc: true,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"children\",\n \"onClose\",\n \"open\",\n \"class\",\n \"animation\",\n \"backdrop\",\n \"size\",\n \"closeOnOutsideClick\",\n \"asForm\",\n \"disableAppearAnimation\",\n \"role\",\n \"closeOnEsc\",\n \"ref\",\n ]);\n\n let contentEl: HTMLDivElement | undefined;\n\n const transition = createCssTransition({\n in: () => local.open,\n timeout: { appear: 225, enter: 225, exit: 150 },\n classNames: OVERLAY_CLASSNAMES,\n appear: !local.disableAppearAnimation,\n });\n\n createFocusTrap({ active: () => local.open && transition.mounted(), container: () => contentEl });\n\n createEffect(() => {\n if (!local.open || !local.closeOnEsc || !local.onClose) return;\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") local.onClose?.();\n };\n document.addEventListener(\"keydown\", onKeyDown);\n onCleanup(() => document.removeEventListener(\"keydown\", onKeyDown));\n });\n\n return (\n <Show when={transition.mounted()}>\n <Portal mount={(isServer ? undefined : document.body) as Node}>\n <div\n class={cn(\"smwb-modal__overlay\", `smwb-${local.backdrop}`, `smwb-${local.size}`, transition.classes())}\n onClick={local.closeOnOutsideClick && local.onClose ? () => local.onClose?.() : undefined}\n >\n <Dynamic\n component={local.asForm ? \"form\" : \"div\"}\n {...rest}\n ref={mergeRefs(local.ref, (el) => (contentEl = el as HTMLDivElement))}\n class={cn(\"smwb-modal\", `smwb-${local.size}`, `smwb-${local.animation}`, local.class)}\n onClick={(event: MouseEvent) => event.stopPropagation()}\n role={local.role}\n aria-modal=\"true\"\n >\n {local.children}\n </Dynamic>\n </div>\n </Portal>\n </Show>\n );\n}\n\nexport interface ModalSlotProps {\n class?: string;\n}\n\nexport function Header(props: ParentProps<ModalSlotProps>): JSX.Element {\n return <div class={cn(\"smwb-modal__header\", props.class)}>{props.children}</div>;\n}\n\nexport function Content(props: ParentProps<ModalSlotProps>): JSX.Element {\n return <div class={cn(\"smwb-modal__content\", props.class)}>{props.children}</div>;\n}\n\nexport function Footer(props: ParentProps<ModalSlotProps>): JSX.Element {\n return <div class={cn(\"smwb-modal__footer\", props.class)}>{props.children}</div>;\n}\n\nexport const Modal = Object.assign(ModalBase, { Footer, Header, Content });\n\nexport default Modal;\n"],"mappings":"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","names":[],"file":"modal.jsx"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/feedBack/progressIndicator/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { ProgressIndicator, CircularProgress, default } from \"./progressIndicator\";\nexport type { ProgressIndicatorProps, ProgressColor, CircularProgressProps } from \"./progressIndicator\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mBAAmB,kBAAkB,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "@smwb/ui-styles/less/components/progressIndicator/progressIndicator.entry.less";
|
|
2
|
+
import { Show, createEffect, mergeProps, splitProps } from "solid-js";
|
|
3
|
+
import cn from "clsx";
|
|
4
|
+
function CircularProgress(props) {
|
|
5
|
+
let circle;
|
|
6
|
+
createEffect(() => {
|
|
7
|
+
const value = props.progressValue ?? 0;
|
|
8
|
+
if (!circle || !circle.r) return;
|
|
9
|
+
const radius = circle.r.baseVal.value;
|
|
10
|
+
if (radius) {
|
|
11
|
+
const length = 2 * Math.PI * radius;
|
|
12
|
+
circle.style.strokeDasharray = `${length} ${length}`;
|
|
13
|
+
circle.style.strokeDashoffset = `${length - value / 100 * length}`;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return <svg class="smwb-indicator_circular__svg">
|
|
17
|
+
<circle class="smwb-indicator_circular__circle" cx="24" cy="24" r="22" ref={circle} />
|
|
18
|
+
</svg>;
|
|
19
|
+
}
|
|
20
|
+
function ProgressIndicator(props) {
|
|
21
|
+
const merged = mergeProps({ progressValue: 0, color: "primary", size: "medium" }, props);
|
|
22
|
+
const [local] = splitProps(merged, ["type", "variant", "class", "progressValue", "color", "size", "aria-label", "id"]);
|
|
23
|
+
const colorClass = () => local.color !== "primary" ? `smwb-indicator_color-${local.color}` : void 0;
|
|
24
|
+
const ariaProps = () => ({
|
|
25
|
+
role: "progressbar",
|
|
26
|
+
"aria-label": local["aria-label"],
|
|
27
|
+
id: local.id,
|
|
28
|
+
...local.type === "determinate" ? { "aria-valuenow": local.progressValue, "aria-valuemin": 0, "aria-valuemax": 100 } : {}
|
|
29
|
+
});
|
|
30
|
+
return <Show
|
|
31
|
+
when={local.variant === "circular"}
|
|
32
|
+
fallback={<div {...ariaProps()} class={cn("smwb-indicator_linear", `smwb-${local.type}`, colorClass(), local.class)}>
|
|
33
|
+
<div
|
|
34
|
+
class="smwb-indicator_linear__thumb"
|
|
35
|
+
style={local.type === "determinate" ? { width: `${local.progressValue}%` } : {}}
|
|
36
|
+
/>
|
|
37
|
+
</div>}
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
{...ariaProps()}
|
|
41
|
+
class={cn(
|
|
42
|
+
"smwb-indicator_circular",
|
|
43
|
+
`smwb-${local.type}`,
|
|
44
|
+
colorClass(),
|
|
45
|
+
`smwb-indicator_size-${local.size}`,
|
|
46
|
+
local.class
|
|
47
|
+
)}
|
|
48
|
+
>
|
|
49
|
+
<Show
|
|
50
|
+
when={local.type === "determinate"}
|
|
51
|
+
fallback={<>
|
|
52
|
+
<div class="smwb-indicator_circular__thumb" />
|
|
53
|
+
<div />
|
|
54
|
+
<div />
|
|
55
|
+
<div />
|
|
56
|
+
</>}
|
|
57
|
+
>
|
|
58
|
+
<CircularProgress progressValue={local.progressValue} />
|
|
59
|
+
</Show>
|
|
60
|
+
</div>
|
|
61
|
+
</Show>;
|
|
62
|
+
}
|
|
63
|
+
var progressIndicator_default = ProgressIndicator;
|
|
64
|
+
export {
|
|
65
|
+
CircularProgress,
|
|
66
|
+
ProgressIndicator,
|
|
67
|
+
progressIndicator_default as default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=progressIndicator.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/feedBack/progressIndicator/progressIndicator.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/progressIndicator/progressIndicator.entry.less\";\nimport { type JSX, Show, createEffect, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\n\nexport type ProgressColor = \"primary\" | \"secondary\" | \"error\" | \"success\" | \"warning\" | \"info\";\n\nexport interface ProgressIndicatorProps {\n class?: string;\n variant: \"circular\" | \"linear\";\n type: \"determinate\" | \"indeterminate\";\n progressValue?: number;\n /** Semantic color. */\n color?: ProgressColor;\n /** Circular size preset. */\n size?: \"small\" | \"medium\" | \"large\";\n /** Accessible name for the progress bar. */\n \"aria-label\"?: string;\n id?: string;\n}\n\nexport interface CircularProgressProps {\n progressValue?: number;\n}\n\nexport function CircularProgress(props: CircularProgressProps): JSX.Element {\n let circle: SVGCircleElement | undefined;\n\n createEffect(() => {\n const value = props.progressValue ?? 0;\n if (!circle || !circle.r) return;\n const radius = circle.r.baseVal.value;\n if (radius) {\n const length = 2 * Math.PI * radius;\n circle.style.strokeDasharray = `${length} ${length}`;\n circle.style.strokeDashoffset = `${length - (value / 100) * length}`;\n }\n });\n\n return (\n <svg class=\"smwb-indicator_circular__svg\">\n <circle class=\"smwb-indicator_circular__circle\" cx=\"24\" cy=\"24\" r=\"22\" ref={circle} />\n </svg>\n );\n}\n\nexport function ProgressIndicator(props: ProgressIndicatorProps): JSX.Element {\n const merged = mergeProps({ progressValue: 0, color: \"primary\" as ProgressColor, size: \"medium\" as const }, props);\n const [local] = splitProps(merged, [\"type\", \"variant\", \"class\", \"progressValue\", \"color\", \"size\", \"aria-label\", \"id\"]);\n\n const colorClass = (): string | undefined =>\n local.color !== \"primary\" ? `smwb-indicator_color-${local.color}` : undefined;\n\n const ariaProps = (): JSX.HTMLAttributes<HTMLDivElement> => ({\n role: \"progressbar\",\n \"aria-label\": local[\"aria-label\"],\n id: local.id,\n ...(local.type === \"determinate\"\n ? { \"aria-valuenow\": local.progressValue, \"aria-valuemin\": 0, \"aria-valuemax\": 100 }\n : {}),\n });\n\n return (\n <Show\n when={local.variant === \"circular\"}\n fallback={\n <div {...ariaProps()} class={cn(\"smwb-indicator_linear\", `smwb-${local.type}`, colorClass(), local.class)}>\n <div\n class=\"smwb-indicator_linear__thumb\"\n style={local.type === \"determinate\" ? { width: `${local.progressValue}%` } : {}}\n />\n </div>\n }\n >\n <div\n {...ariaProps()}\n class={cn(\n \"smwb-indicator_circular\",\n `smwb-${local.type}`,\n colorClass(),\n `smwb-indicator_size-${local.size}`,\n local.class\n )}\n >\n <Show\n when={local.type === \"determinate\"}\n fallback={\n <>\n <div class=\"smwb-indicator_circular__thumb\" />\n <div />\n <div />\n <div />\n </>\n }\n >\n <CircularProgress progressValue={local.progressValue} />\n </Show>\n </div>\n </Show>\n );\n}\n\nexport default ProgressIndicator;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,MAAM,cAAc,YAAY,kBAAkB;AACrE,OAAO,QAAQ;AAsBR,SAAS,iBAAiB,OAA2C;AAC1E,MAAI;AAEJ,eAAa,MAAM;AACjB,UAAM,QAAQ,MAAM,iBAAiB;AACrC,QAAI,CAAC,UAAU,CAAC,OAAO,EAAG;AAC1B,UAAM,SAAS,OAAO,EAAE,QAAQ;AAChC,QAAI,QAAQ;AACV,YAAM,SAAS,IAAI,KAAK,KAAK;AAC7B,aAAO,MAAM,kBAAkB,GAAG,MAAM,IAAI,MAAM;AAClD,aAAO,MAAM,mBAAmB,GAAG,SAAU,QAAQ,MAAO,MAAM;AAAA,IACpE;AAAA,EACF,CAAC;AAED,SACE,CAAC,IAAI,MAAM,+BAA+B;AAAA,MACxC,CAAC,OAAO,MAAM,kCAAkC,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAK,QAAQ,EAAE;AAAA,IACxF,EAFC;AAIL;AAEO,SAAS,kBAAkB,OAA4C;AAC5E,QAAM,SAAS,WAAW,EAAE,eAAe,GAAG,OAAO,WAA4B,MAAM,SAAkB,GAAG,KAAK;AACjH,QAAM,CAAC,KAAK,IAAI,WAAW,QAAQ,CAAC,QAAQ,WAAW,SAAS,iBAAiB,SAAS,QAAQ,cAAc,IAAI,CAAC;AAErH,QAAM,aAAa,MACjB,MAAM,UAAU,YAAY,wBAAwB,MAAM,KAAK,KAAK;AAEtE,QAAM,YAAY,OAA2C;AAAA,IAC3D,MAAM;AAAA,IACN,cAAc,MAAM,YAAY;AAAA,IAChC,IAAI,MAAM;AAAA,IACV,GAAI,MAAM,SAAS,gBACf,EAAE,iBAAiB,MAAM,eAAe,iBAAiB,GAAG,iBAAiB,IAAI,IACjF,CAAC;AAAA,EACP;AAEA,SACE,CAAC;AAAA,IACC,MAAM,MAAM,YAAY;AAAA,IACxB,UACE,CAAC,QAAQ,UAAU,GAAG,OAAO,GAAG,yBAAyB,QAAQ,MAAM,IAAI,IAAI,WAAW,GAAG,MAAM,KAAK,GAAG;AAAA,UACzG,CAAC;AAAA,MACC,MAAM;AAAA,MACN,OAAO,MAAM,SAAS,gBAAgB,EAAE,OAAO,GAAG,MAAM,aAAa,IAAI,IAAI,CAAC;AAAA,IAChF,EAAE;AAAA,QACJ,EALC;AAAA,GAOJ;AAAA,MACC,CAAC;AAAA,QACK,UAAU;AAAA,IACd,OAAO;AAAA,MACL;AAAA,MACA,QAAQ,MAAM,IAAI;AAAA,MAClB,WAAW;AAAA,MACX,uBAAuB,MAAM,IAAI;AAAA,MACjC,MAAM;AAAA,IACR;AAAA,GACD;AAAA,QACC,CAAC;AAAA,IACC,MAAM,MAAM,SAAS;AAAA,IACrB,UACE,EAAE;AAAA,cACA,CAAC,IAAI,MAAM,iCAAiC,EAAE;AAAA,cAC9C,CAAC,IAAI,EAAE;AAAA,cACP,CAAC,IAAI,EAAE;AAAA,cACP,CAAC,IAAI,EAAE;AAAA,YACT;AAAA,GAEH;AAAA,UACC,CAAC,iBAAiB,eAAe,MAAM,eAAe,EAAE;AAAA,QAC1D,EAZC,KAYM;AAAA,MACT,EAvBC,IAuBK;AAAA,IACR,EAnCC;AAqCL;AAEA,IAAO,4BAAQ;","names":[],"file":"progressIndicator.jsx"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/feedBack/skeleton/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { Skeleton, default } from \"./skeleton\";\nexport type { SkeletonProps } from \"./skeleton\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,UAAU,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "@smwb/ui-styles/less/components/skeleton/skeleton.entry.less";
|
|
2
|
+
import { For, Show, mergeProps, splitProps } from "solid-js";
|
|
3
|
+
import { Dynamic } from "solid-js/web";
|
|
4
|
+
import cn from "clsx";
|
|
5
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
6
|
+
const toCssSize = (value) => typeof value === "number" ? `${value}px` : value;
|
|
7
|
+
function Skeleton(props) {
|
|
8
|
+
const merged = mergeProps(
|
|
9
|
+
{ variant: "text", animation: "pulse", count: 1, component: "span" },
|
|
10
|
+
props
|
|
11
|
+
);
|
|
12
|
+
const [local, rest] = splitProps(merged, [
|
|
13
|
+
"class",
|
|
14
|
+
"variant",
|
|
15
|
+
"width",
|
|
16
|
+
"height",
|
|
17
|
+
"animation",
|
|
18
|
+
"count",
|
|
19
|
+
"animationDelay",
|
|
20
|
+
"component",
|
|
21
|
+
"style",
|
|
22
|
+
"ref"
|
|
23
|
+
]);
|
|
24
|
+
const className = () => cn(
|
|
25
|
+
"smwb-skeleton",
|
|
26
|
+
`smwb-skeleton_${local.variant}`,
|
|
27
|
+
local.animation === false ? "smwb-skeleton_no-animation" : `smwb-skeleton_${local.animation}`,
|
|
28
|
+
local.class
|
|
29
|
+
);
|
|
30
|
+
const itemStyle = (index) => ({
|
|
31
|
+
...typeof local.style === "object" && local.style ? local.style : {},
|
|
32
|
+
width: toCssSize(local.width),
|
|
33
|
+
height: toCssSize(local.height),
|
|
34
|
+
...local.animationDelay ? { "animation-delay": `${index * local.animationDelay}ms` } : {}
|
|
35
|
+
});
|
|
36
|
+
return <Show
|
|
37
|
+
when={local.count > 1}
|
|
38
|
+
fallback={<Dynamic
|
|
39
|
+
component={local.component}
|
|
40
|
+
{...rest}
|
|
41
|
+
ref={mergeRefs(local.ref)}
|
|
42
|
+
data-testid="skeleton"
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
class={className()}
|
|
45
|
+
style={itemStyle(0)}
|
|
46
|
+
/>}
|
|
47
|
+
>
|
|
48
|
+
<span ref={mergeRefs(local.ref)} class="smwb-skeleton__group" aria-hidden="true">
|
|
49
|
+
<For each={Array.from({ length: local.count }, (_, i) => i)}>
|
|
50
|
+
{(index) => <Dynamic
|
|
51
|
+
component={local.component}
|
|
52
|
+
data-testid="skeleton"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
class={className()}
|
|
55
|
+
style={itemStyle(index)}
|
|
56
|
+
/>}
|
|
57
|
+
</For>
|
|
58
|
+
</span>
|
|
59
|
+
</Show>;
|
|
60
|
+
}
|
|
61
|
+
var skeleton_default = Skeleton;
|
|
62
|
+
export {
|
|
63
|
+
Skeleton,
|
|
64
|
+
skeleton_default as default
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=skeleton.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/feedBack/skeleton/skeleton.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/skeleton/skeleton.entry.less\";\nimport { type JSX, For, Show, mergeProps, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface SkeletonProps extends JSX.HTMLAttributes<HTMLElement> {\n /** Shape of the placeholder. */\n variant?: \"text\" | \"circular\" | \"rounded\" | \"rectangular\";\n /** Width — number (px) or any CSS length. */\n width?: number | string;\n /** Height — number (px) or any CSS length. */\n height?: number | string;\n /** Shimmer animation; pass false to disable. */\n animation?: \"pulse\" | \"wave\" | false;\n /** Render N stacked placeholders. */\n count?: number;\n /** Stagger consecutive items by N ms (with `count`). */\n animationDelay?: number;\n /** Root element. */\n component?: \"span\" | \"div\";\n ref?: Ref<HTMLElement>;\n}\n\nconst toCssSize = (value?: number | string): string | undefined => (typeof value === \"number\" ? `${value}px` : value);\n\nexport function Skeleton(props: SkeletonProps): JSX.Element {\n const merged = mergeProps(\n { variant: \"text\" as const, animation: \"pulse\" as const, count: 1, component: \"span\" as const },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"variant\",\n \"width\",\n \"height\",\n \"animation\",\n \"count\",\n \"animationDelay\",\n \"component\",\n \"style\",\n \"ref\",\n ]);\n\n const className = (): string =>\n cn(\n \"smwb-skeleton\",\n `smwb-skeleton_${local.variant}`,\n local.animation === false ? \"smwb-skeleton_no-animation\" : `smwb-skeleton_${local.animation}`,\n local.class\n );\n\n const itemStyle = (index: number): JSX.CSSProperties => ({\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n width: toCssSize(local.width),\n height: toCssSize(local.height),\n ...(local.animationDelay ? { \"animation-delay\": `${index * local.animationDelay}ms` } : {}),\n });\n\n return (\n <Show\n when={local.count > 1}\n fallback={\n <Dynamic\n component={local.component}\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid=\"skeleton\"\n aria-hidden=\"true\"\n class={className()}\n style={itemStyle(0)}\n />\n }\n >\n <span ref={mergeRefs(local.ref)} class=\"smwb-skeleton__group\" aria-hidden=\"true\">\n <For each={Array.from({ length: local.count }, (_, i) => i)}>\n {(index) => (\n <Dynamic\n component={local.component}\n data-testid=\"skeleton\"\n aria-hidden=\"true\"\n class={className()}\n style={itemStyle(index)}\n />\n )}\n </For>\n </span>\n </Show>\n );\n}\n\nexport default Skeleton;\n"],"mappings":"AAAA,OAAO;AACP,SAAmB,KAAK,MAAM,YAAY,kBAAkB;AAC5D,SAAS,eAAe;AACxB,OAAO,QAAQ;AACf,SAAS,iBAA2B;AAoBpC,MAAM,YAAY,CAAC,UAAiD,OAAO,UAAU,WAAW,GAAG,KAAK,OAAO;AAExG,SAAS,SAAS,OAAmC;AAC1D,QAAM,SAAS;AAAA,IACb,EAAE,SAAS,QAAiB,WAAW,SAAkB,OAAO,GAAG,WAAW,OAAgB;AAAA,IAC9F;AAAA,EACF;AACA,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,YAAY,MAChB;AAAA,IACE;AAAA,IACA,iBAAiB,MAAM,OAAO;AAAA,IAC9B,MAAM,cAAc,QAAQ,+BAA+B,iBAAiB,MAAM,SAAS;AAAA,IAC3F,MAAM;AAAA,EACR;AAEF,QAAM,YAAY,CAAC,WAAsC;AAAA,IACvD,GAAI,OAAO,MAAM,UAAU,YAAY,MAAM,QAAQ,MAAM,QAAQ,CAAC;AAAA,IACpE,OAAO,UAAU,MAAM,KAAK;AAAA,IAC5B,QAAQ,UAAU,MAAM,MAAM;AAAA,IAC9B,GAAI,MAAM,iBAAiB,EAAE,mBAAmB,GAAG,QAAQ,MAAM,cAAc,KAAK,IAAI,CAAC;AAAA,EAC3F;AAEA,SACE,CAAC;AAAA,IACC,MAAM,MAAM,QAAQ;AAAA,IACpB,UACE,CAAC;AAAA,MACC,WAAW,MAAM;AAAA,UACb;AAAA,MACJ,KAAK,UAAU,MAAM,GAAG;AAAA,MACxB,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,OAAO,UAAU;AAAA,MACjB,OAAO,UAAU,CAAC;AAAA,IACpB;AAAA,GAEH;AAAA,MACC,CAAC,KAAK,KAAK,UAAU,MAAM,GAAG,GAAG,MAAM,uBAAuB,YAAY,OAAO;AAAA,QAC/E,CAAC,IAAI,MAAM,MAAM,KAAK,EAAE,QAAQ,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG;AAAA,WAC1D,CAAC,UACA,CAAC;AAAA,IACC,WAAW,MAAM;AAAA,IACjB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO,UAAU;AAAA,IACjB,OAAO,UAAU,KAAK;AAAA,EACxB,GACA;AAAA,QACJ,EAVC,IAUK;AAAA,MACR,EAZC,KAYM;AAAA,IACT,EA3BC;AA6BL;AAEA,IAAO,mBAAQ;","names":[],"file":"skeleton.jsx"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/feedBack/snackbar/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { SnackbarProvider, Snackbar, useSnackbar, variants, positions, default } from \"./snackbar\";\nexport type {\n SnackbarsProviderProps,\n SnackbarProps,\n SnackbarOptions,\n AddSnackbar,\n AddSnackbarOptions,\n Variants,\n Position,\n} from \"./snackbar\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB,UAAU,aAAa,UAAU,WAAW,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import "@smwb/ui-styles/less/components/snackbar/snackbar.entry.less";
|
|
2
|
+
import {
|
|
3
|
+
For,
|
|
4
|
+
Show,
|
|
5
|
+
createContext,
|
|
6
|
+
createSignal,
|
|
7
|
+
mergeProps,
|
|
8
|
+
onCleanup,
|
|
9
|
+
onMount,
|
|
10
|
+
splitProps,
|
|
11
|
+
useContext
|
|
12
|
+
} from "solid-js";
|
|
13
|
+
import { Dynamic, Portal } from "solid-js/web";
|
|
14
|
+
import cn from "clsx";
|
|
15
|
+
import { createSnackbarsPortal } from "./useSnackbarsPortal";
|
|
16
|
+
import { createCssTransition } from "../../../primitives/createCssTransition";
|
|
17
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
18
|
+
const variants = ["dark", "light", "danger", "success", "warning", "info"];
|
|
19
|
+
const positions = ["top", "bottom", "top-left", "top-right", "bottom-right", "bottom-left"];
|
|
20
|
+
const SnackbarContext = createContext({
|
|
21
|
+
addSnackbar: () => "",
|
|
22
|
+
clearAllSnackbars: () => void 0,
|
|
23
|
+
clearFirstSnackbar: () => void 0,
|
|
24
|
+
clearLastSnackbar: () => void 0,
|
|
25
|
+
clearByIdSnackbar: () => void 0
|
|
26
|
+
});
|
|
27
|
+
let snackCounter = 0;
|
|
28
|
+
const SNACKBAR_CLASSNAMES = {
|
|
29
|
+
appear: "smwb-snackbar-enter",
|
|
30
|
+
appearActive: "smwb-snackbar-enter-active",
|
|
31
|
+
appearDone: "smwb-snackbar-enter-done",
|
|
32
|
+
enter: "smwb-snackbar-enter",
|
|
33
|
+
enterActive: "smwb-snackbar-enter-active",
|
|
34
|
+
enterDone: "smwb-snackbar-enter-done",
|
|
35
|
+
exitActive: "smwb-snackbar-exit-active"
|
|
36
|
+
};
|
|
37
|
+
function Snackbar(props) {
|
|
38
|
+
const merged = mergeProps({ variant: "dark", position: "top-right", component: "div" }, props);
|
|
39
|
+
const [local, rest] = splitProps(merged, [
|
|
40
|
+
"class",
|
|
41
|
+
"message",
|
|
42
|
+
"variant",
|
|
43
|
+
"position",
|
|
44
|
+
"onClick",
|
|
45
|
+
"component",
|
|
46
|
+
"isAutoClose",
|
|
47
|
+
"autoCloseTime",
|
|
48
|
+
"onClose",
|
|
49
|
+
"action",
|
|
50
|
+
"transitionClass",
|
|
51
|
+
"ref"
|
|
52
|
+
]);
|
|
53
|
+
let timer;
|
|
54
|
+
onMount(() => {
|
|
55
|
+
if (local.onClose && local.isAutoClose && local.autoCloseTime) {
|
|
56
|
+
timer = setTimeout(() => local.onClose?.(), local.autoCloseTime);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
onCleanup(() => {
|
|
60
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
61
|
+
});
|
|
62
|
+
return <Dynamic
|
|
63
|
+
component={local.component ?? "div"}
|
|
64
|
+
{...rest}
|
|
65
|
+
ref={mergeRefs(local.ref)}
|
|
66
|
+
class={cn("smwb-snackbar", local.class, `smwb-${local.variant}`, `smwb-${local.position}`, local.transitionClass)}
|
|
67
|
+
onClick={local.onClick}
|
|
68
|
+
role="alert"
|
|
69
|
+
aria-live={local.variant === "danger" ? "assertive" : "polite"}
|
|
70
|
+
aria-atomic="true"
|
|
71
|
+
>
|
|
72
|
+
<div class="smwb-snackbar__body">{local.message}</div>
|
|
73
|
+
<Show when={local.action != null}>
|
|
74
|
+
<div class="smwb-snackbar__action">{local.action}</div>
|
|
75
|
+
</Show>
|
|
76
|
+
</Dynamic>;
|
|
77
|
+
}
|
|
78
|
+
function AnimatedSnack(props) {
|
|
79
|
+
const transition = createCssTransition({
|
|
80
|
+
in: () => true,
|
|
81
|
+
appear: true,
|
|
82
|
+
timeout: { appear: 125, enter: 125, exit: 125 },
|
|
83
|
+
classNames: SNACKBAR_CLASSNAMES
|
|
84
|
+
});
|
|
85
|
+
return <Snackbar
|
|
86
|
+
component={props.snack.component ?? props.component}
|
|
87
|
+
message={props.snack.message}
|
|
88
|
+
position={props.snack.position ?? props.position}
|
|
89
|
+
variant={props.snack.variant ?? props.variant}
|
|
90
|
+
class={props.snack.class}
|
|
91
|
+
transitionClass={transition.classes()}
|
|
92
|
+
isAutoClose={props.snack.autoClose ?? props.autoClose}
|
|
93
|
+
autoCloseTime={props.snack.autoCloseTime ?? props.autoCloseTime}
|
|
94
|
+
onClick={() => props.onRemove(props.snack.id)}
|
|
95
|
+
onClose={() => props.onClose(props.snack.id)}
|
|
96
|
+
/>;
|
|
97
|
+
}
|
|
98
|
+
function SnackbarProvider(props) {
|
|
99
|
+
const merged = mergeProps(
|
|
100
|
+
{
|
|
101
|
+
position: "top-right",
|
|
102
|
+
variant: "dark",
|
|
103
|
+
autoClose: true,
|
|
104
|
+
autoCloseTime: 5e3,
|
|
105
|
+
closeOnClick: true,
|
|
106
|
+
component: "div"
|
|
107
|
+
},
|
|
108
|
+
props
|
|
109
|
+
);
|
|
110
|
+
const [local] = splitProps(merged, [
|
|
111
|
+
"position",
|
|
112
|
+
"variant",
|
|
113
|
+
"class",
|
|
114
|
+
"autoClose",
|
|
115
|
+
"autoCloseTime",
|
|
116
|
+
"closeOnClick",
|
|
117
|
+
"onClick",
|
|
118
|
+
"component",
|
|
119
|
+
"children"
|
|
120
|
+
]);
|
|
121
|
+
const [snacks, setSnacks] = createSignal([]);
|
|
122
|
+
const portalRoot = createSnackbarsPortal();
|
|
123
|
+
const addSnackbar = (options) => {
|
|
124
|
+
const { key, ...optionRest } = options;
|
|
125
|
+
const id = key ?? `snack-${++snackCounter}`;
|
|
126
|
+
const snack = { id, ...optionRest };
|
|
127
|
+
setSnacks((prev) => {
|
|
128
|
+
const index = prev.findIndex((item) => item.id === id);
|
|
129
|
+
if (index === -1) return [...prev, snack];
|
|
130
|
+
const next = [...prev];
|
|
131
|
+
next[index] = snack;
|
|
132
|
+
return next;
|
|
133
|
+
});
|
|
134
|
+
return id;
|
|
135
|
+
};
|
|
136
|
+
const clearByIdSnackbar = (id) => {
|
|
137
|
+
setSnacks((prev) => prev.filter((item) => item.id !== id));
|
|
138
|
+
};
|
|
139
|
+
const clearAllSnackbars = () => {
|
|
140
|
+
setSnacks([]);
|
|
141
|
+
};
|
|
142
|
+
const clearFirstSnackbar = () => {
|
|
143
|
+
setSnacks((prev) => prev.slice(1));
|
|
144
|
+
};
|
|
145
|
+
const clearLastSnackbar = () => {
|
|
146
|
+
setSnacks((prev) => prev.slice(0, -1));
|
|
147
|
+
};
|
|
148
|
+
const onRemove = (id) => {
|
|
149
|
+
if (local.closeOnClick) clearByIdSnackbar(id);
|
|
150
|
+
};
|
|
151
|
+
const grouped = () => {
|
|
152
|
+
const acc = {};
|
|
153
|
+
for (const snack of snacks()) {
|
|
154
|
+
const pos = snack.position ?? local.position;
|
|
155
|
+
(acc[pos] = acc[pos] ?? []).push(snack);
|
|
156
|
+
}
|
|
157
|
+
return Object.entries(acc);
|
|
158
|
+
};
|
|
159
|
+
return <SnackbarContext.Provider
|
|
160
|
+
value={{ addSnackbar, clearAllSnackbars, clearFirstSnackbar, clearLastSnackbar, clearByIdSnackbar }}
|
|
161
|
+
>
|
|
162
|
+
{local.children}
|
|
163
|
+
<Show when={portalRoot()}>
|
|
164
|
+
<Portal mount={portalRoot()}>
|
|
165
|
+
<For each={grouped()}>
|
|
166
|
+
{([pos, list]) => <div class={cn("smwb-snackbars", `smwb-${pos}`)} data-testid={`snackbars-${pos}`}>
|
|
167
|
+
<For each={list}>
|
|
168
|
+
{(snack) => <AnimatedSnack
|
|
169
|
+
snack={snack}
|
|
170
|
+
position={local.position}
|
|
171
|
+
variant={local.variant}
|
|
172
|
+
component={local.component}
|
|
173
|
+
autoClose={local.autoClose}
|
|
174
|
+
autoCloseTime={local.autoCloseTime}
|
|
175
|
+
onRemove={onRemove}
|
|
176
|
+
onClose={clearByIdSnackbar}
|
|
177
|
+
/>}
|
|
178
|
+
</For>
|
|
179
|
+
</div>}
|
|
180
|
+
</For>
|
|
181
|
+
</Portal>
|
|
182
|
+
</Show>
|
|
183
|
+
</SnackbarContext.Provider>;
|
|
184
|
+
}
|
|
185
|
+
function useSnackbar() {
|
|
186
|
+
return useContext(SnackbarContext);
|
|
187
|
+
}
|
|
188
|
+
var snackbar_default = SnackbarProvider;
|
|
189
|
+
export {
|
|
190
|
+
Snackbar,
|
|
191
|
+
SnackbarProvider,
|
|
192
|
+
snackbar_default as default,
|
|
193
|
+
positions,
|
|
194
|
+
useSnackbar,
|
|
195
|
+
variants
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=snackbar.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/feedBack/snackbar/snackbar.tsx"],"sourcesContent":["import \"@smwb/ui-styles/less/components/snackbar/snackbar.entry.less\";\nimport {\n type JSX,\n type ParentProps,\n For,\n Show,\n createContext,\n createSignal,\n mergeProps,\n onCleanup,\n onMount,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport { Dynamic, Portal } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { createSnackbarsPortal } from \"./useSnackbarsPortal\";\nimport { createCssTransition } from \"../../../primitives/createCssTransition\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport const variants = [\"dark\", \"light\", \"danger\", \"success\", \"warning\", \"info\"] as const;\nexport const positions = [\"top\", \"bottom\", \"top-left\", \"top-right\", \"bottom-right\", \"bottom-left\"] as const;\n\nexport type Variants = (typeof variants)[number];\nexport type Position = (typeof positions)[number];\n\nexport interface SnackbarsProviderProps extends JSX.HTMLAttributes<HTMLElement> {\n variant?: Variants;\n position?: Position;\n autoCloseTime?: number;\n closeOnClick?: boolean;\n autoClose?: boolean;\n component?: string;\n}\n\ninterface Snack {\n id: string;\n message: JSX.Element;\n variant?: Variants | undefined;\n position?: Position | undefined;\n autoClose?: boolean | undefined;\n autoCloseTime?: number | undefined;\n component?: string | undefined;\n class?: string | undefined;\n}\n\nexport interface AddSnackbarOptions {\n key?: string;\n message: JSX.Element;\n variant?: Variants | undefined;\n position?: Position | undefined;\n autoClose?: boolean | undefined;\n autoCloseTime?: number | undefined;\n component?: string | undefined;\n class?: string;\n}\n\nexport type AddSnackbar = (options: AddSnackbarOptions) => string;\n\nexport interface SnackbarOptions {\n addSnackbar: AddSnackbar;\n clearAllSnackbars: () => void;\n clearFirstSnackbar: () => void;\n clearLastSnackbar: () => void;\n clearByIdSnackbar: (id: string) => void;\n}\n\nconst SnackbarContext = createContext<SnackbarOptions>({\n addSnackbar: () => \"\",\n clearAllSnackbars: () => undefined,\n clearFirstSnackbar: () => undefined,\n clearLastSnackbar: () => undefined,\n clearByIdSnackbar: () => undefined,\n});\n\nlet snackCounter = 0;\n\nconst SNACKBAR_CLASSNAMES = {\n appear: \"smwb-snackbar-enter\",\n appearActive: \"smwb-snackbar-enter-active\",\n appearDone: \"smwb-snackbar-enter-done\",\n enter: \"smwb-snackbar-enter\",\n enterActive: \"smwb-snackbar-enter-active\",\n enterDone: \"smwb-snackbar-enter-done\",\n exitActive: \"smwb-snackbar-exit-active\",\n};\n\nexport interface SnackbarProps extends JSX.HTMLAttributes<HTMLElement> {\n message?: JSX.Element;\n variant?: Variants;\n position?: Position;\n component?: string;\n isAutoClose?: boolean;\n autoCloseTime?: number;\n onClose?: () => void;\n /** Optional action node rendered after the message (e.g. an Undo button). */\n action?: JSX.Element;\n /** Enter-transition classes for the appear animation. */\n transitionClass?: string;\n ref?: Ref<HTMLElement>;\n}\n\nexport function Snackbar(props: SnackbarProps): JSX.Element {\n const merged = mergeProps({ variant: \"dark\" as Variants, position: \"top-right\" as Position, component: \"div\" }, props);\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"message\",\n \"variant\",\n \"position\",\n \"onClick\",\n \"component\",\n \"isAutoClose\",\n \"autoCloseTime\",\n \"onClose\",\n \"action\",\n \"transitionClass\",\n \"ref\",\n ]);\n\n let timer: ReturnType<typeof setTimeout> | undefined;\n onMount(() => {\n if (local.onClose && local.isAutoClose && local.autoCloseTime) {\n timer = setTimeout(() => local.onClose?.(), local.autoCloseTime);\n }\n });\n onCleanup(() => {\n if (timer !== undefined) clearTimeout(timer);\n });\n\n return (\n <Dynamic\n component={local.component ?? \"div\"}\n {...rest}\n ref={mergeRefs(local.ref)}\n class={cn(\"smwb-snackbar\", local.class, `smwb-${local.variant}`, `smwb-${local.position}`, local.transitionClass)}\n onClick={local.onClick}\n role=\"alert\"\n aria-live={local.variant === \"danger\" ? \"assertive\" : \"polite\"}\n aria-atomic=\"true\"\n >\n <div class=\"smwb-snackbar__body\">{local.message}</div>\n <Show when={local.action != null}>\n <div class=\"smwb-snackbar__action\">{local.action}</div>\n </Show>\n </Dynamic>\n );\n}\n\nfunction AnimatedSnack(props: {\n snack: Snack;\n position: Position;\n variant: Variants;\n component: string;\n autoClose: boolean;\n autoCloseTime: number;\n onRemove: (id: string) => void;\n onClose: (id: string) => void;\n}): JSX.Element {\n const transition = createCssTransition({\n in: () => true,\n appear: true,\n timeout: { appear: 125, enter: 125, exit: 125 },\n classNames: SNACKBAR_CLASSNAMES,\n });\n return (\n <Snackbar\n component={props.snack.component ?? props.component}\n message={props.snack.message}\n position={props.snack.position ?? props.position}\n variant={props.snack.variant ?? props.variant}\n class={props.snack.class}\n transitionClass={transition.classes()}\n isAutoClose={props.snack.autoClose ?? props.autoClose}\n autoCloseTime={props.snack.autoCloseTime ?? props.autoCloseTime}\n onClick={() => props.onRemove(props.snack.id)}\n onClose={() => props.onClose(props.snack.id)}\n />\n );\n}\n\nexport function SnackbarProvider(props: ParentProps<SnackbarsProviderProps>): JSX.Element {\n const merged = mergeProps(\n {\n position: \"top-right\" as Position,\n variant: \"dark\" as Variants,\n autoClose: true,\n autoCloseTime: 5000,\n closeOnClick: true,\n component: \"div\",\n },\n props\n );\n const [local] = splitProps(merged, [\n \"position\",\n \"variant\",\n \"class\",\n \"autoClose\",\n \"autoCloseTime\",\n \"closeOnClick\",\n \"onClick\",\n \"component\",\n \"children\",\n ]);\n\n const [snacks, setSnacks] = createSignal<Snack[]>([]);\n const portalRoot = createSnackbarsPortal();\n\n const addSnackbar: AddSnackbar = (options) => {\n const { key, ...optionRest } = options;\n const id = key ?? `snack-${++snackCounter}`;\n const snack: Snack = { id, ...optionRest };\n setSnacks((prev) => {\n const index = prev.findIndex((item) => item.id === id);\n if (index === -1) return [...prev, snack];\n const next = [...prev];\n next[index] = snack;\n return next;\n });\n return id;\n };\n\n const clearByIdSnackbar = (id: string): void => {\n setSnacks((prev) => prev.filter((item) => item.id !== id));\n };\n const clearAllSnackbars = (): void => {\n setSnacks([]);\n };\n const clearFirstSnackbar = (): void => {\n setSnacks((prev) => prev.slice(1));\n };\n const clearLastSnackbar = (): void => {\n setSnacks((prev) => prev.slice(0, -1));\n };\n\n const onRemove = (id: string): void => {\n if (local.closeOnClick) clearByIdSnackbar(id);\n };\n\n const grouped = (): Array<[Position, Snack[]]> => {\n const acc = {} as Record<Position, Snack[]>;\n for (const snack of snacks()) {\n const pos = snack.position ?? local.position;\n (acc[pos] = acc[pos] ?? []).push(snack);\n }\n return Object.entries(acc) as Array<[Position, Snack[]]>;\n };\n\n return (\n <SnackbarContext.Provider\n value={{ addSnackbar, clearAllSnackbars, clearFirstSnackbar, clearLastSnackbar, clearByIdSnackbar }}\n >\n {local.children}\n <Show when={portalRoot()}>\n <Portal mount={portalRoot()!}>\n <For each={grouped()}>\n {([pos, list]) => (\n <div class={cn(\"smwb-snackbars\", `smwb-${pos}`)} data-testid={`snackbars-${pos}`}>\n <For each={list}>\n {(snack) => (\n <AnimatedSnack\n snack={snack}\n position={local.position}\n variant={local.variant}\n component={local.component}\n autoClose={local.autoClose}\n autoCloseTime={local.autoCloseTime}\n onRemove={onRemove}\n onClose={clearByIdSnackbar}\n />\n )}\n </For>\n </div>\n )}\n </For>\n </Portal>\n </Show>\n </SnackbarContext.Provider>\n );\n}\n\nexport function useSnackbar(): SnackbarOptions {\n return useContext(SnackbarContext);\n}\n\nexport default SnackbarProvider;\n"],"mappings":"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","names":[],"file":"snackbar.jsx"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createSignal, onCleanup, onMount } from "solid-js";
|
|
2
|
+
let portalCounter = 0;
|
|
3
|
+
function createSnackbarsPortal() {
|
|
4
|
+
const [domElement, setDomElement] = createSignal(null);
|
|
5
|
+
onMount(() => {
|
|
6
|
+
const element = document.createElement("div");
|
|
7
|
+
element.id = `snackbar-portal-${++portalCounter}`;
|
|
8
|
+
document.body.prepend(element);
|
|
9
|
+
setDomElement(element);
|
|
10
|
+
onCleanup(() => {
|
|
11
|
+
if (element.parentNode) {
|
|
12
|
+
element.parentNode.removeChild(element);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
return domElement;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
createSnackbarsPortal
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useSnackbarsPortal.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/feedBack/snackbar/useSnackbarsPortal.ts"],
|
|
4
|
+
"sourcesContent": ["import { type Accessor, createSignal, onCleanup, onMount } from \"solid-js\";\n\nlet portalCounter = 0;\n\n/**\n * Creates a dedicated portal host prepended to <body> for snackbars, cleaned up\n * on unmount. Solid port of summer-ui's useSnackbarsPortal (no uuid dep).\n */\nexport function createSnackbarsPortal(): Accessor<HTMLElement | null> {\n const [domElement, setDomElement] = createSignal<HTMLElement | null>(null);\n\n onMount(() => {\n const element = document.createElement(\"div\");\n element.id = `snackbar-portal-${++portalCounter}`;\n document.body.prepend(element);\n setDomElement(element);\n onCleanup(() => {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n });\n });\n\n return domElement;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAwB,cAAc,WAAW,eAAe;AAEhE,IAAI,gBAAgB;AAMb,SAAS,wBAAsD;AACpE,QAAM,CAAC,YAAY,aAAa,IAAI,aAAiC,IAAI;AAEzE,UAAQ,MAAM;AACZ,UAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,YAAQ,KAAK,mBAAmB,EAAE,aAAa;AAC/C,aAAS,KAAK,QAAQ,OAAO;AAC7B,kBAAc,OAAO;AACrB,cAAU,MAAM;AACd,UAAI,QAAQ,YAAY;AACtB,gBAAQ,WAAW,YAAY,OAAO;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAED,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/feedBack/tooltip/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { Tooltip, default } from \"./tooltip\";\nexport type { TooltipProps, TooltipTrigger } from \"./tooltip\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|