@celestia-island/hikari 0.4.4 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +22 -7
- package/src/DemoApp.tsx +491 -0
- package/src/animation/registerAnimations.test.ts +94 -0
- package/src/animation/registerAnimations.ts +103 -0
- package/src/components/HkAboutModal.scss +95 -0
- package/src/components/HkAboutModal.tsx +114 -0
- package/src/components/HkAdaptiveDialog.scss +22 -0
- package/src/components/HkAdaptiveDialog.test.tsx +271 -0
- package/src/components/HkAdaptiveDialog.tsx +167 -0
- package/src/components/HkAdminHeader.test.tsx +185 -0
- package/src/components/HkAdminHeader.tsx +308 -0
- package/src/components/HkAdminShell.test.tsx +237 -0
- package/src/components/HkAdminShell.tsx +129 -0
- package/src/components/HkAdminTablePage.tsx +70 -0
- package/src/components/HkAdminWidgets.test.ts +89 -0
- package/src/components/HkAlert.tsx +1 -1
- package/src/components/HkAltSignIn.scss +55 -0
- package/src/components/HkAltSignIn.test.tsx +88 -0
- package/src/components/HkAltSignIn.tsx +92 -0
- package/src/components/HkAttachmentModal.scss +49 -0
- package/src/components/HkAttachmentModal.tsx +318 -0
- package/src/components/HkAuthCard.tsx +50 -0
- package/src/components/HkAuthSubmitButton.scss +12 -0
- package/src/components/HkAuthSubmitButton.tsx +94 -0
- package/src/components/HkAvatar.scss +93 -0
- package/src/components/HkAvatar.tsx +2 -2
- package/src/components/HkBlockingToast.scss +123 -0
- package/src/components/HkBlockingToast.test.tsx +221 -0
- package/src/components/HkBlockingToast.tsx +182 -0
- package/src/components/HkBreadcrumb.scss +624 -0
- package/src/components/HkBreadcrumb.tsx +2 -2
- package/src/components/HkButton.scss +16 -2
- package/src/components/HkCaptchaModal.scss +14 -0
- package/src/components/HkCaptchaModal.tsx +62 -0
- package/src/components/HkCaptchaWidget.scss +30 -0
- package/src/components/HkCaptchaWidget.tsx +181 -0
- package/src/components/HkCard.scss +1 -1
- package/src/components/HkChatTypes.ts +65 -0
- package/src/components/HkCheckbox.scss +4 -9
- package/src/components/HkCheckbox.tsx +18 -6
- package/src/components/HkColorPicker.scss +120 -3
- package/src/components/HkColorPicker.tsx +130 -19
- package/src/components/HkColorPickerTouch.test.tsx +145 -0
- package/src/components/HkColorSchemeDialog.scss +52 -0
- package/src/components/HkColorSchemeDialog.test.ts +201 -0
- package/src/components/HkColorSchemeDialog.tsx +96 -0
- package/src/components/HkColorSchemeEditor.test.ts +270 -0
- package/src/components/HkColorSchemeEditor.tsx +410 -0
- package/src/components/HkConfirmDialog.scss +43 -3
- package/src/components/HkConfirmDialog.tsx +7 -4
- package/src/components/HkConnectionInfo.ts +80 -0
- package/src/components/HkConnectionStatus.tsx +158 -0
- package/src/components/HkCookieConsent.scss +22 -0
- package/src/components/HkCookieConsent.test.tsx +70 -0
- package/src/components/HkCookieConsent.tsx +56 -0
- package/src/components/HkCountdownDigit.tsx +105 -0
- package/src/components/HkDatePicker.scss +361 -0
- package/src/components/HkDatePicker.test.ts +459 -0
- package/src/components/HkDatePicker.tsx +568 -0
- package/src/components/HkDateTimePicker.scss +65 -37
- package/src/components/HkDateTimePicker.test.ts +344 -0
- package/src/components/HkDateTimePicker.tsx +249 -82
- package/src/components/HkDraggableGrid.scss +4 -1
- package/src/components/HkDraggableList.scss +4 -1
- package/src/components/HkDrawer.scss +27 -13
- package/src/components/HkDrawer.test.tsx +73 -0
- package/src/components/HkDrawer.tsx +157 -10
- package/src/components/HkErrorBoundary.scss +5 -2
- package/src/components/HkErrorBoundary.tsx +7 -4
- package/src/components/HkExpansionPanel.scss +143 -0
- package/src/components/HkExpansionPanel.test.tsx +109 -0
- package/src/components/HkExpansionPanel.tsx +101 -0
- package/src/components/HkFab.scss +162 -0
- package/src/components/HkFab.test.tsx +217 -0
- package/src/components/HkFab.tsx +214 -0
- package/src/components/HkHoverRevealAction.scss +6 -0
- package/src/components/HkHoverRevealAction.test.ts +68 -0
- package/src/components/HkHoverRevealAction.tsx +84 -6
- package/src/components/HkIcon.scss +123 -0
- package/src/components/HkIcon.tsx +7 -23
- package/src/components/HkIconButton.scss +170 -0
- package/src/components/HkIconButton.test.tsx +75 -0
- package/src/components/HkIconButton.tsx +4 -3
- package/src/components/HkIconButtonVars.scss +180 -0
- package/src/components/HkInput.affix.test.ts +253 -0
- package/src/components/HkInput.enter.test.ts +88 -0
- package/src/components/HkInput.scss +127 -8
- package/src/components/HkInput.tsx +245 -13
- package/src/components/HkKeywordSearchModal.scss +13 -0
- package/src/components/HkKeywordSearchModal.tsx +46 -9
- package/src/components/HkLabel.scss +34 -0
- package/src/components/HkLabel.test.tsx +61 -0
- package/src/components/HkLabel.tsx +45 -0
- package/src/components/HkListTransition.scss +26 -0
- package/src/components/HkListTransition.tsx +57 -0
- package/src/components/HkLocalePicker.scss +37 -0
- package/src/components/HkLocalePicker.tsx +133 -0
- package/src/components/HkLocalePickerPopup.tsx +35 -19
- package/src/components/HkLocalizedInput.scss +277 -0
- package/src/components/HkLocalizedInput.test.tsx +693 -0
- package/src/components/HkLocalizedInput.tsx +495 -0
- package/src/components/HkLogWindow.scss +121 -0
- package/src/components/HkLogWindow.tsx +195 -0
- package/src/components/HkLogo.scss +1 -1
- package/src/components/HkLogo.tsx +1 -1
- package/src/components/HkMarkdownRenderer.scss +22 -2
- package/src/components/HkMarkdownRenderer.tsx +33 -3
- package/src/components/HkMediaControlBar.tsx +20 -13
- package/src/components/HkMenu.scss +200 -0
- package/src/components/HkMenu.test.ts +779 -0
- package/src/components/HkMenu.tsx +770 -0
- package/src/components/HkMenuActionItem.scss +58 -0
- package/src/components/HkMenuActionItem.tsx +41 -0
- package/src/components/HkMenuIdentityItem.scss +70 -0
- package/src/components/HkMenuIdentityItem.tsx +42 -0
- package/src/components/HkMenuPanel.scss +20 -0
- package/src/components/HkMenuPanel.test.tsx +118 -0
- package/src/components/HkMenuPanel.tsx +32 -0
- package/src/components/HkMinimap.tsx +16 -8
- package/src/components/HkModal.autofollow.test.ts +44 -0
- package/src/components/HkModal.scss +170 -53
- package/src/components/HkModal.sheetgap.test.ts +82 -0
- package/src/components/HkModal.test.tsx +334 -0
- package/src/components/HkModal.tsx +314 -68
- package/src/components/HkModalBreadcrumb.scss +4 -1
- package/src/components/HkModalBreadcrumb.test.tsx +111 -0
- package/src/components/HkModalBreadcrumb.tsx +34 -11
- package/src/components/HkModelCatalog.ts +98 -0
- package/src/components/HkModelTag.scss +130 -0
- package/src/components/HkModelTag.test.tsx +111 -0
- package/src/components/HkModelTag.tsx +190 -0
- package/src/components/HkNavItem.scss +13 -2
- package/src/components/HkNavItem.tsx +2 -1
- package/src/components/HkNavSidebar.tsx +99 -0
- package/src/components/HkNumberInput.scss +12 -0
- package/src/components/HkNumberInput.tsx +15 -8
- package/src/components/HkPageHeader.scss +79 -0
- package/src/components/HkPageHeader.test.ts +67 -0
- package/src/components/HkPageHeader.tsx +51 -0
- package/src/components/HkPasswordInput.scss +29 -17
- package/src/components/HkPasswordInput.test.ts +281 -0
- package/src/components/HkPasswordInput.tsx +337 -59
- package/src/components/HkPickerPane.scss +158 -0
- package/src/components/HkPlaceholderMarquee.scss +109 -0
- package/src/components/HkPlaceholderMarquee.test.ts +305 -0
- package/src/components/HkPlaceholderMarquee.tsx +170 -0
- package/src/components/HkPopover.scss +134 -10
- package/src/components/HkPopover.sheetdock.test.ts +34 -0
- package/src/components/HkPopover.surfacevars.test.ts +20 -0
- package/src/components/HkPopover.titleSuppress.test.tsx +265 -0
- package/src/components/HkPopover.tsx +225 -50
- package/src/components/HkPopoverSheet.test.tsx +130 -0
- package/src/components/HkPopupSelect.scss +30 -10
- package/src/components/HkPopupSelect.tsx +21 -1
- package/src/components/HkProgressDialog.scss +31 -0
- package/src/components/HkProgressDialog.tsx +37 -19
- package/src/components/HkProtocolModal.scss +26 -0
- package/src/components/HkProtocolModal.tsx +112 -0
- package/src/components/HkRadio.scss +1 -16
- package/src/components/HkRadio.tsx +5 -2
- package/src/components/HkRichInput.scss +162 -0
- package/src/components/HkRichInput.tsx +335 -0
- package/src/components/HkRollingNumber.test.ts +90 -0
- package/src/components/HkRollingNumber.tsx +39 -1
- package/src/components/HkScrollContainer.scss +71 -54
- package/src/components/HkScrollContainer.test.ts +160 -0
- package/src/components/HkScrollContainer.tsx +187 -160
- package/src/components/HkSearchInput.tsx +3 -3
- package/src/components/HkSecretRevealModal.scss +61 -0
- package/src/components/HkSecretRevealModal.tsx +91 -0
- package/src/components/HkSelect.scss +263 -12
- package/src/components/HkSelect.sheetdock.test.ts +30 -0
- package/src/components/HkSelect.test.tsx +88 -0
- package/src/components/HkSelect.tsx +59 -74
- package/src/components/HkSelectPanel.test.tsx +666 -0
- package/src/components/HkSelectPanel.tsx +595 -0
- package/src/components/HkSelectSheet.test.tsx +132 -0
- package/src/components/HkSelectionGrid.scss +1 -1
- package/src/components/HkSelectionGrid.tsx +2 -1
- package/src/components/HkSelectionWaterfall.scss +1 -1
- package/src/components/HkShareBar.scss +40 -0
- package/src/components/HkShareBar.tsx +50 -0
- package/src/components/HkSidebar.scss +15 -10
- package/src/components/HkSidebar.tsx +26 -2
- package/src/components/HkSignInCard.test.ts +154 -0
- package/src/components/HkSignInCard.tsx +155 -0
- package/src/components/HkSlider.scss +99 -0
- package/src/components/HkSlider.test.tsx +155 -0
- package/src/components/HkSlider.tsx +173 -0
- package/src/components/HkSpinner.scss +36 -1
- package/src/components/HkSpinner.test.tsx +63 -0
- package/src/components/HkSpinner.tsx +16 -1
- package/src/components/HkSplash.scss +1 -1
- package/src/components/HkSplash.tsx +3 -1
- package/src/components/HkStatCard.scss +73 -0
- package/src/components/HkStatCard.tsx +46 -0
- package/src/components/HkStatusBar.test.tsx +178 -0
- package/src/components/HkStatusBar.tsx +379 -0
- package/src/components/HkStatusPill.scss +73 -0
- package/src/components/HkStatusPill.tsx +41 -0
- package/src/components/HkStepFlow.scss +75 -0
- package/src/components/HkStepFlow.test.tsx +246 -0
- package/src/components/HkStepFlow.tsx +115 -0
- package/src/components/HkSwitch.scss +5 -17
- package/src/components/HkSwitch.tsx +6 -3
- package/src/components/HkTable.scss +20 -1
- package/src/components/HkTable.tsx +28 -3
- package/src/components/HkTabs.scss +222 -48
- package/src/components/HkTabs.test.ts +517 -0
- package/src/components/HkTabs.tsx +567 -56
- package/src/components/HkTag.tsx +2 -1
- package/src/components/HkTextarea.tsx +5 -0
- package/src/components/HkThemeToggle.scss +232 -0
- package/src/components/HkThemeToggle.test.ts +231 -0
- package/src/components/HkThemeToggle.tsx +289 -0
- package/src/components/HkTimeline.scss +134 -1
- package/src/components/HkTimeline.test.tsx +319 -0
- package/src/components/HkTimeline.tsx +303 -54
- package/src/components/HkToast.scss +34 -5
- package/src/components/HkToast.test.tsx +109 -0
- package/src/components/HkToast.tsx +57 -8
- package/src/components/HkTokenUsageBadge.scss +53 -0
- package/src/components/HkTokenUsageBadge.test.tsx +59 -0
- package/src/components/HkTokenUsageBadge.tsx +54 -0
- package/src/components/HkTokenUsagePanel.scss +95 -0
- package/src/components/HkTokenUsagePanel.tsx +140 -0
- package/src/components/HkToolBlock.scss +428 -0
- package/src/components/HkToolBlock.tsx +639 -0
- package/src/components/HkTooltip.scss +14 -2
- package/src/components/HkTooltip.tsx +25 -2
- package/src/components/HkTrendChart.tsx +27 -16
- package/src/components/HkVoiceInputPopup.scss +77 -0
- package/src/components/HkVoiceInputPopup.tsx +97 -0
- package/src/components/HkZoomToolbar.scss +4 -1
- package/src/components/HkZoomToolbar.tsx +7 -4
- package/src/components/_hikari-vars.scss +6 -0
- package/src/composables/highlightLanguages.ts +109 -0
- package/src/composables/iconRegistry.ts +127 -0
- package/src/composables/messaging/browserTransport.ts +96 -0
- package/src/composables/messaging/index.ts +204 -0
- package/src/composables/messaging/messaging.test.ts +256 -0
- package/src/composables/messaging/toastTransport.ts +26 -0
- package/src/composables/messaging/types.ts +115 -0
- package/src/composables/useActionBar.ts +66 -0
- package/src/composables/useAttachments.ts +154 -0
- package/src/composables/useConnectionProbe.ts +142 -0
- package/src/composables/useDeferredTransition.ts +16 -0
- package/src/composables/useEngineHealth.ts +69 -0
- package/src/composables/useHighlight.ts +124 -0
- package/src/composables/useMeasuredHighlight.ts +150 -0
- package/src/composables/useOverlayScrollbar.test.ts +221 -0
- package/src/composables/useOverlayScrollbar.ts +296 -0
- package/src/composables/usePageTitle.ts +37 -0
- package/src/composables/useReducedMotion.ts +34 -0
- package/src/composables/useResourceListModal.tsx +147 -0
- package/src/composables/useSafeArea.ts +137 -0
- package/src/composables/useSendShortcut.ts +35 -0
- package/src/composables/useSizeMorph.test.ts +156 -0
- package/src/composables/useSizeMorph.ts +149 -0
- package/src/composables/useSurfaceTransition.test.ts +96 -0
- package/src/composables/useSurfaceTransition.ts +71 -0
- package/src/composables/useZoomPan.ts +192 -0
- package/src/demo.scss +9 -1
- package/src/demo.ts +5 -1
- package/src/i18n/locales/ar/chat.json +38 -0
- package/src/i18n/locales/ar/components.json +141 -40
- package/src/i18n/locales/ar/components.toml +59 -0
- package/src/i18n/locales/ar/platform.json +65 -0
- package/src/i18n/locales/de/chat.json +38 -0
- package/src/i18n/locales/de/components.json +139 -38
- package/src/i18n/locales/de/components.toml +59 -0
- package/src/i18n/locales/de/platform.json +65 -0
- package/src/i18n/locales/en/chat.json +38 -0
- package/src/i18n/locales/en/components.json +104 -3
- package/src/i18n/locales/en/components.toml +59 -0
- package/src/i18n/locales/en/platform.json +65 -0
- package/src/i18n/locales/es/chat.json +38 -0
- package/src/i18n/locales/es/components.json +141 -40
- package/src/i18n/locales/es/components.toml +59 -0
- package/src/i18n/locales/es/platform.json +65 -0
- package/src/i18n/locales/fr/chat.json +38 -0
- package/src/i18n/locales/fr/components.json +137 -36
- package/src/i18n/locales/fr/components.toml +59 -0
- package/src/i18n/locales/fr/platform.json +65 -0
- package/src/i18n/locales/ja/chat.json +38 -0
- package/src/i18n/locales/ja/components.json +104 -3
- package/src/i18n/locales/ja/components.toml +59 -0
- package/src/i18n/locales/ja/platform.json +65 -0
- package/src/i18n/locales/ko/chat.json +38 -0
- package/src/i18n/locales/ko/components.json +104 -3
- package/src/i18n/locales/ko/components.toml +59 -0
- package/src/i18n/locales/ko/platform.json +65 -0
- package/src/i18n/locales/pt/chat.json +38 -0
- package/src/i18n/locales/pt/components.json +141 -40
- package/src/i18n/locales/pt/components.toml +59 -0
- package/src/i18n/locales/pt/platform.json +65 -0
- package/src/i18n/locales/ru/chat.json +38 -0
- package/src/i18n/locales/ru/components.json +141 -40
- package/src/i18n/locales/ru/components.toml +59 -0
- package/src/i18n/locales/ru/platform.json +65 -0
- package/src/i18n/locales/zh-Hans/chat.json +38 -0
- package/src/i18n/locales/zh-Hans/components.json +109 -4
- package/src/i18n/locales/zh-Hans/components.toml +59 -0
- package/src/i18n/locales/zh-Hans/platform.json +65 -0
- package/src/i18n/locales/zh-Hant/chat.json +38 -0
- package/src/i18n/locales/zh-Hant/components.json +109 -4
- package/src/i18n/locales/zh-Hant/components.toml +59 -0
- package/src/i18n/locales/zh-Hant/platform.json +65 -0
- package/src/index.ts +225 -6
- package/src/plugins/bootScriptsPlugin.ts +47 -0
- package/src/plugins/buildHashPlugin.ts +67 -0
- package/src/plugins/index.ts +2 -0
- package/src/render.ts +1 -1
- package/src/runtime/animationBus.test.ts +112 -0
- package/src/runtime/animationBus.ts +33 -2
- package/src/runtime/backStack.test.ts +334 -0
- package/src/runtime/backStack.ts +377 -0
- package/src/runtime/env.ts +4 -0
- package/src/runtime/index.ts +15 -3
- package/src/runtime/intervalBus.test.ts +118 -0
- package/src/runtime/intervalBus.ts +189 -0
- package/src/runtime/mobileViewport.test.ts +132 -0
- package/src/runtime/mobileViewport.ts +157 -0
- package/src/runtime/pageLifecycle.ts +91 -0
- package/src/runtime/useBlockingToast.ts +112 -0
- package/src/runtime/useClipboard.ts +28 -0
- package/src/runtime/useConfirm.ts +15 -7
- package/src/runtime/useMediaQuery.test.ts +67 -0
- package/src/runtime/useMediaQuery.ts +89 -0
- package/src/runtime/useOverlay.test.ts +160 -0
- package/src/runtime/useOverlay.ts +59 -12
- package/src/runtime/usePopupManager.test.ts +200 -0
- package/src/runtime/usePopupManager.ts +106 -10
- package/src/runtime/useToast.test.ts +90 -0
- package/src/runtime/useToast.ts +20 -2
- package/src/styles/admin-tokens.scss +744 -0
- package/src/styles/index.scss +5 -3
- package/src/styles/theme/_glass.scss +33 -0
- package/src/styles/theme/_layout.scss +123 -0
- package/src/styles/theme/_scrollbar.scss +73 -0
- package/src/styles/theme/_tokens.scss +69 -0
- package/src/styles/theme/base.scss +617 -0
- package/src/styles/theme/foundation.scss +219 -0
- package/src/styles/theme/mixins.scss +793 -0
- package/src/styles/theme/themes.scss +25 -0
- package/src/styles/theme/variables.scss +125 -0
- package/src/theme/_field.scss +116 -0
- package/src/theme/fontContext.test.ts +179 -0
- package/src/theme/fontContext.ts +169 -0
- package/src/theme/index.ts +19 -2
- package/src/theme/presets.ts +86 -18
- package/src/theme/theme.scss +61 -1
- package/src/theme/tokenGroups.test.ts +534 -0
- package/src/theme/tokenGroups.ts +552 -0
- package/src/theme/useSolarTime.test.ts +113 -0
- package/src/theme/useSolarTime.ts +95 -20
- package/src/theme/useTheme.test.ts +72 -0
- package/src/theme/useTheme.ts +144 -9
- package/src/tokens.scss +110 -0
- package/src/utils/base64.ts +31 -0
- package/src/utils/connectivity.ts +51 -0
- package/src/utils/dom.test.ts +131 -0
- package/src/utils/dom.ts +133 -0
- package/src/utils/download.ts +22 -0
- package/src/utils/fileType.ts +127 -0
- package/src/utils/format.ts +98 -0
- package/src/utils/fuzzy.ts +77 -0
- package/src/utils/fuzzySearch.test.ts +87 -0
- package/src/utils/healthProbe.ts +64 -0
- package/src/utils/objectPath.ts +59 -0
- package/src/utils/password.ts +53 -0
- package/src/utils/pow.test.ts +45 -0
- package/src/utils/pow.ts +226 -0
- package/src/utils/powNonce.ts +95 -0
- package/src/utils/validation.test.ts +78 -0
- package/src/DemoApp.vue +0 -400
- package/src/components/HkCollapse.tsx +0 -48
- package/src/components/HkMorphingTabs.scss +0 -141
- package/src/components/HkMorphingTabs.tsx +0 -113
- package/src/composables/useBreakpoint.ts +0 -41
- package/src/composables/useClipboard.ts +0 -37
- package/src/composables/useConfirm.ts +0 -35
- package/src/composables/useToast.ts +0 -2
- package/src/runtime/useAsyncData.ts +0 -30
|
@@ -1,17 +1,58 @@
|
|
|
1
|
-
/* HkTabs — unified
|
|
1
|
+
/* HkTabs — THE unified button-group / tab-strip primitive.
|
|
2
|
+
*
|
|
3
|
+
* ONE look (the centered pill strip of the page-level top/bottom bars)
|
|
4
|
+
* is shared by every button group, radio group and tab strip. Variants
|
|
5
|
+
* only switch the working mode (pill = tablist, segmented = radiogroup)
|
|
6
|
+
* and layout extras (block) — never the visual language. */
|
|
2
7
|
|
|
3
8
|
.hk-tabs {
|
|
4
9
|
width: 100%;
|
|
5
10
|
}
|
|
6
11
|
|
|
7
|
-
/* ===
|
|
12
|
+
/* === Scrollable (default) === */
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
/* The scroller (a horizontal HkScrollContainer) bounds the list: it
|
|
15
|
+
sizes to the content up to the available width, then the list
|
|
16
|
+
scrolls inside with safe centering. min-width: 0 lets the whole
|
|
17
|
+
chain shrink inside constrained flex parents (status bars, header
|
|
18
|
+
centres). */
|
|
19
|
+
.hk-tabs[data-scrollable] {
|
|
20
|
+
width: auto;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.hk-tabs-scroller {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* === Protruding end actions (startAction / endAction) === */
|
|
30
|
+
|
|
31
|
+
/* With an end action the whole strip sits inside an HkHoverRevealAction
|
|
32
|
+
host (`.hk-tabs-addwrap`) and the button protrudes at the host's edge
|
|
33
|
+
(left:100% / right:100% in HkHoverRevealAction.scss) — outside the
|
|
34
|
+
scroll viewport, so it never scrolls away. Shrink-wrap the strip the
|
|
35
|
+
same way the scrollable variant does, so the hover-reveal chain can
|
|
36
|
+
cap inside constrained flex parents and the tabs keep their safe
|
|
37
|
+
centering. */
|
|
38
|
+
.hk-tabs[data-actions] {
|
|
39
|
+
width: auto;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* The reveal host itself must be able to shrink below its content and
|
|
45
|
+
must not be clipped by rigid parents — mirrors HkHoverRevealAction's
|
|
46
|
+
own min/max rules; no flex shorthand here, the host's natural
|
|
47
|
+
shrink-wrap keeps the centered-bar geometry. */
|
|
48
|
+
.hk-tabs-addwrap {
|
|
49
|
+
min-width: 0;
|
|
50
|
+
max-width: 100%;
|
|
12
51
|
}
|
|
13
52
|
|
|
14
|
-
|
|
53
|
+
/* === The one shared track (every variant) === */
|
|
54
|
+
|
|
55
|
+
.hk-tabs-list {
|
|
15
56
|
position: relative;
|
|
16
57
|
display: inline-flex;
|
|
17
58
|
gap: 0;
|
|
@@ -21,89 +62,222 @@
|
|
|
21
62
|
background: rgb(var(--color-surface) / 60%);
|
|
22
63
|
}
|
|
23
64
|
|
|
24
|
-
/* ===
|
|
65
|
+
/* === The one shared trigger (every variant) === */
|
|
25
66
|
|
|
26
67
|
.hk-tabs-trigger {
|
|
27
|
-
|
|
68
|
+
position: relative;
|
|
69
|
+
/* Paint above the sliding indicator. */
|
|
70
|
+
z-index: 1;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
gap: var(--space-6);
|
|
75
|
+
flex: none;
|
|
76
|
+
padding: var(--space-4) var(--space-12);
|
|
77
|
+
font-family: inherit;
|
|
78
|
+
font-size: var(--text-sm);
|
|
79
|
+
font-weight: 600;
|
|
28
80
|
color: rgb(var(--color-muted));
|
|
29
81
|
background: transparent;
|
|
30
82
|
border: none;
|
|
83
|
+
border-radius: var(--radius-sm);
|
|
84
|
+
white-space: nowrap;
|
|
31
85
|
cursor: pointer;
|
|
32
|
-
font-family: inherit;
|
|
33
86
|
outline: none;
|
|
34
|
-
transition: color var(--duration-short) ease
|
|
87
|
+
transition: color var(--duration-short) ease,
|
|
88
|
+
transform var(--duration-short) ease;
|
|
35
89
|
|
|
36
90
|
&:hover {
|
|
37
91
|
color: rgb(var(--color-text));
|
|
38
92
|
}
|
|
39
93
|
|
|
94
|
+
/* Tactile press feedback — every button-group click animates, even
|
|
95
|
+
before the sliding indicator arrives. */
|
|
96
|
+
&:active:not([data-disabled]) {
|
|
97
|
+
transform: scale(0.96);
|
|
98
|
+
}
|
|
99
|
+
|
|
40
100
|
&[data-active] {
|
|
41
101
|
color: rgb(var(--color-primary));
|
|
42
102
|
}
|
|
103
|
+
|
|
104
|
+
/* Inset ring: the track padding and the scroller's edge-fade mask
|
|
105
|
+
would clip an outset outline. */
|
|
106
|
+
&:focus-visible {
|
|
107
|
+
outline: 2px solid rgb(var(--color-primary));
|
|
108
|
+
outline-offset: -2px;
|
|
109
|
+
}
|
|
43
110
|
}
|
|
44
111
|
|
|
45
|
-
|
|
112
|
+
.hk-tabs-trigger-icon {
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
}
|
|
46
116
|
|
|
47
|
-
|
|
48
|
-
|
|
117
|
+
/* === The one shared sliding indicator (every variant) ===
|
|
118
|
+
* Starts transparent: the first measured frame only fades it in (no
|
|
119
|
+
* pop-in from a stale corner), later frames slide via left/width. */
|
|
120
|
+
.hk-tabs-indicator {
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 2px;
|
|
123
|
+
height: calc(100% - 4px);
|
|
124
|
+
border-radius: var(--radius-sm);
|
|
125
|
+
background: rgb(var(--color-primary) / 12%);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
z-index: 0;
|
|
128
|
+
opacity: 0;
|
|
129
|
+
transition: left var(--duration-normal) var(--ease-standard),
|
|
130
|
+
width var(--duration-normal) var(--ease-standard),
|
|
131
|
+
opacity var(--duration-short) ease;
|
|
49
132
|
}
|
|
50
133
|
|
|
51
|
-
.hk-tabs[data-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
border-bottom: 2px solid transparent;
|
|
55
|
-
transition: background-color, border-color, color, box-shadow, opacity, transform, filter var(--duration-normal) ease;
|
|
134
|
+
.hk-tabs-indicator[data-ready] {
|
|
135
|
+
opacity: 1;
|
|
136
|
+
}
|
|
56
137
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
138
|
+
/* === Option swap transitions (dynamic options / merged cell) ===
|
|
139
|
+
* Entering options/cells fade and settle in; leaving ones fade out
|
|
140
|
+
* absolutely so siblings reflow at once. Geometry motion belongs to
|
|
141
|
+
* the sliding indicator, so there is deliberately no move FLIP. */
|
|
142
|
+
.hk-tabs-swap-enter-active,
|
|
143
|
+
.hk-tabs-swap-leave-active {
|
|
144
|
+
transition: opacity var(--duration-short) ease,
|
|
145
|
+
transform var(--duration-short) ease;
|
|
146
|
+
}
|
|
60
147
|
|
|
61
|
-
|
|
62
|
-
|
|
148
|
+
.hk-tabs-swap-enter-from {
|
|
149
|
+
opacity: 0;
|
|
150
|
+
transform: scale(0.96);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.hk-tabs-swap-leave-to {
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Child-selector form, NOT the bare `.hk-tabs-swap-leave-active`: the
|
|
158
|
+
leaving element may be a trigger or the merged cell whose own rules
|
|
159
|
+
(`.hk-tabs-trigger` / `.hk-tabs-merged`, position:relative) share the
|
|
160
|
+
same one-class specificity and could win by source order — the
|
|
161
|
+
two-class selector lifts the ghost to absolute regardless of order. */
|
|
162
|
+
.hk-tabs-list > .hk-tabs-swap-leave-active {
|
|
163
|
+
position: absolute;
|
|
164
|
+
z-index: 0;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* === Panel (pill / tablist mode) === */
|
|
168
|
+
|
|
169
|
+
.hk-tabs-panel {
|
|
170
|
+
outline: none;
|
|
171
|
+
|
|
172
|
+
&:not([data-active]) {
|
|
173
|
+
display: none;
|
|
63
174
|
}
|
|
64
175
|
}
|
|
65
176
|
|
|
66
|
-
/* ===
|
|
177
|
+
/* === segmented = radiogroup working mode ===
|
|
178
|
+
* Same chrome; only the form-row layout extra lives here:
|
|
179
|
+
* row-filling (block). */
|
|
180
|
+
|
|
181
|
+
/* block outside the scroller (scrollable opted out): legacy fill —
|
|
182
|
+
triggers may shrink below their content. */
|
|
183
|
+
.hk-tabs-list[data-variant="segmented"][data-block="true"] {
|
|
184
|
+
display: flex;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.hk-tabs-list[data-variant="segmented"][data-block="true"] .hk-tabs-trigger {
|
|
189
|
+
flex: 1 1 auto;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* block inside the scroller (the default): fill the row while it fits,
|
|
193
|
+
scroll with edge fades when it doesn't — triggers never shrink below
|
|
194
|
+
their content, so option labels are never clipped. */
|
|
195
|
+
.hk-tabs-scroller .hk-tabs-list[data-variant="segmented"][data-block="true"] {
|
|
196
|
+
width: max-content;
|
|
197
|
+
min-width: 100%;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.hk-tabs-scroller .hk-tabs-list[data-variant="segmented"][data-block="true"] .hk-tabs-trigger {
|
|
201
|
+
flex: 1 0 auto;
|
|
202
|
+
}
|
|
67
203
|
|
|
68
|
-
|
|
204
|
+
/* === Merged cell (dynamic merged-option rendering) ===
|
|
205
|
+
* The contiguous run of options listed in `mergeKeys` collapses into ONE
|
|
206
|
+
* combined cell (the #merged slot) — a REAL in-flow child of the track
|
|
207
|
+
* (a grid item on slot-unit strips, see the distribution rules below),
|
|
208
|
+
* not an absolute cover: it joins layout and the animation context
|
|
209
|
+
* (hk-tabs-swap enter/leave + the sliding indicator measures it when
|
|
210
|
+
* the active option is merged). Chrome follows the unselected-option
|
|
211
|
+
* grammar: NAKED — no border, no own surface; only the sliding
|
|
212
|
+
* indicator ever frames the active option, so a merged cell must never
|
|
213
|
+
* grow a box of its own. Interactive slot content (e.g. the theme
|
|
214
|
+
* toggle's altitude strip) fills the cell and owns its hover/press. */
|
|
215
|
+
.hk-tabs-merged {
|
|
69
216
|
position: relative;
|
|
217
|
+
/* Same layer as the triggers, above the sliding indicator. */
|
|
70
218
|
z-index: 1;
|
|
71
|
-
display: flex;
|
|
219
|
+
display: inline-flex;
|
|
72
220
|
align-items: center;
|
|
73
221
|
justify-content: center;
|
|
74
|
-
gap: var(--space-6);
|
|
75
222
|
flex: none;
|
|
76
|
-
|
|
223
|
+
min-width: 0;
|
|
224
|
+
color: rgb(var(--color-muted));
|
|
77
225
|
font-size: var(--text-sm);
|
|
78
226
|
font-weight: 600;
|
|
79
|
-
border-radius: var(--radius-sm);
|
|
80
227
|
white-space: nowrap;
|
|
81
228
|
}
|
|
82
229
|
|
|
83
|
-
/*
|
|
84
|
-
|
|
85
|
-
.hk-tabs-
|
|
86
|
-
position: absolute;
|
|
87
|
-
top: 2px;
|
|
88
|
-
height: calc(100% - 4px);
|
|
89
|
-
border-radius: var(--radius-sm);
|
|
90
|
-
background: rgb(var(--color-primary) / 12%);
|
|
230
|
+
/* Whole-strip disabled mutes the cell's interactive slot content too —
|
|
231
|
+
the triggers get the native disabled attribute, the cell gets this. */
|
|
232
|
+
.hk-tabs-merged[data-disabled] {
|
|
91
233
|
pointer-events: none;
|
|
92
|
-
z-index: 0;
|
|
93
|
-
transition: left var(--duration-normal) var(--ease-standard),
|
|
94
|
-
width var(--duration-normal) var(--ease-standard);
|
|
95
234
|
}
|
|
96
235
|
|
|
97
|
-
/*
|
|
236
|
+
/* block (row-filling) strips: the merged cell shares the triggers'
|
|
237
|
+
flex growth so it lands on the merged run's share of the row. */
|
|
238
|
+
.hk-tabs-list[data-variant="segmented"][data-block="true"] .hk-tabs-merged {
|
|
239
|
+
flex: 1 1 auto;
|
|
240
|
+
}
|
|
98
241
|
|
|
99
|
-
.hk-tabs-
|
|
100
|
-
|
|
242
|
+
.hk-tabs-scroller .hk-tabs-list[data-variant="segmented"][data-block="true"] .hk-tabs-merged {
|
|
243
|
+
flex: 1 0 auto;
|
|
244
|
+
}
|
|
101
245
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
246
|
+
/* === Slot-unit distribution (block strips carrying data-slots) ===
|
|
247
|
+
* A merged cell always spans its run's option count and TabItem.span
|
|
248
|
+
* may weight any trigger; the row is then divided into one equal 1fr
|
|
249
|
+
* track per unit, NOT by content. This is what makes dynamic merging
|
|
250
|
+
* width-stable: the theme toggle's altitude strip replaces the
|
|
251
|
+
* Light+Dark pair and occupies EXACTLY the two one-unit tracks those
|
|
252
|
+
* triggers owned, so toggling auto ↔ manual never re-measures any
|
|
253
|
+
* cell — the strip neither narrows (desktop content-size case) nor
|
|
254
|
+
* re-divides (mobile block case, thirds stay thirds).
|
|
255
|
+
*
|
|
256
|
+
* The division is a GRID because flex-basis math cannot give padded
|
|
257
|
+
* items exact equal units: a zero flex basis still leaves each item's
|
|
258
|
+
* own padding riding on its share (item = padding + share of the
|
|
259
|
+
* remainder), so a 12px-padded trigger consistently stole ~8-16px from
|
|
260
|
+
* its neighbors. Grid `1fr` tracks are exact regardless of item
|
|
261
|
+
* padding, borders or content, in both the definite-width and the
|
|
262
|
+
* `width: max-content; min-width: 100%` intrinsic contexts.
|
|
263
|
+
*
|
|
264
|
+
* `minmax(min-content, 1fr)` keeps the never-clip contract: when the
|
|
265
|
+
* row runs tight a track floors at its content and the max-content
|
|
266
|
+
* list scrolls instead; the cell's flex-era `min-width: 0` is reset to
|
|
267
|
+
* `auto` so its content keeps counting toward its track's floor. The
|
|
268
|
+
* sliding indicator (absolute, positioned from JS measurements) and
|
|
269
|
+
* the swap transition's absolute leaving items are untouched by the
|
|
270
|
+
* display switch. Keep this AFTER the rules it overrides
|
|
271
|
+
* (equal-or-higher specificity + source order). */
|
|
272
|
+
.hk-tabs-list[data-variant="segmented"][data-block="true"][data-slots] {
|
|
273
|
+
display: grid;
|
|
274
|
+
grid-template-columns: repeat(var(--hk-tabs-units, 1), minmax(min-content, 1fr));
|
|
105
275
|
}
|
|
106
276
|
|
|
107
|
-
.hk-tabs[data-variant="
|
|
108
|
-
|
|
277
|
+
.hk-tabs-list[data-variant="segmented"][data-block="true"][data-slots] > .hk-tabs-trigger,
|
|
278
|
+
.hk-tabs-scroller .hk-tabs-list[data-variant="segmented"][data-block="true"][data-slots] > .hk-tabs-trigger,
|
|
279
|
+
.hk-tabs-list[data-variant="segmented"][data-block="true"][data-slots] > .hk-tabs-merged,
|
|
280
|
+
.hk-tabs-scroller .hk-tabs-list[data-variant="segmented"][data-block="true"][data-slots] > .hk-tabs-merged {
|
|
281
|
+
grid-column: span var(--hk-tabs-span, 1) / span var(--hk-tabs-span, 1);
|
|
282
|
+
min-width: auto;
|
|
109
283
|
}
|