@usefragments/ui 1.1.1 → 1.3.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 (148) hide show
  1. package/dist/assets/ui.css +327 -274
  2. package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
  3. package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
  4. package/dist/components/Chip/Chip.module.scss.cjs +15 -15
  5. package/dist/components/Chip/Chip.module.scss.js +15 -15
  6. package/dist/components/Combobox/index.cjs +106 -9
  7. package/dist/components/Combobox/index.d.ts.map +1 -1
  8. package/dist/components/Combobox/index.js +106 -9
  9. package/dist/components/DataTable/DataTable.module.scss.cjs +37 -34
  10. package/dist/components/DataTable/DataTable.module.scss.js +37 -34
  11. package/dist/components/DataTable/index.d.ts.map +1 -1
  12. package/dist/components/Main/Main.module.scss.cjs +26 -0
  13. package/dist/components/Main/Main.module.scss.js +26 -0
  14. package/dist/components/Main/index.cjs +128 -0
  15. package/dist/components/Main/index.d.ts +22 -0
  16. package/dist/components/Main/index.d.ts.map +1 -0
  17. package/dist/components/Main/index.js +111 -0
  18. package/dist/components/Table/Table.module.scss.cjs +19 -19
  19. package/dist/components/Table/Table.module.scss.js +19 -19
  20. package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
  21. package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
  22. package/dist/components/TableOfContents/index.cjs +22 -42
  23. package/dist/components/TableOfContents/index.d.ts +3 -3
  24. package/dist/components/TableOfContents/index.d.ts.map +1 -1
  25. package/dist/components/TableOfContents/index.js +22 -42
  26. package/dist/{components/DataTable/DataTable.virtual.cjs → data-table-virtual.cjs} +1 -1
  27. package/dist/{components/DataTable/DataTable.virtual.js → data-table-virtual.js} +1 -1
  28. package/dist/data-table.cjs +27 -9
  29. package/dist/data-table.js +19 -1
  30. package/dist/index.cjs +87 -88
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2 -3
  34. package/fragments.json +1 -1
  35. package/package.json +57 -2
  36. package/src/components/Checkbox/Checkbox.contract.json +5 -24
  37. package/src/components/Checkbox/Checkbox.module.scss +4 -2
  38. package/src/components/Chip/Chip.contract.json +11 -28
  39. package/src/components/Chip/Chip.module.scss +21 -45
  40. package/src/components/Combobox/Combobox.contract.json +6 -24
  41. package/src/components/Combobox/index.tsx +132 -6
  42. package/src/components/DataTable/DataTable.module.scss +31 -8
  43. package/src/components/DataTable/index.tsx +44 -16
  44. package/src/components/Main/Main.contract.json +79 -0
  45. package/src/components/Main/Main.module.scss +31 -0
  46. package/src/components/Main/index.tsx +124 -0
  47. package/src/components/Table/Table.module.scss +22 -5
  48. package/src/components/TableOfContents/TableOfContents.contract.json +6 -16
  49. package/src/components/TableOfContents/TableOfContents.module.scss +10 -13
  50. package/src/components/TableOfContents/index.tsx +27 -38
  51. package/src/index.ts +11 -9
  52. package/src/styles/styles.d.ts +8 -0
  53. package/src/tokens/_component-properties.scss +1 -0
  54. package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts +0 -33
  55. package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts.map +0 -1
  56. package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts +0 -11
  57. package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts.map +0 -1
  58. package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts +0 -5
  59. package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts.map +0 -1
  60. package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts +0 -4
  61. package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts.map +0 -1
  62. package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts +0 -3
  63. package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts.map +0 -1
  64. package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts +0 -86
  65. package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts.map +0 -1
  66. package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts +0 -2
  67. package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts.map +0 -1
  68. package/src/components/Accordion/Accordion.stories.tsx +0 -106
  69. package/src/components/Alert/Alert.stories.tsx +0 -119
  70. package/src/components/AppShell/AppShell.stories.tsx +0 -156
  71. package/src/components/Avatar/Avatar.stories.tsx +0 -74
  72. package/src/components/Badge/Badge.stories.tsx +0 -92
  73. package/src/components/BentoGrid/BentoGrid.stories.tsx +0 -98
  74. package/src/components/Box/Box.stories.tsx +0 -150
  75. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -87
  76. package/src/components/Button/Button.stories.tsx +0 -103
  77. package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -97
  78. package/src/components/Card/Card.stories.tsx +0 -144
  79. package/src/components/Chart/Chart.stories.tsx +0 -119
  80. package/src/components/Checkbox/Checkbox.stories.tsx +0 -68
  81. package/src/components/Chip/Chip.stories.tsx +0 -70
  82. package/src/components/Cloud/CloudGovernanceShell.module.scss +0 -88
  83. package/src/components/Cloud/CloudGovernanceShell.stories.tsx +0 -446
  84. package/src/components/Cloud/ControlSizing.module.scss +0 -49
  85. package/src/components/Cloud/ControlSizing.stories.tsx +0 -238
  86. package/src/components/Cloud/DashboardLayoutPrototypes.module.scss +0 -462
  87. package/src/components/Cloud/DashboardLayoutPrototypes.shared.tsx +0 -375
  88. package/src/components/Cloud/DashboardLayoutPrototypes.shell.tsx +0 -147
  89. package/src/components/Cloud/DashboardLayoutPrototypes.stories.tsx +0 -328
  90. package/src/components/Cloud/PullRequestsPrototypes.content.tsx +0 -283
  91. package/src/components/Cloud/PullRequestsPrototypes.detail-panels.tsx +0 -381
  92. package/src/components/Cloud/PullRequestsPrototypes.detail.tsx +0 -204
  93. package/src/components/Cloud/PullRequestsPrototypes.id-data.ts +0 -395
  94. package/src/components/Cloud/PullRequestsPrototypes.id-page.tsx +0 -349
  95. package/src/components/Cloud/PullRequestsPrototypes.stories.tsx +0 -81
  96. package/src/components/CodeBlock/CodeBlock.stories.tsx +0 -147
  97. package/src/components/Collapsible/Collapsible.stories.tsx +0 -94
  98. package/src/components/ColorPicker/ColorPicker.stories.tsx +0 -74
  99. package/src/components/Combobox/Combobox.stories.tsx +0 -133
  100. package/src/components/Command/Command.stories.tsx +0 -102
  101. package/src/components/ConversationList/ConversationList.stories.tsx +0 -93
  102. package/src/components/DataTable/DataTable.stories.tsx +0 -129
  103. package/src/components/DatePicker/DatePicker.stories.tsx +0 -129
  104. package/src/components/Dialog/Dialog.stories.tsx +0 -154
  105. package/src/components/Drawer/Drawer.stories.tsx +0 -144
  106. package/src/components/Editor/Editor.stories.tsx +0 -99
  107. package/src/components/EmptyState/EmptyState.stories.tsx +0 -97
  108. package/src/components/Field/Field.stories.tsx +0 -109
  109. package/src/components/Fieldset/Fieldset.stories.tsx +0 -116
  110. package/src/components/Form/Form.stories.tsx +0 -142
  111. package/src/components/Grid/Grid.stories.tsx +0 -125
  112. package/src/components/Header/Header.stories.tsx +0 -133
  113. package/src/components/Icon/Icon.stories.tsx +0 -80
  114. package/src/components/IconButton/IconButton.stories.tsx +0 -78
  115. package/src/components/Image/Image.stories.tsx +0 -109
  116. package/src/components/Input/Input.stories.tsx +0 -104
  117. package/src/components/Link/Link.stories.tsx +0 -67
  118. package/src/components/List/List.stories.tsx +0 -95
  119. package/src/components/Listbox/Listbox.stories.tsx +0 -81
  120. package/src/components/Loading/Loading.stories.tsx +0 -69
  121. package/src/components/Markdown/Markdown.stories.tsx +0 -75
  122. package/src/components/Menu/Menu.stories.tsx +0 -113
  123. package/src/components/Message/Message.stories.tsx +0 -85
  124. package/src/components/NavigationMenu/NavigationMenu.stories.tsx +0 -161
  125. package/src/components/Pagination/Pagination.stories.tsx +0 -81
  126. package/src/components/Popover/Popover.stories.tsx +0 -152
  127. package/src/components/Progress/Progress.stories.tsx +0 -64
  128. package/src/components/Prompt/Prompt.stories.tsx +0 -93
  129. package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -107
  130. package/src/components/ScrollArea/ScrollArea.stories.tsx +0 -97
  131. package/src/components/Select/Select.stories.tsx +0 -127
  132. package/src/components/Separator/Separator.stories.tsx +0 -84
  133. package/src/components/Sidebar/Sidebar.stories.tsx +0 -122
  134. package/src/components/Skeleton/Skeleton.stories.tsx +0 -80
  135. package/src/components/Slider/Slider.stories.tsx +0 -73
  136. package/src/components/Stack/Stack.stories.tsx +0 -73
  137. package/src/components/Switch/Switch.stories.tsx +0 -59
  138. package/src/components/Table/Table.stories.tsx +0 -219
  139. package/src/components/TableOfContents/TableOfContents.stories.tsx +0 -120
  140. package/src/components/Tabs/Tabs.stories.tsx +0 -136
  141. package/src/components/Text/Text.stories.tsx +0 -133
  142. package/src/components/Textarea/Textarea.stories.tsx +0 -107
  143. package/src/components/Theme/Theme.stories.tsx +0 -95
  144. package/src/components/ThinkingIndicator/ThinkingIndicator.stories.tsx +0 -85
  145. package/src/components/Toast/Toast.stories.tsx +0 -91
  146. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +0 -114
  147. package/src/components/Tooltip/Tooltip.stories.tsx +0 -95
  148. package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +0 -78
