@stackone/malachite 2.123.1 → 2.124.0

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.
Files changed (32) hide show
  1. package/COMPONENTS.md +4 -3
  2. package/dist/components/ActionMenu.js +4 -3
  3. package/dist/components/ActionMenu.js.map +1 -1
  4. package/dist/components/Card.js +88 -78
  5. package/dist/components/Card.js.map +1 -1
  6. package/dist/components/Flex.js +10 -8
  7. package/dist/components/Flex.js.map +1 -1
  8. package/dist/components/FrameHeader.js +26 -19
  9. package/dist/components/FrameHeader.js.map +1 -1
  10. package/dist/components/PageLayout/index.js +8 -7
  11. package/dist/components/PageLayout/index.js.map +1 -1
  12. package/dist/components/PageLayout/pageColumns.js +23 -0
  13. package/dist/components/PageLayout/pageColumns.js.map +1 -0
  14. package/dist/components/Table/Table.js +491 -472
  15. package/dist/components/Table/Table.js.map +1 -1
  16. package/dist/components/ToastProvider.js +32 -42
  17. package/dist/components/ToastProvider.js.map +1 -1
  18. package/dist/components/Typography/PathText.js +48 -55
  19. package/dist/components/Typography/PathText.js.map +1 -1
  20. package/dist/components/VisuallyHidden.js +8 -0
  21. package/dist/components/VisuallyHidden.js.map +1 -0
  22. package/dist/components/actionMenuStyles.js +33 -42
  23. package/dist/components/actionMenuStyles.js.map +1 -1
  24. package/dist/components/flexTypes.js +1 -1
  25. package/dist/components/flexTypes.js.map +1 -1
  26. package/dist/components/visuallyHiddenStyle.js +16 -0
  27. package/dist/components/visuallyHiddenStyle.js.map +1 -0
  28. package/dist/index.d.ts +32 -0
  29. package/dist/index.js +394 -392
  30. package/dist/index.js.map +1 -1
  31. package/dist/tailwind.css.js +1 -1
  32. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.js","sources":["../../src/components/Flex.tsx"],"sourcesContent":["import React from 'react';\nimport { FlexAlign, FlexDirection, FlexGapSize, FlexJustify } from './flexTypes';\n\ninterface FlexProps {\n justify?: FlexJustify;\n align?: FlexAlign;\n gapSize?: FlexGapSize;\n direction?: FlexDirection;\n fullHeight?: boolean;\n grow?: boolean;\n shrink?: boolean;\n wrap?: boolean;\n width?: string;\n id?: string;\n /** `span` for content inside a button, such as a clickable `Surface.Row`. */\n as?: 'div' | 'span';\n children?: React.ReactNode;\n className?: string;\n}\n\nconst getGapSize = (size: FlexGapSize): number => {\n switch (size) {\n case FlexGapSize.XSmall:\n return 8;\n case FlexGapSize.Small:\n return 12;\n case FlexGapSize.Medium:\n return 24;\n case FlexGapSize.Large:\n return 36;\n }\n};\n\nconst Flex: React.FC<FlexProps> = ({\n justify = FlexJustify.Center,\n align = FlexAlign.Center,\n gapSize,\n direction = FlexDirection.Horizontal,\n fullHeight = false,\n grow = false,\n shrink = false,\n wrap = false,\n width,\n as = 'div',\n id,\n children,\n className = '',\n}) => {\n const gapSizeValue = gapSize ? getGapSize(gapSize) : undefined;\n\n // Convert direction to CSS flex-direction\n const flexDirection = direction === FlexDirection.Vertical ? 'column' : 'row';\n\n const baseStyle: React.CSSProperties = {\n display: 'flex',\n flexDirection,\n flexWrap: wrap ? 'wrap' : undefined,\n justifyContent: justify,\n alignItems: align,\n gap: gapSizeValue ? `${gapSizeValue}px` : undefined,\n height: fullHeight ? '100%' : undefined,\n flex: grow ? 1 : undefined,\n minWidth: shrink ? 0 : undefined,\n width: width || undefined,\n };\n\n const Tag = as;\n return (\n <Tag id={id} className={className} style={baseStyle}>\n {children}\n </Tag>\n );\n};\n\nexport default Flex;\n"],"names":["getGapSize","size","FlexGapSize","Flex","justify","FlexJustify","align","FlexAlign","gapSize","direction","FlexDirection","fullHeight","grow","shrink","wrap","width","as","id","children","className","gapSizeValue","baseStyle"],"mappings":";;AAoBA,MAAMA,IAAa,CAACC,MAA8B;AAC9C,UAAQA,GAAA;AAAA,IACJ,KAAKC,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,EAAA;AAEnB,GAEMC,IAA4B,CAAC;AAAA,EAC/B,SAAAC,IAAUC,EAAY;AAAA,EACtB,OAAAC,IAAQC,EAAU;AAAA,EAClB,SAAAC;AAAA,EACA,WAAAC,IAAYC,EAAc;AAAA,EAC1B,YAAAC,IAAa;AAAA,EACb,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AAChB,MAAM;AACF,QAAMC,IAAeZ,IAAUR,EAAWQ,CAAO,IAAI,QAK/Ca,IAAiC;AAAA,IACnC,SAAS;AAAA,IACT,eAJkBZ,MAAcC,EAAc,WAAW,WAAW;AAAA,IAKpE,UAAUI,IAAO,SAAS;AAAA,IAC1B,gBAAgBV;AAAA,IAChB,YAAYE;AAAA,IACZ,KAAKc,IAAe,GAAGA,CAAY,OAAO;AAAA,IAC1C,QAAQT,IAAa,SAAS;AAAA,IAC9B,MAAMC,IAAO,IAAI;AAAA,IACjB,UAAUC,IAAS,IAAI;AAAA,IACvB,OAAOE,KAAS;AAAA,EAAA;AAIpB,2BADYC,GAEP,EAAI,IAAAC,GAAQ,WAAAE,GAAsB,OAAOE,GACrC,UAAAH,GACL;AAER;"}
1
+ {"version":3,"file":"Flex.js","sources":["../../src/components/Flex.tsx"],"sourcesContent":["import React from 'react';\nimport { FlexAlign, FlexDirection, FlexGapSize, FlexJustify } from './flexTypes';\n\ninterface FlexProps {\n justify?: FlexJustify;\n align?: FlexAlign;\n gapSize?: FlexGapSize;\n direction?: FlexDirection;\n fullHeight?: boolean;\n grow?: boolean;\n shrink?: boolean;\n wrap?: boolean;\n width?: string;\n id?: string;\n /** `span` for content inside a button, such as a clickable `Surface.Row`. */\n as?: 'div' | 'span';\n children?: React.ReactNode;\n className?: string;\n}\n\nconst getGapSize = (size: FlexGapSize): number => {\n switch (size) {\n case FlexGapSize.XXSmall:\n return 4;\n case FlexGapSize.XSmall:\n return 8;\n case FlexGapSize.Small:\n return 12;\n case FlexGapSize.Medium:\n return 24;\n case FlexGapSize.Large:\n return 36;\n }\n};\n\nconst Flex: React.FC<FlexProps> = ({\n justify = FlexJustify.Center,\n align = FlexAlign.Center,\n gapSize,\n direction = FlexDirection.Horizontal,\n fullHeight = false,\n grow = false,\n shrink = false,\n wrap = false,\n width,\n as = 'div',\n id,\n children,\n className = '',\n}) => {\n const gapSizeValue = gapSize ? getGapSize(gapSize) : undefined;\n\n // Convert direction to CSS flex-direction\n const flexDirection = direction === FlexDirection.Vertical ? 'column' : 'row';\n\n const baseStyle: React.CSSProperties = {\n display: 'flex',\n flexDirection,\n flexWrap: wrap ? 'wrap' : undefined,\n justifyContent: justify,\n alignItems: align,\n gap: gapSizeValue ? `${gapSizeValue}px` : undefined,\n height: fullHeight ? '100%' : undefined,\n flex: grow ? 1 : undefined,\n minWidth: shrink ? 0 : undefined,\n width: width || undefined,\n };\n\n const Tag = as;\n return (\n <Tag id={id} className={className} style={baseStyle}>\n {children}\n </Tag>\n );\n};\n\nexport default Flex;\n"],"names":["getGapSize","size","FlexGapSize","Flex","justify","FlexJustify","align","FlexAlign","gapSize","direction","FlexDirection","fullHeight","grow","shrink","wrap","width","as","id","children","className","gapSizeValue","baseStyle"],"mappings":";;AAoBA,MAAMA,IAAa,CAACC,MAA8B;AAC9C,UAAQA,GAAA;AAAA,IACJ,KAAKC,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,IACX,KAAKA,EAAY;AACb,aAAO;AAAA,EAAA;AAEnB,GAEMC,IAA4B,CAAC;AAAA,EAC/B,SAAAC,IAAUC,EAAY;AAAA,EACtB,OAAAC,IAAQC,EAAU;AAAA,EAClB,SAAAC;AAAA,EACA,WAAAC,IAAYC,EAAc;AAAA,EAC1B,YAAAC,IAAa;AAAA,EACb,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AAChB,MAAM;AACF,QAAMC,IAAeZ,IAAUR,EAAWQ,CAAO,IAAI,QAK/Ca,IAAiC;AAAA,IACnC,SAAS;AAAA,IACT,eAJkBZ,MAAcC,EAAc,WAAW,WAAW;AAAA,IAKpE,UAAUI,IAAO,SAAS;AAAA,IAC1B,gBAAgBV;AAAA,IAChB,YAAYE;AAAA,IACZ,KAAKc,IAAe,GAAGA,CAAY,OAAO;AAAA,IAC1C,QAAQT,IAAa,SAAS;AAAA,IAC9B,MAAMC,IAAO,IAAI;AAAA,IACjB,UAAUC,IAAS,IAAI;AAAA,IACvB,OAAOE,KAAS;AAAA,EAAA;AAIpB,2BADYC,GAEP,EAAI,IAAAC,GAAQ,WAAAE,GAAsB,OAAOE,GACrC,UAAAH,GACL;AAER;"}
@@ -1,36 +1,43 @@
1
1
  import { jsx as m, jsxs as t } from "react/jsx-runtime";
2
- import d from "./TruncatedTooltip.js";
2
+ import f from "./TruncatedTooltip.js";
3
3
  import { isShown as i } from "./headerContent.js";
4
- const l = (e, a) => a ? /* @__PURE__ */ m(d, { text: e, describesTrigger: !1, children: e }) : e, x = ({
4
+ const c = (e, a) => a ? /* @__PURE__ */ m(f, { text: e, describesTrigger: !1, children: e }) : e, x = ({
5
5
  title: e,
6
6
  subtitle: a,
7
7
  extra: r,
8
- truncate: s = !1,
9
- titleClassName: c = "",
10
- className: n = ""
11
- }) => /* @__PURE__ */ t("div", { className: `flex items-center gap-2 ${n}`, children: [
12
- (i(e) || i(a)) && /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
13
- i(e) && /* @__PURE__ */ m(
14
- "div",
15
- {
16
- className: `min-w-0 ${i(a) ? "" : "flex-1"} ${c}`,
17
- children: l(e, s)
18
- }
19
- ),
20
- i(a) && /* @__PURE__ */ m("div", { className: "min-w-0 text-[var(--malachite-text-dimmed,#a1a1a1)]", children: l(a, s) })
21
- ] }),
8
+ truncate: l = !1,
9
+ wrapExtra: s = !1,
10
+ titleClassName: n = "",
11
+ className: d = ""
12
+ }) => /* @__PURE__ */ t("div", { className: `flex items-center gap-2 ${s ? "flex-wrap" : ""} ${d}`, children: [
13
+ (i(e) || i(a)) && /* @__PURE__ */ t(
14
+ "div",
15
+ {
16
+ className: `flex min-w-0 items-baseline gap-2 ${s ? "flex-auto" : "flex-1"}`,
17
+ children: [
18
+ i(e) && /* @__PURE__ */ m(
19
+ "div",
20
+ {
21
+ className: `min-w-0 ${i(a) ? "" : "flex-1"} ${n}`,
22
+ children: c(e, l)
23
+ }
24
+ ),
25
+ i(a) && /* @__PURE__ */ m("div", { className: "min-w-0 text-[var(--malachite-text-dimmed,#a1a1a1)]", children: c(a, l) })
26
+ ]
27
+ }
28
+ ),
22
29
  i(r) && /* @__PURE__ */ m("div", { className: "ml-auto flex shrink-0 items-center gap-1", children: r })
23
- ] }), h = (e) => /* @__PURE__ */ m(
30
+ ] }), v = (e) => /* @__PURE__ */ m(
24
31
  x,
25
32
  {
26
33
  ...e,
27
34
  truncate: !0,
28
- className: "min-h-11 w-full pl-4 pr-2 text-[13px]",
35
+ className: `min-h-11 w-full pl-4 pr-2 text-[13px] ${e.wrapExtra ? "py-1.5" : ""}`,
29
36
  titleClassName: "font-medium tracking-[0.13px] text-[var(--malachite-text-primary,#0a0a0a)]"
30
37
  }
31
38
  );
