@thewhatmatters/wmds 0.4.27 → 0.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/CONSUMING.md +62 -1
- package/bin/wmds-check.mjs +47 -0
- package/dist/colors.css +92 -0
- package/dist/components/atoms/Badge/badgeStyles.js +6 -6
- package/dist/components/atoms/Band/Band.d.ts +27 -0
- package/dist/components/atoms/Band/Band.d.ts.map +1 -0
- package/dist/components/atoms/Band/Band.js +22 -0
- package/dist/components/atoms/Band/bandStyles.d.ts +20 -0
- package/dist/components/atoms/Band/bandStyles.d.ts.map +1 -0
- package/dist/components/atoms/Band/bandStyles.js +23 -0
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.js +12 -5
- package/dist/components/atoms/Button/buttonStyles.d.ts +1 -1
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStyles.js +2 -2
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +69 -68
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.js +1 -1
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/IconButton.js +13 -12
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +2 -2
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/iconButtonStyles.js +1 -1
- package/dist/components/atoms/InlinePill/InlinePill.d.ts +42 -0
- package/dist/components/atoms/InlinePill/InlinePill.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/InlinePill.js +48 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts +27 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.js +19 -0
- package/dist/components/atoms/Input/Input.d.ts +6 -3
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.d.ts +1 -1
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.js +3 -3
- package/dist/components/atoms/Skeleton/skeletonStyles.js +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +45 -44
- package/dist/components/atoms/Switch/switchStyles.d.ts +1 -1
- package/dist/components/atoms/Switch/switchStyles.d.ts.map +1 -1
- package/dist/components/atoms/Switch/switchStyles.js +1 -1
- package/dist/components/atoms/TextArea/textareaShellStyles.js +3 -3
- package/dist/components/molecules/Accordion/accordionStyles.d.ts +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.js +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +80 -122
- package/dist/components/molecules/Card/cardStyles.js +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts.map +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.js +1 -1
- package/dist/components/molecules/Chip/chipStyles.js +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js +30 -27
- package/dist/components/molecules/Dropdown/dropdownStyles.js +1 -1
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts +14 -0
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts.map +1 -0
- package/dist/components/{organisms/Tab/tabOverflow.js → molecules/Dropdown/resolveOverflow.js} +2 -2
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts +70 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.js +155 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts +71 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.js +61 -0
- package/dist/components/molecules/Field/Field.d.ts.map +1 -1
- package/dist/components/molecules/Field/Field.js +11 -10
- package/dist/components/molecules/LogView/logViewStyles.d.ts +1 -1
- package/dist/components/molecules/LogView/logViewStyles.d.ts.map +1 -1
- package/dist/components/molecules/LogView/logViewStyles.js +1 -1
- package/dist/components/molecules/PillGroup/pillGroupStyles.js +1 -1
- package/dist/components/molecules/Search/searchStyles.js +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +3 -3
- package/dist/components/molecules/Select/Select.d.ts +3 -1
- package/dist/components/molecules/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.js +75 -119
- package/dist/components/molecules/Select/selectStyles.js +3 -3
- package/dist/components/molecules/Stat/statStyles.d.ts +1 -1
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
- package/dist/components/molecules/Stat/statStyles.js +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.d.ts.map +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.js +35 -35
- package/dist/components/organisms/AppShell/AppShell.d.ts +2 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/AppShell.js +138 -129
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +2 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/appShellStyles.js +2 -2
- package/dist/components/organisms/Dialog/AlertDialog.d.ts +7 -1
- package/dist/components/organisms/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/AlertDialog.js +54 -50
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +52 -71
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +14 -1
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/dialogStyles.js +3 -3
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts.map +1 -1
- package/dist/components/organisms/FilterPanel/FilterPanel.js +52 -42
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +6 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.js +54 -66
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/components/organisms/MoreMenu/MoreMenu.js +45 -101
- package/dist/components/organisms/Panel/Panel.d.ts.map +1 -1
- package/dist/components/organisms/Panel/Panel.js +44 -53
- package/dist/components/organisms/Sheet/Sheet.d.ts +3 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +82 -101
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +0 -9
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +180 -227
- package/dist/components/organisms/SiteNav/siteNavStyles.js +1 -1
- package/dist/components/organisms/Tab/Tab.d.ts.map +1 -1
- package/dist/components/organisms/Tab/Tab.js +77 -127
- package/dist/components/organisms/Tab/tabStyles.d.ts +2 -1
- package/dist/components/organisms/Tab/tabStyles.d.ts.map +1 -1
- package/dist/components/organisms/Tab/tabStyles.js +2 -2
- package/dist/fonts.css +10 -0
- package/dist/grid.css +38 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -131
- package/dist/lib/contrast.d.ts +11 -0
- package/dist/lib/contrast.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.d.ts +27 -1
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +87 -25
- package/dist/lib/typography.d.ts +1 -1
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/shape.css +24 -3
- package/dist/styles.css +1 -1
- package/dist/typography.css +55 -8
- package/docs/components.md +4 -2
- package/docs/exports.json +55 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +39 -0
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
- package/docs/patterns/components-copyfield--copied.tsx +1 -1
- package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
- package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +54 -0
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +1 -1
- package/docs/patterns/components-logview--log-viewer.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
- package/docs/patterns/components-table--approvals.tsx +1 -1
- package/docs/patterns/components-table--basic.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +17 -1
- package/package.json +1 -1
- package/dist/components/organisms/Tab/tabOverflow.d.ts +0 -14
- package/dist/components/organisms/Tab/tabOverflow.d.ts.map +0 -1
|
@@ -6,217 +6,226 @@ import { Tooltip as r } from "../../atoms/Tooltip/Tooltip.js";
|
|
|
6
6
|
import { PageHeader as i } from "../../molecules/PageHeader/PageHeader.js";
|
|
7
7
|
import { Panel as a } from "../Panel/Panel.js";
|
|
8
8
|
import { Sheet as o } from "../Sheet/Sheet.js";
|
|
9
|
-
import { appShellBrandClasses as
|
|
10
|
-
import { Children as
|
|
11
|
-
import { PanelLeft as
|
|
12
|
-
import { Fragment as
|
|
9
|
+
import { appShellBrandClasses as ee, appShellCanvasClasses as te, appShellMainClasses as ne, appShellRootClasses as re, appShellSheetBodyClasses as ie, appShellSidebarBodyClasses as s, appShellSidebarClasses as ae, appShellSidebarFooterClasses as oe, appShellSkipLinkClasses as se, appShellSurfaceClasses as ce, appShellToggleDesktopClasses as le, appShellToggleMobileClasses as ue } from "./appShellStyles.js";
|
|
10
|
+
import { Children as c, createContext as l, isValidElement as u, useCallback as d, useContext as f, useEffect as p, useId as de, useMemo as m, useRef as h, useState as g } from "react";
|
|
11
|
+
import { PanelLeft as _ } from "lucide-react";
|
|
12
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/organisms/AppShell/AppShell.tsx
|
|
14
|
-
var
|
|
14
|
+
var fe = {
|
|
15
15
|
collapse: "Collapse sidebar",
|
|
16
16
|
expand: "Expand sidebar",
|
|
17
17
|
menu: "Menu",
|
|
18
|
-
aside: "Details"
|
|
18
|
+
aside: "Details",
|
|
19
|
+
skipToContent: "Skip to content"
|
|
19
20
|
};
|
|
21
|
+
function x({ children: e }) {
|
|
22
|
+
return /* @__PURE__ */ y(v, { children: e });
|
|
23
|
+
}
|
|
20
24
|
function S({ children: e }) {
|
|
21
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ y(v, { children: e });
|
|
22
26
|
}
|
|
23
27
|
function C({ children: e }) {
|
|
24
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ y(v, { children: e });
|
|
25
29
|
}
|
|
26
30
|
function w({ children: e }) {
|
|
27
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ y(v, { children: e });
|
|
28
32
|
}
|
|
29
33
|
function T({ children: e }) {
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
}
|
|
32
|
-
function E({ children: e }) {
|
|
33
|
-
return /* @__PURE__ */ b(y, { children: e });
|
|
34
|
+
return /* @__PURE__ */ y(v, { children: e });
|
|
34
35
|
}
|
|
35
|
-
var
|
|
36
|
-
function
|
|
37
|
-
let e =
|
|
36
|
+
var E = l(null);
|
|
37
|
+
function D() {
|
|
38
|
+
let e = f(E);
|
|
38
39
|
if (e == null) throw Error("useAppShell must be used inside <AppShell>.");
|
|
39
40
|
return e;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
let [r, i] =
|
|
43
|
-
return [e ?? r,
|
|
42
|
+
function O(e, t, n) {
|
|
43
|
+
let [r, i] = g(t);
|
|
44
|
+
return [e ?? r, d((t) => {
|
|
44
45
|
e ?? i(t), n?.(t);
|
|
45
46
|
}, [e, n])];
|
|
46
47
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
48
|
+
var k = "(min-width: 1024px)";
|
|
49
|
+
function pe(e) {
|
|
49
50
|
return e instanceof HTMLElement && e.isContentEditable;
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function me(e) {
|
|
52
53
|
let t = { content: [] };
|
|
53
|
-
return
|
|
54
|
-
if (!
|
|
54
|
+
return c.forEach(e, (e) => {
|
|
55
|
+
if (!u(e)) {
|
|
55
56
|
e != null && e !== !1 && t.content.push(e);
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
e.type ===
|
|
59
|
+
e.type === x ? t.brand = e.props.children : e.type === S ? t.sidebar = e.props.children : e.type === C ? t.sidebarFooter = e.props.children : e.type === w ? t.header = e.props.children : e.type === T ? t.aside = e.props : t.content.push(e);
|
|
59
60
|
}), t;
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
let
|
|
63
|
-
...
|
|
64
|
-
...
|
|
65
|
-
},
|
|
66
|
-
!e &&
|
|
67
|
-
}, [
|
|
68
|
-
window.matchMedia(
|
|
69
|
-
}, [
|
|
70
|
-
|
|
71
|
-
let e = window.matchMedia(
|
|
62
|
+
function A({ title: c, brand: l, sidebar: u, sidebarFooter: f, header: v, aside: x, asideTitle: S, asideDescription: C, sidebarOpen: w, defaultSidebarOpen: T = !0, onSidebarOpenChange: D, asideOpen: A, defaultAsideOpen: j = !1, onAsideOpenChange: he, labels: ge, children: _e, className: ve }) {
|
|
63
|
+
let M = {
|
|
64
|
+
...fe,
|
|
65
|
+
...ge
|
|
66
|
+
}, N = me(_e), P = l ?? N.brand, F = u ?? N.sidebar, I = f ?? N.sidebarFooter, ye = v ?? N.header, L = x ?? N.aside?.children, R = F != null, be = L != null, [z, B] = O(w, T, D), [V, H] = O(A, j, he), [U, W] = g(!1), G = de(), K = h(null), q = h(null), J = d((e) => {
|
|
67
|
+
!e && K.current?.contains(document.activeElement) && q.current?.focus(), B(e);
|
|
68
|
+
}, [B]), Y = d(() => {
|
|
69
|
+
window.matchMedia(k).matches ? J(!z) : W((e) => !e);
|
|
70
|
+
}, [J, z]);
|
|
71
|
+
p(() => {
|
|
72
|
+
let e = window.matchMedia(k);
|
|
72
73
|
function t(e) {
|
|
73
|
-
e.matches &&
|
|
74
|
+
e.matches && W(!1);
|
|
74
75
|
}
|
|
75
76
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
76
|
-
}, []),
|
|
77
|
-
if (!
|
|
77
|
+
}, []), p(() => {
|
|
78
|
+
if (!R) return;
|
|
78
79
|
function e(e) {
|
|
79
|
-
e.defaultPrevented || e.altKey || e.shiftKey || !(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== "b" ||
|
|
80
|
+
e.defaultPrevented || e.altKey || e.shiftKey || !(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== "b" || pe(e.target) || (e.preventDefault(), Y());
|
|
80
81
|
}
|
|
81
82
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
82
|
-
}, [
|
|
83
|
-
let
|
|
84
|
-
sidebarOpen:
|
|
85
|
-
setSidebarOpen:
|
|
86
|
-
menuOpen:
|
|
87
|
-
setMenuOpen:
|
|
88
|
-
asideOpen:
|
|
89
|
-
setAsideOpen:
|
|
90
|
-
toggleSidebar:
|
|
83
|
+
}, [R, Y]);
|
|
84
|
+
let xe = m(() => ({
|
|
85
|
+
sidebarOpen: z,
|
|
86
|
+
setSidebarOpen: J,
|
|
87
|
+
menuOpen: U,
|
|
88
|
+
setMenuOpen: W,
|
|
89
|
+
asideOpen: V,
|
|
90
|
+
setAsideOpen: H,
|
|
91
|
+
toggleSidebar: Y
|
|
91
92
|
}), [
|
|
92
|
-
|
|
93
|
-
W,
|
|
93
|
+
V,
|
|
94
94
|
U,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
H,
|
|
96
|
+
J,
|
|
97
|
+
z,
|
|
98
|
+
Y
|
|
98
99
|
]);
|
|
99
|
-
function
|
|
100
|
-
e.target.closest("nav a[href], nav button") != null &&
|
|
100
|
+
function Se(e) {
|
|
101
|
+
e.target.closest("nav a[href], nav button") != null && W(!1);
|
|
101
102
|
}
|
|
102
|
-
let
|
|
103
|
-
className:
|
|
104
|
-
children:
|
|
105
|
-
}), $ =
|
|
106
|
-
className:
|
|
107
|
-
children:
|
|
108
|
-
}),
|
|
109
|
-
ref:
|
|
103
|
+
let X = z ? M.collapse : M.expand, Z = `${G}-main`, Q = P == null ? null : /* @__PURE__ */ y("div", {
|
|
104
|
+
className: ee,
|
|
105
|
+
children: P
|
|
106
|
+
}), $ = I == null ? null : /* @__PURE__ */ y("div", {
|
|
107
|
+
className: oe,
|
|
108
|
+
children: I
|
|
109
|
+
}), Ce = R ? /* @__PURE__ */ b(r.Provider, { children: [/* @__PURE__ */ b(r, { children: [/* @__PURE__ */ y(r.Trigger, { render: /* @__PURE__ */ y(t, {
|
|
110
|
+
ref: q,
|
|
110
111
|
role: "ghost",
|
|
111
112
|
size: "sm",
|
|
112
113
|
title: "",
|
|
113
|
-
icon: /* @__PURE__ */
|
|
114
|
-
"aria-label":
|
|
115
|
-
"aria-expanded":
|
|
116
|
-
"aria-controls":
|
|
114
|
+
icon: /* @__PURE__ */ y(_, { strokeWidth: 2 }),
|
|
115
|
+
"aria-label": X,
|
|
116
|
+
"aria-expanded": z,
|
|
117
|
+
"aria-controls": G,
|
|
117
118
|
"aria-keyshortcuts": "Control+B Meta+B",
|
|
118
|
-
className:
|
|
119
|
-
onClick: () =>
|
|
120
|
-
}) }), /* @__PURE__ */
|
|
119
|
+
className: le,
|
|
120
|
+
onClick: () => J(!z)
|
|
121
|
+
}) }), /* @__PURE__ */ y(r.Content, { children: /* @__PURE__ */ b("span", {
|
|
121
122
|
className: "inline-flex items-center gap-2",
|
|
122
123
|
children: [
|
|
123
|
-
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
X,
|
|
125
|
+
/* @__PURE__ */ y(n, {
|
|
125
126
|
size: "sm",
|
|
126
127
|
children: "Ctrl"
|
|
127
128
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ y(n, {
|
|
129
130
|
size: "sm",
|
|
130
131
|
children: "B"
|
|
131
132
|
})
|
|
132
133
|
]
|
|
133
|
-
}) })] }), /* @__PURE__ */
|
|
134
|
+
}) })] }), /* @__PURE__ */ y(t, {
|
|
134
135
|
role: "ghost",
|
|
135
136
|
size: "sm",
|
|
136
|
-
icon: /* @__PURE__ */
|
|
137
|
-
"aria-label":
|
|
138
|
-
"aria-expanded":
|
|
137
|
+
icon: /* @__PURE__ */ y(_, { strokeWidth: 2 }),
|
|
138
|
+
"aria-label": M.menu,
|
|
139
|
+
"aria-expanded": U,
|
|
139
140
|
"aria-haspopup": "dialog",
|
|
140
141
|
"aria-keyshortcuts": "Control+B Meta+B",
|
|
141
|
-
className:
|
|
142
|
-
onClick: () =>
|
|
142
|
+
className: ue,
|
|
143
|
+
onClick: () => W(!0)
|
|
143
144
|
})] }) : null;
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
value:
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
className: e(
|
|
145
|
+
return /* @__PURE__ */ y(E.Provider, {
|
|
146
|
+
value: xe,
|
|
147
|
+
children: /* @__PURE__ */ b("div", {
|
|
148
|
+
className: e(re, ve),
|
|
148
149
|
children: [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
/* @__PURE__ */ y("a", {
|
|
151
|
+
href: `#${Z}`,
|
|
152
|
+
className: se,
|
|
153
|
+
onClick: (e) => {
|
|
154
|
+
e.preventDefault(), document.getElementById(Z)?.focus();
|
|
155
|
+
},
|
|
156
|
+
children: M.skipToContent
|
|
157
|
+
}),
|
|
158
|
+
R ? /* @__PURE__ */ b("div", {
|
|
159
|
+
ref: K,
|
|
160
|
+
id: G,
|
|
161
|
+
className: e(ae, !z && "lg:!hidden"),
|
|
153
162
|
children: [
|
|
154
163
|
Q,
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children:
|
|
164
|
+
/* @__PURE__ */ y("div", {
|
|
165
|
+
className: s,
|
|
166
|
+
children: F
|
|
158
167
|
}),
|
|
159
168
|
$
|
|
160
169
|
]
|
|
161
170
|
}) : null,
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
className:
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
className:
|
|
166
|
-
children: [/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ y("div", {
|
|
172
|
+
className: te,
|
|
173
|
+
children: /* @__PURE__ */ b("div", {
|
|
174
|
+
className: ce,
|
|
175
|
+
children: [/* @__PURE__ */ y(i, {
|
|
167
176
|
variant: "app",
|
|
168
|
-
title:
|
|
169
|
-
"aria-label":
|
|
170
|
-
start:
|
|
171
|
-
end:
|
|
172
|
-
}), /* @__PURE__ */
|
|
173
|
-
id:
|
|
177
|
+
title: c,
|
|
178
|
+
"aria-label": c,
|
|
179
|
+
start: Ce,
|
|
180
|
+
end: ye
|
|
181
|
+
}), /* @__PURE__ */ y("main", {
|
|
182
|
+
id: Z,
|
|
174
183
|
tabIndex: -1,
|
|
175
|
-
className:
|
|
176
|
-
children:
|
|
184
|
+
className: ne,
|
|
185
|
+
children: N.content
|
|
177
186
|
})]
|
|
178
187
|
})
|
|
179
188
|
}),
|
|
180
|
-
|
|
181
|
-
open:
|
|
182
|
-
onOpenChange:
|
|
183
|
-
children: /* @__PURE__ */
|
|
189
|
+
R ? /* @__PURE__ */ y(o, {
|
|
190
|
+
open: U,
|
|
191
|
+
onOpenChange: W,
|
|
192
|
+
children: /* @__PURE__ */ y(o.Content, {
|
|
184
193
|
side: "start",
|
|
185
|
-
title:
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
-
className:
|
|
188
|
-
onClick:
|
|
194
|
+
title: M.menu,
|
|
195
|
+
children: /* @__PURE__ */ b("div", {
|
|
196
|
+
className: ie,
|
|
197
|
+
onClick: Se,
|
|
189
198
|
children: [
|
|
190
199
|
Q,
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
className:
|
|
193
|
-
children:
|
|
200
|
+
/* @__PURE__ */ y("div", {
|
|
201
|
+
className: s,
|
|
202
|
+
children: F
|
|
194
203
|
}),
|
|
195
204
|
$
|
|
196
205
|
]
|
|
197
206
|
})
|
|
198
207
|
})
|
|
199
208
|
}) : null,
|
|
200
|
-
|
|
201
|
-
open:
|
|
202
|
-
onOpenChange:
|
|
203
|
-
children: /* @__PURE__ */
|
|
209
|
+
be ? /* @__PURE__ */ y(a, {
|
|
210
|
+
open: V,
|
|
211
|
+
onOpenChange: H,
|
|
212
|
+
children: /* @__PURE__ */ y(a.Content, {
|
|
204
213
|
side: "end",
|
|
205
|
-
title:
|
|
206
|
-
description:
|
|
207
|
-
children:
|
|
214
|
+
title: S ?? N.aside?.title ?? M.aside,
|
|
215
|
+
description: C ?? N.aside?.description,
|
|
216
|
+
children: L
|
|
208
217
|
})
|
|
209
218
|
}) : null
|
|
210
219
|
]
|
|
211
220
|
})
|
|
212
221
|
});
|
|
213
222
|
}
|
|
214
|
-
var
|
|
215
|
-
Brand:
|
|
216
|
-
Sidebar:
|
|
217
|
-
SidebarFooter:
|
|
218
|
-
Header:
|
|
219
|
-
Aside:
|
|
223
|
+
var j = Object.assign(A, {
|
|
224
|
+
Brand: x,
|
|
225
|
+
Sidebar: S,
|
|
226
|
+
SidebarFooter: C,
|
|
227
|
+
Header: w,
|
|
228
|
+
Aside: T
|
|
220
229
|
});
|
|
221
230
|
//#endregion
|
|
222
|
-
export {
|
|
231
|
+
export { j as AppShell, D as useAppShell };
|
|
@@ -11,6 +11,8 @@ export declare const appShellSidebarFooterClasses = "box-border shrink-0 px-4 py
|
|
|
11
11
|
export declare const appShellCanvasClasses = "flex min-h-0 min-w-0 flex-1 p-2";
|
|
12
12
|
/** Raised surface — the Card shell radius and the soft card shadow. */
|
|
13
13
|
export declare const appShellSurfaceClasses: string;
|
|
14
|
+
/** First tab stop: hidden until focused, then pinned over the top-start corner. */
|
|
15
|
+
export declare const appShellSkipLinkClasses: string;
|
|
14
16
|
export declare const appShellMainClasses = "min-h-0 flex-1 overflow-y-auto px-[var(--grid-margin)] py-6 focus-visible:outline-none";
|
|
15
17
|
export declare const appShellToggleDesktopClasses = "max-lg:!hidden";
|
|
16
18
|
export declare const appShellToggleMobileClasses = "lg:!hidden";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appShellStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/AppShell/appShellStyles.ts"],"names":[],"mappings":"AAIA,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,yDAAyD,CAAC;AAE1F,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,mEAAmE,CAAC;AAEvG,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,QAGhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAE5E,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAEvE,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,QAGlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,2FAC0D,CAAC;AAE3F,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,wBAAwB,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"appShellStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/AppShell/appShellStyles.ts"],"names":[],"mappings":"AAIA,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,yDAAyD,CAAC;AAE1F,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,mEAAmE,CAAC;AAEvG,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,QAGhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAE5E,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAEvE,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,QAGlC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,QAGqB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,2FAC0D,CAAC;AAE3F,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,wBAAwB,iCAAiC,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { cardLayoutShellShapeClasses as t } from "../../molecules/Card/cardStyles.js";
|
|
4
4
|
import { pageHeaderAppBandHeightClasses as n } from "../../molecules/PageHeader/pageHeaderStyles.js";
|
|
5
5
|
//#region src/components/organisms/AppShell/appShellStyles.ts
|
|
6
|
-
var r = "flex h-full min-h-0 w-full bg-body font-sans text-fg", i = "flex h-full min-h-0 w-60 shrink-0 flex-col pt-2 max-lg:!hidden", a = e("box-border flex shrink-0 items-center gap-2 px-4", n), o = "min-h-0 flex-1 overflow-y-auto", s = "box-border shrink-0 px-4 py-3", c = "flex min-h-0 min-w-0 flex-1 p-2", l = e("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-surface shadow-soft-card", t.rounded), u = "min-h-0 flex-1 overflow-y-auto px-[var(--grid-margin)] py-6 focus-visible:outline-none",
|
|
6
|
+
var r = "flex h-full min-h-0 w-full bg-body font-sans text-fg", i = "flex h-full min-h-0 w-60 shrink-0 flex-col pt-2 max-lg:!hidden", a = e("box-border flex shrink-0 items-center gap-2 px-4", n), o = "min-h-0 flex-1 overflow-y-auto", s = "box-border shrink-0 px-4 py-3", c = "flex min-h-0 min-w-0 flex-1 p-2", l = e("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-surface shadow-soft-card", t.rounded), u = "sr-only focus:not-sr-only focus:fixed focus:start-4 focus:top-4 focus:z-50 focus:rounded-[var(--radius-control)] focus:bg-body focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-fg focus:outline-none focus:ring-2 focus:ring-focus-ring", d = "min-h-0 flex-1 overflow-y-auto px-[var(--grid-margin)] py-6 focus-visible:outline-none", f = "max-lg:!hidden", p = "lg:!hidden", m = "flex h-full min-h-0 flex-col";
|
|
7
7
|
//#endregion
|
|
8
|
-
export { a as appShellBrandClasses, c as appShellCanvasClasses,
|
|
8
|
+
export { a as appShellBrandClasses, c as appShellCanvasClasses, d as appShellMainClasses, r as appShellRootClasses, m as appShellSheetBodyClasses, o as appShellSidebarBodyClasses, i as appShellSidebarClasses, s as appShellSidebarFooterClasses, u as appShellSkipLinkClasses, l as appShellSurfaceClasses, f as appShellToggleDesktopClasses, p as appShellToggleMobileClasses };
|
|
@@ -8,6 +8,12 @@ export interface AlertDialogProps {
|
|
|
8
8
|
onOpenChange: (open: boolean) => void;
|
|
9
9
|
title: ReactNode;
|
|
10
10
|
description?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Content between the description and the actions — a typed-confirmation Input, a short list.
|
|
13
|
+
* It sits outside the description `<p>`, so `aria-describedby` still names the description alone.
|
|
14
|
+
* Cancel keeps initial focus; pair a field with `confirmDisabled`.
|
|
15
|
+
*/
|
|
16
|
+
children?: ReactNode;
|
|
11
17
|
cancelLabel?: string;
|
|
12
18
|
confirmLabel: string;
|
|
13
19
|
/** Confirm button role — default `primary`; use `destructive` for irreversible actions. */
|
|
@@ -27,5 +33,5 @@ export interface AlertDialogProps {
|
|
|
27
33
|
* Blocking confirm dialog — cancel + confirm footer; scrim dismiss off by default.
|
|
28
34
|
* Opinionated title + description + cancel/confirm footer on the shared overlay primitive.
|
|
29
35
|
*/
|
|
30
|
-
export declare function AlertDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, confirmRole, onConfirm, onCancel, confirmStatus, confirmDisabled, cancelDisabled, dismissOnBackdrop, dismissOnEscape, className, }: AlertDialogProps): import("react").JSX.Element;
|
|
36
|
+
export declare function AlertDialog({ open, onOpenChange, title, description, children, cancelLabel, confirmLabel, confirmRole, onConfirm, onCancel, confirmStatus, confirmDisabled, cancelDisabled, dismissOnBackdrop, dismissOnEscape, className, }: AlertDialogProps): import("react").JSX.Element;
|
|
31
37
|
//# sourceMappingURL=AlertDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB/C,eAAO,MAAM,uBAAuB,qCAAsC,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,+CAA+C;AAC/C,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,+BAA+B;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,WAAsB,EACtB,YAAY,EACZ,WAAuB,EACvB,SAAS,EACT,QAAQ,EACR,aAAa,EACb,eAAuB,EACvB,cAAsB,EACtB,iBAAyB,EACzB,eAAsB,EACtB,SAAS,GACV,EAAE,gBAAgB,+BAuFlB"}
|
|
@@ -2,73 +2,77 @@
|
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { Button as t } from "../../atoms/Button/Button.js";
|
|
4
4
|
import { Card as n } from "../../molecules/Card/Card.js";
|
|
5
|
-
import { alertDialogTitleClasses as r, dialogBodyMutedClasses as i,
|
|
6
|
-
import { OverlayPanelHeader as
|
|
7
|
-
import { DialogProvider as
|
|
8
|
-
import { DialogPortal as
|
|
9
|
-
import { useRef as
|
|
10
|
-
import { jsx as
|
|
5
|
+
import { alertDialogTitleClasses as r, dialogBodyMutedClasses as i, dialogHeaderInsetTopClasses as a, dialogPanelInsetXClasses as o, dialogPanelShellClasses as s, dialogPanelSizeClasses as c, overlayPanelChromeClasses as l, overlayPanelDialogBodyScrollClasses as u, overlayPanelDialogFooterClasses as d, overlayPanelMaxHeightClasses as f } from "./dialogStyles.js";
|
|
6
|
+
import { OverlayPanelHeader as p } from "./OverlayPanelHeader.js";
|
|
7
|
+
import { DialogProvider as m, useDialogLabelIds as h } from "./DialogContext.js";
|
|
8
|
+
import { DialogPortal as g } from "./Dialog.js";
|
|
9
|
+
import { useRef as _ } from "react";
|
|
10
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/organisms/Dialog/AlertDialog.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
let { titleId:
|
|
15
|
-
function
|
|
16
|
-
|
|
12
|
+
var b = ["primary", "destructive"];
|
|
13
|
+
function x({ open: b, onOpenChange: x, title: S, description: C, children: w, cancelLabel: T = "Cancel", confirmLabel: E, confirmRole: D = "primary", onConfirm: O, onCancel: k, confirmStatus: A, confirmDisabled: j = !1, cancelDisabled: M = !1, dismissOnBackdrop: N = !1, dismissOnEscape: P = !0, className: F }) {
|
|
14
|
+
let { titleId: I, descriptionId: L } = h("alert-dialog"), R = _(null);
|
|
15
|
+
function z() {
|
|
16
|
+
k?.(), x(!1);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
18
|
+
function B() {
|
|
19
|
+
O();
|
|
20
20
|
}
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ v(m, {
|
|
22
22
|
value: {
|
|
23
|
-
open:
|
|
24
|
-
onOpenChange:
|
|
25
|
-
titleId:
|
|
26
|
-
descriptionId:
|
|
27
|
-
dismissOnBackdrop:
|
|
28
|
-
dismissOnEscape:
|
|
29
|
-
triggerRef:
|
|
23
|
+
open: b,
|
|
24
|
+
onOpenChange: x,
|
|
25
|
+
titleId: I,
|
|
26
|
+
descriptionId: L,
|
|
27
|
+
dismissOnBackdrop: N,
|
|
28
|
+
dismissOnEscape: P,
|
|
29
|
+
triggerRef: R
|
|
30
30
|
},
|
|
31
|
-
children: /* @__PURE__ */ g
|
|
31
|
+
children: /* @__PURE__ */ v(g, {
|
|
32
32
|
role: "alertdialog",
|
|
33
|
-
"aria-labelledby":
|
|
34
|
-
"aria-describedby":
|
|
33
|
+
"aria-labelledby": I,
|
|
34
|
+
"aria-describedby": C == null ? void 0 : L,
|
|
35
35
|
initialFocusSelector: "[data-alert-dialog-cancel=\"true\"]",
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ y(n, {
|
|
37
37
|
padding: "none",
|
|
38
38
|
bodyTerminal: !1,
|
|
39
|
-
className: e(
|
|
39
|
+
className: e(c.sm, l, f, s, o, F),
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
titleId:
|
|
43
|
-
descriptionId:
|
|
44
|
-
title:
|
|
41
|
+
/* @__PURE__ */ v(p, {
|
|
42
|
+
titleId: I,
|
|
43
|
+
descriptionId: L,
|
|
44
|
+
title: S,
|
|
45
45
|
titleClassName: r,
|
|
46
|
-
showClose: !1
|
|
46
|
+
showClose: !1,
|
|
47
|
+
className: a
|
|
47
48
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
className:
|
|
50
|
-
children:
|
|
51
|
-
id:
|
|
49
|
+
/* @__PURE__ */ y("div", {
|
|
50
|
+
className: u,
|
|
51
|
+
children: [C == null ? null : /* @__PURE__ */ v("p", {
|
|
52
|
+
id: L,
|
|
52
53
|
className: i,
|
|
53
|
-
children:
|
|
54
|
-
})
|
|
54
|
+
children: C
|
|
55
|
+
}), w == null ? null : /* @__PURE__ */ v("div", {
|
|
56
|
+
className: C == null ? void 0 : "mt-3",
|
|
57
|
+
children: w
|
|
58
|
+
})]
|
|
55
59
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
className:
|
|
58
|
-
children: [/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ y("footer", {
|
|
61
|
+
className: d,
|
|
62
|
+
children: [/* @__PURE__ */ v(t, {
|
|
59
63
|
size: "sm",
|
|
60
64
|
role: "ghost",
|
|
61
|
-
disabled:
|
|
65
|
+
disabled: M || A === "loading",
|
|
62
66
|
"data-alert-dialog-cancel": "true",
|
|
63
|
-
onClick:
|
|
64
|
-
children:
|
|
65
|
-
}), /* @__PURE__ */
|
|
67
|
+
onClick: z,
|
|
68
|
+
children: T
|
|
69
|
+
}), /* @__PURE__ */ v(t, {
|
|
66
70
|
size: "sm",
|
|
67
|
-
role:
|
|
68
|
-
status:
|
|
69
|
-
disabled:
|
|
70
|
-
onClick:
|
|
71
|
-
children:
|
|
71
|
+
role: D,
|
|
72
|
+
status: A,
|
|
73
|
+
disabled: j,
|
|
74
|
+
onClick: B,
|
|
75
|
+
children: E
|
|
72
76
|
})]
|
|
73
77
|
})
|
|
74
78
|
]
|
|
@@ -77,4 +81,4 @@ function y({ open: v, onOpenChange: y, title: b, description: x, cancelLabel: S
|
|
|
77
81
|
});
|
|
78
82
|
}
|
|
79
83
|
//#endregion
|
|
80
|
-
export {
|
|
84
|
+
export { x as AlertDialog, b as alertDialogConfirmRoles };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAWf,OAAO,EAML,WAAW,EASX,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,0EAA0E;AAC1E,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wCAAwC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mFAAmF;IACnF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uFAAuF;IACvF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uFAAuF;IACvF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,sFAAsF;AACtF,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eAAe,EACnC,oBAAoB,EACpB,IAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,sCA2EnB;AAED,iBAAS,UAAU,CAAC,EAClB,IAAI,EACJ,YAAY,EACZ,iBAAwB,EACxB,eAAsB,EACtB,QAAQ,GACT,EAAE,WAAW,+BAmBb;AAED,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC,+BAmBA;AAED,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,WAAW,EACX,WAAW,EACX,SAAgB,EAChB,SAAS,EACT,MAAM,EACN,IAAW,EACX,iBAAiB,EAAE,cAAc,EACjC,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,+BA4DpB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM;;;CAGjB,CAAC"}
|