@assure-one/design-system 1.36.0 → 1.37.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.
- package/codemods/README.md +53 -0
- package/codemods/lib/registry.mjs +2 -0
- package/codemods/transforms/cm-09-side-drawer-to-sheet.mjs +348 -0
- package/codemods/transforms/cm-13-tooltip-delay.mjs +99 -0
- package/dist/css/components.css +1 -1
- package/dist/css/legacy-aliases.css +25 -1
- package/dist/css/shadcn.css +2 -2
- package/dist/css/tailwind.css +9 -0
- package/dist/css/tokens.css +64 -38
- package/dist/design-system-provider-C8UlFe52.d.ts +549 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +6 -2
- package/dist/icons/index.js.map +1 -1
- package/dist/{index-CQwzTm0v.d.ts → index-vztxMSfl.d.ts} +7 -4
- package/dist/index.d.ts +375 -73
- package/dist/index.js +1998 -1423
- package/dist/index.js.map +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/dist/{system-BDU18fVg.d.ts → system-CyAVbHhM.d.ts} +16 -16
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +8 -8
- package/dist/tokens/index.js.map +1 -1
- package/docs/components.md +13 -8
- package/docs/components.registry.json +23 -5
- package/package.json +1 -1
- package/dist/design-system-provider-cPUklDJv.d.ts +0 -220
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentType, AnchorHTMLAttributes, Ref, ReactNode, ImgHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* L0 foundation (W5-20, ADR-010). The typed messages catalogue every
|
|
6
|
+
* design-system component reads its generic strings from (target architecture
|
|
7
|
+
* §38): accessibility and micro-copy with a universal meaning — Clear, No
|
|
8
|
+
* results, Loading, optional — never product copy, which is always the
|
|
9
|
+
* consumer's (`children`, `label`, `placeholder`).
|
|
10
|
+
*
|
|
11
|
+
* The catalogue is keyed by component namespace; each namespace is the
|
|
12
|
+
* `*Messages` interface that component already accepted through its
|
|
13
|
+
* `messages` prop before the provider existed, so the resolution order is one
|
|
14
|
+
* rule everywhere: **prop > provider > English default**. A value is a string
|
|
15
|
+
* or, where a parameter is involved, a function of that parameter (no string
|
|
16
|
+
* concatenation or pluralisation inside components).
|
|
17
|
+
*
|
|
18
|
+
* The English defaults live in `./en.ts`; `./en.json` is generated from it
|
|
19
|
+
* (`pnpm messages:generate`) so translators start from the full list.
|
|
20
|
+
*/
|
|
21
|
+
/** The copy a `Select` renders. @experimental */
|
|
22
|
+
interface SelectMessages {
|
|
23
|
+
/** The accessible name of the `clearable` button. Default `"Clear selection"`. */
|
|
24
|
+
clear: string;
|
|
25
|
+
/** The default placeholder when `placeholder` is omitted. Default `"Select..."`. */
|
|
26
|
+
placeholder: string;
|
|
27
|
+
}
|
|
28
|
+
/** The copy a `SearchInput` renders. @experimental */
|
|
29
|
+
interface SearchInputMessages {
|
|
30
|
+
/** The accessible name of the clear button. Default `"Clear search"`. */
|
|
31
|
+
clear: string;
|
|
32
|
+
/** The default placeholder when `placeholder` is omitted. Default `"Search..."`. */
|
|
33
|
+
placeholder: string;
|
|
34
|
+
}
|
|
35
|
+
/** The copy a `Combobox` (and `MultiSelect`) renders. @experimental */
|
|
36
|
+
interface ComboboxMessages {
|
|
37
|
+
/** The empty state when the query matches nothing. */
|
|
38
|
+
empty: string;
|
|
39
|
+
/** The loading state while `loading`. */
|
|
40
|
+
loading: string;
|
|
41
|
+
/** The label of the create row for a query. */
|
|
42
|
+
create: (query: string) => string;
|
|
43
|
+
/** The accessible name of the clear button. */
|
|
44
|
+
clear: string;
|
|
45
|
+
/** The accessible name of the toggle button. */
|
|
46
|
+
toggle: string;
|
|
47
|
+
/** The accessible name of a chip's remove button (`multiple`). */
|
|
48
|
+
remove: (label: string) => string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The copy a `Field` renders (target architecture §24.5).
|
|
52
|
+
*
|
|
53
|
+
* @experimental
|
|
54
|
+
*/
|
|
55
|
+
interface FieldMessages {
|
|
56
|
+
/** The indicator after the label of an optional field. Default `"optional"`, rendered in parentheses. */
|
|
57
|
+
optional: string;
|
|
58
|
+
}
|
|
59
|
+
/** The default dropzone copy a `FileUpload` renders when it has no `children`. @experimental */
|
|
60
|
+
interface FileUploadMessages {
|
|
61
|
+
/** The emphasised call to action. Default `"Click to upload"`. */
|
|
62
|
+
prompt: string;
|
|
63
|
+
/** The rest of the sentence after the prompt. Default `" or drag and drop"`. */
|
|
64
|
+
dragHint: string;
|
|
65
|
+
/** The accepted-types line; receives the `accept` list. */
|
|
66
|
+
accepted: (accept: string) => string;
|
|
67
|
+
/** The size-limit line; receives the formatted limit (e.g. `"10 MB"`). */
|
|
68
|
+
maxSize: (size: string) => string;
|
|
69
|
+
}
|
|
70
|
+
/** The copy a modal overlay (`Dialog`, `AlertDialog`, `Sheet`) renders. @experimental */
|
|
71
|
+
interface OverlayMessages {
|
|
72
|
+
/** The accessible name of the built-in close button. Default `"Close"`. */
|
|
73
|
+
close: string;
|
|
74
|
+
}
|
|
75
|
+
/** The copy the toast region and its toasts render. @experimental */
|
|
76
|
+
interface ToastMessages {
|
|
77
|
+
/** The accessible name of the toast region (C-TOAST-ARIALABEL). Default `"Notifications"`. */
|
|
78
|
+
region: string;
|
|
79
|
+
/** The accessible name of a toast's dismiss button. Default `"Dismiss"`. */
|
|
80
|
+
dismiss: string;
|
|
81
|
+
}
|
|
82
|
+
/** The copy a `CommandPalette` renders. @experimental */
|
|
83
|
+
interface CommandPaletteMessages {
|
|
84
|
+
/** The accessible name of the palette dialog and its list. Default `"Command palette"`. */
|
|
85
|
+
name: string;
|
|
86
|
+
/** The (visually hidden) description of the dialog. Default `"Search and run commands"`. */
|
|
87
|
+
instructions: string;
|
|
88
|
+
/** The default placeholder of the search input when `placeholder` is omitted. */
|
|
89
|
+
search: string;
|
|
90
|
+
/** The empty state when the query matches nothing. Default `"No results found."`. */
|
|
91
|
+
empty: string;
|
|
92
|
+
/** The footer hint next to the arrow keys. Default `"Navigate"`. */
|
|
93
|
+
navigate: string;
|
|
94
|
+
/** The footer hint next to the enter key. Default `"Select"`. */
|
|
95
|
+
select: string;
|
|
96
|
+
/** The footer hint next to the escape key. Default `"Close"`. */
|
|
97
|
+
close: string;
|
|
98
|
+
/** How the escape key is written in the footer. Default `"esc"`. */
|
|
99
|
+
escapeKey: string;
|
|
100
|
+
}
|
|
101
|
+
/** The copy a `KeyboardShortcutsDialog` renders around the consumer's sections. @experimental */
|
|
102
|
+
interface KeyboardShortcutsMessages {
|
|
103
|
+
/** The dialog heading. Default `"Keyboard Shortcuts"`. */
|
|
104
|
+
name: string;
|
|
105
|
+
/** The heading of the built-in universal section. Default `"General"`. */
|
|
106
|
+
general: string;
|
|
107
|
+
/** The universal `⌘ K` row. Default `"Command palette"`. */
|
|
108
|
+
commandPalette: string;
|
|
109
|
+
/** The universal `/` row. Default `"Focus search"`. */
|
|
110
|
+
focusSearch: string;
|
|
111
|
+
/** The universal `?` row. Default `"Keyboard shortcuts"`. */
|
|
112
|
+
keyboardShortcuts: string;
|
|
113
|
+
/** The universal `Esc` row. Default `"Close / go back"`. */
|
|
114
|
+
closeOrBack: string;
|
|
115
|
+
/** The word between two keys of a sequence. Default `"then"`. */
|
|
116
|
+
then: string;
|
|
117
|
+
/** The footer sentence before the hotkey. Default `"Press"`. */
|
|
118
|
+
hintPrefix: string;
|
|
119
|
+
/** The footer sentence after the hotkey. Default `"anytime to toggle this dialog"`. */
|
|
120
|
+
hintSuffix: string;
|
|
121
|
+
}
|
|
122
|
+
/** The copy a `Pagination` renders. @experimental */
|
|
123
|
+
interface PaginationMessages {
|
|
124
|
+
/** The accessible name of the navigation; receives the current and total page. */
|
|
125
|
+
region: (page: number, total: number) => string;
|
|
126
|
+
/** The context label when `totalItems` and `pageSize` are known; receives the shown range and the total. */
|
|
127
|
+
range: (start: number, end: number, total: number) => string;
|
|
128
|
+
/** The context label otherwise; receives the current and total page. */
|
|
129
|
+
page: (page: number, total: number) => string;
|
|
130
|
+
/** The accessible name of the previous-page button. Default `"Previous page"`. */
|
|
131
|
+
previous: string;
|
|
132
|
+
/** The accessible name of the next-page button. Default `"Next page"`. */
|
|
133
|
+
next: string;
|
|
134
|
+
}
|
|
135
|
+
/** The copy a `CopyButton` renders. @experimental */
|
|
136
|
+
interface CopyButtonMessages {
|
|
137
|
+
/** The accessible name before copying. Default `"Copy to clipboard"`. */
|
|
138
|
+
copy: string;
|
|
139
|
+
/** The accessible name after copying. Default `"Copied"`. */
|
|
140
|
+
copied: string;
|
|
141
|
+
}
|
|
142
|
+
/** The copy a `LoadingRows` skeleton renders. @experimental */
|
|
143
|
+
interface LoadingRowsMessages {
|
|
144
|
+
/** The default accessible name when `label` is omitted. Default `"Loading"`. */
|
|
145
|
+
loading: string;
|
|
146
|
+
}
|
|
147
|
+
/** The copy the progress family (`ProgressBar`, `ProgressRing`, `Stepper`, `SuiteProgress`) renders. @experimental */
|
|
148
|
+
interface ProgressMessages {
|
|
149
|
+
/** The default accessible name when `label` is omitted. Default `"Progress"`. */
|
|
150
|
+
progress: string;
|
|
151
|
+
}
|
|
152
|
+
/** The copy a `SegmentedProgress` renders. @experimental */
|
|
153
|
+
interface SegmentedProgressMessages {
|
|
154
|
+
/** The default accessible name; receives the filled and total step counts. */
|
|
155
|
+
step: (filled: number, steps: number) => string;
|
|
156
|
+
}
|
|
157
|
+
/** The copy a `Breadcrumb` (and `AppHeaderBreadcrumb`) renders. @experimental */
|
|
158
|
+
interface BreadcrumbMessages {
|
|
159
|
+
/** The accessible name of the navigation. Default `"Breadcrumb"`. */
|
|
160
|
+
region: string;
|
|
161
|
+
}
|
|
162
|
+
/** The copy an `Input type="password"` renders. @experimental */
|
|
163
|
+
interface InputMessages {
|
|
164
|
+
/** The accessible name of the reveal toggle while hidden. Default `"Show password"`. */
|
|
165
|
+
showPassword: string;
|
|
166
|
+
/** The accessible name of the reveal toggle while shown. Default `"Hide password"`. */
|
|
167
|
+
hidePassword: string;
|
|
168
|
+
}
|
|
169
|
+
/** The copy an `Avatar` renders. @experimental */
|
|
170
|
+
interface AvatarMessages {
|
|
171
|
+
/** The `alt` of the image when neither `alt` nor `name` is given. Default `"Avatar"`. */
|
|
172
|
+
image: string;
|
|
173
|
+
/** The accessible name of the fallback when `name` is empty. Default `"Unknown user"`. */
|
|
174
|
+
unknownUser: string;
|
|
175
|
+
/** The accessible name of the status dot; receives the status. */
|
|
176
|
+
status: (status: string) => string;
|
|
177
|
+
}
|
|
178
|
+
/** The copy an `OTPInput` renders. @experimental */
|
|
179
|
+
interface OtpInputMessages {
|
|
180
|
+
/** The accessible name when no `Field` label or `aria-label` names the control. Default `"One-time password"`. */
|
|
181
|
+
name: string;
|
|
182
|
+
}
|
|
183
|
+
/** The copy a `DatePicker` renders. @experimental */
|
|
184
|
+
interface DatePickerMessages {
|
|
185
|
+
/** The accessible name of the calendar trigger. Default `"Open calendar"`. */
|
|
186
|
+
openCalendar: string;
|
|
187
|
+
/** The accessible name of the year grid. Default `"Pick a year"`. */
|
|
188
|
+
pickYear: string;
|
|
189
|
+
/** The accessible name of the previous-decade button. Default `"Previous decade"`. */
|
|
190
|
+
previousDecade: string;
|
|
191
|
+
/** The accessible name of the next-decade button. Default `"Next decade"`. */
|
|
192
|
+
nextDecade: string;
|
|
193
|
+
}
|
|
194
|
+
/** The copy a `DateRangePicker` renders. @experimental */
|
|
195
|
+
interface DateRangePickerMessages {
|
|
196
|
+
/** The accessible name when no `label` or `aria-label` is given. Default `"Date range"`. */
|
|
197
|
+
name: string;
|
|
198
|
+
/** The default placeholder. Default `"Select date range"`. */
|
|
199
|
+
placeholder: string;
|
|
200
|
+
}
|
|
201
|
+
/** The copy a `DismissibleChip` renders. @experimental */
|
|
202
|
+
interface DismissibleChipMessages {
|
|
203
|
+
/** The accessible name of the remove button for a non-text label. Default `"Remove filter"`. */
|
|
204
|
+
remove: string;
|
|
205
|
+
/** The accessible name of the remove button; receives the chip's text label. */
|
|
206
|
+
removeNamed: (label: string) => string;
|
|
207
|
+
}
|
|
208
|
+
/** The copy a `MultiFilterPill` renders. @experimental */
|
|
209
|
+
interface MultiFilterPillMessages {
|
|
210
|
+
/** The accessible name of the pill's clear button; receives the pill label. */
|
|
211
|
+
clear: (label: string) => string;
|
|
212
|
+
/** The clear row at the bottom of the list. Default `"Clear selection"`. */
|
|
213
|
+
clearSelection: string;
|
|
214
|
+
}
|
|
215
|
+
/** The copy a `SearchSelect` renders. @experimental */
|
|
216
|
+
interface SearchSelectMessages {
|
|
217
|
+
/** The default placeholder. Default `"Search..."`. */
|
|
218
|
+
placeholder: string;
|
|
219
|
+
/** The default label of the create entry. Default `"Create new"`. */
|
|
220
|
+
createNew: string;
|
|
221
|
+
/** The filter chip that lifts the group scope. Default `"All"`. */
|
|
222
|
+
all: string;
|
|
223
|
+
/** The accessible name of a selected chip's remove button; receives the item label. */
|
|
224
|
+
remove: (label: string) => string;
|
|
225
|
+
/** The empty state when a query matches nothing. Default `"No results found."`. */
|
|
226
|
+
empty: string;
|
|
227
|
+
/** The empty state when there are no options at all. Default `"No options available."`. */
|
|
228
|
+
noOptions: string;
|
|
229
|
+
/** The accessible name of the clear button with no single value. Default `"Clear"`. */
|
|
230
|
+
clear: string;
|
|
231
|
+
/** The accessible name of the clear button; receives the selected label. */
|
|
232
|
+
clearNamed: (label: string) => string;
|
|
233
|
+
/** The accessible name of the toggle with no single value. Default `"Show options"`. */
|
|
234
|
+
toggle: string;
|
|
235
|
+
/** The accessible name of the toggle; receives the selected label. */
|
|
236
|
+
changeNamed: (label: string) => string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The copy a `PhoneField` renders around its country combobox. Deterministic
|
|
240
|
+
* English defaults (A3).
|
|
241
|
+
*
|
|
242
|
+
* @experimental
|
|
243
|
+
*/
|
|
244
|
+
interface PhoneFieldMessages {
|
|
245
|
+
/** The accessible name of the country combobox. Default `"Country"`. */
|
|
246
|
+
country: string;
|
|
247
|
+
/** The placeholder of the country combobox while its list is open. Default `"Search countries"`. */
|
|
248
|
+
searchCountries: string;
|
|
249
|
+
/** The empty state when the query matches no country. Default `"No countries found"`. */
|
|
250
|
+
noCountries: string;
|
|
251
|
+
}
|
|
252
|
+
/** The copy the legacy `PhoneCountryInput` renders on its country picker. @experimental */
|
|
253
|
+
interface PhoneCountryInputMessages {
|
|
254
|
+
/** The accessible name of the country trigger. Default `"Select country code"`. */
|
|
255
|
+
selectCountry: string;
|
|
256
|
+
/** The placeholder of the country search. Default `"Search country or code..."`. */
|
|
257
|
+
searchCountries: string;
|
|
258
|
+
/** The empty state of the country search. Default `"No countries found"`. */
|
|
259
|
+
noCountries: string;
|
|
260
|
+
}
|
|
261
|
+
/** The copy a `StarRating` renders. @experimental */
|
|
262
|
+
interface StarRatingMessages {
|
|
263
|
+
/** The accessible name; receives the rating and the maximum. */
|
|
264
|
+
rating: (rating: number, max: number) => string;
|
|
265
|
+
/** The visually hidden marker of a half star. Default `"half"`. */
|
|
266
|
+
half: string;
|
|
267
|
+
}
|
|
268
|
+
/** The copy a `FileTypeBadge` renders. @experimental */
|
|
269
|
+
interface FileTypeBadgeMessages {
|
|
270
|
+
/** The default accessible name; receives the type code. */
|
|
271
|
+
file: (code: string) => string;
|
|
272
|
+
}
|
|
273
|
+
/** The copy an `AttachmentChip` renders. @experimental */
|
|
274
|
+
interface AttachmentChipMessages {
|
|
275
|
+
/** The accessible name of the view action; receives the file name. */
|
|
276
|
+
view: (name: string) => string;
|
|
277
|
+
/** The accessible name of the download action; receives the file name. */
|
|
278
|
+
download: (name: string) => string;
|
|
279
|
+
}
|
|
280
|
+
/** The copy a `MasterDetailLayout` renders. @experimental */
|
|
281
|
+
interface MasterDetailLayoutMessages {
|
|
282
|
+
/** The default accessible name of the back button. Default `"Back"`. */
|
|
283
|
+
back: string;
|
|
284
|
+
}
|
|
285
|
+
/** The copy the `Sidebar` composite renders on its own controls. @experimental */
|
|
286
|
+
interface SidebarMessages {
|
|
287
|
+
/** The trigger while expanded. Default `"Collapse sidebar"`. */
|
|
288
|
+
collapse: string;
|
|
289
|
+
/** The trigger while collapsed. Default `"Expand sidebar"`. */
|
|
290
|
+
expand: string;
|
|
291
|
+
/** The pin button while unpinned. Default `"Pin sidebar"`. */
|
|
292
|
+
pin: string;
|
|
293
|
+
/** The pin button while pinned. Default `"Unpin sidebar"`. */
|
|
294
|
+
unpin: string;
|
|
295
|
+
/** A link group's toggle while open. Default `"Collapse section"`. */
|
|
296
|
+
collapseSection: string;
|
|
297
|
+
/** A link group's toggle while closed. Default `"Expand section"`. */
|
|
298
|
+
expandSection: string;
|
|
299
|
+
}
|
|
300
|
+
/** The copy the `Shell` composite renders. @experimental */
|
|
301
|
+
interface ShellMessages {
|
|
302
|
+
/** The accessible name of the main content region. Default `"Page content"`. */
|
|
303
|
+
content: string;
|
|
304
|
+
}
|
|
305
|
+
/** The copy a `BottomNav` renders. @experimental */
|
|
306
|
+
interface BottomNavMessages {
|
|
307
|
+
/** The accessible name of the navigation. Default `"Primary"`. */
|
|
308
|
+
region: string;
|
|
309
|
+
}
|
|
310
|
+
/** The copy a `DashGrid` renders. @experimental */
|
|
311
|
+
interface DashGridMessages {
|
|
312
|
+
/** The accessible name of a widget's drag handle. Default `"Reorder widget"`. */
|
|
313
|
+
reorder: string;
|
|
314
|
+
}
|
|
315
|
+
/** The copy a `FolderTree` renders. @experimental */
|
|
316
|
+
interface FolderTreeMessages {
|
|
317
|
+
/** The accessible name of an open folder's toggle; receives the folder name. */
|
|
318
|
+
collapse: (name: string) => string;
|
|
319
|
+
/** The accessible name of a closed folder's toggle; receives the folder name. */
|
|
320
|
+
expand: (name: string) => string;
|
|
321
|
+
}
|
|
322
|
+
/** The copy an `AppHeaderSearch` renders. @experimental */
|
|
323
|
+
interface AppHeaderMessages {
|
|
324
|
+
/** The default search placeholder. Default `"Search…"`. */
|
|
325
|
+
search: string;
|
|
326
|
+
}
|
|
327
|
+
/** The copy a `BulkActionBar` renders. @experimental */
|
|
328
|
+
interface BulkActionBarMessages {
|
|
329
|
+
/** The default accessible name of the clear button. Default `"Clear selection"`. */
|
|
330
|
+
clearSelection: string;
|
|
331
|
+
}
|
|
332
|
+
/** The copy the `DataTable` family renders. @experimental */
|
|
333
|
+
interface DataTableMessages {
|
|
334
|
+
/** The default search placeholder. Default `"Search…"`. */
|
|
335
|
+
search: string;
|
|
336
|
+
/** The word between the shown and total counts. Default `"of"`. */
|
|
337
|
+
of: string;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* The copy a `ConfirmDialog` renders when the caller gives no label (W5-16);
|
|
341
|
+
* `useConfirm` / `usePrompt` read the same namespace.
|
|
342
|
+
*
|
|
343
|
+
* @experimental
|
|
344
|
+
*/
|
|
345
|
+
interface ConfirmMessages {
|
|
346
|
+
/** The default label of the confirm button. Default `"Confirm"`. */
|
|
347
|
+
confirm: string;
|
|
348
|
+
/** The default label of the cancel button. Default `"Cancel"`. */
|
|
349
|
+
cancel: string;
|
|
350
|
+
/** The inline error when `onConfirm` rejects with no message of its own. */
|
|
351
|
+
failed: string;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* The whole catalogue, one namespace per component. This is the type a
|
|
355
|
+
* consumer's i18n lint can check for completeness.
|
|
356
|
+
*
|
|
357
|
+
* @experimental
|
|
358
|
+
*/
|
|
359
|
+
interface DsMessages {
|
|
360
|
+
select: SelectMessages;
|
|
361
|
+
searchInput: SearchInputMessages;
|
|
362
|
+
combobox: ComboboxMessages;
|
|
363
|
+
field: FieldMessages;
|
|
364
|
+
fileUpload: FileUploadMessages;
|
|
365
|
+
confirm: ConfirmMessages;
|
|
366
|
+
overlay: OverlayMessages;
|
|
367
|
+
toast: ToastMessages;
|
|
368
|
+
commandPalette: CommandPaletteMessages;
|
|
369
|
+
keyboardShortcuts: KeyboardShortcutsMessages;
|
|
370
|
+
pagination: PaginationMessages;
|
|
371
|
+
copyButton: CopyButtonMessages;
|
|
372
|
+
loadingRows: LoadingRowsMessages;
|
|
373
|
+
progress: ProgressMessages;
|
|
374
|
+
segmentedProgress: SegmentedProgressMessages;
|
|
375
|
+
breadcrumb: BreadcrumbMessages;
|
|
376
|
+
input: InputMessages;
|
|
377
|
+
avatar: AvatarMessages;
|
|
378
|
+
otpInput: OtpInputMessages;
|
|
379
|
+
datePicker: DatePickerMessages;
|
|
380
|
+
dateRangePicker: DateRangePickerMessages;
|
|
381
|
+
dismissibleChip: DismissibleChipMessages;
|
|
382
|
+
multiFilterPill: MultiFilterPillMessages;
|
|
383
|
+
searchSelect: SearchSelectMessages;
|
|
384
|
+
phoneField: PhoneFieldMessages;
|
|
385
|
+
phoneCountryInput: PhoneCountryInputMessages;
|
|
386
|
+
starRating: StarRatingMessages;
|
|
387
|
+
fileTypeBadge: FileTypeBadgeMessages;
|
|
388
|
+
attachmentChip: AttachmentChipMessages;
|
|
389
|
+
masterDetailLayout: MasterDetailLayoutMessages;
|
|
390
|
+
sidebar: SidebarMessages;
|
|
391
|
+
shell: ShellMessages;
|
|
392
|
+
bottomNav: BottomNavMessages;
|
|
393
|
+
dashGrid: DashGridMessages;
|
|
394
|
+
folderTree: FolderTreeMessages;
|
|
395
|
+
appHeader: AppHeaderMessages;
|
|
396
|
+
bulkActionBar: BulkActionBarMessages;
|
|
397
|
+
dataTable: DataTableMessages;
|
|
398
|
+
}
|
|
399
|
+
/** A component namespace of the catalogue. @experimental */
|
|
400
|
+
type DsMessageNamespace = keyof DsMessages;
|
|
401
|
+
/**
|
|
402
|
+
* What `DesignSystemProvider messages` accepts: any subset of namespaces, each
|
|
403
|
+
* any subset of its keys. Every omitted key keeps its English default.
|
|
404
|
+
*
|
|
405
|
+
* @experimental
|
|
406
|
+
*/
|
|
407
|
+
type DsMessagesOverride = {
|
|
408
|
+
[N in DsMessageNamespace]?: Partial<DsMessages[N]>;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* L0 foundation (W5-21, ADR-010). The adapters through which the design
|
|
413
|
+
* system renders an application's router link and image component without
|
|
414
|
+
* importing them itself.
|
|
415
|
+
*
|
|
416
|
+
* `LinkButton` and `Logo` read these from `DesignSystemProvider`. Without a
|
|
417
|
+
* provider they keep their static `next/link` / `next/image` imports (C-NEXT-PEER)
|
|
418
|
+
* until 2.0, so nothing changes for a Next.js app that renders no provider;
|
|
419
|
+
* `@assure-one/design-system/next` exports a provider that passes exactly
|
|
420
|
+
* those two, and a non-Next app passes its own.
|
|
421
|
+
*/
|
|
422
|
+
/** The props a link adapter receives: a plain anchor with an `href`. @experimental */
|
|
423
|
+
interface LinkComponentProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
424
|
+
href: string;
|
|
425
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
426
|
+
children?: ReactNode;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* A component that renders a link — `next/link`, React Router's `Link`, or a
|
|
430
|
+
* plain `<a>`. It must forward every anchor attribute and the ref.
|
|
431
|
+
*
|
|
432
|
+
* @experimental
|
|
433
|
+
*/
|
|
434
|
+
type LinkComponent = ComponentType<LinkComponentProps>;
|
|
435
|
+
/** The props an image adapter receives: `src`, `alt` and the intrinsic size. @experimental */
|
|
436
|
+
interface ImageComponentProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "width" | "height"> {
|
|
437
|
+
src: string;
|
|
438
|
+
alt: string;
|
|
439
|
+
width: number;
|
|
440
|
+
height: number;
|
|
441
|
+
/** Load eagerly, above the fold (`next/image` `priority`). */
|
|
442
|
+
priority?: boolean;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* A component that renders an image — `next/image` or a plain `<img>`.
|
|
446
|
+
*
|
|
447
|
+
* @experimental
|
|
448
|
+
*/
|
|
449
|
+
type ImageComponent = ComponentType<ImageComponentProps>;
|
|
450
|
+
|
|
451
|
+
/** Text direction the provider announces. Context only until components adopt logical properties (W5-22). @experimental */
|
|
452
|
+
type DsDirection = "ltr" | "rtl";
|
|
453
|
+
/**
|
|
454
|
+
* The resolved messages of one component namespace: the component's own
|
|
455
|
+
* `messages` prop wins over the provider's catalogue, which wins over the
|
|
456
|
+
* English default. Works without a provider (English). Stable while the three
|
|
457
|
+
* inputs are.
|
|
458
|
+
*
|
|
459
|
+
* @experimental
|
|
460
|
+
*/
|
|
461
|
+
declare function useDsMessages<N extends DsMessageNamespace>(namespace: N, override?: Partial<DsMessages[N]> | undefined): DsMessages[N];
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Props of `DesignSystemProvider` (W5-20, ADR-010, target architecture §43).
|
|
465
|
+
*
|
|
466
|
+
* @experimental
|
|
467
|
+
*/
|
|
468
|
+
interface DesignSystemProviderProps {
|
|
469
|
+
/**
|
|
470
|
+
* Overrides for the generic strings components render (Clear, No results,
|
|
471
|
+
* optional…), by component namespace. Any subset; omitted keys keep their
|
|
472
|
+
* English default. A component's own `messages` prop still wins. The full
|
|
473
|
+
* list is `DsMessages` (and `messages/en.json` in the package source).
|
|
474
|
+
*/
|
|
475
|
+
messages?: DsMessagesOverride;
|
|
476
|
+
/**
|
|
477
|
+
* The BCP 47 tag locale-aware components format with (dates, numbers).
|
|
478
|
+
* Default `"en-US"` on the server and on the client (amendment A3): pass the
|
|
479
|
+
* locale your app already knows server-side; never `navigator.language`
|
|
480
|
+
* during render.
|
|
481
|
+
*/
|
|
482
|
+
locale?: string;
|
|
483
|
+
/** Text direction. Context only for now — components adopt logical properties in W5-22. */
|
|
484
|
+
dir?: DsDirection;
|
|
485
|
+
/**
|
|
486
|
+
* Where portalled content (dialogs, menus, tooltips) mounts. `undefined`
|
|
487
|
+
* (default) keeps Radix's `document.body`. Read by the shared Portal of the
|
|
488
|
+
* overlay primitives as they adopt it.
|
|
489
|
+
*/
|
|
490
|
+
portalContainer?: HTMLElement | null;
|
|
491
|
+
/**
|
|
492
|
+
* The application's router link, rendered by `LinkButton` and `Logo`
|
|
493
|
+
* instead of their static `next/link` import (W5-21). A Next.js app uses
|
|
494
|
+
* `NextDesignSystemProvider` from `@assure-one/design-system/next`.
|
|
495
|
+
*/
|
|
496
|
+
linkComponent?: LinkComponent;
|
|
497
|
+
/** The application's image component, rendered by `Logo` instead of its static `next/image` import. */
|
|
498
|
+
imageComponent?: ImageComponent;
|
|
499
|
+
/**
|
|
500
|
+
* Shared tooltip defaults (`delayDuration`, `skipDelayDuration`,
|
|
501
|
+
* `disableHoverableContent`) of the one `TooltipProvider` the provider
|
|
502
|
+
* mounts. Every `Tooltip` below uses it instead of wrapping a provider per
|
|
503
|
+
* instance (W5-12), so sibling tooltips open instantly within
|
|
504
|
+
* `skipDelayDuration` of each other; `delayDuration` defaults to the 300ms
|
|
505
|
+
* `Tooltip` renders without a provider. `false` mounts no provider and
|
|
506
|
+
* every `Tooltip` falls back to its own.
|
|
507
|
+
*/
|
|
508
|
+
tooltip?: TooltipDefaults | false;
|
|
509
|
+
/**
|
|
510
|
+
* Mount the toast region (`ToastProvider`) so `useToast()` works anywhere
|
|
511
|
+
* below. Off by default: an app that already renders `ToastProvider` keeps
|
|
512
|
+
* its single region (the `aria-label="Notifications"` region consumers
|
|
513
|
+
* select on, C-TOAST-ARIALABEL, must exist exactly once).
|
|
514
|
+
*/
|
|
515
|
+
toasts?: boolean;
|
|
516
|
+
/**
|
|
517
|
+
* Mount the `useConfirm` / `usePrompt` host (`ConfirmHost`, W5-18) so the
|
|
518
|
+
* imperative confirm works anywhere below. Off by default: an app that
|
|
519
|
+
* renders its own `ConfirmHost` keeps its single queue.
|
|
520
|
+
*/
|
|
521
|
+
confirm?: boolean;
|
|
522
|
+
children?: ReactNode;
|
|
523
|
+
}
|
|
524
|
+
/** The Radix `TooltipProvider` props the provider forwards. @experimental */
|
|
525
|
+
interface TooltipDefaults {
|
|
526
|
+
delayDuration?: number;
|
|
527
|
+
skipDelayDuration?: number;
|
|
528
|
+
disableHoverableContent?: boolean;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* The optional application-level provider of the design system (W5-20,
|
|
532
|
+
* ADR-010). Thin by design: it owns only what CSS cannot — the messages
|
|
533
|
+
* catalogue, the locale, the text direction, the portal container, the link
|
|
534
|
+
* and image adapters, shared tooltip defaults and (opt-in) the toast region.
|
|
535
|
+
* Colour scheme, brand and density stay attributes + CSS on `<html>`.
|
|
536
|
+
*
|
|
537
|
+
* Everything works identically without it: every component falls back to
|
|
538
|
+
* the English catalogue, `"en-US"`, `document.body` and its static `next/*`
|
|
539
|
+
* import. The provider renders **no DOM wrapper** (only the toast region when
|
|
540
|
+
* `toasts` is set), so it cannot cause a hydration mismatch.
|
|
541
|
+
*
|
|
542
|
+
* `confirm` mounts the `useConfirm` / `usePrompt` host (W5-18) inside the
|
|
543
|
+
* toast region, so an imperative confirm can raise a toast.
|
|
544
|
+
*
|
|
545
|
+
* @experimental
|
|
546
|
+
*/
|
|
547
|
+
declare function DesignSystemProvider({ messages, locale, dir, portalContainer, linkComponent, imageComponent, tooltip, toasts, confirm, children, }: DesignSystemProviderProps): react_jsx_runtime.JSX.Element;
|
|
548
|
+
|
|
549
|
+
export { type CommandPaletteMessages as C, type DesignSystemProviderProps as D, type FileUploadMessages as F, type ImageComponent as I, type KeyboardShortcutsMessages as K, type LinkComponent as L, type PaginationMessages as P, type SearchInputMessages as S, type ToastMessages as T, type ConfirmMessages as a, type CopyButtonMessages as b, type PhoneFieldMessages as c, type SelectMessages as d, type FieldMessages as e, type ComboboxMessages as f, DesignSystemProvider as g, type DsDirection as h, type DsMessageNamespace as i, type DsMessages as j, type DsMessagesOverride as k, type ImageComponentProps as l, type LinkComponentProps as m, type TooltipDefaults as n, useDsMessages as u };
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AlertCircleIcon, a as AlertTriangleIcon, b as AlertTriangleSolidIcon, c as ArchiveIcon, d as ArrowDownIcon, e as ArrowLeftIcon, f as ArrowRightIcon, g as ArrowRightSmallIcon, h as ArrowUpIcon, i as AtSignIcon, B as BarChartIcon, j as BellIcon, k as BoldIcon, l as BrainIcon, m as BriefcaseIcon, n as Building2Icon, o as BuildingIcon, p as CalendarIcon, q as ChatBubbleIcon, r as CheckCircle2Icon, s as CheckCircleSolidIcon, t as CheckIcon, u as ChevronDownIcon, v as ChevronLeftIcon, w as ChevronRightIcon, x as ChevronUpIcon, y as ChevronsDownUpIcon, z as ChevronsUpDownIcon, D as CircleDotIcon, E as CircleIcon, F as ClipboardCheckIcon, G as ClockIcon, H as CloseIcon, J as CommandIcon, K as CopyIcon, L as CornerDownLeftIcon, M as CreditCardIcon, N as DocumentIcon, O as DollarSignIcon, P as DownloadIcon, Q as ExternalLinkIcon, R as ExtractIcon, T as EyeIcon, U as EyeOffIcon, W as FileIcon, X as FileReturnIcon, Y as FileTextIcon, Z as FilterIcon, _ as FlagIcon, $ as FolderClosedIcon, a0 as FolderOpenIcon, a1 as FolderPlusIcon, a2 as FolderUpIcon, a3 as GlobeIcon, a4 as GoogleBrandIcon, a5 as GripVerticalIcon, a6 as HelpCircleIcon, a7 as HistoryIcon, a8 as HomeIcon, a9 as IconComponent, aa as IconDefinition, ab as IconProps, ac as IconSize, ad as InboxIcon, ae as InfoCircleSolidIcon, af as InfoIcon, ag as ItalicIcon, ah as KanbanIcon, ai as KeyIcon, aj as LandmarkIcon, ak as LayersIcon, al as LayoutDashboardIcon, am as LayoutGridIcon, an as LayoutListIcon, ao as LightningIcon, ap as Link2Icon, aq as LinkIcon, ar as ListChecksIcon, as as ListIcon, at as ListOrderedIcon, au as LoaderIcon, av as LockIcon, aw as LockKeyholeIcon, ax as LockOpenIcon, ay as LogOutIcon, az as MailIcon, aA as MapPinIcon, aB as MaximizeIcon, aC as MenuIcon, aD as MessageCircleIcon, aE as MessageCircleWarningIcon, aF as MicIcon, aG as MicrosoftBrandIcon, aH as MinimizeIcon, aI as MinusIcon, aJ as MonitorIcon, aK as MoonIcon, aL as MoreHorizontalIcon, aM as MoveIcon, aN as PaletteIcon, aO as PanelLeftCloseIcon, aP as PanelLeftIcon, aQ as PanelRightIcon, aR as PaperclipIcon, aS as PauseIcon, aT as PenSignIcon, aU as PenToolIcon, aV as PencilIcon, aW as PhoneIcon, aX as PlayIcon, aY as PlusIcon, aZ as ReceiptIcon, a_ as RefreshCwIcon, a$ as ReplyIcon, b0 as RotateCcwIcon, b1 as SaveIcon, b2 as SearchIcon, b3 as SendIcon, b4 as SettingsIcon, b5 as ShieldIcon, b6 as SigmaIcon, b7 as SlashIcon, b8 as SmartphoneIcon, b9 as SparkleIcon, ba as SparklesIcon, bb as StarIcon, bc as StopIcon, bd as StrikethroughIcon, be as SunIcon, bf as TableIcon, bg as TagIcon, bh as TeamIcon, bi as ThumbsDownIcon, bj as ThumbsUpIcon, bk as TimerIcon, bl as Trash2Icon, bm as TrashIcon, bn as TrashSolidIcon, bo as TrendingDownIcon, bp as TrendingUpIcon, bq as UnderlineIcon, br as UploadIcon, bs as UserCircleIcon, bt as UserIcon, bu as UsersIcon, bv as VideoIcon, bw as Volume2Icon, bx as VolumeXIcon, by as WorkflowIcon, bz as XCircleSolidIcon, bA as XIcon, bB as ZoomInIcon, bC as ZoomOutIcon, bD as createIcon } from '../index-
|
|
2
|
-
import '../system-
|
|
1
|
+
export { A as AlertCircleIcon, a as AlertTriangleIcon, b as AlertTriangleSolidIcon, c as ArchiveIcon, d as ArrowDownIcon, e as ArrowLeftIcon, f as ArrowRightIcon, g as ArrowRightSmallIcon, h as ArrowUpIcon, i as AtSignIcon, B as BarChartIcon, j as BellIcon, k as BoldIcon, l as BrainIcon, m as BriefcaseIcon, n as Building2Icon, o as BuildingIcon, p as CalendarIcon, q as ChatBubbleIcon, r as CheckCircle2Icon, s as CheckCircleSolidIcon, t as CheckIcon, u as ChevronDownIcon, v as ChevronLeftIcon, w as ChevronRightIcon, x as ChevronUpIcon, y as ChevronsDownUpIcon, z as ChevronsUpDownIcon, D as CircleDotIcon, E as CircleIcon, F as ClipboardCheckIcon, G as ClockIcon, H as CloseIcon, J as CommandIcon, K as CopyIcon, L as CornerDownLeftIcon, M as CreditCardIcon, N as DocumentIcon, O as DollarSignIcon, P as DownloadIcon, Q as ExternalLinkIcon, R as ExtractIcon, T as EyeIcon, U as EyeOffIcon, W as FileIcon, X as FileReturnIcon, Y as FileTextIcon, Z as FilterIcon, _ as FlagIcon, $ as FolderClosedIcon, a0 as FolderOpenIcon, a1 as FolderPlusIcon, a2 as FolderUpIcon, a3 as GlobeIcon, a4 as GoogleBrandIcon, a5 as GripVerticalIcon, a6 as HelpCircleIcon, a7 as HistoryIcon, a8 as HomeIcon, a9 as IconComponent, aa as IconDefinition, ab as IconProps, ac as IconSize, ad as InboxIcon, ae as InfoCircleSolidIcon, af as InfoIcon, ag as ItalicIcon, ah as KanbanIcon, ai as KeyIcon, aj as LandmarkIcon, ak as LayersIcon, al as LayoutDashboardIcon, am as LayoutGridIcon, an as LayoutListIcon, ao as LightningIcon, ap as Link2Icon, aq as LinkIcon, ar as ListChecksIcon, as as ListIcon, at as ListOrderedIcon, au as LoaderIcon, av as LockIcon, aw as LockKeyholeIcon, ax as LockOpenIcon, ay as LogOutIcon, az as MailIcon, aA as MapPinIcon, aB as MaximizeIcon, aC as MenuIcon, aD as MessageCircleIcon, aE as MessageCircleWarningIcon, aF as MicIcon, aG as MicrosoftBrandIcon, aH as MinimizeIcon, aI as MinusIcon, aJ as MonitorIcon, aK as MoonIcon, aL as MoreHorizontalIcon, aM as MoveIcon, aN as PaletteIcon, aO as PanelLeftCloseIcon, aP as PanelLeftIcon, aQ as PanelRightIcon, aR as PaperclipIcon, aS as PauseIcon, aT as PenSignIcon, aU as PenToolIcon, aV as PencilIcon, aW as PhoneIcon, aX as PlayIcon, aY as PlusIcon, aZ as ReceiptIcon, a_ as RefreshCwIcon, a$ as ReplyIcon, b0 as RotateCcwIcon, b1 as SaveIcon, b2 as SearchIcon, b3 as SendIcon, b4 as SettingsIcon, b5 as ShieldIcon, b6 as SigmaIcon, b7 as SlashIcon, b8 as SmartphoneIcon, b9 as SparkleIcon, ba as SparklesIcon, bb as StarIcon, bc as StopIcon, bd as StrikethroughIcon, be as SunIcon, bf as TableIcon, bg as TagIcon, bh as TeamIcon, bi as ThumbsDownIcon, bj as ThumbsUpIcon, bk as TimerIcon, bl as Trash2Icon, bm as TrashIcon, bn as TrashSolidIcon, bo as TrendingDownIcon, bp as TrendingUpIcon, bq as UnderlineIcon, br as UploadIcon, bs as UserCircleIcon, bt as UserIcon, bu as UsersIcon, bv as VideoIcon, bw as Volume2Icon, bx as VolumeXIcon, by as WorkflowIcon, bz as XCircleSolidIcon, bA as XIcon, bB as ZoomInIcon, bC as ZoomOutIcon, bD as createIcon } from '../index-vztxMSfl.js';
|
|
2
|
+
import '../system-CyAVbHhM.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
package/dist/icons/index.js
CHANGED
|
@@ -46,15 +46,19 @@ var iconSizes = {
|
|
|
46
46
|
};
|
|
47
47
|
var DEFAULT_VIEW_BOX = "0 0 24 24";
|
|
48
48
|
var DEFAULT_STROKE_WIDTH = 1.5;
|
|
49
|
+
var OPTICAL_STROKE_FLOOR_PX = 16;
|
|
49
50
|
function iconSizePx(size) {
|
|
50
51
|
return typeof size === "number" ? size : Number.parseFloat(iconSizes[size]);
|
|
51
52
|
}
|
|
53
|
+
function opticalStrokeWidth(px) {
|
|
54
|
+
return DEFAULT_STROKE_WIDTH * 24 / Math.max(px, OPTICAL_STROKE_FLOOR_PX);
|
|
55
|
+
}
|
|
52
56
|
function iconSizeVar(size) {
|
|
53
57
|
return `var(--ds-icon-size-${size}, var(--icon-size-${size}, ${iconSizes[size]}))`;
|
|
54
58
|
}
|
|
55
59
|
function Icon({
|
|
56
60
|
size = 24,
|
|
57
|
-
strokeWidth
|
|
61
|
+
strokeWidth,
|
|
58
62
|
viewBox = DEFAULT_VIEW_BOX,
|
|
59
63
|
className,
|
|
60
64
|
style,
|
|
@@ -71,7 +75,7 @@ function Icon({
|
|
|
71
75
|
height: px,
|
|
72
76
|
viewBox,
|
|
73
77
|
fill: "none",
|
|
74
|
-
strokeWidth,
|
|
78
|
+
strokeWidth: strokeWidth ?? opticalStrokeWidth(px),
|
|
75
79
|
className: cn("ds:shrink-0", className),
|
|
76
80
|
style: box || style ? { ...box, ...style } : void 0,
|
|
77
81
|
...title !== void 0 ? { role: "img" } : { "aria-hidden": "true" },
|