32
39
  export {
33
40
  x as HeaderRow,
34
- h as default
41
+ v as default
35
42
  };
36
43
  //# sourceMappingURL=FrameHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FrameHeader.js","sources":["../../src/components/FrameHeader.tsx"],"sourcesContent":["import type React from 'react';\nimport TruncatedTooltip from './TruncatedTooltip';\nimport { isShown } from './headerContent';\n\ninterface HeaderRowProps {\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n extra?: React.ReactNode;\n /** Cut a long title or subtitle short, with the full text in a tooltip, rather than wrap it. */\n truncate?: boolean;\n titleClassName?: string;\n className?: string;\n}\n\nconst fitted = (node: React.ReactNode, truncate: boolean) =>\n truncate ? (\n <TruncatedTooltip text={node} describesTrigger={false}>\n {node}\n </TruncatedTooltip>\n ) : (\n node\n );\n\n/**\n * A title, a dimmed subtitle beside it and `extra` at the right edge: the header of a Card and\n * of the frame a framed Card and the detached Table share. Without a subtitle the title cell\n * takes the row's width, so a title node laid out across the header keeps doing so.\n */\nexport const HeaderRow: React.FC<HeaderRowProps> = ({\n title,\n subtitle,\n extra,\n truncate = false,\n titleClassName = '',\n className = '',\n}) => (\n <div className={`flex items-center gap-2 ${className}`}>\n {(isShown(title) || isShown(subtitle)) && (\n <div className=\"flex min-w-0 flex-1 items-baseline gap-2\">\n {isShown(title) && (\n <div\n className={`min-w-0 ${isShown(subtitle) ? '' : 'flex-1'} ${titleClassName}`}\n >\n {fitted(title, truncate)}\n </div>\n )}\n {isShown(subtitle) && (\n <div className=\"min-w-0 text-[var(--malachite-text-dimmed,#a1a1a1)]\">\n {fitted(subtitle, truncate)}\n </div>\n )}\n </div>\n )}\n {isShown(extra) && <div className=\"ml-auto flex shrink-0 items-center gap-1\">{extra}</div>}\n </div>\n);\n\n/**\n * The title row on a frame, above its section, with the title in the detached Table's\n * column-header type. A title or subtitle too long for the row is cut short, with the full text\n * in a tooltip.\n */\nconst FrameHeader: React.FC<Omit<HeaderRowProps, 'truncate' | 'titleClassName' | 'className'>> = (\n props,\n) => (\n <HeaderRow\n {...props}\n truncate\n className=\"min-h-11 w-full pl-4 pr-2 text-[13px]\"\n titleClassName=\"font-medium tracking-[0.13px] text-[var(--malachite-text-primary,#0a0a0a)]\"\n />\n);\n\nexport default FrameHeader;\n"],"names":["fitted","node","truncate","jsx","TruncatedTooltip","HeaderRow","title","subtitle","extra","titleClassName","className","jsxs","isShown","FrameHeader","props"],"mappings":";;;AAcA,MAAMA,IAAS,CAACC,GAAuBC,MACnCA,IACI,gBAAAC,EAACC,GAAA,EAAiB,MAAMH,GAAM,kBAAkB,IAC3C,UAAAA,EAAA,CACL,IAEAA,GAQKI,IAAsC,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAN,IAAW;AAAA,EACX,gBAAAO,IAAiB;AAAA,EACjB,WAAAC,IAAY;AAChB,MACI,gBAAAC,EAAC,OAAA,EAAI,WAAW,2BAA2BD,CAAS,IAC9C,UAAA;AAAA,GAAAE,EAAQN,CAAK,KAAKM,EAAQL,CAAQ,MAChC,gBAAAI,EAAC,OAAA,EAAI,WAAU,4CACV,UAAA;AAAA,IAAAC,EAAQN,CAAK,KACV,gBAAAH;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAW,WAAWS,EAAQL,CAAQ,IAAI,KAAK,QAAQ,IAAIE,CAAc;AAAA,QAExE,UAAAT,EAAOM,GAAOJ,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,IAG9BU,EAAQL,CAAQ,KACb,gBAAAJ,EAAC,OAAA,EAAI,WAAU,uDACV,UAAAH,EAAOO,GAAUL,CAAQ,EAAA,CAC9B;AAAA,EAAA,GAER;AAAA,EAEHU,EAAQJ,CAAK,uBAAM,OAAA,EAAI,WAAU,4CAA4C,UAAAA,EAAA,CAAM;AAAA,EAAA,CACxF,GAQEK,IAA2F,CAC7FC,MAEA,gBAAAX;AAAA,EAACE;AAAA,EAAA;AAAA,IACI,GAAGS;AAAA,IACJ,UAAQ;AAAA,IACR,WAAU;AAAA,IACV,gBAAe;AAAA,EAAA;AACnB;"}
