tembro 6.0.3 → 6.1.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 (125) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/components/calendar/calendar-range-scheduler.cjs +1 -0
  3. package/dist/components/calendar/calendar-range-scheduler.d.ts +20 -0
  4. package/dist/components/calendar/calendar-range-scheduler.js +1 -0
  5. package/dist/components/calendar/date-time-picker.cjs +1 -0
  6. package/dist/components/calendar/date-time-picker.d.ts +15 -0
  7. package/dist/components/calendar/date-time-picker.js +1 -0
  8. package/dist/components/calendar/index.d.ts +2 -0
  9. package/dist/components/charts/chart-card.cjs +1 -0
  10. package/dist/components/charts/chart-card.d.ts +24 -0
  11. package/dist/components/charts/chart-card.js +1 -0
  12. package/dist/components/charts/index.d.ts +1 -0
  13. package/dist/components/command/advanced-command-menu.cjs +1 -0
  14. package/dist/components/command/advanced-command-menu.d.ts +25 -0
  15. package/dist/components/command/advanced-command-menu.js +1 -0
  16. package/dist/components/command/index.d.ts +1 -0
  17. package/dist/components/data-table/data-grid.cjs +1 -0
  18. package/dist/components/data-table/data-grid.d.ts +15 -0
  19. package/dist/components/data-table/data-grid.js +1 -0
  20. package/dist/components/data-table/index.d.ts +1 -0
  21. package/dist/components/data-table/public.d.ts +1 -0
  22. package/dist/components/feedback/async-boundary.cjs +1 -0
  23. package/dist/components/feedback/async-boundary.d.ts +12 -0
  24. package/dist/components/feedback/async-boundary.js +1 -0
  25. package/dist/components/feedback/index.d.ts +1 -0
  26. package/dist/components/inputs/index.d.ts +1 -0
  27. package/dist/components/inputs/multi-select.cjs +1 -0
  28. package/dist/components/inputs/multi-select.d.ts +16 -0
  29. package/dist/components/inputs/multi-select.js +1 -0
  30. package/dist/components/inputs/public.d.ts +1 -0
  31. package/dist/components/modern/file-manager.cjs +1 -0
  32. package/dist/components/modern/file-manager.d.ts +20 -0
  33. package/dist/components/modern/file-manager.js +1 -0
  34. package/dist/components/modern/index.d.ts +1 -0
  35. package/dist/components/notifications/action-toast.cjs +1 -0
  36. package/dist/components/notifications/action-toast.d.ts +16 -0
  37. package/dist/components/notifications/action-toast.js +1 -0
  38. package/dist/components/notifications/index.d.ts +1 -0
  39. package/dist/components/patterns/index.d.ts +1 -0
  40. package/dist/components/patterns/permissions-matrix.cjs +1 -0
  41. package/dist/components/patterns/permissions-matrix.d.ts +19 -0
  42. package/dist/components/patterns/permissions-matrix.js +1 -0
  43. package/dist/components/patterns/public.d.ts +1 -0
  44. package/dist/src/components/calendar/calendar-range-scheduler.cjs +1 -0
  45. package/dist/src/components/calendar/calendar-range-scheduler.js +75 -0
  46. package/dist/src/components/calendar/date-time-picker.cjs +1 -0
  47. package/dist/src/components/calendar/date-time-picker.js +36 -0
  48. package/dist/src/components/calendar/index.cjs +1 -1
  49. package/dist/src/components/calendar/index.js +5 -3
  50. package/dist/src/components/charts/chart-card.cjs +1 -0
  51. package/dist/src/components/charts/chart-card.js +55 -0
  52. package/dist/src/components/charts/index.cjs +1 -1
  53. package/dist/src/components/charts/index.js +3 -2
  54. package/dist/src/components/command/advanced-command-menu.cjs +1 -0
  55. package/dist/src/components/command/advanced-command-menu.js +57 -0
  56. package/dist/src/components/command/index.cjs +1 -1
  57. package/dist/src/components/command/index.js +3 -2
  58. package/dist/src/components/data-table/data-grid.cjs +1 -0
  59. package/dist/src/components/data-table/data-grid.js +32 -0
  60. package/dist/src/components/data-table/data-table-saved-filters.cjs +1 -1
  61. package/dist/src/components/data-table/data-table-saved-filters.js +11 -11
  62. package/dist/src/components/data-table/data-table.cjs +1 -1
  63. package/dist/src/components/data-table/data-table.js +170 -170
  64. package/dist/src/components/data-table/index.cjs +1 -1
  65. package/dist/src/components/data-table/index.js +15 -14
  66. package/dist/src/components/data-table/public.cjs +1 -1
  67. package/dist/src/components/data-table/public.js +3 -2
  68. package/dist/src/components/feedback/async-boundary.cjs +1 -0
  69. package/dist/src/components/feedback/async-boundary.js +22 -0
  70. package/dist/src/components/feedback/index.cjs +1 -1
  71. package/dist/src/components/feedback/index.js +2 -1
  72. package/dist/src/components/inputs/index.cjs +1 -1
  73. package/dist/src/components/inputs/index.js +13 -12
  74. package/dist/src/components/inputs/multi-select.cjs +1 -0
  75. package/dist/src/components/inputs/multi-select.js +80 -0
  76. package/dist/src/components/inputs/public.cjs +1 -1
  77. package/dist/src/components/inputs/public.js +13 -12
  78. package/dist/src/components/modern/file-manager.cjs +1 -0
  79. package/dist/src/components/modern/file-manager.js +75 -0
  80. package/dist/src/components/modern/index.cjs +1 -1
  81. package/dist/src/components/modern/index.js +5 -4
  82. package/dist/src/components/notifications/action-toast.cjs +1 -0
  83. package/dist/src/components/notifications/action-toast.js +49 -0
  84. package/dist/src/components/notifications/index.cjs +1 -1
  85. package/dist/src/components/notifications/index.js +3 -2
  86. package/dist/src/components/patterns/index.cjs +1 -1
  87. package/dist/src/components/patterns/index.js +2 -1
  88. package/dist/src/components/patterns/permissions-matrix.cjs +1 -0
  89. package/dist/src/components/patterns/permissions-matrix.js +43 -0
  90. package/dist/src/components/patterns/public.cjs +1 -1
  91. package/dist/src/components/patterns/public.js +2 -1
  92. package/dist/src/components/ui/input/group.cjs +1 -1
  93. package/dist/src/components/ui/input/group.js +8 -8
  94. package/dist/src/index.cjs +1 -1
  95. package/dist/src/index.js +117 -107
  96. package/dist/src/public-component-surface.cjs +1 -1
  97. package/dist/src/public-component-surface.js +50 -0
  98. package/package.json +1 -1
  99. package/packages/cli/dist/index.cjs +73 -73
  100. package/packages/cli/vendor/src/components/calendar/calendar-range-scheduler.tsx +72 -0
  101. package/packages/cli/vendor/src/components/calendar/date-time-picker.tsx +53 -0
  102. package/packages/cli/vendor/src/components/calendar/index.ts +5 -3
  103. package/packages/cli/vendor/src/components/charts/chart-card.tsx +81 -0
  104. package/packages/cli/vendor/src/components/charts/index.ts +1 -0
  105. package/packages/cli/vendor/src/components/command/advanced-command-menu.tsx +88 -0
  106. package/packages/cli/vendor/src/components/command/index.ts +2 -1
  107. package/packages/cli/vendor/src/components/data-table/data-grid.tsx +59 -0
  108. package/packages/cli/vendor/src/components/data-table/index.ts +3 -2
  109. package/packages/cli/vendor/src/components/data-table/public.ts +1 -0
  110. package/packages/cli/vendor/src/components/feedback/async-boundary.tsx +36 -0
  111. package/packages/cli/vendor/src/components/feedback/index.ts +1 -0
  112. package/packages/cli/vendor/src/components/inputs/index.ts +1 -0
  113. package/packages/cli/vendor/src/components/inputs/multi-select.tsx +75 -0
  114. package/packages/cli/vendor/src/components/inputs/public.ts +1 -0
  115. package/packages/cli/vendor/src/components/modern/file-manager.tsx +79 -0
  116. package/packages/cli/vendor/src/components/modern/index.ts +1 -0
  117. package/packages/cli/vendor/src/components/notifications/action-toast.tsx +78 -0
  118. package/packages/cli/vendor/src/components/notifications/index.ts +2 -1
  119. package/packages/cli/vendor/src/components/patterns/index.ts +1 -0
  120. package/packages/cli/vendor/src/components/patterns/permissions-matrix.tsx +71 -0
  121. package/packages/cli/vendor/src/components/patterns/public.ts +1 -0
  122. package/packages/cli/vendor/src/public-component-surface.ts +10 -0
  123. package/packages/cli/vendor/templates/showcase/src/showcase/layout/HeroSection.tsx +2 -2
  124. package/packages/cli/vendor/templates/showcase/src/showcase/layout/WorkbenchSidebar.tsx +1 -1
  125. package/registry.json +3264 -2794
