@ledgerhq/lumen-ui-react 0.1.29 → 0.1.31

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 (107) hide show
  1. package/dist/index.js +7 -5
  2. package/dist/lib/Components/AddressInput/AddressInput.d.ts +4 -4
  3. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +13 -13
  4. package/dist/lib/Components/AmountInput/AmountInput.js +14 -14
  5. package/dist/lib/Components/Banner/Banner.js +5 -5
  6. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  7. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  8. package/dist/lib/Components/BaseInput/BaseInput.js +134 -85
  9. package/dist/lib/Components/BaseInput/types.d.ts +12 -4
  10. package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
  11. package/dist/lib/Components/Button/Button.js +8 -8
  12. package/dist/lib/Components/Card/Card.js +12 -12
  13. package/dist/lib/Components/CardButton/CardButton.js +4 -4
  14. package/dist/lib/Components/DataTable/DataTable.d.ts +1 -1
  15. package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
  16. package/dist/lib/Components/DataTable/DataTable.js +101 -99
  17. package/dist/lib/Components/DataTable/types.d.ts +8 -0
  18. package/dist/lib/Components/DataTable/types.d.ts.map +1 -1
  19. package/dist/lib/Components/Dialog/Dialog.js +13 -13
  20. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +12 -12
  21. package/dist/lib/Components/DotCount/DotCount.js +4 -4
  22. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +4 -4
  23. package/dist/lib/Components/Link/Link.js +6 -6
  24. package/dist/lib/Components/ListItem/ListItem.js +3 -3
  25. package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -1
  26. package/dist/lib/Components/MediaButton/MediaButton.js +9 -9
  27. package/dist/lib/Components/MediaImage/MediaImage.js +9 -9
  28. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  29. package/dist/lib/Components/NavBar/NavBar.js +26 -26
  30. package/dist/lib/Components/Popover/Popover.js +6 -6
  31. package/dist/lib/Components/SearchInput/SearchInput.d.ts +4 -4
  32. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  33. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  34. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +54 -52
  35. package/dist/lib/Components/SegmentedControl/types.d.ts +4 -0
  36. package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
  37. package/dist/lib/Components/Select/Select.d.ts +1 -1
  38. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  39. package/dist/lib/Components/Select/Select.js +41 -39
  40. package/dist/lib/Components/Select/types.d.ts +1 -1
  41. package/dist/lib/Components/Select/types.d.ts.map +1 -1
  42. package/dist/lib/Components/SideBar/SideBar.js +9 -9
  43. package/dist/lib/Components/Skeleton/Skeleton.js +4 -4
  44. package/dist/lib/Components/Switch/Switch.js +5 -5
  45. package/dist/lib/Components/Table/Table.d.ts +1 -1
  46. package/dist/lib/Components/Table/Table.d.ts.map +1 -1
  47. package/dist/lib/Components/Table/Table.js +47 -42
  48. package/dist/lib/Components/Table/types.d.ts +7 -0
  49. package/dist/lib/Components/Table/types.d.ts.map +1 -1
  50. package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +3 -3
  51. package/dist/lib/Components/TextInput/TextInput.d.ts +4 -4
  52. package/dist/lib/Components/Trend/Trend.d.ts +3 -0
  53. package/dist/lib/Components/Trend/Trend.d.ts.map +1 -0
  54. package/dist/lib/Components/Trend/Trend.js +54 -0
  55. package/dist/lib/Components/Trend/index.d.ts +3 -0
  56. package/dist/lib/Components/Trend/index.d.ts.map +1 -0
  57. package/dist/lib/Components/Trend/types.d.ts +20 -0
  58. package/dist/lib/Components/Trend/types.d.ts.map +1 -0
  59. package/dist/lib/Components/index.d.ts +1 -0
  60. package/dist/lib/Components/index.d.ts.map +1 -1
  61. package/dist/lib/Symbols/Icons/Ar.js +2 -2
  62. package/dist/lib/Symbols/Icons/ArrowLeft.js +1 -1
  63. package/dist/lib/Symbols/Icons/ArrowRight.js +1 -1
  64. package/dist/lib/Symbols/Icons/BasketPutIn.js +1 -1
  65. package/dist/lib/Symbols/Icons/Clip.js +1 -1
  66. package/dist/lib/Symbols/Icons/ClockFill.d.ts.map +1 -1
  67. package/dist/lib/Symbols/Icons/ClockFill.js +13 -26
  68. package/dist/lib/Symbols/Icons/CloudDownload.js +1 -1
  69. package/dist/lib/Symbols/Icons/CloudUpload.js +1 -1
  70. package/dist/lib/Symbols/Icons/CoinsAddPlus.js +1 -1
  71. package/dist/lib/Symbols/Icons/CoinsCheck.js +1 -1
  72. package/dist/lib/Symbols/Icons/CoinsCross.js +1 -1
  73. package/dist/lib/Symbols/Icons/ColorPalette.js +1 -1
  74. package/dist/lib/Symbols/Icons/CryptoBitcoinCoin.js +1 -1
  75. package/dist/lib/Symbols/Icons/Csv.js +1 -1
  76. package/dist/lib/Symbols/Icons/Discord.js +1 -1
  77. package/dist/lib/Symbols/Icons/Download.js +1 -1
  78. package/dist/lib/Symbols/Icons/Exchange.js +1 -1
  79. package/dist/lib/Symbols/Icons/ExchangeFill.js +3 -3
  80. package/dist/lib/Symbols/Icons/ExitLogout.js +1 -1
  81. package/dist/lib/Symbols/Icons/Expand.js +1 -1
  82. package/dist/lib/Symbols/Icons/Experiment2.js +1 -1
  83. package/dist/lib/Symbols/Icons/ExternalLink.js +1 -1
  84. package/dist/lib/Symbols/Icons/FileDownload.js +1 -1
  85. package/dist/lib/Symbols/Icons/Github.js +1 -1
  86. package/dist/lib/Symbols/Icons/HandCard.js +1 -1
  87. package/dist/lib/Symbols/Icons/Infinite.js +1 -1
  88. package/dist/lib/Symbols/Icons/MobileArrow.js +1 -1
  89. package/dist/lib/Symbols/Icons/NftHide.js +1 -1
  90. package/dist/lib/Symbols/Icons/Parachute.js +1 -1
  91. package/dist/lib/Symbols/Icons/PictureImage.js +1 -1
  92. package/dist/lib/Symbols/Icons/Range.js +1 -1
  93. package/dist/lib/Symbols/Icons/Reddit.js +2 -2
  94. package/dist/lib/Symbols/Icons/Reduce.js +1 -1
  95. package/dist/lib/Symbols/Icons/Screens.js +1 -1
  96. package/dist/lib/Symbols/Icons/Shapes.js +1 -1
  97. package/dist/lib/Symbols/Icons/Share.js +1 -1
  98. package/dist/lib/Symbols/Icons/StarHalf.js +1 -1
  99. package/dist/lib/Symbols/Icons/TransferHorizontal.js +1 -1
  100. package/dist/lib/Symbols/Icons/TransferVertical.js +1 -1
  101. package/dist/lib/Symbols/Icons/Truck.js +1 -1
  102. package/dist/lib/Symbols/Icons/Usb.js +1 -1
  103. package/dist/lib/Symbols/Icons/UserArrowRight.js +1 -1
  104. package/dist/lib/Symbols/Icons/WalletInput.js +1 -1
  105. package/dist/libs/utils-shared/dist/index.js +146 -133
  106. package/dist/package.json +2 -2
  107. package/package.json +2 -2
