@transferwise/components 46.13.0 → 46.14.0

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 (126) hide show
  1. package/build/index.esm.js +175 -346
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +148 -319
  4. package/build/index.js.map +1 -1
  5. package/build/main.css +6 -82
  6. package/build/styles/decision/Decision.css +6 -82
  7. package/build/styles/main.css +6 -82
  8. package/build/types/body/Body.d.ts +1 -1
  9. package/build/types/common/commonProps.d.ts +1 -1
  10. package/build/types/common/commonProps.d.ts.map +1 -1
  11. package/build/types/common/dateUtils/getDayNames/getDayNames.d.ts +1 -1
  12. package/build/types/common/dateUtils/getDayNames/getDayNames.d.ts.map +1 -1
  13. package/build/types/common/dateUtils/getDayNames/index.d.ts +1 -1
  14. package/build/types/common/dateUtils/getDayNames/index.d.ts.map +1 -1
  15. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts +1 -1
  16. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
  17. package/build/types/common/dateUtils/getMonthNames/index.d.ts +1 -1
  18. package/build/types/common/dateUtils/getMonthNames/index.d.ts.map +1 -1
  19. package/build/types/common/dateUtils/index.d.ts +6 -6
  20. package/build/types/common/dateUtils/index.d.ts.map +1 -1
  21. package/build/types/common/dateUtils/isDateValid/index.d.ts +1 -1
  22. package/build/types/common/dateUtils/isDateValid/index.d.ts.map +1 -1
  23. package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts +2 -2
  24. package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts.map +1 -1
  25. package/build/types/common/dateUtils/isMonthAndYearFormat/index.d.ts +1 -1
  26. package/build/types/common/dateUtils/isMonthAndYearFormat/index.d.ts.map +1 -1
  27. package/build/types/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.d.ts +1 -1
  28. package/build/types/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.d.ts.map +1 -1
  29. package/build/types/common/dateUtils/isWithinRange/index.d.ts +1 -1
  30. package/build/types/common/dateUtils/isWithinRange/index.d.ts.map +1 -1
  31. package/build/types/common/dateUtils/isWithinRange/isWithinRange.d.ts +1 -1
  32. package/build/types/common/dateUtils/isWithinRange/isWithinRange.d.ts.map +1 -1
  33. package/build/types/common/dateUtils/moveToWithinRange/index.d.ts +1 -1
  34. package/build/types/common/dateUtils/moveToWithinRange/index.d.ts.map +1 -1
  35. package/build/types/common/dateUtils/moveToWithinRange/moveToWithinRange.d.ts +1 -1
  36. package/build/types/common/dateUtils/moveToWithinRange/moveToWithinRange.d.ts.map +1 -1
  37. package/build/types/common/panel/Panel.d.ts +1 -1
  38. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +1 -1
  39. package/build/types/dateInput/DateInput.d.ts +30 -41
  40. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  41. package/build/types/dateInput/DateInput.messages.d.ts +24 -33
  42. package/build/types/dateInput/DateInput.messages.d.ts.map +1 -1
  43. package/build/types/dateInput/index.d.ts +2 -2
  44. package/build/types/dateInput/index.d.ts.map +1 -1
  45. package/build/types/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.d.ts +1 -1
  46. package/build/types/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.d.ts.map +1 -1
  47. package/build/types/dateInput/utils/convertToLocalMidnight/index.d.ts +1 -1
  48. package/build/types/dateInput/utils/convertToLocalMidnight/index.d.ts.map +1 -1
  49. package/build/types/dateInput/utils/index.d.ts +1 -2
  50. package/build/types/dateInput/utils/index.d.ts.map +1 -1
  51. package/build/types/dateLookup/DateLookup.d.ts +1 -0
  52. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  53. package/build/types/decision/Decision.d.ts +39 -52
  54. package/build/types/decision/Decision.d.ts.map +1 -1
  55. package/build/types/decision/index.d.ts +1 -2
  56. package/build/types/decision/index.d.ts.map +1 -1
  57. package/build/types/dimmer/Dimmer.d.ts +1 -1
  58. package/build/types/index.d.ts +2 -0
  59. package/build/types/index.d.ts.map +1 -1
  60. package/build/types/promoCard/PromoCard.d.ts +1 -2
  61. package/build/types/promoCard/PromoCard.d.ts.map +1 -1
  62. package/build/types/select/searchBox/SearchBox.d.ts +1 -1
  63. package/package.json +1 -1
  64. package/src/common/commonProps.ts +1 -1
  65. package/src/common/dateUtils/getDayNames/getDayNames.spec.js +2 -2
  66. package/src/common/dateUtils/getDayNames/{getDayNames.js → getDayNames.ts} +5 -2
  67. package/src/common/dateUtils/getMonthNames/getMonthNames.spec.js +9 -8
  68. package/src/common/dateUtils/getMonthNames/{getMonthNames.js → getMonthNames.ts} +5 -3
  69. package/src/common/dateUtils/isDateValid/{isDateValid.spec.js → isDateValid.spec.ts} +1 -1
  70. package/src/common/dateUtils/isDateValid/isDateValid.ts +13 -0
  71. package/src/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.spec.js +3 -7
  72. package/src/common/dateUtils/isMonthAndYearFormat/{isMonthAndYearFormat.js → isMonthAndYearFormat.ts} +1 -1
  73. package/src/common/dateUtils/isWithinRange/{isWithinRange.spec.js → isWithinRange.spec.ts} +0 -10
  74. package/src/common/dateUtils/isWithinRange/{isWithinRange.js → isWithinRange.ts} +1 -1
  75. package/src/common/dateUtils/moveToWithinRange/{moveToWithinRange.js → moveToWithinRange.ts} +2 -2
  76. package/src/dateInput/DateInput.spec.js +7 -56
  77. package/src/dateInput/DateInput.story.tsx +11 -8
  78. package/src/dateInput/{DateInput.js → DateInput.tsx} +116 -123
  79. package/src/dateInput/index.ts +2 -0
  80. package/src/dateInput/utils/convertToLocalMidnight/{convertToLocalMidnight.js → convertToLocalMidnight.ts} +1 -1
  81. package/src/dateInput/utils/{index.js → index.ts} +0 -1
  82. package/src/dateLookup/DateLookup.js +12 -1
  83. package/src/dateLookup/DateLookup.testingLibrary.spec.js +12 -1
  84. package/src/dateLookup/dayCalendar/table/DayCalendarTable.js +1 -0
  85. package/src/decision/Decision.css +6 -82
  86. package/src/decision/Decision.less +3 -41
  87. package/src/decision/Decision.spec.js +56 -61
  88. package/src/decision/{Decision.story.js → Decision.story.tsx} +5 -5
  89. package/src/decision/Decision.tsx +133 -0
  90. package/src/decision/index.ts +1 -0
  91. package/src/index.ts +2 -0
  92. package/src/main.css +6 -82
  93. package/src/promoCard/PromoCard.tsx +1 -2
  94. package/src/tile/Tile.js +1 -1
  95. package/build/types/dateInput/utils/explodeDate/explodeDate.d.ts +0 -6
  96. package/build/types/dateInput/utils/explodeDate/explodeDate.d.ts.map +0 -1
  97. package/build/types/dateInput/utils/explodeDate/index.d.ts +0 -2
  98. package/build/types/dateInput/utils/explodeDate/index.d.ts.map +0 -1
  99. package/build/types/decision/decisionEnums.d.ts +0 -9
  100. package/build/types/decision/decisionEnums.d.ts.map +0 -1
  101. package/build/types/sizeSwapper/SizeSwapper.d.ts +0 -3
  102. package/build/types/sizeSwapper/SizeSwapper.d.ts.map +0 -1
  103. package/build/types/sizeSwapper/index.d.ts +0 -2
  104. package/build/types/sizeSwapper/index.d.ts.map +0 -1
  105. package/src/common/dateUtils/isDateValid/isDateValid.js +0 -6
  106. package/src/dateInput/index.js +0 -3
  107. package/src/dateInput/utils/explodeDate/explodeDate.js +0 -7
  108. package/src/dateInput/utils/explodeDate/explodeDate.spec.js +0 -11
  109. package/src/dateInput/utils/explodeDate/index.js +0 -1
  110. package/src/decision/Decision.js +0 -148
  111. package/src/decision/decisionEnums.ts +0 -11
  112. package/src/decision/index.js +0 -2
  113. package/src/sizeSwapper/SizeSwapper.js +0 -69
  114. package/src/sizeSwapper/SizeSwapper.spec.js +0 -100
  115. package/src/sizeSwapper/SizeSwapper.story.js +0 -34
  116. package/src/sizeSwapper/index.js +0 -1
  117. /package/src/common/dateUtils/getDayNames/{index.js → index.ts} +0 -0
  118. /package/src/common/dateUtils/getMonthNames/{index.js → index.ts} +0 -0
  119. /package/src/common/dateUtils/{index.js → index.ts} +0 -0
  120. /package/src/common/dateUtils/isDateValid/{index.js → index.ts} +0 -0
  121. /package/src/common/dateUtils/isMonthAndYearFormat/{index.js → index.ts} +0 -0
  122. /package/src/common/dateUtils/isWithinRange/{index.js → index.ts} +0 -0
  123. /package/src/common/dateUtils/moveToWithinRange/{index.js → index.ts} +0 -0
  124. /package/src/dateInput/{DateInput.messages.js → DateInput.messages.ts} +0 -0
  125. /package/src/dateInput/utils/convertToLocalMidnight/{convertToLocalMidnight.spec.js → convertToLocalMidnight.spec.ts} +0 -0
  126. /package/src/dateInput/utils/convertToLocalMidnight/{index.js → index.ts} +0 -0
