@toptal/picasso-utils 3.1.1-alpha-1757603192867.0 → 3.1.1-alpha-FF-49-enhance-publishing-6b5d306f0.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 (181) hide show
  1. package/dist-package/src/index.d.ts +2 -0
  2. package/dist-package/src/index.d.ts.map +1 -0
  3. package/dist-package/src/index.js +2 -0
  4. package/dist-package/src/index.js.map +1 -0
  5. package/dist-package/src/utils/Colors/index.d.ts +2 -0
  6. package/dist-package/src/utils/Colors/index.d.ts.map +1 -0
  7. package/dist-package/src/utils/Colors/index.js +2 -0
  8. package/dist-package/src/utils/Colors/index.js.map +1 -0
  9. package/dist-package/src/utils/Formatters/format-amount.d.ts +18 -0
  10. package/dist-package/src/utils/Formatters/format-amount.d.ts.map +1 -0
  11. package/dist-package/src/utils/Formatters/format-amount.js +12 -0
  12. package/dist-package/src/utils/Formatters/format-amount.js.map +1 -0
  13. package/dist-package/src/utils/Formatters/index.d.ts +3 -0
  14. package/dist-package/src/utils/Formatters/index.d.ts.map +1 -0
  15. package/dist-package/src/utils/Formatters/index.js +2 -0
  16. package/dist-package/src/utils/Formatters/index.js.map +1 -0
  17. package/dist-package/src/utils/Gradients/index.d.ts +2 -0
  18. package/dist-package/src/utils/Gradients/index.d.ts.map +1 -0
  19. package/dist-package/src/utils/Gradients/index.js +2 -0
  20. package/dist-package/src/utils/Gradients/index.js.map +1 -0
  21. package/dist-package/src/utils/Modal/index.d.ts +3 -0
  22. package/dist-package/src/utils/Modal/index.d.ts.map +1 -0
  23. package/dist-package/src/utils/Modal/index.js +3 -0
  24. package/dist-package/src/utils/Modal/index.js.map +1 -0
  25. package/dist-package/src/utils/Modal/modal-manager.d.ts +7 -0
  26. package/dist-package/src/utils/Modal/modal-manager.d.ts.map +1 -0
  27. package/dist-package/src/utils/Modal/modal-manager.js +22 -0
  28. package/dist-package/src/utils/Modal/modal-manager.js.map +1 -0
  29. package/dist-package/src/utils/Modal/use-modal.d.ts +7 -0
  30. package/dist-package/src/utils/Modal/use-modal.d.ts.map +1 -0
  31. package/dist-package/src/utils/Modal/use-modal.js +13 -0
  32. package/dist-package/src/utils/Modal/use-modal.js.map +1 -0
  33. package/dist-package/src/utils/Transitions/Rotate180/Rotate180.d.ts +14 -0
  34. package/dist-package/src/utils/Transitions/Rotate180/Rotate180.d.ts.map +1 -0
  35. package/dist-package/src/utils/Transitions/Rotate180/Rotate180.js +29 -0
  36. package/dist-package/src/utils/Transitions/Rotate180/Rotate180.js.map +1 -0
  37. package/dist-package/src/utils/Transitions/Rotate180/index.d.ts +4 -0
  38. package/dist-package/src/utils/Transitions/Rotate180/index.d.ts.map +1 -0
  39. package/dist-package/src/utils/Transitions/Rotate180/index.js +2 -0
  40. package/dist-package/src/utils/Transitions/Rotate180/index.js.map +1 -0
  41. package/dist-package/src/utils/Transitions/Rotate180/styles.d.ts +3 -0
  42. package/dist-package/src/utils/Transitions/Rotate180/styles.d.ts.map +1 -0
  43. package/dist-package/src/utils/Transitions/Rotate180/styles.js +10 -0
  44. package/dist-package/src/utils/Transitions/Rotate180/styles.js.map +1 -0
  45. package/dist-package/src/utils/Transitions/index.d.ts +3 -0
  46. package/dist-package/src/utils/Transitions/index.d.ts.map +1 -0
  47. package/dist-package/src/utils/Transitions/index.js +2 -0
  48. package/dist-package/src/utils/Transitions/index.js.map +1 -0
  49. package/dist-package/src/utils/capitalize.d.ts +2 -0
  50. package/dist-package/src/utils/capitalize.d.ts.map +1 -0
  51. package/dist-package/src/utils/capitalize.js +2 -0
  52. package/dist-package/src/utils/capitalize.js.map +1 -0
  53. package/dist-package/src/utils/constants.d.ts +2 -0
  54. package/dist-package/src/utils/constants.d.ts.map +1 -0
  55. package/dist-package/src/utils/constants.js +2 -0
  56. package/dist-package/src/utils/constants.js.map +1 -0
  57. package/dist-package/src/utils/disable-unsupported-props.d.ts +7 -0
  58. package/dist-package/src/utils/disable-unsupported-props.d.ts.map +1 -0
  59. package/dist-package/src/utils/disable-unsupported-props.js +19 -0
  60. package/dist-package/src/utils/disable-unsupported-props.js.map +1 -0
  61. package/dist-package/src/utils/forward-ref.d.ts +33 -0
  62. package/dist-package/src/utils/forward-ref.d.ts.map +1 -0
  63. package/dist-package/src/utils/forward-ref.js +27 -0
  64. package/dist-package/src/utils/forward-ref.js.map +1 -0
  65. package/dist-package/src/utils/get-name-initials.d.ts +3 -0
  66. package/dist-package/src/utils/get-name-initials.d.ts.map +1 -0
  67. package/dist-package/src/utils/get-name-initials.js +14 -0
  68. package/dist-package/src/utils/get-name-initials.js.map +1 -0
  69. package/dist-package/src/utils/get-react-node-text-content.d.ts +16 -0
  70. package/dist-package/src/utils/get-react-node-text-content.d.ts.map +1 -0
  71. package/dist-package/src/utils/get-react-node-text-content.js +32 -0
  72. package/dist-package/src/utils/get-react-node-text-content.js.map +1 -0
  73. package/dist-package/src/utils/index.d.ts +63 -0
  74. package/dist-package/src/utils/index.d.ts.map +1 -0
  75. package/dist-package/src/utils/index.js +59 -0
  76. package/dist-package/src/utils/index.js.map +1 -0
  77. package/dist-package/src/utils/is-boolean.d.ts +3 -0
  78. package/dist-package/src/utils/is-boolean.d.ts.map +1 -0
  79. package/dist-package/src/utils/is-boolean.js +3 -0
  80. package/dist-package/src/utils/is-boolean.js.map +1 -0
  81. package/dist-package/src/utils/is-number.d.ts +3 -0
  82. package/dist-package/src/utils/is-number.d.ts.map +1 -0
  83. package/dist-package/src/utils/is-number.js +3 -0
  84. package/dist-package/src/utils/is-number.js.map +1 -0
  85. package/dist-package/src/utils/is-overflown.d.ts +3 -0
  86. package/dist-package/src/utils/is-overflown.d.ts.map +1 -0
  87. package/dist-package/src/utils/is-overflown.js +16 -0
  88. package/dist-package/src/utils/is-overflown.js.map +1 -0
  89. package/dist-package/src/utils/is-pointer-device.d.ts +3 -0
  90. package/dist-package/src/utils/is-pointer-device.d.ts.map +1 -0
  91. package/dist-package/src/utils/is-pointer-device.js +8 -0
  92. package/dist-package/src/utils/is-pointer-device.js.map +1 -0
  93. package/dist-package/src/utils/is-string.d.ts +3 -0
  94. package/dist-package/src/utils/is-string.d.ts.map +1 -0
  95. package/dist-package/src/utils/is-string.js +3 -0
  96. package/dist-package/src/utils/is-string.js.map +1 -0
  97. package/dist-package/src/utils/is-substring.d.ts +3 -0
  98. package/dist-package/src/utils/is-substring.d.ts.map +1 -0
  99. package/dist-package/src/utils/is-substring.js +3 -0
  100. package/dist-package/src/utils/is-substring.js.map +1 -0
  101. package/dist-package/src/utils/kebab-to-camel-case.d.ts +6 -0
  102. package/dist-package/src/utils/kebab-to-camel-case.d.ts.map +1 -0
  103. package/dist-package/src/utils/kebab-to-camel-case.js +6 -0
  104. package/dist-package/src/utils/kebab-to-camel-case.js.map +1 -0
  105. package/dist-package/src/utils/loader-palette.d.ts +6 -0
  106. package/dist-package/src/utils/loader-palette.d.ts.map +1 -0
  107. package/dist-package/src/utils/loader-palette.js +8 -0
  108. package/dist-package/src/utils/loader-palette.js.map +1 -0
  109. package/dist-package/src/utils/noop.d.ts +3 -0
  110. package/dist-package/src/utils/noop.d.ts.map +1 -0
  111. package/dist-package/src/utils/noop.js +2 -0
  112. package/dist-package/src/utils/noop.js.map +1 -0
  113. package/dist-package/src/utils/sum.d.ts +3 -0
  114. package/dist-package/src/utils/sum.d.ts.map +1 -0
  115. package/dist-package/src/utils/sum.js +3 -0
  116. package/dist-package/src/utils/sum.js.map +1 -0
  117. package/dist-package/src/utils/to-title-case.d.ts +4 -0
  118. package/dist-package/src/utils/to-title-case.d.ts.map +1 -0
  119. package/dist-package/src/utils/to-title-case.js +10 -0
  120. package/dist-package/src/utils/to-title-case.js.map +1 -0
  121. package/dist-package/src/utils/unsafe-error-log.d.ts +3 -0
  122. package/dist-package/src/utils/unsafe-error-log.d.ts.map +1 -0
  123. package/dist-package/src/utils/unsafe-error-log.js +5 -0
  124. package/dist-package/src/utils/unsafe-error-log.js.map +1 -0
  125. package/dist-package/src/utils/use-combined-refs.d.ts +4 -0
  126. package/dist-package/src/utils/use-combined-refs.d.ts.map +1 -0
  127. package/dist-package/src/utils/use-combined-refs.js +22 -0
  128. package/dist-package/src/utils/use-combined-refs.js.map +1 -0
  129. package/dist-package/src/utils/use-deprecation-warnings.d.ts +16 -0
  130. package/dist-package/src/utils/use-deprecation-warnings.d.ts.map +1 -0
  131. package/dist-package/src/utils/use-deprecation-warnings.js +24 -0
  132. package/dist-package/src/utils/use-deprecation-warnings.js.map +1 -0
  133. package/dist-package/src/utils/use-multiple-forward-refs.d.ts +19 -0
  134. package/dist-package/src/utils/use-multiple-forward-refs.d.ts.map +1 -0
  135. package/dist-package/src/utils/use-multiple-forward-refs.js +31 -0
  136. package/dist-package/src/utils/use-multiple-forward-refs.js.map +1 -0
  137. package/dist-package/src/utils/use-page-scroll-lock.d.ts +2 -0
  138. package/dist-package/src/utils/use-page-scroll-lock.d.ts.map +1 -0
  139. package/dist-package/src/utils/use-page-scroll-lock.js +54 -0
  140. package/dist-package/src/utils/use-page-scroll-lock.js.map +1 -0
  141. package/dist-package/src/utils/use-safe-state.d.ts +4 -0
  142. package/dist-package/src/utils/use-safe-state.d.ts.map +1 -0
  143. package/dist-package/src/utils/use-safe-state.js +19 -0
  144. package/dist-package/src/utils/use-safe-state.js.map +1 -0
  145. package/dist-package/src/utils/use-width-of.d.ts +7 -0
  146. package/dist-package/src/utils/use-width-of.d.ts.map +1 -0
  147. package/dist-package/src/utils/use-width-of.js +16 -0
  148. package/dist-package/src/utils/use-width-of.js.map +1 -0
  149. package/dist-package/src/utils/useBoolean/index.d.ts +2 -0
  150. package/dist-package/src/utils/useBoolean/index.d.ts.map +1 -0
  151. package/dist-package/src/utils/useBoolean/index.js +2 -0
  152. package/dist-package/src/utils/useBoolean/index.js.map +1 -0
  153. package/dist-package/src/utils/useBoolean/use-boolean.d.ts +16 -0
  154. package/dist-package/src/utils/useBoolean/use-boolean.d.ts.map +1 -0
  155. package/dist-package/src/utils/useBoolean/use-boolean.js +15 -0
  156. package/dist-package/src/utils/useBoolean/use-boolean.js.map +1 -0
  157. package/dist-package/src/utils/useInterval/index.d.ts +2 -0
  158. package/dist-package/src/utils/useInterval/index.d.ts.map +1 -0
  159. package/dist-package/src/utils/useInterval/index.js +2 -0
  160. package/dist-package/src/utils/useInterval/index.js.map +1 -0
  161. package/dist-package/src/utils/useInterval/use-interval.d.ts +8 -0
  162. package/dist-package/src/utils/useInterval/use-interval.d.ts.map +1 -0
  163. package/dist-package/src/utils/useInterval/use-interval.js +29 -0
  164. package/dist-package/src/utils/useInterval/use-interval.js.map +1 -0
  165. package/dist-package/src/utils/useMouseEnter/index.d.ts +2 -0
  166. package/dist-package/src/utils/useMouseEnter/index.d.ts.map +1 -0
  167. package/dist-package/src/utils/useMouseEnter/index.js +2 -0
  168. package/dist-package/src/utils/useMouseEnter/index.js.map +1 -0
  169. package/dist-package/src/utils/useMouseEnter/use-mouse-enter.d.ts +4 -0
  170. package/dist-package/src/utils/useMouseEnter/use-mouse-enter.d.ts.map +1 -0
  171. package/dist-package/src/utils/useMouseEnter/use-mouse-enter.js +23 -0
  172. package/dist-package/src/utils/useMouseEnter/use-mouse-enter.js.map +1 -0
  173. package/dist-package/src/utils/useOnScreen/index.d.ts +2 -0
  174. package/dist-package/src/utils/useOnScreen/index.d.ts.map +1 -0
  175. package/dist-package/src/utils/useOnScreen/index.js +2 -0
  176. package/dist-package/src/utils/useOnScreen/index.js.map +1 -0
  177. package/dist-package/src/utils/useOnScreen/use-on-screen.d.ts +13 -0
  178. package/dist-package/src/utils/useOnScreen/use-on-screen.d.ts.map +1 -0
  179. package/dist-package/src/utils/useOnScreen/use-on-screen.js +26 -0
  180. package/dist-package/src/utils/useOnScreen/use-on-screen.js.map +1 -0
  181. package/package.json +5 -5