@@ -15,7 +15,7 @@ const t = l(
15
15
  "path",
16
16
  {
17
17
  fill: "currentColor",
18
- d: "M6.395 8.08a.734.734 0 0 0-.728.737c0 .405.327.736.728.736.402 0 .73-.33.73-.736a.734.734 0 0 0-.73-.736M8.008 11.298c.279 0 1.228-.033 1.728-.538a.214.214 0 0 0 .016-.273.19.19 0 0 0-.27 0c-.32.315-.982.43-1.465.43s-1.155-.115-1.466-.43a.19.19 0 0 0-.27 0 .196.196 0 0 0 0 .273c.491.496 1.449.538 1.727.538M8.876 8.817c0 .405.328.736.729.736s.729-.33.729-.736a.734.734 0 0 0-.73-.736.734.734 0 0 0-.728.736"
18
+ d: "M6.395 8.08a.734.734 0 0 0-.728.737c0 .405.327.736.728.736.402 0 .73-.33.73-.736a.734.734 0 0 0-.73-.736M8.008 11.298c.279 0 1.228-.033 1.728-.538a.214.214 0 0 0 .016-.273.19.19 0 0 0-.27 0c-.32.315-.982.43-1.465.43s-1.155-.115-1.466-.43a.19.19 0 0 0-.27 0 .196.196 0 0 0 0 .273c.491.497 1.449.538 1.727.538M8.876 8.817c0 .405.328.736.729.736s.729-.33.729-.736a.734.734 0 0 0-.73-.736.734.734 0 0 0-.728.736"
19
19
  }
20
20
  ),
