@transferwise/components 46.121.0 → 46.121.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.mjs","sources":["../../src/modal/Modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode, useContext, useId, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n Position,\n PositionTop,\n PositionCenter,\n Scroll,\n CommonProps,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n SizeExtraLarge,\n ScrollContent,\n ScrollViewport,\n Typography,\n} from '../common';\nimport { useLayout } from '../common/hooks';\nimport Dimmer from '../dimmer';\nimport Drawer from '../drawer';\nimport { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';\nimport Title from '../title/Title';\nimport { Cross } from '@transferwise/icons';\nimport IconButton from '../iconButton';\nimport closeBtnMessages from '../common/closeButton/CloseButton.messages';\n\nconst TRANSITION_DURATION_IN_MILLISECONDS = 150;\n\nexport type ModalProps = CommonProps & {\n title?: ReactNode;\n body: ReactNode;\n footer?: ReactNode;\n size?: SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;\n onClose: () => void;\n onUnmount?: () => void;\n open: boolean;\n scroll?: ScrollContent | ScrollViewport;\n position?: PositionTop | PositionCenter;\n disableDimmerClickToClose?: boolean;\n};\n\nconst Modal = ({\n title = null,\n body,\n footer = null,\n onClose,\n onUnmount,\n className,\n open,\n size = Size.MEDIUM,\n scroll = Scroll.VIEWPORT,\n position = Position.CENTER,\n disableDimmerClickToClose = false,\n ...otherProps\n}: ModalProps) => {\n const intl = useIntl();\n const { isMedium } = useLayout();\n\n const contentReference = useRef<HTMLDivElement>(null);\n const titleId = useId();\n\n const overlayId = useContext(OverlayIdContext);\n\n return !isMedium ? (\n <Drawer\n open={open}\n headerTitle={title}\n footerContent={footer}\n position={Position.BOTTOM}\n onClose={onClose}\n onUnmount={onUnmount}\n >\n {body}\n </Drawer>\n ) : (\n <Dimmer\n open={open}\n scrollable={scroll === Scroll.VIEWPORT}\n contentPosition={position}\n disableClickToClose={disableDimmerClickToClose}\n onClose={onClose}\n onExited={onUnmount}\n >\n <CSSTransition\n nodeRef={contentReference}\n appear\n in={open}\n classNames={{ enterDone: 'in' }}\n timeout={TRANSITION_DURATION_IN_MILLISECONDS}\n unmountOnExit\n >\n <div\n ref={contentReference}\n className={clsx(\n 'tw-modal',\n 'd-flex',\n 'fade',\n 'outline-none',\n scroll === Scroll.CONTENT && 'tw-modal--scrollable',\n className,\n )}\n {...otherProps}\n >\n <div\n id={overlayId}\n role=\"dialog\"\n aria-modal\n aria-labelledby={titleId}\n className={clsx('tw-modal-dialog', 'd-flex', {\n [`tw-modal-${size}`]: size,\n })}\n >\n <div\n className={clsx(\n 'tw-modal-content',\n 'd-flex',\n 'flex-column',\n 'justify-content-between',\n )}\n >\n <div\n className={clsx(\n 'tw-modal-header',\n 'd-flex',\n 'align-items-center',\n title ? 'justify-content-between' : 'justify-content-end',\n 'flex-wrap',\n )}\n >\n {title && (\n <Title id={titleId} type={Typography.TITLE_SUBSECTION} className=\"tw-modal-title\">\n {title}\n </Title>\n )}\n <IconButton\n size={40}\n priority=\"tertiary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onClose}\n >\n <Cross />\n </IconButton>\n </div>\n <div\n className={clsx('tw-modal-body', {\n 'tw-modal-body--scrollable': scroll === Scroll.CONTENT,\n })}\n >\n {body}\n </div>\n {footer ? (\n <div\n className={clsx('tw-modal-footer', 'd-flex', 'align-items-center', 'flex-wrap')}\n >\n {footer}\n </div>\n ) : (\n <div className=\"m-t-3\" />\n )}\n </div>\n </div>\n </div>\n </CSSTransition>\n </Dimmer>\n );\n};\n\nexport default Modal;\n"],"names":["TRANSITION_DURATION_IN_MILLISECONDS","Modal","title","body","footer","onClose","onUnmount","className","open","size","Size","MEDIUM","scroll","Scroll","VIEWPORT","position","Position","CENTER","disableDimmerClickToClose","otherProps","intl","useIntl","isMedium","useLayout","contentReference","useRef","titleId","useId","overlayId","useContext","OverlayIdContext","_jsx","Drawer","headerTitle","footerContent","BOTTOM","children","Dimmer","scrollable","contentPosition","disableClickToClose","onExited","CSSTransition","nodeRef","appear","in","classNames","enterDone","timeout","unmountOnExit","ref","clsx","CONTENT","id","role","_jsxs","Title","type","Typography","TITLE_SUBSECTION","IconButton","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAMA,mCAAmC,GAAG,GAAG;AAe/C,MAAMC,KAAK,GAAGA,CAAC;AACbC,EAAAA,KAAK,GAAG,IAAI;EACZC,IAAI;AACJC,EAAAA,MAAM,GAAG,IAAI;EACbC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,IAAI;EACJC,IAAI,GAAGC,IAAI,CAACC,MAAM;EAClBC,MAAM,GAAGC,MAAM,CAACC,QAAQ;EACxBC,QAAQ,GAAGC,QAAQ,CAACC,MAAM;AAC1BC,EAAAA,yBAAyB,GAAG,KAAK;EACjC,GAAGC;AAAU,CACF,KAAI;AACf,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EACtB,MAAM;AAAEC,IAAAA;GAAU,GAAGC,SAAS,EAAE;AAEhC,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAiB,IAAI,CAAC;AACrD,EAAA,MAAMC,OAAO,GAAGC,KAAK,EAAE;AAEvB,EAAA,MAAMC,SAAS,GAAGC,UAAU,CAACC,gBAAgB,CAAC;AAE9C,EAAA,OAAO,CAACR,QAAQ,gBACdS,GAAA,CAACC,MAAM,EAAA;AACLxB,IAAAA,IAAI,EAAEA,IAAK;AACXyB,IAAAA,WAAW,EAAE/B,KAAM;AACnBgC,IAAAA,aAAa,EAAE9B,MAAO;IACtBW,QAAQ,EAAEC,QAAQ,CAACmB,MAAO;AAC1B9B,IAAAA,OA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,EAE/EhC;aACE,CAAC,gBAEN2B,GAAA,CAAA,KAAA,EAAA;AAAKxB,cAAAA,SAAS,EAAC;AAAO,aAAA,CACvB;WACE;SACF;OACF;KACQ;AACjB,GAAQ,CACT;AACH;;;;"}
1
+ {"version":3,"file":"Modal.mjs","sources":["../../src/modal/Modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode, useContext, useId, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n Position,\n PositionTop,\n PositionCenter,\n Scroll,\n CommonProps,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n SizeExtraLarge,\n ScrollContent,\n ScrollViewport,\n Typography,\n} from '../common';\nimport { useLayout } from '../common/hooks';\nimport Dimmer from '../dimmer';\nimport Drawer from '../drawer';\nimport { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';\nimport Title from '../title/Title';\nimport { Cross } from '@transferwise/icons';\nimport IconButton from '../iconButton';\nimport closeBtnMessages from '../common/closeButton/CloseButton.messages';\n\nconst TRANSITION_DURATION_IN_MILLISECONDS = 150;\n\nexport type ModalProps = CommonProps & {\n title?: ReactNode;\n body: ReactNode;\n footer?: ReactNode;\n size?: SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;\n onClose: () => void;\n onUnmount?: () => void;\n open: boolean;\n scroll?: ScrollContent | ScrollViewport;\n position?: PositionTop | PositionCenter;\n disableDimmerClickToClose?: boolean;\n};\n\nconst Modal = ({\n title = null,\n body,\n footer = null,\n onClose,\n onUnmount,\n className,\n open,\n size = Size.MEDIUM,\n scroll = Scroll.VIEWPORT,\n position = Position.CENTER,\n disableDimmerClickToClose = false,\n ...otherProps\n}: ModalProps) => {\n const intl = useIntl();\n const { isMedium } = useLayout();\n\n const contentReference = useRef<HTMLDivElement>(null);\n const titleId = useId();\n\n const overlayId = useContext(OverlayIdContext);\n\n return !isMedium ? (\n <Drawer\n open={open}\n className={className}\n headerTitle={title}\n footerContent={footer}\n position={Position.BOTTOM}\n onClose={onClose}\n onUnmount={onUnmount}\n >\n {body}\n </Drawer>\n ) : (\n <Dimmer\n open={open}\n scrollable={scroll === Scroll.VIEWPORT}\n contentPosition={position}\n disableClickToClose={disableDimmerClickToClose}\n onClose={onClose}\n onExited={onUnmount}\n >\n <CSSTransition\n nodeRef={contentReference}\n appear\n in={open}\n classNames={{ enterDone: 'in' }}\n timeout={TRANSITION_DURATION_IN_MILLISECONDS}\n unmountOnExit\n >\n <div\n ref={contentReference}\n className={clsx(\n 'tw-modal',\n 'd-flex',\n 'fade',\n 'outline-none',\n scroll === Scroll.CONTENT && 'tw-modal--scrollable',\n className,\n )}\n {...otherProps}\n >\n <div\n id={overlayId}\n role=\"dialog\"\n aria-modal\n aria-labelledby={titleId}\n className={clsx('tw-modal-dialog', 'd-flex', {\n [`tw-modal-${size}`]: size,\n })}\n >\n <div\n className={clsx(\n 'tw-modal-content',\n 'd-flex',\n 'flex-column',\n 'justify-content-between',\n )}\n >\n <div\n className={clsx(\n 'tw-modal-header',\n 'd-flex',\n 'align-items-center',\n title ? 'justify-content-between' : 'justify-content-end',\n 'flex-wrap',\n )}\n >\n {title && (\n <Title id={titleId} type={Typography.TITLE_SUBSECTION} className=\"tw-modal-title\">\n {title}\n </Title>\n )}\n <IconButton\n size={40}\n priority=\"tertiary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onClose}\n >\n <Cross />\n </IconButton>\n </div>\n <div\n className={clsx('tw-modal-body', {\n 'tw-modal-body--scrollable': scroll === Scroll.CONTENT,\n })}\n >\n {body}\n </div>\n {footer ? (\n <div\n className={clsx('tw-modal-footer', 'd-flex', 'align-items-center', 'flex-wrap')}\n >\n {footer}\n </div>\n ) : (\n <div className=\"m-t-3\" />\n )}\n </div>\n </div>\n </div>\n </CSSTransition>\n </Dimmer>\n );\n};\n\nexport default Modal;\n"],"names":["TRANSITION_DURATION_IN_MILLISECONDS","Modal","title","body","footer","onClose","onUnmount","className","open","size","Size","MEDIUM","scroll","Scroll","VIEWPORT","position","Position","CENTER","disableDimmerClickToClose","otherProps","intl","useIntl","isMedium","useLayout","contentReference","useRef","titleId","useId","overlayId","useContext","OverlayIdContext","_jsx","Drawer","headerTitle","footerContent","BOTTOM","children","Dimmer","scrollable","contentPosition","disableClickToClose","onExited","CSSTransition","nodeRef","appear","in","classNames","enterDone","timeout","unmountOnExit","ref","clsx","CONTENT","id","role","_jsxs","Title","type","Typography","TITLE_SUBSECTION","IconButton","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAMA,mCAAmC,GAAG,GAAG;AAe/C,MAAMC,KAAK,GAAGA,CAAC;AACbC,EAAAA,KAAK,GAAG,IAAI;EACZC,IAAI;AACJC,EAAAA,MAAM,GAAG,IAAI;EACbC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,IAAI;EACJC,IAAI,GAAGC,IAAI,CAACC,MAAM;EAClBC,MAAM,GAAGC,MAAM,CAACC,QAAQ;EACxBC,QAAQ,GAAGC,QAAQ,CAACC,MAAM;AAC1BC,EAAAA,yBAAyB,GAAG,KAAK;EACjC,GAAGC;AAAU,CACF,KAAI;AACf,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EACtB,MAAM;AAAEC,IAAAA;GAAU,GAAGC,SAAS,EAAE;AAEhC,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAiB,IAAI,CAAC;AACrD,EAAA,MAAMC,OAAO,GAAGC,KAAK,EAAE;AAEvB,EAAA,MAAMC,SAAS,GAAGC,UAAU,CAACC,gBAAgB,CAAC;AAE9C,EAAA,OAAO,CAACR,QAAQ,gBACdS,GAAA,CAACC,MAAM,EAAA;AACLxB,IAAAA,IAAI,EAAEA,IAAK;AACXD,IAAAA,SAAS,EAAEA,SAAU;AACrB0B,IAAAA,WAAW,EAAE/B,KAAM;AACnBgC,IAAAA,aAAa,EAAE9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AiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,WAAW,CAAE;AAAAf,cAAAA,QAAA,EAE/EhC;aACE,CAAC,gBAEN2B,GAAA,CAAA,KAAA,EAAA;AAAKxB,cAAAA,SAAS,EAAC;AAAO,aAAA,CACvB;WACE;SACF;OACF;KACQ;AACjB,GAAQ,CACT;AACH;;;;"}
@@ -415,7 +415,7 @@
415
415
  margin-bottom: 0;
416
416
  }
417
417
  .wds-list-item-view.fullyInteractive:before {
418
- content: '';
418
+ content: "";
419
419
  position: absolute;
420
420
  inset: 0;
421
421
  }
@@ -446,7 +446,7 @@
446
446
  z-index: 1;
447
447
  }
