@bsuite/ui 0.3.0 → 0.6.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 (42) hide show
  1. package/README.md +43 -5
  2. package/dist/Logo.d.ts +1 -1
  3. package/dist/Logo.d.ts.map +1 -1
  4. package/dist/app-shell.d.ts +73 -0
  5. package/dist/app-shell.d.ts.map +1 -0
  6. package/dist/app-shell.js +6 -0
  7. package/dist/branding/BrandingCard.d.ts +1 -1
  8. package/dist/branding/BrandingCard.d.ts.map +1 -1
  9. package/dist/branding/ColorEditorSheet.d.ts +1 -1
  10. package/dist/branding/ColorEditorSheet.d.ts.map +1 -1
  11. package/dist/branding/OklchColorPicker.d.ts +1 -1
  12. package/dist/branding/OklchColorPicker.d.ts.map +1 -1
  13. package/dist/button.d.ts +9 -0
  14. package/dist/button.d.ts.map +1 -0
  15. package/dist/button.js +20 -0
  16. package/dist/default-logo.d.ts +1 -1
  17. package/dist/default-logo.d.ts.map +1 -1
  18. package/dist/dialog.d.ts +15 -0
  19. package/dist/dialog.d.ts.map +1 -0
  20. package/dist/dialog.js +26 -0
  21. package/dist/dot-pattern.d.ts +2 -2
  22. package/dist/dot-pattern.d.ts.map +1 -1
  23. package/dist/dot-pattern.js +1 -1
  24. package/dist/empty-state.d.ts +9 -0
  25. package/dist/empty-state.d.ts.map +1 -0
  26. package/dist/empty-state.js +5 -0
  27. package/dist/error-boundary.d.ts +15 -0
  28. package/dist/error-boundary.d.ts.map +1 -0
  29. package/dist/error-boundary.js +18 -0
  30. package/dist/hero-grid.d.ts +39 -0
  31. package/dist/hero-grid.d.ts.map +1 -0
  32. package/dist/hero-grid.js +38 -0
  33. package/dist/index.d.ts +8 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +8 -0
  36. package/dist/loading-spinner.d.ts +7 -0
  37. package/dist/loading-spinner.d.ts.map +1 -0
  38. package/dist/loading-spinner.js +10 -0
  39. package/dist/status-badge.d.ts +7 -0
  40. package/dist/status-badge.d.ts.map +1 -0
  41. package/dist/status-badge.js +12 -0
  42. package/package.json +53 -9
package/README.md CHANGED
@@ -8,6 +8,38 @@ the Vercel build context. Consumers install from npm with a pinned semver.
8
8
 
9
9
  ## Components
10
10
 
11
+ ### Core primitives (v0.4.0+)
12
+
13
+ The package now owns the shared Tier 1 UI primitives apps should converge on:
14
+
15
+ ```tsx
16
+ import {
17
+ Button,
18
+ Dialog,
19
+ DialogContent,
20
+ DialogHeader,
21
+ DialogTitle,
22
+ EmptyState,
23
+ ErrorBoundary,
24
+ LoadingSpinner,
25
+ StatusBadge,
26
+ } from '@bsuite/ui'
27
+ ```
28
+
29
+ These primitives use BSuite/shadcn semantic token classes only (`bg-primary`,
30
+ `text-muted-foreground`, `border-border`, `text-status-success`, etc.) so D2C apps can
31
+ skin them through `@bsuite/theme` and Braden can map the same roles to the
32
+ corporate palette.
33
+
34
+ ### Storybook
35
+
36
+ Run the shared primitive gallery from this package:
37
+
38
+ ```bash
39
+ pnpm -C packages/ui storybook
40
+ pnpm -C packages/ui build-storybook
41
+ ```
42
+
11
43
  ### `DotPattern`
12
44
 
13
45
  Full-viewport dot-pattern background. SVG `<pattern>` tiling — ~1 DOM node
@@ -21,14 +53,14 @@ import { DotPattern } from '@bsuite/ui'
21
53
  width={28}
22
54
  height={28}
23
55
  cr={1.5}
24
- className="opacity-[0.35] [color:var(--accent-primary)]"
56
+ className="opacity-[0.35] text-muted-foreground"
25
57
  />
26
58
  {/* page content */}
27
59
  </div>
28
60
  ```
29
61
 
30
- Colour control via Tailwind `text-*` utilities or inline `[color:var(...)]`
31
- (dots use `fill="currentColor"`).
62
+ Colour control via semantic Tailwind `text-*` utilities (dots use
63
+ `fill="currentColor"`).
32
64
 
33
65
  ### `Logo`
34
66
 
@@ -151,7 +183,7 @@ The package provides subpath exports for better tree-shaking:
151
183
 
152
184
  ```tsx
153
185
  // Main exports
154
- import { Logo, BrandingCard } from '@bsuite/ui'
186
+ import { Logo, BrandingCard, Button, StatusBadge } from '@bsuite/ui'
155
187
 
156
188
  // Dot pattern only
157
189
  import { DotPattern } from '@bsuite/ui/dot-pattern'
@@ -162,6 +194,11 @@ import { cn } from '@bsuite/ui/utils'
162
194
  // Branding components only
163
195
  import { BrandingCard, ColorEditorSheet, OklchColorPicker } from '@bsuite/ui/branding'
164
196
 
