@umbraco-ui/uui 2.0.0-rc.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +103 -1
- package/dist/_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js +9 -0
- package/dist/components/action-bar/action-bar.d.ts +0 -1
- package/dist/components/action-bar/action-bar.element.js +15 -12
- package/dist/components/action-bar/action-bar.element.js.map +1 -1
- package/dist/components/action-bar/action-bar.js +5 -5
- package/dist/components/action-bar/action-bar.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +0 -1
- package/dist/components/avatar/avatar.element.js +72 -86
- package/dist/components/avatar/avatar.element.js.map +1 -1
- package/dist/components/avatar/avatar.js +5 -5
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar-group/avatar-group.d.ts +0 -1
- package/dist/components/avatar-group/avatar-group.element.js +58 -68
- package/dist/components/avatar-group/avatar-group.element.js.map +1 -1
- package/dist/components/avatar-group/avatar-group.js +5 -5
- package/dist/components/avatar-group/avatar-group.js.map +1 -1
- package/dist/components/badge/badge.d.ts +0 -1
- package/dist/components/badge/badge.element.js +32 -38
- package/dist/components/badge/badge.element.js.map +1 -1
- package/dist/components/badge/badge.js +5 -5
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/boolean-input/UUIBooleanInputEvent.js +15 -13
- package/dist/components/boolean-input/UUIBooleanInputEvent.js.map +1 -1
- package/dist/components/boolean-input/boolean-input.d.ts +0 -1
- package/dist/components/boolean-input/boolean-input.element.js +114 -134
- package/dist/components/boolean-input/boolean-input.element.js.map +1 -1
- package/dist/components/boolean-input/boolean-input.js +3 -0
- package/dist/components/box/box.d.ts +0 -1
- package/dist/components/box/box.element.js +74 -77
- package/dist/components/box/box.element.js.map +1 -1
- package/dist/components/box/box.js +5 -5
- package/dist/components/box/box.js.map +1 -1
- package/dist/components/breadcrumbs/breadcrumb-item.element.js +45 -50
- package/dist/components/breadcrumbs/breadcrumb-item.element.js.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +0 -1
- package/dist/components/breadcrumbs/breadcrumbs.element.js +40 -47
- package/dist/components/breadcrumbs/breadcrumbs.element.js.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.js +5 -6
- package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/components/button/button.d.ts +0 -1
- package/dist/components/button/button.element.js +147 -199
- package/dist/components/button/button.element.js.map +1 -1
- package/dist/components/button/button.js +5 -5
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button-copy-text/UUICopyTextEvent.js +16 -12
- package/dist/components/button-copy-text/UUICopyTextEvent.js.map +1 -1
- package/dist/components/button-copy-text/button-copy-text.d.ts +0 -1
- package/dist/components/button-copy-text/button-copy-text.element.js +78 -93
- package/dist/components/button-copy-text/button-copy-text.element.js.map +1 -1
- package/dist/components/button-copy-text/button-copy-text.js +6 -7
- package/dist/components/button-copy-text/button-copy-text.js.map +1 -1
- package/dist/components/button-group/button-group.d.ts +0 -1
- package/dist/components/button-group/button-group.element.js +19 -14
- package/dist/components/button-group/button-group.element.js.map +1 -1
- package/dist/components/button-group/button-group.js +5 -5
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/button-inline-create/UUIButtonInlineCreateEvent.js +16 -14
- package/dist/components/button-inline-create/UUIButtonInlineCreateEvent.js.map +1 -1
- package/dist/components/button-inline-create/button-inline-create.d.ts +0 -1
- package/dist/components/button-inline-create/button-inline-create.element.js +63 -88
- package/dist/components/button-inline-create/button-inline-create.element.js.map +1 -1
- package/dist/components/button-inline-create/button-inline-create.js +6 -7
- package/dist/components/button-inline-create/button-inline-create.js.map +1 -1
- package/dist/components/card/UUICardEvent.js +9 -7
- package/dist/components/card/UUICardEvent.js.map +1 -1
- package/dist/components/card/card.d.ts +0 -1
- package/dist/components/card/card.element.d.ts +7 -0
- package/dist/components/card/card.element.js +72 -69
- package/dist/components/card/card.element.js.map +1 -1
- package/dist/components/card/card.js +6 -7
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/card-block-type/card-block-type.d.ts +0 -1
- package/dist/components/card-block-type/card-block-type.element.js +55 -74
- package/dist/components/card-block-type/card-block-type.element.js.map +1 -1
- package/dist/components/card-block-type/card-block-type.js +5 -5
- package/dist/components/card-block-type/card-block-type.js.map +1 -1
- package/dist/components/card-content-node/card-content-node.d.ts +0 -1
- package/dist/components/card-content-node/card-content-node.element.d.ts +1 -0
- package/dist/components/card-content-node/card-content-node.element.js +82 -83
- package/dist/components/card-content-node/card-content-node.element.js.map +1 -1
- package/dist/components/card-content-node/card-content-node.js +5 -5
- package/dist/components/card-content-node/card-content-node.js.map +1 -1
- package/dist/components/card-media/card-media.d.ts +0 -1
- package/dist/components/card-media/card-media.element.d.ts +4 -0
- package/dist/components/card-media/card-media.element.js +103 -89
- package/dist/components/card-media/card-media.element.js.map +1 -1
- package/dist/components/card-media/card-media.js +5 -5
- package/dist/components/card-media/card-media.js.map +1 -1
- package/dist/components/card-user/card-user.d.ts +0 -1
- package/dist/components/card-user/card-user.element.js +57 -72
- package/dist/components/card-user/card-user.element.js.map +1 -1
- package/dist/components/card-user/card-user.js +5 -5
- package/dist/components/card-user/card-user.js.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts +0 -1
- package/dist/components/checkbox/checkbox.element.js +41 -22
- package/dist/components/checkbox/checkbox.element.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +5 -5
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/color-area/UUIColorAreaEvent.js +15 -13
- package/dist/components/color-area/UUIColorAreaEvent.js.map +1 -1
- package/dist/components/color-area/color-area.d.ts +0 -1
- package/dist/components/color-area/color-area.element.js +137 -174
- package/dist/components/color-area/color-area.element.js.map +1 -1
- package/dist/components/color-area/color-area.js +6 -7
- package/dist/components/color-area/color-area.js.map +1 -1
- package/dist/components/color-picker/UUIColorPickerEvent.js +15 -13
- package/dist/components/color-picker/UUIColorPickerEvent.js.map +1 -1
- package/dist/components/color-picker/color-picker.d.ts +0 -1
- package/dist/components/color-picker/color-picker.element.js +293 -334
- package/dist/components/color-picker/color-picker.element.js.map +1 -1
- package/dist/components/color-picker/color-picker.js +6 -7
- package/dist/components/color-picker/color-picker.js.map +1 -1
- package/dist/components/color-slider/UUIColorSliderEvent.js +15 -13
- package/dist/components/color-slider/UUIColorSliderEvent.js.map +1 -1
- package/dist/components/color-slider/color-slider.d.ts +0 -1
- package/dist/components/color-slider/color-slider.element.js +169 -219
- package/dist/components/color-slider/color-slider.element.js.map +1 -1
- package/dist/components/color-slider/color-slider.js +6 -7
- package/dist/components/color-slider/color-slider.js.map +1 -1
- package/dist/components/color-swatch/color-swatch.d.ts +0 -1
- package/dist/components/color-swatch/color-swatch.element.d.ts +1 -1
- package/dist/components/color-swatch/color-swatch.element.js +215 -201
- package/dist/components/color-swatch/color-swatch.element.js.map +1 -1
- package/dist/components/color-swatch/color-swatch.js +5 -5
- package/dist/components/color-swatch/color-swatch.js.map +1 -1
- package/dist/components/color-swatches/UUIColorSwatchesEvent.js +15 -13
- package/dist/components/color-swatches/UUIColorSwatchesEvent.js.map +1 -1
- package/dist/components/color-swatches/color-swatches.d.ts +0 -1
- package/dist/components/color-swatches/color-swatches.element.js +115 -132
- package/dist/components/color-swatches/color-swatches.element.js.map +1 -1
- package/dist/components/color-swatches/color-swatches.js +6 -7
- package/dist/components/color-swatches/color-swatches.js.map +1 -1
- package/dist/components/combobox/UUIComboboxEvent.js +18 -14
- package/dist/components/combobox/UUIComboboxEvent.js.map +1 -1
- package/dist/components/combobox/combobox.d.ts +0 -1
- package/dist/components/combobox/combobox.element.js +321 -425
- package/dist/components/combobox/combobox.element.js.map +1 -1
- package/dist/components/combobox/combobox.js +6 -7
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/combobox-list/UUIComboboxListEvent.js +18 -14
- package/dist/components/combobox-list/UUIComboboxListEvent.js.map +1 -1
- package/dist/components/combobox-list/combobox-list-option.element.js +88 -80
- package/dist/components/combobox-list/combobox-list-option.element.js.map +1 -1
- package/dist/components/combobox-list/combobox-list.d.ts +0 -1
- package/dist/components/combobox-list/combobox-list.element.js +218 -275
- package/dist/components/combobox-list/combobox-list.element.js.map +1 -1
- package/dist/components/combobox-list/combobox-list.js +6 -8
- package/dist/components/combobox-list/combobox-list.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts +0 -1
- package/dist/components/dialog/dialog.element.js +19 -14
- package/dist/components/dialog/dialog.element.js.map +1 -1
- package/dist/components/dialog/dialog.js +5 -5
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/dialog-layout/dialog-layout.d.ts +0 -1
- package/dist/components/dialog-layout/dialog-layout.element.js +59 -64
- package/dist/components/dialog-layout/dialog-layout.element.js.map +1 -1
- package/dist/components/dialog-layout/dialog-layout.js +5 -5
- package/dist/components/dialog-layout/dialog-layout.js.map +1 -1
- package/dist/components/file-dropzone/UUIFileDropzoneEvent.js +18 -14
- package/dist/components/file-dropzone/UUIFileDropzoneEvent.js.map +1 -1
- package/dist/components/file-dropzone/file-dropzone.d.ts +0 -1
- package/dist/components/file-dropzone/file-dropzone.element.js +214 -257
- package/dist/components/file-dropzone/file-dropzone.element.js.map +1 -1
- package/dist/components/file-dropzone/file-dropzone.js +6 -7
- package/dist/components/file-dropzone/file-dropzone.js.map +1 -1
- package/dist/components/file-preview/UUIFileSize.js +46 -19
- package/dist/components/file-preview/UUIFileSize.js.map +1 -1
- package/dist/components/file-preview/file-preview.d.ts +0 -1
- package/dist/components/file-preview/file-preview.element.js +78 -103
- package/dist/components/file-preview/file-preview.element.js.map +1 -1
- package/dist/components/file-preview/file-preview.js +6 -5
- package/dist/components/file-preview/file-preview.js.map +1 -1
- package/dist/components/form/form.d.ts +0 -1
- package/dist/components/form/form.element.js +46 -46
- package/dist/components/form/form.element.js.map +1 -1
- package/dist/components/form/form.js +5 -5
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form-layout-item/form-layout-item.d.ts +0 -1
- package/dist/components/form-layout-item/form-layout-item.element.js +39 -45
- package/dist/components/form-layout-item/form-layout-item.element.js.map +1 -1
- package/dist/components/form-layout-item/form-layout-item.js +5 -5
- package/dist/components/form-layout-item/form-layout-item.js.map +1 -1
- package/dist/components/form-validation-message/form-validation-message.d.ts +0 -1
- package/dist/components/form-validation-message/form-validation-message.element.js +71 -89
- package/dist/components/form-validation-message/form-validation-message.element.js.map +1 -1
- package/dist/components/form-validation-message/form-validation-message.js +5 -5
- package/dist/components/form-validation-message/form-validation-message.js.map +1 -1
- package/dist/components/icon/UUIIconRequestEvent.js +21 -19
- package/dist/components/icon/UUIIconRequestEvent.js.map +1 -1
- package/dist/components/icon/icon.d.ts +0 -1
- package/dist/components/icon/icon.element.js +93 -117
- package/dist/components/icon/icon.element.js.map +1 -1
- package/dist/components/icon/icon.js +6 -7
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/icon-registry/UUIIconHost.js +16 -17
- package/dist/components/icon-registry/UUIIconHost.js.map +1 -1
- package/dist/components/icon-registry/UUIIconRegistry.js +67 -77
- package/dist/components/icon-registry/UUIIconRegistry.js.map +1 -1
- package/dist/components/icon-registry/icon-registry.d.ts +0 -1
- package/dist/components/icon-registry/icon-registry.element.js +39 -48
- package/dist/components/icon-registry/icon-registry.element.js.map +1 -1
- package/dist/components/icon-registry/icon-registry.js +7 -6
- package/dist/components/icon-registry/icon-registry.js.map +1 -1
- package/dist/components/icon-registry-essential/UUIIconRegistryEssential.js +44 -42
- package/dist/components/icon-registry-essential/UUIIconRegistryEssential.js.map +1 -1
- package/dist/components/icon-registry-essential/icon-registry-essential.d.ts +0 -1
- package/dist/components/icon-registry-essential/icon-registry-essential.element.js +15 -9
- package/dist/components/icon-registry-essential/icon-registry-essential.element.js.map +1 -1
- package/dist/components/icon-registry-essential/icon-registry-essential.js +6 -39
- package/dist/components/icon-registry-essential/icon-registry-essential.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconAdd.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconAdd.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconAlert.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconAlert.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconAttachment.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconAttachment.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconCalendar.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconCalendar.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconCheck.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconCheck.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconClipboard.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconClipboard.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconCode.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconCode.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconColorPicker.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconColorPicker.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconCopy.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconCopy.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconDelete.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconDelete.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconDocument.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconDocument.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconDownload.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconDownload.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconDrag.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconDrag.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconEdit.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconEdit.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconFavorite.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconFavorite.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconFolder.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconFolder.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconForbidden.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconForbidden.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconInfo.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconInfo.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconLink.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconLink.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconLock.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconLock.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconPause.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconPause.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconPicture.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconPicture.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconPlay.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconPlay.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconRemove.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconRemove.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconSearch.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconSearch.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconSee.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconSee.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconSettings.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconSettings.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconSubtract.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconSubtract.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconSync.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconSync.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconUnlock.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconUnlock.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconUnsee.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconUnsee.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconWand.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconWand.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/iconWrong.js +6 -5
- package/dist/components/icon-registry-essential/svgs/iconWrong.js.map +1 -1
- package/dist/components/icon-registry-essential/svgs/index.js +34 -0
- package/dist/components/index.js +206 -0
- package/dist/components/input/UUIInputEvent.js +18 -14
- package/dist/components/input/UUIInputEvent.js.map +1 -1
- package/dist/components/input/input.d.ts +0 -1
- package/dist/components/input/input.element.js +176 -201
- package/dist/components/input/input.element.js.map +1 -1
- package/dist/components/input/input.js +6 -7
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input-file/input-file.d.ts +0 -1
- package/dist/components/input-file/input-file.element.js +137 -211
- package/dist/components/input-file/input-file.element.js.map +1 -1
- package/dist/components/input-file/input-file.js +5 -5
- package/dist/components/input-file/input-file.js.map +1 -1
- package/dist/components/input-lock/UUIInputLockEvent.js +15 -13
- package/dist/components/input-lock/UUIInputLockEvent.js.map +1 -1
- package/dist/components/input-lock/input-lock.d.ts +0 -1
- package/dist/components/input-lock/input-lock.element.js +69 -105
- package/dist/components/input-lock/input-lock.element.js.map +1 -1
- package/dist/components/input-lock/input-lock.js +6 -7
- package/dist/components/input-lock/input-lock.js.map +1 -1
- package/dist/components/input-password/input-password.d.ts +0 -1
- package/dist/components/input-password/input-password.element.js +45 -90
- package/dist/components/input-password/input-password.element.js.map +1 -1
- package/dist/components/input-password/input-password.js +5 -5
- package/dist/components/input-password/input-password.js.map +1 -1
- package/dist/components/keyboard-shortcut/key.element.js +19 -14
- package/dist/components/keyboard-shortcut/key.element.js.map +1 -1
- package/dist/components/keyboard-shortcut/keyboard-shortcut.d.ts +0 -1
- package/dist/components/keyboard-shortcut/keyboard-shortcut.element.js +19 -14
- package/dist/components/keyboard-shortcut/keyboard-shortcut.element.js.map +1 -1
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js +5 -6
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/components/label/label.d.ts +0 -1
- package/dist/components/label/label.element.js +52 -54
- package/dist/components/label/label.element.js.map +1 -1
- package/dist/components/label/label.js +5 -5
- package/dist/components/label/label.js.map +1 -1
- package/dist/components/loader/loader.d.ts +0 -1
- package/dist/components/loader/loader.element.js +18 -14
- package/dist/components/loader/loader.element.js.map +1 -1
- package/dist/components/loader/loader.js +5 -5
- package/dist/components/loader/loader.js.map +1 -1
- package/dist/components/loader-bar/loader-bar.d.ts +0 -1
- package/dist/components/loader-bar/loader-bar.element.js +55 -52
- package/dist/components/loader-bar/loader-bar.element.js.map +1 -1
- package/dist/components/loader-bar/loader-bar.js +5 -5
- package/dist/components/loader-bar/loader-bar.js.map +1 -1
- package/dist/components/loader-circle/loader-circle.d.ts +0 -1
- package/dist/components/loader-circle/loader-circle.element.js +52 -59
- package/dist/components/loader-circle/loader-circle.element.js.map +1 -1
- package/dist/components/loader-circle/loader-circle.js +5 -5
- package/dist/components/loader-circle/loader-circle.js.map +1 -1
- package/dist/components/menu-item/UUIMenuItemEvent.js +15 -9
- package/dist/components/menu-item/UUIMenuItemEvent.js.map +1 -1
- package/dist/components/menu-item/menu-item.d.ts +0 -1
- package/dist/components/menu-item/menu-item.element.js +136 -139
- package/dist/components/menu-item/menu-item.element.js.map +1 -1
- package/dist/components/menu-item/menu-item.js +6 -7
- package/dist/components/menu-item/menu-item.js.map +1 -1
- package/dist/components/modal/modal-container.js +86 -141
- package/dist/components/modal/modal-container.js.map +1 -1
- package/dist/components/modal/modal-dialog.element.js +14 -15
- package/dist/components/modal/modal-dialog.element.js.map +1 -1
- package/dist/components/modal/modal-sidebar.element.js +41 -64
- package/dist/components/modal/modal-sidebar.element.js.map +1 -1
- package/dist/components/modal/modal.d.ts +0 -1
- package/dist/components/modal/modal.element.js +89 -106
- package/dist/components/modal/modal.element.js.map +1 -1
- package/dist/components/modal/modal.js +6 -12
- package/dist/components/modal/modal.js.map +1 -1
- package/dist/components/pagination/UUIPaginationEvent.js +15 -13
- package/dist/components/pagination/UUIPaginationEvent.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts +0 -1
- package/dist/components/pagination/pagination.element.js +188 -228
- package/dist/components/pagination/pagination.element.js.map +1 -1
- package/dist/components/pagination/pagination.js +6 -7
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/popover-container/popover-container.d.ts +0 -1
- package/dist/components/popover-container/popover-container.element.d.ts +1 -0
- package/dist/components/popover-container/popover-container.element.js +290 -335
- package/dist/components/popover-container/popover-container.element.js.map +1 -1
- package/dist/components/popover-container/popover-container.js +5 -5
- package/dist/components/popover-container/popover-container.js.map +1 -1
- package/dist/components/progress-bar/progress-bar.d.ts +0 -1
- package/dist/components/progress-bar/progress-bar.element.js +41 -43
- package/dist/components/progress-bar/progress-bar.element.js.map +1 -1
- package/dist/components/progress-bar/progress-bar.js +5 -5
- package/dist/components/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/radio/UUIRadioEvent.js +15 -13
- package/dist/components/radio/UUIRadioEvent.js.map +1 -1
- package/dist/components/radio/UUIRadioGroupEvent.js +15 -13
- package/dist/components/radio/UUIRadioGroupEvent.js.map +1 -1
- package/dist/components/radio/radio-group.element.js +224 -279
- package/dist/components/radio/radio-group.element.js.map +1 -1
- package/dist/components/radio/radio.d.ts +0 -1
- package/dist/components/radio/radio.element.js +100 -123
- package/dist/components/radio/radio.element.js.map +1 -1
- package/dist/components/radio/radio.js +7 -10
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/range-slider/UUIRangeSliderEvent.js +18 -14
- package/dist/components/range-slider/UUIRangeSliderEvent.js.map +1 -1
- package/dist/components/range-slider/range-slider.d.ts +0 -1
- package/dist/components/range-slider/range-slider.element.js +439 -504
- package/dist/components/range-slider/range-slider.element.js.map +1 -1
- package/dist/components/range-slider/range-slider.js +6 -7
- package/dist/components/range-slider/range-slider.js.map +1 -1
- package/dist/components/ref/UUIRefEvent.js +9 -7
- package/dist/components/ref/UUIRefEvent.js.map +1 -1
- package/dist/components/ref/ref.d.ts +0 -1
- package/dist/components/ref/ref.element.js +55 -50
- package/dist/components/ref/ref.element.js.map +1 -1
- package/dist/components/ref/ref.js +6 -7
- package/dist/components/ref/ref.js.map +1 -1
- package/dist/components/ref-list/ref-list.d.ts +0 -1
- package/dist/components/ref-list/ref-list.element.js +17 -14
- package/dist/components/ref-list/ref-list.element.js.map +1 -1
- package/dist/components/ref-list/ref-list.js +5 -5
- package/dist/components/ref-list/ref-list.js.map +1 -1
- package/dist/components/ref-node/ref-node.d.ts +0 -1
- package/dist/components/ref-node/ref-node.element.js +91 -109
- package/dist/components/ref-node/ref-node.element.js.map +1 -1
- package/dist/components/ref-node/ref-node.js +5 -5
- package/dist/components/ref-node/ref-node.js.map +1 -1
- package/dist/components/ref-node-data-type/ref-node-data-type.d.ts +0 -1
- package/dist/components/ref-node-data-type/ref-node-data-type.element.js +30 -35
- package/dist/components/ref-node-data-type/ref-node-data-type.element.js.map +1 -1
- package/dist/components/ref-node-data-type/ref-node-data-type.js +5 -5
- package/dist/components/ref-node-data-type/ref-node-data-type.js.map +1 -1
- package/dist/components/ref-node-document-type/ref-node-document-type.d.ts +0 -1
- package/dist/components/ref-node-document-type/ref-node-document-type.element.js +30 -35
- package/dist/components/ref-node-document-type/ref-node-document-type.element.js.map +1 -1
- package/dist/components/ref-node-document-type/ref-node-document-type.js +5 -5
- package/dist/components/ref-node-document-type/ref-node-document-type.js.map +1 -1
- package/dist/components/ref-node-form/ref-node-form.d.ts +0 -1
- package/dist/components/ref-node-form/ref-node-form.element.js +21 -12
- package/dist/components/ref-node-form/ref-node-form.element.js.map +1 -1
- package/dist/components/ref-node-form/ref-node-form.js +5 -5
- package/dist/components/ref-node-form/ref-node-form.js.map +1 -1
- package/dist/components/ref-node-member/ref-node-member.d.ts +0 -1
- package/dist/components/ref-node-member/ref-node-member.element.js +33 -35
- package/dist/components/ref-node-member/ref-node-member.element.js.map +1 -1
- package/dist/components/ref-node-member/ref-node-member.js +5 -5
- package/dist/components/ref-node-member/ref-node-member.js.map +1 -1
- package/dist/components/ref-node-package/ref-node-package.d.ts +0 -1
- package/dist/components/ref-node-package/ref-node-package.element.js +33 -42
- package/dist/components/ref-node-package/ref-node-package.element.js.map +1 -1
- package/dist/components/ref-node-package/ref-node-package.js +5 -5
- package/dist/components/ref-node-package/ref-node-package.js.map +1 -1
- package/dist/components/ref-node-user/ref-node-user.d.ts +0 -1
- package/dist/components/ref-node-user/ref-node-user.element.js +33 -35
- package/dist/components/ref-node-user/ref-node-user.element.js.map +1 -1
- package/dist/components/ref-node-user/ref-node-user.js +5 -5
- package/dist/components/ref-node-user/ref-node-user.js.map +1 -1
- package/dist/components/responsive-container/responsive-container.d.ts +0 -1
- package/dist/components/responsive-container/responsive-container.element.js +186 -244
- package/dist/components/responsive-container/responsive-container.element.js.map +1 -1
- package/dist/components/responsive-container/responsive-container.js +5 -5
- package/dist/components/responsive-container/responsive-container.js.map +1 -1
- package/dist/components/scroll-container/scroll-container.d.ts +0 -1
- package/dist/components/scroll-container/scroll-container.element.js +35 -36
- package/dist/components/scroll-container/scroll-container.element.js.map +1 -1
- package/dist/components/scroll-container/scroll-container.js +5 -5
- package/dist/components/scroll-container/scroll-container.js.map +1 -1
- package/dist/components/select/UUISelectEvent.js +15 -13
- package/dist/components/select/UUISelectEvent.js.map +1 -1
- package/dist/components/select/select.d.ts +0 -1
- package/dist/components/select/select.element.js +134 -163
- package/dist/components/select/select.element.js.map +1 -1
- package/dist/components/select/select.js +6 -7
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/slider/UUISliderEvent.js +18 -14
- package/dist/components/slider/UUISliderEvent.js.map +1 -1
- package/dist/components/slider/native-input.styles.js +6 -5
- package/dist/components/slider/native-input.styles.js.map +1 -1
- package/dist/components/slider/slider.d.ts +0 -1
- package/dist/components/slider/slider.element.d.ts +7 -0
- package/dist/components/slider/slider.element.js +197 -227
- package/dist/components/slider/slider.element.js.map +1 -1
- package/dist/components/slider/slider.js +6 -7
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/symbol-drag-handle/symbol-drag-handle.d.ts +0 -1
- package/dist/components/symbol-drag-handle/symbol-drag-handle.element.js +19 -16
- package/dist/components/symbol-drag-handle/symbol-drag-handle.element.js.map +1 -1
- package/dist/components/symbol-drag-handle/symbol-drag-handle.js +5 -5
- package/dist/components/symbol-drag-handle/symbol-drag-handle.js.map +1 -1
- package/dist/components/symbol-expand/symbol-expand.d.ts +0 -1
- package/dist/components/symbol-expand/symbol-expand.element.js +27 -30
- package/dist/components/symbol-expand/symbol-expand.element.js.map +1 -1
- package/dist/components/symbol-expand/symbol-expand.js +5 -5
- package/dist/components/symbol-expand/symbol-expand.js.map +1 -1
- package/dist/components/symbol-file/symbol-file.d.ts +0 -1
- package/dist/components/symbol-file/symbol-file.element.js +24 -32
- package/dist/components/symbol-file/symbol-file.element.js.map +1 -1
- package/dist/components/symbol-file/symbol-file.js +5 -5
- package/dist/components/symbol-file/symbol-file.js.map +1 -1
- package/dist/components/symbol-file-dropzone/symbol-file-dropzone.d.ts +0 -1
- package/dist/components/symbol-file-dropzone/symbol-file-dropzone.element.js +26 -30
- package/dist/components/symbol-file-dropzone/symbol-file-dropzone.element.js.map +1 -1
- package/dist/components/symbol-file-dropzone/symbol-file-dropzone.js +5 -5
- package/dist/components/symbol-file-dropzone/symbol-file-dropzone.js.map +1 -1
- package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.d.ts +0 -1
- package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.element.js +39 -95
- package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.element.js.map +1 -1
- package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.js +5 -5
- package/dist/components/symbol-file-thumbnail/symbol-file-thumbnail.js.map +1 -1
- package/dist/components/symbol-folder/symbol-folder.d.ts +0 -1
- package/dist/components/symbol-folder/symbol-folder.element.js +17 -14
- package/dist/components/symbol-folder/symbol-folder.element.js.map +1 -1
- package/dist/components/symbol-folder/symbol-folder.js +5 -5
- package/dist/components/symbol-folder/symbol-folder.js.map +1 -1
- package/dist/components/symbol-lock/symbol-lock.d.ts +0 -1
- package/dist/components/symbol-lock/symbol-lock.element.js +26 -30
- package/dist/components/symbol-lock/symbol-lock.element.js.map +1 -1
- package/dist/components/symbol-lock/symbol-lock.js +5 -5
- package/dist/components/symbol-lock/symbol-lock.js.map +1 -1
- package/dist/components/symbol-more/symbol-more.d.ts +0 -1
- package/dist/components/symbol-more/symbol-more.element.js +17 -14
- package/dist/components/symbol-more/symbol-more.element.js.map +1 -1
- package/dist/components/symbol-more/symbol-more.js +5 -5
- package/dist/components/symbol-more/symbol-more.js.map +1 -1
- package/dist/components/symbol-sort/symbol-sort.d.ts +0 -1
- package/dist/components/symbol-sort/symbol-sort.element.js +29 -31
- package/dist/components/symbol-sort/symbol-sort.element.js.map +1 -1
- package/dist/components/symbol-sort/symbol-sort.js +5 -5
- package/dist/components/symbol-sort/symbol-sort.js.map +1 -1
- package/dist/components/table/table-cell.element.js +65 -71
- package/dist/components/table/table-cell.element.js.map +1 -1
- package/dist/components/table/table-column.element.js +14 -10
- package/dist/components/table/table-column.element.js.map +1 -1
- package/dist/components/table/table-head-cell.element.js +19 -16
- package/dist/components/table/table-head-cell.element.js.map +1 -1
- package/dist/components/table/table-head.element.js +23 -18
- package/dist/components/table/table-head.element.js.map +1 -1
- package/dist/components/table/table-row.element.js +41 -52
- package/dist/components/table/table-row.element.js.map +1 -1
- package/dist/components/table/table.d.ts +0 -1
- package/dist/components/table/table.element.js +31 -20
- package/dist/components/table/table.element.js.map +1 -1
- package/dist/components/table/table.js +5 -10
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/UUITabEvent.js +6 -6
- package/dist/components/tabs/UUITabEvent.js.map +1 -1
- package/dist/components/tabs/UUITabGroupEvent.js +6 -6
- package/dist/components/tabs/UUITabGroupEvent.js.map +1 -1
- package/dist/components/tabs/tab-group.element.js +188 -251
- package/dist/components/tabs/tab-group.element.js.map +1 -1
- package/dist/components/tabs/tab.element.js +66 -56
- package/dist/components/tabs/tab.element.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +0 -1
- package/dist/components/tabs/tabs.js +7 -6
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tag/tag.d.ts +0 -1
- package/dist/components/tag/tag.element.js +32 -34
- package/dist/components/tag/tag.element.js.map +1 -1
- package/dist/components/tag/tag.js +5 -5
- package/dist/components/tag/tag.js.map +1 -1
- package/dist/components/textarea/UUITextareaEvent.js +18 -14
- package/dist/components/textarea/UUITextareaEvent.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts +0 -1
- package/dist/components/textarea/textarea.element.d.ts +2 -0
- package/dist/components/textarea/textarea.element.js +153 -180
- package/dist/components/textarea/textarea.element.js.map +1 -1
- package/dist/components/textarea/textarea.js +6 -7
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/toast-notification/UUIToastNotificationEvent.js +18 -10
- package/dist/components/toast-notification/UUIToastNotificationEvent.js.map +1 -1
- package/dist/components/toast-notification/toast-notification.d.ts +0 -1
- package/dist/components/toast-notification/toast-notification.element.js +155 -224
- package/dist/components/toast-notification/toast-notification.element.js.map +1 -1
- package/dist/components/toast-notification/toast-notification.js +6 -7
- package/dist/components/toast-notification/toast-notification.js.map +1 -1
- package/dist/components/toast-notification-container/toast-notification-container.d.ts +0 -1
- package/dist/components/toast-notification-container/toast-notification-container.element.js +98 -122
- package/dist/components/toast-notification-container/toast-notification-container.element.js.map +1 -1
- package/dist/components/toast-notification-container/toast-notification-container.js +6 -9
- package/dist/components/toast-notification-container/toast-notification-container.js.map +1 -1
- package/dist/components/toast-notification-layout/toast-notification-layout.d.ts +0 -1
- package/dist/components/toast-notification-layout/toast-notification-layout.element.js +33 -39
- package/dist/components/toast-notification-layout/toast-notification-layout.element.js.map +1 -1
- package/dist/components/toast-notification-layout/toast-notification-layout.js +6 -9
- package/dist/components/toast-notification-layout/toast-notification-layout.js.map +1 -1
- package/dist/components/toggle/toggle.d.ts +0 -1
- package/dist/components/toggle/toggle.element.js +43 -54
- package/dist/components/toggle/toggle.element.js.map +1 -1
- package/dist/components/toggle/toggle.js +5 -5
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/visually-hidden/visually-hidden.d.ts +0 -1
- package/dist/components/visually-hidden/visually-hidden.element.js +17 -14
- package/dist/components/visually-hidden/visually-hidden.element.js.map +1 -1
- package/dist/components/visually-hidden/visually-hidden.js +5 -5
- package/dist/components/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/index.js +115 -359
- package/dist/internal/animations/uui-blink.js +7 -7
- package/dist/internal/animations/uui-blink.js.map +1 -1
- package/dist/internal/animations/uui-pulse.js +7 -9
- package/dist/internal/animations/uui-pulse.js.map +1 -1
- package/dist/internal/animations/uui-shake.js +7 -9
- package/dist/internal/animations/uui-shake.js.map +1 -1
- package/dist/internal/events/UUIEvent.js +13 -9
- package/dist/internal/events/UUIEvent.js.map +1 -1
- package/dist/internal/events/UUIFormControlEvent.d.ts +2 -2
- package/dist/internal/events/UUIFormControlEvent.js +18 -14
- package/dist/internal/events/UUIFormControlEvent.js.map +1 -1
- package/dist/internal/events/UUISelectableEvent.js +19 -15
- package/dist/internal/events/UUISelectableEvent.js.map +1 -1
- package/dist/internal/mixins/ActiveMixin.js +24 -24
- package/dist/internal/mixins/ActiveMixin.js.map +1 -1
- package/dist/internal/mixins/FormControlMixin.d.ts +3 -3
- package/dist/internal/mixins/FormControlMixin.js +276 -339
- package/dist/internal/mixins/FormControlMixin.js.map +1 -1
- package/dist/internal/mixins/FormControlWithBasicsMixin.d.ts +19 -3
- package/dist/internal/mixins/FormControlWithBasicsMixin.js +54 -60
- package/dist/internal/mixins/FormControlWithBasicsMixin.js.map +1 -1
- package/dist/internal/mixins/LabelMixin.js +54 -57
- package/dist/internal/mixins/LabelMixin.js.map +1 -1
- package/dist/internal/mixins/PopoverTargetMixin.js +43 -47
- package/dist/internal/mixins/PopoverTargetMixin.js.map +1 -1
- package/dist/internal/mixins/SelectOnlyMixin.js +39 -33
- package/dist/internal/mixins/SelectOnlyMixin.js.map +1 -1
- package/dist/internal/mixins/SelectableMixin.js +109 -121
- package/dist/internal/mixins/SelectableMixin.js.map +1 -1
- package/dist/internal/registration/index.js +17 -20
- package/dist/internal/registration/index.js.map +1 -1
- package/dist/internal/types/InterfaceColor.js +11 -10
- package/dist/internal/types/InterfaceColor.js.map +1 -1
- package/dist/internal/types/InterfaceHeading.js +12 -11
- package/dist/internal/types/InterfaceHeading.js.map +1 -1
- package/dist/internal/types/InterfaceLook.js +11 -10
- package/dist/internal/types/InterfaceLook.js.map +1 -1
- package/dist/internal/utils/Timer.js +56 -61
- package/dist/internal/utils/Timer.js.map +1 -1
- package/dist/internal/utils/color.js +105 -74
- package/dist/internal/utils/color.js.map +1 -1
- package/dist/internal/utils/drag.js +27 -36
- package/dist/internal/utils/drag.js.map +1 -1
- package/dist/internal/utils/findAncestorByAttributeValue.js +22 -19
- package/dist/internal/utils/findAncestorByAttributeValue.js.map +1 -1
- package/dist/internal/utils/math.js +23 -13
- package/dist/internal/utils/math.js.map +1 -1
- package/dist/internal/utils/slotHasContent.js +6 -5
- package/dist/internal/utils/slotHasContent.js.map +1 -1
- package/dist/internal/version.js +10 -16
- package/dist/internal/version.js.map +1 -1
- package/dist/package.json.js +6 -5
- package/dist/package.json.js.map +1 -1
- package/dist/styles/uui-font.css +1 -1
- package/dist/styles/uui-text.css +1 -1
- package/dist/styles/uui-text.css.js +6 -5
- package/dist/styles/uui-text.css.js.map +1 -1
- package/dist/styles/uui-text.styles.js +7 -6
- package/dist/styles/uui-text.styles.js.map +1 -1
- package/dist/themes/dark.css +1 -1
- package/dist/themes/high-contrast.css +1 -1
- package/dist/themes/light.css +1 -1
- package/package.json +26 -25
- package/vscode.html-custom-data.json +36 -7
- package/dist/index.js.map +0 -1
|
@@ -1,373 +1,363 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
8
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
9
|
-
var _UUIRangeSliderElement_instances, transferValueToInternalValues_fn, _onKeyDown;
|
|
10
|
-
import { LitElement, html, svg, css } from "lit";
|
|
11
|
-
import { property, state, query } from "lit/decorators.js";
|
|
12
|
-
import { UUIRangeSliderEvent } from "./UUIRangeSliderEvent.js";
|
|
13
|
-
import { UUIFormControlWithBasicsMixin } from "../../internal/mixins/FormControlWithBasicsMixin.js";
|
|
1
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
|
|
2
|
+
import { UUIFormControlMixin as UUIFormControlWithBasicsMixin } from "../../internal/mixins/FormControlWithBasicsMixin.js";
|
|
14
3
|
import { clamp } from "../../internal/utils/math.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
const Z_INDEX = {
|
|
26
|
-
TOP: 3,
|
|
27
|
-
CENTER: 2
|
|
4
|
+
import { UUIRangeSliderEvent } from "./UUIRangeSliderEvent.js";
|
|
5
|
+
import { LitElement, css, html, svg } from "lit";
|
|
6
|
+
import { property, query, state } from "lit/decorators.js";
|
|
7
|
+
//#region src/components/range-slider/range-slider.element.ts
|
|
8
|
+
var Z_INDEX = {
|
|
9
|
+
TOP: 3,
|
|
10
|
+
CENTER: 2,
|
|
11
|
+
BACK: 1
|
|
28
12
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
var THUMB_SIZE = 18;
|
|
14
|
+
var TRACK_HEIGHT = 3;
|
|
15
|
+
var TRACK_PADDING = 12;
|
|
16
|
+
var STEP_MIN_WIDTH = 24;
|
|
17
|
+
var CountDecimalPlaces = (num) => {
|
|
18
|
+
const decimalIndex = num.toString().indexOf(".");
|
|
19
|
+
return decimalIndex >= 0 ? num.toString().length - decimalIndex - 1 : 0;
|
|
36
20
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @element uui-range-slider
|
|
23
|
+
* @description - Range slider with two handles. Use uui-slider for a single handle.
|
|
24
|
+
* @fires UUIRangeSliderEvent#input on input
|
|
25
|
+
* @fires UUIRangeSliderEvent#change on change
|
|
26
|
+
* @extends UUIFormControlMixin
|
|
27
|
+
*/
|
|
28
|
+
var UUIRangeSliderElement = class extends UUIFormControlWithBasicsMixin(LitElement, "") {
|
|
29
|
+
static {
|
|
30
|
+
this.formAssociated = true;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sets the minimum allowed value.
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @attr min
|
|
36
|
+
* @default 0
|
|
37
|
+
*/
|
|
38
|
+
get min() {
|
|
39
|
+
return this._min;
|
|
40
|
+
}
|
|
41
|
+
set min(newVal) {
|
|
42
|
+
this._min = newVal;
|
|
43
|
+
this.#transferValueToInternalValues();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Sets the maximum allowed value.
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @attr max
|
|
49
|
+
* @default 100
|
|
50
|
+
*/
|
|
51
|
+
get max() {
|
|
52
|
+
return this._max;
|
|
53
|
+
}
|
|
54
|
+
set max(newVal) {
|
|
55
|
+
this._max = newVal;
|
|
56
|
+
this.#transferValueToInternalValues();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* This reflects the behavior of a native input step attribute.
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @attr
|
|
62
|
+
* @default 1
|
|
63
|
+
*/
|
|
64
|
+
get step() {
|
|
65
|
+
return this._step;
|
|
66
|
+
}
|
|
67
|
+
set step(newVal) {
|
|
68
|
+
this._step = newVal;
|
|
69
|
+
this.#transferValueToInternalValues();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Minimum value gap between the the two picked values. Cannot be lower than the step value and cannot be higher than the maximum gap
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @attr min-gap
|
|
75
|
+
* @default undefined
|
|
76
|
+
*/
|
|
77
|
+
get minGap() {
|
|
78
|
+
return this._minGap;
|
|
79
|
+
}
|
|
80
|
+
set minGap(newVal) {
|
|
81
|
+
this._minGap = newVal;
|
|
82
|
+
this.#transferValueToInternalValues();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Maximum value gap between the the two picked values. Cannot be lower than the minimum gap.
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @attr max-gap
|
|
88
|
+
* @default undefined
|
|
89
|
+
*/
|
|
90
|
+
get maxGap() {
|
|
91
|
+
return this._maxGap;
|
|
92
|
+
}
|
|
93
|
+
set maxGap(newVal) {
|
|
94
|
+
this._maxGap = newVal;
|
|
95
|
+
this.#transferValueToInternalValues();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* This is a value property of the uui-range-slider. Split the two values with comma, for example 10,50 sets the values to 10 and 50.
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @attr
|
|
101
|
+
* @default 0,0
|
|
102
|
+
*/
|
|
103
|
+
get value() {
|
|
104
|
+
return super.value;
|
|
105
|
+
}
|
|
106
|
+
set value(newVal) {
|
|
107
|
+
super.value = newVal;
|
|
108
|
+
this.#transferValueToInternalValues();
|
|
109
|
+
}
|
|
110
|
+
setValueLow(low) {
|
|
111
|
+
const clampMin = this.maxGap ? Math.max(this._highInputValue - this.maxGap, this.min) : this.min;
|
|
112
|
+
const clampMax = this.minGap ? this._highInputValue - this.minGap : this._highInputValue - this.step;
|
|
113
|
+
low = clamp(low, clampMin, clampMax);
|
|
114
|
+
this.setValue(low, this._highInputValue);
|
|
115
|
+
}
|
|
116
|
+
setValueHigh(high) {
|
|
117
|
+
const clampMin = this.minGap ? this._lowInputValue + this.minGap : this._lowInputValue + this.step;
|
|
118
|
+
const clampMax = this.maxGap ? Math.min(this.maxGap + this._lowInputValue, this.max) : this.max;
|
|
119
|
+
high = clamp(high, clampMin, clampMax);
|
|
120
|
+
this.setValue(this._lowInputValue, high);
|
|
121
|
+
}
|
|
122
|
+
setValue(low, high, lockValueRange) {
|
|
123
|
+
if (lockValueRange) {
|
|
124
|
+
const length = this.startPoint.high - this.startPoint.low;
|
|
125
|
+
low = clamp(low, this.min, this.max - length);
|
|
126
|
+
high = clamp(high, this.min + length, this.max);
|
|
127
|
+
}
|
|
128
|
+
this._inputLow.value = low.toString();
|
|
129
|
+
this._inputHigh.value = high.toString();
|
|
130
|
+
this.value = `${low},${high}`;
|
|
131
|
+
}
|
|
132
|
+
#transferValueToInternalValues() {
|
|
133
|
+
const valueSplit = this.value.split(",");
|
|
134
|
+
let low = Number(valueSplit[0]) || 0;
|
|
135
|
+
let high = Number(valueSplit[1]) || 0;
|
|
136
|
+
high = clamp(high, this._min, this._max);
|
|
137
|
+
low = this._min + Math.round((low - this._min) / this._step) * this._step;
|
|
138
|
+
high = this._min + Math.round((high - this._min) / this._step) * this._step;
|
|
139
|
+
this._lowInputValue = clamp(low, this._min, this._minGap ? high - this._minGap : high - this._step);
|
|
140
|
+
this._highInputValue = clamp(high, this._minGap ? this._lowInputValue + this._minGap : this._lowInputValue + this._step, Math.min(this._maxGap ? low + this._maxGap : this._max, this._max));
|
|
141
|
+
this._updateInnerColor();
|
|
142
|
+
this.requestUpdate();
|
|
143
|
+
}
|
|
144
|
+
getFormElement() {
|
|
145
|
+
return this._currentFocus ?? this._inputLow;
|
|
146
|
+
}
|
|
147
|
+
async focus() {
|
|
148
|
+
await this.updateComplete;
|
|
149
|
+
this.getFormElement().focus();
|
|
150
|
+
}
|
|
151
|
+
async blur() {
|
|
152
|
+
await this.updateComplete;
|
|
153
|
+
this.getFormElement().blur();
|
|
154
|
+
}
|
|
155
|
+
/** Constructor and Validator */
|
|
156
|
+
constructor() {
|
|
157
|
+
super();
|
|
158
|
+
this.disabled = false;
|
|
159
|
+
this.readonly = false;
|
|
160
|
+
this._min = 0;
|
|
161
|
+
this._max = 0;
|
|
162
|
+
this.hideStepValues = false;
|
|
163
|
+
this._step = 1;
|
|
164
|
+
this._movement = false;
|
|
165
|
+
this.startPoint = {
|
|
166
|
+
mouse: 0,
|
|
167
|
+
low: 0,
|
|
168
|
+
high: 0
|
|
169
|
+
};
|
|
170
|
+
this._lowInputValue = 0;
|
|
171
|
+
this._highInputValue = 0;
|
|
172
|
+
this._trackWidth = 0;
|
|
173
|
+
this._lowValuePercentStart = 0;
|
|
174
|
+
this._highValuePercentEnd = 100;
|
|
175
|
+
this.#onKeyDown = (e) => {
|
|
176
|
+
if (e.key == "Enter") this.submit();
|
|
177
|
+
};
|
|
178
|
+
this._onTouchStart = (e) => {
|
|
179
|
+
if (this.disabled) return;
|
|
180
|
+
const target = e.composedPath()[0];
|
|
181
|
+
if (target === this._outerTrack) return;
|
|
182
|
+
if (target === this._innerColor || target === this._innerColorThumb) {
|
|
183
|
+
window.addEventListener("touchend", this._onTouchEnd);
|
|
184
|
+
window.addEventListener("touchcancel", this._onTouchEnd);
|
|
185
|
+
window.addEventListener("touchmove", this._onTouchMove);
|
|
186
|
+
this._movement = true;
|
|
187
|
+
this._saveStartPoints(e.touches[0].pageX);
|
|
188
|
+
} else {
|
|
189
|
+
const value = this._getClickedValue(e.touches[0].pageX);
|
|
190
|
+
if (Math.abs(this._lowInputValue - value) < Math.abs(this._highInputValue - value)) this.setValueLow(value);
|
|
191
|
+
else this.setValueHigh(value);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
this._onTouchMove = (e) => {
|
|
195
|
+
this._dragBothValuesByMousePos(e.touches[0].pageX);
|
|
196
|
+
};
|
|
197
|
+
this._onTouchEnd = () => {
|
|
198
|
+
this._movement = false;
|
|
199
|
+
this.onChanged();
|
|
200
|
+
window.removeEventListener("touchend", this._onTouchEnd);
|
|
201
|
+
window.removeEventListener("touchcancel", this._onTouchEnd);
|
|
202
|
+
window.removeEventListener("touchmove", this._onTouchMove);
|
|
203
|
+
};
|
|
204
|
+
this._onMouseDown = (e) => {
|
|
205
|
+
if (this.disabled) return;
|
|
206
|
+
if (this.readonly) return;
|
|
207
|
+
const target = e.composedPath()[0];
|
|
208
|
+
if (target === this._outerTrack) return;
|
|
209
|
+
if (target === this._innerColor || target === this._innerColorThumb) {
|
|
210
|
+
window.addEventListener("mouseup", this._onMouseUp);
|
|
211
|
+
window.addEventListener("mousemove", this._onMouseMove);
|
|
212
|
+
this._movement = true;
|
|
213
|
+
this._saveStartPoints(e.pageX);
|
|
214
|
+
} else {
|
|
215
|
+
const value = this._getClickedValue(e.pageX);
|
|
216
|
+
if (Math.abs(this._lowInputValue - value) < Math.abs(this._highInputValue - value)) this.setValueLow(value);
|
|
217
|
+
else this.setValueHigh(value);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
this._onMouseMove = (e) => {
|
|
221
|
+
e.preventDefault();
|
|
222
|
+
this._dragBothValuesByMousePos(e.pageX);
|
|
223
|
+
};
|
|
224
|
+
this._onMouseUp = () => {
|
|
225
|
+
this._movement = false;
|
|
226
|
+
this.onChanged();
|
|
227
|
+
window.removeEventListener("mouseup", this._onMouseUp);
|
|
228
|
+
window.removeEventListener("mousemove", this._onMouseMove);
|
|
229
|
+
};
|
|
230
|
+
this.addEventListener("keydown", this.#onKeyDown);
|
|
231
|
+
this.addEventListener("mousedown", this._onMouseDown);
|
|
232
|
+
this.addEventListener("touchstart", this._onTouchStart);
|
|
233
|
+
window.addEventListener("resize", () => {
|
|
234
|
+
this._trackWidth = this._outerTrack?.offsetWidth;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
connectedCallback() {
|
|
238
|
+
super.connectedCallback();
|
|
239
|
+
if (!this.value) this.value = `${this._min},${this._max}`;
|
|
240
|
+
}
|
|
241
|
+
firstUpdated(changedProperties) {
|
|
242
|
+
super.updated(changedProperties);
|
|
243
|
+
this._trackWidth = this._outerTrack.offsetWidth;
|
|
244
|
+
this._runPropertiesChecks();
|
|
245
|
+
}
|
|
246
|
+
_runPropertiesChecks() {
|
|
247
|
+
if (!(/* @__PURE__ */ new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/)).test(this.value)) console.error(`Range slider (Value error occurred): Bad input`);
|
|
248
|
+
if (this._highInputValue === this._lowInputValue) console.error(`Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead.`);
|
|
249
|
+
if (this._lowInputValue > this._highInputValue) console.error(`Range slider (Value error occurred): Low-end value should never be higher than high-end value.`);
|
|
250
|
+
if (this._highInputValue > this._max || this._highInputValue < this._min) {
|
|
251
|
+
this.setValueHigh(this._max);
|
|
252
|
+
console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`);
|
|
253
|
+
}
|
|
254
|
+
if (this._lowInputValue < this._min || this._lowInputValue > this._max) {
|
|
255
|
+
this.setValueLow(this._min);
|
|
256
|
+
console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`);
|
|
257
|
+
}
|
|
258
|
+
if (this._step <= 0) {
|
|
259
|
+
this._step = 1;
|
|
260
|
+
console.warn(`Property step needs a value higher than 0. Converted the step value to 1 (default)`);
|
|
261
|
+
}
|
|
262
|
+
if ((this._max - this._min) / this._step % 1 !== 0) console.error(`Conflict with step value and the min and max values. May experience bad side effects`);
|
|
263
|
+
this._runGapChecks();
|
|
264
|
+
}
|
|
265
|
+
_runGapChecks() {
|
|
266
|
+
if (this._minGap && this._minGap < this._step) {
|
|
267
|
+
this._minGap = void 0;
|
|
268
|
+
console.warn(`Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.`);
|
|
269
|
+
}
|
|
270
|
+
if (this._minGap && this._maxGap && this._minGap > this._maxGap) {
|
|
271
|
+
this._minGap = void 0;
|
|
272
|
+
this._maxGap = void 0;
|
|
273
|
+
console.warn(`Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.`);
|
|
274
|
+
}
|
|
275
|
+
if (this._minGap && this._max - this._min < this._minGap) {
|
|
276
|
+
this._minGap = void 0;
|
|
277
|
+
console.warn(`Conflict with the min-gap and the total range. Removed the min-gap.`);
|
|
278
|
+
}
|
|
279
|
+
if (this._maxGap && this._highInputValue - this._lowInputValue > this._maxGap) {
|
|
280
|
+
this.setValueHigh(this._lowInputValue + this._maxGap);
|
|
281
|
+
console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`);
|
|
282
|
+
}
|
|
283
|
+
if (this._minGap && this._highInputValue - this._lowInputValue < this._minGap) {
|
|
284
|
+
const minGap = this._minGap;
|
|
285
|
+
if (this._highInputValue - minGap < this._min) {
|
|
286
|
+
this.setValueHigh(this._lowInputValue + minGap);
|
|
287
|
+
console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`);
|
|
288
|
+
} else {
|
|
289
|
+
this.setValueLow(this._highInputValue - minGap);
|
|
290
|
+
console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
_updateInnerColor() {
|
|
295
|
+
const scopeLength = this._max - this._min;
|
|
296
|
+
const scopedLow = this._lowInputValue - this._min;
|
|
297
|
+
const scopedHigh = this._highInputValue - this._min;
|
|
298
|
+
const leftPercent = scopedLow / scopeLength * 100;
|
|
299
|
+
const rightPercent = 100 - scopedHigh / scopeLength * 100;
|
|
300
|
+
this._lowValuePercentStart = clamp(leftPercent, 0, 100);
|
|
301
|
+
this._highValuePercentEnd = clamp(rightPercent, 0, 100);
|
|
302
|
+
}
|
|
303
|
+
_getClickedValue(pageX) {
|
|
304
|
+
const clickedValue = (pageX - this._outerTrack.getBoundingClientRect().left - TRACK_PADDING) / (this._trackWidth - TRACK_PADDING * 2) * (this._max - this._min) + this._min;
|
|
305
|
+
return Math.round(clickedValue / this._step) * this._step;
|
|
306
|
+
}
|
|
307
|
+
/** Events */
|
|
308
|
+
#onKeyDown;
|
|
309
|
+
/** Drag both thumbs logics */
|
|
310
|
+
_saveStartPoints(pageX) {
|
|
311
|
+
this.startPoint = {
|
|
312
|
+
mouse: pageX,
|
|
313
|
+
low: this._lowInputValue,
|
|
314
|
+
high: this._highInputValue
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
_dragBothValuesByMousePos(pageX) {
|
|
318
|
+
const trackWidth = this._outerTrack.offsetWidth;
|
|
319
|
+
const drag = pageX - this.startPoint.mouse;
|
|
320
|
+
const trackDiff = this._max - this._min;
|
|
321
|
+
const dragPercent = drag / (trackWidth + TRACK_PADDING * 2);
|
|
322
|
+
const dragValue = Math.round(dragPercent * trackDiff / this._step) * this._step;
|
|
323
|
+
const newValueLow = this.startPoint.low + dragValue;
|
|
324
|
+
const newValueHigh = this.startPoint.high + dragValue;
|
|
325
|
+
this.setValue(newValueLow, newValueHigh, true);
|
|
326
|
+
this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
|
|
327
|
+
}
|
|
328
|
+
/** Input Events */
|
|
329
|
+
_onLowInput(e) {
|
|
330
|
+
if (this.disabled) e.preventDefault();
|
|
331
|
+
if (this.readonly) e.preventDefault();
|
|
332
|
+
this._currentFocus = this._inputLow;
|
|
333
|
+
const newValue = Number(e.target.value);
|
|
334
|
+
this.setValueLow(newValue);
|
|
335
|
+
this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
|
|
336
|
+
}
|
|
337
|
+
_onHighInput(e) {
|
|
338
|
+
if (this.disabled) e.preventDefault();
|
|
339
|
+
if (this.readonly) e.preventDefault();
|
|
340
|
+
this._currentFocus = this._inputHigh;
|
|
341
|
+
const newValue = Number(e.target.value);
|
|
342
|
+
this.setValueHigh(newValue);
|
|
343
|
+
this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.INPUT));
|
|
344
|
+
}
|
|
345
|
+
/** Change Events */
|
|
346
|
+
_onLowChange() {
|
|
347
|
+
this.setValueLow(Number(this._inputLow.value));
|
|
348
|
+
this.onChanged();
|
|
349
|
+
}
|
|
350
|
+
_onHighChange() {
|
|
351
|
+
this.setValueHigh(Number(this._inputHigh.value));
|
|
352
|
+
this.onChanged();
|
|
353
|
+
}
|
|
354
|
+
onChanged() {
|
|
355
|
+
this.pristine = false;
|
|
356
|
+
this.dispatchEvent(new UUIRangeSliderEvent(UUIRangeSliderEvent.CHANGE));
|
|
357
|
+
}
|
|
358
|
+
/** Render */
|
|
359
|
+
render() {
|
|
360
|
+
return html`
|
|
371
361
|
<div id="range-slider">
|
|
372
362
|
${this._renderNativeInputs()}
|
|
373
363
|
<div id="inner-track">
|
|
@@ -382,9 +372,9 @@ const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormContr
|
|
|
382
372
|
</div>
|
|
383
373
|
</div>
|
|
384
374
|
`;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
375
|
+
}
|
|
376
|
+
_renderThumbValues() {
|
|
377
|
+
return html`<div class="thumb-values">
|
|
388
378
|
<span
|
|
389
379
|
><span
|
|
390
380
|
>${this._lowInputValue.toFixed(CountDecimalPlaces(this._step))}</span
|
|
@@ -396,47 +386,41 @@ const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormContr
|
|
|
396
386
|
></span
|
|
397
387
|
>
|
|
398
388
|
</div>`;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
389
|
+
}
|
|
390
|
+
_renderSteps() {
|
|
391
|
+
const stepAmount = (this._max - this._min) / this._step;
|
|
392
|
+
const stepWidth = (this._trackWidth - TRACK_PADDING * 2) / stepAmount;
|
|
393
|
+
if (stepWidth < STEP_MIN_WIDTH) return;
|
|
394
|
+
if (stepAmount % 1 !== 0) return;
|
|
395
|
+
let index = 0;
|
|
396
|
+
const stepPositions = new Array(stepAmount + 1).fill(stepWidth).map((stepWidth) => stepWidth * index++);
|
|
397
|
+
return html`<div class="step-wrapper">
|
|
408
398
|
<svg height="100%" width="100%">
|
|
409
399
|
<rect x="9" y="9" height="${TRACK_HEIGHT}" rx="2" />
|
|
410
400
|
${this._renderStepCircles(stepPositions)}
|
|
411
401
|
</svg>
|
|
412
402
|
${this._renderStepValues(stepAmount)}
|
|
413
403
|
</div>`;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
(step) => (this._min + step * index++).toFixed(CountDecimalPlaces(this._step))
|
|
420
|
-
);
|
|
421
|
-
return html`<div class="step-values">
|
|
422
|
-
${stepValues.map((value) => html`<span><span>${value}</span></span>`)}
|
|
404
|
+
}
|
|
405
|
+
_renderStepValues(stepAmount) {
|
|
406
|
+
if (this.hideStepValues || stepAmount > 20) return;
|
|
407
|
+
let index = 0;
|
|
408
|
+
return html`<div class="step-values">
|
|
409
|
+
${new Array(stepAmount + 1).fill(this._step).map((step) => (this._min + step * index++).toFixed(CountDecimalPlaces(this._step))).map((value) => html`<span><span>${value}</span></span>`)}
|
|
423
410
|
</div>`;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
438
|
-
_renderNativeInputs() {
|
|
439
|
-
return html` <div class="native-wrapper">
|
|
411
|
+
}
|
|
412
|
+
_renderStepCircles(stepPositionArray) {
|
|
413
|
+
const trackValue = this._trackWidth / (this._max - this._min);
|
|
414
|
+
return svg`${stepPositionArray.map((position) => {
|
|
415
|
+
const cx = position + TRACK_PADDING;
|
|
416
|
+
const colorStart = this._lowInputValue - this._min;
|
|
417
|
+
const colorEnd = this._highInputValue - this._min;
|
|
418
|
+
if (cx / trackValue >= colorStart && cx / trackValue <= colorEnd) return svg`<circle class="track-step filled" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
|
|
419
|
+
else return svg`<circle class="track-step regular" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
|
|
420
|
+
})}`;
|
|
421
|
+
}
|
|
422
|
+
_renderNativeInputs() {
|
|
423
|
+
return html` <div class="native-wrapper">
|
|
440
424
|
<input
|
|
441
425
|
id="inputLow"
|
|
442
426
|
class="${this._movement ? "focus" : ""}"
|
|
@@ -462,33 +446,9 @@ const _UUIRangeSliderElement = class _UUIRangeSliderElement extends UUIFormContr
|
|
|
462
446
|
@input=${this._onHighInput}
|
|
463
447
|
@change=${this._onHighChange} />
|
|
464
448
|
</div>`;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
transferValueToInternalValues_fn = function() {
|
|
469
|
-
const valueSplit = this.value.split(",");
|
|
470
|
-
let low = Number(valueSplit[0]) || 0;
|
|
471
|
-
let high = Number(valueSplit[1]) || 0;
|
|
472
|
-
high = clamp(high, this._min, this._max);
|
|
473
|
-
low = this._min + Math.round((low - this._min) / this._step) * this._step;
|
|
474
|
-
high = this._min + Math.round((high - this._min) / this._step) * this._step;
|
|
475
|
-
this._lowInputValue = clamp(
|
|
476
|
-
low,
|
|
477
|
-
this._min,
|
|
478
|
-
this._minGap ? high - this._minGap : high - this._step
|
|
479
|
-
);
|
|
480
|
-
this._highInputValue = clamp(
|
|
481
|
-
high,
|
|
482
|
-
this._minGap ? this._lowInputValue + this._minGap : this._lowInputValue + this._step,
|
|
483
|
-
Math.min(this._maxGap ? low + this._maxGap : this._max, this._max)
|
|
484
|
-
);
|
|
485
|
-
this._updateInnerColor();
|
|
486
|
-
this.requestUpdate();
|
|
487
|
-
};
|
|
488
|
-
_onKeyDown = new WeakMap();
|
|
489
|
-
_UUIRangeSliderElement.formAssociated = true;
|
|
490
|
-
_UUIRangeSliderElement.styles = [
|
|
491
|
-
css`
|
|
449
|
+
}
|
|
450
|
+
static {
|
|
451
|
+
this.styles = [css`
|
|
492
452
|
:host {
|
|
493
453
|
--color-interactive: var(--uui-color-selected);
|
|
494
454
|
--color-hover: var(--uui-color-selected-emphasis);
|
|
@@ -558,7 +518,7 @@ _UUIRangeSliderElement.styles = [
|
|
|
558
518
|
}
|
|
559
519
|
|
|
560
520
|
:host(:not([readonly])) #inner-color-thumb:hover .color {
|
|
561
|
-
height: ${
|
|
521
|
+
height: ${5}px;
|
|
562
522
|
background-color: var(--color-hover);
|
|
563
523
|
transform: translateY(-1px);
|
|
564
524
|
}
|
|
@@ -596,7 +556,7 @@ _UUIRangeSliderElement.styles = [
|
|
|
596
556
|
position: absolute;
|
|
597
557
|
left: 0;
|
|
598
558
|
right: 0;
|
|
599
|
-
top: -
|
|
559
|
+
top: -9px;
|
|
600
560
|
}
|
|
601
561
|
|
|
602
562
|
/** Step circles */
|
|
@@ -757,7 +717,8 @@ _UUIRangeSliderElement.styles = [
|
|
|
757
717
|
input:focus-within::-webkit-slider-thumb,
|
|
758
718
|
input.focus::-webkit-slider-thumb {
|
|
759
719
|
border-color: var(--color-focus);
|
|
760
|
-
outline: 2px
|
|
720
|
+
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
721
|
+
var(--uui-color-focus);
|
|
761
722
|
outline-offset: 1px;
|
|
762
723
|
}
|
|
763
724
|
:host(:not([disabled]):not([readonly]))
|
|
@@ -796,7 +757,8 @@ _UUIRangeSliderElement.styles = [
|
|
|
796
757
|
input:focus-within::-moz-range-thumb,
|
|
797
758
|
input.focus::-moz-range-thumb {
|
|
798
759
|
border-color: var(--color-focus);
|
|
799
|
-
outline: 2px
|
|
760
|
+
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
761
|
+
var(--uui-color-focus);
|
|
800
762
|
outline-offset: 1px;
|
|
801
763
|
}
|
|
802
764
|
:host(:not([disabled]):not([readonly])) input::-moz-range-thumb:hover {
|
|
@@ -807,73 +769,46 @@ _UUIRangeSliderElement.styles = [
|
|
|
807
769
|
:host([disabled]) #range-slider input::-moz-range-thumb {
|
|
808
770
|
border-color: var(--uui-palette-mine-grey);
|
|
809
771
|
}
|
|
810
|
-
`
|
|
811
|
-
|
|
812
|
-
let UUIRangeSliderElement = _UUIRangeSliderElement;
|
|
813
|
-
__decorateClass([
|
|
814
|
-
property({ type: String })
|
|
815
|
-
], UUIRangeSliderElement.prototype, "label", 2);
|
|
816
|
-
__decorateClass([
|
|
817
|
-
property({ type: Boolean, reflect: true })
|
|
818
|
-
], UUIRangeSliderElement.prototype, "disabled", 2);
|
|
819
|
-
__decorateClass([
|
|
820
|
-
property({ type: Boolean, reflect: true })
|
|
821
|
-
], UUIRangeSliderElement.prototype, "readonly", 2);
|
|
822
|
-
__decorateClass([
|
|
823
|
-
property({ type: Number })
|
|
824
|
-
], UUIRangeSliderElement.prototype, "min", 1);
|
|
825
|
-
__decorateClass([
|
|
826
|
-
property({ type: Number })
|
|
827
|
-
], UUIRangeSliderElement.prototype, "max", 1);
|
|
828
|
-
__decorateClass([
|
|
829
|
-
property({ type: Boolean, attribute: "hide-step-values" })
|
|
830
|
-
], UUIRangeSliderElement.prototype, "hideStepValues", 2);
|
|
831
|
-
__decorateClass([
|
|
832
|
-
property({ type: Number })
|
|
833
|
-
], UUIRangeSliderElement.prototype, "step", 1);
|
|
834
|
-
__decorateClass([
|
|
835
|
-
property({ type: Number, attribute: "min-gap" })
|
|
836
|
-
], UUIRangeSliderElement.prototype, "minGap", 1);
|
|
837
|
-
__decorateClass([
|
|
838
|
-
property({ type: Number, attribute: "max-gap" })
|
|
839
|
-
], UUIRangeSliderElement.prototype, "maxGap", 1);
|
|
840
|
-
__decorateClass([
|
|
841
|
-
property({ type: String })
|
|
842
|
-
], UUIRangeSliderElement.prototype, "value", 1);
|
|
843
|
-
__decorateClass([
|
|
844
|
-
state()
|
|
845
|
-
], UUIRangeSliderElement.prototype, "_movement", 2);
|
|
846
|
-
__decorateClass([
|
|
847
|
-
state()
|
|
848
|
-
], UUIRangeSliderElement.prototype, "_lowInputValue", 2);
|
|
849
|
-
__decorateClass([
|
|
850
|
-
state()
|
|
851
|
-
], UUIRangeSliderElement.prototype, "_highInputValue", 2);
|
|
852
|
-
__decorateClass([
|
|
853
|
-
state()
|
|
854
|
-
], UUIRangeSliderElement.prototype, "_trackWidth", 2);
|
|
855
|
-
__decorateClass([
|
|
856
|
-
state()
|
|
857
|
-
], UUIRangeSliderElement.prototype, "_lowValuePercentStart", 2);
|
|
858
|
-
__decorateClass([
|
|
859
|
-
state()
|
|
860
|
-
], UUIRangeSliderElement.prototype, "_highValuePercentEnd", 2);
|
|
861
|
-
__decorateClass([
|
|
862
|
-
query("#range-slider")
|
|
863
|
-
], UUIRangeSliderElement.prototype, "_outerTrack", 2);
|
|
864
|
-
__decorateClass([
|
|
865
|
-
query("#inputLow")
|
|
866
|
-
], UUIRangeSliderElement.prototype, "_inputLow", 2);
|
|
867
|
-
__decorateClass([
|
|
868
|
-
query("#inputHigh")
|
|
869
|
-
], UUIRangeSliderElement.prototype, "_inputHigh", 2);
|
|
870
|
-
__decorateClass([
|
|
871
|
-
query(".color")
|
|
872
|
-
], UUIRangeSliderElement.prototype, "_innerColor", 2);
|
|
873
|
-
__decorateClass([
|
|
874
|
-
query("#inner-color-thumb")
|
|
875
|
-
], UUIRangeSliderElement.prototype, "_innerColorThumb", 2);
|
|
876
|
-
export {
|
|
877
|
-
UUIRangeSliderElement
|
|
772
|
+
`];
|
|
773
|
+
}
|
|
878
774
|
};
|
|
879
|
-
|
|
775
|
+
__decorate([property({ type: String })], UUIRangeSliderElement.prototype, "label", void 0);
|
|
776
|
+
__decorate([property({
|
|
777
|
+
type: Boolean,
|
|
778
|
+
reflect: true
|
|
779
|
+
})], UUIRangeSliderElement.prototype, "disabled", void 0);
|
|
780
|
+
__decorate([property({
|
|
781
|
+
type: Boolean,
|
|
782
|
+
reflect: true
|
|
783
|
+
})], UUIRangeSliderElement.prototype, "readonly", void 0);
|
|
784
|
+
__decorate([property({ type: Number })], UUIRangeSliderElement.prototype, "min", null);
|
|
785
|
+
__decorate([property({ type: Number })], UUIRangeSliderElement.prototype, "max", null);
|
|
786
|
+
__decorate([property({
|
|
787
|
+
type: Boolean,
|
|
788
|
+
attribute: "hide-step-values"
|
|
789
|
+
})], UUIRangeSliderElement.prototype, "hideStepValues", void 0);
|
|
790
|
+
__decorate([property({ type: Number })], UUIRangeSliderElement.prototype, "step", null);
|
|
791
|
+
__decorate([property({
|
|
792
|
+
type: Number,
|
|
793
|
+
attribute: "min-gap"
|
|
794
|
+
})], UUIRangeSliderElement.prototype, "minGap", null);
|
|
795
|
+
__decorate([property({
|
|
796
|
+
type: Number,
|
|
797
|
+
attribute: "max-gap"
|
|
798
|
+
})], UUIRangeSliderElement.prototype, "maxGap", null);
|
|
799
|
+
__decorate([property({ type: String })], UUIRangeSliderElement.prototype, "value", null);
|
|
800
|
+
__decorate([state()], UUIRangeSliderElement.prototype, "_movement", void 0);
|
|
801
|
+
__decorate([state()], UUIRangeSliderElement.prototype, "_lowInputValue", void 0);
|
|
802
|
+
__decorate([state()], UUIRangeSliderElement.prototype, "_highInputValue", void 0);
|
|
803
|
+
__decorate([state()], UUIRangeSliderElement.prototype, "_trackWidth", void 0);
|
|
804
|
+
__decorate([state()], UUIRangeSliderElement.prototype, "_lowValuePercentStart", void 0);
|
|
805
|
+
__decorate([state()], UUIRangeSliderElement.prototype, "_highValuePercentEnd", void 0);
|
|
806
|
+
__decorate([query("#range-slider")], UUIRangeSliderElement.prototype, "_outerTrack", void 0);
|
|
807
|
+
__decorate([query("#inputLow")], UUIRangeSliderElement.prototype, "_inputLow", void 0);
|
|
808
|
+
__decorate([query("#inputHigh")], UUIRangeSliderElement.prototype, "_inputHigh", void 0);
|
|
809
|
+
__decorate([query(".color")], UUIRangeSliderElement.prototype, "_innerColor", void 0);
|
|
810
|
+
__decorate([query("#inner-color-thumb")], UUIRangeSliderElement.prototype, "_innerColorThumb", void 0);
|
|
811
|
+
//#endregion
|
|
812
|
+
export { UUIRangeSliderElement };
|
|
813
|
+
|
|
814
|
+
//# sourceMappingURL=range-slider.element.js.map
|