@vkzstudio/muza-ui 1.2.0 → 1.4.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 (204) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +52 -2
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +111 -76
  4. package/dist/components/ArticleCard/ArticleCard.d.ts +178 -0
  5. package/dist/components/ArticleCard/ArticleCard.d.ts.map +1 -0
  6. package/dist/components/ArticleCard/ArticleCard.js +542 -0
  7. package/dist/components/ArticleCard/ArticleCard.stories.d.ts +14 -0
  8. package/dist/components/ArticleCard/ArticleCard.stories.d.ts.map +1 -0
  9. package/dist/components/ArticleCard/index.d.ts +2 -0
  10. package/dist/components/ArticleCard/index.d.ts.map +1 -0
  11. package/dist/components/BalanceListView/BalanceListView.examples.d.ts +38 -0
  12. package/dist/components/BalanceListView/BalanceListView.examples.d.ts.map +1 -0
  13. package/dist/components/BalanceListView/BalanceListView.stories.d.ts +8 -0
  14. package/dist/components/BalanceListView/BalanceListView.stories.d.ts.map +1 -0
  15. package/dist/components/ButtonArrow/ButtonArrow.d.ts +3 -3
  16. package/dist/components/ButtonArrow/ButtonArrow.d.ts.map +1 -1
  17. package/dist/components/ButtonArrow/ButtonArrow.js +26 -25
  18. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  19. package/dist/components/Calendar/Calendar.js +5 -5
  20. package/dist/components/Calendar/index.d.ts +1 -2
  21. package/dist/components/Calendar/index.d.ts.map +1 -1
  22. package/dist/components/Carousel/Carousel.d.ts +9 -0
  23. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  24. package/dist/components/Carousel/Carousel.js +135 -133
  25. package/dist/components/CarouselSection/CarouselSection.examples.d.ts +34 -0
  26. package/dist/components/CarouselSection/CarouselSection.examples.d.ts.map +1 -0
  27. package/dist/components/CarouselSection/CarouselSection.stories.d.ts +8 -0
  28. package/dist/components/CarouselSection/CarouselSection.stories.d.ts.map +1 -0
  29. package/dist/components/CategoryCard/CategoryCard.d.ts +97 -0
  30. package/dist/components/CategoryCard/CategoryCard.d.ts.map +1 -0
  31. package/dist/components/CategoryCard/CategoryCard.js +152 -0
  32. package/dist/components/CategoryCard/CategoryCard.stories.d.ts +14 -0
  33. package/dist/components/CategoryCard/CategoryCard.stories.d.ts.map +1 -0
  34. package/dist/components/CategoryCard/index.d.ts +2 -0
  35. package/dist/components/CategoryCard/index.d.ts.map +1 -0
  36. package/dist/components/CategoryIcon/CategoryIcon.d.ts +45 -0
  37. package/dist/components/CategoryIcon/CategoryIcon.d.ts.map +1 -0
  38. package/dist/components/CategoryIcon/CategoryIcon.js +54 -0
  39. package/dist/components/CategoryIcon/CategoryIcon.stories.d.ts +10 -0
  40. package/dist/components/CategoryIcon/CategoryIcon.stories.d.ts.map +1 -0
  41. package/dist/components/CategoryIcon/index.d.ts +2 -0
  42. package/dist/components/CategoryIcon/index.d.ts.map +1 -0
  43. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  44. package/dist/components/DatePicker/DatePicker.js +5 -5
  45. package/dist/components/Dialog/Dialog.d.ts +12 -6
  46. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  47. package/dist/components/Dialog/Dialog.js +116 -120
  48. package/dist/components/Dialog/Dialog.stories.d.ts +1 -0
  49. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
  50. package/dist/components/DotDivider/DotDivider.d.ts +35 -0
  51. package/dist/components/DotDivider/DotDivider.d.ts.map +1 -0
  52. package/dist/components/DotDivider/DotDivider.js +31 -0
  53. package/dist/components/DotDivider/DotDivider.stories.d.ts +10 -0
  54. package/dist/components/DotDivider/DotDivider.stories.d.ts.map +1 -0
  55. package/dist/components/DotDivider/index.d.ts +2 -0
  56. package/dist/components/DotDivider/index.d.ts.map +1 -0
  57. package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  58. package/dist/components/DropdownMenu/DropdownMenu.js +13 -13
  59. package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
  60. package/dist/components/EdgeButton/EdgeButton.js +10 -11
  61. package/dist/components/EmptyState/EmptyState.js +19 -19
  62. package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
  63. package/dist/components/FileUpload/FileItem.js +8 -9
  64. package/dist/components/FileUpload/FileUpload.js +3 -3
  65. package/dist/components/HeartButton/HeartButton.d.ts +61 -0
  66. package/dist/components/HeartButton/HeartButton.d.ts.map +1 -0
  67. package/dist/components/HeartButton/HeartButton.js +88 -0
  68. package/dist/components/HeartButton/HeartButton.stories.d.ts +10 -0
  69. package/dist/components/HeartButton/HeartButton.stories.d.ts.map +1 -0
  70. package/dist/components/HeartButton/index.d.ts +2 -0
  71. package/dist/components/HeartButton/index.d.ts.map +1 -0
  72. package/dist/components/Icons/CustomBadges.d.ts +20 -0
  73. package/dist/components/Icons/CustomBadges.d.ts.map +1 -1
  74. package/dist/components/Icons/CustomBadges.js +176 -21
  75. package/dist/components/Icons/CustomIcons.d.ts +13 -0
  76. package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
  77. package/dist/components/Icons/CustomIcons.js +50 -30
  78. package/dist/components/Icons/LogosAndBadges.stories.d.ts +2 -1
  79. package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -1
  80. package/dist/components/InputOTP/InputOTP.d.ts +95 -0
  81. package/dist/components/InputOTP/InputOTP.d.ts.map +1 -0
  82. package/dist/components/InputOTP/InputOTP.js +187 -0
  83. package/dist/components/InputOTP/InputOTP.stories.d.ts +18 -0
  84. package/dist/components/InputOTP/InputOTP.stories.d.ts.map +1 -0
  85. package/dist/components/InputOTP/index.d.ts +3 -0
  86. package/dist/components/InputOTP/index.d.ts.map +1 -0
  87. package/dist/components/InputOTP/useWebOtpAutofill.d.ts +33 -0
  88. package/dist/components/InputOTP/useWebOtpAutofill.d.ts.map +1 -0
  89. package/dist/components/InputOTP/useWebOtpAutofill.js +25 -0
  90. package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
  91. package/dist/components/LanguageSwitcher/LanguageSwitcher.js +65 -55
  92. package/dist/components/LoginScreen/LoginScreen.d.ts +10 -1
  93. package/dist/components/LoginScreen/LoginScreen.d.ts.map +1 -1
  94. package/dist/components/LoginScreen/LoginScreen.js +23 -17
  95. package/dist/components/MarketNav/MarketNav.examples.d.ts +60 -0
  96. package/dist/components/MarketNav/MarketNav.examples.d.ts.map +1 -0
  97. package/dist/components/MarketNav/MarketNav.stories.d.ts +9 -0
  98. package/dist/components/MarketNav/MarketNav.stories.d.ts.map +1 -0
  99. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  100. package/dist/components/OfferCard/OfferCard.d.ts +206 -0
  101. package/dist/components/OfferCard/OfferCard.d.ts.map +1 -0
  102. package/dist/components/OfferCard/OfferCard.js +423 -0
  103. package/dist/components/OfferCard/OfferCard.stories.d.ts +15 -0
  104. package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -0
  105. package/dist/components/OfferCard/index.d.ts +2 -0
  106. package/dist/components/OfferCard/index.d.ts.map +1 -0
  107. package/dist/components/PageContainer/PageContainer.d.ts +53 -0
  108. package/dist/components/PageContainer/PageContainer.d.ts.map +1 -0
  109. package/dist/components/PageContainer/PageContainer.js +49 -0
  110. package/dist/components/PageContainer/PageContainer.stories.d.ts +14 -0
  111. package/dist/components/PageContainer/PageContainer.stories.d.ts.map +1 -0
  112. package/dist/components/PageContainer/index.d.ts +2 -0
  113. package/dist/components/PageContainer/index.d.ts.map +1 -0
  114. package/dist/components/PartnerCard/PartnerCard.d.ts +234 -0
  115. package/dist/components/PartnerCard/PartnerCard.d.ts.map +1 -0
  116. package/dist/components/PartnerCard/PartnerCard.js +591 -0
  117. package/dist/components/PartnerCard/PartnerCard.stories.d.ts +14 -0
  118. package/dist/components/PartnerCard/PartnerCard.stories.d.ts.map +1 -0
  119. package/dist/components/PartnerCard/index.d.ts +2 -0
  120. package/dist/components/PartnerCard/index.d.ts.map +1 -0
  121. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.examples.d.ts +35 -0
  122. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.examples.d.ts.map +1 -0
  123. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.stories.d.ts +11 -0
  124. package/dist/components/PaymentMethodSelect/PaymentMethodSelect.stories.d.ts.map +1 -0
  125. package/dist/components/Rating/Rating.d.ts +62 -0
  126. package/dist/components/Rating/Rating.d.ts.map +1 -0
  127. package/dist/components/Rating/Rating.js +88 -0
  128. package/dist/components/Rating/Rating.stories.d.ts +12 -0
  129. package/dist/components/Rating/Rating.stories.d.ts.map +1 -0
  130. package/dist/components/Rating/index.d.ts +2 -0
  131. package/dist/components/Rating/index.d.ts.map +1 -0
  132. package/dist/components/RatingBlock/RatingBlock.d.ts +65 -0
  133. package/dist/components/RatingBlock/RatingBlock.d.ts.map +1 -0
  134. package/dist/components/RatingBlock/RatingBlock.js +92 -0
  135. package/dist/components/RatingBlock/RatingBlock.stories.d.ts +12 -0
  136. package/dist/components/RatingBlock/RatingBlock.stories.d.ts.map +1 -0
  137. package/dist/components/RatingBlock/index.d.ts +2 -0
  138. package/dist/components/RatingBlock/index.d.ts.map +1 -0
  139. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
  140. package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +5 -5
  141. package/dist/components/SearchFilters/SearchFilters.d.ts +88 -0
  142. package/dist/components/SearchFilters/SearchFilters.d.ts.map +1 -0
  143. package/dist/components/SearchFilters/SearchFilters.js +176 -0
  144. package/dist/components/SearchFilters/SearchFilters.stories.d.ts +12 -0
  145. package/dist/components/SearchFilters/SearchFilters.stories.d.ts.map +1 -0
  146. package/dist/components/SearchFilters/index.d.ts +2 -0
  147. package/dist/components/SearchFilters/index.d.ts.map +1 -0
  148. package/dist/components/SegmentedControl/SegmentedControl.js +11 -11
  149. package/dist/components/Tag/Tag.d.ts.map +1 -1
  150. package/dist/components/Tag/Tag.js +1 -1
  151. package/dist/components/TransactionsListView/TransactionsListView.d.ts +152 -0
  152. package/dist/components/TransactionsListView/TransactionsListView.d.ts.map +1 -0
  153. package/dist/components/TransactionsListView/TransactionsListView.js +367 -0
  154. package/dist/components/TransactionsListView/TransactionsListView.stories.d.ts +12 -0
  155. package/dist/components/TransactionsListView/TransactionsListView.stories.d.ts.map +1 -0
  156. package/dist/components/TransactionsListView/index.d.ts +2 -0
  157. package/dist/components/TransactionsListView/index.d.ts.map +1 -0
  158. package/dist/components/UniversalFooter/UniversalFooter.d.ts +6 -5
  159. package/dist/components/UniversalFooter/UniversalFooter.d.ts.map +1 -1
  160. package/dist/components/UniversalFooter/UniversalFooter.js +186 -177
  161. package/dist/components/UniversalFooter/UniversalFooter.stories.d.ts.map +1 -1
  162. package/dist/components/VoucherCard/VoucherCard.d.ts +105 -0
  163. package/dist/components/VoucherCard/VoucherCard.d.ts.map +1 -0
  164. package/dist/components/VoucherCard/VoucherCard.js +167 -0
  165. package/dist/components/VoucherCard/VoucherCard.stories.d.ts +9 -0
  166. package/dist/components/VoucherCard/VoucherCard.stories.d.ts.map +1 -0
  167. package/dist/components/VoucherCard/index.d.ts +2 -0
  168. package/dist/components/VoucherCard/index.d.ts.map +1 -0
  169. package/dist/components/index.d.ts +14 -0
  170. package/dist/components/index.d.ts.map +1 -1
  171. package/dist/index.js +413 -352
  172. package/dist/muza-ui.css +1 -1
  173. package/dist/styles/primitives.css +5 -0
  174. package/dist/styles/token-colors.css +106 -30
  175. package/dist/styles/token-sizes.css +60 -16
  176. package/dist/translations/index.d.ts +2 -1
  177. package/dist/translations/index.d.ts.map +1 -1
  178. package/dist/translations/locales/cs.d.ts.map +1 -1
  179. package/dist/translations/locales/cs.js +30 -2
  180. package/dist/translations/locales/en.d.ts.map +1 -1
  181. package/dist/translations/locales/en.js +26 -2
  182. package/dist/translations/locales/sk.d.ts.map +1 -1
  183. package/dist/translations/locales/sk.js +30 -2
  184. package/dist/translations/resolvePluralTemplate.d.ts +10 -0
  185. package/dist/translations/resolvePluralTemplate.d.ts.map +1 -0
  186. package/dist/translations/resolvePluralTemplate.js +20 -0
  187. package/dist/translations/types.d.ts +57 -0
  188. package/dist/translations/types.d.ts.map +1 -1
  189. package/dist/utils/cn.d.ts.map +1 -1
  190. package/dist/utils/cn.js +124 -27
  191. package/dist/utils/disabledLinkProps.d.ts +14 -0
  192. package/dist/utils/disabledLinkProps.d.ts.map +1 -0
  193. package/dist/utils/disabledLinkProps.js +9 -0
  194. package/dist/{components/Calendar/utils → utils}/formatDate.d.ts +1 -1
  195. package/dist/utils/formatDate.d.ts.map +1 -0
  196. package/dist/utils/formatDateRange.d.ts.map +1 -0
  197. package/dist/utils/index.d.ts +3 -0
  198. package/dist/utils/index.d.ts.map +1 -1
  199. package/package.json +4 -3
  200. package/dist/components/Calendar/utils/formatDate.d.ts.map +0 -1
  201. package/dist/components/Calendar/utils/formatDateRange.d.ts.map +0 -1
  202. /package/dist/{components/Calendar/utils → utils}/formatDate.js +0 -0
  203. /package/dist/{components/Calendar/utils → utils}/formatDateRange.d.ts +0 -0
  204. /package/dist/{components/Calendar/utils → utils}/formatDateRange.js +0 -0