@@ -0,0 +1,78 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { RotateCcwIcon } from "lucide-react"
5
+
6
+ import { Button } from "@/components/ui/button"
7
+ import { useToast, type CreateToastInput, type ToastShortcutInput } from "@/components/notifications/toast"
8
+
9
+ export type ActionToastOptions = Omit<CreateToastInput, "action"> & {
10
+ actionLabel?: React.ReactNode
11
+ onAction?: () => void
12
+ undoLabel?: React.ReactNode
13
+ onUndo?: () => void
14
+ }
15
+
16
+ export type ActionToastButtonProps = React.ComponentProps<typeof Button> & {
17
+ toast: ActionToastOptions
18
+ }
19
+
20
+ function ActionToastButton({ toast, children, onClick, ...props }: ActionToastButtonProps) {
21
+ const toaster = useToast()
22
+
23
+ return (
24
+ <Button
25
+ {...props}
26
+ onClick={(event) => {
27
+ onClick?.(event)
28
+ if (event.defaultPrevented) return
29
+ showActionToast(toaster, toast)
30
+ }}
31
+ >
32
+ {children}
33
+ </Button>
34
+ )
35
+ }
36
+
37
+ function ActionToastUndoButton({ onUndo, label = "Undo" }: { onUndo?: () => void; label?: React.ReactNode }) {
38
+ return (
39
+ <Button type="button" size="sm" variant="outline" leftIcon={<RotateCcwIcon className="size-3.5" />} onClick={onUndo}>
40
+ {label}
41
+ </Button>
42
+ )
43
+ }
44
+
45
+ function showActionToast(
46
+ toaster: ReturnType<typeof useToast>,
47
+ {
48
+ actionLabel = "Action",
49
+ onAction,
50
+ undoLabel,
51
+ onUndo,
52
+ ...toast
53
+ }: ActionToastOptions
54
+ ) {
55
+ const action = onUndo ? (
56
+ <ActionToastUndoButton onUndo={onUndo} label={undoLabel} />
57
+ ) : onAction ? (
58
+ <Button type="button" size="sm" variant="outline" onClick={onAction}>{actionLabel}</Button>
59
+ ) : undefined
60
+
61
+ return toaster.addToast({ ...toast, action })
62
+ }
63
+
64
+ function useActionToast() {
65
+ const toaster = useToast()
66
+
67
+ return React.useCallback(
68
+ (toast: ActionToastOptions | ToastShortcutInput) => {
69
+ if (typeof toast === "object" && toast !== null && !React.isValidElement(toast) && !Array.isArray(toast)) {
70
+ return showActionToast(toaster, toast as ActionToastOptions)
71
+ }
72
+ return toaster.info(toast)
73
+ },
74
+ [toaster]
75
+ )
76
+ }
77
+
78
+ export { ActionToastButton, showActionToast, useActionToast }
@@ -1,2 +1,3 @@
1
- export * from "./toast"
1
+ export * from "./toast"
2
2
  export * from "./notification-center"
