@transferwise/components 0.0.0-experimental-941345f → 0.0.0-experimental-f126d60
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/FlowNavigation/AnimatedLabel/AnimatedLabel.js +6 -2
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js.map +1 -1
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs +6 -2
- package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/i18n/cs.json +0 -1
- package/build/i18n/cs.json.js +0 -1
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +0 -1
- package/build/i18n/cs.json.mjs.map +1 -1
- package/build/i18n/pt.json +0 -1
- package/build/i18n/pt.json.js +0 -1
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +0 -1
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ru.json +0 -1
- package/build/i18n/ru.json.js +0 -1
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +0 -1
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/main.css +6 -0
- package/build/styles/FlowNavigation/AnimatedLabel/AnimatedLabel.css +6 -0
- package/build/styles/main.css +6 -0
- package/build/types/FlowNavigation/AnimatedLabel/AnimatedLabel.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.css +6 -0
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.less +7 -0
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.test.js +39 -13
- package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx +7 -2
- package/src/FlowNavigation/_stories/FlowNavigation.test.story.tsx +25 -0
- package/src/i18n/cs.json +0 -1
- package/src/i18n/pt.json +0 -1
- package/src/i18n/ru.json +0 -1
- package/src/main.css +6 -0
|
@@ -35,6 +35,7 @@ const AnimatedLabel = ({
|
|
|
35
35
|
"aria-haspopup": "menu",
|
|
36
36
|
"aria-controls": overlayId,
|
|
37
37
|
"aria-expanded": showSteps,
|
|
38
|
+
title: typeof steps[activeLabel]?.label === 'string' ? steps[activeLabel].label : undefined,
|
|
38
39
|
className: clsx.clsx('np-animated-label', 'btn-unstyled', 'np-text-body-large-bold', className),
|
|
39
40
|
onClick: () => setShowSteps(true),
|
|
40
41
|
children: steps.map(({
|
|
@@ -45,9 +46,12 @@ const AnimatedLabel = ({
|
|
|
45
46
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
46
47
|
"aria-hidden": !isCurrentStep,
|
|
47
48
|
className: clsx.clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {
|
|
48
|
-
'np-animated-label--active
|
|
49
|
+
'np-animated-label--active': isCurrentStep
|
|
49
50
|
}),
|
|
50
|
-
children: [
|
|
51
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
52
|
+
className: "np-animated-label__text",
|
|
53
|
+
children: label
|
|
54
|
+
}), " ", /*#__PURE__*/jsxRuntime.jsx(icons.ChevronDown, {})]
|
|
51
55
|
}, previousIndex);
|
|
52
56
|
})
|
|
53
57
|
}), /*#__PURE__*/jsxRuntime.jsx(BottomSheet.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedLabel.js","sources":["../../../src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useState } from 'react';\n\nimport type { Step } from '../../Stepper/Stepper';\nimport BottomSheet from '../../common/BottomSheet';\nimport Option from '../../common/Option';\nimport { Check, ChevronDown } from '@transferwise/icons';\nimport { OverlayIdContext, OverlayIdProvider } from '../../Provider/overlay/OverlayIdProvider';\nimport List from '../../List';\n\nexport interface AnimatedLabelProps {\n activeLabel: number;\n className?: string;\n steps: readonly Step[];\n}\n\nconst AnimatedLabel = ({ activeLabel, className, steps }: AnimatedLabelProps) => {\n const labelId = useId();\n const [showSteps, setShowSteps] = useState(false);\n\n function handleStepAction(onClick: Step['onClick']) {\n return () => {\n setShowSteps(false);\n onClick?.();\n };\n }\n\n return (\n <OverlayIdProvider open={showSteps}>\n <OverlayIdContext.Consumer>\n {(overlayId) => {\n return (\n <>\n <button\n type=\"button\"\n id={labelId}\n aria-haspopup=\"menu\"\n aria-controls={overlayId}\n aria-expanded={showSteps}\n className={clsx(\n 'np-animated-label',\n 'btn-unstyled',\n 'np-text-body-large-bold',\n className,\n )}\n onClick={() => setShowSteps(true)}\n >\n {steps.map(({ label }, index) => {\n const isCurrentStep = activeLabel === index;\n const previousIndex = index - 1;\n return (\n <div\n key={previousIndex}\n aria-hidden={!isCurrentStep}\n className={clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {\n 'np-animated-label--active
|
|
1
|
+
{"version":3,"file":"AnimatedLabel.js","sources":["../../../src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useState } from 'react';\n\nimport type { Step } from '../../Stepper/Stepper';\nimport BottomSheet from '../../common/BottomSheet';\nimport Option from '../../common/Option';\nimport { Check, ChevronDown } from '@transferwise/icons';\nimport { OverlayIdContext, OverlayIdProvider } from '../../Provider/overlay/OverlayIdProvider';\nimport List from '../../List';\n\nexport interface AnimatedLabelProps {\n activeLabel: number;\n className?: string;\n steps: readonly Step[];\n}\n\nconst AnimatedLabel = ({ activeLabel, className, steps }: AnimatedLabelProps) => {\n const labelId = useId();\n const [showSteps, setShowSteps] = useState(false);\n\n function handleStepAction(onClick: Step['onClick']) {\n return () => {\n setShowSteps(false);\n onClick?.();\n };\n }\n\n return (\n <OverlayIdProvider open={showSteps}>\n <OverlayIdContext.Consumer>\n {(overlayId) => {\n return (\n <>\n <button\n type=\"button\"\n id={labelId}\n aria-haspopup=\"menu\"\n aria-controls={overlayId}\n aria-expanded={showSteps}\n title={\n typeof steps[activeLabel]?.label === 'string'\n ? steps[activeLabel].label\n : undefined\n }\n className={clsx(\n 'np-animated-label',\n 'btn-unstyled',\n 'np-text-body-large-bold',\n className,\n )}\n onClick={() => setShowSteps(true)}\n >\n {steps.map(({ label }, index) => {\n const isCurrentStep = activeLabel === index;\n const previousIndex = index - 1;\n return (\n <div\n key={previousIndex}\n aria-hidden={!isCurrentStep}\n className={clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {\n 'np-animated-label--active': isCurrentStep,\n })}\n >\n <span className=\"np-animated-label__text\">{label}</span> <ChevronDown />\n </div>\n );\n })}\n </button>\n <BottomSheet\n role=\"menu\"\n aria-labelledby={labelId}\n open={showSteps}\n onClose={() => setShowSteps(false)}\n >\n <List className=\"m-b-0 p-a-1\">\n {steps.map((step, index) => {\n const isCurrentStep = activeLabel === index;\n const isDisabled = activeLabel < index;\n const itemId = `step-${index}`;\n return (\n <Option\n key={itemId}\n id={itemId}\n as=\"li\"\n role=\"menuitem\"\n decision={false}\n className={clsx('np-animated-label-option', 'p-x-3', 'p-y-1', 'm-y-1', {\n clickable: !isDisabled,\n })}\n title={step.label}\n content={step.hoverLabel}\n button={isCurrentStep ? <Check size={24} /> : null}\n aria-current={isCurrentStep ? 'step' : false}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n isContainerAligned\n {...(!isDisabled && {\n tabIndex: 0,\n onClick: handleStepAction(step.onClick),\n onKeyDown: (event) => {\n event.preventDefault();\n if (event.code === 'Enter' || event.code === 'Space') {\n handleStepAction(step.onClick)();\n }\n },\n })}\n />\n );\n })}\n </List>\n </BottomSheet>\n </>\n );\n }}\n </OverlayIdContext.Consumer>\n </OverlayIdProvider>\n );\n};\n\nexport default AnimatedLabel;\n"],"names":["AnimatedLabel","activeLabel","className","steps","labelId","useId","showSteps","setShowSteps","useState","handleStepAction","onClick","_jsx","OverlayIdProvider","open","children","OverlayIdContext","Consumer","overlayId","_jsxs","_Fragment","type","id","title","label","undefined","clsx","map","index","isCurrentStep","previousIndex","ChevronDown","BottomSheet","role","onClose","List","step","isDisabled","itemId","Option","as","decision","clickable","content","hoverLabel","button","Check","size","disabled","isContainerAligned","tabIndex","onKeyDown","event","preventDefault","code"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,aAAa,GAAGA,CAAC;EAAEC,WAAW;EAAEC,SAAS;AAAEC,EAAAA;AAAK,CAAsB,KAAI;AAC9E,EAAA,MAAMC,OAAO,GAAGC,WAAK,EAAE;EACvB,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC;EAEjD,SAASC,gBAAgBA,CAACC,OAAwB,EAAA;AAChD,IAAA,OAAO,MAAK;MACVH,YAAY,CAAC,KAAK,CAAC;AACnBG,MAAAA,OAAO,IAAI;IACb,CAAC;AACH,EAAA;EAEA,oBACEC,cAAA,CAACC,mCAAiB,EAAA;AAACC,IAAAA,IAAI,EAAEP,SAAU;AAAAQ,IAAAA,QAAA,eACjCH,cAAA,CAACI,kCAAgB,CAACC,QAAQ,EAAA;MAAAF,QAAA,EACtBG,SAAS,IAAI;QACb,oBACEC,eAAA,CAAAC,mBAAA,EAAA;AAAAL,UAAAA,QAAA,gBACEH,cAAA,CAAA,QAAA,EAAA;AACES,YAAAA,IAAI,EAAC,QAAQ;AACbC,YAAAA,EAAE,EAAEjB,OAAQ;AACZ,YAAA,eAAA,EAAc,MAAM;AACpB,YAAA,eAAA,EAAea,SAAU;AACzB,YAAA,eAAA,EAAeX,SAAU;AACzBgB,YAAAA,KAAK,EACH,OAAOnB,KAAK,CAACF,WAAW,CAAC,EAAEsB,KAAK,KAAK,QAAQ,GACzCpB,KAAK,CAACF,WAAW,CAAC,CAACsB,KAAK,GACxBC,SACL;YACDtB,SAAS,EAAEuB,SAAI,CACb,mBAAmB,EACnB,cAAc,EACd,yBAAyB,EACzBvB,SAAS,CACT;AACFQ,YAAAA,OAAO,EAAEA,MAAMH,YAAY,CAAC,IAAI,CAAE;AAAAO,YAAAA,QAAA,EAEjCX,KAAK,CAACuB,GAAG,CAAC,CAAC;AAA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|
+
title: typeof steps[activeLabel]?.label === 'string' ? steps[activeLabel].label : undefined,
|
|
34
35
|
className: clsx('np-animated-label', 'btn-unstyled', 'np-text-body-large-bold', className),
|
|
35
36
|
onClick: () => setShowSteps(true),
|
|
36
37
|
children: steps.map(({
|
|
@@ -41,9 +42,12 @@ const AnimatedLabel = ({
|
|
|
41
42
|
return /*#__PURE__*/jsxs("div", {
|
|
42
43
|
"aria-hidden": !isCurrentStep,
|
|
43
44
|
className: clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {
|
|
44
|
-
'np-animated-label--active
|
|
45
|
+
'np-animated-label--active': isCurrentStep
|
|
45
46
|
}),
|
|
46
|
-
children: [
|
|
47
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
48
|
+
className: "np-animated-label__text",
|
|
49
|
+
children: label
|
|
50
|
+
}), " ", /*#__PURE__*/jsx(ChevronDown, {})]
|
|
47
51
|
}, previousIndex);
|
|
48
52
|
})
|
|
49
53
|
}), /*#__PURE__*/jsx(BottomSheet, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedLabel.mjs","sources":["../../../src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useState } from 'react';\n\nimport type { Step } from '../../Stepper/Stepper';\nimport BottomSheet from '../../common/BottomSheet';\nimport Option from '../../common/Option';\nimport { Check, ChevronDown } from '@transferwise/icons';\nimport { OverlayIdContext, OverlayIdProvider } from '../../Provider/overlay/OverlayIdProvider';\nimport List from '../../List';\n\nexport interface AnimatedLabelProps {\n activeLabel: number;\n className?: string;\n steps: readonly Step[];\n}\n\nconst AnimatedLabel = ({ activeLabel, className, steps }: AnimatedLabelProps) => {\n const labelId = useId();\n const [showSteps, setShowSteps] = useState(false);\n\n function handleStepAction(onClick: Step['onClick']) {\n return () => {\n setShowSteps(false);\n onClick?.();\n };\n }\n\n return (\n <OverlayIdProvider open={showSteps}>\n <OverlayIdContext.Consumer>\n {(overlayId) => {\n return (\n <>\n <button\n type=\"button\"\n id={labelId}\n aria-haspopup=\"menu\"\n aria-controls={overlayId}\n aria-expanded={showSteps}\n className={clsx(\n 'np-animated-label',\n 'btn-unstyled',\n 'np-text-body-large-bold',\n className,\n )}\n onClick={() => setShowSteps(true)}\n >\n {steps.map(({ label }, index) => {\n const isCurrentStep = activeLabel === index;\n const previousIndex = index - 1;\n return (\n <div\n key={previousIndex}\n aria-hidden={!isCurrentStep}\n className={clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {\n 'np-animated-label--active
|
|
1
|
+
{"version":3,"file":"AnimatedLabel.mjs","sources":["../../../src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useId, useState } from 'react';\n\nimport type { Step } from '../../Stepper/Stepper';\nimport BottomSheet from '../../common/BottomSheet';\nimport Option from '../../common/Option';\nimport { Check, ChevronDown } from '@transferwise/icons';\nimport { OverlayIdContext, OverlayIdProvider } from '../../Provider/overlay/OverlayIdProvider';\nimport List from '../../List';\n\nexport interface AnimatedLabelProps {\n activeLabel: number;\n className?: string;\n steps: readonly Step[];\n}\n\nconst AnimatedLabel = ({ activeLabel, className, steps }: AnimatedLabelProps) => {\n const labelId = useId();\n const [showSteps, setShowSteps] = useState(false);\n\n function handleStepAction(onClick: Step['onClick']) {\n return () => {\n setShowSteps(false);\n onClick?.();\n };\n }\n\n return (\n <OverlayIdProvider open={showSteps}>\n <OverlayIdContext.Consumer>\n {(overlayId) => {\n return (\n <>\n <button\n type=\"button\"\n id={labelId}\n aria-haspopup=\"menu\"\n aria-controls={overlayId}\n aria-expanded={showSteps}\n title={\n typeof steps[activeLabel]?.label === 'string'\n ? steps[activeLabel].label\n : undefined\n }\n className={clsx(\n 'np-animated-label',\n 'btn-unstyled',\n 'np-text-body-large-bold',\n className,\n )}\n onClick={() => setShowSteps(true)}\n >\n {steps.map(({ label }, index) => {\n const isCurrentStep = activeLabel === index;\n const previousIndex = index - 1;\n return (\n <div\n key={previousIndex}\n aria-hidden={!isCurrentStep}\n className={clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {\n 'np-animated-label--active': isCurrentStep,\n })}\n >\n <span className=\"np-animated-label__text\">{label}</span> <ChevronDown />\n </div>\n );\n })}\n </button>\n <BottomSheet\n role=\"menu\"\n aria-labelledby={labelId}\n open={showSteps}\n onClose={() => setShowSteps(false)}\n >\n <List className=\"m-b-0 p-a-1\">\n {steps.map((step, index) => {\n const isCurrentStep = activeLabel === index;\n const isDisabled = activeLabel < index;\n const itemId = `step-${index}`;\n return (\n <Option\n key={itemId}\n id={itemId}\n as=\"li\"\n role=\"menuitem\"\n decision={false}\n className={clsx('np-animated-label-option', 'p-x-3', 'p-y-1', 'm-y-1', {\n clickable: !isDisabled,\n })}\n title={step.label}\n content={step.hoverLabel}\n button={isCurrentStep ? <Check size={24} /> : null}\n aria-current={isCurrentStep ? 'step' : false}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n isContainerAligned\n {...(!isDisabled && {\n tabIndex: 0,\n onClick: handleStepAction(step.onClick),\n onKeyDown: (event) => {\n event.preventDefault();\n if (event.code === 'Enter' || event.code === 'Space') {\n handleStepAction(step.onClick)();\n }\n },\n })}\n />\n );\n })}\n </List>\n </BottomSheet>\n </>\n );\n }}\n </OverlayIdContext.Consumer>\n </OverlayIdProvider>\n );\n};\n\nexport default AnimatedLabel;\n"],"names":["AnimatedLabel","activeLabel","className","steps","labelId","useId","showSteps","setShowSteps","useState","handleStepAction","onClick","_jsx","OverlayIdProvider","open","children","OverlayIdContext","Consumer","overlayId","_jsxs","_Fragment","type","id","title","label","undefined","clsx","map","index","isCurrentStep","previousIndex","ChevronDown","BottomSheet","role","onClose","List","step","isDisabled","itemId","Option","as","decision","clickable","content","hoverLabel","button","Check","size","disabled","isContainerAligned","tabIndex","onKeyDown","event","preventDefault","code"],"mappings":";;;;;;;;;AAgBA,MAAMA,aAAa,GAAGA,CAAC;EAAEC,WAAW;EAAE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,OAAO,EAAE;AACrEgB,oBAAAA,SAAS,EAAE,CAACL;AACb,mBAAA,CAAE;kBACHd,KAAK,EAAEa,IAAI,CAACZ,KAAM;kBAClBmB,OAAO,EAAEP,IAAI,CAACQ,UAAW;AACzBC,kBAAAA,MAAM,EAAEhB,aAAa,gBAAGjB,GAAA,CAACkC,KAAK,EAAA;AAACC,oBAAAA,IAAI,EAAE;oBAAM,GAAG,IAAK;AACnD,kBAAA,cAAA,EAAclB,aAAa,GAAG,MAAM,GAAG,KAAM;AAC7C,kBAAA,eAAA,EAAeQ,UAAW;AAC1BW,kBAAAA,QAAQ,EAAEX,UAAW;kBACrBY,kBAAkB,EAAA,IAAA;kBAAA,IACb,CAACZ,UAAU,IAAI;AAClBa,oBAAAA,QAAQ,EAAE,CAAC;AACXvC,oBAAAA,OAAO,EAAED,gBAAgB,CAAC0B,IAAI,CAACzB,OAAO,CAAC;oBACvCwC,SAAS,EAAGC,KAAK,IAAI;sBACnBA,KAAK,CAACC,cAAc,EAAE;sBACtB,IAAID,KAAK,CAACE,IAAI,KAAK,OAAO,IAAIF,KAAK,CAACE,IAAI,KAAK,OAAO,EAAE;AACpD5C,wBAAAA,gBAAgB,CAAC0B,IAAI,CAACzB,OAAO,CAAC,EAAE;AAClC,sBAAA;AACF,oBAAA;mBACD;AAAA,iBAAA,EAxBI2B,MAwBF,CACH;cAEN,CAAC;aACG;AACR,WAAa,CACf;AAAA,SAAA,CAAG;AAEP,MAAA;KACyB;AAC7B,GAAmB,CAAC;AAExB;;"}
|
package/build/i18n/cs.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Předpona",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Chyba:",
|
package/build/i18n/cs.json.js
CHANGED
|
@@ -39,7 +39,6 @@ var cs = {
|
|
|
39
39
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
40
40
|
"neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
|
|
41
41
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
|
|
42
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Předpona",
|
|
43
42
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
44
43
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
45
44
|
"neptune.StatusIcon.iconLabel.error": "Chyba:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/cs.json.mjs
CHANGED
|
@@ -35,7 +35,6 @@ var cs = {
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Předpona",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Chyba:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/pt.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Erro:",
|
package/build/i18n/pt.json.js
CHANGED
|
@@ -39,7 +39,6 @@ var pt = {
|
|
|
39
39
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
|
|
40
40
|
"neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
|
|
41
41
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
|
|
42
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
|
|
43
42
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
44
43
|
"neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
|
|
45
44
|
"neptune.StatusIcon.iconLabel.error": "Erro:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/pt.json.mjs
CHANGED
|
@@ -35,7 +35,6 @@ var pt = {
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Erro:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pt.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/ru.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Ошибка:",
|
package/build/i18n/ru.json.js
CHANGED
|
@@ -39,7 +39,6 @@ var ru = {
|
|
|
39
39
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
40
40
|
"neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
|
|
41
41
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
|
|
42
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
|
|
43
42
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
44
43
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
45
44
|
"neptune.StatusIcon.iconLabel.error": "Ошибка:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/ru.json.mjs
CHANGED
|
@@ -35,7 +35,6 @@ var ru = {
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Ошибка:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/main.css
CHANGED
|
@@ -22987,6 +22987,12 @@ button.np-option {
|
|
|
22987
22987
|
overflow: hidden;
|
|
22988
22988
|
position: relative;
|
|
22989
22989
|
padding-block-start: 1px;
|
|
22990
|
+
max-inline-size: 60%;
|
|
22991
|
+
}
|
|
22992
|
+
.np-animated-label__text {
|
|
22993
|
+
overflow: hidden;
|
|
22994
|
+
text-overflow: ellipsis;
|
|
22995
|
+
white-space: nowrap;
|
|
22990
22996
|
}
|
|
22991
22997
|
.np-animated-label > * {
|
|
22992
22998
|
block-size: 0;
|
package/build/styles/main.css
CHANGED
|
@@ -22987,6 +22987,12 @@ button.np-option {
|
|
|
22987
22987
|
overflow: hidden;
|
|
22988
22988
|
position: relative;
|
|
22989
22989
|
padding-block-start: 1px;
|
|
22990
|
+
max-inline-size: 60%;
|
|
22991
|
+
}
|
|
22992
|
+
.np-animated-label__text {
|
|
22993
|
+
overflow: hidden;
|
|
22994
|
+
text-overflow: ellipsis;
|
|
22995
|
+
white-space: nowrap;
|
|
22990
22996
|
}
|
|
22991
22997
|
.np-animated-label > * {
|
|
22992
22998
|
block-size: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedLabel.d.ts","sourceRoot":"","sources":["../../../../src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAOlD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACxB;AAED,QAAA,MAAM,aAAa,GAAI,mCAAmC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"AnimatedLabel.d.ts","sourceRoot":"","sources":["../../../../src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAOlD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACxB;AAED,QAAA,MAAM,aAAa,GAAI,mCAAmC,kBAAkB,gCAqG3E,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -12,34 +12,60 @@ jest.useFakeTimers();
|
|
|
12
12
|
describe('AnimatedLabel', () => {
|
|
13
13
|
it('renders only one label with class in', () => {
|
|
14
14
|
const { container } = render(<AnimatedLabel {...props} />);
|
|
15
|
-
expect(screen.getByText(props.steps[0].label)
|
|
15
|
+
expect(screen.getByText(props.steps[0].label).closest('div')).toHaveClass(
|
|
16
|
+
'np-animated-label--active',
|
|
17
|
+
);
|
|
16
18
|
expect(container.querySelectorAll('.np-animated-label--active')).toHaveLength(1);
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
it('when activeLabel increase it switches class accordingly', () => {
|
|
20
22
|
const { rerender } = render(<AnimatedLabel {...props} />);
|
|
21
|
-
expect(screen.getByText(props.steps[0].label)
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
expect(screen.getByText(props.steps[0].label).closest('div')).toHaveClass(
|
|
24
|
+
'np-animated-label--active',
|
|
25
|
+
);
|
|
26
|
+
expect(screen.getByText(props.steps[1].label).closest('div')).not.toHaveClass(
|
|
27
|
+
'np-animated-label--active',
|
|
28
|
+
);
|
|
29
|
+
expect(screen.getByText(props.steps[2].label).closest('div')).not.toHaveClass(
|
|
30
|
+
'np-animated-label--active',
|
|
31
|
+
);
|
|
24
32
|
|
|
25
33
|
rerender(<AnimatedLabel {...props} activeLabel={1} />);
|
|
26
34
|
|
|
27
|
-
expect(screen.getByText(props.steps[0].label)).not.toHaveClass(
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
expect(screen.getByText(props.steps[0].label).closest('div')).not.toHaveClass(
|
|
36
|
+
'np-animated-label--active',
|
|
37
|
+
);
|
|
38
|
+
expect(screen.getByText(props.steps[1].label).closest('div')).toHaveClass(
|
|
39
|
+
'np-animated-label--active',
|
|
40
|
+
);
|
|
41
|
+
expect(screen.getByText(props.steps[2].label).closest('div')).not.toHaveClass(
|
|
42
|
+
'np-animated-label--active',
|
|
43
|
+
);
|
|
30
44
|
});
|
|
31
45
|
|
|
32
46
|
it('when activeLabel decrease it switches class accordingly', () => {
|
|
33
47
|
const { rerender } = render(<AnimatedLabel {...props} activeLabel={1} />);
|
|
34
|
-
expect(screen.getByText(props.steps[0].label)).not.toHaveClass(
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
expect(screen.getByText(props.steps[0].label).closest('div')).not.toHaveClass(
|
|
49
|
+
'np-animated-label--active',
|
|
50
|
+
);
|
|
51
|
+
expect(screen.getByText(props.steps[1].label).closest('div')).toHaveClass(
|
|
52
|
+
'np-animated-label--active',
|
|
53
|
+
);
|
|
54
|
+
expect(screen.getByText(props.steps[2].label).closest('div')).not.toHaveClass(
|
|
55
|
+
'np-animated-label--active',
|
|
56
|
+
);
|
|
37
57
|
|
|
38
58
|
rerender(<AnimatedLabel {...props} activeLabel={0} />);
|
|
39
59
|
|
|
40
|
-
expect(screen.getByText(props.steps[0].label)
|
|
41
|
-
|
|
42
|
-
|
|
60
|
+
expect(screen.getByText(props.steps[0].label).closest('div')).toHaveClass(
|
|
61
|
+
'np-animated-label--active',
|
|
62
|
+
);
|
|
63
|
+
expect(screen.getByText(props.steps[1].label).closest('div')).not.toHaveClass(
|
|
64
|
+
'np-animated-label--active',
|
|
65
|
+
);
|
|
66
|
+
expect(screen.getByText(props.steps[2].label).closest('div')).not.toHaveClass(
|
|
67
|
+
'np-animated-label--active',
|
|
68
|
+
);
|
|
43
69
|
});
|
|
44
70
|
|
|
45
71
|
it('shows all steps in menu when click on the label', async () => {
|
|
@@ -37,6 +37,11 @@ const AnimatedLabel = ({ activeLabel, className, steps }: AnimatedLabelProps) =>
|
|
|
37
37
|
aria-haspopup="menu"
|
|
38
38
|
aria-controls={overlayId}
|
|
39
39
|
aria-expanded={showSteps}
|
|
40
|
+
title={
|
|
41
|
+
typeof steps[activeLabel]?.label === 'string'
|
|
42
|
+
? steps[activeLabel].label
|
|
43
|
+
: undefined
|
|
44
|
+
}
|
|
40
45
|
className={clsx(
|
|
41
46
|
'np-animated-label',
|
|
42
47
|
'btn-unstyled',
|
|
@@ -53,10 +58,10 @@ const AnimatedLabel = ({ activeLabel, className, steps }: AnimatedLabelProps) =>
|
|
|
53
58
|
key={previousIndex}
|
|
54
59
|
aria-hidden={!isCurrentStep}
|
|
55
60
|
className={clsx('text-xs-center', 'd-inline-flex', 'align-items-center', {
|
|
56
|
-
'np-animated-label--active
|
|
61
|
+
'np-animated-label--active': isCurrentStep,
|
|
57
62
|
})}
|
|
58
63
|
>
|
|
59
|
-
{label} <ChevronDown />
|
|
64
|
+
<span className="np-animated-label__text">{label}</span> <ChevronDown />
|
|
60
65
|
</div>
|
|
61
66
|
);
|
|
62
67
|
})}
|
|
@@ -127,3 +127,28 @@ export const CriticalBannerMobile: Story = {
|
|
|
127
127
|
),
|
|
128
128
|
...withVariantConfig(['mobile']),
|
|
129
129
|
};
|
|
130
|
+
|
|
131
|
+
const LongLabelGerman: Story = {
|
|
132
|
+
render: () => (
|
|
133
|
+
<FlowNavigation
|
|
134
|
+
{...baseProps}
|
|
135
|
+
steps={[
|
|
136
|
+
{ label: 'Überweisungsbetrag', hoverLabel: '100 EUR', onClick: noop },
|
|
137
|
+
{ label: 'Zahlungsempfänger', hoverLabel: 'Max Mustermann', onClick: noop },
|
|
138
|
+
{
|
|
139
|
+
label: 'Zahlungsempfängerbestätigung',
|
|
140
|
+
hoverLabel: 'IBAN DE89370400440532013000',
|
|
141
|
+
onClick: noop,
|
|
142
|
+
},
|
|
143
|
+
{ label: 'Zusammenfassung', hoverLabel: 'Alles korrekt', onClick: noop },
|
|
144
|
+
{ label: 'Bezahlen', hoverLabel: 'Jetzt bezahlen', onClick: noop },
|
|
145
|
+
]}
|
|
146
|
+
activeStep={2}
|
|
147
|
+
/>
|
|
148
|
+
),
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const LongLabelGermanMobile: Story = {
|
|
152
|
+
...LongLabelGerman,
|
|
153
|
+
...withVariantConfig(['mobile'], LongLabelGerman),
|
|
154
|
+
};
|
package/src/i18n/cs.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Kód země",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Telefonní číslo",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Předpona",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Chyba:",
|
package/src/i18n/pt.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Escolha uma opção...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Código do país",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Número de telefone",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Prefixo",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Buscar...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Nenhum resultado encontrado",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Erro:",
|
package/src/i18n/ru.json
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Выберите вариант...",
|
|
36
36
|
"neptune.PhoneNumberInput.countryCodeLabel": "Код страны",
|
|
37
37
|
"neptune.PhoneNumberInput.phoneNumberLabel": "Номер телефона",
|
|
38
|
-
"neptune.PhoneNumberInput.phoneNumberPrefix": "Код страны",
|
|
39
38
|
"neptune.Select.searchPlaceholder": "Поиск...",
|
|
40
39
|
"neptune.SelectInput.noResultsFound": "Ничего не найдено",
|
|
41
40
|
"neptune.StatusIcon.iconLabel.error": "Ошибка:",
|
package/src/main.css
CHANGED
|
@@ -22987,6 +22987,12 @@ button.np-option {
|
|
|
22987
22987
|
overflow: hidden;
|
|
22988
22988
|
position: relative;
|
|
22989
22989
|
padding-block-start: 1px;
|
|
22990
|
+
max-inline-size: 60%;
|
|
22991
|
+
}
|
|
22992
|
+
.np-animated-label__text {
|
|
22993
|
+
overflow: hidden;
|
|
22994
|
+
text-overflow: ellipsis;
|
|
22995
|
+
white-space: nowrap;
|
|
22990
22996
|
}
|
|
22991
22997
|
.np-animated-label > * {
|
|
22992
22998
|
block-size: 0;
|