ionbase-ui 0.51.0 → 0.69.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 (174) hide show
  1. package/dist/components/Accordion.d.ts +54 -0
  2. package/dist/components/Accordion.d.ts.map +1 -0
  3. package/dist/components/Accordion.js +68 -0
  4. package/dist/components/Accordion.js.map +1 -0
  5. package/dist/components/AgentActivity.d.ts +2 -1
  6. package/dist/components/AgentActivity.d.ts.map +1 -1
  7. package/dist/components/AgentActivity.js +4 -17
  8. package/dist/components/AgentActivity.js.map +1 -1
  9. package/dist/components/Breadcrumb.d.ts +45 -0
  10. package/dist/components/Breadcrumb.d.ts.map +1 -0
  11. package/dist/components/Breadcrumb.js +31 -0
  12. package/dist/components/Breadcrumb.js.map +1 -0
  13. package/dist/components/Calendar.d.ts +20 -0
  14. package/dist/components/Calendar.d.ts.map +1 -0
  15. package/dist/components/Calendar.js +151 -0
  16. package/dist/components/Calendar.js.map +1 -0
  17. package/dist/components/CalendarPopover.d.ts +26 -0
  18. package/dist/components/CalendarPopover.d.ts.map +1 -0
  19. package/dist/components/CalendarPopover.js +45 -0
  20. package/dist/components/CalendarPopover.js.map +1 -0
  21. package/dist/components/Checkbox.d.ts +2 -1
  22. package/dist/components/Checkbox.d.ts.map +1 -1
  23. package/dist/components/Checkbox.js +4 -2
  24. package/dist/components/Checkbox.js.map +1 -1
  25. package/dist/components/Combobox.d.ts +86 -0
  26. package/dist/components/Combobox.d.ts.map +1 -0
  27. package/dist/components/Combobox.js +261 -0
  28. package/dist/components/Combobox.js.map +1 -0
  29. package/dist/components/DateField.d.ts +15 -0
  30. package/dist/components/DateField.d.ts.map +1 -0
  31. package/dist/components/DateField.js +74 -0
  32. package/dist/components/DateField.js.map +1 -0
  33. package/dist/components/DatePicker.d.ts +81 -0
  34. package/dist/components/DatePicker.d.ts.map +1 -0
  35. package/dist/components/DatePicker.js +102 -0
  36. package/dist/components/DatePicker.js.map +1 -0
  37. package/dist/components/DateRangePicker.d.ts +117 -0
  38. package/dist/components/DateRangePicker.d.ts.map +1 -0
  39. package/dist/components/DateRangePicker.js +152 -0
  40. package/dist/components/DateRangePicker.js.map +1 -0
  41. package/dist/components/Drawer.d.ts +52 -0
  42. package/dist/components/Drawer.d.ts.map +1 -0
  43. package/dist/components/Drawer.js +66 -0
  44. package/dist/components/Drawer.js.map +1 -0
  45. package/dist/components/FileUpload.d.ts +79 -0
  46. package/dist/components/FileUpload.d.ts.map +1 -0
  47. package/dist/components/FileUpload.js +218 -0
  48. package/dist/components/FileUpload.js.map +1 -0
  49. package/dist/components/Header.d.ts +10 -0
  50. package/dist/components/Header.d.ts.map +1 -1
  51. package/dist/components/Header.js +18 -3
  52. package/dist/components/Header.js.map +1 -1
  53. package/dist/components/NumberInput.d.ts +63 -0
  54. package/dist/components/NumberInput.d.ts.map +1 -0
  55. package/dist/components/NumberInput.js +102 -0
  56. package/dist/components/NumberInput.js.map +1 -0
  57. package/dist/components/ProgressBar.d.ts +46 -0
  58. package/dist/components/ProgressBar.d.ts.map +1 -0
  59. package/dist/components/ProgressBar.js +52 -0
  60. package/dist/components/ProgressBar.js.map +1 -0
  61. package/dist/components/PromptInput.d.ts +89 -0
  62. package/dist/components/PromptInput.d.ts.map +1 -0
  63. package/dist/components/PromptInput.js +130 -0
  64. package/dist/components/PromptInput.js.map +1 -0
  65. package/dist/components/SegmentedControl.d.ts +63 -0
  66. package/dist/components/SegmentedControl.d.ts.map +1 -0
  67. package/dist/components/SegmentedControl.js +79 -0
  68. package/dist/components/SegmentedControl.js.map +1 -0
  69. package/dist/components/Select.d.ts +9 -2
  70. package/dist/components/Select.d.ts.map +1 -1
  71. package/dist/components/Select.js.map +1 -1
  72. package/dist/components/Sidebar.d.ts +109 -0
  73. package/dist/components/Sidebar.d.ts.map +1 -0
  74. package/dist/components/Sidebar.js +106 -0
  75. package/dist/components/Sidebar.js.map +1 -0
  76. package/dist/components/Skeleton.d.ts +39 -0
  77. package/dist/components/Skeleton.d.ts.map +1 -0
  78. package/dist/components/Skeleton.js +50 -0
  79. package/dist/components/Skeleton.js.map +1 -0
  80. package/dist/components/Spinner.d.ts +45 -0
  81. package/dist/components/Spinner.d.ts.map +1 -0
  82. package/dist/components/Spinner.js +44 -0
  83. package/dist/components/Spinner.js.map +1 -0
  84. package/dist/components/Stepper.d.ts +73 -0
  85. package/dist/components/Stepper.d.ts.map +1 -0
  86. package/dist/components/Stepper.js +82 -0
  87. package/dist/components/Stepper.js.map +1 -0
  88. package/dist/components/Toggle.d.ts +2 -1
  89. package/dist/components/Toggle.d.ts.map +1 -1
  90. package/dist/components/Toggle.js +4 -2
  91. package/dist/components/Toggle.js.map +1 -1
  92. package/dist/components/ToolCall.d.ts +66 -0
  93. package/dist/components/ToolCall.d.ts.map +1 -0
  94. package/dist/components/ToolCall.js +78 -0
  95. package/dist/components/ToolCall.js.map +1 -0
  96. package/dist/components/agent-status.d.ts +14 -0
  97. package/dist/components/agent-status.d.ts.map +1 -0
  98. package/dist/components/agent-status.js +16 -0
  99. package/dist/components/agent-status.js.map +1 -0
  100. package/dist/components/index.d.ts +33 -0
  101. package/dist/components/index.d.ts.map +1 -1
  102. package/dist/components/index.js +16 -0
  103. package/dist/components/index.js.map +1 -1
  104. package/dist/components/iso-date.d.ts +53 -0
  105. package/dist/components/iso-date.d.ts.map +1 -0
  106. package/dist/components/iso-date.js +102 -0
  107. package/dist/components/iso-date.js.map +1 -0
  108. package/dist/components/resolve-selection.d.ts +36 -0
  109. package/dist/components/resolve-selection.d.ts.map +1 -0
  110. package/dist/components/resolve-selection.js +14 -0
  111. package/dist/components/resolve-selection.js.map +1 -0
  112. package/dist/figma-descriptions.json +255 -145
  113. package/dist/figma-map.json +3205 -1860
  114. package/dist/meta/Accordion.json +123 -0
  115. package/dist/meta/AccordionItem.json +90 -0
  116. package/dist/meta/AgentActivityStep.json +2 -2
  117. package/dist/meta/Breadcrumb.json +87 -0
  118. package/dist/meta/BreadcrumbItem.json +78 -0
  119. package/dist/meta/Checkbox.json +18 -1
  120. package/dist/meta/Combobox.json +265 -0
  121. package/dist/meta/DatePicker.json +270 -0
  122. package/dist/meta/DateRangePicker.json +284 -0
  123. package/dist/meta/Drawer.json +234 -0
  124. package/dist/meta/EmptyState.json +1 -1
  125. package/dist/meta/FileUpload.json +246 -0
  126. package/dist/meta/Header.json +32 -2
  127. package/dist/meta/NumberInput.json +407 -0
  128. package/dist/meta/PhoneInput.json +39 -39
  129. package/dist/meta/Popover.json +3 -3
  130. package/dist/meta/ProgressBar.json +166 -0
  131. package/dist/meta/PromptInput.json +212 -0
  132. package/dist/meta/SegmentedControl.json +217 -0
  133. package/dist/meta/SegmentedControlItem.json +122 -0
  134. package/dist/meta/Select.json +4 -3
  135. package/dist/meta/Sidebar.json +150 -0
  136. package/dist/meta/SidebarItem.json +184 -0
  137. package/dist/meta/SidebarSection.json +131 -0
  138. package/dist/meta/Skeleton.json +120 -0
  139. package/dist/meta/Spinner.json +123 -0
  140. package/dist/meta/Stepper.json +135 -0
  141. package/dist/meta/StepperStep.json +148 -0
  142. package/dist/meta/Tabs.json +5 -0
  143. package/dist/meta/Toggle.json +18 -1
  144. package/dist/meta/ToolCall.json +192 -0
  145. package/dist/meta/Tooltip.json +3 -3
  146. package/dist/meta/components.json +6759 -2705
  147. package/dist/meta/contrast.json +11075 -3098
  148. package/dist/meta/index.json +266 -8
  149. package/dist/meta/patterns/AgentRun.json +27 -0
  150. package/dist/meta/patterns/Form.json +9 -0
  151. package/dist/meta/patterns/PageShell.json +43 -3
  152. package/dist/meta/patterns/Wizard.json +20 -1
  153. package/dist/meta/patterns/index.json +10 -1
  154. package/dist/styles/accordion.css +102 -0
  155. package/dist/styles/breadcrumb.css +72 -0
  156. package/dist/styles/combobox.css +154 -0
  157. package/dist/styles/date-picker.css +420 -0
  158. package/dist/styles/date-range-picker.css +280 -0
  159. package/dist/styles/drawer.css +181 -0
  160. package/dist/styles/empty-state.css +16 -4
  161. package/dist/styles/file-upload.css +236 -0
  162. package/dist/styles/header.css +26 -0
  163. package/dist/styles/index.css +23 -0
  164. package/dist/styles/number-input.css +83 -0
  165. package/dist/styles/progress-bar.css +107 -0
  166. package/dist/styles/prompt-input.css +127 -0
  167. package/dist/styles/segmented-control.css +182 -0
  168. package/dist/styles/sidebar.css +307 -0
  169. package/dist/styles/skeleton.css +76 -0
  170. package/dist/styles/spinner.css +70 -0
  171. package/dist/styles/stepper.css +250 -0
  172. package/dist/styles/tool-call.css +202 -0
  173. package/llms.txt +2 -2
  174. package/package.json +2 -1