@@ -0,0 +1,2 @@
1
+ export * from './utils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './utils';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/Colors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/Colors/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ export declare const DEFAULT_CURRENCY = "USD";
2
+ export declare const DEFAULT_LOCALE = "en-US";
3
+ export interface FormatAmount {
4
+ /** The amount to be formatted */
5
+ amount: number | string;
6
+ /** Currency which need to be applied on the amount (ISO format) https://www.currency-iso.org/en/home/tables/table-a1.html */
7
+ currency?: string;
8
+ /** Locale identifiers are case-insensitive ASCII. However, it's conventional to use title case (first letter capitalized, successive letters lower case) for script code, upper case for region codes, and lower case for everything else. */
9
+ locale?: string;
10
+ options?: {
11
+ /** The minimum number of fraction digits to display **/
12
+ minimumFractionDigits?: number;
13
+ /** The maximum number of fraction digits to display **/
14
+ maximumFractionDigits?: number;
15
+ };
16
+ }
17
+ export declare const formatAmount: ({ amount, currency, locale, options, }: FormatAmount) => string;
18
+ //# sourceMappingURL=format-amount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-amount.d.ts","sourceRoot":"","sources":["../../../../src/utils/Formatters/format-amount.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AACrC,eAAO,MAAM,cAAc,UAAU,CAAA;AAErC,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8OAA8O;IAC9O,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE;QACR,wDAAwD;QACxD,qBAAqB,CAAC,EAAE,MAAM,CAAA;QAE9B,wDAAwD;QACxD,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAC/B,CAAA;CACF;AAED,eAAO,MAAM,YAAY,2CAKtB,YAAY,WASd,CAAA"}
@@ -0,0 +1,12 @@
1
+ export const DEFAULT_CURRENCY = 'USD';
2
+ export const DEFAULT_LOCALE = 'en-US';
3
+ export const formatAmount = ({ amount, currency = DEFAULT_CURRENCY, locale = DEFAULT_LOCALE, options, }) => {
4
+ const transformedAmount = typeof amount === 'string' ? Number(amount) : amount;
5
+ return Intl.NumberFormat(locale, {
6
+ style: 'currency',
7
+ minimumFractionDigits: options === null || options === void 0 ? void 0 : options.minimumFractionDigits,
8
+ maximumFractionDigits: options === null || options === void 0 ? void 0 : options.maximumFractionDigits,
9
+ currency,
10
+ }).format(transformedAmount);
11
+ };
12
+ //# sourceMappingURL=format-amount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-amount.js","sourceRoot":"","sources":["../../../../src/utils/Formatters/format-amount.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAA;AAkBrC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,MAAM,EACN,QAAQ,GAAG,gBAAgB,EAC3B,MAAM,GAAG,cAAc,EACvB,OAAO,GACM,EAAE,EAAE;IACjB,MAAM,iBAAiB,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAE9E,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;QAC/B,KAAK,EAAE,UAAU;QACjB,qBAAqB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB;QACrD,qBAAqB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB;QACrD,QAAQ;KACT,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAA;AAC9B,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { formatAmount, DEFAULT_LOCALE, DEFAULT_CURRENCY } from './format-amount';
2
+ export type { FormatAmount } from './format-amount';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/Formatters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEhF,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { formatAmount, DEFAULT_LOCALE, DEFAULT_CURRENCY } from './format-amount';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/Formatters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/Gradients/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/Gradients/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { ModalManager } from './modal-manager';
2
+ export { useModal } from './use-modal';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { ModalManager } from './modal-manager';
2
+ export { useModal } from './use-modal';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ export declare class ModalManager {
2
+ modals: number[];
3
+ add(modalId: number): void;
4
+ remove(modalId: number): void;
5
+ isTopModal(modalId: number): boolean;
6
+ }
7
+ //# sourceMappingURL=modal-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-manager.d.ts","sourceRoot":"","sources":["../../../../src/utils/Modal/modal-manager.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACvB,MAAM,EAAE,MAAM,EAAE,CAAK;IAErB,GAAG,CAAC,OAAO,EAAE,MAAM;IAQnB,MAAM,CAAC,OAAO,EAAE,MAAM;IAUtB,UAAU,CAAC,OAAO,EAAE,MAAM;CAK3B"}
@@ -0,0 +1,22 @@
1
+ export class ModalManager {
2
+ constructor() {
3
+ this.modals = [];
4
+ }
5
+ add(modalId) {
6
+ if (this.modals.includes(modalId)) {
7
+ return;
8
+ }
9
+ this.modals.push(modalId);
10
+ }
11
+ remove(modalId) {
12
+ const modalIndex = this.modals.indexOf(modalId);
13
+ if (modalIndex === -1) {
14
+ return;
15
+ }
16
+ this.modals.splice(modalIndex, 1);
17
+ }
18
+ isTopModal(modalId) {
19
+ return (this.modals.length > 0 && this.modals[this.modals.length - 1] === modalId);
20
+ }
21
+ }
22
+ //# sourceMappingURL=modal-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-manager.js","sourceRoot":"","sources":["../../../../src/utils/Modal/modal-manager.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAY;IAAzB;QACE,WAAM,GAAa,EAAE,CAAA;IAyBvB,CAAC;IAvBC,GAAG,CAAC,OAAe;QACjB,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACjC,OAAM;SACP;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAE/C,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE;YACrB,OAAM;SACP;QAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IACnC,CAAC;IAED,UAAU,CAAC,OAAe;QACxB,OAAO,CACL,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,OAAO,CAC1E,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ declare const useModal: () => {
2
+ showModal: () => void;
3
+ hideModal: () => void;
4
+ isOpen: boolean;
5
+ };
6
+ export { useModal };
7
+ //# sourceMappingURL=use-modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-modal.d.ts","sourceRoot":"","sources":["../../../../src/utils/Modal/use-modal.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;CAYb,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { useCallback, useState } from 'react';
2
+ const useModal = () => {
3
+ const [isOpen, setIsOpen] = useState(false);
4
+ const hideModal = useCallback(() => setIsOpen(false), [setIsOpen]);
5
+ const showModal = useCallback(() => setIsOpen(true), [setIsOpen]);
6
+ return {
7
+ showModal,
8
+ hideModal,
9
+ isOpen,
10
+ };
11
+ };
12
+ export { useModal };
13
+ //# sourceMappingURL=use-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-modal.js","sourceRoot":"","sources":["../../../../src/utils/Modal/use-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE7C,MAAM,QAAQ,GAAG,GAAG,EAAE;IACpB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3C,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAElE,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEjE,OAAO;QACL,SAAS;QACT,SAAS;QACT,MAAM;KACP,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseProps } from '@toptal/picasso-shared';
3
+ export interface Props extends BaseProps {
4
+ /** Flag for transition execution. */
5
+ on: boolean;
6
+ /** Element to apply transitions. */
7
+ children: ReactNode;
8
+ }
9
+ export declare const Rotate180: {
10
+ (props: Props): JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export default Rotate180;
14
+ //# sourceMappingURL=Rotate180.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rotate180.d.ts","sourceRoot":"","sources":["../../../../../src/utils/Transitions/Rotate180/Rotate180.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAMvD,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,qCAAqC;IACrC,EAAE,EAAE,OAAO,CAAA;IACX,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAA;CACpB;AAMD,eAAO,MAAM,SAAS;YAAW,KAAK;;CAmBrC,CAAA;AAID,eAAe,SAAS,CAAA"}
@@ -0,0 +1,29 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React from 'react';
13
+ import cx from 'classnames';
14
+ import { makeStyles } from '@material-ui/core/styles';
15
+ import styles from './styles';
16
+ const useStyles = makeStyles(styles, {
17
+ name: 'Rotate180',
18
+ });
19
+ export const Rotate180 = (props) => {
20
+ const { children, style, className, on } = props, rest = __rest(props, ["children", "style", "className", "on"]);
21
+ const classes = useStyles();
22
+ const childProps = Object.assign({ className: cx(className, classes.transition, {
23
+ [classes.rotate180]: on,
24
+ }), style }, rest);
25
+ return (React.createElement(React.Fragment, null, React.Children.map(children, child => React.cloneElement(child, childProps))));
26
+ };
27
+ Rotate180.displayName = 'Rotate180';
28
+ export default Rotate180;
29
+ //# sourceMappingURL=Rotate180.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rotate180.js","sourceRoot":"","sources":["../../../../../src/utils/Transitions/Rotate180/Rotate180.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,YAAY,CAAA;AAG3B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,MAAM,MAAM,UAAU,CAAA;AAS7B,MAAM,SAAS,GAAG,UAAU,CAAQ,MAAM,EAAE;IAC1C,IAAI,EAAE,WAAW;CAClB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAY,EAAE,EAAE;IACxC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAnD,wCAA2C,CAAQ,CAAA;IACzD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAA;IAE3B,MAAM,UAAU,mBACd,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE;YAC3C,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE;SACxB,CAAC,EACF,KAAK,IACF,IAAI,CACR,CAAA;IAED,OAAO,CACL,0CACG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CACpC,KAAK,CAAC,YAAY,CAAC,KAAqB,EAAE,UAAU,CAAC,CACtD,CACA,CACJ,CAAA;AACH,CAAC,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,eAAe,SAAS,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { Props } from './Rotate180';
2
+ export { default } from './Rotate180';
3
+ export declare type Rotate180Props = Props;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/Transitions/Rotate180/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,oBAAY,cAAc,GAAG,KAAK,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Rotate180';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utils/Transitions/Rotate180/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const _default: () => import("@material-ui/styles").StyleRules<{}, "transition" | "rotate180">;
2
+ export default _default;
3
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/utils/Transitions/Rotate180/styles.ts"],"names":[],"mappings":";AAEA,wBAQI"}
@@ -0,0 +1,10 @@
1
+ import { createStyles } from '@material-ui/core/styles';
2
+ export default () => createStyles({
3
+ transition: {
4
+ transition: 'transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
5
+ },
6
+ rotate180: {
7
+ transform: 'rotate(180deg)',
8
+ },
9
+ });
10
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/utils/Transitions/Rotate180/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,UAAU,EAAE;QACV,UAAU,EAAE,kDAAkD;KAC/D;IACD,SAAS,EAAE;QACT,SAAS,EAAE,gBAAgB;KAC5B;CACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { default as Rotate180 } from './Rotate180';
2
+ export type { Rotate180Props } from './Rotate180';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/Transitions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as Rotate180 } from './Rotate180';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/Transitions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as capitalize } from '@material-ui/core/utils/capitalize';
2
+ //# sourceMappingURL=capitalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as capitalize } from '@material-ui/core/utils/capitalize';
2
+ //# sourceMappingURL=capitalize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const AVATAR_INITIALS_LIMIT = 3;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,IAAI,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const AVATAR_INITIALS_LIMIT = 3;
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ export declare type FeatureOptions<P extends object> = {
2
+ featureProps: Partial<P>;
3
+ unsupportedProps: Partial<P>;
4
+ };
5
+ declare const _default: <P extends object>(componentName: string, props: P, options: FeatureOptions<P>) => P;
6
+ export default _default;
7
+ //# sourceMappingURL=disable-unsupported-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disable-unsupported-props.d.ts","sourceRoot":"","sources":["../../../src/utils/disable-unsupported-props.ts"],"names":[],"mappings":"AAIA,oBAAY,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI;IAC7C,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACxB,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;CAC7B,CAAA;0DAGgB,MAAM;AADvB,wBAmCC"}
@@ -0,0 +1,19 @@
1
+ import unsafeErrorLog from './unsafe-error-log';
2
+ export default (componentName, props, options) => {
3
+ const { featureProps, unsupportedProps } = options;
4
+ const featurePropNames = Object.keys(featureProps);
5
+ // Check if in props there are props with same value as feature props, if
6
+ // so it will mean we need to check further for unsupported props and reset them
7
+ if (featurePropNames.every(propName => props[propName] !== featureProps[propName])) {
8
+ return props;
9
+ }
10
+ const unsupportedPropNames = Object.keys(unsupportedProps);
11
+ // Check for unsupported props if there are props that are enabled, if so
12
+ // warn developer in console and reset props to turn off unsupported props
13
+ if (unsupportedPropNames.some(propName => props[propName])) {
14
+ unsafeErrorLog(`${componentName} doesn't support: ${unsupportedPropNames.join(', ')} props when used with ${JSON.stringify(featureProps)}`);
15
+ return Object.assign(Object.assign({}, props), unsupportedProps);
16
+ }
17
+ return props;
18
+ };
19
+ //# sourceMappingURL=disable-unsupported-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disable-unsupported-props.js","sourceRoot":"","sources":["../../../src/utils/disable-unsupported-props.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAS/C,eAAe,CACb,aAAqB,EACrB,KAAQ,EACR,OAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAA;IAElD,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAElD,yEAAyE;IACzE,gFAAgF;IAChF,IACE,gBAAgB,CAAC,KAAK,CACpB,QAAQ,CAAC,EAAE,CACR,KAAgB,CAAC,QAAQ,CAAC,KAAM,YAAuB,CAAC,QAAQ,CAAC,CACrE,EACD;QACA,OAAO,KAAK,CAAA;KACb;IAED,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAE1D,yEAAyE;IACzE,0EAA0E;IAC1E,IAAI,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAE,KAAgB,CAAC,QAAQ,CAAC,CAAC,EAAE;QACtE,cAAc,CACZ,GAAG,aAAa,qBAAqB,oBAAoB,CAAC,IAAI,CAC5D,IAAI,CACL,yBAAyB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CACzD,CAAA;QAED,uCAAY,KAAK,GAAK,gBAAgB,EAAE;KACzC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ export declare type Component<T, P> = T & {
3
+ defaultProps?: Partial<P>;
4
+ displayName?: string;
5
+ };
6
+ /**
7
+ * Wraps the exotic generic functional component type returned by the `forwardRef`.
8
+ * This function adopts the type of the exotic component to take `defaultProps` and
9
+ * `displayName`.
10
+ *
11
+ * @see forwardRef
12
+ *
13
+ * @param component exotic component returned by `forwardRef`
14
+ */
15
+ export declare const documentable: <T, P>(component: T) => Component<T, P>;
16
+ /**
17
+ * Wrapper around React.forwardRef that preserves genericity of the passed `Component`.
18
+ * @note If you need to set `defaultProps` and `displayName` properties, you need to wrap
19
+ * result of this function into `documentable`,
20
+ *
21
+ * @see documentable
22
+ *
23
+ * @warning ⚠️ Use it only when you need to preserve genericity of the component as it
24
+ * omits some type checks on the prop type of the component and IT DOESN'T ADD ref
25
+ * property type to the list of props — you have to do it on your own. If you don't
26
+ * care about genericity use React.forwardRef directly.
27
+ *
28
+ * @param component React component conforming to forwardRef type constraints
29
+ */
30
+ export declare const forwardRef: <P, T>(component: (props: P, ref: React.Ref<T>) => React.ReactElement | null) => (props: P & {
31
+ ref?: React.Ref<T> | undefined;
32
+ }) => React.ReactElement | null;
33
+ //# sourceMappingURL=forward-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forward-ref.d.ts","sourceRoot":"","sources":["../../../src/utils/forward-ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,oBAAY,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,yCAAwE,CAAA;AAEjG;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,qDACuB,MAAM,YAAY,GAAG,IAAI;;MAIhE,MAAM,YAAY,GAAG,IAAI,CAAA"}
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ /**
3
+ * Wraps the exotic generic functional component type returned by the `forwardRef`.
4
+ * This function adopts the type of the exotic component to take `defaultProps` and
5
+ * `displayName`.
6
+ *
7
+ * @see forwardRef
8
+ *
9
+ * @param component exotic component returned by `forwardRef`
10
+ */
11
+ export const documentable = (component) => component;
12
+ /**
13
+ * Wrapper around React.forwardRef that preserves genericity of the passed `Component`.
14
+ * @note If you need to set `defaultProps` and `displayName` properties, you need to wrap
15
+ * result of this function into `documentable`,
16
+ *
17
+ * @see documentable
18
+ *
19
+ * @warning ⚠️ Use it only when you need to preserve genericity of the component as it
20
+ * omits some type checks on the prop type of the component and IT DOESN'T ADD ref
21
+ * property type to the list of props — you have to do it on your own. If you don't
22
+ * care about genericity use React.forwardRef directly.
23
+ *
24
+ * @param component React component conforming to forwardRef type constraints
25
+ */
26
+ export const forwardRef = (component) => React.forwardRef(component);
27
+ //# sourceMappingURL=forward-ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forward-ref.js","sourceRoot":"","sources":["../../../src/utils/forward-ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAO,SAAY,EAAmB,EAAE,CAAC,SAA4B,CAAA;AAEjG;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,SAAqE,EACrE,EAAE,CACF,KAAK,CAAC,UAAU,CAAC,SAAS,CAEI,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const _default: (fullName: string) => string;
2
+ export default _default;
3
+ //# sourceMappingURL=get-name-initials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-name-initials.d.ts","sourceRoot":"","sources":["../../../src/utils/get-name-initials.ts"],"names":[],"mappings":"mCAE0B,MAAM;AAAhC,wBAYC"}
@@ -0,0 +1,14 @@
1
+ import { AVATAR_INITIALS_LIMIT } from './constants';
2
+ export default (fullName) => {
3
+ return fullName
4
+ .split(' ')
5
+ .map(word => {
6
+ if (word === '' || word.length <= 1) {
7
+ return '';
8
+ }
9
+ return word[0];
10
+ })
11
+ .join('')
12
+ .slice(0, AVATAR_INITIALS_LIMIT);
13
+ };
14
+ //# sourceMappingURL=get-name-initials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-name-initials.js","sourceRoot":"","sources":["../../../src/utils/get-name-initials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD,eAAe,CAAC,QAAgB,EAAE,EAAE;IAClC,OAAO,QAAQ;SACZ,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,IAAI,CAAC,EAAE;QACV,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;YACnC,OAAO,EAAE,CAAA;SACV;QAED,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;IAChB,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC;SACR,KAAK,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAA;AACpC,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Extracts only the text contents of a ReactNode *recursively*.
4
+ *
5
+ * Be aware that depending on the size of the node element tree this function
6
+ * can ve very slow and actually throw a StackOverflow error. Shouldn't be a
7
+ * problem for elements that you expect a shallow or raw text input.
8
+ *
9
+ * @example
10
+ * // Results on `Foo Bar`
11
+ * getReactNodeTextContent(<div>Foo <span>Bar</span></div>)
12
+ *
13
+ * @see {@link https://stackoverflow.com/a/60564620/4595583} for the inspiration
14
+ */
15
+ export declare const getReactNodeTextContent: (node: ReactNode) => string;
16
+ //# sourceMappingURL=get-react-node-text-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-react-node-text-content.d.ts","sourceRoot":"","sources":["../../../src/utils/get-react-node-text-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,SAAU,SAAS,KAAG,MAoBzD,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Extracts only the text contents of a ReactNode *recursively*.
3
+ *
4
+ * Be aware that depending on the size of the node element tree this function
5
+ * can ve very slow and actually throw a StackOverflow error. Shouldn't be a
6
+ * problem for elements that you expect a shallow or raw text input.
7
+ *
8
+ * @example
9
+ * // Results on `Foo Bar`
10
+ * getReactNodeTextContent(<div>Foo <span>Bar</span></div>)
11
+ *
12
+ * @see {@link https://stackoverflow.com/a/60564620/4595583} for the inspiration
13
+ */
14
+ export const getReactNodeTextContent = (node) => {
15
+ switch (typeof node) {
16
+ case 'number':
17
+ case 'string':
18
+ return String(node).trim();
19
+ case 'object':
20
+ if (Array.isArray(node)) {
21
+ return node.map(getReactNodeTextContent).filter(Boolean).join(' ');
22
+ }
23
+ if (node != null && 'props' in node) {
24
+ return getReactNodeTextContent(node.props.children);
25
+ }
26
+ // All other cases are ignored (booleans, null, undefined and non-elements)
27
+ // Fall through
28
+ default:
29
+ return '';
30
+ }
31
+ };
32
+ //# sourceMappingURL=get-react-node-text-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-react-node-text-content.js","sourceRoot":"","sources":["../../../src/utils/get-react-node-text-content.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAe,EAAU,EAAE;IACjE,QAAQ,OAAO,IAAI,EAAE;QACnB,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QAE5B,KAAK,QAAQ;YACX,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACvB,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;aACnE;YAED,IAAI,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnC,OAAO,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;aACpD;QAEH,2EAA2E;QAC3E,eAAe;QACf;YACE,OAAO,EAAE,CAAA;KACZ;AACH,CAAC,CAAA"}
@@ -0,0 +1,63 @@
1
+ import * as TransitionUtils from './Transitions';
2
+ declare const colorUtils: {
3
+ alpha: (inputColor: string, amount: number) => string;
4
+ lighten: (inputColor: string, amount: number) => string;
5
+ darken: (inputColor: string, amount: number) => string;
6
+ };
7
+ export { colorUtils };
8
+ export { breakpointsList as breakpoints, screens, isScreenSize, useBreakpoint, useScreens, shadows, colors as palette, gradients, generateRandomString, generateRandomStringOrGetEmptyInTest, sizes, } from '@toptal/picasso-provider';
9
+ export type { BreakpointKeys } from '@toptal/picasso-provider';
10
+ export { useIsomorphicLayoutEffect, isBrowser, type OverridableComponent, } from '@toptal/picasso-shared';
11
+ export { default as ClickAwayListener } from '@material-ui/core/ClickAwayListener';
12
+ export { capitalize } from './capitalize';
13
+ export { default as disableUnsupportedProps } from './disable-unsupported-props';
14
+ export { type FeatureOptions } from './disable-unsupported-props';
15
+ export { forwardRef, documentable } from './forward-ref';
16
+ export type { Component } from './forward-ref';
17
+ export { default as getNameInitials } from './get-name-initials';
18
+ export { default as isBoolean } from './is-boolean';
19
+ export { default as isNumber } from './is-number';
20
+ export { default as isOverflown } from './is-overflown';
21
+ export { default as isPointerDevice } from './is-pointer-device';
22
+ export { default as isString } from './is-string';
23
+ export { default as isSubstring } from './is-substring';
24
+ export { default as kebabToCamelCase } from './kebab-to-camel-case';
25
+ export { default as noop } from './noop';
26
+ export { default as toTitleCase } from './to-title-case';
27
+ export { default as useCombinedRefs } from './use-combined-refs';
28
+ export { default as useSafeState } from './use-safe-state';
29
+ export { default as useWidthOf } from './use-width-of';
30
+ export { default as loaderPalette } from './loader-palette';
31
+ export { default as unsafeErrorLog } from './unsafe-error-log';
32
+ export { default as useBoolean } from './useBoolean/use-boolean';
33
+ export { default as useInterval } from './useInterval';
34
+ export { default as useOnScreen } from './useOnScreen';
35
+ export { default as useMouseEnter } from './useMouseEnter';
36
+ export { default as sum } from './sum';
37
+ export type { ReferenceObject } from './use-width-of';
38
+ export { default as useMultipleForwardRefs } from './use-multiple-forward-refs';
39
+ export { usePageScrollLock } from './use-page-scroll-lock';
40
+ export { AVATAR_INITIALS_LIMIT } from './constants';
41
+ export declare const Transitions: typeof TransitionUtils;
42
+ export { useModal } from './Modal';
43
+ export * from './Modal';
44
+ export { formatAmount, DEFAULT_CURRENCY, DEFAULT_LOCALE } from './Formatters';
45
+ export type { FormatAmount } from './Formatters';
46
+ export * from './get-react-node-text-content';
47
+ export * from './Colors';
48
+ export * from './Formatters';
49
+ export * from './Gradients';
50
+ export * from './Modal';
51
+ export * from './Transitions';
52
+ export { SPACING_0 } from '@toptal/picasso-provider';
53
+ export { SPACING_1 } from '@toptal/picasso-provider';
54
+ export { SPACING_2 } from '@toptal/picasso-provider';
55
+ export { SPACING_3 } from '@toptal/picasso-provider';
56
+ export { SPACING_4 } from '@toptal/picasso-provider';
57
+ export { SPACING_6 } from '@toptal/picasso-provider';
58
+ export { SPACING_8 } from '@toptal/picasso-provider';
59
+ export { SPACING_10 } from '@toptal/picasso-provider';
60
+ export { SPACING_12 } from '@toptal/picasso-provider';
61
+ export { spacingToRem } from '@toptal/picasso-provider';
62
+ export { useDeprecationWarning, usePropDeprecationWarning, } from './use-deprecation-warnings';
63
+ //# sourceMappingURL=index.d.ts.map