3
+ export * from "./action-toast"
@@ -1 +1,2 @@
1
1
  export * from "./empty-state"
2
+ export * from "./permissions-matrix"
@@ -0,0 +1,71 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+
5
+ import { Checkbox } from "@/components/ui/checkbox"
6
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
7
+ import { cn } from "@/lib/utils"
8
+
9
+ export type PermissionMatrixRole = {
10
+ key: string
11
+ label: React.ReactNode
12
+ }
13
+
14
+ export type PermissionMatrixPermission = {
15
+ key: string
16
+ label: React.ReactNode
17
+ description?: React.ReactNode
18
+ }
19
+
20
+ export type PermissionMatrixValue = Record<string, string[]>
21
+
22
+ export type PermissionsMatrixProps = React.ComponentProps<"div"> & {
23
+ roles: PermissionMatrixRole[]
24
+ permissions: PermissionMatrixPermission[]
25
+ value?: PermissionMatrixValue
26
+ onValueChange?: (value: PermissionMatrixValue) => void
27
+ }
28
+
29
+ function PermissionsMatrix({ roles, permissions, value = {}, onValueChange, className, ...props }: PermissionsMatrixProps) {
30
+ const toggle = (permissionKey: string, roleKey: string) => {
31
+ const current = value[permissionKey] ?? []
32
+ const next = current.includes(roleKey) ? current.filter((item) => item !== roleKey) : [...current, roleKey]
33
+ onValueChange?.({ ...value, [permissionKey]: next })
34
+ }
35
+
36
+ return (
37
+ <div data-slot="permissions-matrix" className={cn("overflow-hidden rounded-lg border", className)} {...props}>
38
+ <Table>
39
+ <TableHeader>
40
+ <TableRow>
41
+ <TableHead>Permission</TableHead>
42
+ {roles.map((role) => <TableHead key={role.key} className="text-center">{role.label}</TableHead>)}
43
+ </TableRow>
44
+ </TableHeader>
45
+ <TableBody>
46
+ {permissions.map((permission) => (
47
+ <TableRow key={permission.key}>
48
+ <TableCell>
49
+ <span className="grid gap-0.5">
50
+ <span className="font-medium">{permission.label}</span>
51
+ {permission.description ? <span className="text-xs text-muted-foreground">{permission.description}</span> : null}
52
+ </span>
53
+ </TableCell>
54
+ {roles.map((role) => (
55
+ <TableCell key={role.key} className="text-center">
56
+ <Checkbox
57
+ aria-label={`${permission.label} for ${role.label}`}
58
+ checked={(value[permission.key] ?? []).includes(role.key)}
59
+ onCheckedChange={() => toggle(permission.key, role.key)}
60
+ />
61
+ </TableCell>
62
+ ))}
63
+ </TableRow>
64
+ ))}
65
+ </TableBody>
66
+ </Table>
67
+ </div>
68
+ )
69
+ }
70
+
71
+ export { PermissionsMatrix }
@@ -1 +1,2 @@
1
1
  export * from "./empty-state"
