@rinzai/zen 0.8.6 → 0.10.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 (168) hide show
  1. package/dist/animated-number/index.d.ts +6 -2
  2. package/dist/animated-number/index.d.ts.map +1 -1
  3. package/dist/animated-number/index.js +69 -17
  4. package/dist/breadcrumbs/index.d.ts +15 -0
  5. package/dist/breadcrumbs/index.d.ts.map +1 -0
  6. package/dist/breadcrumbs/index.js +39 -0
  7. package/dist/calendar-heatmap/index.d.ts +25 -0
  8. package/dist/calendar-heatmap/index.d.ts.map +1 -0
  9. package/dist/calendar-heatmap/index.js +48 -0
  10. package/dist/card/index.d.ts +3 -1
  11. package/dist/card/index.d.ts.map +1 -1
  12. package/dist/card/index.js +3 -2
  13. package/dist/chart/allocation.d.ts +30 -0
  14. package/dist/chart/allocation.d.ts.map +1 -0
  15. package/dist/chart/allocation.js +69 -0
  16. package/dist/chart/donut.d.ts.map +1 -1
  17. package/dist/chart/donut.js +72 -70
  18. package/dist/chart/index.d.ts +1 -0
  19. package/dist/chart/index.d.ts.map +1 -1
  20. package/dist/chart/index.js +182 -178
  21. package/dist/code-block/index.d.ts +1 -1
  22. package/dist/code-block/index.d.ts.map +1 -1
  23. package/dist/code-block/index.js +31 -22
  24. package/dist/code-input/index.d.ts +20 -0
  25. package/dist/code-input/index.d.ts.map +1 -0
  26. package/dist/code-input/index.js +44 -0
  27. package/dist/collapse/index.d.ts +3 -2
  28. package/dist/collapse/index.d.ts.map +1 -1
  29. package/dist/collapse/index.js +1 -1
  30. package/dist/command-palette/index.d.ts +37 -0
  31. package/dist/command-palette/index.d.ts.map +1 -0
  32. package/dist/command-palette/index.js +120 -0
  33. package/dist/date-picker/index.d.ts +10 -2
  34. package/dist/date-picker/index.d.ts.map +1 -1
  35. package/dist/date-picker/index.js +43 -21
  36. package/dist/dialog/index.d.ts +13 -3
  37. package/dist/dialog/index.d.ts.map +1 -1
  38. package/dist/dialog/index.js +84 -44
  39. package/dist/editable-cell/index.d.ts +2 -1
  40. package/dist/editable-cell/index.d.ts.map +1 -1
  41. package/dist/editable-cell/index.js +24 -17
  42. package/dist/empty-state/index.d.ts +14 -0
  43. package/dist/empty-state/index.d.ts.map +1 -0
  44. package/dist/empty-state/index.js +31 -0
  45. package/dist/file-drop/index.d.ts +18 -0
  46. package/dist/file-drop/index.d.ts.map +1 -0
  47. package/dist/file-drop/index.js +49 -0
  48. package/dist/filter-bar/index.d.ts +21 -0
  49. package/dist/filter-bar/index.d.ts.map +1 -0
  50. package/dist/filter-bar/index.js +90 -0
  51. package/dist/icon-picker/index.d.ts +38 -0
  52. package/dist/icon-picker/index.d.ts.map +1 -0
  53. package/dist/icon-picker/index.js +112 -0
  54. package/dist/icons/arrow-left.js +23 -0
  55. package/dist/icons/micro/arrow-trending-down.d.ts +3 -0
  56. package/dist/icons/micro/arrow-trending-down.d.ts.map +1 -0
  57. package/dist/icons/micro/arrow-trending-down.js +21 -0
  58. package/dist/icons/micro/arrow-trending-up.d.ts +3 -0
  59. package/dist/icons/micro/arrow-trending-up.d.ts.map +1 -0
  60. package/dist/icons/micro/arrow-trending-up.js +21 -0
  61. package/dist/index.d.ts +30 -6
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/kbd/index.d.ts +4 -0
  64. package/dist/kbd/index.d.ts.map +1 -0
  65. package/dist/kbd/index.js +12 -0
  66. package/dist/keypad/index.d.ts +20 -0
  67. package/dist/keypad/index.d.ts.map +1 -0
  68. package/dist/keypad/index.js +42 -0
  69. package/dist/lib.js +92 -65
  70. package/dist/load-more/index.d.ts +19 -0
  71. package/dist/load-more/index.d.ts.map +1 -0
  72. package/dist/load-more/index.js +37 -0
  73. package/dist/menu/index.d.ts +22 -3
  74. package/dist/menu/index.d.ts.map +1 -1
  75. package/dist/menu/index.js +132 -45
  76. package/dist/meter/index.d.ts +3 -1
  77. package/dist/meter/index.d.ts.map +1 -1
  78. package/dist/meter/index.js +19 -14
  79. package/dist/money-input/index.d.ts +3 -3
  80. package/dist/page-transition/index.d.ts +10 -0
  81. package/dist/page-transition/index.d.ts.map +1 -0
  82. package/dist/page-transition/index.js +16 -0
  83. package/dist/pagination/index.d.ts +26 -0
  84. package/dist/pagination/index.d.ts.map +1 -0
  85. package/dist/pagination/index.js +62 -0
  86. package/dist/progress-ring/index.d.ts +4 -1
  87. package/dist/progress-ring/index.d.ts.map +1 -1
  88. package/dist/progress-ring/index.js +47 -38
  89. package/dist/range-slider/index.d.ts +26 -0
  90. package/dist/range-slider/index.d.ts.map +1 -0
  91. package/dist/range-slider/index.js +44 -0
  92. package/dist/repeat-picker/index.d.ts +22 -0
  93. package/dist/repeat-picker/index.d.ts.map +1 -0
  94. package/dist/repeat-picker/index.js +115 -0
  95. package/dist/skeleton/index.d.ts +12 -2
  96. package/dist/skeleton/index.d.ts.map +1 -1
  97. package/dist/skeleton/index.js +11 -5
  98. package/dist/slider/index.d.ts +2 -0
  99. package/dist/slider/index.d.ts.map +1 -1
  100. package/dist/slider/index.js +19 -18
  101. package/dist/sortable/index.d.ts +33 -0
  102. package/dist/sortable/index.d.ts.map +1 -0
  103. package/dist/sortable/index.js +147 -0
  104. package/dist/sparkline/index.d.ts +15 -0
  105. package/dist/sparkline/index.d.ts.map +1 -0
  106. package/dist/sparkline/index.js +56 -0
  107. package/dist/stepper/index.d.ts +19 -0
  108. package/dist/stepper/index.d.ts.map +1 -0
  109. package/dist/stepper/index.js +53 -0
  110. package/dist/table/index.d.ts +11 -2
  111. package/dist/table/index.d.ts.map +1 -1
  112. package/dist/table/index.js +117 -53
  113. package/dist/table/selection.d.ts +55 -0
  114. package/dist/table/selection.d.ts.map +1 -0
  115. package/dist/table/selection.js +83 -0
  116. package/dist/table/swipe.d.ts +18 -0
  117. package/dist/table/swipe.d.ts.map +1 -0
  118. package/dist/table/swipe.js +53 -0
  119. package/dist/table-of-contents/index.d.ts +1 -0
  120. package/dist/table-of-contents/index.d.ts.map +1 -1
  121. package/dist/table-of-contents/index.js +25 -23
  122. package/dist/tabs/index.d.ts.map +1 -1
  123. package/dist/tabs/index.js +101 -51
  124. package/dist/tag-input/index.d.ts +19 -0
  125. package/dist/tag-input/index.d.ts.map +1 -0
  126. package/dist/tag-input/index.js +61 -0
  127. package/dist/theme-toggle/index.js +6 -6
  128. package/dist/theme.css +340 -8
  129. package/dist/timeline/index.d.ts +18 -0
  130. package/dist/timeline/index.d.ts.map +1 -0
  131. package/dist/timeline/index.js +45 -0
  132. package/dist/toast/index.js +25 -25
  133. package/dist/toggle/index.d.ts.map +1 -1
  134. package/dist/toggle/index.js +1 -1
  135. package/dist/tree/index.d.ts.map +1 -1
  136. package/dist/tree/index.js +68 -67
  137. package/dist/trend/index.d.ts +19 -0
  138. package/dist/trend/index.d.ts.map +1 -0
  139. package/dist/trend/index.js +27 -0
  140. package/dist/utils/date.d.ts +34 -0
  141. package/dist/utils/date.d.ts.map +1 -1
  142. package/dist/utils/date.js +45 -12
  143. package/dist/utils/indicator.d.ts.map +1 -1
  144. package/dist/utils/indicator.js +1 -1
  145. package/dist/utils/money.d.ts +3 -1
  146. package/dist/utils/money.d.ts.map +1 -1
  147. package/dist/utils/money.js +24 -1
  148. package/dist/utils/motion.d.ts +3 -0
  149. package/dist/utils/motion.d.ts.map +1 -0
  150. package/dist/utils/motion.js +7 -0
  151. package/dist/utils/repeat.d.ts +17 -0
  152. package/dist/utils/repeat.d.ts.map +1 -0
  153. package/dist/utils/repeat.js +38 -0
  154. package/dist/utils/section-link.d.ts +9 -0
  155. package/dist/utils/section-link.d.ts.map +1 -0
  156. package/dist/utils/section-link.js +10 -0
  157. package/dist/utils/swipe.d.ts +29 -0
  158. package/dist/utils/swipe.d.ts.map +1 -0
  159. package/dist/utils/swipe.js +85 -0
  160. package/dist/utils/theme-wave.d.ts.map +1 -1
  161. package/dist/utils/theme-wave.js +72 -71
  162. package/dist/utils/useAnchoredPopup.d.ts.map +1 -1
  163. package/dist/utils/useAnchoredPopup.js +3 -4
  164. package/dist/utils/useSeen.d.ts +4 -0
  165. package/dist/utils/useSeen.d.ts.map +1 -0
  166. package/dist/utils/useSeen.js +17 -0
  167. package/dist/zen.css +1 -1
  168. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,CAAC;AACf,OAAO,EACH,OAAO,IAAI,IAAI,EACf,WAAW,EACX,KAAK,gBAAgB,EACrB,UAAU,EACV,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,aAAa,EACb,WAAW,EACX,KAAK,gBAAgB,GACxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EACH,OAAO,IAAI,IAAI,EACf,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,cAAc,EACnB,IAAI,EACJ,OAAO,GACV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,QAAQ,EA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AAU,EACV,UAAU,EACV,aAAa,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,OAAO,EACP,eAAe,EACf,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,eAAe,EACf,YAAY,EACZ,MAAM,EACN,KAAK,EACL,YAAY,EACZ,SAAS,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EACH,cAAc,EACd,YAAY,EACZ,WAAW,EACX,KAAK,KAAK,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,YAAY,EACZ,KAAK,aAAa,EAClB,WAAW,EACX,WAAW,EACX,KAAK,SAAS,EACd,oBAAoB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,QAAQ,OAAO,CAAC;IACnB,UAAU,aAAa;QACnB,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;KACzC;CACJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,CAAC;AACf,OAAO,EACH,OAAO,IAAI,IAAI,EACf,WAAW,EACX,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,UAAU,EACV,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,aAAa,EACb,WAAW,EACX,KAAK,gBAAgB,GACxB,MAAM,QAAQ,CAAC;A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ClF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EACH,cAAc,EACd,KAAK,mBAAmB,EACxB,YAAY,EACZ,KAAK,iBAAiB,EACtB,YAAY,EACZ,KAAK,iBAAiB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ /** A key on the keyboard, for shortcuts in hints and tooltips: <Kbd>⌘</Kbd><Kbd>K</Kbd>. Sized from the text around it. */