448
448
  .wds-list-item-interactive a.wds-list-item-control.wds-list-item-control_pseudo-element:before {
449
- content: '';
449
+ content: "";
450
450
  position: absolute;
451
451
  inset: 0;
452
452
  }
@@ -464,7 +464,7 @@
464
464
  .wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
465
465
  outline: var(--ring-outline-color) solid var(--ring-outline-width);
466
466
  outline-offset: var(--ring-outline-offset);
467
- content: '';
467
+ content: "";
468
468
  position: absolute;
469
469
  inset: 0 -8px;
470
470
  border-radius: 16px;
@@ -473,7 +473,7 @@
473
473
  }
474
474
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
475
475
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
476
- content: '';
476
+ content: "";
477
477
  position: absolute;
478
478
  inset: 0 -8px;
479
479
  border-radius: 16px;
@@ -585,7 +585,9 @@
585
585
  .wds-list-item.disabled .wds-list-item-title-value,
586
586
  .wds-list-item.disabled .wds-list-item-subtitle,
587
587
  .wds-list-item.disabled .wds-list-item-subtitle-value,
588
- .wds-list-item.disabled .wds-list-item-additional-info {
588
+ .wds-list-item.disabled .wds-list-item-additional-info,
589
+ .wds-list-item.disabled .wds-list-item-additional-info strong,
590
+ .wds-list-item.disabled .wds-list-item-additional-info b {
589
591
  color: #768e9c;
590
592
  color: var(--color-content-tertiary);
591
593
  }
@@ -3585,7 +3585,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3585
3585
  margin-bottom: 0;
3586
3586
  }