package/build/main.css CHANGED
@@ -1598,95 +1598,19 @@ button.np-option {
1598
1598
  .np-decision .decision {
1599
1599
  display: flex;
1600
1600
  }
1601
- .np-decision__tile--small + .np-decision__tile--small {
1602
- margin-left: 16px;
1603
- margin-left: var(--size-16);
1604
- }
1605
- [dir="rtl"] .np-decision__tile--small + .np-decision__tile--small {
1606
- margin-right: 16px;
1607
- margin-right: var(--size-16);
1608
- margin-left: 0;
1609
- margin-left: initial;
1610
- }
1611
- .np-decision.np-decision--grid .np-decision__tile--small {
1612
- margin-left: 0;
1613
- margin-bottom: 16px !important;
1614
- margin-bottom: var(--size-16) !important;
1615
- }
1616
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small {
1617
- margin-right: 0;
1618
- margin-left: 0;
1619
- margin-left: initial;
1620
- }
1621
- .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
1622
- margin-right: 16px;
1623
- margin-right: var(--size-16);
1624
- }
1625
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
1626
- margin-left: 16px;
1627
- margin-left: var(--size-16);
1628
- margin-right: 0;
1629
- margin-right: initial;
1630
- }
1631
- .np-decision__tile + .np-decision__tile {
1632
- margin-left: 24px;
1633
- margin-left: var(--size-24);
1634
- }
1635
- [dir="rtl"] .np-decision__tile + .np-decision__tile {
1636
- margin-right: 24px;
1637
- margin-right: var(--size-24);
1638
- margin-left: 0;
1639
- margin-left: initial;
1640
- }
1641
- .np-decision .np-text-title-subsection {
1642
- margin-bottom: 0;
1643
- }
1644
1601
  .np-decision__tile--small .np-text-title-subsection {
1645
1602
  font-size: 1rem;
1646
1603
  font-size: var(--font-size-16);
1647
1604
  line-height: 1.2;
1648
1605
  line-height: var(--line-height-title);
1649
- margin-bottom: 0;
1650
- }
1651
- .np-decision.np-decision--grid .np-decision__tile {
1652
- margin-left: 0;
1653
- margin-bottom: 24px !important;
1654
- margin-bottom: var(--size-24) !important;
1655
- }
1656
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile {
1657
- margin-right: 0;
1658
- margin-left: 0;
1659
- margin-left: initial;
1660
- }
1661
- .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
1662
- margin-right: 24px;
1663
- margin-right: var(--size-24);
1664
1606
  }
