@maxio-com/react-ui-components 9.33.0 → 9.34.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.
@@ -131,7 +131,8 @@ import { parseDate } from '@internationalized/date';
131
131
  ## Imports
132
132
 
133
133
  ```tsx
134
- import { Calendar, I18nProvider } from "@maxio-com/react-ui-components";
134
+ import { Calendar } from "@maxio-com/react-ui-components";
135
+ import { I18nProvider } from "react-aria-components/I18nProvider";
135
136
  ```
136
137
 
137
138
  ## Prop Types
@@ -14,6 +14,7 @@ import { Body, Button, Dialog, DialogTrigger, Popover } from "@maxio-com/react-u
14
14
  | --- | --- | --- | --- | --- | --- |
15
15
  | `children` | `ReactNode \| ((opts: { close: () => void; }) => ReactNode)` | yes | - | Body content. A function receives `close` to dismiss the dialog. | DialogProps |
16
16
  | `className` | `string` | no | - | - | DialogProps |
17
+ | `data-testid` | `string` | no | - | Test ID set on the component's root element. Components with internal parts derive their IDs from it (e.g. `<id>.row.<rowId>`). | TypeLiteral |
17
18
  | `description` | `ReactNode` | no | - | Optional supporting text below the title. | DialogProps |
18
19
  | `footer` | `ReactNode \| ((opts: { close: () => void; }) => ReactNode)` | no | - | Footer content, such as primary and secondary actions. A function receives `close`, so actions can dismiss an uncontrolled dialog. | DialogProps |
19
20
  | `showCloseButton` | `boolean` | no | `role !== 'alertdialog'` | Shows the close button in the header. Defaults to `true`, or `false` when `role="alertdialog"`. | DialogProps |
@@ -4,11 +4,17 @@
4
4
 
5
5
  ### Overview
6
6
 
7
+ Drawer is a panel that slides in from an edge of the page and blocks the
8
+ rest of it until dismissed. It works like Modal: put a `Dialog` inside it
9
+ for the title, body and footer.
10
+
11
+ Drawer works like [Modal](components-modal.md): the `Drawer` is the overlay and the panel, and a [Dialog](components-dialog.md) inside it provides the title, description, body and footer.
12
+
7
13
  #### When to Use
8
14
 
9
15
  - Use Drawer for focused tasks that need more space than a Popover, such as forms, settings, or detail views.
10
16
  - Use Drawer when the task should temporarily block interaction with the rest of the page.
11
- - Use with DialogTrigger for uncontrolled usage, or pair `open`/`onOpenChange` with your own state for controlled usage.
17
+ - Use with DialogTrigger for uncontrolled usage, or pair `isOpen`/`onOpenChange` with your own state for controlled usage.
12
18
 
13
19
  #### When Not to Use
14
20
 
@@ -27,8 +33,8 @@
27
33
 
28
34
  ### Accessibility
29
35
 
30
- - The drawer renders with `role="dialog"` and is labeled by `title` automatically via `aria-labelledby`.
31
- - Always provide a `title`; it is the drawer's accessible name and its visible heading.
36
+ - The `Dialog` inside the drawer renders with `role="dialog"`, labeled by its `title` and described by its `description`.
37
+ - Always provide a `title` on the `Dialog`; it is the drawer's accessible name and its visible heading.
32
38
  - Use `description` for supporting context below the title rather than cramming it into `title`.
33
39
  - The close button has a built-in "Close" accessible name; do not remove it as the only dismissal path when `backdrop="none"`.
34
40
  - Keep focus indicators visible on interactive elements inside the drawer.
@@ -37,29 +43,53 @@
37
43
 
38
44
  - Keep `title` short and specific to the task, such as "Configure Custom Pricing" rather than "Settings".
39
45
  - Use `description` for a single line of secondary context, such as a category or breadcrumb-style label.
40
- - Put primary and secondary actions in `footer` rather than at the end of the scrollable body.
46
+ - Put primary and secondary actions in the Dialog `footer` rather than at the end of the scrollable body.
41
47
  - Keep body content scannable; long-form content should still fit the drawer's fixed width or height.