@@ -0,0 +1,284 @@
1
+ {
2
+ "name": "DateRangePicker",
3
+ "source": "src/components/DateRangePicker.tsx",
4
+ "propsType": "DateRangePickerProps",
5
+ "description": "DateRangePicker — two segmented date fields with one calendar between them.\n\nNOT TWO `DatePicker`s SIDE BY SIDE, and the difference is the whole reason\nthis exists. Two independent pickers cannot stop the end date being before\nthe start, cannot show the days between them as a band, and give the user two\ncalendars to reconcile by memory. `useDateRangePicker` owns both ends: the\nsecond click completes the range in whichever order the two dates fall, the\nband follows the pointer while it is being dragged out, and a range cannot be\nmade to run backwards.\n\nTHE VALUE COMMITS LIVE. THERE IS NO APPLY BUTTON.\n\n`onChange` fires the moment the second end lands, and the calendar closes.\nThe reference designs this was drawn from put Clear and Apply under the grid,\nwhich is a draft model: the popover holds a pending range and only Apply\npromotes it. That was considered and rejected. Escape and an outside click\nwould then silently discard a selection the user watched themselves make —\nand there is no way to tell those two gestures apart from \"I am done\". A\nbutton labelled Apply beside a value that already applied is worse still.\n\nClear stays, because clearing is a real action with no other affordance.\n\nBOTH ENDS OR NEITHER\n\n`value` has no half-open form. A range with a start and no end is a state the\ncalendar passes THROUGH between the two clicks; it is never a value the\ncaller is handed, because \"everything after March\" and \"March to today\" are\ndifferent questions and a `null` end cannot say which one was meant. A caller\nwho wants an open end passes a sentinel of their own choosing as `maxValue`.",
6
+ "import": "import { DateRangePicker } from 'ionbase-ui';",
7
+ "status": "stable",
8
+ "summary": "Two segmented date fields sharing one calendar, returning an inclusive { start, end } of YYYY-MM-DD strings.",
9
+ "useWhen": [
10
+ "the user picks a period — a report window, a stay, a filter over time",
11
+ "the range commonly crosses a month boundary, so both ends need to be visible at once",
12
+ "there are conventional periods worth offering as shortcuts: last 7 days, month to date, year to date"
13
+ ],
14
+ "useInstead": [
15
+ {
16
+ "when": "the user picks one date",
17
+ "use": "DatePicker"
18
+ },
19
+ {
20
+ "when": "the choice is really a named period and the exact dates are incidental",
21
+ "use": "Select",
22
+ "why": "if 'Last 30 days' is the answer rather than a shortcut to one, a calendar is scaffolding around a list of five options"
23
+ },
24
+ {
25
+ "when": "one end is open — everything before, or everything since",
26
+ "use": "DatePicker",
27
+ "why": "with the open end expressed as minValue or maxValue. This component has no half-open value on purpose; see antiPatterns"
28
+ }
29
+ ],
30
+ "variants": {
31
+ "size": {
32
+ "sm": {
33
+ "use": "dense forms, table filters, dashboard toolbars"
34
+ },
35
+ "md": {
36
+ "use": "the default"
37
+ },
38
+ "lg": {
39
+ "use": "prominent single-field forms"
40
+ }
41
+ }
42
+ },
43
+ "a11y": {
44
+ "guarantees": [
45
+ "both fields sit in one labelled group; each announces its own name, so 'Start Date' and 'End Date' are heard without a visible sublabel, and each editable segment is its own tab stop as it is in DatePicker",
46
+ "the dash between them is aria-hidden — the fields have already said what they are, and a spoken dash adds nothing",
47
+ "the calendar is modal: focus enters the grid, the page behind is hidden from assistive tech, Escape closes and focus returns",
48
+ "a range cannot be made to run backwards, in either direction of selection, and cannot be dragged across an unavailable day",
49
+ "preset rows are buttons in a labelled group carrying aria-pressed, so 'which shortcut is active' is answerable without seeing the tint",
50
+ "the selected preset is marked by weight as well as by background, so it does not rely on colour alone",
51
+ "range endpoints and the band between them keep their fill under forced-colors, where background-color is otherwise discarded",
52
+ "the rail stacks above the grids below 32rem rather than being hidden, because shortcuts matter most on the device where dragging across two months is worst"
53
+ ],
54
+ "requires": [
55
+ "`label`, or an `aria-label` when no visible label is rendered",
56
+ "`presetsLabel` wording if the default is wrong for the context — it names the whole shortcut group",
57
+ "preset labels that say what period they select, since the label is the button's entire accessible name"
58
+ ]
59
+ },
60
+ "antiPatterns": [
61
+ {
62
+ "dont": "expecting an Apply button, or adding one",
63
+ "why": "the value commits when the second end lands and the calendar closes. A draft model makes Escape and an outside click silently discard a selection the user watched themselves make, and there is no way to tell those gestures apart from 'I am done'. Clear exists because clearing has no other affordance"
64
+ },
65
+ {
66
+ "dont": "passing a range with only one end, or reading one back",
67
+ "why": "a start with no end is a state the calendar passes through between the two clicks, never a value the caller is handed. 'Everything after March' and 'March to today' are different questions and a null end cannot say which was meant"
68
+ },
69
+ {
70
+ "dont": "writing a relative preset as a literal object",
71
+ "why": "`value: { start: '…', end: '…' }` is evaluated once, when the module is first imported. 'Last 7 days' is then seven days before whenever the tab was opened. Pass a function; it is re-run each time the calendar opens"
72
+ },
73
+ {
74
+ "dont": "composing this out of two DatePickers",
75
+ "why": "two independent pickers cannot stop the end preceding the start, cannot draw the band between the ends, and make the user reconcile two calendars from memory"
76
+ },
77
+ {
78
+ "dont": "setting visibleMonths to 1 for a filter that usually spans weeks",
79
+ "why": "the user then pages back and forth to see both ends of their own selection. One month is for ranges that genuinely sit inside one"
80
+ },
81
+ {
82
+ "dont": "treating `end` as exclusive",
83
+ "why": "the range is closed. A stay of 3 nights from the 1st ends on the 4th in checkout terms and on the 3rd here; convert at your boundary, not in the picker"
84
+ }
85
+ ],
86
+ "slots": {
87
+ "label": {
88
+ "expects": "what the period is for — 'Reporting period', not 'Dates'"
89
+ },
90
+ "presets": {
91
+ "expects": "conventional periods for this screen, longest-lived first: today, last 7 days, month to date, year to date"
92
+ },
93
+ "description": {
94
+ "expects": "helper text under the fields; replaced by `errorMessage` when `isInvalid`"
95
+ },
96
+ "errorMessage": {
97
+ "expects": "what is wrong with the range and what would be right, shown only when `isInvalid`"
98
+ }
99
+ },
100
+ "stylesheet": "src/styles/date-range-picker.css",
101
+ "tokens": [
102
+ "--border-focus",
103
+ "--border-subtle",
104
+ "--border-width-default",
105
+ "--border-width-thick",
106
+ "--font-family-sans",
107
+ "--font-weight-medium",
108
+ "--font-weight-regular",
109
+ "--icon-disabled",
110
+ "--icon-interactive",
111
+ "--ion-input-icon-size",
112
+ "--radius-2xs",
113
+ "--radius-full",
114
+ "--radius-none",
115
+ "--radius-sm",
116
+ "--spacing-12",
117
+ "--spacing-2",
118
+ "--spacing-4",
119
+ "--spacing-6",
120
+ "--spacing-8",
121
+ "--surface-hover",
122
+ "--surface-primary",
123
+ "--surface-primary-subtle",
124
+ "--surface-primary-subtle-hover",
125
+ "--surface-raised",
126
+ "--text-default",
127
+ "--text-disabled",
128
+ "--text-interactive",
129
+ "--text-interactive-hover",
130
+ "--text-on-color",
131
+ "--text-primary",
132
+ "--text-tertiary",
133
+ "--type-body-sm",
134
+ "--type-body-sm-line-height"
135
+ ],
136
+ "props": {
137
+ "label": {
138
+ "type": "React.ReactNode",
139
+ "required": false,
140
+ "origin": "own",
141
+ "description": "Field label. Required for a usable control — see `a11y.requires`."
142
+ },
143
+ "description": {
144
+ "type": "React.ReactNode",
145
+ "required": false,
146
+ "origin": "own",
147
+ "description": "Helper text below the field."
148
+ },
149
+ "errorMessage": {
150
+ "type": "React.ReactNode",
151
+ "required": false,
152
+ "origin": "own",
153
+ "description": "Replaces the helper text when `isInvalid` is set."
154
+ },
155
+ "isInvalid": {
156
+ "type": "boolean | undefined",
157
+ "required": false,
158
+ "origin": "own"
159
+ },
160
+ "isDisabled": {
161
+ "type": "boolean | undefined",
162
+ "required": false,
163
+ "origin": "own"
164
+ },
165
+ "isReadOnly": {
166
+ "type": "boolean | undefined",
167
+ "required": false,
168
+ "origin": "own"
169
+ },
170
+ "isRequired": {
171
+ "type": "boolean | undefined",
172
+ "required": false,
173
+ "origin": "own"
174
+ },
175
+ "size": {
176
+ "type": "DateRangePickerSize | undefined",
177
+ "required": false,
178
+ "origin": "own",
179
+ "description": "Matches Input's `Size` variant: Small, Medium, Large.",
180
+ "values": [
181
+ "sm",
182
+ "md",
183
+ "lg"
184
+ ]
185
+ },
186
+ "value": {
187
+ "type": "DateRange | null | undefined",
188
+ "required": false,
189
+ "origin": "own",
190
+ "description": "The selected range, both ends as `YYYY-MM-DD`. `null` means no range.\nA half-open range is not representable on purpose — see `antiPatterns`."
191
+ },
192
+ "defaultValue": {
193
+ "type": "DateRange | undefined",
194
+ "required": false,
195
+ "origin": "own",
196
+ "description": "The initial range, for an uncontrolled picker."
197
+ },
198
+ "onChange": {
199
+ "type": "((value: DateRange | null) => void) | undefined",
200
+ "required": false,
201
+ "origin": "own",
202
+ "description": "Fires with both ends, or `null` when the range is cleared."
203
+ },
204
+ "minValue": {
205
+ "type": "string | undefined",
206
+ "required": false,
207
+ "origin": "own",
208
+ "description": "Earliest selectable date, `YYYY-MM-DD`."
209
+ },
210
+ "maxValue": {
211
+ "type": "string | undefined",
212
+ "required": false,
213
+ "origin": "own",
214
+ "description": "Latest selectable date, `YYYY-MM-DD`."
215
+ },
216
+ "isDateUnavailable": {
217
+ "type": "((date: IsoDate) => boolean) | undefined",
218
+ "required": false,
219
+ "origin": "own",
220
+ "description": "Individual dates the calendar refuses. Receives `YYYY-MM-DD`.\n\nA range may not be dragged ACROSS one of these — react-aria stops the\nselection at the first unavailable day, which is what makes \"book a room\nfor these nights\" correct rather than merely styled."
221
+ },
222
+ "presets": {
223
+ "type": "readonly DateRangePreset[] | undefined",
224
+ "required": false,
225
+ "origin": "own",
226
+ "description": "Shortcut rows beside the calendar. Omitted, no rail is rendered."
227
+ },
228
+ "visibleMonths": {
229
+ "type": "2 | 3 | 1 | undefined",
230
+ "required": false,
231
+ "origin": "own",
232
+ "description": "How many months the calendar shows at once. Two by default: a range that\ncrosses a month boundary is the common case, and a one-month calendar\nmakes the user page back and forth to see both ends of their own selection."
233
+ },
234
+ "isClearable": {
235
+ "type": "boolean | undefined",
236
+ "required": false,
237
+ "origin": "own",
238
+ "description": "Show a Clear button under the calendar. Defaults to `true`."
239
+ },
240
+ "name": {
241
+ "type": "string | undefined",
242
+ "required": false,
243
+ "origin": "own",
244
+ "description": "Posts `<name>-start` and `<name>-end` for an uncontrolled form."
245
+ },
246
+ "calendarLabel": {
247
+ "type": "string | undefined",
248
+ "required": false,
249
+ "origin": "own",
250
+ "description": "Accessible label for the button that opens the calendar."
251
+ },
252
+ "clearLabel": {
253
+ "type": "string | undefined",
254
+ "required": false,
255
+ "origin": "own"
256
+ },
257
+ "presetsLabel": {
258
+ "type": "string | undefined",
259
+ "required": false,
260
+ "origin": "own"
261
+ },
262
+ "className": {
263
+ "type": "string | undefined",
264
+ "required": false,
265
+ "origin": "own"
266
+ },
267
+ "wrapperClassName": {
268
+ "type": "string | undefined",
269
+ "required": false,
270
+ "origin": "own"
271
+ },
272
+ "id": {
273
+ "type": "string | undefined",
274
+ "required": false,
275
+ "origin": "own"
276
+ }
277
+ },
278
+ "propCounts": {
279
+ "own": 24,
280
+ "aria": 0,
281
+ "dom": 0,
282
+ "other": 0
283
+ }
284
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "name": "Drawer",
3
+ "source": "src/components/Drawer.tsx",
4
+ "propsType": "DrawerProps",
5
+ "description": "Drawer — a modal panel anchored to an edge.\n\nWHY IT IS A MODAL AND NOT A SIDEBAR\n\nIt takes focus, traps it, closes on Escape and on an outside click, and marks\nthe rest of the page inert — all of `Modal`'s behaviour, differing only in\nwhere the panel sits and how it enters. A persistent side panel that does not\ndo those things is layout, not a drawer, and belongs in the page rather than\nin an overlay.\n\nWHEN TO REACH FOR MODAL INSTEAD\n\nA drawer suits work that is long or list-shaped — filters, a record's detail,\na sequence of settings — because an edge panel can be tall without becoming a\nsquare that fights the viewport. A decision, especially a destructive one,\nbelongs in a Modal: it is centred, it is smaller, and it does not invite\nscrolling past the thing being confirmed.\n\nRENDERS NOTHING WHEN CLOSED, and portals when open, for the reasons recorded\non Modal: a closed overlay left in the tree is still keyboard-focusable, and\nan inline one inherits whatever `overflow` and stacking context surrounds it.",
6
+ "import": "import { Drawer } from 'ionbase-ui';",
7
+ "status": "stable",
8
+ "summary": "A modal panel anchored to an edge. Modal behaviour — focus trap, Escape, scrim — with the shape of a side panel.",
9
+ "useWhen": [
10
+ "work that is long or list-shaped: filters, a record's detail, a run of settings",
11
+ "the page behind should stay visible as context while a task is done beside it",
12
+ "a form long enough that a centred dialog would scroll its own actions off screen"
13
+ ],
14
+ "useInstead": [
15
+ {
16
+ "when": "the user is making a decision, especially a destructive one",
17
+ "use": "Modal",
18
+ "why": "a modal is centred and small enough that the thing being confirmed cannot be scrolled past"
19
+ },
20
+ {
21
+ "when": "the panel should stay open while the user works elsewhere",
22
+ "use": "page layout",
23
+ "why": "a drawer traps focus and marks the rest of the page inert. A panel that does not do those things is layout, not an overlay"
24
+ },
25
+ {
26
+ "when": "the content is a short menu of actions",
27
+ "use": "Popover or Menu"
28
+ }
29
+ ],
30
+ "variants": {
31
+ "placement": {
32
+ "start": {
33
+ "use": "navigation and hierarchy, which readers expect at the leading edge"
34
+ },
35
+ "end": {
36
+ "use": "the default — detail and editing beside the record that opened it"
37
+ },
38
+ "top": {
39
+ "use": "rare: a global search or command surface"
40
+ },
41
+ "bottom": {
42
+ "use": "touch-first layouts, where the bottom edge is the reachable one"
43
+ }
44
+ },
45
+ "size": {
46
+ "sm": {
47
+ "use": "a short form or a filter list"
48
+ },
49
+ "md": {
50
+ "use": "the default"
51
+ },
52
+ "lg": {
53
+ "use": "a record detail with its own sections"
54
+ }
55
+ }
56
+ },
57
+ "slots": {
58
+ "title": {
59
+ "accepts": "text",
60
+ "note": "required — it is the dialog's accessible name"
61
+ },
62
+ "description": {
63
+ "accepts": "text"
64
+ },
65
+ "children": {
66
+ "accepts": "any content",
67
+ "note": "the only scrolling region"
68
+ },
69
+ "footer": {
70
+ "accepts": "Button",
71
+ "note": "pinned to the bottom edge, so actions stay reachable in a long panel"
72
+ }
73
+ },
74
+ "a11y": {
75
+ "requires": [
76
+ "`title`, which becomes the dialog's accessible name via aria-labelledby"
77
+ ],
78
+ "notes": [
79
+ "start and end follow writing direction, so a right-hand drawer in English is a left-hand one in Arabic with no second variant",
80
+ "renders nothing when closed and portals when open: a closed overlay left in the tree is still keyboard-focusable",
81
+ "only the body scrolls, so the title stays on screen — the one piece of context a user needs while working down a long list"
82
+ ]
83
+ },
84
+ "antiPatterns": [
85
+ {
86
+ "dont": "a Drawer that stays open while the user edits the page behind it",
87
+ "do": "a layout panel",
88
+ "why": "it traps focus and marks the rest inert; a keyboard user cannot reach the page behind it"
89
+ },
90
+ {
91
+ "dont": "<Drawer> for a delete confirmation",
92
+ "do": "<Modal>",
93
+ "why": "an edge panel is tall, so the confirm button can sit below the fold — the one control that must never be missed"
94
+ }
95
+ ],
96
+ "stylesheet": "src/styles/drawer.css",
97
+ "tokens": [
98
+ "--border-focus",
99
+ "--border-subtle",
100
+ "--border-width-default",
101
+ "--border-width-thick",
102
+ "--font-family-sans",
103
+ "--font-weight-semibold",
104
+ "--icon-secondary",
105
+ "--icon-size-md",
106
+ "--ion-drawer-size",
107
+ "--radius-lg",
108
+ "--radius-sm",
109
+ "--spacing-12",
110
+ "--spacing-24",
111
+ "--spacing-32",
112
+ "--spacing-4",
113
+ "--spacing-8",
114
+ "--surface-hover",
115
+ "--surface-raised",
116
+ "--surface-scrim",
117
+ "--text-default",
118
+ "--text-secondary",
119
+ "--type-body",
120
+ "--type-body-line-height",
121
+ "--type-body-sm",
122
+ "--type-body-sm-line-height",
123
+ "--type-h5",
124
+ "--type-h5-line-height"
125
+ ],
126
+ "props": {
127
+ "isOpen": {
128
+ "type": "boolean | undefined",
129
+ "required": false,
130
+ "origin": "own",
131
+ "description": "Whether the drawer is shown."
132
+ },
133
+ "onOpenChange": {
134
+ "type": "((isOpen: boolean) => void) | undefined",
135
+ "required": false,
136
+ "origin": "own",
137
+ "description": "Called with the next open state — `false` when the drawer asks to close."
138
+ },
139
+ "placement": {
140
+ "type": "DrawerPlacement | undefined",
141
+ "required": false,
142
+ "origin": "own",
143
+ "description": "Which edge it enters from. `start` and `end` follow writing direction, so\na right-hand drawer in English is a left-hand one in Arabic without a\nsecond variant.",
144
+ "values": [
145
+ "start",
146
+ "end",
147
+ "top",
148
+ "bottom"
149
+ ],
150
+ "default": "end"
151
+ },
152
+ "size": {
153
+ "type": "DrawerSize | undefined",
154
+ "required": false,
155
+ "origin": "own",
156
+ "values": [
157
+ "sm",
158
+ "md",
159
+ "lg"
160
+ ],
161
+ "default": "md"
162
+ },
163
+ "title": {
164
+ "type": "React.ReactNode",
165
+ "required": true,
166
+ "origin": "own",
167
+ "description": "Required: the dialog's accessible name, wired via `aria-labelledby`."
168
+ },
169
+ "description": {
170
+ "type": "React.ReactNode",
171
+ "required": false,
172
+ "origin": "own",
173
+ "description": "Supporting copy under the title."
174
+ },
175
+ "footer": {
176
+ "type": "React.ReactNode",
177
+ "required": false,
178
+ "origin": "own",
179
+ "description": "Action row, pinned to the bottom edge."
180
+ },
181
+ "showClose": {
182
+ "type": "boolean | undefined",
183
+ "required": false,
184
+ "origin": "own",
185
+ "default": true
186
+ },
187
+ "closeLabel": {
188
+ "type": "string | undefined",
189
+ "required": false,
190
+ "origin": "own",
191
+ "default": "Close drawer"
192
+ },
193
+ "children": {
194
+ "type": "React.ReactNode",
195
+ "required": false,
196
+ "origin": "own"
197
+ },
198
+ "className": {
199
+ "type": "string | undefined",
200
+ "required": false,
201
+ "origin": "own"
202
+ },
203
+ "isDismissable": {
204
+ "type": "boolean | undefined",
205
+ "required": false,
206
+ "origin": "aria",
207
+ "description": "Whether to close the modal when the user interacts outside it.",
208
+ "tags": {
209
+ "default": "false"
210
+ }
211
+ },
212
+ "isKeyboardDismissDisabled": {
213
+ "type": "boolean | undefined",
214
+ "required": false,
215
+ "origin": "aria",
216
+ "description": "Whether pressing the escape key to close the modal should be disabled.",
217
+ "tags": {
218
+ "default": "false"
219
+ }
220
+ },
221
+ "shouldCloseOnInteractOutside": {
222
+ "type": "((element: Element) => boolean) | undefined",
223
+ "required": false,
224
+ "origin": "aria",
225
+ "description": "When user interacts with the argument element outside of the overlay ref,\nreturn true if onClose should be called. This gives you a chance to filter\nout interaction with elements that should not dismiss the overlay.\nBy default, onClose will always be called on interaction outside the overlay ref."
226
+ }
227
+ },
228
+ "propCounts": {
229
+ "own": 11,
230
+ "aria": 3,
231
+ "dom": 0,
232
+ "other": 0
233
+ }
234
+ }
@@ -130,7 +130,7 @@
130
130
  "stylesheet": "src/styles/empty-state.css",
131
131
  "tokens": [
132
132
  "--font-family-sans",
133
- "--font-weight-medium",
133
+ "--font-weight-semibold",
134
134
  "--icon-error",
135
135
  "--icon-primary",
136
136
  "--icon-size-md",