@transferwise/components 46.49.0 → 46.50.1
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/build/avatar/Avatar.js +3 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +3 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +16 -4
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +16 -4
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +2 -0
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +2 -0
- package/build/badge/Badge.mjs.map +1 -1
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +3 -0
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs +4 -1
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/panel/Panel.js +3 -0
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +4 -1
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +21 -17
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +21 -17
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +6 -0
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +6 -0
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
- package/build/drawer/Drawer.js +3 -0
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +4 -1
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/i18n/de.json +2 -0
- package/build/i18n/de.json.js +2 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +2 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/es.json +2 -0
- package/build/i18n/es.json.js +2 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +2 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +2 -0
- package/build/i18n/fr.json.js +2 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +2 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +2 -0
- package/build/i18n/hu.json.js +2 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +2 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +2 -0
- package/build/i18n/id.json.js +2 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +2 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +2 -0
- package/build/i18n/it.json.js +2 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +2 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +2 -0
- package/build/i18n/ja.json.js +2 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +2 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pl.json.js +2 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +2 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ro.json.js +2 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +2 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +2 -0
- package/build/i18n/ru.json.js +2 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +2 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/th.json +2 -0
- package/build/i18n/th.json.js +2 -0
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +2 -0
- package/build/i18n/th.json.mjs.map +1 -1
- package/build/i18n/tr.json +2 -0
- package/build/i18n/tr.json.js +2 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +2 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/main.css +28 -20
- package/build/modal/Modal.js +3 -0
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +4 -1
- package/build/modal/Modal.mjs.map +1 -1
- package/build/provider/overlay/OverlayIdProvider.js +20 -0
- package/build/provider/overlay/OverlayIdProvider.js.map +1 -0
- package/build/provider/overlay/OverlayIdProvider.mjs +17 -0
- package/build/provider/overlay/OverlayIdProvider.mjs.map +1 -0
- package/build/stepper/Stepper.js +5 -2
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +5 -2
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/styles/main.css +28 -20
- package/build/styles/uploadInput/uploadButton/UploadButton.css +5 -0
- package/build/styles/uploadInput/uploadItem/UploadItem.css +23 -20
- package/build/types/avatar/Avatar.d.ts +1 -0
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +2 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +2 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/card/Card.d.ts +4 -0
- package/build/types/card/Card.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts.map +1 -1
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/provider/overlay/OverlayIdProvider.d.ts +7 -0
- package/build/types/provider/overlay/OverlayIdProvider.d.ts.map +1 -0
- package/build/types/stepper/Stepper.d.ts +4 -0
- package/build/types/stepper/Stepper.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/{UploadItemBody.d.ts → UploadItemLink.d.ts} +2 -2
- package/build/types/uploadInput/uploadItem/UploadItemLink.d.ts.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.js +14 -11
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +15 -12
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js +32 -0
- package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -0
- package/build/uploadInput/uploadItem/{UploadItemBody.mjs → UploadItemLink.mjs} +5 -4
- package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -0
- package/package.json +19 -19
- package/src/avatar/Avatar.spec.tsx +10 -0
- package/src/avatar/Avatar.tsx +3 -0
- package/src/avatarWrapper/AvatarWrapper.spec.tsx +15 -4
- package/src/avatarWrapper/AvatarWrapper.story.tsx +2 -0
- package/src/avatarWrapper/AvatarWrapper.tsx +26 -7
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +0 -64
- package/src/badge/Badge.spec.tsx +8 -0
- package/src/badge/Badge.tsx +3 -1
- package/src/card/Card.tsx +4 -0
- package/src/common/bottomSheet/BottomSheet.tsx +12 -1
- package/src/common/panel/Panel.tsx +5 -0
- package/src/dateLookup/DateLookup.tsx +22 -19
- package/src/dateLookup/dateTrigger/DateTrigger.spec.js +1 -0
- package/src/dateLookup/dateTrigger/DateTrigger.tsx +7 -0
- package/src/drawer/Drawer.tsx +5 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -4
- package/src/i18n/de.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hu.json +2 -0
- package/src/i18n/id.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/pl.json +2 -0
- package/src/i18n/ro.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/th.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/main.css +28 -20
- package/src/modal/Modal.tsx +5 -1
- package/src/provider/overlay/OverlayIdProvider.tsx +15 -0
- package/src/stepper/Stepper.less +2 -2
- package/src/stepper/Stepper.story.tsx +49 -0
- package/src/stepper/Stepper.tsx +7 -3
- package/src/uploadInput/uploadButton/UploadButton.css +5 -0
- package/src/uploadInput/uploadButton/UploadButton.less +6 -0
- package/src/uploadInput/uploadItem/UploadItem.css +23 -20
- package/src/uploadInput/uploadItem/UploadItem.less +16 -12
- package/src/uploadInput/uploadItem/UploadItem.tsx +12 -7
- package/src/uploadInput/uploadItem/{UploadItemBody.tsx → UploadItemLink.tsx} +6 -2
- package/build/types/uploadInput/uploadItem/UploadItemBody.d.ts.map +0 -1
- package/build/uploadInput/uploadItem/UploadItemBody.js +0 -27
- package/build/uploadInput/uploadItem/UploadItemBody.js.map +0 -1
- package/build/uploadInput/uploadItem/UploadItemBody.mjs.map +0 -1
- package/src/stepper/Stepper.story.js +0 -40
|
@@ -6,6 +6,8 @@ import { Size, Position, SizeSmall, SizeMedium, SizeLarge } from '../../common';
|
|
|
6
6
|
import { CloseButton } from '../../common/closeButton/CloseButton';
|
|
7
7
|
|
|
8
8
|
import messages from './DateTrigger.messages';
|
|
9
|
+
import { useContext } from 'react';
|
|
10
|
+
import { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';
|
|
9
11
|
|
|
10
12
|
interface DateTriggerProps {
|
|
11
13
|
selectedDate: Date | null;
|
|
@@ -30,9 +32,14 @@ const DateTrigger: React.FC<DateTriggerProps> = ({
|
|
|
30
32
|
}) => {
|
|
31
33
|
const { locale, formatMessage } = useIntl();
|
|
32
34
|
|
|
35
|
+
const overlayId = useContext(OverlayIdContext);
|
|
36
|
+
|
|
33
37
|
return (
|
|
34
38
|
<>
|
|
35
39
|
<button
|
|
40
|
+
aria-haspopup="dialog"
|
|
41
|
+
aria-expanded={overlayId != null}
|
|
42
|
+
aria-controls={overlayId}
|
|
36
43
|
className={`btn btn-${size} btn-input np-date-trigger`}
|
|
37
44
|
disabled={disabled}
|
|
38
45
|
type="button"
|
package/src/drawer/Drawer.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { useId } from 'react';
|
|
2
|
+
import { useContext, useId } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Position, Typography } from '../common';
|
|
5
5
|
import { CloseButton } from '../common/closeButton';
|
|
6
6
|
import { useLayout } from '../common/hooks';
|
|
7
7
|
import Dimmer from '../dimmer';
|
|
8
|
+
import { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';
|
|
8
9
|
import SlidingPanel from '../slidingPanel';
|
|
9
10
|
import Title from '../title';
|
|
10
11
|
import { logActionRequiredIf } from '../utilities';
|
|
@@ -42,10 +43,13 @@ export default function Drawer({
|
|
|
42
43
|
const { isMobile } = useLayout();
|
|
43
44
|
const titleId = useId();
|
|
44
45
|
|
|
46
|
+
const overlayId = useContext(OverlayIdContext);
|
|
47
|
+
|
|
45
48
|
return (
|
|
46
49
|
<Dimmer open={open} onClose={onClose}>
|
|
47
50
|
<SlidingPanel open={open} position={isMobile ? Position.BOTTOM : position}>
|
|
48
51
|
<div
|
|
52
|
+
id={overlayId}
|
|
49
53
|
role="dialog"
|
|
50
54
|
aria-modal
|
|
51
55
|
aria-labelledby={headerTitle ? titleId : undefined}
|
|
@@ -71,7 +71,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
71
71
|
style="width: 50%;"
|
|
72
72
|
/>
|
|
73
73
|
</div>
|
|
74
|
-
<
|
|
74
|
+
<ol
|
|
75
75
|
class="tw-stepper-steps p-t-1 m-b-0"
|
|
76
76
|
>
|
|
77
77
|
<li
|
|
@@ -107,7 +107,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
107
107
|
label-2
|
|
108
108
|
</span>
|
|
109
109
|
</li>
|
|
110
|
-
</
|
|
110
|
+
</ol>
|
|
111
111
|
</div>
|
|
112
112
|
</div>
|
|
113
113
|
</div>
|
|
@@ -187,7 +187,7 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
187
187
|
style="width: 0%;"
|
|
188
188
|
/>
|
|
189
189
|
</div>
|
|
190
|
-
<
|
|
190
|
+
<ol
|
|
191
191
|
class="tw-stepper-steps p-t-1 m-b-0"
|
|
192
192
|
>
|
|
193
193
|
<li
|
|
@@ -223,7 +223,7 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
223
223
|
label-2
|
|
224
224
|
</span>
|
|
225
225
|
</li>
|
|
226
|
-
</
|
|
226
|
+
</ol>
|
|
227
227
|
</div>
|
|
228
228
|
</div>
|
|
229
229
|
</div>
|
package/src/i18n/de.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wähle eine Option...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Wird gesucht...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Keine Ergebnisse gefunden",
|
|
26
|
+
"neptune.SelectOption.action.label": "Auswählen",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Ausgewählte Option ändern",
|
|
26
28
|
"neptune.Summary.statusDone": "Schritt erledigt",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Schritt noch zu erledigen",
|
|
28
30
|
"neptune.Summary.statusPending": "Schritt ausstehend",
|
package/src/i18n/es.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selecciona una opción...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "No se han encontrado resultados",
|
|
26
|
+
"neptune.SelectOption.action.label": "Elegir",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Cambiar opción elegida",
|
|
26
28
|
"neptune.Summary.statusDone": "Apartado listo",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Apartado a completar",
|
|
28
30
|
"neptune.Summary.statusPending": "Apartado pendiente",
|
package/src/i18n/fr.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Sélectionnez une option…",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Recherche...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Aucun résultat trouvé",
|
|
26
|
+
"neptune.SelectOption.action.label": "Sélectionner",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Modifier l'option choisie",
|
|
26
28
|
"neptune.Summary.statusDone": "Validé",
|
|
27
29
|
"neptune.Summary.statusNotDone": "À compléter",
|
|
28
30
|
"neptune.Summary.statusPending": "En attente",
|
package/src/i18n/hu.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Válassz ki egy lehetőséget...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Keresés...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Nincs találat",
|
|
26
|
+
"neptune.SelectOption.action.label": "Kiválasztás",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Kiválasztott opció módosítása",
|
|
26
28
|
"neptune.Summary.statusDone": "Kész",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Hátravan",
|
|
28
30
|
"neptune.Summary.statusPending": "Függőben",
|
package/src/i18n/id.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Pilih opsi...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Cari...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Hasil tidak ditemukan",
|
|
26
|
+
"neptune.SelectOption.action.label": "Pilih",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Ubah opsi yang dipilih",
|
|
26
28
|
"neptune.Summary.statusDone": "Item selesai",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Item yang harus dilakukan",
|
|
28
30
|
"neptune.Summary.statusPending": "Item tertunda",
|
package/src/i18n/it.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Seleziona un'opzione...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Cerca...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Nessun risultato trovato",
|
|
26
|
+
"neptune.SelectOption.action.label": "Scegli",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Modifica l'opzione scelta",
|
|
26
28
|
"neptune.Summary.statusDone": "Completato",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Da completare",
|
|
28
30
|
"neptune.Summary.statusPending": "In corso",
|
package/src/i18n/ja.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選択してください…",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "検索する... ",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "結果が見つかりませんでした",
|
|
26
|
+
"neptune.SelectOption.action.label": "選択してください",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "選択したオプションを変更する",
|
|
26
28
|
"neptune.Summary.statusDone": "完了",
|
|
27
29
|
"neptune.Summary.statusNotDone": "未完了",
|
|
28
30
|
"neptune.Summary.statusPending": "保留中",
|
package/src/i18n/pl.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Wybierz opcję...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Wyszukaj...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Nie znaleziono wyników",
|
|
26
|
+
"neptune.SelectOption.action.label": "Wybierz",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Zmień wybraną opcję",
|
|
26
28
|
"neptune.Summary.statusDone": "Czynność wykonana",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Czynność do wykonania",
|
|
28
30
|
"neptune.Summary.statusPending": "Czynność oczekująca",
|
package/src/i18n/ro.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selectează o opțiune...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Caută...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Nu s-a găsit niciun rezultat",
|
|
26
|
+
"neptune.SelectOption.action.label": "Alege",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Schimbă opțiunea aleasă",
|
|
26
28
|
"neptune.Summary.statusDone": "Finalizat",
|
|
27
29
|
"neptune.Summary.statusNotDone": "De făcut",
|
|
28
30
|
"neptune.Summary.statusPending": "În așteptare",
|
package/src/i18n/ru.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
26
|
+
"neptune.SelectOption.action.label": "Выбрать",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Изменить выбранный вариант",
|
|
26
28
|
"neptune.Summary.statusDone": "Этап завершен",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Этап к выполнению",
|
|
28
30
|
"neptune.Summary.statusPending": "Этап в процессе",
|
package/src/i18n/th.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "เลือกตัวเลือก...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "ค้นหา...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "ไม่พบผลลัพธ์",
|
|
26
|
+
"neptune.SelectOption.action.label": "เลือก",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "เปลี่ยนตัวเลือกที่เลือกไว้",
|
|
26
28
|
"neptune.Summary.statusDone": "รายการที่ทำแล้ว",
|
|
27
29
|
"neptune.Summary.statusNotDone": "รายการที่ต้องทำ",
|
|
28
30
|
"neptune.Summary.statusPending": "รายการที่รอดำเนินการ",
|
package/src/i18n/tr.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Bir seçenek seçin...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Ara...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "Sonuç bulunamadı",
|
|
26
|
+
"neptune.SelectOption.action.label": "Seç",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Seçilen opsiyonu değiştir",
|
|
26
28
|
"neptune.Summary.statusDone": "Tamamlanan aşama",
|
|
27
29
|
"neptune.Summary.statusNotDone": "Yapılacak",
|
|
28
30
|
"neptune.Summary.statusPending": "Bekliyor",
|
package/src/main.css
CHANGED
|
@@ -5472,6 +5472,11 @@ label.np-upload-button:not(.disabled):active {
|
|
|
5472
5472
|
.np-upload-button .media {
|
|
5473
5473
|
align-items: flex-start;
|
|
5474
5474
|
}
|
|
5475
|
+
@media (max-width: 320px) {
|
|
5476
|
+
.np-upload-icon {
|
|
5477
|
+
padding-left: 0;
|
|
5478
|
+
}
|
|
5479
|
+
}
|
|
5475
5480
|
.np-upload-input.form-control {
|
|
5476
5481
|
height: auto;
|
|
5477
5482
|
padding: 0;
|
|
@@ -5563,9 +5568,9 @@ label.np-upload-button:not(.disabled):active {
|
|
|
5563
5568
|
border: 1px solid var(--color-interactive-secondary);
|
|
5564
5569
|
position: relative;
|
|
5565
5570
|
}
|
|
5566
|
-
.np-upload-item:first-child ~ div:not(.np-upload-
|
|
5567
|
-
.np-upload-item:not(:first-child).np-upload-
|
|
5568
|
-
.np-upload-item.np-upload-
|
|
5571
|
+
.np-upload-item:first-child ~ div:not(.np-upload-item--link):before,
|
|
5572
|
+
.np-upload-item:not(:first-child).np-upload-item--link .np-upload-item__link:before,
|
|
5573
|
+
.np-upload-item.np-upload-item--link:hover .np-upload-item__link:after {
|
|
5569
5574
|
display: block;
|
|
5570
5575
|
position: absolute;
|
|
5571
5576
|
height: 1px;
|
|
@@ -5577,27 +5582,27 @@ label.np-upload-button:not(.disabled):active {
|
|
|
5577
5582
|
width: calc(100% - 2 * 16px);
|
|
5578
5583
|
width: calc(100% - 2 * var(--size-16));
|
|
5579
5584
|
}
|
|
5580
|
-
.np-upload-item:first-child ~ div:not(.np-upload-
|
|
5581
|
-
.np-upload-item:not(:first-child).np-upload-
|
|
5585
|
+
.np-upload-item:first-child ~ div:not(.np-upload-item--link):before,
|
|
5586
|
+
.np-upload-item:not(:first-child).np-upload-item--link .np-upload-item__link:before {
|
|
5582
5587
|
top: 0;
|
|
5583
5588
|
}
|
|
5584
|
-
.np-upload-item.np-upload-
|
|
5589
|
+
.np-upload-item.np-upload-item--link:hover .np-upload-item__link:after {
|
|
5585
5590
|
bottom: -1px;
|
|
5586
5591
|
}
|
|
5587
5592
|
.np-upload-item:first-child ~ div {
|
|
5588
5593
|
border-top: 1px;
|
|
5589
5594
|
}
|
|
5590
|
-
.np-upload-item:not(:first-child) .np-upload-
|
|
5595
|
+
.np-upload-item:not(:first-child) .np-upload-item__link:hover {
|
|
5591
5596
|
border-top-color: rgba(0,0,0,0.10196);
|
|
5592
5597
|
border-top-color: var(--color-border-neutral);
|
|
5593
5598
|
}
|
|
5594
5599
|
.np-upload-item:not(:last-child) {
|
|
5595
5600
|
border-bottom: 0;
|
|
5596
5601
|
}
|
|
5597
|
-
.np-upload-item.np-upload-
|
|
5598
|
-
.np-upload-item.np-upload-
|
|
5599
|
-
.np-upload-item.np-upload-
|
|
5600
|
-
.np-upload-item.np-upload-
|
|
5602
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-item:before,
|
|
5603
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-button-container:before,
|
|
5604
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-item .np-upload-item__link:before,
|
|
5605
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-button-container .np-upload-item__link:before {
|
|
5601
5606
|
display: none;
|
|
5602
5607
|
}
|
|
5603
5608
|
.np-upload-button-container:hover:before,
|
|
@@ -5612,38 +5617,41 @@ label.np-upload-button:not(.disabled):active {
|
|
|
5612
5617
|
outline-offset: -3px;
|
|
5613
5618
|
}
|
|
5614
5619
|
.np-upload-item--single-file:focus-visible,
|
|
5615
|
-
.np-upload-
|
|
5620
|
+
.np-upload-item__link:focus-visible,
|
|
5616
5621
|
.np-upload-button-container:has(:focus-visible) {
|
|
5617
5622
|
outline-width: 3px;
|
|
5618
5623
|
}
|
|
5619
|
-
.np-upload-
|
|
5624
|
+
.np-upload-item--link a {
|
|
5620
5625
|
flex: 1;
|
|
5621
5626
|
-webkit-text-decoration: none;
|
|
5622
5627
|
text-decoration: none;
|
|
5623
5628
|
border-top: 1px solid transparent;
|
|
5624
5629
|
border-radius: inherit;
|
|
5625
5630
|
}
|
|
5626
|
-
.np-upload-
|
|
5631
|
+
.np-upload-item--link a:focus-visible {
|
|
5627
5632
|
outline-offset: -2px;
|
|
5628
5633
|
}
|
|
5629
|
-
.np-upload-
|
|
5634
|
+
.np-upload-item--link a:hover:before {
|
|
5630
5635
|
display: none !important;
|
|
5631
5636
|
}
|
|
5632
|
-
.np-upload-
|
|
5637
|
+
.np-upload-item--link a:hover:after {
|
|
5633
5638
|
left: 0 !important;
|
|
5634
5639
|
width: 100% !important;
|
|
5635
5640
|
}
|
|
5636
|
-
.np-upload-
|
|
5637
|
-
.np-upload-
|
|
5641
|
+
.np-upload-item--link a:hover,
|
|
5642
|
+
.np-upload-item--link a:active {
|
|
5638
5643
|
-webkit-text-decoration: none;
|
|
5639
5644
|
text-decoration: none;
|
|
5640
5645
|
}
|
|
5641
|
-
.np-upload-
|
|
5642
|
-
.np-upload-
|
|
5646
|
+
.np-upload-item--link a:hover .np-upload-button,
|
|
5647
|
+
.np-upload-item--link a:active .np-upload-button {
|
|
5643
5648
|
background-color: rgba(134,167,189,0.10196);
|
|
5644
5649
|
background-color: var(--color-background-neutral);
|
|
5645
5650
|
border-radius: inherit;
|
|
5646
5651
|
}
|
|
5652
|
+
.np-upload-item--link:first-of-type a {
|
|
5653
|
+
border-top: 0;
|
|
5654
|
+
}
|
|
5647
5655
|
.np-upload-item__body {
|
|
5648
5656
|
display: flex;
|
|
5649
5657
|
align-items: center;
|
package/src/modal/Modal.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { ReactNode, useId, useRef } from 'react';
|
|
2
|
+
import { ReactNode, useContext, useId, useRef } from 'react';
|
|
3
3
|
import { CSSTransition } from 'react-transition-group';
|
|
4
4
|
|
|
5
5
|
import {
|
|
@@ -21,6 +21,7 @@ import { CloseButton } from '../common/closeButton';
|
|
|
21
21
|
import { useLayout } from '../common/hooks';
|
|
22
22
|
import Dimmer from '../dimmer';
|
|
23
23
|
import Drawer from '../drawer';
|
|
24
|
+
import { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';
|
|
24
25
|
import Title from '../title/Title';
|
|
25
26
|
|
|
26
27
|
const TRANSITION_DURATION_IN_MILLISECONDS = 150;
|
|
@@ -61,6 +62,8 @@ const Modal = ({
|
|
|
61
62
|
const contentReference = useRef<HTMLDivElement>(null);
|
|
62
63
|
const titleId = useId();
|
|
63
64
|
|
|
65
|
+
const overlayId = useContext(OverlayIdContext);
|
|
66
|
+
|
|
64
67
|
return !isMedium ? (
|
|
65
68
|
<Drawer
|
|
66
69
|
open={open}
|
|
@@ -100,6 +103,7 @@ const Modal = ({
|
|
|
100
103
|
{...otherProps}
|
|
101
104
|
>
|
|
102
105
|
<div
|
|
106
|
+
id={overlayId}
|
|
103
107
|
role="dialog"
|
|
104
108
|
aria-modal
|
|
105
109
|
aria-labelledby={titleId}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useId } from 'react';
|
|
2
|
+
|
|
3
|
+
export const OverlayIdContext = createContext<string | undefined>(undefined);
|
|
4
|
+
|
|
5
|
+
export type OverlayIdProviderProps = {
|
|
6
|
+
open: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const OverlayIdProvider = ({ open, children }: OverlayIdProviderProps) => {
|
|
11
|
+
const id = useId();
|
|
12
|
+
return (
|
|
13
|
+
<OverlayIdContext.Provider value={open ? id : undefined}>{children}</OverlayIdContext.Provider>
|
|
14
|
+
);
|
|
15
|
+
};
|
package/src/stepper/Stepper.less
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
.progress-bar {
|
|
81
81
|
.float(left);
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
-webkit-backface-visibility: hidden;
|
|
84
84
|
height: 100%;
|
|
85
85
|
background-color: var(--color-interactive-primary);
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
border-bottom-left-radius: 1px;
|
|
88
88
|
transition: width 0.6s ease-in-out;
|
|
89
89
|
will-change: width;
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
&::after {
|
|
92
92
|
.float(right);
|
|
93
93
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { fn } from '@storybook/test';
|
|
3
|
+
import Stepper from './Stepper';
|
|
4
|
+
|
|
5
|
+
const STEPS = [
|
|
6
|
+
{
|
|
7
|
+
label: 'One',
|
|
8
|
+
onClick: fn(),
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: 'Two',
|
|
12
|
+
hoverLabel: (
|
|
13
|
+
<>
|
|
14
|
+
<div>
|
|
15
|
+
<strong>Diana Jaramillo</strong>
|
|
16
|
+
</div>
|
|
17
|
+
dianajarm123@gmail.com
|
|
18
|
+
</>
|
|
19
|
+
),
|
|
20
|
+
onClick: fn(),
|
|
21
|
+
},
|
|
22
|
+
{ label: 'Recipient', onClick: fn() },
|
|
23
|
+
{ label: 'Smellification', onClick: fn() },
|
|
24
|
+
{ label: 'Battle', onClick: fn() },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
component: Stepper,
|
|
29
|
+
title: 'Navigation/Stepper',
|
|
30
|
+
argTypes: {
|
|
31
|
+
activeStep: {
|
|
32
|
+
control: 'radio',
|
|
33
|
+
options: [...Array(STEPS.length).keys()],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
tags: ['autodocs'],
|
|
37
|
+
} satisfies Meta<typeof Stepper>;
|
|
38
|
+
|
|
39
|
+
type Story = StoryObj<typeof Stepper>;
|
|
40
|
+
|
|
41
|
+
export const Basic: Story = {
|
|
42
|
+
render: ({ activeStep, steps }) => {
|
|
43
|
+
return <Stepper activeStep={activeStep} steps={steps} />;
|
|
44
|
+
},
|
|
45
|
+
args: {
|
|
46
|
+
activeStep: 2,
|
|
47
|
+
steps: STEPS,
|
|
48
|
+
},
|
|
49
|
+
};
|
package/src/stepper/Stepper.tsx
CHANGED
|
@@ -23,7 +23,10 @@ export interface StepperProps {
|
|
|
23
23
|
className?: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* This component is considered user-unfriendly and inaccessible on its own and will likely be made internal in the future. Please use `FlowNavigation` instead.
|
|
28
|
+
* @see https://storybook.wise.design/?path=/story/navigation-flownavigation--variants
|
|
29
|
+
*/
|
|
27
30
|
const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
28
31
|
const { isRTL } = useDirection();
|
|
29
32
|
|
|
@@ -50,6 +53,7 @@ const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
|
50
53
|
) : (
|
|
51
54
|
<span className="tw-stepper__step-label">{step.label}</span>
|
|
52
55
|
);
|
|
56
|
+
|
|
53
57
|
return (
|
|
54
58
|
<li
|
|
55
59
|
key={index}
|
|
@@ -83,10 +87,10 @@ const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
|
83
87
|
<div className="progress">
|
|
84
88
|
<div className="progress-bar" style={{ width: `${percentageCompleted * 100}%` }} />
|
|
85
89
|
</div>
|
|
86
|
-
|
|
90
|
+
|
|
91
|
+
<ol className="tw-stepper-steps p-t-1 m-b-0">{steps.map(renderStep)}</ol>
|
|
87
92
|
</div>
|
|
88
93
|
);
|
|
89
94
|
};
|
|
90
|
-
/* eslint-enable react/no-array-index-key */
|
|
91
95
|
|
|
92
96
|
export default Stepper;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
border: 1px solid var(--color-interactive-secondary);
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
6
|
-
.np-upload-item:first-child ~ div:not(.np-upload-
|
|
7
|
-
.np-upload-item:not(:first-child).np-upload-
|
|
8
|
-
.np-upload-item.np-upload-
|
|
6
|
+
.np-upload-item:first-child ~ div:not(.np-upload-item--link):before,
|
|
7
|
+
.np-upload-item:not(:first-child).np-upload-item--link .np-upload-item__link:before,
|
|
8
|
+
.np-upload-item.np-upload-item--link:hover .np-upload-item__link:after {
|
|
9
9
|
display: block;
|
|
10
10
|
position: absolute;
|
|
11
11
|
height: 1px;
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
width: calc(100% - 2 * 16px);
|
|
18
18
|
width: calc(100% - 2 * var(--size-16));
|
|
19
19
|
}
|
|
20
|
-
.np-upload-item:first-child ~ div:not(.np-upload-
|
|
21
|
-
.np-upload-item:not(:first-child).np-upload-
|
|
20
|
+
.np-upload-item:first-child ~ div:not(.np-upload-item--link):before,
|
|
21
|
+
.np-upload-item:not(:first-child).np-upload-item--link .np-upload-item__link:before {
|
|
22
22
|
top: 0;
|
|
23
23
|
}
|
|
24
|
-
.np-upload-item.np-upload-
|
|
24
|
+
.np-upload-item.np-upload-item--link:hover .np-upload-item__link:after {
|
|
25
25
|
bottom: -1px;
|
|
26
26
|
}
|
|
27
27
|
.np-upload-item:first-child ~ div {
|
|
28
28
|
border-top: 1px;
|
|
29
29
|
}
|
|
30
|
-
.np-upload-item:not(:first-child) .np-upload-
|
|
30
|
+
.np-upload-item:not(:first-child) .np-upload-item__link:hover {
|
|
31
31
|
border-top-color: rgba(0,0,0,0.10196);
|
|
32
32
|
border-top-color: var(--color-border-neutral);
|
|
33
33
|
}
|
|
34
34
|
.np-upload-item:not(:last-child) {
|
|
35
35
|
border-bottom: 0;
|
|
36
36
|
}
|
|
37
|
-
.np-upload-item.np-upload-
|
|
38
|
-
.np-upload-item.np-upload-
|
|
39
|
-
.np-upload-item.np-upload-
|
|
40
|
-
.np-upload-item.np-upload-
|
|
37
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-item:before,
|
|
38
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-button-container:before,
|
|
39
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-item .np-upload-item__link:before,
|
|
40
|
+
.np-upload-item.np-upload-item--link:hover + .np-upload-button-container .np-upload-item__link:before {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
43
|
.np-upload-button-container:hover:before,
|
|
@@ -52,38 +52,41 @@
|
|
|
52
52
|
outline-offset: -3px;
|
|
53
53
|
}
|
|
54
54
|
.np-upload-item--single-file:focus-visible,
|
|
55
|
-
.np-upload-
|
|
55
|
+
.np-upload-item__link:focus-visible,
|
|
56
56
|
.np-upload-button-container:has(:focus-visible) {
|
|
57
57
|
outline-width: 3px;
|
|
58
58
|
}
|
|
59
|
-
.np-upload-
|
|
59
|
+
.np-upload-item--link a {
|
|
60
60
|
flex: 1;
|
|
61
61
|
-webkit-text-decoration: none;
|
|
62
62
|
text-decoration: none;
|
|
63
63
|
border-top: 1px solid transparent;
|
|
64
64
|
border-radius: inherit;
|
|
65
65
|
}
|
|
66
|
-
.np-upload-
|
|
66
|
+
.np-upload-item--link a:focus-visible {
|
|
67
67
|
outline-offset: -2px;
|
|
68
68
|
}
|
|
69
|
-
.np-upload-
|
|
69
|
+
.np-upload-item--link a:hover:before {
|
|
70
70
|
display: none !important;
|
|
71
71
|
}
|
|
72
|
-
.np-upload-
|
|
72
|
+
.np-upload-item--link a:hover:after {
|
|
73
73
|
left: 0 !important;
|
|
74
74
|
width: 100% !important;
|
|
75
75
|
}
|
|
76
|
-
.np-upload-
|
|
77
|
-
.np-upload-
|
|
76
|
+
.np-upload-item--link a:hover,
|
|
77
|
+
.np-upload-item--link a:active {
|
|
78
78
|
-webkit-text-decoration: none;
|
|
79
79
|
text-decoration: none;
|
|
80
80
|
}
|
|
81
|
-
.np-upload-
|
|
82
|
-
.np-upload-
|
|
81
|
+
.np-upload-item--link a:hover .np-upload-button,
|
|
82
|
+
.np-upload-item--link a:active .np-upload-button {
|
|
83
83
|
background-color: rgba(134,167,189,0.10196);
|
|
84
84
|
background-color: var(--color-background-neutral);
|
|
85
85
|
border-radius: inherit;
|
|
86
86
|
}
|
|
87
|
+
.np-upload-item--link:first-of-type a {
|
|
88
|
+
border-top: 0;
|
|
89
|
+
}
|
|
87
90
|
.np-upload-item__body {
|
|
88
91
|
display: flex;
|
|
89
92
|
align-items: center;
|