@@ -68,7 +68,7 @@ const d = r(
68
68
  ) })
69
69
  );
70
70
  d.displayName = "Cutlery";
71
- const V = r(
71
+ const n = r(
72
72
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
73
73
  "path",
74
74
  {
@@ -77,8 +77,8 @@ const V = r(
77
77
  }
78
78
  ) })
79
79
  );
80
- V.displayName = "MuzaIcon";
81
- const n = r(
80
+ n.displayName = "MuzaIcon";
81
+ const V = r(
82
82
  (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
83
83
  /* @__PURE__ */ C(
84
84
  "path",
@@ -96,7 +96,7 @@ const n = r(
96
96
  )
97
97
  ] })
98
98
  );
99
- n.displayName = "ArrowsSorting";
99
+ V.displayName = "ArrowsSorting";
100
100
  const a = r(
101
101
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
102
102
  "path",
@@ -128,22 +128,22 @@ const M = r(
128
128
  ) })
129
129
  );
130
130
  M.displayName = "LayoutHorizontal";
131
- const Z = r((L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
131
+ const p = r((L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
132
132
  "path",
133
133
  {
134
134
  d: "M12 0.5C18.3511 0.500263 23.5 5.64889 23.5 12C23.4997 18.3509 18.3509 23.4997 12 23.5C5.64889 23.5 0.500263 18.3511 0.5 12C0.500001 5.64872 5.64872 0.500001 12 0.5ZM12 1.5C6.20101 1.5 1.5 6.20101 1.5 12C1.50026 17.7988 6.20117 22.5 12 22.5C17.7986 22.4997 22.4997 17.7986 22.5 12C22.5 6.20117 17.7988 1.50026 12 1.5ZM12 2.5C17.2467 2.5 21.5 6.75329 21.5 12C21.5 17.2467 17.2467 21.5 12 21.5C6.75329 21.5 2.5 17.2467 2.5 12C2.5 6.75329 6.75329 2.5 12 2.5ZM15.0977 10.0312C13.6248 10.0312 12.5508 11.1544 12.5508 12.707C12.551 14.2593 13.6245 15.3816 15.1064 15.3818C16.2942 15.3818 17.3112 14.5908 17.5107 13.5068L16.5225 13.3799C16.3514 14.0146 15.7906 14.4736 15.1064 14.4736C14.2421 14.4734 13.5868 13.7319 13.5771 12.707C13.5771 11.6819 14.2515 10.9397 15.1064 10.9395C15.7716 10.9395 16.3616 11.3985 16.5137 12.043L17.502 11.916C17.3309 10.8224 16.3234 10.0313 15.0977 10.0312ZM6.96484 15.1865H8.10547V11.9453L10.7754 15.1865H12.21L9.12207 11.5352L12.125 8.27344H10.6992L8.10547 11.1445V8.27344H6.96484V15.1865ZM14.5654 9.64062H15.6104L16.7227 8H15.8477L15.0879 9.11328L14.3281 8H13.4629L14.5654 9.64062Z",
135
135
  fill: "currentColor"
136
136
  }
137
137
  ) }));
