@alphakits/ui 2.0.12 → 2.1.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 (148) hide show
  1. package/dist/badge/component.d.ts +1 -1
  2. package/dist/box/component.d.ts +2 -2
  3. package/dist/calendar/typings.d.ts +42 -0
  4. package/dist/calendar/use-calendar.d.ts +2 -40
  5. package/dist/calendar/use-calendar.js +1 -1
  6. package/dist/calendar/use-calendar.js.map +1 -1
  7. package/dist/calendar-input/component.d.ts +1 -1
  8. package/dist/checkbox/component.js +12 -15
  9. package/dist/checkbox/component.js.map +1 -1
  10. package/dist/checkbox-lists/component.d.ts +2 -2
  11. package/dist/collapsable-row/addons.d.ts +3 -3
  12. package/dist/copy-button/component.d.ts +2 -1
  13. package/dist/date-switcher/component.d.ts +2 -2
  14. package/dist/flex/component.d.ts +2 -2
  15. package/dist/footer/component.js +32 -38
  16. package/dist/footer/component.js.map +1 -1
  17. package/dist/footer/index.module.css +1 -1
  18. package/dist/footer/index.module.css.js +16 -14
  19. package/dist/footer/index.module.css.js.map +1 -1
  20. package/dist/form/component.d.ts +2 -2
  21. package/dist/form/templates/base-form/index.d.ts +1 -1
  22. package/dist/form/templates/rest-form/form.d.ts +2 -1
  23. package/dist/form/templates/rest-form/index.d.ts +2 -2
  24. package/dist/form/templates/rest-form/index.js.map +1 -1
  25. package/dist/grid/component.d.ts +20 -5
  26. package/dist/grid/component.js +49 -7
  27. package/dist/grid/component.js.map +1 -1
  28. package/dist/grid/index.js +4 -2
  29. package/dist/grid/index.module.css +1 -0
  30. package/dist/grid/index.module.css.js +11 -0
  31. package/dist/grid/{row/index.module.css.js.map → index.module.css.js.map} +1 -1
  32. package/dist/hooks/useClickOutside/index.d.ts +1 -1
  33. package/dist/hooks/useClickOutside/index.js.map +1 -1
  34. package/dist/hooks/useFocus/index.d.ts +1 -1
  35. package/dist/hooks/useFocus/index.js.map +1 -1
  36. package/dist/hooks/usePrevious/index.js +3 -3
  37. package/dist/hooks/usePrevious/index.js.map +1 -1
  38. package/dist/image/use-image-render-component.d.ts +1 -1
  39. package/dist/image-gallery/component.d.ts +2 -2
  40. package/dist/index.js +254 -252
  41. package/dist/input/component.js +56 -60
  42. package/dist/input/component.js.map +1 -1
  43. package/dist/input/index.module.css +1 -1
  44. package/dist/input-autocomplete/autocomplete-field/index.d.ts +2 -1
  45. package/dist/input-autocomplete/autocomplete-field/index.js.map +1 -1
  46. package/dist/input-autocomplete/component.d.ts +3 -3
  47. package/dist/input-ghost/component.d.ts +1 -1
  48. package/dist/masked-input/component.d.ts +1 -1
  49. package/dist/menu/component.d.ts +3 -2
  50. package/dist/menu/component.js.map +1 -1
  51. package/dist/menu/hooks/use-menu.d.ts +1 -1
  52. package/dist/menu/hooks/use-menu.js +6 -6
  53. package/dist/menu/hooks/use-menu.js.map +1 -1
  54. package/dist/modal/components/modals/modal.d.ts +2 -1
  55. package/dist/notification/component.js +33 -37
  56. package/dist/notification/component.js.map +1 -1
  57. package/dist/notification/utils/index.d.ts +1 -1
  58. package/dist/notification/utils/index.js.map +1 -1
  59. package/dist/page-loading/component.d.ts +2 -2
  60. package/dist/picker-button/component.d.ts +1 -1
  61. package/dist/picker-button/field/Component.d.ts +2 -1
  62. package/dist/portal/utils.d.ts +1 -1
  63. package/dist/portal/utils.js.map +1 -1
  64. package/dist/radio-groups/component.d.ts +2 -2
  65. package/dist/select/components/arrow/component.d.ts +2 -1
  66. package/dist/select/components/base-select/component.js +262 -259
  67. package/dist/select/components/base-select/component.js.map +1 -1
  68. package/dist/select/components/checkmark/component.d.ts +2 -1
  69. package/dist/select/components/field/component.d.ts +2 -1
  70. package/dist/select/components/field/component.js.map +1 -1
  71. package/dist/select/components/native-select/component.js.map +1 -1
  72. package/dist/select/components/optgroup/component.d.ts +2 -1
  73. package/dist/select/components/select-search/index.d.ts +1 -1
  74. package/dist/select/components/virtual-options-list/component.d.ts +2 -1
  75. package/dist/select/presets/use-lazy-loading/index.d.ts +4 -4
  76. package/dist/select/presets/use-lazy-loading/index.js +20 -20
  77. package/dist/select/presets/use-lazy-loading/index.js.map +1 -1
  78. package/dist/select/presets/use-select-with-loading/hook.d.ts +3 -2
  79. package/dist/select/presets/use-select-with-loading/hook.js +7 -7
  80. package/dist/select/presets/use-select-with-loading/hook.js.map +1 -1
  81. package/dist/select/typings.d.ts +1 -1
  82. package/dist/select/utils.d.ts +2 -2
  83. package/dist/select/utils.js +17 -15
  84. package/dist/select/utils.js.map +1 -1
  85. package/dist/sidepanel/component.d.ts +1 -0
  86. package/dist/sidepanel/component.js.map +1 -1
  87. package/dist/space/Item.d.ts +1 -1
  88. package/dist/status/component.d.ts +2 -1
  89. package/dist/status/component.js.map +1 -1
  90. package/dist/switch/component.d.ts +1 -1
  91. package/dist/table/components/cells/index.d.ts +2 -1
  92. package/dist/table/components/empty-list/index.d.ts +2 -2
  93. package/dist/table/components/error/index.d.ts +2 -2
  94. package/dist/table/components/loading/index.d.ts +1 -1
  95. package/dist/table/components/table-header/index.d.ts +1 -1
  96. package/dist/table/components/table-header/index.js.map +1 -1
  97. package/dist/table/table.d.ts +2 -2
  98. package/dist/table/table.js.map +1 -1
  99. package/dist/table/utils/get-tags.d.ts +3 -2
  100. package/dist/table/utils/get-tags.js.map +1 -1
  101. package/dist/table/utils/prepare-rows.d.ts +2 -1
  102. package/dist/table/utils/prepare-rows.js.map +1 -1
  103. package/dist/textarea/component.js +68 -75
  104. package/dist/textarea/component.js.map +1 -1
  105. package/dist/theme-provider/component.d.ts +1 -0
  106. package/dist/theme-provider/component.js.map +1 -1
  107. package/dist/toast/component.d.ts +1 -1
  108. package/dist/toast-notifier/component.js +39 -40
  109. package/dist/toast-notifier/component.js.map +1 -1
  110. package/dist/tooltip/component.d.ts +2 -2
  111. package/dist/tooltip/component.js +4 -4
  112. package/dist/tooltip/component.js.map +1 -1
  113. package/dist/tooltip/node-resolver.d.ts +26 -0
  114. package/dist/tooltip/node-resolver.js +14 -0
  115. package/dist/tooltip/node-resolver.js.map +1 -0
  116. package/dist/typography/title/component.d.ts +2 -2
  117. package/dist/with-suffix/component.d.ts +1 -1
  118. package/package.json +8 -12
  119. package/dist/calendar/typings.js +0 -2
  120. package/dist/calendar/typings.js.map +0 -1
  121. package/dist/grid/col/component.d.ts +0 -52
  122. package/dist/grid/col/component.js +0 -39
  123. package/dist/grid/col/component.js.map +0 -1
  124. package/dist/grid/col/index.d.ts +0 -1
  125. package/dist/grid/col/index.js +0 -5
  126. package/dist/grid/col/index.js.map +0 -1
  127. package/dist/grid/col/index.module.css +0 -1
  128. package/dist/grid/col/index.module.css.js +0 -519
  129. package/dist/grid/col/index.module.css.js.map +0 -1
  130. package/dist/grid/gutters.module.css +0 -1
  131. package/dist/grid/gutters.module.css.js +0 -50
  132. package/dist/grid/gutters.module.css.js.map +0 -1
  133. package/dist/grid/row/component.d.ts +0 -41
  134. package/dist/grid/row/component.js +0 -43
  135. package/dist/grid/row/component.js.map +0 -1
  136. package/dist/grid/row/index.d.ts +0 -1
  137. package/dist/grid/row/index.js +0 -5
  138. package/dist/grid/row/index.js.map +0 -1
  139. package/dist/grid/row/index.module.css +0 -1
  140. package/dist/grid/row/index.module.css.js +0 -25
  141. package/dist/grid/typings.d.ts +0 -15
  142. package/dist/grid/typings.js +0 -2
  143. package/dist/grid/typings.js.map +0 -1
  144. package/dist/grid/utils/index.d.ts +0 -2
  145. package/dist/grid/utils/index.js +0 -31
  146. package/dist/grid/utils/index.js.map +0 -1
  147. package/dist/select/typings.js +0 -2
  148. package/dist/select/typings.js.map +0 -1