3
+ export default function Kbd({ className, ...rest }: ComponentProps<'kbd'>): import('react').JSX.Element;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/kbd/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,2HAA2H;AAC3H,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAUxE"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { cx as e } from "../utils/cx.js";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region packages/kbd/index.tsx
5
+ function n({ className: n, ...r }) {
6
+ return /* @__PURE__ */ t("kbd", {
7
+ className: e("zen__kbd border-tint/15 bg-tint/[0.06] text-muted-foreground inline-flex h-[1.7em] min-w-[1.7em] items-center justify-center rounded-[0.4em] border px-[0.45em] font-sans text-[0.8em] leading-none font-medium shadow-[inset_0_-1px_0_oklch(var(--tint)/0.12)]", n),
8
+ ...r
9
+ });
10
+ }
11
+ //#endregion
12
+ export { n as default };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A number pad for typing an amount on a phone, where the system keyboard
3
+ * covers half the screen. The value is the text typed ("12.5"), so a
4
+ * trailing point or zero stays until you convert it: no leading zeros, one
5
+ * point, at most `decimals` digits after it.
6
+ */
7
+ export default function Keypad({ value, onValueChange, decimals, maxLength, deleteLabel, 'aria-label': label, className, }: KeypadProps): import('react').JSX.Element;
8
+ export interface KeypadProps {
9
+ /** What's been typed, e.g. "12.5". */
10
+ value: string;
11
+ onValueChange: (value: string) => void;
12
+ /** Digits allowed after the point (default 2; 0 hides the point). */
13
+ decimals?: number;
14
+ maxLength?: number;
15
+ /** The delete key's name for screen readers. */
16
+ deleteLabel?: string;
17
+ 'aria-label'?: string;
18
+ className?: string;
19
+ }
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/keypad/index.tsx"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,QAAY,EACZ,SAAc,EACd,WAAsB,EACtB,YAAY,EAAE,KAAgB,EAC9B,SAAS,GACZ,EAAE,WAAW,+BA4Bb;AAED,MAAM,WAAW,WAAW;IACxB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { cx as e } from "../utils/cx.js";
3
+ import t from "../icons/arrow-left.js";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ //#region packages/keypad/index.tsx
6
+ var r = [
7
+ "1",
8
+ "2",
9
+ "3",
10
+ "4",
11
+ "5",
12
+ "6",
13
+ "7",
14
+ "8",
15
+ "9",
16
+ ".",
17
+ "0",
18
+ "back"
19
+ ];
20
+ function i({ value: i, onValueChange: a, decimals: o = 2, maxLength: s = 12, deleteLabel: c = "Delete", "aria-label": l = "Keypad", className: u }) {
21
+ let d = (e) => {
22
+ if (e === "back") return a(i.slice(0, -1));
23
+ let t = i.indexOf(".");
24
+ if (e === ".") return o === 0 || t !== -1 ? void 0 : a((i || "0") + ".");
25
+ t !== -1 && i.length - t > o || i.length >= s || a(i === "0" ? e : i + e);
26
+ };
27
+ return /* @__PURE__ */ n("div", {
28
+ role: "group",
29
+ "aria-label": l,
30
+ className: e("zen__keypad grid grid-cols-3 gap-2", u),
31
+ children: r.map((e) => /* @__PURE__ */ n("button", {
32
+ type: "button",
33
+ "aria-label": e === "back" ? c : void 0,
34
+ disabled: e === "." && o === 0,
35
+ onClick: () => d(e),
36
+ className: "bg-tint/[0.05] hover:bg-tint/[0.09] focus-visible:ring-ring/50 grid h-14 cursor-pointer place-items-center rounded-xl text-xl font-medium tabular-nums outline-hidden transition-[background-color,scale] duration-150 select-none focus-visible:ring-2 active:scale-95 disabled:invisible",
37
+ children: e === "back" ? /* @__PURE__ */ n(t, { className: "size-5" }) : e
38
+ }, e))
39
+ });
40
+ }
41
+ //#endregion
42
+ export { i as default };
package/dist/lib.js CHANGED
@@ -3,68 +3,95 @@
3
3
  import { cx as e } from "./utils/cx.js";