21
21
  /* @__PURE__ */ c(
@@ -23,7 +23,7 @@ const t = l(
23
23
  {
24
24
  fill: "currentColor",
25
25
  fillRule: "evenodd",
26
- d: "M15 8.08c0 3.906-3.134 7.072-7 7.072S1 11.986 1 8.08s3.134-7.07 7-7.07 7 3.165 7 7.07m-3.357-1.033c.565 0 1.024.463 1.024 1.034 0 .422-.254.785-.59.95q.025.148.025.307c0 1.588-1.826 2.87-4.085 2.87S3.93 10.926 3.93 9.337q0-.164.025-.314a1.03 1.03 0 0 1-.606-.943c0-.57.458-1.034 1.023-1.034.27 0 .524.116.704.29.704-.521 1.679-.844 2.768-.877l.515-2.464a.2.2 0 0 1 .082-.116q.063-.037.14-.025l1.694.364a.71.71 0 0 1 .647-.414c.401 0 .729.331.729.736a.734.734 0 0 1-.729.736.733.733 0 0 1-.729-.703L8.68 4.252 8.213 6.46c1.064.041 2.03.372 2.726.877a.98.98 0 0 1 .704-.29",
26
+ d: "M15 8.08c0 3.906-3.134 7.072-7 7.072S1 11.986 1 8.08s3.134-7.07 7-7.07 7 3.165 7 7.07m-3.357-1.033c.565 0 1.024.463 1.024 1.034 0 .422-.254.786-.59.95q.025.148.025.307c0 1.588-1.826 2.87-4.085 2.87S3.93 10.926 3.93 9.337q0-.164.025-.314a1.03 1.03 0 0 1-.606-.943c0-.57.458-1.034 1.023-1.034.27 0 .524.116.704.29.704-.521 1.679-.844 2.768-.877l.515-2.464a.2.2 0 0 1 .082-.116q.063-.037.14-.025l1.694.364a.71.71 0 0 1 .647-.414c.401 0 .729.331.729.736a.734.734 0 0 1-.729.736.733.733 0 0 1-.729-.703L8.68 4.252 8.213 6.46c1.064.041 2.03.372 2.726.877a.98.98 0 0 1 .704-.29",
27
27
  clipRule: "evenodd"
28
28
  }
29
29
  )
@@ -17,7 +17,7 @@ const i = o(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M14.002 8v3.335a2.67 2.67 0 0 1-2.667 2.667h-6.67a2.67 2.67 0 0 1-2.668-2.667v-6.67a2.67 2.67 0 0 1 2.668-2.667H8m-.667 6.669 6.67-6.67m-6.67 6.67h2.668m-2.668 0V5.999"
20
+ d: "M14.002 8v3.335a2.67 2.67 0 0 1-2.667 2.668h-6.67a2.67 2.67 0 0 1-2.668-2.668v-6.67a2.67 2.67 0 0 1 2.668-2.667H8m-.667 6.669 6.67-6.67M7.333 6v2.668h2.668"
21
21
  }
22
22
  )
23
23
  }
@@ -17,7 +17,7 @@ const n = e(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M5.332 1.998h5.336m-6.67 2.5h8.004m.233 9.505h-8.47a1.334 1.334 0 0 1-1.327-1.201l-.434-4.335A1.334 1.334 0 0 1 3.331 7h9.338a1.334 1.334 0 0 1 1.327 1.467l-.434 4.335a1.334 1.334 0 0 1-1.327 1.2"
20
+ d: "M5.332 1.998h5.336m-6.67 2.5h8.004m.233 9.505h-8.47a1.334 1.334 0 0 1-1.327-1.2l-.434-4.336A1.334 1.334 0 0 1 3.331 7h9.338a1.334 1.334 0 0 1 1.327 1.467l-.434 4.335a1.334 1.334 0 0 1-1.327 1.2"
21
21
  }
22
22
  )
23
23
  }
@@ -39,7 +39,7 @@ const s = e(
39
39
  strokeLinecap: "round",
40
40
  strokeLinejoin: "round",
41
41
  strokeWidth: 1.3,
42
- d: "M1.998 5.33A3.333 3.333 0 0 1 5.33 1.999h5.338a3.333 3.333 0 0 1 3.334 3.333v5.338a3.333 3.333 0 0 1-3.334 3.333H5.331a3.333 3.333 0 0 1-3.333-3.333z"
42
+ d: "M1.998 5.33A3.333 3.333 0 0 1 5.33 1.999h5.338a3.333 3.333 0 0 1 3.334 3.333v5.338a3.333 3.333 0 0 1-3.334 3.334H5.331a3.333 3.333 0 0 1-3.333-3.334z"
43
43
  }
44
44
  )
45
45
  ]
@@ -17,7 +17,7 @@ const h = o(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M5.333 6.667H4c-.737 0-1.333.596-1.333 1.333v4.667C2.667 13.403 3.263 14 4 14h8c.737 0 1.333-.597 1.333-1.333V8c0-.737-.596-1.333-1.333-1.333h-1.333M8 2v7.333M8 2 6 4m2-2 2 2"
20
+ d: "M5.333 6.667H4c-.737 0-1.333.596-1.333 1.333v4.667C2.667 13.403 3.263 14 4 14h8c.737 0 1.333-.597 1.333-1.333V8c0-.737-.596-1.333-1.333-1.333h-1.333M8 2v7.333M10 4 8 2 6 4"
21
21
  }
22
22
  )
23
23
  }