@@ -1,29 +1,31 @@
1
1
  import './index.module.css';
2
- const t = "wrapper_Enjf", o = "row_wrapper_8067", c = "title_Tgf-", n = "block_rSzc", e = "link_Oe3C", l = "text_qVH7", s = "email_h6jh", r = "buttons_dZl8", p = "bottomBlock_fjWw", a = "contactBlock_kAr-", _ = "phone_yts-", k = {
2
+ const t = "wrapper_Enjf", o = "row_wrapper_8067", c = "gridCol_l2Ph", n = "title_Tgf-", l = "block_rSzc", e = "link_Oe3C", r = "text_qVH7", s = "email_h6jh", p = "buttons_dZl8", _ = "bottomBlock_fjWw", a = "contactBlock_kAr-", k = "phone_yts-", i = {
3
3
  wrapper: t,
4
4
  row_wrapper: o,
5
- title: c,
6
- block: n,
5
+ gridCol: c,
6
+ title: n,
7
+ block: l,
7
8
  link: e,
8
- text: l,
9
+ text: r,
9
10
  email: s,
10
- buttons: r,
11
- bottomBlock: p,
11
+ buttons: p,
12
+ bottomBlock: _,
12
13
  contactBlock: a,
13
- phone: _
14
+ phone: k
14
15
  };
15
16
  export {
16
- n as block,
17
- p as bottomBlock,
18
- r as buttons,
17
+ l as block,
18
+ _ as bottomBlock,
19
+ p as buttons,
19
20
  a as contactBlock,
20
- k as default,
21
+ i as default,
21
22
  s as email,
23
+ c as gridCol,
22
24
  e as link,
23
- _ as phone,
25
+ k as phone,
24
26
  o as row_wrapper,
25
- l as text,
26
- c as title,
27
+ r as text,
28
+ n as title,
27
29
  t as wrapper
28
30
  };
29
31
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const Component: () => JSX.Element;
1
+ import { default as React } from 'react';
2
+ export declare const Component: () => React.JSX.Element;
@@ -12,4 +12,4 @@ export type Props<T extends FormikValues> = {
12
12
  save: (values: any) => any;
13
13
  children: (props: FormikProps<FormikValues & T>) => React.ReactNode;
14
14
  };
15
- export declare function BaseForm<T extends FormikValues>({ loading, validate, customValidationFields, initialValues, enableReinitialize, save, children, t, }: PropsWithChildren<Props<T>>): JSX.Element;
15
+ export declare function BaseForm<T extends FormikValues>({ loading, validate, customValidationFields, initialValues, enableReinitialize, save, children, t, }: PropsWithChildren<Props<T>>): React.JSX.Element;
@@ -1,5 +1,6 @@
1
+ import { default as React } from 'react';
1
2
  import { FormikProps, FormikValues } from 'formik';
2
3
  import { Props } from '.';
3
4
  type FormProps<T extends FormikValues> = Props<T> & FormikProps<T>;
4
- export declare function Form<T extends FormikValues>({ recordId, title, subtitle, headerBottomAddons, initialValues, submitButtonText, customFooter, loading, updating, removing, customValidationFields, validate, save, remove, close, back, t, children, headerAddon, error, softError, ...formProps }: FormProps<T>): JSX.Element;
5
+ export declare function Form<T extends FormikValues>({ recordId, title, subtitle, headerBottomAddons, initialValues, submitButtonText, customFooter, loading, updating, removing, customValidationFields, validate, save, remove, close, back, t, children, headerAddon, error, softError, ...formProps }: FormProps<T>): React.JSX.Element;
5
6
  export {};
@@ -1,4 +1,4 @@
1
- import { default as React, PropsWithChildren } from 'react';
1
+ import { default as React } from 'react';
2
2
  import { FormikErrors, FormikProps, FormikValues } from 'formik';
3
3
  import { TFunction } from '../../../modal';
4
4
  export type Props<T extends FormikValues> = {
@@ -27,4 +27,4 @@ export type Props<T extends FormikValues> = {
27
27
  t: TFunction;
28
28
  headerAddon?: React.ReactNode;
29
29
  };
30
- export declare function RestForm<T extends FormikValues>({ enableReinitialize, ...props }: PropsWithChildren<Props<T>>): JSX.Element;
30
+ export declare function RestForm<T extends FormikValues>({ enableReinitialize, ...props }: Props<T>): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/form/templates/rest-form/index.tsx"],"sourcesContent":["import React, {\n PropsWithChildren,\n} from 'react';\nimport {\n Formik, FormikErrors, FormikProps, FormikValues,\n} from 'formik';\n\nimport { TFunction } from '../../../modal';\n\nimport { Form } from './form';\n\nexport type Props<T extends FormikValues> = {\n recordId?: number;\n\n title: string;\n\n subtitle?: string;\n\n customFooter?: React.ReactNode;\n enableReinitialize?: boolean;\n\n headerBottomAddons?: React.ReactNode;\n\n initialValues: T;\n\n validate?: (values: T) => void | Record<string, unknown> | Promise<FormikErrors<T>>;\n\n /** customValidationFields - значения полей которые необходимо валидировать */\n customValidationFields?: Array<keyof T>;\n\n /* Промис для основной кнопки \"сохранить\" */\n save: (values: any) => any;\n\n back?: () => void;\n\n /* Промис для удаления записи */\n remove?: () => any;\n\n /* loading - показываем общий скелетон для формы */\n loading?: boolean;\n\n /* updating - показываем лоадинг для кнопки \"Сохранить\" */\n updating?: boolean;\n\n /* removing - показываем лоадинг для кнопки \"Удалить\" */\n removing?: boolean;\n\n /* Фатальная ошибка */\n error?: string | null;\n\n /* Ошибка, показывающася в алерте */\n softError?: string | null;\n\n /** Текст кнопки сохранить */\n submitButtonText?: string;\n\n children: (props: FormikProps<FormikValues & T>) => React.ReactNode;\n\n close: () => void;\n\n t: TFunction;\n\n headerAddon?: React.ReactNode;\n};\n\nexport function RestForm<T extends FormikValues>({ enableReinitialize = true, ...props }: PropsWithChildren<Props<T>>) {\n const {\n loading, error, validate, customValidationFields, initialValues, save,\n } = props;\n\n if (error) return <div>Error </div>;\n\n const customValidate = (fields: Array<keyof T>) => (values: T) =>\n fields.reduce((acc, field) => {\n const errors =\n typeof values === 'object'\n ? (values as Record<keyof T, unknown>)\n : ({} as Record<keyof T, unknown>);\n\n if (!errors[field]) acc[field] = props.t('validationErrors:Required');\n\n return acc;\n }, {} as Record<keyof T, unknown>);\n\n const handleValidate = (validateFunc?: (values: T) => void, customFields?: Array<keyof T>) => {\n if (validateFunc) return validateFunc;\n\n if (customFields) return customValidate(customFields);\n\n return undefined;\n };\n\n return (\n <Formik\n validate={ handleValidate(validate, customValidationFields) }\n initialValues={ initialValues }\n enableReinitialize={ enableReinitialize }\n onSubmit={ save }\n >\n { (formikProps) => {\n if (process.env.REACT_APP_STAGE !== 'prod') {\n console.debug({\n values: formikProps.values,\n errors: formikProps.errors,\n });\n }\n\n return (\n <Form\n loading={ loading }\n { ...formikProps }\n { ...props }\n />\n ) }}\n </Formik>\n );\n}\n"],"names":["RestForm","enableReinitialize","props","loading","error","validate","customValidationFields","initialValues","save","jsx","customValidate","fields","values","acc","field","Formik","validateFunc","customFields","formikProps","Form"],"mappings":";;;AAiEO,SAASA,EAAiC,EAAE,oBAAAC,IAAqB,IAAM,GAAGC,KAAsC;AACnH,QAAM;AAAA,IACF,SAAAC;AAAA,IAAS,OAAAC;AAAA,IAAO,UAAAC;AAAA,IAAU,wBAAAC;AAAA,IAAwB,eAAAC;AAAA,IAAe,MAAAC;AAAA,EAAA,IACjEN;AAEJ,MAAIE,EAAO,QAAO,gBAAAK,EAAC,OAAA,EAAI,UAAA,UAAM;AAE7B,QAAMC,IAAiB,CAACC,MAA2B,CAACC,MAChDD,EAAO,OAAO,CAACE,GAAKC,QAEZ,OAAOF,KAAW,WACXA,IACA,CAAA,GAECE,CAAK,QAAOA,CAAK,IAAIZ,EAAM,EAAE,2BAA2B,IAE7DW,IACR,CAAA,CAA8B;AAUrC,SACI,gBAAAJ;AAAA,IAACM;AAAA,IAAA;AAAA,MACG,WAVe,CAACC,GAAoCC,MAAkC;AAC1F,YAAID,EAAc,QAAOA;AAEzB,YAAIC,EAAc,QAAOP,EAAeO,CAAY;AAAA,MAGxD,GAIkCZ,GAAUC,CAAsB;AAAA,MAC1D,eAAAC;AAAA,MACA,oBAAAN;AAAA,MACA,UAAWO;AAAA,MAET,WAACU,OACK,QAAQ,IAAI,oBAAoB,UAChC,QAAQ,MAAM;AAAA,QACV,QAAQA,EAAY;AAAA,QACpB,QAAQA,EAAY;AAAA,MAAA,CACvB,GAIL,gBAAAT;AAAA,QAACU;AAAA,QAAA;AAAA,UACG,SAAAhB;AAAA,UACE,GAAGe;AAAA,UACH,GAAGhB;AAAA,QAAA;AAAA,MAAA;AAAA,IAEX;AAAA,EAAA;AAGd;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/form/templates/rest-form/index.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Formik, FormikErrors, FormikProps, FormikValues,\n} from 'formik';\n\nimport { TFunction } from '../../../modal';\n\nimport { Form } from './form';\n\nexport type Props<T extends FormikValues> = {\n recordId?: number;\n\n title: string;\n\n subtitle?: string;\n\n customFooter?: React.ReactNode;\n enableReinitialize?: boolean;\n\n headerBottomAddons?: React.ReactNode;\n\n initialValues: T;\n\n validate?: (values: T) => void | Record<string, unknown> | Promise<FormikErrors<T>>;\n\n /** customValidationFields - значения полей которые необходимо валидировать */\n customValidationFields?: Array<keyof T>;\n\n /* Промис для основной кнопки \"сохранить\" */\n save: (values: any) => any;\n\n back?: () => void;\n\n /* Промис для удаления записи */\n remove?: () => any;\n\n /* loading - показываем общий скелетон для формы */\n loading?: boolean;\n\n /* updating - показываем лоадинг для кнопки \"Сохранить\" */\n updating?: boolean;\n\n /* removing - показываем лоадинг для кнопки \"Удалить\" */\n removing?: boolean;\n\n /* Фатальная ошибка */\n error?: string | null;\n\n /* Ошибка, показывающася в алерте */\n softError?: string | null;\n\n /** Текст кнопки сохранить */\n submitButtonText?: string;\n\n children: (props: FormikProps<FormikValues & T>) => React.ReactNode;\n\n close: () => void;\n\n t: TFunction;\n\n headerAddon?: React.ReactNode;\n};\n\nexport function RestForm<T extends FormikValues>({ enableReinitialize = true, ...props }: Props<T>) {\n const {\n loading, error, validate, customValidationFields, initialValues, save,\n } = props;\n\n if (error) return <div>Error </div>;\n\n const customValidate = (fields: Array<keyof T>) => (values: T) =>\n fields.reduce((acc, field) => {\n const errors =\n typeof values === 'object'\n ? (values as Record<keyof T, unknown>)\n : ({} as Record<keyof T, unknown>);\n\n if (!errors[field]) acc[field] = props.t('validationErrors:Required');\n\n return acc;\n }, {} as Record<keyof T, unknown>);\n\n const handleValidate = (validateFunc?: (values: T) => void, customFields?: Array<keyof T>) => {\n if (validateFunc) return validateFunc;\n\n if (customFields) return customValidate(customFields);\n\n return undefined;\n };\n\n return (\n <Formik\n validate={ handleValidate(validate, customValidationFields) }\n initialValues={ initialValues }\n enableReinitialize={ enableReinitialize }\n onSubmit={ save }\n >\n { (formikProps) => {\n if (process.env.REACT_APP_STAGE !== 'prod') {\n console.debug({\n values: formikProps.values,\n errors: formikProps.errors,\n });\n }\n\n return (\n <Form\n loading={ loading }\n { ...formikProps }\n { ...props }\n />\n ) }}\n </Formik>\n );\n}\n"],"names":["RestForm","enableReinitialize","props","loading","error","validate","customValidationFields","initialValues","save","jsx","customValidate","fields","values","acc","field","Formik","validateFunc","customFields","formikProps","Form"],"mappings":";;;AA+DO,SAASA,EAAiC,EAAE,oBAAAC,IAAqB,IAAM,GAAGC,KAAmB;AAChG,QAAM;AAAA,IACF,SAAAC;AAAA,IAAS,OAAAC;AAAA,IAAO,UAAAC;AAAA,IAAU,wBAAAC;AAAA,IAAwB,eAAAC;AAAA,IAAe,MAAAC;AAAA,EAAA,IACjEN;AAEJ,MAAIE,EAAO,QAAO,gBAAAK,EAAC,OAAA,EAAI,UAAA,UAAM;AAE7B,QAAMC,IAAiB,CAACC,MAA2B,CAACC,MAChDD,EAAO,OAAO,CAACE,GAAKC,QAEZ,OAAOF,KAAW,WACXA,IACA,CAAA,GAECE,CAAK,QAAOA,CAAK,IAAIZ,EAAM,EAAE,2BAA2B,IAE7DW,IACR,CAAA,CAA8B;AAUrC,SACI,gBAAAJ;AAAA,IAACM;AAAA,IAAA;AAAA,MACG,WAVe,CAACC,GAAoCC,MAAkC;AAC1F,YAAID,EAAc,QAAOA;AAEzB,YAAIC,EAAc,QAAOP,EAAeO,CAAY;AAAA,MAGxD,GAIkCZ,GAAUC,CAAsB;AAAA,MAC1D,eAAAC;AAAA,MACA,oBAAAN;AAAA,MACA,UAAWO;AAAA,MAET,WAACU,OACK,QAAQ,IAAI,oBAAoB,UAChC,QAAQ,MAAM;AAAA,QACV,QAAQA,EAAY;AAAA,QACpB,QAAQA,EAAY;AAAA,MAAA,CACvB,GAIL,gBAAAT;AAAA,QAACU;AAAA,QAAA;AAAA,UACG,SAAAhB;AAAA,UACE,GAAGe;AAAA,UACH,GAAGhB;AAAA,QAAA;AAAA,MAAA;AAAA,IAEX;AAAA,EAAA;AAGd;"}
@@ -1,7 +1,22 @@
1
- import { FC } from 'react';
2
- import { ColProps } from './col';
3
- import { RowProps } from './row';
1
+ import { default as React, ElementType } from 'react';
2
+ export type ColProps = {
3
+ className?: string;
4
+ width?: number;
5
+ offset?: number;
6
+ tag?: ElementType;
7
+ children?: React.ReactNode;
8
+ dataTestId?: string;
9
+ } & React.HTMLAttributes<HTMLElement>;
10
+ export declare const Col: React.FC<ColProps>;
11
+ export type RowProps = {
12
+ className?: string;
13
+ gutter?: number;
14
+ tag?: ElementType;
15
+ children?: React.ReactNode;
16
+ dataTestId?: string;
17
+ } & React.HTMLAttributes<HTMLElement>;
18
+ export declare const Row: React.FC<RowProps>;
4
19
  export declare const Grid: {
5
- Row: FC<RowProps>;
6
- Col: FC<ColProps>;
20
+ Row: React.FC<RowProps>;
21
+ Col: React.FC<ColProps>;
7
22
  };
@@ -1,10 +1,52 @@
1
- import { Col as o } from "./col/component.js";
2
- import { Row as r } from "./row/component.js";
3
- const i = {
4
- Row: r,
5
- Col: o
6
- };
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import d from "classnames";
3
+ import p from "./index.module.css.js";
4
+ const x = 12, i = (t) => `${t / x * 100}%`, g = ({
5
+ tag: t = "div",
6
+ className: e,
7
+ width: o,
8
+ offset: s,
9
+ children: l,
10
+ dataTestId: r,
11
+ style: n,
12
+ ...f
13
+ }) => {
14
+ const c = { ...n };
15
+ if (o != null) {
16
+ const a = i(o);
17
+ c.flex = `0 0 ${a}`, c.maxWidth = a;
18
+ }
19
+ return s != null && (c.marginLeft = i(s)), /* @__PURE__ */ m(
20
+ t,
21
+ {
22
+ className: d(p.col, e),
23
+ style: c,
24
+ "data-test-id": r,
25
+ ...f,
26
+ children: l
27
+ }
28
+ );
29
+ }, u = ({
30
+ tag: t = "div",
31
+ className: e,
32
+ gutter: o = 16,
33
+ children: s,
34
+ dataTestId: l,
35
+ style: r,
36
+ ...n
37
+ }) => /* @__PURE__ */ m(
38
+ t,
39
+ {
40
+ className: d(p.row, e),
41
+ style: { "--gutter": `${o}px`, ...r },
42
+ "data-test-id": l,
43
+ ...n,
44
+ children: s
45
+ }
46
+ ), $ = { Row: u, Col: g };
7
47
  export {
8
- i as Grid
48
+ g as Col,
49
+ $ as Grid,
50
+ u as Row
9
51
  };
10
52
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/grid/component.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Col, ColProps } from './col';\nimport { Row, RowProps } from './row';\n\nexport const Grid: {\n Row: FC<RowProps>;\n Col: FC<ColProps>;\n} = {\n Row,\n Col,\n};\n"],"names":["Grid","Row","Col"],"mappings":";;AAKO,MAAMA,IAGT;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AACJ;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/grid/component.tsx"],"sourcesContent":["import React, { CSSProperties, ElementType } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nconst COL_COUNT = 12;\n\nconst toPercent = (n: number) => `${(n / COL_COUNT) * 100}%`;\n\nexport type ColProps = {\n className?: string;\n width?: number;\n offset?: number;\n tag?: ElementType;\n children?: React.ReactNode;\n dataTestId?: string;\n} & React.HTMLAttributes<HTMLElement>;\n\nexport const Col: React.FC<ColProps> = ({\n tag: Tag = 'div',\n className,\n width,\n offset,\n children,\n dataTestId,\n style,\n ...rest\n}) => {\n const colStyle: CSSProperties = { ...style };\n\n if (width != null) {\n const pct = toPercent(width);\n colStyle.flex = `0 0 ${pct}`;\n colStyle.maxWidth = pct;\n }\n\n if (offset != null) {\n colStyle.marginLeft = toPercent(offset);\n }\n\n return (\n <Tag\n className={ cn(styles.col, className) }\n style={ colStyle }\n data-test-id={ dataTestId }\n { ...rest }\n >\n { children }\n </Tag>\n );\n};\n\nexport type RowProps = {\n className?: string;\n gutter?: number;\n tag?: ElementType;\n children?: React.ReactNode;\n dataTestId?: string;\n} & React.HTMLAttributes<HTMLElement>;\n\nexport const Row: React.FC<RowProps> = ({\n tag: Tag = 'div',\n className,\n gutter = 16,\n children,\n dataTestId,\n style,\n ...rest\n}) => (\n <Tag\n className={ cn(styles.row, className) }\n style={ { '--gutter': `${gutter}px`, ...style } as CSSProperties }\n data-test-id={ dataTestId }\n { ...rest }\n >\n { children }\n </Tag>\n);\n\nexport const Grid = { Row, Col };\n"],"names":["COL_COUNT","toPercent","n","Col","Tag","className","width","offset","children","dataTestId","style","rest","colStyle","pct","jsx","cn","styles","Row","gutter","Grid"],"mappings":";;;AAKA,MAAMA,IAAY,IAEZC,IAAY,CAACC,MAAc,GAAIA,IAAIF,IAAa,GAAG,KAW5CG,IAA0B,CAAC;AAAA,EACpC,KAAKC,IAAM;AAAA,EACX,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACP,MAAM;AACF,QAAMC,IAA0B,EAAE,GAAGF,EAAA;AAErC,MAAIJ,KAAS,MAAM;AACf,UAAMO,IAAMZ,EAAUK,CAAK;AAC3B,IAAAM,EAAS,OAAO,OAAOC,CAAG,IAC1BD,EAAS,WAAWC;AAAA,EACxB;AAEA,SAAIN,KAAU,SACVK,EAAS,aAAaX,EAAUM,CAAM,IAItC,gBAAAO;AAAA,IAACV;AAAA,IAAA;AAAA,MACG,WAAYW,EAAGC,EAAO,KAAKX,CAAS;AAAA,MACpC,OAAQO;AAAA,MACR,gBAAeH;AAAA,MACb,GAAGE;AAAA,MAEH,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGd,GAUaS,IAA0B,CAAC;AAAA,EACpC,KAAKb,IAAM;AAAA,EACX,WAAAC;AAAA,EACA,QAAAa,IAAS;AAAA,EACT,UAAAV;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACP,MACI,gBAAAG;AAAA,EAACV;AAAA,EAAA;AAAA,IACG,WAAYW,EAAGC,EAAO,KAAKX,CAAS;AAAA,IACpC,OAAQ,EAAE,YAAY,GAAGa,CAAM,MAAM,GAAGR,EAAA;AAAA,IACxC,gBAAeD;AAAA,IACb,GAAGE;AAAA,IAEH,UAAAH;AAAA,EAAA;AACN,GAGSW,IAAO,EAAE,KAAAF,GAAK,KAAAd,EAAA;"}
@@ -1,5 +1,7 @@
1
- import { Grid as d } from "./component.js";
1
+ import { Col as d, Grid as e, Row as f } from "./component.js";
2
2
  export {
3
- d as Grid
3
+ d as Col,
4
+ e as Grid,
5
+ f as Row
4
6
  };