3587
3587
  .wds-list-item-view.fullyInteractive:before {
3588
- content: '';
3588
+ content: "";
3589
3589
  position: absolute;
3590
3590
  inset: 0;
3591
3591
  }
@@ -3616,7 +3616,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3616
3616
  z-index: 1;
3617
3617
  }
3618
3618
  .wds-list-item-interactive a.wds-list-item-control.wds-list-item-control_pseudo-element:before {
3619
- content: '';
3619
+ content: "";
3620
3620
  position: absolute;
3621
3621
  inset: 0;
3622
3622
  }
@@ -3634,7 +3634,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3634
3634
  .wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
3635
3635
  outline: var(--ring-outline-color) solid var(--ring-outline-width);
3636
3636
  outline-offset: var(--ring-outline-offset);
3637
- content: '';
3637
+ content: "";
3638
3638
  position: absolute;
3639
3639
  inset: 0 -8px;
3640
3640
  border-radius: 16px;
@@ -3643,7 +3643,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3643
3643
  }
3644
3644
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
3645
3645
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
3646
- content: '';
3646
+ content: "";
3647
3647
  position: absolute;
3648
3648
  inset: 0 -8px;
3649
3649
  border-radius: 16px;
@@ -3755,7 +3755,9 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3755
3755
  .wds-list-item.disabled .wds-list-item-title-value,
