@duro-app/ui 5.21.0 → 5.23.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 (110) hide show
  1. package/dist/Table-Cw1B14R3.js.map +1 -1
  2. package/dist/components/AppShell/AppShell.d.ts +10 -1
  3. package/dist/components/AppShell/AppShell.d.ts.map +1 -1
  4. package/dist/components/AppShell/AppShell.stories.d.ts +8 -0
  5. package/dist/components/AppShell/AppShell.stories.d.ts.map +1 -1
  6. package/dist/components/AppShell/styles.css.d.ts +7 -0
  7. package/dist/components/AppShell/styles.css.d.ts.map +1 -1
  8. package/dist/components/CodeBlock/CodeBlock.d.ts +3 -21
  9. package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -1
  10. package/dist/components/CodeBlock/CodeBlock.stories.d.ts +4 -0
  11. package/dist/components/CodeBlock/CodeBlock.stories.d.ts.map +1 -1
  12. package/dist/components/CodeBlock/DiffLines.d.ts +9 -0
  13. package/dist/components/CodeBlock/DiffLines.d.ts.map +1 -0
  14. package/dist/components/CodeBlock/diffRoles.d.ts +14 -0
  15. package/dist/components/CodeBlock/diffRoles.d.ts.map +1 -0
  16. package/dist/components/CodeBlock/styles.css.d.ts +24 -0
  17. package/dist/components/CodeBlock/styles.css.d.ts.map +1 -1
  18. package/dist/components/CodeBlock/types.d.ts +29 -0
  19. package/dist/components/CodeBlock/types.d.ts.map +1 -0
  20. package/dist/components/Drawer/touchInput.d.ts +5 -1
  21. package/dist/components/Drawer/touchInput.d.ts.map +1 -1
  22. package/dist/components/Prose/Prose.d.ts +1 -1
  23. package/dist/components/SplitPane/SplitPane.d.ts +10 -1
  24. package/dist/components/SplitPane/SplitPane.d.ts.map +1 -1
  25. package/dist/components/SplitPane/SplitPane.stories.d.ts +11 -0
  26. package/dist/components/SplitPane/SplitPane.stories.d.ts.map +1 -1
  27. package/dist/components/SplitPane/styles.css.d.ts +22 -0
  28. package/dist/components/SplitPane/styles.css.d.ts.map +1 -1
  29. package/dist/components/Textarea/Textarea.d.ts +14 -2
  30. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  31. package/dist/components/Textarea/Textarea.meta.d.ts.map +1 -1
  32. package/dist/components/Textarea/Textarea.stories.d.ts +2 -0
  33. package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
  34. package/dist/components/Textarea/autoGrow.d.ts +22 -0
  35. package/dist/components/Textarea/autoGrow.d.ts.map +1 -0
  36. package/dist/components/Textarea/grow.css.d.ts +12 -0
  37. package/dist/components/Textarea/grow.css.d.ts.map +1 -0
  38. package/dist/components/Textarea/grow.d.ts +2 -0
  39. package/dist/components/Textarea/grow.d.ts.map +1 -0
  40. package/dist/components/Textarea/native.css.d.ts +8 -0
  41. package/dist/components/Textarea/native.css.d.ts.map +1 -0
  42. package/dist/components/Textarea/useAutoGrowFallback.d.ts +9 -0
  43. package/dist/components/Textarea/useAutoGrowFallback.d.ts.map +1 -0
  44. package/dist/components/Toolbar/Toolbar.d.ts +2 -14
  45. package/dist/components/Toolbar/Toolbar.d.ts.map +1 -1
  46. package/dist/components/Toolbar/types.d.ts +15 -0
  47. package/dist/components/Toolbar/types.d.ts.map +1 -0
  48. package/dist/components/VirtualList/VirtualList.d.ts +5 -26
  49. package/dist/components/VirtualList/VirtualList.d.ts.map +1 -1
  50. package/dist/components/VirtualList/VirtualList.meta.d.ts.map +1 -1
  51. package/dist/components/VirtualList/VirtualList.stories.d.ts +16 -0
  52. package/dist/components/VirtualList/VirtualList.stories.d.ts.map +1 -1
  53. package/dist/components/VirtualList/native.css.d.ts +14 -0
  54. package/dist/components/VirtualList/native.css.d.ts.map +1 -0
  55. package/dist/components/VirtualList/props.d.ts +31 -0
  56. package/dist/components/VirtualList/props.d.ts.map +1 -0
  57. package/dist/components/VirtualList/styles.css.d.ts +4 -0
  58. package/dist/components/VirtualList/styles.css.d.ts.map +1 -1
  59. package/dist/index.css +1 -1
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +4442 -4215
  63. package/dist/index.js.map +1 -1
  64. package/package.json +2 -2
  65. package/src/components/AppShell/AppShell.meta.ts +1 -1
  66. package/src/components/AppShell/AppShell.native.tsx +3 -0
  67. package/src/components/AppShell/AppShell.stories.tsx +68 -0
  68. package/src/components/AppShell/AppShell.tsx +16 -5
  69. package/src/components/AppShell/styles.css.ts +10 -0
  70. package/src/components/CodeBlock/CodeBlock.meta.ts +1 -1
  71. package/src/components/CodeBlock/CodeBlock.native.tsx +33 -0
  72. package/src/components/CodeBlock/CodeBlock.stories.tsx +54 -0
  73. package/src/components/CodeBlock/CodeBlock.tsx +8 -20
  74. package/src/components/CodeBlock/DiffLines.tsx +32 -0
  75. package/src/components/CodeBlock/diffRoles.ts +40 -0
  76. package/src/components/CodeBlock/styles.css.ts +17 -0
  77. package/src/components/CodeBlock/types.ts +29 -0
  78. package/src/components/Drawer/touchInput.ts +16 -2
  79. package/src/components/Prose/Prose.meta.ts +1 -1
  80. package/src/components/Prose/Prose.native.tsx +23 -0
  81. package/src/components/Prose/Prose.tsx +1 -1
  82. package/src/components/Prose/styles.native.css.ts +15 -0
  83. package/src/components/SplitPane/SplitPane.meta.ts +1 -1
  84. package/src/components/SplitPane/SplitPane.native.tsx +4 -0
  85. package/src/components/SplitPane/SplitPane.stories.tsx +207 -1
  86. package/src/components/SplitPane/SplitPane.tsx +50 -7
  87. package/src/components/SplitPane/styles.css.ts +28 -0
  88. package/src/components/Textarea/Textarea.meta.ts +6 -2
  89. package/src/components/Textarea/Textarea.stories.tsx +136 -1
  90. package/src/components/Textarea/Textarea.tsx +50 -3
  91. package/src/components/Textarea/autoGrow.ts +33 -0
  92. package/src/components/Textarea/grow.css.ts +18 -0
  93. package/src/components/Textarea/grow.native.ts +1 -0
  94. package/src/components/Textarea/grow.ts +1 -0
  95. package/src/components/Textarea/native.css.ts +16 -0
  96. package/src/components/Textarea/useAutoGrowFallback.native.ts +5 -0
  97. package/src/components/Textarea/useAutoGrowFallback.ts +35 -0
  98. package/src/components/Toolbar/Toolbar.meta.ts +1 -1
  99. package/src/components/Toolbar/Toolbar.native.tsx +27 -0
  100. package/src/components/Toolbar/Toolbar.tsx +3 -14
  101. package/src/components/Toolbar/types.ts +15 -0
  102. package/src/components/VirtualList/VirtualList.meta.ts +2 -1
  103. package/src/components/VirtualList/VirtualList.native.tsx +80 -0
  104. package/src/components/VirtualList/VirtualList.stories.tsx +171 -1
  105. package/src/components/VirtualList/VirtualList.tsx +118 -27
  106. package/src/components/VirtualList/native.css.ts +14 -0
  107. package/src/components/VirtualList/props.ts +31 -0
  108. package/src/components/VirtualList/styles.css.ts +7 -0
  109. package/src/index.native.ts +8 -0
  110. package/src/index.ts +1 -0