5
7
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ .row_krN4{--gutter: 16px;display:flex;flex-wrap:wrap;box-sizing:border-box;margin-left:calc(var(--gutter) / -2);margin-right:calc(var(--gutter) / -2)}.col_Mng-{box-sizing:border-box;min-height:1px;max-width:100%;padding-left:calc(var(--gutter) / 2);padding-right:calc(var(--gutter) / 2)}
@@ -0,0 +1,11 @@
1
+ import './index.module.css';
2
+ const o = "row_krN4", c = "col_Mng-", s = {
3
+ row: o,
4
+ col: c
5
+ };
6
+ export {
7
+ c as col,
8
+ s as default,
9
+ o as row
10
+ };
11
+ //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,2 +1,2 @@
1
1
  import { default as React } from 'react';
2
- export declare function useClickOutside(ref: React.RefObject<HTMLElement>, cb: (e: React.MouseEvent | React.TouchEvent) => void, excludedRefs?: React.RefObject<HTMLElement>[]): void;
2
+ export declare function useClickOutside(ref: React.RefObject<HTMLElement | null>, cb: (e: React.MouseEvent | React.TouchEvent) => void, excludedRefs?: React.RefObject<HTMLElement | null>[]): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/useClickOutside/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport function useClickOutside(\n ref: React.RefObject<HTMLElement>,\n cb: (e: React.MouseEvent | React.TouchEvent) => void,\n excludedRefs?: React.RefObject<HTMLElement>[]\n): void {\n React.useEffect(() => {\n const handler = (event: any) => {\n if (!ref.current || ref.current.contains(event.target) || excludedRefs?.every((excludedRef) => excludedRef?.current?.contains(event.target))) {\n return;\n }\n\n cb(event);\n };\n\n document.addEventListener('mousedown', handler);\n document.addEventListener('touchstart', handler);\n\n return () => {\n document.removeEventListener('mousedown', handler);\n document.removeEventListener('touchstart', handler);\n };\n }, [ref, cb, excludedRefs]);\n}\n"],"names":["useClickOutside","ref","cb","excludedRefs","React","handler","event","excludedRef","_a"],"mappings":";AAEO,SAASA,EACZC,GACAC,GACAC,GACI;AACJ,EAAAC,EAAM,UAAU,MAAM;AAClB,UAAMC,IAAU,CAACC,MAAe;AAC5B,MAAI,CAACL,EAAI,WAAWA,EAAI,QAAQ,SAASK,EAAM,MAAM,KAAKH,KAAA,QAAAA,EAAc,MAAM,CAACI;;AAAgB,gBAAAC,IAAAD,KAAA,gBAAAA,EAAa,YAAb,gBAAAC,EAAsB,SAASF,EAAM;AAAA,YAIpIJ,EAAGI,CAAK;AAAA,IACZ;AAEA,oBAAS,iBAAiB,aAAaD,CAAO,GAC9C,SAAS,iBAAiB,cAAcA,CAAO,GAExC,MAAM;AACT,eAAS,oBAAoB,aAAaA,CAAO,GACjD,SAAS,oBAAoB,cAAcA,CAAO;AAAA,IACtD;AAAA,EACJ,GAAG,CAACJ,GAAKC,GAAIC,CAAY,CAAC;AAC9B;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/useClickOutside/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport function useClickOutside(\n ref: React.RefObject<HTMLElement | null>,\n cb: (e: React.MouseEvent | React.TouchEvent) => void,\n excludedRefs?: React.RefObject<HTMLElement | null>[],\n): void {\n React.useEffect(() => {\n const handler = (event: any) => {\n if (!ref.current || ref.current.contains(event.target) || excludedRefs?.every((excludedRef) => excludedRef?.current?.contains(event.target))) {\n return;\n }\n\n cb(event);\n };\n\n document.addEventListener('mousedown', handler);\n document.addEventListener('touchstart', handler);\n\n return () => {\n document.removeEventListener('mousedown', handler);\n document.removeEventListener('touchstart', handler);\n };\n }, [ref, cb, excludedRefs]);\n}\n"],"names":["useClickOutside","ref","cb","excludedRefs","React","handler","event","excludedRef","_a"],"mappings":";AAEO,SAASA,EACZC,GACAC,GACAC,GACI;AACJ,EAAAC,EAAM,UAAU,MAAM;AAClB,UAAMC,IAAU,CAACC,MAAe;AAC5B,MAAI,CAACL,EAAI,WAAWA,EAAI,QAAQ,SAASK,EAAM,MAAM,KAAKH,KAAA,QAAAA,EAAc,MAAM,CAACI;;AAAgB,gBAAAC,IAAAD,KAAA,gBAAAA,EAAa,YAAb,gBAAAC,EAAsB,SAASF,EAAM;AAAA,YAIpIJ,EAAGI,CAAK;AAAA,IACZ;AAEA,oBAAS,iBAAiB,aAAaD,CAAO,GAC9C,SAAS,iBAAiB,cAAcA,CAAO,GAExC,MAAM;AACT,eAAS,oBAAoB,aAAaA,CAAO,GACjD,SAAS,oBAAoB,cAAcA,CAAO;AAAA,IACtD;AAAA,EACJ,GAAG,CAACJ,GAAKC,GAAIC,CAAY,CAAC;AAC9B;"}
@@ -6,4 +6,4 @@ export type InputMethod = 'keyboard' | 'mouse';
6
6
  * @param node Элемент на котором установится обработчик (default = document)