138
- Z.displayName = "CZK";
139
- const p = r((L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
138
+ p.displayName = "CZK";
139
+ const Z = r((L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
140
140
  "path",
141
141
  {
142
142
  d: "M12 0.5C18.3513 0.5 23.5 5.64873 23.5 12C23.5 18.3513 18.3513 23.5 12 23.5C5.64873 23.5 0.5 18.3513 0.5 12C0.500001 5.64873 5.64873 0.500001 12 0.5ZM12 1.5C6.20101 1.5 1.5 6.20101 1.5 12C1.5 17.799 6.20101 22.5 12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5ZM12 2.5C17.2467 2.5 21.5 6.75329 21.5 12C21.5 17.2467 17.2467 21.5 12 21.5C6.75329 21.5 2.5 17.2467 2.5 12C2.5 6.75329 6.75329 2.5 12 2.5ZM12.3301 8.2002C10.5401 8.2002 9.15977 9.30996 8.75977 10.96H7.59961V11.6504H8.65039C8.6404 11.7603 8.62988 11.8704 8.62988 11.9902C8.6299 12.0901 8.63965 12.1901 8.63965 12.29H7.59961V12.9795H8.75C9.13999 14.6494 10.5299 15.7802 12.3398 15.7803C13.9898 15.7803 15.4202 14.7198 15.7402 13.2598L14.5996 13.0703C14.3294 14.0401 13.3795 14.7402 12.3496 14.7402C11.2198 14.7401 10.3302 14.0394 9.99023 12.9795H12.5996V12.29H9.84961C9.83962 12.1901 9.83984 12.0901 9.83984 11.9902C9.83984 11.8704 9.83965 11.7602 9.84961 11.6504H12.6104V10.96H10C10.35 9.92008 11.2198 9.25015 12.3496 9.25C13.4095 9.25 14.3497 9.96986 14.5898 10.9697L15.7402 10.8301C15.4202 9.3101 13.99 8.20023 12.3301 8.2002Z",
143
143
  fill: "currentColor"
144
144
  }
145
145
  ) }));