1665
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
1666
- margin-left: 24px;
1667
- margin-left: var(--size-24);
1668
- margin-right: 0;
1669
- margin-right: initial;
1670
- }
1671
- .np-decision.np-decision--grid .np-size-swapper {
1672
- margin-right: calc(0 - 24px);
1673
- margin-right: calc(0 - var(--size-24));
1674
- }
1675
- [dir="rtl"] .np-decision.np-decision--grid .np-size-swapper {
1676
- margin-left: calc(0 - 24px);
1677
- margin-left: calc(0 - var(--size-24));
1678
- margin-right: 0;
1679
- margin-right: initial;
1680
- }
1681
- .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
1682
- margin-right: calc(0 - 16px);
1683
- margin-right: calc(0 - var(--size-16));
1607
+ .np-decision:not(.flex-column) {
1608
+ gap: 24px;
1609
+ gap: var(--size-24);
1684
1610
  }
1685
- [dir="rtl"] .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
1686
- margin-left: calc(0 - 16px);
1687
- margin-left: calc(0 - var(--size-16));
1688
- margin-right: 0;
1689
- margin-right: initial;
1611
+ .np-decision:not(.flex-column).np-decision--small {
1612
+ gap: 16px;
1613
+ gap: var(--size-16);
1690
1614
  }