7
7
  * @param inputMethod Если параметр не задан, установит обработчик по любому событию фокуса
8
8
  */
9
- export declare function useFocus<T extends HTMLElement>(ref: React.MutableRefObject<T> | React.RefObject<T>, inputMethod?: InputMethod): [boolean];
9
+ export declare function useFocus<T extends HTMLElement>(ref: React.RefObject<T | null>, inputMethod?: InputMethod): [boolean];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/useFocus/index.ts"],"sourcesContent":["import React from 'react';\n\n// TODO: добавить touch метод\nexport type InputMethod = 'keyboard' | 'mouse';\n\nlet prevInputMethod: InputMethod;\n\nfunction handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Tab') {\n prevInputMethod = 'keyboard';\n }\n}\n\nfunction handleMouseDown() {\n prevInputMethod = 'mouse';\n}\n\nfunction handleTouchStart() {\n prevInputMethod = 'mouse';\n}\n\n/**\n * Навешивает несколько глобальных обработчиков и отслеживает метод ввода - мышь или клавиатура.\n * Note: Повторный вызов функции не дублирует обработчики\n */\nfunction addGlobalListeners() {\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('mousedown', handleMouseDown);\n document.addEventListener('touchstart', handleTouchStart);\n}\n\n/**\n * Хук устанавливает обработчик события на focusin и focusout\n * по конкретному типу события\n * @param node Элемент на котором установится обработчик (default = document)\n * @param inputMethod Если параметр не задан, установит обработчик по любому событию фокуса\n */\nexport function useFocus<T extends HTMLElement>(\n ref: React.MutableRefObject<T> | React.RefObject<T>,\n inputMethod?: InputMethod,\n): [boolean] {\n const [focus, setFocus] = React.useState(false);\n\n const handleFocus = React.useCallback(() => {\n if (!inputMethod || inputMethod === prevInputMethod) {\n setFocus(true);\n }\n }, [inputMethod]);\n\n const handleBlur = React.useCallback(() => {\n setFocus(false);\n }, []);\n\n React.useEffect(() => {\n const node = ref.current;\n\n if (node) {\n node.addEventListener('focusin', handleFocus);\n node.addEventListener('focusout', handleBlur);\n }\n\n return () => {\n if (node) {\n node.removeEventListener('focusin', handleFocus);\n node.removeEventListener('focusout', handleBlur);\n }\n };\n }, [handleBlur, handleFocus, ref]);\n\n React.useEffect(addGlobalListeners, []);\n\n return [focus];\n}\n"],"names":["prevInputMethod","handleKeyDown","event","handleMouseDown","handleTouchStart","addGlobalListeners","useFocus","ref","inputMethod","focus","setFocus","React","handleFocus","handleBlur","node"],"mappings":";AAKA,IAAIA;AAEJ,SAASC,EAAcC,GAAsB;AACzC,EAAIA,EAAM,QAAQ,UACdF,IAAkB;AAE1B;AAEA,SAASG,IAAkB;AACvB,EAAAH,IAAkB;AACtB;AAEA,SAASI,IAAmB;AACxB,EAAAJ,IAAkB;AACtB;AAMA,SAASK,IAAqB;AAC1B,WAAS,iBAAiB,WAAWJ,CAAa,GAClD,SAAS,iBAAiB,aAAaE,CAAe,GACtD,SAAS,iBAAiB,cAAcC,CAAgB;AAC5D;AAQO,SAASE,EACZC,GACAC,GACS;AACT,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAM,SAAS,EAAK,GAExCC,IAAcD,EAAM,YAAY,MAAM;AACxC,KAAI,CAACH,KAAeA,MAAgBR,MAChCU,EAAS,EAAI;AAAA,EAErB,GAAG,CAACF,CAAW,CAAC,GAEVK,IAAaF,EAAM,YAAY,MAAM;AACvC,IAAAD,EAAS,EAAK;AAAA,EAClB,GAAG,CAAA,CAAE;AAEL,SAAAC,EAAM,UAAU,MAAM;AAClB,UAAMG,IAAOP,EAAI;AAEjB,WAAIO,MACAA,EAAK,iBAAiB,WAAWF,CAAW,GAC5CE,EAAK,iBAAiB,YAAYD,CAAU,IAGzC,MAAM;AACT,MAAIC,MACAA,EAAK,oBAAoB,WAAWF,CAAW,GAC/CE,EAAK,oBAAoB,YAAYD,CAAU;AAAA,IAEvD;AAAA,EACJ,GAAG,CAACA,GAAYD,GAAaL,CAAG,CAAC,GAEjCI,EAAM,UAAUN,GAAoB,EAAE,GAE/B,CAACI,CAAK;AACjB;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/useFocus/index.ts"],"sourcesContent":["import React from 'react';\n\n// TODO: добавить touch метод\nexport type InputMethod = 'keyboard' | 'mouse';\n\nlet prevInputMethod: InputMethod;\n\nfunction handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Tab') {\n prevInputMethod = 'keyboard';\n }\n}\n\nfunction handleMouseDown() {\n prevInputMethod = 'mouse';\n}\n\nfunction handleTouchStart() {\n prevInputMethod = 'mouse';\n}\n\n/**\n * Навешивает несколько глобальных обработчиков и отслеживает метод ввода - мышь или клавиатура.\n * Note: Повторный вызов функции не дублирует обработчики\n */\nfunction addGlobalListeners() {\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('mousedown', handleMouseDown);\n document.addEventListener('touchstart', handleTouchStart);\n}\n\n/**\n * Хук устанавливает обработчик события на focusin и focusout\n * по конкретному типу события\n * @param node Элемент на котором установится обработчик (default = document)\n * @param inputMethod Если параметр не задан, установит обработчик по любому событию фокуса\n */\nexport function useFocus<T extends HTMLElement>(\n ref: React.RefObject<T | null>,\n inputMethod?: InputMethod,\n): [boolean] {\n const [focus, setFocus] = React.useState(false);\n\n const handleFocus = React.useCallback(() => {\n if (!inputMethod || inputMethod === prevInputMethod) {\n setFocus(true);\n }\n }, [inputMethod]);\n\n const handleBlur = React.useCallback(() => {\n setFocus(false);\n }, []);\n\n React.useEffect(() => {\n const node = ref.current;\n\n if (node) {\n node.addEventListener('focusin', handleFocus);\n node.addEventListener('focusout', handleBlur);\n }\n\n return () => {\n if (node) {\n node.removeEventListener('focusin', handleFocus);\n node.removeEventListener('focusout', handleBlur);\n }\n };\n }, [handleBlur, handleFocus, ref]);\n\n React.useEffect(addGlobalListeners, []);\n\n return [focus];\n}\n"],"names":["prevInputMethod","handleKeyDown","event","handleMouseDown","handleTouchStart","addGlobalListeners","useFocus","ref","inputMethod","focus","setFocus","React","handleFocus","handleBlur","node"],"mappings":";AAKA,IAAIA;AAEJ,SAASC,EAAcC,GAAsB;AACzC,EAAIA,EAAM,QAAQ,UACdF,IAAkB;AAE1B;AAEA,SAASG,IAAkB;AACvB,EAAAH,IAAkB;AACtB;AAEA,SAASI,IAAmB;AACxB,EAAAJ,IAAkB;AACtB;AAMA,SAASK,IAAqB;AAC1B,WAAS,iBAAiB,WAAWJ,CAAa,GAClD,SAAS,iBAAiB,aAAaE,CAAe,GACtD,SAAS,iBAAiB,cAAcC,CAAgB;AAC5D;AAQO,SAASE,EACZC,GACAC,GACS;AACT,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAM,SAAS,EAAK,GAExCC,IAAcD,EAAM,YAAY,MAAM;AACxC,KAAI,CAACH,KAAeA,MAAgBR,MAChCU,EAAS,EAAI;AAAA,EAErB,GAAG,CAACF,CAAW,CAAC,GAEVK,IAAaF,EAAM,YAAY,MAAM;AACvC,IAAAD,EAAS,EAAK;AAAA,EAClB,GAAG,CAAA,CAAE;AAEL,SAAAC,EAAM,UAAU,MAAM;AAClB,UAAMG,IAAOP,EAAI;AAEjB,WAAIO,MACAA,EAAK,iBAAiB,WAAWF,CAAW,GAC5CE,EAAK,iBAAiB,YAAYD,CAAU,IAGzC,MAAM;AACT,MAAIC,MACAA,EAAK,oBAAoB,WAAWF,CAAW,GAC/CE,EAAK,oBAAoB,YAAYD,CAAU;AAAA,IAEvD;AAAA,EACJ,GAAG,CAACA,GAAYD,GAAaL,CAAG,CAAC,GAEjCI,EAAM,UAAUN,GAAoB,EAAE,GAE/B,CAACI,CAAK;AACjB;"}
@@ -1,11 +1,11 @@
1
1
  import r from "react";
