@smwb/ui-solid 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/dataDisplay/carousel/carousel.js +7 -7
- package/dist/components/dataDisplay/carousel/carousel.js.map +1 -1
- package/dist/components/dataDisplay/chat/chatAttachmentImage.js +17 -17
- package/dist/components/dataDisplay/chat/chatAttachmentImage.js.map +1 -1
- package/dist/components/dataDisplay/chat/chatShell.js +16 -16
- package/dist/components/dataDisplay/chat/chatShell.js.map +1 -1
- package/dist/components/dataDisplay/expansionPanel/expansionPanel.js +25 -25
- package/dist/components/dataDisplay/expansionPanel/expansionPanel.js.map +1 -1
- package/dist/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.js +15 -15
- package/dist/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.js.map +1 -1
- package/dist/components/feedBack/modal/modal.js +29 -29
- package/dist/components/feedBack/modal/modal.js.map +1 -1
- package/dist/components/inputs/datePicker/datePicker.js +43 -43
- package/dist/components/inputs/datePicker/datePicker.js.map +1 -1
- package/dist/components/inputs/dateTimePicker/dateTimePicker.js +46 -46
- package/dist/components/inputs/dateTimePicker/dateTimePicker.js.map +1 -1
- package/dist/components/inputs/selectField/dropdownMenu.js +30 -30
- package/dist/components/inputs/selectField/dropdownMenu.js.map +1 -1
- package/dist/components/inputs/slider/slider.js +48 -48
- package/dist/components/inputs/slider/slider.js.map +1 -1
- package/dist/components/inputs/timePicker/timePicker.js +31 -31
- package/dist/components/inputs/timePicker/timePicker.js.map +1 -1
- package/dist/components/layout/sheet/sheet.js +29 -29
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/headless/components/dataDisplay/carousel/carousel.js +20 -20
- package/dist/headless/components/dataDisplay/carousel/carousel.js.map +1 -1
- package/dist/headless/components/dataDisplay/chat/chatAttachmentImage.js +17 -17
- package/dist/headless/components/dataDisplay/chat/chatAttachmentImage.js.map +1 -1
- package/dist/headless/components/dataDisplay/chat/chatShell.js +16 -16
- package/dist/headless/components/dataDisplay/chat/chatShell.js.map +1 -1
- package/dist/headless/components/dataDisplay/expansionPanel/expansionPanel.js +25 -25
- package/dist/headless/components/dataDisplay/expansionPanel/expansionPanel.js.map +1 -1
- package/dist/headless/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.js +15 -15
- package/dist/headless/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.js.map +1 -1
- package/dist/headless/components/feedBack/modal/modal.js +25 -25
- package/dist/headless/components/feedBack/modal/modal.js.map +1 -1
- package/dist/headless/components/inputs/datePicker/datePicker.js +43 -43
- package/dist/headless/components/inputs/datePicker/datePicker.js.map +1 -1
- package/dist/headless/components/inputs/dateTimePicker/dateTimePicker.js +46 -46
- package/dist/headless/components/inputs/dateTimePicker/dateTimePicker.js.map +1 -1
- package/dist/headless/components/inputs/selectField/dropdownMenu.js +30 -30
- package/dist/headless/components/inputs/selectField/dropdownMenu.js.map +1 -1
- package/dist/headless/components/inputs/slider/slider.js +90 -90
- package/dist/headless/components/inputs/slider/slider.js.map +1 -1
- package/dist/headless/components/inputs/timePicker/timePicker.js +31 -31
- package/dist/headless/components/inputs/timePicker/timePicker.js.map +1 -1
- package/dist/headless/components/layout/sheet/sheet.js +29 -29
- package/dist/headless/components/layout/sheet/sheet.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 +101 -0
- package/dist/headless/source/components/layout/appLayout/appLayout.jsx.map +1 -0
- package/dist/headless/source/components/layout/appLayout/index.js +6 -0
- package/dist/headless/source/components/layout/appLayout/index.js.map +7 -0
- package/dist/headless/source/components/layout/divider/divider.jsx +68 -0
- package/dist/headless/source/components/layout/divider/divider.jsx.map +1 -0
- package/dist/headless/source/components/layout/divider/index.js +6 -0
- package/dist/headless/source/components/layout/divider/index.js.map +7 -0
- package/dist/headless/source/components/layout/grid/grid.jsx +112 -0
- package/dist/headless/source/components/layout/grid/grid.jsx.map +1 -0
- package/dist/headless/source/components/layout/grid/index.js +8 -0
- package/dist/headless/source/components/layout/grid/index.js.map +7 -0
- package/dist/headless/source/components/layout/page/index.js +6 -0
- package/dist/headless/source/components/layout/page/index.js.map +7 -0
- package/dist/headless/source/components/layout/page/page.jsx +28 -0
- package/dist/headless/source/components/layout/page/page.jsx.map +1 -0
- package/dist/headless/source/components/layout/pageHeader/index.js +6 -0
- package/dist/headless/source/components/layout/pageHeader/index.js.map +7 -0
- package/dist/headless/source/components/layout/pageHeader/pageHeader.jsx +52 -0
- package/dist/headless/source/components/layout/pageHeader/pageHeader.jsx.map +1 -0
- package/dist/headless/source/components/layout/screenDivider/index.js +6 -0
- package/dist/headless/source/components/layout/screenDivider/index.js.map +7 -0
- package/dist/headless/source/components/layout/screenDivider/screenDivider.jsx +129 -0
- package/dist/headless/source/components/layout/screenDivider/screenDivider.jsx.map +1 -0
- package/dist/headless/source/components/layout/sheet/index.js +6 -0
- package/dist/headless/source/components/layout/sheet/index.js.map +7 -0
- package/dist/headless/source/components/layout/sheet/sheet.jsx +261 -0
- package/dist/headless/source/components/layout/sheet/sheet.jsx.map +1 -0
- package/dist/headless/source/components/layout/stack/index.js +6 -0
- package/dist/headless/source/components/layout/stack/index.js.map +7 -0
- package/dist/headless/source/components/layout/stack/stack.jsx +53 -0
- package/dist/headless/source/components/layout/stack/stack.jsx.map +1 -0
- package/dist/headless/source/components/navigation/appBar/appBar.jsx +65 -0
- package/dist/headless/source/components/navigation/appBar/appBar.jsx.map +1 -0
- package/dist/headless/source/components/navigation/appBar/index.js +6 -0
- package/dist/headless/source/components/navigation/appBar/index.js.map +7 -0
- package/dist/headless/source/components/navigation/bottomBar/bottomBar.jsx +134 -0
- package/dist/headless/source/components/navigation/bottomBar/bottomBar.jsx.map +1 -0
- package/dist/headless/source/components/navigation/bottomBar/index.js +6 -0
- package/dist/headless/source/components/navigation/bottomBar/index.js.map +7 -0
- package/dist/headless/source/components/navigation/breadcrumbs/breadcrumbs.jsx +62 -0
- package/dist/headless/source/components/navigation/breadcrumbs/breadcrumbs.jsx.map +1 -0
- package/dist/headless/source/components/navigation/breadcrumbs/index.js +6 -0
- package/dist/headless/source/components/navigation/breadcrumbs/index.js.map +7 -0
- package/dist/headless/source/components/navigation/menu/index.js +23 -0
- package/dist/headless/source/components/navigation/menu/index.js.map +7 -0
- package/dist/headless/source/components/navigation/menu/menu.jsx +27 -0
- package/dist/headless/source/components/navigation/menu/menu.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuComponent.jsx +18 -0
- package/dist/headless/source/components/navigation/menu/menuComponent.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuContext.js +14 -0
- package/dist/headless/source/components/navigation/menu/menuContext.js.map +7 -0
- package/dist/headless/source/components/navigation/menu/menuDivider.jsx +19 -0
- package/dist/headless/source/components/navigation/menu/menuDivider.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuFloating.jsx +84 -0
- package/dist/headless/source/components/navigation/menu/menuFloating.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuItem.jsx +68 -0
- package/dist/headless/source/components/navigation/menu/menuItem.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuItemIcon.jsx +25 -0
- package/dist/headless/source/components/navigation/menu/menuItemIcon.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuItemText.jsx +25 -0
- package/dist/headless/source/components/navigation/menu/menuItemText.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuList.jsx +46 -0
- package/dist/headless/source/components/navigation/menu/menuList.jsx.map +1 -0
- package/dist/headless/source/components/navigation/menu/menuSubmenu.jsx +86 -0
- package/dist/headless/source/components/navigation/menu/menuSubmenu.jsx.map +1 -0
- package/dist/headless/source/components/navigation/pagination/index.js +6 -0
- package/dist/headless/source/components/navigation/pagination/index.js.map +7 -0
- package/dist/headless/source/components/navigation/pagination/pagination.jsx +142 -0
- package/dist/headless/source/components/navigation/pagination/pagination.jsx.map +1 -0
- package/dist/headless/source/components/navigation/sidebar/index.js +6 -0
- package/dist/headless/source/components/navigation/sidebar/index.js.map +7 -0
- package/dist/headless/source/components/navigation/sidebar/sidebar.jsx +114 -0
- package/dist/headless/source/components/navigation/sidebar/sidebar.jsx.map +1 -0
- package/dist/headless/source/components/navigation/stepper/index.js +6 -0
- package/dist/headless/source/components/navigation/stepper/index.js.map +7 -0
- package/dist/headless/source/components/navigation/stepper/stepper.jsx +82 -0
- package/dist/headless/source/components/navigation/stepper/stepper.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/index.js +10 -0
- package/dist/headless/source/components/navigation/tabs/index.js.map +7 -0
- package/dist/headless/source/components/navigation/tabs/tab/tab.jsx +75 -0
- package/dist/headless/source/components/navigation/tabs/tab/tab.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/tabs.jsx +141 -0
- package/dist/headless/source/components/navigation/tabs/tabs.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/tabsContext.js +8 -0
- package/dist/headless/source/components/navigation/tabs/tabsContext.js.map +7 -0
- package/dist/headless/source/index.js +309 -0
- package/dist/headless/source/index.js.map +7 -0
- package/dist/headless/source/primitives/callHandler.js +12 -0
- package/dist/headless/source/primitives/callHandler.js.map +7 -0
- package/dist/headless/source/primitives/createControllableState.js +19 -0
- package/dist/headless/source/primitives/createControllableState.js.map +7 -0
- package/dist/headless/source/primitives/createCssTransition.js +59 -0
- package/dist/headless/source/primitives/createCssTransition.js.map +7 -0
- package/dist/headless/source/primitives/createDropzone.js +46 -0
- package/dist/headless/source/primitives/createDropzone.js.map +7 -0
- package/dist/headless/source/primitives/createFloating.js +48 -0
- package/dist/headless/source/primitives/createFloating.js.map +7 -0
- package/dist/headless/source/primitives/createFocusTrap.js +50 -0
- package/dist/headless/source/primitives/createFocusTrap.js.map +7 -0
- package/dist/headless/source/primitives/createId.js +9 -0
- package/dist/headless/source/primitives/createId.js.map +7 -0
- package/dist/headless/source/primitives/createMaskedInput.js +35 -0
- package/dist/headless/source/primitives/createMaskedInput.js.map +7 -0
- package/dist/headless/source/primitives/createTheme.js +51 -0
- package/dist/headless/source/primitives/createTheme.js.map +7 -0
- package/dist/headless/source/primitives/createVirtualList.js +19 -0
- package/dist/headless/source/primitives/createVirtualList.js.map +7 -0
- package/dist/headless/source/primitives/mergeRefs.js +13 -0
- package/dist/headless/source/primitives/mergeRefs.js.map +7 -0
- package/dist/headless/source/ssr-published.ssr-spec.jsx +35 -0
- package/dist/headless/source/ssr-published.ssr-spec.jsx.map +1 -0
- package/dist/headless/source/ssr.ssr-spec.jsx +113 -0
- package/dist/headless/source/ssr.ssr-spec.jsx.map +1 -0
- package/dist/headless/source/utils/animate.js +35 -0
- package/dist/headless/source/utils/animate.js.map +7 -0
- package/dist/headless/source/utils/debounce.js +23 -0
- package/dist/headless/source/utils/debounce.js.map +7 -0
- package/dist/headless/source/utils/floating.js +42 -0
- package/dist/headless/source/utils/floating.js.map +7 -0
- package/dist/headless/source/utils/throttle.js +41 -0
- package/dist/headless/source/utils/throttle.js.map +7 -0
- package/dist/source/components/base/animateHeight/animateHeight.jsx +177 -0
- package/dist/source/components/base/animateHeight/animateHeight.jsx.map +1 -0
- package/dist/source/components/base/animateHeight/index.js +6 -0
- package/dist/source/components/base/animateHeight/index.js.map +7 -0
- package/dist/source/components/base/icon/icon.jsx +61 -0
- package/dist/source/components/base/icon/icon.jsx.map +1 -0
- package/dist/source/components/base/icon/index.js +6 -0
- package/dist/source/components/base/icon/index.js.map +7 -0
- package/dist/source/components/base/ripple/index.js +6 -0
- package/dist/source/components/base/ripple/index.js.map +7 -0
- package/dist/source/components/base/ripple/ripple.jsx +64 -0
- package/dist/source/components/base/ripple/ripple.jsx.map +1 -0
- package/dist/source/components/clickAwayListener/clickAwayListener.jsx +73 -0
- package/dist/source/components/clickAwayListener/clickAwayListener.jsx.map +1 -0
- package/dist/source/components/clickAwayListener/index.js +6 -0
- package/dist/source/components/clickAwayListener/index.js.map +7 -0
- package/dist/source/components/dataDisplay/accordion/accordion.jsx +83 -0
- package/dist/source/components/dataDisplay/accordion/accordion.jsx.map +1 -0
- package/dist/source/components/dataDisplay/accordion/index.js +6 -0
- package/dist/source/components/dataDisplay/accordion/index.js.map +7 -0
- package/dist/source/components/dataDisplay/avatar/avatar.jsx +96 -0
- package/dist/source/components/dataDisplay/avatar/avatar.jsx.map +1 -0
- package/dist/source/components/dataDisplay/avatar/index.js +7 -0
- package/dist/source/components/dataDisplay/avatar/index.js.map +7 -0
- package/dist/source/components/dataDisplay/badge/badge.jsx +57 -0
- package/dist/source/components/dataDisplay/badge/badge.jsx.map +1 -0
- package/dist/source/components/dataDisplay/badge/index.js +6 -0
- package/dist/source/components/dataDisplay/badge/index.js.map +7 -0
- package/dist/source/components/dataDisplay/card/card.jsx +55 -0
- package/dist/source/components/dataDisplay/card/card.jsx.map +1 -0
- package/dist/source/components/dataDisplay/card/index.js +6 -0
- package/dist/source/components/dataDisplay/card/index.js.map +7 -0
- package/dist/source/components/dataDisplay/carousel/carousel.jsx +408 -0
- package/dist/source/components/dataDisplay/carousel/carousel.jsx.map +1 -0
- package/dist/source/components/dataDisplay/carousel/index.js +6 -0
- package/dist/source/components/dataDisplay/carousel/index.js.map +7 -0
- package/dist/source/components/dataDisplay/carousel/utils.js +76 -0
- package/dist/source/components/dataDisplay/carousel/utils.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/chat.jsx +156 -0
- package/dist/source/components/dataDisplay/chat/chat.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatAttachmentImage.jsx +53 -0
- package/dist/source/components/dataDisplay/chat/chatAttachmentImage.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatAttachments.jsx +35 -0
- package/dist/source/components/dataDisplay/chat/chatAttachments.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatComposer.jsx +170 -0
- package/dist/source/components/dataDisplay/chat/chatComposer.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatHeader.jsx +55 -0
- package/dist/source/components/dataDisplay/chat/chatHeader.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatIconButton.jsx +38 -0
- package/dist/source/components/dataDisplay/chat/chatIconButton.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatLayout.jsx +121 -0
- package/dist/source/components/dataDisplay/chat/chatLayout.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageAvatar.jsx +19 -0
- package/dist/source/components/dataDisplay/chat/chatMessageAvatar.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageBubble.jsx +56 -0
- package/dist/source/components/dataDisplay/chat/chatMessageBubble.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageIncoming.jsx +21 -0
- package/dist/source/components/dataDisplay/chat/chatMessageIncoming.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageItem.jsx +56 -0
- package/dist/source/components/dataDisplay/chat/chatMessageItem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageOutgoing.jsx +25 -0
- package/dist/source/components/dataDisplay/chat/chatMessageOutgoing.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSkeleton.jsx +33 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSkeleton.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageStatus.jsx +35 -0
- package/dist/source/components/dataDisplay/chat/chatMessageStatus.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSystem.jsx +17 -0
- package/dist/source/components/dataDisplay/chat/chatMessageSystem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatMessages.jsx +63 -0
- package/dist/source/components/dataDisplay/chat/chatMessages.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatOverlayLayout.jsx +60 -0
- package/dist/source/components/dataDisplay/chat/chatOverlayLayout.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/chatShell.jsx +66 -0
- package/dist/source/components/dataDisplay/chat/chatShell.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chat/index.js +82 -0
- package/dist/source/components/dataDisplay/chat/index.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/types.js +25 -0
- package/dist/source/components/dataDisplay/chat/types.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/useChatFileUpload.js +49 -0
- package/dist/source/components/dataDisplay/chat/useChatFileUpload.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/useChatInfiniteScroll.js +27 -0
- package/dist/source/components/dataDisplay/chat/useChatInfiniteScroll.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/useChatStickToBottom.js +54 -0
- package/dist/source/components/dataDisplay/chat/useChatStickToBottom.js.map +7 -0
- package/dist/source/components/dataDisplay/chat/utils.js +103 -0
- package/dist/source/components/dataDisplay/chat/utils.js.map +7 -0
- package/dist/source/components/dataDisplay/chip/chip.jsx +120 -0
- package/dist/source/components/dataDisplay/chip/chip.jsx.map +1 -0
- package/dist/source/components/dataDisplay/chip/index.js +6 -0
- package/dist/source/components/dataDisplay/chip/index.js.map +7 -0
- package/dist/source/components/dataDisplay/expansionPanel/expansionPanel.jsx +165 -0
- package/dist/source/components/dataDisplay/expansionPanel/expansionPanel.jsx.map +1 -0
- package/dist/source/components/dataDisplay/expansionPanel/index.js +6 -0
- package/dist/source/components/dataDisplay/expansionPanel/index.js.map +7 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.jsx +26 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.jsx.map +1 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.types.js +1 -0
- package/dist/source/components/dataDisplay/imagesList/imagesList.types.js.map +7 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListContext.js +8 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListContext.js.map +7 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx +56 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx +30 -0
- package/dist/source/components/dataDisplay/imagesList/imagesListItem/imagesListItemModal.jsx.map +1 -0
- package/dist/source/components/dataDisplay/imagesList/index.js +12 -0
- package/dist/source/components/dataDisplay/imagesList/index.js.map +7 -0
- package/dist/source/components/dataDisplay/list/index.js +8 -0
- package/dist/source/components/dataDisplay/list/index.js.map +7 -0
- package/dist/source/components/dataDisplay/list/list.jsx +25 -0
- package/dist/source/components/dataDisplay/list/list.jsx.map +1 -0
- package/dist/source/components/dataDisplay/list/listItem.jsx +53 -0
- package/dist/source/components/dataDisplay/list/listItem.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/index.js +17 -0
- package/dist/source/components/dataDisplay/table/index.js.map +7 -0
- package/dist/source/components/dataDisplay/table/table.jsx +47 -0
- package/dist/source/components/dataDisplay/table/table.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableBody.jsx +15 -0
- package/dist/source/components/dataDisplay/table/tableBody.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableCell.jsx +16 -0
- package/dist/source/components/dataDisplay/table/tableCell.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableHead.jsx +15 -0
- package/dist/source/components/dataDisplay/table/tableHead.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableHeadCell.jsx +53 -0
- package/dist/source/components/dataDisplay/table/tableHeadCell.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tablePagination/tablePagination.jsx +48 -0
- package/dist/source/components/dataDisplay/table/tablePagination/tablePagination.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableRow.jsx +25 -0
- package/dist/source/components/dataDisplay/table/tableRow.jsx.map +1 -0
- package/dist/source/components/dataDisplay/treeView/index.js +6 -0
- package/dist/source/components/dataDisplay/treeView/index.js.map +7 -0
- package/dist/source/components/dataDisplay/treeView/treeView.jsx +173 -0
- package/dist/source/components/dataDisplay/treeView/treeView.jsx.map +1 -0
- package/dist/source/components/dataDisplay/typography/index.js +6 -0
- package/dist/source/components/dataDisplay/typography/index.js.map +7 -0
- package/dist/source/components/dataDisplay/typography/typography.jsx +58 -0
- package/dist/source/components/dataDisplay/typography/typography.jsx.map +1 -0
- package/dist/source/components/feedBack/message/index.js +7 -0
- package/dist/source/components/feedBack/message/index.js.map +7 -0
- package/dist/source/components/feedBack/message/message.jsx +52 -0
- package/dist/source/components/feedBack/message/message.jsx.map +1 -0
- package/dist/source/components/feedBack/modal/index.js +6 -0
- package/dist/source/components/feedBack/modal/index.js.map +7 -0
- package/dist/source/components/feedBack/modal/modal.jsx +102 -0
- package/dist/source/components/feedBack/modal/modal.jsx.map +1 -0
- package/dist/source/components/feedBack/progressIndicator/index.js +7 -0
- package/dist/source/components/feedBack/progressIndicator/index.js.map +7 -0
- package/dist/source/components/feedBack/progressIndicator/progressIndicator.jsx +69 -0
- package/dist/source/components/feedBack/progressIndicator/progressIndicator.jsx.map +1 -0
- package/dist/source/components/feedBack/skeleton/index.js +6 -0
- package/dist/source/components/feedBack/skeleton/index.js.map +7 -0
- package/dist/source/components/feedBack/skeleton/skeleton.jsx +66 -0
- package/dist/source/components/feedBack/skeleton/skeleton.jsx.map +1 -0
- package/dist/source/components/feedBack/snackbar/index.js +10 -0
- package/dist/source/components/feedBack/snackbar/index.js.map +7 -0
- package/dist/source/components/feedBack/snackbar/snackbar.jsx +197 -0
- package/dist/source/components/feedBack/snackbar/snackbar.jsx.map +1 -0
- package/dist/source/components/feedBack/snackbar/useSnackbarsPortal.js +21 -0
- package/dist/source/components/feedBack/snackbar/useSnackbarsPortal.js.map +7 -0
- package/dist/source/components/feedBack/tooltip/index.js +6 -0
- package/dist/source/components/feedBack/tooltip/index.js.map +7 -0
- package/dist/source/components/feedBack/tooltip/tooltip.jsx +93 -0
- package/dist/source/components/feedBack/tooltip/tooltip.jsx.map +1 -0
- package/dist/source/components/inputs/button/button.jsx +102 -0
- package/dist/source/components/inputs/button/button.jsx.map +1 -0
- package/dist/source/components/inputs/button/index.js +6 -0
- package/dist/source/components/inputs/button/index.js.map +7 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroup.jsx +73 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroup.jsx.map +1 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroupContext.js +8 -0
- package/dist/source/components/inputs/buttonGroups/buttonGroupContext.js.map +7 -0
- package/dist/source/components/inputs/buttonGroups/index.js +9 -0
- package/dist/source/components/inputs/buttonGroups/index.js.map +7 -0
- package/dist/source/components/inputs/checkbox/checkbox.jsx +87 -0
- package/dist/source/components/inputs/checkbox/checkbox.jsx.map +1 -0
- package/dist/source/components/inputs/checkbox/index.js +6 -0
- package/dist/source/components/inputs/checkbox/index.js.map +7 -0
- package/dist/source/components/inputs/datePicker/dataPickerDays.jsx +87 -0
- package/dist/source/components/inputs/datePicker/dataPickerDays.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dataPickerHeader.jsx +40 -0
- package/dist/source/components/inputs/datePicker/dataPickerHeader.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dataPickerInput.jsx +57 -0
- package/dist/source/components/inputs/datePicker/dataPickerInput.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dateFormat.js +89 -0
- package/dist/source/components/inputs/datePicker/dateFormat.js.map +7 -0
- package/dist/source/components/inputs/datePicker/datePicker.jsx +242 -0
- package/dist/source/components/inputs/datePicker/datePicker.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerActionLabel.jsx +48 -0
- package/dist/source/components/inputs/datePicker/datePickerActionLabel.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerDay.jsx +52 -0
- package/dist/source/components/inputs/datePicker/datePickerDay.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerIconButton.jsx +36 -0
- package/dist/source/components/inputs/datePicker/datePickerIconButton.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/datePickerList.jsx +44 -0
- package/dist/source/components/inputs/datePicker/datePickerList.jsx.map +1 -0
- package/dist/source/components/inputs/datePicker/dateUtils.js +232 -0
- package/dist/source/components/inputs/datePicker/dateUtils.js.map +7 -0
- package/dist/source/components/inputs/datePicker/index.js +24 -0
- package/dist/source/components/inputs/datePicker/index.js.map +7 -0
- package/dist/source/components/inputs/datePicker/openView.js +10 -0
- package/dist/source/components/inputs/datePicker/openView.js.map +7 -0
- package/dist/source/components/inputs/datePicker/useDateInput.js +56 -0
- package/dist/source/components/inputs/datePicker/useDateInput.js.map +7 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimeFormat.js +119 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimeFormat.js.map +7 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePicker.jsx +200 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePicker.jsx.map +1 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx +57 -0
- package/dist/source/components/inputs/dateTimePicker/dateTimePickerInput.jsx.map +1 -0
- package/dist/source/components/inputs/dateTimePicker/index.js +20 -0
- package/dist/source/components/inputs/dateTimePicker/index.js.map +7 -0
- package/dist/source/components/inputs/dateTimePicker/useDateTimeInput.js +85 -0
- package/dist/source/components/inputs/dateTimePicker/useDateTimeInput.js.map +7 -0
- package/dist/source/components/inputs/fileDrop/countPreview.jsx +17 -0
- package/dist/source/components/inputs/fileDrop/countPreview.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/fileDrop.jsx +73 -0
- package/dist/source/components/inputs/fileDrop/fileDrop.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/index.js +14 -0
- package/dist/source/components/inputs/fileDrop/index.js.map +7 -0
- package/dist/source/components/inputs/fileDrop/preview.jsx +41 -0
- package/dist/source/components/inputs/fileDrop/preview.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/previewWrapper.jsx +27 -0
- package/dist/source/components/inputs/fileDrop/previewWrapper.jsx.map +1 -0
- package/dist/source/components/inputs/fileDrop/utils.js +7 -0
- package/dist/source/components/inputs/fileDrop/utils.js.map +7 -0
- package/dist/source/components/inputs/fileInput/fileInput.jsx +47 -0
- package/dist/source/components/inputs/fileInput/fileInput.jsx.map +1 -0
- package/dist/source/components/inputs/fileInput/index.js +6 -0
- package/dist/source/components/inputs/fileInput/index.js.map +7 -0
- package/dist/source/components/inputs/floatingButton/floatingButton.jsx +31 -0
- package/dist/source/components/inputs/floatingButton/floatingButton.jsx.map +1 -0
- package/dist/source/components/inputs/floatingButton/index.js +6 -0
- package/dist/source/components/inputs/floatingButton/index.js.map +7 -0
- package/dist/source/components/inputs/radioButton/index.js +6 -0
- package/dist/source/components/inputs/radioButton/index.js.map +7 -0
- package/dist/source/components/inputs/radioButton/radioButton.jsx +76 -0
- package/dist/source/components/inputs/radioButton/radioButton.jsx.map +1 -0
- package/dist/source/components/inputs/rating/index.js +6 -0
- package/dist/source/components/inputs/rating/index.js.map +7 -0
- package/dist/source/components/inputs/rating/rating.jsx +125 -0
- package/dist/source/components/inputs/rating/rating.jsx.map +1 -0
- package/dist/source/components/inputs/selectField/dropdownMenu.jsx +141 -0
- package/dist/source/components/inputs/selectField/dropdownMenu.jsx.map +1 -0
- package/dist/source/components/inputs/selectField/index.js +8 -0
- package/dist/source/components/inputs/selectField/index.js.map +7 -0
- package/dist/source/components/inputs/selectField/selectField.jsx +273 -0
- package/dist/source/components/inputs/selectField/selectField.jsx.map +1 -0
- package/dist/source/components/inputs/slider/index.js +6 -0
- package/dist/source/components/inputs/slider/index.js.map +7 -0
- package/dist/source/components/inputs/slider/slider.jsx +405 -0
- package/dist/source/components/inputs/slider/slider.jsx.map +1 -0
- package/dist/source/components/inputs/slider/utils.js +49 -0
- package/dist/source/components/inputs/slider/utils.js.map +7 -0
- package/dist/source/components/inputs/textField/index.js +9 -0
- package/dist/source/components/inputs/textField/index.js.map +7 -0
- package/dist/source/components/inputs/textField/textField.jsx +138 -0
- package/dist/source/components/inputs/textField/textField.jsx.map +1 -0
- package/dist/source/components/inputs/textField/textFieldAdornment.jsx +31 -0
- package/dist/source/components/inputs/textField/textFieldAdornment.jsx.map +1 -0
- package/dist/source/components/inputs/textField/textFieldWrapper.jsx +83 -0
- package/dist/source/components/inputs/textField/textFieldWrapper.jsx.map +1 -0
- package/dist/source/components/inputs/textField/types.js +1 -0
- package/dist/source/components/inputs/textField/types.js.map +7 -0
- package/dist/source/components/inputs/textField/utils.js +13 -0
- package/dist/source/components/inputs/textField/utils.js.map +7 -0
- package/dist/source/components/inputs/timePicker/index.js +14 -0
- package/dist/source/components/inputs/timePicker/index.js.map +7 -0
- package/dist/source/components/inputs/timePicker/timeFormat.js +78 -0
- package/dist/source/components/inputs/timePicker/timeFormat.js.map +7 -0
- package/dist/source/components/inputs/timePicker/timePicker.jsx +115 -0
- package/dist/source/components/inputs/timePicker/timePicker.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timePickerColumns.jsx +42 -0
- package/dist/source/components/inputs/timePicker/timePickerColumns.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timePickerInput.jsx +57 -0
- package/dist/source/components/inputs/timePicker/timePickerInput.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timePickerList.jsx +36 -0
- package/dist/source/components/inputs/timePicker/timePickerList.jsx.map +1 -0
- package/dist/source/components/inputs/timePicker/timeUtils.js +96 -0
- package/dist/source/components/inputs/timePicker/timeUtils.js.map +7 -0
- package/dist/source/components/inputs/timePicker/useTimeInput.js +57 -0
- package/dist/source/components/inputs/timePicker/useTimeInput.js.map +7 -0
- package/dist/source/components/inputs/toggle/index.js +6 -0
- package/dist/source/components/inputs/toggle/index.js.map +7 -0
- package/dist/source/components/inputs/toggle/toggle.jsx +78 -0
- package/dist/source/components/inputs/toggle/toggle.jsx.map +1 -0
- package/dist/source/components/layout/appLayout/appLayout.jsx +102 -0
- package/dist/source/components/layout/appLayout/appLayout.jsx.map +1 -0
- package/dist/source/components/layout/appLayout/index.js +6 -0
- package/dist/source/components/layout/appLayout/index.js.map +7 -0
- package/dist/source/components/layout/divider/divider.jsx +69 -0
- package/dist/source/components/layout/divider/divider.jsx.map +1 -0
- package/dist/source/components/layout/divider/index.js +6 -0
- package/dist/source/components/layout/divider/index.js.map +7 -0
- package/dist/source/components/layout/grid/grid.jsx +113 -0
- package/dist/source/components/layout/grid/grid.jsx.map +1 -0
- package/dist/source/components/layout/grid/index.js +8 -0
- package/dist/source/components/layout/grid/index.js.map +7 -0
- package/dist/source/components/layout/page/index.js +6 -0
- package/dist/source/components/layout/page/index.js.map +7 -0
- package/dist/source/components/layout/page/page.jsx +29 -0
- package/dist/source/components/layout/page/page.jsx.map +1 -0
- package/dist/source/components/layout/pageHeader/index.js +6 -0
- package/dist/source/components/layout/pageHeader/index.js.map +7 -0
- package/dist/source/components/layout/pageHeader/pageHeader.jsx +53 -0
- package/dist/source/components/layout/pageHeader/pageHeader.jsx.map +1 -0
- package/dist/source/components/layout/screenDivider/index.js +6 -0
- package/dist/source/components/layout/screenDivider/index.js.map +7 -0
- package/dist/source/components/layout/screenDivider/screenDivider.jsx +130 -0
- package/dist/source/components/layout/screenDivider/screenDivider.jsx.map +1 -0
- package/dist/source/components/layout/sheet/index.js +6 -0
- package/dist/source/components/layout/sheet/index.js.map +7 -0
- package/dist/source/components/layout/sheet/sheet.jsx +262 -0
- package/dist/source/components/layout/sheet/sheet.jsx.map +1 -0
- package/dist/source/components/layout/stack/index.js +6 -0
- package/dist/source/components/layout/stack/index.js.map +7 -0
- package/dist/source/components/layout/stack/stack.jsx +54 -0
- package/dist/source/components/layout/stack/stack.jsx.map +1 -0
- package/dist/source/components/navigation/appBar/appBar.jsx +66 -0
- package/dist/source/components/navigation/appBar/appBar.jsx.map +1 -0
- package/dist/source/components/navigation/appBar/index.js +6 -0
- package/dist/source/components/navigation/appBar/index.js.map +7 -0
- package/dist/source/components/navigation/bottomBar/bottomBar.jsx +135 -0
- package/dist/source/components/navigation/bottomBar/bottomBar.jsx.map +1 -0
- package/dist/source/components/navigation/bottomBar/index.js +6 -0
- package/dist/source/components/navigation/bottomBar/index.js.map +7 -0
- package/dist/source/components/navigation/breadcrumbs/breadcrumbs.jsx +63 -0
- package/dist/source/components/navigation/breadcrumbs/breadcrumbs.jsx.map +1 -0
- package/dist/source/components/navigation/breadcrumbs/index.js +6 -0
- package/dist/source/components/navigation/breadcrumbs/index.js.map +7 -0
- package/dist/source/components/navigation/menu/index.js +23 -0
- package/dist/source/components/navigation/menu/index.js.map +7 -0
- package/dist/source/components/navigation/menu/menu.jsx +28 -0
- package/dist/source/components/navigation/menu/menu.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuComponent.jsx +18 -0
- package/dist/source/components/navigation/menu/menuComponent.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuContext.js +14 -0
- package/dist/source/components/navigation/menu/menuContext.js.map +7 -0
- package/dist/source/components/navigation/menu/menuDivider.jsx +19 -0
- package/dist/source/components/navigation/menu/menuDivider.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuFloating.jsx +84 -0
- package/dist/source/components/navigation/menu/menuFloating.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuItem.jsx +68 -0
- package/dist/source/components/navigation/menu/menuItem.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuItemIcon.jsx +25 -0
- package/dist/source/components/navigation/menu/menuItemIcon.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuItemText.jsx +25 -0
- package/dist/source/components/navigation/menu/menuItemText.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuList.jsx +46 -0
- package/dist/source/components/navigation/menu/menuList.jsx.map +1 -0
- package/dist/source/components/navigation/menu/menuSubmenu.jsx +86 -0
- package/dist/source/components/navigation/menu/menuSubmenu.jsx.map +1 -0
- package/dist/source/components/navigation/pagination/index.js +6 -0
- package/dist/source/components/navigation/pagination/index.js.map +7 -0
- package/dist/source/components/navigation/pagination/pagination.jsx +143 -0
- package/dist/source/components/navigation/pagination/pagination.jsx.map +1 -0
- package/dist/source/components/navigation/sidebar/index.js +6 -0
- package/dist/source/components/navigation/sidebar/index.js.map +7 -0
- package/dist/source/components/navigation/sidebar/sidebar.jsx +115 -0
- package/dist/source/components/navigation/sidebar/sidebar.jsx.map +1 -0
- package/dist/source/components/navigation/stepper/index.js +6 -0
- package/dist/source/components/navigation/stepper/index.js.map +7 -0
- package/dist/source/components/navigation/stepper/stepper.jsx +83 -0
- package/dist/source/components/navigation/stepper/stepper.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/index.js +10 -0
- package/dist/source/components/navigation/tabs/index.js.map +7 -0
- package/dist/source/components/navigation/tabs/tab/tab.jsx +76 -0
- package/dist/source/components/navigation/tabs/tab/tab.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/tabs.jsx +142 -0
- package/dist/source/components/navigation/tabs/tabs.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/tabsContext.js +8 -0
- package/dist/source/components/navigation/tabs/tabsContext.js.map +7 -0
- package/dist/source/index.js +309 -0
- package/dist/source/index.js.map +7 -0
- package/dist/source/primitives/callHandler.js +12 -0
- package/dist/source/primitives/callHandler.js.map +7 -0
- package/dist/source/primitives/createControllableState.js +19 -0
- package/dist/source/primitives/createControllableState.js.map +7 -0
- package/dist/source/primitives/createCssTransition.js +59 -0
- package/dist/source/primitives/createCssTransition.js.map +7 -0
- package/dist/source/primitives/createDropzone.js +46 -0
- package/dist/source/primitives/createDropzone.js.map +7 -0
- package/dist/source/primitives/createFloating.js +48 -0
- package/dist/source/primitives/createFloating.js.map +7 -0
- package/dist/source/primitives/createFocusTrap.js +50 -0
- package/dist/source/primitives/createFocusTrap.js.map +7 -0
- package/dist/source/primitives/createId.js +9 -0
- package/dist/source/primitives/createId.js.map +7 -0
- package/dist/source/primitives/createMaskedInput.js +35 -0
- package/dist/source/primitives/createMaskedInput.js.map +7 -0
- package/dist/source/primitives/createTheme.js +51 -0
- package/dist/source/primitives/createTheme.js.map +7 -0
- package/dist/source/primitives/createVirtualList.js +19 -0
- package/dist/source/primitives/createVirtualList.js.map +7 -0
- package/dist/source/primitives/mergeRefs.js +13 -0
- package/dist/source/primitives/mergeRefs.js.map +7 -0
- package/dist/source/ssr-published.ssr-spec.jsx +35 -0
- package/dist/source/ssr-published.ssr-spec.jsx.map +1 -0
- package/dist/source/ssr.ssr-spec.jsx +113 -0
- package/dist/source/ssr.ssr-spec.jsx.map +1 -0
- package/dist/source/utils/animate.js +35 -0
- package/dist/source/utils/animate.js.map +7 -0
- package/dist/source/utils/debounce.js +23 -0
- package/dist/source/utils/debounce.js.map +7 -0
- package/dist/source/utils/floating.js +42 -0
- package/dist/source/utils/floating.js.map +7 -0
- package/dist/source/utils/throttle.js +41 -0
- package/dist/source/utils/throttle.js.map +7 -0
- package/package.json +8 -3
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { createComponent as a, mergeProps as L, Portal as M, use as O, insert as $, effect as I, style as R, setAttribute as q,
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { buildFloatingMiddleware as
|
|
4
|
-
import { createFloating as
|
|
5
|
-
import { TimePickerInput as
|
|
6
|
-
import { TimePickerColumns as
|
|
1
|
+
import { createComponent as a, mergeProps as L, Portal as M, use as O, insert as $, effect as I, style as R, setAttribute as q, isServer as j, template as x } from "solid-js/web";
|
|
2
|
+
import { splitProps as z, createSignal as l, createEffect as y, onCleanup as G, Show as H } from "solid-js";
|
|
3
|
+
import { buildFloatingMiddleware as J, resolvePlacement as K } from "../../../utils/floating.js";
|
|
4
|
+
import { createFloating as N } from "../../../primitives/createFloating.js";
|
|
5
|
+
import { TimePickerInput as Q } from "./timePickerInput.js";
|
|
6
|
+
import { TimePickerColumns as U } from "./timePickerColumns.js";
|
|
7
7
|
import { isValidTimeDate as T } from "./timeUtils.js";
|
|
8
8
|
import { mergeRefs as A } from "../../../primitives/mergeRefs.js";
|
|
9
|
-
import { ClickAwayListener as
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
const [e, P] =
|
|
14
|
-
let g,
|
|
15
|
-
const
|
|
16
|
-
placement: () =>
|
|
17
|
-
middleware: () =>
|
|
9
|
+
import { ClickAwayListener as W } from "../../clickAwayListener/clickAwayListener.js";
|
|
10
|
+
var X = /* @__PURE__ */ x('<div class="smwb-date-picker smwb-time-picker"data-testid=time-picker role=dialog aria-modal=false style="transition:opacity 150ms ease-in-out"><div class=smwb-date-picker__inner>');
|
|
11
|
+
const Y = 150;
|
|
12
|
+
function se(d) {
|
|
13
|
+
const [e, P] = z(d, ["value", "onChange", "placement", "disabled", "disableClock", "clockAriaLabel", "format", "onBlur", "ref"]), s = () => e.value === void 0 ? void 0 : new Date(e.value), [F, f] = l(T(s()) ? s() : /* @__PURE__ */ new Date()), [S, c] = l(!1);
|
|
14
|
+
let g, v;
|
|
15
|
+
const p = () => K(e.placement ?? "bottom-start"), m = N({
|
|
16
|
+
placement: () => p().placement,
|
|
17
|
+
middleware: () => J(p())
|
|
18
18
|
});
|
|
19
19
|
y(() => {
|
|
20
20
|
if (e.disabled) return;
|
|
21
21
|
const t = s();
|
|
22
|
-
|
|
22
|
+
f(T(t) ? t : /* @__PURE__ */ new Date());
|
|
23
23
|
});
|
|
24
|
-
const b = () =>
|
|
24
|
+
const b = () => S() && !e.disabled && !e.disableClock, [C, h] = l(b()), [_, k] = l(!1);
|
|
25
25
|
let u, n;
|
|
26
26
|
y(() => {
|
|
27
|
-
b() ? (n !== void 0 && clearTimeout(n), h(!0), u = requestAnimationFrame(() => k(!0))) : (k(!1), C() && (n = setTimeout(() => h(!1),
|
|
28
|
-
}),
|
|
27
|
+
b() ? (n !== void 0 && clearTimeout(n), h(!0), u = requestAnimationFrame(() => k(!0))) : (k(!1), C() && (n = setTimeout(() => h(!1), Y)));
|
|
28
|
+
}), G(() => {
|
|
29
29
|
u !== void 0 && cancelAnimationFrame(u), n !== void 0 && clearTimeout(n);
|
|
30
30
|
});
|
|
31
|
-
const
|
|
31
|
+
const D = () => {
|
|
32
32
|
e.disabled || c((t) => !t);
|
|
33
33
|
}, E = (t) => {
|
|
34
34
|
const r = t.target;
|
|
35
|
-
|
|
35
|
+
v?.contains(r) || g?.contains(r) || c(!1);
|
|
36
36
|
}, V = (t) => {
|
|
37
|
-
|
|
37
|
+
f(t), e.onChange?.(void 0, t, d);
|
|
38
38
|
};
|
|
39
|
-
return [a(
|
|
39
|
+
return [a(Q, L({
|
|
40
40
|
ref(t) {
|
|
41
41
|
var r = A(e.ref, m.setReference, (i) => g = i);
|
|
42
42
|
typeof r == "function" && r(t);
|
|
@@ -50,7 +50,7 @@ function le(f) {
|
|
|
50
50
|
get onBlur() {
|
|
51
51
|
return e.onBlur;
|
|
52
52
|
},
|
|
53
|
-
onToggle:
|
|
53
|
+
onToggle: D,
|
|
54
54
|
get disabled() {
|
|
55
55
|
return e.disabled;
|
|
56
56
|
},
|
|
@@ -60,21 +60,21 @@ function le(f) {
|
|
|
60
60
|
get format() {
|
|
61
61
|
return e.format;
|
|
62
62
|
}
|
|
63
|
-
}, P)), a(
|
|
63
|
+
}, P)), a(H, {
|
|
64
64
|
get when() {
|
|
65
65
|
return C();
|
|
66
66
|
},
|
|
67
67
|
get children() {
|
|
68
68
|
return a(M, {
|
|
69
69
|
get mount() {
|
|
70
|
-
return document.body;
|
|
70
|
+
return j ? void 0 : document.body;
|
|
71
71
|
},
|
|
72
72
|
get children() {
|
|
73
|
-
return a(
|
|
73
|
+
return a(W, {
|
|
74
74
|
onClickAway: E,
|
|
75
75
|
get children() {
|
|
76
|
-
var t =
|
|
77
|
-
return typeof i == "function" && O(i, t), $(r, a(
|
|
76
|
+
var t = X(), r = t.firstChild, i = A(m.setFloating, (o) => v = o);
|
|
77
|
+
return typeof i == "function" && O(i, t), $(r, a(U, {
|
|
78
78
|
get value() {
|
|
79
79
|
return F();
|
|
80
80
|
},
|
|
@@ -88,7 +88,7 @@ function le(f) {
|
|
|
88
88
|
})), I((o) => {
|
|
89
89
|
var B = {
|
|
90
90
|
...m.floatingStyles(),
|
|
91
|
-
opacity:
|
|
91
|
+
opacity: _() ? 1 : 0
|
|
92
92
|
}, w = e.clockAriaLabel ?? "Choose time";
|
|
93
93
|
return o.e = R(t, B, o.e), w !== o.t && q(t, "aria-label", o.t = w), o;
|
|
94
94
|
}, {
|
|
@@ -103,6 +103,6 @@ function le(f) {
|
|
|
103
103
|
})];
|
|
104
104
|
}
|
|
105
105
|
export {
|
|
106
|
-
|
|
106
|
+
se as TimePicker
|
|
107
107
|
};
|
|
108
108
|
//# sourceMappingURL=timePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timePicker.js","sources":["../../../../../src/components/inputs/timePicker/timePicker.tsx"],"sourcesContent":["import { type JSX, Show, createEffect, createSignal, onCleanup, splitProps } from \"solid-js\";\nimport { Portal } from \"solid-js/web\";\nimport { buildFloatingMiddleware, type Placement, resolvePlacement } from \"../../../utils/floating\";\nimport { createFloating } from \"../../../primitives/createFloating\";\nimport { ClickAwayListener } from \"../../clickAwayListener\";\nimport { TimePickerInput } from \"./timePickerInput\";\nimport { TimePickerColumns } from \"./timePickerColumns\";\nimport { isValidTimeDate } from \"./timeUtils\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport type { TextFieldProps } from \"../textField\";\n\nexport interface TimePickerProps\n extends Omit<TextFieldProps, \"onBlur\" | \"onChange\" | \"value\" | \"defaultValue\" | \"ref\" | \"onToggle\"> {\n /** Time format pattern with tokens HH, mm, ss, e.g. \"HH:mm\" or \"HH:mm:ss\". */\n format?: string | undefined;\n placement?: Placement | undefined;\n disableClock?: boolean | undefined;\n label?: string | undefined;\n clockAriaLabel?: string | undefined;\n value?: Date | string | undefined;\n clockIcon?: JSX.Element;\n onChange?: ((event?: Event, value?: Date, data?: TimePickerProps) => void) | undefined;\n onBlur?: ((event?: FocusEvent, value?: Date, data?: TimePickerProps) => void) | undefined;\n ref?: Ref<HTMLInputElement>;\n}\n\nconst FADE_MS = 150;\n\nexport function TimePicker(props: TimePickerProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"value\",\n \"onChange\",\n \"placement\",\n \"disabled\",\n \"disableClock\",\n \"clockAriaLabel\",\n \"format\",\n \"onBlur\",\n \"ref\",\n ]);\n\n const value = (): Date | undefined => (local.value === undefined ? undefined : new Date(local.value));\n const [viewValue, setViewValue] = createSignal<Date>(isValidTimeDate(value()) ? (value() as Date) : new Date());\n const [isOpen, setIsOpen] = createSignal(false);\n\n let anchorEl: HTMLElement | undefined;\n let clockEl: HTMLElement | undefined;\n\n const resolved = () => resolvePlacement(local.placement ?? \"bottom-start\");\n const floating = createFloating({\n placement: () => resolved().placement,\n middleware: () => buildFloatingMiddleware(resolved()),\n });\n\n createEffect(() => {\n if (local.disabled) return;\n const v = value();\n setViewValue(isValidTimeDate(v) ? v : new Date());\n });\n\n const shouldOpen = (): boolean => isOpen() && !local.disabled && !local.disableClock;\n const [mounted, setMounted] = createSignal(shouldOpen());\n const [shown, setShown] = createSignal(false);\n let raf: number | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n createEffect(() => {\n if (shouldOpen()) {\n if (timer !== undefined) clearTimeout(timer);\n setMounted(true);\n raf = requestAnimationFrame(() => setShown(true));\n } else {\n setShown(false);\n if (mounted()) timer = setTimeout(() => setMounted(false), FADE_MS);\n }\n });\n onCleanup(() => {\n if (raf !== undefined) cancelAnimationFrame(raf);\n if (timer !== undefined) clearTimeout(timer);\n });\n\n const onToggle = (): void => {\n if (!local.disabled) setIsOpen((prev) => !prev);\n };\n\n const onClickAway = (event: MouseEvent | TouchEvent): void => {\n const target = event.target as HTMLElement;\n if (clockEl?.contains(target) || anchorEl?.contains(target)) return;\n setIsOpen(false);\n };\n\n const onTimeChange = (next: Date): void => {\n setViewValue(next);\n local.onChange?.(undefined, next, props);\n };\n\n return (\n <>\n <TimePickerInput\n ref={mergeRefs(local.ref, floating.setReference, (el) => (anchorEl = el as HTMLElement))}\n value={local.value}\n onChange={local.onChange}\n onBlur={local.onBlur}\n onToggle={onToggle}\n disabled={local.disabled}\n disableClock={local.disableClock}\n format={local.format}\n {...rest}\n />\n <Show when={mounted()}>\n <Portal mount={document.body}>\n <ClickAwayListener onClickAway={onClickAway}>\n <div\n ref={mergeRefs(floating.setFloating, (el) => (clockEl = el as HTMLElement))}\n class=\"smwb-date-picker smwb-time-picker\"\n style={{ ...floating.floatingStyles(), transition: `opacity ${FADE_MS}ms ease-in-out`, opacity: shown() ? 1 : 0 }}\n data-testid=\"time-picker\"\n role=\"dialog\"\n aria-modal=\"false\"\n aria-label={local.clockAriaLabel ?? \"Choose time\"}\n >\n <div class=\"smwb-date-picker__inner\">\n <TimePickerColumns\n value={viewValue()}\n format={local.format}\n onChange={onTimeChange}\n onComplete={() => {\n setIsOpen(false);\n }}\n />\n </div>\n </div>\n </ClickAwayListener>\n </Portal>\n </Show>\n </>\n );\n}\n\nexport default TimePicker;\n"],"names":["FADE_MS","TimePicker","props","local","rest","splitProps","value","undefined","Date","viewValue","setViewValue","createSignal","isValidTimeDate","isOpen","setIsOpen","anchorEl","clockEl","resolved","resolvePlacement","placement","floating","createFloating","middleware","buildFloatingMiddleware","createEffect","disabled","v","shouldOpen","disableClock","mounted","setMounted","shown","setShown","raf","timer","clearTimeout","requestAnimationFrame","setTimeout","onCleanup","cancelAnimationFrame","onToggle","prev","onClickAway","event","target","contains","onTimeChange","next","onChange","_$createComponent","TimePickerInput","_$mergeProps","ref","r$","_ref$","mergeRefs","setReference","el","onBlur","format","Show","when","children","Portal","mount","document","body","ClickAwayListener","_el$","_tmpl$","_el$2","firstChild","_ref$2","setFloating","_$use","_$insert","TimePickerColumns","onComplete","_$effect","_p$","_v$","floatingStyles","opacity","_v$2","clockAriaLabel","e","_$style","t","_$setAttribute"],"mappings":";;;;;;;;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AA,QAAA,IAACC,QAAK;AAAA,
|
|
1
|
+
{"version":3,"file":"timePicker.js","sources":["../../../../../src/components/inputs/timePicker/timePicker.tsx"],"sourcesContent":["import { type JSX, Show, createEffect, createSignal, onCleanup, splitProps } from \"solid-js\";\nimport { Portal, isServer } from \"solid-js/web\";\nimport { buildFloatingMiddleware, type Placement, resolvePlacement } from \"../../../utils/floating\";\nimport { createFloating } from \"../../../primitives/createFloating\";\nimport { ClickAwayListener } from \"../../clickAwayListener\";\nimport { TimePickerInput } from \"./timePickerInput\";\nimport { TimePickerColumns } from \"./timePickerColumns\";\nimport { isValidTimeDate } from \"./timeUtils\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport type { TextFieldProps } from \"../textField\";\n\nexport interface TimePickerProps\n extends Omit<TextFieldProps, \"onBlur\" | \"onChange\" | \"value\" | \"defaultValue\" | \"ref\" | \"onToggle\"> {\n /** Time format pattern with tokens HH, mm, ss, e.g. \"HH:mm\" or \"HH:mm:ss\". */\n format?: string | undefined;\n placement?: Placement | undefined;\n disableClock?: boolean | undefined;\n label?: string | undefined;\n clockAriaLabel?: string | undefined;\n value?: Date | string | undefined;\n clockIcon?: JSX.Element;\n onChange?: ((event?: Event, value?: Date, data?: TimePickerProps) => void) | undefined;\n onBlur?: ((event?: FocusEvent, value?: Date, data?: TimePickerProps) => void) | undefined;\n ref?: Ref<HTMLInputElement>;\n}\n\nconst FADE_MS = 150;\n\nexport function TimePicker(props: TimePickerProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"value\",\n \"onChange\",\n \"placement\",\n \"disabled\",\n \"disableClock\",\n \"clockAriaLabel\",\n \"format\",\n \"onBlur\",\n \"ref\",\n ]);\n\n const value = (): Date | undefined => (local.value === undefined ? undefined : new Date(local.value));\n const [viewValue, setViewValue] = createSignal<Date>(isValidTimeDate(value()) ? (value() as Date) : new Date());\n const [isOpen, setIsOpen] = createSignal(false);\n\n let anchorEl: HTMLElement | undefined;\n let clockEl: HTMLElement | undefined;\n\n const resolved = () => resolvePlacement(local.placement ?? \"bottom-start\");\n const floating = createFloating({\n placement: () => resolved().placement,\n middleware: () => buildFloatingMiddleware(resolved()),\n });\n\n createEffect(() => {\n if (local.disabled) return;\n const v = value();\n setViewValue(isValidTimeDate(v) ? v : new Date());\n });\n\n const shouldOpen = (): boolean => isOpen() && !local.disabled && !local.disableClock;\n const [mounted, setMounted] = createSignal(shouldOpen());\n const [shown, setShown] = createSignal(false);\n let raf: number | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n createEffect(() => {\n if (shouldOpen()) {\n if (timer !== undefined) clearTimeout(timer);\n setMounted(true);\n raf = requestAnimationFrame(() => setShown(true));\n } else {\n setShown(false);\n if (mounted()) timer = setTimeout(() => setMounted(false), FADE_MS);\n }\n });\n onCleanup(() => {\n if (raf !== undefined) cancelAnimationFrame(raf);\n if (timer !== undefined) clearTimeout(timer);\n });\n\n const onToggle = (): void => {\n if (!local.disabled) setIsOpen((prev) => !prev);\n };\n\n const onClickAway = (event: MouseEvent | TouchEvent): void => {\n const target = event.target as HTMLElement;\n if (clockEl?.contains(target) || anchorEl?.contains(target)) return;\n setIsOpen(false);\n };\n\n const onTimeChange = (next: Date): void => {\n setViewValue(next);\n local.onChange?.(undefined, next, props);\n };\n\n return (\n <>\n <TimePickerInput\n ref={mergeRefs(local.ref, floating.setReference, (el) => (anchorEl = el as HTMLElement))}\n value={local.value}\n onChange={local.onChange}\n onBlur={local.onBlur}\n onToggle={onToggle}\n disabled={local.disabled}\n disableClock={local.disableClock}\n format={local.format}\n {...rest}\n />\n <Show when={mounted()}>\n <Portal mount={(isServer ? undefined : document.body) as Node}>\n <ClickAwayListener onClickAway={onClickAway}>\n <div\n ref={mergeRefs(floating.setFloating, (el) => (clockEl = el as HTMLElement))}\n class=\"smwb-date-picker smwb-time-picker\"\n style={{ ...floating.floatingStyles(), transition: `opacity ${FADE_MS}ms ease-in-out`, opacity: shown() ? 1 : 0 }}\n data-testid=\"time-picker\"\n role=\"dialog\"\n aria-modal=\"false\"\n aria-label={local.clockAriaLabel ?? \"Choose time\"}\n >\n <div class=\"smwb-date-picker__inner\">\n <TimePickerColumns\n value={viewValue()}\n format={local.format}\n onChange={onTimeChange}\n onComplete={() => {\n setIsOpen(false);\n }}\n />\n </div>\n </div>\n </ClickAwayListener>\n </Portal>\n </Show>\n </>\n );\n}\n\nexport default TimePicker;\n"],"names":["FADE_MS","TimePicker","props","local","rest","splitProps","value","undefined","Date","viewValue","setViewValue","createSignal","isValidTimeDate","isOpen","setIsOpen","anchorEl","clockEl","resolved","resolvePlacement","placement","floating","createFloating","middleware","buildFloatingMiddleware","createEffect","disabled","v","shouldOpen","disableClock","mounted","setMounted","shown","setShown","raf","timer","clearTimeout","requestAnimationFrame","setTimeout","onCleanup","cancelAnimationFrame","onToggle","prev","onClickAway","event","target","contains","onTimeChange","next","onChange","_$createComponent","TimePickerInput","_$mergeProps","ref","r$","_ref$","mergeRefs","setReference","el","onBlur","format","Show","when","children","Portal","mount","isServer","document","body","ClickAwayListener","_el$","_tmpl$","_el$2","firstChild","_ref$2","setFloating","_$use","_$insert","TimePickerColumns","onComplete","_$effect","_p$","_v$","floatingStyles","opacity","_v$2","clockAriaLabel","e","_$style","t","_$setAttribute"],"mappings":";;;;;;;;;;AA0BA,MAAMA,IAAU;AAET,SAASC,GAAWC,GAAqC;AAC9D,QAAM,CAACC,GAAOC,CAAI,IAAIC,EAAWH,GAAO,CACtC,SACA,YACA,aACA,YACA,gBACA,kBACA,UACA,UACA,KAAK,CACN,GAEKI,IAAQA,MAAyBH,EAAMG,UAAUC,SAAYA,SAAY,IAAIC,KAAKL,EAAMG,KAAK,GAC7F,CAACG,GAAWC,CAAY,IAAIC,EAAmBC,EAAgBN,EAAAA,CAAO,IAAKA,MAAmB,oBAAIE,MAAM,GACxG,CAACK,GAAQC,CAAS,IAAIH,EAAa,EAAK;AAE9C,MAAII,GACAC;AAEJ,QAAMC,IAAWA,MAAMC,EAAiBf,EAA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AA;AAAAA,gBAAW;AAAA,gBAAA,IAClBkD,SAAM;AAAA,yBAAExD,EAAMwD;AAAAA,gBAAM;AAAA,gBACpBX,UAAUF;AAAAA,gBACVgC,YAAYA,MAAM;AAChBhE,kBAAAA,EAAU,EAAK;AAAA,gBACjB;AAAA,cAAA,CAAC,CAAA,GAAAiE,EAAAC,CAAAA,MAAA;AAAA,oBAAAC,IAbE;AAAA,kBAAE,GAAG7D,EAAS8D,eAAAA;AAAAA,kBAAkEC,SAASpD,EAAAA,IAAU,IAAI;AAAA,gBAAA,GAAGqD,IAIrGjF,EAAMkF,kBAAkB;AAAaL,uBAAAA,EAAAM,IAAAC,EAAAlB,GAAAY,GAAAD,EAAAM,CAAA,GAAAF,MAAAJ,EAAAQ,KAAAC,EAAApB,GAAA,cAAAW,EAAAQ,IAAAJ,CAAA,GAAAJ;AAAAA,cAAA,GAAA;AAAA,gBAAAM,GAAA/E;AAAAA,gBAAAiF,GAAAjF;AAAAA,cAAAA,CAAA,GAAA8D;AAAAA,YAAA;AAAA,UAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAkB/D;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { createComponent as o, Portal as j, insert as d, effect as _, className as H, template as
|
|
2
|
-
import { mergeProps as T, splitProps as R, createSignal as B, createEffect as M, onCleanup as
|
|
1
|
+
import { createComponent as o, Portal as j, insert as d, effect as _, className as H, isServer as V, template as b, mergeProps as L, use as q, spread as F, setAttribute as w, memo as G, delegateEvents as J } from "solid-js/web";
|
|
2
|
+
import { mergeProps as T, splitProps as R, createSignal as B, createEffect as M, onCleanup as Q, Show as g } from "solid-js";
|
|
3
3
|
import C from "clsx";
|
|
4
4
|
import { createCssTransition as I } from "../../../primitives/createCssTransition.js";
|
|
5
|
-
import { mergeRefs as
|
|
6
|
-
import { ClickAwayListener as
|
|
5
|
+
import { mergeRefs as Z } from "../../../primitives/mergeRefs.js";
|
|
6
|
+
import { ClickAwayListener as ee } from "../../clickAwayListener/clickAwayListener.js";
|
|
7
7
|
import { Button as P } from "../../inputs/button/button.js";
|
|
8
8
|
import { Icon as E } from "../../base/icon/icon.js";
|
|
9
|
-
var
|
|
10
|
-
const
|
|
11
|
-
function
|
|
9
|
+
var te = /* @__PURE__ */ b("<div class=smwb-sheet__drag-handle data-testid=sheet-drag-handle role=separator tabindex=0><span class=smwb-sheet__drag-handle-bar>"), ne = /* @__PURE__ */ b("<div class=smwb-sheet__header>"), re = /* @__PURE__ */ b("<div class=smwb-sheet__inner>"), x = /* @__PURE__ */ b("<div>");
|
|
10
|
+
const ie = (m) => m === "bottom" || m === "top";
|
|
11
|
+
function oe(m) {
|
|
12
12
|
const S = T({
|
|
13
13
|
size: "60%",
|
|
14
14
|
withSizeToggle: !0,
|
|
@@ -20,7 +20,7 @@ function ie(m) {
|
|
|
20
20
|
resizeHandleAriaLabel: "Resize sheet"
|
|
21
21
|
}, m), [e, y] = R(S, ["isOpen", "placement", "class", "mode", "size", "variant", "onClose", "withSizeToggle", "hideHeaderActions", "reverseHeaderActions", "resizable", "minSize", "maxSize", "resizeStep", "resizeHandleAriaLabel", "onResize", "style", "handleClose", "handleSizeButton", "children", "ref"]);
|
|
22
22
|
let p;
|
|
23
|
-
const [c, u] = B(null), a = () =>
|
|
23
|
+
const [c, u] = B(null), a = () => ie(e.placement), f = I({
|
|
24
24
|
in: () => e.isOpen,
|
|
25
25
|
timeout: {
|
|
26
26
|
enter: 120,
|
|
@@ -30,14 +30,14 @@ function ie(m) {
|
|
|
30
30
|
enterDone: "smwb-sheet_entered"
|
|
31
31
|
},
|
|
32
32
|
appear: !0
|
|
33
|
-
}),
|
|
33
|
+
}), v = (t) => {
|
|
34
34
|
const s = a() ? window.innerHeight : window.innerWidth, n = e.maxSize ?? s;
|
|
35
35
|
return Math.max(e.minSize, Math.min(n, t));
|
|
36
36
|
}, r = () => {
|
|
37
37
|
const t = p?.getBoundingClientRect();
|
|
38
38
|
return t ? a() ? t.height : t.width : e.minSize;
|
|
39
39
|
}, l = (t) => {
|
|
40
|
-
const s =
|
|
40
|
+
const s = v(t);
|
|
41
41
|
u(s), e.onResize?.(s);
|
|
42
42
|
};
|
|
43
43
|
let h = null;
|
|
@@ -57,8 +57,8 @@ function ie(m) {
|
|
|
57
57
|
}, A = (t) => {
|
|
58
58
|
h = null, t.currentTarget.hasPointerCapture?.(t.pointerId) && t.currentTarget.releasePointerCapture?.(t.pointerId);
|
|
59
59
|
}, W = (t) => {
|
|
60
|
-
const s = c() ?? r(), n = e.maxSize ?? (a() ? window.innerHeight : window.innerWidth), i = e.placement === "bottom" ? "ArrowUp" : e.placement === "top" ? "ArrowDown" : e.placement === "left" ? "ArrowRight" : "ArrowLeft",
|
|
61
|
-
t.key === i ? (t.preventDefault(), l(s + e.resizeStep)) : t.key ===
|
|
60
|
+
const s = c() ?? r(), n = e.maxSize ?? (a() ? window.innerHeight : window.innerWidth), i = e.placement === "bottom" ? "ArrowUp" : e.placement === "top" ? "ArrowDown" : e.placement === "left" ? "ArrowRight" : "ArrowLeft", z = e.placement === "bottom" ? "ArrowDown" : e.placement === "top" ? "ArrowUp" : e.placement === "left" ? "ArrowLeft" : "ArrowRight";
|
|
61
|
+
t.key === i ? (t.preventDefault(), l(s + e.resizeStep)) : t.key === z ? (t.preventDefault(), l(s - e.resizeStep)) : t.key === "Home" ? (t.preventDefault(), l(e.minSize)) : t.key === "End" && (t.preventDefault(), l(n));
|
|
62
62
|
};
|
|
63
63
|
M(() => {
|
|
64
64
|
if (!e.isOpen) {
|
|
@@ -107,8 +107,8 @@ function ie(m) {
|
|
|
107
107
|
return {};
|
|
108
108
|
};
|
|
109
109
|
return (() => {
|
|
110
|
-
var t = x(), s =
|
|
111
|
-
return typeof s == "function" &&
|
|
110
|
+
var t = x(), s = Z(e.ref, (n) => p = n);
|
|
111
|
+
return typeof s == "function" && q(s, t), F(t, L(y, {
|
|
112
112
|
"data-testid": "sheet",
|
|
113
113
|
tabindex: -1,
|
|
114
114
|
role: "dialog",
|
|
@@ -134,10 +134,10 @@ function ie(m) {
|
|
|
134
134
|
return e.resizable;
|
|
135
135
|
},
|
|
136
136
|
get children() {
|
|
137
|
-
var n =
|
|
137
|
+
var n = te();
|
|
138
138
|
return n.$$keydown = W, n.addEventListener("pointercancel", A), n.$$pointerup = A, n.$$pointermove = N, n.$$pointerdown = K, _((i) => {
|
|
139
|
-
var
|
|
140
|
-
return
|
|
139
|
+
var z = a() ? "horizontal" : "vertical", k = e.resizeHandleAriaLabel, $ = e.minSize, O = Math.round(e.maxSize ?? (a() ? window.innerHeight : window.innerWidth)), D = Math.round(c() ?? r());
|
|
140
|
+
return z !== i.e && w(n, "aria-orientation", i.e = z), k !== i.t && w(n, "aria-label", i.t = k), $ !== i.a && w(n, "aria-valuemin", i.a = $), O !== i.o && w(n, "aria-valuemax", i.o = O), D !== i.i && w(n, "aria-valuenow", i.i = D), i;
|
|
141
141
|
}, {
|
|
142
142
|
e: void 0,
|
|
143
143
|
t: void 0,
|
|
@@ -151,21 +151,21 @@ function ie(m) {
|
|
|
151
151
|
return U();
|
|
152
152
|
},
|
|
153
153
|
get children() {
|
|
154
|
-
var n =
|
|
154
|
+
var n = ne();
|
|
155
155
|
return d(n, X), n;
|
|
156
156
|
}
|
|
157
157
|
}), null), d(t, o(g, {
|
|
158
158
|
get when() {
|
|
159
|
-
return
|
|
159
|
+
return G(() => !!e.isOpen)() && e.mode !== "small";
|
|
160
160
|
},
|
|
161
161
|
get children() {
|
|
162
|
-
var n =
|
|
162
|
+
var n = re();
|
|
163
163
|
return d(n, () => e.children), n;
|
|
164
164
|
}
|
|
165
165
|
}), null), t;
|
|
166
166
|
})();
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function he(m) {
|
|
169
169
|
const S = T({
|
|
170
170
|
variant: "default",
|
|
171
171
|
placement: "bottom",
|
|
@@ -186,13 +186,13 @@ function pe(m) {
|
|
|
186
186
|
const r = (l) => {
|
|
187
187
|
l.key === "Escape" && e.onClose?.();
|
|
188
188
|
};
|
|
189
|
-
document.addEventListener("keydown", r),
|
|
189
|
+
document.addEventListener("keydown", r), Q(() => document.removeEventListener("keydown", r));
|
|
190
190
|
});
|
|
191
191
|
const a = () => {
|
|
192
192
|
c((r) => r === "expanded" ? "small" : r === null ? "expanded" : null);
|
|
193
193
|
}, f = () => {
|
|
194
194
|
e.onClose?.(), c(null);
|
|
195
|
-
},
|
|
195
|
+
}, v = () => o(oe, L(y, {
|
|
196
196
|
ref(r) {
|
|
197
197
|
var l = e.ref;
|
|
198
198
|
typeof l == "function" ? l(r) : e.ref = r;
|
|
@@ -225,7 +225,7 @@ function pe(m) {
|
|
|
225
225
|
get children() {
|
|
226
226
|
return o(j, {
|
|
227
227
|
get mount() {
|
|
228
|
-
return document.body;
|
|
228
|
+
return V ? void 0 : document.body;
|
|
229
229
|
},
|
|
230
230
|
get children() {
|
|
231
231
|
return o(g, {
|
|
@@ -235,17 +235,17 @@ function pe(m) {
|
|
|
235
235
|
get fallback() {
|
|
236
236
|
return (() => {
|
|
237
237
|
var r = x();
|
|
238
|
-
return d(r, o(
|
|
238
|
+
return d(r, o(ee, {
|
|
239
239
|
onClickAway: () => !e.disableOutsideClick && f(),
|
|
240
240
|
get children() {
|
|
241
|
-
return
|
|
241
|
+
return v();
|
|
242
242
|
}
|
|
243
243
|
})), _(() => H(r, C("smwb-sheet__overlay", "smwb-dark", `smwb-${e.placement}`, `smwb-sheet_${e.variant}`, u.classes()))), r;
|
|
244
244
|
})();
|
|
245
245
|
},
|
|
246
246
|
get children() {
|
|
247
247
|
var r = x();
|
|
248
|
-
return d(r,
|
|
248
|
+
return d(r, v), _(() => H(r, C(e.disableOutsideClick ? "smwb-sheet__overlay" : "smwb-sheet__default", u.classes()))), r;
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
251
|
}
|
|
@@ -253,8 +253,8 @@ function pe(m) {
|
|
|
253
253
|
}
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
|
|
256
|
+
J(["pointerdown", "pointermove", "pointerup", "keydown"]);
|
|
257
257
|
export {
|
|
258
|
-
|
|
258
|
+
he as Sheet
|
|
259
259
|
};
|
|
260
260
|
//# sourceMappingURL=sheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","sources":["../../../../../src/components/layout/sheet/sheet.tsx"],"sourcesContent":["import { type JSX, type ParentProps, Show, createEffect, createSignal, mergeProps, onCleanup, splitProps } from \"solid-js\";\nimport { Portal } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { Button } from \"../../inputs/button\";\nimport { Icon } from \"../../base/icon\";\nimport { ClickAwayListener } from \"../../clickAwayListener\";\nimport { createCssTransition } from \"../../../primitives/createCssTransition\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface SheetProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n placement?: \"top\" | \"bottom\" | \"right\" | \"left\";\n isOpen: boolean;\n onClose?: (() => void) | undefined;\n variant?: \"default\" | \"modal\";\n withSizeToggle?: boolean;\n /** Hide built-in header actions; onClose still handles Esc and backdrop. */\n hideHeaderActions?: boolean;\n reverseHeaderActions?: boolean;\n size?: string;\n disableOutsideClick?: boolean;\n /** Close the sheet when Escape is pressed. */\n closeOnEsc?: boolean;\n /** Allow drag-to-resize (mobile bottom-sheet style). Off by default. */\n resizable?: boolean;\n /** Minimum size in px while resizing (default 80). */\n minSize?: number;\n /** Maximum size in px while resizing (default: viewport dimension). */\n maxSize?: number;\n /** Step in px for keyboard resizing (default 24). */\n resizeStep?: number;\n /** Accessible label for the resize handle. */\n resizeHandleAriaLabel?: string;\n /** Called with the new size in px while/after resizing. */\n onResize?: (size: number) => void;\n \"aria-label\"?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\ntype Mode = \"small\" | \"expanded\" | null;\n\nconst isVerticalAxis = (placement: SheetProps[\"placement\"]): boolean => placement === \"bottom\" || placement === \"top\";\n\ninterface SheetBlockProps extends ParentProps<SheetProps> {\n mode: Mode;\n handleSizeButton: () => void;\n handleClose: () => void;\n}\n\nfunction SheetBlock(props: SheetBlockProps): JSX.Element {\n const merged = mergeProps(\n {\n size: \"60%\",\n withSizeToggle: true,\n hideHeaderActions: false,\n reverseHeaderActions: false,\n resizable: false,\n minSize: 80,\n resizeStep: 24,\n resizeHandleAriaLabel: \"Resize sheet\",\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"placement\",\n \"class\",\n \"mode\",\n \"size\",\n \"variant\",\n \"onClose\",\n \"withSizeToggle\",\n \"hideHeaderActions\",\n \"reverseHeaderActions\",\n \"resizable\",\n \"minSize\",\n \"maxSize\",\n \"resizeStep\",\n \"resizeHandleAriaLabel\",\n \"onResize\",\n \"style\",\n \"handleClose\",\n \"handleSizeButton\",\n \"children\",\n \"ref\",\n ]);\n\n let rootEl: HTMLDivElement | undefined;\n const [dragSize, setDragSize] = createSignal<number | null>(null);\n const vertical = (): boolean => isVerticalAxis(local.placement);\n\n const inner = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 120, exit: 120 },\n classNames: { enterDone: \"smwb-sheet_entered\" },\n appear: true,\n });\n\n const clamp = (px: number): number => {\n const viewport = vertical() ? window.innerHeight : window.innerWidth;\n const max = local.maxSize ?? viewport;\n return Math.max(local.minSize, Math.min(max, px));\n };\n\n const currentSizePx = (): number => {\n const rect = rootEl?.getBoundingClientRect();\n if (!rect) return local.minSize;\n return vertical() ? rect.height : rect.width;\n };\n\n const applySize = (px: number): void => {\n const next = clamp(px);\n setDragSize(next);\n local.onResize?.(next);\n };\n\n let drag: { start: number; size: number } | null = null;\n\n const onPointerDown = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n event.preventDefault();\n drag = { start: vertical() ? event.clientY : event.clientX, size: currentSizePx() };\n try {\n event.currentTarget.setPointerCapture?.(event.pointerId);\n } catch {\n /* best-effort */\n }\n };\n\n const onPointerMove = (event: PointerEvent): void => {\n if (!drag) return;\n const pos = vertical() ? event.clientY : event.clientX;\n const delta = pos - drag.start;\n const grow = local.placement === \"bottom\" || local.placement === \"right\" ? -delta : delta;\n applySize(drag.size + grow);\n };\n\n const endDrag = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n drag = null;\n if (event.currentTarget.hasPointerCapture?.(event.pointerId)) {\n event.currentTarget.releasePointerCapture?.(event.pointerId);\n }\n };\n\n const onHandleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n const base = dragSize() ?? currentSizePx();\n const max = local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth);\n const incKey =\n local.placement === \"bottom\" ? \"ArrowUp\" : local.placement === \"top\" ? \"ArrowDown\" : local.placement === \"left\" ? \"ArrowRight\" : \"ArrowLeft\";\n const decKey =\n local.placement === \"bottom\" ? \"ArrowDown\" : local.placement === \"top\" ? \"ArrowUp\" : local.placement === \"left\" ? \"ArrowLeft\" : \"ArrowRight\";\n if (event.key === incKey) {\n event.preventDefault();\n applySize(base + local.resizeStep);\n } else if (event.key === decKey) {\n event.preventDefault();\n applySize(base - local.resizeStep);\n } else if (event.key === \"Home\") {\n event.preventDefault();\n applySize(local.minSize);\n } else if (event.key === \"End\") {\n event.preventDefault();\n applySize(max);\n }\n };\n\n createEffect(() => {\n if (!local.isOpen) {\n setDragSize(null);\n return;\n }\n rootEl?.focus();\n });\n\n const showActions = (): boolean => !local.hideHeaderActions && (!!local.onClose || local.withSizeToggle);\n const actionNodes = (): JSX.Element[] => {\n const nodes: JSX.Element[] = [];\n if (local.withSizeToggle) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleSizeButton}>\n <Icon name=\"open_in_full\" />\n </Button>\n );\n }\n if (local.onClose) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleClose}>\n <Icon name=\"close\" />\n </Button>\n );\n }\n if (local.reverseHeaderActions) nodes.reverse();\n return nodes;\n };\n\n const sizeStyle = (): JSX.CSSProperties => {\n if (local.resizable && dragSize() !== null) {\n const px = `${dragSize()}px`;\n return { ...(vertical() ? { height: px } : { width: px }), transition: \"none\" };\n }\n return {};\n };\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref, (el) => (rootEl = el as HTMLDivElement))}\n data-testid=\"sheet\"\n tabindex={-1}\n role=\"dialog\"\n aria-modal={local.variant === \"modal\" || undefined}\n class={cn(\"smwb-sheet\", local.class, `smwb-sheet_${local.variant}`, `smwb-${local.placement}`, inner.classes(), {\n \"smwb-expanded\": local.mode === \"expanded\",\n \"smwb-small\": local.mode === \"small\",\n \"smwb-sheet_resizable\": local.resizable,\n })}\n style={{\n \"--sizeProp\": local.size,\n ...sizeStyle(),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n }}\n >\n <Show when={local.resizable}>\n <div\n class=\"smwb-sheet__drag-handle\"\n data-testid=\"sheet-drag-handle\"\n role=\"separator\"\n tabindex={0}\n aria-orientation={vertical() ? \"horizontal\" : \"vertical\"}\n aria-label={local.resizeHandleAriaLabel}\n aria-valuemin={local.minSize}\n aria-valuemax={Math.round(local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth))}\n aria-valuenow={Math.round(dragSize() ?? currentSizePx())}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onHandleKeyDown}\n >\n <span class=\"smwb-sheet__drag-handle-bar\" />\n </div>\n </Show>\n <Show when={showActions()}>\n <div class=\"smwb-sheet__header\">{actionNodes()}</div>\n </Show>\n <Show when={local.isOpen && local.mode !== \"small\"}>\n <div class=\"smwb-sheet__inner\">{local.children}</div>\n </Show>\n </div>\n );\n}\n\nexport function Sheet(props: ParentProps<SheetProps>): JSX.Element {\n const merged = mergeProps({ variant: \"default\" as const, placement: \"bottom\" as const, closeOnEsc: true }, props);\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"onClose\",\n \"variant\",\n \"children\",\n \"placement\",\n \"disableOutsideClick\",\n \"closeOnEsc\",\n \"ref\",\n ]);\n\n const [mode, setMode] = createSignal<Mode>(null);\n\n const outer = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 70, exit: 70 },\n classNames: { enterDone: \"smwb-entered\" },\n appear: true,\n });\n\n createEffect(() => {\n if (!local.isOpen || !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 const handleSizeButton = (): void => {\n setMode((prev) => (prev === \"expanded\" ? \"small\" : prev === null ? \"expanded\" : null));\n };\n const handleClose = (): void => {\n local.onClose?.();\n setMode(null);\n };\n\n const block = (): JSX.Element => (\n <SheetBlock\n {...rest}\n ref={local.ref}\n isOpen={local.isOpen}\n onClose={local.onClose}\n handleSizeButton={handleSizeButton}\n handleClose={handleClose}\n mode={mode()}\n placement={local.placement}\n variant={local.variant}\n >\n {local.children}\n </SheetBlock>\n );\n\n return (\n <Show when={outer.mounted()}>\n <Portal mount={document.body}>\n <Show\n when={local.variant === \"default\"}\n fallback={\n <div class={cn(\"smwb-sheet__overlay\", \"smwb-dark\", `smwb-${local.placement}`, `smwb-sheet_${local.variant}`, outer.classes())}>\n <ClickAwayListener onClickAway={() => !local.disableOutsideClick && handleClose()}>\n {block()}\n </ClickAwayListener>\n </div>\n }\n >\n <div class={cn(local.disableOutsideClick ? \"smwb-sheet__overlay\" : \"smwb-sheet__default\", outer.classes())}>\n {block()}\n </div>\n </Show>\n </Portal>\n </Show>\n );\n}\n\nexport default Sheet;\n"],"names":["isVerticalAxis","placement","SheetBlock","props","merged","mergeProps","size","withSizeToggle","hideHeaderActions","reverseHeaderActions","resizable","minSize","resizeStep","resizeHandleAriaLabel","local","rest","splitProps","rootEl","dragSize","setDragSize","createSignal","vertical","inner","createCssTransition","in","isOpen","timeout","enter","exit","classNames","enterDone","appear","clamp","px","viewport","window","innerHeight","innerWidth","max","maxSize","Math","min","currentSizePx","rect","getBoundingClientRect","height","width","applySize","next","onResize","drag","onPointerDown","event","preventDefault","start","clientY","clientX","currentTarget","setPointerCapture","pointerId","onPointerMove","delta","grow","endDrag","hasPointerCapture","releasePointerCapture","onHandleKeyDown","base","incKey","decKey","key","createEffect","focus","showActions","onClose","actionNodes","nodes","push","_$createComponent","Button","variant","onClick","handleSizeButton","children","Icon","name","handleClose","reverse","sizeStyle","transition","_el$","_tmpl$4","_ref$","mergeRefs","ref","el","_$use","_$spread","_$mergeProps","undefined","cn","class","classes","mode","style","_$insert","Show","when","_el$2","_tmpl$","$$keydown","addEventListener","$$pointerup","$$pointermove","$$pointerdown","_$effect","_p$","_v$","_v$2","_v$3","_v$4","round","_v$5","e","_$setAttribute","t","a","o","i","_el$3","_tmpl$2","_$memo","_el$4","_tmpl$3","Sheet","closeOnEsc","setMode","outer","onKeyDown","document","onCleanup","removeEventListener","prev","block","r$","_ref$2","mounted","Portal","mount","body","fallback","_el$6","ClickAwayListener","onClickAway","disableOutsideClick","_$className","_el$5","_$delegateEvents"],"mappings":";;;;;;;;;AAwCA,MAAMA,KAAiBA,CAACC,MAAgDA,MAAc,YAAYA,MAAc;AAQhH,SAASC,GAAWC,GAAqC;AACvD,QAAMC,IAASC,EACb;AAAA,IACEC,MAAM;AAAA,IACNC,gBAAgB;AAAA,IAChBC,mBAAmB;AAAA,IACnBC,sBAAsB;AAAA,IACtBC,WAAW;AAAA,IACXC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,uBAAuB;AAAA,EAAA,GAEzBV,CACF,GACM,CAACW,GAAOC,CAAI,IAAIC,EAAWZ,GAAQ,CACvC,UACA,aACA,SACA,QACA,QACA,WACA,WACA,kBACA,qBACA,wBACA,aACA,WACA,WACA,cACA,yBACA,YACA,SACA,eACA,oBACA,YACA,KAAK,CACN;AAED,MAAIa;AACJ,QAAM,CAACC,GAAUC,CAAW,IA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AA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAOpH;AAEqBC,EAAA,CAAA,eAAA,eAAA,aAAA,SAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"sheet.js","sources":["../../../../../src/components/layout/sheet/sheet.tsx"],"sourcesContent":["import { type JSX, type ParentProps, Show, createEffect, createSignal, mergeProps, onCleanup, splitProps } from \"solid-js\";\nimport { Portal, isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { Button } from \"../../inputs/button\";\nimport { Icon } from \"../../base/icon\";\nimport { ClickAwayListener } from \"../../clickAwayListener\";\nimport { createCssTransition } from \"../../../primitives/createCssTransition\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface SheetProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n placement?: \"top\" | \"bottom\" | \"right\" | \"left\";\n isOpen: boolean;\n onClose?: (() => void) | undefined;\n variant?: \"default\" | \"modal\";\n withSizeToggle?: boolean;\n /** Hide built-in header actions; onClose still handles Esc and backdrop. */\n hideHeaderActions?: boolean;\n reverseHeaderActions?: boolean;\n size?: string;\n disableOutsideClick?: boolean;\n /** Close the sheet when Escape is pressed. */\n closeOnEsc?: boolean;\n /** Allow drag-to-resize (mobile bottom-sheet style). Off by default. */\n resizable?: boolean;\n /** Minimum size in px while resizing (default 80). */\n minSize?: number;\n /** Maximum size in px while resizing (default: viewport dimension). */\n maxSize?: number;\n /** Step in px for keyboard resizing (default 24). */\n resizeStep?: number;\n /** Accessible label for the resize handle. */\n resizeHandleAriaLabel?: string;\n /** Called with the new size in px while/after resizing. */\n onResize?: (size: number) => void;\n \"aria-label\"?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\ntype Mode = \"small\" | \"expanded\" | null;\n\nconst isVerticalAxis = (placement: SheetProps[\"placement\"]): boolean => placement === \"bottom\" || placement === \"top\";\n\ninterface SheetBlockProps extends ParentProps<SheetProps> {\n mode: Mode;\n handleSizeButton: () => void;\n handleClose: () => void;\n}\n\nfunction SheetBlock(props: SheetBlockProps): JSX.Element {\n const merged = mergeProps(\n {\n size: \"60%\",\n withSizeToggle: true,\n hideHeaderActions: false,\n reverseHeaderActions: false,\n resizable: false,\n minSize: 80,\n resizeStep: 24,\n resizeHandleAriaLabel: \"Resize sheet\",\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"placement\",\n \"class\",\n \"mode\",\n \"size\",\n \"variant\",\n \"onClose\",\n \"withSizeToggle\",\n \"hideHeaderActions\",\n \"reverseHeaderActions\",\n \"resizable\",\n \"minSize\",\n \"maxSize\",\n \"resizeStep\",\n \"resizeHandleAriaLabel\",\n \"onResize\",\n \"style\",\n \"handleClose\",\n \"handleSizeButton\",\n \"children\",\n \"ref\",\n ]);\n\n let rootEl: HTMLDivElement | undefined;\n const [dragSize, setDragSize] = createSignal<number | null>(null);\n const vertical = (): boolean => isVerticalAxis(local.placement);\n\n const inner = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 120, exit: 120 },\n classNames: { enterDone: \"smwb-sheet_entered\" },\n appear: true,\n });\n\n const clamp = (px: number): number => {\n const viewport = vertical() ? window.innerHeight : window.innerWidth;\n const max = local.maxSize ?? viewport;\n return Math.max(local.minSize, Math.min(max, px));\n };\n\n const currentSizePx = (): number => {\n const rect = rootEl?.getBoundingClientRect();\n if (!rect) return local.minSize;\n return vertical() ? rect.height : rect.width;\n };\n\n const applySize = (px: number): void => {\n const next = clamp(px);\n setDragSize(next);\n local.onResize?.(next);\n };\n\n let drag: { start: number; size: number } | null = null;\n\n const onPointerDown = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n event.preventDefault();\n drag = { start: vertical() ? event.clientY : event.clientX, size: currentSizePx() };\n try {\n event.currentTarget.setPointerCapture?.(event.pointerId);\n } catch {\n /* best-effort */\n }\n };\n\n const onPointerMove = (event: PointerEvent): void => {\n if (!drag) return;\n const pos = vertical() ? event.clientY : event.clientX;\n const delta = pos - drag.start;\n const grow = local.placement === \"bottom\" || local.placement === \"right\" ? -delta : delta;\n applySize(drag.size + grow);\n };\n\n const endDrag = (event: PointerEvent & { currentTarget: HTMLDivElement }): void => {\n drag = null;\n if (event.currentTarget.hasPointerCapture?.(event.pointerId)) {\n event.currentTarget.releasePointerCapture?.(event.pointerId);\n }\n };\n\n const onHandleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n const base = dragSize() ?? currentSizePx();\n const max = local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth);\n const incKey =\n local.placement === \"bottom\" ? \"ArrowUp\" : local.placement === \"top\" ? \"ArrowDown\" : local.placement === \"left\" ? \"ArrowRight\" : \"ArrowLeft\";\n const decKey =\n local.placement === \"bottom\" ? \"ArrowDown\" : local.placement === \"top\" ? \"ArrowUp\" : local.placement === \"left\" ? \"ArrowLeft\" : \"ArrowRight\";\n if (event.key === incKey) {\n event.preventDefault();\n applySize(base + local.resizeStep);\n } else if (event.key === decKey) {\n event.preventDefault();\n applySize(base - local.resizeStep);\n } else if (event.key === \"Home\") {\n event.preventDefault();\n applySize(local.minSize);\n } else if (event.key === \"End\") {\n event.preventDefault();\n applySize(max);\n }\n };\n\n createEffect(() => {\n if (!local.isOpen) {\n setDragSize(null);\n return;\n }\n rootEl?.focus();\n });\n\n const showActions = (): boolean => !local.hideHeaderActions && (!!local.onClose || local.withSizeToggle);\n const actionNodes = (): JSX.Element[] => {\n const nodes: JSX.Element[] = [];\n if (local.withSizeToggle) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleSizeButton}>\n <Icon name=\"open_in_full\" />\n </Button>\n );\n }\n if (local.onClose) {\n nodes.push(\n <Button variant=\"outlined\" size=\"small\" onClick={local.handleClose}>\n <Icon name=\"close\" />\n </Button>\n );\n }\n if (local.reverseHeaderActions) nodes.reverse();\n return nodes;\n };\n\n const sizeStyle = (): JSX.CSSProperties => {\n if (local.resizable && dragSize() !== null) {\n const px = `${dragSize()}px`;\n return { ...(vertical() ? { height: px } : { width: px }), transition: \"none\" };\n }\n return {};\n };\n\n return (\n <div\n {...rest}\n ref={mergeRefs(local.ref, (el) => (rootEl = el as HTMLDivElement))}\n data-testid=\"sheet\"\n tabindex={-1}\n role=\"dialog\"\n aria-modal={local.variant === \"modal\" || undefined}\n class={cn(\"smwb-sheet\", local.class, `smwb-sheet_${local.variant}`, `smwb-${local.placement}`, inner.classes(), {\n \"smwb-expanded\": local.mode === \"expanded\",\n \"smwb-small\": local.mode === \"small\",\n \"smwb-sheet_resizable\": local.resizable,\n })}\n style={{\n \"--sizeProp\": local.size,\n ...sizeStyle(),\n ...(typeof local.style === \"object\" && local.style ? local.style : {}),\n }}\n >\n <Show when={local.resizable}>\n <div\n class=\"smwb-sheet__drag-handle\"\n data-testid=\"sheet-drag-handle\"\n role=\"separator\"\n tabindex={0}\n aria-orientation={vertical() ? \"horizontal\" : \"vertical\"}\n aria-label={local.resizeHandleAriaLabel}\n aria-valuemin={local.minSize}\n aria-valuemax={Math.round(local.maxSize ?? (vertical() ? window.innerHeight : window.innerWidth))}\n aria-valuenow={Math.round(dragSize() ?? currentSizePx())}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onHandleKeyDown}\n >\n <span class=\"smwb-sheet__drag-handle-bar\" />\n </div>\n </Show>\n <Show when={showActions()}>\n <div class=\"smwb-sheet__header\">{actionNodes()}</div>\n </Show>\n <Show when={local.isOpen && local.mode !== \"small\"}>\n <div class=\"smwb-sheet__inner\">{local.children}</div>\n </Show>\n </div>\n );\n}\n\nexport function Sheet(props: ParentProps<SheetProps>): JSX.Element {\n const merged = mergeProps({ variant: \"default\" as const, placement: \"bottom\" as const, closeOnEsc: true }, props);\n const [local, rest] = splitProps(merged, [\n \"isOpen\",\n \"onClose\",\n \"variant\",\n \"children\",\n \"placement\",\n \"disableOutsideClick\",\n \"closeOnEsc\",\n \"ref\",\n ]);\n\n const [mode, setMode] = createSignal<Mode>(null);\n\n const outer = createCssTransition({\n in: () => local.isOpen,\n timeout: { enter: 70, exit: 70 },\n classNames: { enterDone: \"smwb-entered\" },\n appear: true,\n });\n\n createEffect(() => {\n if (!local.isOpen || !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 const handleSizeButton = (): void => {\n setMode((prev) => (prev === \"expanded\" ? \"small\" : prev === null ? \"expanded\" : null));\n };\n const handleClose = (): void => {\n local.onClose?.();\n setMode(null);\n };\n\n const block = (): JSX.Element => (\n <SheetBlock\n {...rest}\n ref={local.ref}\n isOpen={local.isOpen}\n onClose={local.onClose}\n handleSizeButton={handleSizeButton}\n handleClose={handleClose}\n mode={mode()}\n placement={local.placement}\n variant={local.variant}\n >\n {local.children}\n </SheetBlock>\n );\n\n return (\n <Show when={outer.mounted()}>\n <Portal mount={(isServer ? undefined : document.body) as Node}>\n <Show\n when={local.variant === \"default\"}\n fallback={\n <div class={cn(\"smwb-sheet__overlay\", \"smwb-dark\", `smwb-${local.placement}`, `smwb-sheet_${local.variant}`, outer.classes())}>\n <ClickAwayListener onClickAway={() => !local.disableOutsideClick && handleClose()}>\n {block()}\n </ClickAwayListener>\n </div>\n }\n >\n <div class={cn(local.disableOutsideClick ? \"smwb-sheet__overlay\" : \"smwb-sheet__default\", outer.classes())}>\n {block()}\n </div>\n </Show>\n </Portal>\n </Show>\n );\n}\n\nexport default Sheet;\n"],"names":["isVerticalAxis","placement","SheetBlock","props","merged","mergeProps","size","withSizeToggle","hideHeaderActions","reverseHeaderActions","resizable","minSize","resizeStep","resizeHandleAriaLabel","local","rest","splitProps","rootEl","dragSize","setDragSize","createSignal","vertical","inner","createCssTransition","in","isOpen","timeout","enter","exit","classNames","enterDone","appear","clamp","px","viewport","window","innerHeight","innerWidth","max","maxSize","Math","min","currentSizePx","rect","getBoundingClientRect","height","width","applySize","next","onResize","drag","onPointerDown","event","preventDefault","start","clientY","clientX","currentTarget","setPointerCapture","pointerId","onPointerMove","delta","grow","endDrag","hasPointerCapture","releasePointerCapture","onHandleKeyDown","base","incKey","decKey","key","createEffect","focus","showActions","onClose","actionNodes","nodes","push","_$createComponent","Button","variant","onClick","handleSizeButton","children","Icon","name","handleClose","reverse","sizeStyle","transition","_el$","_tmpl$4","_ref$","mergeRefs","ref","el","_$use","_$spread","_$mergeProps","undefined","cn","class","classes","mode","style","_$insert","Show","when","_el$2","_tmpl$","$$keydown","addEventListener","$$pointerup","$$pointermove","$$pointerdown","_$effect","_p$","_v$","_v$2","_v$3","_v$4","round","_v$5","e","_$setAttribute","t","a","o","i","_el$3","_tmpl$2","_$memo","_el$4","_tmpl$3","Sheet","closeOnEsc","setMode","outer","onKeyDown","document","onCleanup","removeEventListener","prev","block","r$","_ref$2","mounted","Portal","mount","isServer","body","fallback","_el$6","ClickAwayListener","onClickAway","disableOutsideClick","_$className","_el$5","_$delegateEvents"],"mappings":";;;;;;;;;AAwCA,MAAMA,KAAiBA,CAACC,MAAgDA,MAAc,YAAYA,MAAc;AAQhH,SAASC,GAAWC,GAAqC;AACvD,QAAMC,IAASC,EACb;AAAA,IACEC,MAAM;AAAA,IACNC,gBAAgB;AAAA,IAChBC,mBAAmB;AAAA,IACnBC,sBAAsB;AAAA,IACtBC,WAAW;AAAA,IACXC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,uBAAuB;AAAA,EAAA,GAEzBV,CACF,GACM,CAACW,GAAOC,CAAI,IAAIC,EAAWZ,GAAQ,CACvC,UACA,aACA,SACA,QACA,QACA,WACA,WACA,kBACA,qBACA,wBACA,aACA,WACA,WACA,cACA,yBACA,YACA,SACA,eACA,oBACA,YACA,KAAK,CACN;AAED,MAAIa;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAA4B,IAAI,GAC1DC,IAAWA,MAAerB,G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AA,IAAA;AAAA,EAAA,CAAA;AAOpH;AAEqBC,EAAA,CAAA,eAAA,eAAA,aAAA,SAAA,CAAA;"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { createEffect, createSignal, mergeProps, onCleanup, onMount, splitProps } from "solid-js";
|
|
2
|
+
import cn from "clsx";
|
|
3
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
4
|
+
const isNumberString = (n) => {
|
|
5
|
+
const number = parseFloat(n);
|
|
6
|
+
return !isNaN(number) && isFinite(number);
|
|
7
|
+
};
|
|
8
|
+
const isPercentage = (height) => typeof height === "string" && height[height.length - 1] === "%" && isNumberString(height.substring(0, height.length - 1));
|
|
9
|
+
const hideContent = (element, height) => {
|
|
10
|
+
if (height === 0 && element?.style) element.style.display = "none";
|
|
11
|
+
};
|
|
12
|
+
const showContent = (element, height) => {
|
|
13
|
+
if (height === 0 && element?.style) element.style.display = "";
|
|
14
|
+
};
|
|
15
|
+
const ANIMATION_STATE_CLASSES = {
|
|
16
|
+
animating: "rah-animating",
|
|
17
|
+
animatingUp: "rah-animating--up",
|
|
18
|
+
animatingDown: "rah-animating--down",
|
|
19
|
+
animatingToHeightZero: "rah-animating--to-height-zero",
|
|
20
|
+
animatingToHeightAuto: "rah-animating--to-height-auto",
|
|
21
|
+
animatingToHeightSpecific: "rah-animating--to-height-specific",
|
|
22
|
+
static: "rah-static",
|
|
23
|
+
staticHeightZero: "rah-static--height-zero",
|
|
24
|
+
staticHeightAuto: "rah-static--height-auto",
|
|
25
|
+
staticHeightSpecific: "rah-static--height-specific"
|
|
26
|
+
};
|
|
27
|
+
const getStaticStateClasses = (s, height) => cn({
|
|
28
|
+
[s.static]: true,
|
|
29
|
+
[s.staticHeightZero]: height === 0,
|
|
30
|
+
[s.staticHeightSpecific]: typeof height === "number" && height > 0,
|
|
31
|
+
[s.staticHeightAuto]: height === "auto"
|
|
32
|
+
});
|
|
33
|
+
const toCssHeight = (height) => typeof height === "number" ? `${height}px` : height;
|
|
34
|
+
function AnimateHeight(props) {
|
|
35
|
+
const merged = mergeProps(
|
|
36
|
+
{ animateOpacity: false, applyInlineTransitions: true, delay: 0, duration: 300, easing: "ease" },
|
|
37
|
+
props
|
|
38
|
+
);
|
|
39
|
+
const [local, rest] = splitProps(merged, [
|
|
40
|
+
"animateOpacity",
|
|
41
|
+
"animationStateClasses",
|
|
42
|
+
"applyInlineTransitions",
|
|
43
|
+
"children",
|
|
44
|
+
"class",
|
|
45
|
+
"contentClassName",
|
|
46
|
+
"delay",
|
|
47
|
+
"duration",
|
|
48
|
+
"easing",
|
|
49
|
+
"height",
|
|
50
|
+
"onHeightAnimationEnd",
|
|
51
|
+
"onHeightAnimationStart",
|
|
52
|
+
"style",
|
|
53
|
+
"ref"
|
|
54
|
+
]);
|
|
55
|
+
const stateClasses = { ...ANIMATION_STATE_CLASSES, ...local.animationStateClasses };
|
|
56
|
+
let contentEl;
|
|
57
|
+
let prevHeight = local.height;
|
|
58
|
+
let timeoutId;
|
|
59
|
+
let classesTimeoutId;
|
|
60
|
+
let initHeight = local.height;
|
|
61
|
+
let initOverflow = "visible";
|
|
62
|
+
if (typeof initHeight === "number") {
|
|
63
|
+
initHeight = initHeight < 0 ? 0 : initHeight;
|
|
64
|
+
initOverflow = "hidden";
|
|
65
|
+
} else if (isPercentage(initHeight)) {
|
|
66
|
+
initHeight = initHeight === "0%" ? 0 : initHeight;
|
|
67
|
+
initOverflow = "hidden";
|
|
68
|
+
}
|
|
69
|
+
const [currentHeight, setCurrentHeight] = createSignal(initHeight);
|
|
70
|
+
const [overflow, setOverflow] = createSignal(initOverflow);
|
|
71
|
+
const [useTransitions, setUseTransitions] = createSignal(false);
|
|
72
|
+
const [stateClassNames, setStateClassNames] = createSignal(getStaticStateClasses(stateClasses, local.height));
|
|
73
|
+
onMount(() => hideContent(contentEl, currentHeight()));
|
|
74
|
+
createEffect(() => {
|
|
75
|
+
const height = local.height;
|
|
76
|
+
if (height !== prevHeight && contentEl) {
|
|
77
|
+
showContent(contentEl, prevHeight);
|
|
78
|
+
contentEl.style.overflow = "hidden";
|
|
79
|
+
const contentHeight = contentEl.offsetHeight;
|
|
80
|
+
contentEl.style.overflow = "";
|
|
81
|
+
const totalDuration = local.duration + local.delay;
|
|
82
|
+
let newHeight;
|
|
83
|
+
let timeoutHeight;
|
|
84
|
+
let timeoutOverflow = "hidden";
|
|
85
|
+
const isCurrentHeightAuto = prevHeight === "auto";
|
|
86
|
+
if (typeof height === "number") {
|
|
87
|
+
newHeight = height < 0 ? 0 : height;
|
|
88
|
+
timeoutHeight = newHeight;
|
|
89
|
+
} else if (isPercentage(height)) {
|
|
90
|
+
newHeight = height === "0%" ? 0 : height;
|
|
91
|
+
timeoutHeight = newHeight;
|
|
92
|
+
} else {
|
|
93
|
+
newHeight = contentHeight;
|
|
94
|
+
timeoutHeight = "auto";
|
|
95
|
+
timeoutOverflow = void 0;
|
|
96
|
+
}
|
|
97
|
+
if (isCurrentHeightAuto) {
|
|
98
|
+
timeoutHeight = newHeight;
|
|
99
|
+
newHeight = contentHeight;
|
|
100
|
+
}
|
|
101
|
+
const animatingClassNames = cn({
|
|
102
|
+
[stateClasses.animating]: true,
|
|
103
|
+
[stateClasses.animatingUp]: prevHeight === "auto" || typeof prevHeight === "number" && typeof height === "number" && height < prevHeight,
|
|
104
|
+
[stateClasses.animatingDown]: height === "auto" || typeof prevHeight === "number" && typeof height === "number" && height > prevHeight,
|
|
105
|
+
[stateClasses.animatingToHeightZero]: timeoutHeight === 0,
|
|
106
|
+
[stateClasses.animatingToHeightAuto]: timeoutHeight === "auto",
|
|
107
|
+
[stateClasses.animatingToHeightSpecific]: typeof timeoutHeight === "number" && timeoutHeight > 0
|
|
108
|
+
});
|
|
109
|
+
const finalClassNames = getStaticStateClasses(stateClasses, timeoutHeight);
|
|
110
|
+
setCurrentHeight(newHeight);
|
|
111
|
+
setOverflow("hidden");
|
|
112
|
+
setUseTransitions(!isCurrentHeightAuto);
|
|
113
|
+
setStateClassNames(animatingClassNames);
|
|
114
|
+
clearTimeout(timeoutId);
|
|
115
|
+
clearTimeout(classesTimeoutId);
|
|
116
|
+
if (isCurrentHeightAuto) {
|
|
117
|
+
timeoutId = setTimeout(() => {
|
|
118
|
+
setCurrentHeight(timeoutHeight);
|
|
119
|
+
setOverflow(timeoutOverflow);
|
|
120
|
+
setUseTransitions(true);
|
|
121
|
+
local.onHeightAnimationStart?.(timeoutHeight);
|
|
122
|
+
}, 50);
|
|
123
|
+
classesTimeoutId = setTimeout(() => {
|
|
124
|
+
setUseTransitions(false);
|
|
125
|
+
setStateClassNames(finalClassNames);
|
|
126
|
+
hideContent(contentEl, timeoutHeight);
|
|
127
|
+
local.onHeightAnimationEnd?.(timeoutHeight);
|
|
128
|
+
}, totalDuration);
|
|
129
|
+
} else {
|
|
130
|
+
local.onHeightAnimationStart?.(newHeight);
|
|
131
|
+
timeoutId = setTimeout(() => {
|
|
132
|
+
setCurrentHeight(timeoutHeight);
|
|
133
|
+
setOverflow(timeoutOverflow);
|
|
134
|
+
setUseTransitions(false);
|
|
135
|
+
setStateClassNames(finalClassNames);
|
|
136
|
+
if (height !== "auto") hideContent(contentEl, newHeight);
|
|
137
|
+
local.onHeightAnimationEnd?.(newHeight);
|
|
138
|
+
}, totalDuration);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
prevHeight = height;
|
|
142
|
+
});
|
|
143
|
+
onCleanup(() => {
|
|
144
|
+
clearTimeout(timeoutId);
|
|
145
|
+
clearTimeout(classesTimeoutId);
|
|
146
|
+
});
|
|
147
|
+
const componentStyle = () => {
|
|
148
|
+
const base = {
|
|
149
|
+
...typeof local.style === "object" && local.style ? local.style : {},
|
|
150
|
+
height: toCssHeight(currentHeight()),
|
|
151
|
+
overflow: overflow() ?? "visible"
|
|
152
|
+
};
|
|
153
|
+
if (useTransitions() && local.applyInlineTransitions) {
|
|
154
|
+
base.transition = `height ${local.duration}ms ${local.easing} ${local.delay}ms`;
|
|
155
|
+
}
|
|
156
|
+
return base;
|
|
157
|
+
};
|
|
158
|
+
const contentStyle = () => {
|
|
159
|
+
if (!local.animateOpacity) return {};
|
|
160
|
+
return {
|
|
161
|
+
transition: `opacity ${local.duration}ms ${local.easing} ${local.delay}ms`,
|
|
162
|
+
...currentHeight() === 0 ? { opacity: 0 } : {}
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
const ariaHidden = () => rest["aria-hidden"] !== void 0 ? rest["aria-hidden"] : local.height === 0;
|
|
166
|
+
return <div {...rest} ref={mergeRefs(local.ref)} aria-hidden={ariaHidden()} class={cn(stateClassNames(), local.class)} style={componentStyle()}>
|
|
167
|
+
<div class={local.contentClassName} style={contentStyle()} ref={contentEl}>
|
|
168
|
+
{local.children}
|
|
169
|
+
</div>
|
|
170
|
+
</div>;
|
|
171
|
+
}
|
|
172
|
+
var animateHeight_default = AnimateHeight;
|
|
173
|
+
export {
|
|
174
|
+
AnimateHeight,
|
|
175
|
+
animateHeight_default as default
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=animateHeight.js.map
|