3756
3756
  .wds-list-item.disabled .wds-list-item-subtitle,
3757
3757
  .wds-list-item.disabled .wds-list-item-subtitle-value,
3758
- .wds-list-item.disabled .wds-list-item-additional-info {
3758
+ .wds-list-item.disabled .wds-list-item-additional-info,
3759
+ .wds-list-item.disabled .wds-list-item-additional-info strong,
3760
+ .wds-list-item.disabled .wds-list-item-additional-info b {
3759
3761
  color: #768e9c;
3760
3762
  color: var(--color-content-tertiary);
3761
3763
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/listItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAY,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAY5D,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,YAAY,GACZ,OAAO,GACP,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,GAClB,mBAAmB,CAAC;AAExB,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC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MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;IACxC,QAAQ,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,KAAK,GAAI,gIAaZ,UAAU,gCAgHZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "46.121.0",
3
+ "version": "46.121.2",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -58,7 +58,7 @@
58
58
  "@testing-library/jest-dom": "^6.9.1",
59
59
  "@testing-library/react": "^16.3.1",
60
60
  "@testing-library/user-event": "^14.6.1",
61
- "@transferwise/icons": "^4.0.1",
61
+ "@transferwise/icons": "^4.0.2",
62
62
  "@tsconfig/recommended": "^1.0.13",
63
63
  "@types/babel__core": "^7.20.5",
64
64
  "@types/commonmark": "^0.27.10",
@@ -119,7 +119,7 @@
119
119
  "merge-props": "^6.0.0",
120
120
  "react-popper": "^2.3.0",
121
121
  "react-transition-group": "^4.4.5",
122
- "virtua": "^0.48.2"
122
+ "virtua": "^0.48.3"
123
123
  },
124
124
  "publishConfig": {
125
125
  "access": "public",
package/src/i18n/uk.json CHANGED
@@ -8,36 +8,58 @@
8
8
  "neptune.DateInput.month.label": "Місяць",
9
9
  "neptune.DateInput.year.label": "Рік",
10
10
  "neptune.DateInput.year.placeholder": "РРРР",
11
- "neptune.DateLookup.day": "дня",
12
- "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
11
+ "neptune.DateLookup.day": "день",
12
+ "neptune.DateLookup.goTo20YearView": "Показати дані за 20 років",
13
13
  "neptune.DateLookup.month": "місяць",
14
14
  "neptune.DateLookup.next": "уперед",
15
15
  "neptune.DateLookup.previous": "назад",
16
16
  "neptune.DateLookup.selected": "вибрано",
17
17
  "neptune.DateLookup.twentyYears": "20 років",
18
18
  "neptune.DateLookup.year": "рік",
19
- "neptune.FlowNavigation.back": "back to previous step",
19
+ "neptune.ExpressiveMoneyInput.currency.search.placeholder": "Вкажіть валюту / країну",
20
+ "neptune.ExpressiveMoneyInput.currency.select.currency": "Виберіть валюту",
21
+ "neptune.FlowNavigation.back": "назад до попереднього кроку",
20
22
  "neptune.Info.ariaLabel": "Більше відомостей",
21
- "neptune.Link.opensInNewTab": "(opens in new tab)",
23
+ "neptune.Label.optional": "(Необов’язково)",
24
+ "neptune.Link.opensInNewTab": "(відкривається в новій вкладці)",
22
25
  "neptune.MoneyInput.Select.placeholder": "Виберіть варіант…",
26
+ "neptune.MoneyInput.Select.searchPlaceholder": "Введіть валюту або країну",
27
+ "neptune.MoneyInput.Select.selectCurrencyLabel": "Виберіть валюту",
28
+ "neptune.PhoneNumberInput.SelectInput.placeholder": "Виберіть варіант…",
29
+ "neptune.PhoneNumberInput.countryCodeLabel": "Код країни",
30
+ "neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефону",
23
31
  "neptune.Select.searchPlaceholder": "Пошук…",
24
32
  "neptune.SelectInput.noResultsFound": "Нічого не знайдено",
33
+ "neptune.StatusIcon.iconLabel.error": "Помилка:",
34
+ "neptune.StatusIcon.iconLabel.information": "Інформація:",
35
+ "neptune.StatusIcon.iconLabel.pending": "Обробка:",
36
+ "neptune.StatusIcon.iconLabel.success": "Виконано:",
37
+ "neptune.StatusIcon.iconLabel.warning": "Попередження:",
25
38
  "neptune.Summary.statusDone": "Виконано",
26
39
  "neptune.Summary.statusNotDone": "Не виконано",
27
40
  "neptune.Summary.statusPending": "Виконується",
41
+ "neptune.Table.actionHeader": "Дія",
42
+ "neptune.Table.emptyData": "Нічого не знайдено",
43
+ "neptune.Table.loaded": "Дані таблиці завантажено",
44
+ "neptune.Table.loading": "Дані таблиці завантажуються",
45
+ "neptune.Table.refreshPage": "Оновити сторінку",
28
46
  "neptune.Upload.csButtonText": "Завантажити інший файл?",
29
47
  "neptune.Upload.csFailureText": "Не завантажено. Повторіть спробу.",
30
48
  "neptune.Upload.csSuccessText": "Завантаження завершено!",
31
- "neptune.Upload.csTooLargeMessage": "Завантажте файл завбільшки до 5 МБ",
49
+ "neptune.Upload.csTooLargeMessage": "Максимальний розмір файлу {maxSize} МБ",
50
+ "neptune.Upload.csTooLargeNoLimitMessage": "Надайте файл меншого розміру",
32
51
  "neptune.Upload.csWrongTypeMessage": "Тип файлу не підтримується. Спробуйте завантажити інший файл.",
33
52
  "neptune.Upload.psButtonText": "Скасувати",
34
53
  "neptune.Upload.psProcessingText": "Завантаження…",
54
+ "neptune.Upload.retry": "Повторити",
35
55
  "neptune.Upload.usButtonText": "Або виберіть файл",
36
56
  "neptune.Upload.usDropMessage": "Перетягніть файл, щоб почати завантаження",
37
- "neptune.Upload.usPlaceholder": "Перетягніть файл завбільшки до 5 МБ",
57
+ "neptune.Upload.usPlaceholder": "Перетягніть файл розміром до {maxSize} МБ",
58
+ "neptune.Upload.usPlaceholderNoLimit": "Перетягніть файл",
38
59
  "neptune.UploadButton.allFileTypes": "Усі типи файлів",
39
60
  "neptune.UploadButton.dropFiles": "Перетягніть файл, щоб почати завантаження",
40
61
  "neptune.UploadButton.instructions": "{fileTypes}, до {size} МБ",
62
+ "neptune.UploadButton.maximumFiles": "Максимальна кількість файлів — {maxFiles}.",
41
63
  "neptune.UploadButton.uploadFile": "Завантажити файл",
42
64
  "neptune.UploadButton.uploadFiles": "Завантажити файли",
43
65
  "neptune.UploadInput.deleteModalBody": "Якщо вилучити файл, його буде видалено з нашої системи.",
@@ -415,7 +415,7 @@
415
415
  margin-bottom: 0;
416
416
  }
417
417
  .wds-list-item-view.fullyInteractive:before {
418
- content: '';
418
+ content: "";
419
419
  position: absolute;
420
420
  inset: 0;
421
421
  }
@@ -446,7 +446,7 @@
446
446
  z-index: 1;
447
447
  }