197
+ // Primitive subpaths
198
+ import { Button } from '@bsuite/ui/button'
199
+ import { DialogContent } from '@bsuite/ui/dialog'
200
+ import { EmptyState } from '@bsuite/ui/empty-state'
201
+
165
202
  // SVG asset
166
203
  import logoSvg from '@bsuite/ui/assets/d2c-default-logo.svg'
167
204
  ```
@@ -172,7 +209,8 @@ import logoSvg from '@bsuite/ui/assets/d2c-default-logo.svg'
172
209
  2. `pnpm -C packages/ui test` — all cases must pass.
173
210
  3. `pnpm -C packages/ui build` — emits `dist/`.
174
211
  4. Bump version in `package.json` (semver).
175
- 5. `npm publish --access public` from `packages/ui/`.
212
+ 5. Merge the package release PR to `main`; `.github/workflows/publish-ui.yml`
213
+ publishes via npm Trusted Publishers (GitHub Actions OIDC, no `NPM_TOKEN`).
176
214
  6. Update consumer `package.json` to the new version, regenerate lockfile
177
215
  **outside** the bsuite tree (see root `CLAUDE.md` rule 7), commit the
178
216
  lockfile + a consumer-side bump PR.
package/dist/Logo.d.ts CHANGED
@@ -93,5 +93,5 @@ export declare function resolveLogoUrl(branding: LogoBranding | null | undefined
93
93
  * frequently mounts in app shells (header, sidebar, auth gate) and the
94
94
  * resolver inputs are stable.
95
95
  */
96
- export declare const Logo: import("react").MemoExoticComponent<({ slot, colorScheme, className, alt, width, height, branding, appSlug, }: LogoProps) => import("react/jsx-runtime").JSX.Element>;
96
+ export declare const Logo: import("react").MemoExoticComponent<({ slot, colorScheme, className, alt, width, height, branding, appSlug, }: LogoProps) => import("react").JSX.Element>;
97
97
  //# sourceMappingURL=Logo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../src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zB;AAED,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,0EAA0E;IAC1E,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,GAAG,MAAM,GACvB,YAAY,CA2Cd;AAaD;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,iHASd,SAAS,iCAuCV,CAAA"}
@@ -0,0 +1,73 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type DotPatternProps } from './dot-pattern.js';
3
+ /**
4
+ * AppShell — the shared authenticated-app layout frame for the BSuite D2C apps
5
+ * (theme 0.7.0 / bsuite Bug 1). It exists to bake, in ONE place, the two
6
+ * shell contracts that every app was hand-rolling (and getting subtly wrong):
7
+ *
8
+ * 1. **Scroll safety** (crm7 Bug 1 — "sidebar footer/nav unreachable on short
9
+ * viewports"). The root is a bounded-height flex row (`h-svh`) that NEVER
10
+ * pairs `overflow-hidden` with a `position:fixed` sidebar descendant — that
11
+ * combination is the only thing that can clip a fixed sidebar box on
12
+ * rendering engines that don't honour the fixed-escapes-overflow spec.
13
+ * Instead the *content region* owns its own scroll (`min-h-0 flex-1
14
+ * overflow-auto`) and the header/footer are `shrink-0`, so nothing needs to
15
+ * be clipped by the root and every region stays reachable at any viewport
16
+ * height. Consumers pass a `position:fixed` sidebar (shadcn) OR an in-flow
17
+ * `<aside>` — both are safe because the shell root never clips.
18
+ *
19
+ * 2. **Background robustness** (BSU Bug 5 — "invisible dots"). The dot pattern
20
+ * is rendered ONCE as a `fixed inset-0 z-0` viewport layer, so it paints
21
+ * independently of any shell opacity or stacking context. The in-flow
22
+ * `-z-10` pattern several apps used silently disappeared whenever the shell
23
+ * root lost `isolate`; a fixed viewport layer cannot regress that way.
24
+ *
25
+ * Composition is `children`-based (no router/provider assumptions) so it drops
26
+ * into a component wrapper (crm7/braden), a router element / `<Outlet>`
27
+ * (BSU/throughput), a Next.js `layout.tsx` (conduit), or a view-state switch
28
+ * (R80.3) without forcing a routing-model change. Sidebar / header / footer /
29
+ * aside are OPTIONAL slots — braden and throughput pass none; crm7 passes a
30
+ * shadcn sidebar + an AI `aside`.
31
+ */
32
+ export interface AppShellProps {
33
+ /** Main scrollable content. The ONLY region that scrolls; owns `overflow-auto`. */
34
+ children: ReactNode;
35
+ /**
36
+ * Sidebar slot — rendered as the first flex child, before the main column.
37
+ * Consumer owns the implementation (shadcn `SidebarProvider`+`Sidebar`, a
38
+ * custom `<aside>`, or `@bsuite/nav-core`). May be `position:fixed`; the
39
+ * shell root never clips it. Omit for top-nav-only apps (braden/throughput).
40
+ */
41
+ sidebar?: ReactNode;
42
+ /** Header slot — pinned above the scroll region (`shrink-0`), never scrolls away. */
43
+ header?: ReactNode;
44
+ /** Footer slot — pinned below the scroll region (`shrink-0`), always reachable. */
45
+ footer?: ReactNode;
46
+ /**
47
+ * Banner slot — rendered above the header inside the main column (demo /
48
+ * system-notice bars). Also `shrink-0`.
49
+ */
50
+ banner?: ReactNode;
51
+ /**
52
+ * Aside slot — an optional right-hand flex sibling of the main column
53
+ * (e.g. crm7's AI assistant panel). Rendered after the main column so it
54
+ * sits to its right; the consumer controls its width/visibility.
55
+ */
56
+ aside?: ReactNode;
57
+ /** Render the fixed viewport dot-pattern background. Default true; braden passes false. */
58
+ showDotPattern?: boolean;
59
+ /** Props forwarded to the background `<DotPattern>` (size, colour, opacity). */
60
+ dotPatternProps?: DotPatternProps;
61
+ /** Extra classes on the shell root (the `h-svh` flex row). */
62
+ className?: string;
63
+ /** Extra classes on the scrollable content region. */
64
+ contentClassName?: string;
65
+ /**
66
+ * Inline style for the main column background — apps that use a transparent
67
+ * shell + fixed background layer (crm7's `--bg-shell`) pass it here so the
68
+ * dot pattern shows through. Omit for opaque shells.
69
+ */
70
+ mainStyle?: React.CSSProperties;
71
+ }
72
+ export declare function AppShell({ children, sidebar, header, footer, banner, aside, showDotPattern, dotPatternProps, className, contentClassName, mainStyle, }: AppShellProps): import("react").JSX.Element;
73
+ //# sourceMappingURL=app-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../src/app-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,aAAa;IAC5B,mFAAmF;IACnF,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qFAAqF;IACrF,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,mFAAmF;IACnF,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gFAAgF;IAChF,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAChC;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,EACL,cAAqB,EACrB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,SAAS,GACV,EAAE,aAAa,+BA4Cf"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from './utils.js';
3
+ import { DotPattern } from './dot-pattern.js';
4
+ export function AppShell({ children, sidebar, header, footer, banner, aside, showDotPattern = true, dotPatternProps, className, contentClassName, mainStyle, }) {
5
+ return (_jsxs("div", { className: cn('relative isolate flex h-svh w-full', className), children: [showDotPattern && (_jsx("div", { "aria-hidden": "true", "data-slot": "app-shell-background", className: "pointer-events-none fixed inset-0 z-0 overflow-hidden", children: _jsx(DotPattern, { ...dotPatternProps }) })), sidebar, _jsxs("div", { "data-slot": "app-shell-main", className: "relative z-10 flex min-w-0 flex-1 flex-col", style: mainStyle, children: [banner ? _jsx("div", { className: "shrink-0", children: banner }) : null, header ? _jsx("div", { className: "shrink-0", children: header }) : null, _jsx("div", { "data-slot": "app-shell-content", className: cn('min-h-0 flex-1 overflow-auto', contentClassName), children: children }), footer ? _jsx("div", { className: "shrink-0", children: footer }) : null] }), aside] }));
6
+ }
@@ -52,5 +52,5 @@ export interface BrandingCardProps {
52
52
  /** Optional description for the card */
53
53
  description?: string;
54
54
  }
55
- export declare function BrandingCard({ branding, onUpdate, renderColorEditor, className, disabled, title, description, }: BrandingCardProps): import("react/jsx-runtime").JSX.Element;
55
+ export declare function BrandingCard({ branding, onUpdate, renderColorEditor, className, disabled, title, description, }: BrandingCardProps): import("react").JSX.Element;
56
56
  //# sourceMappingURL=BrandingCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrandingCard.d.ts","sourceRoot":"","sources":["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ps {
64
64
  *
65
65
  * Internal implementation uses basic HTML + Tailwind for flexibility.
66
66
  */
67
- export declare function ColorEditorSheet({ open, onOpenChange, title, description, value, onSave, onCancel, renderEditor, className, disabled, }: ColorEditorSheetProps): import("react/jsx-runtime").JSX.Element | null;
67
+ export declare function ColorEditorSheet({ open, onOpenChange, title, description, value, onSave, onCancel, renderEditor, className, disabled, }: ColorEditorSheetProps): import("react").JSX.Element | null;
68
68
  //# sourceMappingURL=ColorEditorSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorEditorSheet.d.ts","sourceRoot":"","sources":["../../src/branding/ColorEditorSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAG3D,MAAM,WAAW,qBAAqB;IACpC,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,uCAAuC;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,qDAAqD;IACrD,YAAY,EAAE,CAAC,KAAK,EAAE;QACpB,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;QACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;KACnB,KAAK,SAAS,CAAA;IACf,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,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,WAAW,EACX,KAAK,EACL,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,QAAgB,GACjB,EAAE,qBAAqB,sCAuIvB"}
@@ -14,5 +14,5 @@ export interface OklchColorPickerProps {
14
14
  /** Optional error message */
15
15
  error?: string;
16
16
  }
17
- export declare function OklchColorPicker({ value, onChange, label, disabled, className, description, error, }: OklchColorPickerProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function OklchColorPicker({ value, onChange, label, disabled, className, description, error, }: OklchColorPickerProps): import("react").JSX.Element;
18
18
  //# sourceMappingURL=OklchColorPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OklchColorPicker.d.ts","sourceRoot":"","sources":["../../src/branding/OklchColorPicker.tsx"],"names":[],"mappings":"AAyBA,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AA+BD,wBAAgB,gBAAgB,CAAC,EAC/B,KAA0B,EAC1B,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,SAAS,EACT,WAAW,EACX,KAAK,GACN,EAAE,qBAAqB,2CA8LvB"}
1
+ {"version":3,"file":"OklchColorPicker.d.ts","sourceRoot":"","sources":["../../src/branding/OklchColorPicker.tsx"],"names":[],"mappings":"AAyBA,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AA+BD,wBAAgB,gBAAgB,CAAC,EAC/B,KAA0B,EAC1B,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,SAAS,EACT,WAAW,EACX,KAAK,GACN,EAAE,qBAAqB,+BA8LvB"}
@@ -0,0 +1,9 @@
1
+ import { type ButtonHTMLAttributes } from 'react';
2
+ export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
3
+ export type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
4
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ }
8
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
9
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAG7D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,CAAA;AAClG,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AAEpD,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAkBD,eAAO,MAAM,MAAM,2GAmBjB,CAAA"}
package/dist/button.js ADDED
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { cn } from './utils.js';
4
+ const variantClasses = {
5
+ primary: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',
6
+ secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
7
+ outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
8
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
9
+ destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
10
+ link: 'text-primary underline-offset-4 hover:underline',
11
+ };
12
+ const sizeClasses = {
13
+ sm: 'h-8 rounded-md px-3 text-xs',
14
+ md: 'h-10 rounded-md px-4 py-2 text-sm',
15
+ lg: 'h-11 rounded-md px-8 text-base',
16
+ icon: 'h-10 w-10 rounded-md',
17
+ };
18
+ export const Button = forwardRef(function Button({ className, variant = 'primary', size = 'md', type = 'button', ...props }, ref) {
19
+ return (_jsx("button", { ref: ref, type: type, className: cn('inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', 'disabled:pointer-events-none disabled:opacity-50', variantClasses[variant], sizeClasses[size], className), ...props }));
20
+ });
@@ -18,5 +18,5 @@ export interface D2CDefaultLogoProps extends SVGProps<SVGSVGElement> {
18
18
  /** Title for screen readers — defaults to "BSuite". */
19
19
  title?: string;
20
20
  }
21
- export declare function D2CDefaultLogo({ title, width, height, role, 'aria-label': ariaLabel, ...rest }: D2CDefaultLogoProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function D2CDefaultLogo({ title, width, height, role, 'aria-label': ariaLabel, ...rest }: D2CDefaultLogoProps): import("react").JSX.Element;
22
22
  //# sourceMappingURL=default-logo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-logo.d.ts","sourceRoot":"","sources":["../src/default-logo.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,WAAW,mBAAoB,SAAQ,QAAQ,CAAC,aAAa,CAAC;IAClE,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAgB,EAChB,KAAU,EACV,MAAW,EACX,IAAY,EACZ,YAAY,EAAE,SAAS,EACvB,GAAG,IAAI,EACR,EAAE,mBAAmB,2CAsBrB"}
1
+ {"version":3,"file":"default-logo.d.ts","sourceRoot":"","sources":["../src/default-logo.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,WAAW,mBAAoB,SAAQ,QAAQ,CAAC,aAAa,CAAC;IAClE,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAgB,EAChB,KAAU,EACV,MAAW,EACX,IAAY,EACZ,YAAY,EAAE,SAAS,EACvB,GAAG,IAAI,EACR,EAAE,mBAAmB,+BAsBrB"}
@@ -0,0 +1,15 @@
1
+ import { type ComponentPropsWithoutRef, type HTMLAttributes } from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
4
+ export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ export declare const DialogPortal: import("react").FC<DialogPrimitive.DialogPortalProps>;
7
+ export type DialogOverlayProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
8
+ export type DialogContentProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
9
+ export declare const DialogOverlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare const DialogContent: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ export declare function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
12
+ export declare function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
13
+ export declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
14
+ export declare const DialogDescription: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
15
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAqB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AACzG,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAGzD,eAAO,MAAM,MAAM,iDAAuB,CAAA;AAC1C,eAAO,MAAM,aAAa,kIAA0B,CAAA;AACpD,eAAO,MAAM,WAAW,gIAAwB,CAAA;AAChD,eAAO,MAAM,YAAY,uDAAyB,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAA;AACzF,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAA;AAEzF,eAAO,MAAM,aAAa,4LAexB,CAAA;AAEF,eAAO,MAAM,aAAa,4LA8BxB,CAAA;AAEF,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,+BAEnF;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,+BAOnF;AAED,eAAO,MAAM,WAAW,kMAWtB,CAAA;AAEF,eAAO,MAAM,iBAAiB,4MAW5B,CAAA"}
package/dist/dialog.js ADDED
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import { cn } from './utils.js';
5
+ export const Dialog = DialogPrimitive.Root;
6
+ export const DialogTrigger = DialogPrimitive.Trigger;
7
+ export const DialogClose = DialogPrimitive.Close;
8
+ export const DialogPortal = DialogPrimitive.Portal;
9
+ export const DialogOverlay = forwardRef(function DialogOverlay({ className, ...props }, ref) {
10
+ return (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm', 'data-[state=closed]:animate-out data-[state=open]:animate-in', className), ...props }));
11
+ });
12
+ export const DialogContent = forwardRef(function DialogContent({ children, className, ...props }, ref) {
13
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4', 'rounded-lg border border-border bg-card p-6 text-card-foreground shadow-lg', 'duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in', className), ...props, children: [children, _jsx(DialogPrimitive.Close, { "aria-label": "Close dialog", className: cn('absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100', 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2'), children: _jsx("span", { "aria-hidden": "true", children: "x" }) })] })] }));
14
+ });
15
+ export function DialogHeader({ className, ...props }) {
16
+ return _jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props });
17
+ }
18
+ export function DialogFooter({ className, ...props }) {
19
+ return (_jsx("div", { className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className), ...props }));
20
+ }
21
+ export const DialogTitle = forwardRef(function DialogTitle({ className, ...props }, ref) {
22
+ return (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props }));
23
+ });
24
+ export const DialogDescription = forwardRef(function DialogDescription({ className, ...props }, ref) {
25
+ return (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props }));
26
+ });
@@ -14,7 +14,7 @@ import React from 'react';
14
14
  * @keyframes rule in its CSS (kept out of this package so
15
15
  * apps can theme the glow to their brand).
16
16
  * @param className Additional classes merged via `tailwind-merge` so
17
- * consumers can override the default `text-neutral-400/80`
17
+ * consumers can override the default `text-muted-foreground/80`
18
18
  * colour (dots use `fill="currentColor"` so overriding
19
19
  * `text-*` is the supported way to set colour).
20
20
  */
@@ -44,5 +44,5 @@ export interface DotPatternProps extends React.SVGProps<SVGSVGElement> {
44
44
  * corporate app deliberately does NOT use this — its brand is photo-
45
45
  * forward, not a tech-grid aesthetic.
46
46
  */
47
- export declare function DotPattern({ width, height, x, y, cx, cy, cr, className, glow, ...props }: DotPatternProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function DotPattern({ width, height, x, y, cx, cy, cr, className, glow, ...props }: DotPatternProps): React.JSX.Element;
48
48
  //# sourceMappingURL=dot-pattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dot-pattern.d.ts","sourceRoot":"","sources":["../src/dot-pattern.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAU,EACV,MAAW,EACX,CAAK,EACL,CAAK,EACL,EAAM,EACN,EAAM,EACN,EAAM,EACN,SAAS,EACT,IAAY,EACZ,GAAG,KAAK,EACT,EAAE,eAAe,2CA4BjB"}
1
+ {"version":3,"file":"dot-pattern.d.ts","sourceRoot":"","sources":["../src/dot-pattern.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAU,EACV,MAAW,EACX,CAAK,EACL,CAAK,EACL,EAAM,EACN,EAAM,EACN,EAAM,EACN,SAAS,EACT,IAAY,EACZ,GAAG,KAAK,EACT,EAAE,eAAe,qBA4BjB"}
@@ -18,5 +18,5 @@ import { cn } from './utils.js';
18
18
  */
19
19
  export function DotPattern({ width = 16, height = 16, x = 0, y = 0, cx = 1, cy = 1, cr = 1, className, glow = false, ...props }) {
20
20
  const id = useId();
21
- return (_jsxs("svg", { "aria-hidden": "true", className: cn('pointer-events-none absolute inset-0 h-full w-full text-neutral-400/80', glow && 'animate-dot-glow', className), ...props, children: [_jsx("defs", { children: _jsx("pattern", { id: `${id}-pattern`, x: x, y: y, width: width, height: height, patternUnits: "userSpaceOnUse", children: _jsx("circle", { cx: cx, cy: cy, r: cr, fill: "currentColor" }) }) }), _jsx("rect", { width: "100%", height: "100%", fill: `url(#${id}-pattern)` })] }));
21
+ return (_jsxs("svg", { "aria-hidden": "true", className: cn('pointer-events-none absolute inset-0 h-full w-full text-muted-foreground/80', glow && 'animate-dot-glow', className), ...props, children: [_jsx("defs", { children: _jsx("pattern", { id: `${id}-pattern`, x: x, y: y, width: width, height: height, patternUnits: "userSpaceOnUse", children: _jsx("circle", { cx: cx, cy: cy, r: cr, fill: "currentColor" }) }) }), _jsx("rect", { width: "100%", height: "100%", fill: `url(#${id}-pattern)` })] }));
22
22
  }
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ icon?: ReactNode;
4
+ title: ReactNode;
5
+ description?: ReactNode;
6
+ action?: ReactNode;
7
+ }
8
+ export declare function EmptyState({ icon, title, description, action, className, ...props }: EmptyStateProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../src/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACpF,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,+BAejB"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from './utils.js';
3
+ export function EmptyState({ icon, title, description, action, className, ...props }) {
4
+ return (_jsxs("div", { className: cn('flex min-h-48 flex-col items-center justify-center rounded-lg border border-dashed border-border bg-card/60 p-8 text-center', className), ...props, children: [icon ? _jsx("div", { className: "mb-4 text-muted-foreground", children: icon }) : null, _jsx("h3", { className: "text-base font-semibold text-foreground", children: title }), description ? _jsx("p", { className: "mt-2 max-w-md text-sm text-muted-foreground", children: description }) : null, action ? _jsx("div", { className: "mt-6", children: action }) : null] }));
5
+ }
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type ErrorBoundaryPropsWithRender } from 'react-error-boundary';
3
+ export interface ErrorBoundaryProps {
4
+ children: ReactNode;
5
+ fallback?: ReactNode;
6
+ fallbackRender?: ErrorBoundaryPropsWithRender['fallbackRender'];
7
+ onError?: ErrorBoundaryPropsWithRender['onError'];
8
+ onReset?: ErrorBoundaryPropsWithRender['onReset'];
9
+ resetKeys?: ErrorBoundaryPropsWithRender['resetKeys'];
10
+ title?: ReactNode;
11
+ description?: ReactNode;
12
+ showErrorMessage?: boolean;
13
+ }
14
+ export declare function ErrorBoundary({ children, fallback, fallbackRender, onError, onReset, resetKeys, title, description, showErrorMessage, }: ErrorBoundaryProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=error-boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../src/error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAEL,KAAK,4BAA4B,EAElC,MAAM,sBAAsB,CAAA;AAI7B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,cAAc,CAAC,EAAE,4BAA4B,CAAC,gBAAgB,CAAC,CAAA;IAC/D,OAAO,CAAC,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAA;IACjD,OAAO,CAAC,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAA;IACjD,SAAS,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAA;IACrD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AA0BD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,gBAAgB,GACjB,EAAE,kBAAkB,+BA2CpB"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ErrorBoundary as ReactErrorBoundary, } from 'react-error-boundary';
3
+ import { Button } from './button.js';
4
+ import { EmptyState } from './empty-state.js';
5
+ function DefaultFallback({ error, resetErrorBoundary, title, description, showErrorMessage, }) {
6
+ const safeDescription = 'The view could not be rendered. Please try again.';
7
+ const debugDescription = error instanceof Error ? error.message : safeDescription;
8
+ return (_jsx(EmptyState, { role: "alert", title: title ?? 'Something went wrong', description: description ?? (showErrorMessage ? debugDescription : safeDescription), action: _jsx(Button, { variant: "outline", onClick: resetErrorBoundary, children: "Try again" }) }));
9
+ }
10
+ export function ErrorBoundary({ children, fallback, fallbackRender, onError, onReset, resetKeys, title, description, showErrorMessage, }) {
11
+ if (fallback !== undefined) {
12
+ return (_jsx(ReactErrorBoundary, { fallback: fallback, onError: onError, onReset: onReset, resetKeys: resetKeys, children: children }));
13
+ }
14
+ if (fallbackRender) {
15
+ return (_jsx(ReactErrorBoundary, { fallbackRender: fallbackRender, onError: onError, onReset: onReset, resetKeys: resetKeys, children: children }));
16
+ }
17
+ return (_jsx(ReactErrorBoundary, { fallbackRender: (props) => (_jsx(DefaultFallback, { ...props, title: title, description: description, showErrorMessage: showErrorMessage })), onError: onError, onReset: onReset, resetKeys: resetKeys, children: children }));
18
+ }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ export interface HeroGridProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ className?: string;
4
+ }
5
+ /**
6
+ * Marketing / pre-auth hero-band grid background.
7
+ *
8
+ * Grid/dot doctrine (packages/theme/docs/TOKEN-MAPPING.md §8, W3 §3.3):
9
+ *
10
+ * GRID — public/pre-auth marketing surfaces ONLY. Localised to the hero
11
+ * band (place inside a `position: relative` wrapper), behind the
12
+ * hero text/image content. Never full-viewport, never behind
13
+ * authenticated content.
14
+ * DOT — authenticated app pages ONLY (see `<DotPattern>` in this same
15
+ * package). Rendered once, full-page, behind all cards.
16
+ *
17
+ * GRID and DOT are mutually exclusive within a single context — a page is
18
+ * either a public marketing surface (grid) or an authenticated shell
19
+ * (dot), never both. The `@bsuite/dry-lint` rule
20
+ * `no-grid-dot-doctrine-violation` flags cross-context usage and hand-rolled
21
+ * duplicates of either pattern.
22
+ *
23
+ * CSS lifted verbatim from braden's `.platform-hero-grid`
24
+ * (braden/src/index.css) via the shared `.bsuite-hero-grid` utility class
25
+ * (packages/theme/src/css/utilities.css) — 1px grid lines at 32px x 32px,
26
+ * `oklch(0 0 0 / 0.03)` light / `oklch(1 0 0 / 0.03)` dark. Requires the
27
+ * consumer app to import `@bsuite/theme/css` (or `utilities.css`
28
+ * directly) so `.bsuite-hero-grid` and the `.dark` override resolve.
29
+ *
30
+ * Usage:
31
+ * ```tsx
32
+ * <div className="relative overflow-hidden">
33
+ * <HeroGrid />
34
+ * <div className="relative z-10">... hero text/image ...</div>
35
+ * </div>
36
+ * ```
37
+ */
38
+ export declare function HeroGrid({ className, ...props }: HeroGridProps): React.JSX.Element;
39
+ //# sourceMappingURL=hero-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hero-grid.d.ts","sourceRoot":"","sources":["../src/hero-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBAQ9D"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from './utils.js';
3
+ /**
4
+ * Marketing / pre-auth hero-band grid background.
5
+ *
6
+ * Grid/dot doctrine (packages/theme/docs/TOKEN-MAPPING.md §8, W3 §3.3):
7
+ *
8
+ * GRID — public/pre-auth marketing surfaces ONLY. Localised to the hero
9
+ * band (place inside a `position: relative` wrapper), behind the
10
+ * hero text/image content. Never full-viewport, never behind
11
+ * authenticated content.
12
+ * DOT — authenticated app pages ONLY (see `<DotPattern>` in this same
13
+ * package). Rendered once, full-page, behind all cards.
14
+ *
15
+ * GRID and DOT are mutually exclusive within a single context — a page is
16
+ * either a public marketing surface (grid) or an authenticated shell
17
+ * (dot), never both. The `@bsuite/dry-lint` rule
18
+ * `no-grid-dot-doctrine-violation` flags cross-context usage and hand-rolled
19
+ * duplicates of either pattern.
20
+ *
21
+ * CSS lifted verbatim from braden's `.platform-hero-grid`
22
+ * (braden/src/index.css) via the shared `.bsuite-hero-grid` utility class
23
+ * (packages/theme/src/css/utilities.css) — 1px grid lines at 32px x 32px,
24
+ * `oklch(0 0 0 / 0.03)` light / `oklch(1 0 0 / 0.03)` dark. Requires the
25
+ * consumer app to import `@bsuite/theme/css` (or `utilities.css`
26
+ * directly) so `.bsuite-hero-grid` and the `.dark` override resolve.
27
+ *
28
+ * Usage:
29
+ * ```tsx
30
+ * <div className="relative overflow-hidden">
31
+ * <HeroGrid />
32
+ * <div className="relative z-10">... hero text/image ...</div>
33
+ * </div>
34
+ * ```
35
+ */
36
+ export function HeroGrid({ className, ...props }) {
37
+ return (_jsx("div", { "aria-hidden": "true", className: cn('pointer-events-none bsuite-hero-grid', className), ...props }));
38
+ }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,14 @@
1
1
  export { DotPattern, type DotPatternProps } from './dot-pattern.js';