2
- function c(t) {
3
- const e = r.useRef();
2
+ function o(t) {
3
+ const e = r.useRef(void 0);
4
4
  return r.useEffect(() => {
5
5
  e.current = t;
6
6
  }), e.current;
7
7
  }
8
8
  export {
9
- c as usePrevious
9
+ o as usePrevious
10
10
  };
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/usePrevious/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = React.useRef<T>();\n\n React.useEffect(() => {\n ref.current = value;\n });\n\n return ref.current;\n}\n"],"names":["usePrevious","value","ref","React"],"mappings":";AAEO,SAASA,EAAeC,GAAyB;AACpD,QAAMC,IAAMC,EAAM,OAAA;AAElB,SAAAA,EAAM,UAAU,MAAM;AAClB,IAAAD,EAAI,UAAUD;AAAA,EAClB,CAAC,GAEMC,EAAI;AACf;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/usePrevious/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = React.useRef<T | undefined>(undefined);\n\n React.useEffect(() => {\n ref.current = value;\n });\n\n return ref.current;\n}\n"],"names":["usePrevious","value","ref","React"],"mappings":";AAEO,SAASA,EAAeC,GAAyB;AACpD,QAAMC,IAAMC,EAAM,OAAsB,MAAS;AAEjD,SAAAA,EAAM,UAAU,MAAM;AAClB,IAAAD,EAAI,UAAUD;AAAA,EAClB,CAAC,GAEMC,EAAI;AACf;"}
@@ -8,4 +8,4 @@ export type UseImageRenderComponent = {
8
8
  icon?: React.ReactNode;
9
9
  color?: ImageProps['color'];
10
10
  };
11
- export declare const useImageRenderComponent: ({ src, size, color, alt, text, icon, }: UseImageRenderComponent) => {};
11
+ export declare const useImageRenderComponent: ({ src, size, color, alt, text, icon, }: UseImageRenderComponent) => string | number | bigint | true | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { default as React } from 'react';
2
2
  type Props = {
3
3
  initialSlide: number;
4
4
  photos: Array<{
@@ -7,5 +7,5 @@ type Props = {
7
7
  onClose: () => void;
8
8
  open: boolean;
9
9
  };
10
- export declare const ImageGallery: ({ onClose, initialSlide, photos, open, }: Props) => JSX.Element;
10
+ export declare const ImageGallery: ({ onClose, initialSlide, photos, open, }: Props) => React.JSX.Element;
11
11
  export {};