1
+ {"version":3,"file":"FrameHeader.js","sources":["../../src/components/FrameHeader.tsx"],"sourcesContent":["import type React from 'react';\nimport TruncatedTooltip from './TruncatedTooltip';\nimport { isShown } from './headerContent';\n\ninterface HeaderRowProps {\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n extra?: React.ReactNode;\n /** Cut a long title or subtitle short, with the full text in a tooltip, rather than wrap it. */\n truncate?: boolean;\n /** Move `extra` onto a line of its own, under the title, when the two do not fit on one. */\n wrapExtra?: boolean;\n titleClassName?: string;\n className?: string;\n}\n\nconst fitted = (node: React.ReactNode, truncate: boolean) =>\n truncate ? (\n <TruncatedTooltip text={node} describesTrigger={false}>\n {node}\n </TruncatedTooltip>\n ) : (\n node\n );\n\n/**\n * A title, a dimmed subtitle beside it and `extra` at the right edge: the header of a Card and\n * of the frame a framed Card and the detached Table share. Without a subtitle the title cell\n * takes the row's width, so a title node laid out across the header keeps doing so. With\n * `wrapExtra`, a title and subtitle that together do not fit on one line beside `extra` keep the\n * row to themselves and `extra` wraps under them, still at the right edge; without it they share\n * the row and the title cell shrinks to whatever `extra` leaves.\n */\nexport const HeaderRow: React.FC<HeaderRowProps> = ({\n title,\n subtitle,\n extra,\n truncate = false,\n wrapExtra = false,\n titleClassName = '',\n className = '',\n}) => (\n <div className={`flex items-center gap-2 ${wrapExtra ? 'flex-wrap' : ''} ${className}`}>\n {(isShown(title) || isShown(subtitle)) && (\n <div\n className={`flex min-w-0 items-baseline gap-2 ${wrapExtra ? 'flex-auto' : 'flex-1'}`}\n >\n {isShown(title) && (\n <div\n className={`min-w-0 ${isShown(subtitle) ? '' : 'flex-1'} ${titleClassName}`}\n >\n {fitted(title, truncate)}\n </div>\n )}\n {isShown(subtitle) && (\n <div className=\"min-w-0 text-[var(--malachite-text-dimmed,#a1a1a1)]\">\n {fitted(subtitle, truncate)}\n </div>\n )}\n </div>\n )}\n {isShown(extra) && <div className=\"ml-auto flex shrink-0 items-center gap-1\">{extra}</div>}\n </div>\n);\n\n/**\n * The title row on a frame, above its section, with the title in the detached Table's\n * column-header type. A title or subtitle too long for the row is cut short, with the full text\n * in a tooltip; with `wrapExtra`, `extra` wraps under them first, so only one wider than the\n * whole row is.\n */\nconst FrameHeader: React.FC<Omit<HeaderRowProps, 'truncate' | 'titleClassName' | 'className'>> = (\n props,\n) => (\n <HeaderRow\n {...props}\n truncate\n className={`min-h-11 w-full pl-4 pr-2 text-[13px] ${props.wrapExtra ? 'py-1.5' : ''}`}\n titleClassName=\"font-medium tracking-[0.13px] text-[var(--malachite-text-primary,#0a0a0a)]\"\n />\n);\n\nexport default FrameHeader;\n"],"names":["fitted","node","truncate","jsx","TruncatedTooltip","HeaderRow","title","subtitle","extra","wrapExtra","titleClassName","className","jsxs","isShown","FrameHeader","props"],"mappings":";;;AAgBA,MAAMA,IAAS,CAACC,GAAuBC,MACnCA,IACI,gBAAAC,EAACC,GAAA,EAAiB,MAAMH,GAAM,kBAAkB,IAC3C,UAAAA,EAAA,CACL,IAEAA,GAWKI,IAAsC,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAN,IAAW;AAAA,EACX,WAAAO,IAAY;AAAA,EACZ,gBAAAC,IAAiB;AAAA,EACjB,WAAAC,IAAY;AAChB,MACI,gBAAAC,EAAC,SAAI,WAAW,2BAA2BH,IAAY,cAAc,EAAE,IAAIE,CAAS,IAC9E,UAAA;AAAA,GAAAE,EAAQP,CAAK,KAAKO,EAAQN,CAAQ,MAChC,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW,qCAAqCH,IAAY,cAAc,QAAQ;AAAA,MAEjF,UAAA;AAAA,QAAAI,EAAQP,CAAK,KACV,gBAAAH;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAW,WAAWU,EAAQN,CAAQ,IAAI,KAAK,QAAQ,IAAIG,CAAc;AAAA,YAExE,UAAAV,EAAOM,GAAOJ,CAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAG9BW,EAAQN,CAAQ,KACb,gBAAAJ,EAAC,OAAA,EAAI,WAAU,uDACV,UAAAH,EAAOO,GAAUL,CAAQ,EAAA,CAC9B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAAA,EAIXW,EAAQL,CAAK,uBAAM,OAAA,EAAI,WAAU,4CAA4C,UAAAA,EAAA,CAAM;AAAA,EAAA,CACxF,GASEM,IAA2F,CAC7FC,MAEA,gBAAAZ;AAAA,EAACE;AAAA,EAAA;AAAA,IACI,GAAGU;AAAA,IACJ,UAAQ;AAAA,IACR,WAAW,yCAAyCA,EAAM,YAAY,WAAW,EAAE;AAAA,IACnF,gBAAe;AAAA,EAAA;AACnB;"}
@@ -1,11 +1,12 @@
1
1
  import { EmptyLayout as o } from "./emptyLayout.js";
