@proteos/ui 0.57.0 → 0.57.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteos/ui",
3
- "version": "0.57.0",
3
+ "version": "0.57.1",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "description": "Proteos React component library (React Aria Components + Tailwind v4).",
6
6
  "repository": {
@@ -56,7 +56,7 @@
56
56
  "tailwind-variants": "^3.2.2",
57
57
  "tailwindcss": "^4.2.4",
58
58
  "thinking-orbs": "^0.3.1",
59
- "@proteos/sdk": "0.57.0"
59
+ "@proteos/sdk": "0.57.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@biomejs/biome": "^2.4.13",
@@ -58,6 +58,15 @@ describe('Modal', () => {
58
58
  expect(dialog).toBeInTheDocument()
59
59
  })
60
60
 
61
+ it('names an untitled dialog by its aria-label', async () => {
62
+ render(
63
+ <ModalContent isOpen aria-label="Contact picker">
64
+ <ModalBody>Body content</ModalBody>
65
+ </ModalContent>,
66
+ )
67
+ expect(await screen.findByRole('dialog', { name: 'Contact picker' })).toBeInTheDocument()
68
+ })
69
+
61
70
  it('closes on Escape', async () => {
62
71
  const user = userEvent.setup()
63
72
  const onOpenChange = vi.fn()
@@ -45,6 +45,13 @@ export type ModalContentProps = AriaModalOverlayProps & {
45
45
  children: AriaDialogProps['children']
46
46
  /** Visual override for the panel wrapper (affects width, padding, etc.). */
47
47
  modalClassName?: string
48
+ /** Visual override for the dialog element inside the panel — the column the
49
+ * slots sit in. It hugs its content by default; a panel given a height of
50
+ * its own needs `grow` here for the slots to fill it. */
51
+ dialogClassName?: string
52
+ /** Accessible name for a dialog WITHOUT a `<ModalTitle>`. A titled dialog is
53
+ * named by its title and doesn't need this. */
54
+ 'aria-label'?: string
48
55
  }
49
56
 
50
57
  /**
@@ -55,7 +62,9 @@ export function ModalContent({
55
62
  children,
56
63
  className,
57
64
  modalClassName,
65
+ dialogClassName,
58
66
  isDismissable = true,
67
+ 'aria-label': ariaLabel,
59
68
  ...props
60
69
  }: ModalContentProps) {
61
70
  return (
@@ -87,7 +96,10 @@ export function ModalContent({
87
96
  modalClassName,
88
97
  )}
89
98
  >
90
- <AriaDialog className="outline-none flex flex-col min-h-0 overflow-hidden">
99
+ <AriaDialog
100
+ className={cn('outline-none flex flex-col min-h-0 overflow-hidden', dialogClassName)}
101
+ {...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {})}
102
+ >
91
103
  {children}
92
104
  </AriaDialog>
93
105
  </AriaModal>