@thewhatmatters/wmds 0.4.7 → 0.4.9
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 +61 -0
- package/CONSUMING.md +4 -1
- package/bin/wmds-check.mjs +8 -4
- package/dist/components/atoms/TextLink/TextLink.d.ts +9 -3
- package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/atoms/TextLink/TextLink.js +22 -17
- package/dist/components/molecules/IndexList/IndexList.d.ts +6 -3
- package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -1
- package/dist/components/molecules/IndexList/IndexList.js +22 -21
- package/dist/components/molecules/LinkTile/LinkTile.d.ts +45 -0
- package/dist/components/molecules/LinkTile/LinkTile.d.ts.map +1 -0
- package/dist/components/molecules/LinkTile/LinkTile.js +121 -0
- package/dist/components/molecules/LinkTile/linkTileStyles.d.ts +37 -0
- package/dist/components/molecules/LinkTile/linkTileStyles.d.ts.map +1 -0
- package/dist/components/molecules/LinkTile/linkTileStyles.js +8 -0
- package/dist/components/molecules/TileGrid/TileGrid.d.ts +42 -0
- package/dist/components/molecules/TileGrid/TileGrid.d.ts.map +1 -0
- package/dist/components/molecules/TileGrid/TileGrid.js +94 -0
- package/dist/components/molecules/TileGrid/tileGridMath.d.ts +8 -0
- package/dist/components/molecules/TileGrid/tileGridMath.d.ts.map +1 -0
- package/dist/components/molecules/TileGrid/tileGridMath.js +20 -0
- package/dist/components/molecules/TileGrid/tileGridStyles.d.ts +33 -0
- package/dist/components/molecules/TileGrid/tileGridStyles.d.ts.map +1 -0
- package/dist/components/molecules/TileGrid/tileGridStyles.js +16 -0
- package/dist/components/organisms/Dialog/Dialog.d.ts +12 -2
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +46 -44
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts +3 -1
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/OverlayPanelHeader.js +20 -17
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +5 -1
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/dialogStyles.js +13 -11
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts +54 -0
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts.map +1 -0
- package/dist/components/organisms/FilterPanel/FilterPanel.js +137 -0
- package/dist/components/organisms/FilterPanel/filterSelection.d.ts +44 -0
- package/dist/components/organisms/FilterPanel/filterSelection.d.ts.map +1 -0
- package/dist/components/organisms/FilterPanel/filterSelection.js +35 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -67
- package/dist/lib/compositionAudit.d.ts.map +1 -1
- package/dist/lib/typography.d.ts +2 -2
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/lib/typography.js +11 -0
- package/dist/styles.css +1 -1
- package/dist/typography.css +16 -0
- package/docs/components.md +10 -7
- package/docs/exports.json +43 -2
- package/docs/patterns/components-accordion--flush.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--with-avatar.tsx +1 -1
- 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-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--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-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--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-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 +55 -0
- 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 +33 -0
- package/docs/patterns/components-linktile--router-link.tsx +25 -0
- 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--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-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--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-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--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.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 +44 -0
- 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 +182 -0
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +68 -153
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +117 -56
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +270 -0
- package/docs/patterns/index.json +49 -1
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
import { motionTransitionProp as t } from "../../../lib/motion.js";
|
|
4
|
+
import { tileGridBreakpoints as n, tileGridDefaultColumns as r, tileGridEmptyClasses as i, tileGridItemClasses as a, tileGridItemInnerClasses as o, tileGridLayouts as s, tileGridListClasses as c, tileGridRootClasses as l } from "./tileGridStyles.js";
|
|
5
|
+
import { tileGridColumnCount as u, tileGridResolveColumns as d, tileGridRowSpan as f } from "./tileGridMath.js";
|
|
6
|
+
import { Children as p, forwardRef as m, isValidElement as h, useLayoutEffect as g, useMemo as _, useRef as v } from "react";
|
|
7
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
8
|
+
import { AnimatePresence as b, motion as x, useReducedMotion as S } from "motion/react";
|
|
9
|
+
//#region src/components/molecules/TileGrid/TileGrid.tsx
|
|
10
|
+
function C({ layout: t = "masonry", columns: n, empty: r, busy: a = !1, "aria-label": o, "aria-labelledby": s, children: m, className: x }) {
|
|
11
|
+
let S = v(null), C = p.toArray(m), w = C.length > 0, T = C.map((e) => h(e) ? e.key : "").join("|"), E = d(n), D = _(() => ({
|
|
12
|
+
"--tile-grid-cols": E.base,
|
|
13
|
+
"--tile-grid-cols-sm": E.sm,
|
|
14
|
+
"--tile-grid-cols-md": E.md,
|
|
15
|
+
"--tile-grid-cols-lg": E.lg,
|
|
16
|
+
"--tile-grid-cols-xl": E.xl
|
|
17
|
+
}), [
|
|
18
|
+
E.base,
|
|
19
|
+
E.sm,
|
|
20
|
+
E.md,
|
|
21
|
+
E.lg,
|
|
22
|
+
E.xl
|
|
23
|
+
]);
|
|
24
|
+
return g(() => {
|
|
25
|
+
let e = S.current;
|
|
26
|
+
if (e == null) return;
|
|
27
|
+
let n = () => [...e.children].filter((e) => e instanceof HTMLElement);
|
|
28
|
+
if (t !== "masonry" || typeof ResizeObserver > "u") {
|
|
29
|
+
e.removeAttribute("data-packed");
|
|
30
|
+
for (let e of n()) e.style.removeProperty("grid-row-end");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
let r = () => {
|
|
34
|
+
let t = u(getComputedStyle(e).gridTemplateColumns) > 1;
|
|
35
|
+
for (let e of n()) {
|
|
36
|
+
let n = e.firstElementChild;
|
|
37
|
+
if (t && n != null) {
|
|
38
|
+
let t = n instanceof HTMLElement ? n.offsetHeight : n.getBoundingClientRect().height;
|
|
39
|
+
e.style.gridRowEnd = `span ${f(t, 4)}`;
|
|
40
|
+
} else e.style.removeProperty("grid-row-end");
|
|
41
|
+
}
|
|
42
|
+
e.toggleAttribute("data-packed", t);
|
|
43
|
+
};
|
|
44
|
+
r();
|
|
45
|
+
let i = 0, a = new ResizeObserver(() => {
|
|
46
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(r);
|
|
47
|
+
});
|
|
48
|
+
a.observe(e);
|
|
49
|
+
for (let e of n()) e.firstElementChild != null && a.observe(e.firstElementChild);
|
|
50
|
+
return () => {
|
|
51
|
+
cancelAnimationFrame(i), a.disconnect();
|
|
52
|
+
};
|
|
53
|
+
}, [t, T]), /* @__PURE__ */ y("div", {
|
|
54
|
+
className: e(l, x),
|
|
55
|
+
"data-tile-grid": "",
|
|
56
|
+
"data-layout": t,
|
|
57
|
+
children: w ? /* @__PURE__ */ y("ul", {
|
|
58
|
+
ref: S,
|
|
59
|
+
role: "list",
|
|
60
|
+
"aria-label": o,
|
|
61
|
+
"aria-labelledby": s,
|
|
62
|
+
"aria-busy": a || void 0,
|
|
63
|
+
className: c,
|
|
64
|
+
style: D,
|
|
65
|
+
children: /* @__PURE__ */ y(b, {
|
|
66
|
+
initial: !1,
|
|
67
|
+
mode: "popLayout",
|
|
68
|
+
children: m
|
|
69
|
+
})
|
|
70
|
+
}) : r == null ? null : /* @__PURE__ */ y("div", {
|
|
71
|
+
className: i,
|
|
72
|
+
"data-tile-grid-empty": "",
|
|
73
|
+
children: r
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
var w = m(function({ children: n, className: r }, i) {
|
|
78
|
+
let s = S() ?? !1;
|
|
79
|
+
return /* @__PURE__ */ y(x.li, {
|
|
80
|
+
ref: i,
|
|
81
|
+
layout: !s && "position",
|
|
82
|
+
initial: !s && { opacity: 0 },
|
|
83
|
+
animate: { opacity: 1 },
|
|
84
|
+
exit: s ? void 0 : { opacity: 0 },
|
|
85
|
+
transition: t("medium"),
|
|
86
|
+
className: e(a, r),
|
|
87
|
+
children: /* @__PURE__ */ y("div", {
|
|
88
|
+
className: o,
|
|
89
|
+
children: n
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}), T = Object.assign(C, { Item: w });
|
|
93
|
+
//#endregion
|
|
94
|
+
export { T as TileGrid, n as tileGridBreakpoints, r as tileGridDefaultColumns, s as tileGridLayouts };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TileGridBreakpoint, type TileGridColumns } from "./tileGridStyles";
|
|
2
|
+
/** Columns at every breakpoint — each one left out takes the one below it; at least 1, whole. */
|
|
3
|
+
export declare function tileGridResolveColumns(columns?: TileGridColumns): Record<TileGridBreakpoint, number>;
|
|
4
|
+
/** How many row tracks an item of this height takes in a packed grid. */
|
|
5
|
+
export declare function tileGridRowSpan(heightPx: number, unitPx: number): number;
|
|
6
|
+
/** The column count a computed `grid-template-columns` describes ("285px 285px 285px" → 3). */
|
|
7
|
+
export declare function tileGridColumnCount(template: string): number;
|
|
8
|
+
//# sourceMappingURL=tileGridMath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tileGridMath.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TileGrid/tileGridMath.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAE1B,iGAAiG;AACjG,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,eAAwC,GAChD,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAWpC;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG5D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { tileGridBreakpoints as e, tileGridDefaultColumns as t } from "./tileGridStyles.js";
|
|
3
|
+
//#region src/components/molecules/TileGrid/tileGridMath.ts
|
|
4
|
+
function n(n = t) {
|
|
5
|
+
let r = typeof n == "number" ? { base: n } : n, i = 1, a = {};
|
|
6
|
+
for (let t of e) {
|
|
7
|
+
let e = r[t];
|
|
8
|
+
e != null && Number.isFinite(e) && (i = Math.max(1, Math.round(e))), a[t] = i;
|
|
9
|
+
}
|
|
10
|
+
return a;
|
|
11
|
+
}
|
|
12
|
+
function r(e, t) {
|
|
13
|
+
return Math.max(1, Math.ceil(e / t));
|
|
14
|
+
}
|
|
15
|
+
function i(e) {
|
|
16
|
+
let t = e.trim().split(/\s+/).filter((e) => e !== "" && e !== "none");
|
|
17
|
+
return Math.max(1, t.length);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as tileGridColumnCount, n as tileGridResolveColumns, r as tileGridRowSpan };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const tileGridLayouts: readonly ["masonry", "uniform"];
|
|
2
|
+
/**
|
|
3
|
+
* `masonry` (default) — tiles keep their heights and pack upward. `uniform` — rows of equal
|
|
4
|
+
* height; pair it with a fixed `ratio` on the tiles.
|
|
5
|
+
*/
|
|
6
|
+
export type TileGridLayout = (typeof tileGridLayouts)[number];
|
|
7
|
+
export declare const tileGridBreakpoints: readonly ["base", "sm", "md", "lg", "xl"];
|
|
8
|
+
export type TileGridBreakpoint = (typeof tileGridBreakpoints)[number];
|
|
9
|
+
/** Columns per breakpoint. A breakpoint left out keeps the one below it. */
|
|
10
|
+
export type TileGridColumns = number | Partial<Record<TileGridBreakpoint, number>>;
|
|
11
|
+
/** One column on phones, two from `sm`, three from `lg` — for a 9-column main area beside a rail. */
|
|
12
|
+
export declare const tileGridDefaultColumns: {
|
|
13
|
+
readonly base: 1;
|
|
14
|
+
readonly sm: 2;
|
|
15
|
+
readonly lg: 3;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A packed grid's row track, in px (`--spacing`). A tile spans as many as its height needs, rounded
|
|
19
|
+
* up, so the space under a tile is the row gap plus less than this much (32px to just under 36px).
|
|
20
|
+
*/
|
|
21
|
+
export declare const tileGridRowUnitPx = 4;
|
|
22
|
+
export declare const tileGridRootClasses = "w-full min-w-0";
|
|
23
|
+
/**
|
|
24
|
+
* Columns on the page grid's gutter. The row gap is padding under each item, not a grid gap: a
|
|
25
|
+
* packed grid has 4px row tracks and no gap between them. The margin takes the last row's back.
|
|
26
|
+
*/
|
|
27
|
+
export declare const tileGridListClasses: string;
|
|
28
|
+
export declare const tileGridItemClasses = "min-w-0";
|
|
29
|
+
/** What is measured: the tile and the row gap under it. */
|
|
30
|
+
export declare const tileGridItemInnerClasses = "flex min-w-0 flex-col pb-[var(--tile-grid-row-gap)]";
|
|
31
|
+
/** Empty state — in the tiles' place. */
|
|
32
|
+
export declare const tileGridEmptyClasses = "py-8";
|
|
33
|
+
//# sourceMappingURL=tileGridStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tileGridStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TileGrid/tileGridStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,iCAAkC,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB,2CAA4C,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnF,qGAAqG;AACrG,eAAO,MAAM,sBAAsB;;;;CAA+D,CAAC;AAEnG;;;GAGG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAQ/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,2DAA2D;AAC3D,eAAO,MAAM,wBAAwB,wDAAwD,CAAC;AAE9F,yCAAyC;AACzC,eAAO,MAAM,oBAAoB,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
//#region src/components/molecules/TileGrid/tileGridStyles.ts
|
|
4
|
+
var t = ["masonry", "uniform"], n = [
|
|
5
|
+
"base",
|
|
6
|
+
"sm",
|
|
7
|
+
"md",
|
|
8
|
+
"lg",
|
|
9
|
+
"xl"
|
|
10
|
+
], r = {
|
|
11
|
+
base: 1,
|
|
12
|
+
sm: 2,
|
|
13
|
+
lg: 3
|
|
14
|
+
}, i = "w-full min-w-0", a = e("relative m-0 -mb-[var(--tile-grid-row-gap)] grid list-none items-start p-0 [--tile-grid-row-gap:2rem]", "gap-x-[var(--grid-column-gap,1.5rem)] gap-y-0", "grid-cols-[repeat(var(--tile-grid-cols),minmax(0,1fr))] sm:grid-cols-[repeat(var(--tile-grid-cols-sm),minmax(0,1fr))]", "md:grid-cols-[repeat(var(--tile-grid-cols-md),minmax(0,1fr))] lg:grid-cols-[repeat(var(--tile-grid-cols-lg),minmax(0,1fr))]", "xl:grid-cols-[repeat(var(--tile-grid-cols-xl),minmax(0,1fr))]", "data-[packed]:auto-rows-[4px]"), o = "min-w-0", s = "flex min-w-0 flex-col pb-[var(--tile-grid-row-gap)]", c = "py-8";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as tileGridBreakpoints, r as tileGridDefaultColumns, c as tileGridEmptyClasses, o as tileGridItemClasses, s as tileGridItemInnerClasses, t as tileGridLayouts, a as tileGridListClasses, i as tileGridRootClasses };
|
|
@@ -20,11 +20,19 @@ export interface DialogContentProps {
|
|
|
20
20
|
description?: ReactNode;
|
|
21
21
|
/** Leading header slot — icon, **Badge**, **Status** (**Card.Header** `start`). */
|
|
22
22
|
headerStart?: ReactNode;
|
|
23
|
+
/** Actions before the close — **IconButton** `size="sm"`, for example previous and next. */
|
|
24
|
+
headerEnd?: ReactNode;
|
|
23
25
|
/** Header dismiss — default `true` for generic dialogs. */
|
|
24
26
|
showClose?: boolean;
|
|
25
27
|
/** Footer action cluster — compose **Button** roles. */
|
|
26
28
|
footer?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* `sm` / `md` (default) / `lg` — a centered panel of that width. `full` — the window less a
|
|
31
|
+
* margin (up to 90rem × 60rem), and the whole screen on phones: media viewers and detail views.
|
|
32
|
+
*/
|
|
27
33
|
size?: DialogSize;
|
|
34
|
+
/** Names the dialog when there is no `title` — the id of a heading inside the body. */
|
|
35
|
+
"aria-labelledby"?: string;
|
|
28
36
|
className?: DialogLayoutClassName;
|
|
29
37
|
children?: ReactNode;
|
|
30
38
|
}
|
|
@@ -33,16 +41,18 @@ export interface DialogPortalProps {
|
|
|
33
41
|
"aria-labelledby"?: string;
|
|
34
42
|
"aria-describedby"?: string;
|
|
35
43
|
initialFocusSelector?: string;
|
|
44
|
+
/** Fill the window (the whole screen on phones) — **Dialog.Content** `size="full"`. */
|
|
45
|
+
fill?: boolean;
|
|
36
46
|
children: ReactNode;
|
|
37
47
|
}
|
|
38
48
|
/** Portal + scrim + focus trap — shared by **Dialog.Content** and **AlertDialog**. */
|
|
39
|
-
export declare function DialogPortal({ role, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, initialFocusSelector, children, }: DialogPortalProps): import("react").ReactPortal | null;
|
|
49
|
+
export declare function DialogPortal({ role, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, initialFocusSelector, fill, children, }: DialogPortalProps): import("react").ReactPortal | null;
|
|
40
50
|
declare function DialogRoot({ open, onOpenChange, dismissOnBackdrop, dismissOnEscape, children, }: DialogProps): import("react").JSX.Element;
|
|
41
51
|
declare function DialogTrigger({ children, className, }: {
|
|
42
52
|
children: ReactNode;
|
|
43
53
|
className?: DialogLayoutClassName;
|
|
44
54
|
}): import("react").JSX.Element;
|
|
45
|
-
declare function DialogContent({ title, description, headerStart, showClose, footer, size, className, children, }: DialogContentProps): import("react").JSX.Element;
|
|
55
|
+
declare function DialogContent({ title, description, headerStart, showClose, headerEnd, footer, size, "aria-labelledby": ariaLabelledBy, className, children, }: DialogContentProps): import("react").JSX.Element;
|
|
46
56
|
/**
|
|
47
57
|
* Modal overlay — portal scrim, focus trap, scroll lock; composes **Card** shell.
|
|
48
58
|
* Composes **Card** shell + portal scrim; use **AlertDialog** for blocking confirms.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAef,OAAO,
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAef,OAAO,EAML,WAAW,EAMX,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,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AAwB,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,+BAwDpB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM;;;CAGjB,CAAC"}
|
|
@@ -11,58 +11,58 @@ import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
|
11
11
|
import { AnimatePresence as w, motion as T } from "motion/react";
|
|
12
12
|
import { createPortal as E } from "react-dom";
|
|
13
13
|
//#region src/components/organisms/Dialog/Dialog.tsx
|
|
14
|
-
function D({ role:
|
|
15
|
-
let { open:
|
|
16
|
-
|
|
17
|
-
}, [
|
|
14
|
+
function D({ role: n, "aria-labelledby": a, "aria-describedby": o, initialFocusSelector: s, fill: c = !1, children: l }) {
|
|
15
|
+
let { open: u, onOpenChange: d, dismissOnBackdrop: f, dismissOnEscape: g, triggerRef: v } = _("DialogPortal"), D = x(null), O = x(null), k = y(() => {
|
|
16
|
+
d(!1);
|
|
17
|
+
}, [d]);
|
|
18
18
|
b(() => {
|
|
19
|
-
if (!
|
|
20
|
-
|
|
21
|
-
let e = m(), t =
|
|
19
|
+
if (!u) return;
|
|
20
|
+
O.current = v.current ?? document.activeElement;
|
|
21
|
+
let e = m(), t = D.current, n = () => {};
|
|
22
22
|
return t != null && (n = h(t), window.requestAnimationFrame(() => {
|
|
23
|
-
p(t,
|
|
23
|
+
p(t, s);
|
|
24
24
|
})), () => {
|
|
25
|
-
n(), e(),
|
|
25
|
+
n(), e(), O.current?.focus?.();
|
|
26
26
|
};
|
|
27
27
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
s,
|
|
29
|
+
u,
|
|
30
|
+
v
|
|
31
31
|
]), b(() => {
|
|
32
|
-
if (!
|
|
32
|
+
if (!u || !g) return;
|
|
33
33
|
function e(e) {
|
|
34
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
34
|
+
e.key === "Escape" && (e.preventDefault(), k());
|
|
35
35
|
}
|
|
36
36
|
return document.addEventListener("keydown", e), () => {
|
|
37
37
|
document.removeEventListener("keydown", e);
|
|
38
38
|
};
|
|
39
39
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
k,
|
|
41
|
+
g,
|
|
42
|
+
u
|
|
43
43
|
]);
|
|
44
|
-
function
|
|
45
|
-
if (!
|
|
44
|
+
function A(e) {
|
|
45
|
+
if (!f) return;
|
|
46
46
|
let t = e.target;
|
|
47
|
-
|
|
47
|
+
D.current?.contains(t) || k();
|
|
48
48
|
}
|
|
49
|
-
return typeof document > "u" ? null : E(/* @__PURE__ */ S(w, { children:
|
|
50
|
-
className: i,
|
|
49
|
+
return typeof document > "u" ? null : E(/* @__PURE__ */ S(w, { children: u ? /* @__PURE__ */ C(T.div, {
|
|
50
|
+
className: e(i, c && "max-md:p-0 md:p-6"),
|
|
51
51
|
initial: { opacity: 0 },
|
|
52
52
|
animate: { opacity: 1 },
|
|
53
53
|
exit: { opacity: 0 },
|
|
54
54
|
transition: t("medium"),
|
|
55
|
-
onMouseDown:
|
|
55
|
+
onMouseDown: A,
|
|
56
56
|
children: [/* @__PURE__ */ S("div", {
|
|
57
57
|
className: r,
|
|
58
58
|
"aria-hidden": "true"
|
|
59
59
|
}), /* @__PURE__ */ S(T.div, {
|
|
60
|
-
ref:
|
|
61
|
-
className: "relative z-[1] flex w-full justify-center",
|
|
62
|
-
role:
|
|
60
|
+
ref: D,
|
|
61
|
+
className: e("relative z-[1] flex w-full justify-center", c && "h-full items-center"),
|
|
62
|
+
role: n,
|
|
63
63
|
"aria-modal": "true",
|
|
64
|
-
"aria-labelledby":
|
|
65
|
-
"aria-describedby":
|
|
64
|
+
"aria-labelledby": a,
|
|
65
|
+
"aria-describedby": o,
|
|
66
66
|
initial: {
|
|
67
67
|
opacity: 0,
|
|
68
68
|
scale: .96,
|
|
@@ -82,7 +82,7 @@ function D({ role: e, "aria-labelledby": n, "aria-describedby": a, initialFocusS
|
|
|
82
82
|
onMouseDown: (e) => {
|
|
83
83
|
e.stopPropagation();
|
|
84
84
|
},
|
|
85
|
-
children:
|
|
85
|
+
children: l
|
|
86
86
|
})]
|
|
87
87
|
}) : null }), document.body);
|
|
88
88
|
}
|
|
@@ -113,38 +113,40 @@ function k({ children: e, className: t }) {
|
|
|
113
113
|
children: e
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
function A({ title: t, description: r, headerStart: i, showClose: s = !0,
|
|
117
|
-
let { titleId:
|
|
116
|
+
function A({ title: t, description: r, headerStart: i, showClose: s = !0, headerEnd: p, footer: m, size: h = "md", "aria-labelledby": g, className: v, children: y }) {
|
|
117
|
+
let { titleId: b, descriptionId: x, onOpenChange: w } = _("Dialog.Content"), T = t != null, E = r != null, O = y != null || !T && E, k = m != null, A = O || k;
|
|
118
118
|
return /* @__PURE__ */ S(D, {
|
|
119
119
|
role: "dialog",
|
|
120
|
-
"aria-labelledby":
|
|
121
|
-
"aria-describedby":
|
|
120
|
+
"aria-labelledby": T ? b : g,
|
|
121
|
+
"aria-describedby": E ? x : void 0,
|
|
122
|
+
fill: h === "full",
|
|
122
123
|
children: /* @__PURE__ */ C(n, {
|
|
123
124
|
padding: "none",
|
|
124
|
-
bodyTerminal:
|
|
125
|
-
className: e(o[
|
|
125
|
+
bodyTerminal: m == null,
|
|
126
|
+
className: e(o[h], c, h === "full" ? void 0 : d, a, v),
|
|
126
127
|
children: [
|
|
127
128
|
/* @__PURE__ */ S(f, {
|
|
128
|
-
titleId:
|
|
129
|
-
descriptionId:
|
|
129
|
+
titleId: b,
|
|
130
|
+
descriptionId: x,
|
|
130
131
|
title: t,
|
|
131
132
|
description: r,
|
|
132
133
|
headerStart: i,
|
|
134
|
+
headerEnd: p,
|
|
133
135
|
showClose: s,
|
|
134
136
|
closeLabel: "Close dialog",
|
|
135
|
-
onClose: () =>
|
|
137
|
+
onClose: () => w(!1)
|
|
136
138
|
}),
|
|
137
|
-
|
|
139
|
+
A ? /* @__PURE__ */ C("div", {
|
|
138
140
|
className: l,
|
|
139
|
-
children: [!
|
|
140
|
-
id:
|
|
141
|
+
children: [!T && E ? /* @__PURE__ */ S("p", {
|
|
142
|
+
id: x,
|
|
141
143
|
className: "text-muted",
|
|
142
144
|
children: r
|
|
143
|
-
}) : null,
|
|
145
|
+
}) : null, y]
|
|
144
146
|
}) : null,
|
|
145
|
-
|
|
147
|
+
k ? /* @__PURE__ */ S("footer", {
|
|
146
148
|
className: u,
|
|
147
|
-
children:
|
|
149
|
+
children: m
|
|
148
150
|
}) : null
|
|
149
151
|
]
|
|
150
152
|
})
|
|
@@ -10,6 +10,8 @@ export interface OverlayPanelHeaderProps {
|
|
|
10
10
|
descriptionClassName?: string;
|
|
11
11
|
/** Leading slot — Lucide glyph, **Badge**, **Status**; same role as **Card.Header** `start`. */
|
|
12
12
|
headerStart?: ReactNode;
|
|
13
|
+
/** Actions before the close — **IconButton** `size="sm"`, for example previous and next. */
|
|
14
|
+
headerEnd?: ReactNode;
|
|
13
15
|
showClose?: boolean;
|
|
14
16
|
closeLabel?: string;
|
|
15
17
|
onClose?: () => void;
|
|
@@ -17,5 +19,5 @@ export interface OverlayPanelHeaderProps {
|
|
|
17
19
|
delineated?: boolean;
|
|
18
20
|
className?: string;
|
|
19
21
|
}
|
|
20
|
-
export declare function OverlayPanelHeader({ titleId, descriptionId, title, description, titleClassName, descriptionClassName, headerStart, showClose, closeLabel, onClose, delineated, className, }: OverlayPanelHeaderProps): import("react").JSX.Element | null;
|
|
22
|
+
export declare function OverlayPanelHeader({ titleId, descriptionId, title, description, titleClassName, descriptionClassName, headerStart, headerEnd, showClose, closeLabel, onClose, delineated, className, }: OverlayPanelHeaderProps): import("react").JSX.Element | null;
|
|
21
23
|
//# sourceMappingURL=OverlayPanelHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayPanelHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/OverlayPanelHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBvC,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gGAAgG;IAChG,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,aAAa,EACb,KAAK,EACL,WAAW,EACX,cAAiC,EACjC,oBAA0C,EAC1C,WAAW,EACX,SAAgB,EAChB,UAAoB,EACpB,OAAO,EACP,UAAkB,EAClB,SAAS,GACV,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"OverlayPanelHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/OverlayPanelHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBvC,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gGAAgG;IAChG,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,aAAa,EACb,KAAK,EACL,WAAW,EACX,cAAiC,EACjC,oBAA0C,EAC1C,WAAW,EACX,SAAS,EACT,SAAgB,EAChB,UAAoB,EACpB,OAAO,EACP,UAAkB,EAClB,SAAS,GACV,EAAE,uBAAuB,sCAiEzB"}
|
|
@@ -7,44 +7,47 @@ import { overlayPanelHeaderClasses as a, overlayPanelHeaderDelineatedInnerClasse
|
|
|
7
7
|
import { X as u } from "lucide-react";
|
|
8
8
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/organisms/Dialog/OverlayPanelHeader.tsx
|
|
10
|
-
function p({ titleId: p, descriptionId: m, title: h, description: g, titleClassName: _ = r, descriptionClassName: v = n, headerStart: y,
|
|
11
|
-
let
|
|
12
|
-
if (!
|
|
13
|
-
let
|
|
14
|
-
className: e(a,
|
|
15
|
-
start: y != null ||
|
|
10
|
+
function p({ titleId: p, descriptionId: m, title: h, description: g, titleClassName: _ = r, descriptionClassName: v = n, headerStart: y, headerEnd: b, showClose: x = !0, closeLabel: S = "Close", onClose: C, delineated: w = !1, className: T }) {
|
|
11
|
+
let E = h != null, D = g != null;
|
|
12
|
+
if (!E && !x && y == null && b == null) return null;
|
|
13
|
+
let O = /* @__PURE__ */ d(i.Header, {
|
|
14
|
+
className: e(a, w ? o : void 0, T),
|
|
15
|
+
start: y != null || E ? /* @__PURE__ */ f("div", {
|
|
16
16
|
className: c,
|
|
17
17
|
children: [y == null ? null : /* @__PURE__ */ d("div", {
|
|
18
18
|
className: l,
|
|
19
19
|
children: y
|
|
20
|
-
}),
|
|
20
|
+
}), E ? /* @__PURE__ */ f("div", {
|
|
21
21
|
className: "flex min-w-0 flex-col gap-0",
|
|
22
22
|
children: [/* @__PURE__ */ d("h2", {
|
|
23
23
|
id: p,
|
|
24
24
|
className: _,
|
|
25
25
|
children: h
|
|
26
|
-
}),
|
|
26
|
+
}), D ? /* @__PURE__ */ d("p", {
|
|
27
27
|
id: m,
|
|
28
28
|
className: v,
|
|
29
29
|
children: g
|
|
30
30
|
}) : null]
|
|
31
31
|
}) : null]
|
|
32
32
|
}) : null,
|
|
33
|
-
end: b ? /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
end: x || b != null ? /* @__PURE__ */ f("div", {
|
|
34
|
+
className: "flex items-center gap-1",
|
|
35
|
+
children: [b, x ? /* @__PURE__ */ d(t, {
|
|
36
|
+
size: "sm",
|
|
37
|
+
role: "ghost",
|
|
38
|
+
icon: /* @__PURE__ */ d(u, { strokeWidth: 2 }),
|
|
39
|
+
"aria-label": S,
|
|
40
|
+
onClick: () => C?.()
|
|
41
|
+
}) : null]
|
|
39
42
|
}) : null
|
|
40
43
|
});
|
|
41
|
-
return
|
|
44
|
+
return w ? /* @__PURE__ */ f("div", {
|
|
42
45
|
className: e(a, "w-full"),
|
|
43
|
-
children: [
|
|
46
|
+
children: [O, /* @__PURE__ */ d("hr", {
|
|
44
47
|
className: s,
|
|
45
48
|
"aria-hidden": "true"
|
|
46
49
|
})]
|
|
47
|
-
}) :
|
|
50
|
+
}) : O;
|
|
48
51
|
}
|
|
49
52
|
//#endregion
|
|
50
53
|
export { p as OverlayPanelHeader };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const dialogSizes: readonly ["sm", "md", "lg"];
|
|
1
|
+
export declare const dialogSizes: readonly ["sm", "md", "lg", "full"];
|
|
2
2
|
export type DialogSize = (typeof dialogSizes)[number];
|
|
3
3
|
/** Full-viewport stack — backdrop + centered panel. */
|
|
4
4
|
export declare const dialogOverlayRootClasses = "fixed inset-0 z-[100] flex items-center justify-center p-4";
|
|
@@ -6,6 +6,10 @@ export declare const dialogOverlayRootClasses = "fixed inset-0 z-[100] flex item
|
|
|
6
6
|
export declare const dialogBackdropClasses: string;
|
|
7
7
|
/** Centered panel width — layout-only on the Card shell. */
|
|
8
8
|
export declare const dialogPanelSizeClasses: Record<DialogSize, string>;
|
|
9
|
+
/** `size="full"` — no margin around the panel on phones, a wider one from tablet up. */
|
|
10
|
+
export declare const dialogOverlayRootFullClasses = "max-md:p-0 md:p-6";
|
|
11
|
+
/** `size="full"` — the panel's box fills the overlay, so the Card inside can take its height. */
|
|
12
|
+
export declare const dialogPanelBoxFullClasses = "h-full items-center";
|
|
9
13
|
/** Dialog body copy — typography only; horizontal inset comes from section stack / header. */
|
|
10
14
|
export declare const dialogBodyCopyClasses: string;
|
|
11
15
|
/** Muted copy in the dialog body slot — shared by **Dialog** and **AlertDialog**. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/dialogStyles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"dialogStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Dialog/dialogStyles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,qCAAsC,CA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C,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,qCAAqC,0CACT,CAAC;AAE1C,qDAAqD;AACrD,eAAO,MAAM,kCAAkC,wGACwD,CAAC;AAExG,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,QAA+C,CAAC;AAErF,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,gCAAgC,CAAC;AAEtE,eAAO,MAAM,+BAA+B,QAAyC,CAAC;AAEtF,eAAO,MAAM,6BAA6B,QAIzC,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAsC,CAAC;AAE7E,2GAA2G;AAC3G,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAE/C,kFAAkF;AAClF,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,+BAA+B,QAAwC,CAAC;AAErF,2DAA2D;AAC3D,eAAO,MAAM,wCAAwC,oBAAoB,CAAC;AAE1E,+DAA+D;AAC/D,eAAO,MAAM,wCAAwC,QAGpD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,8BAA8B,QAG1C,CAAC"}
|
|
@@ -7,18 +7,20 @@ import { cardLayoutSectionInsetXClasses as r, cardTitleClasses as i } from "../.
|
|
|
7
7
|
var a = [
|
|
8
8
|
"sm",
|
|
9
9
|
"md",
|
|
10
|
-
"lg"
|
|
10
|
+
"lg",
|
|
11
|
+
"full"
|
|
11
12
|
], o = "fixed inset-0 z-[100] flex items-center justify-center p-4", s = e("absolute inset-0 bg-overlay", "transition-opacity", n("medium")), c = {
|
|
12
13
|
sm: "w-full max-w-sm",
|
|
13
14
|
md: "w-full max-w-lg",
|
|
14
|
-
lg: "w-full max-w-2xl"
|
|
15
|
-
|
|
16
|
-
e(
|
|
17
|
-
|
|
18
|
-
e(b, x);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
e(N, "pb-4");
|
|
15
|
+
lg: "w-full max-w-2xl",
|
|
16
|
+
full: "h-full w-full max-w-[90rem] max-md:rounded-none md:max-h-[60rem]"
|
|
17
|
+
}, l = "max-md:p-0 md:p-6", u = "h-full items-center", d = e(t("body"), "text-fg"), f = e(d, "text-muted"), p = i;
|
|
18
|
+
e(d, "px-4");
|
|
19
|
+
var m = e(r, "flex w-full items-center justify-end gap-2"), h = "flex shrink-0 items-center justify-end gap-2", g = "flex min-h-0 flex-col overflow-hidden", _ = "max-h-[min(85vh,100%)]", v = "shrink-0", y = "m-0 w-full shrink-0 border-0 border-border p-0", b = e(y, "border-b"), x = e(y, "border-t"), S = e(v, "border-b border-border"), C = "pb-3";
|
|
20
|
+
e(S, C);
|
|
21
|
+
var w = "flex min-w-0 flex-1 items-start gap-3", T = "flex shrink-0 items-center pt-0.5 text-muted [&>svg]:size-5 [&>svg]:shrink-0 [&>svg]:stroke-current";
|
|
22
|
+
e(d, "pt-1 text-muted");
|
|
23
|
+
var E = "flex min-h-0 flex-col gap-3", D = e(E, "h-full"), O = e(d, r, "min-h-0 flex-1 overflow-y-auto overscroll-contain"), k = e(m, "shrink-0"), A = "gap-4", j = e(O, "py-1"), M = e(k, "pt-2"), N = "shrink-0 w-full", P = e(m, "pt-3 pb-4"), F = e(N, "border-t border-border pt-3");
|
|
24
|
+
e(F, "pb-4");
|
|
23
25
|
//#endregion
|
|
24
|
-
export {
|
|
26
|
+
export { p as alertDialogTitleClasses, s as dialogBackdropClasses, d as dialogBodyCopyClasses, f as dialogBodyMutedClasses, h as dialogFooterActionsClasses, m as dialogFooterClasses, o as dialogOverlayRootClasses, l as dialogOverlayRootFullClasses, u as dialogPanelBoxFullClasses, A as dialogPanelShellClasses, c as dialogPanelSizeClasses, a as dialogSizes, O as overlayPanelBodyScrollClasses, g as overlayPanelChromeClasses, j as overlayPanelDialogBodyScrollClasses, M as overlayPanelDialogFooterClasses, k as overlayPanelFooterClasses, F as overlayPanelFooterDelineatedClasses, P as overlayPanelFooterDelineatedInnerClasses, N as overlayPanelFooterDelineatedShellClasses, x as overlayPanelFooterHairlineClasses, y as overlayPanelHairlineClasses, v as overlayPanelHeaderClasses, C as overlayPanelHeaderDelineatedInnerClasses, S as overlayPanelHeaderDelineatedShellClasses, b as overlayPanelHeaderHairlineClasses, w as overlayPanelHeaderStartClusterClasses, T as overlayPanelHeaderStartSlotClasses, _ as overlayPanelMaxHeightClasses, D as overlayPanelSectionStackClasses, E as overlayPanelStackClasses };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type FilterPanelGroup, type FilterSelection } from "./filterSelection";
|
|
3
|
+
export { countFilterOptions, filterFacetValues, filterSelectionCount, matchesFilterSelection, useFilterSelection, type FilterFacets, type FilterPanelGroup, type FilterPanelOption, type FilterSelection, type UseFilterSelectionOptions, } from "./filterSelection";
|
|
4
|
+
/** Layout-only — grid placement and which breakpoints show the part. */
|
|
5
|
+
export type FilterPanelLayoutClassName = string;
|
|
6
|
+
export interface FilterPanelLabels {
|
|
7
|
+
/** The panel's caption, the Sheet's title, and the trigger's label. Default: "Filters". */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Default: "Clear all". */
|
|
10
|
+
clear: string;
|
|
11
|
+
/** The Sheet's closing button, from `resultsLabel`. Default: "Show 3 posts". */
|
|
12
|
+
show: (resultsLabel: string) => string;
|
|
13
|
+
}
|
|
14
|
+
export interface FilterPanelProps {
|
|
15
|
+
/** The filter groups, each with its options. `countFilterOptions` adds the counts. */
|
|
16
|
+
groups: FilterPanelGroup[];
|
|
17
|
+
/** The options on in each group. Hold it with `useFilterSelection`. */
|
|
18
|
+
selection: FilterSelection;
|
|
19
|
+
/** Every change: an option on or off, or Clear all (an empty selection). */
|
|
20
|
+
onSelectionChange: (selection: FilterSelection) => void;
|
|
21
|
+
/** What is showing, for the Sheet's closing button — "3 posts" reads "Show 3 posts". */
|
|
22
|
+
resultsLabel: string;
|
|
23
|
+
labels?: Partial<FilterPanelLabels>;
|
|
24
|
+
/** The page: **FilterPanel.Trigger**, **FilterPanel.Rail**, and **FilterPanel.Sheet** go anywhere inside. */
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export interface FilterPanelRailProps {
|
|
28
|
+
/** Placement, and where it shows — for example `"hidden md:col-span-3 md:block"`. */
|
|
29
|
+
className?: FilterPanelLayoutClassName;
|
|
30
|
+
}
|
|
31
|
+
export interface FilterPanelTriggerProps {
|
|
32
|
+
/** Replaces the leading icon. */
|
|
33
|
+
icon?: ReactElement;
|
|
34
|
+
/** Placement, and where it shows — for example `"md:hidden"`. */
|
|
35
|
+
className?: FilterPanelLayoutClassName;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Checkbox filters for an index page — a side rail from tablet up and the same groups in a bottom
|
|
39
|
+
* **Sheet** on phones, over one selection. It renders no element of its own: place its parts on
|
|
40
|
+
* the page grid.
|
|
41
|
+
*/
|
|
42
|
+
declare function FilterPanelRoot({ groups, selection, onSelectionChange, resultsLabel, labels, children }: FilterPanelProps): import("react").JSX.Element;
|
|
43
|
+
/** The side rail: the caption with Clear all at its end, over the groups. */
|
|
44
|
+
declare function FilterPanelRail({ className }: FilterPanelRailProps): import("react").JSX.Element;
|
|
45
|
+
/** Opens the Sheet. Its count is how many options are on. */
|
|
46
|
+
declare function FilterPanelTrigger({ icon, className }: FilterPanelTriggerProps): import("react").JSX.Element;
|
|
47
|
+
/** The same groups in a bottom Sheet, with Clear all and a button that closes it on the results. */
|
|
48
|
+
declare function FilterPanelSheet(): import("react").JSX.Element;
|
|
49
|
+
export declare const FilterPanel: typeof FilterPanelRoot & {
|
|
50
|
+
Rail: typeof FilterPanelRail;
|
|
51
|
+
Trigger: typeof FilterPanelTrigger;
|
|
52
|
+
Sheet: typeof FilterPanelSheet;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=FilterPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Filter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