@dvcol/neo-svelte 1.1.2 → 1.2.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/CHANGELOG.md +90 -0
- package/README.md +15 -7
- package/dist/badge/neo-badge.model.d.ts +1 -1
- package/dist/buttons/NeoArrowButton.svelte +4 -4
- package/dist/buttons/NeoButton.svelte +110 -24
- package/dist/buttons/NeoButtonGroup.svelte +18 -9
- package/dist/buttons/NeoButtonGroup.svelte.d.ts +1 -1
- package/dist/buttons/NeoButtonRow.svelte +137 -0
- package/dist/buttons/NeoButtonRow.svelte.d.ts +4 -0
- package/dist/buttons/NeoCancelButton.svelte +2 -2
- package/dist/buttons/NeoCheckboxButton.svelte +6 -4
- package/dist/buttons/NeoCheckboxButton.svelte.d.ts +1 -1
- package/dist/buttons/NeoCloseButton.svelte +37 -6
- package/dist/buttons/NeoCloseButton.svelte.d.ts +2 -2
- package/dist/buttons/NeoRadioButton.svelte +6 -4
- package/dist/buttons/NeoSwitchButton.svelte +5 -3
- package/dist/buttons/index.d.ts +2 -0
- package/dist/buttons/index.js +1 -0
- package/dist/buttons/neo-arrow-button.model.d.ts +3 -3
- package/dist/buttons/neo-button-group.model.d.ts +12 -3
- package/dist/buttons/neo-button-row.model.d.ts +33 -0
- package/dist/buttons/neo-button-row.model.js +1 -0
- package/dist/buttons/neo-button.model.d.ts +11 -4
- package/dist/buttons/neo-close-button.model.d.ts +13 -0
- package/dist/buttons/neo-close-button.model.js +5 -0
- package/dist/buttons/neo-icon-button.model.d.ts +2 -2
- package/dist/cards/NeoCard.svelte +22 -20
- package/dist/cards/neo-card.model.d.ts +3 -2
- package/dist/collapse/NeoAccordion.svelte +3 -1
- package/dist/collapse/NeoCollapse.svelte +2 -2
- package/dist/collapse/NeoCollapse.svelte.d.ts +3 -1
- package/dist/collapse/neo-accordion.model.d.ts +2 -1
- package/dist/containers/NeoTransitionContainer.svelte +10 -0
- package/dist/containers/neo-transition-container.model.d.ts +9 -0
- package/dist/cursor/NeoCursor.svelte.d.ts +1 -1
- package/dist/divider/NeoDivider.svelte +4 -2
- package/dist/divider/neo-divider.model.d.ts +2 -1
- package/dist/floating/common/NeoConfirm.svelte +5 -5
- package/dist/floating/common/NeoConfirm.svelte.d.ts +1 -1
- package/dist/floating/common/NeoFloatingStepper.svelte +1 -1
- package/dist/floating/common/NeoFloatingStepper.svelte.d.ts +1 -1
- package/dist/floating/common/NeoHandle.svelte +2 -1
- package/dist/floating/common/neo-confirm.model.d.ts +2 -1
- package/dist/floating/common/neo-floating-stepper.model.d.ts +1 -1
- package/dist/floating/common/neo-placement.model.d.ts +56 -4
- package/dist/floating/common/neo-placement.model.js +22 -0
- package/dist/floating/dialog/NeoDialog.svelte +23 -21
- package/dist/floating/dialog/NeoDialog.svelte.d.ts +1 -1
- package/dist/floating/dialog/NeoDialogConfirm.svelte.d.ts +1 -1
- package/dist/floating/dialog/NeoDialogStepper.svelte.d.ts +1 -1
- package/dist/floating/dialog/neo-dialog-confirm.model.d.ts +5 -5
- package/dist/floating/dialog/neo-dialog-stepper.model.d.ts +4 -4
- package/dist/floating/dialog/neo-dialog.model.d.ts +2 -1
- package/dist/floating/dialog/use-movable.svelte.js +2 -1
- package/dist/floating/drawer/NeoDrawer.svelte +9 -9
- package/dist/floating/drawer/NeoDrawer.svelte.d.ts +2 -2
- package/dist/floating/drawer/NeoDrawerConfirm.svelte +2 -4
- package/dist/floating/drawer/NeoDrawerConfirm.svelte.d.ts +2 -2
- package/dist/floating/drawer/NeoDrawerStepper.svelte +2 -4
- package/dist/floating/drawer/NeoDrawerStepper.svelte.d.ts +2 -2
- package/dist/floating/drawer/neo-drawer.model.d.ts +6 -0
- package/dist/floating/drawer/neo-drawer.model.js +1 -0
- package/dist/floating/index.d.ts +1 -0
- package/dist/floating/index.js +1 -0
- package/dist/floating/menu/NeoMenu.svelte +55 -17
- package/dist/floating/menu/NeoMenu.svelte.d.ts +1 -1
- package/dist/floating/menu/NeoMenuList.svelte +60 -67
- package/dist/floating/menu/NeoMenuListItem.svelte +157 -24
- package/dist/floating/menu/NeoMenuListItem.svelte.d.ts +1 -0
- package/dist/floating/menu/index.d.ts +1 -0
- package/dist/floating/menu/neo-menu-list-item.model.d.ts +48 -11
- package/dist/floating/menu/neo-menu-list.model.d.ts +24 -4
- package/dist/floating/menu/neo-menu.model.d.ts +3 -3
- package/dist/floating/notification/NeoNotificationItem.svelte +459 -0
- package/dist/floating/notification/NeoNotificationItem.svelte.d.ts +4 -0
- package/dist/floating/notification/NeoNotificationProvider.svelte +49 -0
- package/dist/floating/notification/NeoNotificationProvider.svelte.d.ts +4 -0
- package/dist/floating/notification/NeoNotificationStack.svelte +345 -0
- package/dist/floating/notification/NeoNotificationStack.svelte.d.ts +16 -0
- package/dist/floating/notification/NeoSimpleNotification.svelte +304 -0
- package/dist/floating/notification/NeoSimpleNotification.svelte.d.ts +4 -0
- package/dist/floating/notification/index.d.ts +8 -0
- package/dist/floating/notification/index.js +7 -0
- package/dist/floating/notification/neo-notification-item.model.d.ts +54 -0
- package/dist/floating/notification/neo-notification-item.model.js +1 -0
- package/dist/floating/notification/neo-notification-provider.model.d.ts +78 -0
- package/dist/floating/notification/neo-notification-provider.model.js +18 -0
- package/dist/floating/notification/neo-notification-stack.model.d.ts +48 -0
- package/dist/floating/notification/neo-notification-stack.model.js +1 -0
- package/dist/floating/notification/neo-notification.model.d.ts +271 -0
- package/dist/floating/notification/neo-notification.model.js +70 -0
- package/dist/floating/notification/neo-simple-notification.model.d.ts +14 -0
- package/dist/floating/notification/neo-simple-notification.model.js +1 -0
- package/dist/floating/portal/NeoPortal.svelte +11 -8
- package/dist/floating/portal/NeoPortalTarget.svelte +7 -0
- package/dist/floating/portal/NeoPortalTarget.svelte.d.ts +7 -0
- package/dist/floating/portal/neo-portal-context.svelte.d.ts +1 -1
- package/dist/floating/portal/neo-portal.model.d.ts +4 -5
- package/dist/floating/tooltips/NeoPopConfirm.svelte +2 -0
- package/dist/floating/tooltips/NeoPopConfirm.svelte.d.ts +1 -1
- package/dist/floating/tooltips/NeoPopSelect.svelte +5 -3
- package/dist/floating/tooltips/NeoPopSelect.svelte.d.ts +1 -1
- package/dist/floating/tooltips/NeoPopStepper.svelte +2 -0
- package/dist/floating/tooltips/NeoPopStepper.svelte.d.ts +1 -1
- package/dist/floating/tooltips/NeoTooltip.svelte +43 -23
- package/dist/floating/tooltips/NeoTooltip.svelte.d.ts +5 -1
- package/dist/floating/tooltips/neo-pop-confirm.model.d.ts +1 -1
- package/dist/floating/tooltips/neo-pop-select.model.d.ts +1 -3
- package/dist/floating/tooltips/neo-pop-stepper.model.d.ts +2 -2
- package/dist/floating/tooltips/neo-tooltip.model.d.ts +7 -2
- package/dist/form/NeoForm.svelte +1 -1
- package/dist/form/NeoForm.svelte.d.ts +3 -1
- package/dist/form/neo-form-context.svelte.d.ts +2 -0
- package/dist/icons/{IconAccount.svelte → NeoIconAccount.svelte} +2 -2
- package/dist/icons/NeoIconAccount.svelte.d.ts +4 -0
- package/dist/icons/{IconAdd.svelte → NeoIconAdd.svelte} +11 -6
- package/dist/icons/NeoIconAdd.svelte.d.ts +4 -0
- package/dist/icons/{IconAddress.svelte → NeoIconAddress.svelte} +2 -2
- package/dist/icons/NeoIconAddress.svelte.d.ts +4 -0
- package/dist/icons/{IconAlert.svelte → NeoIconAlert.svelte} +11 -6
- package/dist/icons/NeoIconAlert.svelte.d.ts +4 -0
- package/dist/icons/{IconAlignBottom.svelte → NeoIconAlignBottom.svelte} +11 -6
- package/dist/icons/NeoIconAlignBottom.svelte.d.ts +4 -0
- package/dist/icons/{IconAlignMiddle.svelte → NeoIconAlignMiddle.svelte} +11 -6
- package/dist/icons/NeoIconAlignMiddle.svelte.d.ts +4 -0
- package/dist/icons/{IconAlignTop.svelte → NeoIconAlignTop.svelte} +11 -6
- package/dist/icons/NeoIconAlignTop.svelte.d.ts +4 -0
- package/dist/icons/{IconArrow.svelte → NeoIconArrow.svelte} +9 -9
- package/dist/icons/NeoIconArrow.svelte.d.ts +4 -0
- package/dist/icons/NeoIconAudio.svelte +83 -0
- package/dist/icons/NeoIconAudio.svelte.d.ts +4 -0
- package/dist/icons/NeoIconBouncingDots.svelte +82 -0
- package/dist/icons/NeoIconBouncingDots.svelte.d.ts +4 -0
- package/dist/icons/{IconCalendar.svelte → NeoIconCalendar.svelte} +11 -6
- package/dist/icons/NeoIconCalendar.svelte.d.ts +4 -0
- package/dist/icons/{IconCancel.svelte → NeoIconCancel.svelte} +2 -2
- package/dist/icons/NeoIconCancel.svelte.d.ts +4 -0
- package/dist/icons/{IconCheckbox.svelte → NeoIconCheckbox.svelte} +2 -2
- package/dist/icons/NeoIconCheckbox.svelte.d.ts +4 -0
- package/dist/icons/NeoIconCircle.svelte +18 -0
- package/dist/icons/NeoIconCircle.svelte.d.ts +4 -0
- package/dist/icons/{IconCircleLoading.svelte → NeoIconCircleLoading.svelte} +2 -2
- package/dist/icons/{IconCircleLoading.svelte.d.ts → NeoIconCircleLoading.svelte.d.ts} +55 -39
- package/dist/icons/{IconClear.svelte → NeoIconClear.svelte} +11 -6
- package/dist/icons/NeoIconClear.svelte.d.ts +4 -0
- package/dist/icons/{IconClose.svelte → NeoIconClose.svelte} +2 -2
- package/dist/icons/NeoIconClose.svelte.d.ts +4 -0
- package/dist/icons/NeoIconCog.svelte +36 -0
- package/dist/icons/NeoIconCog.svelte.d.ts +4 -0
- package/dist/icons/{IconConfirm.svelte → NeoIconConfirm.svelte} +11 -6
- package/dist/icons/NeoIconConfirm.svelte.d.ts +4 -0
- package/dist/icons/NeoIconCube.svelte +31 -0
- package/dist/icons/NeoIconCube.svelte.d.ts +4 -0
- package/dist/icons/{IconDoubleChevron.svelte → NeoIconDoubleChevron.svelte} +11 -5
- package/dist/icons/NeoIconDoubleChevron.svelte.d.ts +4 -0
- package/dist/icons/{IconDoubleChevronLeft.svelte → NeoIconDoubleChevronLeft.svelte} +11 -6
- package/dist/icons/NeoIconDoubleChevronLeft.svelte.d.ts +4 -0
- package/dist/icons/{IconDoubleChevronRight.svelte → NeoIconDoubleChevronRight.svelte} +11 -6
- package/dist/icons/NeoIconDoubleChevronRight.svelte.d.ts +4 -0
- package/dist/icons/{IconDownload.svelte → NeoIconDownload.svelte} +11 -6
- package/dist/icons/NeoIconDownload.svelte.d.ts +4 -0
- package/dist/icons/NeoIconEmpty.svelte +26 -0
- package/dist/icons/NeoIconEmpty.svelte.d.ts +4 -0
- package/dist/icons/NeoIconError.svelte +30 -0
- package/dist/icons/NeoIconError.svelte.d.ts +4 -0
- package/dist/icons/{IconFileUpload.svelte → NeoIconFileUpload.svelte} +11 -6
- package/dist/icons/NeoIconFileUpload.svelte.d.ts +4 -0
- package/dist/icons/NeoIconFire.svelte +33 -0
- package/dist/icons/NeoIconFire.svelte.d.ts +4 -0
- package/dist/icons/{IconGithub.svelte → NeoIconGithub.svelte} +11 -6
- package/dist/icons/NeoIconGithub.svelte.d.ts +4 -0
- package/dist/icons/NeoIconImage.svelte +39 -0
- package/dist/icons/NeoIconImage.svelte.d.ts +4 -0
- package/dist/icons/NeoIconInfo.svelte +30 -0
- package/dist/icons/NeoIconInfo.svelte.d.ts +4 -0
- package/dist/icons/{IconList.svelte → NeoIconList.svelte} +11 -6
- package/dist/icons/NeoIconList.svelte.d.ts +4 -0
- package/dist/icons/{IconListSmall.svelte → NeoIconListSmall.svelte} +2 -2
- package/dist/icons/NeoIconListSmall.svelte.d.ts +4 -0
- package/dist/icons/{IconLoadingMatrix.svelte → NeoIconLoadingMatrix.svelte} +2 -2
- package/dist/icons/NeoIconLoadingMatrix.svelte.d.ts +4 -0
- package/dist/icons/{IconMail.svelte → NeoIconMail.svelte} +11 -6
- package/dist/icons/NeoIconMail.svelte.d.ts +4 -0
- package/dist/icons/{IconMinus.svelte → NeoIconMinus.svelte} +11 -6
- package/dist/icons/NeoIconMinus.svelte.d.ts +4 -0
- package/dist/icons/{IconPaint.svelte → NeoIconPaint.svelte} +11 -6
- package/dist/icons/NeoIconPaint.svelte.d.ts +4 -0
- package/dist/icons/{IconPencil.svelte → NeoIconPencil.svelte} +11 -6
- package/dist/icons/NeoIconPencil.svelte.d.ts +4 -0
- package/dist/icons/{IconPlayPause.svelte → NeoIconPlayPause.svelte} +2 -2
- package/dist/icons/NeoIconPlayPause.svelte.d.ts +4 -0
- package/dist/icons/{IconQuestionMark.svelte → NeoIconQuestionMark.svelte} +11 -6
- package/dist/icons/NeoIconQuestionMark.svelte.d.ts +4 -0
- package/dist/icons/{IconRadio.svelte → NeoIconRadio.svelte} +2 -2
- package/dist/icons/NeoIconRadio.svelte.d.ts +4 -0
- package/dist/icons/NeoIconRefresh.svelte +38 -0
- package/dist/icons/NeoIconRefresh.svelte.d.ts +4 -0
- package/dist/icons/NeoIconRestore.svelte +20 -0
- package/dist/icons/NeoIconRestore.svelte.d.ts +4 -0
- package/dist/icons/NeoIconSave.svelte +35 -0
- package/dist/icons/NeoIconSave.svelte.d.ts +4 -0
- package/dist/icons/NeoIconSaveOff.svelte +42 -0
- package/dist/icons/NeoIconSaveOff.svelte.d.ts +4 -0
- package/dist/icons/{IconSearch.svelte → NeoIconSearch.svelte} +11 -6
- package/dist/icons/NeoIconSearch.svelte.d.ts +4 -0
- package/dist/icons/NeoIconSuccess.svelte +26 -0
- package/dist/icons/NeoIconSuccess.svelte.d.ts +4 -0
- package/dist/icons/{IconSun.svelte → NeoIconSun.svelte} +11 -6
- package/dist/icons/NeoIconSun.svelte.d.ts +4 -0
- package/dist/icons/{IconSunMoon.svelte → NeoIconSunMoon.svelte} +11 -64
- package/dist/icons/NeoIconSunMoon.svelte.d.ts +4 -0
- package/dist/icons/{IconTextHighlight.svelte → NeoIconTextHighlight.svelte} +11 -6
- package/dist/icons/NeoIconTextHighlight.svelte.d.ts +4 -0
- package/dist/icons/NeoIconTheme.svelte +14 -0
- package/dist/icons/NeoIconTheme.svelte.d.ts +3 -0
- package/dist/icons/NeoIconTrend.svelte +39 -0
- package/dist/icons/NeoIconTrend.svelte.d.ts +4 -0
- package/dist/icons/NeoIconUnplug.svelte +63 -0
- package/dist/icons/NeoIconUnplug.svelte.d.ts +4 -0
- package/dist/icons/{IconVideo.svelte → NeoIconVideo.svelte} +11 -6
- package/dist/icons/NeoIconVideo.svelte.d.ts +4 -0
- package/dist/icons/NeoIconWarning.svelte +30 -0
- package/dist/icons/NeoIconWarning.svelte.d.ts +4 -0
- package/dist/icons/NeoIconWatch.svelte +41 -0
- package/dist/icons/NeoIconWatch.svelte.d.ts +4 -0
- package/dist/icons/NeoIconWatchOff.svelte +50 -0
- package/dist/icons/NeoIconWatchOff.svelte.d.ts +4 -0
- package/dist/icons/NeoIconWave.svelte +31 -0
- package/dist/icons/NeoIconWave.svelte.d.ts +4 -0
- package/dist/icons/index.d.ts +54 -0
- package/dist/icons/index.js +54 -0
- package/dist/icons/{icon.model.d.ts → neo-icon.model.d.ts} +41 -13
- package/dist/icons/{icon.model.js → neo-icon.model.js} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inputs/NeoCheckbox.svelte +6 -4
- package/dist/inputs/NeoCheckbox.svelte.d.ts +1 -1
- package/dist/inputs/NeoColorPicker.svelte +6 -3
- package/dist/inputs/NeoColorPicker.svelte.d.ts +1 -1
- package/dist/inputs/NeoColorPickerSelector.svelte +2 -2
- package/dist/inputs/NeoColorPickerSelector.svelte.d.ts +1 -1
- package/dist/inputs/NeoDateTime.svelte +6 -3
- package/dist/inputs/NeoDateTime.svelte.d.ts +1 -1
- package/dist/inputs/NeoFilePicker.svelte +11 -6
- package/dist/inputs/NeoFilePicker.svelte.d.ts +1 -1
- package/dist/inputs/NeoFilePickerCard.svelte +20 -14
- package/dist/inputs/NeoNativeSelect.svelte +6 -3
- package/dist/inputs/NeoNativeSelect.svelte.d.ts +1 -1
- package/dist/inputs/NeoNumberStep.svelte +13 -8
- package/dist/inputs/NeoNumberStep.svelte.d.ts +1 -1
- package/dist/inputs/NeoPassword.svelte +4 -4
- package/dist/inputs/NeoPassword.svelte.d.ts +1 -1
- package/dist/inputs/NeoPin.svelte +10 -10
- package/dist/inputs/NeoPin.svelte.d.ts +10 -1
- package/dist/inputs/NeoRadio.svelte +3 -3
- package/dist/inputs/NeoRadio.svelte.d.ts +1 -1
- package/dist/inputs/NeoRange.svelte +29 -27
- package/dist/inputs/NeoRange.svelte.d.ts +5 -2
- package/dist/inputs/NeoSelect.svelte +17 -8
- package/dist/inputs/NeoSelect.svelte.d.ts +1 -1
- package/dist/inputs/NeoSwitch.svelte +2 -2
- package/dist/inputs/NeoSwitch.svelte.d.ts +1 -1
- package/dist/inputs/common/NeoAffix.svelte +10 -10
- package/dist/inputs/common/NeoBaseInput.svelte +16 -2
- package/dist/inputs/common/NeoBaseInput.svelte.d.ts +1 -1
- package/dist/inputs/common/NeoInput.svelte +12 -4
- package/dist/inputs/common/NeoInput.svelte.d.ts +1 -1
- package/dist/inputs/common/NeoTextarea.svelte +18 -6
- package/dist/inputs/common/NeoTextarea.svelte.d.ts +2 -1
- package/dist/inputs/common/NeoValidation.svelte +6 -4
- package/dist/inputs/common/neo-input.model.d.ts +8 -1
- package/dist/inputs/common/neo-validation.model.d.ts +2 -1
- package/dist/inputs/neo-range.model.d.ts +2 -1
- package/dist/inputs/neo-select.model.d.ts +8 -4
- package/dist/list/NeoList.svelte +100 -62
- package/dist/list/NeoList.svelte.d.ts +5 -2
- package/dist/list/NeoListBaseItem.svelte +222 -92
- package/dist/list/NeoListBaseItem.svelte.d.ts +1 -1
- package/dist/list/NeoListBaseLoader.svelte +28 -4
- package/dist/list/NeoListBaseSection.svelte +18 -15
- package/dist/list/NeoListSearch.svelte +36 -20
- package/dist/list/NeoListSearch.svelte.d.ts +1 -1
- package/dist/list/NeoSimpleList.svelte +391 -0
- package/dist/list/NeoSimpleList.svelte.d.ts +8 -0
- package/dist/list/NeoVirtualList.svelte +388 -0
- package/dist/list/NeoVirtualList.svelte.d.ts +22 -0
- package/dist/list/index.d.ts +4 -0
- package/dist/list/index.js +2 -0
- package/dist/list/neo-list-base-item.model.d.ts +36 -7
- package/dist/list/neo-list-base-item.model.js +1 -0
- package/dist/list/neo-list-base-loader.model.d.ts +18 -1
- package/dist/list/neo-list-base-section.model.d.ts +8 -5
- package/dist/list/neo-list-search.model.d.ts +2 -2
- package/dist/list/neo-list.model.d.ts +120 -51
- package/dist/list/neo-list.model.js +18 -0
- package/dist/list/neo-simple-list.model.d.ts +124 -0
- package/dist/list/neo-simple-list.model.js +1 -0
- package/dist/list/neo-virtual-list.model.d.ts +69 -0
- package/dist/list/neo-virtual-list.model.js +6 -0
- package/dist/loading/NeoLoadingMatrix.svelte +2 -2
- package/dist/loading/neo-lazy.model.d.ts +2 -2
- package/dist/loading/neo-suspense.model.d.ts +1 -1
- package/dist/media/NeoImage.svelte +204 -0
- package/dist/media/NeoImage.svelte.d.ts +4 -0
- package/dist/media/NeoMedia.svelte +204 -0
- package/dist/media/NeoMedia.svelte.d.ts +4 -0
- package/dist/media/index.d.ts +2 -0
- package/dist/media/index.js +1 -0
- package/dist/media/neo-image.model.d.ts +67 -0
- package/dist/media/neo-image.model.js +1 -0
- package/dist/media/neo-media.model.d.ts +120 -0
- package/dist/media/neo-media.model.js +5 -0
- package/dist/nav/NeoTab.svelte +20 -15
- package/dist/nav/NeoTab.svelte.d.ts +17 -2
- package/dist/nav/NeoTabPanel.svelte +7 -5
- package/dist/nav/NeoTabPanel.svelte.d.ts +17 -2
- package/dist/nav/NeoTabs.svelte +21 -17
- package/dist/nav/NeoTabs.svelte.d.ts +19 -3
- package/dist/nav/NeoTabsCard.svelte +5 -3
- package/dist/nav/NeoTabsCard.svelte.d.ts +17 -2
- package/dist/nav/NeoTabsRow.svelte +225 -0
- package/dist/nav/NeoTabsRow.svelte.d.ts +19 -0
- package/dist/nav/index.d.ts +2 -0
- package/dist/nav/index.js +1 -0
- package/dist/nav/neo-tab-panel.model.d.ts +3 -3
- package/dist/nav/neo-tab.model.d.ts +15 -5
- package/dist/nav/neo-tabs-card.model.d.ts +3 -2
- package/dist/nav/neo-tabs-context.svelte.d.ts +35 -29
- package/dist/nav/neo-tabs-context.svelte.js +17 -3
- package/dist/nav/neo-tabs-row.model.d.ts +85 -0
- package/dist/nav/neo-tabs-row.model.js +1 -0
- package/dist/nav/neo-tabs.model.d.ts +12 -11
- package/dist/pill/NeoPill.svelte +73 -14
- package/dist/pill/neo-pill.model.d.ts +25 -1
- package/dist/progress/NeoProgress.svelte +203 -42
- package/dist/progress/NeoProgress.svelte.d.ts +8 -8
- package/dist/progress/NeoProgressBar.svelte +37 -6
- package/dist/progress/NeoProgressBar.svelte.d.ts +9 -1
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/neo-progress-bar.model.d.ts +11 -6
- package/dist/progress/neo-progress-service.svelte.d.ts +47 -0
- package/dist/progress/neo-progress-service.svelte.js +157 -0
- package/dist/progress/neo-progress.model.d.ts +98 -41
- package/dist/progress/neo-progress.model.js +6 -1
- package/dist/providers/NeoRememberSelector.svelte +43 -0
- package/dist/providers/NeoRememberSelector.svelte.d.ts +4 -0
- package/dist/providers/NeoResetSelector.svelte +40 -0
- package/dist/providers/NeoResetSelector.svelte.d.ts +4 -0
- package/dist/providers/NeoSourceSelector.svelte +63 -0
- package/dist/providers/NeoSourceSelector.svelte.d.ts +4 -0
- package/dist/providers/NeoThemeProvider.svelte +25 -10
- package/dist/providers/NeoThemeProvider.svelte.d.ts +1 -2
- package/dist/providers/NeoThemeSelector.svelte +26 -108
- package/dist/providers/NeoThemeSelector.svelte.d.ts +1 -1
- package/dist/providers/NeoThemeSelectors.svelte +57 -0
- package/dist/providers/NeoThemeSelectors.svelte.d.ts +4 -0
- package/dist/providers/NeoTransitionSelector.svelte +57 -0
- package/dist/providers/NeoTransitionSelector.svelte.d.ts +4 -0
- package/dist/providers/index.d.ts +10 -0
- package/dist/providers/index.js +5 -0
- package/dist/providers/neo-remember-selector.model.d.ts +9 -0
- package/dist/providers/neo-remember-selector.model.js +2 -0
- package/dist/providers/neo-reset-selector.model.d.ts +9 -0
- package/dist/providers/neo-reset-selector.model.js +1 -0
- package/dist/providers/neo-source-selector.model.d.ts +9 -0
- package/dist/providers/neo-source-selector.model.js +2 -0
- package/dist/providers/neo-theme-provider-context.svelte.d.ts +14 -3
- package/dist/providers/neo-theme-provider-context.svelte.js +94 -11
- package/dist/providers/neo-theme-provider.model.d.ts +31 -3
- package/dist/providers/neo-theme-provider.model.js +9 -0
- package/dist/providers/neo-theme-selector.model.d.ts +3 -48
- package/dist/providers/neo-theme-selector.model.js +1 -0
- package/dist/providers/neo-theme-selectors.model.d.ts +84 -0
- package/dist/providers/neo-theme-selectors.model.js +1 -0
- package/dist/providers/neo-transition-selector.model.d.ts +9 -0
- package/dist/providers/neo-transition-selector.model.js +2 -0
- package/dist/skeletons/NeoSkeletonContainer.svelte +3 -1
- package/dist/skeletons/NeoSkeletonMedia.svelte +26 -18
- package/dist/skeletons/NeoSkeletonText.svelte +5 -3
- package/dist/skeletons/neo-skeleton-container.model.d.ts +9 -0
- package/dist/skeletons/neo-skeleton-media.model.d.ts +20 -10
- package/dist/skeletons/neo-skeleton-media.model.js +7 -1
- package/dist/skeletons/neo-skeleton-text.model.d.ts +5 -0
- package/dist/stepper/NeoStepper.svelte +20 -20
- package/dist/stepper/NeoStepper.svelte.d.ts +9 -2
- package/dist/stepper/neo-stepper.model.d.ts +5 -5
- package/dist/styles/animation.scss +76 -0
- package/dist/styles/common/colors.scss +15 -9
- package/dist/styles/common/properties.css +18 -0
- package/dist/styles/common/spacing.scss +8 -4
- package/dist/styles/common/typography.scss +13 -3
- package/dist/styles/common/utils.scss +2 -2
- package/dist/styles/mixin.scss +125 -11
- package/dist/styles/theme.scss +20 -0
- package/dist/styles/transition.scss +101 -0
- package/dist/text/NeoEllipsis.svelte +1 -0
- package/dist/text/NeoHtml.svelte +26 -0
- package/dist/text/NeoHtml.svelte.d.ts +7 -0
- package/dist/text/NeoMark.svelte +18 -5
- package/dist/text/NeoTypewriter.svelte +5 -4
- package/dist/text/NeoTypewriter.svelte.d.ts +5 -1
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.js +1 -0
- package/dist/text/neo-html.model.d.ts +4 -0
- package/dist/text/neo-html.model.js +1 -0
- package/dist/text/neo-mark.model.d.ts +8 -0
- package/dist/text/typewriter.utils.d.ts +2 -2
- package/dist/text/typewriter.utils.js +8 -9
- package/dist/utils/action.utils.d.ts +1 -21
- package/dist/utils/border.utils.d.ts +13 -0
- package/dist/utils/border.utils.js +18 -0
- package/dist/utils/colors.utils.d.ts +1 -1
- package/dist/utils/error.utils.d.ts +22 -0
- package/dist/utils/error.utils.js +36 -0
- package/dist/utils/style.utils.d.ts +1 -1
- package/package.json +55 -39
- package/dist/icons/IconAccount.svelte.d.ts +0 -4
- package/dist/icons/IconAdd.svelte.d.ts +0 -26
- package/dist/icons/IconAddress.svelte.d.ts +0 -4
- package/dist/icons/IconAlert.svelte.d.ts +0 -26
- package/dist/icons/IconAlignBottom.svelte.d.ts +0 -26
- package/dist/icons/IconAlignMiddle.svelte.d.ts +0 -26
- package/dist/icons/IconAlignTop.svelte.d.ts +0 -26
- package/dist/icons/IconArrow.svelte.d.ts +0 -4
- package/dist/icons/IconBouncingDots.svelte +0 -63
- package/dist/icons/IconBouncingDots.svelte.d.ts +0 -4
- package/dist/icons/IconCalendar.svelte.d.ts +0 -26
- package/dist/icons/IconCancel.svelte.d.ts +0 -4
- package/dist/icons/IconCheckbox.svelte.d.ts +0 -4
- package/dist/icons/IconClear.svelte.d.ts +0 -26
- package/dist/icons/IconClose.svelte.d.ts +0 -4
- package/dist/icons/IconConfirm.svelte.d.ts +0 -26
- package/dist/icons/IconDoubleChevron.svelte.d.ts +0 -26
- package/dist/icons/IconDoubleChevronLeft.svelte.d.ts +0 -26
- package/dist/icons/IconDoubleChevronRight.svelte.d.ts +0 -26
- package/dist/icons/IconDownload.svelte.d.ts +0 -26
- package/dist/icons/IconEmpty.svelte +0 -18
- package/dist/icons/IconEmpty.svelte.d.ts +0 -26
- package/dist/icons/IconFileUpload.svelte.d.ts +0 -26
- package/dist/icons/IconGithub.svelte.d.ts +0 -26
- package/dist/icons/IconImage.svelte +0 -26
- package/dist/icons/IconImage.svelte.d.ts +0 -26
- package/dist/icons/IconList.svelte.d.ts +0 -26
- package/dist/icons/IconListSmall.svelte.d.ts +0 -4
- package/dist/icons/IconLoadingMatrix.svelte.d.ts +0 -4
- package/dist/icons/IconMail.svelte.d.ts +0 -26
- package/dist/icons/IconMinus.svelte.d.ts +0 -26
- package/dist/icons/IconPaint.svelte.d.ts +0 -26
- package/dist/icons/IconPencil.svelte.d.ts +0 -26
- package/dist/icons/IconPlayPause.svelte.d.ts +0 -4
- package/dist/icons/IconQuestionMark.svelte.d.ts +0 -26
- package/dist/icons/IconRadio.svelte.d.ts +0 -4
- package/dist/icons/IconSave.svelte +0 -25
- package/dist/icons/IconSave.svelte.d.ts +0 -26
- package/dist/icons/IconSaveOff.svelte +0 -32
- package/dist/icons/IconSaveOff.svelte.d.ts +0 -26
- package/dist/icons/IconSearch.svelte.d.ts +0 -26
- package/dist/icons/IconSun.svelte.d.ts +0 -26
- package/dist/icons/IconSunMoon.svelte.d.ts +0 -4
- package/dist/icons/IconTextHighlight.svelte.d.ts +0 -26
- package/dist/icons/IconVideo.svelte.d.ts +0 -26
- package/dist/icons/IconWatch.svelte +0 -29
- package/dist/icons/IconWatch.svelte.d.ts +0 -26
- package/dist/icons/IconWatchOff.svelte +0 -34
- package/dist/icons/IconWatchOff.svelte.d.ts +0 -26
|
@@ -4,13 +4,13 @@ import type { OnChange } from './neo-tabs.model.js';
|
|
|
4
4
|
import type { HTMLUseProps } from '../utils/action.utils.js';
|
|
5
5
|
import type { HTMLNeoBaseElement, HTMLRefProps } from '../utils/html-element.utils.js';
|
|
6
6
|
export type TabId = string | number | symbol;
|
|
7
|
-
export type NeoTabProps<Value = unknown, Tag extends keyof HTMLElementTagNameMap = 'div'> = {
|
|
7
|
+
export type NeoTabProps<Id extends TabId, Value = unknown, Tag extends keyof HTMLElementTagNameMap = 'div'> = {
|
|
8
8
|
/**
|
|
9
9
|
* Snippet to display as the tab content.
|
|
10
10
|
*/
|
|
11
11
|
children?: Snippet<[{
|
|
12
12
|
active: boolean;
|
|
13
|
-
tabId:
|
|
13
|
+
tabId: Id;
|
|
14
14
|
value?: unknown;
|
|
15
15
|
}]>;
|
|
16
16
|
/**
|
|
@@ -22,20 +22,30 @@ export type NeoTabProps<Value = unknown, Tag extends keyof HTMLElementTagNameMap
|
|
|
22
22
|
* A unique identifier for the tab.
|
|
23
23
|
* If none is provided, the tab will be assigned a random id.
|
|
24
24
|
*/
|
|
25
|
-
tabId?:
|
|
25
|
+
tabId?: Id;
|
|
26
26
|
/**
|
|
27
27
|
* Optional value to associate with the tab.
|
|
28
28
|
*/
|
|
29
29
|
value?: Value;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the tab should be registered with the parent `NeoTabs` context.
|
|
32
|
+
* If false, the tab will not be included in the `NeoTabs` context.
|
|
33
|
+
* If true, the tab will be registered only if another tab with the same id is not already registered.
|
|
34
|
+
* If `force`, the tab will be registered even if another tab with the same id is already registered.
|
|
35
|
+
*
|
|
36
|
+
* @default true
|
|
37
|
+
* @see {@link NeoTabContext}
|
|
38
|
+
*/
|
|
39
|
+
register?: boolean | 'force';
|
|
30
40
|
/**
|
|
31
41
|
* If true, the tab will display a close button that broadcasts the `onclose` event.
|
|
32
42
|
* Note: The event will also be emitted to a parent `NeoTabs` if present.
|
|
33
43
|
*/
|
|
34
44
|
close?: boolean;
|
|
35
45
|
/**
|
|
36
|
-
* Event handler that fires
|
|
46
|
+
* Event handler that fires when the close button is clicked.
|
|
37
47
|
*/
|
|
38
|
-
onclose?: OnChange<Value>;
|
|
48
|
+
onclose?: OnChange<Id, Value>;
|
|
39
49
|
/**
|
|
40
50
|
* Optional props to pass to the tab container.
|
|
41
51
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TabId } from '../index.js';
|
|
1
2
|
import type { Snippet } from 'svelte';
|
|
2
3
|
import type { NeoCardProps } from '../cards/neo-card.model.js';
|
|
3
4
|
import type { NeoTransitionContainerProps } from '../containers/neo-transition-container.model.js';
|
|
@@ -9,11 +10,11 @@ export interface NeoTabsCardContext {
|
|
|
9
10
|
*/
|
|
10
11
|
animate?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export type NeoTabsCardProps<
|
|
13
|
+
export type NeoTabsCardProps<Id extends TabId, Value = unknown> = {
|
|
13
14
|
/**
|
|
14
15
|
* Snippet to display as the card content.
|
|
15
16
|
*/
|
|
16
|
-
children?: Snippet<[NeoTabsContext<
|
|
17
|
+
children?: Snippet<[NeoTabsContext<Id, Value> | undefined]>;
|
|
17
18
|
/**
|
|
18
19
|
* Optional props to pass to the tab container if `animate` is `true`.
|
|
19
20
|
* @see animate
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { NeoButtonGroupProps } from '../buttons/neo-button-group.model.js';
|
|
2
2
|
import type { TabId } from './neo-tab.model.js';
|
|
3
3
|
import type { NeoTabContextValue, OnChange, OnClose } from './neo-tabs.model.js';
|
|
4
|
-
export interface NeoTabContextPosition {
|
|
5
|
-
id:
|
|
4
|
+
export interface NeoTabContextPosition<Id extends TabId> {
|
|
5
|
+
id: Id;
|
|
6
6
|
top: number;
|
|
7
7
|
left: number;
|
|
8
8
|
width: number;
|
|
9
9
|
height: number;
|
|
10
10
|
}
|
|
11
|
-
export interface NeoTabContextPositions {
|
|
12
|
-
oldTab?: NeoTabContextPosition
|
|
13
|
-
newTab?: NeoTabContextPosition
|
|
11
|
+
export interface NeoTabContextPositions<Id extends TabId> {
|
|
12
|
+
oldTab?: NeoTabContextPosition<Id>;
|
|
13
|
+
newTab?: NeoTabContextPosition<Id>;
|
|
14
14
|
}
|
|
15
15
|
type NeoTabContextOptions = {
|
|
16
16
|
/**
|
|
@@ -35,39 +35,45 @@ type NeoTabContextOptions = {
|
|
|
35
35
|
*/
|
|
36
36
|
close?: boolean;
|
|
37
37
|
} & Pick<NeoButtonGroupProps, 'elevation' | 'pressed' | 'convex' | 'borderless' | 'glass' | 'start' | 'vertical'>;
|
|
38
|
-
export type NeoTabsContext<
|
|
38
|
+
export type NeoTabsContext<Id extends TabId, Value = unknown> = NeoTabContextOptions & {
|
|
39
39
|
/**
|
|
40
40
|
* The active tab ID.
|
|
41
41
|
*/
|
|
42
|
-
active?:
|
|
42
|
+
active?: Id;
|
|
43
43
|
/**
|
|
44
44
|
* The active tab value.
|
|
45
45
|
*/
|
|
46
|
-
value?: NeoTabContextValue<
|
|
46
|
+
value?: NeoTabContextValue<Value>;
|
|
47
47
|
};
|
|
48
|
-
interface NeoTabContextCallbacks<
|
|
49
|
-
onChange?: OnChange<
|
|
50
|
-
onClose?: OnClose<
|
|
48
|
+
interface NeoTabContextCallbacks<Id extends TabId, Value = unknown> {
|
|
49
|
+
onChange?: OnChange<Id, Value>;
|
|
50
|
+
onClose?: OnClose<Id, Value>;
|
|
51
51
|
}
|
|
52
|
-
export declare class NeoTabContext<
|
|
52
|
+
export declare class NeoTabContext<Id extends TabId, Value = unknown> {
|
|
53
53
|
#private;
|
|
54
|
-
get active():
|
|
55
|
-
get value(): NeoTabContextValue<
|
|
56
|
-
get previous(): NeoTabContextValue<
|
|
57
|
-
get position(): NeoTabContextPositions
|
|
58
|
-
get state(): NeoTabsContext
|
|
59
|
-
constructor({ onChange, onClose }?: NeoTabContextCallbacks<
|
|
60
|
-
getValue(tabId?:
|
|
61
|
-
getPane(tabId?:
|
|
54
|
+
get active(): Id | undefined;
|
|
55
|
+
get value(): NeoTabContextValue<Value> | undefined;
|
|
56
|
+
get previous(): NeoTabContextValue<Value> | undefined;
|
|
57
|
+
get position(): NeoTabContextPositions<Id>;
|
|
58
|
+
get state(): NeoTabsContext<Id, Value>;
|
|
59
|
+
constructor({ onChange, onClose }?: NeoTabContextCallbacks<Id, Value>);
|
|
60
|
+
getValue(tabId?: Id): NeoTabContextValue<Value> | undefined;
|
|
61
|
+
getPane(tabId?: Id): Id | undefined;
|
|
62
62
|
onOption(options: NeoTabContextOptions): void;
|
|
63
|
-
onPosition(_ref?: HTMLElement | undefined): NeoTabContextPositions
|
|
64
|
-
onChange(tabId?:
|
|
65
|
-
onClose(tabId?:
|
|
66
|
-
register(tabId:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
onPosition(_ref?: HTMLElement | undefined): NeoTabContextPositions<Id>;
|
|
64
|
+
onChange(tabId?: Id, emit?: boolean): void;
|
|
65
|
+
onClose(tabId?: Id): void;
|
|
66
|
+
register(tabId: Id, value: Omit<NeoTabContextValue<Value>, 'index'>, force?: boolean): any;
|
|
67
|
+
/**
|
|
68
|
+
* Removes the tab from the context.
|
|
69
|
+
* @param tabId - The tab ID to remove.
|
|
70
|
+
* @param discard - If true, the active tab will be discarded.
|
|
71
|
+
*/
|
|
72
|
+
remove(tabId: Id, discard?: boolean): void;
|
|
73
|
+
clear(discard?: boolean): void;
|
|
74
|
+
registerPane(tabId: Id, panelId: Id): any;
|
|
75
|
+
removePane(tabId: Id): void;
|
|
70
76
|
}
|
|
71
|
-
export declare function getTabContext<
|
|
72
|
-
export declare function setTabContext<
|
|
77
|
+
export declare function getTabContext<Id extends TabId, Value = unknown>(): NeoTabContext<Id, Value> | undefined;
|
|
78
|
+
export declare function setTabContext<Id extends TabId, Value = unknown>(callback?: NeoTabContextCallbacks<Id, Value>): NeoTabContext<Id, Value>;
|
|
73
79
|
export {};
|
|
@@ -91,19 +91,33 @@ export class NeoTabContext {
|
|
|
91
91
|
onClose(tabId) {
|
|
92
92
|
this.#onClose?.(tabId, this.value);
|
|
93
93
|
}
|
|
94
|
-
register(tabId, value) {
|
|
94
|
+
register(tabId, value, force = false) {
|
|
95
95
|
if (!tabId)
|
|
96
96
|
throw new NeoErrorMissingTabId();
|
|
97
|
-
if (this.#tabs.has(tabId)) {
|
|
97
|
+
if (this.#tabs.has(tabId) && !force) {
|
|
98
98
|
return Logger.warn(`Tab ID '${String(tabId)}' already exists. Tab registration ignored.`, { existing: this.getValue(tabId), ignored: value });
|
|
99
99
|
}
|
|
100
100
|
this.#tabs.set(tabId, { ...value, index: this.#tabs.size });
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Removes the tab from the context.
|
|
104
|
+
* @param tabId - The tab ID to remove.
|
|
105
|
+
* @param discard - If true, the active tab will be discarded.
|
|
106
|
+
*/
|
|
107
|
+
remove(tabId, discard = true) {
|
|
103
108
|
this.#tabs.delete(tabId);
|
|
109
|
+
if (!discard)
|
|
110
|
+
return;
|
|
104
111
|
if (this.#active === tabId)
|
|
105
112
|
this.onChange();
|
|
106
113
|
}
|
|
114
|
+
clear(discard = true) {
|
|
115
|
+
this.#tabs.clear();
|
|
116
|
+
if (!discard)
|
|
117
|
+
return;
|
|
118
|
+
if (this.#active)
|
|
119
|
+
this.onChange();
|
|
120
|
+
}
|
|
107
121
|
registerPane(tabId, panelId) {
|
|
108
122
|
if (this.#panes.has(tabId)) {
|
|
109
123
|
return Logger.warn(`Tab ID '${String(tabId)}' already exists. Pane registration ignored.`, {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { NeoButtonRowItemDivider } from '../buttons/neo-button-row.model.js';
|
|
3
|
+
import type { NeoButtonProps } from '../buttons/neo-button.model.js';
|
|
4
|
+
import type { NeoDividerProps } from '../divider/neo-divider.model.js';
|
|
5
|
+
import type { NeoMenuItem } from '../floating/menu/neo-menu-list-item.model.js';
|
|
6
|
+
import type { NeoMenuProps } from '../floating/menu/neo-menu.model.js';
|
|
7
|
+
import type { NeoIconBouncingDotsProps } from '../icons/neo-icon.model.js';
|
|
8
|
+
import type { NeoTabProps, TabId } from './neo-tab.model.js';
|
|
9
|
+
import type { NeoTabsContext } from './neo-tabs-context.svelte.js';
|
|
10
|
+
import type { NeoTabsProps } from './neo-tabs.model.js';
|
|
11
|
+
import type { SvelteEvent } from '../utils/html-element.utils.js';
|
|
12
|
+
export interface NeoTabRowItemButton<Id extends TabId, Value = unknown> extends NeoTabProps<Id, Value> {
|
|
13
|
+
menuProps?: Partial<NeoMenuItem<Value>>;
|
|
14
|
+
label?: string | undefined;
|
|
15
|
+
icon?: Snippet<[unknown]>;
|
|
16
|
+
}
|
|
17
|
+
export interface NeoTabRowItemDivider extends NeoDividerProps {
|
|
18
|
+
divider: true;
|
|
19
|
+
}
|
|
20
|
+
export type NeoTabRowItem<Id extends TabId, Value = unknown> = NeoTabRowItemButton<Id, Value> | NeoTabRowItemDivider;
|
|
21
|
+
export declare const isTabRowDivider: <Id extends TabId, Value = unknown>(item: NeoTabRowItem<Id, Value>) => item is NeoButtonRowItemDivider;
|
|
22
|
+
export interface NeoTabRowContext {
|
|
23
|
+
/**
|
|
24
|
+
* The collapsed items in the tab row.
|
|
25
|
+
*/
|
|
26
|
+
items?: NeoMenuItem[];
|
|
27
|
+
/**
|
|
28
|
+
* The number of items that are currently collapsed.
|
|
29
|
+
*/
|
|
30
|
+
threshold?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Optional properties to pass to the menu
|
|
33
|
+
*/
|
|
34
|
+
menuProps?: Partial<NeoMenuProps>;
|
|
35
|
+
/**
|
|
36
|
+
* Optional properties to pass to the collapse button icon.
|
|
37
|
+
*/
|
|
38
|
+
iconProps?: NeoIconBouncingDotsProps;
|
|
39
|
+
/**
|
|
40
|
+
* Optional properties to pass to the collapse button.
|
|
41
|
+
*/
|
|
42
|
+
collapseProps?: NeoButtonProps;
|
|
43
|
+
}
|
|
44
|
+
export type OnTabEvent<Id extends TabId, Event = SvelteEvent, Value = unknown> = (e: Event, tab: {
|
|
45
|
+
tabId?: Id;
|
|
46
|
+
value?: Value;
|
|
47
|
+
}) => unknown;
|
|
48
|
+
export interface NeoTabsRowProps<Id extends TabId, Value = unknown> extends Omit<NeoTabRowContext, 'items'>, Omit<NeoTabsProps<Id, Value>, 'children'> {
|
|
49
|
+
/**
|
|
50
|
+
* Snippet to display inside the tab row.
|
|
51
|
+
*/
|
|
52
|
+
children?: Snippet<[NeoTabsContext<Id, Value>, NeoTabRowContext]>;
|
|
53
|
+
/**
|
|
54
|
+
* Snippet to display when tabs would overflow and are collapsed.
|
|
55
|
+
*/
|
|
56
|
+
collapsed?: Snippet<[NeoTabsContext<Id, Value>, NeoTabRowContext]>;
|
|
57
|
+
/**
|
|
58
|
+
* Reference to the inner HTML element.
|
|
59
|
+
*/
|
|
60
|
+
ref?: NeoTabsProps<Id, Value>['ref'];
|
|
61
|
+
/**
|
|
62
|
+
* The tabs to display in the row.
|
|
63
|
+
*/
|
|
64
|
+
tabs: NeoTabRowItem<Id, Value>[];
|
|
65
|
+
/**
|
|
66
|
+
* Whether the default collapse button is hovered.
|
|
67
|
+
*/
|
|
68
|
+
hovered?: NeoButtonProps['hovered'];
|
|
69
|
+
/**
|
|
70
|
+
* Whether the default collapse button is focused.
|
|
71
|
+
*/
|
|
72
|
+
focused?: NeoButtonProps['focused'];
|
|
73
|
+
/**
|
|
74
|
+
* Event handler for when a tab is hovered over.
|
|
75
|
+
*/
|
|
76
|
+
ontabhover?: OnTabEvent<Id, PointerEvent>;
|
|
77
|
+
/**
|
|
78
|
+
* Event handler for when a tab is focused.
|
|
79
|
+
*/
|
|
80
|
+
ontabfocus?: OnTabEvent<Id, FocusEvent>;
|
|
81
|
+
/**
|
|
82
|
+
* Optional properties to pass to the tab components.
|
|
83
|
+
*/
|
|
84
|
+
tabProps?: NeoTabProps<Id, Value>;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isTabRowDivider = (item) => item && 'divider' in item && item.divider;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { NeoButtonGroupProps } from '../buttons/neo-button-group.model.js';
|
|
3
3
|
import type { NeoTabProps, TabId } from './neo-tab.model.js';
|
|
4
|
-
import type { NeoTabsContext } from './neo-tabs-context.svelte.js';
|
|
4
|
+
import type { NeoTabContext, NeoTabsContext } from './neo-tabs-context.svelte.js';
|
|
5
5
|
import type { HTMLActionProps } from '../utils/action.utils.js';
|
|
6
6
|
import type { HTMLNeoBaseElement, HTMLRefProps, HTMLTagProps } from '../utils/html-element.utils.js';
|
|
7
7
|
import type { ShadowElevation, ShadowElevationString } from '../utils/shadow.utils.js';
|
|
8
|
+
export type { TabId } from './neo-tab.model.js';
|
|
8
9
|
export interface NeoTabContextValue<Value = unknown> {
|
|
9
10
|
index: number;
|
|
10
11
|
value?: Value;
|
|
11
|
-
ref
|
|
12
|
+
ref?: HTMLElement;
|
|
12
13
|
}
|
|
13
|
-
export type OnChange<Value = unknown> = (tabId?:
|
|
14
|
-
export type OnClose<Value = unknown> = (tabId?:
|
|
14
|
+
export type OnChange<Id extends TabId, Value = unknown> = (tabId?: Id, newValue?: NeoTabContextValue<Value>, oldValue?: NeoTabContextValue<Value>) => unknown;
|
|
15
|
+
export type OnClose<Id extends TabId, Value = unknown> = (tabId?: Id, value?: NeoTabContextValue<Value>) => unknown;
|
|
15
16
|
export type NeoTabsSlideElevation = ShadowElevation | ShadowElevationString;
|
|
16
17
|
export type NeoTabsContainerProps = HTMLNeoBaseElement & HTMLActionProps;
|
|
17
|
-
export type NeoTabsProps<Value = unknown, Tag extends keyof HTMLElementTagNameMap = 'div'> = {
|
|
18
|
+
export type NeoTabsProps<Id extends TabId, Value = unknown, Tag extends keyof HTMLElementTagNameMap = 'div'> = {
|
|
18
19
|
/**
|
|
19
20
|
* Snippet to display as the tabs content.
|
|
20
21
|
*/
|
|
21
|
-
children?: Snippet<[NeoTabsContext]>;
|
|
22
|
+
children?: Snippet<[NeoTabsContext<Id, Value>, NeoTabContext<Id, Value>]>;
|
|
22
23
|
/**
|
|
23
24
|
* Optional snippet to expose context to other components.
|
|
24
25
|
*/
|
|
25
|
-
panes?: Snippet<[NeoTabsContext]>;
|
|
26
|
+
panes?: Snippet<[NeoTabsContext<Id, Value>, NeoTabContext<Id, Value>]>;
|
|
26
27
|
/**
|
|
27
28
|
* The HTML tag to use for the tabs.
|
|
28
29
|
* @default 'div'
|
|
@@ -63,17 +64,17 @@ export type NeoTabsProps<Value = unknown, Tag extends keyof HTMLElementTagNameMa
|
|
|
63
64
|
/**
|
|
64
65
|
* Event handler that fires when the active tab changes.
|
|
65
66
|
*/
|
|
66
|
-
onchange?: OnChange<Value>;
|
|
67
|
+
onchange?: OnChange<Id, Value>;
|
|
67
68
|
/**
|
|
68
69
|
* Event handler that fires when any close button is clicked.
|
|
69
70
|
*/
|
|
70
|
-
onclose?: OnClose<Value>;
|
|
71
|
+
onclose?: OnClose<Id, Value>;
|
|
71
72
|
/**
|
|
72
73
|
* Event handler that fires when the add button is clicked.
|
|
73
74
|
*/
|
|
74
|
-
onadd?: NeoTabProps['onclick'];
|
|
75
|
+
onadd?: NeoTabProps<Id, Value>['onclick'];
|
|
75
76
|
/**
|
|
76
77
|
* Optional props to pass to the tabs container.
|
|
77
78
|
*/
|
|
78
79
|
containerProps?: NeoTabsContainerProps & HTMLTagProps;
|
|
79
|
-
} & NeoTabsContext & Omit<NeoButtonGroupProps<Tag>, 'onchange' | 'children' | 'vertical' | 'ref'> & HTMLRefProps;
|
|
80
|
+
} & NeoTabsContext<Id, Value> & Omit<NeoButtonGroupProps<Tag>, 'onchange' | 'children' | 'vertical' | 'ref'> & HTMLRefProps;
|
package/dist/pill/NeoPill.svelte
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
import { width } from '@dvcol/svelte-utils/transition';
|
|
5
5
|
|
|
6
6
|
import NeoAffix from '../inputs/common/NeoAffix.svelte';
|
|
7
|
+
import NeoImage from '../media/NeoImage.svelte';
|
|
7
8
|
import { toAction, toActionProps, toTransition, toTransitionProps } from '../utils/action.utils.js';
|
|
9
|
+
import { computeBorderRadius } from '../utils/border.utils.js';
|
|
8
10
|
import { getColorVariable } from '../utils/colors.utils.js';
|
|
9
11
|
import {
|
|
10
12
|
coerce,
|
|
@@ -21,18 +23,22 @@
|
|
|
21
23
|
let {
|
|
22
24
|
// Snippets
|
|
23
25
|
children,
|
|
26
|
+
label,
|
|
27
|
+
icon,
|
|
24
28
|
|
|
25
29
|
// States
|
|
26
30
|
tag = 'div',
|
|
27
31
|
close,
|
|
28
32
|
color,
|
|
33
|
+
text,
|
|
29
34
|
loading,
|
|
30
35
|
disabled,
|
|
31
36
|
skeleton = false,
|
|
37
|
+
reverse,
|
|
32
38
|
size,
|
|
33
39
|
|
|
34
40
|
// Styles
|
|
35
|
-
borderless,
|
|
41
|
+
borderless = text,
|
|
36
42
|
rounded = true,
|
|
37
43
|
pressed,
|
|
38
44
|
glass,
|
|
@@ -41,7 +47,7 @@
|
|
|
41
47
|
start,
|
|
42
48
|
|
|
43
49
|
// Shadow
|
|
44
|
-
elevation: _elevation = pressed ? -1 : 1,
|
|
50
|
+
elevation: _elevation = text ? 0 : (pressed ? -1 : 1),
|
|
45
51
|
hover: _hover = 0,
|
|
46
52
|
blur: _blur,
|
|
47
53
|
|
|
@@ -58,6 +64,7 @@
|
|
|
58
64
|
|
|
59
65
|
// Other props
|
|
60
66
|
affixProps,
|
|
67
|
+
imageProps,
|
|
61
68
|
...rest
|
|
62
69
|
}: NeoPillProps = $props();
|
|
63
70
|
/* eslint-enable prefer-const */
|
|
@@ -74,6 +81,8 @@
|
|
|
74
81
|
const hoverFlat = $derived(isShadowFlat(boxShadow) && !isShadowFlat(hoverShadow));
|
|
75
82
|
const flatHover = $derived(isShadowFlat(hoverShadow) && !isShadowFlat(boxShadow));
|
|
76
83
|
|
|
84
|
+
const empty = $derived((!children && (label === undefined || label === null)));
|
|
85
|
+
|
|
77
86
|
const context = $derived<NeoPillContext>({
|
|
78
87
|
close,
|
|
79
88
|
color,
|
|
@@ -109,10 +118,12 @@
|
|
|
109
118
|
class:neo-disabled={disabled}
|
|
110
119
|
class:neo-skeleton={skeleton}
|
|
111
120
|
class:neo-pressed={pressed}
|
|
121
|
+
class:neo-reverse={reverse}
|
|
112
122
|
class:neo-glass={glass}
|
|
113
123
|
class:neo-tinted={tinted}
|
|
114
124
|
class:neo-filled={filled}
|
|
115
125
|
class:neo-start={start}
|
|
126
|
+
class:neo-empty={empty}
|
|
116
127
|
class:neo-hover={hover}
|
|
117
128
|
class:neo-hover-flat={hoverFlat}
|
|
118
129
|
class:neo-flat-hover={flatHover}
|
|
@@ -123,11 +134,26 @@
|
|
|
123
134
|
style:--neo-pill-box-shadow={boxShadow}
|
|
124
135
|
style:--neo-pill-box-shadow-hover={hoverShadow}
|
|
125
136
|
style:--neo-pill-text-color={getColorVariable(color)}
|
|
137
|
+
style:--neo-pill-border-radius={computeBorderRadius(rounded)}
|
|
126
138
|
use:useFn={useProps}
|
|
127
139
|
out:outFn={outProps}
|
|
128
140
|
in:inFn={inProps}
|
|
129
141
|
{...rest}
|
|
130
142
|
>
|
|
143
|
+
{#if icon}
|
|
144
|
+
<span class="neo-icon" class:neo-only={empty} transition:width={quickDurationProps}>
|
|
145
|
+
{#if typeof icon === 'function'}
|
|
146
|
+
{@render icon?.(context)}
|
|
147
|
+
{:else if typeof icon === 'string'}
|
|
148
|
+
<NeoImage src={icon} ratio="1/1" {...imageProps} />
|
|
149
|
+
{/if}
|
|
150
|
+
</span>
|
|
151
|
+
{/if}
|
|
152
|
+
{#if typeof label === 'function'}
|
|
153
|
+
{@render label?.(context)}
|
|
154
|
+
{:else if label !== undefined}
|
|
155
|
+
{label}
|
|
156
|
+
{/if}
|
|
131
157
|
{@render children?.(context)}
|
|
132
158
|
{#if (close && !disabled) || loading}
|
|
133
159
|
<NeoAffix
|
|
@@ -152,16 +178,41 @@
|
|
|
152
178
|
align-items: center;
|
|
153
179
|
box-sizing: border-box;
|
|
154
180
|
width: fit-content;
|
|
155
|
-
|
|
156
|
-
|
|
181
|
+
margin: var(--neo-pill-margin, 0);
|
|
182
|
+
padding: var(--neo-pill-padding, 0.125rem 0.5rem);
|
|
157
183
|
color: var(--neo-pill-text-color, inherit);
|
|
158
184
|
background-clip: padding-box;
|
|
159
185
|
border: var(--neo-pill-border-width, var(--neo-border-width, 1px)) var(--neo-pill-border-color, transparent) solid;
|
|
160
186
|
border-radius: var(--neo-pill-border-radius, var(--neo-border-radius));
|
|
161
187
|
box-shadow: var(--neo-pill-box-shadow, var(--neo-box-shadow-flat));
|
|
162
188
|
transition: color 0.15s ease, padding 0.3s ease, border-color 0.3s ease, border-radius 0.3s ease, backdrop-filter 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease-out;
|
|
163
|
-
|
|
164
|
-
|
|
189
|
+
}
|
|
190
|
+
.neo-pill.neo-empty {
|
|
191
|
+
padding: var(--neo-pill-padding-empty, 0.375rem);
|
|
192
|
+
}
|
|
193
|
+
.neo-pill .neo-icon {
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
vertical-align: middle;
|
|
198
|
+
}
|
|
199
|
+
.neo-pill .neo-icon :global(.neo-image) {
|
|
200
|
+
--neo-image-border-radius: 0;
|
|
201
|
+
min-height: 1rem;
|
|
202
|
+
}
|
|
203
|
+
.neo-pill .neo-icon:not(.neo-only) {
|
|
204
|
+
margin-right: var(--neo-pill-icon-gap, var(--neo-gap-4xs, 0.25rem));
|
|
205
|
+
margin-left: var(--neo-pill-icon-offset, calc(0% - var(--neo-pill-icon-gap, var(--neo-gap-5xs, 0.125rem))));
|
|
206
|
+
}
|
|
207
|
+
.neo-pill.neo-reverse {
|
|
208
|
+
flex-direction: row-reverse;
|
|
209
|
+
}
|
|
210
|
+
.neo-pill.neo-reverse .neo-icon:not(.neo-only) {
|
|
211
|
+
margin-right: var(--neo-pill-icon-offset, calc(0% - var(--neo-pill-icon-gap, var(--neo-gap-5xs, 0.125rem))));
|
|
212
|
+
margin-left: var(--neo-pill-icon-gap, var(--neo-gap-4xs, 0.25rem));
|
|
213
|
+
}
|
|
214
|
+
.neo-pill.neo-reverse :global(> .neo-pill-affix) {
|
|
215
|
+
--neo-pill-affix-margin-inline: -0.125rem 0.3125rem;
|
|
165
216
|
}
|
|
166
217
|
.neo-pill[medium], .neo-pill[data-type=medium] {
|
|
167
218
|
min-width: 1.5rem;
|
|
@@ -171,8 +222,11 @@
|
|
|
171
222
|
padding-inline: 0.4375rem;
|
|
172
223
|
}
|
|
173
224
|
.neo-pill[medium] :global(> .neo-pill-affix), .neo-pill[data-type=medium] :global(> .neo-pill-affix) {
|
|
174
|
-
--neo-affix-size: 0.
|
|
175
|
-
margin-inline
|
|
225
|
+
--neo-affix-size: 0.875rem;
|
|
226
|
+
--neo-pill-affix-margin-inline: 0.25rem -0.125rem;
|
|
227
|
+
}
|
|
228
|
+
.neo-pill[medium].neo-reverse :global(> .neo-pill-affix), .neo-pill[data-type=medium].neo-reverse :global(> .neo-pill-affix) {
|
|
229
|
+
--neo-pill-affix-margin-inline: -0.125rem 0.25rem;
|
|
176
230
|
}
|
|
177
231
|
.neo-pill[small], .neo-pill[data-type=small] {
|
|
178
232
|
min-width: 1.25rem;
|
|
@@ -182,16 +236,20 @@
|
|
|
182
236
|
padding-inline: 0.3125rem;
|
|
183
237
|
}
|
|
184
238
|
.neo-pill[small] :global(> .neo-pill-affix), .neo-pill[data-type=small] :global(> .neo-pill-affix) {
|
|
185
|
-
--neo-affix-size: 0.
|
|
186
|
-
margin-inline
|
|
239
|
+
--neo-affix-size: 0.75rem;
|
|
240
|
+
--neo-pill-affix-margin-inline: 0.1875rem -0.0625rem;
|
|
241
|
+
}
|
|
242
|
+
.neo-pill[small].neo-reverse :global(> .neo-pill-affix), .neo-pill[data-type=small].neo-reverse :global(> .neo-pill-affix) {
|
|
243
|
+
--neo-pill-affix-margin-inline: -0.0625rem 0.1875rem;
|
|
187
244
|
}
|
|
188
245
|
.neo-pill:focus-within, .neo-pill.neo-hover:hover {
|
|
189
246
|
box-shadow: var(--neo-pill-box-shadow-hover, var(--neo-box-shadow-flat));
|
|
190
247
|
}
|
|
191
248
|
.neo-pill :global(> .neo-pill-affix) {
|
|
192
|
-
--neo-affix-size:
|
|
249
|
+
--neo-affix-size: 1.125rem;
|
|
250
|
+
--neo-pill-affix-margin-inline: 0.3125rem -0.125rem;
|
|
193
251
|
padding: 0;
|
|
194
|
-
margin-inline
|
|
252
|
+
margin-inline: var(--neo-pill-affix-margin-inline);
|
|
195
253
|
}
|
|
196
254
|
.neo-pill.neo-hover.neo-flat-hover:hover, .neo-pill.neo-hover.neo-flat-hover:focus-within, .neo-pill.neo-flat:not(.neo-borderless, .neo-hover-flat:hover, .neo-hover-flat:focus-within) {
|
|
197
255
|
border-color: var(--neo-pill-border-color, var(--neo-border-color));
|
|
@@ -210,7 +268,7 @@
|
|
|
210
268
|
border-color: transparent;
|
|
211
269
|
}
|
|
212
270
|
.neo-pill.neo-rounded {
|
|
213
|
-
border-radius: var(--neo-pill-border-radius, var(--neo-border-radius-
|
|
271
|
+
border-radius: var(--neo-pill-border-radius, var(--neo-border-radius-xxl));
|
|
214
272
|
}
|
|
215
273
|
.neo-pill.neo-glass {
|
|
216
274
|
--neo-skeleton-color: var(--neo-glass-skeleton-color);
|
|
@@ -240,6 +298,7 @@
|
|
|
240
298
|
background-color: var(--neo-pill-bg-color, var(--neo-background-color-tinted));
|
|
241
299
|
}
|
|
242
300
|
.neo-pill.neo-filled {
|
|
301
|
+
--neo-affix-clear-color: var(--neo-pill-affix-color-filled, var(--neo-text-color));
|
|
243
302
|
color: var(--neo-pill-text-color-filled, var(--neo-text-color-inverse));
|
|
244
303
|
background-color: var(--neo-pill-text-color, var(--neo-text-color));
|
|
245
304
|
}
|
|
@@ -256,7 +315,7 @@
|
|
|
256
315
|
background-clip: padding-box;
|
|
257
316
|
border-color: var(--neo-skeleton-color);
|
|
258
317
|
opacity: 1;
|
|
259
|
-
transition: background-color 1s ease, color 0.3333333333s ease, border-color 1s ease, opacity 1s ease;
|
|
318
|
+
transition: border-radius 0.3333333333s ease, background-color 1s ease, color 0.3333333333s ease, border-color 1s ease, opacity 1s ease;
|
|
260
319
|
animation: skeleton 3s var(--neo-transition-skeleton) infinite;
|
|
261
320
|
animation-delay: 1s;
|
|
262
321
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { NeoAffixProps } from '../inputs/common/neo-affix.model.js';
|
|
3
|
+
import type { NeoImageProps } from '../media/index.js';
|
|
3
4
|
import type { HTMLTransitionProps, HTMLUseProps } from '../utils/action.utils.js';
|
|
5
|
+
import type { BorderRadiusInput } from '../utils/border.utils.js';
|
|
4
6
|
import type { Color } from '../utils/colors.utils.js';
|
|
5
7
|
import type { HTMLNeoBaseElement } from '../utils/html-element.utils.js';
|
|
6
8
|
import type { BlurElevation, BlurElevationString, ShadowShallowElevation, ShadowShallowElevationString } from '../utils/shadow.utils.js';
|
|
@@ -21,6 +23,12 @@ export interface NeoPillContext {
|
|
|
21
23
|
* Color to use for the pill.
|
|
22
24
|
*/
|
|
23
25
|
color?: Color | CSSStyleDeclaration['color'];
|
|
26
|
+
/**
|
|
27
|
+
* Shorthand for a flat borderless pill.
|
|
28
|
+
*
|
|
29
|
+
* @defaults`{ elevation: 0, borderless: true }`
|
|
30
|
+
*/
|
|
31
|
+
text?: boolean;
|
|
24
32
|
/**
|
|
25
33
|
* Display a loading indicator in the pill.
|
|
26
34
|
*/
|
|
@@ -33,6 +41,10 @@ export interface NeoPillContext {
|
|
|
33
41
|
* Disable interactions and display a skeleton state.
|
|
34
42
|
*/
|
|
35
43
|
skeleton?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* If true, the flex direction of the pill will be reversed.
|
|
46
|
+
*/
|
|
47
|
+
reverse?: boolean;
|
|
36
48
|
/**
|
|
37
49
|
* Set the size of the pill.
|
|
38
50
|
*
|
|
@@ -61,7 +73,7 @@ export interface NeoPillContext {
|
|
|
61
73
|
/**
|
|
62
74
|
* Rounds border radius.
|
|
63
75
|
*/
|
|
64
|
-
rounded?:
|
|
76
|
+
rounded?: BorderRadiusInput;
|
|
65
77
|
/**
|
|
66
78
|
* Recess the content of the pill if elevation is inset (< 0).
|
|
67
79
|
*/
|
|
@@ -88,6 +100,14 @@ export type NeoPillProps<Tag extends keyof HTMLElementTagNameMap = 'div'> = {
|
|
|
88
100
|
* Snippet to display as the pill content.
|
|
89
101
|
*/
|
|
90
102
|
children?: Snippet<[NeoPillContext]>;
|
|
103
|
+
/**
|
|
104
|
+
* Optional snippet or text to display as the button label.
|
|
105
|
+
*/
|
|
106
|
+
label?: Snippet<[NeoPillContext]> | string;
|
|
107
|
+
/**
|
|
108
|
+
* Optional icon snippet to display before the text.
|
|
109
|
+
*/
|
|
110
|
+
icon?: Snippet<[NeoPillContext]> | string;
|
|
91
111
|
/**
|
|
92
112
|
* The HTML tag to use for the pill.
|
|
93
113
|
* @default div
|
|
@@ -101,4 +121,8 @@ export type NeoPillProps<Tag extends keyof HTMLElementTagNameMap = 'div'> = {
|
|
|
101
121
|
* Props to pass to the close/loading affix.
|
|
102
122
|
*/
|
|
103
123
|
affixProps?: NeoAffixProps;
|
|
124
|
+
/**
|
|
125
|
+
* Optional props to pass to the icon image component if the icon is a string.
|
|
126
|
+
*/
|
|
127
|
+
imageProps?: Partial<NeoImageProps>;
|
|
104
128
|
} & NeoPillContext & HTMLTransitionProps & HTMLUseProps & HTMLNeoBaseElement<HTMLElementTagNameMap[Tag]>;
|