@@ -1,5 +1,7 @@
1
1
  import { ReactNode, Ref } from 'react';
2
2
  export type AppShellCollapse = 'sm' | 'md' | 'lg';
3
+ /** `page`: the document scrolls (a docs site). `main`: the shell is the viewport, Main scrolls (an app). */
4
+ export type AppShellScroll = 'page' | 'main';
3
5
  interface RootProps {
4
6
  /** The narrow-width button that opens the navigation ("Menu"), from your text catalog. */
5
7
  menuLabel: string;
@@ -17,13 +19,20 @@ interface RootProps {
17
19
  * becomes a Drawer behind the Menu button. Default `sm`.
18
20
  */
19
21
  collapseBelow?: AppShellCollapse;
22
+ /**
23
+ * What scrolls. `page` (default): the document, a page that grows with its
24
+ * content. `main`: the shell is exactly the viewport's height and Main
25
+ * scrolls on its own, so a SplitPane or VirtualList inside it can fill Main
26
+ * and scroll its own panes (an app such as a chat or a mail client).
27
+ */
28
+ scroll?: AppShellScroll;
20
29
  /**
21
30
  * `AppShell.Rail`, `AppShell.Main` and an optional `AppShell.Header`, as
22
31
  * direct children (Root places the Header's content in its bar).
23
32
  */
24
33
  children: ReactNode;
25
34
  }
26
- declare function Root({ menuLabel, closeLabel, skipLabel, brand, collapseBelow, children, }: RootProps): import("react/jsx-runtime").JSX.Element;
35
+ declare function Root({ menuLabel, closeLabel, skipLabel, brand, collapseBelow, scroll, children, }: RootProps): import("react/jsx-runtime").JSX.Element;
27
36
  export interface AppShellRailState {
28
37
  /**
29
38
  * Closes the drawer. Call it after any selection in the navigation — the
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAA;AA0Bd,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAsDjD,UAAU,SAAS;IACjB,0FAA0F;IAC1F,SAAS,EAAE,MAAM,CAAA;IACjB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAA;IAClB,4FAA4F;IAC5F,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAoB,EACpB,QAAQ,GACT,EAAE,SAAS,2CAqFX;AAID,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,KAAK,WAAW,GAAG,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAA;AAExE,UAAU,SAAS;IACjB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,QAAQ,EAAE,WAAW,CAAA;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAID,iBAAS,IAAI,CAAC,EAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAC,EAAE,SAAS,2CA6CnE;AAID,UAAU,WAAW;IACnB;;;;OAI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;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,KAAK,WAAW,GAAG,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAA;AAExE,UAAU,SAAS;IACjB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,QAAQ,EAAE,WAAW,CAAA;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAID,iBAAS,IAAI,CAAC,EAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAC,EAAE,SAAS,2CA6CnE;AAID,UAAU,WAAW;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,iBAAS,MAAM,CAAC,EAAC,QAAQ,EAAC,EAAE,WAAW,2CAQtC;AAID,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,qEAAqE;IACrE,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAA;CACvB;AAED,iBAAS,IAAI,CAAC,EAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAC,EAAE,SAAS,2CAoB3C;AAED,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAA"}
@@ -194,4 +194,12 @@ export declare const NoLayoutShift: Story;
194
194
  * as a test and stays out of the dev sidebar (there is no Vitest there).
195
195
  */
196
196
  export declare const MenuButtonTouchTarget: Story;
197
+ /**
198
+ * `scroll="main"`: an app, not a document. The shell is the viewport's height and Main scrolls on
199
+ * its own, so a SplitPane inside it fills Main and each pane scrolls by itself — here a 500-row
200
+ * VirtualList that mounts only the rows in view.
201
+ */
202
+ export declare const ScrollMain: Story;
203
+ /** ScrollMain's checks: Main stays within the viewport and the list windows its rows. */
204
+ export declare const ScrollMainBoundsMain: Story;
197
205
  //# sourceMappingURL=AppShell.stories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E,KAqC1B,CAAA;AAiCD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAW3B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAgBnC,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAuCxB,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,EAAE,KAelC,CAAA"}
@@ -12,6 +12,9 @@ export declare const styles: Readonly<{
12
12
  readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
13
13
  readonly gridTemplateRows: css.StyleXClassNameFor<"gridTemplateRows", "auto 1fr">;
14
14
  }>;
15
+ readonly gridViewport: Readonly<{
16
+ readonly height: css.StyleXClassNameFor<"height", "100dvh">;
17
+ }>;
15
18
  readonly gridSm: Readonly<{
16
19
  readonly gridTemplateColumns: css.StyleXClassNameFor<"gridTemplateColumns", string>;
17
20
  readonly gridTemplateAreas: css.StyleXClassNameFor<"gridTemplateAreas", "\"bar\" \"main\"" | "\"rail bar\" \"rail main\"">;
@@ -171,6 +174,10 @@ export declare const styles: Readonly<{
171
174
  readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
172
175
  readonly outlineStyle: css.StyleXClassNameFor<"outlineStyle", "none">;
173
176
  }>;
177
+ readonly mainScrolls: Readonly<{
178
+ readonly minHeight: css.StyleXClassNameFor<"minHeight", 0>;
179
+ readonly overflowY: css.StyleXClassNameFor<"overflowY", "auto">;
180
+ }>;
174
181
  readonly mainSm: Readonly<{
175
182
  readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
176
183
  readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAkCpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwLjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAkCpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkMjB,CAAA"}
@@ -1,22 +1,5 @@
1
- import { ReactNode } from 'react';
2
- interface CodeBlockProps {
3
- /**
4
- * The code: text, or the `<code>` element a Markdown renderer produced
5
- * (highlighted spans included). What is copied is its text content.
6
- */
7
- children: ReactNode;
8
- /** The copy button's label ("Copy"), from your text catalog. */
9
- copyLabel: string;
10
- /**
11
- * The label while the copy is confirmed ("Copied"), also announced to
12
- * screen readers.
13
- */
14
- copiedLabel: string;
15
- /** How long the confirmation stays, in milliseconds. Default 2000. */
16
- copiedDuration?: number;
17
- /** Called when the clipboard refuses the write (an insecure context, a denied permission). */
18
- onCopyError?: (error: unknown) => void;
19
- }
1
+ import { CodeBlockProps } from './types';
2
+ export type { CodeBlockProps } from './types';
20
3
  /**
21
4
  * CodeBlock — a block of code with a copy button: a `pre` that scrolls
22
5
  * sideways when a line is long (and is then focusable, so a keyboard can
@@ -24,6 +7,5 @@ interface CodeBlockProps {
24
7
  * confirms ("Copied") on the button and through a polite LiveRegion. Inside
25
8
  * `Prose`, pass it as the Markdown renderer's `pre`.
26
9
  */
27
- export declare function CodeBlock({ children, copyLabel, copiedLabel, copiedDuration, onCopyError, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
28
- export {};
10
+ export declare function CodeBlock({ children, language, copyLabel, copiedLabel, copiedDuration, onCopyError, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
29
11
  //# sourceMappingURL=CodeBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,SAAS,EAAC,MAAM,OAAO,CAAA;AAO9E,UAAU,cAAc;IACtB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,cAAqB,EACrB,WAAW,GACZ,EAAE,cAAc,2CA2DhB"}
1
+ {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAI3C,YAAY,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,cAAqB,EACrB,WAAW,GACZ,EAAE,cAAc,2CA4DhB"}
@@ -70,4 +70,8 @@ export declare const CopiesAndAnnounces: Story;
70
70
  export declare const CopyRefused: Story;
71
71
  /** Without onCopyError, a refused clipboard still reaches the console. */
72
72
  export declare const CopyRefusedWithoutHandler: Story;
73
+ /** `language="diff"`: added, removed and hunk lines are tinted from the status tokens. */
74
+ export declare const Diff: Story;
75
+ /** Diff's checks: each line carries its role, the language is exposed, copy keeps the raw text. */
76
+ export declare const DiffChecks: Story;
73
77
  //# sourceMappingURL=CodeBlock.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.stories.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAQpD,UAAU,aAAa;IACrB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAA;IACtB,iEAAiE;IACjE,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACtC;AAKD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBqB,CAAA;AAE/B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAQlC;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAU,CAAA;AAEnC,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAA;AAED,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,EAAE,KAUnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAqBrC,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAA;AAED,kEAAkE;AAClE,eAAO,M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EAAE,KAkCxB,CAAA"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The lines of a unified diff, each tagged with its role (`data-diff-line`)
3
+ * and coloured from the success, error and info subtle tokens. The `+`/`-`
4
+ * characters stay in the text, so colour is never the only signal.
5
+ */
6
+ export declare function DiffLines({ text }: {
7
+ text: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=DiffLines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffLines.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/DiffLines.tsx"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAC,IAAI,EAAC,EAAE;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,2CAc/C"}
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ /** What a line of a unified diff is, for its colour. */
3
+ export type DiffLineRole = 'added' | 'removed' | 'hunk' | 'context';
4
+ export interface DiffLine {
5
+ /** The line with its newline, so the lines joined are the raw text. */
6
+ text: string;
7
+ role: DiffLineRole;
8
+ }
9
+ /** `+++ b/file` and `--- a/file` are file headers, not changes. */
10
+ export declare function diffLineRole(line: string): DiffLineRole;
11
+ export declare function splitDiffLines(text: string): DiffLine[];
12
+ /** The text content of a node: strings, numbers and the elements around them. */
13
+ export declare function textOf(node: ReactNode): string;
14
+ //# sourceMappingURL=diffRoles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diffRoles.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/diffRoles.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAA;AAE9D,wDAAwD;AACxD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;AAEnE,MAAM,WAAW,QAAQ;IACvB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMvD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE,CASvD;AAED,iFAAiF;AACjF,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAO9C"}
@@ -37,5 +37,29 @@ export declare const styles: Readonly<{
37
37
  readonly outlineColor: css.StyleXClassNameFor<"outlineColor", string>;
38
38
  readonly outlineOffset: css.StyleXClassNameFor<"outlineOffset", string | 0>;
39
39
  }>;
40
+ readonly line: Readonly<{
41
+ readonly display: css.StyleXClassNameFor<"display", "block">;
42
+ }>;
43
+ readonly added: Readonly<{
44
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
45
+ }>;
46
+ readonly removed: Readonly<{
47
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
48
+ }>;
49
+ readonly hunk: Readonly<{
50
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
51
+ readonly color: css.StyleXClassNameFor<"color", string>;
52
+ }>;
53
+ readonly scroll: Readonly<{
54
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
55
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
56
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
57
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
58
+ }>;
59
+ readonly text: Readonly<{
60
+ readonly color: css.StyleXClassNameFor<"color", string>;
61
+ readonly userSelect: css.StyleXClassNameFor<"userSelect", "text">;
62
+ readonly whiteSpace: css.StyleXClassNameFor<"whiteSpace", "pre">;
63
+ }>;
40
64
  }>;
41
65
  //# sourceMappingURL=styles.css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAKpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAKpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DjB,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ export interface CodeBlockProps {
3
+ /**
4
+ * The code: text, or the `<code>` element a Markdown renderer produced
5
+ * (highlighted spans included). What is copied is its text content.
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * The code's language ("diff", "ts"), exposed as `data-language` on the
10
+ * `pre`. `"diff"` also gives each added (`+`), removed (`-`) and hunk (`@@`)
11
+ * line its own colour; what is copied stays the raw text. Diff rendering
12
+ * works on the text content, so highlighted spans inside `children` are
13
+ * flattened to plain text. The language is a data attribute only: it is not
14
+ * announced to assistive technology.
15
+ */
16
+ language?: string;
17
+ /** The copy button's label ("Copy"), from your text catalog. */
18
+ copyLabel: string;
19
+ /**
20
+ * The label while the copy is confirmed ("Copied"), also announced to
21
+ * screen readers.
22
+ */
23
+ copiedLabel: string;
24
+ /** How long the confirmation stays, in milliseconds. Default 2000. */
25
+ copiedDuration?: number;
26
+ /** Called when the clipboard refuses the write (an insecure context, a denied permission). */
27
+ onCopyError?: (error: unknown) => void;
28
+ }
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC"}
@@ -14,7 +14,11 @@ export type Point = {
14
14
  * `CDPSession` is empty until the provider's typings load; `send` exists at runtime.
15
15
  */
16
16
  export declare function cdpSend(method: string, params: object): Promise<unknown>;
17
- /** Set the page's viewport (test runner only, like `cdpSend`). */
17
+ /**
18
+ * Set the page's viewport under the test runner. In dev Storybook `vitest/browser`
19
+ * refuses to load (that refusal only); there the story keeps the browser's own
20
+ * viewport instead of failing to render. Any other import failure is thrown.
21
+ */
18
22
  export declare function setViewport(width: number, height: number): Promise<void>;
19
23
  export declare const pause: (ms: number) => Promise<unknown>;
20
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"touchInput.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/touchInput.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAE1C;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAI3D;AAED,kEAAkE;AAClE,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAG9D;AAED,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAA0C,CAAA;AAE1E;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAWtC;AASD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,SAAI,iBAWhE;AAED,oBAAoB;AACpB,wBAAsB,QAAQ,CAAC,EAAE,EAAE,KAAK,iBAGvC;AAED,mEAAmE;AACnE,wBAAgB,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,CAGzC"}
1
+ {"version":3,"file":"touchInput.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/touchInput.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAE1C;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAI3D;AAKD;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAU9D;AAED,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAA0C,CAAA;AAE1E;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAWtC;AASD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,SAAI,iBAWhE;AAED,oBAAoB;AACpB,wBAAsB,QAAQ,CAAC,EAAE,EAAE,KAAK,iBAGvC;AAED,mEAAmE;AACnE,wBAAgB,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,CAGzC"}
@@ -10,7 +10,7 @@ interface ProseProps {
10
10
  * output): headings, paragraphs, lists, tables, blockquotes, inline code,
11
11
  * links and images are styled from tokens by descendant rules scoped to it.
12
12
  * Duro components inside it (a TextLink, a CodeBlock) keep their own styles,
13
- * and an app's own CSS wins over every Prose rule. Web only.
13
+ * and an app's own CSS wins over every Prose rule. Native: Prose.native.tsx.
14
14
  */
15
15
  export declare function Prose({ children, ref }: ProseProps): import("react/jsx-runtime").JSX.Element;
16
16
  export {};
@@ -15,6 +15,15 @@ interface RootProps {
15
15
  maxSize?: SizeToken;
16
16
  /** Below this breakpoint, measured on the split's own width, the panes stack. Default: `sm` */
17
17
  collapseBelow?: Breakpoint;
18
+ /**
19
+ * Controlled: shrink the primary pane to a strip (the `iconButton` size),
20
+ * show `collapsedContent` in it and remove the handle. The pane's own
21
+ * children stay mounted (their state is kept) but are inert and hidden. When
22
+ * it turns false the pane returns to its prior width. Ignored when stacked.
23
+ */
24
+ collapsed?: boolean;
25
+ /** What the strip shows while `collapsed` (an expand button, icons). */
26
+ collapsedContent?: ReactNode;
18
27
  /** The handle's accessible name ("Resize list"). */
19
28
  'aria-label': string;
20
29
  }
@@ -24,7 +33,7 @@ interface RootProps {
24
33
  * handle (pointer drag, arrow keys, Home and End); the second takes the rest.
25
34
  * Below `collapseBelow` the panes stack in one column and the handle goes.
26
35
  */
27
- declare function Root({ children, defaultSize, size: controlledSize, onSizeChange, minSize, maxSize, collapseBelow, 'aria-label': label, }: RootProps): import("react/jsx-runtime").JSX.Element;
36
+ declare function Root({ children, defaultSize, size: controlledSize, onSizeChange, minSize, maxSize, collapseBelow, collapsed, collapsedContent, 'aria-label': label, }: RootProps): import("react/jsx-runtime").JSX.Element;
28
37
  declare function Pane({ children }: {
29
38
  children: ReactNode;
30
39
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"SplitPane.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane/SplitPane.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAA;AAEd,OAAO,EAAuB,KAAK,SAAS,EAAC,MAAM,uBAAuB,CAAA;AAC1E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAA;AA+BvE,UAAU,SAAS;IACjB,QAAQ,EAAE,S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AI,CAAA;IACnC,4EAA4E;IAC5E,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,wEAAwE;IACxE,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,+FAA+F;IAC/F,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;GAKG;AACH,iBAAS,IAAI,CAAC,EACZ,QAAQ,EACR,WAAwB,EACxB,IAAI,EAAE,cAAc,EACpB,YAAY,EACZ,OAAoB,EACpB,OAAmB,EACnB,aAAoB,EACpB,SAAiB,EACjB,gBAAgB,EAChB,YAAY,EAAE,KAAK,GACpB,EAAE,SAAS,2CAmCX;AAED,iBAAS,IAAI,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CA0C9C;AAED,iBAAS,MAAM,mDAkFd;AAED,eAAO,MAAM,SAAS;;;;CAIrB,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
+ import { ReactNode } from 'react';
2
3
  import { SizeToken } from '@duro-app/tokens/keys';
3
4
  import { Breakpoint } from '@duro-app/tokens/tokens/breakpoints.css';
4
5
  declare const meta: Meta;
@@ -10,8 +11,18 @@ interface SplitArgs {
10
11
  maxSize: SizeToken;
11
12
  collapseBelow: Breakpoint;
12
13
  onSizeChange?: (px: number) => void;
14
+ collapsed?: boolean;
15
+ collapsedContent?: ReactNode;
13
16
  }
14
17
  export declare const Default: StoryObj<SplitArgs>;
15
18
  export declare const KeyboardMovesTheSeparator: Story;
16
19
  export declare const NarrowStacksInOneColumn: Story;
20
+ /**
21
+ * `collapsed`: the first pane shrinks to a strip holding `collapsedContent`, the
22
+ * handle goes away, and expanding restores the width it had.
23
+ */
24
+ export declare const Collapsed: Story;
25
+ export declare const CollapsedShowsTheStrip: Story;
26
+ export declare const CollapseKeepsChildState: Story;
27
+ export declare const VirtualListsFillTheirPanes: Story;
17
28
  //# sourceMappingURL=SplitPane.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplitPane.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane/SplitPane.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAGpD,OAAO,EAAuB,KAAK,SAAS,EAAC,MAAM,uBAAuB,CAAA;AAC1E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAA;AAQvE,QAAA,MAAM,IAAI,EAAE,IAGX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAOrB,UAAU,SAAS;IACjB,WAAW,EAAE,SAAS,CAAA;IACtB,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,EAAE,SAAS,CAAA;IAClB,aAAa,EAAE,UAAU,CAAA;IACzB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAkDD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,SAAS,CAkBvC,CAAA;AAID,eAAO,MAAM,yBAAyB,EAAE,KA4BvC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAcrC,CAAA"}
1
+ {"version":3,"file":"SplitPane.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane/SplitPane.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAW,KAAK,SAAS,EAAC,MAAM,OAAO,CAAA;AAE9C,OAAO,EAAuB,KAAK,SAAS,EAAC,MAAM,uBAAuB,CAAA;AAC1E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAA;AAYvE,QAAA,MAAM,IAAI,EAAE,IAGX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAOrB,UAAU,SAAS;IACjB,WAAW,EAAE,SAAS,CAAA;IACtB,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,EAAE,SAAS,CAAA;IAClB,aAAa,EAAE,UAAU,CAAA;IACzB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAyDD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,SAAS,CAkBvC,CAAA;AAID,eAAO,MAAM,yBAAyB,EAAE,KA4BvC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAcrC,CAAA;AA2BD;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KA8DpC,CAAA;AAgCD,eAAO,MAAM,uBAAuB,EAAE,KAoBrC,CAAA;AA0BD,eAAO,MAAM,0BAA0B,EAAE,KAiBxC,CAAA"}
@@ -22,6 +22,28 @@ export declare const styles: Readonly<{
22
22
  readonly minWidth: css.StyleXClassNameFor<"minWidth", 0>;
23
23
  readonly overflow: css.StyleXClassNameFor<"overflow", "auto">;
24
24
  }>;
25
+ readonly primaryStrip: Readonly<{
26
+ readonly position: css.StyleXClassNameFor<"position", "relative">;
27
+ readonly overflow: css.StyleXClassNameFor<"overflow", "hidden">;
28
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
29
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
30
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
31
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
32
+ readonly borderRightWidth: css.StyleXClassNameFor<"borderRightWidth", string>;
33
+ readonly borderRightStyle: css.StyleXClassNameFor<"borderRightStyle", "solid">;
34
+ readonly borderRightColor: css.StyleXClassNameFor<"borderRightColor", string>;
35
+ }>;
36
+ readonly stowed: Readonly<{
37
+ readonly position: css.StyleXClassNameFor<"position", "absolute">;
38
+ readonly top: css.StyleXClassNameFor<"top", 0>;
39
+ readonly left: css.StyleXClassNameFor<"left", 0>;
40
+ readonly visibility: css.StyleXClassNameFor<"visibility", "hidden">;
41
+ readonly pointerEvents: css.StyleXClassNameFor<"pointerEvents", "none">;
42
+ }>;
43
+ readonly fill: Readonly<{
44
+ readonly height: css.StyleXClassNameFor<"height", "100%">;
45
+ readonly minHeight: css.StyleXClassNameFor<"minHeight", 0>;
46
+ }>;
25
47
  readonly primarySize: (px: number) => readonly [Readonly<{
26
48
  width: css.StyleXClassNameFor<"width", number>;
27
49
  }>, css.InlineStyles];
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAMpC;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqEjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAMpC;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiGjB,CAAA"}
@@ -1,5 +1,17 @@
1
+ import { ListboxAnchorProps } from '../Listbox/Listbox';
1
2
  export type TextareaVariant = 'default' | 'error';
2
- interface TextareaProps {
3
+ /** `maxRows` only means something on a field that grows. */
4
+ type GrowProps = {
5
+ /** The height follows the content, from `rows` up to `maxRows`, then it scrolls. */
6
+ autoGrow: true;
7
+ /** The most rows the field shows before it scrolls. Default: no limit */
8
+ maxRows?: number;
9
+ } | {
10
+ autoGrow?: false;
11
+ maxRows?: never;
12
+ };
13
+ type TextareaProps = Partial<ListboxAnchorProps> & GrowProps & TextareaBaseProps;
14
+ interface TextareaBaseProps {
3
15
  variant?: TextareaVariant;
4
16
  name?: string;
5
17
  placeholder?: string;
@@ -18,6 +30,6 @@ interface TextareaProps {
18
30
  onKeyUp?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
19
31
  ref?: React.Ref<HTMLTextAreaElement>;
20
32
  }
21
- export declare function Textarea({ variant, name, placeholder, required, rows, value, defaultValue, disabled, autoFocus, onChange, onBlur, onFocus, onKeyDown, onKeyUp, ref, }: TextareaProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function Textarea({ variant, name, placeholder, required, rows, autoGrow, maxRows, role, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-activedescendant': ariaActiveDescendant, 'aria-autocomplete': ariaAutocomplete, 'aria-haspopup': ariaHasPopup, value, defaultValue, disabled, autoFocus, onChange, onBlur, onFocus, onKeyDown, onKeyUp, ref, }: TextareaProps): import("react/jsx-runtime").JSX.Element;
22
34
  export {};
23
35
  //# sourceMappingURL=Textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,CAAA;AAEjD,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,K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AuB,EAAE,oBAAoB,EAC7C,mBAAmB,EAAE,gBAAgB,EACrC,eAAe,EAAE,YAAY,EAC7B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,EACP,GAAG,GACJ,EAAE,aAAa,2CA8Df"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAmBlB,CAAA"}
1
+ {"version":3,"file":"Textarea.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAuBlB,CAAA"}
@@ -9,4 +9,6 @@ export declare const Error: Story;
9
9
  export declare const Disabled: Story;
10
10
  export declare const CustomRows: Story;
11
11
  export declare const AllVariants: Story;
12
+ export declare const AutoGrow: Story;
13
+ export declare const AnchoredListbox: Story;
12
14
  //# sourceMappingURL=Textarea.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAGpD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AAInC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAc/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAMD,eAAO,MAAM,WAAW,EAAE,KAezB,CAAA"}
1
+ {"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAIpD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AAKnC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAc/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA;AAMD,eAAO,MAAM,WAAW,EAAE,KAezB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgCtB,CAAA;AAmED,eAAO,MAAM,eAAe,EAAE,KAgC7B,CAAA"}
@@ -0,0 +1,22 @@
1
+ /** How a Textarea sizes itself: to its content, or to its fixed rows. */
2
+ export type GrowMode = 'content' | 'fixed';
3
+ /**
4
+ * Fallback for browsers without CSS `field-sizing: content`: size the field to
5
+ * its content. The element's own `rows` give the floor, the style's maxHeight
6
+ * the ceiling (past it the field scrolls).
7
+ */
8
+ export interface GrowableField {
9
+ style: {
10
+ height: string;
11
+ };
12
+ scrollHeight: number;
13
+ offsetHeight: number;
14
+ clientHeight: number;
15
+ }
16
+ /** True when the browser sizes a textarea to its content in CSS. */
17
+ export declare function supportsFieldSizing(css?: {
18
+ supports?: (property: string, value: string) => boolean;
19
+ } | undefined): boolean;
20
+ /** Resize `el` to fit its content; returns the height set, in px. */
21
+ export declare function fitToContent(el: GrowableField): number;
22
+ //# sourceMappingURL=autoGrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoGrow.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/autoGrow.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAA;AAE1C;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CACjC,GAAG,GAAE;IAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;CAAC,GAAG,SAE5D,GACJ,OAAO,CAET;AAED,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM,CAOtD"}
@@ -0,0 +1,12 @@
1
+ import { css } from 'react-strict-dom';
2
+ export declare const growCss: Readonly<{
3
+ readonly autoGrow: Readonly<{
4
+ readonly fieldSizing: css.StyleXClassNameFor<"fieldSizing", "content">;
5
+ readonly resize: css.StyleXClassNameFor<"resize", "none">;
6
+ readonly overflowY: css.StyleXClassNameFor<"overflowY", "auto">;
7
+ }>;
8
+ readonly maxRows: (rows: number) => readonly [Readonly<{
9
+ maxHeight: css.StyleXClassNameFor<"maxHeight", string>;
10
+ }>, css.InlineStyles];
11
+ }>;
12
+ //# sourceMappingURL=grow.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grow.css.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/grow.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAKpC,eAAO,MAAM,OAAO;;;;;;;;;EAYlB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { growCss as grow } from './grow.css';
2
+ //# sourceMappingURL=grow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grow.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/grow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,YAAY,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { css } from 'react-strict-dom';
2
+ export declare const nativeStyles: Readonly<{
3
+ readonly autoGrow: Readonly<{}>;
4
+ readonly maxRows: (rows: number) => readonly [Readonly<{
5
+ maxHeight: css.StyleXClassNameFor<"maxHeight", number>;
6
+ }>, css.InlineStyles];
7
+ }>;
8
+ //# sourceMappingURL=native.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAOpC,eAAO,MAAM,YAAY;;;;;EAQvB,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+ import { GrowMode } from './autoGrow';
3
+ /**
4
+ * Where CSS field-sizing is missing, size the field to its content: after each
5
+ * render (first paint, controlled value changes) and on every `input` event, so
6
+ * an uncontrolled field grows as it is typed into.
7
+ */
8
+ export declare function useAutoGrowFallback(ref: RefObject<HTMLTextAreaElement | null>, mode: GrowMode): void;
9
+ //# sourceMappingURL=useAutoGrowFallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoGrowFallback.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/useAutoGrowFallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAA;AAGhE,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AAKxC;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,QAqB7F"}
@@ -1,17 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { Orientation } from '../../shared/types';
3
- export interface ToolbarProps {
4
- /** Names the toolbar ("Formatting"). Required: a toolbar is a landmark-like widget. */
5
- 'aria-label': string;
6
- /**
7
- * Arrow keys follow the orientation: Left/Right (default) or Up/Down. A
8
- * vertical toolbar cannot hold a Select, whose closed trigger opens on
9
- * ArrowDown/ArrowUp. A Menu can: its closed trigger handles no arrow key,
10
- * so Up/Down move past it and Enter or Space opens it.
11
- */
12
- orientation?: Orientation;
13
- children: ReactNode;
14
- }
1
+ import { ToolbarProps } from './types';
2
+ export type { ToolbarProps } from './types';
15
3
  /**
16
4
  * A row of controls with one tab stop (the WAI-ARIA toolbar pattern). Every
17
5
  * Button, Toggle and Select/Menu/Popover trigger inside it, through any
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAoD,MAAM,OAAO,CAAA;AAEvF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAA;AAKnD,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,YAAY,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,EACtB,YAAY,EAAE,SAAS,EACvB,WAA0B,EAC1B,QAAQ,GACT,EAAE,YAAY,2CAkFd"}
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAEzC,YAAY,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAEzC;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,EACtB,YAAY,EAAE,SAAS,EACvB,WAA0B,EAC1B,QAAQ,GACT,EAAE,YAAY,2CAkFd"}
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { Orientation } from '../../shared/types';
3
+ export interface ToolbarProps {
4
+ /** Names the toolbar ("Formatting"). Required: a toolbar is a landmark-like widget. */
5
+ 'aria-label': string;
6
+ /**
7
+ * Arrow keys follow the orientation: Left/Right (default) or Up/Down. A
8
+ * vertical toolbar cannot hold a Select, whose closed trigger opens on
9
+ * ArrowDown/ArrowUp. A Menu can: its closed trigger handles no arrow key,
10
+ * so Up/Down move past it and Enter or Space opens it.
11
+ */
12
+ orientation?: Orientation;
13
+ children: ReactNode;
14
+ }
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Toolbar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAA;AAEnD,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,YAAY,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;CACpB"}