2
+ export * from "./permissions-matrix"
@@ -17,6 +17,7 @@ export const documentedPublicComponentSurfaces: readonly PublicComponentSurfaceE
17
17
  { slug: "switch", registryName: "switch", surface: "documented" },
18
18
  { slug: "radio-group", registryName: "radio-group", surface: "documented" },
19
19
  { slug: "number-field", registryName: "number-field", surface: "documented" },
20
+ { slug: "multi-select", registryName: "multi-select", surface: "documented" },
20
21
  { slug: "toggle-group", registryName: "toggle-group", surface: "documented" },
21
22
  { slug: "toolbar", registryName: "toolbar", surface: "documented" },
22
23
  { slug: "overlay", registryName: "dialog", surface: "documented" },
@@ -34,11 +35,14 @@ export const documentedPublicComponentSurfaces: readonly PublicComponentSurfaceE
34
35
  { slug: "alert", registryName: "alert", surface: "documented" },
35
36
  { slug: "toast", registryName: "toast", surface: "documented" },
36
37
  { slug: "notification-center", registryName: "notification-center", surface: "documented" },
38
+ { slug: "action-toast", registryName: "action-toast", surface: "documented" },
37
39
  { slug: "bar-chart", registryName: "charts", surface: "documented" },
40
+ { slug: "chart-card", registryName: "chart-card", surface: "documented" },
38
41
  { slug: "sidebar", registryName: "sidebar", surface: "documented" },
39
42
  { slug: "breadcrumbs", registryName: "breadcrumbs", surface: "documented" },
40
43
  { slug: "workspace-layout", registryName: "workspace-layout", surface: "documented" },
41
44
  { slug: "state-view", registryName: "state-view", surface: "documented" },
45
+ { slug: "async-boundary", registryName: "async-boundary", surface: "documented" },
42
46
  { slug: "file-upload", registryName: "file-upload", surface: "documented" },
43
47
  { slug: "progress", registryName: "progress", surface: "documented" },
44
48
  { slug: "accordion", registryName: "accordion", surface: "documented" },
@@ -47,6 +51,7 @@ export const documentedPublicComponentSurfaces: readonly PublicComponentSurfaceE
47
51
  { slug: "skeleton", registryName: "skeleton", surface: "documented" },
48
52
  { slug: "spinner", registryName: "spinner", surface: "documented" },
49
53
  { slug: "command-palette", registryName: "command-palette", surface: "documented" },