448
448
  .wds-list-item-interactive a.wds-list-item-control.wds-list-item-control_pseudo-element:before {
449
- content: '';
449
+ content: "";
450
450
  position: absolute;
451
451
  inset: 0;
452
452
  }
@@ -464,7 +464,7 @@
464
464
  .wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
465
465
  outline: var(--ring-outline-color) solid var(--ring-outline-width);
466
466
  outline-offset: var(--ring-outline-offset);
467
- content: '';
467
+ content: "";
468
468
  position: absolute;
469
469
  inset: 0 -8px;
470
470
  border-radius: 16px;
@@ -473,7 +473,7 @@
473
473
  }
474
474
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
475
475
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
476
- content: '';
476
+ content: "";
477
477
  position: absolute;
478
478
  inset: 0 -8px;
479
479
  border-radius: 16px;
@@ -585,7 +585,9 @@
585
585
  .wds-list-item.disabled .wds-list-item-title-value,
586
586
  .wds-list-item.disabled .wds-list-item-subtitle,
587
587
  .wds-list-item.disabled .wds-list-item-subtitle-value,
588
- .wds-list-item.disabled .wds-list-item-additional-info {
588
+ .wds-list-item.disabled .wds-list-item-additional-info,
589
+ .wds-list-item.disabled .wds-list-item-additional-info strong,
590
+ .wds-list-item.disabled .wds-list-item-additional-info b {
589
591
  color: #768e9c;
590
592
  color: var(--color-content-tertiary);
591
593
  }
@@ -12,11 +12,11 @@
12
12
  container-type: inline-size;
13
13
 
14
14
  & + .wds-list-item-spotlight,
15
- .wds-list-item-spotlight + &{
15
+ .wds-list-item-spotlight + & {
16
16
  margin-top: var(--size-16);
17
17
  }
18
18
 
19
- &:focus-within{
19
+ &:focus-within {
20
20
  z-index: 1;
21
21
  }
22
22
 
@@ -30,7 +30,7 @@
30
30
  &.fullyInteractive {
31
31
  margin-bottom: 0;
32
32
  &:before {
33
- content: '';
33
+ content: "";
34
34
  position: absolute;
35
35
  inset: 0;
36
36
  }
@@ -40,7 +40,7 @@
40
40
  a {
41
41
  text-underline-offset: calc(var(--size-4) / 2);
42
42
 
43
- .wds-list-item-subtitle,
43
+ .wds-list-item-subtitle,
44
44
  .wds-list-item-subtitle-value {
45
45
  color: var(--color-content-secondary);
46
46
  }
@@ -54,11 +54,13 @@
54
54
  }
55
55
 
56
56
  .wds-list-item-additional-info {
57
- .ring-offset-0
57
+ .ring-offset-0;
58
58
  }
59
59
 
60
60
  a.wds-list-item-control {
61
- &, &:hover, &:focus {
61
+ &,
62
+ &:hover,
63
+ &:focus {
62
64
  text-decoration: none;
63
65
  }
64
66
 
@@ -69,7 +71,7 @@
69
71
 
70
72
  &.wds-list-item-control_pseudo-element {
71
73
  &:before {
72
- content: '';
74
+ content: "";
73
75
  position: absolute;
74
76
  inset: 0;
75
77
  }
@@ -99,7 +101,7 @@
99
101
  &:has(input[type="checkbox"]:focus-visible) {
100
102
  &:before {
101
103
  .ring();
102
- content: '';
104
+ content: "";
103
105
  position: absolute;
104
106
  inset: 0 -8px;
105
107
  border-radius: var(--radius-medium);
@@ -111,7 +113,7 @@
111
113
  &:hover,
112
114
  &:active {
113
115
  &:before {
114
- content: '';
116
+ content: "";
115
117
  position: absolute;
116
118
  inset: 0 -8px;
117
119
  border-radius: var(--radius-medium);
@@ -145,9 +147,9 @@
145
147
  }
146
148
 
147
149
  .wds-list-item-button-control {
148
- .wds-Button {
149
- transition: none;
150
- }
150
+ .wds-Button {
151
+ transition: none;
152
+ }
151
153
  }
152
154
  }
153
155
 
@@ -173,13 +175,16 @@
173
175
  align-items: start;
174
176
  width: 100%;
175
177
  display: grid;
176
- grid-template-columns: var(--wds-list-item-body-left, 1fr) var(--wds-list-item-body-right, max-content);
178
+ grid-template-columns: var(--wds-list-item-body-left, 1fr) var(
179
+ --wds-list-item-body-right,
180
+ max-content
181
+ );
177
182
  gap: var(--size-16);
178
183
  word-break: break-word;
179
184
  }
180
185
 
181
186
  &-titles,
182
- &-value{
187
+ &-value {
183
188
  display: flex;
184
189
  flex-direction: column;
185
190
  justify-content: center;
@@ -193,8 +198,9 @@
193
198
  text-align: right;
194
199
  }
195
200
 
196
- &-title, &-title-value {
197
- color: var(--color-content-primary);
201
+ &-title,
202
+ &-title-value {
203
+ color: var(--color-content-primary);
198
204
  }
199
205
 
200
206
  &-body-center {
@@ -204,17 +210,17 @@
204
210
  }
205
211
 
206
212
  &-additional-info {
207
- grid-area: info;
208
- color: var(--color-content-tertiary);
209
- margin-top: calc(var(--size-4) * -1);
213
+ grid-area: info;
214
+ color: var(--color-content-tertiary);
215
+ margin-top: calc(var(--size-4) * -1);
210
216
 
211
- button.np-link {
212
- text-align: start;
213
- }
217
+ button.np-link {
218
+ text-align: start;
219
+ }
214
220
  }
215
221
 
216
222
  &-control-wrapper {
217
- grid-area: control;
223
+ grid-area: control;
218
224
  }
219
225
 
220
226
  &-navigation {
@@ -224,80 +230,89 @@
224
230
  }
225
231
 
226
232
  &-control {
227
- flex: 0 0 auto;
233
+ flex: 0 0 auto;
228
234
  }
229
235
 
230
236
  &.disabled {
231
237
  opacity: unset;
232
238
 
233
- &, label {
239
+ &,
240
+ label {
234
241
  cursor: not-allowed;
235
242
  }
236
243
 
237
- .wds-list-item-media, .np-avatar-view-content,
244
+ .wds-list-item-media,
245
+ .np-avatar-view-content,
238
246
  .wds-list-item-title,
239
247
  .wds-list-item-title-value,
240
248
  .wds-list-item-subtitle,
241
249
  .wds-list-item-subtitle-value,
242
- .wds-list-item-additional-info {
250
+ .wds-list-item-additional-info,
251
+ .wds-list-item-additional-info :is(strong, b) {
243
252
  color: var(--color-content-tertiary);
244
253
  }
245
254
 
246
255
  .wds-list-item-media,
247
256
  .wds-list-item-body,
248
257
  .wds-list-item-additional-info {
249
- opacity: .93;
258
+ opacity: 0.93;
250
259
  }
251
260
  }
252
261
 
253
262
  &.disabled--has-prompt-reason {
254
- .wds-list-item-prompt{
255
- opacity: .93;
263
+ .wds-list-item-prompt {
264
+ opacity: 0.93;
256
265
  }
257
266
  }
258
267
 
259
268
  &-spotlight {
260
- padding-left: var(--size-12);
261
- padding-right: var(--size-12);
262
-
263
- &-active {
264
- background-color: var(--color-background-neutral);
265
- &:not(.disabled, :disabled) {
266
- &:hover {
267
- background-color: var(--color-background-neutral-hover);
268
- }
269
- &:active {
270
- background-color: var(--color-background-neutral-active);
271
- }
272
- }
273
- }
274
-
275
- &-inactive {
276
- background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
269
+ padding-left: var(--size-12);
270
+ padding-right: var(--size-12);
277
271
 
278
- &:not(.disabled, :disabled) {
279
- &:hover {
280
- background-color: color-mix(in srgb, var(--color-background-neutral-hover) 35%, transparent);
281
- }
282
- &:active {
283
- background-color: color-mix(in srgb, var(--color-background-neutral-active) 45%, transparent);
284
- }
285
- }
272
+ &-active {
273
+ background-color: var(--color-background-neutral);
274
+ &:not(.disabled, :disabled) {
275
+ &:hover {
276
+ background-color: var(--color-background-neutral-hover);
277
+ }
278
+ &:active {
279
+ background-color: var(--color-background-neutral-active);
280
+ }
286
281
  }
282
+ }
287
283
 
284
+ &-inactive {
285
+ background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
288
286
 
287
+ &:not(.disabled, :disabled) {
288
+ &:hover {
289
+ background-color: color-mix(
290
+ in srgb,
291
+ var(--color-background-neutral-hover) 35%,
292
+ transparent
293
+ );
294
+ }
295
+ &:active {
296
+ background-color: color-mix(
297
+ in srgb,
298
+ var(--color-background-neutral-active) 45%,
299
+ transparent
300
+ );
301
+ }
302
+ }
303
+ }
289
304
  }
290
305
 
291
- .wds-list-item-spotlight__border{
306
+ .wds-list-item-spotlight__border {
292
307
  position: absolute;
293
- inset:0;
308
+ inset: 0;
294
309
  width: 100%;
295
310
  height: 100%;
296
311
 
297
312
  rect {
298
313
  --wds-list-item-spotlight-borderWidth: 1px;
299
- --wds-list-item-spotlight-borderWidthOffset: .5px; // half of the border width to center the border
300
- --wds-list-item-spotlight-strokeDashSize: calc(var(--size-12) * .5);
314
+ --wds-list-item-spotlight-borderWidthOffset: 0.5px; // half of the border width to center the border
315
+ --wds-list-item-spotlight-strokeDashSize: calc(var(--size-12) * 0.5);
301
316
 
302
317
  fill: none;
303
318
  stroke: var(--color-border-neutral);
@@ -307,8 +322,7 @@
307
322
  y: var(--wds-list-item-spotlight-borderWidthOffset);
308
323
  rx: calc(var(--radius-medium) - var(--wds-list-item-spotlight-borderWidthOffset));
309
324
  ry: calc(var(--radius-medium) - var(--wds-list-item-spotlight-borderWidthOffset));
310
- stroke-dasharray:
311
- var(--wds-list-item-spotlight-strokeDashSize)
325
+ stroke-dasharray: var(--wds-list-item-spotlight-strokeDashSize)
312
326
  var(--wds-list-item-spotlight-strokeDashSize);
313
327
  }
314
328
  }
@@ -142,7 +142,7 @@ export const ListItem = ({
142
142
 
143
143
  const isPartiallyInteractive = Boolean(
144
144
  (controlType === 'button' || controlType === 'icon-button') &&
145
- (controlProps as ListItemButtonProps | ListItemIconButtonProps)?.partiallyInteractive,
145
+ (controlProps as ListItemButtonProps | ListItemIconButtonProps)?.partiallyInteractive,
146
146
  );
147
147
  const isFullyInteractive = controlType !== 'non-interactive' && !isPartiallyInteractive;
148
148
  const isButtonAsLink =
@@ -162,7 +162,6 @@ export const ListItem = ({
162
162
  ? additionalInfoPrompt
163
163
  : `${titlesAndValues} ${additionalInfoPrompt}`;
164
164
  }, [isFullyInteractive]);
165
-
166
165
  const listItemContext = useMemo(
167
166
  () => ({
168
167
  setControlType,
@@ -426,7 +426,11 @@ export const AllControls: Story = {
426
426
  }
427
427
  title="Non-interactive"
428
428
  subtitle={lorem10}
429
- additionalInfo={INFO.nonInteractive}
429
+ additionalInfo={
430
+ <ListItem.AdditionalInfo>
431
+ Which has <b>bold,</b> <strong>strong,</strong> <em>emphasis</em>
432
+ </ListItem.AdditionalInfo>
433
+ }
430
434
  />
431
435
  </List>
432
436
  ),
package/src/main.css CHANGED
@@ -3585,7 +3585,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3585
3585
  margin-bottom: 0;
3586
3586
  }
3587
3587
  .wds-list-item-view.fullyInteractive:before {
3588
- content: '';
3588
+ content: "";
3589
3589
  position: absolute;
3590
3590
  inset: 0;
3591
3591
  }
@@ -3616,7 +3616,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3616
3616
  z-index: 1;
3617
3617
  }
3618
3618
  .wds-list-item-interactive a.wds-list-item-control.wds-list-item-control_pseudo-element:before {
3619
- content: '';
3619
+ content: "";
3620
3620
  position: absolute;
3621
3621
  inset: 0;
3622
3622
  }
@@ -3634,7 +3634,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3634
3634
  .wds-list-item-interactive:not(.wds-list-item-spotlight):has(input[type="checkbox"]:focus-visible):before {
3635
3635
  outline: var(--ring-outline-color) solid var(--ring-outline-width);
3636
3636
  outline-offset: var(--ring-outline-offset);
3637
- content: '';
3637
+ content: "";
3638
3638
  position: absolute;
3639
3639
  inset: 0 -8px;
3640
3640
  border-radius: 16px;
@@ -3643,7 +3643,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3643
3643
  }
3644
3644
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):hover:before,
3645
3645
  .wds-list-item-interactive:not(.wds-list-item-spotlight):not(.disabled):not(:disabled):active:before {
3646
- content: '';
3646
+ content: "";
3647
3647
  position: absolute;
3648
3648
  inset: 0 -8px;
3649
3649
  border-radius: 16px;
@@ -3755,7 +3755,9 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3755
3755
  .wds-list-item.disabled .wds-list-item-title-value,
3756
3756
  .wds-list-item.disabled .wds-list-item-subtitle,
3757
3757
  .wds-list-item.disabled .wds-list-item-subtitle-value,
3758
- .wds-list-item.disabled .wds-list-item-additional-info {
3758
+ .wds-list-item.disabled .wds-list-item-additional-info,
3759
+ .wds-list-item.disabled .wds-list-item-additional-info strong,
3760
+ .wds-list-item.disabled .wds-list-item-additional-info b {
3759
3761
  color: #768e9c;
3760
3762
  color: var(--color-content-tertiary);
3761
3763
  }
@@ -67,6 +67,7 @@ const Modal = ({
67
67
  return !isMedium ? (
68
68
  <Drawer
69
69
  open={open}
70
+ className={className}
70
71
  headerTitle={title}
71
72
  footerContent={footer}
72
73
  position={Position.BOTTOM}