146
- p.displayName = "EUR";
146
+ Z.displayName = "EUR";
147
147
  const h = r(
148
148
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, viewBox: "0 0 20 20", children: /* @__PURE__ */ C(
149
149
  "path",
@@ -329,7 +329,7 @@ const E = r(
329
329
  ) })
330
330
  );
331
331
  E.displayName = "TextH1";
332
- const F = r(
332
+ const k = r(
333
333
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
334
334
  "path",
335
335
  {
@@ -338,8 +338,8 @@ const F = r(
338
338
  }
339
339
  ) })
340
340
  );
341
- F.displayName = "TextH2";
342
- const R = r(
341
+ k.displayName = "TextH2";
342
+ const v = r(
343
343
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
344
344
  "path",
345
345
  {
@@ -348,8 +348,8 @@ const R = r(
348
348
  }
349
349
  ) })
350
350
  );
351
- R.displayName = "TextH3";
352
- const k = r(
351
+ v.displayName = "TextH3";
352
+ const F = r(
353
353
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
354
354
  "path",
355
355
  {
@@ -358,8 +358,8 @@ const k = r(
358
358
  }
359
359
  ) })
360
360
  );
361
- k.displayName = "EditorBold";
362
- const v = r(
361
+ F.displayName = "EditorBold";
362
+ const R = r(
363
363
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
364
364
  "path",
365
365
  {
@@ -368,7 +368,7 @@ const v = r(
368
368
  }
369
369
  ) })
370
370
  );
371
- v.displayName = "EditorItalic";
371
+ R.displayName = "EditorItalic";
372
372
  const g = r(
373
373
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
374
374
  "path",
@@ -439,7 +439,7 @@ const T = r(
439
439
  ) })
440
440
  );
441
441
  T.displayName = "CurlyBrace";
442
- const D = r(
442
+ const b = r(
443
443
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
444
444
  "path",
445
445
  {
@@ -450,8 +450,8 @@ const D = r(
450
450
  }
451
451
  ) })
452
452
  );
453
- D.displayName = "CurlyBrace2";
454
- const b = r(
453
+ b.displayName = "CurlyBrace2";
454
+ const D = r(
455
455
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
456
456
  "path",
457
457
  {
@@ -462,7 +462,7 @@ const b = r(
462
462
  }
463
463
  ) })