54
+ { slug: "advanced-command-menu", registryName: "advanced-command-menu", surface: "documented" },
50
55
  { slug: "inline-editable", registryName: "inline-editable", surface: "documented" },
51
56
  { slug: "avatar", registryName: "avatar", surface: "documented" },
52
57
  { slug: "code-block", registryName: "code-block", surface: "documented" },
@@ -60,14 +65,18 @@ export const documentedPublicComponentSurfaces: readonly PublicComponentSurfaceE
60
65
  { slug: "copy-button", registryName: "copy-button", surface: "documented" },
61
66
  { slug: "section", registryName: "section", surface: "documented" },
62
67
  { slug: "empty-state", registryName: "empty-state", surface: "documented" },
68
+ { slug: "permissions-matrix", registryName: "permissions-matrix", surface: "documented" },
63
69
  { slug: "calendar-scheduler", registryName: "calendar-scheduler", surface: "documented" },
70
+ { slug: "calendar-range-scheduler", registryName: "calendar-range-scheduler", surface: "documented" },
64
71
  { slug: "dual-list-picker", registryName: "dual-list-picker", surface: "documented" },
65
72
  { slug: "resizable-panel", registryName: "resizable-panel", surface: "documented" },
73
+ { slug: "file-manager", registryName: "file-manager", surface: "documented" },
66
74
  { slug: "tag", registryName: "tag", surface: "documented" },
67
75
  { slug: "carousel", registryName: "carousel", surface: "documented" },
68
76
  { slug: "typography", registryName: "typography", surface: "documented" },
69
77
  { slug: "json-input", registryName: "json-input", surface: "documented" },
70
78
  { slug: "time-picker", registryName: "time-picker", surface: "documented" },
79
+ { slug: "date-time-picker", registryName: "date-time-picker", surface: "documented" },
71
80
  { slug: "sortable-list", registryName: "sortable-list", surface: "documented" },
72
81
  { slug: "virtual-list", registryName: "virtual-list", surface: "documented" },
73
82
  { slug: "color-picker", registryName: "color-picker", surface: "documented" },
@@ -75,6 +84,7 @@ export const documentedPublicComponentSurfaces: readonly PublicComponentSurfaceE
75
84
  { slug: "qr-code", registryName: "qr-code", surface: "documented" },
76
85
  { slug: "rich-text-editor", registryName: "rich-text-editor", surface: "documented" },
77
86
  { slug: "image-cropper", registryName: "image-cropper", surface: "documented" },
87
+ { slug: "data-grid", registryName: "data-grid", surface: "documented" },
78
88
  ] as const
79
89
 
80
90
  export const standalonePublicComponentSurfaces: readonly PublicComponentSurfaceEntry[] = [] as const
@@ -25,7 +25,7 @@ export function HeroSection() {
25
25
  <div className="flex flex-wrap gap-2">
26
26
  <Button leftIcon={<PlusIcon className="size-4" />}>Create</Button>
27
27
  <Button variant="outline" leftIcon={<SettingsIcon className="size-4" />}>Settings</Button>
28
- <CopyButton value="npx tembro@6.0.3 list --json">Copy list command</CopyButton>
28
+ <CopyButton value="npx tembro@6.1.0 list --json">Copy list command</CopyButton>
29
29
  </div>
30
30
  </div>
31
31
 
@@ -33,7 +33,7 @@ export function HeroSection() {
33
33
  <StatisticCard label="Registry components" value={moduleCount} change="visible below" trend="up" description="tembro add <name>" />
34
34
  <StatisticCard label="Local source files" value="152" change="with hooks/lib" trend="up" description="installed by CLI" />
35
35
  <StatisticCard label="Categories" value={registryGroups.length} change="all shown" trend="up" description="actions to wizard" />
36
- <StatisticCard label="Build" value="Pass" change="doctor pass" trend="up" description="tembro@6.0.3" />
36
+ <StatisticCard label="Build" value="Pass" change="doctor pass" trend="up" description="tembro@6.1.0" />
37
37
  </StatisticGrid>
38
38
  </div>
39
39
  </section>
@@ -72,7 +72,7 @@ export function WorkbenchSidebar({ selectedKey, onSelect }: WorkbenchSidebarProp
72
72
  }),
73
73
  ]}
74
74
  footerAccount={{
75
- label: "tembro@6.0.3",
75
+ label: "tembro@6.1.0",
76
76
  description: `${moduleCount} registry components`,
77
77
  }}
78
78
  activeIndicator="bar"