42
48
 
49
+ ### Migrating from the deprecated props
50
+
51
+ `title`, `description`, `footer` and `open` on `Drawer` still work but log a deprecation warning, and they are removed in the next major. Move the first three to a `Dialog` passed as children, and rename `open` to `isOpen`:
52
+
53
+ ```tsx
54
+ // Before
55
+ <Drawer open={open} onOpenChange={setOpen} title="Settings" footer={actions}>
56
+ {content}
57
+ </Drawer>
58
+
59
+ // After
60
+ <Drawer isOpen={open} onOpenChange={setOpen}>
61
+ <Dialog title="Settings" footer={actions}>
62
+ {content}
63
+ </Dialog>
64
+ </Drawer>
65
+ ```
66
+
67
+ The header, body and footer now use the `maxio-dialog__*` classes. Styles that targeted `.maxio-drawer__body` (or another `maxio-drawer__*` part) should target `.maxio-drawer .maxio-dialog__body` instead.
68
+
43
69
  ### Testing
44
70
 
45
- - Pass `data-testid` to set it on the drawer panel. The close button derives `<id>.close`.
71
+ - Pass `data-testid` to `Drawer` to set it on the drawer panel.
72
+ - Pass `data-testid` to the `Dialog` inside to set it on the dialog; its close button derives `<id>.close`.
73
+ - With the deprecated `title` prop, the close button derives `<id>.close` from the `Drawer`'s `data-testid`.
46
74
  - See [Testing](foundations-testing.md) for when to use test IDs and how to name them.
47
75
 
48
76
  ### Related
49
77
 
78
+ - **[Modal](components-modal.md)**: use for a centered task or decision instead of a panel pinned to an edge.
79
+ - **[Dialog](components-dialog.md)**: the content that goes inside the drawer.
50
80
  - **[Popover](components-popover.md)**: use for lighter-weight, anchored content that doesn't need to block the page.
51
81
  - **[Button](components-buttons-button.md)**: use for the trigger that opens the drawer and for footer actions.
52
82
 
53
83
  ## React
54
84
 
55
85
  ```tsx
56
- import { Drawer, DialogTrigger } from '@maxio-com/react-ui-components';
86
+ import { Drawer, Dialog, DialogTrigger } from '@maxio-com/react-ui-components';
57
87
  ```
58
88
 
59
89
  ## Imports
60
90
 
61
91
  ```tsx
62
- import { Body, Button, DialogTrigger, Drawer } from "@maxio-com/react-ui-components";
92
+ import { Body, Button, Dialog, DialogTrigger, Drawer } from "@maxio-com/react-ui-components";
63
93
  ```
64
94
 
65
95
  ## Prop Types
@@ -68,49 +98,58 @@ import { Body, Button, DialogTrigger, Drawer } from "@maxio-com/react-ui-compone
68
98
 
69
99
  | Prop | Type | Required | Default | Description | Source |
70
100
  | --- | --- | --- | --- | --- | --- |
71
- | `backdrop` | `"none" \| "dim"` | no | `dim` | - | DrawerProps |
72
- | `className` | `string` | no | - | - | DrawerProps |
101
+ | `backdrop` | `"none" \| "dim"` | no | `dim` | Whether the page behind is dimmed. | DrawerProps |
102
+ | `children` | `ReactNode` | yes | - | The drawer content, usually a `Dialog`. | DrawerProps |
103
+ | `className` | `string` | no | - | Applied to the panel. | DrawerProps |
73
104
  | `data-testid` | `string` | no | - | Test ID set on the component's root element. Components with internal parts derive their IDs from it (e.g. `<id>.row.<rowId>`). | TypeLiteral |
