@thewhatmatters/wmds 0.4.27 → 0.4.29
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/CHANGELOG.md +60 -0
- package/CONSUMING.md +62 -1
- package/bin/wmds-check.mjs +47 -0
- package/dist/colors.css +92 -0
- package/dist/components/atoms/Badge/badgeStyles.js +6 -6
- package/dist/components/atoms/Band/Band.d.ts +27 -0
- package/dist/components/atoms/Band/Band.d.ts.map +1 -0
- package/dist/components/atoms/Band/Band.js +22 -0
- package/dist/components/atoms/Band/bandStyles.d.ts +20 -0
- package/dist/components/atoms/Band/bandStyles.d.ts.map +1 -0
- package/dist/components/atoms/Band/bandStyles.js +23 -0
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.js +12 -5
- package/dist/components/atoms/Button/buttonStyles.d.ts +1 -1
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStyles.js +2 -2
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +69 -68
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.js +1 -1
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/IconButton.js +13 -12
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +2 -2
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/iconButtonStyles.js +1 -1
- package/dist/components/atoms/InlinePill/InlinePill.d.ts +42 -0
- package/dist/components/atoms/InlinePill/InlinePill.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/InlinePill.js +48 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts +27 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.js +19 -0
- package/dist/components/atoms/Input/Input.d.ts +6 -3
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.d.ts +1 -1
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.js +3 -3
- package/dist/components/atoms/Skeleton/skeletonStyles.js +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +45 -44
- package/dist/components/atoms/Switch/switchStyles.d.ts +1 -1
- package/dist/components/atoms/Switch/switchStyles.d.ts.map +1 -1
- package/dist/components/atoms/Switch/switchStyles.js +1 -1
- package/dist/components/atoms/TextArea/textareaShellStyles.js +3 -3
- package/dist/components/molecules/Accordion/accordionStyles.d.ts +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.js +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +80 -122
- package/dist/components/molecules/Card/cardStyles.js +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts.map +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.js +1 -1
- package/dist/components/molecules/Chip/chipStyles.js +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js +30 -27
- package/dist/components/molecules/Dropdown/dropdownStyles.js +1 -1
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts +14 -0
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts.map +1 -0
- package/dist/components/{organisms/Tab/tabOverflow.js → molecules/Dropdown/resolveOverflow.js} +2 -2
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts +70 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.js +155 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts +71 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.js +61 -0
- package/dist/components/molecules/Field/Field.d.ts.map +1 -1
- package/dist/components/molecules/Field/Field.js +11 -10
- package/dist/components/molecules/LogView/logViewStyles.d.ts +1 -1
- package/dist/components/molecules/LogView/logViewStyles.d.ts.map +1 -1
- package/dist/components/molecules/LogView/logViewStyles.js +1 -1
- package/dist/components/molecules/PillGroup/pillGroupStyles.js +1 -1
- package/dist/components/molecules/Search/searchStyles.js +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +3 -3
- package/dist/components/molecules/Select/Select.d.ts +3 -1
- package/dist/components/molecules/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.js +75 -119
- package/dist/components/molecules/Select/selectStyles.js +3 -3
- package/dist/components/molecules/Stat/statStyles.d.ts +1 -1
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
- package/dist/components/molecules/Stat/statStyles.js +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.d.ts.map +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.js +35 -35
- package/dist/components/organisms/AppShell/AppShell.d.ts +2 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/AppShell.js +138 -129
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +2 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/appShellStyles.js +2 -2
- package/dist/components/organisms/Dialog/AlertDialog.d.ts +7 -1
- package/dist/components/organisms/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/AlertDialog.js +54 -50
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +52 -71
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +14 -1
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/dialogStyles.js +3 -3
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts.map +1 -1
- package/dist/components/organisms/FilterPanel/FilterPanel.js +52 -42
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +6 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.js +54 -66
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/components/organisms/MoreMenu/MoreMenu.js +45 -101
- package/dist/components/organisms/Panel/Panel.d.ts.map +1 -1
- package/dist/components/organisms/Panel/Panel.js +44 -53
- package/dist/components/organisms/Sheet/Sheet.d.ts +3 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +82 -101
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +0 -9
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +180 -227
- package/dist/components/organisms/SiteNav/siteNavStyles.js +1 -1
- package/dist/components/organisms/Tab/Tab.d.ts.map +1 -1
- package/dist/components/organisms/Tab/Tab.js +77 -127
- package/dist/components/organisms/Tab/tabStyles.d.ts +2 -1
- package/dist/components/organisms/Tab/tabStyles.d.ts.map +1 -1
- package/dist/components/organisms/Tab/tabStyles.js +2 -2
- package/dist/fonts.css +10 -0
- package/dist/grid.css +38 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -131
- package/dist/lib/contrast.d.ts +11 -0
- package/dist/lib/contrast.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.d.ts +27 -1
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +87 -25
- package/dist/lib/typography.d.ts +1 -1
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/shape.css +24 -3
- package/dist/styles.css +1 -1
- package/dist/typography.css +55 -8
- package/docs/components.md +4 -2
- package/docs/exports.json +55 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +39 -0
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
- package/docs/patterns/components-copyfield--copied.tsx +1 -1
- package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
- package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +54 -0
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +1 -1
- package/docs/patterns/components-logview--log-viewer.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
- package/docs/patterns/components-table--approvals.tsx +1 -1
- package/docs/patterns/components-table--basic.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +17 -1
- package/package.json +1 -1
- package/dist/components/organisms/Tab/tabOverflow.d.ts +0 -14
- package/dist/components/organisms/Tab/tabOverflow.d.ts.map +0 -1
|
@@ -5,58 +5,70 @@ import { Button as n } from "../../atoms/Button/Button.js";
|
|
|
5
5
|
import { IconButton as r } from "../../atoms/IconButton/IconButton.js";
|
|
6
6
|
import { TextLink as i } from "../../atoms/TextLink/TextLink.js";
|
|
7
7
|
import { Dropdown as a } from "../../molecules/Dropdown/Dropdown.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { createPortal as Oe } from "react-dom";
|
|
8
|
+
import { cardLayoutBodyOccupantRadiusClasses as o, cardLayoutBodyOccupantWellClasses as s } from "../../molecules/Card/cardStyles.js";
|
|
9
|
+
import { Sheet as c } from "../Sheet/Sheet.js";
|
|
10
|
+
import { textOf as l, useOverflowMenu as ee } from "../../molecules/Dropdown/useOverflowMenu.js";
|
|
11
|
+
import { siteNavBarBaseClasses as u, siteNavBarCompactLayoutClasses as d, siteNavBarStateClasses as f, siteNavBrandClasses as p, siteNavCompactLayouts as m, siteNavContainerClasses as h, siteNavDefaultCollapseAt as g, siteNavDefaultCollapseRatio as _, siteNavEndClasses as te, siteNavExpandedHeightClasses as ne, siteNavLinkClasses as v, siteNavLinkListClasses as y, siteNavLinksRootClasses as b, siteNavMeasureItemClasses as x, siteNavMeasureMoreClasses as S, siteNavMeasureRailClasses as C, siteNavMenuBackdropClasses as w, siteNavMenuContentClasses as T, siteNavMenuLinkClasses as E, siteNavMenuLinkGridClasses as D, siteNavMenuPopupClasses as O, siteNavMenuPositionerClasses as k, siteNavMenuReadRowClasses as A, siteNavMenuReadThumbClasses as j, siteNavMenuSectionClasses as M, siteNavMenuSectionLabelClasses as N, siteNavMenuSectionSpanClasses as P, siteNavMenuViewportClasses as F, siteNavMiddleClasses as re, siteNavMiddleHugClasses as ie, siteNavMiddleHugResponsiveClasses as ae, siteNavMiddleResponsiveClasses as oe, siteNavMobileLinkClasses as I, siteNavMobileListClasses as se, siteNavMobileTriggerClasses as ce, siteNavMoreIconClasses as L, siteNavMoreTriggerClasses as R, siteNavNavigationRootClasses as z, siteNavPlacements as B, siteNavRootFixedClasses as le, siteNavRootFlowClasses as ue, siteNavRootInlineClasses as de, siteNavRootStickyClasses as fe, siteNavSlotsClasses as V, siteNavStartClasses as pe, siteNavStates as H, siteNavTriggerClasses as U, siteNavTriggerIconClasses as W, siteNavTriggerLabelClasses as G } from "./siteNavStyles.js";
|
|
12
|
+
import { useSiteNavCollapse as me } from "./useSiteNavCollapse.js";
|
|
13
|
+
import { Children as K, createContext as he, isValidElement as q, useContext as ge, useEffect as _e, useId as ve, useMemo as ye, useRef as be, useState as J } from "react";
|
|
14
|
+
import { ChevronDown as Y, Menu as xe } from "lucide-react";
|
|
15
|
+
import { Fragment as Se, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
16
|
+
import { AnimatePresence as Ce, motion as we, useReducedMotion as Te } from "motion/react";
|
|
17
|
+
import { createPortal as Ee } from "react-dom";
|
|
19
18
|
import { NavigationMenu as Q } from "@base-ui/react/navigation-menu";
|
|
20
19
|
//#region src/components/organisms/SiteNav/SiteNav.tsx
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
return t && (e || n) ? r ?
|
|
20
|
+
var De = he(null);
|
|
21
|
+
function Oe(e, t, n, r) {
|
|
22
|
+
return t && (e || n) ? r ? V.threeHug : V.three : t ? V.middleOnly : e && n ? V.ends : e ? V.startOnly : V.endOnly;
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
function ke(e, t) {
|
|
25
|
+
_e(() => {
|
|
26
|
+
if (!e || typeof document > "u") return;
|
|
27
|
+
let n = t?.current ?? document.documentElement, r = n.style.scrollPaddingTop;
|
|
28
|
+
return n.style.scrollPaddingTop = "calc(var(--site-nav-height) + var(--spacing) * 4)", () => {
|
|
29
|
+
n.style.scrollPaddingTop = r;
|
|
30
|
+
};
|
|
31
|
+
}, [e, t]);
|
|
32
|
+
}
|
|
33
|
+
function Ae({ start: n, middle: i, end: a, mobile: o, mobileTitle: s = "Menu", collapseAt: l, state: ee, onStateChange: p, compactLayout: m = "hug", placement: g = "fixed", scrollContainer: _, "aria-label": v = "Site", className: y }) {
|
|
34
|
+
let b = be(null), x = Te() ?? !1, { state: S, compact: C } = me({
|
|
35
|
+
collapseAt: l,
|
|
28
36
|
scrollContainer: _,
|
|
29
37
|
controlledState: ee,
|
|
30
38
|
placement: g,
|
|
31
39
|
onStateChange: p
|
|
32
|
-
}), [
|
|
40
|
+
}), [w, T] = J(!1), E = ve(), [D, O] = J(!1), k = C && m === "hug", A = {
|
|
33
41
|
y: -72,
|
|
34
42
|
opacity: 0
|
|
35
|
-
},
|
|
43
|
+
}, j = {
|
|
36
44
|
y: 0,
|
|
37
45
|
opacity: 1
|
|
38
|
-
},
|
|
46
|
+
}, M = x ? { duration: 0 } : {
|
|
39
47
|
...t("medium"),
|
|
40
48
|
type: "tween"
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
}, N = _ != null, P = g === "fixed" || N;
|
|
50
|
+
ke(P && C, _);
|
|
51
|
+
let F = o != null, I = n != null, L = i != null, R = a != null || F, z = F ? /* @__PURE__ */ X(r, {
|
|
52
|
+
icon: /* @__PURE__ */ X(xe, { strokeWidth: 2 }),
|
|
53
|
+
"aria-label": w ? "Close menu" : "Open menu",
|
|
44
54
|
title: "",
|
|
45
55
|
size: "sm",
|
|
46
|
-
className:
|
|
47
|
-
"aria-
|
|
48
|
-
|
|
56
|
+
className: ce,
|
|
57
|
+
"aria-haspopup": "dialog",
|
|
58
|
+
"aria-expanded": w,
|
|
59
|
+
"aria-controls": w ? E : void 0,
|
|
60
|
+
onClick: () => T((e) => !e)
|
|
49
61
|
}) : null;
|
|
50
62
|
function B(e) {
|
|
51
63
|
return /* @__PURE__ */ Z("div", {
|
|
52
|
-
className:
|
|
64
|
+
className: Oe(I, L, R, e),
|
|
53
65
|
children: [
|
|
54
|
-
|
|
55
|
-
className:
|
|
66
|
+
I ? /* @__PURE__ */ X("div", {
|
|
67
|
+
className: pe,
|
|
56
68
|
children: n
|
|
57
69
|
}) : null,
|
|
58
|
-
|
|
59
|
-
className:
|
|
70
|
+
L ? /* @__PURE__ */ X("div", {
|
|
71
|
+
className: F ? e ? ae : oe : e ? ie : re,
|
|
60
72
|
children: i
|
|
61
73
|
}) : null,
|
|
62
74
|
R ? /* @__PURE__ */ Z("div", {
|
|
@@ -66,96 +78,97 @@ function je({ start: n, middle: i, end: a, mobile: o, mobileTitle: s = "Menu", c
|
|
|
66
78
|
]
|
|
67
79
|
});
|
|
68
80
|
}
|
|
69
|
-
let V = e(u, f.compact, d[m]),
|
|
81
|
+
let V = e(u, f.compact, d[m]), H = /* @__PURE__ */ X("div", {
|
|
70
82
|
"data-state": "expanded",
|
|
71
83
|
className: e(u, f.expanded),
|
|
72
84
|
children: B(!1)
|
|
73
|
-
}),
|
|
74
|
-
ref:
|
|
85
|
+
}), U = /* @__PURE__ */ X("div", {
|
|
86
|
+
ref: b,
|
|
75
87
|
className: e(h, "px-[var(--grid-margin)]"),
|
|
76
88
|
children: /* @__PURE__ */ X("div", {
|
|
77
89
|
"data-state": "compact",
|
|
78
90
|
className: V,
|
|
79
|
-
children: B(
|
|
91
|
+
children: B(k)
|
|
80
92
|
})
|
|
81
93
|
}), W = {
|
|
82
|
-
initial: !
|
|
83
|
-
animate:
|
|
84
|
-
exit:
|
|
85
|
-
transition:
|
|
86
|
-
},
|
|
87
|
-
return /* @__PURE__ */ Z(
|
|
94
|
+
initial: !x && A,
|
|
95
|
+
animate: j,
|
|
96
|
+
exit: x ? j : A,
|
|
97
|
+
transition: M
|
|
98
|
+
}, G = N ? e(fe, "h-0 w-full overflow-visible") : le;
|
|
99
|
+
return /* @__PURE__ */ Z(De.Provider, {
|
|
88
100
|
value: {
|
|
89
|
-
state:
|
|
90
|
-
anchorRef:
|
|
91
|
-
menuOpen:
|
|
92
|
-
setMenuOpen:
|
|
101
|
+
state: S,
|
|
102
|
+
anchorRef: b,
|
|
103
|
+
menuOpen: D,
|
|
104
|
+
setMenuOpen: O
|
|
93
105
|
},
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */ X(
|
|
106
|
+
children: [P ? /* @__PURE__ */ Z(Se, { children: [
|
|
107
|
+
/* @__PURE__ */ X(Ce, { children: C ? /* @__PURE__ */ X(we.div, {
|
|
96
108
|
...W,
|
|
97
|
-
className: e(
|
|
109
|
+
className: e(G, !N && y),
|
|
98
110
|
children: /* @__PURE__ */ X("header", {
|
|
99
|
-
"aria-label":
|
|
111
|
+
"aria-label": v,
|
|
100
112
|
"data-state": "compact",
|
|
101
|
-
"data-menu":
|
|
102
|
-
className: e(
|
|
103
|
-
children:
|
|
113
|
+
"data-menu": D ? "open" : "closed",
|
|
114
|
+
className: e(N && e("w-full", y)),
|
|
115
|
+
children: U
|
|
104
116
|
})
|
|
105
117
|
}, "site-nav-compact") : null }),
|
|
106
|
-
|
|
107
|
-
className: e(
|
|
118
|
+
C ? /* @__PURE__ */ X("div", {
|
|
119
|
+
className: e(ne, "w-full"),
|
|
108
120
|
"aria-hidden": !0
|
|
109
121
|
}) : null,
|
|
110
|
-
|
|
111
|
-
"aria-label":
|
|
122
|
+
C ? null : /* @__PURE__ */ X("header", {
|
|
123
|
+
"aria-label": v,
|
|
112
124
|
"data-state": "expanded",
|
|
113
|
-
"data-menu":
|
|
114
|
-
className: e(
|
|
125
|
+
"data-menu": D ? "open" : "closed",
|
|
126
|
+
className: e(ue, y),
|
|
115
127
|
children: /* @__PURE__ */ X("div", {
|
|
116
|
-
ref:
|
|
128
|
+
ref: b,
|
|
117
129
|
className: h,
|
|
118
|
-
children:
|
|
130
|
+
children: H
|
|
119
131
|
})
|
|
120
132
|
})
|
|
121
133
|
] }) : /* @__PURE__ */ X("header", {
|
|
122
|
-
"aria-label":
|
|
123
|
-
"data-state":
|
|
124
|
-
"data-menu":
|
|
125
|
-
className: e(
|
|
134
|
+
"aria-label": v,
|
|
135
|
+
"data-state": S,
|
|
136
|
+
"data-menu": D ? "open" : "closed",
|
|
137
|
+
className: e(de, y),
|
|
126
138
|
children: /* @__PURE__ */ X("div", {
|
|
127
|
-
ref:
|
|
128
|
-
className: e(h,
|
|
129
|
-
children: /* @__PURE__ */ X(
|
|
139
|
+
ref: b,
|
|
140
|
+
className: e(h, C && "px-[var(--grid-margin)]"),
|
|
141
|
+
children: /* @__PURE__ */ X(Ce, {
|
|
130
142
|
initial: !1,
|
|
131
143
|
mode: "popLayout",
|
|
132
|
-
children:
|
|
133
|
-
initial: !
|
|
134
|
-
animate:
|
|
135
|
-
exit:
|
|
136
|
-
transition:
|
|
144
|
+
children: C ? /* @__PURE__ */ X(we.div, {
|
|
145
|
+
initial: !x && A,
|
|
146
|
+
animate: j,
|
|
147
|
+
exit: x ? j : A,
|
|
148
|
+
transition: M,
|
|
137
149
|
"data-state": "compact",
|
|
138
150
|
className: V,
|
|
139
151
|
children: B(!0)
|
|
140
|
-
}, "compact") : /* @__PURE__ */ X("div", { children:
|
|
152
|
+
}, "compact") : /* @__PURE__ */ X("div", { children: H }, "expanded")
|
|
141
153
|
})
|
|
142
154
|
})
|
|
143
|
-
}),
|
|
144
|
-
open:
|
|
155
|
+
}), F ? /* @__PURE__ */ X(c, {
|
|
156
|
+
open: w,
|
|
145
157
|
onOpenChange: T,
|
|
146
|
-
children: /* @__PURE__ */ X(
|
|
158
|
+
children: /* @__PURE__ */ X(c.Content, {
|
|
159
|
+
id: E,
|
|
147
160
|
side: "end",
|
|
148
161
|
title: s,
|
|
149
162
|
children: /* @__PURE__ */ X("div", {
|
|
150
|
-
className:
|
|
163
|
+
className: se,
|
|
151
164
|
children: o
|
|
152
165
|
})
|
|
153
166
|
})
|
|
154
167
|
}) : null]
|
|
155
168
|
});
|
|
156
169
|
}
|
|
157
|
-
function
|
|
158
|
-
let o = t ?? (
|
|
170
|
+
function je({ href: e, icon: t, children: i, "aria-label": a }) {
|
|
171
|
+
let o = t ?? (q(i) && i.type !== void 0 ? i : null);
|
|
159
172
|
return o == null ? /* @__PURE__ */ X(n, {
|
|
160
173
|
role: "ghost",
|
|
161
174
|
size: "sm",
|
|
@@ -173,94 +186,35 @@ function Me({ href: e, icon: t, children: i, "aria-label": a }) {
|
|
|
173
186
|
className: p
|
|
174
187
|
});
|
|
175
188
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
189
|
+
function Me(e) {
|
|
190
|
+
return K.toArray(e).filter(q);
|
|
178
191
|
}
|
|
179
192
|
function $(e) {
|
|
180
193
|
let t = e.props;
|
|
181
194
|
return typeof t.value == "string" && t.value.length > 0 ? t.value : typeof t.href == "string" ? t.href : typeof t.label == "string" ? t.label : "item";
|
|
182
195
|
}
|
|
183
|
-
function
|
|
196
|
+
function Ne(e) {
|
|
184
197
|
let t = e.props;
|
|
185
198
|
return t.label ?? t.children;
|
|
186
199
|
}
|
|
187
|
-
function
|
|
200
|
+
function Pe(e) {
|
|
188
201
|
return "label" in e.props && !("href" in e.props);
|
|
189
202
|
}
|
|
190
|
-
function
|
|
203
|
+
function Fe(e) {
|
|
191
204
|
for (let t of e) if (t.props.current) return $(t);
|
|
192
205
|
return e[0] == null ? "" : $(e[0]);
|
|
193
206
|
}
|
|
194
|
-
function
|
|
195
|
-
let
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}))
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}, [g, m]);
|
|
206
|
-
xe(() => {
|
|
207
|
-
N();
|
|
208
|
-
let e = u.current;
|
|
209
|
-
if (e == null) return;
|
|
210
|
-
let t = new ResizeObserver(N);
|
|
211
|
-
return t.observe(e), document.fonts?.ready.then(N), () => t.disconnect();
|
|
212
|
-
}, [N]);
|
|
213
|
-
let ie = new Set(_), ae = new Set(v), oe = m.filter((e) => ie.has($(e))), F = m.filter((e) => ae.has($(e))), I = K(() => {
|
|
214
|
-
D(!1), A(null);
|
|
215
|
-
}, []), L = K(() => {
|
|
216
|
-
let e = d.current;
|
|
217
|
-
if (e == null) return;
|
|
218
|
-
let t = F.flatMap(H);
|
|
219
|
-
A(o(e, t.map((e) => ({ label: String(e.label ?? "") })), {
|
|
220
|
-
align: "end",
|
|
221
|
-
widthMode: "content"
|
|
222
|
-
})), M(0), D(!0);
|
|
223
|
-
}, [F]);
|
|
224
|
-
ye(() => {
|
|
225
|
-
if (!E) return;
|
|
226
|
-
function e(e) {
|
|
227
|
-
let t = e.target;
|
|
228
|
-
u.current?.contains(t) || document.getElementById(l)?.contains(t) || I();
|
|
229
|
-
}
|
|
230
|
-
function t(e) {
|
|
231
|
-
e.key === "Escape" && (I(), d.current?.focus());
|
|
232
|
-
}
|
|
233
|
-
return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), window.addEventListener("resize", I), window.addEventListener("scroll", I, !0), () => {
|
|
234
|
-
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t), window.removeEventListener("resize", I), window.removeEventListener("scroll", I, !0);
|
|
235
|
-
};
|
|
236
|
-
}, [
|
|
237
|
-
I,
|
|
238
|
-
l,
|
|
239
|
-
E
|
|
240
|
-
]);
|
|
241
|
-
function se(e) {
|
|
242
|
-
let t = F.flatMap(H);
|
|
243
|
-
if (t.length !== 0) {
|
|
244
|
-
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
245
|
-
if (e.preventDefault(), !E) {
|
|
246
|
-
L(), M(e.key === "ArrowDown" ? 0 : Math.max(t.length - 1, 0));
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
let n = e.key === "ArrowDown" ? 1 : -1;
|
|
250
|
-
M((e) => (e + n + t.length) % t.length);
|
|
251
|
-
}
|
|
252
|
-
if ((e.key === "Enter" || e.key === " ") && E) {
|
|
253
|
-
e.preventDefault();
|
|
254
|
-
let t = F.flatMap(H)[j];
|
|
255
|
-
t != null && V(t.href);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
function V(e) {
|
|
260
|
-
I(), e != null && e.length > 0 && window.location.assign(e);
|
|
261
|
-
}
|
|
262
|
-
function H(e) {
|
|
263
|
-
if (!Fe(e)) {
|
|
207
|
+
function Ie({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDelay: o = 150 }) {
|
|
208
|
+
let s = ge(De), c = ye(() => Me(t), [t]), u = new Map(c.map((e) => [$(e), e])), d = (e) => e.flatMap((e) => u.get(e) ?? []), f = (e) => d(e).flatMap(_), p = ee({
|
|
209
|
+
ids: c.map($),
|
|
210
|
+
activeId: Fe(c),
|
|
211
|
+
toMenuRows: (e) => f(e).map((e) => ({
|
|
212
|
+
label: l(e.label),
|
|
213
|
+
disabled: e.href == null
|
|
214
|
+
}))
|
|
215
|
+
}), { menu: m } = p, h = d(p.visibleIds), g = f(p.overflowIds);
|
|
216
|
+
function _(e) {
|
|
217
|
+
if (!Pe(e)) {
|
|
264
218
|
let t = e.props;
|
|
265
219
|
return [{
|
|
266
220
|
id: $(e),
|
|
@@ -271,8 +225,8 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
271
225
|
}
|
|
272
226
|
let t = [];
|
|
273
227
|
function n(e) {
|
|
274
|
-
|
|
275
|
-
if (!
|
|
228
|
+
K.forEach(e, (e) => {
|
|
229
|
+
if (!q(e)) return;
|
|
276
230
|
let r = e.props;
|
|
277
231
|
if (typeof r.href == "string" && r.label == null) {
|
|
278
232
|
t.push({
|
|
@@ -287,52 +241,51 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
287
241
|
}
|
|
288
242
|
return n(e.props.children), t.length === 0 && t.push({
|
|
289
243
|
id: $(e),
|
|
290
|
-
label:
|
|
244
|
+
label: Ne(e)
|
|
291
245
|
}), t;
|
|
292
246
|
}
|
|
293
247
|
return /* @__PURE__ */ Z("div", {
|
|
294
|
-
|
|
295
|
-
className:
|
|
248
|
+
...p.rowProps,
|
|
249
|
+
className: b,
|
|
296
250
|
children: [
|
|
297
251
|
/* @__PURE__ */ Z(Q.Root, {
|
|
298
252
|
"aria-label": r,
|
|
299
253
|
delay: i,
|
|
300
|
-
closeDelay:
|
|
301
|
-
className:
|
|
302
|
-
onValueChange: (e) =>
|
|
254
|
+
closeDelay: o,
|
|
255
|
+
className: z,
|
|
256
|
+
onValueChange: (e) => s?.setMenuOpen(e != null),
|
|
303
257
|
children: [/* @__PURE__ */ X(Q.List, {
|
|
304
|
-
className:
|
|
305
|
-
children:
|
|
306
|
-
}), /* @__PURE__ */ Z(Q.Portal, { children: [/* @__PURE__ */ X(Q.Backdrop, { className:
|
|
307
|
-
anchor:
|
|
258
|
+
className: y,
|
|
259
|
+
children: h
|
|
260
|
+
}), /* @__PURE__ */ Z(Q.Portal, { children: [/* @__PURE__ */ X(Q.Backdrop, { className: w }), /* @__PURE__ */ X(Q.Positioner, {
|
|
261
|
+
anchor: s?.anchorRef,
|
|
308
262
|
positionMethod: "fixed",
|
|
309
263
|
side: "bottom",
|
|
310
264
|
align: "center",
|
|
311
265
|
sideOffset: 8,
|
|
312
266
|
collisionPadding: 8,
|
|
313
|
-
className:
|
|
267
|
+
className: k,
|
|
314
268
|
children: /* @__PURE__ */ X(Q.Popup, {
|
|
315
|
-
className:
|
|
316
|
-
children: /* @__PURE__ */ X(Q.Viewport, { className:
|
|
269
|
+
className: O,
|
|
270
|
+
children: /* @__PURE__ */ X(Q.Viewport, { className: F })
|
|
317
271
|
})
|
|
318
272
|
})] })]
|
|
319
273
|
}),
|
|
320
|
-
|
|
321
|
-
ref:
|
|
274
|
+
p.overflowIds.length > 0 ? /* @__PURE__ */ X(n, {
|
|
275
|
+
ref: p.moreRef,
|
|
322
276
|
role: "ghost",
|
|
323
277
|
size: "sm",
|
|
324
278
|
"aria-haspopup": "menu",
|
|
325
|
-
"aria-expanded":
|
|
326
|
-
"aria-controls":
|
|
327
|
-
"data-state":
|
|
328
|
-
className:
|
|
329
|
-
onClick:
|
|
330
|
-
onKeyDown: se,
|
|
279
|
+
"aria-expanded": m.open,
|
|
280
|
+
"aria-controls": m.triggerProps["aria-controls"],
|
|
281
|
+
"data-state": m.open ? "open" : "closed",
|
|
282
|
+
className: R,
|
|
283
|
+
onClick: m.toggle,
|
|
331
284
|
children: /* @__PURE__ */ Z("span", {
|
|
332
|
-
className:
|
|
285
|
+
className: G,
|
|
333
286
|
children: ["More", /* @__PURE__ */ X("span", {
|
|
334
|
-
className:
|
|
335
|
-
"data-state":
|
|
287
|
+
className: L,
|
|
288
|
+
"data-state": m.open ? "open" : "closed",
|
|
336
289
|
children: /* @__PURE__ */ X(Y, {
|
|
337
290
|
strokeWidth: 2,
|
|
338
291
|
"aria-hidden": !0
|
|
@@ -341,44 +294,44 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
341
294
|
})
|
|
342
295
|
}) : null,
|
|
343
296
|
/* @__PURE__ */ Z("div", {
|
|
344
|
-
className:
|
|
297
|
+
className: C,
|
|
345
298
|
"aria-hidden": !0,
|
|
346
|
-
children: [
|
|
347
|
-
let n = $(t), r =
|
|
299
|
+
children: [c.map((t) => {
|
|
300
|
+
let n = $(t), r = Ne(t), i = Pe(t);
|
|
348
301
|
return /* @__PURE__ */ Z("span", {
|
|
349
|
-
ref: (
|
|
350
|
-
|
|
351
|
-
},
|
|
352
|
-
className: e(S, i ? W : y),
|
|
302
|
+
ref: p.measureRef(n),
|
|
303
|
+
className: e(x, i ? U : v),
|
|
353
304
|
children: [r, i ? /* @__PURE__ */ X(Y, {
|
|
354
305
|
className: "ml-1 size-3.5",
|
|
355
306
|
strokeWidth: 2
|
|
356
307
|
}) : null]
|
|
357
308
|
}, n);
|
|
358
309
|
}), /* @__PURE__ */ Z("span", {
|
|
359
|
-
ref:
|
|
360
|
-
className: e(
|
|
310
|
+
ref: p.moreMeasureRef,
|
|
311
|
+
className: e(R, S),
|
|
361
312
|
children: ["More", /* @__PURE__ */ X(Y, {
|
|
362
313
|
className: "size-3.5",
|
|
363
314
|
strokeWidth: 2
|
|
364
315
|
})]
|
|
365
316
|
})]
|
|
366
317
|
}),
|
|
367
|
-
|
|
368
|
-
|
|
318
|
+
m.open && m.menuStyle != null ? Ee(/* @__PURE__ */ X(a.Menu, {
|
|
319
|
+
...m.menuProps,
|
|
369
320
|
role: "menu",
|
|
370
321
|
"aria-label": `${r} overflow`,
|
|
371
|
-
|
|
372
|
-
children: F.flatMap(H).map((e, t) => /* @__PURE__ */ X("li", {
|
|
322
|
+
children: g.map((e, t) => /* @__PURE__ */ X("li", {
|
|
373
323
|
role: "presentation",
|
|
374
324
|
children: /* @__PURE__ */ X(a.Item, {
|
|
325
|
+
...m.rowProps(t),
|
|
375
326
|
role: "menuitem",
|
|
376
|
-
tabIndex: -1,
|
|
377
327
|
truncate: !1,
|
|
378
328
|
selected: !!e.current,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
329
|
+
disabled: e.href == null,
|
|
330
|
+
render: e.href == null ? void 0 : /* @__PURE__ */ X("a", {
|
|
331
|
+
href: e.href,
|
|
332
|
+
"aria-current": e.current ? "page" : void 0
|
|
333
|
+
}),
|
|
334
|
+
onClick: () => m.close(),
|
|
382
335
|
children: e.label
|
|
383
336
|
})
|
|
384
337
|
}, e.id))
|
|
@@ -386,7 +339,7 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
386
339
|
]
|
|
387
340
|
});
|
|
388
341
|
}
|
|
389
|
-
function
|
|
342
|
+
function Le({ href: e, children: t, current: r = !1, value: i }) {
|
|
390
343
|
return /* @__PURE__ */ X(Q.Item, {
|
|
391
344
|
value: i ?? e,
|
|
392
345
|
children: /* @__PURE__ */ X(Q.Link, {
|
|
@@ -397,24 +350,24 @@ function Re({ href: e, children: t, current: r = !1, value: i }) {
|
|
|
397
350
|
role: "ghost",
|
|
398
351
|
size: "sm",
|
|
399
352
|
render: /* @__PURE__ */ X("a", {}),
|
|
400
|
-
className:
|
|
353
|
+
className: v,
|
|
401
354
|
children: t
|
|
402
355
|
})
|
|
403
356
|
})
|
|
404
357
|
});
|
|
405
358
|
}
|
|
406
|
-
function
|
|
359
|
+
function Re({ label: e, children: t, value: r }) {
|
|
407
360
|
let i = r ?? (typeof e == "string" ? e : void 0);
|
|
408
361
|
return /* @__PURE__ */ Z(Q.Item, {
|
|
409
362
|
value: i,
|
|
410
363
|
children: [/* @__PURE__ */ X(Q.Trigger, { render: /* @__PURE__ */ X(n, {
|
|
411
364
|
role: "ghost",
|
|
412
365
|
size: "sm",
|
|
413
|
-
className:
|
|
366
|
+
className: U,
|
|
414
367
|
children: /* @__PURE__ */ Z("span", {
|
|
415
|
-
className:
|
|
368
|
+
className: G,
|
|
416
369
|
children: [e, /* @__PURE__ */ X(Q.Icon, {
|
|
417
|
-
className:
|
|
370
|
+
className: W,
|
|
418
371
|
children: /* @__PURE__ */ X(Y, {
|
|
419
372
|
strokeWidth: 2,
|
|
420
373
|
"aria-hidden": !0
|
|
@@ -427,16 +380,16 @@ function ze({ label: e, children: t, value: r }) {
|
|
|
427
380
|
})]
|
|
428
381
|
});
|
|
429
382
|
}
|
|
430
|
-
function
|
|
383
|
+
function ze({ label: t, span: n = 1, children: r }) {
|
|
431
384
|
return /* @__PURE__ */ Z("section", {
|
|
432
|
-
className: e(
|
|
385
|
+
className: e(M, P[n]),
|
|
433
386
|
children: [t == null ? null : /* @__PURE__ */ X("h3", {
|
|
434
|
-
className:
|
|
387
|
+
className: N,
|
|
435
388
|
children: t
|
|
436
389
|
}), r]
|
|
437
390
|
});
|
|
438
391
|
}
|
|
439
|
-
function
|
|
392
|
+
function Be({ href: e, children: t, icon: r, external: i = !1, size: a = "sm" }) {
|
|
440
393
|
return /* @__PURE__ */ X(Q.Link, {
|
|
441
394
|
href: e,
|
|
442
395
|
target: i ? "_blank" : void 0,
|
|
@@ -454,20 +407,20 @@ function Ve({ href: e, children: t, icon: r, external: i = !1, size: a = "sm" })
|
|
|
454
407
|
})
|
|
455
408
|
});
|
|
456
409
|
}
|
|
457
|
-
function
|
|
410
|
+
function Ve({ children: e }) {
|
|
458
411
|
return /* @__PURE__ */ X("div", {
|
|
459
412
|
className: D,
|
|
460
413
|
children: e
|
|
461
414
|
});
|
|
462
415
|
}
|
|
463
|
-
function
|
|
416
|
+
function He({ label: t, variant: n = "thumb", className: r }) {
|
|
464
417
|
return /* @__PURE__ */ X("div", {
|
|
465
418
|
role: "img",
|
|
466
419
|
"aria-label": t,
|
|
467
|
-
className: e(
|
|
420
|
+
className: e(s, o, n === "featured" ? "aspect-[16/10] w-full" : j, r)
|
|
468
421
|
});
|
|
469
422
|
}
|
|
470
|
-
function
|
|
423
|
+
function Ue({ media: e, title: t, description: n, href: r, linkLabel: a = "Read now" }) {
|
|
471
424
|
return /* @__PURE__ */ Z("div", {
|
|
472
425
|
className: "flex flex-col gap-1 type-body",
|
|
473
426
|
children: [
|
|
@@ -487,9 +440,9 @@ function We({ media: e, title: t, description: n, href: r, linkLabel: a = "Read
|
|
|
487
440
|
]
|
|
488
441
|
});
|
|
489
442
|
}
|
|
490
|
-
function
|
|
443
|
+
function We({ media: e, title: t, description: n, href: r, linkLabel: a = "Read now" }) {
|
|
491
444
|
return /* @__PURE__ */ Z("div", {
|
|
492
|
-
className:
|
|
445
|
+
className: A,
|
|
493
446
|
children: [e, /* @__PURE__ */ Z("div", {
|
|
494
447
|
className: "flex min-w-0 flex-col gap-1 type-body",
|
|
495
448
|
children: [
|
|
@@ -509,7 +462,7 @@ function Ge({ media: e, title: t, description: n, href: r, linkLabel: a = "Read
|
|
|
509
462
|
})]
|
|
510
463
|
});
|
|
511
464
|
}
|
|
512
|
-
function
|
|
465
|
+
function Ge({ href: e, children: t, current: r = !1 }) {
|
|
513
466
|
return /* @__PURE__ */ X(n, {
|
|
514
467
|
role: "ghost",
|
|
515
468
|
size: "md",
|
|
@@ -519,18 +472,18 @@ function Ke({ href: e, children: t, current: r = !1 }) {
|
|
|
519
472
|
children: t
|
|
520
473
|
});
|
|
521
474
|
}
|
|
522
|
-
var
|
|
523
|
-
Brand:
|
|
524
|
-
Links:
|
|
525
|
-
Link:
|
|
526
|
-
Menu:
|
|
527
|
-
MenuSection:
|
|
528
|
-
MenuLink:
|
|
529
|
-
MenuLinkGrid:
|
|
530
|
-
MenuMedia:
|
|
531
|
-
Featured:
|
|
532
|
-
ReadRow:
|
|
533
|
-
MobileLink:
|
|
475
|
+
var Ke = Object.assign(Ae, {
|
|
476
|
+
Brand: je,
|
|
477
|
+
Links: Ie,
|
|
478
|
+
Link: Le,
|
|
479
|
+
Menu: Re,
|
|
480
|
+
MenuSection: ze,
|
|
481
|
+
MenuLink: Be,
|
|
482
|
+
MenuLinkGrid: Ve,
|
|
483
|
+
MenuMedia: He,
|
|
484
|
+
Featured: Ue,
|
|
485
|
+
ReadRow: We,
|
|
486
|
+
MobileLink: Ge
|
|
534
487
|
});
|
|
535
488
|
//#endregion
|
|
536
|
-
export {
|
|
489
|
+
export { Ke as SiteNav, m as siteNavCompactLayouts, g as siteNavDefaultCollapseAt, _ as siteNavDefaultCollapseRatio, ne as siteNavExpandedHeightClasses, A as siteNavMenuReadRowClasses, j as siteNavMenuReadThumbClasses, B as siteNavPlacements, H as siteNavStates };
|
|
@@ -5,7 +5,7 @@ import { motionTransition as n } from "../../../lib/motion.js";
|
|
|
5
5
|
//#region src/components/organisms/SiteNav/siteNavStyles.ts
|
|
6
6
|
var r = ["expanded", "compact"], i = ["fixed", "inline"], a = ["hug", "grid"], o = .5, s = 64, c = "h-[var(--site-nav-height)] min-h-[var(--site-nav-height)]", l = "top-4", u = "pointer-events-none relative z-50 w-full", d = e("pointer-events-none fixed inset-x-0 z-50", l), f = e("pointer-events-none sticky z-50 w-full", l), p = "relative z-50 w-full", m = "relative mx-auto w-full max-w-[var(--grid-max)]", h = "pointer-events-auto relative z-[1] flex items-center", g = {
|
|
7
7
|
expanded: e(c, "w-full border border-transparent bg-transparent px-[var(--grid-margin)] shadow-none"),
|
|
8
|
-
compact: e("box-border rounded-
|
|
8
|
+
compact: e("box-border rounded-[var(--radius-control)] border border-elevation-edge bg-elevation-surface p-1.5 shadow-soft-sm backdrop-blur-md", "supports-[backdrop-filter]:bg-elevation-surface")
|
|
9
9
|
}, _ = {
|
|
10
10
|
hug: "mx-auto w-max max-w-full",
|
|
11
11
|
grid: "w-full"
|