@transferwise/components 46.103.0 → 46.103.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/main.css CHANGED
@@ -741,7 +741,7 @@
741
741
  justify-content: center;
742
742
  vertical-align: middle;
743
743
  text-align: center;
744
- white-space: normal;
744
+ white-space: nowrap;
745
745
  word-wrap: break-word;
746
746
  -webkit-appearance: none;
747
747
  -moz-appearance: none;
@@ -53,7 +53,7 @@
53
53
  justify-content: center;
54
54
  vertical-align: middle;
55
55
  text-align: center;
56
- white-space: normal;
56
+ white-space: nowrap;
57
57
  word-wrap: break-word;
58
58
  -webkit-appearance: none;
59
59
  -moz-appearance: none;
@@ -741,7 +741,7 @@
741
741
  justify-content: center;
742
742
  vertical-align: middle;
743
743
  text-align: center;
744
- white-space: normal;
744
+ white-space: nowrap;
745
745
  word-wrap: break-word;
746
746
  -webkit-appearance: none;
747
747
  -moz-appearance: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "46.103.0",
3
+ "version": "46.103.1",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -85,8 +85,8 @@
85
85
  "storybook-addon-test-codegen": "^2.0.1",
86
86
  "@transferwise/less-config": "3.1.2",
87
87
  "@transferwise/neptune-css": "14.24.5",
88
- "@wise/components-theming": "1.6.4",
89
- "@wise/wds-configs": "0.0.0"
88
+ "@wise/wds-configs": "0.0.0",
89
+ "@wise/components-theming": "1.6.4"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@transferwise/icons": "^3.22.3",
@@ -53,7 +53,7 @@
53
53
  justify-content: center;
54
54
  vertical-align: middle;
55
55
  text-align: center;
56
- white-space: normal;
56
+ white-space: nowrap;
57
57
  word-wrap: break-word;
58
58
  -webkit-appearance: none;
59
59
  -moz-appearance: none;
@@ -9,7 +9,7 @@
9
9
  justify-content: center;
10
10
  vertical-align: middle;
11
11
  text-align: center;
12
- white-space: normal;
12
+ white-space: nowrap;
13
13
  word-wrap: break-word;
14
14
  appearance: none;
15
15
  background-color: var(--Button-background);
@@ -4,7 +4,7 @@ import { Freeze, ArrowRight, ChevronRight } from '@transferwise/icons';
4
4
  import { Flag } from '@wise/art';
5
5
  import Button from './Button.resolver';
6
6
  import type { ButtonProps, ButtonPriority } from './Button.types';
7
- import { lorem20, storyConfig } from '../test-utils';
7
+ import { lorem10, lorem20, storyConfig } from '../test-utils';
8
8
 
9
9
  const withContainer = (Story: any) => (
10
10
  <div style={{ display: 'flex', justifyContent: 'center' }}>
@@ -503,14 +503,9 @@ export const DisplayBlock: StoryObj<PreviewStoryArgs> = {
503
503
  const [props, previewProps] = getPropsForPreview(args);
504
504
 
505
505
  return (
506
- <div className="d-flex flex-column gap-y-1">
507
- <Button {...props} {...previewProps}>
508
- Full-width button
509
- </Button>
510
- <Button {...props} {...previewProps}>
511
- {lorem20}
512
- </Button>
513
- </div>
506
+ <Button {...props} {...previewProps}>
507
+ Full-width button
508
+ </Button>
514
509
  );
515
510
  },
516
511
  argTypes: {
@@ -809,6 +804,96 @@ export const AllVariants = storyConfig(
809
804
  { variants: ['default', 'dark', 'bright-green', 'forest-green', 'rtl'] },
810
805
  );
811
806
 
807
+ /**
808
+ * **NB:** The button doesn't know how long its label is, how many words it consists of and
809
+ * how zoomed in it is. That is likely to lead to scenarios in which the text will overflow
810
+ * its container. This is being investigated.
811
+ */
812
+ export const DealingWithLongText: StoryObj<PreviewStoryArgs> = {
813
+ render: function Render(args: PreviewStoryArgs) {
814
+ const [props, previewProps] = getPropsForPreview(args);
815
+
816
+ return (
817
+ <div>
818
+ <div>
819
+ <div>
820
+ <Button {...props} {...previewProps}>
821
+ {lorem10}
822
+ </Button>
823
+ </div>
824
+ <div className="m-y-2">
825
+ <Button {...props} {...previewProps}>
826
+ Forderungsabtretungsvereinbarung
827
+ </Button>
828
+ </div>
829
+ <div
830
+ className="d-flex"
831
+ style={{
832
+ width: '100%',
833
+ justifyContent: 'space-between',
834
+ alignItems: 'center',
835
+ }}
836
+ >
837
+ <span>{lorem20}</span>
838
+ <div>
839
+ <Button {...props} {...previewProps}>
840
+ Register interest
841
+ </Button>
842
+ </div>
843
+ </div>
844
+ </div>
845
+ <div style={{ width: 260 }} className="m-t-2">
846
+ <div>
847
+ <Button {...props} {...previewProps}>
848
+ {lorem10}
849
+ </Button>
850
+ </div>
851
+ <div className="m-y-2">
852
+ <Button {...props} {...previewProps}>
853
+ Forderungsabtretungsvereinbarung
854
+ </Button>
855
+ </div>
856
+ <div
857
+ className="d-flex"
858
+ style={{
859
+ width: '100%',
860
+ justifyContent: 'space-between',
861
+ alignItems: 'center',
862
+ }}
863
+ >
864
+ <span>{lorem20}</span>
865
+ <div>
866
+ <Button {...props} {...previewProps}>
867
+ Register interest
868
+ </Button>
869
+ </div>
870
+ </div>
871
+ </div>
872
+ </div>
873
+ );
874
+ },
875
+ argTypes: {
876
+ ...hideControls([
877
+ 'href',
878
+ 'target',
879
+ 'priority',
880
+ 'sentiment',
881
+ 'disabled',
882
+ 'loading',
883
+ 'children',
884
+ 'as',
885
+ 'type',
886
+ 'className',
887
+ ]),
888
+ ...previewArgTypes,
889
+ },
890
+ args: {
891
+ block: true,
892
+ previewAddonStart: false,
893
+ previewAddonEnd: false,
894
+ },
895
+ };
896
+
812
897
  export const AccessibilityAddons: Story = {
813
898
  args: {
814
899
  v2: true,
package/src/main.css CHANGED
@@ -741,7 +741,7 @@
741
741
  justify-content: center;
742
742
  vertical-align: middle;
743
743
  text-align: center;
744
- white-space: normal;
744
+ white-space: nowrap;
745
745
  word-wrap: break-word;
746
746
  -webkit-appearance: none;
747
747
  -moz-appearance: none;