74
- | `description` | `string` | no | - | - | DrawerProps |
75
- | `footer` | `ReactNode` | no | - | - | DrawerProps |
76
- | `onOpenChange` | `((open: boolean) => void)` | no | - | - | DrawerProps |
77
- | `open` | `boolean` | no | - | - | DrawerProps |
78
- | `placement` | `"left" \| "right" \| "top" \| "bottom"` | no | `right` | - | DrawerProps |
79
- | `size` | `"sm" \| "md" \| "lg" \| "xl" \| "full"` | no | `md` | - | DrawerProps |
80
- | `title` | `string` | yes | - | - | DrawerProps |
105
+ | `description` | `string` | no | - | @deprecated Pass a `Dialog` with a `description` as children instead. | DrawerProps |
106
+ | `footer` | `ReactNode` | no | - | @deprecated Pass a `Dialog` with a `footer` as children instead. | DrawerProps |
107
+ | `open` | `boolean` | no | - | @deprecated Use `isOpen` instead. | DrawerProps |
108
+ | `placement` | `"left" \| "right" \| "top" \| "bottom"` | no | `right` | Edge the drawer slides in from. | DrawerProps |
109
+ | `size` | `"sm" \| "md" \| "lg" \| "xl" \| "full"` | no | `md` | Width (left/right) or height (top/bottom) of the drawer. | DrawerProps |
110
+ | `style` | `CSSProperties` | no | - | Applied to the panel. | DrawerProps |
111
+ | `title` | `string` | no | - | @deprecated Pass a `Dialog` with a `title` as children instead. | DrawerProps |
81
112
 
82
113
  ## Stories
83
114
 
84
115
  ### Default
85
116
 
117
+ Use DialogTrigger for the simplest, uncontrolled setup: the trigger opens the
118
+ drawer and the dialog's close button, Escape or a backdrop click close it.
119
+
86
120
  ```tsx
87
121
  const Default = () => <DialogTrigger>
88
122
  <Button variant="secondary" size="md">Open Drawer
89
123
  </Button>
90
- <Drawer placement="right" size="md" backdrop="dim" title="Drawer title">
91
- <Body size="sm">{LOREM}</Body>
124
+ <Drawer placement="right" size="md" backdrop="dim">
125
+ <Dialog title="Drawer title">
126
+ <Body size="sm">{LOREM}</Body>
127
+ </Dialog>
92
128
  </Drawer>
93
129
  </DialogTrigger>;
94
130
  ```
95
131
 
96
132
  ### Controlled (external state)
97
133
 
134
+ Use `isOpen` and `onOpenChange` when the open state lives elsewhere.
135
+
98
136
  ```tsx
99
137
  const Controlled = () => {
100
- const [open, setOpen] = React.useState(false);
138
+ const [isOpen, setIsOpen] = React.useState(false);
101
139
 
102
140
  return (
103
141
  <>
104
- <Button variant="secondary" size="md" onClick={() => setOpen(true)}>Open Drawer
142
+ <Button variant="secondary" size="md" onClick={() => setIsOpen(true)}>Open Drawer
105
143
  </Button>
106
144
  <Drawer
107
145
  placement="right"
108
146
  size="md"
109
147
  backdrop="dim"
110
- title="Drawer title"
111
- open={open}
112
- onOpenChange={setOpen}>
113
- <Body size="sm">{LOREM}</Body>
148
+ isOpen={isOpen}
149
+ onOpenChange={setIsOpen}>
150
+ <Dialog title="Drawer title">
151
+ <Body size="sm">{LOREM}</Body>
152
+ </Dialog>
114
153
  </Drawer>
115
154
  </>
116
155
  );
@@ -119,46 +158,43 @@ const Controlled = () => {
119
158
 
120
159
  ### With footer
121
160
 
161
+ Put actions in the Dialog footer. Long content scrolls in the body while the
162
+ header and footer stay visible.
163
+
122
164
  ```tsx
