@transferwise/components 0.0.0-experimental-69786e7 → 0.0.0-experimental-b6153fb

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.
Files changed (45) hide show
  1. package/build/index.js +1 -0
  2. package/build/index.js.map +1 -1
  3. package/build/index.mjs +1 -1
  4. package/build/main.css +68 -60
  5. package/build/styles/inputs/Input.css +2 -28
  6. package/build/styles/inputs/TextArea.css +2 -28
  7. package/build/styles/item/Item.css +64 -0
  8. package/build/styles/main.css +68 -60
  9. package/build/styles/popover/Popover.css +2 -28
  10. package/build/types/index.d.ts +2 -0
  11. package/build/types/index.d.ts.map +1 -1
  12. package/build/types/item/Item.d.ts +39 -0
  13. package/build/types/item/Item.d.ts.map +1 -0
  14. package/build/types/item/ItemAdditionalInfo.d.ts +9 -0
  15. package/build/types/item/ItemAdditionalInfo.d.ts.map +1 -0
  16. package/build/types/item/ItemCheckbox.d.ts +4 -0
  17. package/build/types/item/ItemCheckbox.d.ts.map +1 -0
  18. package/build/types/item/ItemIconButton.d.ts +4 -0
  19. package/build/types/item/ItemIconButton.d.ts.map +1 -0
  20. package/build/types/item/ItemImage.d.ts +4 -0
  21. package/build/types/item/ItemImage.d.ts.map +1 -0
  22. package/build/types/item/ItemNavigation.d.ts +4 -0
  23. package/build/types/item/ItemNavigation.d.ts.map +1 -0
  24. package/build/types/item/index.d.ts +5 -0
  25. package/build/types/item/index.d.ts.map +1 -0
  26. package/build/types/test-utils/fake-data.d.ts +1 -0
  27. package/build/types/test-utils/fake-data.d.ts.map +1 -1
  28. package/package.json +6 -6
  29. package/src/index.ts +2 -0
  30. package/src/inputs/Input.css +2 -28
  31. package/src/inputs/TextArea.css +2 -28
  32. package/src/item/Item.css +64 -0
  33. package/src/item/Item.less +64 -0
  34. package/src/item/Item.story.tsx +80 -0
  35. package/src/item/Item.tsx +163 -0
  36. package/src/item/ItemAdditionalInfo.tsx +31 -0
  37. package/src/item/ItemCheckbox.tsx +16 -0
  38. package/src/item/ItemIconButton.tsx +15 -0
  39. package/src/item/ItemImage.tsx +11 -0
  40. package/src/item/ItemNavigation.tsx +16 -0
  41. package/src/item/index.ts +4 -0
  42. package/src/main.css +68 -60
  43. package/src/main.less +1 -0
  44. package/src/popover/Popover.css +2 -28
  45. package/src/test-utils/fake-data.ts +3 -0
package/src/main.css CHANGED
@@ -2585,6 +2585,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2585
2585
  line-height: 1.2;
2586
2586
  line-height: var(--line-height-title);
2587
2587
  letter-spacing: 0;
2588
+ -webkit-hyphens: auto;
2589
+ hyphens: auto;
2588
2590
  margin-bottom: 0;
2589
2591
  margin-bottom: initial;
2590
2592
  font-size: 1.375rem;
@@ -2596,36 +2598,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2596
2598
  height: 72px !important;
2597
2599
  height: var(--size-72) !important;
2598
2600
  }
2599
- @supports (hyphenate-limit-chars: 1) {
2600
- .np-form-control--size-lg {
2601
- -webkit-hyphens: auto;
2602
- hyphens: auto;
2603
- hyphenate-limit-chars: 7 3;
2604
- }
2605
- @media (min-width: 768px) {
2606
- .np-form-control--size-lg {
2607
- hyphenate-limit-chars: 8 3;
2608
- }
2609
- }
2610
- @media (min-width: 992px) {
2611
- .np-form-control--size-lg {
2612
- hyphenate-limit-chars: 10 4 3;
2613
- }
2614
- }
2615
- }
2616
- @supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
2617
- .np-form-control--size-lg {
2618
- -webkit-hyphens: auto;
2619
- hyphens: auto;
2620
- -webkit-hyphenate-limit-before: 3;
2621
- -webkit-hyphenate-limit-after: 3;
2622
- }
2623
- @media (min-width: 992px) {
2624
- .np-form-control--size-lg {
2625
- -webkit-hyphenate-limit-before: 4;
2626
- }
2627
- }
2628
- }
2629
2601
  .np-form-control--size-lg + p,
