@hanzo/ui 0.5.24 → 0.6.15

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.
Files changed (568) hide show
  1. package/.eslintrc.js +4 -0
  2. package/.prettierrc +22 -0
  3. package/.rush/temp/chunked-rush-logs/ui._phase_build.chunks.jsonl +2 -0
  4. package/.rush/temp/chunked-rush-logs/ui._phase_validate.chunks.jsonl +11 -0
  5. package/.rush/temp/hcengineering+ui-_phase_build-16380278e5d28b32a6666092bd103ddbd2c66a56.tar.log +12 -0
  6. package/.rush/temp/hcengineering+ui-_phase_build-16380278e5d28b32a6666092bd103ddbd2c66a56.untar.log +10 -0
  7. package/.rush/temp/hcengineering+ui-_phase_validate-8f047ca66e6a4a177eee65782e723a7dc128d73e.tar.log +65 -0
  8. package/.rush/temp/hcengineering+ui-_phase_validate-8f047ca66e6a4a177eee65782e723a7dc128d73e.untar.log +10 -0
  9. package/.rush/temp/operation/_phase_build/all.log +2 -0
  10. package/.rush/temp/operation/_phase_build/log-chunks.jsonl +2 -0
  11. package/.rush/temp/operation/_phase_build/state.json +3 -0
  12. package/.rush/temp/operation/_phase_validate/all.log +11 -0
  13. package/.rush/temp/operation/_phase_validate/log-chunks.jsonl +11 -0
  14. package/.rush/temp/operation/_phase_validate/state.json +3 -0
  15. package/.rush/temp/shrinkwrap-deps.json +585 -0
  16. package/.validate/tsBuildInfoFile.info +1 -0
  17. package/.validate/validate-err.log +0 -0
  18. package/.validate/validate.log +0 -0
  19. package/CHANGELOG.json +17 -0
  20. package/CHANGELOG.md +9 -0
  21. package/config/rig.json +5 -0
  22. package/jest.config.js +5 -0
  23. package/lang/cs.json +119 -0
  24. package/lang/de.json +119 -0
  25. package/lang/en.json +120 -0
  26. package/lang/es.json +120 -0
  27. package/lang/fr.json +120 -0
  28. package/lang/it.json +120 -0
  29. package/lang/pt.json +120 -0
  30. package/lang/ru.json +120 -0
  31. package/lang/zh.json +120 -0
  32. package/package.json +52 -100
  33. package/postcss.config.js +5 -0
  34. package/rush-logs/ui._phase_build.cache.log +4 -0
  35. package/rush-logs/ui._phase_build.log +2 -0
  36. package/rush-logs/ui._phase_validate.cache.log +4 -0
  37. package/rush-logs/ui._phase_validate.log +11 -0
  38. package/src/__test__/location.test.ts +12 -0
  39. package/src/colors.ts +552 -0
  40. package/src/components/AccordionItem.svelte +132 -0
  41. package/src/components/ActionIcon.svelte +88 -0
  42. package/src/components/BarDashboard.svelte +47 -0
  43. package/src/components/BooleanIcon.svelte +31 -0
  44. package/src/components/Breadcrumb.svelte +102 -0
  45. package/src/components/Breadcrumbs.svelte +73 -0
  46. package/src/components/Button.svelte +196 -0
  47. package/src/components/ButtonBase.svelte +117 -0
  48. package/src/components/ButtonGroup.svelte +48 -0
  49. package/src/components/ButtonIcon.svelte +63 -0
  50. package/src/components/ButtonMenu.svelte +103 -0
  51. package/src/components/ButtonWithDropdown.svelte +120 -0
  52. package/src/components/CheckBox.svelte +239 -0
  53. package/src/components/CheckBoxList.svelte.txt +88 -0
  54. package/src/components/CheckBoxWithLabel.svelte.txt +147 -0
  55. package/src/components/Chevron.svelte +85 -0
  56. package/src/components/Chip.svelte +109 -0
  57. package/src/components/CircleButton.svelte +165 -0
  58. package/src/components/CodeForm.svelte +164 -0
  59. package/src/components/CodeInput.svelte +86 -0
  60. package/src/components/ColorPopup.svelte +119 -0
  61. package/src/components/Component.svelte +152 -0
  62. package/src/components/Dialog.svelte +105 -0
  63. package/src/components/Dock.svelte +53 -0
  64. package/src/components/Dropdown.svelte +91 -0
  65. package/src/components/DropdownLabels.svelte +156 -0
  66. package/src/components/DropdownLabelsIntl.svelte +108 -0
  67. package/src/components/DropdownLabelsPopup.svelte +148 -0
  68. package/src/components/DropdownLabelsPopupIntl.svelte +72 -0
  69. package/src/components/DropdownPopup.svelte +146 -0
  70. package/src/components/DropdownRecord.svelte +50 -0
  71. package/src/components/DropdownRecordPopup.svelte +82 -0
  72. package/src/components/EditBox.svelte +211 -0
  73. package/src/components/EditWithIcon.svelte +130 -0
  74. package/src/components/EmbeddedPDF.svelte +88 -0
  75. package/src/components/ErrorPopup.svelte +27 -0
  76. package/src/components/ErrorPresenter.svelte +32 -0
  77. package/src/components/ExpandCollapse.svelte +42 -0
  78. package/src/components/Expandable.svelte +90 -0
  79. package/src/components/FocusHandler.svelte +21 -0
  80. package/src/components/Fold.svelte +52 -0
  81. package/src/components/Grid.svelte +39 -0
  82. package/src/components/Header.svelte +260 -0
  83. package/src/components/HlsVideo.svelte +170 -0
  84. package/src/components/Hotkey.svelte +50 -0
  85. package/src/components/HotkeyGroup.svelte +25 -0
  86. package/src/components/Html.svelte +24 -0
  87. package/src/components/Icon.svelte +45 -0
  88. package/src/components/IconWithEmoji.svelte +74 -0
  89. package/src/components/Image.svelte +71 -0
  90. package/src/components/Label.svelte +38 -0
  91. package/src/components/Lazy.svelte +29 -0
  92. package/src/components/Like.svelte +73 -0
  93. package/src/components/Link.svelte +75 -0
  94. package/src/components/LinkWrapper.svelte +35 -0
  95. package/src/components/ListView.svelte +153 -0
  96. package/src/components/ListViewItem.svelte +84 -0
  97. package/src/components/Loading.svelte +88 -0
  98. package/src/components/Menu.svelte +205 -0
  99. package/src/components/MiniToggle.svelte +125 -0
  100. package/src/components/Modal.svelte +117 -0
  101. package/src/components/ModeSelector.svelte +37 -0
  102. package/src/components/ModernButton.svelte +61 -0
  103. package/src/components/ModernCheckbox.svelte +123 -0
  104. package/src/components/ModernDialog.svelte +258 -0
  105. package/src/components/ModernEditbox.svelte +256 -0
  106. package/src/components/ModernPopup.svelte +105 -0
  107. package/src/components/ModernRadioButton.svelte +111 -0
  108. package/src/components/ModernTab.svelte +184 -0
  109. package/src/components/ModernToggle.svelte +153 -0
  110. package/src/components/MouseSpeedTracker.svelte +74 -0
  111. package/src/components/MultiProgress.svelte +97 -0
  112. package/src/components/NavGroup.svelte +160 -0
  113. package/src/components/NavItem.svelte +346 -0
  114. package/src/components/NestedDropdown.svelte +62 -0
  115. package/src/components/NestedMenu.svelte +119 -0
  116. package/src/components/NotificationToast.svelte +112 -0
  117. package/src/components/NumberInput.svelte +200 -0
  118. package/src/components/Panel.svelte +324 -0
  119. package/src/components/PanelInstance.svelte +254 -0
  120. package/src/components/PlainTextEditor.svelte +100 -0
  121. package/src/components/Popup.svelte +50 -0
  122. package/src/components/PopupInstance.svelte +390 -0
  123. package/src/components/PopupMenu.svelte +120 -0
  124. package/src/components/Progress.svelte +124 -0
  125. package/src/components/ProgressCircle.svelte +71 -0
  126. package/src/components/RadioButton.svelte +69 -0
  127. package/src/components/RadioGroup.svelte +42 -0
  128. package/src/components/RootStatusComponent.svelte +65 -0
  129. package/src/components/Row.svelte +25 -0
  130. package/src/components/ScrollBox.svelte +98 -0
  131. package/src/components/Scroller.svelte +1063 -0
  132. package/src/components/ScrollerBar.svelte +181 -0
  133. package/src/components/SearchEdit.svelte +46 -0
  134. package/src/components/SearchInput.svelte +213 -0
  135. package/src/components/SearchPicker.svelte +114 -0
  136. package/src/components/Section.svelte +49 -0
  137. package/src/components/SectionEmpty.svelte +38 -0
  138. package/src/components/SelectBox.svelte +76 -0
  139. package/src/components/SelectPopup.svelte +217 -0
  140. package/src/components/Separator.svelte +736 -0
  141. package/src/components/ShowMore.svelte +99 -0
  142. package/src/components/Spinner.svelte +72 -0
  143. package/src/components/SplitButton.svelte +100 -0
  144. package/src/components/StateTag.svelte +79 -0
  145. package/src/components/Status.svelte +33 -0
  146. package/src/components/StepsDialog.svelte +290 -0
  147. package/src/components/StylishEdit.svelte +127 -0
  148. package/src/components/Submenu.svelte +68 -0
  149. package/src/components/Switcher.svelte +55 -0
  150. package/src/components/SwitcherBase.svelte +116 -0
  151. package/src/components/TabList.svelte +290 -0
  152. package/src/components/Tabs.svelte +45 -0
  153. package/src/components/TabsControl.svelte +113 -0
  154. package/src/components/TextArea.svelte +110 -0
  155. package/src/components/TextAreaEditor.svelte +78 -0
  156. package/src/components/TimeLeft.svelte +66 -0
  157. package/src/components/TimeShiftPicker.svelte +84 -0
  158. package/src/components/TimeShiftPopup.svelte +64 -0
  159. package/src/components/TimeShiftPresenter.svelte +59 -0
  160. package/src/components/TimeSince.svelte +86 -0
  161. package/src/components/TimeZonesPopup.svelte +185 -0
  162. package/src/components/Timeline.svelte +754 -0
  163. package/src/components/Toggle.svelte +116 -0
  164. package/src/components/ToggleButton.svelte +176 -0
  165. package/src/components/ToggleWithLabel.svelte +58 -0
  166. package/src/components/TooltipInstance.svelte +613 -0
  167. package/src/components/Video.svelte +40 -0
  168. package/src/components/calendar/DateInputBox.svelte +430 -0
  169. package/src/components/calendar/DatePicker.svelte +46 -0
  170. package/src/components/calendar/DatePopup.svelte +274 -0
  171. package/src/components/calendar/DatePresenter.svelte +392 -0
  172. package/src/components/calendar/DateRangePicker.svelte +50 -0
  173. package/src/components/calendar/DateRangePopup.svelte +76 -0
  174. package/src/components/calendar/DateRangePresenter.svelte +779 -0
  175. package/src/components/calendar/DateTimePresenter.svelte +23 -0
  176. package/src/components/calendar/DateTimeRangePresenter.svelte +28 -0
  177. package/src/components/calendar/DueDatePopup.svelte +93 -0
  178. package/src/components/calendar/DueDatePresenter.svelte +83 -0
  179. package/src/components/calendar/Month.svelte +243 -0
  180. package/src/components/calendar/MonthCalendar.svelte +138 -0
  181. package/src/components/calendar/MonthSquare.svelte +315 -0
  182. package/src/components/calendar/RangeDatePopup.svelte +231 -0
  183. package/src/components/calendar/Shifts.svelte +114 -0
  184. package/src/components/calendar/SimpleDatePopup.svelte +42 -0
  185. package/src/components/calendar/SimpleTimePopup.svelte +41 -0
  186. package/src/components/calendar/TimeInputBox.svelte +282 -0
  187. package/src/components/calendar/TimePopup.svelte +62 -0
  188. package/src/components/calendar/WeekCalendar.svelte +116 -0
  189. package/src/components/calendar/YearCalendar.svelte +67 -0
  190. package/src/components/calendar/icons/DPCalendar.svelte +12 -0
  191. package/src/components/calendar/icons/DPCalendarOver.svelte +15 -0
  192. package/src/components/calendar/icons/DPClock.svelte +13 -0
  193. package/src/components/calendar/icons/DPClockBold.svelte +10 -0
  194. package/src/components/calendar/icons/DPEnd.svelte +13 -0
  195. package/src/components/calendar/icons/DPSetCalendar.svelte +10 -0
  196. package/src/components/calendar/icons/DPStart.svelte +13 -0
  197. package/src/components/calendar/internal/DateUtils.ts +186 -0
  198. package/src/components/emoji/ActionsPopup.svelte +116 -0
  199. package/src/components/emoji/EmojiButton.svelte +146 -0
  200. package/src/components/emoji/EmojiGroup.svelte +105 -0
  201. package/src/components/emoji/EmojiGroupPalette.svelte +58 -0
  202. package/src/components/emoji/EmojiPopup.svelte +430 -0
  203. package/src/components/emoji/SkinTonePopup.svelte +40 -0
  204. package/src/components/emoji/SkinToneTooltip.svelte +36 -0
  205. package/src/components/emoji/icons/Activities.svelte +20 -0
  206. package/src/components/emoji/icons/AnimalsAndNature.svelte +16 -0
  207. package/src/components/emoji/icons/Flags.svelte +14 -0
  208. package/src/components/emoji/icons/FoodAndDrink.svelte +20 -0
  209. package/src/components/emoji/icons/FrequentlyUsed.svelte +17 -0
  210. package/src/components/emoji/icons/GettingWorkDone.svelte +14 -0
  211. package/src/components/emoji/icons/Objects.svelte +15 -0
  212. package/src/components/emoji/icons/Search.svelte +14 -0
  213. package/src/components/emoji/icons/SmileysAndPeople.svelte +23 -0
  214. package/src/components/emoji/icons/Symbols.svelte +23 -0
  215. package/src/components/emoji/icons/TravelAndPlaces.svelte +17 -0
  216. package/src/components/emoji/index.ts +97 -0
  217. package/src/components/emoji/store.ts +44 -0
  218. package/src/components/emoji/types.ts +34 -0
  219. package/src/components/emoji/utils.ts +182 -0
  220. package/src/components/icons/Activity.svelte +16 -0
  221. package/src/components/icons/ActivityEdit.svelte +25 -0
  222. package/src/components/icons/Add.svelte +10 -0
  223. package/src/components/icons/ArrowLeft.svelte +25 -0
  224. package/src/components/icons/ArrowRight.svelte +25 -0
  225. package/src/components/icons/Attachment.svelte +29 -0
  226. package/src/components/icons/Back.svelte +32 -0
  227. package/src/components/icons/BlueCheck.svelte +11 -0
  228. package/src/components/icons/Calendar.svelte +10 -0
  229. package/src/components/icons/Check.svelte +12 -0
  230. package/src/components/icons/CheckAll.svelte +27 -0
  231. package/src/components/icons/CheckCircle.svelte +12 -0
  232. package/src/components/icons/Checkmark.svelte +26 -0
  233. package/src/components/icons/ChevronDown.svelte +27 -0
  234. package/src/components/icons/ChevronLeft.svelte +22 -0
  235. package/src/components/icons/ChevronRight.svelte +22 -0
  236. package/src/components/icons/CircleAdd.svelte +13 -0
  237. package/src/components/icons/Circles.svelte +43 -0
  238. package/src/components/icons/Close.svelte +10 -0
  239. package/src/components/icons/ColStar.svelte +31 -0
  240. package/src/components/icons/CollapseArrow.svelte +8 -0
  241. package/src/components/icons/Copy.svelte +10 -0
  242. package/src/components/icons/Delete.svelte +18 -0
  243. package/src/components/icons/Description.svelte +31 -0
  244. package/src/components/icons/Details.svelte +36 -0
  245. package/src/components/icons/DetailsFilled.svelte +27 -0
  246. package/src/components/icons/Down.svelte +8 -0
  247. package/src/components/icons/DownOutline.svelte +8 -0
  248. package/src/components/icons/Dropdown.svelte +8 -0
  249. package/src/components/icons/DropdownDown.svelte +24 -0
  250. package/src/components/icons/DropdownRight.svelte +24 -0
  251. package/src/components/icons/Edit.svelte +26 -0
  252. package/src/components/icons/Emoji.svelte +10 -0
  253. package/src/components/icons/Error.svelte +27 -0
  254. package/src/components/icons/Expand.svelte +10 -0
  255. package/src/components/icons/File.svelte +25 -0
  256. package/src/components/icons/Filter.svelte +26 -0
  257. package/src/components/icons/Folder.svelte +13 -0
  258. package/src/components/icons/FolderCollapsed.svelte +34 -0
  259. package/src/components/icons/FolderExpanded.svelte +34 -0
  260. package/src/components/icons/Forward.svelte +8 -0
  261. package/src/components/icons/HalfUpDown.svelte +7 -0
  262. package/src/components/icons/History.svelte +10 -0
  263. package/src/components/icons/Info.svelte +26 -0
  264. package/src/components/icons/KeyCommand.svelte +12 -0
  265. package/src/components/icons/KeyOption.svelte +8 -0
  266. package/src/components/icons/KeyShift.svelte +8 -0
  267. package/src/components/icons/Left.svelte +10 -0
  268. package/src/components/icons/Like.svelte +25 -0
  269. package/src/components/icons/Link.svelte +10 -0
  270. package/src/components/icons/MaxWidth.svelte +27 -0
  271. package/src/components/icons/Maximize.svelte +25 -0
  272. package/src/components/icons/MenuClose.svelte +28 -0
  273. package/src/components/icons/MenuOpen.svelte +26 -0
  274. package/src/components/icons/MinWidth.svelte +27 -0
  275. package/src/components/icons/Minimize.svelte +28 -0
  276. package/src/components/icons/Mixin.svelte +38 -0
  277. package/src/components/icons/MoreH.svelte +16 -0
  278. package/src/components/icons/MoreV.svelte +16 -0
  279. package/src/components/icons/MoreV2.svelte +29 -0
  280. package/src/components/icons/NavNext.svelte +10 -0
  281. package/src/components/icons/NavPrev.svelte +10 -0
  282. package/src/components/icons/Open.svelte +11 -0
  283. package/src/components/icons/OpenedArrow.svelte +26 -0
  284. package/src/components/icons/Options.svelte +12 -0
  285. package/src/components/icons/Redo.svelte +10 -0
  286. package/src/components/icons/Right.svelte +26 -0
  287. package/src/components/icons/Scale.svelte +13 -0
  288. package/src/components/icons/ScaleFull.svelte +13 -0
  289. package/src/components/icons/Scribble.svelte +10 -0
  290. package/src/components/icons/Search.svelte +12 -0
  291. package/src/components/icons/Send.svelte +10 -0
  292. package/src/components/icons/Settings.svelte +13 -0
  293. package/src/components/icons/Share.svelte +13 -0
  294. package/src/components/icons/SquareExpand.svelte +13 -0
  295. package/src/components/icons/Start.svelte +10 -0
  296. package/src/components/icons/Stop.svelte +8 -0
  297. package/src/components/icons/TableOfContents.svelte +35 -0
  298. package/src/components/icons/Thread.svelte +29 -0
  299. package/src/components/icons/ToDetails.svelte +28 -0
  300. package/src/components/icons/Undo.svelte +10 -0
  301. package/src/components/icons/Up.svelte +8 -0
  302. package/src/components/icons/UpOutline.svelte +8 -0
  303. package/src/components/internal/Clock.svelte +42 -0
  304. package/src/components/internal/ClockFace.svelte +148 -0
  305. package/src/components/internal/ClockPopup.svelte +91 -0
  306. package/src/components/internal/ErrorBoundary.ts +33 -0
  307. package/src/components/internal/ErrorComponent.svelte +37 -0
  308. package/src/components/internal/Root.svelte +323 -0
  309. package/src/components/internal/RootBarExtension.svelte +32 -0
  310. package/src/components/internal/Settings.svelte +39 -0
  311. package/src/components/internal/SettingsPopup.svelte +196 -0
  312. package/src/components/internal/ThemeButton.svelte +151 -0
  313. package/src/components/internal/icons/CheckCircled.svelte +11 -0
  314. package/src/components/internal/icons/Computer.svelte +15 -0
  315. package/src/components/internal/icons/FontSize.svelte +13 -0
  316. package/src/components/internal/icons/Language.svelte +17 -0
  317. package/src/components/internal/icons/Phone.svelte +18 -0
  318. package/src/components/internal/icons/Search.svelte +12 -0
  319. package/src/components/internal/icons/Settings.svelte +13 -0
  320. package/src/components/internal/icons/Theme.svelte +9 -0
  321. package/src/components/internal/icons/WiFi.svelte +21 -0
  322. package/src/components/notifications/Notification.svelte +34 -0
  323. package/src/components/notifications/Notification.ts +16 -0
  324. package/src/components/notifications/NotificationPosition.ts +6 -0
  325. package/src/components/notifications/NotificationSeverity.ts +6 -0
  326. package/src/components/notifications/Notifications.svelte +53 -0
  327. package/src/components/notifications/actions.ts +42 -0
  328. package/src/components/notifications/store.ts +16 -0
  329. package/src/components/wizard/ModernWizardBar.svelte +105 -0
  330. package/src/components/wizard/ModernWizardDialog.svelte +144 -0
  331. package/src/components/wizard/Wizard.svelte +59 -0
  332. package/src/components/wizard/WizardStep.svelte +144 -0
  333. package/src/focus.ts +139 -0
  334. package/src/index.ts +338 -0
  335. package/src/lazy.ts +93 -0
  336. package/src/location.ts +259 -0
  337. package/src/modals.ts +5 -0
  338. package/src/panelup.ts +70 -0
  339. package/src/plugin.ts +156 -0
  340. package/src/popups.ts +486 -0
  341. package/src/resize.ts +179 -0
  342. package/src/svg.d.ts +4 -0
  343. package/src/tooltips.ts +152 -0
  344. package/src/types.ts +545 -0
  345. package/src/utils.ts +420 -0
  346. package/svelte.config.js +5 -0
  347. package/tsconfig.json +9 -0
  348. package/types/__test__/location.test.d.ts +2 -0
  349. package/types/__test__/location.test.d.ts.map +1 -0
  350. package/types/colors.d.ts +163 -0
  351. package/types/colors.d.ts.map +1 -0
  352. package/types/components/calendar/internal/DateUtils.d.ts +34 -0
  353. package/types/components/calendar/internal/DateUtils.d.ts.map +1 -0
  354. package/types/components/emoji/index.d.ts +11 -0
  355. package/types/components/emoji/index.d.ts.map +1 -0
  356. package/types/components/emoji/store.d.ts +12 -0
  357. package/types/components/emoji/store.d.ts.map +1 -0
  358. package/types/components/emoji/types.d.ts +20 -0
  359. package/types/components/emoji/types.d.ts.map +1 -0
  360. package/types/components/emoji/utils.d.ts +17 -0
  361. package/types/components/emoji/utils.d.ts.map +1 -0
  362. package/types/components/internal/ErrorBoundary.d.ts +5 -0
  363. package/types/components/internal/ErrorBoundary.d.ts.map +1 -0
  364. package/types/components/notifications/Notification.d.ts +16 -0
  365. package/types/components/notifications/Notification.d.ts.map +1 -0
  366. package/types/components/notifications/NotificationPosition.d.ts +7 -0
  367. package/types/components/notifications/NotificationPosition.d.ts.map +1 -0
  368. package/types/components/notifications/NotificationSeverity.d.ts +7 -0
  369. package/types/components/notifications/NotificationSeverity.d.ts.map +1 -0
  370. package/types/components/notifications/actions.d.ts +6 -0
  371. package/types/components/notifications/actions.d.ts.map +1 -0
  372. package/types/components/notifications/store.d.ts +9 -0
  373. package/types/components/notifications/store.d.ts.map +1 -0
  374. package/types/focus.d.ts +32 -0
  375. package/types/focus.d.ts.map +1 -0
  376. package/types/index.d.ts +254 -0
  377. package/types/index.d.ts.map +1 -0
  378. package/types/lazy.d.ts +6 -0
  379. package/types/lazy.d.ts.map +1 -0
  380. package/types/location.d.ts +38 -0
  381. package/types/location.d.ts.map +1 -0
  382. package/types/modals.d.ts +5 -0
  383. package/types/modals.d.ts.map +1 -0
  384. package/types/panelup.d.ts +17 -0
  385. package/types/panelup.d.ts.map +1 -0
  386. package/types/plugin.d.ts +135 -0
  387. package/types/plugin.d.ts.map +1 -0
  388. package/types/popups.d.ts +65 -0
  389. package/types/popups.d.ts.map +1 -0
  390. package/types/resize.d.ts +32 -0
  391. package/types/resize.d.ts.map +1 -0
  392. package/types/tooltips.d.ts +8 -0
  393. package/types/tooltips.d.ts.map +1 -0
  394. package/types/types.d.ts +373 -0
  395. package/types/types.d.ts.map +1 -0
  396. package/types/utils.d.ts +125 -0
  397. package/types/utils.d.ts.map +1 -0
  398. package/assets/lux-site-icons/android-chrome-192x192.png +0 -0
  399. package/assets/lux-site-icons/android-chrome-512x512.png +0 -0
  400. package/assets/lux-site-icons/apple-touch-icon.png +0 -0
  401. package/assets/lux-site-icons/favicon-16x16.png +0 -0
  402. package/assets/lux-site-icons/favicon-32x32.png +0 -0
  403. package/assets/lux-site-icons/favicon.ico +0 -0
  404. package/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf +0 -0
  405. package/assets/standard-docs/LUX-Privacy-Policy.pdf +0 -0
  406. package/blocks/components/accordian-block.tsx +0 -48
  407. package/blocks/components/block-component-props.ts +0 -11
  408. package/blocks/components/bullet-cards-block.tsx +0 -45
  409. package/blocks/components/card-block.tsx +0 -213
  410. package/blocks/components/carte-blanche-block/index.tsx +0 -127
  411. package/blocks/components/carte-blanche-block/variant-content-left.tsx +0 -49
  412. package/blocks/components/content.tsx +0 -70
  413. package/blocks/components/cta-block.tsx +0 -98
  414. package/blocks/components/enh-heading-block.tsx +0 -205
  415. package/blocks/components/grid-block/grid-block-mutator.ts +0 -12
  416. package/blocks/components/grid-block/index.tsx +0 -83
  417. package/blocks/components/grid-block/mutator-registry.ts +0 -10
  418. package/blocks/components/grid-block/table-borders.mutator.ts +0 -47
  419. package/blocks/components/group-block.tsx +0 -83
  420. package/blocks/components/heading-block.tsx +0 -88
  421. package/blocks/components/image-block.tsx +0 -108
  422. package/blocks/components/index.ts +0 -30
  423. package/blocks/components/screenful-block/content.tsx +0 -120
  424. package/blocks/components/screenful-block/index.tsx +0 -79
  425. package/blocks/components/screenful-block/poster-background.tsx +0 -34
  426. package/blocks/components/screenful-block/video-background.tsx +0 -45
  427. package/blocks/components/space-block.tsx +0 -66
  428. package/blocks/components/video-block.tsx +0 -137
  429. package/blocks/def/accordian-block.ts +0 -14
  430. package/blocks/def/block.ts +0 -7
  431. package/blocks/def/bullet-cards-block.ts +0 -21
  432. package/blocks/def/card-block.ts +0 -24
  433. package/blocks/def/carte-blanche-block.ts +0 -21
  434. package/blocks/def/cta-block.ts +0 -19
  435. package/blocks/def/element-block.ts +0 -11
  436. package/blocks/def/enh-heading-block.ts +0 -45
  437. package/blocks/def/grid-block.ts +0 -16
  438. package/blocks/def/group-block.ts +0 -11
  439. package/blocks/def/heading-block.ts +0 -15
  440. package/blocks/def/image-block.ts +0 -31
  441. package/blocks/def/index.ts +0 -35
  442. package/blocks/def/screenful-block.ts +0 -54
  443. package/blocks/def/space-block.ts +0 -64
  444. package/blocks/def/video-block.ts +0 -28
  445. package/blocks/index.ts +0 -2
  446. package/common/chat-widget.tsx +0 -75
  447. package/common/contact-dialog/contact-form.tsx +0 -111
  448. package/common/contact-dialog/disclaimer.tsx +0 -13
  449. package/common/contact-dialog/index.tsx +0 -48
  450. package/common/copyright.tsx +0 -21
  451. package/common/drawer-menu.tsx +0 -51
  452. package/common/footer.tsx +0 -77
  453. package/common/head-metadata/from-next/metadata-types.ts +0 -158
  454. package/common/head-metadata/from-next/opengraph-types.ts +0 -267
  455. package/common/head-metadata/from-next/twitter-types.ts +0 -92
  456. package/common/head-metadata/index.tsx +0 -208
  457. package/common/header/index.tsx +0 -57
  458. package/common/header/mobile-nav.tsx +0 -72
  459. package/common/header/theme-toggle.tsx +0 -26
  460. package/common/icons/github.tsx +0 -14
  461. package/common/icons/index.tsx +0 -34
  462. package/common/icons/lux-logo.tsx +0 -10
  463. package/common/icons/secure-delivery.tsx +0 -13
  464. package/common/icons/social-icon.tsx +0 -35
  465. package/common/icons/youtube-logo.tsx +0 -59
  466. package/common/index.ts +0 -14
  467. package/common/logo.tsx +0 -71
  468. package/common/mini-chart/index.tsx +0 -8
  469. package/common/mini-chart/mini-chart-props.ts +0 -44
  470. package/common/mini-chart/mini-chart.tsx +0 -76
  471. package/common/mini-chart/wrapper.tsx +0 -23
  472. package/context-providers/index.ts +0 -1
  473. package/context-providers/theme-provider.tsx +0 -20
  474. package/next/README.md +0 -11
  475. package/next/analytics/fpixel.ts +0 -16
  476. package/next/analytics/pixel-analytics.tsx +0 -55
  477. package/next/determine-device-middleware.ts +0 -16
  478. package/next/fonts/DrukTextWide-Bold-Trial.otf +0 -0
  479. package/next/fonts/DrukTextWide-Heavy-Trial.otf +0 -0
  480. package/next/fonts/DrukTextWide-Medium-Trial.otf +0 -0
  481. package/next/fonts/DrukWide-Bold-Trial.otf +0 -0
  482. package/next/fonts/DrukWide-Heavy-Trial.otf +0 -0
  483. package/next/fonts/DrukWide-Medium-Trial.otf +0 -0
  484. package/next/get-app-router-font-classes.ts +0 -12
  485. package/next/load-and-return-lux-next-fonts-on-import.ts +0 -94
  486. package/next/next-font-desc.ts +0 -28
  487. package/next/not-found-content.mdx +0 -4
  488. package/next/not-found.tsx +0 -23
  489. package/next/pages-router-font-vars.tsx +0 -18
  490. package/next/root-layout.tsx +0 -60
  491. package/primitives/accordion.tsx +0 -61
  492. package/primitives/action-button.tsx +0 -46
  493. package/primitives/apply-typography.tsx +0 -55
  494. package/primitives/avatar.tsx +0 -49
  495. package/primitives/badge.tsx +0 -36
  496. package/primitives/button.tsx +0 -73
  497. package/primitives/calendar.tsx +0 -72
  498. package/primitives/card.tsx +0 -83
  499. package/primitives/checkbox.tsx +0 -32
  500. package/primitives/command.tsx +0 -155
  501. package/primitives/dialog-video-controller.tsx +0 -38
  502. package/primitives/dialog.tsx +0 -152
  503. package/primitives/form.tsx +0 -179
  504. package/primitives/index.ts +0 -144
  505. package/primitives/inline-icon.tsx +0 -37
  506. package/primitives/input.tsx +0 -30
  507. package/primitives/label.tsx +0 -28
  508. package/primitives/link-element.tsx +0 -104
  509. package/primitives/main.tsx +0 -17
  510. package/primitives/mdx-link.tsx +0 -22
  511. package/primitives/nav-items.tsx +0 -48
  512. package/primitives/popover.tsx +0 -35
  513. package/primitives/progress.tsx +0 -27
  514. package/primitives/scroll-area.tsx +0 -47
  515. package/primitives/select.tsx +0 -169
  516. package/primitives/separator.tsx +0 -29
  517. package/primitives/sheet.tsx +0 -175
  518. package/primitives/skeleton.tsx +0 -15
  519. package/primitives/switch.tsx +0 -33
  520. package/primitives/table.tsx +0 -117
  521. package/primitives/tabs.tsx +0 -60
  522. package/primitives/tailwind-indicator.tsx +0 -19
  523. package/primitives/text-area.tsx +0 -26
  524. package/primitives/toast.tsx +0 -129
  525. package/primitives/toaster.tsx +0 -37
  526. package/primitives/use-toast.ts +0 -192
  527. package/primitives/video-player.tsx +0 -26
  528. package/primitives/youtube-embed.tsx +0 -83
  529. package/siteDef/footer/community.tsx +0 -67
  530. package/siteDef/footer/company.ts +0 -37
  531. package/siteDef/footer/ecosystem.ts +0 -37
  532. package/siteDef/footer/index.tsx +0 -26
  533. package/siteDef/footer/legal.ts +0 -28
  534. package/siteDef/footer/network.ts +0 -33
  535. package/siteDef/footer/svg/warpcast-logo.svg +0 -12
  536. package/siteDef/main-nav.ts +0 -35
  537. package/style/globals.css +0 -13
  538. package/style/hanzo-common.css +0 -32
  539. package/style/hanzo-default-colors.css +0 -79
  540. package/style/social-svg.css +0 -3
  541. package/tailwind/colors.tailwind.js +0 -46
  542. package/tailwind/fonts.tailwind.ts +0 -31
  543. package/tailwind/index.ts +0 -18
  544. package/tailwind/lux-tw-fonts.ts +0 -37
  545. package/tailwind/safelist.tailwind.js +0 -26
  546. package/tailwind/screens.tailwind.js +0 -8
  547. package/tailwind/spacing.tailwind.js +0 -65
  548. package/tailwind/tailwind.config.base.js +0 -906
  549. package/tailwind/tw-font-desc.ts +0 -15
  550. package/tailwind/typo-plugin/get-plugin-styles.js +0 -676
  551. package/tailwind/typo-plugin/index.d.ts +0 -9
  552. package/tailwind/typo-plugin/index.js +0 -141
  553. package/tailwind/typo-plugin/utils.js +0 -60
  554. package/tailwind/typography-test.mdx +0 -36
  555. package/types/breakpoints.ts +0 -11
  556. package/types/bullet-item.ts +0 -10
  557. package/types/button-def.ts +0 -39
  558. package/types/contact-info.ts +0 -11
  559. package/types/dimensions.ts +0 -20
  560. package/types/grid-def.ts +0 -56
  561. package/types/icon.ts +0 -10
  562. package/types/image-def.ts +0 -28
  563. package/types/index.ts +0 -29
  564. package/types/link-def.ts +0 -59
  565. package/types/site-def.ts +0 -34
  566. package/types/t-shirt-size.ts +0 -5
  567. package/util/index.ts +0 -81
  568. package/util/specifier.ts +0 -43
