@thewhatmatters/wmds 0.4.27 → 0.4.28
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 +50 -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.map +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +69 -90
- 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 +236 -286
- 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,262 +5,213 @@ 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 { 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 v, siteNavLinkClasses as y, siteNavLinkListClasses as b, siteNavLinksRootClasses as x, siteNavMeasureItemClasses as S, siteNavMeasureMoreClasses as C, siteNavMeasureRailClasses as w, siteNavMenuBackdropClasses as ne, siteNavMenuContentClasses as T, siteNavMenuLinkClasses as E, siteNavMenuLinkGridClasses as D, siteNavMenuPopupClasses as re, siteNavMenuPositionerClasses as O, siteNavMenuReadRowClasses as k, siteNavMenuReadThumbClasses as A, siteNavMenuSectionClasses as j, siteNavMenuSectionLabelClasses as M, siteNavMenuSectionSpanClasses as N, siteNavMenuViewportClasses as P, siteNavMiddleClasses as ie, siteNavMiddleHugClasses as ae, siteNavMiddleHugResponsiveClasses as oe, siteNavMiddleResponsiveClasses as F, siteNavMobileLinkClasses as I, siteNavMobileListClasses as L, siteNavMobileTriggerClasses as se, siteNavMoreIconClasses as R, siteNavMoreTriggerClasses as z, siteNavNavigationRootClasses as B, siteNavPlacements as V, siteNavRootFixedClasses as H, siteNavRootFlowClasses as ce, siteNavRootInlineClasses as le, siteNavRootStickyClasses as ue, siteNavSlotsClasses as U, siteNavStartClasses as de, siteNavStates as fe, siteNavTriggerClasses as W, siteNavTriggerIconClasses as pe, siteNavTriggerLabelClasses as me } from "./siteNavStyles.js";
|
|
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 u } from "../../molecules/Dropdown/useOverflowMenu.js";
|
|
11
|
+
import { siteNavBarBaseClasses as d, siteNavBarCompactLayoutClasses as f, siteNavBarStateClasses as p, siteNavBrandClasses as m, siteNavCompactLayouts as h, siteNavContainerClasses as g, siteNavDefaultCollapseAt as _, siteNavDefaultCollapseRatio as v, siteNavEndClasses as ee, siteNavExpandedHeightClasses as y, siteNavLinkClasses as b, siteNavLinkListClasses as x, siteNavLinksRootClasses as S, siteNavMeasureItemClasses as C, siteNavMeasureMoreClasses as w, siteNavMeasureRailClasses as T, siteNavMenuBackdropClasses as E, siteNavMenuContentClasses as D, siteNavMenuLinkClasses as O, siteNavMenuLinkGridClasses as te, siteNavMenuPopupClasses as k, siteNavMenuPositionerClasses as A, siteNavMenuReadRowClasses as j, siteNavMenuReadThumbClasses as M, siteNavMenuSectionClasses as N, siteNavMenuSectionLabelClasses as P, siteNavMenuSectionSpanClasses as F, siteNavMenuViewportClasses as I, siteNavMiddleClasses as ne, siteNavMiddleHugClasses as re, siteNavMiddleHugResponsiveClasses as ie, siteNavMiddleResponsiveClasses as ae, siteNavMobileLinkClasses as L, siteNavMobileListClasses as oe, siteNavMobileTriggerClasses as se, siteNavMoreIconClasses as R, siteNavMoreTriggerClasses as z, siteNavNavigationRootClasses as B, siteNavPlacements as V, siteNavRootFixedClasses as ce, siteNavRootFlowClasses as le, siteNavRootInlineClasses as ue, siteNavRootStickyClasses as de, siteNavSlotsClasses as H, siteNavStartClasses as fe, siteNavStates as U, siteNavTriggerClasses as W, siteNavTriggerIconClasses as pe, siteNavTriggerLabelClasses as me } from "./siteNavStyles.js";
|
|
13
12
|
import { useSiteNavCollapse as he } from "./useSiteNavCollapse.js";
|
|
14
|
-
import { Children as
|
|
15
|
-
import { ChevronDown as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { AnimatePresence as
|
|
18
|
-
import { createPortal as
|
|
13
|
+
import { Children as G, createContext as ge, isValidElement as K, useContext as _e, useEffect as ve, useMemo as ye, useRef as be, useState as q } from "react";
|
|
14
|
+
import { ChevronDown as J, Menu as xe } from "lucide-react";
|
|
15
|
+
import { Fragment as Se, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
16
|
+
import { AnimatePresence as Z, motion as Ce, useReducedMotion as we } from "motion/react";
|
|
17
|
+
import { createPortal as Te } 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 Ee = ge(null);
|
|
21
|
+
function De(e, t, n, r) {
|
|
22
|
+
return t && (e || n) ? r ? H.threeHug : H.three : t ? H.middleOnly : e && n ? H.ends : e ? H.startOnly : H.endOnly;
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
24
|
+
function Oe(e, t) {
|
|
25
|
+
ve(() => {
|
|
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 ke({ start: n, middle: i, end: a, mobile: o, mobileTitle: s = "Menu", collapseAt: l, state: u, onStateChange: m, compactLayout: h = "hug", placement: _ = "fixed", scrollContainer: v, "aria-label": b = "Site", className: x }) {
|
|
34
|
+
let S = be(null), C = we() ?? !1, { state: w, compact: T } = he({
|
|
35
|
+
collapseAt: l,
|
|
36
|
+
scrollContainer: v,
|
|
37
|
+
controlledState: u,
|
|
38
|
+
placement: _,
|
|
39
|
+
onStateChange: m
|
|
40
|
+
}), [E, D] = q(!1), [O, te] = q(!1), k = T && h === "hug", A = {
|
|
33
41
|
y: -72,
|
|
34
42
|
opacity: 0
|
|
35
|
-
},
|
|
43
|
+
}, j = {
|
|
36
44
|
y: 0,
|
|
37
45
|
opacity: 1
|
|
38
|
-
},
|
|
46
|
+
}, M = C ? { duration: 0 } : {
|
|
39
47
|
...t("medium"),
|
|
40
48
|
type: "tween"
|
|
41
|
-
},
|
|
42
|
-
|
|
49
|
+
}, N = v != null, P = _ === "fixed" || N;
|
|
50
|
+
Oe(P && T, v);
|
|
51
|
+
let F = o != null, I = n != null, L = i != null, R = a != null || F, z = F ? /* @__PURE__ */ Y(r, {
|
|
52
|
+
icon: /* @__PURE__ */ Y(xe, { strokeWidth: 2 }),
|
|
43
53
|
"aria-label": "Open menu",
|
|
44
54
|
title: "",
|
|
45
55
|
size: "sm",
|
|
46
56
|
className: se,
|
|
47
|
-
"aria-expanded":
|
|
48
|
-
onClick: () =>
|
|
57
|
+
"aria-expanded": E,
|
|
58
|
+
onClick: () => D(!0)
|
|
49
59
|
}) : null;
|
|
50
60
|
function B(e) {
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
className:
|
|
61
|
+
return /* @__PURE__ */ X("div", {
|
|
62
|
+
className: De(I, L, R, e),
|
|
53
63
|
children: [
|
|
54
|
-
|
|
55
|
-
className:
|
|
64
|
+
I ? /* @__PURE__ */ Y("div", {
|
|
65
|
+
className: fe,
|
|
56
66
|
children: n
|
|
57
67
|
}) : null,
|
|
58
|
-
|
|
59
|
-
className:
|
|
68
|
+
L ? /* @__PURE__ */ Y("div", {
|
|
69
|
+
className: F ? e ? ie : ae : e ? re : ne,
|
|
60
70
|
children: i
|
|
61
71
|
}) : null,
|
|
62
|
-
R ? /* @__PURE__ */
|
|
63
|
-
className:
|
|
72
|
+
R ? /* @__PURE__ */ X("div", {
|
|
73
|
+
className: ee,
|
|
64
74
|
children: [a, z]
|
|
65
75
|
}) : null
|
|
66
76
|
]
|
|
67
77
|
});
|
|
68
78
|
}
|
|
69
|
-
let V = e(
|
|
79
|
+
let V = e(d, p.compact, f[h]), H = /* @__PURE__ */ Y("div", {
|
|
70
80
|
"data-state": "expanded",
|
|
71
|
-
className: e(
|
|
81
|
+
className: e(d, p.expanded),
|
|
72
82
|
children: B(!1)
|
|
73
|
-
}),
|
|
74
|
-
ref:
|
|
75
|
-
className: e(
|
|
76
|
-
children: /* @__PURE__ */
|
|
83
|
+
}), U = /* @__PURE__ */ Y("div", {
|
|
84
|
+
ref: S,
|
|
85
|
+
className: e(g, "px-[var(--grid-margin)]"),
|
|
86
|
+
children: /* @__PURE__ */ Y("div", {
|
|
77
87
|
"data-state": "compact",
|
|
78
88
|
className: V,
|
|
79
|
-
children: B(
|
|
89
|
+
children: B(k)
|
|
80
90
|
})
|
|
81
91
|
}), W = {
|
|
82
|
-
initial: !
|
|
83
|
-
animate:
|
|
84
|
-
exit:
|
|
85
|
-
transition:
|
|
86
|
-
}, pe =
|
|
87
|
-
return /* @__PURE__ */
|
|
92
|
+
initial: !C && A,
|
|
93
|
+
animate: j,
|
|
94
|
+
exit: C ? j : A,
|
|
95
|
+
transition: M
|
|
96
|
+
}, pe = N ? e(de, "h-0 w-full overflow-visible") : ce;
|
|
97
|
+
return /* @__PURE__ */ X(Ee.Provider, {
|
|
88
98
|
value: {
|
|
89
|
-
state:
|
|
90
|
-
anchorRef:
|
|
91
|
-
menuOpen:
|
|
92
|
-
setMenuOpen:
|
|
99
|
+
state: w,
|
|
100
|
+
anchorRef: S,
|
|
101
|
+
menuOpen: O,
|
|
102
|
+
setMenuOpen: te
|
|
93
103
|
},
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
104
|
+
children: [P ? /* @__PURE__ */ X(Se, { children: [
|
|
105
|
+
/* @__PURE__ */ Y(Z, { children: T ? /* @__PURE__ */ Y(Ce.div, {
|
|
96
106
|
...W,
|
|
97
|
-
className: e(pe, !
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
"aria-label":
|
|
107
|
+
className: e(pe, !N && x),
|
|
108
|
+
children: /* @__PURE__ */ Y("header", {
|
|
109
|
+
"aria-label": b,
|
|
100
110
|
"data-state": "compact",
|
|
101
|
-
"data-menu":
|
|
102
|
-
className: e(
|
|
103
|
-
children:
|
|
111
|
+
"data-menu": O ? "open" : "closed",
|
|
112
|
+
className: e(N && e("w-full", x)),
|
|
113
|
+
children: U
|
|
104
114
|
})
|
|
105
115
|
}, "site-nav-compact") : null }),
|
|
106
|
-
|
|
107
|
-
className: e(
|
|
116
|
+
T ? /* @__PURE__ */ Y("div", {
|
|
117
|
+
className: e(y, "w-full"),
|
|
108
118
|
"aria-hidden": !0
|
|
109
119
|
}) : null,
|
|
110
|
-
|
|
111
|
-
"aria-label":
|
|
120
|
+
T ? null : /* @__PURE__ */ Y("header", {
|
|
121
|
+
"aria-label": b,
|
|
112
122
|
"data-state": "expanded",
|
|
113
|
-
"data-menu":
|
|
114
|
-
className: e(
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
ref:
|
|
117
|
-
className:
|
|
118
|
-
children:
|
|
123
|
+
"data-menu": O ? "open" : "closed",
|
|
124
|
+
className: e(le, x),
|
|
125
|
+
children: /* @__PURE__ */ Y("div", {
|
|
126
|
+
ref: S,
|
|
127
|
+
className: g,
|
|
128
|
+
children: H
|
|
119
129
|
})
|
|
120
130
|
})
|
|
121
|
-
] }) : /* @__PURE__ */
|
|
122
|
-
"aria-label":
|
|
123
|
-
"data-state":
|
|
124
|
-
"data-menu":
|
|
125
|
-
className: e(
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
ref:
|
|
128
|
-
className: e(
|
|
129
|
-
children: /* @__PURE__ */
|
|
131
|
+
] }) : /* @__PURE__ */ Y("header", {
|
|
132
|
+
"aria-label": b,
|
|
133
|
+
"data-state": w,
|
|
134
|
+
"data-menu": O ? "open" : "closed",
|
|
135
|
+
className: e(ue, x),
|
|
136
|
+
children: /* @__PURE__ */ Y("div", {
|
|
137
|
+
ref: S,
|
|
138
|
+
className: e(g, T && "px-[var(--grid-margin)]"),
|
|
139
|
+
children: /* @__PURE__ */ Y(Z, {
|
|
130
140
|
initial: !1,
|
|
131
141
|
mode: "popLayout",
|
|
132
|
-
children:
|
|
133
|
-
initial: !
|
|
134
|
-
animate:
|
|
135
|
-
exit:
|
|
136
|
-
transition:
|
|
142
|
+
children: T ? /* @__PURE__ */ Y(Ce.div, {
|
|
143
|
+
initial: !C && A,
|
|
144
|
+
animate: j,
|
|
145
|
+
exit: C ? j : A,
|
|
146
|
+
transition: M,
|
|
137
147
|
"data-state": "compact",
|
|
138
148
|
className: V,
|
|
139
149
|
children: B(!0)
|
|
140
|
-
}, "compact") : /* @__PURE__ */
|
|
150
|
+
}, "compact") : /* @__PURE__ */ Y("div", { children: H }, "expanded")
|
|
141
151
|
})
|
|
142
152
|
})
|
|
143
|
-
}),
|
|
144
|
-
open:
|
|
145
|
-
onOpenChange:
|
|
146
|
-
children: /* @__PURE__ */
|
|
153
|
+
}), F ? /* @__PURE__ */ Y(c, {
|
|
154
|
+
open: E,
|
|
155
|
+
onOpenChange: D,
|
|
156
|
+
children: /* @__PURE__ */ Y(c.Content, {
|
|
147
157
|
side: "end",
|
|
148
158
|
title: s,
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
-
className:
|
|
159
|
+
children: /* @__PURE__ */ Y("div", {
|
|
160
|
+
className: oe,
|
|
151
161
|
children: o
|
|
152
162
|
})
|
|
153
163
|
})
|
|
154
164
|
}) : null]
|
|
155
165
|
});
|
|
156
166
|
}
|
|
157
|
-
function
|
|
158
|
-
let o = t ?? (
|
|
159
|
-
return o == null ? /* @__PURE__ */
|
|
167
|
+
function Ae({ href: e, icon: t, children: i, "aria-label": a }) {
|
|
168
|
+
let o = t ?? (K(i) && i.type !== void 0 ? i : null);
|
|
169
|
+
return o == null ? /* @__PURE__ */ Y(n, {
|
|
160
170
|
role: "ghost",
|
|
161
171
|
size: "sm",
|
|
162
|
-
render: /* @__PURE__ */
|
|
172
|
+
render: /* @__PURE__ */ Y("a", { href: e }),
|
|
163
173
|
"aria-label": a,
|
|
164
|
-
className:
|
|
174
|
+
className: m,
|
|
165
175
|
children: i
|
|
166
|
-
}) : /* @__PURE__ */
|
|
176
|
+
}) : /* @__PURE__ */ Y(r, {
|
|
167
177
|
icon: o,
|
|
168
178
|
"aria-label": a ?? "Home",
|
|
169
179
|
role: "ghost",
|
|
170
180
|
size: "sm",
|
|
171
181
|
title: "",
|
|
172
|
-
render: /* @__PURE__ */
|
|
173
|
-
className:
|
|
182
|
+
render: /* @__PURE__ */ Y("a", { href: e }),
|
|
183
|
+
className: m
|
|
174
184
|
});
|
|
175
185
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
186
|
+
function je(e) {
|
|
187
|
+
return G.toArray(e).filter(K);
|
|
178
188
|
}
|
|
179
189
|
function $(e) {
|
|
180
190
|
let t = e.props;
|
|
181
191
|
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
192
|
}
|
|
183
|
-
function
|
|
193
|
+
function Me(e) {
|
|
184
194
|
let t = e.props;
|
|
185
195
|
return t.label ?? t.children;
|
|
186
196
|
}
|
|
187
|
-
function
|
|
197
|
+
function Ne(e) {
|
|
188
198
|
return "label" in e.props && !("href" in e.props);
|
|
189
199
|
}
|
|
190
|
-
function
|
|
200
|
+
function Pe(e) {
|
|
191
201
|
for (let t of e) if (t.props.current) return $(t);
|
|
192
202
|
return e[0] == null ? "" : $(e[0]);
|
|
193
203
|
}
|
|
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)) {
|
|
204
|
+
function Fe({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDelay: o = 150 }) {
|
|
205
|
+
let s = _e(Ee), c = ye(() => je(t), [t]), d = new Map(c.map((e) => [$(e), e])), f = (e) => e.flatMap((e) => d.get(e) ?? []), p = (e) => f(e).flatMap(v), m = u({
|
|
206
|
+
ids: c.map($),
|
|
207
|
+
activeId: Pe(c),
|
|
208
|
+
toMenuRows: (e) => p(e).map((e) => ({
|
|
209
|
+
label: l(e.label),
|
|
210
|
+
disabled: e.href == null
|
|
211
|
+
}))
|
|
212
|
+
}), { menu: h } = m, g = f(m.visibleIds), _ = p(m.overflowIds);
|
|
213
|
+
function v(e) {
|
|
214
|
+
if (!Ne(e)) {
|
|
264
215
|
let t = e.props;
|
|
265
216
|
return [{
|
|
266
217
|
id: $(e),
|
|
@@ -271,8 +222,8 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
271
222
|
}
|
|
272
223
|
let t = [];
|
|
273
224
|
function n(e) {
|
|
274
|
-
|
|
275
|
-
if (!
|
|
225
|
+
G.forEach(e, (e) => {
|
|
226
|
+
if (!K(e)) return;
|
|
276
227
|
let r = e.props;
|
|
277
228
|
if (typeof r.href == "string" && r.label == null) {
|
|
278
229
|
t.push({
|
|
@@ -287,98 +238,97 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
287
238
|
}
|
|
288
239
|
return n(e.props.children), t.length === 0 && t.push({
|
|
289
240
|
id: $(e),
|
|
290
|
-
label:
|
|
241
|
+
label: Me(e)
|
|
291
242
|
}), t;
|
|
292
243
|
}
|
|
293
|
-
return /* @__PURE__ */
|
|
294
|
-
|
|
295
|
-
className:
|
|
244
|
+
return /* @__PURE__ */ X("div", {
|
|
245
|
+
...m.rowProps,
|
|
246
|
+
className: S,
|
|
296
247
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ X(Q.Root, {
|
|
298
249
|
"aria-label": r,
|
|
299
250
|
delay: i,
|
|
300
|
-
closeDelay:
|
|
251
|
+
closeDelay: o,
|
|
301
252
|
className: B,
|
|
302
|
-
onValueChange: (e) =>
|
|
303
|
-
children: [/* @__PURE__ */
|
|
304
|
-
className:
|
|
305
|
-
children:
|
|
306
|
-
}), /* @__PURE__ */
|
|
307
|
-
anchor:
|
|
253
|
+
onValueChange: (e) => s?.setMenuOpen(e != null),
|
|
254
|
+
children: [/* @__PURE__ */ Y(Q.List, {
|
|
255
|
+
className: x,
|
|
256
|
+
children: g
|
|
257
|
+
}), /* @__PURE__ */ X(Q.Portal, { children: [/* @__PURE__ */ Y(Q.Backdrop, { className: E }), /* @__PURE__ */ Y(Q.Positioner, {
|
|
258
|
+
anchor: s?.anchorRef,
|
|
308
259
|
positionMethod: "fixed",
|
|
309
260
|
side: "bottom",
|
|
310
261
|
align: "center",
|
|
311
262
|
sideOffset: 8,
|
|
312
263
|
collisionPadding: 8,
|
|
313
|
-
className:
|
|
314
|
-
children: /* @__PURE__ */
|
|
315
|
-
className:
|
|
316
|
-
children: /* @__PURE__ */
|
|
264
|
+
className: A,
|
|
265
|
+
children: /* @__PURE__ */ Y(Q.Popup, {
|
|
266
|
+
className: k,
|
|
267
|
+
children: /* @__PURE__ */ Y(Q.Viewport, { className: I })
|
|
317
268
|
})
|
|
318
269
|
})] })]
|
|
319
270
|
}),
|
|
320
|
-
|
|
321
|
-
ref:
|
|
271
|
+
m.overflowIds.length > 0 ? /* @__PURE__ */ Y(n, {
|
|
272
|
+
ref: m.moreRef,
|
|
322
273
|
role: "ghost",
|
|
323
274
|
size: "sm",
|
|
324
275
|
"aria-haspopup": "menu",
|
|
325
|
-
"aria-expanded":
|
|
326
|
-
"aria-controls":
|
|
327
|
-
"data-state":
|
|
276
|
+
"aria-expanded": h.open,
|
|
277
|
+
"aria-controls": h.triggerProps["aria-controls"],
|
|
278
|
+
"data-state": h.open ? "open" : "closed",
|
|
328
279
|
className: z,
|
|
329
|
-
onClick:
|
|
330
|
-
|
|
331
|
-
children: /* @__PURE__ */ Z("span", {
|
|
280
|
+
onClick: h.toggle,
|
|
281
|
+
children: /* @__PURE__ */ X("span", {
|
|
332
282
|
className: me,
|
|
333
|
-
children: ["More", /* @__PURE__ */
|
|
283
|
+
children: ["More", /* @__PURE__ */ Y("span", {
|
|
334
284
|
className: R,
|
|
335
|
-
"data-state":
|
|
336
|
-
children: /* @__PURE__ */
|
|
285
|
+
"data-state": h.open ? "open" : "closed",
|
|
286
|
+
children: /* @__PURE__ */ Y(J, {
|
|
337
287
|
strokeWidth: 2,
|
|
338
288
|
"aria-hidden": !0
|
|
339
289
|
})
|
|
340
290
|
})]
|
|
341
291
|
})
|
|
342
292
|
}) : null,
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
className:
|
|
293
|
+
/* @__PURE__ */ X("div", {
|
|
294
|
+
className: T,
|
|
345
295
|
"aria-hidden": !0,
|
|
346
|
-
children: [
|
|
347
|
-
let n = $(t), r =
|
|
348
|
-
return /* @__PURE__ */
|
|
349
|
-
ref: (
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
className: e(S, i ? W : y),
|
|
353
|
-
children: [r, i ? /* @__PURE__ */ X(Y, {
|
|
296
|
+
children: [c.map((t) => {
|
|
297
|
+
let n = $(t), r = Me(t), i = Ne(t);
|
|
298
|
+
return /* @__PURE__ */ X("span", {
|
|
299
|
+
ref: m.measureRef(n),
|
|
300
|
+
className: e(C, i ? W : b),
|
|
301
|
+
children: [r, i ? /* @__PURE__ */ Y(J, {
|
|
354
302
|
className: "ml-1 size-3.5",
|
|
355
303
|
strokeWidth: 2
|
|
356
304
|
}) : null]
|
|
357
305
|
}, n);
|
|
358
|
-
}), /* @__PURE__ */
|
|
359
|
-
ref:
|
|
360
|
-
className: e(z,
|
|
361
|
-
children: ["More", /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ X("span", {
|
|
307
|
+
ref: m.moreMeasureRef,
|
|
308
|
+
className: e(z, w),
|
|
309
|
+
children: ["More", /* @__PURE__ */ Y(J, {
|
|
362
310
|
className: "size-3.5",
|
|
363
311
|
strokeWidth: 2
|
|
364
312
|
})]
|
|
365
313
|
})]
|
|
366
314
|
}),
|
|
367
|
-
|
|
368
|
-
|
|
315
|
+
h.open && h.menuStyle != null ? Te(/* @__PURE__ */ Y(a.Menu, {
|
|
316
|
+
...h.menuProps,
|
|
369
317
|
role: "menu",
|
|
370
318
|
"aria-label": `${r} overflow`,
|
|
371
|
-
|
|
372
|
-
children: F.flatMap(H).map((e, t) => /* @__PURE__ */ X("li", {
|
|
319
|
+
children: _.map((e, t) => /* @__PURE__ */ Y("li", {
|
|
373
320
|
role: "presentation",
|
|
374
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ Y(a.Item, {
|
|
322
|
+
...h.rowProps(t),
|
|
375
323
|
role: "menuitem",
|
|
376
|
-
tabIndex: -1,
|
|
377
324
|
truncate: !1,
|
|
378
325
|
selected: !!e.current,
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
326
|
+
disabled: e.href == null,
|
|
327
|
+
render: e.href == null ? void 0 : /* @__PURE__ */ Y("a", {
|
|
328
|
+
href: e.href,
|
|
329
|
+
"aria-current": e.current ? "page" : void 0
|
|
330
|
+
}),
|
|
331
|
+
onClick: () => h.close(),
|
|
382
332
|
children: e.label
|
|
383
333
|
})
|
|
384
334
|
}, e.id))
|
|
@@ -386,122 +336,122 @@ function Le({ children: t, "aria-label": r = "Primary", delay: i = 100, closeDel
|
|
|
386
336
|
]
|
|
387
337
|
});
|
|
388
338
|
}
|
|
389
|
-
function
|
|
390
|
-
return /* @__PURE__ */
|
|
339
|
+
function Ie({ href: e, children: t, current: r = !1, value: i }) {
|
|
340
|
+
return /* @__PURE__ */ Y(Q.Item, {
|
|
391
341
|
value: i ?? e,
|
|
392
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ Y(Q.Link, {
|
|
393
343
|
href: e,
|
|
394
344
|
active: r,
|
|
395
345
|
"aria-current": r ? "page" : void 0,
|
|
396
|
-
render: /* @__PURE__ */
|
|
346
|
+
render: /* @__PURE__ */ Y(n, {
|
|
397
347
|
role: "ghost",
|
|
398
348
|
size: "sm",
|
|
399
|
-
render: /* @__PURE__ */
|
|
400
|
-
className:
|
|
349
|
+
render: /* @__PURE__ */ Y("a", {}),
|
|
350
|
+
className: b,
|
|
401
351
|
children: t
|
|
402
352
|
})
|
|
403
353
|
})
|
|
404
354
|
});
|
|
405
355
|
}
|
|
406
|
-
function
|
|
356
|
+
function Le({ label: e, children: t, value: r }) {
|
|
407
357
|
let i = r ?? (typeof e == "string" ? e : void 0);
|
|
408
|
-
return /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ X(Q.Item, {
|
|
409
359
|
value: i,
|
|
410
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ Y(Q.Trigger, { render: /* @__PURE__ */ Y(n, {
|
|
411
361
|
role: "ghost",
|
|
412
362
|
size: "sm",
|
|
413
363
|
className: W,
|
|
414
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ X("span", {
|
|
415
365
|
className: me,
|
|
416
|
-
children: [e, /* @__PURE__ */
|
|
366
|
+
children: [e, /* @__PURE__ */ Y(Q.Icon, {
|
|
417
367
|
className: pe,
|
|
418
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ Y(J, {
|
|
419
369
|
strokeWidth: 2,
|
|
420
370
|
"aria-hidden": !0
|
|
421
371
|
})
|
|
422
372
|
})]
|
|
423
373
|
})
|
|
424
|
-
}) }), /* @__PURE__ */
|
|
425
|
-
className:
|
|
374
|
+
}) }), /* @__PURE__ */ Y(Q.Content, {
|
|
375
|
+
className: D,
|
|
426
376
|
children: t
|
|
427
377
|
})]
|
|
428
378
|
});
|
|
429
379
|
}
|
|
430
|
-
function
|
|
431
|
-
return /* @__PURE__ */
|
|
432
|
-
className: e(
|
|
433
|
-
children: [t == null ? null : /* @__PURE__ */
|
|
434
|
-
className:
|
|
380
|
+
function Re({ label: t, span: n = 1, children: r }) {
|
|
381
|
+
return /* @__PURE__ */ X("section", {
|
|
382
|
+
className: e(N, F[n]),
|
|
383
|
+
children: [t == null ? null : /* @__PURE__ */ Y("h3", {
|
|
384
|
+
className: P,
|
|
435
385
|
children: t
|
|
436
386
|
}), r]
|
|
437
387
|
});
|
|
438
388
|
}
|
|
439
|
-
function
|
|
440
|
-
return /* @__PURE__ */
|
|
389
|
+
function ze({ href: e, children: t, icon: r, external: i = !1, size: a = "sm" }) {
|
|
390
|
+
return /* @__PURE__ */ Y(Q.Link, {
|
|
441
391
|
href: e,
|
|
442
392
|
target: i ? "_blank" : void 0,
|
|
443
393
|
rel: i ? "noopener noreferrer" : void 0,
|
|
444
|
-
render: /* @__PURE__ */
|
|
394
|
+
render: /* @__PURE__ */ X(n, {
|
|
445
395
|
role: "ghost",
|
|
446
396
|
size: a,
|
|
447
|
-
render: /* @__PURE__ */
|
|
448
|
-
className:
|
|
397
|
+
render: /* @__PURE__ */ Y("a", {}),
|
|
398
|
+
className: O,
|
|
449
399
|
icon: r,
|
|
450
|
-
children: [t, i ? /* @__PURE__ */
|
|
400
|
+
children: [t, i ? /* @__PURE__ */ Y("span", {
|
|
451
401
|
className: "sr-only",
|
|
452
402
|
children: " (opens in a new tab)"
|
|
453
403
|
}) : null]
|
|
454
404
|
})
|
|
455
405
|
});
|
|
456
406
|
}
|
|
457
|
-
function
|
|
458
|
-
return /* @__PURE__ */
|
|
459
|
-
className:
|
|
407
|
+
function Be({ children: e }) {
|
|
408
|
+
return /* @__PURE__ */ Y("div", {
|
|
409
|
+
className: te,
|
|
460
410
|
children: e
|
|
461
411
|
});
|
|
462
412
|
}
|
|
463
|
-
function
|
|
464
|
-
return /* @__PURE__ */
|
|
413
|
+
function Ve({ label: t, variant: n = "thumb", className: r }) {
|
|
414
|
+
return /* @__PURE__ */ Y("div", {
|
|
465
415
|
role: "img",
|
|
466
416
|
"aria-label": t,
|
|
467
|
-
className: e(
|
|
417
|
+
className: e(s, o, n === "featured" ? "aspect-[16/10] w-full" : M, r)
|
|
468
418
|
});
|
|
469
419
|
}
|
|
470
|
-
function
|
|
471
|
-
return /* @__PURE__ */
|
|
420
|
+
function He({ media: e, title: t, description: n, href: r, linkLabel: a = "Read now" }) {
|
|
421
|
+
return /* @__PURE__ */ X("div", {
|
|
472
422
|
className: "flex flex-col gap-1 type-body",
|
|
473
423
|
children: [
|
|
474
424
|
e,
|
|
475
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ Y("h2", {
|
|
476
426
|
className: "type-heading-2 text-fg",
|
|
477
427
|
children: t
|
|
478
428
|
}),
|
|
479
|
-
n == null ? null : /* @__PURE__ */
|
|
429
|
+
n == null ? null : /* @__PURE__ */ Y("p", {
|
|
480
430
|
className: "text-muted",
|
|
481
431
|
children: n
|
|
482
432
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ Y(i, {
|
|
484
434
|
href: r,
|
|
485
435
|
children: a
|
|
486
436
|
})
|
|
487
437
|
]
|
|
488
438
|
});
|
|
489
439
|
}
|
|
490
|
-
function
|
|
491
|
-
return /* @__PURE__ */
|
|
492
|
-
className:
|
|
493
|
-
children: [e, /* @__PURE__ */
|
|
440
|
+
function Ue({ media: e, title: t, description: n, href: r, linkLabel: a = "Read now" }) {
|
|
441
|
+
return /* @__PURE__ */ X("div", {
|
|
442
|
+
className: j,
|
|
443
|
+
children: [e, /* @__PURE__ */ X("div", {
|
|
494
444
|
className: "flex min-w-0 flex-col gap-1 type-body",
|
|
495
445
|
children: [
|
|
496
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ Y("h3", {
|
|
497
447
|
className: "type-heading-3 text-fg",
|
|
498
448
|
children: t
|
|
499
449
|
}),
|
|
500
|
-
n == null ? null : /* @__PURE__ */
|
|
450
|
+
n == null ? null : /* @__PURE__ */ Y("p", {
|
|
501
451
|
className: "text-muted",
|
|
502
452
|
children: n
|
|
503
453
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ Y(i, {
|
|
505
455
|
href: r,
|
|
506
456
|
children: a
|
|
507
457
|
})
|
|
@@ -509,28 +459,28 @@ function Ge({ media: e, title: t, description: n, href: r, linkLabel: a = "Read
|
|
|
509
459
|
})]
|
|
510
460
|
});
|
|
511
461
|
}
|
|
512
|
-
function
|
|
513
|
-
return /* @__PURE__ */
|
|
462
|
+
function We({ href: e, children: t, current: r = !1 }) {
|
|
463
|
+
return /* @__PURE__ */ Y(n, {
|
|
514
464
|
role: "ghost",
|
|
515
465
|
size: "md",
|
|
516
|
-
render: /* @__PURE__ */
|
|
466
|
+
render: /* @__PURE__ */ Y("a", { href: e }),
|
|
517
467
|
"aria-current": r ? "page" : void 0,
|
|
518
|
-
className:
|
|
468
|
+
className: L,
|
|
519
469
|
children: t
|
|
520
470
|
});
|
|
521
471
|
}
|
|
522
|
-
var
|
|
523
|
-
Brand:
|
|
524
|
-
Links:
|
|
525
|
-
Link:
|
|
526
|
-
Menu:
|
|
527
|
-
MenuSection:
|
|
528
|
-
MenuLink:
|
|
529
|
-
MenuLinkGrid:
|
|
530
|
-
MenuMedia:
|
|
531
|
-
Featured:
|
|
532
|
-
ReadRow:
|
|
533
|
-
MobileLink:
|
|
472
|
+
var Ge = Object.assign(ke, {
|
|
473
|
+
Brand: Ae,
|
|
474
|
+
Links: Fe,
|
|
475
|
+
Link: Ie,
|
|
476
|
+
Menu: Le,
|
|
477
|
+
MenuSection: Re,
|
|
478
|
+
MenuLink: ze,
|
|
479
|
+
MenuLinkGrid: Be,
|
|
480
|
+
MenuMedia: Ve,
|
|
481
|
+
Featured: He,
|
|
482
|
+
ReadRow: Ue,
|
|
483
|
+
MobileLink: We
|
|
534
484
|
});
|
|
535
485
|
//#endregion
|
|
536
|
-
export {
|
|
486
|
+
export { Ge as SiteNav, h as siteNavCompactLayouts, _ as siteNavDefaultCollapseAt, v as siteNavDefaultCollapseRatio, y as siteNavExpandedHeightClasses, j as siteNavMenuReadRowClasses, M as siteNavMenuReadThumbClasses, V as siteNavPlacements, U as siteNavStates };
|