2630
2602
  .np-form-control--size-lg + ul:not(.list-unstyled),
2631
2603
  .np-form-control--size-lg + ol:not(.list-unstyled) {
@@ -2648,6 +2620,70 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
2648
2620
  border-radius: 9999px !important;
2649
2621
  border-radius: var(--radius-full) !important;
2650
2622
  }
2623
+ .np-item {
2624
+ padding: 16px;
2625
+ padding: var(--size-16);
2626
+ border-radius: 24px;
2627
+ border-radius: var(--radius-large);
2628
+ background-color: #ffffff;
2629
+ background-color: var(--color-background-screen);
2630
+ display: flex;
2631
+ gap: 16px;
2632
+ gap: var(--size-16);
2633
+ align-items: center;
2634
+ flex-direction: row;
2635
+ cursor: pointer;
2636
+ }
2637
+ .np-item:hover {
2638
+ background-color: var(--color-background-screen-hover);
2639
+ }
2640
+ .np-item:active {
2641
+ background-color: var(--color-background-screen-active);
2642
+ }
2643
+ .np-item-media {
2644
+ flex: 0 0 auto;
2645
+ align-items: flex-start;
2646
+ }
2647
+ .np-item-title {
2648
+ color: #37517e;
2649
+ color: var(--color-content-primary);
2650
+ }
2651
+ .np-item-additional-info {
2652
+ color: #768e9c;
2653
+ color: var(--color-content-tertiary);
2654
+ }
2655
+ .np-item-value {
2656
+ flex: 0 0 auto;
2657
+ }
2658
+ .np-item-control {
2659
+ flex: 0 0 auto;
2660
+ }
2661
+ .np-item-spotlight-active {
2662
+ background-color: rgba(134,167,189,0.10196);
2663
+ background-color: var(--color-background-neutral);
2664
+ }
2665
+ .np-item-spotlight-active:hover {
2666
+ background-color: var(--color-background-neutral-hover);
2667
+ }
2668
+ .np-item-spotlight-active:active {
2669
+ background-color: var(--color-background-neutral-active);
2670
+ }
2671
+ .np-item-spotlight-inactive {
2672
+ background-color: rgba(134, 167, 189, 0.025);
2673
+ border: 1px dashed rgba(0,0,0,0.10196);
2674
+ border: 1px dashed var(--color-border-neutral);
2675
+ }
2676
+ @supports (color: color-mix(in lch, red, blue)) {
2677
+ .np-item-spotlight-inactive {
2678
+ background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
2679
+ }
2680
+ }
2681
+ .np-item-spotlight-inactive:hover {
2682
+ background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
2683
+ }
2684
+ .np-item-spotlight-inactive:active {
2685
+ background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
2686
+ }
2651
2687
  .np-field-control {
2652
2688
  margin-top: 4px;
2653
2689
  margin-top: var(--size-4);
@@ -4051,6 +4087,8 @@ html:not([dir="rtl"]) .np-navigation-option {
4051
4087
  line-height: 1.2;
4052
4088
  line-height: var(--line-height-title);
4053
4089
  letter-spacing: 0;
4090
+ -webkit-hyphens: auto;
4091
+ hyphens: auto;
4054
4092
  margin-bottom: 0;
4055
4093
  margin-bottom: initial;
4056
4094
  font-weight: 600;
@@ -4060,36 +4098,6 @@ html:not([dir="rtl"]) .np-navigation-option {
4060
4098
  letter-spacing: -0.02em;
4061
4099
  line-height: 122%;
4062
4100
  }
4063
- @supports (hyphenate-limit-chars: 1) {
4064
- .np-popover__container.np-bottom-sheet .np-popover__title {
4065
- -webkit-hyphens: auto;
4066
- hyphens: auto;
4067
- hyphenate-limit-chars: 7 3;
4068
- }
4069
- @media (min-width: 768px) {
4070
- .np-popover__container.np-bottom-sheet .np-popover__title {
4071
- hyphenate-limit-chars: 8 3;
4072
- }
4073
- }
4074
- @media (min-width: 992px) {
4075
- .np-popover__container.np-bottom-sheet .np-popover__title {
4076
- hyphenate-limit-chars: 10 4 3;
4077
- }
4078
- }
4079
- }
4080
- @supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
4081
- .np-popover__container.np-bottom-sheet .np-popover__title {
4082
- -webkit-hyphens: auto;
4083
- hyphens: auto;
4084
- -webkit-hyphenate-limit-before: 3;
4085
- -webkit-hyphenate-limit-after: 3;
4086
- }
4087
- @media (min-width: 992px) {
4088
- .np-popover__container.np-bottom-sheet .np-popover__title {
4089
- -webkit-hyphenate-limit-before: 4;
4090
- }
4091
- }
4092
- }
4093
4101
  .np-popover__container.np-bottom-sheet .np-popover__title + p,
4094
4102
  .np-popover__container.np-bottom-sheet .np-popover__title + ul:not(.list-unstyled),
4095
4103
  .np-popover__container.np-bottom-sheet .np-popover__title + ol:not(.list-unstyled) {
package/src/main.less CHANGED
@@ -39,6 +39,7 @@
39
39
  @import "./image/Image.less";
40
40
  @import "./info/Info.less";
41
41
  @import "./inputs/Input.less";
42
+ @import "./item/Item.less";
42
43
  @import "./field/Field.less";
43
44
  @import "./inputs/InputGroup.less";
44
45
  @import "./inputs/SelectInput.less";
@@ -24,6 +24,8 @@
24
24
  line-height: 1.2;
25
25
  line-height: var(--line-height-title);
26
26
  letter-spacing: 0;
27
+ -webkit-hyphens: auto;
28
+ hyphens: auto;
27
29
  margin-bottom: 0;
28
30
  margin-bottom: initial;
29
31
  font-weight: 600;
@@ -32,34 +34,6 @@
32
34
  font-size: var(--font-size-26);
33
35
  letter-spacing: -0.02em;
34
36
  line-height: 122%;
35
- }@supports (hyphenate-limit-chars: 1) {
36
- .np-popover__container.np-bottom-sheet .np-popover__title {
37
- -webkit-hyphens: auto;
38
- hyphens: auto;
39
- hyphenate-limit-chars: 7 3;
40
- }
41
- @media (min-width: 768px) {
42
- .np-popover__container.np-bottom-sheet .np-popover__title {
43
- hyphenate-limit-chars: 8 3;
44
- }
45
- }
46
- @media (min-width: 992px) {
47
- .np-popover__container.np-bottom-sheet .np-popover__title {
48
- hyphenate-limit-chars: 10 4 3;
49
- }
50
- }
51
- }@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
52
- .np-popover__container.np-bottom-sheet .np-popover__title {
53
- -webkit-hyphens: auto;
54
- hyphens: auto;
55
- -webkit-hyphenate-limit-before: 3;
56
- -webkit-hyphenate-limit-after: 3;
57
- }
58
- @media (min-width: 992px) {
59
- .np-popover__container.np-bottom-sheet .np-popover__title {
60
- -webkit-hyphenate-limit-before: 4;
61
- }
62
- }
63
37
  }.np-popover__container.np-bottom-sheet .np-popover__title + p,
64
38
  .np-popover__container.np-bottom-sheet .np-popover__title + ul:not(.list-unstyled),
65
39
  .np-popover__container.np-bottom-sheet .np-popover__title + ol:not(.list-unstyled) {
@@ -1,6 +1,9 @@
1
1
  export const lorem10 =
2
2
  'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Iste, architecto?';
3
3
 
4
+ export const lorem20 =
5
+ 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum non explicabo doloribus rerum saepe ut beatae adipisci rem vero optio.';
6
+
4
7
  export const lorem40 =
5
8
  'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Illo esse quod et iure deserunt facilis similique voluptatem reprehenderit mollitia inventore, ab voluptate dignissimos autem repellat accusamus perferendis sed pariatur tempore possimus ipsam praesentium ipsum? Nesciunt cumque repellendus impedit aliquam! Error?';
6
9