asma-ui-core 3.80.3 → 3.81.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/index.js CHANGED
@@ -227,58 +227,60 @@ import { StyledSwitch as Tp } from "./components/inputs/switch/base-ui/StyledSwi
227
227
  import { StyledRadioGroup as Ap } from "./components/inputs/radio-button/base-ui/StyledRadioGroup.js";
228
228
  import { StyledLabel as Mp } from "./components/inputs/label/StyledLabel.js";
229
229
  import { StyledDynamicSelect as wp } from "./components/inputs/dynamic-select/StyledDynamicSelect.js";
230
- import { StyledFormControl as Hp } from "./components/miscellaneous/StyledFormControl.js";
231
- import { defaultDatePickerValidationMessages as xp, useDatePickerValidation as _p } from "./datetime/components/date-picker/hooks/useDatePickerValidation.js";
232
- import { StyledDrawer as Wp } from "./components/navigation/drawer/StyledDrawer.js";
233
- import { StyledDatePicker as Vp } from "./datetime/components/date-picker/StyledDatePicker.js";
234
- import { PopupState as Gp, bindPopover as Xp, bindPopper as qp, bindTrigger as Kp, usePopupState as Qp } from "./hooks/usePopupState.js";
235
- import { ClickAwayListener as jp } from "./components/mui-compat/ClickAwayListener.js";
236
- import { Paper as Yp } from "./components/mui-compat/Paper.js";
237
- import { Stack as of } from "./components/mui-compat/Stack.js";
238
- import { Container as mf } from "./components/mui-compat/Container.js";
239
- import { Avatar as ef } from "./components/mui-compat/Avatar.js";
240
- import { Skeleton as pf } from "./components/mui-compat/Skeleton.js";
241
- import { FormLabel as cf } from "./components/mui-compat/FormLabel.js";
242
- import { Fade as If } from "./components/mui-compat/Fade.js";
243
- import { Popper as df } from "./components/mui-compat/Popper.js";
244
- import { defaultTimePickerHelperMessages as Sf } from "./datetime/components/time-picker/components/HelperText.js";
245
- import { StyledTimePicker as yf } from "./datetime/components/time-picker/StyledTimePicker.js";
246
- import { setMidnightTime as Of, setZeroTime as gf } from "./datetime/helpers/date.helper.js";
247
- import { StyledFormControlLabel as hf } from "./components/miscellaneous/StyledFormControlLabel.js";
248
- import { StyledFormHelperText as bf } from "./components/miscellaneous/StyledFormHelperText.js";
249
- import { StyledInputLabel as Pf } from "./components/miscellaneous/StyledInputLabel.js";
250
- import { StyledFormGroup as Ff } from "./components/miscellaneous/StyledFormGroup.js";
251
- import { StyledLink as Rf } from "./components/navigation/link/StyledLink.js";
252
- import { StyledTab as vf } from "./components/navigation/tabs/StyledTab.js";
253
- import { StyledTabs as Bf } from "./components/navigation/tabs/StyledTabs.js";
254
- import { StyledTitleChevron as Nf } from "./components/navigation/title-chevron/StyledTitleChevron.js";
255
- import { Listbox as _f } from "./components/navigation/listbox/Listbox.js";
256
- import { StyledAccordion as Wf } from "./components/utils/accordion/base-ui/StyledAccordion.js";
257
- import { StyledAccordionSummary as Vf } from "./components/utils/accordion/base-ui/StyledAccordionSummary.js";
258
- import { StyledAccordionDetails as Gf } from "./components/utils/accordion/base-ui/StyledAccordionDetails.js";
259
- import { ACTIONS_COLUMN_ID as qf, DND_HANDLE_COLUMN_ID as Kf, EXPAND_COLUMN_ID as Qf, INTERNAL_COLUMN_IDS as Zf, SELECT_COLUMN_ID as jf, SHOW_FULL_TEXT_ID as Jf, isCustomAction as Yf } from "./table/types.js";
260
- import { RowDragHandleCell as oc } from "./table/components/columns/dndHandleColumn.js";
261
- import { StyledTable as mc } from "./table/components/StyledTableIndex.js";
262
- import { createColumnHelper as ic } from "./table/index.js";
263
- import { DynamicToolbarLayoutContext as nc, useDynamicToolbarLayout as pc } from "./components/custom/module/header-layout/DynamicToolbarLayoutContext.js";
264
- import { StyledFilterButton as cc } from "./components/utils/filter-menu/StyledFilterButton.js";
265
- import { StyledFilterMenu as Ic } from "./components/utils/filter-menu/StyledFilterMenu.js";
266
- import { CopyButton as dc } from "./components/utils/copy-wrapper/CopyButton.js";
267
- import { CopyWrapper as Sc } from "./components/utils/copy-wrapper/CopyWrapper.js";
268
- import { VirtualList as yc } from "./components/utils/virtual-list/VirtualList.js";
269
- import { StyledWidgetTitle as Oc } from "./components/custom/widget/widget-title/StyledWidgetTitle.js";
270
- import { StyledWidgetHeader as Dc } from "./components/custom/widget/widget-header/StyledWidgetHeader.js";
271
- import { StyledWidget as kc } from "./components/custom/widget/widget/StyledWidget.js";
272
- import { StyledModuleTitle as Lc } from "./components/custom/module/module-title/StyledModuleTitle.js";
273
- import { DynamicToolbar as Tc } from "./components/custom/module/header-layout/DynamicToolbar.js";
274
- import { PageHeader as Ac } from "./components/custom/page/page-header/PageHeader.js";
275
- import { MinimizableDialog as Mc } from "./components/feedback/minimizable-dialog/MinimizableDialog.js";
276
- import { MinimizableDialogV2 as wc } from "./components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js";
277
- import { createDialogStack as Hc } from "./components/feedback/minimizable-dialog/stack/createDialogStack.js";
278
- import { PathfinderCard as xc } from "./components/custom/pathfinder-card/PathfinderCard.js";
279
- import { useRouteHeadingFocus as Ec } from "./hooks/useRouteHeadingFocus.js";
230
+ import { StyledLink as Hp } from "./components/navigation/link/StyledLink.js";
231
+ import { StyledPhoneField as xp } from "./components/inputs/phone-field/StyledPhoneField.js";
232
+ import { StyledCountryFlag as Ep } from "./components/inputs/phone-field/StyledCountryFlag.js";
233
+ import { StyledFormControl as Up } from "./components/miscellaneous/StyledFormControl.js";
234
+ import { defaultDatePickerValidationMessages as zp, useDatePickerValidation as Gp } from "./datetime/components/date-picker/hooks/useDatePickerValidation.js";
235
+ import { StyledDrawer as qp } from "./components/navigation/drawer/StyledDrawer.js";
236
+ import { StyledDatePicker as Qp } from "./datetime/components/date-picker/StyledDatePicker.js";
237
+ import { PopupState as jp, bindPopover as Jp, bindPopper as Yp, bindTrigger as $p, usePopupState as of } from "./hooks/usePopupState.js";
238
+ import { ClickAwayListener as mf } from "./components/mui-compat/ClickAwayListener.js";
239
+ import { Paper as ef } from "./components/mui-compat/Paper.js";
240
+ import { Stack as pf } from "./components/mui-compat/Stack.js";
241
+ import { Container as cf } from "./components/mui-compat/Container.js";
242
+ import { Avatar as If } from "./components/mui-compat/Avatar.js";
243
+ import { Skeleton as df } from "./components/mui-compat/Skeleton.js";
244
+ import { FormLabel as Sf } from "./components/mui-compat/FormLabel.js";
245
+ import { Fade as yf } from "./components/mui-compat/Fade.js";
246
+ import { Popper as Of } from "./components/mui-compat/Popper.js";
247
+ import { defaultTimePickerHelperMessages as Df } from "./datetime/components/time-picker/components/HelperText.js";
248
+ import { StyledTimePicker as kf } from "./datetime/components/time-picker/StyledTimePicker.js";
249
+ import { setMidnightTime as Lf, setZeroTime as Pf } from "./datetime/helpers/date.helper.js";
250
+ import { StyledFormControlLabel as Ff } from "./components/miscellaneous/StyledFormControlLabel.js";
251
+ import { StyledFormHelperText as Rf } from "./components/miscellaneous/StyledFormHelperText.js";
252
+ import { StyledInputLabel as vf } from "./components/miscellaneous/StyledInputLabel.js";
253
+ import { StyledFormGroup as Bf } from "./components/miscellaneous/StyledFormGroup.js";
254
+ import { StyledTab as Nf } from "./components/navigation/tabs/StyledTab.js";
255
+ import { StyledTabs as _f } from "./components/navigation/tabs/StyledTabs.js";
256
+ import { StyledTitleChevron as Wf } from "./components/navigation/title-chevron/StyledTitleChevron.js";
257
+ import { Listbox as Vf } from "./components/navigation/listbox/Listbox.js";
258
+ import { StyledAccordion as Gf } from "./components/utils/accordion/base-ui/StyledAccordion.js";
259
+ import { StyledAccordionSummary as qf } from "./components/utils/accordion/base-ui/StyledAccordionSummary.js";
260
+ import { StyledAccordionDetails as Qf } from "./components/utils/accordion/base-ui/StyledAccordionDetails.js";
261
+ import { ACTIONS_COLUMN_ID as jf, DND_HANDLE_COLUMN_ID as Jf, EXPAND_COLUMN_ID as Yf, INTERNAL_COLUMN_IDS as $f, SELECT_COLUMN_ID as oc, SHOW_FULL_TEXT_ID as rc, isCustomAction as mc } from "./table/types.js";
262
+ import { RowDragHandleCell as ic } from "./table/components/columns/dndHandleColumn.js";
263
+ import { StyledTable as nc } from "./table/components/StyledTableIndex.js";
264
+ import { createColumnHelper as fc } from "./table/index.js";
265
+ import { DynamicToolbarLayoutContext as lc, useDynamicToolbarLayout as Ic } from "./components/custom/module/header-layout/DynamicToolbarLayoutContext.js";
266
+ import { StyledFilterButton as dc } from "./components/utils/filter-menu/StyledFilterButton.js";
267
+ import { StyledFilterMenu as Sc } from "./components/utils/filter-menu/StyledFilterMenu.js";
268
+ import { CopyButton as yc } from "./components/utils/copy-wrapper/CopyButton.js";
269
+ import { CopyWrapper as Oc } from "./components/utils/copy-wrapper/CopyWrapper.js";
270
+ import { VirtualList as Dc } from "./components/utils/virtual-list/VirtualList.js";
271
+ import { StyledWidgetTitle as kc } from "./components/custom/widget/widget-title/StyledWidgetTitle.js";
272
+ import { StyledWidgetHeader as Lc } from "./components/custom/widget/widget-header/StyledWidgetHeader.js";
273
+ import { StyledWidget as Tc } from "./components/custom/widget/widget/StyledWidget.js";
274
+ import { StyledModuleTitle as Ac } from "./components/custom/module/module-title/StyledModuleTitle.js";
275
+ import { DynamicToolbar as Mc } from "./components/custom/module/header-layout/DynamicToolbar.js";
276
+ import { PageHeader as wc } from "./components/custom/page/page-header/PageHeader.js";
277
+ import { MinimizableDialog as Hc } from "./components/feedback/minimizable-dialog/MinimizableDialog.js";
278
+ import { MinimizableDialogV2 as xc } from "./components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js";
279
+ import { createDialogStack as Ec } from "./components/feedback/minimizable-dialog/stack/createDialogStack.js";
280
+ import { PathfinderCard as Uc } from "./components/custom/pathfinder-card/PathfinderCard.js";
281
+ import { useRouteHeadingFocus as zc } from "./hooks/useRouteHeadingFocus.js";
280
282
  export {
281
- qf as ACTIONS_COLUMN_ID,
283
+ jf as ACTIONS_COLUMN_ID,
282
284
  Bn as ACTION_GAP_PX,
283
285
  zi as AppRegistrationIcon,
284
286
  wo as ArchiveIcon,
@@ -289,7 +291,7 @@ export {
289
291
  j as AssignmentIcon,
290
292
  Y as AssignmentOutlineIcon,
291
293
  wt as AttachFileIcon,
292
- ef as Avatar,
294
+ If as Avatar,
293
295
  xm as BackIcon,
294
296
  Mi as BackupIcon,
295
297
  tm as BadgeIcon,
@@ -317,22 +319,22 @@ export {
317
319
  s as ChevronRightIcon,
318
320
  Uo as ChevronUpIcon,
319
321
  Ui as CircleWarningOutlineIcon,
320
- jp as ClickAwayListener,
322
+ mf as ClickAwayListener,
321
323
  Lm as ClockOutlineIcon,
322
324
  zo as CloseIcon,
323
325
  At as CloudDoneOutlineIcon,
324
326
  Mt as CloudIcon,
325
327
  Ji as CloudOffOutlineIcon,
326
328
  Zr as ConsentsIcon,
327
- mf as Container,
329
+ cf as Container,
328
330
  St as ContentCopyIcon,
329
331
  Dt as ContentCopyOutlineIcon,
330
332
  yt as ContentCutIcon,
331
333
  Ot as ContentPasteIcon,
332
334
  ri as ConversionPathIcon,
333
- dc as CopyButton,
334
- Sc as CopyWrapper,
335
- Kf as DND_HANDLE_COLUMN_ID,
335
+ yc as CopyButton,
336
+ Oc as CopyWrapper,
337
+ Jf as DND_HANDLE_COLUMN_ID,
336
338
  F as DashboardViewIcon,
337
339
  R as DashboardViewOutlineIcon,
338
340
  cr as DeleteOutlineIcon,
@@ -351,16 +353,16 @@ export {
351
353
  Ao as DropUpIcon,
352
354
  yr as DvrIcon,
353
355
  Ai as DvrIconOutline,
354
- Tc as DynamicToolbar,
355
- nc as DynamicToolbarLayoutContext,
356
- Qf as EXPAND_COLUMN_ID,
356
+ Mc as DynamicToolbar,
357
+ lc as DynamicToolbarLayoutContext,
358
+ Yf as EXPAND_COLUMN_ID,
357
359
  Er as EarthIcon,
358
360
  ye as EditNotesIcon,
359
361
  em as EditSquareIcon,
360
362
  tr as EmptyPageIcon,
361
363
  Si as EnvelopeIcon,
362
364
  Or as ErrorOutlineIcon,
363
- If as Fade,
365
+ yf as Fade,
364
366
  Tr as FastCheckOutlineIcon,
365
367
  Ti as FileDocIcon,
366
368
  De as FileImageIcon,
@@ -373,7 +375,7 @@ export {
373
375
  yo as FindReplacePeopleIcon,
374
376
  yi as FingerprintIcon,
375
377
  Dm as FormIcon,
376
- cf as FormLabel,
378
+ Sf as FormLabel,
377
379
  tt as FormatListBulletedIcon,
378
380
  et as FormatListBulletedOutlineIcon,
379
381
  ti as GraphIcon,
@@ -388,7 +390,7 @@ export {
388
390
  de as HistoryToggleOffIcon,
389
391
  Me as HubIcon,
390
392
  we as HubIconFilled,
391
- Zf as INTERNAL_COLUMN_IDS,
393
+ $f as INTERNAL_COLUMN_IDS,
392
394
  Jo as InboxOutboxIcon,
393
395
  $o as InboxOutboxOutlineIcon,
394
396
  Te as IndeterminateIcon,
@@ -401,7 +403,7 @@ export {
401
403
  xr as ListSettingsLineIcon,
402
404
  Mr as ListStatusIcon,
403
405
  wr as ListViewOutlineIcon,
404
- _f as Listbox,
406
+ Vf as Listbox,
405
407
  Ue as LoadCurrentIcon,
406
408
  To as LoadingIcon,
407
409
  Om as LocationIcon,
@@ -414,8 +416,8 @@ export {
414
416
  io as MessageProcessingOutlineIcon,
415
417
  rm as MessageReplyIcon,
416
418
  Am as MicrosoftOutlookIcon,
417
- Mc as MinimizableDialog,
418
- wc as MinimizableDialogV2,
419
+ Hc as MinimizableDialog,
420
+ xc as MinimizableDialogV2,
419
421
  Jr as MinimizeIcon,
420
422
  Xe as MoveUpIcon,
421
423
  G as NewCalendarIcon,
@@ -426,9 +428,9 @@ export {
426
428
  Kt as OutlineCheckboxIconChecked,
427
429
  Jt as OutlineCheckboxIconIndeterminate,
428
430
  zt as OutlineNotificationsIcon,
429
- Ac as PageHeader,
430
- Yp as Paper,
431
- xc as PathfinderCard,
431
+ wc as PageHeader,
432
+ ef as Paper,
433
+ Uc as PathfinderCard,
432
434
  P as PdfIcon,
433
435
  zr as PencilOutlineIcon,
434
436
  B as PeopleIcon,
@@ -442,8 +444,8 @@ export {
442
444
  Sm as PinIcon,
443
445
  pm as PlusIcon,
444
446
  cm as PlusIconCircle,
445
- df as Popper,
446
- Gp as PopupState,
447
+ Of as Popper,
448
+ jp as PopupState,
447
449
  b as QnrIcon,
448
450
  kt as RefreshIcon,
449
451
  di as RemoveIcon,
@@ -454,11 +456,11 @@ export {
454
456
  Ie as ResetSettingsIcon,
455
457
  Ee as RocketLaunchIcon,
456
458
  ze as RotateAutoIcon,
457
- oc as RowDragHandleCell,
459
+ ic as RowDragHandleCell,
458
460
  It as RuleIcon,
459
461
  dt as RuleOutlineIcon,
460
- jf as SELECT_COLUMN_ID,
461
- Jf as SHOW_FULL_TEXT_ID,
462
+ oc as SELECT_COLUMN_ID,
463
+ rc as SHOW_FULL_TEXT_ID,
462
464
  Ii as SaveIcon,
463
465
  Lo as SearchIcon,
464
466
  Ht as SendIcon,
@@ -467,46 +469,48 @@ export {
467
469
  Lt as SettingsNoteIcon,
468
470
  ao as SettingsOutlineIcon,
469
471
  Ki as ShareIcon,
470
- pf as Skeleton,
472
+ df as Skeleton,
471
473
  te as SmsIcon,
472
474
  Jn as SnackbarProvider,
473
- of as Stack,
475
+ pf as Stack,
474
476
  un as StyledAIDisclosure,
475
- Wf as StyledAccordion,
476
- Gf as StyledAccordionDetails,
477
- Vf as StyledAccordionSummary,
477
+ Gf as StyledAccordion,
478
+ Qf as StyledAccordionDetails,
479
+ qf as StyledAccordionSummary,
478
480
  Zn as StyledAlert,
479
481
  f as StyledBadge,
480
482
  sn as StyledButton,
481
483
  $e as StyledCheckbox,
482
484
  Je as StyledChip,
483
- Vp as StyledDatePicker,
485
+ Ep as StyledCountryFlag,
486
+ Qp as StyledDatePicker,
484
487
  Cn as StyledDialog,
485
488
  gn as StyledDialogActions,
486
489
  hn as StyledDialogContent,
487
490
  Un as StyledDialogFooter,
488
491
  bn as StyledDialogTitle,
489
- Wp as StyledDrawer,
492
+ qp as StyledDrawer,
490
493
  wp as StyledDynamicSelect,
491
494
  zn as StyledEmptyPage,
492
- cc as StyledFilterButton,
493
- Ic as StyledFilterMenu,
495
+ dc as StyledFilterButton,
496
+ Sc as StyledFilterMenu,
494
497
  Xn as StyledFilteredEmptyState,
495
- Hp as StyledFormControl,
496
- hf as StyledFormControlLabel,
497
- Ff as StyledFormGroup,
498
- bf as StyledFormHelperText,
498
+ Up as StyledFormControl,
499
+ Ff as StyledFormControlLabel,
500
+ Bf as StyledFormGroup,
501
+ Rf as StyledFormHelperText,
499
502
  an as StyledFormLabel,
500
503
  dp as StyledInputField,
501
- Pf as StyledInputLabel,
504
+ vf as StyledInputLabel,
502
505
  tn as StyledInteractiveChip,
503
506
  Mp as StyledLabel,
504
- Rf as StyledLink,
507
+ Hp as StyledLink,
505
508
  Kn as StyledLoading,
506
509
  Rn as StyledMenu,
507
510
  vn as StyledMenuItem,
508
511
  Fn as StyledMenuList,
509
- Lc as StyledModuleTitle,
512
+ Ac as StyledModuleTitle,
513
+ xp as StyledPhoneField,
510
514
  Pn as StyledPopover,
511
515
  rn as StyledRadio,
512
516
  Ap as StyledRadioGroup,
@@ -517,17 +521,17 @@ export {
517
521
  Lp as StyledSlider,
518
522
  $n as StyledSnackbar,
519
523
  Tp as StyledSwitch,
520
- vf as StyledTab,
521
- mc as StyledTable,
522
- Bf as StyledTabs,
524
+ Nf as StyledTab,
525
+ nc as StyledTable,
526
+ _f as StyledTabs,
523
527
  yp as StyledTextarea,
524
- yf as StyledTimePicker,
525
- Nf as StyledTitleChevron,
528
+ kf as StyledTimePicker,
529
+ Wf as StyledTitleChevron,
526
530
  nn as StyledTooltip,
527
531
  ln as StyledTypography,
528
- kc as StyledWidget,
529
- Dc as StyledWidgetHeader,
530
- Oc as StyledWidgetTitle,
532
+ Tc as StyledWidget,
533
+ Lc as StyledWidgetHeader,
534
+ kc as StyledWidgetTitle,
531
535
  Xt as SyncIcon,
532
536
  Zi as SyncSavedLocallyIcon,
533
537
  Hr as TextBoxCheckOutlineIcon,
@@ -539,7 +543,7 @@ export {
539
543
  Ar as UnknownDocumentOutlineRoundedIcon,
540
544
  Km as UnlockIcon,
541
545
  Oi as UploadIcon,
542
- yc as VirtualList,
546
+ Dc as VirtualList,
543
547
  fn as VirtualizedList,
544
548
  re as VisibilityOffOutlineIcon,
545
549
  $i as VisibilityOutlineIcon,
@@ -548,18 +552,18 @@ export {
548
552
  He as WidgetIcon,
549
553
  xe as WidgetIconFilled,
550
554
  ym as WorkIcon,
551
- Xp as bindPopover,
552
- qp as bindPopper,
553
- Kp as bindTrigger,
555
+ Jp as bindPopover,
556
+ Yp as bindPopper,
557
+ $p as bindTrigger,
554
558
  cp as closeSnackbar,
555
559
  m as cn,
556
- ic as createColumnHelper,
557
- Hc as createDialogStack,
558
- xp as defaultDatePickerValidationMessages,
559
- Sf as defaultTimePickerHelperMessages,
560
+ fc as createColumnHelper,
561
+ Ec as createDialogStack,
562
+ zp as defaultDatePickerValidationMessages,
563
+ Df as defaultTimePickerHelperMessages,
560
564
  lp as enqueueSnackbar,
561
565
  Nn as estimateToolbarActionWidth,
562
- Yf as isCustomAction,
566
+ mc as isCustomAction,
563
567
  pp as message,
564
568
  i as omit,
565
569
  xn as planBulkToolbarActions,
@@ -569,11 +573,11 @@ export {
569
573
  tp as processDefaultSnackbar,
570
574
  ep as processInfoSnackbar,
571
575
  En as resolveToolbarActionWidth,
572
- Of as setMidnightTime,
573
- gf as setZeroTime,
574
- _p as useDatePickerValidation,
575
- pc as useDynamicToolbarLayout,
576
- Qp as usePopupState,
577
- Ec as useRouteHeadingFocus,
576
+ Lf as setMidnightTime,
577
+ Pf as setZeroTime,
578
+ Gp as useDatePickerValidation,
579
+ Ic as useDynamicToolbarLayout,
580
+ of as usePopupState,
581
+ zc as useRouteHeadingFocus,
578
582
  Ip as useSnackbar
579
583
  };
@@ -0,0 +1,20 @@
1
+ import { PhoneCountryChoice, RenderCountryFlag } from './types';
2
+ export interface CountryCodeOptionsProps {
3
+ dataTest: string;
4
+ /** Already filtered — the caller owns the query. */
5
+ visible: readonly PhoneCountryChoice[];
6
+ selectedIso2: string;
7
+ activeIndex: number;
8
+ optionId: (index: number) => string;
9
+ onSelect: (iso2: string) => void;
10
+ listId: string;
11
+ /** Accessible name for the list. Consumer copy, same string that titles the mobile sheet. */
12
+ label: string;
13
+ renderFlag?: RenderCountryFlag;
14
+ className?: string;
15
+ }
16
+ /**
17
+ * The country listbox. Presentation only — filtering, the active row and the keyboard live in
18
+ * [[useCountryPicker]], so the desktop trigger and the mobile sheet render the same list.
19
+ */
20
+ export declare const CountryCodeOptions: ({ dataTest, visible, selectedIso2, activeIndex, optionId, onSelect, listId, label, renderFlag, className, }: CountryCodeOptionsProps) => JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { PhoneCountryChoice, RenderCountryFlag } from './types';
2
+ export interface CountryCodeSelectProps {
3
+ dataTest: string;
4
+ countries: readonly PhoneCountryChoice[];
5
+ value: string;
6
+ onChange: (iso2: string) => void;
7
+ disabled?: boolean;
8
+ /** Title of the mobile picker sheet; supplied by the consumer — this library ships no copy. */
9
+ selectCountryLabel: string;
10
+ /** Placeholder of the mobile sheet's search box. Consumer-supplied. */
11
+ searchPlaceholder: string;
12
+ renderFlag?: RenderCountryFlag;
13
+ /** `id` of the field label, so the trigger inherits the field's accessible name. */
14
+ labelledBy?: string;
15
+ /** Surface class shared with the number input so the pair matches. */
16
+ className?: string;
17
+ }
18
+ /**
19
+ * Collapsed country trigger (flag + calling code + chevron) and the picker it opens.
20
+ *
21
+ * Two presentations, one list and one keyboard contract ([[useCountryPicker]]):
22
+ *
23
+ * - **Desktop** — the trigger *is* the combobox. Opening it turns the calling-code slot into an
24
+ * input and typing filters the list below, which is what Figma draws (the open trigger carries a
25
+ * text cursor, and the menu holds rows only — node 8565:284950 has no search field).
26
+ * - **Mobile** — a full-screen sheet with its own search box, per node 8699:112423. The break is
27
+ * `StyledDialog`'s own `fullScreen ?? isMobile` default (≤743 px), so the two never disagree
28
+ * about what "mobile" means.
29
+ */
30
+ export declare const CountryCodeSelect: ({ dataTest, countries, value, onChange, disabled, selectCountryLabel, searchPlaceholder, renderFlag, labelledBy, className, }: CountryCodeSelectProps) => JSX.Element;
@@ -0,0 +1,34 @@
1
+ export interface StyledCountryFlagProps {
2
+ /** ISO 3166-1 alpha-2 code, e.g. `'NO'`. Rendered as `data-country` so tests can assert which flag appeared. */
3
+ iso2: string;
4
+ /**
5
+ * URL of the flag artwork, resolved by the consumer. Required because this package is loaded
6
+ * from the kernel CDN and cannot know where the consuming app hosts its assets — so the
7
+ * artwork ships with the app, and the app's bundler is what turns it into an address.
8
+ */
9
+ src: string;
10
+ /**
11
+ * `'eager'` for a flag that is on screen the moment it mounts — the collapsed trigger, and any
12
+ * row of an already-open picker. Defaults to `'lazy'`, which is right for a long scrolling list
13
+ * where fetching all 245 up front would move megabytes nobody looks at.
14
+ */
15
+ loading?: 'eager' | 'lazy';
16
+ className?: string;
17
+ }
18
+ /**
19
+ * @figmaNode none — the Design System has no flag component; the phone field's Figma frames draw
20
+ * flag artwork directly.
21
+ *
22
+ * Real artwork rather than emoji: Windows ships no regional-indicator glyphs, so `🇳🇴` renders as
23
+ * the letters "NO" in Chrome and Edge there.
24
+ *
25
+ * One file per country rather than one sprite, which is a measured choice: the full flag set is
26
+ * 2.0 MB raw / 619 kB gzipped, dominated by a handful of ornate coats of arms (Serbia alone is
27
+ * 182 kB), so a sprite would charge every user the whole set to look at ten rows. Per-file fetches
28
+ * only what is on screen — and Norway, the collapsed default, is 318 bytes.
29
+ *
30
+ * The box is painted before the artwork arrives and stays painted if it never does. Sizes vary by
31
+ * two orders of magnitude across the set, so a row holding a heavy flag would otherwise sit empty
32
+ * — or show the browser's broken-image glyph — long enough to read as a defect.
33
+ */
34
+ export declare const StyledCountryFlag: ({ iso2, src, loading, className, }: StyledCountryFlagProps) => JSX.Element;
@@ -0,0 +1,81 @@
1
+ import { ReactNode } from 'react';
2
+ import { FieldSize } from '../field-styles';
3
+ import { PhoneCountryChoice, RenderCountryFlag } from './types';
4
+ export interface StyledPhoneFieldProps {
5
+ /** @figmaProp none — test hook */
6
+ dataTest: string;
7
+ /** @figmaProp Label above the control pair */
8
+ label?: ReactNode;
9
+ countries: readonly PhoneCountryChoice[];
10
+ /** Selected country as an ISO 3166-1 alpha-2 code. */
11
+ country: string;
12
+ onCountryChange: (iso2: string) => void;
13
+ /**
14
+ * National significant number as **digits only** — no dial code, no separators. Grouping is a
15
+ * display concern applied through `formatNationalNumber`, so the value a consumer stores and
16
+ * the value it reads back are the same string.
17
+ */
18
+ value: string;
19
+ /** Receives the typed national number as digits only. */
20
+ onChange: (nationalNumber: string) => void;
21
+ onBlur?: () => void;
22
+ /** @figmaProp State = true→"Error" — reddens the number input only, per Figma. */
23
+ error?: boolean;
24
+ /** @figmaProp Helper text element */
25
+ helperText?: ReactNode;
26
+ reserveHelperText?: boolean;
27
+ /** @figmaProp State = true→"Disabled" */
28
+ disabled?: boolean;
29
+ /** @figmaProp State = true→"Read only" — renders the number as text, not as inputs. */
30
+ readOnly?: boolean;
31
+ /** Pre-formatted international number for the read-only state, e.g. `'+47 48 01 23 45'`. */
32
+ readOnlyText?: string;
33
+ /**
34
+ * Click-to-call target for the read-only state, e.g. `phoneTelHref(value)` from
35
+ * `asma-core-helpers/phone`. Supplied by the consumer because building a `tel:` URI is a phone
36
+ * rule, and this library owns none — without it the number renders as plain text.
37
+ */
38
+ readOnlyHref?: string;
39
+ required?: boolean;
40
+ /** @figmaProp Placeholder of the number input */
41
+ placeholder?: string;
42
+ /**
43
+ * Per-country grouping for the number input, e.g. `formatNationalAsYouType` from
44
+ * `asma-core-helpers/phone`. Injected rather than built in: this library owns no phone rules
45
+ * and no country metadata (ADR-0017 DEC-001).
46
+ */
47
+ formatNationalNumber?: (nationalNumber: string, iso2: string) => string;
48
+ renderFlag?: RenderCountryFlag;
49
+ /** Title of the country picker. Consumer-supplied — this library ships no user-facing copy. */
50
+ selectCountryLabel: string;
51
+ /** Placeholder of the country search box. Consumer-supplied. */
52
+ searchPlaceholder: string;
53
+ id?: string;
54
+ name?: string;
55
+ size?: FieldSize;
56
+ /**
57
+ * Applied to the surface of **both** controls, so the pair cannot drift apart visually —
58
+ * e.g. `'bg-white'` where the field sits on a tinted panel.
59
+ */
60
+ fieldClassName?: string;
61
+ helperTextClassName?: string;
62
+ className?: string;
63
+ }
64
+ /**
65
+ * @figmaNode y2whTsnmk1J2dy5fwbM7GK#8523-109515
66
+ * Figma "Phone number input": a country trigger (flag + code + chevron) and a separate number
67
+ * input side by side under one label, with a single helper row beneath the pair. The Figma
68
+ * **Property 1** variants (Default/Error/Disabled/Read-only/Menu) map to `error`/`disabled`/
69
+ * `readOnly` and the picker's own open state.
70
+ *
71
+ * Country data, grouping, validation and every user-facing string are supplied by the consumer —
72
+ * this component renders the state it is told about and owns no rules (ADR-0017 DEC-001/REQ-009).
73
+ * Pair it with `asma-core-helpers/phone`, which provides the country list, the formatter and the
74
+ * validator.
75
+ *
76
+ * ponytail: reformatting is applied on every keystroke, so the caret lands at the end of the
77
+ * number after an edit in the middle of it. Phone numbers are short and typed left to right, so
78
+ * this is a deliberate ceiling; the upgrade path is the caret-preserving `formatMaskedValue` in
79
+ * `helpers/inputMask.ts`, which today only handles fixed-width masks.
80
+ */
81
+ export declare const StyledPhoneField: ({ dataTest, label, countries, country, onCountryChange, value, onChange, onBlur, error, helperText, reserveHelperText, disabled, readOnly, readOnlyText, readOnlyHref, required, placeholder, formatNationalNumber, renderFlag, selectCountryLabel, searchPlaceholder, id, name, size, fieldClassName, helperTextClassName, className, }: StyledPhoneFieldProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './StyledPhoneField';
2
+ export * from './StyledCountryFlag';
3
+ export type { PhoneCountryChoice, RenderCountryFlag } from './types';
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * One row of the country picker.
4
+ *
5
+ * Declared structurally rather than imported from `asma-core-helpers/phone` on purpose:
6
+ * this package is a kernel member served to the whole fleet, and pulling a phone-metadata
7
+ * dependency into it would put ~20 kB gz of country data in every app's shared bundle.
8
+ * `PhoneCountryOption` from that subpath satisfies this shape, so consumers pass it directly.
9
+ *
10
+ * @see asma-modules/_docs/adr/adr-g-0017-frontend-form-state-and-validation-ownership.md:49 — DEC-001, this library owns presentation only
11
+ */
12
+ export interface PhoneCountryChoice {
13
+ /** ISO 3166-1 alpha-2 code, e.g. `'NO'`. */
14
+ iso2: string;
15
+ /** Calling code without the leading `+`, e.g. `'47'`. */
16
+ dialCode: string;
17
+ /** Country name, already localized by the consumer. */
18
+ name: string;
19
+ }
20
+ /**
21
+ * Renders the flag for a country. `loading` is `'eager'` where the flag is on screen the moment it
22
+ * mounts (the collapsed trigger, and the rows of an already-open picker) — see `StyledCountryFlag`.
23
+ */
24
+ export type RenderCountryFlag = (iso2: string, loading?: 'eager' | 'lazy') => ReactNode;
@@ -0,0 +1,30 @@
1
+ import { KeyboardEvent } from 'react';
2
+ import { PhoneCountryChoice } from './types';
3
+ /**
4
+ * Matches on localized name **or** calling code, so both `"Norway"` and `"47"` narrow the list
5
+ * to +47 (ASMA-7485). A leading `+` is ignored so pasting `+47` works.
6
+ */
7
+ export declare function matchesCountryQuery(country: PhoneCountryChoice, query: string): boolean;
8
+ export interface UseCountryPickerOptions {
9
+ countries: readonly PhoneCountryChoice[];
10
+ selectedIso2: string;
11
+ query: string;
12
+ listId: string;
13
+ onSelect: (iso2: string) => void;
14
+ onDismiss: () => void;
15
+ }
16
+ export interface CountryPicker {
17
+ visible: readonly PhoneCountryChoice[];
18
+ activeIndex: number;
19
+ optionId: (index: number) => string;
20
+ handleKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
21
+ }
22
+ /**
23
+ * Filtering, active-row tracking and keyboard behaviour for the country picker — shared by the
24
+ * desktop trigger (which is itself the combobox) and the mobile sheet (which has its own search
25
+ * box), so the two presentations cannot drift apart on what typing or arrowing does.
26
+ *
27
+ * The active row is tracked by country rather than by index: filtering renumbers every index, and
28
+ * an index would need an effect to stay in range — a re-render behind the list it describes.
29
+ */
30
+ export declare function useCountryPicker({ countries, selectedIso2, query, listId, onSelect, onDismiss, }: UseCountryPickerOptions): CountryPicker;
@@ -1,7 +1,8 @@
1
1
  import { MouseEvent, ReactNode } from 'react';
2
2
  export interface StyledSelectItemProps {
3
- id?: string;
4
3
  value?: unknown;
4
+ /** Needed when a parent listbox points `aria-activedescendant` at this row. */
5
+ id?: string;
5
6
  children?: ReactNode;
6
7
  selected?: boolean;
7
8
  active?: boolean;
@@ -26,6 +26,7 @@ export * from './components/inputs/switch';
26
26
  export * from './components/inputs/radio-button';
27
27
  export * from './components/inputs/label';
28
28
  export * from './components/inputs/dynamic-select';
29
+ export * from './components/inputs/phone-field';
29
30
  export * from './datetime/components/date-picker';
30
31
  export * from './datetime/components/time-picker';
31
32
  export * from './datetime/helpers/date.helper';