@@ -1,8 +1,8 @@
1
- 'use client';
1
+ "use client";
2
2
 
3
- import * as React from 'react';
4
- import styles from './TableOfContents.module.scss';
5
- import { Text } from '../Text';
3
+ import * as React from "react";
4
+ import styles from "./TableOfContents.module.scss";
5
+ import { Text } from "../Text";
6
6
 
7
7
  // ============================================
8
8
  // Types
@@ -18,7 +18,10 @@ export interface TableOfContentsProps extends React.HTMLAttributes<HTMLElement>
18
18
  hideTitle?: boolean;
19
19
  }
20
20
 
21
- export interface TableOfContentsItemProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
21
+ export interface TableOfContentsItemProps extends Omit<
22
+ React.AnchorHTMLAttributes<HTMLAnchorElement>,
23
+ "children"
24
+ > {
22
25
  children: React.ReactNode;
23
26
  /** The heading ID to link to */
24
27
  id: string;
@@ -89,14 +92,14 @@ function ChevronIcon() {
89
92
 
90
93
  function TableOfContentsRoot({
91
94
  children,
92
- label = 'Table of contents',
93
- title = 'On This Page',
95
+ label = "Table of contents",
96
+ title = "On This Page",
94
97
  hideTitle = false,
95
98
  className,
96
- 'aria-label': ariaLabel,
99
+ "aria-label": ariaLabel,
97
100
  ...htmlProps
98
101
  }: TableOfContentsProps) {
99
- const classes = [styles.root, className].filter(Boolean).join(' ');
102
+ const classes = [styles.root, className].filter(Boolean).join(" ");
100
103
 
101
104
  return (
102
105
  <nav {...htmlProps} aria-label={ariaLabel ?? label} className={classes}>
@@ -127,11 +130,7 @@ function TableOfContentsItem({
127
130
  const { depth } = React.useContext(TocContext);
128
131
  const effectiveDepth = depth > 0 ? depth : indent ? 1 : 0;
129
132
 
130
- const linkClasses = [
131
- styles.link,
132
- active && styles.active,
133
- className,
134
- ].filter(Boolean).join(' ');
133
+ const linkClasses = [styles.link, active && styles.active, className].filter(Boolean).join(" ");
135
134
 
136
135
  const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
137
136
  onClick?.(e);
@@ -140,23 +139,19 @@ function TableOfContentsItem({
140
139
  e.preventDefault();
141
140
  const el = document.getElementById(id);
142
141
  if (el) {
143
- el.scrollIntoView({ behavior: 'smooth' });
144
- window.history.replaceState(null, '', `#${id}`);
142
+ el.scrollIntoView({ behavior: "smooth" });
143
+ window.history.replaceState(null, "", `#${id}`);
145
144
  }
146
145
  };
147
146
 
148
147
  return (
149
- <li
150
- className={styles.item}
151
- data-depth={effectiveDepth}
152
- data-active={active || undefined}
153
- >
148
+ <li className={styles.item} data-depth={effectiveDepth} data-active={active || undefined}>
154
149
  <a
155
150
  {...htmlProps}
156
151
  href={`#${id}`}
157
152
  className={linkClasses}
158
153
  onClick={handleClick}
159
- aria-current={active ? 'location' : undefined}
154
+ aria-current={active ? "location" : undefined}
160
155
  >
161
156
  {leading != null && <span className={styles.leading}>{leading}</span>}
162
157
  <span className={styles.linkLabel}>{children}</span>
@@ -169,7 +164,7 @@ function TableOfContentsItem({
169
164
  function useControlledOpen(
170
165
  controlled: boolean | undefined,
171
166
  defaultValue: boolean,
172
- onChange: ((open: boolean) => void) | undefined,
167
+ onChange: ((open: boolean) => void) | undefined
173
168
  ): [boolean, (next: boolean) => void] {
174
169
  const [internal, setInternal] = React.useState(defaultValue);
175
170
  const isControlled = controlled !== undefined;
@@ -179,14 +174,14 @@ function useControlledOpen(
179
174
  if (!isControlled) setInternal(next);
180
175
  onChange?.(next);
181
176
  },
182
- [isControlled, onChange],
177
+ [isControlled, onChange]
183
178
  );
184
179
  return [value, setValue];
185
180
  }
186
181
 
187
- // Group renders a Fragment: its header <li> and its children become direct
188
- // siblings in the parent <ul>, which lets CSS adjacency selectors detect
189
- // depth transitions and draw the opening/closing elbows.
182
+ // Group renders a Fragment so its header <li> and children remain direct
183
+ // siblings in the parent <ul>. This preserves list semantics and depth-based
184
+ // indentation without adding a nested list inset.
190
185
  function TableOfContentsGroup({
191
186
  children,
192
187
  label,
@@ -209,7 +204,9 @@ function TableOfContentsGroup({
209
204
  styles.groupHeader,
210
205
  isToggleable && styles.groupHeaderInteractive,
211
206
  active && styles.groupHeaderActive,
212
- ].filter(Boolean).join(' ');
207
+ ]
208
+ .filter(Boolean)
209
+ .join(" ");
213
210
 
214
211
  const headerContent = (
215
212
  <>
@@ -226,11 +223,7 @@ function TableOfContentsGroup({
226
223
 
227
224
  return (
228
225
  <>
229
- <li
230
- className={styles.groupHeaderRow}
231
- data-depth={depth}
232
- data-active={active || undefined}
233
- >
226
+ <li className={styles.groupHeaderRow} data-depth={depth} data-active={active || undefined}>
234
227
  {isToggleable ? (
235
228
  <button
236
229
  type="button"
@@ -244,11 +237,7 @@ function TableOfContentsGroup({
244
237
  <div className={headerClasses}>{headerContent}</div>
245
238
  )}
246
239
  </li>
247
- {isOpen && (
248
- <TocContext.Provider value={{ depth: depth + 1 }}>
249
- {children}
250
- </TocContext.Provider>
251
- )}
240
+ {isOpen && <TocContext.Provider value={{ depth: depth + 1 }}>{children}</TocContext.Provider>}
252
241
  </>
253
242
  );
254
243
  }
package/src/index.ts CHANGED
@@ -257,15 +257,14 @@ export {
257
257
  type ExpandedState,
258
258
  } from "./components/DataTable";
259
259
 
260
- // DataTable row virtualization (opt-in; requires @tanstack/react-virtual)
261
- export {
262
- DataTableVirtual,
263
- useTableVirtualizer,
264
- type DataTableVirtualProps,
265
- type UseTableVirtualizerOptions,
266
- type UseTableVirtualizerResult,
267
- type VirtualTableRow,
268
- } from "./components/DataTable/DataTable.virtual";
260
+ // DataTable row virtualization (opt-in; requires @tanstack/react-virtual).
261
+ // Intentionally NOT re-exported from the main barrel: `useTableVirtualizer`
262
+ // wraps a hook that must resolve synchronously, so — unlike DataTable/Chart/
263
+ // Editor — it cannot be lazy-required. Re-exporting it here (or routing it
264
+ // through the `./data-table` subpath, which the main barrel imports) would
265
+ // statically pull @tanstack/react-virtual into every consumer's Button-only
266
+ // build. It lives behind its own dedicated subpath the barrel never imports:
267
+ // import { DataTableVirtual, useTableVirtualizer } from "@usefragments/ui/data-table-virtual";
269
268
 
270
269
  // EmptyState
271
270
  export {
@@ -389,6 +388,9 @@ export {
389
388
  type ResponsiveGap,
390
389
  } from "./components/Stack";
391
390
 
391
+ // Main
392
+ export { Main, type MainProps, type MainRegionProps, type MainMeasure } from "./components/Main";
393
+
392
394
  // Text
393
395
  export { Text, type TextProps } from "./components/Text";
394
396
 
@@ -0,0 +1,8 @@
1
+ // Ambient type surface for the side-effect style entrypoints
2
+ // (`@usefragments/ui/styles` and `@usefragments/ui/globals`). These specifiers
3
+ // resolve to compiled CSS (or the raw SCSS under the `sass` condition) and carry
4
+ // no runtime exports, so a bare `import "@usefragments/ui/styles";` needs a
5
+ // resolvable `types` target to keep TypeScript from erroring. This file ships in
6
+ // the published tarball via the package `files: ["src"]` entry and is referenced
7
+ // by the `types` condition of both exports in `publishConfig`.
8
+ export {};
@@ -5,6 +5,7 @@
5
5
  // doing so would override each component's fallback/inheritance behavior.
6
6
  // Governance reads this file as the explicit vocabulary for dynamic values.
7
7
  @mixin fui-component-property-contract {
8
+ --fui-checkbox-radius: 0.25rem;
8
9
  --fui-grid-min-child-width: 16rem;
9
10
  --fui-line-clamp: 2;
10
11
  --fui-navmenu-viewport-height: 0px;
@@ -1,33 +0,0 @@
1
- import { type ProgressProps } from "../Progress";
2
- export { PrototypeShell } from "./DashboardLayoutPrototypes.shell";
3
- export type StateVariant = "success" | "warning" | "error" | "info";
4
- export type AreaRow = {
5
- area: string;
6
- owner: string;
7
- coverage: number;
8
- drift: number;
9
- criticality: string;
10
- state: "Healthy" | "Watching" | "Blocked" | "Review";
11
- variant: StateVariant;
12
- };
13
- export declare const areas: AreaRow[];
14
- export declare function MetricPanel({ label, value, progress, variant, }: {
15
- label: string;
16
- value: string;
17
- progress: number;
18
- variant?: ProgressProps["variant"];
19
- }): import("react/jsx-runtime").JSX.Element;
20
- export declare function CoverageHero({ className }?: {
21
- className?: string;
22
- }): import("react/jsx-runtime").JSX.Element;
23
- export declare function AreasTable({ title }: {
24
- title?: string;
25
- }): import("react/jsx-runtime").JSX.Element;
26
- export declare function ActionPanel({ className }?: {
27
- className?: string;
28
- }): import("react/jsx-runtime").JSX.Element;
29
- export declare function ActivityPanel(): import("react/jsx-runtime").JSX.Element;
30
- export declare function ActivityTable(): import("react/jsx-runtime").JSX.Element;
31
- export declare function StatePanel(): import("react/jsx-runtime").JSX.Element;
32
- export declare function FindingsToolbar(): import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=DashboardLayoutPrototypes.shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardLayoutPrototypes.shared.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/DashboardLayoutPrototypes.shared.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAK3D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IACrD,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC;AAUF,eAAO,MAAM,KAAK,EAAE,OAAO,EAqC1B,CAAC;AAyFF,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC,2CAgBA;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,2CAsDtE;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAuB,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,2CAwBzE;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,2CAuBrE;AAED,wBAAgB,aAAa,4CAW5B;AAED,wBAAgB,aAAa,4CAY5B;AAED,wBAAgB,UAAU,4CA6BzB;AAED,wBAAgB,eAAe,4CAoB9B"}
@@ -1,11 +0,0 @@
1
- import type { ReactNode } from "react";
2
- export type CloudNavLabel = "Dashboard" | "Pull Requests" | "Backlog" | "Governance" | "Developer setup" | "Settings";
3
- export declare function PrototypeShell({ activeNav, eyebrow, title, description, actions, children, }: {
4
- activeNav?: CloudNavLabel;
5
- eyebrow?: string;
6
- title: string;
7
- description?: string;
8
- actions?: ReactNode;
9
- children: ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- //# sourceMappingURL=DashboardLayoutPrototypes.shell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardLayoutPrototypes.shell.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/DashboardLayoutPrototypes.shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBvC,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,eAAe,GACf,SAAS,GACT,YAAY,GACZ,iBAAiB,GACjB,UAAU,CAAC;AAmEf,wBAAgB,cAAc,CAAC,EAC7B,SAAuB,EACvB,OAAO,EACP,KAAK,EACL,WAA+E,EAC/E,OAAO,EACP,QAAQ,GACT,EAAE;IACD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAwCA"}
@@ -1,5 +0,0 @@
1
- export declare function PrototypeActions(): import("react/jsx-runtime").JSX.Element;
2
- export declare function PullRequestInbox({ density }: {
3
- density?: "condensed" | "regular";
4
- }): import("react/jsx-runtime").JSX.Element;
5
- //# sourceMappingURL=PullRequestsPrototypes.content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PullRequestsPrototypes.content.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/PullRequestsPrototypes.content.tsx"],"names":[],"mappings":"AAsLA,wBAAgB,gBAAgB,4CAQ/B;AAqFD,wBAAgB,gBAAgB,CAAC,EAAE,OAAqB,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,2CAOhG"}
@@ -1,4 +0,0 @@
1
- export declare function FindingsPanel(): import("react/jsx-runtime").JSX.Element;
2
- export declare function ConversationPanel(): import("react/jsx-runtime").JSX.Element;
3
- export declare function ChangedFilesPanel(): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=PullRequestsPrototypes.detail-panels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PullRequestsPrototypes.detail-panels.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/PullRequestsPrototypes.detail-panels.tsx"],"names":[],"mappings":"AAiHA,wBAAgB,aAAa,4CAyD5B;AAMD,wBAAgB,iBAAiB,4CA8ChC;AAiJD,wBAAgB,iBAAiB,4CAahC"}
@@ -1,3 +0,0 @@
1
- export declare function PullRequestDecisionActions(): import("react/jsx-runtime").JSX.Element;
2
- export declare function PullRequestDetail(): import("react/jsx-runtime").JSX.Element;
3
- //# sourceMappingURL=PullRequestsPrototypes.detail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PullRequestsPrototypes.detail.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/PullRequestsPrototypes.detail.tsx"],"names":[],"mappings":"AAgCA,wBAAgB,0BAA0B,4CAuBzC;AAED,wBAAgB,iBAAiB,4CA2BhC"}
@@ -1,86 +0,0 @@
1
- import type { StateVariant } from "./DashboardLayoutPrototypes.shared";
2
- export type CheckState = "failed" | "passed" | "warning";
3
- export type GithubCheck = {
4
- name: string;
5
- state: CheckState;
6
- label: string;
7
- variant: StateVariant;
8
- summary: string;
9
- duration: string;
10
- };
11
- export type GithubComment = {
12
- id: string;
13
- author: string;
14
- status: string;
15
- variant: StateVariant;
16
- file: string;
17
- line: number;
18
- body: string;
19
- designerSignal: string;
20
- };
21
- export type ImpactArea = {
22
- area: string;
23
- criticality: string;
24
- coverage: string;
25
- findings: string;
26
- owner: string;
27
- review: string;
28
- variant: StateVariant;
29
- };
30
- export type FindingSeverity = "Blocking" | "Safe fix" | "Review";
31
- /** How a finding can be remediated — drives the per-row action verb. */
32
- export type FixKind = "Deterministic" | "Proposed" | "Manual";
33
- export type PrFinding = {
34
- id: string;
35
- /** Versioned diagnostic code (FUI####). */
36
- code: string;
37
- /** Rule family the finding belongs to. */
38
- rule: string;
39
- severity: FindingSeverity;
40
- variant: StateVariant;
41
- /** Introduced by this PR (gates merge) vs. pre-existing legacy debt (never gates). */
42
- origin: "Introduced" | "Legacy";
43
- file: string;
44
- line: number;
45
- area: string;
46
- /** Call-sites this single finding-family touches in the PR — the bulk-action rationale. */
47
- occurrences: number;
48
- fix: FixKind;
49
- suggestion: string;
50
- body: string;
51
- designerSignal?: string;
52
- /** Surfaced as a human-readable review thread in the Conversation tab. */
53
- thread?: boolean;
54
- };
55
- export type Reviewer = {
56
- name: string;
57
- status: string;
58
- variant: StateVariant;
59
- };
60
- export type ChangedFile = {
61
- path: string;
62
- area: string;
63
- additions: number;
64
- deletions: number;
65
- findings: number;
66
- };
67
- export declare const prIdPagePullRequest: {
68
- number: number;
69
- title: string;
70
- branch: string;
71
- author: string;
72
- coverageBefore: number;
73
- coverageAfter: number;
74
- comments: number;
75
- safeFixes: number;
76
- };
77
- export declare const githubChecks: GithubCheck[];
78
- export declare const impactAreas: ImpactArea[];
79
- export declare const prFindings: PrFinding[];
80
- export declare const blockingFindings: PrFinding[];
81
- export declare const introducedFindings: PrFinding[];
82
- export declare const threadFindings: PrFinding[];
83
- export declare const githubComments: GithubComment[];
84
- export declare const reviewers: Reviewer[];
85
- export declare const changedFiles: ChangedFile[];
86
- //# sourceMappingURL=PullRequestsPrototypes.id-data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PullRequestsPrototypes.id-data.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/PullRequestsPrototypes.id-data.ts"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- export declare function PullRequestIdPage(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=PullRequestsPrototypes.id-page.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PullRequestsPrototypes.id-page.d.ts","sourceRoot":"","sources":["../../../src/components/Cloud/PullRequestsPrototypes.id-page.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,iBAAiB,4CAWhC"}
@@ -1,106 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Accordion } from '.';
3
-
4
- /**
5
- * Accordion presents vertically stacked, collapsible content sections for
6
- * progressive disclosure. It is a compound component: compose Accordion.Item,
7
- * Accordion.Trigger, and Accordion.Content inside the root.
8
- */
9
- const meta = {
10
- title: 'Layout/Accordion',
11
- component: Accordion,
12
- tags: ['autodocs'],
13
- parameters: {
14
- docs: {
15
- description: {
16
- component:
17
- 'Vertically stacked, collapsible content sections for progressive disclosure.',
18
- },
19
- },
20
- },
21
- argTypes: {
22
- type: {
23
- control: 'select',
24
- options: ['single', 'multiple'],
25
- description: 'Whether one or multiple items can be open',
26
- },
27
- collapsible: {
28
- control: 'boolean',
29
- description: 'Whether all items can be closed (single mode only)',
30
- },
31
- headingLevel: {
32
- control: 'select',
33
- options: ['2', '3', '4', '5', '6'],
34
- description: 'Semantic heading level for accordion triggers',
35
- },
36
- },
37
- args: {
38
- type: 'single',
39
- collapsible: true,
40
- children: (
41
- <Accordion.Item value="item-1">
42
- <Accordion.Trigger>Section</Accordion.Trigger>
43
- <Accordion.Content>Collapsible content.</Accordion.Content>
44
- </Accordion.Item>
45
- ),
46
- },
47
- } satisfies Meta<typeof Accordion>;
48
-
49
- export default meta;
50
-
51
- type Story = StoryObj<typeof meta>;
52
-
53
- export const Single: Story = {
54
- render: () => (
55
- <Accordion type="single" collapsible defaultValue="item-1">
56
- <Accordion.Item value="item-1">
57
- <Accordion.Trigger>What is Fragments UI?</Accordion.Trigger>
58
- <Accordion.Content>
59
- A React component library built on Base UI primitives.
60
- </Accordion.Content>
61
- </Accordion.Item>
62
- <Accordion.Item value="item-2">
63
- <Accordion.Trigger>How do I install it?</Accordion.Trigger>
64
- <Accordion.Content>Install via pnpm add @usefragments/ui.</Accordion.Content>
65
- </Accordion.Item>
66
- <Accordion.Item value="item-3">
67
- <Accordion.Trigger>Is it accessible?</Accordion.Trigger>
68
- <Accordion.Content>Yes, all components follow WAI-ARIA guidelines.</Accordion.Content>
69
- </Accordion.Item>
70
- </Accordion>
71
- ),
72
- };
73
-
74
- export const Multiple: Story = {
75
- render: () => (
76
- <Accordion type="multiple" defaultValue={['features', 'pricing']}>
77
- <Accordion.Item value="features">
78
- <Accordion.Trigger>Features</Accordion.Trigger>
79
- <Accordion.Content>Comprehensive components with theming support.</Accordion.Content>
80
- </Accordion.Item>
81
- <Accordion.Item value="pricing">
82
- <Accordion.Trigger>Pricing</Accordion.Trigger>
83
- <Accordion.Content>Free and open source, MIT licensed.</Accordion.Content>
84
- </Accordion.Item>
85
- <Accordion.Item value="support">
86
- <Accordion.Trigger>Support</Accordion.Trigger>
87
- <Accordion.Content>Community support via GitHub.</Accordion.Content>
88
- </Accordion.Item>
89
- </Accordion>
90
- ),
91
- };
92
-
93
- export const WithDisabledItem: Story = {
94
- render: () => (
95
- <Accordion type="single" collapsible>
96
- <Accordion.Item value="available">
97
- <Accordion.Trigger>Available Section</Accordion.Trigger>
98
- <Accordion.Content>This section can be expanded and collapsed.</Accordion.Content>
99
- </Accordion.Item>
100
- <Accordion.Item value="disabled" disabled>
101
- <Accordion.Trigger>Disabled Section</Accordion.Trigger>
102
- <Accordion.Content>This content is not accessible.</Accordion.Content>
103
- </Accordion.Item>
104
- </Accordion>
105
- ),
106
- };
@@ -1,119 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Alert } from '.';
3
-
4
- /**
5
- * Alert surfaces contextual feedback messages tied to user actions or system
6
- * status. It is a compound component: compose Alert.Icon, Alert.Body,
7
- * Alert.Title, Alert.Content, Alert.Actions, Alert.Action, and Alert.Close.
8
- */
9
- const meta = {
10
- title: 'Feedback/Alert',
11
- component: Alert,
12
- tags: ['autodocs'],
13
- parameters: {
14
- docs: {
15
- description: {
16
- component:
17
- 'Contextual feedback messages for user actions or system status with severity levels.',
18
- },
19
- },
20
- },
21
- argTypes: {
22
- severity: {
23
- control: 'select',
24
- options: ['info', 'success', 'warning', 'error'],
25
- description: 'Visual severity level',
26
- },
27
- },
28
- args: {
29
- severity: 'info',
30
- children: (
31
- <>
32
- <Alert.Icon />
33
- <Alert.Body>
34
- <Alert.Content>Your session will expire in 15 minutes.</Alert.Content>
35
- </Alert.Body>
36
- </>
37
- ),
38
- },
39
- } satisfies Meta<typeof Alert>;
40
-
41
- export default meta;
42
-
43
- type Story = StoryObj<typeof meta>;
44
-
45
- export const Info: Story = {
46
- render: () => (
47
- <Alert severity="info">
48
- <Alert.Icon />
49
- <Alert.Body>
50
- <Alert.Content>
51
- Your session will expire in 15 minutes. Save your work to avoid losing changes.
52
- </Alert.Content>
53
- </Alert.Body>
54
- </Alert>
55
- ),
56
- };
57
-
58
- export const Success: Story = {
59
- render: () => (
60
- <Alert severity="success">
61
- <Alert.Icon />
62
- <Alert.Body>
63
- <Alert.Title>Payment processed</Alert.Title>
64
- <Alert.Content>Your order #12345 has been confirmed.</Alert.Content>
65
- </Alert.Body>
66
- </Alert>
67
- ),
68
- };
69
-
70
- export const Warning: Story = {
71
- render: () => (
72
- <Alert severity="warning">
73
- <Alert.Icon />
74
- <Alert.Body>
75
- <Alert.Title>Storage almost full</Alert.Title>
76
- <Alert.Content>You have used 90% of your storage quota.</Alert.Content>
77
- </Alert.Body>
78
- </Alert>
79
- ),
80
- };
81
-
82
- export const Error: Story = {
83
- render: () => (
84
- <Alert severity="error">
85
- <Alert.Icon />
86
- <Alert.Body>
87
- <Alert.Title>Upload failed</Alert.Title>
88
- <Alert.Content>The file could not be uploaded. Try again.</Alert.Content>
89
- </Alert.Body>
90
- </Alert>
91
- ),
92
- };
93
-
94
- export const WithAction: Story = {
95
- render: () => (
96
- <Alert severity="warning">
97
- <Alert.Icon />
98
- <Alert.Body>
99
- <Alert.Title>Update available</Alert.Title>
100
- <Alert.Content>A new version is available with security fixes.</Alert.Content>
101
- <Alert.Actions>
102
- <Alert.Action onClick={() => {}}>Update now</Alert.Action>
103
- </Alert.Actions>
104
- </Alert.Body>
105
- </Alert>
106
- ),
107
- };
108
-
109
- export const Dismissible: Story = {
110
- render: () => (
111
- <Alert severity="info">
112
- <Alert.Icon />
113
- <Alert.Body>
114
- <Alert.Content>You can customize notification preferences in Settings.</Alert.Content>
115
- </Alert.Body>
116
- <Alert.Close />
117
- </Alert>
118
- ),
119
- };