2
+ export { HeroGrid, type HeroGridProps } from './hero-grid.js';
3
+ export { AppShell, type AppShellProps } from './app-shell.js';
2
4
  export { cn } from './utils.js';
3
5
  export { Logo, resolveLogoUrl, type LogoProps, type LogoSlot, type LogoColorScheme, type LogoBranding, type ResolvedLogo, type AppSlug, } from './Logo.js';
4
6
  export { D2CDefaultLogo, type D2CDefaultLogoProps } from './default-logo.js';
7
+ export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, } from './button.js';
8
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DialogContentProps, type DialogOverlayProps, } from './dialog.js';
9
+ export { EmptyState, type EmptyStateProps } from './empty-state.js';
10
+ export { ErrorBoundary, type ErrorBoundaryProps } from './error-boundary.js';
11
+ export { LoadingSpinner, type LoadingSpinnerProps } from './loading-spinner.js';
12
+ export { StatusBadge, type StatusBadgeProps, type StatusBadgeTone } from './status-badge.js';
5
13
  export { BrandingCard, ColorEditorSheet, OklchColorPicker, type BrandingCardProps, type ColorEditorSheetProps, type OklchColorPickerProps, } from './branding/index.js';
6
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,OAAO,EACL,IAAI,EACJ,cAAc,EACd,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,OAAO,GACb,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAG5E,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,OAAO,EACL,IAAI,EACJ,cAAc,EACd,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,OAAO,GACb,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAG5F,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA"}
package/dist/index.js CHANGED
@@ -1,6 +1,14 @@
1
1
  export { DotPattern } from './dot-pattern.js';