4
4
  import { applyGraphicsMode as t, detectGraphicsMode as n } from "./utils/graphics.js";
5
5
  import { useAnchoredPopup as r } from "./utils/useAnchoredPopup.js";
6
- import i, { MenuContent as a, MenuHeader as o, MenuItem as s, MenuSeparator as c, MenuTrigger as l } from "./menu/index.js";
7
- import { MoneyParseError as u, currencySymbol as d, formatAmount as f, formatMoney as p, minorDigits as m, parseMoney as h, parseMoneyInput as g } from "./utils/money.js";
8
- import _, { AnimatedMoney as v } from "./animated-number/index.js";
9
- import y, { ImageCropError as b, cropImageToSquare as x } from "./avatar/index.js";
10
- import S from "./backdrop/index.js";
11
- import { cva as C } from "./utils/cva.js";
12
- import w from "./badge/index.js";
13
- import T, { StatusPillAction as E } from "./status-pill/index.js";
14
- import D from "./spinner/index.js";
15
- import O, { buttonVariants as k } from "./button/index.js";
16
- import A, { CardDescription as j, CardHeader as M, CardTitle as N, Stat as P, StatRow as F } from "./card/index.js";
17
- import I from "./code-block/index.js";
18
- import L from "./chip/index.js";
19
- import R, { PopoverClose as z, PopoverContent as B, PopoverTrigger as V } from "./popover/index.js";
20
- import H from "./collapse/index.js";
21
- import U from "./alert/index.js";
22
- import W, { FormMessage as G, useField as K, useFieldProps as q } from "./field/index.js";
23
- import J, { InputGroupAddon as Y, InputGroupInput as X } from "./input-group/index.js";
24
- import { FieldChevron as Z } from "./utils/field-chevron.js";
25
- import { useVirtualList as Q } from "./utils/useVirtualList.js";
26
- import $, { ComboboxCreate as ee, ComboboxEmpty as te, ComboboxItem as ne, ComboboxList as re, ComboboxPopup as ie, ComboboxSearch as ae, ComboboxTrigger as oe } from "./combobox/index.js";
27
- import se, { useToast as ce, useToastHost as le } from "./toast/index.js";
28
- import ue, { DialogClose as de, DialogFooter as fe } from "./dialog/index.js";
29
- import pe from "./confirm-dialog/index.js";
30
- import me from "./editable-cell/index.js";
31
- import he, { DisclosureContent as ge, DisclosureTrigger as _e } from "./disclosure/index.js";
32
- import ve from "./header/index.js";
33
- import ye from "./inset/index.js";
34
- import be from "./input/index.js";
35
- import xe from "./meter/index.js";
36
- import { addMonths as Se, currentMonth as Ce, formatMonth as we, fromMonthIndex as Te, isMonth as Ee, monthIndex as De, monthNames as Oe, monthRange as ke, monthsBetween as Ae } from "./utils/month.js";
37
- import je from "./month-picker/index.js";
38
- import Me from "./checkbox/index.js";
39
- import { paletteColor as Ne } from "./chart/palette.js";
40
- import { ChartTooltipCard as Pe } from "./chart/tooltip.js";
41
- import Fe from "./chart/donut.js";
42
- import Ie, { ChartArea as Le, ChartBar as Re, ChartLine as ze, ChartReference as Be, niceTicks as Ve } from "./chart/index.js";
43
- import He, { Radio as Ue } from "./radio-group/index.js";
44
- import { addDays as We, addMonthsToDate as Ge, dayIndex as Ke, dayOfWeek as qe, daysBetween as Je, daysInMonth as Ye, formatDate as Xe, formatDateRange as Ze, fromDayIndex as Qe, isDate as $e, today as et, weekStart as tt, weekdayNames as nt } from "./utils/date.js";
45
- import rt from "./calendar/index.js";
46
- import it, { DateRangePicker as at } from "./date-picker/index.js";
47
- import { RateUnavailableError as ot, convertMinor as st, isRateTable as ct, rateBetween as lt } from "./utils/fx.js";
48
- import ut, { MoneyConversionHint as dt, MoneyCurrencyMenu as ft, useMoneyInput as pt } from "./money-input/index.js";
49
- import mt, { RadioCard as ht } from "./radio-cards/index.js";
50
- import gt, { Pill as _t, PillIndicator as vt } from "./pills/index.js";
51
- import yt from "./page-header/index.js";
52
- import bt from "./progress-ring/index.js";
53
- import xt, { SegmentedItem as St } from "./segmented/index.js";
54
- import Ct, { SelectGroup as wt, SelectItem as Tt, SelectSeparator as Et } from "./select/index.js";
55
- import Dt, { SideNavGroup as Ot, SideNavLink as kt } from "./side-nav/index.js";
56
- import At from "./skeleton/index.js";
57
- import jt from "./slider/index.js";
58
- import Mt, { TabBarItem as Nt } from "./tab-bar/index.js";
59
- import Pt, { TableBody as Ft, TableCell as It, TableContainer as Lt, TableEmpty as Rt, TableFooter as zt, TableFooterCell as Bt, TableHead as Vt, TableHeader as Ht, TableRow as Ut, TableSpacerRow as Wt, useSort as Gt } from "./table/index.js";
60
- import Kt from "./table-of-contents/index.js";
61
- import qt, { Tab as Jt, TabList as Yt, TabPanel as Xt } from "./tabs/index.js";
62
- import { TreeCell as Zt, TreeLabel as Qt, TreeRow as $t, TreeToggle as en, useTree as tn } from "./tree/index.js";
63
- import nn from "./textarea/index.js";
64
- import rn from "./toggle/index.js";
65
- import an, { TooltipContent as on, TooltipTrigger as sn } from "./tooltip/index.js";
66
- import { DEFAULT_THEME as cn, INTENSITIES as ln, PRESETS as un, applyPreset as dn, applyTheme as fn, contrastRatio as pn, customize as mn, normalizeTheme as hn, oklchToLinearRgb as gn, resetTheme as _n, themeVars as vn } from "./utils/theme.js";
67
- import { prepareThemeWave as yn, themeWave as bn } from "./utils/theme-wave.js";
68
- import xn, { ThemeScript as Sn, themeScript as Cn } from "./theme-toggle/index.js";
69
- import { useHydrated as wn } from "./utils/useHydrated.js";
70
- export { U as Alert, v as AnimatedMoney, _ as AnimatedNumber, y as Avatar, S as Backdrop, w as Badge, O as Button, rt as Calendar, A as Card, j as CardDescription, M as CardHeader, N as CardTitle, Ie as Chart, Le as ChartArea, Re as ChartBar, ze as ChartLine, Be as ChartReference, Pe as ChartTooltipCard, Me as Checkbox, L as Chip, I as CodeBlock, H as Collapse, $ as Combobox, ee as ComboboxCreate, te as ComboboxEmpty, ne as ComboboxItem, re as ComboboxList, ie as ComboboxPopup, ae as ComboboxSearch, oe as ComboboxTrigger, pe as ConfirmDialog, cn as DEFAULT_THEME, it as DatePicker, at as DateRangePicker, ue as Dialog, de as DialogClose, fe as DialogFooter, he as Disclosure, ge as DisclosureContent, _e as DisclosureTrigger, Fe as DonutChart, me as EditableCell, W as Field, Z as FieldChevron, G as FormMessage, ve as Header, ln as INTENSITIES, b as ImageCropError, be as Input, J as InputGroup, Y as InputGroupAddon, X as InputGroupInput, ye as Inset, i as Menu, a as MenuContent, o as MenuHeader, s as MenuItem, c as MenuSeparator, l as MenuTrigger, xe as Meter, dt as MoneyConversionHint, ft as MoneyCurrencyMenu, ut as MoneyInput, u as MoneyParseError, je as MonthPicker, un as PRESETS, yt as PageHeader, _t as Pill, vt as PillIndicator, gt as Pills, R as Popover, z as PopoverClose, B as PopoverContent, V as PopoverTrigger, bt as ProgressRing, Ue as Radio, ht as RadioCard, mt as RadioCards, He as RadioGroup, ot as RateUnavailableError, xt as Segmented, St as SegmentedItem, Ct as Select, wt as SelectGroup, Tt as SelectItem, Et as SelectSeparator, Dt as SideNav, Ot as SideNavGroup, kt as SideNavLink, At as Skeleton, jt as Slider, D as Spinner, P as Stat, F as StatRow, T as StatusPill, E as StatusPillAction, Jt as Tab, Mt as TabBar, Nt as TabBarItem, Yt as TabList, Xt as TabPanel, Pt as Table, Ft as TableBody, It as TableCell, Lt as TableContainer, Rt as TableEmpty, zt as TableFooter, Bt as TableFooterCell, Vt as TableHead, Ht as TableHeader, Kt as TableOfContents, Ut as TableRow, Wt as TableSpacerRow, qt as Tabs, nn as TextArea, Sn as ThemeScript, xn as ThemeToggle, se as ToastProvider, rn as Toggle, an as Tooltip, on as TooltipContent, sn as TooltipTrigger, Zt as TreeCell, Qt as TreeLabel, $t as TreeRow, en as TreeToggle, We as addDays, Se as addMonths, Ge as addMonthsToDate, t as applyGraphicsMode, dn as applyPreset, fn as applyTheme, k as buttonVariants, pn as contrastRatio, st as convertMinor, x as cropImageToSquare, d as currencySymbol, Ce as currentMonth, mn as customize, C as cva, e as cx, Ke as dayIndex, qe as dayOfWeek, Je as daysBetween, Ye as daysInMonth, n as detectGraphicsMode, f as formatAmount, Xe as formatDate, Ze as formatDateRange, p as formatMoney, we as formatMonth, Qe as fromDayIndex, Te as fromMonthIndex, $e as isDate, Ee as isMonth, ct as isRateTable, m as minorDigits, De as monthIndex, Oe as monthNames, ke as monthRange, Ae as monthsBetween, Ve as niceTicks, hn as normalizeTheme, gn as oklchToLinearRgb, Ne as paletteColor, h as parseMoney, g as parseMoneyInput, yn as prepareThemeWave, lt as rateBetween, _n as resetTheme, Cn as themeScript, vn as themeVars, bn as themeWave, et as today, r as useAnchoredPopup, K as useField, q as useFieldProps, wn as useHydrated, pt as useMoneyInput, Gt as useSort, ce as useToast, le as useToastHost, tn as useTree, Q as useVirtualList, tt as weekStart, nt as weekdayNames };
6
+ import i, { MenuContent as a, MenuContextTrigger as o, MenuHeader as s, MenuItem as c, MenuSeparator as l, MenuTrigger as u } from "./menu/index.js";
7
+ import { MoneyParseError as d, currencySymbol as f, formatAmount as p, formatMoney as m, minorDigits as h, parseMoney as g, parseMoneyInput as _ } from "./utils/money.js";
8
+ import { reducedMotion as v } from "./utils/motion.js";
9
+ import y, { AnimatedMoney as b } from "./animated-number/index.js";
10
+ import x, { ImageCropError as S, cropImageToSquare as C } from "./avatar/index.js";
11
+ import w from "./backdrop/index.js";
12
+ import { cva as T } from "./utils/cva.js";
13
+ import E from "./badge/index.js";
14
+ import D, { StatusPillAction as O } from "./status-pill/index.js";
15
+ import k from "./spinner/index.js";
16
+ import A, { buttonVariants as j } from "./button/index.js";
17
+ import M, { CardDescription as N, CardHeader as P, CardTitle as F, Stat as I, StatRow as L } from "./card/index.js";
18
+ import R from "./code-block/index.js";
19
+ import z from "./chip/index.js";
20
+ import B, { PopoverClose as V, PopoverContent as H, PopoverTrigger as U } from "./popover/index.js";
21
+ import W from "./collapse/index.js";
22
+ import G from "./alert/index.js";
23
+ import K, { FormMessage as q, useField as J, useFieldProps as Y } from "./field/index.js";
24
+ import X, { InputGroupAddon as Z, InputGroupInput as Q } from "./input-group/index.js";
25
+ import { FieldChevron as $ } from "./utils/field-chevron.js";
26
+ import { useVirtualList as ee } from "./utils/useVirtualList.js";
27
+ import te, { ComboboxCreate as ne, ComboboxEmpty as re, ComboboxItem as ie, ComboboxList as ae, ComboboxPopup as oe, ComboboxSearch as se, ComboboxTrigger as ce } from "./combobox/index.js";
28
+ import le, { useToast as ue, useToastHost as de } from "./toast/index.js";
29
+ import fe, { DialogClose as pe, DialogFooter as me, useModal as he } from "./dialog/index.js";
30
+ import ge from "./confirm-dialog/index.js";
31
+ import _e from "./editable-cell/index.js";
32
+ import ve, { DisclosureContent as ye, DisclosureTrigger as be } from "./disclosure/index.js";
33
+ import xe from "./header/index.js";
34
+ import Se from "./inset/index.js";
35
+ import Ce from "./input/index.js";
36
+ import we from "./meter/index.js";
37
+ import { addMonths as Te, currentMonth as Ee, formatMonth as De, fromMonthIndex as Oe, isMonth as ke, monthIndex as Ae, monthNames as je, monthRange as Me, monthsBetween as Ne } from "./utils/month.js";
38
+ import Pe from "./month-picker/index.js";
39
+ import Fe from "./checkbox/index.js";
40
+ import { paletteColor as Ie } from "./chart/palette.js";
41
+ import { ChartTooltipCard as Le } from "./chart/tooltip.js";
42
+ import Re from "./chart/allocation.js";
43
+ import ze from "./chart/donut.js";
44
+ import Be, { ChartArea as Ve, ChartBar as He, ChartLine as Ue, ChartReference as We, niceTicks as Ge } from "./chart/index.js";
45
+ import Ke, { Radio as qe } from "./radio-group/index.js";
46
+ import { addDays as Je, addMonthsToDate as Ye, commonRanges as Xe, dayIndex as Ze, dayOfWeek as Qe, daysBetween as $e, daysInMonth as et, formatDate as tt, formatDateRange as nt, fromDayIndex as rt, isDate as it, today as at, weekStart as ot, weekdayNames as st } from "./utils/date.js";
47
+ import ct from "./calendar/index.js";
48
+ import lt, { DateRangePicker as ut } from "./date-picker/index.js";
49
+ import { RateUnavailableError as dt, convertMinor as ft, isRateTable as pt, rateBetween as mt } from "./utils/fx.js";
50
+ import ht, { MoneyConversionHint as gt, MoneyCurrencyMenu as _t, useMoneyInput as vt } from "./money-input/index.js";
51
+ import yt, { RadioCard as bt } from "./radio-cards/index.js";
52
+ import xt, { Pill as St, PillIndicator as Ct } from "./pills/index.js";
53
+ import wt from "./page-header/index.js";
54
+ import Tt from "./progress-ring/index.js";
55
+ import Et, { SegmentedItem as Dt } from "./segmented/index.js";
56
+ import Ot, { SelectGroup as kt, SelectItem as At, SelectSeparator as jt } from "./select/index.js";
57
+ import Mt, { SideNavGroup as Nt, SideNavLink as Pt } from "./side-nav/index.js";
58
+ import Ft from "./skeleton/index.js";
59
+ import It from "./slider/index.js";
60
+ import Lt, { TabBarItem as Rt } from "./tab-bar/index.js";
61
+ import { SelectionBar as zt, TableSelectCell as Bt, TableSelectHead as Vt, useSelection as Ht } from "./table/selection.js";
62
+ import { TableSwipeAction as Ut, TableSwipeRow as Wt } from "./table/swipe.js";
63
+ import Gt, { TableBody as Kt, TableCell as qt, TableContainer as Jt, TableEmpty as Yt, TableFooter as Xt, TableFooterCell as Zt, TableHead as Qt, TableHeader as $t, TableRow as en, TableSpacerRow as tn, useSort as nn } from "./table/index.js";
64
+ import { followSectionLink as rn } from "./utils/section-link.js";
65
+ import an from "./table-of-contents/index.js";
66
+ import on, { Tab as sn, TabList as cn, TabPanel as ln } from "./tabs/index.js";
67
+ import { TreeCell as un, TreeLabel as dn, TreeRow as fn, TreeToggle as pn, useTree as mn } from "./tree/index.js";
68
+ import hn from "./textarea/index.js";
69
+ import gn from "./toggle/index.js";
70
+ import _n, { TooltipContent as vn, TooltipTrigger as yn } from "./tooltip/index.js";
71
+ import { DEFAULT_THEME as bn, INTENSITIES as xn, PRESETS as Sn, applyPreset as Cn, applyTheme as wn, contrastRatio as Tn, customize as En, normalizeTheme as Dn, oklchToLinearRgb as On, resetTheme as kn, themeVars as An } from "./utils/theme.js";
72
+ import { prepareThemeWave as jn, themeWave as Mn } from "./utils/theme-wave.js";
73
+ import Nn, { ThemeScript as Pn, themeScript as Fn } from "./theme-toggle/index.js";
74
+ import { useHydrated as In } from "./utils/useHydrated.js";
75
+ import Ln, { Breadcrumb as Rn } from "./breadcrumbs/index.js";
76
+ import zn from "./code-input/index.js";
77
+ import Bn, { useCommandPaletteShortcut as Vn } from "./command-palette/index.js";
78
+ import Hn from "./empty-state/index.js";
79
+ import Un, { accepts as Wn } from "./file-drop/index.js";
80
+ import Gn, { pageRange as Kn } from "./pagination/index.js";
81
+ import qn from "./sparkline/index.js";
82
+ import Jn, { Step as Yn } from "./stepper/index.js";
83
+ import Xn from "./tag-input/index.js";
84
+ import Zn, { TimelineItem as Qn } from "./timeline/index.js";
85
+ import $n from "./kbd/index.js";
86
+ import er from "./range-slider/index.js";
87
+ import tr, { FilterChip as nr } from "./filter-bar/index.js";
88
+ import rr from "./keypad/index.js";
89
+ import ir from "./calendar-heatmap/index.js";
90
+ import ar from "./trend/index.js";
91
+ import or, { ICON_COLORS as sr } from "./icon-picker/index.js";
92
+ import { describeRepeat as cr, nextOccurrences as lr } from "./utils/repeat.js";
93
+ import ur from "./repeat-picker/index.js";
94
+ import dr from "./load-more/index.js";
95
+ import { SortableHandle as fr, SortableItem as pr, SortableList as mr } from "./sortable/index.js";
96
+ import hr from "./page-transition/index.js";
97
+ export { G as Alert, Re as AllocationBar, b as AnimatedMoney, y as AnimatedNumber, x as Avatar, w as Backdrop, E as Badge, Rn as Breadcrumb, Ln as Breadcrumbs, A as Button, ct as Calendar, ir as CalendarHeatmap, M as Card, N as CardDescription, P as CardHeader, F as CardTitle, Be as Chart, Ve as ChartArea, He as ChartBar, Ue as ChartLine, We as ChartReference, Le as ChartTooltipCard, Fe as Checkbox, z as Chip, R as CodeBlock, zn as CodeInput, W as Collapse, te as Combobox, ne as ComboboxCreate, re as ComboboxEmpty, ie as ComboboxItem, ae as ComboboxList, oe as ComboboxPopup, se as ComboboxSearch, ce as ComboboxTrigger, Bn as CommandPalette, ge as ConfirmDialog, bn as DEFAULT_THEME, lt as DatePicker, ut as DateRangePicker, fe as Dialog, pe as DialogClose, me as DialogFooter, ve as Disclosure, ye as DisclosureContent, be as DisclosureTrigger, ze as DonutChart, _e as EditableCell, Hn as EmptyState, K as Field, $ as FieldChevron, Un as FileDrop, tr as FilterBar, nr as FilterChip, q as FormMessage, xe as Header, sr as ICON_COLORS, xn as INTENSITIES, or as IconPicker, S as ImageCropError, Ce as Input, X as InputGroup, Z as InputGroupAddon, Q as InputGroupInput, Se as Inset, $n as Kbd, rr as Keypad, dr as LoadMore, i as Menu, a as MenuContent, o as MenuContextTrigger, s as MenuHeader, c as MenuItem, l as MenuSeparator, u as MenuTrigger, we as Meter, gt as MoneyConversionHint, _t as MoneyCurrencyMenu, ht as MoneyInput, d as MoneyParseError, Pe as MonthPicker, Sn as PRESETS, wt as PageHeader, hr as PageTransition, Gn as Pagination, St as Pill, Ct as PillIndicator, xt as Pills, B as Popover, V as PopoverClose, H as PopoverContent, U as PopoverTrigger, Tt as ProgressRing, qe as Radio, bt as RadioCard, yt as RadioCards, Ke as RadioGroup, er as RangeSlider, dt as RateUnavailableError, ur as RepeatPicker, Et as Segmented, Dt as SegmentedItem, Ot as Select, kt as SelectGroup, At as SelectItem, jt as SelectSeparator, zt as SelectionBar, Mt as SideNav, Nt as SideNavGroup, Pt as SideNavLink, Ft as Skeleton, It as Slider, fr as SortableHandle, pr as SortableItem, mr as SortableList, qn as Sparkline, k as Spinner, I as Stat, L as StatRow, D as StatusPill, O as StatusPillAction, Yn as Step, Jn as Stepper, sn as Tab, Lt as TabBar, Rt as TabBarItem, cn as TabList, ln as TabPanel, Gt as Table, Kt as TableBody, qt as TableCell, Jt as TableContainer, Yt as TableEmpty, Xt as TableFooter, Zt as TableFooterCell, Qt as TableHead, $t as TableHeader, an as TableOfContents, en as TableRow, Bt as TableSelectCell, Vt as TableSelectHead, tn as TableSpacerRow, Ut as TableSwipeAction, Wt as TableSwipeRow, on as Tabs, Xn as TagInput, hn as TextArea, Pn as ThemeScript, Nn as ThemeToggle, Zn as Timeline, Qn as TimelineItem, le as ToastProvider, gn as Toggle, _n as Tooltip, vn as TooltipContent, yn as TooltipTrigger, un as TreeCell, dn as TreeLabel, fn as TreeRow, pn as TreeToggle, ar as Trend, Wn as accepts, Je as addDays, Te as addMonths, Ye as addMonthsToDate, t as applyGraphicsMode, Cn as applyPreset, wn as applyTheme, j as buttonVariants, Xe as commonRanges, Tn as contrastRatio, ft as convertMinor, C as cropImageToSquare, f as currencySymbol, Ee as currentMonth, En as customize, T as cva, e as cx, Ze as dayIndex, Qe as dayOfWeek, $e as daysBetween, et as daysInMonth, cr as describeRepeat, n as detectGraphicsMode, rn as followSectionLink, p as formatAmount, tt as formatDate, nt as formatDateRange, m as formatMoney, De as formatMonth, rt as fromDayIndex, Oe as fromMonthIndex, it as isDate, ke as isMonth, pt as isRateTable, h as minorDigits, Ae as monthIndex, je as monthNames, Me as monthRange, Ne as monthsBetween, lr as nextOccurrences, Ge as niceTicks, Dn as normalizeTheme, On as oklchToLinearRgb, Kn as pageRange, Ie as paletteColor, g as parseMoney, _ as parseMoneyInput, jn as prepareThemeWave, mt as rateBetween, v as reducedMotion, kn as resetTheme, Fn as themeScript, An as themeVars, Mn as themeWave, at as today, r as useAnchoredPopup, Vn as useCommandPaletteShortcut, J as useField, Y as useFieldProps, In as useHydrated, he as useModal, vt as useMoneyInput, Ht as useSelection, nn as useSort, ue as useToast, de as useToastHost, mn as useTree, ee as useVirtualList, ot as weekStart, st as weekdayNames };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The end of a long list that has more: a "Load more" button, which also
3
+ * presses itself when it scrolls into view (`auto`, default). While `loading`
4
+ * it shows a spinner and won't ask again; once there's nothing left
5
+ * (`hasMore` false) it's gone. Put it after the list, or in a table's last row.
6
+ */
7
+ export default function LoadMore({ onLoadMore, hasMore, loading, auto, label, loadingLabel, className, }: LoadMoreProps): import('react').JSX.Element | null;
8
+ export interface LoadMoreProps {
9
+ onLoadMore: () => void;
10
+ hasMore: boolean;
11
+ /** While true, it shows a spinner and won't ask for more. */
12
+ loading?: boolean;
13
+ /** Load when it scrolls into view, not only on press (default true). */
14
+ auto?: boolean;
15
+ label?: string;
16
+ loadingLabel?: string;
17
+ className?: string;
18
+ }
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/load-more/index.tsx"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC7B,UAAU,EACV,OAAO,EACP,OAAe,EACf,IAAW,EACX,KAAmB,EACnB,YAA8B,EAC9B,SAAS,GACZ,EAAE,aAAa,sCAmCf;AAED,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { cx as e } from "../utils/cx.js";
3
+ import t from "../spinner/index.js";
4
+ import n from "../button/index.js";
5
+ import { useEffect as r, useRef as i } from "react";
6
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ //#region packages/load-more/index.tsx
8
+ function c({ onLoadMore: c, hasMore: l, loading: u = !1, auto: d = !0, label: f = "Load more", loadingLabel: p = "Loading more…", className: m }) {
9
+ let h = i(null), g = i(c);
10
+ return r(() => {
11
+ g.current = c;
12
+ }), r(() => {
13
+ let e = h.current;
14
+ if (!d || !l || u || !e || typeof IntersectionObserver > "u") return;
15
+ let t = new IntersectionObserver((e) => {
16
+ e.some((e) => e.isIntersecting) && (t.disconnect(), g.current());
17
+ });
18
+ return t.observe(e), () => t.disconnect();
19
+ }, [
20
+ d,
21
+ l,
22
+ u
23
+ ]), l ? /* @__PURE__ */ o("div", {
24
+ ref: h,
25
+ className: e("zen__load-more flex justify-center py-3", m),
26
+ children: /* @__PURE__ */ o(n, {
27
+ variant: "ghost",
28
+ size: "sm",
29
+ "aria-busy": u,
30
+ disabled: u,
31
+ onClick: c,
32
+ children: u ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(t, { className: "size-3.5" }), p] }) : f
33
+ })
34
+ }) : null;
35
+ }
36
+ //#endregion
37
+ export { c as default };
@@ -4,7 +4,8 @@ import { ComponentProps, ReactNode } from 'react';
4
4
  * clicks and Escape close it and focus returns to the button. Arrow keys, Home
