asma-ui-core 3.112.0 → 3.113.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/dist/asma-ui-core.css +1 -1
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +95 -93
- package/dist/components/inputs/full-screen-picker/FullScreenPicker.js +93 -0
- package/dist/components/inputs/full-screen-picker/PickerLiveRegion.js +34 -0
- package/dist/components/inputs/full-screen-picker/pickerCopy.js +34 -0
- package/dist/components/inputs/full-screen-picker/useVisualViewportHeight.js +10 -0
- package/dist/components/inputs/phone-field/CountryCodeOptions.js +28 -24
- package/dist/components/inputs/phone-field/CountryCodeSelect.js +82 -75
- package/dist/components/inputs/select-autocomplete/SelectAutocompletePicker.js +217 -0
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +270 -220
- package/dist/components/inputs/select-autocomplete/draftChanges.js +24 -0
- package/dist/components/inputs/select-autocomplete/listboxCursor.js +7 -0
- package/dist/components/inputs/select-autocomplete/readFieldName.js +18 -0
- package/dist/hooks/useMediaQuery.hook.js +12 -8
- package/dist/index.js +137 -133
- package/dist/src/components/inputs/dynamic-select/StyledDynamicSelect.d.ts +4 -1
- package/dist/src/components/inputs/full-screen-picker/FullScreenPicker.d.ts +62 -0
- package/dist/src/components/inputs/full-screen-picker/PickerLiveRegion.d.ts +31 -0
- package/dist/src/components/inputs/full-screen-picker/index.d.ts +2 -0
- package/dist/src/components/inputs/full-screen-picker/pickerCopy.d.ts +29 -0
- package/dist/src/components/inputs/full-screen-picker/useVisualViewportHeight.d.ts +8 -0
- package/dist/src/components/inputs/phone-field/CountryCodeOptions.d.ts +9 -1
- package/dist/src/components/inputs/phone-field/CountryCodeSelect.d.ts +4 -3
- package/dist/src/components/inputs/phone-field/useCountryPicker.d.ts +2 -1
- package/dist/src/components/inputs/select-autocomplete/SelectAutocompletePicker.d.ts +52 -0
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +21 -2
- package/dist/src/components/inputs/select-autocomplete/draftChanges.d.ts +17 -0
- package/dist/src/components/inputs/select-autocomplete/listboxCursor.d.ts +9 -0
- package/dist/src/components/inputs/select-autocomplete/readFieldName.d.ts +13 -0
- package/dist/src/hooks/useMediaQuery.hook.d.ts +6 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var r = (e) => {
|
|
2
|
+
if (!e) return {
|
|
3
|
+
label: "",
|
|
4
|
+
name: ""
|
|
5
|
+
};
|
|
6
|
+
const a = (e.getAttribute("aria-labelledby") ?? "").split(/\s+/).map((l) => e.ownerDocument.getElementById(l)?.textContent?.trim() ?? "").filter(Boolean).join(" "), t = [
|
|
7
|
+
e.labels?.[0]?.textContent,
|
|
8
|
+
a,
|
|
9
|
+
e.getAttribute("aria-label")
|
|
10
|
+
].map((l) => l?.trim() ?? "").find(Boolean) ?? "";
|
|
11
|
+
return {
|
|
12
|
+
label: t,
|
|
13
|
+
name: t === "" ? e.placeholder.trim() : t
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
r as readFieldName
|
|
18
|
+
};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { useSyncExternalStore as o } from "react";
|
|
2
|
-
function
|
|
2
|
+
function r(t) {
|
|
3
3
|
function i() {
|
|
4
4
|
return window.matchMedia(t).matches;
|
|
5
5
|
}
|
|
6
6
|
function a(e) {
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
7
|
+
const n = window.matchMedia(t);
|
|
8
|
+
return n.addEventListener("change", e), () => {
|
|
9
|
+
n.removeEventListener("change", e);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
+
function u() {
|
|
13
|
+
return !1;
|
|
14
|
+
}
|
|
12
15
|
return function() {
|
|
13
|
-
return o(a, i);
|
|
16
|
+
return o(a, i, u);
|
|
14
17
|
};
|
|
15
18
|
}
|
|
16
|
-
var
|
|
19
|
+
var h = r("(max-width: 743px)"), c = r("(max-height: 480px)"), d = r("(max-width: 743px), (max-height: 480px)");
|
|
17
20
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
d as useFullScreenPickerMediaQuery,
|
|
22
|
+
h as useMobileMediaQuery,
|
|
23
|
+
c as useShortViewportMediaQuery
|
|
20
24
|
};
|
package/dist/index.js
CHANGED
|
@@ -234,68 +234,70 @@ import { StyledSearchField as Xp } from "./components/inputs/search-field/Styled
|
|
|
234
234
|
import { StyledTextarea as Kp } from "./components/inputs/textarea/StyledTextarea.js";
|
|
235
235
|
import { StyledSelect as Zp } from "./components/inputs/select/StyledSelect.js";
|
|
236
236
|
import { StyledSelectItem as Jp } from "./components/inputs/select/StyledSelectItem.js";
|
|
237
|
-
import {
|
|
238
|
-
import {
|
|
239
|
-
import {
|
|
240
|
-
import {
|
|
241
|
-
import {
|
|
242
|
-
import {
|
|
243
|
-
import {
|
|
244
|
-
import {
|
|
245
|
-
import {
|
|
246
|
-
import {
|
|
247
|
-
import {
|
|
248
|
-
import {
|
|
249
|
-
import {
|
|
250
|
-
import {
|
|
251
|
-
import {
|
|
252
|
-
import {
|
|
253
|
-
import {
|
|
254
|
-
import {
|
|
255
|
-
import {
|
|
256
|
-
import {
|
|
257
|
-
import {
|
|
258
|
-
import {
|
|
259
|
-
import {
|
|
260
|
-
import {
|
|
261
|
-
import {
|
|
262
|
-
import {
|
|
263
|
-
import {
|
|
264
|
-
import {
|
|
265
|
-
import {
|
|
266
|
-
import {
|
|
267
|
-
import {
|
|
268
|
-
import {
|
|
269
|
-
import {
|
|
270
|
-
import {
|
|
271
|
-
import {
|
|
272
|
-
import {
|
|
273
|
-
import {
|
|
274
|
-
import {
|
|
275
|
-
import {
|
|
276
|
-
import {
|
|
277
|
-
import {
|
|
278
|
-
import {
|
|
279
|
-
import {
|
|
280
|
-
import {
|
|
281
|
-
import {
|
|
282
|
-
import {
|
|
283
|
-
import {
|
|
284
|
-
import {
|
|
285
|
-
import {
|
|
286
|
-
import {
|
|
287
|
-
import {
|
|
288
|
-
import {
|
|
289
|
-
import {
|
|
290
|
-
import {
|
|
291
|
-
import {
|
|
292
|
-
import {
|
|
293
|
-
import {
|
|
294
|
-
import {
|
|
295
|
-
import {
|
|
296
|
-
import {
|
|
237
|
+
import { useAnnouncer as $p } from "./components/inputs/full-screen-picker/PickerLiveRegion.js";
|
|
238
|
+
import { FullScreenPicker as rf } from "./components/inputs/full-screen-picker/FullScreenPicker.js";
|
|
239
|
+
import { StyledSelectAutocomplete as tf } from "./components/inputs/select-autocomplete/StyledSelectAutocomplete.js";
|
|
240
|
+
import { StyledSlider as nf } from "./components/inputs/slider/StyledSlider.js";
|
|
241
|
+
import { StyledSwitch as ff } from "./components/inputs/switch/base-ui/StyledSwitch.js";
|
|
242
|
+
import { StyledRadioGroup as lf } from "./components/inputs/radio-button/base-ui/StyledRadioGroup.js";
|
|
243
|
+
import { StyledLabel as If } from "./components/inputs/label/StyledLabel.js";
|
|
244
|
+
import { StyledDynamicSelect as uf } from "./components/inputs/dynamic-select/StyledDynamicSelect.js";
|
|
245
|
+
import { StyledLink as Sf } from "./components/navigation/link/StyledLink.js";
|
|
246
|
+
import { StyledPhoneField as Cf } from "./components/inputs/phone-field/StyledPhoneField.js";
|
|
247
|
+
import { StyledCountryFlag as gf } from "./components/inputs/phone-field/StyledCountryFlag.js";
|
|
248
|
+
import { StyledFieldPair as Df } from "./components/inputs/form-layout/StyledFieldPair.js";
|
|
249
|
+
import { StyledFormColumn as kf } from "./components/inputs/form-layout/StyledFormColumn.js";
|
|
250
|
+
import { StyledFormControl as Pf } from "./components/miscellaneous/StyledFormControl.js";
|
|
251
|
+
import { defaultDatePickerValidationMessages as Tf, useDatePickerValidation as Af } from "./datetime/components/date-picker/hooks/useDatePickerValidation.js";
|
|
252
|
+
import { StyledDrawer as Mf } from "./components/navigation/drawer/StyledDrawer.js";
|
|
253
|
+
import { StyledDatePicker as vf } from "./datetime/components/date-picker/StyledDatePicker.js";
|
|
254
|
+
import { PopupState as xf, bindPopover as Nf, bindPopper as Hf, bindTrigger as _f, usePopupState as Ef } from "./hooks/usePopupState.js";
|
|
255
|
+
import { ClickAwayListener as Uf } from "./components/mui-compat/ClickAwayListener.js";
|
|
256
|
+
import { Paper as zf } from "./components/mui-compat/Paper.js";
|
|
257
|
+
import { Stack as Xf } from "./components/mui-compat/Stack.js";
|
|
258
|
+
import { Container as Kf } from "./components/mui-compat/Container.js";
|
|
259
|
+
import { Avatar as Zf } from "./components/mui-compat/Avatar.js";
|
|
260
|
+
import { Skeleton as Jf } from "./components/mui-compat/Skeleton.js";
|
|
261
|
+
import { FormLabel as $f } from "./components/mui-compat/FormLabel.js";
|
|
262
|
+
import { Fade as rc } from "./components/mui-compat/Fade.js";
|
|
263
|
+
import { Popper as tc } from "./components/mui-compat/Popper.js";
|
|
264
|
+
import { defaultTimePickerHelperMessages as ec } from "./datetime/components/time-picker/components/HelperText.js";
|
|
265
|
+
import { StyledTimePicker as pc } from "./datetime/components/time-picker/StyledTimePicker.js";
|
|
266
|
+
import { setMidnightTime as cc, setZeroTime as lc } from "./datetime/helpers/date.helper.js";
|
|
267
|
+
import { StyledFormControlLabel as Ic } from "./components/miscellaneous/StyledFormControlLabel.js";
|
|
268
|
+
import { StyledFormHelperText as uc } from "./components/miscellaneous/StyledFormHelperText.js";
|
|
269
|
+
import { StyledInputLabel as Sc } from "./components/miscellaneous/StyledInputLabel.js";
|
|
270
|
+
import { StyledFormGroup as Cc } from "./components/miscellaneous/StyledFormGroup.js";
|
|
271
|
+
import { StyledTab as gc } from "./components/navigation/tabs/StyledTab.js";
|
|
272
|
+
import { StyledTabs as Dc } from "./components/navigation/tabs/StyledTabs.js";
|
|
273
|
+
import { StyledTitleChevron as kc } from "./components/navigation/title-chevron/StyledTitleChevron.js";
|
|
274
|
+
import { Listbox as Pc } from "./components/navigation/listbox/Listbox.js";
|
|
275
|
+
import { StyledAccordion as Tc } from "./components/utils/accordion/base-ui/StyledAccordion.js";
|
|
276
|
+
import { StyledAccordionSummary as Rc } from "./components/utils/accordion/base-ui/StyledAccordionSummary.js";
|
|
277
|
+
import { StyledAccordionDetails as Bc } from "./components/utils/accordion/base-ui/StyledAccordionDetails.js";
|
|
278
|
+
import { ACTIONS_COLUMN_ID as wc, DND_HANDLE_COLUMN_ID as xc, EXPAND_COLUMN_ID as Nc, INTERNAL_COLUMN_IDS as Hc, SELECT_COLUMN_ID as _c, SHOW_FULL_TEXT_ID as Ec, isCustomAction as Wc } from "./table/types.js";
|
|
279
|
+
import { RowDragHandleCell as Vc } from "./table/components/columns/dndHandleColumn.js";
|
|
280
|
+
import { StyledTable as Gc } from "./table/components/StyledTableIndex.js";
|
|
281
|
+
import { createColumnHelper as qc } from "./table/index.js";
|
|
282
|
+
import { DynamicToolbarLayoutContext as Qc, useDynamicToolbarLayout as Zc } from "./components/custom/module/header-layout/DynamicToolbarLayoutContext.js";
|
|
283
|
+
import { StyledFilterButton as Jc } from "./components/utils/filter-menu/StyledFilterButton.js";
|
|
284
|
+
import { StyledFilterMenu as $c } from "./components/utils/filter-menu/StyledFilterMenu.js";
|
|
285
|
+
import { CopyButton as rl } from "./components/utils/copy-wrapper/CopyButton.js";
|
|
286
|
+
import { CopyWrapper as tl } from "./components/utils/copy-wrapper/CopyWrapper.js";
|
|
287
|
+
import { VirtualList as el } from "./components/utils/virtual-list/VirtualList.js";
|
|
288
|
+
import { StyledWidgetTitle as pl } from "./components/custom/widget/widget-title/StyledWidgetTitle.js";
|
|
289
|
+
import { StyledWidgetHeader as cl } from "./components/custom/widget/widget-header/StyledWidgetHeader.js";
|
|
290
|
+
import { StyledWidget as al } from "./components/custom/widget/widget/StyledWidget.js";
|
|
291
|
+
import { StyledModuleTitle as dl } from "./components/custom/module/module-title/StyledModuleTitle.js";
|
|
292
|
+
import { DynamicToolbar as sl } from "./components/custom/module/header-layout/DynamicToolbar.js";
|
|
293
|
+
import { PageHeader as yl } from "./components/custom/page/page-header/PageHeader.js";
|
|
294
|
+
import { MinimizableDialog as Ol } from "./components/feedback/minimizable-dialog/MinimizableDialog.js";
|
|
295
|
+
import { MinimizableDialogV2 as hl } from "./components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js";
|
|
296
|
+
import { createDialogStack as bl } from "./components/feedback/minimizable-dialog/stack/createDialogStack.js";
|
|
297
|
+
import { PathfinderCard as Ll } from "./components/custom/pathfinder-card/PathfinderCard.js";
|
|
298
|
+
import { useRouteHeadingFocus as Fl } from "./hooks/useRouteHeadingFocus.js";
|
|
297
299
|
export {
|
|
298
|
-
|
|
300
|
+
wc as ACTIONS_COLUMN_ID,
|
|
299
301
|
ep as ACTION_GAP_PX,
|
|
300
302
|
Ki as AppRegistrationIcon,
|
|
301
303
|
xo as ArchiveIcon,
|
|
@@ -306,7 +308,7 @@ export {
|
|
|
306
308
|
Y as AssignmentIcon,
|
|
307
309
|
oo as AssignmentOutlineIcon,
|
|
308
310
|
xt as AttachFileIcon,
|
|
309
|
-
|
|
311
|
+
Zf as Avatar,
|
|
310
312
|
Em as BackIcon,
|
|
311
313
|
xi as BackupIcon,
|
|
312
314
|
em as BadgeIcon,
|
|
@@ -334,22 +336,22 @@ export {
|
|
|
334
336
|
C as ChevronRightIcon,
|
|
335
337
|
zo as ChevronUpIcon,
|
|
336
338
|
Xi as CircleWarningOutlineIcon,
|
|
337
|
-
|
|
339
|
+
Uf as ClickAwayListener,
|
|
338
340
|
Fm as ClockOutlineIcon,
|
|
339
341
|
Xo as CloseIcon,
|
|
340
342
|
Mt as CloudDoneOutlineIcon,
|
|
341
343
|
vt as CloudIcon,
|
|
342
344
|
re as CloudOffOutlineIcon,
|
|
343
345
|
Jr as ConsentsIcon,
|
|
344
|
-
|
|
346
|
+
Kf as Container,
|
|
345
347
|
yt as ContentCopyIcon,
|
|
346
348
|
bt as ContentCopyOutlineIcon,
|
|
347
349
|
Ot as ContentCutIcon,
|
|
348
350
|
ht as ContentPasteIcon,
|
|
349
351
|
ti as ConversionPathIcon,
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
352
|
+
rl as CopyButton,
|
|
353
|
+
tl as CopyWrapper,
|
|
354
|
+
xc as DND_HANDLE_COLUMN_ID,
|
|
353
355
|
R as DashboardViewIcon,
|
|
354
356
|
B as DashboardViewOutlineIcon,
|
|
355
357
|
ar as DeleteOutlineIcon,
|
|
@@ -369,16 +371,16 @@ export {
|
|
|
369
371
|
Mo as DropUpIcon,
|
|
370
372
|
Or as DvrIcon,
|
|
371
373
|
vi as DvrIconOutline,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
374
|
+
sl as DynamicToolbar,
|
|
375
|
+
Qc as DynamicToolbarLayoutContext,
|
|
376
|
+
Nc as EXPAND_COLUMN_ID,
|
|
375
377
|
Ur as EarthIcon,
|
|
376
378
|
he as EditNotesIcon,
|
|
377
379
|
pm as EditSquareIcon,
|
|
378
380
|
er as EmptyPageIcon,
|
|
379
381
|
Oi as EnvelopeIcon,
|
|
380
382
|
hr as ErrorOutlineIcon,
|
|
381
|
-
|
|
383
|
+
rc as Fade,
|
|
382
384
|
Ar as FastCheckOutlineIcon,
|
|
383
385
|
Mi as FileDocIcon,
|
|
384
386
|
Le as FileImageIcon,
|
|
@@ -391,9 +393,10 @@ export {
|
|
|
391
393
|
Oo as FindReplacePeopleIcon,
|
|
392
394
|
hi as FingerprintIcon,
|
|
393
395
|
bm as FormIcon,
|
|
394
|
-
|
|
396
|
+
$f as FormLabel,
|
|
395
397
|
et as FormatListBulletedIcon,
|
|
396
398
|
pt as FormatListBulletedOutlineIcon,
|
|
399
|
+
rf as FullScreenPicker,
|
|
397
400
|
ei as GraphIcon,
|
|
398
401
|
pi as GraphOutlineIcon,
|
|
399
402
|
ci as GridViewOutlineIcon,
|
|
@@ -406,7 +409,7 @@ export {
|
|
|
406
409
|
ye as HistoryToggleOffIcon,
|
|
407
410
|
Xe as HubIcon,
|
|
408
411
|
Ke as HubIconFilled,
|
|
409
|
-
|
|
412
|
+
Hc as INTERNAL_COLUMN_IDS,
|
|
410
413
|
$o as InboxOutboxIcon,
|
|
411
414
|
rr as InboxOutboxOutlineIcon,
|
|
412
415
|
Ue as IndeterminateIcon,
|
|
@@ -419,7 +422,7 @@ export {
|
|
|
419
422
|
Er as ListSettingsLineIcon,
|
|
420
423
|
vr as ListStatusIcon,
|
|
421
424
|
xr as ListViewOutlineIcon,
|
|
422
|
-
|
|
425
|
+
Pc as Listbox,
|
|
423
426
|
rn as LoadCurrentIcon,
|
|
424
427
|
Ao as LoadingIcon,
|
|
425
428
|
hm as LocationIcon,
|
|
@@ -432,8 +435,8 @@ export {
|
|
|
432
435
|
no as MessageProcessingOutlineIcon,
|
|
433
436
|
tm as MessageReplyIcon,
|
|
434
437
|
Mm as MicrosoftOutlookIcon,
|
|
435
|
-
|
|
436
|
-
|
|
438
|
+
Ol as MinimizableDialog,
|
|
439
|
+
hl as MinimizableDialogV2,
|
|
437
440
|
$r as MinimizeIcon,
|
|
438
441
|
nn as MoveUpIcon,
|
|
439
442
|
q as NewCalendarIcon,
|
|
@@ -445,9 +448,9 @@ export {
|
|
|
445
448
|
$t as OutlineCheckboxIconIndeterminate,
|
|
446
449
|
Xt as OutlineNotificationsIcon,
|
|
447
450
|
wn as OverlayBackOwnerContext,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
+
yl as PageHeader,
|
|
452
|
+
zf as Paper,
|
|
453
|
+
Ll as PathfinderCard,
|
|
451
454
|
T as PdfIcon,
|
|
452
455
|
Xr as PencilOutlineIcon,
|
|
453
456
|
N as PeopleIcon,
|
|
@@ -462,8 +465,8 @@ export {
|
|
|
462
465
|
cm as PlusIcon,
|
|
463
466
|
am as PlusIconCircle,
|
|
464
467
|
Jn as PopoverSheet,
|
|
465
|
-
|
|
466
|
-
|
|
468
|
+
tc as Popper,
|
|
469
|
+
xf as PopupState,
|
|
467
470
|
He as PrintIcon,
|
|
468
471
|
Ae as ProhibitionIcon,
|
|
469
472
|
Me as ProhibitionLargeIcon,
|
|
@@ -477,11 +480,11 @@ export {
|
|
|
477
480
|
se as ResetSettingsIcon,
|
|
478
481
|
$e as RocketLaunchIcon,
|
|
479
482
|
tn as RotateAutoIcon,
|
|
480
|
-
|
|
483
|
+
Vc as RowDragHandleCell,
|
|
481
484
|
dt as RuleIcon,
|
|
482
485
|
st as RuleOutlineIcon,
|
|
483
|
-
|
|
484
|
-
|
|
486
|
+
_c as SELECT_COLUMN_ID,
|
|
487
|
+
Ec as SHOW_FULL_TEXT_ID,
|
|
485
488
|
si as SaveAsDraftIcon,
|
|
486
489
|
di as SaveIcon,
|
|
487
490
|
Fo as SearchIcon,
|
|
@@ -491,72 +494,72 @@ export {
|
|
|
491
494
|
Ft as SettingsNoteIcon,
|
|
492
495
|
so as SettingsOutlineIcon,
|
|
493
496
|
Ji as ShareIcon,
|
|
494
|
-
|
|
497
|
+
Jf as Skeleton,
|
|
495
498
|
pe as SmsIcon,
|
|
496
499
|
Lp as SnackbarProvider,
|
|
497
|
-
|
|
500
|
+
Xf as Stack,
|
|
498
501
|
Pn as StyledAIDisclosure,
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
Tc as StyledAccordion,
|
|
503
|
+
Bc as StyledAccordionDetails,
|
|
504
|
+
Rc as StyledAccordionSummary,
|
|
502
505
|
gp as StyledAlert,
|
|
503
506
|
f as StyledBadge,
|
|
504
507
|
Zn as StyledBottomSheet,
|
|
505
508
|
Bn as StyledButton,
|
|
506
509
|
un as StyledCheckbox,
|
|
507
510
|
In as StyledChip,
|
|
508
|
-
|
|
509
|
-
|
|
511
|
+
gf as StyledCountryFlag,
|
|
512
|
+
vf as StyledDatePicker,
|
|
510
513
|
Hn as StyledDialog,
|
|
511
514
|
En as StyledDialogActions,
|
|
512
515
|
Un as StyledDialogContent,
|
|
513
516
|
Ip as StyledDialogFooter,
|
|
514
517
|
zn as StyledDialogTitle,
|
|
515
|
-
|
|
516
|
-
|
|
518
|
+
Mf as StyledDrawer,
|
|
519
|
+
uf as StyledDynamicSelect,
|
|
517
520
|
up as StyledEmptyPage,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
+
Df as StyledFieldPair,
|
|
522
|
+
Jc as StyledFilterButton,
|
|
523
|
+
$c as StyledFilterMenu,
|
|
521
524
|
Sp as StyledFilteredEmptyState,
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
kf as StyledFormColumn,
|
|
526
|
+
Pf as StyledFormControl,
|
|
527
|
+
Ic as StyledFormControlLabel,
|
|
528
|
+
Cc as StyledFormGroup,
|
|
529
|
+
uc as StyledFormHelperText,
|
|
527
530
|
kn as StyledFormLabel,
|
|
528
531
|
zp as StyledInputField,
|
|
529
|
-
|
|
532
|
+
Sc as StyledInputLabel,
|
|
530
533
|
Cn as StyledInteractiveChip,
|
|
531
|
-
|
|
532
|
-
|
|
534
|
+
If as StyledLabel,
|
|
535
|
+
Sf as StyledLink,
|
|
533
536
|
Cp as StyledLoading,
|
|
534
537
|
rp as StyledMenu,
|
|
535
538
|
tp as StyledMenuItem,
|
|
536
539
|
$n as StyledMenuList,
|
|
537
|
-
|
|
538
|
-
|
|
540
|
+
dl as StyledModuleTitle,
|
|
541
|
+
Cf as StyledPhoneField,
|
|
539
542
|
Xn as StyledPopover,
|
|
540
543
|
Sn as StyledRadio,
|
|
541
|
-
|
|
544
|
+
lf as StyledRadioGroup,
|
|
542
545
|
Xp as StyledSearchField,
|
|
543
546
|
Zp as StyledSelect,
|
|
544
|
-
|
|
547
|
+
tf as StyledSelectAutocomplete,
|
|
545
548
|
Jp as StyledSelectItem,
|
|
546
|
-
|
|
549
|
+
nf as StyledSlider,
|
|
547
550
|
Fp as StyledSnackbar,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
551
|
+
ff as StyledSwitch,
|
|
552
|
+
gc as StyledTab,
|
|
553
|
+
Gc as StyledTable,
|
|
554
|
+
Dc as StyledTabs,
|
|
552
555
|
Kp as StyledTextarea,
|
|
553
|
-
|
|
554
|
-
|
|
556
|
+
pc as StyledTimePicker,
|
|
557
|
+
kc as StyledTitleChevron,
|
|
555
558
|
l as StyledTooltip,
|
|
556
559
|
Dn as StyledTypography,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
+
al as StyledWidget,
|
|
561
|
+
cl as StyledWidgetHeader,
|
|
562
|
+
pl as StyledWidgetTitle,
|
|
560
563
|
ve as StylusNoteIcon,
|
|
561
564
|
xe as StylusNoteLargeIcon,
|
|
562
565
|
Kt as SyncIcon,
|
|
@@ -570,7 +573,7 @@ export {
|
|
|
570
573
|
Mr as UnknownDocumentOutlineRoundedIcon,
|
|
571
574
|
Zm as UnlockIcon,
|
|
572
575
|
bi as UploadIcon,
|
|
573
|
-
|
|
576
|
+
el as VirtualList,
|
|
574
577
|
gn as VirtualizedList,
|
|
575
578
|
ee as VisibilityOffOutlineIcon,
|
|
576
579
|
te as VisibilityOutlineIcon,
|
|
@@ -579,22 +582,22 @@ export {
|
|
|
579
582
|
Ze as WidgetIcon,
|
|
580
583
|
Je as WidgetIconFilled,
|
|
581
584
|
Om as WorkIcon,
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
+
Nf as bindPopover,
|
|
586
|
+
Hf as bindPopper,
|
|
587
|
+
_f as bindTrigger,
|
|
585
588
|
Dp as closeSnackbar,
|
|
586
589
|
m as cn,
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
590
|
+
qc as createColumnHelper,
|
|
591
|
+
bl as createDialogStack,
|
|
592
|
+
Tf as defaultDatePickerValidationMessages,
|
|
593
|
+
ec as defaultTimePickerHelperMessages,
|
|
591
594
|
bp as enqueueSnackbar,
|
|
592
595
|
pp as estimateToolbarActionWidth,
|
|
593
596
|
Ep as fieldLabelAboveClass,
|
|
594
597
|
Wp as fieldWidthForMaxLength,
|
|
595
598
|
Up as fieldWidthStyle,
|
|
596
599
|
Kn as formatResultsLabel,
|
|
597
|
-
|
|
600
|
+
Wc as isCustomAction,
|
|
598
601
|
xp as message,
|
|
599
602
|
i as omit,
|
|
600
603
|
fp as planBulkToolbarActions,
|
|
@@ -604,14 +607,15 @@ export {
|
|
|
604
607
|
Mp as processDefaultSnackbar,
|
|
605
608
|
vp as processInfoSnackbar,
|
|
606
609
|
lp as resolveToolbarActionWidth,
|
|
607
|
-
|
|
608
|
-
|
|
610
|
+
cc as setMidnightTime,
|
|
611
|
+
lc as setZeroTime,
|
|
612
|
+
$p as useAnnouncer,
|
|
609
613
|
xn as useBackCloses,
|
|
610
|
-
|
|
614
|
+
Af as useDatePickerValidation,
|
|
611
615
|
An as useDialogBusyBoundary,
|
|
612
|
-
|
|
613
|
-
|
|
616
|
+
Zc as useDynamicToolbarLayout,
|
|
617
|
+
Ef as usePopupState,
|
|
614
618
|
Rn as useReportDialogBusy,
|
|
615
|
-
|
|
619
|
+
Fl as useRouteHeadingFocus,
|
|
616
620
|
Hp as useSnackbar
|
|
617
621
|
};
|
|
@@ -27,7 +27,10 @@ import { StyledDynamicSelectComponent } from './types';
|
|
|
27
27
|
* Long labels automatically switch to a vertical stacked layout.
|
|
28
28
|
* When `!required` and a value is selected, a "Clear selection" button is shown.
|
|
29
29
|
* - `0 or 6+ options` → renders as a searchable autocomplete (`DynamicSelectAutocomplete`).
|
|
30
|
-
* All autocomplete option counts remain filterable and keyboard-operable.
|
|
30
|
+
* All autocomplete option counts remain filterable and keyboard-operable. Below 744 CSS px wide
|
|
31
|
+
* or at most 480 CSS px high it opens as a full-screen picker titled by `title` (ASMA-8468). A
|
|
32
|
+
* picker opened on 0 options closes when 1–5 options arrive, because the field then becomes a
|
|
33
|
+
* chip group (D-005, RISK-008).
|
|
31
34
|
*
|
|
32
35
|
* **Option types:**
|
|
33
36
|
* Options can be primitives (`string | number | boolean`) or objects. When using objects,
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DialogCloseReason } from '../../feedback/dialog/StyledDialog';
|
|
3
|
+
import { PickerAnnouncement } from './PickerLiveRegion';
|
|
4
|
+
export type FullScreenPickerCloseReason = DialogCloseReason | 'closeButton';
|
|
5
|
+
export interface FullScreenPickerProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Close button, Escape and native Back. Always a cancel: the caller discards anything not applied. */
|
|
8
|
+
onClose: (reason: FullScreenPickerCloseReason) => void;
|
|
9
|
+
dataTest: string;
|
|
10
|
+
/** The field label. Wraps onto as many lines as it needs; it is never truncated. */
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
/** Accessible name of the dialog when there is no `title`. */
|
|
13
|
+
fallbackName?: string;
|
|
14
|
+
/** Accessible name of the close button. */
|
|
15
|
+
closeLabel: string;
|
|
16
|
+
/** The search field — rendered full width under the title, or beside it on a short viewport. */
|
|
17
|
+
search: ReactNode;
|
|
18
|
+
/** The selection row (several choices) or the clear row (one choice). Part of the fixed header. */
|
|
19
|
+
headerRow?: ReactNode;
|
|
20
|
+
/** The list. It is the only part that scrolls. */
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
/** Polite announcement rendered inside the dialog (counts, matches, clears). */
|
|
23
|
+
announcement?: PickerAnnouncement;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#45614-217265
|
|
27
|
+
* Figma "Select mobile full-screen picker": a full-screen sheet with a fixed **Header** (title, close,
|
|
28
|
+
* search, optional selection/clear row; 1 px `border/separator` delta-200 under it) and one scrolling
|
|
29
|
+
* **List**. Title = Mobile/Page title, SemiBold 20/28, `text-icon/title-label` delta-800, wraps.
|
|
30
|
+
* Close = 40 × 40 Quaternary button with a 24 px ×. Search row = `pt-8 px-16`. On a short viewport
|
|
31
|
+
* (`Variant2`, ≤ 480 px high) title, search (max 240 px) and close share the first row.
|
|
32
|
+
*
|
|
33
|
+
* The shared shell for every full-screen picker in ui-core: `StyledSelectAutocomplete` and
|
|
34
|
+
* `CountryCodeSelect` both render through it (ASMA-8468). Presentation only — the caller owns the
|
|
35
|
+
* query, the list, the keyboard and what closing means. Nothing is focused for typing on open, so
|
|
36
|
+
* the on-screen keyboard appears only when the user taps the search field (REQ-006). Opened from
|
|
37
|
+
* the keyboard, focus goes to the `listbox` in `children` when it is a Tab stop (else to the close
|
|
38
|
+
* button), where the arrows work at once. Native Back comes from `StyledDialog` (D-004).
|
|
39
|
+
*
|
|
40
|
+
* For a project's own picker (exported from `asma-ui-core`): render it below the same breakpoint
|
|
41
|
+
* as the selects (`max-width: 743px` or `max-height: 480px`); pass the search field and the list;
|
|
42
|
+
* make the list a `role="listbox"` with `tabIndex={0}` and `aria-activedescendant` if it should
|
|
43
|
+
* take keyboard focus on open; announce counts with `useAnnouncer`.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const [announcement, announce] = useAnnouncer()
|
|
47
|
+
* <FullScreenPicker
|
|
48
|
+
* open={open}
|
|
49
|
+
* onClose={() => setOpen(false)} // ×, Escape and Back: a cancel
|
|
50
|
+
* dataTest='templates-picker'
|
|
51
|
+
* title='Add questionnaires'
|
|
52
|
+
* closeLabel='Close'
|
|
53
|
+
* search={<StyledSearchField dataTest='templates-search' label='Search' value={query} fullWidth onChange={…} />}
|
|
54
|
+
* headerRow={<MySelectionRow />} // optional: count, clear, Done
|
|
55
|
+
* announcement={announcement}
|
|
56
|
+
* >
|
|
57
|
+
* <ul role='listbox' aria-label='Questionnaires' tabIndex={0} aria-activedescendant={activeId}>…</ul>
|
|
58
|
+
* </FullScreenPicker>
|
|
59
|
+
*
|
|
60
|
+
* @see asma-modules/_docs/frontend/plans/2026-10-19-11-04-plan-full-screen-select-picker-phones.md:203 — TASK-004
|
|
61
|
+
*/
|
|
62
|
+
export declare const FullScreenPicker: ({ open, onClose, dataTest, title, fallbackName, ...sheet }: FullScreenPickerProps) => JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** One message for a live region. `id` changes on every `announce`, so a repeated text is read again. */
|
|
2
|
+
export interface PickerAnnouncement {
|
|
3
|
+
text: string;
|
|
4
|
+
id: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Holds the latest announcement for `FullScreenPicker`'s `announcement` prop, which a screen reader
|
|
8
|
+
* reads out politely from inside the dialog (counts, matches, *No matches*). `announce` accepts the
|
|
9
|
+
* same text twice and still re-announces it; `reset` forgets it, so the next opening starts silent.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const [announcement, announce, resetAnnouncement] = useAnnouncer()
|
|
13
|
+
* // on a tick: announce(`${ticked.length} selected`); when the picker opens: resetAnnouncement()
|
|
14
|
+
* <FullScreenPicker announcement={announcement} … />
|
|
15
|
+
*/
|
|
16
|
+
export declare const useAnnouncer: () => [PickerAnnouncement | undefined, (text: string) => void, () => void];
|
|
17
|
+
/**
|
|
18
|
+
* Polite live region for the picker (ASMA-8468 REQ-011/013/016). Inside the dialog it must be
|
|
19
|
+
* rendered **in** the dialog: while `showModal()` is active everything outside is inert and not
|
|
20
|
+
* reliably announced (ALT-005).
|
|
21
|
+
*
|
|
22
|
+
* The text is emptied and set again on the next frame, so the same message twice in a row
|
|
23
|
+
* (`0 valgt` after two clears) is read out again. Both steps write the DOM directly, not React
|
|
24
|
+
* state: two state updates that land before React renders merge into "no change", and an unchanged
|
|
25
|
+
* region is not read out again. The frame's delay also lets a closing dialog leave the top layer
|
|
26
|
+
* first, so a message set as it closes is heard.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PickerLiveRegion: ({ announcement, dataTest, }: {
|
|
29
|
+
announcement?: PickerAnnouncement;
|
|
30
|
+
dataTest?: string;
|
|
31
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UiCoreLocale } from '../../../helpers/uiCoreLocale';
|
|
2
|
+
/**
|
|
3
|
+
* Every string the full-screen picker shows or announces (ASMA-8468). ui-core ships Norwegian and
|
|
4
|
+
* English defaults; a consumer overrides any of them through `pickerText`.
|
|
5
|
+
*
|
|
6
|
+
* @see asma-modules/_docs/frontend/plans/2026-10-19-11-04-plan-full-screen-select-picker-phones.md:206 — TASK-007
|
|
7
|
+
*/
|
|
8
|
+
export interface PickerText {
|
|
9
|
+
/** Accessible name of the close button. */
|
|
10
|
+
close: string;
|
|
11
|
+
/** Label of the search field. */
|
|
12
|
+
search: string;
|
|
13
|
+
/** Several choices: applies the ticks and closes. */
|
|
14
|
+
done: string;
|
|
15
|
+
/** One choice, optional field: empties the field. */
|
|
16
|
+
clearOne: string;
|
|
17
|
+
/** Several choices: unticks everything, including ticks hidden by the search. */
|
|
18
|
+
clearAll: string;
|
|
19
|
+
selectedCount: (count: number) => string;
|
|
20
|
+
noMatches: string;
|
|
21
|
+
matchCount: (count: number) => string;
|
|
22
|
+
/** Announced after `clearOne`. */
|
|
23
|
+
cleared: string;
|
|
24
|
+
/** Announced after `clearAll`. */
|
|
25
|
+
clearedAll: string;
|
|
26
|
+
truncated: (shown: number, total: number) => string;
|
|
27
|
+
}
|
|
28
|
+
/** Default picker copy for `locale`, with any consumer overrides applied on top. */
|
|
29
|
+
export declare const getPickerText: (locale: UiCoreLocale, overrides?: Partial<PickerText>) => PickerText;
|