@@ -1,141 +0,0 @@
1
- import plugin from 'tailwindcss/plugin'
2
- import merge from 'lodash.merge'
3
- import castArray from 'lodash.castarray'
4
- import getStyles from './get-plugin-styles'
5
- import { commonTrailingPseudos } from './utils'
6
-
7
- let baseFontSize = 16
8
-
9
- const computed = {
10
- // Reserved for future "magic properties", for example:
11
- // bulletColor: (color) => ({ 'ul > li::before': { backgroundColor: color } }),
12
- }
13
-
14
- function inWhere(selector, { className, modifier, prefix }) {
15
- let prefixedNot = prefix(`.not-${className}`).slice(1)
16
- let selectorPrefix = selector.startsWith('>')
17
- ? `${modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`} `
18
- : ''
19
-
20
- // Parse the selector, if every component ends in the same pseudo element(s) then move it to the end
21
- let [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector)
22
-
23
- if (trailingPseudo) {
24
- return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}`
25
- }
26
-
27
- return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))`
28
- }
29
-
30
- function isObject(value) {
31
- return typeof value === 'object' && value !== null
32
- }
33
-
34
- function configToCss(config = {}, { target, className, modifier, prefix }) {
35
- function updateSelector(k, v) {
36
- if (target === 'legacy') {
37
- return [k, v]
38
- }
39
-
40
- if (Array.isArray(v)) {
41
- return [k, v]
42
- }
43
-
44
- if (isObject(v)) {
45
- let nested = Object.values(v).some(isObject)
46
- if (nested) {
47
- return [
48
- inWhere(k, { className, modifier, prefix }),
49
- v,
50
- Object.fromEntries(Object.entries(v).map(([k, v]) => updateSelector(k, v))),
51
- ]
52
- }
53
-
54
- return [inWhere(k, { className, modifier, prefix }), v]
55
- }
56
-
57
- return [k, v]
58
- }
59
-
60
- return Object.fromEntries(
61
- Object.entries(
62
- merge(
63
- {},
64
- ...Object.keys(config)
65
- .filter((key) => computed[key])
66
- .map((key) => computed[key](config[key])),
67
- ...castArray(config.css || {})
68
- )
69
- ).map(([k, v]) => updateSelector(k, v))
70
- )
71
- }
72
-
73
- export default plugin.withOptions(
74
- ({ className = 'prose', target = 'modern', base = 16 } = {}) => {
75
- baseFontSize = base
76
- return function ({ addVariant, addComponents, theme, prefix }) {
77
- let modifiers = theme('typography')
78
-
79
- let options = { className, prefix }
80
-
81
- for (let [name, ...selectors] of [
82
- ['headings', 'h1', 'h2', 'h3', /* 'h4', 'h5', 'h6', 'th' */],
83
- ['h1'],
84
- ['h2'],
85
- ['h3'],
86
- ['h4'],
87
- ['h5'],
88
- ['h6'],
89
- ['p'],
90
- ['a'],
91
- ['blockquote'],
92
- ['figure'],
93
- ['figcaption'],
94
- ['strong'],
95
- ['em'],
96
- ['code'],
97
- ['pre'],
98
- ['ol'],
99
- ['ul'],
100
- ['li'],
101
- ['table'],
102
- ['thead'],
103
- ['tr'],
104
- ['th'],
105
- ['td'],
106
- ['img'],
107
- ['video'],
108
- ['hr'],
109
- ]) {
110
- selectors = selectors.length === 0 ? [name] : selectors
111
-
112
- let selector =
113
- target === 'legacy' ? selectors.map((selector) => `& ${selector}`) : selectors.join(', ')
114
-
115
- addVariant(
116
- `${className}-${name}`,
117
- target === 'legacy' ? selector : `& :is(${inWhere(selector, options)})`
118
- )
119
- }
120
-
121
- addComponents(
122
- Object.keys(modifiers).map((modifier) => ({
123
- [modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`]: configToCss(
124
- modifiers[modifier],
125
- {
126
- target,
127
- className,
128
- modifier,
129
- prefix,
130
- }
131
- ),
132
- }))
133
- )
134
- }
135
- },
136
- () => {
137
- return {
138
- theme: { typography: getStyles(baseFontSize) },
139
- }
140
- }
141
- )
@@ -1,60 +0,0 @@
1
- import isPlainObject from 'lodash.isplainobject'
2
- import parser from 'postcss-selector-parser'
3
-
4
- const parseSelector = parser()
5
-
6
- export function isUsableColor(color, values) {
7
- return isPlainObject(values) && color !== 'gray' && values[600]
8
- }
9
-
10
- /**
11
- * @param {string} selector
12
- */
13
- export function commonTrailingPseudos(selector) {
14
- let ast = parseSelector.astSync(selector)
15
-
16
- /** @type {import('postcss-selector-parser').Pseudo[][]} */
17
- let matrix = []
18
-
19
- // Put the pseudo elements in reverse order in a sparse, column-major 2D array
20
- for (let [i, sel] of ast.nodes.entries()) {
21
- for (const [j, child] of [...sel.nodes].reverse().entries()) {
22
- // We only care about pseudo elements
23
- if (child.type !== 'pseudo' || !child.value.startsWith('::')) {
24
- break
25
- }
26
-
27
- matrix[j] = matrix[j] || []
28
- matrix[j][i] = child
29
- }
30
- }
31
-
32
- let trailingPseudos = parser.selector()
33
-
34
- // At this point the pseudo elements are in a column-major 2D array
35
- // This means each row contains one "column" of pseudo elements from each selector
36
- // We can compare all the pseudo elements in a row to see if they are the same
37
- for (const pseudos of matrix) {
38
- // It's a sparse 2D array so there are going to be holes in the rows
39
- // We skip those
40
- if (!pseudos) {
41
- continue
42
- }
43
-
44
- let values = new Set([...pseudos.map((p) => p.value)])
45
-
46
- // The pseudo elements are not the same
47
- if (values.size > 1) {
48
- break
49
- }
50
-
51
- pseudos.forEach((pseudo) => pseudo.remove())
52
- trailingPseudos.prepend(pseudos[0])
53
- }
54
-
55
- if (trailingPseudos.nodes.length) {
56
- return [trailingPseudos.toString(), ast.toString()]
57
- }
58
-
59
- return [null, selector]
60
- }
@@ -1,36 +0,0 @@
1
- import Link from '@hanzo/ui/common/link-element'
2
-
3
- ###### In a galaxy far, far away
4
- ##### Join the global rush to own silver
5
- #### And the global rush to gold
6
- ### As well as the rush to crypto
7
- ## THE SILVER RUSH IS HERE
8
- # THE GOLD RUSH IS HERE
9
-
10
-
11
- *Lorem* ipsum dolor sit amet, **consectetur** adipiscing elit, sed do eiusmod tempor
12
- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
13
- nostrud exercitation ullamco
14
- laboris nisi ut aliquip ex ea commodo consequat.
15
-
16
- 1) Duis aute irure
17
- 2) dolor in reprehenderit
18
- 3) in voluptate velit esse
19
-
20
- Cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
21
-
22
- - sunt in culpa
23
- - qui officia deserunt
24
- - mollit anim id est laborum.
25
-
26
- Lorem ipsum dolor sit [amet]('/'), adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
27
-
28
- <Link
29
- def={{
30
- title: 'Enter App',
31
- href: 'https://app.lux.market',
32
- external: 'true',
33
- variant: 'primary',
34
- }}
35
- size='lg'
36
- />
@@ -1,11 +0,0 @@
1
- // @ts-nocheck
2
-
3
- import bps from '../tailwind/screens.tailwind'
4
-
5
- type Breakpoint = keyof typeof bps
6
- const Breakpoints = Object.keys(bps)
7
-
8
- export {
9
- Breakpoints,
10
- type Breakpoint
11
- }
@@ -1,10 +0,0 @@
1
- import type { Icon } from '.'
2
-
3
- interface BulletItem {
4
- text: string,
5
- icon?: Icon | string // Icon = ReactNode; ReactNode can be a string
6
- }
7
-
8
- export {
9
- type BulletItem as default
10
- }
@@ -1,39 +0,0 @@
1
- import { type ButtonProps } from '../primitives/button'
2
-
3
- type SubmitServerAction = (data: any, enclosure?: any) => Promise<void>
4
-
5
- interface ButtonModalProps {
6
- open: boolean
7
- onOpenChange: (b: boolean) => void
8
- buttonText: string
9
- buttonProps: ButtonProps
10
- title: string
11
- byline?: string
12
- action: SubmitServerAction
13
- actionEnclosure?: any
14
- }
15
-
16
- interface ButtonModalDef {
17
- Comp: React.ComponentType<ButtonModalProps>
18
- title: string
19
- props?: any
20
- byline?: string
21
- action?: SubmitServerAction
22
- actionEnclosure?: any
23
- }
24
-
25
- interface ButtonDef {
26
- text: string
27
- props: ButtonProps
28
- action: {
29
- type: 'modal' /* | future: other types */
30
- def: ButtonModalDef /* | future: other supported specifiers, such as Server Actions, or UI Actions or ? */
31
- }
32
- }
33
-
34
- export {
35
- type ButtonDef,
36
- type SubmitServerAction,
37
- type ButtonModalProps,
38
- type ButtonModalDef,
39
- }
@@ -1,11 +0,0 @@
1
- interface ContactInfo {
2
- email: string
3
- phone?: string
4
- }
5
-
6
- type ContactInfoFields = keyof ContactInfo
7
-
8
- export {
9
- type ContactInfo,
10
- type ContactInfoFields
11
- }
@@ -1,20 +0,0 @@
1
- // From Next Image Dim
2
- type Dimensions = {
3
- w: number | `${number}`
4
- h: number | `${number}`
5
- }
6
-
7
- type TShirtDimensions = {
8
- xs?: Dimensions
9
- sm?: Dimensions
10
- md: Dimensions
11
- lg?: Dimensions
12
- xl?: Dimensions
13
- }
14
-
15
- export {
16
- type Dimensions,
17
- type TShirtDimensions
18
- }
19
-
20
-
package/types/grid-def.ts DELETED
@@ -1,56 +0,0 @@
1
- import type { Breakpoint } from './breakpoints'
2
-
3
- type GridColumnSpec = number | { columns: number, gap: number}
4
-
5
- interface GridDef {
6
- /** Must define in ACCENDING order. */
7
- at: {
8
- [key in (Breakpoint)]?: GridColumnSpec
9
- },
10
- mobile?: GridColumnSpec
11
- }
12
-
13
- const COMMON_GRID_1_COL = {
14
- at: {
15
- xs: { columns: 1, gap: 2 },
16
- md: { columns: 1, gap: 3 },
17
- lg: { columns: 1, gap: 6 }
18
- },
19
- mobile: { columns: 1, gap: 2 }
20
- }
21
-
22
- const COMMON_GRID_2_COL = {
23
- at: {
24
- xs: {columns: 1, gap: 2},
25
- md: {columns: 2, gap: 3},
26
- lg: {columns: 2, gap: 6}
27
- },
28
- mobile: {columns: 1, gap: 2}
29
- } as GridDef
30
-
31
- const COMMON_GRID_3_COL = {
32
- at: {
33
- xs: {columns: 1, gap: 2},
34
- md: {columns: 3, gap: 3},
35
- lg: {columns: 3, gap: 6}
36
- },
37
- mobile: {columns: 1, gap: 2}
38
- } as GridDef
39
-
40
- const COMMON_GRID_4_COL = {
41
- at: {
42
- xs: {columns: 1, gap: 2},
43
- md: {columns: 2, gap: 3},
44
- lg: {columns: 4, gap: 6}
45
- },
46
- mobile: {columns: 1, gap: 2}
47
- } as GridDef
48
-
49
- export {
50
- type GridDef as default,
51
- type GridColumnSpec,
52
- COMMON_GRID_1_COL,
53
- COMMON_GRID_2_COL,
54
- COMMON_GRID_3_COL,
55
- COMMON_GRID_4_COL
56
- }
package/types/icon.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from 'react'
2
-
3
- //import type { LucideIcon} from 'lucide-react'
4
- //import type { SocialIconProps } from '@/components/icons/social-icon'
5
-
6
- type Icon = ReactNode
7
-
8
- export {
9
- type Icon as default
10
- }
@@ -1,28 +0,0 @@
1
- import type { Dimensions } from './dimensions'
2
-
3
- /**
4
- * Defines a in image to render.
5
- * ImageDef is part of {@link LinkDef}
6
- */
7
- interface ImageDef {
8
- /** image url */
9
- src: string
10
- /** defaults to short filename */
11
- alt?: string
12
- /**
13
- * Tailwind class for svg files (usually a text-<color>).
14
- * All affect 'fill' props in the svg file
15
- * must be set to 'currentColor'.
16
- */
17
- svgFillClass?: string
18
- /** rendered dim, unless style prop overrides
19
- * in which case the file resolution should
20
- * be supplied so that both Next and the browser
21
- * can determine the aspect ratio
22
- */
23
- dim: Dimensions
24
- }
25
-
26
- export {
27
- type ImageDef as default
28
- }
package/types/index.ts DELETED
@@ -1,29 +0,0 @@
1
- export { type Breakpoint, Breakpoints } from './breakpoints'
2
- export {
3
- type ButtonDef,
4
- type SubmitServerAction,
5
- type ButtonModalProps,
6
- type ButtonModalDef,
7
- } from './button-def'
8
-
9
- export { COMMON_GRID_1_COL, COMMON_GRID_2_COL, COMMON_GRID_3_COL, COMMON_GRID_4_COL } from './grid-def'
10
- export type {default as GridDef, GridColumnSpec} from './grid-def'
11
- export type { TShirtDimensions, Dimensions } from './dimensions'
12
- export type { ContactInfo, ContactInfoFields } from './contact-info'
13
-
14
- import type BulletItem from './bullet-item'
15
- import type Icon from './icon'
16
- import type ImageDef from './image-def'
17
- import type LinkDef from './link-def'
18
- import type SiteDef from './site-def'
19
- import type TShirtSize from './t-shirt-size'
20
-
21
- export {
22
- type BulletItem,
23
- type Icon,
24
- type ImageDef,
25
- type LinkDef,
26
- type SiteDef,
27
- type TShirtSize,
28
- }
29
-
package/types/link-def.ts DELETED
@@ -1,59 +0,0 @@
1
- import type { ButtonVariants, ButtonSizes } from '../primitives/button'
2
- import type { Icon } from '.'
3
-
4
- /**
5
- * A Conf object for the LinkElement primitive.
6
- *
7
- *
8
- */
9
- interface LinkDef {
10
- /**
11
- * If the LinkElement is rendered directly and has children,
12
- * the title, icon, iconAfter fields in the supplied LinkDef
13
- * will be ignored.
14
- */
15
- title?: string
16
-
17
- /**
18
- * If the LinkElement is rendered directly and has children,
19
- * the title, icon, iconAfter fields in the supplied LinkDef
20
- * will be ignored.
21
- */
22
- icon?: Icon
23
-
24
- /**
25
- * If the LinkElement is rendered directly and has children,
26
- * the title, icon, iconAfter fields in the supplied LinkDef
27
- * will be ignored.
28
- */
29
- iconAfter?: boolean
30
-
31
- href: string
32
-
33
- /**
34
- * @deprecated This field no longer has an effect as
35
- * the related logic just checks for the presence of 'http'
36
- * at the start of the URL string
37
- */
38
- external?: boolean
39
-
40
- /**
41
- * External links will open in a new tab (via target='_blank') by default,
42
- * while internal ones will open in the same tab.
43
- * @field newTab overrides these defaults in both cases.
44
- * ('external' means the url starts with 'http')
45
- */
46
- newTab?: boolean
47
-
48
- /**
49
- * rendered as a disabled link, shows default cursor, and eats pointer events.
50
- */
51
- disabled?: boolean
52
-
53
- variant?: ButtonVariants
54
- size?: ButtonSizes
55
- }
56
-
57
- export {
58
- type LinkDef as default
59
- }
package/types/site-def.ts DELETED
@@ -1,34 +0,0 @@
1
- import type LinkDef from './link-def'
2
-
3
- interface SiteDef {
4
- /** url of this site. All nav links in the system will show it in 'current' state */
5
- currentAs?: string
6
- nav: {
7
- /** common elements (will auto-select currentAs if it's provide) */
8
- /** optional feature element. right-most after 'elements' (any min-w is ignored) */
9
- common: LinkDef[]
10
- featured?: LinkDef[]
11
- }
12
-
13
- /**
14
- * Array of columns, each of which itself is an array of links
15
- * (or "title defs" where href='' and variant='linkFG')
16
- * Common use case: To render a site-specific first column:
17
- * {
18
- * footer[myColumn, ...commonColumnsFromUi]
19
- * }
20
- * see: @hanzo/ui/siteDef/footer (default export)
21
- * or @hanzo/ui/siteDef/footer/common
22
- */
23
- footer: LinkDef[][]
24
-
25
- /** optional override of default 'above copyright' horizantal links */
26
- /** default (undefined or absent): @ui/sideDef/footer/legal are rendered */
27
- /** [] renders nothing above the copyright */
28
- aboveCopyright?: LinkDef[]
29
-
30
- /** any site-specific stuff we'd like access to (link urls, etc) */
31
- ext?: any
32
- }
33
-
34
- export { type SiteDef as default }
@@ -1,5 +0,0 @@
1
- type TShirtSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
2
-
3
- export {
4
- type TShirtSize as default
5
- }
package/util/index.ts DELETED
@@ -1,81 +0,0 @@
1
- import { compiler as mdCompiler } from 'markdown-to-jsx'
2
-
3
- import { clsx, type ClassValue } from 'clsx'
4
- import { twMerge } from 'tailwind-merge'
5
- import type { Dimensions } from '../types'
6
-
7
- // @ts-ignore
8
- import _merge from 'lodash.merge'
9
-
10
- export const cn = (...inputs: ClassValue[]) => (
11
- twMerge(clsx(inputs))
12
- )
13
-
14
- export const DEF_VIDEO_PROPS = {
15
- autoPlay: true,
16
- loop: true,
17
- muted: true,
18
- playsInline: true
19
- }
20
-
21
- export const markdown = (s: string, options?: any): JSX.Element => (
22
- mdCompiler(s, {
23
- wrapper: null,
24
- ...options
25
- })
26
- )
27
-
28
- export const round = (num: number): string => (
29
- num
30
- .toFixed(7)
31
- .replace(/(\.[0-9]+?)0+$/, '$1')
32
- .replace(/\.0$/, '')
33
- )
34
-
35
- export const pxToRem = (px: number, base: number): string => (`${round(px / base)}rem`)
36
-
37
- export const pxToEm = (px: number, base: number): string => (`${round(px / base)}em`)
38
-
39
- export const hexToRgb = (hex: string): string => {
40
- hex = hex.replace('#', '')
41
- hex = hex.length === 3 ? hex.replace(/./g, '$&$&') : hex
42
- const r = parseInt(hex.substring(0, 2), 16)
43
- const g = parseInt(hex.substring(2, 4), 16)
44
- const b = parseInt(hex.substring(4, 6), 16)
45
- return `${r} ${g} ${b}`
46
- }
47
-
48
-
49
- export const asNum = (n: number | `${number}`): number => (
50
- (typeof n === 'number') ? n : parseInt(n, 10)
51
- )
52
-
53
- // https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio
54
- export const constrain = (dim: Dimensions, constraint: Dimensions): Dimensions => {
55
- const c = {
56
- w: asNum(constraint.w),
57
- h: asNum(constraint.h)
58
- }
59
- const d = {
60
- w: asNum(dim.w),
61
- h: asNum(dim.h)
62
- }
63
-
64
- const ratio = Math.min(c.w / d.w, c.h / d.h)
65
- return {
66
- w: Math.round(d.w * ratio),
67
- h: Math.round(d.h * ratio)
68
- }
69
- }
70
-
71
- export const containsToken = (s: string | undefined, toFind: string): boolean => (s ? s.split(' ').includes(toFind) : false)
72
-
73
- export const ldMerge = (
74
- result: any,
75
- ...sources: any[]
76
- ): any => (_merge(result, ...sources))
77
-
78
- export const capitalize = (str: string): string => (
79
- str.charAt(0).toUpperCase() + str.slice(1)
80
- )
81
-
package/util/specifier.ts DELETED
@@ -1,43 +0,0 @@
1
- import type { Dimensions, TShirtSize } from '../types'
2
- import type { TypographySize } from '../primitives/apply-typography'
3
-
4
- export const getPrimaryStartingWith = (s: string, toFind: string) => {
5
- const tokenArray = s.split(' ')
6
- return tokenArray.find((tok) => (tok.startsWith(`${toFind}-`)))
7
- }
8
-
9
- export const getTShirtSize = (s: string): TShirtSize | undefined => {
10
- const subTokenArray = s.split('-')
11
- return subTokenArray[subTokenArray.length - 1] as TShirtSize
12
- }
13
-
14
- export const getTypographySize = (s: string): TypographySize | undefined => {
15
- const subTokenArray = s.split('-')
16
- return subTokenArray[subTokenArray.length - 1] as TypographySize
17
- }
18
-
19
- export const getDim = (s: string): Dimensions | undefined => {
20
- const subTokenArray = s.split('-')
21
- const dimStr = subTokenArray[subTokenArray.length - 1]
22
- if (dimStr) {
23
- const dimTokenArray = s.split('x')
24
- return dimTokenArray ? {
25
- w: Number(dimTokenArray[0]),
26
- h: Number(dimTokenArray[1])
27
- } : undefined
28
- }
29
- return undefined
30
- }
31
-
32
- export function getSpecifierData<T>(
33
- main: string,
34
- getPrimary: (s: string) => string | undefined,
35
- getData: (s: string) => T | undefined,
36
- def?: T
37
- ): T | undefined {
38
- const primary = getPrimary(main)
39
- if (primary) {
40
- return getData(primary) ?? def
41
- }
42
- return def ?? undefined
43
- }