@@ -25,7 +25,7 @@ const i = t(
25
25
  strokeLinecap: "round",
26
26
  strokeLinejoin: "round",
27
27
  strokeWidth: 1.3,
28
- d: "M4.12 13.33 8 11.49l3.866 1.817-.8-4.08 2.927-2.987-4.12-.513-1.88-3.747-1.88 3.753M4.12 13.33l.8-4.08-2.926-2.997 4.12-.52M4.12 13.33l3.382-1.676.051-8.758-1.439 2.837"
28
+ d: "m6.113 5.733 1.44-2.837-.052 8.758L4.12 13.33l.8-4.08-2.926-2.997zl1.88-3.753 1.88 3.747 4.12.513-2.927 2.987.8 4.08L8 11.49l-3.88 1.84"
29
29
  }
30
30
  )
31
31
  ]
@@ -17,7 +17,7 @@ const n = o(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "m5.333 9.333-2 2m0 0 2 2m-2-2h9.334m-2-4.666 2-2m0 0-2-2m2 2H3.333"
20
+ d: "m5.333 13.333-2-2 2-2m-2 2h9.334m-2-8.666 2 2-2 2m2-2H3.333"
21
21
  }
22
22
  )
23
23
  }
@@ -17,7 +17,7 @@ const i = e(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "m6.667 5.333-2-2m0 0-2 2m2-2v9.334m4.666-2 2 2m0 0 2-2m-2 2V3.333"
20
+ d: "m2.667 5.333 2-2 2 2m-2-2v9.334m8.667-2-2 2-2-2m2 2V3.333"
21
21
  }
22
22
  )
23
23
  }
@@ -17,7 +17,7 @@ const h = o(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M6.667 2.667h2.666c.367 0 .667.293.667.666V10H1.333m2 2.94H2a.67.67 0 0 1-.667-.667V8.66M10 4.667h2.882c.267 0 .513.16.613.413l1.067 2.673q.092.232.093.494v3.965c0 .367-.3.667-.666.667h-1.227m-2.095.068h-5.22m9.22-3.614H12V6.667h2.133m-12.8-4h3.334m-3.334 2h2M2 6.667h-.667m11.136 5.526c.407.407.407 1.08 0 1.494a1.067 1.067 0 0 1-1.493 0 1.054 1.054 0 0 1 0-1.494 1.054 1.054 0 0 1 1.493 0m-7.333 0c.407.407.407 1.08 0 1.494a1.067 1.067 0 0 1-1.493 0 1.054 1.054 0 0 1 0-1.494 1.054 1.054 0 0 1 1.493 0"
20
+ d: "M6.667 2.667h2.666c.367 0 .667.293.667.666V10H1.333m2 2.94H2a.67.67 0 0 1-.667-.667V8.66M10 4.667h2.882c.267 0 .513.16.613.413l1.067 2.673q.092.232.093.494v3.965c0 .367-.3.667-.666.667h-1.227m-2.095.068h-5.22m9.22-3.614H12V6.667h2.133m-12.8-4h3.334m-3.334 2h2M2 6.667h-.667m11.136 5.526c.407.407.407 1.08 0 1.494a1.066 1.066 0 0 1-1.493 0 1.054 1.054 0 0 1 0-1.494 1.054 1.054 0 0 1 1.493 0m-7.333 0c.407.407.407 1.08 0 1.494a1.066 1.066 0 0 1-1.493 0 1.054 1.054 0 0 1 0-1.494 1.054 1.054 0 0 1 1.493 0"
21
21
  }
22
22
  )
23
23
  }
@@ -17,7 +17,7 @@ const i = r(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M8 11.333a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333m0 0v-10m0 0 1.5 1.5M8 1.333l-1.5 1.5M8 10.147 5.373 9.56a1.34 1.34 0 0 1-1.046-1.307V7.32M8 9.1l2.713-.82c.56-.173.947-.693.947-1.28v-.68M11.167 4h1c.368 0 .666.298.666.667v1a.667.667 0 0 1-.666.666h-1a.667.667 0 0 1-.667-.666v-1c0-.369.298-.667.667-.667M4.333 5a1.167 1.167 0 1 0 0 2.333 1.167 1.167 0 0 0 0-2.333"
20
+ d: "M8 11.333a1.667 1.667 0 1 0 0 3.334 1.667 1.667 0 0 0 0-3.334m0 0v-10m-1.5 1.5 1.5-1.5 1.5 1.5M8 10.147 5.373 9.56a1.34 1.34 0 0 1-1.046-1.307V7.32M8 9.1l2.713-.82c.56-.173.947-.693.947-1.28v-.68M11.167 4h1c.368 0 .666.299.666.667v1a.667.667 0 0 1-.666.666h-1a.667.667 0 0 1-.667-.666v-1c0-.368.299-.667.667-.667M4.333 5a1.167 1.167 0 1 0 0 2.333 1.167 1.167 0 0 0 0-2.333"
21
21
  }
22
22
  )
23
23
  }