2
+ export { HeroGrid } from './hero-grid.js';
3
+ export { AppShell } from './app-shell.js';
2
4
  export { cn } from './utils.js';
3
5
  export { Logo, resolveLogoUrl, } from './Logo.js';
4
6
  export { D2CDefaultLogo } from './default-logo.js';
7
+ export { Button, } from './button.js';
8
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './dialog.js';
9
+ export { EmptyState } from './empty-state.js';
10
+ export { ErrorBoundary } from './error-boundary.js';
11
+ export { LoadingSpinner } from './loading-spinner.js';
12
+ export { StatusBadge } from './status-badge.js';
5
13
  // Branding components (v0.3.0+)
6
14
  export { BrandingCard, ColorEditorSheet, OklchColorPicker, } from './branding/index.js';
@@ -0,0 +1,7 @@
1
+ import type { SVGAttributes } from 'react';
2
+ export interface LoadingSpinnerProps extends SVGAttributes<SVGSVGElement> {
3
+ label?: string;
4
+ size?: 'sm' | 'md' | 'lg';
5
+ }
6
+ export declare function LoadingSpinner({ className, label, size, ...props }: LoadingSpinnerProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=loading-spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading-spinner.d.ts","sourceRoot":"","sources":["../src/loading-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,MAAM,WAAW,mBAAoB,SAAQ,aAAa,CAAC,aAAa,CAAC;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC1B;AAQD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,KAAiB,EACjB,IAAW,EACX,GAAG,KAAK,EACT,EAAE,mBAAmB,+BAkBrB"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from './utils.js';
3
+ const sizeClasses = {
4
+ sm: 'h-4 w-4',
5
+ md: 'h-6 w-6',
6
+ lg: 'h-8 w-8',
7
+ };
8
+ export function LoadingSpinner({ className, label = 'Loading', size = 'md', ...props }) {
9
+ return (_jsxs("svg", { role: "status", "aria-label": label, className: cn('animate-spin text-primary', sizeClasses[size], className), viewBox: "0 0 24 24", fill: "none", ...props, children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4z" })] }));
10
+ }
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export type StatusBadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'destructive';
3
+ export interface StatusBadgeProps extends HTMLAttributes<HTMLSpanElement> {
4
+ tone?: StatusBadgeTone;
5
+ }
6
+ export declare function StatusBadge({ className, tone, ...props }: StatusBadgeProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=status-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../src/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAA;AAExF,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,eAAe,CAAC;IACvE,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB;AAUD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAWtF"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from './utils.js';
3
+ const toneClasses = {
4
+ neutral: 'border-border bg-muted text-muted-foreground',
5
+ info: 'border-primary/20 bg-primary/10 text-primary',
6
+ success: 'border-status-success/20 bg-status-success/10 text-status-success',
7
+ warning: 'border-status-warning/20 bg-status-warning/10 text-status-warning',
8
+ destructive: 'border-destructive/20 bg-destructive/10 text-destructive',
9
+ };
10
+ export function StatusBadge({ className, tone = 'neutral', ...props }) {
11
+ return (_jsx("span", { className: cn('inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium', toneClasses[tone], className), ...props }));
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsuite/ui",
3
- "version": "0.3.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -27,6 +27,10 @@
27
27
  "import": "./dist/dot-pattern.js",
28
28
  "types": "./dist/dot-pattern.d.ts"
29
29
  },
30
+ "./hero-grid": {
31
+ "import": "./dist/hero-grid.js",
32
+ "types": "./dist/hero-grid.d.ts"
33
+ },
30
34
  "./utils": {
31
35
  "import": "./dist/utils.js",
32
36
  "types": "./dist/utils.d.ts"
@@ -35,32 +39,72 @@
35
39
  "import": "./dist/branding/index.js",
36
40
  "types": "./dist/branding/index.d.ts"
37
41
  },
42
+ "./button": {
43
+ "import": "./dist/button.js",
44
+ "types": "./dist/button.d.ts"
45
+ },
46
+ "./dialog": {
47
+ "import": "./dist/dialog.js",
48
+ "types": "./dist/dialog.d.ts"
49
+ },
50
+ "./empty-state": {
51
+ "import": "./dist/empty-state.js",
52
+ "types": "./dist/empty-state.d.ts"
53
+ },
54
+ "./error-boundary": {
55
+ "import": "./dist/error-boundary.js",
56
+ "types": "./dist/error-boundary.d.ts"
57
+ },
58
+ "./loading-spinner": {
59
+ "import": "./dist/loading-spinner.js",
60
+ "types": "./dist/loading-spinner.d.ts"
61
+ },
62
+ "./status-badge": {
63
+ "import": "./dist/status-badge.js",
64
+ "types": "./dist/status-badge.d.ts"
65
+ },
38
66
  "./assets/d2c-default-logo.svg": "./src/assets/d2c-default-logo.svg"
39
67
  },
40
68
  "scripts": {
41
69
  "build": "tsc -p tsconfig.build.json",
70
+ "storybook": "storybook dev -p 6006",
71
+ "build-storybook": "storybook build",
42
72
  "typecheck": "tsc --noEmit",
43
73
  "test": "vitest run"
44
74
  },
45
75
  "dependencies": {
76
+ "@radix-ui/react-dialog": "^1.1.16",
46
77
  "clsx": "^2.1.1",
47
- "tailwind-merge": "^3.5.0"
78
+ "react-error-boundary": "^6.1.2",
79
+ "tailwind-merge": "^3.6.0"
48
80
  },
49
81
  "peerDependencies": {
82
+ "@bsuite/theme": ">=0.6.0",
50
83
  "react": "^18.3.0 || ^19.0.0",
51
84
  "react-dom": "^18.3.0 || ^19.0.0"
52
85
  },
86
+ "peerDependenciesMeta": {
87
+ "@bsuite/theme": {
88
+ "optional": true
89
+ }
90
+ },
53
91
  "devDependencies": {
92
+ "@bsuite/theme": "^0.5.0",
93
+ "@storybook/react-vite": "^10.4.3",
94
+ "@tailwindcss/vite": "^4.3.0",
54
95
  "@testing-library/jest-dom": "^6.9.1",
55
96
  "@testing-library/react": "^16.3.2",
56
- "@types/react": "^19.2.14",
97
+ "@testing-library/user-event": "^14.6.1",
98
+ "@types/react": "^19.2.17",
57
99
  "@types/react-dom": "^19.2.3",
58
- "@vitejs/plugin-react": "^6.0.1",
100
+ "@vitejs/plugin-react": "^6.0.2",
59
101
  "jsdom": "^29.1.1",
60
- "react": "^19.2.5",
61
- "react-dom": "^19.2.5",
62
- "typescript": "~5.9.3",
63
- "vite": "^8.0.10",
64
- "vitest": "^4.1.5"
102
+ "react": "^19.2.7",
103
+ "react-dom": "^19.2.7",
104
+ "storybook": "^10.4.3",
105
+ "tailwindcss": "^4.3.0",
106
+ "typescript": "~6.0.3",
107
+ "vite": "^8.0.16",
108
+ "vitest": "^4.1.8"
65
109
  }
66
110
  }