@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
|
@@ -3,126 +3,70 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { IconButton as t } from "../../atoms/IconButton/IconButton.js";
|
|
4
4
|
import { Dropdown as n } from "../../molecules/Dropdown/Dropdown.js";
|
|
5
5
|
import { measureDropdownMenuStyle as r } from "../../molecules/Dropdown/dropdownMenuPosition.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useDropdownMenu as i } from "../../molecules/Dropdown/useDropdownMenu.js";
|
|
7
|
+
import { moreMenuRootClasses as a } from "./moreMenuStyles.js";
|
|
8
|
+
import { useRef as o } from "react";
|
|
9
|
+
import { EllipsisVertical as s } from "lucide-react";
|
|
10
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/organisms/MoreMenu/MoreMenu.tsx
|
|
11
|
-
function
|
|
12
|
+
function u(e) {
|
|
12
13
|
e.items.length === 0 && console.warn("[WMDS MoreMenu] `items` must not be empty.");
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function d(e) {
|
|
15
16
|
return e.map((e) => ({
|
|
16
17
|
label: e.label,
|
|
17
18
|
start: e.start,
|
|
18
19
|
end: e.end
|
|
19
20
|
}));
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
"aria-label":
|
|
25
|
-
items:
|
|
22
|
+
function f({ "aria-label": f, items: p, onAction: m, size: h = "sm", disabled: g = !1, className: _ }) {
|
|
23
|
+
let v = o(null);
|
|
24
|
+
u({
|
|
25
|
+
"aria-label": f,
|
|
26
|
+
items: p
|
|
26
27
|
});
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
let y = i({
|
|
29
|
+
rows: p,
|
|
30
|
+
triggerRef: v,
|
|
31
|
+
focus: "items",
|
|
32
|
+
measure: () => v.current == null ? null : r(v.current, d(p), {
|
|
32
33
|
align: "end",
|
|
33
34
|
widthMode: "content"
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
let e = w.current;
|
|
39
|
-
e != null && O(r(e, h(_), {
|
|
40
|
-
align: "end",
|
|
41
|
-
widthMode: "content"
|
|
42
|
-
}));
|
|
43
|
-
}, [_]);
|
|
44
|
-
c(() => {
|
|
45
|
-
if (T) return P(), window.addEventListener("resize", P), window.addEventListener("scroll", P, !0), () => {
|
|
46
|
-
window.removeEventListener("resize", P), window.removeEventListener("scroll", P, !0);
|
|
47
|
-
};
|
|
48
|
-
}, [T, P]), o(() => {
|
|
49
|
-
if (!T) return;
|
|
50
|
-
function e(e) {
|
|
51
|
-
C.current != null && !C.current.contains(e.target) && j();
|
|
52
|
-
}
|
|
53
|
-
return document.addEventListener("mousedown", e), () => {
|
|
54
|
-
document.removeEventListener("mousedown", e);
|
|
55
|
-
};
|
|
56
|
-
}, [j, T]), o(() => {
|
|
57
|
-
T && A((e) => Math.min(e, Math.max(_.length - 1, 0)));
|
|
58
|
-
}, [_.length, T]);
|
|
59
|
-
function F(e) {
|
|
60
|
-
A((t) => {
|
|
61
|
-
if (_.length === 0) return 0;
|
|
62
|
-
let n = t;
|
|
63
|
-
for (let t = 0; t < _.length; t += 1) if (n = (n + e + _.length) % _.length, !_[n]?.disabled) return n;
|
|
64
|
-
return t;
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function I(e) {
|
|
68
|
-
if (!b) switch (e.key) {
|
|
69
|
-
case "ArrowDown":
|
|
70
|
-
e.preventDefault(), T ? F(1) : M();
|
|
71
|
-
break;
|
|
72
|
-
case "ArrowUp":
|
|
73
|
-
e.preventDefault(), T ? F(-1) : M();
|
|
74
|
-
break;
|
|
75
|
-
case "Enter":
|
|
76
|
-
case " ":
|
|
77
|
-
if (e.preventDefault(), T) {
|
|
78
|
-
let e = _[k];
|
|
79
|
-
e != null && !e.disabled && N(e.id);
|
|
80
|
-
} else M();
|
|
81
|
-
break;
|
|
82
|
-
case "Escape": e.preventDefault(), j();
|
|
83
|
-
}
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
function b(e) {
|
|
38
|
+
e.disabled || (y.close({ returnFocus: !0 }), m?.(e.id));
|
|
84
39
|
}
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
className: e(
|
|
88
|
-
children: [/* @__PURE__ */
|
|
89
|
-
ref:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
onKeyDown: I
|
|
104
|
-
})
|
|
105
|
-
}), T && D != null ? /* @__PURE__ */ f(n.Menu, {
|
|
106
|
-
id: S,
|
|
40
|
+
return /* @__PURE__ */ l("div", {
|
|
41
|
+
...y.rootProps,
|
|
42
|
+
className: e(a, _),
|
|
43
|
+
children: [/* @__PURE__ */ c(t, {
|
|
44
|
+
ref: v,
|
|
45
|
+
size: h,
|
|
46
|
+
role: "ghost",
|
|
47
|
+
icon: /* @__PURE__ */ c(s, { strokeWidth: 2 }),
|
|
48
|
+
"aria-label": f,
|
|
49
|
+
"aria-haspopup": "menu",
|
|
50
|
+
"aria-expanded": y.triggerProps["aria-expanded"],
|
|
51
|
+
"aria-controls": y.triggerProps["aria-controls"],
|
|
52
|
+
disabled: g,
|
|
53
|
+
onClick: () => {
|
|
54
|
+
g || y.toggle();
|
|
55
|
+
}
|
|
56
|
+
}), y.open && y.menuStyle != null ? /* @__PURE__ */ c(n.Menu, {
|
|
57
|
+
...y.menuProps,
|
|
107
58
|
role: "menu",
|
|
108
|
-
"aria-label":
|
|
109
|
-
|
|
110
|
-
children: _.map((e, t) => /* @__PURE__ */ f("li", {
|
|
59
|
+
"aria-label": f,
|
|
60
|
+
children: p.map((e, t) => /* @__PURE__ */ c("li", {
|
|
111
61
|
role: "presentation",
|
|
112
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ c(n.Item, {
|
|
63
|
+
...y.rowProps(t),
|
|
113
64
|
role: "menuitem",
|
|
114
|
-
tabIndex: -1,
|
|
115
65
|
truncate: !1,
|
|
116
|
-
active: t === k,
|
|
117
66
|
disabled: e.disabled,
|
|
118
67
|
start: e.start,
|
|
119
68
|
end: e.end,
|
|
120
|
-
|
|
121
|
-
e.disabled || A(t);
|
|
122
|
-
},
|
|
123
|
-
onClick: () => {
|
|
124
|
-
e.disabled || N(e.id);
|
|
125
|
-
},
|
|
69
|
+
onClick: () => b(e),
|
|
126
70
|
children: e.label
|
|
127
71
|
})
|
|
128
72
|
}, e.id))
|
|
@@ -130,4 +74,4 @@ function g({ "aria-label": g, items: _, onAction: v, size: y = "sm", disabled: b
|
|
|
130
74
|
});
|
|
131
75
|
}
|
|
132
76
|
//#endregion
|
|
133
|
-
export {
|
|
77
|
+
export { f as MoreMenu };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAgBf,OAAO,EAOL,UAAU,EAEV,UAAU,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAElC,uDAAuD;AACvD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,wCAAwC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAyED,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,YAAY,EACZ,eAAsB,EACtB,QAAQ,GACT,EAAE,UAAU,+BAkBZ;AAED,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC,+BAmBA;AAED,iBAAS,YAAY,CAAC,EACpB,IAAY,EACZ,IAAW,EACX,KAAK,EACL,WAAW,EACX,WAAW,EACX,SAAgB,EAChB,MAAM,EACN,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,+BAyDnB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK;;;CAGhB,CAAC"}
|
|
@@ -1,63 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { useOverlayLifecycle as t } from "../../../lib/dialogOverlay.js";
|
|
4
|
+
import { overlayPanelBodyScrollClasses as n, overlayPanelChromeClasses as r, overlayPanelFooterClasses as i, overlayPanelFooterDelineatedInnerClasses as a, overlayPanelFooterDelineatedShellClasses as o, overlayPanelFooterHairlineClasses as s, overlayPanelSectionStackClasses as c } from "../Dialog/dialogStyles.js";
|
|
5
|
+
import { OverlayPanelHeader as l } from "../Dialog/OverlayPanelHeader.js";
|
|
6
|
+
import { PanelProvider as u, usePanelContext as d, usePanelLabelIds as f } from "./PanelContext.js";
|
|
7
|
+
import { sheetPanelPlacementClasses as p } from "../Sheet/sheetStyles.js";
|
|
8
|
+
import { panelBackdropClasses as m, panelMotionTransition as h, panelMotionVariants as g, panelOverlayRootClasses as _, panelShellClasses as v, panelSides as y, panelSizeClasses as b, panelSizes as x } from "./panelStyles.js";
|
|
9
|
+
import { useCallback as S, useRef as C } from "react";
|
|
9
10
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
10
11
|
import { AnimatePresence as E, motion as D } from "motion/react";
|
|
11
12
|
import { createPortal as O } from "react-dom";
|
|
12
13
|
//#region src/components/organisms/Panel/Panel.tsx
|
|
13
|
-
function k({ side:
|
|
14
|
-
let { open:
|
|
15
|
-
|
|
16
|
-
}, [
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
return document.addEventListener("keydown", e), () => {
|
|
27
|
-
document.removeEventListener("keydown", e);
|
|
28
|
-
};
|
|
29
|
-
}, [
|
|
30
|
-
k,
|
|
31
|
-
l,
|
|
32
|
-
s
|
|
33
|
-
]), typeof document > "u" ? null : O(/* @__PURE__ */ w(E, { children: s ? /* @__PURE__ */ T(D.div, {
|
|
34
|
-
className: g[t],
|
|
14
|
+
function k({ side: n, size: i, "aria-labelledby": a, "aria-describedby": o, children: s }) {
|
|
15
|
+
let { open: c, onOpenChange: l, dismissOnEscape: u, triggerRef: f } = d("PanelPortal"), y = C(null), x = S(() => {
|
|
16
|
+
l(!1);
|
|
17
|
+
}, [l]);
|
|
18
|
+
return t(y, {
|
|
19
|
+
open: c,
|
|
20
|
+
onClose: x,
|
|
21
|
+
modal: !1,
|
|
22
|
+
closeOnEscape: u,
|
|
23
|
+
returnFocusRef: f
|
|
24
|
+
}), typeof document > "u" ? null : O(/* @__PURE__ */ w(E, { children: c ? /* @__PURE__ */ T(D.div, {
|
|
25
|
+
className: _[n],
|
|
35
26
|
initial: { opacity: 0 },
|
|
36
27
|
animate: { opacity: 1 },
|
|
37
28
|
exit: { opacity: 0 },
|
|
38
|
-
transition:
|
|
29
|
+
transition: h(n),
|
|
39
30
|
children: [/* @__PURE__ */ w("div", {
|
|
40
|
-
className:
|
|
31
|
+
className: m,
|
|
41
32
|
"aria-hidden": "true"
|
|
42
33
|
}), /* @__PURE__ */ w(D.div, {
|
|
43
|
-
ref:
|
|
44
|
-
className: e(
|
|
34
|
+
ref: y,
|
|
35
|
+
className: e(v, p[n], b(n, i), r),
|
|
45
36
|
role: "dialog",
|
|
46
37
|
"aria-modal": "false",
|
|
47
|
-
"aria-labelledby":
|
|
48
|
-
"aria-describedby":
|
|
49
|
-
variants:
|
|
38
|
+
"aria-labelledby": a,
|
|
39
|
+
"aria-describedby": o,
|
|
40
|
+
variants: g(n),
|
|
50
41
|
initial: "hidden",
|
|
51
42
|
animate: "visible",
|
|
52
43
|
exit: "exit",
|
|
53
|
-
transition:
|
|
54
|
-
children:
|
|
44
|
+
transition: h(n),
|
|
45
|
+
children: s
|
|
55
46
|
})]
|
|
56
47
|
}) : null }), document.body);
|
|
57
48
|
}
|
|
58
49
|
function A({ open: e, onOpenChange: t, dismissOnEscape: n = !0, children: r }) {
|
|
59
|
-
let { titleId: i, descriptionId: a } =
|
|
60
|
-
return /* @__PURE__ */ w(
|
|
50
|
+
let { titleId: i, descriptionId: a } = f("panel"), o = C(null);
|
|
51
|
+
return /* @__PURE__ */ w(u, {
|
|
61
52
|
value: {
|
|
62
53
|
open: e,
|
|
63
54
|
onOpenChange: t,
|
|
@@ -70,7 +61,7 @@ function A({ open: e, onOpenChange: t, dismissOnEscape: n = !0, children: r }) {
|
|
|
70
61
|
});
|
|
71
62
|
}
|
|
72
63
|
function j({ children: e, className: t }) {
|
|
73
|
-
let { onOpenChange: n, triggerRef: r } =
|
|
64
|
+
let { onOpenChange: n, triggerRef: r } = d("Panel.Trigger");
|
|
74
65
|
return /* @__PURE__ */ w("span", {
|
|
75
66
|
ref: r,
|
|
76
67
|
className: t,
|
|
@@ -81,20 +72,20 @@ function j({ children: e, className: t }) {
|
|
|
81
72
|
children: e
|
|
82
73
|
});
|
|
83
74
|
}
|
|
84
|
-
function M({ side:
|
|
85
|
-
let { titleId: v, descriptionId: y, onOpenChange: b } =
|
|
75
|
+
function M({ side: t = "end", size: r = "md", title: u, description: f, headerStart: p, showClose: m = !0, footer: h, className: g, children: _ }) {
|
|
76
|
+
let { titleId: v, descriptionId: y, onOpenChange: b } = d("Panel.Content"), x = u != null, S = f != null, C = _ != null || !x && S, E = h != null;
|
|
86
77
|
return /* @__PURE__ */ w(k, {
|
|
87
|
-
side:
|
|
88
|
-
size:
|
|
78
|
+
side: t,
|
|
79
|
+
size: r,
|
|
89
80
|
"aria-labelledby": x ? v : void 0,
|
|
90
81
|
"aria-describedby": S ? y : void 0,
|
|
91
82
|
children: /* @__PURE__ */ T("div", {
|
|
92
|
-
className: e(
|
|
83
|
+
className: e(c, h == null ? "pb-4" : void 0, g),
|
|
93
84
|
children: [
|
|
94
|
-
/* @__PURE__ */ w(
|
|
85
|
+
/* @__PURE__ */ w(l, {
|
|
95
86
|
titleId: v,
|
|
96
87
|
descriptionId: y,
|
|
97
|
-
title:
|
|
88
|
+
title: u,
|
|
98
89
|
description: f,
|
|
99
90
|
headerStart: p,
|
|
100
91
|
showClose: m,
|
|
@@ -103,7 +94,7 @@ function M({ side: n = "end", size: l = "md", title: d, description: f, headerSt
|
|
|
103
94
|
delineated: C || E
|
|
104
95
|
}),
|
|
105
96
|
C ? /* @__PURE__ */ T("div", {
|
|
106
|
-
className:
|
|
97
|
+
className: n,
|
|
107
98
|
children: [!x && S ? /* @__PURE__ */ w("p", {
|
|
108
99
|
id: y,
|
|
109
100
|
className: "text-muted",
|
|
@@ -111,16 +102,16 @@ function M({ side: n = "end", size: l = "md", title: d, description: f, headerSt
|
|
|
111
102
|
}) : null, _]
|
|
112
103
|
}) : null,
|
|
113
104
|
E ? C ? /* @__PURE__ */ T("footer", {
|
|
114
|
-
className:
|
|
105
|
+
className: o,
|
|
115
106
|
children: [/* @__PURE__ */ w("hr", {
|
|
116
|
-
className:
|
|
107
|
+
className: s,
|
|
117
108
|
"aria-hidden": "true"
|
|
118
109
|
}), /* @__PURE__ */ w("div", {
|
|
119
|
-
className:
|
|
110
|
+
className: a,
|
|
120
111
|
children: h
|
|
121
112
|
})]
|
|
122
113
|
}) : /* @__PURE__ */ w("footer", {
|
|
123
|
-
className: e(
|
|
114
|
+
className: e(i, "pb-4"),
|
|
124
115
|
children: h
|
|
125
116
|
}) : null
|
|
126
117
|
]
|
|
@@ -132,4 +123,4 @@ var N = Object.assign(A, {
|
|
|
132
123
|
Content: M
|
|
133
124
|
});
|
|
134
125
|
//#endregion
|
|
135
|
-
export { N as Panel,
|
|
126
|
+
export { N as Panel, y as panelSides, x as panelSizes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiBf,OAAO,EAWL,UAAU,EACV,UAAU,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAElC,uDAAuD;AACvD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wCAAwC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mFAAmF;IACnF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,8HAA8H;IAC9H,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwGD,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,YAAY,EACZ,iBAAwB,EACxB,eAAsB,EACtB,QAAQ,GACT,EAAE,UAAU,+BAmBZ;AAED,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC,+BAmBA;AAED,iBAAS,YAAY,CAAC,EACpB,IAAe,EACf,IAAW,EACX,KAAK,EACL,WAAW,EACX,WAAW,EACX,aAAa,EACb,SAAgB,EAChB,MAAM,EACN,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,+BA8DnB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK;;;CAGhB,CAAC"}
|
|
@@ -1,84 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { motionTransitionProp as t } from "../../../lib/motion.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { SheetProvider as
|
|
9
|
-
import { useCallback as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { AnimatePresence as
|
|
12
|
-
import { createPortal as
|
|
4
|
+
import { useOverlayLifecycle as n } from "../../../lib/dialogOverlay.js";
|
|
5
|
+
import { dialogBackdropClasses as r, overlayPanelBodyScrollClasses as i, overlayPanelChromeClasses as a, overlayPanelFooterClasses as o, overlayPanelFooterDelineatedInnerClasses as s, overlayPanelFooterDelineatedShellClasses as c, overlayPanelFooterHairlineClasses as l, overlayPanelSectionStackClasses as u } from "../Dialog/dialogStyles.js";
|
|
6
|
+
import { OverlayPanelHeader as d } from "../Dialog/OverlayPanelHeader.js";
|
|
7
|
+
import { sheetEndBackdropClasses as f, sheetOverlayRootClasses as p, sheetPanelBaseClasses as m, sheetPanelMotionTransition as h, sheetPanelMotionVariants as g, sheetPanelPlacementClasses as _, sheetPanelReducedMotionVariants as v, sheetPanelSizeClasses as y, sheetSafeAreaBottomClasses as b, sheetSides as x, sheetSizes as S } from "./sheetStyles.js";
|
|
8
|
+
import { SheetProvider as C, useSheetContext as w, useSheetLabelIds as T } from "./SheetContext.js";
|
|
9
|
+
import { useCallback as E, useRef as D } from "react";
|
|
10
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
11
|
+
import { AnimatePresence as A, motion as j, useReducedMotion as M } from "motion/react";
|
|
12
|
+
import { createPortal as N } from "react-dom";
|
|
13
13
|
//#region src/components/organisms/Sheet/Sheet.tsx
|
|
14
|
-
function
|
|
15
|
-
let { open:
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let a = z.current;
|
|
27
|
-
a != null && a.isConnected && a !== document.body ? a.focus() : (C(), window.requestAnimationFrame(() => {
|
|
28
|
-
let e = document.activeElement;
|
|
29
|
-
(e == null || e === document.body || t?.contains(e)) && C();
|
|
30
|
-
}));
|
|
31
|
-
};
|
|
32
|
-
}, [l, x]), j(() => {
|
|
33
|
-
if (!l || !b) return;
|
|
34
|
-
function e(e) {
|
|
35
|
-
e.key === "Escape" && (e.preventDefault(), B());
|
|
36
|
-
}
|
|
37
|
-
return document.addEventListener("keydown", e), () => {
|
|
38
|
-
document.removeEventListener("keydown", e);
|
|
39
|
-
};
|
|
40
|
-
}, [
|
|
41
|
-
B,
|
|
42
|
-
b,
|
|
43
|
-
l
|
|
44
|
-
]);
|
|
45
|
-
function V(e) {
|
|
46
|
-
if (!y) return;
|
|
14
|
+
function P({ side: i, size: o, "aria-labelledby": s, "aria-describedby": c, children: l }) {
|
|
15
|
+
let { open: u, onOpenChange: d, dismissOnBackdrop: b, dismissOnEscape: x, triggerRef: S } = w("SheetPortal"), C = M(), T = D(null), P = E(() => {
|
|
16
|
+
d(!1);
|
|
17
|
+
}, [d]);
|
|
18
|
+
n(T, {
|
|
19
|
+
open: u,
|
|
20
|
+
onClose: P,
|
|
21
|
+
closeOnEscape: x,
|
|
22
|
+
returnFocusRef: S
|
|
23
|
+
});
|
|
24
|
+
function F(e) {
|
|
25
|
+
if (!b) return;
|
|
47
26
|
let t = e.target;
|
|
48
|
-
|
|
27
|
+
T.current?.contains(t) || (e.preventDefault(), P());
|
|
49
28
|
}
|
|
50
|
-
return typeof document > "u" ? null :
|
|
51
|
-
className:
|
|
29
|
+
return typeof document > "u" ? null : N(/* @__PURE__ */ O(A, { children: u ? /* @__PURE__ */ k(j.div, {
|
|
30
|
+
className: p[i],
|
|
52
31
|
initial: { opacity: 0 },
|
|
53
32
|
animate: { opacity: 1 },
|
|
54
33
|
exit: { opacity: 0 },
|
|
55
34
|
transition: t("medium"),
|
|
56
|
-
onMouseDown:
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
-
className:
|
|
35
|
+
onMouseDown: F,
|
|
36
|
+
children: [/* @__PURE__ */ O("div", {
|
|
37
|
+
className: i === "end" ? f : r,
|
|
59
38
|
"aria-hidden": "true"
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
-
ref:
|
|
62
|
-
className: e(
|
|
39
|
+
}), /* @__PURE__ */ O(j.div, {
|
|
40
|
+
ref: T,
|
|
41
|
+
className: e(m, _[i], y[i][o], a, "relative z-[1]"),
|
|
63
42
|
role: "dialog",
|
|
64
43
|
"aria-modal": "true",
|
|
65
|
-
"aria-labelledby":
|
|
66
|
-
"aria-describedby":
|
|
67
|
-
variants:
|
|
44
|
+
"aria-labelledby": s,
|
|
45
|
+
"aria-describedby": c,
|
|
46
|
+
variants: C === !0 ? v : g(i),
|
|
68
47
|
initial: "hidden",
|
|
69
48
|
animate: "visible",
|
|
70
49
|
exit: "exit",
|
|
71
|
-
transition:
|
|
50
|
+
transition: h(i),
|
|
72
51
|
onMouseDown: (e) => {
|
|
73
52
|
e.stopPropagation();
|
|
74
53
|
},
|
|
75
|
-
children:
|
|
54
|
+
children: l
|
|
76
55
|
})]
|
|
77
56
|
}) : null }), document.body);
|
|
78
57
|
}
|
|
79
|
-
function
|
|
80
|
-
let { titleId: a, descriptionId: o } =
|
|
81
|
-
return /* @__PURE__ */
|
|
58
|
+
function F({ open: e, onOpenChange: t, dismissOnBackdrop: n = !0, dismissOnEscape: r = !0, children: i }) {
|
|
59
|
+
let { titleId: a, descriptionId: o } = T("sheet"), s = D(null);
|
|
60
|
+
return /* @__PURE__ */ O(C, {
|
|
82
61
|
value: {
|
|
83
62
|
open: e,
|
|
84
63
|
onOpenChange: t,
|
|
@@ -91,9 +70,9 @@ function B({ open: e, onOpenChange: t, dismissOnBackdrop: n = !0, dismissOnEscap
|
|
|
91
70
|
children: i
|
|
92
71
|
});
|
|
93
72
|
}
|
|
94
|
-
function
|
|
95
|
-
let { onOpenChange: n, triggerRef: r } =
|
|
96
|
-
return /* @__PURE__ */
|
|
73
|
+
function I({ children: e, className: t }) {
|
|
74
|
+
let { onOpenChange: n, triggerRef: r } = w("Sheet.Trigger");
|
|
75
|
+
return /* @__PURE__ */ O("span", {
|
|
97
76
|
ref: r,
|
|
98
77
|
className: t,
|
|
99
78
|
onClick: (e) => {
|
|
@@ -103,56 +82,56 @@ function V({ children: e, className: t }) {
|
|
|
103
82
|
children: e
|
|
104
83
|
});
|
|
105
84
|
}
|
|
106
|
-
function
|
|
107
|
-
let { titleId: v, descriptionId:
|
|
108
|
-
return /* @__PURE__ */
|
|
85
|
+
function L({ side: t = "bottom", size: n = "md", title: r, description: a, headerStart: f, headerActions: p, showClose: m = !0, footer: h, className: g, children: _ }) {
|
|
86
|
+
let { titleId: v, descriptionId: y, onOpenChange: x } = w("Sheet.Content"), S = r != null, C = a != null, T = _ != null || !S && C, E = h != null, D = t === "end" ? b : void 0;
|
|
87
|
+
return /* @__PURE__ */ O(P, {
|
|
109
88
|
side: t,
|
|
110
89
|
size: n,
|
|
111
90
|
"aria-labelledby": S ? v : void 0,
|
|
112
|
-
"aria-describedby": C ?
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
-
className: e(
|
|
91
|
+
"aria-describedby": C ? y : void 0,
|
|
92
|
+
children: /* @__PURE__ */ k("div", {
|
|
93
|
+
className: e(u, h == null ? "pb-4" : void 0, h == null ? D : void 0, g),
|
|
115
94
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ O(d, {
|
|
117
96
|
titleId: v,
|
|
118
|
-
descriptionId:
|
|
119
|
-
title:
|
|
120
|
-
description:
|
|
97
|
+
descriptionId: y,
|
|
98
|
+
title: r,
|
|
99
|
+
description: a,
|
|
121
100
|
headerStart: f,
|
|
122
101
|
headerEnd: p,
|
|
123
102
|
showClose: m,
|
|
124
103
|
closeLabel: "Close sheet",
|
|
125
104
|
onClose: () => x(!1),
|
|
126
|
-
delineated:
|
|
105
|
+
delineated: T || E
|
|
127
106
|
}),
|
|
128
|
-
|
|
129
|
-
className:
|
|
130
|
-
children: [!S && C ? /* @__PURE__ */
|
|
131
|
-
id:
|
|
107
|
+
T ? /* @__PURE__ */ k("div", {
|
|
108
|
+
className: i,
|
|
109
|
+
children: [!S && C ? /* @__PURE__ */ O("p", {
|
|
110
|
+
id: y,
|
|
132
111
|
className: "text-muted",
|
|
133
|
-
children:
|
|
112
|
+
children: a
|
|
134
113
|
}) : null, _]
|
|
135
114
|
}) : null,
|
|
136
|
-
|
|
137
|
-
className:
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
-
className:
|
|
115
|
+
E ? T ? /* @__PURE__ */ k("footer", {
|
|
116
|
+
className: c,
|
|
117
|
+
children: [/* @__PURE__ */ O("hr", {
|
|
118
|
+
className: l,
|
|
140
119
|
"aria-hidden": "true"
|
|
141
|
-
}), /* @__PURE__ */
|
|
142
|
-
className: e(
|
|
120
|
+
}), /* @__PURE__ */ O("div", {
|
|
121
|
+
className: e(s, D),
|
|
143
122
|
children: h
|
|
144
123
|
})]
|
|
145
|
-
}) : /* @__PURE__ */
|
|
146
|
-
className: e(
|
|
124
|
+
}) : /* @__PURE__ */ O("footer", {
|
|
125
|
+
className: e(o, "pb-4", D),
|
|
147
126
|
children: h
|
|
148
127
|
}) : null
|
|
149
128
|
]
|
|
150
129
|
})
|
|
151
130
|
});
|
|
152
131
|
}
|
|
153
|
-
var
|
|
154
|
-
Trigger:
|
|
155
|
-
Content:
|
|
132
|
+
var R = Object.assign(F, {
|
|
133
|
+
Trigger: I,
|
|
134
|
+
Content: L
|
|
156
135
|
});
|
|
157
136
|
//#endregion
|
|
158
|
-
export {
|
|
137
|
+
export { R as Sheet, x as sheetSides, S as sheetSizes };
|
|
@@ -37,15 +37,6 @@ export interface SiteNavProps {
|
|
|
37
37
|
"aria-label"?: string;
|
|
38
38
|
className?: SiteNavLayoutClassName;
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Marketing site header — in-flow expanded band that scrolls away with the page. Once the
|
|
42
|
-
* reader scrolls past half the viewport (or `collapseAt` px), a separate floating pill
|
|
43
|
-
* pins 1rem from the top (`fixed` on the window, `sticky` inside a `scrollContainer`).
|
|
44
|
-
*
|
|
45
|
-
* Mental model: **page chrome** (`placement="fixed"`, optional `scrollContainer`) vs
|
|
46
|
-
* **specimen** (`placement="inline"` without a scroller). Collapse ownership lives in
|
|
47
|
-
* {@link useSiteNavCollapse}.
|
|
48
|
-
*/
|
|
49
40
|
declare function SiteNavRoot({ start, middle, end, mobile, mobileTitle, collapseAt, state: controlledState, onStateChange, compactLayout, placement, scrollContainer, "aria-label": ariaLabel, className, }: SiteNavProps): import("react").JSX.Element;
|
|
50
41
|
export interface SiteNavBrandProps {
|
|
51
42
|
href: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteNav.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SiteNav/SiteNav.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"SiteNav.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SiteNav/SiteNav.tsx"],"names":[],"mappings":"AAGA,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAUpE,OAAO,EA8CL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,2BAA2B,EAC3B,iBAAiB,EACjB,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oGAAoG;IACpG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,yEAAyE;IACzE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,2GAA2G;IAC3G,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAC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