@@ -17,7 +17,7 @@ const i = o(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M11.333 13.333A2.916 2.916 0 0 0 8.4 10.4H5a2.916 2.916 0 0 0-2.933 2.933M11.333 8h3.334m0 0-1.334 1.333M14.667 8l-1.334-1.333M4.667 3.6C3.6 4.667 3.6 6.467 4.667 7.533 5.733 8.6 7.533 8.6 8.6 7.533s1.067-2.866 0-3.933-2.8-1.067-3.933 0"
20
+ d: "M11.333 13.333A2.916 2.916 0 0 0 8.4 10.4H5a2.916 2.916 0 0 0-2.933 2.933M11.333 8h3.334m-1.334-1.333L14.667 8l-1.334 1.333M4.667 3.6C3.6 4.667 3.6 6.467 4.667 7.533 5.733 8.6 7.533 8.6 8.6 7.533s1.067-2.866 0-3.933-2.8-1.067-3.933 0"
21
21
  }
22
22
  )
23
23
  }
@@ -17,7 +17,7 @@ const n = o(
17
17
  strokeLinecap: "round",
18
18
  strokeLinejoin: "round",
19
19
  strokeWidth: 1.3,
20
- d: "M1.998 4.665h10.67c.737 0 1.335.598 1.335 1.334v6.336c0 .921-.747 1.667-1.668 1.667H8.667m2.668-9.337v-.667c0-.736-.598-1.334-1.334-1.334H3.665c-.921 0-1.667.747-1.667 1.668V10m4.668 2.668H1.998m4.668 0-1.334 1.333m1.334-1.333-1.334-1.334m6.002-2.001h-.666"
20
+ d: "M1.998 4.665h10.67c.737 0 1.335.597 1.335 1.334v6.336c0 .921-.747 1.667-1.668 1.667H8.667m2.668-9.337v-.667c0-.736-.597-1.334-1.334-1.334H3.665c-.92 0-1.667.747-1.667 1.668V10m4.668 2.668H1.998m3.334-1.334 1.334 1.334-1.334 1.333m6.002-4.668h-.666"
21
21
  }
22
22
  )
23
23
  }
