@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
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Image from 'next/image'
|
|
3
|
-
|
|
4
|
-
import type { Dimensions } from '../../types'
|
|
5
|
-
import type { ImageBlock } from '../def'
|
|
6
|
-
import { constrain, containsToken, cn } from '../../util'
|
|
7
|
-
|
|
8
|
-
import type BlockComponentProps from './block-component-props'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const ImageBlockComponent: React.FC<BlockComponentProps & {
|
|
12
|
-
constraint?: Dimensions
|
|
13
|
-
}> = ({
|
|
14
|
-
block,
|
|
15
|
-
className='',
|
|
16
|
-
agent,
|
|
17
|
-
constraint
|
|
18
|
-
}) => {
|
|
19
|
-
|
|
20
|
-
if (block.blockType !== 'image') {
|
|
21
|
-
return <>image block required</>
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const {
|
|
25
|
-
src,
|
|
26
|
-
alt,
|
|
27
|
-
dim,
|
|
28
|
-
props,
|
|
29
|
-
fullWidthOnMobile,
|
|
30
|
-
svgFillClass,
|
|
31
|
-
specifiers
|
|
32
|
-
} = block as ImageBlock
|
|
33
|
-
|
|
34
|
-
const specified = (s: string): boolean => (containsToken(specifiers, s))
|
|
35
|
-
|
|
36
|
-
const toSpread: any = {}
|
|
37
|
-
if (props?.fill === undefined) {
|
|
38
|
-
const dimCon = (constraint ? constrain(dim, constraint) : dim)
|
|
39
|
-
toSpread.width = dimCon.w
|
|
40
|
-
toSpread.height = dimCon.h
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let _alt: string
|
|
44
|
-
if (alt) {
|
|
45
|
-
_alt = alt
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
const tokens = src.split('/')
|
|
49
|
-
// Something remotely meaningful
|
|
50
|
-
_alt = (tokens.length > 0) ? tokens[tokens.length] : src
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const _svgFillClass = svgFillClass ?? ''
|
|
54
|
-
|
|
55
|
-
// TODO: use two elements with 'md:hidden' for 3/4 size
|
|
56
|
-
// https://nextjs.org/docs/app/building-your-application/optimizing/images#responsive
|
|
57
|
-
if (agent === 'phone' ) {
|
|
58
|
-
if (specified('mobile-full-width') || fullWidthOnMobile) {
|
|
59
|
-
const toSpread: any = {
|
|
60
|
-
style: {
|
|
61
|
-
width: '100%',
|
|
62
|
-
height: 'auto',
|
|
63
|
-
maxWidth: '420px'
|
|
64
|
-
},
|
|
65
|
-
sizes: '100vw',
|
|
66
|
-
}
|
|
67
|
-
// only for aspect ratio and to satisfy parser
|
|
68
|
-
toSpread.width = dim.w
|
|
69
|
-
toSpread.height = dim.h
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div className='flex flex-col items-center w-full'>
|
|
73
|
-
<Image src={src} alt={_alt} {...toSpread} className={cn(_svgFillClass, className)}/>
|
|
74
|
-
</div>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
else if (!specified('mobile-no-scale')) {
|
|
78
|
-
if (props?.style?.width === 'auto' && typeof props.style.height === 'number' ) {
|
|
79
|
-
props.style.height = props.style.height *.75
|
|
80
|
-
}
|
|
81
|
-
else if (props?.style?.height === 'auto' && typeof props?.style?.width === 'number' ) {
|
|
82
|
-
props.style.width = props.style.width *.75
|
|
83
|
-
}
|
|
84
|
-
else if (props?.style && !props?.style.width) {
|
|
85
|
-
if (dim) {
|
|
86
|
-
toSpread.width = +dim.w * .75
|
|
87
|
-
toSpread.height = +dim.h * .75
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const right = containsToken(specifiers, 'right')
|
|
94
|
-
const center = containsToken(specifiers, 'center')
|
|
95
|
-
|
|
96
|
-
const alignSelfClx = right ? 'self-end' : (center ? 'self-center' : 'self-start')
|
|
97
|
-
|
|
98
|
-
return (props?.fill) ? (
|
|
99
|
-
<div className='relative w-full h-full'>
|
|
100
|
-
<Image src={src} alt={_alt} {...toSpread} {...props} className={cn(_svgFillClass, 'max-w-[70vw] mx-auto', className)}/>
|
|
101
|
-
</div>
|
|
102
|
-
) : (
|
|
103
|
-
<Image src={src} alt={_alt} {...toSpread} {...props} className={cn(alignSelfClx, _svgFillClass, 'max-w-[70vw] mx-auto', className)}/>
|
|
104
|
-
)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export default ImageBlockComponent
|
|
108
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import AccordianBlock from './accordian-block'
|
|
2
|
-
import type BlockComponentProps from './block-component-props'
|
|
3
|
-
import Blocks from './content'
|
|
4
|
-
import CardBlock from './card-block'
|
|
5
|
-
import { default as ContentComponent, registerBlockType} from './content'
|
|
6
|
-
import CTABlock from './cta-block'
|
|
7
|
-
import EnhHeadingBlock from './enh-heading-block'
|
|
8
|
-
import GroupBlock from './group-block'
|
|
9
|
-
import HeadingBlock from './heading-block'
|
|
10
|
-
import ImageBlock from './image-block'
|
|
11
|
-
import SpaceBlock from './space-block'
|
|
12
|
-
import ScreenfulBlock from './screenful-block'
|
|
13
|
-
import VideoBlock from './video-block'
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
AccordianBlock as AccordianBlockComponent,
|
|
17
|
-
type BlockComponentProps,
|
|
18
|
-
Blocks as BlocksComponent,
|
|
19
|
-
CardBlock as CardBlockComponent,
|
|
20
|
-
ContentComponent,
|
|
21
|
-
CTABlock as CTABlockComponent,
|
|
22
|
-
EnhHeadingBlock as EnhHeadingBlockComponent,
|
|
23
|
-
GroupBlock as GroupBlockComponent,
|
|
24
|
-
HeadingBlock as HeadingBlockComponent,
|
|
25
|
-
ImageBlock as ImageBlockComponent,
|
|
26
|
-
registerBlockType,
|
|
27
|
-
SpaceBlock as SpaceBlockComponent,
|
|
28
|
-
ScreenfulBlock as ScreenfulBlockComponent,
|
|
29
|
-
VideoBlock as VideoBlockComponent,
|
|
30
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react'
|
|
2
|
-
|
|
3
|
-
import type { Block, ScreenfulBlock} from '../../def'
|
|
4
|
-
import { containsToken, cn } from '../../../util'
|
|
5
|
-
import ContentComponent from '../content'
|
|
6
|
-
|
|
7
|
-
const ContentColumn: React.FC<{
|
|
8
|
-
blocks: Block[]
|
|
9
|
-
specifiers?: string
|
|
10
|
-
agent?: string
|
|
11
|
-
className?: string
|
|
12
|
-
}> = ({
|
|
13
|
-
blocks,
|
|
14
|
-
specifiers,
|
|
15
|
-
agent,
|
|
16
|
-
className='',
|
|
17
|
-
}) => {
|
|
18
|
-
|
|
19
|
-
const specified = (s: string) => (containsToken(specifiers, s))
|
|
20
|
-
|
|
21
|
-
let modifiers = ''
|
|
22
|
-
|
|
23
|
-
if (agent !== 'phone') {
|
|
24
|
-
if (specified('right')) {
|
|
25
|
-
modifiers += 'items-end '
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
else if (specified('center')) {
|
|
29
|
-
modifiers += 'items-center '
|
|
30
|
-
}
|
|
31
|
-
// default to left
|
|
32
|
-
else {
|
|
33
|
-
modifiers += 'items-start '
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
// default to left
|
|
37
|
-
else {
|
|
38
|
-
modifiers += 'items-start '
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (agent !== 'phone') {
|
|
42
|
-
if (specified('bottom')) {
|
|
43
|
-
modifiers += 'justify-end '
|
|
44
|
-
}
|
|
45
|
-
else if (specified('vert-center')) {
|
|
46
|
-
modifiers += 'justify-center '
|
|
47
|
-
}
|
|
48
|
-
// default to top
|
|
49
|
-
else {
|
|
50
|
-
modifiers += 'justify-start '
|
|
51
|
-
}
|
|
52
|
-
// right aligned text looks shitty on mobile
|
|
53
|
-
if (specified('text-align-right')) {
|
|
54
|
-
modifiers += 'text-right '
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
modifiers += 'text-left '
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
if (specified('mobile-vert-center')) {
|
|
62
|
-
modifiers += 'justify-center '
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
modifiers += 'justify-start '
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (agent === 'phone' && specified('mobile-center-headings')) {
|
|
70
|
-
modifiers += 'typography-headings:text-center '
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<div className={cn('flex flex-col justify-center ' + modifiers, className)} >
|
|
75
|
-
<ContentComponent blocks={blocks} agent={agent} />
|
|
76
|
-
</div>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const Content: React.FC<{
|
|
81
|
-
block: ScreenfulBlock
|
|
82
|
-
agent?: string
|
|
83
|
-
className?: string
|
|
84
|
-
}> = ({
|
|
85
|
-
block: b,
|
|
86
|
-
agent,
|
|
87
|
-
className='',
|
|
88
|
-
}) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const layoutClx = 'flex flex-col gap-6 ' + ((agent !== 'phone') ? ('md:grid md:gap-8 ' + `md:grid-cols-${b.contentColumns.length} `) : '')
|
|
92
|
-
|
|
93
|
-
const orderclx = (columnIndex: number): string => {
|
|
94
|
-
const orderIndex = b.mobileOrder?.indexOf(columnIndex)
|
|
95
|
-
return (orderIndex && orderIndex >= 0) ? `order-${orderIndex} md:order-none` : '' // one-based in flexbox slec
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return b.contentColumns.length == 1 ? (
|
|
99
|
-
<ContentColumn
|
|
100
|
-
blocks={b.contentColumns[0]}
|
|
101
|
-
specifiers={b.columnSpecifiers?.[0]}
|
|
102
|
-
agent={agent}
|
|
103
|
-
className={cn(className)}
|
|
104
|
-
/>
|
|
105
|
-
) : (
|
|
106
|
-
<div className={cn(layoutClx, className)}>
|
|
107
|
-
{b.contentColumns.map((column, index) => (
|
|
108
|
-
<ContentColumn
|
|
109
|
-
blocks={column}
|
|
110
|
-
specifiers={b.columnSpecifiers?.[index]}
|
|
111
|
-
agent={agent}
|
|
112
|
-
className={orderclx(index)}
|
|
113
|
-
key={index}
|
|
114
|
-
/>
|
|
115
|
-
))}
|
|
116
|
-
</div>
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export default Content
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import dynamic from 'next/dynamic'
|
|
3
|
-
|
|
4
|
-
import type { Block, ScreenfulBlock, VideoBlock } from '../../def'
|
|
5
|
-
import { containsToken, cn } from '../../../util'
|
|
6
|
-
import { ApplyTypography } from '../../../primitives'
|
|
7
|
-
|
|
8
|
-
import Poster from './poster-background'
|
|
9
|
-
import Content from './content'
|
|
10
|
-
const Video = dynamic(() => (import('./video-background')), {ssr: false, loading: () => (<></>)})
|
|
11
|
-
|
|
12
|
-
const ScreenfulComponent: React.FC<{
|
|
13
|
-
block: Block
|
|
14
|
-
agent?: string
|
|
15
|
-
initialInView?: boolean
|
|
16
|
-
snapTile?: boolean
|
|
17
|
-
className?: string
|
|
18
|
-
}> = ({
|
|
19
|
-
block,
|
|
20
|
-
agent,
|
|
21
|
-
initialInView=false,
|
|
22
|
-
snapTile=false,
|
|
23
|
-
className=''
|
|
24
|
-
}) => {
|
|
25
|
-
|
|
26
|
-
if (block.blockType !== 'screenful') {
|
|
27
|
-
return <>screenful block required</>
|
|
28
|
-
}
|
|
29
|
-
const b = block as ScreenfulBlock
|
|
30
|
-
|
|
31
|
-
const hasBannerVideo = (): boolean => (!!b.banner && (typeof b.banner === 'object'))
|
|
32
|
-
|
|
33
|
-
const tileHeight = (agent === 'desktop') ? 'h-full ' : 'h-[100svh] '
|
|
34
|
-
|
|
35
|
-
const specified = (s: string) => (containsToken(b.specifiers, s))
|
|
36
|
-
const narrowGutters = specified('narrow-gutters') // eg, for a table object that is large
|
|
37
|
-
|
|
38
|
-
// content wrapper clx:
|
|
39
|
-
// [
|
|
40
|
-
// positioning,
|
|
41
|
-
// p&m,
|
|
42
|
-
// p&m-modifiers
|
|
43
|
-
// ]
|
|
44
|
-
const cwclx = [
|
|
45
|
-
'z-10 xl:mx-auto max-w-screen-xl overflow-y-hidden ',
|
|
46
|
-
// desktop header: 80px / pt-20
|
|
47
|
-
// mobile header: 44px / pt-11
|
|
48
|
-
narrowGutters ?
|
|
49
|
-
'px-6 lg:px-8 2xl:px-2 pb-6 pt-15 md:pt-26 lg:pt-28 '
|
|
50
|
-
:
|
|
51
|
-
'px-[8vw] xl:px-[1vw] pb-[8vh] pt-[calc(44px+4vh)] md:pt-[calc(80px+6vh)] ',
|
|
52
|
-
|
|
53
|
-
(agent && agent !== 'desktop') ? 'pt-15 sm:pt-17 pb-0 px-3 sm:px-8' : ''
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
const spreadId = (b.anchorId) ? {id: b.anchorId} : {}
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<section {...spreadId} className={cn((snapTile ? 'snap-start snap-always h-[100vh]' : 'min-h-screen'), className)}>
|
|
60
|
-
<ApplyTypography className={cn('w-full flex flex-row justify-center self-stretch', snapTile ? tileHeight : '')} >
|
|
61
|
-
<Poster banner={b.banner}>
|
|
62
|
-
{hasBannerVideo() && (
|
|
63
|
-
<Video
|
|
64
|
-
block={b.banner! as VideoBlock}
|
|
65
|
-
className='z-0 absolute top-0 left-0 bottom-0 right-0'
|
|
66
|
-
initialInView={initialInView}
|
|
67
|
-
/>
|
|
68
|
-
)}
|
|
69
|
-
<div className={cn(...cwclx, snapTile ? 'absolute left-0 right-0 top-0 bottom-0' : 'flex min-h-screen w-full')} >
|
|
70
|
-
<Content block={b} agent={agent} className='w-full'/>
|
|
71
|
-
{b.footer}
|
|
72
|
-
</div>
|
|
73
|
-
</Poster>
|
|
74
|
-
</ApplyTypography>
|
|
75
|
-
</section>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export default ScreenfulComponent
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react'
|
|
2
|
-
|
|
3
|
-
import type { VideoBlock } from '../../def'
|
|
4
|
-
import { cn } from '../../../util'
|
|
5
|
-
|
|
6
|
-
const Poster: React.FC<{
|
|
7
|
-
banner: VideoBlock | string | undefined,
|
|
8
|
-
className?: string
|
|
9
|
-
} & PropsWithChildren> = ({
|
|
10
|
-
children,
|
|
11
|
-
banner,
|
|
12
|
-
className=''
|
|
13
|
-
}) => (
|
|
14
|
-
banner ? (
|
|
15
|
-
<div
|
|
16
|
-
className={cn('relative', className)}
|
|
17
|
-
style={{
|
|
18
|
-
height: '100%',
|
|
19
|
-
width: '100%',
|
|
20
|
-
backgroundImage: `url(${(typeof banner === 'string') ? banner : banner.poster!})`,
|
|
21
|
-
backgroundSize: 'cover',
|
|
22
|
-
backgroundRepeat: 'no-repeat',
|
|
23
|
-
}}
|
|
24
|
-
>
|
|
25
|
-
{children}
|
|
26
|
-
</div>
|
|
27
|
-
) : (
|
|
28
|
-
<div className={cn('bg-transparent h-full w-full relative', className)}>
|
|
29
|
-
{children}
|
|
30
|
-
</div>
|
|
31
|
-
)
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
export default Poster
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { useInView } from 'react-intersection-observer'
|
|
5
|
-
|
|
6
|
-
import type { VideoBlock } from '../../def'
|
|
7
|
-
|
|
8
|
-
const VideoBG: React.FC<{
|
|
9
|
-
block: VideoBlock,
|
|
10
|
-
className?: string,
|
|
11
|
-
initialInView: boolean
|
|
12
|
-
}> = ({
|
|
13
|
-
block,
|
|
14
|
-
className='',
|
|
15
|
-
initialInView
|
|
16
|
-
}) => {
|
|
17
|
-
const { ref, inView } = useInView({
|
|
18
|
-
threshold: 0.75,
|
|
19
|
-
initialInView,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
return block ? (
|
|
23
|
-
<div ref={ref} className={className}>
|
|
24
|
-
{inView && (
|
|
25
|
-
<video
|
|
26
|
-
autoPlay
|
|
27
|
-
loop
|
|
28
|
-
muted
|
|
29
|
-
style={{
|
|
30
|
-
margin: 0,
|
|
31
|
-
height: '100%',
|
|
32
|
-
width: '100%',
|
|
33
|
-
objectFit: 'cover',
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
{block.sources?.map((src, index) => (
|
|
37
|
-
<source key={index} src={src} />
|
|
38
|
-
))}
|
|
39
|
-
</video>
|
|
40
|
-
)}
|
|
41
|
-
</div>
|
|
42
|
-
) : null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default VideoBG
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { ldMerge, cn } from '../../util'
|
|
4
|
-
|
|
5
|
-
import type { Breakpoint } from '../../types'
|
|
6
|
-
import { SPACE_DEFAULTS , type TWSpaceUnit, type HeadingLevel} from '../def/space-block'
|
|
7
|
-
import type SpaceBlock from '../def/space-block'
|
|
8
|
-
import { ApplyTypography } from '../../primitives'
|
|
9
|
-
|
|
10
|
-
import type BlockComponentProps from './block-component-props'
|
|
11
|
-
|
|
12
|
-
const TAGS = [
|
|
13
|
-
'div',
|
|
14
|
-
'h1',
|
|
15
|
-
'h2',
|
|
16
|
-
'h3',
|
|
17
|
-
'h4',
|
|
18
|
-
'h5',
|
|
19
|
-
'h6',
|
|
20
|
-
] satisfies React.ElementType[]
|
|
21
|
-
|
|
22
|
-
const SpaceBlockComponent: React.FC<BlockComponentProps> = ({
|
|
23
|
-
block,
|
|
24
|
-
className=''
|
|
25
|
-
}) => {
|
|
26
|
-
|
|
27
|
-
if (block && block.blockType !== 'space') {
|
|
28
|
-
return <>space block required</>
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const b = block as SpaceBlock
|
|
32
|
-
|
|
33
|
-
// This code path should handle a undefined or empty sizes field.
|
|
34
|
-
if (!b.level) {
|
|
35
|
-
if (typeof b.sizes == 'number') {
|
|
36
|
-
return <div className={cn(`invisible w-[1px] h-${b.sizes}`, className) } />
|
|
37
|
-
}
|
|
38
|
-
const _sizes: {
|
|
39
|
-
[key in (Breakpoint)]?: TWSpaceUnit
|
|
40
|
-
} = {}
|
|
41
|
-
ldMerge(_sizes, SPACE_DEFAULTS, b.sizes)
|
|
42
|
-
|
|
43
|
-
let clx = ''
|
|
44
|
-
for (const [key, value] of Object.entries(_sizes)) {
|
|
45
|
-
// ts brain fart!
|
|
46
|
-
clx += `${key}:h-${value as TWSpaceUnit} `
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (b.test) {
|
|
50
|
-
console.log(clx)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return <div className={cn('invisible w-[1px] ' + clx, className)} />
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const Tag = TAGS[b.level]
|
|
57
|
-
const heightClx = (b.level === (0 satisfies HeadingLevel as HeadingLevel)) ? 'h-4' : ''
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<ApplyTypography className={className}>
|
|
61
|
-
<Tag className={'invisible m-0 ' + heightClx} > </Tag>
|
|
62
|
-
</ApplyTypography>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export default SpaceBlockComponent
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React, { useEffect, useLayoutEffect, useState } from 'react'
|
|
3
|
-
|
|
4
|
-
import Image from 'next/image'
|
|
5
|
-
|
|
6
|
-
import type { Dimensions, TShirtSize, TShirtDimensions } from '../../types'
|
|
7
|
-
import { constrain, asNum, cn } from '../../util'
|
|
8
|
-
import type { VideoBlock } from '../def'
|
|
9
|
-
import { VideoPlayer } from '../../primitives'
|
|
10
|
-
|
|
11
|
-
import type BlockComponentProps from './block-component-props'
|
|
12
|
-
|
|
13
|
-
const VideoBlockComponent: React.FC<BlockComponentProps & {
|
|
14
|
-
usePoster?: boolean
|
|
15
|
-
size?: TShirtSize
|
|
16
|
-
constraint?: Dimensions
|
|
17
|
-
}> = ({
|
|
18
|
-
block,
|
|
19
|
-
className='',
|
|
20
|
-
agent,
|
|
21
|
-
usePoster=false,
|
|
22
|
-
size='md',
|
|
23
|
-
constraint
|
|
24
|
-
}) => {
|
|
25
|
-
|
|
26
|
-
const [_dim, setDim] = useState<Dimensions | undefined>(undefined)
|
|
27
|
-
|
|
28
|
-
const onResize = () => {
|
|
29
|
-
setDim({
|
|
30
|
-
w: window.innerWidth,
|
|
31
|
-
h: window.innerHeight
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const windowDefined = typeof window !== 'undefined'
|
|
36
|
-
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (window && agent === 'desktop') {
|
|
39
|
-
window.addEventListener('resize', onResize)
|
|
40
|
-
return () => window.removeEventListener('resize', onResize)
|
|
41
|
-
}
|
|
42
|
-
}, [windowDefined])
|
|
43
|
-
|
|
44
|
-
useLayoutEffect(() => {
|
|
45
|
-
onResize()
|
|
46
|
-
}, [])
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (block.blockType !== 'video') {
|
|
50
|
-
return <>video block required</>
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const b = block as VideoBlock
|
|
54
|
-
const ar = asNum(b.dim.md.w) / asNum(b.dim.md.h)
|
|
55
|
-
if (agent === 'phone') {
|
|
56
|
-
if (b.sizing?.mobile?.vw) {
|
|
57
|
-
// serverside, or at least while the video is loading,
|
|
58
|
-
// generate the css for the correctly sized poster image
|
|
59
|
-
if (!_dim) {
|
|
60
|
-
const width = `${b.sizing.mobile.vw}vw`
|
|
61
|
-
return <div className='dummy-div' style={{
|
|
62
|
-
maxWidth: '100%',
|
|
63
|
-
maxHeight: '100%',
|
|
64
|
-
width,
|
|
65
|
-
height: `calc(${width}/${ar})`,
|
|
66
|
-
backgroundImage: `url(${b.poster!})`,
|
|
67
|
-
backgroundSize: 'contain',
|
|
68
|
-
backgroundRepeat: 'no-repeat',
|
|
69
|
-
}} />
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
const width = ((b.sizing.mobile.vw / 100) * asNum(_dim.w))
|
|
73
|
-
const dim = {
|
|
74
|
-
h: width / ar,
|
|
75
|
-
w: width
|
|
76
|
-
}
|
|
77
|
-
return ((
|
|
78
|
-
<VideoPlayer
|
|
79
|
-
className={cn('mx-auto', className)}
|
|
80
|
-
sources={b.sources}
|
|
81
|
-
width={dim.w}
|
|
82
|
-
height={dim.h}
|
|
83
|
-
{...b.videoProps}
|
|
84
|
-
/>
|
|
85
|
-
))
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else if (b.sizing?.vh) {
|
|
90
|
-
// serverside, generate the css for the correctly sized poster image
|
|
91
|
-
if (!_dim) {
|
|
92
|
-
const height = `${b.sizing.vh}vh`
|
|
93
|
-
return <div className='dummy-div' style={{
|
|
94
|
-
maxWidth: '100%',
|
|
95
|
-
maxHeight: '100%',
|
|
96
|
-
height: height,
|
|
97
|
-
width: `calc(${height}*${ar})`,
|
|
98
|
-
backgroundImage: `url(${b.poster!})`,
|
|
99
|
-
backgroundSize: 'contain',
|
|
100
|
-
backgroundRepeat: 'no-repeat',
|
|
101
|
-
}} />
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
const height = ((b.sizing.vh / 100) * asNum(_dim.h))
|
|
105
|
-
const dim = {
|
|
106
|
-
h: height,
|
|
107
|
-
w: height * ar
|
|
108
|
-
}
|
|
109
|
-
return ((
|
|
110
|
-
<VideoPlayer
|
|
111
|
-
className={cn('mx-auto', className)}
|
|
112
|
-
sources={b.sources}
|
|
113
|
-
width={dim.w}
|
|
114
|
-
height={dim.h}
|
|
115
|
-
{...b.videoProps}
|
|
116
|
-
/>
|
|
117
|
-
))
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const videoDims = b.dim as TShirtDimensions
|
|
122
|
-
const dim = ((size && size in videoDims) ? videoDims[size] : videoDims.md) as Dimensions
|
|
123
|
-
const conDim = (constraint ? constrain(dim, constraint) : dim)
|
|
124
|
-
return usePoster ? (
|
|
125
|
-
<Image src={b.poster!} alt='image' width={conDim.w} height={conDim.h} className={className}/>
|
|
126
|
-
) : (
|
|
127
|
-
<VideoPlayer
|
|
128
|
-
className={cn('mx-auto', className)}
|
|
129
|
-
sources={b.sources}
|
|
130
|
-
width={conDim.w}
|
|
131
|
-
height={conDim.h}
|
|
132
|
-
{...b.videoProps}
|
|
133
|
-
/>
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export default VideoBlockComponent
|
package/blocks/def/block.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type Block from './block'
|
|
2
|
-
|
|
3
|
-
import type { BulletItem, GridDef } from '../../types'
|
|
4
|
-
|
|
5
|
-
interface BulletCardsBlock extends Block {
|
|
6
|
-
blockType: 'bullet-cards'
|
|
7
|
-
/**
|
|
8
|
-
* no-card-border
|
|
9
|
-
* borders-muted-1 / borders-muted-3
|
|
10
|
-
* default: 2
|
|
11
|
-
*/
|
|
12
|
-
specifiers?: string
|
|
13
|
-
grid: GridDef
|
|
14
|
-
cards: BulletItem[]
|
|
15
|
-
/** in px */
|
|
16
|
-
iconSize?: number
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
type BulletCardsBlock as default
|
|
21
|
-
}
|
package/blocks/def/card-block.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { type Icon } from '../../types'
|
|
4
|
-
|
|
5
|
-
import type CTABlock from './cta-block'
|
|
6
|
-
import type Block from './block'
|
|
7
|
-
import type ImageBlock from './image-block'
|
|
8
|
-
import type VideoBlock from './video-block'
|
|
9
|
-
|
|
10
|
-
interface CardBlock extends Block {
|
|
11
|
-
blockType: 'card'
|
|
12
|
-
specifiers?: string // 'media-left' or 'appear-disabled' or 'no-borders', etc... can be combined
|
|
13
|
-
title?: string
|
|
14
|
-
byline?: string
|
|
15
|
-
icon?: Icon // for title area
|
|
16
|
-
iconAfter?: boolean
|
|
17
|
-
media?: ImageBlock | VideoBlock
|
|
18
|
-
content?: React.ReactNode
|
|
19
|
-
cta?: CTABlock
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
type CardBlock as default
|
|
24
|
-
}
|