@hanzo/ui 0.5.24 → 0.6.16
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/.eslintrc.js +4 -0
- package/.prettierrc +22 -0
- package/.rush/temp/chunked-rush-logs/ui._phase_build.chunks.jsonl +2 -0
- package/.rush/temp/chunked-rush-logs/ui._phase_validate.chunks.jsonl +11 -0
- package/.rush/temp/hcengineering+ui-_phase_build-16380278e5d28b32a6666092bd103ddbd2c66a56.tar.log +12 -0
- package/.rush/temp/hcengineering+ui-_phase_build-16380278e5d28b32a6666092bd103ddbd2c66a56.untar.log +10 -0
- package/.rush/temp/hcengineering+ui-_phase_validate-8f047ca66e6a4a177eee65782e723a7dc128d73e.tar.log +65 -0
- package/.rush/temp/hcengineering+ui-_phase_validate-8f047ca66e6a4a177eee65782e723a7dc128d73e.untar.log +10 -0
- package/.rush/temp/operation/_phase_build/all.log +2 -0
- package/.rush/temp/operation/_phase_build/log-chunks.jsonl +2 -0
- package/.rush/temp/operation/_phase_build/state.json +3 -0
- package/.rush/temp/operation/_phase_validate/all.log +11 -0
- package/.rush/temp/operation/_phase_validate/log-chunks.jsonl +11 -0
- package/.rush/temp/operation/_phase_validate/state.json +3 -0
- package/.rush/temp/shrinkwrap-deps.json +585 -0
- package/.validate/tsBuildInfoFile.info +1 -0
- package/.validate/validate-err.log +0 -0
- package/.validate/validate.log +0 -0
- package/CHANGELOG.json +17 -0
- package/CHANGELOG.md +9 -0
- package/config/rig.json +5 -0
- package/jest.config.js +5 -0
- package/lang/cs.json +119 -0
- package/lang/de.json +119 -0
- package/lang/en.json +120 -0
- package/lang/es.json +120 -0
- package/lang/fr.json +120 -0
- package/lang/it.json +120 -0
- package/lang/pt.json +120 -0
- package/lang/ru.json +120 -0
- package/lang/zh.json +120 -0
- package/package.json +52 -100
- package/postcss.config.js +5 -0
- package/rush-logs/ui._phase_build.cache.log +4 -0
- package/rush-logs/ui._phase_build.log +2 -0
- package/rush-logs/ui._phase_validate.cache.log +4 -0
- package/rush-logs/ui._phase_validate.log +11 -0
- package/src/__test__/location.test.ts +12 -0
- package/src/colors.ts +552 -0
- package/src/components/AccordionItem.svelte +132 -0
- package/src/components/ActionIcon.svelte +88 -0
- package/src/components/BarDashboard.svelte +47 -0
- package/src/components/BooleanIcon.svelte +31 -0
- package/src/components/Breadcrumb.svelte +102 -0
- package/src/components/Breadcrumbs.svelte +73 -0
- package/src/components/Button.svelte +196 -0
- package/src/components/ButtonBase.svelte +117 -0
- package/src/components/ButtonGroup.svelte +48 -0
- package/src/components/ButtonIcon.svelte +63 -0
- package/src/components/ButtonMenu.svelte +103 -0
- package/src/components/ButtonWithDropdown.svelte +120 -0
- package/src/components/CheckBox.svelte +239 -0
- package/src/components/CheckBoxList.svelte.txt +88 -0
- package/src/components/CheckBoxWithLabel.svelte.txt +147 -0
- package/src/components/Chevron.svelte +85 -0
- package/src/components/Chip.svelte +109 -0
- package/src/components/CircleButton.svelte +165 -0
- package/src/components/CodeForm.svelte +164 -0
- package/src/components/CodeInput.svelte +86 -0
- package/src/components/ColorPopup.svelte +119 -0
- package/src/components/Component.svelte +152 -0
- package/src/components/Dialog.svelte +105 -0
- package/src/components/Dock.svelte +53 -0
- package/src/components/Dropdown.svelte +91 -0
- package/src/components/DropdownLabels.svelte +156 -0
- package/src/components/DropdownLabelsIntl.svelte +108 -0
- package/src/components/DropdownLabelsPopup.svelte +148 -0
- package/src/components/DropdownLabelsPopupIntl.svelte +72 -0
- package/src/components/DropdownPopup.svelte +146 -0
- package/src/components/DropdownRecord.svelte +50 -0
- package/src/components/DropdownRecordPopup.svelte +82 -0
- package/src/components/EditBox.svelte +211 -0
- package/src/components/EditWithIcon.svelte +130 -0
- package/src/components/EmbeddedPDF.svelte +88 -0
- package/src/components/ErrorPopup.svelte +27 -0
- package/src/components/ErrorPresenter.svelte +32 -0
- package/src/components/ExpandCollapse.svelte +42 -0
- package/src/components/Expandable.svelte +90 -0
- package/src/components/FocusHandler.svelte +21 -0
- package/src/components/Fold.svelte +52 -0
- package/src/components/Grid.svelte +39 -0
- package/src/components/Header.svelte +260 -0
- package/src/components/HlsVideo.svelte +170 -0
- package/src/components/Hotkey.svelte +50 -0
- package/src/components/HotkeyGroup.svelte +25 -0
- package/src/components/Html.svelte +24 -0
- package/src/components/Icon.svelte +45 -0
- package/src/components/IconWithEmoji.svelte +74 -0
- package/src/components/Image.svelte +71 -0
- package/src/components/Label.svelte +38 -0
- package/src/components/Lazy.svelte +29 -0
- package/src/components/Like.svelte +73 -0
- package/src/components/Link.svelte +75 -0
- package/src/components/LinkWrapper.svelte +35 -0
- package/src/components/ListView.svelte +153 -0
- package/src/components/ListViewItem.svelte +84 -0
- package/src/components/Loading.svelte +88 -0
- package/src/components/Menu.svelte +205 -0
- package/src/components/MiniToggle.svelte +125 -0
- package/src/components/Modal.svelte +117 -0
- package/src/components/ModeSelector.svelte +37 -0
- package/src/components/ModernButton.svelte +61 -0
- package/src/components/ModernCheckbox.svelte +123 -0
- package/src/components/ModernDialog.svelte +258 -0
- package/src/components/ModernEditbox.svelte +256 -0
- package/src/components/ModernPopup.svelte +105 -0
- package/src/components/ModernRadioButton.svelte +111 -0
- package/src/components/ModernTab.svelte +184 -0
- package/src/components/ModernToggle.svelte +153 -0
- package/src/components/MouseSpeedTracker.svelte +74 -0
- package/src/components/MultiProgress.svelte +97 -0
- package/src/components/NavGroup.svelte +160 -0
- package/src/components/NavItem.svelte +346 -0
- package/src/components/NestedDropdown.svelte +62 -0
- package/src/components/NestedMenu.svelte +119 -0
- package/src/components/NotificationToast.svelte +112 -0
- package/src/components/NumberInput.svelte +200 -0
- package/src/components/Panel.svelte +324 -0
- package/src/components/PanelInstance.svelte +254 -0
- package/src/components/PlainTextEditor.svelte +100 -0
- package/src/components/Popup.svelte +50 -0
- package/src/components/PopupInstance.svelte +390 -0
- package/src/components/PopupMenu.svelte +120 -0
- package/src/components/Progress.svelte +124 -0
- package/src/components/ProgressCircle.svelte +71 -0
- package/src/components/RadioButton.svelte +69 -0
- package/src/components/RadioGroup.svelte +42 -0
- package/src/components/RootStatusComponent.svelte +65 -0
- package/src/components/Row.svelte +25 -0
- package/src/components/ScrollBox.svelte +98 -0
- package/src/components/Scroller.svelte +1063 -0
- package/src/components/ScrollerBar.svelte +181 -0
- package/src/components/SearchEdit.svelte +46 -0
- package/src/components/SearchInput.svelte +213 -0
- package/src/components/SearchPicker.svelte +114 -0
- package/src/components/Section.svelte +49 -0
- package/src/components/SectionEmpty.svelte +38 -0
- package/src/components/SelectBox.svelte +76 -0
- package/src/components/SelectPopup.svelte +217 -0
- package/src/components/Separator.svelte +736 -0
- package/src/components/ShowMore.svelte +99 -0
- package/src/components/Spinner.svelte +72 -0
- package/src/components/SplitButton.svelte +100 -0
- package/src/components/StateTag.svelte +79 -0
- package/src/components/Status.svelte +33 -0
- package/src/components/StepsDialog.svelte +290 -0
- package/src/components/StylishEdit.svelte +127 -0
- package/src/components/Submenu.svelte +68 -0
- package/src/components/Switcher.svelte +55 -0
- package/src/components/SwitcherBase.svelte +116 -0
- package/src/components/TabList.svelte +290 -0
- package/src/components/Tabs.svelte +45 -0
- package/src/components/TabsControl.svelte +113 -0
- package/src/components/TextArea.svelte +110 -0
- package/src/components/TextAreaEditor.svelte +78 -0
- package/src/components/TimeLeft.svelte +66 -0
- package/src/components/TimeShiftPicker.svelte +84 -0
- package/src/components/TimeShiftPopup.svelte +64 -0
- package/src/components/TimeShiftPresenter.svelte +59 -0
- package/src/components/TimeSince.svelte +86 -0
- package/src/components/TimeZonesPopup.svelte +185 -0
- package/src/components/Timeline.svelte +754 -0
- package/src/components/Toggle.svelte +116 -0
- package/src/components/ToggleButton.svelte +176 -0
- package/src/components/ToggleWithLabel.svelte +58 -0
- package/src/components/TooltipInstance.svelte +613 -0
- package/src/components/Video.svelte +40 -0
- package/src/components/calendar/DateInputBox.svelte +430 -0
- package/src/components/calendar/DatePicker.svelte +46 -0
- package/src/components/calendar/DatePopup.svelte +274 -0
- package/src/components/calendar/DatePresenter.svelte +392 -0
- package/src/components/calendar/DateRangePicker.svelte +50 -0
- package/src/components/calendar/DateRangePopup.svelte +76 -0
- package/src/components/calendar/DateRangePresenter.svelte +779 -0
- package/src/components/calendar/DateTimePresenter.svelte +23 -0
- package/src/components/calendar/DateTimeRangePresenter.svelte +28 -0
- package/src/components/calendar/DueDatePopup.svelte +93 -0
- package/src/components/calendar/DueDatePresenter.svelte +83 -0
- package/src/components/calendar/Month.svelte +243 -0
- package/src/components/calendar/MonthCalendar.svelte +138 -0
- package/src/components/calendar/MonthSquare.svelte +315 -0
- package/src/components/calendar/RangeDatePopup.svelte +231 -0
- package/src/components/calendar/Shifts.svelte +114 -0
- package/src/components/calendar/SimpleDatePopup.svelte +42 -0
- package/src/components/calendar/SimpleTimePopup.svelte +41 -0
- package/src/components/calendar/TimeInputBox.svelte +282 -0
- package/src/components/calendar/TimePopup.svelte +62 -0
- package/src/components/calendar/WeekCalendar.svelte +116 -0
- package/src/components/calendar/YearCalendar.svelte +67 -0
- package/src/components/calendar/icons/DPCalendar.svelte +12 -0
- package/src/components/calendar/icons/DPCalendarOver.svelte +15 -0
- package/src/components/calendar/icons/DPClock.svelte +13 -0
- package/src/components/calendar/icons/DPClockBold.svelte +10 -0
- package/src/components/calendar/icons/DPEnd.svelte +13 -0
- package/src/components/calendar/icons/DPSetCalendar.svelte +10 -0
- package/src/components/calendar/icons/DPStart.svelte +13 -0
- package/src/components/calendar/internal/DateUtils.ts +186 -0
- package/src/components/emoji/ActionsPopup.svelte +116 -0
- package/src/components/emoji/EmojiButton.svelte +146 -0
- package/src/components/emoji/EmojiGroup.svelte +105 -0
- package/src/components/emoji/EmojiGroupPalette.svelte +58 -0
- package/src/components/emoji/EmojiPopup.svelte +430 -0
- package/src/components/emoji/SkinTonePopup.svelte +40 -0
- package/src/components/emoji/SkinToneTooltip.svelte +36 -0
- package/src/components/emoji/icons/Activities.svelte +20 -0
- package/src/components/emoji/icons/AnimalsAndNature.svelte +16 -0
- package/src/components/emoji/icons/Flags.svelte +14 -0
- package/src/components/emoji/icons/FoodAndDrink.svelte +20 -0
- package/src/components/emoji/icons/FrequentlyUsed.svelte +17 -0
- package/src/components/emoji/icons/GettingWorkDone.svelte +14 -0
- package/src/components/emoji/icons/Objects.svelte +15 -0
- package/src/components/emoji/icons/Search.svelte +14 -0
- package/src/components/emoji/icons/SmileysAndPeople.svelte +23 -0
- package/src/components/emoji/icons/Symbols.svelte +23 -0
- package/src/components/emoji/icons/TravelAndPlaces.svelte +17 -0
- package/src/components/emoji/index.ts +97 -0
- package/src/components/emoji/store.ts +44 -0
- package/src/components/emoji/types.ts +34 -0
- package/src/components/emoji/utils.ts +182 -0
- package/src/components/icons/Activity.svelte +16 -0
- package/src/components/icons/ActivityEdit.svelte +25 -0
- package/src/components/icons/Add.svelte +10 -0
- package/src/components/icons/ArrowLeft.svelte +25 -0
- package/src/components/icons/ArrowRight.svelte +25 -0
- package/src/components/icons/Attachment.svelte +29 -0
- package/src/components/icons/Back.svelte +32 -0
- package/src/components/icons/BlueCheck.svelte +11 -0
- package/src/components/icons/Calendar.svelte +10 -0
- package/src/components/icons/Check.svelte +12 -0
- package/src/components/icons/CheckAll.svelte +27 -0
- package/src/components/icons/CheckCircle.svelte +12 -0
- package/src/components/icons/Checkmark.svelte +26 -0
- package/src/components/icons/ChevronDown.svelte +27 -0
- package/src/components/icons/ChevronLeft.svelte +22 -0
- package/src/components/icons/ChevronRight.svelte +22 -0
- package/src/components/icons/CircleAdd.svelte +13 -0
- package/src/components/icons/Circles.svelte +43 -0
- package/src/components/icons/Close.svelte +10 -0
- package/src/components/icons/ColStar.svelte +31 -0
- package/src/components/icons/CollapseArrow.svelte +8 -0
- package/src/components/icons/Copy.svelte +10 -0
- package/src/components/icons/Delete.svelte +18 -0
- package/src/components/icons/Description.svelte +31 -0
- package/src/components/icons/Details.svelte +36 -0
- package/src/components/icons/DetailsFilled.svelte +27 -0
- package/src/components/icons/Down.svelte +8 -0
- package/src/components/icons/DownOutline.svelte +8 -0
- package/src/components/icons/Dropdown.svelte +8 -0
- package/src/components/icons/DropdownDown.svelte +24 -0
- package/src/components/icons/DropdownRight.svelte +24 -0
- package/src/components/icons/Edit.svelte +26 -0
- package/src/components/icons/Emoji.svelte +10 -0
- package/src/components/icons/Error.svelte +27 -0
- package/src/components/icons/Expand.svelte +10 -0
- package/src/components/icons/File.svelte +25 -0
- package/src/components/icons/Filter.svelte +26 -0
- package/src/components/icons/Folder.svelte +13 -0
- package/src/components/icons/FolderCollapsed.svelte +34 -0
- package/src/components/icons/FolderExpanded.svelte +34 -0
- package/src/components/icons/Forward.svelte +8 -0
- package/src/components/icons/HalfUpDown.svelte +7 -0
- package/src/components/icons/History.svelte +10 -0
- package/src/components/icons/Info.svelte +26 -0
- package/src/components/icons/KeyCommand.svelte +12 -0
- package/src/components/icons/KeyOption.svelte +8 -0
- package/src/components/icons/KeyShift.svelte +8 -0
- package/src/components/icons/Left.svelte +10 -0
- package/src/components/icons/Like.svelte +25 -0
- package/src/components/icons/Link.svelte +10 -0
- package/src/components/icons/MaxWidth.svelte +27 -0
- package/src/components/icons/Maximize.svelte +25 -0
- package/src/components/icons/MenuClose.svelte +28 -0
- package/src/components/icons/MenuOpen.svelte +26 -0
- package/src/components/icons/MinWidth.svelte +27 -0
- package/src/components/icons/Minimize.svelte +28 -0
- package/src/components/icons/Mixin.svelte +38 -0
- package/src/components/icons/MoreH.svelte +16 -0
- package/src/components/icons/MoreV.svelte +16 -0
- package/src/components/icons/MoreV2.svelte +29 -0
- package/src/components/icons/NavNext.svelte +10 -0
- package/src/components/icons/NavPrev.svelte +10 -0
- package/src/components/icons/Open.svelte +11 -0
- package/src/components/icons/OpenedArrow.svelte +26 -0
- package/src/components/icons/Options.svelte +12 -0
- package/src/components/icons/Redo.svelte +10 -0
- package/src/components/icons/Right.svelte +26 -0
- package/src/components/icons/Scale.svelte +13 -0
- package/src/components/icons/ScaleFull.svelte +13 -0
- package/src/components/icons/Scribble.svelte +10 -0
- package/src/components/icons/Search.svelte +12 -0
- package/src/components/icons/Send.svelte +10 -0
- package/src/components/icons/Settings.svelte +13 -0
- package/src/components/icons/Share.svelte +13 -0
- package/src/components/icons/SquareExpand.svelte +13 -0
- package/src/components/icons/Start.svelte +10 -0
- package/src/components/icons/Stop.svelte +8 -0
- package/src/components/icons/TableOfContents.svelte +35 -0
- package/src/components/icons/Thread.svelte +29 -0
- package/src/components/icons/ToDetails.svelte +28 -0
- package/src/components/icons/Undo.svelte +10 -0
- package/src/components/icons/Up.svelte +8 -0
- package/src/components/icons/UpOutline.svelte +8 -0
- package/src/components/internal/Clock.svelte +42 -0
- package/src/components/internal/ClockFace.svelte +148 -0
- package/src/components/internal/ClockPopup.svelte +91 -0
- package/src/components/internal/ErrorBoundary.ts +33 -0
- package/src/components/internal/ErrorComponent.svelte +37 -0
- package/src/components/internal/Root.svelte +323 -0
- package/src/components/internal/RootBarExtension.svelte +32 -0
- package/src/components/internal/Settings.svelte +39 -0
- package/src/components/internal/SettingsPopup.svelte +196 -0
- package/src/components/internal/ThemeButton.svelte +151 -0
- package/src/components/internal/icons/CheckCircled.svelte +11 -0
- package/src/components/internal/icons/Computer.svelte +15 -0
- package/src/components/internal/icons/FontSize.svelte +13 -0
- package/src/components/internal/icons/Language.svelte +17 -0
- package/src/components/internal/icons/Phone.svelte +18 -0
- package/src/components/internal/icons/Search.svelte +12 -0
- package/src/components/internal/icons/Settings.svelte +13 -0
- package/src/components/internal/icons/Theme.svelte +9 -0
- package/src/components/internal/icons/WiFi.svelte +21 -0
- package/src/components/notifications/Notification.svelte +34 -0
- package/src/components/notifications/Notification.ts +16 -0
- package/src/components/notifications/NotificationPosition.ts +6 -0
- package/src/components/notifications/NotificationSeverity.ts +6 -0
- package/src/components/notifications/Notifications.svelte +53 -0
- package/src/components/notifications/actions.ts +42 -0
- package/src/components/notifications/store.ts +16 -0
- package/src/components/wizard/ModernWizardBar.svelte +105 -0
- package/src/components/wizard/ModernWizardDialog.svelte +144 -0
- package/src/components/wizard/Wizard.svelte +59 -0
- package/src/components/wizard/WizardStep.svelte +144 -0
- package/src/focus.ts +139 -0
- package/src/index.ts +338 -0
- package/src/lazy.ts +93 -0
- package/src/location.ts +259 -0
- package/src/modals.ts +5 -0
- package/src/panelup.ts +70 -0
- package/src/plugin.ts +156 -0
- package/src/popups.ts +486 -0
- package/src/resize.ts +179 -0
- package/src/svg.d.ts +4 -0
- package/src/tooltips.ts +152 -0
- package/src/types.ts +545 -0
- package/src/utils.ts +420 -0
- package/svelte.config.js +5 -0
- package/tsconfig.json +9 -0
- package/types/__test__/location.test.d.ts +2 -0
- package/types/__test__/location.test.d.ts.map +1 -0
- package/types/colors.d.ts +163 -0
- package/types/colors.d.ts.map +1 -0
- package/types/components/calendar/internal/DateUtils.d.ts +34 -0
- package/types/components/calendar/internal/DateUtils.d.ts.map +1 -0
- package/types/components/emoji/index.d.ts +11 -0
- package/types/components/emoji/index.d.ts.map +1 -0
- package/types/components/emoji/store.d.ts +12 -0
- package/types/components/emoji/store.d.ts.map +1 -0
- package/types/components/emoji/types.d.ts +20 -0
- package/types/components/emoji/types.d.ts.map +1 -0
- package/types/components/emoji/utils.d.ts +17 -0
- package/types/components/emoji/utils.d.ts.map +1 -0
- package/types/components/internal/ErrorBoundary.d.ts +5 -0
- package/types/components/internal/ErrorBoundary.d.ts.map +1 -0
- package/types/components/notifications/Notification.d.ts +16 -0
- package/types/components/notifications/Notification.d.ts.map +1 -0
- package/types/components/notifications/NotificationPosition.d.ts +7 -0
- package/types/components/notifications/NotificationPosition.d.ts.map +1 -0
- package/types/components/notifications/NotificationSeverity.d.ts +7 -0
- package/types/components/notifications/NotificationSeverity.d.ts.map +1 -0
- package/types/components/notifications/actions.d.ts +6 -0
- package/types/components/notifications/actions.d.ts.map +1 -0
- package/types/components/notifications/store.d.ts +9 -0
- package/types/components/notifications/store.d.ts.map +1 -0
- package/types/focus.d.ts +32 -0
- package/types/focus.d.ts.map +1 -0
- package/types/index.d.ts +254 -0
- package/types/index.d.ts.map +1 -0
- package/types/lazy.d.ts +6 -0
- package/types/lazy.d.ts.map +1 -0
- package/types/location.d.ts +38 -0
- package/types/location.d.ts.map +1 -0
- package/types/modals.d.ts +5 -0
- package/types/modals.d.ts.map +1 -0
- package/types/panelup.d.ts +17 -0
- package/types/panelup.d.ts.map +1 -0
- package/types/plugin.d.ts +135 -0
- package/types/plugin.d.ts.map +1 -0
- package/types/popups.d.ts +65 -0
- package/types/popups.d.ts.map +1 -0
- package/types/resize.d.ts +32 -0
- package/types/resize.d.ts.map +1 -0
- package/types/tooltips.d.ts +8 -0
- package/types/tooltips.d.ts.map +1 -0
- package/types/types.d.ts +373 -0
- package/types/types.d.ts.map +1 -0
- package/types/utils.d.ts +125 -0
- package/types/utils.d.ts.map +1 -0
- package/assets/lux-site-icons/android-chrome-192x192.png +0 -0
- package/assets/lux-site-icons/android-chrome-512x512.png +0 -0
- package/assets/lux-site-icons/apple-touch-icon.png +0 -0
- package/assets/lux-site-icons/favicon-16x16.png +0 -0
- package/assets/lux-site-icons/favicon-32x32.png +0 -0
- package/assets/lux-site-icons/favicon.ico +0 -0
- package/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf +0 -0
- package/assets/standard-docs/LUX-Privacy-Policy.pdf +0 -0
- package/blocks/components/accordian-block.tsx +0 -48
- package/blocks/components/block-component-props.ts +0 -11
- package/blocks/components/bullet-cards-block.tsx +0 -45
- package/blocks/components/card-block.tsx +0 -213
- package/blocks/components/carte-blanche-block/index.tsx +0 -127
- package/blocks/components/carte-blanche-block/variant-content-left.tsx +0 -49
- package/blocks/components/content.tsx +0 -70
- package/blocks/components/cta-block.tsx +0 -98
- package/blocks/components/enh-heading-block.tsx +0 -205
- package/blocks/components/grid-block/grid-block-mutator.ts +0 -12
- package/blocks/components/grid-block/index.tsx +0 -83
- package/blocks/components/grid-block/mutator-registry.ts +0 -10
- package/blocks/components/grid-block/table-borders.mutator.ts +0 -47
- package/blocks/components/group-block.tsx +0 -83
- package/blocks/components/heading-block.tsx +0 -88
- package/blocks/components/image-block.tsx +0 -108
- package/blocks/components/index.ts +0 -30
- package/blocks/components/screenful-block/content.tsx +0 -120
- package/blocks/components/screenful-block/index.tsx +0 -79
- package/blocks/components/screenful-block/poster-background.tsx +0 -34
- package/blocks/components/screenful-block/video-background.tsx +0 -45
- package/blocks/components/space-block.tsx +0 -66
- package/blocks/components/video-block.tsx +0 -137
- package/blocks/def/accordian-block.ts +0 -14
- package/blocks/def/block.ts +0 -7
- package/blocks/def/bullet-cards-block.ts +0 -21
- package/blocks/def/card-block.ts +0 -24
- package/blocks/def/carte-blanche-block.ts +0 -21
- package/blocks/def/cta-block.ts +0 -19
- package/blocks/def/element-block.ts +0 -11
- package/blocks/def/enh-heading-block.ts +0 -45
- package/blocks/def/grid-block.ts +0 -16
- package/blocks/def/group-block.ts +0 -11
- package/blocks/def/heading-block.ts +0 -15
- package/blocks/def/image-block.ts +0 -31
- package/blocks/def/index.ts +0 -35
- package/blocks/def/screenful-block.ts +0 -54
- package/blocks/def/space-block.ts +0 -64
- package/blocks/def/video-block.ts +0 -28
- package/blocks/index.ts +0 -2
- package/common/chat-widget.tsx +0 -75
- package/common/contact-dialog/contact-form.tsx +0 -111
- package/common/contact-dialog/disclaimer.tsx +0 -13
- package/common/contact-dialog/index.tsx +0 -48
- package/common/copyright.tsx +0 -21
- package/common/drawer-menu.tsx +0 -51
- package/common/footer.tsx +0 -77
- package/common/head-metadata/from-next/metadata-types.ts +0 -158
- package/common/head-metadata/from-next/opengraph-types.ts +0 -267
- package/common/head-metadata/from-next/twitter-types.ts +0 -92
- package/common/head-metadata/index.tsx +0 -208
- package/common/header/index.tsx +0 -57
- package/common/header/mobile-nav.tsx +0 -72
- package/common/header/theme-toggle.tsx +0 -26
- package/common/icons/github.tsx +0 -14
- package/common/icons/index.tsx +0 -34
- package/common/icons/lux-logo.tsx +0 -10
- package/common/icons/secure-delivery.tsx +0 -13
- package/common/icons/social-icon.tsx +0 -35
- package/common/icons/youtube-logo.tsx +0 -59
- package/common/index.ts +0 -14
- package/common/logo.tsx +0 -71
- package/common/mini-chart/index.tsx +0 -8
- package/common/mini-chart/mini-chart-props.ts +0 -44
- package/common/mini-chart/mini-chart.tsx +0 -76
- package/common/mini-chart/wrapper.tsx +0 -23
- package/context-providers/index.ts +0 -1
- package/context-providers/theme-provider.tsx +0 -20
- package/next/README.md +0 -11
- package/next/analytics/fpixel.ts +0 -16
- package/next/analytics/pixel-analytics.tsx +0 -55
- package/next/determine-device-middleware.ts +0 -16
- package/next/fonts/DrukTextWide-Bold-Trial.otf +0 -0
- package/next/fonts/DrukTextWide-Heavy-Trial.otf +0 -0
- package/next/fonts/DrukTextWide-Medium-Trial.otf +0 -0
- package/next/fonts/DrukWide-Bold-Trial.otf +0 -0
- package/next/fonts/DrukWide-Heavy-Trial.otf +0 -0
- package/next/fonts/DrukWide-Medium-Trial.otf +0 -0
- package/next/get-app-router-font-classes.ts +0 -12
- package/next/load-and-return-lux-next-fonts-on-import.ts +0 -94
- package/next/next-font-desc.ts +0 -28
- package/next/not-found-content.mdx +0 -4
- package/next/not-found.tsx +0 -23
- package/next/pages-router-font-vars.tsx +0 -18
- package/next/root-layout.tsx +0 -60
- package/primitives/accordion.tsx +0 -61
- package/primitives/action-button.tsx +0 -46
- package/primitives/apply-typography.tsx +0 -55
- package/primitives/avatar.tsx +0 -49
- package/primitives/badge.tsx +0 -36
- package/primitives/button.tsx +0 -73
- package/primitives/calendar.tsx +0 -72
- package/primitives/card.tsx +0 -83
- package/primitives/checkbox.tsx +0 -32
- package/primitives/command.tsx +0 -155
- package/primitives/dialog-video-controller.tsx +0 -38
- package/primitives/dialog.tsx +0 -152
- package/primitives/form.tsx +0 -179
- package/primitives/index.ts +0 -144
- package/primitives/inline-icon.tsx +0 -37
- package/primitives/input.tsx +0 -30
- package/primitives/label.tsx +0 -28
- package/primitives/link-element.tsx +0 -104
- package/primitives/main.tsx +0 -17
- package/primitives/mdx-link.tsx +0 -22
- package/primitives/nav-items.tsx +0 -48
- package/primitives/popover.tsx +0 -35
- package/primitives/progress.tsx +0 -27
- package/primitives/scroll-area.tsx +0 -47
- package/primitives/select.tsx +0 -169
- package/primitives/separator.tsx +0 -29
- package/primitives/sheet.tsx +0 -175
- package/primitives/skeleton.tsx +0 -15
- package/primitives/switch.tsx +0 -33
- package/primitives/table.tsx +0 -117
- package/primitives/tabs.tsx +0 -60
- package/primitives/tailwind-indicator.tsx +0 -19
- package/primitives/text-area.tsx +0 -26
- package/primitives/toast.tsx +0 -129
- package/primitives/toaster.tsx +0 -37
- package/primitives/use-toast.ts +0 -192
- package/primitives/video-player.tsx +0 -26
- package/primitives/youtube-embed.tsx +0 -83
- package/siteDef/footer/community.tsx +0 -67
- package/siteDef/footer/company.ts +0 -37
- package/siteDef/footer/ecosystem.ts +0 -37
- package/siteDef/footer/index.tsx +0 -26
- package/siteDef/footer/legal.ts +0 -28
- package/siteDef/footer/network.ts +0 -33
- package/siteDef/footer/svg/warpcast-logo.svg +0 -12
- package/siteDef/main-nav.ts +0 -35
- package/style/globals.css +0 -13
- package/style/hanzo-common.css +0 -32
- package/style/hanzo-default-colors.css +0 -79
- package/style/social-svg.css +0 -3
- package/tailwind/colors.tailwind.js +0 -46
- package/tailwind/fonts.tailwind.ts +0 -31
- package/tailwind/index.ts +0 -18
- package/tailwind/lux-tw-fonts.ts +0 -37
- package/tailwind/safelist.tailwind.js +0 -26
- package/tailwind/screens.tailwind.js +0 -8
- package/tailwind/spacing.tailwind.js +0 -65
- package/tailwind/tailwind.config.base.js +0 -906
- package/tailwind/tw-font-desc.ts +0 -15
- package/tailwind/typo-plugin/get-plugin-styles.js +0 -676
- package/tailwind/typo-plugin/index.d.ts +0 -9
- package/tailwind/typo-plugin/index.js +0 -141
- package/tailwind/typo-plugin/utils.js +0 -60
- package/tailwind/typography-test.mdx +0 -36
- package/types/breakpoints.ts +0 -11
- package/types/bullet-item.ts +0 -10
- package/types/button-def.ts +0 -39
- package/types/contact-info.ts +0 -11
- package/types/dimensions.ts +0 -20
- package/types/grid-def.ts +0 -56
- package/types/icon.ts +0 -10
- package/types/image-def.ts +0 -28
- package/types/index.ts +0 -29
- package/types/link-def.ts +0 -59
- package/types/site-def.ts +0 -34
- package/types/t-shirt-size.ts +0 -5
- package/util/index.ts +0 -81
- package/util/specifier.ts +0 -43
package/src/tooltips.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { type IntlString } from '@hanzo/platform'
|
|
2
|
+
import { derived, get } from 'svelte/store'
|
|
3
|
+
import type { AnyComponent, AnySvelteComponent, LabelAndProps, TooltipAlignment } from './types'
|
|
4
|
+
import { modalStore } from './modals'
|
|
5
|
+
|
|
6
|
+
const emptyTooltip: LabelAndProps = {
|
|
7
|
+
label: undefined,
|
|
8
|
+
element: undefined,
|
|
9
|
+
direction: undefined,
|
|
10
|
+
component: undefined,
|
|
11
|
+
props: undefined,
|
|
12
|
+
anchor: undefined,
|
|
13
|
+
onUpdate: undefined,
|
|
14
|
+
keys: undefined,
|
|
15
|
+
kind: 'tooltip'
|
|
16
|
+
}
|
|
17
|
+
let storedValue: LabelAndProps = emptyTooltip
|
|
18
|
+
export const tooltipstore = derived(modalStore, (modals) => {
|
|
19
|
+
if (modals.length === 0) {
|
|
20
|
+
return emptyTooltip
|
|
21
|
+
}
|
|
22
|
+
const tooltip = modals.filter((m) => m?.type === 'tooltip')
|
|
23
|
+
return tooltip.length > 0 ? (tooltip[tooltip.length - 1] as LabelAndProps) : emptyTooltip
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
let toHandler: any
|
|
27
|
+
export function tooltip (node: HTMLElement, options?: LabelAndProps): any {
|
|
28
|
+
if (options === undefined) {
|
|
29
|
+
return {}
|
|
30
|
+
}
|
|
31
|
+
if (options.label === undefined && options.component === undefined) {
|
|
32
|
+
// No tooltip
|
|
33
|
+
return {}
|
|
34
|
+
}
|
|
35
|
+
let opt = options
|
|
36
|
+
const show = (): void => {
|
|
37
|
+
const shown = !!(storedValue.label !== undefined || storedValue.component !== undefined)
|
|
38
|
+
if (!shown) {
|
|
39
|
+
if (opt?.kind !== 'submenu' || opt.timeout !== undefined) {
|
|
40
|
+
clearTimeout(toHandler)
|
|
41
|
+
toHandler = setTimeout(() => {
|
|
42
|
+
showTooltip(
|
|
43
|
+
opt.label,
|
|
44
|
+
node,
|
|
45
|
+
opt.direction,
|
|
46
|
+
opt.component,
|
|
47
|
+
opt.props,
|
|
48
|
+
opt.anchor,
|
|
49
|
+
opt.onUpdate,
|
|
50
|
+
opt.kind,
|
|
51
|
+
opt.keys
|
|
52
|
+
)
|
|
53
|
+
}, opt.timeout ?? 10)
|
|
54
|
+
} else {
|
|
55
|
+
showTooltip(
|
|
56
|
+
opt.label,
|
|
57
|
+
node,
|
|
58
|
+
opt.direction,
|
|
59
|
+
opt.component,
|
|
60
|
+
opt.props,
|
|
61
|
+
opt.anchor,
|
|
62
|
+
opt.onUpdate,
|
|
63
|
+
opt.kind,
|
|
64
|
+
opt.keys
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const hide = (): void => {
|
|
70
|
+
clearTimeout(toHandler)
|
|
71
|
+
}
|
|
72
|
+
node.addEventListener('mouseleave', hide)
|
|
73
|
+
node.addEventListener('mousemove', show)
|
|
74
|
+
return {
|
|
75
|
+
update (options: LabelAndProps) {
|
|
76
|
+
opt = options
|
|
77
|
+
if (node !== storedValue.element) return
|
|
78
|
+
const shown = !!(storedValue.label !== undefined || storedValue.component !== undefined)
|
|
79
|
+
if (shown) {
|
|
80
|
+
showTooltip(
|
|
81
|
+
opt.label,
|
|
82
|
+
node,
|
|
83
|
+
opt.direction,
|
|
84
|
+
opt.component,
|
|
85
|
+
opt.props,
|
|
86
|
+
opt.anchor,
|
|
87
|
+
opt.onUpdate,
|
|
88
|
+
opt.kind,
|
|
89
|
+
opt.keys
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
destroy () {
|
|
95
|
+
const currentTooltip = get(tooltipstore)
|
|
96
|
+
if (currentTooltip?.element != null && currentTooltip.element === node) {
|
|
97
|
+
closeTooltip()
|
|
98
|
+
}
|
|
99
|
+
node.removeEventListener('mousemove', show)
|
|
100
|
+
node.removeEventListener('mouseleave', hide)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function showTooltip (
|
|
106
|
+
label: IntlString | undefined,
|
|
107
|
+
element: HTMLElement,
|
|
108
|
+
direction?: TooltipAlignment,
|
|
109
|
+
component?: AnySvelteComponent | AnyComponent,
|
|
110
|
+
props?: any,
|
|
111
|
+
anchor?: HTMLElement,
|
|
112
|
+
onUpdate?: (result: any) => void,
|
|
113
|
+
kind?: 'tooltip' | 'submenu' | 'popup',
|
|
114
|
+
keys?: string[]
|
|
115
|
+
): void {
|
|
116
|
+
storedValue = {
|
|
117
|
+
label,
|
|
118
|
+
element,
|
|
119
|
+
direction,
|
|
120
|
+
component,
|
|
121
|
+
props,
|
|
122
|
+
anchor,
|
|
123
|
+
onUpdate,
|
|
124
|
+
kind,
|
|
125
|
+
keys,
|
|
126
|
+
type: 'tooltip'
|
|
127
|
+
}
|
|
128
|
+
modalStore.update((old) => {
|
|
129
|
+
const tooltip = old.find((m) => m?.type === 'tooltip') as LabelAndProps | undefined
|
|
130
|
+
if (tooltip !== undefined && tooltip.component === storedValue.component) {
|
|
131
|
+
if (tooltip.kind !== undefined && storedValue.kind === undefined) {
|
|
132
|
+
storedValue.kind = tooltip.kind
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (storedValue.kind == null) {
|
|
137
|
+
storedValue.kind = 'tooltip'
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
old.push(storedValue)
|
|
141
|
+
return old
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function closeTooltip (): void {
|
|
146
|
+
clearTimeout(toHandler)
|
|
147
|
+
storedValue = emptyTooltip
|
|
148
|
+
modalStore.update((old) => {
|
|
149
|
+
old = old.filter((m) => m?.type !== 'tooltip')
|
|
150
|
+
return old
|
|
151
|
+
})
|
|
152
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2020 Hanzo <dev@hanzo.ai>.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License. You may
|
|
6
|
+
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
//
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
import { type Timestamp } from '@hanzo/core'
|
|
16
|
+
import type {
|
|
17
|
+
Asset,
|
|
18
|
+
IntlString,
|
|
19
|
+
/* Metadata, Plugin, plugin, */ Resource /*, Service */
|
|
20
|
+
} from '@hanzo/platform'
|
|
21
|
+
import { /* getContext, */ type ComponentType } from 'svelte'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Describe a browser URI location parsed to path, query and fragment.
|
|
25
|
+
*/
|
|
26
|
+
export interface Location {
|
|
27
|
+
path: string[] // A useful path value
|
|
28
|
+
query?: Record<string, string | null> // a value of query parameters, no duplication are supported
|
|
29
|
+
fragment?: string // a value of fragment
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ResolvedLocation {
|
|
33
|
+
loc: Location
|
|
34
|
+
defaultLocation: Location
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if locations are equal.
|
|
39
|
+
*/
|
|
40
|
+
export function areLocationsEqual (loc1: Location, loc2: Location): boolean {
|
|
41
|
+
if (loc1 === loc2) {
|
|
42
|
+
return true
|
|
43
|
+
}
|
|
44
|
+
if (loc1.fragment !== loc2.fragment) {
|
|
45
|
+
return false
|
|
46
|
+
}
|
|
47
|
+
if (loc1.path.length !== loc2.path.length) {
|
|
48
|
+
return false
|
|
49
|
+
}
|
|
50
|
+
if (loc1.path.findIndex((v, i) => v !== loc2.path[i]) >= 0) {
|
|
51
|
+
return false
|
|
52
|
+
}
|
|
53
|
+
const keys1 = Object.keys(loc1.query ?? {})
|
|
54
|
+
const keys2 = Object.keys(loc2.query ?? {})
|
|
55
|
+
if (keys1.length !== keys2.length) {
|
|
56
|
+
return false
|
|
57
|
+
}
|
|
58
|
+
return keys1.findIndex((k) => loc1.query?.[k] !== loc2.query?.[k]) < 0
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type AnySvelteComponent = ComponentType
|
|
62
|
+
export type Component<C extends AnySvelteComponent> = Resource<C>
|
|
63
|
+
export type AnyComponent = Resource<AnySvelteComponent>
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @public
|
|
67
|
+
*
|
|
68
|
+
* Component extension points.
|
|
69
|
+
*/
|
|
70
|
+
export type ComponentExtensionId = string & { __componentPointId: true }
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Allow to pass component with some predefined properties.
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export interface AnySvelteComponentWithProps {
|
|
77
|
+
component: AnySvelteComponent
|
|
78
|
+
props?: Record<string, any>
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface Action {
|
|
82
|
+
label: IntlString
|
|
83
|
+
icon?: Asset | AnySvelteComponent
|
|
84
|
+
action: (props: any, ev: Event) => Promise<void>
|
|
85
|
+
inline?: boolean
|
|
86
|
+
link?: string
|
|
87
|
+
|
|
88
|
+
// Submenu component
|
|
89
|
+
component?: AnyComponent | AnySvelteComponent
|
|
90
|
+
props?: Record<string, any>
|
|
91
|
+
isSubmenuRightClicking?: boolean
|
|
92
|
+
|
|
93
|
+
group?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface IPopupItem {
|
|
97
|
+
_id?: number
|
|
98
|
+
title?: IntlString | undefined
|
|
99
|
+
component?: AnySvelteComponent | undefined
|
|
100
|
+
props?: Record<string, any>
|
|
101
|
+
selected?: boolean
|
|
102
|
+
action?: () => void
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface TabBase {
|
|
106
|
+
label: IntlString
|
|
107
|
+
icon?: Asset
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface Tab extends TabBase {
|
|
111
|
+
component: AnyComponent | AnySvelteComponent
|
|
112
|
+
props: any
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type TabModel = Tab[]
|
|
116
|
+
|
|
117
|
+
export interface TabItem {
|
|
118
|
+
id: string | number
|
|
119
|
+
label?: string
|
|
120
|
+
labelIntl?: IntlString
|
|
121
|
+
labelParams?: Record<string, any>
|
|
122
|
+
icon?: Asset | AnySvelteComponent
|
|
123
|
+
color?: string
|
|
124
|
+
tooltip?: IntlString
|
|
125
|
+
action?: () => void
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface BreadcrumbItem {
|
|
129
|
+
id?: string
|
|
130
|
+
icon?: Asset | AnySvelteComponent | ComponentType
|
|
131
|
+
iconProps?: any
|
|
132
|
+
iconWidth?: string
|
|
133
|
+
iconMargin?: string
|
|
134
|
+
withoutIconBackground?: boolean
|
|
135
|
+
label?: IntlString
|
|
136
|
+
title?: string
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface RadioItem {
|
|
140
|
+
id?: string
|
|
141
|
+
label?: string
|
|
142
|
+
labelGap?: 'large' | 'medium'
|
|
143
|
+
labelSize?: 'medium' | 'large'
|
|
144
|
+
labelIntl?: IntlString
|
|
145
|
+
labelParams?: Record<string, any>
|
|
146
|
+
value: any
|
|
147
|
+
disabled?: boolean
|
|
148
|
+
action?: (() => void) | (() => Promise<void>)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type ButtonBaseType = 'type-button' | 'type-button-icon'
|
|
152
|
+
|
|
153
|
+
export type ButtonBaseKind = 'primary' | 'secondary' | 'tertiary' | 'negative'
|
|
154
|
+
|
|
155
|
+
export type ButtonBaseSize = 'large' | 'medium' | 'small' | 'extra-small' | 'min'
|
|
156
|
+
|
|
157
|
+
export type ButtonKind =
|
|
158
|
+
| 'primary'
|
|
159
|
+
| 'secondary'
|
|
160
|
+
| 'positive'
|
|
161
|
+
| 'negative'
|
|
162
|
+
| 'regular'
|
|
163
|
+
| 'ghost'
|
|
164
|
+
| 'icon'
|
|
165
|
+
| 'no-border'
|
|
166
|
+
| 'link'
|
|
167
|
+
| 'link-bordered'
|
|
168
|
+
| 'dangerous'
|
|
169
|
+
| 'list'
|
|
170
|
+
| 'list-header'
|
|
171
|
+
| 'contrast'
|
|
172
|
+
| 'stepper'
|
|
173
|
+
export type ButtonSize = 'inline' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large'
|
|
174
|
+
export type ButtonShape =
|
|
175
|
+
| 'rectangle'
|
|
176
|
+
| 'rectangle-left'
|
|
177
|
+
| 'rectangle-right'
|
|
178
|
+
| 'circle'
|
|
179
|
+
| 'round'
|
|
180
|
+
| 'round2'
|
|
181
|
+
| 'round-small'
|
|
182
|
+
| 'filter'
|
|
183
|
+
| undefined
|
|
184
|
+
export type EditStyle =
|
|
185
|
+
| 'editbox'
|
|
186
|
+
| 'large-style'
|
|
187
|
+
| 'small-style'
|
|
188
|
+
| 'search-style'
|
|
189
|
+
| 'underline'
|
|
190
|
+
| 'default'
|
|
191
|
+
| 'ghost'
|
|
192
|
+
| 'default-large'
|
|
193
|
+
| 'ghost-large'
|
|
194
|
+
| 'modern-ghost-large'
|
|
195
|
+
export type HeaderAdaptive = 'default' | 'freezeActions' | 'autoExtra' | 'doubleRow' | 'disabled'
|
|
196
|
+
|
|
197
|
+
export interface ButtonItem {
|
|
198
|
+
id: string
|
|
199
|
+
icon?: Asset | AnySvelteComponent | ComponentType
|
|
200
|
+
label?: IntlString
|
|
201
|
+
labelParams?: Record<string, any>
|
|
202
|
+
disabled?: boolean
|
|
203
|
+
showTooltip?: LabelAndProps
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface PopupPositionElement {
|
|
207
|
+
getBoundingClientRect: () => DOMRect
|
|
208
|
+
position?: {
|
|
209
|
+
v: VerticalAlignment
|
|
210
|
+
h: HorizontalAlignment
|
|
211
|
+
}
|
|
212
|
+
kind?: 'submenu'
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export const posAlignment = [
|
|
216
|
+
'right',
|
|
217
|
+
'top',
|
|
218
|
+
'float',
|
|
219
|
+
'logo',
|
|
220
|
+
'logo-mini',
|
|
221
|
+
'logo-portrait',
|
|
222
|
+
'account',
|
|
223
|
+
'account-portrait',
|
|
224
|
+
'account-mobile',
|
|
225
|
+
'notify',
|
|
226
|
+
'notify-mobile',
|
|
227
|
+
'full',
|
|
228
|
+
'content',
|
|
229
|
+
'middle',
|
|
230
|
+
'help-center',
|
|
231
|
+
'centered',
|
|
232
|
+
'center',
|
|
233
|
+
'status',
|
|
234
|
+
'movable',
|
|
235
|
+
'full-centered'
|
|
236
|
+
] as const
|
|
237
|
+
|
|
238
|
+
export type PopupPosAlignment = (typeof posAlignment)[number]
|
|
239
|
+
|
|
240
|
+
export function isPopupPosAlignment (x: any): x is PopupPosAlignment {
|
|
241
|
+
return typeof x === 'string' && (posAlignment as typeof posAlignment).includes(x as PopupPosAlignment)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type PopupAlignment = PopupPosAlignment | PopupPositionElement | null
|
|
245
|
+
|
|
246
|
+
export type TooltipAlignment = 'top' | 'bottom' | 'left' | 'right'
|
|
247
|
+
export type VerticalAlignment = 'top' | 'bottom'
|
|
248
|
+
export type HorizontalAlignment = 'left' | 'right'
|
|
249
|
+
|
|
250
|
+
// Be aware to update front getResizeID() to properly store resized images.
|
|
251
|
+
export type IconSize =
|
|
252
|
+
| 'inline'
|
|
253
|
+
| 'tiny'
|
|
254
|
+
| 'card'
|
|
255
|
+
| 'xx-small'
|
|
256
|
+
| 'x-small'
|
|
257
|
+
| 'smaller'
|
|
258
|
+
| 'small'
|
|
259
|
+
| 'medium'
|
|
260
|
+
| 'large'
|
|
261
|
+
| 'x-large'
|
|
262
|
+
| '2x-large'
|
|
263
|
+
| 'full'
|
|
264
|
+
export interface IconProps {
|
|
265
|
+
icon?: number | number[]
|
|
266
|
+
size?: IconSize
|
|
267
|
+
fill?: string
|
|
268
|
+
filled?: boolean
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export function getIconSize2x (size: IconSize): IconSize {
|
|
272
|
+
switch (size) {
|
|
273
|
+
case 'inline':
|
|
274
|
+
case 'tiny':
|
|
275
|
+
case 'xx-small':
|
|
276
|
+
case 'x-small':
|
|
277
|
+
case 'small':
|
|
278
|
+
case 'card':
|
|
279
|
+
case 'smaller':
|
|
280
|
+
case 'medium':
|
|
281
|
+
return 'large'
|
|
282
|
+
case 'large':
|
|
283
|
+
return 'x-large'
|
|
284
|
+
case 'x-large':
|
|
285
|
+
return '2x-large'
|
|
286
|
+
case '2x-large':
|
|
287
|
+
case 'full':
|
|
288
|
+
return 'full'
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface DateOrShift {
|
|
293
|
+
date?: number
|
|
294
|
+
shift?: number
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export interface LabelAndProps {
|
|
298
|
+
type?: 'tooltip'
|
|
299
|
+
label?: IntlString
|
|
300
|
+
element?: HTMLElement
|
|
301
|
+
direction?: TooltipAlignment
|
|
302
|
+
component?: AnySvelteComponent | AnyComponent
|
|
303
|
+
props?: any
|
|
304
|
+
anchor?: HTMLElement
|
|
305
|
+
onUpdate?: (result: any) => void
|
|
306
|
+
kind?: 'tooltip' | 'submenu' | 'popup'
|
|
307
|
+
keys?: string[]
|
|
308
|
+
timeout?: number
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface ListItem {
|
|
312
|
+
_id: string
|
|
313
|
+
label: string
|
|
314
|
+
icon?: Asset
|
|
315
|
+
iconProps?: any
|
|
316
|
+
image?: string
|
|
317
|
+
isSelectable?: boolean
|
|
318
|
+
fontWeight?: 'normal' | 'medium' | 'semi-bold'
|
|
319
|
+
paddingLeft?: number
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface DropdownTextItem {
|
|
323
|
+
id: string
|
|
324
|
+
label: string
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface DropdownIntlItem {
|
|
328
|
+
id: string | number
|
|
329
|
+
label: IntlString
|
|
330
|
+
icon?: Asset | AnySvelteComponent | ComponentType
|
|
331
|
+
iconProps?: Record<string, any>
|
|
332
|
+
params?: Record<string, any>
|
|
333
|
+
description?: IntlString
|
|
334
|
+
paramsDescription?: Record<string, any>
|
|
335
|
+
keys?: string[]
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface PopupOptions {
|
|
339
|
+
props: Record<string, string | number>
|
|
340
|
+
showOverlay: boolean
|
|
341
|
+
direction: string
|
|
342
|
+
fullSize?: boolean
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export interface DashboardItem {
|
|
346
|
+
_id: string
|
|
347
|
+
label: string
|
|
348
|
+
values: DashboardGroup[]
|
|
349
|
+
tooltip?: LabelAndProps
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface DashboardGroup {
|
|
353
|
+
value: number
|
|
354
|
+
color: number
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
interface Sides<T> {
|
|
358
|
+
top?: T
|
|
359
|
+
bottom?: T
|
|
360
|
+
left?: T
|
|
361
|
+
right?: T
|
|
362
|
+
}
|
|
363
|
+
export interface FadeOptions {
|
|
364
|
+
multipler?: Sides<number>
|
|
365
|
+
}
|
|
366
|
+
export const defaultSP: FadeOptions = { multipler: { top: 0, bottom: 0 } }
|
|
367
|
+
export const tableSP: FadeOptions = { multipler: { top: 3, bottom: 2.5 } }
|
|
368
|
+
export const topSP: FadeOptions = { multipler: { top: 2.5, bottom: 0 } }
|
|
369
|
+
export const todosSP: FadeOptions = { multipler: { top: 3.5, bottom: 0 } }
|
|
370
|
+
export const tableHRscheduleY: FadeOptions = { multipler: { top: 5, bottom: 0 } }
|
|
371
|
+
export const issueSP: FadeOptions = { multipler: { top: 2.75, bottom: 0 } }
|
|
372
|
+
export const emojiSP: FadeOptions = { multipler: { top: 1.5, bottom: 0 } }
|
|
373
|
+
|
|
374
|
+
export type WidthType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
|
|
375
|
+
export const deviceSizes: WidthType[] = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']
|
|
376
|
+
export const deviceWidths = [480, 680, 760, 1024, 1208, -1]
|
|
377
|
+
|
|
378
|
+
export interface DeviceOptions {
|
|
379
|
+
docWidth: number
|
|
380
|
+
docHeight: number
|
|
381
|
+
isPortrait: boolean
|
|
382
|
+
isMobile: boolean
|
|
383
|
+
navigator: { visible: boolean, float: boolean, direction: 'vertical' | 'horizontal' }
|
|
384
|
+
fontSize: number
|
|
385
|
+
size: WidthType | null
|
|
386
|
+
sizes: Record<WidthType, boolean>
|
|
387
|
+
minWidth: boolean
|
|
388
|
+
twoRows: boolean
|
|
389
|
+
firstDayOfWeek: number
|
|
390
|
+
theme?: string
|
|
391
|
+
language?: string
|
|
392
|
+
replacedPanel?: HTMLElement
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface TimelineItem {
|
|
396
|
+
icon?: Asset | AnySvelteComponent
|
|
397
|
+
iconSize?: IconSize
|
|
398
|
+
iconProps?: Record<string, any>
|
|
399
|
+
presenter?: AnySvelteComponent
|
|
400
|
+
props?: Record<string, any>
|
|
401
|
+
label?: string
|
|
402
|
+
|
|
403
|
+
startDate: Timestamp
|
|
404
|
+
targetDate: Timestamp | undefined
|
|
405
|
+
}
|
|
406
|
+
export interface TimelineRow {
|
|
407
|
+
items: TimelineItem[] | undefined
|
|
408
|
+
}
|
|
409
|
+
export interface TimelinePoint {
|
|
410
|
+
date: Date
|
|
411
|
+
x: number
|
|
412
|
+
label?: string
|
|
413
|
+
}
|
|
414
|
+
export interface TimelineMinMax {
|
|
415
|
+
min: TimelinePoint
|
|
416
|
+
max: TimelinePoint
|
|
417
|
+
}
|
|
418
|
+
export type TTimelineRow = TimelineMinMax | null
|
|
419
|
+
export interface TimelineState {
|
|
420
|
+
todayMarker: TimelinePoint
|
|
421
|
+
cursorMarker?: TimelinePoint
|
|
422
|
+
offsetView: number
|
|
423
|
+
renderedRange: {
|
|
424
|
+
left: TimelinePoint
|
|
425
|
+
right: TimelinePoint
|
|
426
|
+
firstDays: number[]
|
|
427
|
+
}
|
|
428
|
+
rows: TTimelineRow[] | undefined
|
|
429
|
+
months: TimelinePoint[]
|
|
430
|
+
days: TimelinePoint[]
|
|
431
|
+
timelineBox: DOMRect
|
|
432
|
+
viewBox: DOMRect
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface WizardModel {
|
|
436
|
+
label: IntlString
|
|
437
|
+
component: AnyComponent | AnySvelteComponent
|
|
438
|
+
props?: any
|
|
439
|
+
}
|
|
440
|
+
export type WizardItemPosition = 'start' | 'middle' | 'end'
|
|
441
|
+
export type WizardItemPositionState = 'current' | 'prev' | 'next'
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* @public
|
|
445
|
+
*/
|
|
446
|
+
export interface DialogStep {
|
|
447
|
+
readonly name: IntlString
|
|
448
|
+
readonly description?: IntlString
|
|
449
|
+
readonly additionalInfo?: string
|
|
450
|
+
readonly component: AnyComponent | AnySvelteComponent
|
|
451
|
+
props?: Record<string, any>
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @public
|
|
456
|
+
*/
|
|
457
|
+
export interface CalendarItem {
|
|
458
|
+
_id: string
|
|
459
|
+
allDay: boolean
|
|
460
|
+
date: Timestamp
|
|
461
|
+
dueDate: Timestamp
|
|
462
|
+
day: number
|
|
463
|
+
access: 'freeBusyReader' | 'reader' | 'writer' | 'owner'
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export const SECOND = 1000
|
|
467
|
+
export const MINUTE = SECOND * 60
|
|
468
|
+
export const HOUR = MINUTE * 60
|
|
469
|
+
export const DAY = HOUR * 24
|
|
470
|
+
export const MONTH = DAY * 30
|
|
471
|
+
export const YEAR = MONTH * 12
|
|
472
|
+
|
|
473
|
+
export type TSeparatedItem = number | 'auto'
|
|
474
|
+
export interface SeparatedItem {
|
|
475
|
+
size: TSeparatedItem
|
|
476
|
+
minSize: TSeparatedItem
|
|
477
|
+
maxSize: TSeparatedItem
|
|
478
|
+
float?: string | undefined
|
|
479
|
+
}
|
|
480
|
+
export type DefSeparators = Array<SeparatedItem | null>
|
|
481
|
+
export interface SeparatedElement {
|
|
482
|
+
id: number
|
|
483
|
+
element: Element
|
|
484
|
+
styles: Map<string, string> | null
|
|
485
|
+
minSize: number
|
|
486
|
+
size: number
|
|
487
|
+
maxSize: number
|
|
488
|
+
begin: boolean
|
|
489
|
+
resize: boolean
|
|
490
|
+
float?: string | undefined
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @public
|
|
495
|
+
*/
|
|
496
|
+
export interface SelectPopupValueType {
|
|
497
|
+
id: number | string | null
|
|
498
|
+
icon?: Asset | AnySvelteComponent
|
|
499
|
+
iconProps?: Record<string, any>
|
|
500
|
+
iconColor?: string
|
|
501
|
+
label?: IntlString
|
|
502
|
+
text?: string
|
|
503
|
+
isSelected?: boolean
|
|
504
|
+
|
|
505
|
+
component?: AnySvelteComponent
|
|
506
|
+
props?: Record<string, any>
|
|
507
|
+
|
|
508
|
+
category?: {
|
|
509
|
+
icon?: Asset
|
|
510
|
+
label: IntlString
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @public
|
|
516
|
+
*/
|
|
517
|
+
export interface TimeZone {
|
|
518
|
+
id: string
|
|
519
|
+
continent: string
|
|
520
|
+
city: string
|
|
521
|
+
short: string
|
|
522
|
+
offset?: number
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* @public
|
|
527
|
+
*/
|
|
528
|
+
export type MouseTargetEvent = MouseEvent & { currentTarget: EventTarget & HTMLElement }
|
|
529
|
+
|
|
530
|
+
export interface ScrollParams {
|
|
531
|
+
autoScrolling: boolean
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface IWizardStep<T = string> {
|
|
535
|
+
id: T
|
|
536
|
+
title: IntlString
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export enum StateType {
|
|
540
|
+
Ghost,
|
|
541
|
+
Negative,
|
|
542
|
+
Positive,
|
|
543
|
+
Primary,
|
|
544
|
+
Regular
|
|
545
|
+
}
|