@@ -1,133 +1,133 @@
1
- import { jsx as S } from "react/jsx-runtime";
2
- import { useMemo as M, createContext as R, useRef as E, useContext as L } from "react";
3
- import { clsx as W } from "clsx";
4
- import { twMerge as q } from "tailwind-merge";
5
- function G(e) {
1
+ import { jsx as W } from "react/jsx-runtime";
2
+ import { useMemo as M, createContext as L, useRef as R, useContext as E } from "react";
3
+ import { clsx as q } from "clsx";
4
+ import { twMerge as I } from "tailwind-merge";
5
+ function J(e) {
6
6
  return e ? e.split(/[-_ ]+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join("") : "";
7
7
  }
8
- const N = 48, I = 17, z = 2;
9
- function H(e) {
8
+ const N = 48, B = 17, F = 2;
9
+ function V(e) {
10
10
  const t = e.replace(/\D/g, "").length;
11
11
  return Math.max(
12
- I,
13
- N - t * z
12
+ B,
13
+ N - t * F
14
14
  );
15
15
  }
16
- function T(e, t = !0) {
16
+ function w(e, t = !0) {
17
17
  if (!e) return "";
18
- const a = e.includes("."), [u, l] = e.split("."), o = u.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
19
- return a && t ? l ? `${o}.${l}` : `${o}.` : o;
18
+ const l = e.includes("."), [o, a] = e.split("."), u = o.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
19
+ return l && t ? a ? `${u}.${a}` : `${u}.` : u;
20
20
  }
21
- function V(e, t = {}) {
21
+ function X(e, t = {}) {
22
22
  const {
23
- allowDecimals: a = !0,
24
- thousandsSeparator: u = !0,
25
- maxIntegerLength: l = 9,
26
- maxDecimalLength: o = 9
23
+ allowDecimals: l = !0,
24
+ thousandsSeparator: o = !0,
25
+ maxIntegerLength: a = 9,
26
+ maxDecimalLength: u = 9
27
27
  } = t, r = e.replace(",", ".").replace(/[^\d.]/g, "");
28
28
  let n = r;
29
- if (n = n.replace(/^0+(?=\d)/, ""), !a)
30
- return n = n.replace(/\D/g, ""), l > 0 && n.length > l && (n = n.slice(0, l)), u ? T(n) : n;
29
+ if (n = n.replace(/^0+(?=\d)/, ""), !l)
30
+ return n = n.replace(/\D/g, ""), a > 0 && n.length > a && (n = n.slice(0, a)), o ? w(n) : n;
31
31
  n === "." && (n = "0.");
32
- const s = n.indexOf(".");
33
- if (s !== -1) {
34
- let i = n.slice(0, s), f = n.slice(s + 1).replace(/\./g, "");
35
- l > 0 && i.length > l && (i = i.slice(0, l)), f = f.slice(0, o), i === "" && (i = "0");
36
- const g = r.endsWith(".") || n.endsWith(".");
37
- n = f.length > 0 ? `${i}.${f}` : g ? `${i}.` : i;
32
+ const c = n.indexOf(".");
33
+ if (c !== -1) {
34
+ let i = n.slice(0, c), d = n.slice(c + 1).replace(/\./g, "");
35
+ a > 0 && i.length > a && (i = i.slice(0, a)), d = d.slice(0, u), i === "" && (i = "0");
36
+ const h = r.endsWith(".") || n.endsWith(".");
37
+ n = d.length > 0 ? `${i}.${d}` : h ? `${i}.` : i;
38
38
  } else
39
- l > 0 && n.length > l && (n = n.slice(0, l));
40
- return u ? T(n) : n;
39
+ a > 0 && n.length > a && (n = n.slice(0, a));
40
+ return o ? w(n) : n;
41
41
  }
42
- function B(e, t) {
42
+ function z(e, t) {
43
43
  if (Object.is(e, t)) return !0;
44
- const a = e, u = t, l = Object.keys(a), o = Object.keys(u);
45
- return l.length !== o.length ? !1 : l.every(
46
- (r) => Object.prototype.hasOwnProperty.call(u, r) && Object.is(a[r], u[r])
44
+ const l = e, o = t, a = Object.keys(l), u = Object.keys(o);
45
+ return a.length !== u.length ? !1 : a.every(
46
+ (r) => Object.prototype.hasOwnProperty.call(o, r) && Object.is(l[r], o[r])
47
47
  );
48
48
  }
49
- function F(e, t) {
50
- const a = R(t), u = ({ children: o, value: r }) => {
51
- const n = E(r);
52
- return B(n.current, r) || (n.current = r), /* @__PURE__ */ S(a.Provider, { value: n.current, children: o });
49
+ function K(e, t) {
50
+ const l = L(t), o = ({ children: u, value: r }) => {
51
+ const n = R(r);
52
+ return z(n.current, r) || (n.current = r), /* @__PURE__ */ W(l.Provider, { value: n.current, children: u });
53
53
  };
54
- u.displayName = e + "Provider";
55
- function l({
56
- consumerName: o,
54
+ o.displayName = e + "Provider";
55
+ function a({
56
+ consumerName: u,
57
57
  contextRequired: r
58
58
  }) {
59
- const n = L(a);
59
+ const n = E(l);
60
60
  if (n)
61
61
  return n;
62
62
  if (r)
63
63
  throw new Error(
64
- `${o} must be used within ${e}`
64
+ `${u} must be used within ${e}`
65
65
  );
66
66
  return t || {};
67
67
  }
68
- return [u, l];
68
+ return [o, a];
69
69
  }
70
- const [X, K] = F("Disabled", { disabled: !1 }), ee = ({
70
+ const [ee, U] = K("Disabled", { disabled: !1 }), te = ({
71
71
  consumerName: e,
72
72
  contextRequired: t,
73
- mergeWith: a
73
+ mergeWith: l
74
74
  }) => {
75
- const u = K({
75
+ const o = U({
76
76
  consumerName: e,
77
77
  contextRequired: t ?? !1
78
78
  });
79
- return !!(a?.disabled || u.disabled);
79
+ return !!(l?.disabled || o.disabled);
80
80
  };
81
- function te(...e) {
82
- return q(W(e));
81
+ function ne(...e) {
82
+ return I(q(e));
83
83
  }
84
- function v(e, t) {
84
+ function T(e, t) {
85
85
  if (typeof e == "function")
86
86
  return e(t);
87
87
  typeof e == "object" && e !== null && "current" in e && (e.current = t);
88
88
  }
89
- function U(...e) {
89
+ function H(...e) {
90
90
  const t = /* @__PURE__ */ new Map();
91
- return (a) => {
92
- if (a === null) {
93
- e.forEach((u) => {
94
- const l = t.get(u);
95
- typeof l == "function" && l(), v(u, null);
91
+ return (l) => {
92
+ if (l === null) {
93
+ e.forEach((o) => {
94
+ const a = t.get(o);
95
+ typeof a == "function" && a(), T(o, null);
96
96
  }), t.clear();
97
97
  return;
98
98
  }
99
- e.forEach((u) => {
100
- const l = v(u, a);
101
- typeof l == "function" && t.set(u, l);
99
+ e.forEach((o) => {
100
+ const a = T(o, l);
101
+ typeof a == "function" && t.set(o, a);
102
102
  });
103
103
  };
104
104
  }
105
- function ne(...e) {
106
- return M(() => U(...e), e);
105
+ function re(...e) {
106
+ return M(() => H(...e), e);
107
107
  }
108
- const re = ({
108
+ const le = ({
109
109
  currentStep: e,
110
110
  totalSteps: t,
111
- size: a,
112
- label: u,
113
- strokeWidth: l = 4,
114
- arcPercentage: o = 0.75
111
+ size: l,
112
+ label: o,
113
+ strokeWidth: a = 4,
114
+ arcPercentage: u = 0.75
115
115
  }) => {
116
- const r = Math.min(Math.max(e, 0), t), n = u ?? `${r}/${t}`, s = t <= 0 ? 0 : r / t, i = (a - l) / 2, f = a / 2, g = a / 2, d = 2 * Math.PI * i, p = d * o, b = p * (1 - s), h = r <= 0, D = `${p} ${d}`, $ = h ? p - 2 : b;
116
+ const r = Math.min(Math.max(e, 0), t), n = o ?? `${r}/${t}`, c = t <= 0 ? 0 : r / t, i = (l - a) / 2, d = l / 2, h = l / 2, f = 2 * Math.PI * i, p = f * u, x = p * (1 - c), g = r <= 0, D = `${p} ${f}`, P = g ? p - 2 : x;
117
117
  return {
118
118
  displayLabel: n,
119
- progress: s,
119
+ progress: c,
120
120
  r: i,
121
- cx: f,
122
- cy: g,
123
- circumference: d,
121
+ cx: d,
122
+ cy: h,
123
+ circumference: f,
124
124
  trackArcLength: p,
125
- trackDashArray: `${p} ${d}`,
125
+ trackDashArray: `${p} ${f}`,
126
126
  progressDashArray: D,
127
- progressDashOffset: $,
128
- showMinimalDot: h
127
+ progressDashOffset: P,
128
+ showMinimalDot: g
129
129
  };
130
- }, le = (e) => M(
130
+ }, ae = (e) => M(
131
131
  () => ({
132
132
  integerPart: Array.from(e.integerPart, (t) => ({
133
133
  value: t,
@@ -139,57 +139,57 @@ const re = ({
139
139
  })) : []
140
140
  }),
141
141
  [e.integerPart, e.decimalPart]
142
- ), ae = (e, t, a) => {
143
- if (t) return a;
144
- const u = e.decimalPart ? `${e.decimalSeparator}${e.decimalPart}` : "", l = `${e.integerPart}${u}`;
145
- return e.currencyPosition === "end" ? `${l} ${e.currencyText}` : `${e.currencyText} ${l}`;
142
+ ), oe = (e, t, l) => {
143
+ if (t) return l;
144
+ const o = e.decimalPart ? `${e.decimalSeparator}${e.decimalPart}` : "", a = `${e.integerPart}${o}`;
145
+ return e.currencyPosition === "end" ? `${a} ${e.currencyText}` : `${e.currencyText} ${a}`;
146
146
  };
147
- function J(e, t, a = {}) {
148
- const { leading: u = !1, trailing: l = !0, maxWait: o } = a;
149
- let r = null, n = null, s = null, i = 0, f = null, g = null, d;
150
- const p = o !== void 0, b = p ? Math.max(o, t) : 0, h = (c) => {
151
- i = c;
152
- const m = f, y = g;
153
- return f = null, g = null, d = e.apply(y, m), d;
154
- }, D = (c) => {
155
- const m = s ? c - s : 0;
147
+ function Q(e, t, l = {}) {
148
+ const { leading: o = !1, trailing: a = !0, maxWait: u } = l;
149
+ let r = null, n = null, c = null, i = 0, d = null, h = null, f;
150
+ const p = u !== void 0, x = p ? Math.max(u, t) : 0, g = (s) => {
151
+ i = s;
152
+ const m = d, b = h;
153
+ return d = null, h = null, f = e.apply(b, m), f;
154
+ }, D = (s) => {
155
+ const m = c ? s - c : 0;
156
156
  return t - m;
157
- }, $ = (c) => {
158
- const m = s ? c - s : t, y = c - i;
159
- return s === null || m >= t || m < 0 || p && y >= b;
160
- }, w = (c) => (r = null, l && f ? h(c) : (f = null, g = null, d)), x = () => {
161
- const c = Date.now();
162
- if ($(c)) {
163
- w(c);
157
+ }, P = (s) => {
158
+ const m = c ? s - c : t, b = s - i;
159
+ return c === null || m >= t || m < 0 || p && b >= x;
160
+ }, v = (s) => (r = null, a && d ? g(s) : (d = null, h = null, f)), y = () => {
161
+ const s = Date.now();
162
+ if (P(s)) {
163
+ v(s);
164
164
  return;
165
165
  }
166
- r = setTimeout(x, D(c));
167
- }, k = () => {
168
- const c = Date.now();
169
- n = null, f && (h(c), r !== null && (clearTimeout(r), r = setTimeout(x, t)));
170
- }, C = (c) => (i = c, r = setTimeout(x, t), p && (n = setTimeout(k, b)), u ? h(c) : d), j = () => {
171
- r !== null && clearTimeout(r), n !== null && clearTimeout(n), i = 0, f = null, g = null, s = null, r = null, n = null;
172
- }, A = () => r === null && n === null ? d : w(Date.now()), O = () => r !== null || n !== null, P = function(...c) {
173
- const m = Date.now(), y = $(m);
174
- if (f = c, g = this, s = m, y) {
166
+ r = setTimeout(y, D(s));
167
+ }, S = () => {
168
+ const s = Date.now();
169
+ n = null, d && (g(s), r !== null && (clearTimeout(r), r = setTimeout(y, t)));
170
+ }, j = (s) => (i = s, r = setTimeout(y, t), p && (n = setTimeout(S, x)), o ? g(s) : f), k = () => {
171
+ r !== null && clearTimeout(r), n !== null && clearTimeout(n), i = 0, d = null, h = null, c = null, r = null, n = null;
172
+ }, A = () => r === null && n === null ? f : v(Date.now()), O = () => r !== null || n !== null, $ = function(...s) {
173
+ const m = Date.now(), b = P(m);
174
+ if (d = s, h = this, c = m, b) {
175
175
  if (r === null)
176
- return C(m);
176
+ return j(m);
177
177
  if (p)
178
- return clearTimeout(r), r = setTimeout(x, t), h(m);
178
+ return clearTimeout(r), r = setTimeout(y, t), g(m);
179
179
  }
180
- return r === null && (r = setTimeout(x, t)), d;
180
+ return r === null && (r = setTimeout(y, t)), f;
181
181
  };
182
- return P.cancel = j, P.flush = A, P.pending = O, P;
182
+ return $.cancel = k, $.flush = A, $.pending = O, $;
183
183
  }
184
- function ue(e, t, a = {}) {
185
- const { leading: u = !0, trailing: l = !0 } = a;
186
- return J(e, t, {
187
- leading: u,
188
- trailing: l,
184
+ function se(e, t, l = {}) {
185
+ const { leading: o = !0, trailing: a = !0 } = l;
186
+ return Q(e, t, {
187
+ leading: o,
188
+ trailing: a,
189
189
  maxWait: t
190
190
  });
191
191
  }
192
- const ce = ({
192
+ const ue = ({
193
193
  onClick: e,
194
194
  disabled: t
195
195
  }) => e ? t ? {
@@ -199,28 +199,41 @@ const ce = ({
199
199
  } : {
200
200
  role: "button",
201
201
  tabIndex: 0,
202
- onKeyDown: (a) => {
203
- (a.key === "Enter" || a.key === " ") && (a.preventDefault(), e?.(a));
202
+ onKeyDown: (l) => {
203
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), e?.(l));
204
204
  },
205
205
  onClick: e
206
- } : void 0;
206
+ } : void 0, C = " ", ie = ({
207
+ label: e,
208
+ placeholder: t
209
+ }) => {
210
+ const l = typeof t == "string" && t.trim().length > 0 ? t : void 0;
211
+ return e ? {
212
+ inputPlaceholder: l ?? C,
213
+ labelStaysFloatedWithPlaceholder: l !== void 0
214
+ } : {
215
+ inputPlaceholder: t ?? C,
216
+ labelStaysFloatedWithPlaceholder: !1
217
+ };
218
+ };
207
219
  export {
208
- X as DisabledProvider,
209
- v as assignRef,
210
- ae as buildAriaLabel,
211
- te as cn,
212
- F as createSafeContext,
213
- J as debounce,
214
- T as formatThousands,
215
- ce as getButtonA11yProps,
216
- H as getFontSize,
217
- re as getStepperCalculations,
218
- U as mergeRefs,
219
- B as shallowEqual,
220
- V as textFormatter,
221
- ue as throttle,
222
- G as toPascalCase,
223
- ee as useDisabledContext,
224
- ne as useMergedRef,
225
- le as useSplitText
220
+ ee as DisabledProvider,
221
+ T as assignRef,
222
+ oe as buildAriaLabel,
223
+ ne as cn,
224
+ K as createSafeContext,
225
+ Q as debounce,
226
+ w as formatThousands,
227
+ ue as getButtonA11yProps,
228
+ V as getFontSize,
229
+ le as getStepperCalculations,
230
+ H as mergeRefs,
231
+ ie as resolveBaseInputPlaceholder,
232
+ z as shallowEqual,
233
+ X as textFormatter,
234
+ se as throttle,
235
+ J as toPascalCase,
236
+ te as useDisabledContext,
237
+ re as useMergedRef,
238
+ ae as useSplitText
226
239
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -55,7 +55,7 @@
55
55
  "@radix-ui/react-tooltip": "^1.2.8",
56
56
  "class-variance-authority": "^0.7.1",
57
57
  "@tanstack/react-table": "^8.21.3",
58
- "@ledgerhq/lumen-design-core": "0.1.12",
58
+ "@ledgerhq/lumen-design-core": "0.1.13",
59
59
  "clsx": "^2.1.1",
60
60
  "react": "^18.0.0 || ^19.0.0",
61
61
  "react-dom": "^18.0.0 || ^19.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -55,7 +55,7 @@
55
55
  "@radix-ui/react-tooltip": "^1.2.8",
56
56
  "class-variance-authority": "^0.7.1",
57
57
  "@tanstack/react-table": "^8.21.3",
58
- "@ledgerhq/lumen-design-core": "0.1.12",
58
+ "@ledgerhq/lumen-design-core": "0.1.13",
59
59
  "clsx": "^2.1.1",
60
60
  "react": "^18.0.0 || ^19.0.0",
61
61
  "react-dom": "^18.0.0 || ^19.0.0",