2
- import { PageColumn as t } from "./pageColumn.js";
3
- import { RegularLayout as m } from "./regularLayout.js";
4
- import { PageActions as g } from "./regularLayout.js";
5
- const u = { Regular: m, Empty: o, Column: t };
2
+ import { PageColumn as m } from "./pageColumn.js";
3
+ import { PageColumns as t } from "./pageColumns.js";
4
+ import { RegularLayout as r } from "./regularLayout.js";
5
+ import { PageActions as n } from "./regularLayout.js";
6
+ const l = { Regular: r, Empty: o, Column: m, Columns: t };
6
7
  export {
7
- g as PageActions,
8
- u as PageLayout,
9
- u as default
8
+ n as PageActions,
9
+ l as PageLayout,
10
+ l as default
10
11
  };
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import Empty from './emptyLayout';\nimport Column from './pageColumn';\nimport Regular from './regularLayout';\n\nexport const PageLayout = { Regular, Empty, Column };\n\nexport default PageLayout;\nexport type { BreadcrumbLink, PageAction, RenderLink } from './types';\nexport { PageActions } from './regularLayout';\nexport type { PageContentGap, PageContentWidth, RegularLayoutProps } from './regularLayout';\nexport type { EmptyLayoutProps } from './emptyLayout';\nexport type { PageColumnProps } from './pageColumn';\n"],"names":["PageLayout","Regular","Empty","Column"],"mappings":";;;;AAIO,MAAMA,IAAa,EAAA,SAAEC,GAAA,OAASC,WAAOC,EAAA;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import Empty from './emptyLayout';\nimport Column from './pageColumn';\nimport Columns from './pageColumns';\nimport Regular from './regularLayout';\n\nexport const PageLayout = { Regular, Empty, Column, Columns };\n\nexport default PageLayout;\nexport type { BreadcrumbLink, PageAction, RenderLink } from './types';\nexport { PageActions } from './regularLayout';\nexport type { PageContentGap, PageContentWidth, RegularLayoutProps } from './regularLayout';\nexport type { EmptyLayoutProps } from './emptyLayout';\nexport type { PageColumnProps } from './pageColumn';\nexport type { PageColumnsProps } from './pageColumns';\n"],"names":["PageLayout","Regular","Empty","Column","Columns"],"mappings":";;;;;AAKO,MAAMA,IAAa,EAAA,SAAEC,UAASC,GAAA,QAAOC,YAAQC,EAAA;"}
@@ -0,0 +1,23 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { CONTENT_INSET_VAR as t } from "./constants.js";
3
+ import { CONTENT_GAPS as a } from "./pageColumn.js";
4
+ const c = ({ gap: s = "xlarge", children: l, className: o = "" }) => /* @__PURE__ */ r(
5
+ "div",
6
+ {
7
+ className: `@container w-full ${o}`,
8
+ style: { [t]: "0px" },
9
+ children: /* @__PURE__ */ r(
10
+ "div",
11
+ {
12
+ className: "grid grid-cols-1 items-start @[768px]:grid-cols-2",
13
+ style: { gap: a[s] },
14
+ children: l
15
+ }
16
+ )
17
+ }
18
+ );
19
+ export {
20
+ c as PageColumns,
21
+ c as default
22
+ };
23
+ //# sourceMappingURL=pageColumns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageColumns.js","sources":["../../../src/components/PageLayout/pageColumns.tsx"],"sourcesContent":["import React from 'react';\nimport { CONTENT_INSET_VAR } from './constants';\nimport { CONTENT_GAPS, type PageContentGap } from './pageColumn';\n\nexport interface PageColumnsProps {\n /** Space between the columns, and between them once stacked. Defaults to `xlarge`. */\n gap?: PageContentGap;\n /** Exactly two children, one per column; a third wraps onto a new row. */\n children: React.ReactNode;\n className?: string;\n}\n\n/**\n * Two equal columns that stack into one when the content area, not the viewport, is narrower\n * than 768px, so a page beside the app sidebar stacks at the width it actually has. Needs a\n * parent with a definite width, such as a page body: it measures its container, so inside a\n * box that sizes to its content it collapses. Inside `contentWidth=\"narrow\"` it always stacks.\n */\nconst PageColumns: React.FC<PageColumnsProps> = ({ gap = 'xlarge', children, className = '' }) => (\n <div\n className={`@container w-full ${className}`}\n style={{ [CONTENT_INSET_VAR]: '0px' } as React.CSSProperties}\n >\n <div\n className=\"grid grid-cols-1 items-start @[768px]:grid-cols-2\"\n style={{ gap: CONTENT_GAPS[gap] }}\n >\n {children}\n </div>\n </div>\n);\n\nexport default PageColumns;\nexport { PageColumns };\n"],"names":["PageColumns","gap","children","className","jsx","CONTENT_INSET_VAR","CONTENT_GAPS"],"mappings":";;;AAkBA,MAAMA,IAA0C,CAAC,EAAE,KAAAC,IAAM,UAAU,UAAAC,GAAU,WAAAC,IAAY,SACrF,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,WAAW,qBAAqBD,CAAS;AAAA,IACzC,OAAO,EAAE,CAACE,CAAiB,GAAG,MAAA;AAAA,IAE9B,UAAA,gBAAAD;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,OAAO,EAAE,KAAKE,EAAaL,CAAG,EAAA;AAAA,QAE7B,UAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACL;AACJ;"}