464
464
  );
465
- b.displayName = "DoubleArrowRight";
465
+ D.displayName = "DoubleArrowRight";
466
466
  const P = r(
467
467
  (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
468
468
  /* @__PURE__ */ C(
@@ -734,11 +734,30 @@ const J = r(
734
734
  ) })
735
735
  );
736
736
  J.displayName = "XTwitter";
737
+ const Q = r(
738
+ (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
739
+ /* @__PURE__ */ C(
740
+ "path",
741
+ {
742
+ d: "M10.0757 20.7512L10.6715 20.4768L10.6715 20.4768C11.3259 20.1755 11.6532 20.0248 12 20.0248V2C11.0531 2 10.4198 3.13612 9.15317 5.40837L9.15316 5.40838L8.82547 5.99623L8.82546 5.99624C8.46552 6.64194 8.28555 6.96479 8.00494 7.17781C7.72433 7.39083 7.37485 7.4699 6.67589 7.62805L6.03954 7.77203C3.57986 8.32856 2.35002 8.60682 2.05742 9.54773C1.76482 10.4886 2.60325 11.4691 4.2801 13.4299L4.71392 13.9372L4.71392 13.9372C5.19043 14.4944 5.42868 14.773 5.53586 15.1177C5.64305 15.4624 5.60703 15.8341 5.53498 16.5776L5.4694 17.2544C5.21588 19.8706 5.08912 21.1787 5.85515 21.7602C6.62117 22.3417 7.77267 21.8115 10.0757 20.7512L10.0757 20.7512Z",
743
+ fill: "currentColor"
744
+ }
745
+ ),
746
+ /* @__PURE__ */ C(
747
+ "path",
748
+ {
749
+ d: "M13.9243 20.7512L13.3285 20.4768L13.3285 20.4768C12.6741 20.1755 12.3468 20.0248 12 20.0248V2C12.9469 2 13.5802 3.13612 14.8468 5.40837L14.8468 5.40838L15.1745 5.99623L15.1745 5.99624C15.5345 6.64194 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.9243 20.7512Z",
750
+ fill: "var(--half-star-background, var(--color-comp-rating-star-empty))"
751
+ }
752
+ )
753
+ ] })
754
+ );
755
+ Q.displayName = "HalfStar";
737
756
  export {
738
- n as ArrowsSorting,
757
+ V as ArrowsSorting,
739
758
  t as Barcode,
740
759
  B as BulletList,
741
- Z as CZK,
760
+ p as CZK,
742
761
  s as CheckMinus,
743
762
  h as Checked,
744
763
  K as Coins,
@@ -747,12 +766,12 @@ export {
747
766
  j as Coins3,
748
767
  S as Colour,
749
768
  T as CurlyBrace,
750
- D as CurlyBrace2,
769
+ b as CurlyBrace2,
751
770
  d as Cutlery,
752
- b as DoubleArrowRight,
753
- p as EUR,
754
- k as EditorBold,
755
- v as EditorItalic,
771
+ D as DoubleArrowRight,
772
+ Z as EUR,
773
+ F as EditorBold,
774
+ R as EditorItalic,
756
775
  g as EditorStrikethrough,
757
776
  G as EmptyCircle,
758
777
  P as ExternalLink,
@@ -762,12 +781,13 @@ export {
762
781
  f as FlagCz,
763
782
  y as FlagEn,
764
783
  m as FlagSk,
784
+ Q as HalfStar,
765
785
  M as LayoutHorizontal,
766
786
  c as LayoutVertical,
767
787
  Y as Linkedin,
768
788
  u as MagnifyingGlass,
769
789
  O as MenuDotsVertical,
770
- V as MuzaIcon,
790
+ n as MuzaIcon,
771
791
  x as NumberList,
772
792
  I as Plus,
773
793
  w as RemoveTextFormat,
@@ -776,8 +796,8 @@ export {
776
796
  A as Scan,
777
797
  _ as Spinner,
778
798
  E as TextH1,
779
- F as TextH2,
780
- R as TextH3,
799
+ k as TextH2,
800
+ v as TextH3,
781
801
  z as XClose,
782
802
  J as XTwitter,
783
803
  U as Youtube
@@ -4,5 +4,6 @@ export default meta;
4
4
  type Story = StoryObj;
5
5
  export declare const Logos: Story;
6
6
  export declare const LogosLight: Story;
7
- export declare const Badges: Story;
7
+ export declare const StoreBadges: Story;
8
+ export declare const PaymentBadges: Story;
8
9
  //# sourceMappingURL=LogosAndBadges.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogosAndBadges.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/LogosAndBadges.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,QAAA,MAAM,IAAI,EAAE,IAeX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAyBrB,eAAO,MAAM,KAAK,EAAE,KAqBnB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA6BxB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAyBpB,CAAA"}
1
+ {"version":3,"file":"LogosAndBadges.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/LogosAndBadges.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,QAAA,MAAM,IAAI,EAAE,IAeX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAuCrB,eAAO,MAAM,KAAK,EAAE,KAqBnB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA6BxB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAyBzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAA"}
@@ -0,0 +1,95 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ /**
3
+ * Character set the field accepts. Also selects the mobile keyboard:
4
+ * `numeric` → number pad, the others → text keyboard.
5
+ */
6
+ export type InputOTPAllowedChars = 'numeric' | 'alphanumeric' | 'alphabetic';
7
+ export declare const inputOTPCellVariants: (props?: ({
8
+ size?: "sm" | "lg" | "base" | null | undefined;
9
+ active?: boolean | null | undefined;
10
+ error?: boolean | null | undefined;
11
+ disabled?: boolean | null | undefined;
12
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
13
+ /**
14
+ * Props for the InputOTP component.
15
+ *
16
+ * Extends the underlying input's attributes except the ones InputOTP manages
17
+ * itself (`value`/`onChange`/`size`/`type`/`children`).
18
+ */
19
+ export interface InputOTPProps extends Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'onChange' | 'size' | 'type' | 'children' | 'defaultValue'> {
20
+ /**
21
+ * Number of OTP characters (cells).
22
+ * @default 6
23
+ */
24
+ length?: number;
25
+ /** Controlled value. Should never exceed `length` characters. */
26
+ value?: string;
27
+ /** Initial value for uncontrolled usage. @default '' */
28
+ defaultValue?: string;
29
+ /** Fires with the full string whenever the value changes. */
30
+ onChange?: (value: string) => void;
31
+ /** Fires once the value reaches `length` characters. */
32
+ onComplete?: (value: string) => void;
33
+ /** Controls cell height and character size. @default 'base' */
34
+ size?: 'sm' | 'base' | 'lg';
35
+ /** Applies the error border to all cells and error-styles the hint. @default false */
36
+ error?: boolean;
37
+ /** Disables input and applies disabled styling. @default false */
38
+ disabled?: boolean;
39
+ /**
40
+ * Renders each filled cell as an 8×8px dot (DotDivider) instead of the
41
+ * character, for sensitive codes.
42
+ * @default false
43
+ */
44
+ mask?: boolean;
45
+ /**
46
+ * Which characters the field accepts — this also chooses the mobile keyboard:
47
+ * - `numeric` — digits only, number pad.
48
+ * - `alphanumeric` — letters and digits, text keyboard.
49
+ * - `alphabetic` — letters only, text keyboard.
50
+ *
51
+ * Values are case-sensitive; uppercase in `onChange` if you need a canonical
52
+ * form. For a fully custom rule, use `pattern` instead (it overrides this).
53
+ * @default 'numeric'
54
+ */
55
+ allowedChars?: InputOTPAllowedChars;
56
+ /**
57
+ * Advanced escape hatch: a raw regex string restricting allowed characters
58
+ * (see input-otp). Overrides `allowedChars` when provided. Leave unset and
59
+ * use `allowedChars` for the common cases.
60
+ */
61
+ pattern?: string;
62
+ /**
63
+ * Enables the Android WebOTP API for fully-automatic SMS code retrieval, as
64
+ * a progressive enhancement. iOS Safari and desktop rely on the built-in
65
+ * `autocomplete="one-time-code"` keyboard suggestion instead (always on).
66
+ * Requires HTTPS and an origin-bound SMS. See {@link useWebOtpAutofill}.
67
+ * @default false
68
+ */
69
+ enableWebOtp?: boolean;
70
+ /** Label text rendered above the field. */
71
+ label?: string;
72
+ /** Helper or error text rendered below the field. */
73
+ hint?: string;
74
+ /** Marks the field as required and shows an asterisk in the label. @default false */
75
+ required?: boolean;
76
+ /**
77
+ * Hides the required asterisk in the label even when `required` is `true`.
78
+ * @default false
79
+ */
80
+ disableRequiredAsterisk?: boolean;
81
+ /**
82
+ * Custom content rendered inline next to the label. Takes precedence over
83
+ * `infoTooltip` when both are provided.
84
+ */
85
+ labelExtra?: ReactNode;
86
+ /**
87
+ * Tooltip content shown in an info icon next to the label. Ignored when
88
+ * `labelExtra` is provided.
89
+ */
90
+ infoTooltip?: string;
91
+ /** Additional classes for the cells container. */
92
+ className?: string;
93
+ }
94
+ export declare const InputOTP: import('react').ForwardRefExoticComponent<InputOTPProps & import('react').RefAttributes<HTMLInputElement>>;
95
+ //# sourceMappingURL=InputOTP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.d.ts","sourceRoot":"","sources":["../../../src/components/InputOTP/InputOTP.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EAIf,MAAM,OAAO,CAAA;AAgBd;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,cAAc,GAAG,YAAY,CAAA;AAuB5E,eAAO,MAAM,oBAAoB;;;;;8EA2ChC,CAAA;AA+CD;;;;;GAKG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,CAAC,EACjC,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,cAAc,CACrE;IACD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,wDAAwD;IACxD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3B,sFAAsF;IACtF,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,QAAQ,4GA0HpB,CAAA"}
@@ -0,0 +1,187 @@
1
+ import { jsx as r, Fragment as H, jsxs as V } from "react/jsx-runtime";
2
+ import { forwardRef as W, useId as j, useCallback as M } from "react";
3
+ import { useControllableState as Y } from "@radix-ui/react-use-controllable-state";
4
+ import { cva as w } from "class-variance-authority";
5
+ import { OTPInput as X, REGEXP_ONLY_CHARS as Z, REGEXP_ONLY_DIGITS_AND_CHARS as $, REGEXP_ONLY_DIGITS as U } from "input-otp";
6
+ import { useWebOtpAutofill as B } from "./useWebOtpAutofill.js";
7
+ import { FormField as J } from "../FormField/FormField.js";
8
+ import { cn as g } from "../../utils/cn.js";
9
+ import { DotDivider as K } from "../DotDivider/DotDivider.js";
10
+ import { typographyVariants as Q } from "../Typography/Typography.js";
11
+ const q = {
12
+ numeric: U,
13
+ alphanumeric: $,
14
+ alphabetic: Z
15
+ }, ee = {
16
+ numeric: "numeric",
17
+ alphanumeric: "text",
18
+ alphabetic: "text"
19
+ }, re = {
20
+ numeric: /[^0-9]/g,
21
+ alphanumeric: /[^a-zA-Z0-9]/g,
22
+ alphabetic: /[^a-zA-Z]/g
23
+ }, te = w(
24
+ [
25
+ "relative flex shrink-0 items-center justify-center",
26
+ // Fixed 48px cell width across all sizes, per Figma. `comp-input-h-small`
27
+ // is the design-system's 48px spacing token (it also drives the small
28
+ // input height), reused here as the cell's constant width.
29
+ "w-comp-input-h-small",
30
+ "border border-comp-input-stroke-def bg-comp-input-fill-def",
31
+ "rounded-comp-input-radius-pin transition-colors",
32
+ "text-comp-input-text-primary",
33
+ // Hover is captured on the whole field via the container `group`.
34
+ "group-hover:border-comp-input-stroke-hover"
35
+ ],
36
+ {
37
+ variants: {
38
+ size: {
39
+ sm: "h-comp-input-h-small",
40
+ base: "h-comp-input-h-def",
41
+ lg: "h-comp-input-h-large"
42
+ },
43
+ active: {
44
+ true: "z-10 border-comp-input-icon-brand-focused group-hover:border-comp-input-icon-brand-focused"
45
+ },
46
+ error: {
47
+ true: "border-comp-input-stroke-error-def group-hover:border-comp-input-stroke-error-def"
48
+ },
49
+ disabled: {
50
+ true: "border-comp-input-stroke-disabled bg-comp-input-fill-disabled group-hover:border-comp-input-stroke-disabled"
51
+ }
52
+ },
53
+ compoundVariants: [
54
+ // Error styling must win over the focused border colour.
55
+ {
56
+ active: !0,
57
+ error: !0,
58
+ class: "border-comp-input-stroke-error-def group-hover:border-comp-input-stroke-error-def"
59
+ }
60
+ ],
61
+ defaultVariants: {
62
+ size: "base"
63
+ }
64
+ }
65
+ ), oe = g(
66
+ Q({ size: "lg", weight: "medium", fixY: !0 }),
67
+ "text-comp-input-text-primary"
68
+ ), x = ({
69
+ slot: e,
70
+ size: p,
71
+ error: c,
72
+ disabled: t,
73
+ mask: s
74
+ }) => /* @__PURE__ */ V(
75
+ "div",
76
+ {
77
+ className: te({
78
+ size: p,
79
+ active: e.isActive && !t,
80
+ error: c,
81
+ disabled: t
82
+ }),
83
+ children: [
84
+ e.char !== null && (s ? /* @__PURE__ */ r(K, { className: "size-comp-inputotp-dot-size bg-comp-input-text-primary" }) : /* @__PURE__ */ r("span", { className: oe, children: e.char })),
85
+ e.hasFakeCaret && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ r("div", { className: "h-2/3 w-px bg-comp-input-text-primary" }) })
86
+ ]
87
+ }
88
+ );
89
+ x.displayName = "InputOTPSlot";
90
+ const ie = W(
91
+ ({
92
+ length: e = 6,
93
+ value: p,
94
+ defaultValue: c = "",
95
+ onChange: t,
96
+ onComplete: s,
97
+ size: I = "base",
98
+ error: m,
99
+ disabled: o,
100
+ mask: O,
101
+ allowedChars: i = "numeric",
102
+ pattern: P,
103
+ enableWebOtp: N = !1,
104
+ label: b,
105
+ hint: f,
106
+ required: u,
107
+ disableRequiredAsterisk: _,
108
+ labelExtra: A,
109
+ infoTooltip: y,
110
+ className: T,
111
+ id: R,
112
+ inputMode: S,
113
+ ...k
114
+ }, E) => {
115
+ const C = P ?? q[i], L = S ?? ee[i], [D, l] = Y({
116
+ prop: p,
117
+ defaultProp: c,
118
+ onChange: t
119
+ }), z = j(), n = R ?? z, h = f ? `${n}-hint` : void 0, v = b ? `${n}-label` : void 0, F = M(
120
+ (d) => {
121
+ const a = d.replace(re[i], "").slice(0, e);
122
+ a && l(a);
123
+ },
124
+ [i, e, l]
125
+ );
126
+ return B({
127
+ enabled: N && !o,
128
+ onReceive: F
129
+ }), /* @__PURE__ */ r(
130
+ J,
131
+ {
132
+ label: b,
133
+ hint: f,
134
+ error: m,
135
+ required: u,
136
+ disableRequiredAsterisk: _,
137
+ htmlFor: n,
138
+ labelId: v,
139
+ hintId: h,
140
+ labelExtra: A,
141
+ infoTooltip: y,
142
+ children: /* @__PURE__ */ r(
143
+ X,
144
+ {
145
+ ref: E,
146
+ id: n,
147
+ maxLength: e,
148
+ value: D ?? "",
149
+ onChange: l,
150
+ onComplete: s,
151
+ disabled: o,
152
+ pattern: C,
153
+ inputMode: L,
154
+ required: u,
155
+ "aria-describedby": h,
156
+ "aria-labelledby": v,
157
+ "aria-invalid": m,
158
+ "aria-required": u,
159
+ pushPasswordManagerStrategy: "none",
160
+ containerClassName: g(
161
+ "group flex items-center gap-comp-input-spacing-pin",
162
+ o && "cursor-not-allowed",
163
+ T
164
+ ),
165
+ render: ({ slots: d }) => /* @__PURE__ */ r(H, { children: d.map((a, G) => /* @__PURE__ */ r(
166
+ x,
167
+ {
168
+ slot: a,
169
+ size: I,
170
+ error: m,
171
+ disabled: o,
172
+ mask: O
173
+ },
174
+ G
175
+ )) }),
176
+ ...k
177
+ }
178
+ )
179
+ }
180
+ );
181
+ }
182
+ );
183
+ ie.displayName = "InputOTP";
184
+ export {
185
+ ie as InputOTP,
186
+ te as inputOTPCellVariants
187
+ };
@@ -0,0 +1,18 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { InputOTP } from './InputOTP';
3
+ declare const meta: Meta<typeof InputOTP>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof InputOTP>;
6
+ export declare const Default: Story;
7
+ export declare const WithLabelAndHint: Story;
8
+ export declare const SmsAutofill: Story;
9
+ export declare const ConfigurableLength: Story;
10
+ export declare const Masked: Story;
11
+ export declare const Alphanumeric: Story;
12
+ export declare const Disabled: Story;
13
+ /** Consolidated size showcase — enabled for visual regression. */
14
+ export declare const AllSizes: Story;
15
+ /** Consolidated state showcase — enabled for visual regression. */
16
+ export declare const AllStates: Story;
17
+ export declare const Controlled: Story;
18
+ //# sourceMappingURL=InputOTP.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputOTP.stories.d.ts","sourceRoot":"","sources":["../../../src/components/InputOTP/InputOTP.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAmG/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAc9B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAgDzB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAchC,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAepB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAiB1B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,SAAS,EAAE,KAmBvB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA6BxB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { InputOTP, inputOTPCellVariants, type InputOTPProps, type InputOTPAllowedChars, } from './InputOTP';
2
+ export { useWebOtpAutofill, type UseWebOtpAutofillOptions, } from './useWebOtpAutofill';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InputOTP/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,33 @@
1
+ export interface UseWebOtpAutofillOptions {
2
+ /**
3
+ * Enables the WebOTP listener. Keep it `false` until the OTP screen is
4
+ * actually shown so the browser prompt appears at the right moment.
5
+ */
6
+ enabled: boolean;
7
+ /**
8
+ * Called with the code parsed from the incoming SMS. Receives the raw string
9
+ * exactly as the browser extracted it; the caller is responsible for
10
+ * truncating/validating it against the expected length.
11
+ */
12
+ onReceive: (code: string) => void;
13
+ }
14
+ /**
15
+ * Progressive-enhancement hook for automatic SMS OTP retrieval via the
16
+ * [WebOTP API](https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API).
17
+ *
18
+ * When enabled on a supporting browser (Android Chrome), it asks the browser
19
+ * to surface the one-time code from an incoming, origin-bound SMS and hands it
20
+ * to `onReceive`. On unsupported browsers (notably iOS Safari and desktop) it
21
+ * is a no-op — there the native `autocomplete="one-time-code"` keyboard
22
+ * suggestion handled by the input element covers autofill instead.
23
+ *
24
+ * The listener is aborted automatically on unmount or when `enabled` becomes
25
+ * `false`, satisfying the API's single-in-flight-request constraint.
26
+ *
27
+ * Requirements for the automatic Android flow to trigger:
28
+ * - Page served over HTTPS (or `localhost`).
29
+ * - The SMS body ends with an origin-bound line, e.g. `@example.com #123456`.
30
+ * - Called after a user gesture that reveals the OTP field.
31
+ */
32
+ export declare const useWebOtpAutofill: ({ enabled, onReceive, }: UseWebOtpAutofillOptions) => void;
33
+ //# sourceMappingURL=useWebOtpAutofill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebOtpAutofill.d.ts","sourceRoot":"","sources":["../../../src/components/InputOTP/useWebOtpAutofill.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yBAG/B,wBAAwB,KAAG,IAkC7B,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { useRef as u, useEffect as f } from "react";
2
+ const c = ({
3
+ enabled: o,
4
+ onReceive: t
5
+ }) => {
6
+ const n = u(t);
7
+ f(() => {
8
+ n.current = t;
9
+ }, [t]), f(() => {
10
+ if (!o || typeof window > "u" || !("OTPCredential" in window)) return;
11
+ const e = new AbortController();
12
+ return navigator.credentials.get({
13
+ // `otp` is not yet part of the standard lib.dom CredentialRequestOptions.
14
+ otp: { transport: ["sms"] },
15
+ signal: e.signal
16
+ }).then((r) => {
17
+ const s = r == null ? void 0 : r.code;
18
+ s && n.current(s);
19
+ }).catch(() => {
20
+ }), () => e.abort();
21
+ }, [o]);
22
+ };
23
+ export {
24
+ c as useWebOtpAutofill
25
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAWpD;;;;;;;;;GASG;AAQH,eAAO,MAAM,+BAA+B;;8EAuB3C,CAAA;AAED,eAAO,MAAM,+BAA+B;;8EAiB3C,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAC/C,YAAY,CAAC,OAAO,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAChE,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACvC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAClC;AAED,QAAA,MAAM,gBAAgB,GAAI,kGASvB,qBAAqB,4CAqEvB,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAWpD;;;;;;;;;GASG;AAQH,eAAO,MAAM,+BAA+B;;8EAuB3C,CAAA;AAED,eAAO,MAAM,+BAA+B;;8EAiB3C,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAC/C,YAAY,CAAC,OAAO,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAChE,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACvC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAClC;AAED,QAAA,MAAM,gBAAgB,GAAI,kGASvB,qBAAqB,4CA8EvB,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}