5
5
  * and End move between items. Put a MenuTrigger (its content is yours: an icon,
6
6
  * an avatar, a label) and a MenuContent inside; fill the content with MenuItem,
7
- * MenuSeparator and MenuHeader.
7
+ * MenuSeparator and MenuHeader. For a context menu, put a MenuContextTrigger
8
+ * around what it's for instead of a MenuTrigger.
8
9
  */
9
10
  export default function Menu({ onOpenChange, children }: MenuProps): import('react').JSX.Element;
10
11
  /**
@@ -12,8 +13,20 @@ export default function Menu({ onOpenChange, children }: MenuProps): import('rea
12
13
  * icon or avatar; the menu is named after it. With `asChild`, your own button instead.
13
14
  */
14
15
  export declare function MenuTrigger({ asChild, style, children, ...rest }: MenuTriggerProps): import('react').JSX.Element;
15
- /** The menu panel: glass, below the button (above it if there's no room), lined up with its end edge by default. */
16
+ /**
17
+ * The menu panel: glass, below the button (above it if there's no room), lined
18
+ * up with its end edge by default. A context menu opens from the pointer
19
+ * instead; name it with `aria-label`.
20
+ */
16
21
  export declare function MenuContent({ align, offset, className, style, children, ...rest }: MenuContentProps): import('react').JSX.Element;