123
165
  const WithFooter = () => {
124
- const [open, setOpen] = React.useState(false);
166
+ const [isOpen, setIsOpen] = React.useState(false);
125
167
 
126
168
  return (
127
169
  <>
128
- <Button variant="secondary" size="md" onClick={() => setOpen(true)}>Open Drawer
170
+ <Button variant="secondary" size="md" onClick={() => setIsOpen(true)}>Open Drawer
129
171
  </Button>
130
172
  <Drawer
131
173
  placement="right"
132
174
  size="md"
133
175
  backdrop="dim"
134
- open={open}
135
- onOpenChange={setOpen}
136
- title="Settings"
137
- footer={
138
- <>
139
- <Button
140
- variant="primary"
141
- size="md"
142
- onClick={() => setOpen(false)}
143
- >
144
- Save
145
- </Button>
146
- <Button
147
- variant="secondary"
148
- size="md"
149
- onClick={() => setOpen(false)}
150
- >
151
- Cancel
152
- </Button>
153
- </>
154
- }>
155
- <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
156
- {PARAGRAPHS.map((p, i) => (
157
- <Body key={i} size="sm">
158
- {p}
159
- </Body>
160
- ))}
161
- </div>
176
+ isOpen={isOpen}
177
+ onOpenChange={setIsOpen}>
178
+ <Dialog
179
+ title="Settings"
180
+ footer={({ close }) => (
181
+ <>
182
+ <Button variant="primary" size="md" onClick={close}>
183
+ Save
184
+ </Button>
185
+ <Button variant="secondary" size="md" onClick={close}>
186
+ Cancel
187
+ </Button>
188
+ </>
189
+ )}>
190
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
191
+ {PARAGRAPHS.map((p, i) => (
192
+ <Body key={i} size="sm">
193
+ {p}
194
+ </Body>
195
+ ))}
196
+ </div>
197
+ </Dialog>
162
198
  </Drawer>
163
199
  </>
164
200
  );
@@ -188,13 +224,14 @@ const Sides = () => {
188
224
  {placements.map((placement) => (
189
225
  <Drawer
190
226
  key={placement}
191
- open={openPlacement === placement}
192
- onOpenChange={(o) => !o && setOpenPlacement(null)}
227
+ isOpen={openPlacement === placement}
228
+ onOpenChange={(isOpen) => !isOpen && setOpenPlacement(null)}
193
229
  placement={placement}
194
230
  size="md"
195
- title={`${placement} drawer`}
196
231
  >
197
- <Body size="sm">Slides in from the {placement}.</Body>
232
+ <Dialog title={`${placement} drawer`}>
233
+ <Body size="sm">Slides in from the {placement}.</Body>
234
+ </Dialog>
198
235
  </Drawer>
199
236
  ))}
200
237
  </div>
@@ -225,12 +262,13 @@ const BackdropVariants = () => {
225
262
  {backdrops.map((b) => (
226
263
  <Drawer
227
264
  key={b}
228
- open={openBackdrop === b}
229
- onOpenChange={(o) => !o && setOpenBackdrop(null)}
265
+ isOpen={openBackdrop === b}
266
+ onOpenChange={(isOpen) => !isOpen && setOpenBackdrop(null)}
230
267
  backdrop={b}
231
- title={`backdrop="${b}"`}
232
268
  >
233
- <Body size="sm">Backdrop style: {b}</Body>
269
+ <Dialog title={`backdrop="${b}"`}>
270
+ <Body size="sm">Backdrop style: {b}</Body>
271
+ </Dialog>
234
272
  </Drawer>
235
273
  ))}
236
274
  </div>
@@ -260,12 +298,13 @@ const Sizes = () => {
260
298
  {sizes.map((s) => (
261
299
  <Drawer
262
300
  key={s}
263
- open={openSize === s}
264
- onOpenChange={(o) => !o && setOpenSize(null)}
301
+ isOpen={openSize === s}
302
+ onOpenChange={(isOpen) => !isOpen && setOpenSize(null)}
265
303
  size={s}
266
- title={`size="${s}"`}
267
304
  >
268
- <Body size="sm">Width: {s}</Body>
305
+ <Dialog title={`size="${s}"`}>
306
+ <Body size="sm">Width: {s}</Body>
307
+ </Dialog>
269
308
  </Drawer>
270
309
  ))}
271
310
  </div>
@@ -277,6 +316,35 @@ const Sizes = () => {
277
316
 
278
317
  ```tsx
279
318
  const WithDescription = () => {
319
+ const [isOpen, setIsOpen] = React.useState(false);
320
+
321
+ return (
322
+ <>
323
+ <Button variant="secondary" size="md" onClick={() => setIsOpen(true)}>Open Drawer
324
+ </Button>
325
+ <Drawer
326
+ placement="right"
327
+ size="md"
328
+ backdrop="dim"
329
+ isOpen={isOpen}
330
+ onOpenChange={setIsOpen}>
331
+ <Dialog title="Configure Custom Pricing" description="API Credits · Product">
332
+ <Body size="sm">{LOREM}</Body>
333
+ </Dialog>
334
+ </Drawer>
335
+ </>
336
+ );
337
+ };
338
+ ```
339
+
340
+ ### Legacy props (deprecated)
341
+
342
+ Deprecated: passing `title`, `description`, `footer` and `open` to Drawer
343
+ still works and renders a Dialog internally, but logs a warning. Pass a
344
+ `Dialog` as children instead. These props are removed in the next major.
345
+
346
+ ```tsx
347
+ const LegacyProps = () => {
280
348
  const [open, setOpen] = React.useState(false);
281
349
 
282
350
  return (
@@ -289,8 +357,13 @@ const WithDescription = () => {
289
357
  backdrop="dim"
290
358
  open={open}
291
359
  onOpenChange={setOpen}
292
- title="Configure Custom Pricing"
293
- description="API Credits · Product">
360
+ title="Settings"
361
+ description="Account preferences"
362
+ footer={
363
+ <Button variant="primary" size="md" onClick={() => setOpen(false)}>
364
+ Save
365
+ </Button>
366
+ }>
294
367
  <Body size="sm">{LOREM}</Body>
295
368
  </Drawer>
296
369
  </>
@@ -90,7 +90,8 @@ order and reading direction. Date-time values support `granularity` and time zon
90
90
  ## Imports
91
91
 
92
92
  ```tsx
93
- import { DateField, I18nProvider } from "@maxio-com/react-ui-components";
93
+ import { DateField } from "@maxio-com/react-ui-components";
94
+ import { I18nProvider } from "react-aria-components";
94
95
  ```
95
96
 
96
97
  ## Prop Types
@@ -114,7 +114,8 @@ Preset labels do not become submitted date values or satisfy required validation
114
114
  ## Imports
115
115
 
116
116
  ```tsx
117
- import { DatePicker, I18nProvider } from "@maxio-com/react-ui-components";
117
+ import { DatePicker } from "@maxio-com/react-ui-components";
118
+ import { I18nProvider } from "react-aria-components";
118
119
  ```
119
120
 
120
121
  ## Prop Types
@@ -120,7 +120,8 @@ ranges or null, not partial ranges.
120
120
  ## Imports
121
121
 
122
122
  ```tsx
123
- import { DateRangePicker, I18nProvider } from "@maxio-com/react-ui-components";
123
+ import { DateRangePicker } from "@maxio-com/react-ui-components";
124
+ import { I18nProvider } from "react-aria-components";
124
125
  ```
125
126
 
126
127
  ## Prop Types
@@ -137,7 +137,8 @@ import { parseDate } from '@internationalized/date';
137
137
  ## Imports
138
138
 
139
139
  ```tsx
140
- import { I18nProvider, RangeCalendar } from "@maxio-com/react-ui-components";
140
+ import { I18nProvider } from "react-aria-components/I18nProvider";
141
+ import { RangeCalendar } from "@maxio-com/react-ui-components";
141
142
  ```
142
143
 
143
144
  ## Prop Types
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { DialogProps } from './types';
3
- declare const Dialog: ({ title, description, children, footer, role, showCloseButton, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: DialogProps) => React.JSX.Element;
3
+ declare const Dialog: ({ title, description, children, footer, role, showCloseButton, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "data-testid": testId, ...props }: DialogProps) => React.JSX.Element;
4
4
  export default Dialog;
5
5
  //# sourceMappingURL=Dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAU7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAS3C,QAAA,MAAM,MAAM,GAAI,uLAYb,WAAW,sBAwEb,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAYzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAS3C,QAAA,MAAM,MAAM,GAAI,8MAab,WAAW,sBA4Eb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const DialogCloseTestIdContext: import("react").Context<string | undefined>;
2
+ //# sourceMappingURL=closeTestIdContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closeTestIdContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/closeTestIdContext.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,6CAEpC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { DialogProps as AriaDialogProps } from 'react-aria-components';
3
- export interface DialogProps extends Omit<AriaDialogProps, 'children' | 'className'> {
3
+ import type { TestIdProps } from '../../utils/testId';
4
+ export interface DialogProps extends Omit<AriaDialogProps, 'children' | 'className'>, TestIdProps {
4
5
  title: ReactNode;
5
6
  description?: ReactNode;
6
7
  children: ReactNode | ((opts: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,eAAe,EACf,UAAU,GAAG,WAAW,CACzB;IAIC,KAAK,EAAE,SAAS,CAAC;IAIjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAIxB,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC,CAAC;IAKnE,MAAM,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC,CAAC;IAKlE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,CAAC,EAAE,WAAW;IAIpE,KAAK,EAAE,SAAS,CAAC;IAIjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAIxB,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC,CAAC;IAKnE,MAAM,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC,CAAC;IAKlE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { DrawerProps } from './types';
3
- declare const Drawer: ({ open, onOpenChange, placement, backdrop, size, className, title, description, children, footer, "data-testid": testId, }: DrawerProps) => React.JSX.Element;
3
+ declare const Drawer: ({ placement, backdrop, size, isDismissable, className, style, title, description, footer, open, isOpen, children, "data-testid": testId, ...props }: DrawerProps) => React.JSX.Element;
4
4
  export default Drawer;
5
5
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,QAAA,MAAM,MAAM,GAAI,4HAYb,WAAW,sBAuDb,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAU3C,QAAA,MAAM,MAAM,GAAI,qJAeb,WAAW,sBA6Cb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,18 +1,19 @@
1
- import React from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { ModalOverlayProps } from 'react-aria-components';
2
3
  import type { TestIdProps } from '../../utils/testId';
3
4
  export type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
4
5
  export type DrawerBackdrop = 'dim' | 'none';
5
6
  export type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
6
- export interface DrawerProps extends TestIdProps {
7
- title: string;
8
- description?: string;
9
- children: React.ReactNode;
10
- footer?: React.ReactNode;
7
+ export interface DrawerProps extends Omit<ModalOverlayProps, 'children' | 'className' | 'style'>, TestIdProps {
8
+ children: ReactNode;
11
9
  placement?: DrawerPlacement;
12
10
  size?: DrawerSize;
13
11
  backdrop?: DrawerBackdrop;
14
- open?: boolean;
15
- onOpenChange?: (open: boolean) => void;
16
12
  className?: string;
13
+ style?: CSSProperties;
14
+ title?: string;
15
+ description?: string;
16
+ footer?: ReactNode;
17
+ open?: boolean;
17
18
  }
18
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Drawer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,WACf,SACE,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,EAC3D,WAAW;IAIb,QAAQ,EAAE,SAAS,CAAC;IAIpB,SAAS,CAAC,EAAE,eAAe,CAAC;IAI5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAIlB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAI1B,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,KAAK,CAAC,EAAE,aAAa,CAAC;IAItB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,MAAM,CAAC,EAAE,SAAS,CAAC;IAInB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxio-com/react-ui-components",
3
- "version": "9.33.0",
3
+ "version": "9.34.1",
4
4
  "description": "React UI components",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "9249e6be2b8310020b454eaf2806062760747e2c"
68
+ "gitHead": "97b4fc7a93c0d547c3874ee258a67ebff45c7a0c"
69
69
  }
@@ -1,4 +1,4 @@
1
- import React$1, { ReactNode, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, CSSProperties, RefObject, FC, ElementType, InputHTMLAttributes } from 'react';
1
+ import React$1, { ReactNode, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, CSSProperties, AnchorHTMLAttributes, RefObject, FC, ElementType, InputHTMLAttributes } from 'react';
2
2
  import { RowData, Row, Table, ExpandedState, RowSelectionState, SortingState, TableOptions } from '@tanstack/react-table';
3
3
  export { createColumnHelper } from '@tanstack/react-table';
4
4
  import { DialogProps as DialogProps$1, ModalOverlayProps, PopoverProps as PopoverProps$1, ToggleButtonGroupProps, ToggleButtonProps, LinkProps as LinkProps$1, ListBoxProps as ListBoxProps$1, ListBoxLoadMoreItemProps, ListBoxItemProps as ListBoxItemProps$1, ListBoxSectionProps as ListBoxSectionProps$1, HeaderProps, ComboBoxProps as ComboBoxProps$1, ValidationResult, SearchFieldProps as SearchFieldProps$1, TextFieldProps as TextFieldProps$1, NumberFieldProps as NumberFieldProps$1, DateValue, DateFieldProps as DateFieldProps$1, CalendarProps as CalendarProps$1, DatePickerProps as DatePickerProps$1, DateRangePickerProps as DateRangePickerProps$1, RangeCalendarProps as RangeCalendarProps$1 } from 'react-aria-components';
@@ -241,7 +241,7 @@ declare module '@tanstack/react-table' {
241
241
 
242
242
  declare const DataTable: <TData extends RowData>({ pattern, size, SubRowComponent, onExpand, onSelect, onSort, enableSorting, enableRowSelection, enableExpanding, columns: originalColumns, actions, actionsColumnSize, onRowAction, enableRowReordering, getRowReorderLabel, onRowReorder, rowReorderMode, getRowId, getSubRows, state: userState, "data-testid": testId, ...props }: DataTableProps<TData>) => React$1.JSX.Element;
243
243
 
244
- interface DialogProps extends Omit<DialogProps$1, 'children' | 'className'> {
244
+ interface DialogProps extends Omit<DialogProps$1, 'children' | 'className'>, TestIdProps {
245
245
  title: ReactNode;
246
246
  description?: ReactNode;
247
247
  children: ReactNode | ((opts: {
@@ -254,25 +254,25 @@ interface DialogProps extends Omit<DialogProps$1, 'children' | 'className'> {
254
254
  className?: string;
255
255
  }
256
256
 
257
- declare const Dialog: ({ title, description, children, footer, role, showCloseButton, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: DialogProps) => React$1.JSX.Element;
257
+ declare const Dialog: ({ title, description, children, footer, role, showCloseButton, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "data-testid": testId, ...props }: DialogProps) => React$1.JSX.Element;
258
258
 
259
259
  type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
260
260
  type DrawerBackdrop = 'dim' | 'none';
261
261
  type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
262
- interface DrawerProps extends TestIdProps {
263
- title: string;
264
- description?: string;
265
- children: React$1.ReactNode;
266
- footer?: React$1.ReactNode;
262
+ interface DrawerProps extends Omit<ModalOverlayProps, 'children' | 'className' | 'style'>, TestIdProps {
263
+ children: ReactNode;
267
264
  placement?: DrawerPlacement;
268
265
  size?: DrawerSize;
269
266
  backdrop?: DrawerBackdrop;
270
- open?: boolean;
271
- onOpenChange?: (open: boolean) => void;
272
267
  className?: string;
268
+ style?: CSSProperties;
269
+ title?: string;
270
+ description?: string;
271
+ footer?: ReactNode;
272
+ open?: boolean;
273
273
  }
274
274
 
275
- declare const Drawer: ({ open, onOpenChange, placement, backdrop, size, className, title, description, children, footer, "data-testid": testId, }: DrawerProps) => React$1.JSX.Element;
275
+ declare const Drawer: ({ placement, backdrop, size, isDismissable, className, style, title, description, footer, open, isOpen, children, "data-testid": testId, ...props }: DrawerProps) => React$1.JSX.Element;
276
276
 
277
277
  type EmptyStateHeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
278
278
  type EmptyStateProps = {