1691
1615
  .tw-definition-list__item dd {
1692
1616
  word-break: break-all;
@@ -1,93 +1,17 @@
1
1
  .np-decision .decision {
2
2
  display: flex;
3
3
  }
4
- .np-decision__tile--small + .np-decision__tile--small {
5
- margin-left: 16px;
6
- margin-left: var(--size-16);
7
- }
8
- [dir="rtl"] .np-decision__tile--small + .np-decision__tile--small {
9
- margin-right: 16px;
10
- margin-right: var(--size-16);
11
- margin-left: 0;
12
- margin-left: initial;
13
- }
14
- .np-decision.np-decision--grid .np-decision__tile--small {
15
- margin-left: 0;
16
- margin-bottom: 16px !important;
17
- margin-bottom: var(--size-16) !important;
18
- }
19
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small {
20
- margin-right: 0;
21
- margin-left: 0;
22
- margin-left: initial;
23
- }
24
- .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
25
- margin-right: 16px;
26
- margin-right: var(--size-16);
27
- }
28
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
29
- margin-left: 16px;
30
- margin-left: var(--size-16);
31
- margin-right: 0;
32
- margin-right: initial;
33
- }
34
- .np-decision__tile + .np-decision__tile {
35
- margin-left: 24px;
36
- margin-left: var(--size-24);
37
- }
38
- [dir="rtl"] .np-decision__tile + .np-decision__tile {
39
- margin-right: 24px;
40
- margin-right: var(--size-24);
41
- margin-left: 0;
42
- margin-left: initial;
43
- }
44
- .np-decision .np-text-title-subsection {
45
- margin-bottom: 0;
46
- }
47
4
  .np-decision__tile--small .np-text-title-subsection {
48
5
  font-size: 1rem;
49
6
  font-size: var(--font-size-16);
50
7
  line-height: 1.2;
51
8
  line-height: var(--line-height-title);
52
- margin-bottom: 0;
53
- }
54
- .np-decision.np-decision--grid .np-decision__tile {
55
- margin-left: 0;
56
- margin-bottom: 24px !important;
57
- margin-bottom: var(--size-24) !important;
58
- }
59
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile {
60
- margin-right: 0;
61
- margin-left: 0;
62
- margin-left: initial;
63
- }
64
- .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
65
- margin-right: 24px;
66
- margin-right: var(--size-24);
67
- }
68
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
69
- margin-left: 24px;
70
- margin-left: var(--size-24);
71
- margin-right: 0;
72
- margin-right: initial;
73
- }
74
- .np-decision.np-decision--grid .np-size-swapper {
75
- margin-right: calc(0 - 24px);
76
- margin-right: calc(0 - var(--size-24));
77
- }
78
- [dir="rtl"] .np-decision.np-decision--grid .np-size-swapper {
79
- margin-left: calc(0 - 24px);
80
- margin-left: calc(0 - var(--size-24));
81
- margin-right: 0;
82
- margin-right: initial;
83
9
  }
84
- .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
85
- margin-right: calc(0 - 16px);
86
- margin-right: calc(0 - var(--size-16));
10
+ .np-decision:not(.flex-column) {
11
+ gap: 24px;
12
+ gap: var(--size-24);
87
13
  }