22
+ /**
23
+ * What a context menu is for, e.g. a row or a card: right-click (or the
24
+ * keyboard's menu key, or Shift+F10) opens the Menu where the pointer is, and
25
+ * so does a long press on a phone. While its menu is open it has
26
+ * `data-popup-open`, to show what the menu is for. With `asChild`, your own
27
+ * element instead of a div.
28
+ */
29
+ export declare function MenuContextTrigger({ asChild, disabled, className, onContextMenu, onPointerDown, onClickCapture, children, ...rest }: MenuContextTriggerProps): import('react').JSX.Element;
17
30
  /**
18
31
  * One choice in a Menu: closes the menu, then runs `onSelect`. An `icon` sits
19
32
  * before the label (muted, or red with the label when `destructive`). With
@@ -36,8 +49,14 @@ export interface MenuTriggerProps extends ComponentProps<'button'> {
36
49
  /** Put the trigger's props on your own button element instead of rendering one. */
37
50
  asChild?: boolean;
38
51
  }
52
+ export interface MenuContextTriggerProps extends ComponentProps<'div'> {
53
+ /** Put its props on your own element (the single child) instead of a div. */
54
+ asChild?: boolean;
55
+ /** Leave the browser's own context menu. */
56
+ disabled?: boolean;
57
+ }
39
58
  export interface MenuContentProps extends ComponentProps<'div'> {
40
- /** Which edge of the button the menu lines up with (default end), or centred on it. */
59
+ /** Which edge of the button the menu lines up with (default end; a context menu starts at the pointer), or centred on it. */
41
60
  align?: 'start' | 'end' | 'center';
42
61
  /** Gap between the button and the menu, in px. */
43
62
  offset?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/menu/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA4C,SAAS,EAAqB,MAAM,OAAO,CAAC;AAkB/G;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,SAAS,+BAejE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BAelF;AAED,oHAAoH;AACpH,wBAAgB,WAAW,CAAC,EAAE,KAAa,EAAE,MAAU,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BA2C/G;AAKD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACrB,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,IAAI,EACV,EAAE,aAAa,+BAwBf;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAElE;AAED,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAEvE;AAED,MAAM,WAAW,SAAS;IACtB,mFAAmF;IACnF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IAC9D,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,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