88
- [dir="rtl"] .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
89
- margin-left: calc(0 - 16px);
90
- margin-left: calc(0 - var(--size-16));
91
- margin-right: 0;
92
- margin-right: initial;
14
+ .np-decision:not(.flex-column).np-decision--small {
15
+ gap: 16px;
16
+ gap: var(--size-16);
93
17
  }
@@ -1598,95 +1598,19 @@ button.np-option {
1598
1598
  .np-decision .decision {
1599
1599
  display: flex;
1600
1600
  }
1601
- .np-decision__tile--small + .np-decision__tile--small {
1602
- margin-left: 16px;
1603
- margin-left: var(--size-16);
1604
- }
1605
- [dir="rtl"] .np-decision__tile--small + .np-decision__tile--small {
1606
- margin-right: 16px;
1607
- margin-right: var(--size-16);
1608
- margin-left: 0;
1609
- margin-left: initial;
1610
- }
1611
- .np-decision.np-decision--grid .np-decision__tile--small {
1612
- margin-left: 0;
1613
- margin-bottom: 16px !important;
1614
- margin-bottom: var(--size-16) !important;
1615
- }
1616
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small {
1617
- margin-right: 0;
1618
- margin-left: 0;
1619
- margin-left: initial;
1620
- }
1621
- .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
1622
- margin-right: 16px;
1623
- margin-right: var(--size-16);
1624
- }
1625
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
1626
- margin-left: 16px;
1627
- margin-left: var(--size-16);
1628
- margin-right: 0;
1629
- margin-right: initial;
1630
- }
1631
- .np-decision__tile + .np-decision__tile {
1632
- margin-left: 24px;
1633
- margin-left: var(--size-24);
1634
- }
1635
- [dir="rtl"] .np-decision__tile + .np-decision__tile {
1636
- margin-right: 24px;
1637
- margin-right: var(--size-24);
1638
- margin-left: 0;
1639
- margin-left: initial;
1640
- }
1641
- .np-decision .np-text-title-subsection {
1642
- margin-bottom: 0;
1643
- }
1644
1601
  .np-decision__tile--small .np-text-title-subsection {
1645
1602
  font-size: 1rem;
1646
1603
  font-size: var(--font-size-16);
1647
1604
  line-height: 1.2;
1648
1605
  line-height: var(--line-height-title);
1649
- margin-bottom: 0;
1650
- }
1651
- .np-decision.np-decision--grid .np-decision__tile {
1652
- margin-left: 0;
1653
- margin-bottom: 24px !important;
1654
- margin-bottom: var(--size-24) !important;
1655
- }
1656
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile {
1657
- margin-right: 0;
1658
- margin-left: 0;
1659
- margin-left: initial;
1660
- }
1661
- .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
1662
- margin-right: 24px;
1663
- margin-right: var(--size-24);
1664
1606
  }
1665
- [dir="rtl"] .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
1666
- margin-left: 24px;
1667
- margin-left: var(--size-24);
1668
- margin-right: 0;
1669
- margin-right: initial;
1670
- }
1671
- .np-decision.np-decision--grid .np-size-swapper {
1672
- margin-right: calc(0 - 24px);
1673
- margin-right: calc(0 - var(--size-24));
1674
- }
1675
- [dir="rtl"] .np-decision.np-decision--grid .np-size-swapper {
1676
- margin-left: calc(0 - 24px);
1677
- margin-left: calc(0 - var(--size-24));
1678
- margin-right: 0;
1679
- margin-right: initial;
1680
- }
1681
- .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
1682
- margin-right: calc(0 - 16px);
1683
- margin-right: calc(0 - var(--size-16));
1607
+ .np-decision:not(.flex-column) {
1608
+ gap: 24px;
1609
+ gap: var(--size-24);
1684
1610
  }
1685
- [dir="rtl"] .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
1686
- margin-left: calc(0 - 16px);
1687
- margin-left: calc(0 - var(--size-16));
1688
- margin-right: 0;
1689
- margin-right: initial;
1611
+ .np-decision:not(.flex-column).np-decision--small {
1612
+ gap: 16px;
1613
+ gap: var(--size-16);
1690
1614
  }
1691
1615
  .tw-definition-list__item dd {
1692
1616
  word-break: break-all;
@@ -9,6 +9,6 @@ declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTM
9
9
  * Default value: `div`
10
10
  */
11
11
  as?: "div" | "p" | "span" | undefined;
12
- } & import("react").RefAttributes<HTMLSpanElement | HTMLDivElement | HTMLParagraphElement>>;
12
+ } & import("react").RefAttributes<HTMLSpanElement | HTMLParagraphElement | HTMLDivElement>>;
13
13
  export default Body;
14
14
  //# sourceMappingURL=Body.d.ts.map
@@ -13,7 +13,7 @@ export type AriaLabelProperty = {
13
13
  };
14
14
  export type LinkProps = {
15
15
  href: string;
16
- target?: '_blank' | '_self' | '_parent' | '_top';
16
+ target?: React.HTMLAttributeAnchorTarget;
17
17
  onClick?: React.MouseEventHandler<HTMLElement>;
18
18
  };
19
19
  export type Heading = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
@@ -1 +1 @@
1
- {"version":3,"file":"commonProps.d.ts","sourceRoot":"","sources":["../../../src/common/commonProps.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACjD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"commonProps.d.ts","sourceRoot":"","sources":["../../../src/common/commonProps.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC"}
@@ -1,2 +1,2 @@
1
- export function getDayNames(locale: any, format?: string): string[];
1
+ export declare function getDayNames(locale: string, format?: Intl.DateTimeFormatOptions['weekday']): string[];
2
2
  //# sourceMappingURL=getDayNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDayNames.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDayNames/getDayNames.js"],"names":[],"mappings":"AAEA,oEAQC"}
1
+ {"version":3,"file":"getDayNames.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDayNames/getDayNames.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAW,YASxD"}
@@ -1,2 +1,2 @@
1
- export { getDayNames } from "./getDayNames";
1
+ export { getDayNames } from './getDayNames';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDayNames/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDayNames/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,2 +1,2 @@
1
- export function getMonthNames(locale: any, format?: string): string[];
1
+ export declare const getMonthNames: (locale: string, format?: Intl.DateTimeFormatOptions['month']) => string[];
2
2
  //# sourceMappingURL=getMonthNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMonthNames.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getMonthNames/getMonthNames.js"],"names":[],"mappings":"AAEO,sEAUN"}
1
+ {"version":3,"file":"getMonthNames.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getMonthNames/getMonthNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,WAChB,MAAM,WACN,KAAK,qBAAqB,CAAC,OAAO,CAAC,KAC1C,MAAM,EASR,CAAC"}
@@ -1,2 +1,2 @@
1
- export { getMonthNames } from "./getMonthNames";
1
+ export { getMonthNames } from './getMonthNames';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getMonthNames/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getMonthNames/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,7 +1,7 @@
1
- export { getDayNames } from "./getDayNames";
2
- export { moveToWithinRange } from "./moveToWithinRange";
3
- export { isWithinRange } from "./isWithinRange";
4
- export { getMonthNames } from "./getMonthNames";
5
- export { isDateValid } from "./isDateValid";
6
- export { isMonthAndYearFormat } from "./isMonthAndYearFormat";
1
+ export { getDayNames } from './getDayNames';
2
+ export { moveToWithinRange } from './moveToWithinRange';
3
+ export { isWithinRange } from './isWithinRange';
4
+ export { getMonthNames } from './getMonthNames';
5
+ export { isDateValid } from './isDateValid';
6
+ export { isMonthAndYearFormat } from './isMonthAndYearFormat';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/dateUtils/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/dateUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,2 +1,2 @@
1
- export { isDateValid, validDateString } from "./isDateValid";
1
+ export { isDateValid, validDateString } from './isDateValid';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isDateValid/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isDateValid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
- export function isDateValid(date: any): boolean;
2
- export function validDateString(dateString: any): boolean;
1
+ export declare const isDateValid: (date: Date | string | null) => boolean;
2
+ export declare const validDateString: (dateString: string) => boolean;
3
3
  //# sourceMappingURL=isDateValid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDateValid.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isDateValid/isDateValid.js"],"names":[],"mappings":"AAAO,gDAA4E;AAE5E,0DACkE"}
1
+ {"version":3,"file":"isDateValid.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isDateValid/isDateValid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAAU,IAAI,GAAG,MAAM,GAAG,IAAI,YAQrD,CAAC;AAEF,eAAO,MAAM,eAAe,eAAgB,MAAM,YAA0C,CAAC"}
@@ -1,2 +1,2 @@
1
- export { isMonthAndYearFormat } from "./isMonthAndYearFormat";
1
+ export { isMonthAndYearFormat } from './isMonthAndYearFormat';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isMonthAndYearFormat/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isMonthAndYearFormat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,2 +1,2 @@
1
- export function isMonthAndYearFormat(dateString: any): boolean;
1
+ export declare const isMonthAndYearFormat: (dateString: string) => boolean;
2
2
  //# sourceMappingURL=isMonthAndYearFormat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMonthAndYearFormat.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js"],"names":[],"mappings":"AAEO,+DAC0D"}
1
+ {"version":3,"file":"isMonthAndYearFormat.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,eAAgB,MAAM,YACU,CAAC"}
@@ -1,2 +1,2 @@
1
- export { isWithinRange } from "./isWithinRange";
1
+ export { isWithinRange } from './isWithinRange';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isWithinRange/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isWithinRange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +1,2 @@
1
- export function isWithinRange(date: any, min: any, max: any): boolean;
1
+ export declare function isWithinRange(date: Date, min: Date, max: Date): boolean;
2
2
  //# sourceMappingURL=isWithinRange.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isWithinRange.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isWithinRange/isWithinRange.js"],"names":[],"mappings":"AAAA,sEAEC"}
1
+ {"version":3,"file":"isWithinRange.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isWithinRange/isWithinRange.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,WAE7D"}
@@ -1,2 +1,2 @@
1
- export { moveToWithinRange } from "./moveToWithinRange";
1
+ export { moveToWithinRange } from './moveToWithinRange';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/moveToWithinRange/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/moveToWithinRange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,2 +1,2 @@
1
- export function moveToWithinRange(date: any, min: any, max: any): any;
1
+ export declare function moveToWithinRange(date: Date, min: Date, max: Date): Date;
2
2
  //# sourceMappingURL=moveToWithinRange.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"moveToWithinRange.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/moveToWithinRange/moveToWithinRange.js"],"names":[],"mappings":"AAGA,sEAEC"}
1
+ {"version":3,"file":"moveToWithinRange.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/moveToWithinRange/moveToWithinRange.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,QAEjE"}
@@ -16,7 +16,7 @@ declare const Panel: import("react").ForwardRefExoticComponent<{
16
16
  altAxis?: boolean | undefined;
17
17
  open?: boolean | undefined;
18
18
  onClose?: ((event: Event | SyntheticEvent) => void) | undefined;
19
- position?: "left" | "right" | "bottom" | "top" | undefined;
19
+ position?: "top" | "bottom" | "left" | "right" | undefined;
20
20
  anchorRef: RefObject<Element>;
21
21
  anchorWidth?: boolean | undefined;
22
22
  } & {
@@ -5,7 +5,7 @@ declare const ResponsivePanel: import("react").ForwardRefExoticComponent<{
5
5
  altAxis?: boolean | undefined;
6
6
  open?: boolean | undefined;
7
7
  onClose?: ((event: Event | import("react").SyntheticEvent<Element, Event>) => void) | undefined;
8
- position?: "left" | "right" | "bottom" | "top" | undefined;
8
+ position?: "top" | "bottom" | "left" | "right" | undefined;
9
9
  anchorRef: import("react").RefObject<Element>;
10
10
  anchorWidth?: boolean | undefined;
11
11
  } & {
@@ -1,41 +1,30 @@
1
- import * as React from 'react';
2
-
3
- export type DateInputSize = "sm" | "md" | "lg";
4
-
5
- export type DateInputValue = string | Date;
6
-
7
- export type DateInputMonthFormat = "long" | "short";
8
-
9
- export type DateInputMode = "day-month-year" | "month-year";
10
-
11
- export interface DateInputPlaceholders {
12
- day?: React.ReactNode;
13
- month?: React.ReactNode;
14
- year?: React.ReactNode;
15
- }
16
-
17
- export interface DateInputProps {
18
- "aria-label"?: string;
19
- "aria-labelledby"?: string;
20
- disabled?: boolean;
21
- size?: DateInputSize;
22
- value?: DateInputValue;
23
- onChange: (...args: any[])=>any;
24
- onFocus?: (...args: any[])=>any;
25
- onBlur?: (...args: any[])=>any;
26
- dayLabel?: string;
27
- dayAutoComplete?: string;
28
- monthLabel?: string;
29
- yearLabel?: string;
30
- yearAutoComplete?: string;
31
- monthFormat?: DateInputMonthFormat;
32
- mode?: DateInputMode;
33
- placeholders?: DateInputPlaceholders;
34
- id?: string;
35
- selectProps?: Object;
36
- }
37
-
38
- declare const DateInput: React.FC<DateInputProps>;
39
-
40
- export default DateInput;
41
-
1
+ /// <reference types="react" />
2
+ import { SelectInputProps } from '..';
3
+ import { Size, DateMode, MonthFormat } from '../common';
4
+ export interface DateInputProps {
5
+ 'aria-label'?: string;
6
+ 'aria-labelledby'?: string;
7
+ disabled?: boolean;
8
+ size?: Size.SMALL | Size.MEDIUM | Size.LARGE;
9
+ value?: Date | string;
10
+ onChange: (value: string | null) => void;
11
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
12
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
13
+ dayLabel?: string;
14
+ dayAutoComplete?: string;
15
+ monthLabel?: string;
16
+ yearLabel?: string;
17
+ yearAutoComplete?: string;
18
+ monthFormat?: `${MonthFormat}`;
19
+ mode?: `${DateMode}`;
20
+ placeholders?: {
21
+ day?: string;
22
+ month?: string;
23
+ year?: string;
24
+ };
25
+ id?: string;
26
+ selectProps?: Partial<SelectInputProps<number | null>>;
27
+ }
28
+ declare const DateInput: ({ "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, disabled, size, value, dayLabel, dayAutoComplete, monthLabel, yearLabel, yearAutoComplete, monthFormat, mode, onChange, onFocus, onBlur, placeholders, id, selectProps, }: DateInputProps) => import("react").JSX.Element;
29
+ export default DateInput;
30
+ //# sourceMappingURL=DateInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/dateInput/DateInput.js"],"names":[],"mappings":";AAeA;;;;;;;;;;;;;;;;;;;gCA0QC"}
1
+ {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/dateInput/DateInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAsB,gBAAgB,EAA4B,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAQxD,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7C,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CACxD;AAED,QAAA,MAAM,SAAS,4OAmBZ,cAAc,gCAwPhB,CAAC;AA8BF,eAAe,SAAS,CAAC"}
@@ -1,35 +1,26 @@
1
- declare namespace _default {
2
- namespace monthLabel {
3
- const id: string;
4
- const defaultMessage: string;
5
- }
6
- namespace dayLabel {
7
- const id_1: string;
8
- export { id_1 as id };
9
- const defaultMessage_1: string;
10
- export { defaultMessage_1 as defaultMessage };
11
- }
12
- namespace yearLabel {
13
- const id_2: string;
14
- export { id_2 as id };
15
- const defaultMessage_2: string;
16
- export { defaultMessage_2 as defaultMessage };
17
- }
18
- namespace dayPlaceholder {
19
- const id_3: string;
20
- export { id_3 as id };
21
- const defaultMessage_3: string;
22
- export { defaultMessage_3 as defaultMessage };
23
- export const description: string;
24
- }
25
- namespace yearPlaceholder {
26
- const id_4: string;
27
- export { id_4 as id };
28
- const defaultMessage_4: string;
29
- export { defaultMessage_4 as defaultMessage };
30
- const description_1: string;
31
- export { description_1 as description };
32
- }
33
- }
1
+ declare const _default: {
2
+ monthLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ dayLabel: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ yearLabel: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ dayPlaceholder: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ description: string;
18
+ };
19
+ yearPlaceholder: {
20
+ id: string;
21
+ defaultMessage: string;
22
+ description: string;
23
+ };
24
+ };
34
25
  export default _default;
35
26
  //# sourceMappingURL=DateInput.messages.d.ts.map