@foxford/ui 2.41.0 → 2.42.0-beta-bdc00b0-20240829
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.
- package/components/Anchor/constants.js.map +1 -1
- package/components/Anchor/constants.mjs.map +1 -1
- package/components/Arrow/constants.js.map +1 -1
- package/components/Arrow/constants.mjs.map +1 -1
- package/components/Arrow/default-constants.js.map +1 -1
- package/components/Arrow/default-constants.mjs.map +1 -1
- package/components/ArrowBadge/constants.js.map +1 -1
- package/components/ArrowBadge/constants.mjs.map +1 -1
- package/components/Avatar/constants.js.map +1 -1
- package/components/Avatar/constants.mjs.map +1 -1
- package/components/Avatar/default-constants.js.map +1 -1
- package/components/Avatar/default-constants.mjs.map +1 -1
- package/components/Badge/constants.js.map +1 -1
- package/components/Badge/constants.mjs.map +1 -1
- package/components/Button/constants.js.map +1 -1
- package/components/Button/constants.mjs.map +1 -1
- package/components/Button/default-constants.js.map +1 -1
- package/components/Button/default-constants.mjs.map +1 -1
- package/components/Chip/constants.js.map +1 -1
- package/components/Chip/constants.mjs.map +1 -1
- package/components/Dialog/Dialog.js +2 -0
- package/components/Dialog/Dialog.js.map +1 -0
- package/components/Dialog/Dialog.mjs +2 -0
- package/components/Dialog/Dialog.mjs.map +1 -0
- package/components/Dialog/constants.js +2 -0
- package/components/Dialog/constants.js.map +1 -0
- package/components/Dialog/constants.mjs +2 -0
- package/components/Dialog/constants.mjs.map +1 -0
- package/components/Dialog/style.js +2 -0
- package/components/Dialog/style.js.map +1 -0
- package/components/Dialog/style.mjs +2 -0
- package/components/Dialog/style.mjs.map +1 -0
- package/components/DialogComponent/DialogComponent.js +2 -0
- package/components/DialogComponent/DialogComponent.js.map +1 -0
- package/components/DialogComponent/DialogComponent.mjs +2 -0
- package/components/DialogComponent/DialogComponent.mjs.map +1 -0
- package/components/DialogComponent/DialogContainer.js +2 -0
- package/components/DialogComponent/DialogContainer.js.map +1 -0
- package/components/DialogComponent/DialogContainer.mjs +2 -0
- package/components/DialogComponent/DialogContainer.mjs.map +1 -0
- package/components/DialogComponent/constants.js +2 -0
- package/components/DialogComponent/constants.js.map +1 -0
- package/components/DialogComponent/constants.mjs +2 -0
- package/components/DialogComponent/constants.mjs.map +1 -0
- package/components/DialogComponent/images/dragging.svg.js +2 -0
- package/components/DialogComponent/images/dragging.svg.js.map +1 -0
- package/components/DialogComponent/images/dragging.svg.mjs +2 -0
- package/components/DialogComponent/images/dragging.svg.mjs.map +1 -0
- package/components/DialogComponent/style.js +2 -0
- package/components/DialogComponent/style.js.map +1 -0
- package/components/DialogComponent/style.mjs +2 -0
- package/components/DialogComponent/style.mjs.map +1 -0
- package/components/DialogComponent/utils.js +2 -0
- package/components/DialogComponent/utils.js.map +1 -0
- package/components/DialogComponent/utils.mjs +2 -0
- package/components/DialogComponent/utils.mjs.map +1 -0
- package/components/Dropdown/constants.js.map +1 -1
- package/components/Dropdown/constants.mjs.map +1 -1
- package/components/FormInputLabel/constants.js.map +1 -1
- package/components/FormInputLabel/constants.mjs.map +1 -1
- package/components/FormLabel/constants.js.map +1 -1
- package/components/FormLabel/constants.mjs.map +1 -1
- package/components/Icon/constants.js.map +1 -1
- package/components/Icon/constants.mjs.map +1 -1
- package/components/IconButton/constants.js.map +1 -1
- package/components/IconButton/constants.mjs.map +1 -1
- package/components/Indicator/constants.js.map +1 -1
- package/components/Indicator/constants.mjs.map +1 -1
- package/components/InputCheckbox/constants.js.map +1 -1
- package/components/InputCheckbox/constants.mjs.map +1 -1
- package/components/InputRadio/constants.js.map +1 -1
- package/components/InputRadio/constants.mjs.map +1 -1
- package/components/ListItem/constants.js.map +1 -1
- package/components/ListItem/constants.mjs.map +1 -1
- package/components/MenuComponent/constants.js.map +1 -1
- package/components/MenuComponent/constants.mjs.map +1 -1
- package/components/MenuList/MenuList.js +1 -1
- package/components/MenuList/MenuList.js.map +1 -1
- package/components/MenuList/MenuList.mjs +1 -1
- package/components/MenuList/MenuList.mjs.map +1 -1
- package/components/PopoverComponent/constants.js.map +1 -1
- package/components/PopoverComponent/constants.mjs.map +1 -1
- package/components/Tab/constants.js.map +1 -1
- package/components/Tab/constants.mjs.map +1 -1
- package/components/Tab/default-constants.js.map +1 -1
- package/components/Tab/default-constants.mjs.map +1 -1
- package/components/Text/constants.js.map +1 -1
- package/components/Text/constants.mjs.map +1 -1
- package/components/Text/default-constants.js.map +1 -1
- package/components/Text/default-constants.mjs.map +1 -1
- package/components/TooltipComponent/constants.js.map +1 -1
- package/components/TooltipComponent/constants.mjs.map +1 -1
- package/components/Visibility/Visibility.js +2 -0
- package/components/Visibility/Visibility.js.map +1 -0
- package/components/Visibility/Visibility.mjs +2 -0
- package/components/Visibility/Visibility.mjs.map +1 -0
- package/components/Visibility/style.js +2 -0
- package/components/Visibility/style.js.map +1 -0
- package/components/Visibility/style.mjs +2 -0
- package/components/Visibility/style.mjs.map +1 -0
- package/dts/index.d.ts +271 -88
- package/hocs/withMergedProps.js.map +1 -1
- package/hocs/withMergedProps.mjs.map +1 -1
- package/hocs/withTranslation.js +2 -0
- package/hocs/withTranslation.js.map +1 -0
- package/hocs/withTranslation.mjs +2 -0
- package/hocs/withTranslation.mjs.map +1 -0
- package/hooks/useMergedPalette.js.map +1 -1
- package/hooks/useMergedPalette.mjs.map +1 -1
- package/hooks/useMergedProps.js.map +1 -1
- package/hooks/useMergedProps.mjs.map +1 -1
- package/hooks/useMergedSizes.js +1 -1
- package/hooks/useMergedSizes.js.map +1 -1
- package/hooks/useMergedSizes.mjs +1 -1
- package/hooks/useMergedSizes.mjs.map +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/mixins/create-responsive-props.js.map +1 -1
- package/mixins/create-responsive-props.mjs.map +1 -1
- package/mixins/responsive-position.js +2 -0
- package/mixins/responsive-position.js.map +1 -0
- package/mixins/responsive-position.mjs +2 -0
- package/mixins/responsive-position.mjs.map +1 -0
- package/mixins/responsive-size.js +1 -1
- package/mixins/responsive-size.js.map +1 -1
- package/mixins/responsive-size.mjs +1 -1
- package/mixins/responsive-size.mjs.map +1 -1
- package/package.json +2 -1
- package/shared/constants.js +1 -1
- package/shared/constants.js.map +1 -1
- package/shared/constants.mjs +1 -1
- package/shared/constants.mjs.map +1 -1
- package/shared/utils/style.js +1 -1
- package/shared/utils/style.js.map +1 -1
- package/shared/utils/style.mjs +1 -1
- package/shared/utils/style.mjs.map +1 -1
- package/theme/colors-dark.js +1 -1
- package/theme/colors-dark.js.map +1 -1
- package/theme/colors-dark.mjs +1 -1
- package/theme/colors-dark.mjs.map +1 -1
- package/theme/colors-light.js +1 -1
- package/theme/colors-light.js.map +1 -1
- package/theme/colors-light.mjs +1 -1
- package/theme/colors-light.mjs.map +1 -1
- package/theme/colors.js +1 -1
- package/theme/colors.js.map +1 -1
- package/theme/colors.mjs +1 -1
- package/theme/colors.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/Anchor/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Anchor/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 22,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 12,\n },\n xxs: {\n fontSize: 10,\n },\n xxxs: {\n fontSize: 8,\n },\n}\n"],"names":["xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Anchor/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Anchor/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 22,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 12,\n },\n xxs: {\n fontSize: 10,\n },\n xxxs: {\n fontSize: 8,\n },\n}\n"],"names":["SIZES","xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/Arrow/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Arrow/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n width: 60,\n height: 60,\n fontSize: 28,\n },\n xxl: {\n width: 56,\n height: 56,\n fontSize: 28,\n },\n xl: {\n width: 52,\n height: 52,\n fontSize: 28,\n },\n l: {\n width: 48,\n height: 48,\n fontSize: 24,\n },\n m: {\n width: 44,\n height: 44,\n fontSize: 24,\n },\n s: {\n width: 40,\n height: 40,\n fontSize: 24,\n },\n xs: {\n width: 36,\n height: 36,\n fontSize: 20,\n },\n xxs: {\n width: 32,\n height: 32,\n fontSize: 20,\n },\n xxxs: {\n width: 28,\n height: 28,\n fontSize: 20,\n },\n}\n"],"names":["xxxl","width","height","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZC,IAAK,CACHH,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZE,GAAI,CACFJ,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZK,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZM,GAAI,CACFR,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZO,IAAK,CACHT,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZQ,KAAM,CACJV,MAAO,GACPC,OAAQ,GACRC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Arrow/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Arrow/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n width: 60,\n height: 60,\n fontSize: 28,\n },\n xxl: {\n width: 56,\n height: 56,\n fontSize: 28,\n },\n xl: {\n width: 52,\n height: 52,\n fontSize: 28,\n },\n l: {\n width: 48,\n height: 48,\n fontSize: 24,\n },\n m: {\n width: 44,\n height: 44,\n fontSize: 24,\n },\n s: {\n width: 40,\n height: 40,\n fontSize: 24,\n },\n xs: {\n width: 36,\n height: 36,\n fontSize: 20,\n },\n xxs: {\n width: 32,\n height: 32,\n fontSize: 20,\n },\n xxxs: {\n width: 28,\n height: 28,\n fontSize: 20,\n },\n}\n"],"names":["SIZES","xxxl","width","height","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZC,IAAK,CACHH,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZE,GAAI,CACFJ,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZK,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZM,GAAI,CACFR,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZO,IAAK,CACHT,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZQ,KAAM,CACJV,MAAO,GACPC,OAAQ,GACRC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-constants.js","sources":["../../../../src/components/Arrow/default-constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"default-constants.js","sources":["../../../../src/components/Arrow/default-constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n width: 52,\n height: 52,\n fontSize: 18,\n },\n xxl: {\n width: 48,\n height: 48,\n fontSize: 18,\n },\n xl: {\n width: 44,\n height: 44,\n fontSize: 18,\n },\n l: {\n width: 40,\n height: 40,\n fontSize: 16,\n },\n m: {\n width: 28,\n height: 28,\n fontSize: 16,\n },\n s: {\n width: 24,\n height: 24,\n fontSize: 16,\n },\n xs: {\n width: 20,\n height: 20,\n fontSize: 16,\n },\n xxs: {\n width: 16,\n height: 16,\n fontSize: 12,\n },\n xxxs: {\n width: 14,\n height: 14,\n fontSize: 10,\n },\n}\n"],"names":["xxxl","width","height","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"mCAG0D,CACxDA,KAAM,CACJC,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZC,IAAK,CACHH,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZE,GAAI,CACFJ,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZK,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZM,GAAI,CACFR,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZO,IAAK,CACHT,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZQ,KAAM,CACJV,MAAO,GACPC,OAAQ,GACRC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-constants.mjs","sources":["../../../../src/components/Arrow/default-constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"default-constants.mjs","sources":["../../../../src/components/Arrow/default-constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n width: 52,\n height: 52,\n fontSize: 18,\n },\n xxl: {\n width: 48,\n height: 48,\n fontSize: 18,\n },\n xl: {\n width: 44,\n height: 44,\n fontSize: 18,\n },\n l: {\n width: 40,\n height: 40,\n fontSize: 16,\n },\n m: {\n width: 28,\n height: 28,\n fontSize: 16,\n },\n s: {\n width: 24,\n height: 24,\n fontSize: 16,\n },\n xs: {\n width: 20,\n height: 20,\n fontSize: 16,\n },\n xxs: {\n width: 16,\n height: 16,\n fontSize: 12,\n },\n xxxs: {\n width: 14,\n height: 14,\n fontSize: 10,\n },\n}\n"],"names":["SIZES_DEFAULT","xxxl","width","height","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,cAA6C,CACxDC,KAAM,CACJC,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZC,IAAK,CACHH,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZE,GAAI,CACFJ,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZK,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZM,GAAI,CACFR,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZO,IAAK,CACHT,MAAO,GACPC,OAAQ,GACRC,SAAU,IAEZQ,KAAM,CACJV,MAAO,GACPC,OAAQ,GACRC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/ArrowBadge/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/ArrowBadge/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n height: 64,\n fontSize: 36,\n },\n xxl: {\n height: 60,\n fontSize: 34,\n },\n xl: {\n height: 54,\n fontSize: 32,\n },\n l: {\n height: 48,\n fontSize: 28,\n },\n m: {\n height: 40,\n fontSize: 22,\n },\n s: {\n height: 32,\n fontSize: 16,\n },\n xs: {\n height: 24,\n fontSize: 14,\n },\n xxs: {\n height: 20,\n fontSize: 10,\n },\n xxxs: {\n height: 16,\n fontSize: 10,\n },\n}\n"],"names":["xxxl","height","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,OAAQ,GACRC,SAAU,IAEZC,IAAK,CACHF,OAAQ,GACRC,SAAU,IAEZE,GAAI,CACFH,OAAQ,GACRC,SAAU,IAEZG,EAAG,CACDJ,OAAQ,GACRC,SAAU,IAEZI,EAAG,CACDL,OAAQ,GACRC,SAAU,IAEZK,EAAG,CACDN,OAAQ,GACRC,SAAU,IAEZM,GAAI,CACFP,OAAQ,GACRC,SAAU,IAEZO,IAAK,CACHR,OAAQ,GACRC,SAAU,IAEZQ,KAAM,CACJT,OAAQ,GACRC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/ArrowBadge/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/ArrowBadge/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n height: 64,\n fontSize: 36,\n },\n xxl: {\n height: 60,\n fontSize: 34,\n },\n xl: {\n height: 54,\n fontSize: 32,\n },\n l: {\n height: 48,\n fontSize: 28,\n },\n m: {\n height: 40,\n fontSize: 22,\n },\n s: {\n height: 32,\n fontSize: 16,\n },\n xs: {\n height: 24,\n fontSize: 14,\n },\n xxs: {\n height: 20,\n fontSize: 10,\n },\n xxxs: {\n height: 16,\n fontSize: 10,\n },\n}\n"],"names":["SIZES","xxxl","height","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,OAAQ,GACRC,SAAU,IAEZC,IAAK,CACHF,OAAQ,GACRC,SAAU,IAEZE,GAAI,CACFH,OAAQ,GACRC,SAAU,IAEZG,EAAG,CACDJ,OAAQ,GACRC,SAAU,IAEZI,EAAG,CACDL,OAAQ,GACRC,SAAU,IAEZK,EAAG,CACDN,OAAQ,GACRC,SAAU,IAEZM,GAAI,CACFP,OAAQ,GACRC,SAAU,IAEZO,IAAK,CACHR,OAAQ,GACRC,SAAU,IAEZQ,KAAM,CACJT,OAAQ,GACRC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/Avatar/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Avatar/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n xxl: {\n width: 68,\n height: 68,\n fontSize: 24,\n borderRadius: '50%',\n },\n xl: {\n width: 52,\n height: 52,\n fontSize: 18,\n borderRadius: '50%',\n },\n l: {\n width: 48,\n height: 48,\n fontSize: 16,\n borderRadius: '50%',\n },\n m: {\n width: 40,\n height: 40,\n fontSize: 14,\n borderRadius: '50%',\n },\n s: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n xs: {\n width: 24,\n height: 24,\n fontSize: 10,\n borderRadius: '50%',\n },\n xxs: {\n width: 20,\n height: 20,\n fontSize: 8,\n borderRadius: '50%',\n },\n xxxs: {\n width: 16,\n height: 16,\n fontSize: 6,\n borderRadius: '50%',\n },\n}\n\nexport const SIZES_SQUARE: Record<Size, CSSProperties> = {\n xxxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: 24,\n },\n xxl: {\n width: 68,\n height: 68,\n fontSize: 24,\n borderRadius: 14,\n },\n xl: {\n width: 52,\n height: 52,\n fontSize: 18,\n borderRadius: 11,\n },\n l: {\n width: 48,\n height: 48,\n fontSize: 16,\n borderRadius: 10,\n },\n m: {\n width: 40,\n height: 40,\n fontSize: 14,\n borderRadius: 8,\n },\n s: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: 7,\n },\n xs: {\n width: 24,\n height: 24,\n fontSize: 10,\n borderRadius: 5,\n },\n xxs: {\n width: 20,\n height: 20,\n fontSize: 8,\n borderRadius: 4,\n },\n xxxs: {\n width: 16,\n height: 16,\n fontSize: 6,\n borderRadius: 4,\n },\n}\n"],"names":["xxxl","width","height","fontSize","borderRadius","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBC,IAAK,CACHJ,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBE,GAAI,CACFL,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBG,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBI,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBK,EAAG,CACDR,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBM,GAAI,CACFT,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBO,IAAK,CACHV,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc,OAEhBQ,KAAM,CACJX,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc,6BAIuC,CACvDJ,KAAM,CACJC,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,IAEhBC,IAAK,CACHJ,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,IAEhBE,GAAI,CACFL,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,IAEhBG,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,IAEhBI,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,GAEhBK,EAAG,CACDR,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,GAEhBM,GAAI,CACFT,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,GAEhBO,IAAK,CACHV,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc,GAEhBQ,KAAM,CACJX,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Avatar/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Avatar/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n xxl: {\n width: 68,\n height: 68,\n fontSize: 24,\n borderRadius: '50%',\n },\n xl: {\n width: 52,\n height: 52,\n fontSize: 18,\n borderRadius: '50%',\n },\n l: {\n width: 48,\n height: 48,\n fontSize: 16,\n borderRadius: '50%',\n },\n m: {\n width: 40,\n height: 40,\n fontSize: 14,\n borderRadius: '50%',\n },\n s: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n xs: {\n width: 24,\n height: 24,\n fontSize: 10,\n borderRadius: '50%',\n },\n xxs: {\n width: 20,\n height: 20,\n fontSize: 8,\n borderRadius: '50%',\n },\n xxxs: {\n width: 16,\n height: 16,\n fontSize: 6,\n borderRadius: '50%',\n },\n}\n\nexport const SIZES_SQUARE: Record<Size, CSSProperties> = {\n xxxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: 24,\n },\n xxl: {\n width: 68,\n height: 68,\n fontSize: 24,\n borderRadius: 14,\n },\n xl: {\n width: 52,\n height: 52,\n fontSize: 18,\n borderRadius: 11,\n },\n l: {\n width: 48,\n height: 48,\n fontSize: 16,\n borderRadius: 10,\n },\n m: {\n width: 40,\n height: 40,\n fontSize: 14,\n borderRadius: 8,\n },\n s: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: 7,\n },\n xs: {\n width: 24,\n height: 24,\n fontSize: 10,\n borderRadius: 5,\n },\n xxs: {\n width: 20,\n height: 20,\n fontSize: 8,\n borderRadius: 4,\n },\n xxxs: {\n width: 16,\n height: 16,\n fontSize: 6,\n borderRadius: 4,\n },\n}\n"],"names":["SIZES","xxxl","width","height","fontSize","borderRadius","xxl","xl","l","m","s","xs","xxs","xxxs","SIZES_SQUARE"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBC,IAAK,CACHJ,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBE,GAAI,CACFL,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBG,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBI,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBK,EAAG,CACDR,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBM,GAAI,CACFT,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBO,IAAK,CACHV,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc,OAEhBQ,KAAM,CACJX,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc,QAIX,MAAMS,aAA4C,CACvDb,KAAM,CACJC,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,IAEhBC,IAAK,CACHJ,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,IAEhBE,GAAI,CACFL,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,IAEhBG,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,IAEhBI,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,GAEhBK,EAAG,CACDR,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,GAEhBM,GAAI,CACFT,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,GAEhBO,IAAK,CACHV,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc,GAEhBQ,KAAM,CACJX,MAAO,GACPC,OAAQ,GACRC,SAAU,EACVC,aAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-constants.js","sources":["../../../../src/components/Avatar/default-constants.ts"],"sourcesContent":["import type { Size
|
|
1
|
+
{"version":3,"file":"default-constants.js","sources":["../../../../src/components/Avatar/default-constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES_MAPPING_RULES: Record<string, Size> = { l: 'xl', m: 'l', sm: 'm' }\n\nexport const SIZES_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n xxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n xl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n l: {\n width: 68,\n height: 68,\n fontSize: 24,\n borderRadius: '50%',\n },\n m: {\n width: 52,\n height: 52,\n fontSize: 12,\n borderRadius: '50%',\n },\n s: {\n width: 40,\n height: 40,\n fontSize: 12,\n borderRadius: '50%',\n },\n xs: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n xxs: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n xxxs: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n}\n"],"names":["xxxl","width","height","fontSize","borderRadius","xxl","xl","l","m","s","xs","xxs","xxxs","sm"],"mappings":"mCAK0D,CACxDA,KAAM,CACJC,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBC,IAAK,CACHJ,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBE,GAAI,CACFL,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBG,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBI,EAAG,CACDP,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBK,EAAG,CACDR,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBM,GAAI,CACFT,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBO,IAAK,CACHV,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBQ,KAAM,CACJX,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,oCAvDuC,CAAEG,EAAG,KAAMC,EAAG,IAAKK,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-constants.mjs","sources":["../../../../src/components/Avatar/default-constants.ts"],"sourcesContent":["import type { Size
|
|
1
|
+
{"version":3,"file":"default-constants.mjs","sources":["../../../../src/components/Avatar/default-constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES_MAPPING_RULES: Record<string, Size> = { l: 'xl', m: 'l', sm: 'm' }\n\nexport const SIZES_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n xxl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n xl: {\n width: 120,\n height: 120,\n fontSize: 36,\n borderRadius: '50%',\n },\n l: {\n width: 68,\n height: 68,\n fontSize: 24,\n borderRadius: '50%',\n },\n m: {\n width: 52,\n height: 52,\n fontSize: 12,\n borderRadius: '50%',\n },\n s: {\n width: 40,\n height: 40,\n fontSize: 12,\n borderRadius: '50%',\n },\n xs: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n xxs: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n xxxs: {\n width: 32,\n height: 32,\n fontSize: 12,\n borderRadius: '50%',\n },\n}\n"],"names":["SIZES_MAPPING_RULES","l","m","sm","SIZES_DEFAULT","xxxl","width","height","fontSize","borderRadius","xxl","xl","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,oBAA4C,CAAEC,EAAG,KAAMC,EAAG,IAAKC,GAAI,KAEzE,MAAMC,cAA6C,CACxDC,KAAM,CACJC,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBC,IAAK,CACHJ,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBE,GAAI,CACFL,MAAO,IACPC,OAAQ,IACRC,SAAU,GACVC,aAAc,OAEhBR,EAAG,CACDK,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBP,EAAG,CACDI,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBG,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBI,GAAI,CACFP,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBK,IAAK,CACHR,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc,OAEhBM,KAAM,CACJT,MAAO,GACPC,OAAQ,GACRC,SAAU,GACVC,aAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/Badge/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Badge/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n height: 34,\n fontSize: 22,\n paddingRight: 10,\n paddingLeft: 10,\n },\n xxl: {\n height: 32,\n fontSize: 20,\n paddingRight: 10,\n paddingLeft: 10,\n },\n xl: {\n height: 30,\n fontSize: 18,\n paddingRight: 10,\n paddingLeft: 10,\n },\n l: {\n height: 28,\n fontSize: 16,\n paddingRight: 8,\n paddingLeft: 8,\n },\n m: {\n height: 26,\n fontSize: 14,\n paddingRight: 8,\n paddingLeft: 8,\n },\n s: {\n height: 24,\n fontSize: 12,\n paddingRight: 8,\n paddingLeft: 8,\n },\n xs: {\n height: 22,\n fontSize: 10,\n paddingRight: 6,\n paddingLeft: 6,\n },\n xxs: {\n height: 20,\n fontSize: 10,\n paddingRight: 6,\n paddingLeft: 6,\n },\n xxxs: {\n height: 18,\n fontSize: 10,\n paddingRight: 6,\n paddingLeft: 6,\n },\n}\n\nexport const SIZES_ROUND: Record<Size, CSSProperties> = {\n xxxl: {\n height: 34,\n width: 34,\n fontSize: 22,\n },\n xxl: {\n height: 32,\n width: 32,\n fontSize: 20,\n },\n xl: {\n height: 30,\n width: 30,\n fontSize: 18,\n },\n l: {\n height: 28,\n width: 28,\n fontSize: 16,\n },\n m: {\n height: 26,\n width: 26,\n fontSize: 14,\n },\n s: {\n height: 24,\n width: 24,\n fontSize: 12,\n },\n xs: {\n height: 22,\n width: 22,\n fontSize: 10,\n },\n xxs: {\n height: 20,\n width: 20,\n fontSize: 10,\n },\n xxxs: {\n height: 18,\n width: 18,\n fontSize: 10,\n },\n}\n"],"names":["xxxl","height","fontSize","paddingRight","paddingLeft","xxl","xl","l","m","s","xs","xxs","xxxs","width"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,OAAQ,GACRC,SAAU,GACVC,aAAc,GACdC,YAAa,IAEfC,IAAK,CACHJ,OAAQ,GACRC,SAAU,GACVC,aAAc,GACdC,YAAa,IAEfE,GAAI,CACFL,OAAQ,GACRC,SAAU,GACVC,aAAc,GACdC,YAAa,IAEfG,EAAG,CACDN,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfI,EAAG,CACDP,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfK,EAAG,CACDR,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfM,GAAI,CACFT,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfO,IAAK,CACHV,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfQ,KAAM,CACJX,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,wBAIuC,CACtDJ,KAAM,CACJC,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZG,IAAK,CACHJ,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZI,GAAI,CACFL,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZK,EAAG,CACDN,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZM,EAAG,CACDP,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZO,EAAG,CACDR,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZQ,GAAI,CACFT,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZS,IAAK,CACHV,OAAQ,GACRY,MAAO,GACPX,SAAU,IAEZU,KAAM,CACJX,OAAQ,GACRY,MAAO,GACPX,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Badge/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Badge/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n height: 34,\n fontSize: 22,\n paddingRight: 10,\n paddingLeft: 10,\n },\n xxl: {\n height: 32,\n fontSize: 20,\n paddingRight: 10,\n paddingLeft: 10,\n },\n xl: {\n height: 30,\n fontSize: 18,\n paddingRight: 10,\n paddingLeft: 10,\n },\n l: {\n height: 28,\n fontSize: 16,\n paddingRight: 8,\n paddingLeft: 8,\n },\n m: {\n height: 26,\n fontSize: 14,\n paddingRight: 8,\n paddingLeft: 8,\n },\n s: {\n height: 24,\n fontSize: 12,\n paddingRight: 8,\n paddingLeft: 8,\n },\n xs: {\n height: 22,\n fontSize: 10,\n paddingRight: 6,\n paddingLeft: 6,\n },\n xxs: {\n height: 20,\n fontSize: 10,\n paddingRight: 6,\n paddingLeft: 6,\n },\n xxxs: {\n height: 18,\n fontSize: 10,\n paddingRight: 6,\n paddingLeft: 6,\n },\n}\n\nexport const SIZES_ROUND: Record<Size, CSSProperties> = {\n xxxl: {\n height: 34,\n width: 34,\n fontSize: 22,\n },\n xxl: {\n height: 32,\n width: 32,\n fontSize: 20,\n },\n xl: {\n height: 30,\n width: 30,\n fontSize: 18,\n },\n l: {\n height: 28,\n width: 28,\n fontSize: 16,\n },\n m: {\n height: 26,\n width: 26,\n fontSize: 14,\n },\n s: {\n height: 24,\n width: 24,\n fontSize: 12,\n },\n xs: {\n height: 22,\n width: 22,\n fontSize: 10,\n },\n xxs: {\n height: 20,\n width: 20,\n fontSize: 10,\n },\n xxxs: {\n height: 18,\n width: 18,\n fontSize: 10,\n },\n}\n"],"names":["SIZES","xxxl","height","fontSize","paddingRight","paddingLeft","xxl","xl","l","m","s","xs","xxs","xxxs","SIZES_ROUND","width"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,OAAQ,GACRC,SAAU,GACVC,aAAc,GACdC,YAAa,IAEfC,IAAK,CACHJ,OAAQ,GACRC,SAAU,GACVC,aAAc,GACdC,YAAa,IAEfE,GAAI,CACFL,OAAQ,GACRC,SAAU,GACVC,aAAc,GACdC,YAAa,IAEfG,EAAG,CACDN,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfI,EAAG,CACDP,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfK,EAAG,CACDR,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfM,GAAI,CACFT,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfO,IAAK,CACHV,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,GAEfQ,KAAM,CACJX,OAAQ,GACRC,SAAU,GACVC,aAAc,EACdC,YAAa,IAIV,MAAMS,YAA2C,CACtDb,KAAM,CACJC,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZG,IAAK,CACHJ,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZI,GAAI,CACFL,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZK,EAAG,CACDN,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZM,EAAG,CACDP,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZO,EAAG,CACDR,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZQ,GAAI,CACFT,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZS,IAAK,CACHV,OAAQ,GACRa,MAAO,GACPZ,SAAU,IAEZU,KAAM,CACJX,OAAQ,GACRa,MAAO,GACPZ,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/Button/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Button/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 22,\n height: 64,\n paddingLeft: 36,\n paddingRight: 36,\n },\n xxl: {\n fontSize: 20,\n height: 60,\n paddingLeft: 34,\n paddingRight: 34,\n },\n xl: {\n fontSize: 18,\n height: 56,\n paddingLeft: 32,\n paddingRight: 32,\n },\n l: {\n fontSize: 16,\n height: 48,\n paddingLeft: 28,\n paddingRight: 28,\n },\n m: {\n fontSize: 16,\n height: 44,\n paddingLeft: 28,\n paddingRight: 28,\n },\n s: {\n fontSize: 14,\n height: 40,\n paddingLeft: 24,\n paddingRight: 24,\n },\n xs: {\n fontSize: 14,\n height: 32,\n paddingLeft: 16,\n paddingRight: 16,\n },\n xxs: {\n fontSize: 12,\n height: 28,\n paddingLeft: 14,\n paddingRight: 14,\n },\n xxxs: {\n fontSize: 10,\n height: 24,\n paddingLeft: 12,\n paddingRight: 12,\n },\n}\n\nexport const SIZES_ROUND: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n height: 64,\n width: 64,\n },\n xxl: {\n fontSize: 28,\n height: 60,\n width: 60,\n },\n xl: {\n fontSize: 24,\n height: 56,\n width: 56,\n },\n l: {\n fontSize: 20,\n height: 48,\n width: 48,\n },\n m: {\n fontSize: 16,\n height: 44,\n width: 44,\n },\n s: {\n fontSize: 16,\n height: 40,\n width: 40,\n },\n xs: {\n fontSize: 16,\n height: 32,\n width: 32,\n },\n xxs: {\n fontSize: 16,\n height: 28,\n width: 28,\n },\n xxxs: {\n fontSize: 14,\n height: 24,\n width: 24,\n },\n}\n"],"names":["xxxl","fontSize","height","paddingLeft","paddingRight","xxl","xl","l","m","s","xs","xxs","xxxs","width"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBC,IAAK,CACHJ,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBE,GAAI,CACFL,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBG,EAAG,CACDN,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBI,EAAG,CACDP,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBK,EAAG,CACDR,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBM,GAAI,CACFT,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBO,IAAK,CACHV,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBQ,KAAM,CACJX,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,yBAIsC,CACtDJ,KAAM,CACJC,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETR,IAAK,CACHJ,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETP,GAAI,CACFL,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETN,EAAG,CACDN,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETL,EAAG,CACDP,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETJ,EAAG,CACDR,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETH,GAAI,CACFT,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETF,IAAK,CACHV,SAAU,GACVC,OAAQ,GACRW,MAAO,IAETD,KAAM,CACJX,SAAU,GACVC,OAAQ,GACRW,MAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Button/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Button/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 22,\n height: 64,\n paddingLeft: 36,\n paddingRight: 36,\n },\n xxl: {\n fontSize: 20,\n height: 60,\n paddingLeft: 34,\n paddingRight: 34,\n },\n xl: {\n fontSize: 18,\n height: 56,\n paddingLeft: 32,\n paddingRight: 32,\n },\n l: {\n fontSize: 16,\n height: 48,\n paddingLeft: 28,\n paddingRight: 28,\n },\n m: {\n fontSize: 16,\n height: 44,\n paddingLeft: 28,\n paddingRight: 28,\n },\n s: {\n fontSize: 14,\n height: 40,\n paddingLeft: 24,\n paddingRight: 24,\n },\n xs: {\n fontSize: 14,\n height: 32,\n paddingLeft: 16,\n paddingRight: 16,\n },\n xxs: {\n fontSize: 12,\n height: 28,\n paddingLeft: 14,\n paddingRight: 14,\n },\n xxxs: {\n fontSize: 10,\n height: 24,\n paddingLeft: 12,\n paddingRight: 12,\n },\n}\n\nexport const SIZES_ROUND: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n height: 64,\n width: 64,\n },\n xxl: {\n fontSize: 28,\n height: 60,\n width: 60,\n },\n xl: {\n fontSize: 24,\n height: 56,\n width: 56,\n },\n l: {\n fontSize: 20,\n height: 48,\n width: 48,\n },\n m: {\n fontSize: 16,\n height: 44,\n width: 44,\n },\n s: {\n fontSize: 16,\n height: 40,\n width: 40,\n },\n xs: {\n fontSize: 16,\n height: 32,\n width: 32,\n },\n xxs: {\n fontSize: 16,\n height: 28,\n width: 28,\n },\n xxxs: {\n fontSize: 14,\n height: 24,\n width: 24,\n },\n}\n"],"names":["SIZES","xxxl","fontSize","height","paddingLeft","paddingRight","xxl","xl","l","m","s","xs","xxs","xxxs","SIZES_ROUND","width"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBC,IAAK,CACHJ,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBE,GAAI,CACFL,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBG,EAAG,CACDN,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBI,EAAG,CACDP,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBK,EAAG,CACDR,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBM,GAAI,CACFT,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBO,IAAK,CACHV,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBQ,KAAM,CACJX,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,KAIX,MAAMS,YAA2C,CACtDb,KAAM,CACJC,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETT,IAAK,CACHJ,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETR,GAAI,CACFL,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETP,EAAG,CACDN,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETN,EAAG,CACDP,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETL,EAAG,CACDR,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETJ,GAAI,CACFT,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETH,IAAK,CACHV,SAAU,GACVC,OAAQ,GACRY,MAAO,IAETF,KAAM,CACJX,SAAU,GACVC,OAAQ,GACRY,MAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-constants.js","sources":["../../../../src/components/Button/default-constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"default-constants.js","sources":["../../../../src/components/Button/default-constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\nimport type { ButtonProps } from './types'\n\nexport const SIZES_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n height: 78,\n paddingLeft: 44,\n paddingRight: 44,\n },\n xxl: {\n fontSize: 22,\n height: 72,\n paddingLeft: 40,\n paddingRight: 40,\n },\n xl: {\n fontSize: 20,\n height: 68,\n paddingLeft: 40,\n paddingRight: 40,\n },\n l: {\n fontSize: 18,\n height: 60,\n paddingLeft: 36,\n paddingRight: 36,\n },\n m: {\n fontSize: 16,\n height: 52,\n paddingLeft: 32,\n paddingRight: 32,\n },\n s: {\n fontSize: 14,\n height: 40,\n paddingLeft: 28,\n paddingRight: 28,\n },\n xs: {\n fontSize: 14,\n height: 40,\n paddingLeft: 28,\n paddingRight: 28,\n },\n xxs: {\n fontSize: 12,\n height: 32,\n paddingLeft: 18,\n paddingRight: 18,\n },\n xxxs: {\n fontSize: 10,\n height: 28,\n paddingLeft: 12,\n paddingRight: 12,\n },\n}\n\nexport const SIZES_ROUND_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n lineHeight: 1,\n padding: '0.28em',\n width: 72,\n height: 72,\n },\n xxl: {\n fontSize: 30,\n lineHeight: 1,\n padding: '0.28em',\n width: 68,\n height: 68,\n },\n xl: {\n fontSize: 26,\n lineHeight: 1,\n padding: '0.28em',\n width: 60,\n height: 60,\n },\n l: {\n fontSize: 23,\n lineHeight: 1,\n padding: '0.28em',\n width: 52,\n height: 52,\n },\n m: {\n fontSize: 21,\n lineHeight: 1,\n padding: '0.28em',\n width: 48,\n height: 48,\n },\n s: {\n fontSize: 18,\n lineHeight: 1,\n padding: '0.28em',\n width: 40,\n height: 40,\n },\n xs: {\n fontSize: 14,\n lineHeight: 1,\n padding: '0.28em',\n width: 32,\n height: 32,\n },\n xxs: {\n fontSize: 12,\n lineHeight: 1,\n padding: '0.28em',\n width: 24,\n height: 24,\n },\n xxxs: {\n fontSize: 8,\n lineHeight: 1,\n padding: '0.28em',\n width: 18,\n height: 18,\n },\n}\n\n// delete in next major version bump\nexport const PROPS_BY_SIZE: Partial<Record<Size, ButtonProps>> = {\n xl: {\n paddingLeftM: 36,\n paddingRightM: 36,\n paddingLeftS: 32,\n paddingRightS: 32,\n },\n l: {\n fontSizeM: 'm',\n heightM: 56,\n heightS: 52,\n paddingLeftM: 28,\n paddingRightM: 28,\n paddingLeftS: 24,\n paddingRightS: 24,\n },\n m: {\n paddingLeftM: 24,\n paddingRightM: 24,\n paddingLeftS: 20,\n paddingRightS: 20,\n },\n s: {\n paddingLeftM: 20,\n paddingRightM: 20,\n paddingLeftS: 16,\n paddingRightS: 16,\n },\n xs: {\n paddingLeftM: 20,\n paddingRightM: 20,\n paddingLeftS: 16,\n paddingRightS: 16,\n },\n}\n"],"names":["xl","paddingLeftM","paddingRightM","paddingLeftS","paddingRightS","l","fontSizeM","heightM","heightS","m","s","xs","xxxl","fontSize","height","paddingLeft","paddingRight","xxl","xxs","xxxs","lineHeight","padding","width"],"mappings":"mCAgIiE,CAC/DA,GAAI,CACFC,aAAc,GACdC,cAAe,GACfC,aAAc,GACdC,cAAe,IAEjBC,EAAG,CACDC,UAAW,IACXC,QAAS,GACTC,QAAS,GACTP,aAAc,GACdC,cAAe,GACfC,aAAc,GACdC,cAAe,IAEjBK,EAAG,CACDR,aAAc,GACdC,cAAe,GACfC,aAAc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AAS,SACTC,MAAO,GACPR,OAAQ,IAEVI,IAAK,CACHL,SAAU,GACVO,WAAY,EACZC,QAAS,SACTC,MAAO,GACPR,OAAQ,IAEVK,KAAM,CACJN,SAAU,EACVO,WAAY,EACZC,QAAS,SACTC,MAAO,GACPR,OAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-constants.mjs","sources":["../../../../src/components/Button/default-constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"default-constants.mjs","sources":["../../../../src/components/Button/default-constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\nimport type { ButtonProps } from './types'\n\nexport const SIZES_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 24,\n height: 78,\n paddingLeft: 44,\n paddingRight: 44,\n },\n xxl: {\n fontSize: 22,\n height: 72,\n paddingLeft: 40,\n paddingRight: 40,\n },\n xl: {\n fontSize: 20,\n height: 68,\n paddingLeft: 40,\n paddingRight: 40,\n },\n l: {\n fontSize: 18,\n height: 60,\n paddingLeft: 36,\n paddingRight: 36,\n },\n m: {\n fontSize: 16,\n height: 52,\n paddingLeft: 32,\n paddingRight: 32,\n },\n s: {\n fontSize: 14,\n height: 40,\n paddingLeft: 28,\n paddingRight: 28,\n },\n xs: {\n fontSize: 14,\n height: 40,\n paddingLeft: 28,\n paddingRight: 28,\n },\n xxs: {\n fontSize: 12,\n height: 32,\n paddingLeft: 18,\n paddingRight: 18,\n },\n xxxs: {\n fontSize: 10,\n height: 28,\n paddingLeft: 12,\n paddingRight: 12,\n },\n}\n\nexport const SIZES_ROUND_DEFAULT: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 32,\n lineHeight: 1,\n padding: '0.28em',\n width: 72,\n height: 72,\n },\n xxl: {\n fontSize: 30,\n lineHeight: 1,\n padding: '0.28em',\n width: 68,\n height: 68,\n },\n xl: {\n fontSize: 26,\n lineHeight: 1,\n padding: '0.28em',\n width: 60,\n height: 60,\n },\n l: {\n fontSize: 23,\n lineHeight: 1,\n padding: '0.28em',\n width: 52,\n height: 52,\n },\n m: {\n fontSize: 21,\n lineHeight: 1,\n padding: '0.28em',\n width: 48,\n height: 48,\n },\n s: {\n fontSize: 18,\n lineHeight: 1,\n padding: '0.28em',\n width: 40,\n height: 40,\n },\n xs: {\n fontSize: 14,\n lineHeight: 1,\n padding: '0.28em',\n width: 32,\n height: 32,\n },\n xxs: {\n fontSize: 12,\n lineHeight: 1,\n padding: '0.28em',\n width: 24,\n height: 24,\n },\n xxxs: {\n fontSize: 8,\n lineHeight: 1,\n padding: '0.28em',\n width: 18,\n height: 18,\n },\n}\n\n// delete in next major version bump\nexport const PROPS_BY_SIZE: Partial<Record<Size, ButtonProps>> = {\n xl: {\n paddingLeftM: 36,\n paddingRightM: 36,\n paddingLeftS: 32,\n paddingRightS: 32,\n },\n l: {\n fontSizeM: 'm',\n heightM: 56,\n heightS: 52,\n paddingLeftM: 28,\n paddingRightM: 28,\n paddingLeftS: 24,\n paddingRightS: 24,\n },\n m: {\n paddingLeftM: 24,\n paddingRightM: 24,\n paddingLeftS: 20,\n paddingRightS: 20,\n },\n s: {\n paddingLeftM: 20,\n paddingRightM: 20,\n paddingLeftS: 16,\n paddingRightS: 16,\n },\n xs: {\n paddingLeftM: 20,\n paddingRightM: 20,\n paddingLeftS: 16,\n paddingRightS: 16,\n },\n}\n"],"names":["SIZES_DEFAULT","xxxl","fontSize","height","paddingLeft","paddingRight","xxl","xl","l","m","s","xs","xxs","xxxs","SIZES_ROUND_DEFAULT","lineHeight","padding","width","PROPS_BY_SIZE","paddingLeftM","paddingRightM","paddingLeftS","paddingRightS","fontSizeM","heightM","heightS"],"mappings":"AAIO,MAAMA,cAA6C,CACxDC,KAAM,CACJC,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBC,IAAK,CACHJ,SAAU,GACVC,OAAQ,GACRC,YAAa,GACbC,aAAc,IAEhBE,GAAI,CACFL,S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IACXC,QAAS,GACTC,QAAS,GACTN,aAAc,GACdC,cAAe,GACfC,aAAc,GACdC,cAAe,IAEjBb,EAAG,CACDU,aAAc,GACdC,cAAe,GACfC,aAAc,GACdC,cAAe,IAEjBZ,EAAG,CACDS,aAAc,GACdC,cAAe,GACfC,aAAc,GACdC,cAAe,IAEjBX,GAAI,CACFQ,aAAc,GACdC,cAAe,GACfC,aAAc,GACdC,cAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/Chip/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Chip/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n xxl: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n xl: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n l: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n m: {\n fontSize: 16,\n minHeight: 36,\n padding: 7,\n borderRadius: 8,\n },\n s: {\n fontSize: 14,\n minHeight: 32,\n padding: 6,\n borderRadius: 7,\n },\n xs: {\n fontSize: 12,\n minHeight: 20,\n padding: 4,\n borderRadius: 4,\n },\n xxs: {\n fontSize: 12,\n minHeight: 20,\n padding: 4,\n borderRadius: 4,\n },\n xxxs: {\n fontSize: 12,\n minHeight: 20,\n padding: 4,\n borderRadius: 4,\n },\n}\n"],"names":["xxxl","fontSize","minHeight","padding","borderRadius","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBC,IAAK,CACHJ,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBE,GAAI,CACFL,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBG,EAAG,CACDN,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBI,EAAG,CACDP,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBK,EAAG,CACDR,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBM,GAAI,CACFT,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBO,IAAK,CACHV,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBQ,KAAM,CACJX,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Chip/constants.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Chip/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n xxl: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n xl: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n l: {\n fontSize: 18,\n minHeight: 40,\n padding: 8,\n borderRadius: 8,\n },\n m: {\n fontSize: 16,\n minHeight: 36,\n padding: 7,\n borderRadius: 8,\n },\n s: {\n fontSize: 14,\n minHeight: 32,\n padding: 6,\n borderRadius: 7,\n },\n xs: {\n fontSize: 12,\n minHeight: 20,\n padding: 4,\n borderRadius: 4,\n },\n xxs: {\n fontSize: 12,\n minHeight: 20,\n padding: 4,\n borderRadius: 4,\n },\n xxxs: {\n fontSize: 12,\n minHeight: 20,\n padding: 4,\n borderRadius: 4,\n },\n}\n"],"names":["SIZES","xxxl","fontSize","minHeight","padding","borderRadius","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBC,IAAK,CACHJ,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBE,GAAI,CACFL,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBG,EAAG,CACDN,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBI,EAAG,CACDP,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBK,EAAG,CACDR,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBM,GAAI,CACFT,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBO,IAAK,CACHV,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc,GAEhBQ,KAAM,CACJX,SAAU,GACVC,UAAW,GACXC,QAAS,EACTC,aAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var React=require('react');var ReactModal=require('react-modal');var ramda=require('ramda');var withMergedProps=require('../../hocs/withMergedProps.js');var withTranslation=require('../../hocs/withTranslation.js');var constants$1=require('./constants.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var DialogComponent=require('../DialogComponent/DialogComponent.js');var constants=require('../DialogComponent/constants.js');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ReactModal__default=_interopDefault(ReactModal);const TranslationDialogComponent=withTranslation.withTranslation(React.forwardRef(((e,o)=>{const{positions:a={},translated:n,...r}=e;const s=n?{}:ramda.mergeDeepLeft(a,constants$1.POSITIONS);return require$$0.jsx(style.PositionedDialogComponent,{...r,positions:s,ref:o})})));const Dialog=Object.assign(withMergedProps.withMergedProps((e=>{const{size:o="s",position:a="center",role:n="dialog",open:r,preventScrollAfterClose:s,closeTimeoutMS:t,portalClassName:l,className:i,bodyOpenClassName:c,htmlOpenClassName:u,overlayClassName:p,shouldCloseOnOverlayClick:C,shouldCloseOnEsc:d,shouldReturnFocusAfterClose:m,parentSelector:g,overlayRef:D,contentRef:f,palette:v,overlayBlur:M,onAfterOpen:h,onAfterClose:w,onRequestClose:y,...N}=e;return require$$0.jsx(ReactModal__default.default,{isOpen:r,ariaHideApp:!1,preventScroll:s,closeTimeoutMS:t,portalClassName:l,className:i,bodyOpenClassName:c,htmlOpenClassName:u,overlayClassName:p,shouldCloseOnOverlayClick:C,shouldCloseOnEsc:d,shouldReturnFocusAfterClose:m,parentSelector:g,overlayRef:D,contentRef:f,onAfterOpen:h,onAfterClose:w,onRequestClose:y,contentElement:e=>{const{ref:r,className:s,tabIndex:t,onKeyDown:l,onMouseDown:i,onMouseUp:c,onClick:u}=e;return require$$0.jsx(TranslationDialogComponent,{...N,ref:r,size:o,role:n,className:s,tabIndex:t,position:a,"aria-modal":!N.draggable,palette:{color:v.color,backgroundColor:v.backgroundColor,shadowColor:v.shadowColor},onKeyDown:e=>{N.onKeyDown&&N.onKeyDown(e),l&&l(e)},onMouseDown:e=>{N.onMouseDown&&N.onMouseDown(e),i&&i(e)},onMouseUp:e=>{N.onMouseUp&&N.onMouseUp(e),c&&c(e)},onClick:e=>{N.onClick&&N.onClick(e),u&&u(e)}})},overlayElement:(e,o)=>{const{ref:a,className:n,onClick:r,onMouseDown:s}=e;return N.draggable?o:require$$0.jsx(style.DialogOverlay,{ref:a,className:n,blur:M,palette:{backgroundColor:v.overlayBackgroundColor},onClick:r,onMouseDown:s,children:o})}})}),{sizes:constants.SIZES,displayName:"Dialog"}),{Component:DialogComponent.DialogComponent});exports.COMPONENT_NAME="Dialog",exports.Dialog=Dialog;
|
|
2
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport ReactModal from 'react-modal'\nimport { mergeDeepLeft } from 'ramda'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { withTranslation } from 'hocs/withTranslation'\nimport { DialogComponent, SIZES } from 'components/DialogComponent'\nimport { POSITIONS } from './constants'\nimport * as Styled from './style'\nimport type { DialogProps, TranslationDialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'Dialog'\n\nconst TranslationDialogComponent = withTranslation<HTMLDivElement, TranslationDialogComponentProps>(\n forwardRef((props, ref) => {\n const { positions = {}, translated, ...restProps } = props\n\n const dialogPositions = translated ? {} : mergeDeepLeft(positions, POSITIONS)\n\n return <Styled.PositionedDialogComponent {...restProps} positions={dialogPositions} ref={ref} />\n })\n)\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента и пропсы \"react-modal\" [v3.16.1](https://reactcommunity.org/react-modal).\n *\n * Поддерживаются пропсы определения размеров и позиции в зависимости от ширины вьюпорта.\n *\n * Получить доступ к компоненту, не подключенному к \"react-modal\", можно через Dialog.Component.\n *\n * Полный интерфейс Dialog можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/Dialog/types.ts), интерфейс Dialog.Component [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n *\n */\nconst Dialog: React.ForwardRefExoticComponent<DialogProps> & { Component: typeof DialogComponent } = Object.assign(\n withMergedProps<DialogProps, HTMLDivElement>(\n (props) => {\n const {\n size = 's',\n position = 'center',\n role = 'dialog',\n open,\n preventScrollAfterClose,\n closeTimeoutMS,\n portalClassName,\n className,\n bodyOpenClassName,\n htmlOpenClassName,\n overlayClassName,\n shouldCloseOnOverlayClick,\n shouldCloseOnEsc,\n shouldReturnFocusAfterClose,\n parentSelector,\n overlayRef,\n contentRef,\n palette,\n overlayBlur,\n onAfterOpen,\n onAfterClose,\n onRequestClose,\n ...dialogProps\n } = props\n\n return (\n <ReactModal\n isOpen={open}\n ariaHideApp={false}\n preventScroll={preventScrollAfterClose}\n closeTimeoutMS={closeTimeoutMS}\n portalClassName={portalClassName}\n className={className}\n bodyOpenClassName={bodyOpenClassName}\n htmlOpenClassName={htmlOpenClassName}\n overlayClassName={overlayClassName}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n shouldCloseOnEsc={shouldCloseOnEsc}\n shouldReturnFocusAfterClose={shouldReturnFocusAfterClose}\n parentSelector={parentSelector}\n overlayRef={overlayRef}\n contentRef={contentRef}\n onAfterOpen={onAfterOpen}\n onAfterClose={onAfterClose}\n onRequestClose={onRequestClose}\n contentElement={(contentProps) => {\n const { ref, className, tabIndex, onKeyDown, onMouseDown, onMouseUp, onClick } = contentProps\n\n return (\n <TranslationDialogComponent\n {...dialogProps}\n ref={ref}\n size={size}\n role={role}\n className={className}\n tabIndex={tabIndex}\n position={position}\n aria-modal={!dialogProps.draggable}\n palette={{\n color: palette.color,\n backgroundColor: palette.backgroundColor,\n shadowColor: palette.shadowColor,\n }}\n onKeyDown={(evt) => {\n if (dialogProps.onKeyDown) dialogProps.onKeyDown(evt)\n if (onKeyDown) onKeyDown(evt)\n }}\n onMouseDown={(evt) => {\n if (dialogProps.onMouseDown) dialogProps.onMouseDown(evt)\n if (onMouseDown) onMouseDown(evt)\n }}\n onMouseUp={(evt) => {\n if (dialogProps.onMouseUp) dialogProps.onMouseUp(evt)\n if (onMouseUp) onMouseUp(evt)\n }}\n onClick={(evt) => {\n if (dialogProps.onClick) dialogProps.onClick(evt)\n if (onClick) onClick(evt)\n }}\n />\n )\n }}\n overlayElement={(overlayProps, contentElement) => {\n const { ref, className, onClick, onMouseDown } = overlayProps\n\n return dialogProps.draggable ? (\n contentElement\n ) : (\n <Styled.DialogOverlay\n ref={ref}\n className={className}\n blur={overlayBlur}\n palette={{\n backgroundColor: palette.overlayBackgroundColor,\n }}\n onClick={onClick}\n onMouseDown={onMouseDown}\n >\n {contentElement}\n </Styled.DialogOverlay>\n )\n }}\n />\n )\n },\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n ),\n {\n Component: DialogComponent,\n }\n)\n\nexport { Dialog }\n\nexport { COMPONENT_NAME }\n"],"names":["TranslationDialogComponent","withTranslation","forwardRef","props","ref","positions","translated","restProps","dialogPositions","mergeDeepLeft","POSITIONS","_jsx","Styled","Dialog","Object","assign","withMergedProps","size","position","role","open","preventScrollAfterClose","closeTimeoutMS","portalClassName","className","bodyOpenClassName","htmlOpenClassName","overlayClassName","shouldCloseOnOverlayClick","shouldCloseOnEsc","shouldReturnFocusAfterClose","parentSelector","overlayRef","contentRef","palette","overlayBlur","onAfterOpen","onAfterClose","onRequestClose","dialogProps","ReactModal","isOpen","ariaHideApp","preventScroll","contentElement","contentProps","tabIndex","onKeyDown","onMouseDown","onMouseUp","onClick","draggable","color","backgroundColor","shadowColor","evt","overlayElement","overlayProps","blur","overlayBackgroundColor","children","sizes","SIZES","displayName","Component","DialogComponent"],"mappings":"4kBAYA,MAAMA,2BAA6BC,gBAAAA,gBACjCC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,UAAEA,EAAY,CAAE,EAAAC,WAAEA,KAAeC,GAAcJ,EAErD,MAAMK,EAAkBF,EAAa,CAAA,EAAKG,MAAAA,cAAcJ,EAAWK,YAAAA,WAEnE,OAAOC,WAAAA,IAACC,MAAAA,0BAAgC,IAAKL,EAAWF,UAAWG,EAAiBJ,IAAKA,GAAO,KAe9FS,MAAAA,OAA+FC,OAAOC,OAC1GC,gBAAAA,iBACGb,IACC,MAAMc,KACJA,EAAO,IAAGC,SACVA,EAAW,SAAQC,KACnBA,EAAO,SAAQC,KACfA,EAAIC,wBACJA,EAAuBC,eACvBA,EAAcC,gBACdA,EAAeC,UACfA,EAASC,kBACTA,EAAiBC,kBACjBA,EAAiBC,iBACjBA,EAAgBC,0BAChBA,EAAyBC,iBACzBA,EAAgBC,4BAChBA,EAA2BC,eAC3BA,EAAcC,WACdA,EAAUC,WACVA,EAAUC,QACVA,EAAOC,YACPA,EAAWC,YACXA,EAAWC,aACXA,EAAYC,eACZA,KACGC,G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B,EACND,QAAS,CACPmB,gBAAiBnB,EAAQyB,wBAE3BT,QAASA,EACTF,YAAaA,EAAYY,SAExBhB,GAEJ,GAEH,GAGN,CACEiB,MAAOC,UAAKA,MACZC,YAtIiB,WAyIrB,CACEC,UAAWC,gBAAAA,yCA1IQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{forwardRef}from'react';import ReactModal from'react-modal';import{mergeDeepLeft}from'ramda';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{withTranslation}from'../../hocs/withTranslation.mjs';import{POSITIONS}from'./constants.mjs';import{DialogOverlay,PositionedDialogComponent}from'./style.mjs';import{jsx}from'react/jsx-runtime';import{DialogComponent}from'../DialogComponent/DialogComponent.mjs';import{SIZES}from'../DialogComponent/constants.mjs';const COMPONENT_NAME='Dialog';const TranslationDialogComponent=withTranslation(forwardRef(((o,e)=>{const{positions:n={},translated:s,...l}=o;const r=s?{}:mergeDeepLeft(n,POSITIONS);return jsx(PositionedDialogComponent,{...l,positions:r,ref:e})})));const Dialog=Object.assign(withMergedProps((o=>{const{size:e="s",position:n="center",role:s="dialog",open:l,preventScrollAfterClose:r,closeTimeoutMS:a,portalClassName:t,className:i,bodyOpenClassName:m,htmlOpenClassName:p,overlayClassName:c,shouldCloseOnOverlayClick:C,shouldCloseOnEsc:d,shouldReturnFocusAfterClose:u,parentSelector:f,overlayRef:g,contentRef:D,palette:O,overlayBlur:N,onAfterOpen:M,onAfterClose:w,onRequestClose:h,...y}=o;return jsx(ReactModal,{isOpen:l,ariaHideApp:!1,preventScroll:r,closeTimeoutMS:a,portalClassName:t,className:i,bodyOpenClassName:m,htmlOpenClassName:p,overlayClassName:c,shouldCloseOnOverlayClick:C,shouldCloseOnEsc:d,shouldReturnFocusAfterClose:u,parentSelector:f,overlayRef:g,contentRef:D,onAfterOpen:M,onAfterClose:w,onRequestClose:h,contentElement:o=>{const{ref:l,className:r,tabIndex:a,onKeyDown:t,onMouseDown:i,onMouseUp:m,onClick:p}=o;return jsx(TranslationDialogComponent,{...y,ref:l,size:e,role:s,className:r,tabIndex:a,position:n,"aria-modal":!y.draggable,palette:{color:O.color,backgroundColor:O.backgroundColor,shadowColor:O.shadowColor},onKeyDown:o=>{y.onKeyDown&&y.onKeyDown(o),t&&t(o)},onMouseDown:o=>{y.onMouseDown&&y.onMouseDown(o),i&&i(o)},onMouseUp:o=>{y.onMouseUp&&y.onMouseUp(o),m&&m(o)},onClick:o=>{y.onClick&&y.onClick(o),p&&p(o)}})},overlayElement:(o,e)=>{const{ref:n,className:s,onClick:l,onMouseDown:r}=o;return y.draggable?e:jsx(DialogOverlay,{ref:n,className:s,blur:N,palette:{backgroundColor:O.overlayBackgroundColor},onClick:l,onMouseDown:r,children:e})}})}),{sizes:SIZES,displayName:"Dialog"}),{Component:DialogComponent});export{COMPONENT_NAME,Dialog};
|
|
2
|
+
//# sourceMappingURL=Dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.mjs","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport ReactModal from 'react-modal'\nimport { mergeDeepLeft } from 'ramda'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { withTranslation } from 'hocs/withTranslation'\nimport { DialogComponent, SIZES } from 'components/DialogComponent'\nimport { POSITIONS } from './constants'\nimport * as Styled from './style'\nimport type { DialogProps, TranslationDialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'Dialog'\n\nconst TranslationDialogComponent = withTranslation<HTMLDivElement, TranslationDialogComponentProps>(\n forwardRef((props, ref) => {\n const { positions = {}, translated, ...restProps } = props\n\n const dialogPositions = translated ? {} : mergeDeepLeft(positions, POSITIONS)\n\n return <Styled.PositionedDialogComponent {...restProps} positions={dialogPositions} ref={ref} />\n })\n)\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента и пропсы \"react-modal\" [v3.16.1](https://reactcommunity.org/react-modal).\n *\n * Поддерживаются пропсы определения размеров и позиции в зависимости от ширины вьюпорта.\n *\n * Получить доступ к компоненту, не подключенному к \"react-modal\", можно через Dialog.Component.\n *\n * Полный интерфейс Dialog можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/Dialog/types.ts), интерфейс Dialog.Component [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n *\n */\nconst Dialog: React.ForwardRefExoticComponent<DialogProps> & { Component: typeof DialogComponent } = Object.assign(\n withMergedProps<DialogProps, HTMLDivElement>(\n (props) => {\n const {\n size = 's',\n position = 'center',\n role = 'dialog',\n open,\n preventScrollAfterClose,\n closeTimeoutMS,\n portalClassName,\n className,\n bodyOpenClassName,\n htmlOpenClassName,\n overlayClassName,\n shouldCloseOnOverlayClick,\n shouldCloseOnEsc,\n shouldReturnFocusAfterClose,\n parentSelector,\n overlayRef,\n contentRef,\n palette,\n overlayBlur,\n onAfterOpen,\n onAfterClose,\n onRequestClose,\n ...dialogProps\n } = props\n\n return (\n <ReactModal\n isOpen={open}\n ariaHideApp={false}\n preventScroll={preventScrollAfterClose}\n closeTimeoutMS={closeTimeoutMS}\n portalClassName={portalClassName}\n className={className}\n bodyOpenClassName={bodyOpenClassName}\n htmlOpenClassName={htmlOpenClassName}\n overlayClassName={overlayClassName}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n shouldCloseOnEsc={shouldCloseOnEsc}\n shouldReturnFocusAfterClose={shouldReturnFocusAfterClose}\n parentSelector={parentSelector}\n overlayRef={overlayRef}\n contentRef={contentRef}\n onAfterOpen={onAfterOpen}\n onAfterClose={onAfterClose}\n onRequestClose={onRequestClose}\n contentElement={(contentProps) => {\n const { ref, className, tabIndex, onKeyDown, onMouseDown, onMouseUp, onClick } = contentProps\n\n return (\n <TranslationDialogComponent\n {...dialogProps}\n ref={ref}\n size={size}\n role={role}\n className={className}\n tabIndex={tabIndex}\n position={position}\n aria-modal={!dialogProps.draggable}\n palette={{\n color: palette.color,\n backgroundColor: palette.backgroundColor,\n shadowColor: palette.shadowColor,\n }}\n onKeyDown={(evt) => {\n if (dialogProps.onKeyDown) dialogProps.onKeyDown(evt)\n if (onKeyDown) onKeyDown(evt)\n }}\n onMouseDown={(evt) => {\n if (dialogProps.onMouseDown) dialogProps.onMouseDown(evt)\n if (onMouseDown) onMouseDown(evt)\n }}\n onMouseUp={(evt) => {\n if (dialogProps.onMouseUp) dialogProps.onMouseUp(evt)\n if (onMouseUp) onMouseUp(evt)\n }}\n onClick={(evt) => {\n if (dialogProps.onClick) dialogProps.onClick(evt)\n if (onClick) onClick(evt)\n }}\n />\n )\n }}\n overlayElement={(overlayProps, contentElement) => {\n const { ref, className, onClick, onMouseDown } = overlayProps\n\n return dialogProps.draggable ? (\n contentElement\n ) : (\n <Styled.DialogOverlay\n ref={ref}\n className={className}\n blur={overlayBlur}\n palette={{\n backgroundColor: palette.overlayBackgroundColor,\n }}\n onClick={onClick}\n onMouseDown={onMouseDown}\n >\n {contentElement}\n </Styled.DialogOverlay>\n )\n }}\n />\n )\n },\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n ),\n {\n Component: DialogComponent,\n }\n)\n\nexport { Dialog }\n\nexport { COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","TranslationDialogComponent","withTranslation","forwardRef","props","ref","positions","translated","restProps","dialogPositions","mergeDeepLeft","POSITIONS","_jsx","Styled","Dialog","Object","assign","withMergedProps","size","position","role","open","preventScrollAfterClose","closeTimeoutMS","portalClassName","className","bodyOpenClassName","htmlOpenClassName","overlayClassName","shouldCloseOnOverlayClick","shouldCloseOnEsc","shouldReturnFocusAfterClose","parentSelector","overlayRef","contentRef","palette","overlayBlur","onAfterOpen","onAfterClose","onRequestClose","dialogProps","ReactModal","isOpen","ariaHideApp","preventScroll","contentElement","contentProps","tabIndex","onKeyDown","onMouseDown","onMouseUp","onClick","draggable","color","backgroundColor","shadowColor","evt","overlayElement","overlayProps","blur","overlayBackgroundColor","children","sizes","SIZES","displayName","Component","DialogComponent"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cAAaqB,EAAYY,UACzBjB,QAAS,CACPkB,MAAOlB,EAAQkB,MACfC,gBAAiBnB,EAAQmB,gBACzBC,YAAapB,EAAQoB,aAEvBP,UAAYQ,IACNhB,EAAYQ,WAAWR,EAAYQ,UAAUQ,GAC7CR,GAAWA,EAAUQ,EAAI,EAE/BP,YAAcO,IACRhB,EAAYS,aAAaT,EAAYS,YAAYO,GACjDP,GAAaA,EAAYO,EAAI,EAEnCN,UAAYM,IACNhB,EAAYU,WAAWV,EAAYU,UAAUM,GAC7CN,GAAWA,EAAUM,EAAI,EAE/BL,QAAUK,IACJhB,EAAYW,SAASX,EAAYW,QAAQK,GACzCL,GAASA,EAAQK,EAAI,GAE3B,EAGNC,eAAgBA,CAACC,EAAcb,KAC7B,MAAMxC,IAAEA,EAAGoB,UAAEA,EAAS0B,QAAEA,EAAOF,YAAEA,GAAgBS,EAEjD,OAAOlB,EAAYY,UACjBP,EAEAjC,IAACC,cAAoB,CACnBR,IAAKA,EACLoB,UAAWA,EACXkC,KAAMvB,EACND,QAAS,CACPmB,gBAAiBnB,EAAQyB,wBAE3BT,QAASA,EACTF,YAAaA,EAAYY,SAExBhB,GAEJ,GAEH,GAGN,CACEiB,MAAOC,MACPC,YAtIiB,WAyIrB,CACEC,UAAWC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';exports.POSITIONS={center:{top:'50%',right:'auto',bottom:'auto',left:'50%',transform:'translate(-50%, -50%)'},'top-center':{top:'5vh',right:'auto',bottom:'auto',left:'50%',transform:'translate(-50%, 0px)'},'bottom-left':{top:'auto',right:'auto',bottom:'5vh',left:'5vh',transform:'translate(0px, 0px)'},'bottom-right':{top:'auto',right:'5vh',bottom:'5vh',left:'auto',transform:'translate(0px, 0px)'},'bottom-center':{top:'auto',right:'auto',bottom:'0px',left:'50%',transform:'translate(-50%, 0px)'}};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/Dialog/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { DialogPosition } from './types'\n\nexport const POSITIONS: Record<DialogPosition, CSSProperties> = {\n center: {\n top: '50%',\n right: 'auto',\n bottom: 'auto',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n 'top-center': {\n top: '5vh',\n right: 'auto',\n bottom: 'auto',\n left: '50%',\n transform: 'translate(-50%, 0px)',\n },\n 'bottom-left': {\n top: 'auto',\n right: 'auto',\n bottom: '5vh',\n left: '5vh',\n transform: 'translate(0px, 0px)',\n },\n 'bottom-right': {\n top: 'auto',\n right: '5vh',\n bottom: '5vh',\n left: 'auto',\n transform: 'translate(0px, 0px)',\n },\n 'bottom-center': {\n top: 'auto',\n right: 'auto',\n bottom: '0px',\n left: '50%',\n transform: 'translate(-50%, 0px)',\n },\n}\n"],"names":["center","top","right","bottom","left","transform"],"mappings":"+BAGgE,CAC9DA,OAAQ,CACNC,IAAK,MACLC,MAAO,OACPC,OAAQ,OACRC,KAAM,MACNC,UAAW,yBAEb,aAAc,CACZJ,IAAK,MACLC,MAAO,OACPC,OAAQ,OACRC,KAAM,MACNC,UAAW,wBAEb,cAAe,CACbJ,IAAK,OACLC,MAAO,OACPC,OAAQ,MACRC,KAAM,MACNC,UAAW,uBAEb,eAAgB,CACdJ,IAAK,OACLC,MAAO,MACPC,OAAQ,MACRC,KAAM,OACNC,UAAW,uBAEb,gBAAiB,CACfJ,IAAK,OACLC,MAAO,OACPC,OAAQ,MACRC,KAAM,MACNC,UAAW"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const POSITIONS={center:{top:'50%',right:'auto',bottom:'auto',left:'50%',transform:'translate(-50%, -50%)'},'top-center':{top:'5vh',right:'auto',bottom:'auto',left:'50%',transform:'translate(-50%, 0px)'},'bottom-left':{top:'auto',right:'auto',bottom:'5vh',left:'5vh',transform:'translate(0px, 0px)'},'bottom-right':{top:'auto',right:'5vh',bottom:'5vh',left:'auto',transform:'translate(0px, 0px)'},'bottom-center':{top:'auto',right:'auto',bottom:'0px',left:'50%',transform:'translate(-50%, 0px)'}};export{POSITIONS};
|
|
2
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/components/Dialog/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { DialogPosition } from './types'\n\nexport const POSITIONS: Record<DialogPosition, CSSProperties> = {\n center: {\n top: '50%',\n right: 'auto',\n bottom: 'auto',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n 'top-center': {\n top: '5vh',\n right: 'auto',\n bottom: 'auto',\n left: '50%',\n transform: 'translate(-50%, 0px)',\n },\n 'bottom-left': {\n top: 'auto',\n right: 'auto',\n bottom: '5vh',\n left: '5vh',\n transform: 'translate(0px, 0px)',\n },\n 'bottom-right': {\n top: 'auto',\n right: '5vh',\n bottom: '5vh',\n left: 'auto',\n transform: 'translate(0px, 0px)',\n },\n 'bottom-center': {\n top: 'auto',\n right: 'auto',\n bottom: '0px',\n left: '50%',\n transform: 'translate(-50%, 0px)',\n },\n}\n"],"names":["POSITIONS","center","top","right","bottom","left","transform"],"mappings":"AAGO,MAAMA,UAAmD,CAC9DC,OAAQ,CACNC,IAAK,MACLC,MAAO,OACPC,OAAQ,OACRC,KAAM,MACNC,UAAW,yBAEb,aAAc,CACZJ,IAAK,MACLC,MAAO,OACPC,OAAQ,OACRC,KAAM,MACNC,UAAW,wBAEb,cAAe,CACbJ,IAAK,OACLC,MAAO,OACPC,OAAQ,MACRC,KAAM,MACNC,UAAW,uBAEb,eAAgB,CACdJ,IAAK,OACLC,MAAO,MACPC,OAAQ,MACRC,KAAM,OACNC,UAAW,uBAEb,gBAAiB,CACfJ,IAAK,OACLC,MAAO,OACPC,OAAQ,MACRC,KAAM,MACNC,UAAW"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var styled=require('styled-components');var responsivePosition=require('../../mixins/responsive-position.js');var DialogComponent=require('../DialogComponent/DialogComponent.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const PositionedDialogComponent=styled__default.default(DialogComponent.DialogComponent).withConfig({shouldForwardProp:o=>!['position','positions','positionXXS','positionXS','positionS','positionM','positionL','positionXL'].includes(o)}).withConfig({displayName:"Dialog__PositionedDialogComponent",componentId:"ui__sc-19crdz4-0"})(["position:fixed;&:focus-visible{outline:none;}",""],responsivePosition.responsivePosition);const DialogOverlay=styled__default.default.div.withConfig({shouldForwardProp:o=>!['palette','blur'].includes(o)}).withConfig({displayName:"Dialog__DialogOverlay",componentId:"ui__sc-19crdz4-1"})(["position:fixed;top:0;right:0;bottom:0;left:0;"," ",""],(o=>o.blur&&"\n backdrop-filter: blur(10px);\n "),(o=>`\n background-color: ${o.palette.backgroundColor??o.theme.colors['bg-other-overlay']};\n`));exports.DialogOverlay=DialogOverlay,exports.PositionedDialogComponent=PositionedDialogComponent;
|
|
2
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/Dialog/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { DialogComponent } from 'components/DialogComponent'\nimport { responsivePosition } from 'mixins/responsive-position'\nimport type { DialogOverlayPalette, StyledDialogOverlayProps, StyledTranslationDialogComponentProps } from './types'\n\nconst overlayTemplate = (palette: DialogOverlayPalette) => `\n background-color: ${palette.backgroundColor};\n`\n\nexport const PositionedDialogComponent = styled(DialogComponent).withConfig<StyledTranslationDialogComponentProps>({\n shouldForwardProp: (propKey) =>\n ![\n 'position',\n 'positions',\n 'positionXXS',\n 'positionXS',\n 'positionS',\n 'positionM',\n 'positionL',\n 'positionXL',\n ].includes(propKey),\n})`\n position: fixed;\n\n &:focus-visible {\n outline: none;\n }\n\n ${responsivePosition}\n`\n\nexport const DialogOverlay = styled.div.withConfig<StyledDialogOverlayProps>({\n shouldForwardProp: (propKey) => !['palette', 'blur'].includes(propKey),\n})`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n ${(props) =>\n props.blur &&\n `\n backdrop-filter: blur(10px);\n `}\n\n ${(props) =>\n overlayTemplate({\n backgroundColor: props.palette.backgroundColor ?? props.theme.colors['bg-other-overlay'],\n })}\n`\n"],"names":["PositionedDialogComponent","styled","default","DialogComponent","withConfig","shouldForwardProp","propKey","includes","displayName","componentId","responsivePosition","DialogOverlay","div","props","blur","palette","backgroundColor","theme","colors"],"mappings":"6SASO,MAAMA,0BAA4BC,gBAAMC,QAACC,iCAAiBC,WAAkD,CACjHC,kBAAoBC,IACjB,CACC,WACA,YACA,cACA,aACA,YACA,YACA,YACA,cACAC,SAASD,KACbF,WAAA,CAAAI,YAAA,oCAAAC,YAAA,oBAZuCR,CAYvC,CAAA,gDAAA,IAOES,mBAAAA,oBAGG,MAAMC,cAAgBV,gBAAAA,QAAOW,IAAIR,WAAqC,CAC3EC,kBAAoBC,IAAa,CAAC,UAAW,QAAQC,SAASD,KAC9DF,WAAA,CAAAI,YAAA,wBAAAC,YAAA,oBAF2BR,CAE3B,CAAA,gDAAA,IAAA,KAOGY,GACDA,EAAMC,MACN,+CAICD,GAzCsD,yBA2CpCA,EAAME,QAAQC,iBAAmBH,EAAMI,MAAMC,OAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import styled from'styled-components';import{responsivePosition}from'../../mixins/responsive-position.mjs';import{DialogComponent}from'../DialogComponent/DialogComponent.mjs';const PositionedDialogComponent=styled(DialogComponent).withConfig({shouldForwardProp:o=>!['position','positions','positionXXS','positionXS','positionS','positionM','positionL','positionXL'].includes(o)}).withConfig({displayName:"Dialog__PositionedDialogComponent",componentId:"ui__sc-19crdz4-0"})(["position:fixed;&:focus-visible{outline:none;}",""],responsivePosition);const DialogOverlay=styled.div.withConfig({shouldForwardProp:o=>!['palette','blur'].includes(o)}).withConfig({displayName:"Dialog__DialogOverlay",componentId:"ui__sc-19crdz4-1"})(["position:fixed;top:0;right:0;bottom:0;left:0;"," ",""],(o=>o.blur&&"\n backdrop-filter: blur(10px);\n "),(o=>`\n background-color: ${o.palette.backgroundColor??o.theme.colors['bg-other-overlay']};\n`));export{DialogOverlay,PositionedDialogComponent};
|
|
2
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/Dialog/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { DialogComponent } from 'components/DialogComponent'\nimport { responsivePosition } from 'mixins/responsive-position'\nimport type { DialogOverlayPalette, StyledDialogOverlayProps, StyledTranslationDialogComponentProps } from './types'\n\nconst overlayTemplate = (palette: DialogOverlayPalette) => `\n background-color: ${palette.backgroundColor};\n`\n\nexport const PositionedDialogComponent = styled(DialogComponent).withConfig<StyledTranslationDialogComponentProps>({\n shouldForwardProp: (propKey) =>\n ![\n 'position',\n 'positions',\n 'positionXXS',\n 'positionXS',\n 'positionS',\n 'positionM',\n 'positionL',\n 'positionXL',\n ].includes(propKey),\n})`\n position: fixed;\n\n &:focus-visible {\n outline: none;\n }\n\n ${responsivePosition}\n`\n\nexport const DialogOverlay = styled.div.withConfig<StyledDialogOverlayProps>({\n shouldForwardProp: (propKey) => !['palette', 'blur'].includes(propKey),\n})`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n ${(props) =>\n props.blur &&\n `\n backdrop-filter: blur(10px);\n `}\n\n ${(props) =>\n overlayTemplate({\n backgroundColor: props.palette.backgroundColor ?? props.theme.colors['bg-other-overlay'],\n })}\n`\n"],"names":["PositionedDialogComponent","styled","DialogComponent","withConfig","shouldForwardProp","propKey","includes","displayName","componentId","responsivePosition","DialogOverlay","div","props","blur","palette","backgroundColor","theme","colors"],"mappings":"+KASO,MAAMA,0BAA4BC,OAAOC,iBAAiBC,WAAkD,CACjHC,kBAAoBC,IACjB,CACC,WACA,YACA,cACA,aACA,YACA,YACA,YACA,cACAC,SAASD,KACbF,WAAA,CAAAI,YAAA,oCAAAC,YAAA,oBAZuCP,CAYvC,CAAA,gDAAA,IAOEQ,oBAGG,MAAMC,cAAgBT,OAAOU,IAAIR,WAAqC,CAC3EC,kBAAoBC,IAAa,CAAC,UAAW,QAAQC,SAASD,KAC9DF,WAAA,CAAAI,YAAA,wBAAAC,YAAA,oBAF2BP,CAE3B,CAAA,gDAAA,IAAA,KAOGW,GACDA,EAAMC,MACN,+CAICD,GAzCsD,yBA2CpCA,EAAME,QAAQC,iBAAmBH,EAAMI,MAAMC,OAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var constants$1=require('../../shared/constants.js');var DialogContainer=require('./DialogContainer.js');var dragging=require('./images/dragging.svg.js');var style=require('./style.js');var utils=require('./utils.js');var constants=require('./constants.js');var require$$0=require('react/jsx-runtime');var Visibility=require('../Visibility/Visibility.js');var Icon=require('../Icon/Icon.js');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');var Button=require('../Button/Button.js');const resizeHandlerSymbol=Symbol('resize-handler');const resizeObserver=ResizeObserver?new ResizeObserver((e=>{e.forEach((e=>{typeof e.target[resizeHandlerSymbol]=='function'&&e.target[resizeHandlerSymbol](e.target)}))})):null;const DialogComponent=withMergedProps.withMergedProps(React.forwardRef(((e,r)=>{const{size:i="s",iconButtonProps:t={},captionProps:s={},titleProps:n={},subtitleProps:o={},draggingIconProps:a={},imgSrc:l={},skeletonProps:c={},children:d,caption:u,title:$,subtitle:g,controls:x,imgLandscapePositionRight:y,draggable:S,loading:q,sizeXXS:p,sizeXS:h,sizeS:j,sizeM:b,sizeL:I,sizeXL:m,onGrab:z,onNudge:T,...v}=e;const k={size:i,sizeXXS:p,sizeXS:h,sizeS:j,sizeM:b,sizeL:I,sizeXL:m};const B=utils.getCommonSizeProps(k);const[w,D]=React.useState(null);const[P,E]=React.useState(null);const R=React.useRef(null);const L=React.useCallback((e=>{e.scrollHeight===e.clientHeight?(D(null),E(null)):(D(e.scrollTop<=0),E(Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<=1))}),[]);return React.useLayoutEffect((()=>(resizeObserver&&R.current&&(R.current[resizeHandlerSymbol]=L,resizeObserver.observe(R.current,{box:'border-box'})),()=>{resizeObserver&&R.current&&resizeObserver.unobserve(R.current)})),[L]),require$$0.jsxs(style.Root,{...v,...k,ref:r,children:[(S||l.portrait)&&require$$0.jsxs(Visibility.Visibility,{...k,sizes:constants.VISIBILITY_PORTRAIT,children:[S&&require$$0.jsx(style.DraggingHandle,{onPointerDown:z,children:require$$0.jsx(style.DraggingIconContainer,{tabIndex:0,onKeyDown:T,children:require$$0.jsx(Icon.Icon,{icon:require$$0.jsx(dragging.default,{}),size:34,color:"content-onmain-tertiary",...a})})}),l.portrait&&require$$0.jsxs(style.MediaPortrait,{children:[require$$0.jsx(style.Placeholder,{orientation:"portrait",aspectRatio:"3:1"}),q?require$$0.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):require$$0.jsx(style.Media,{src:l.portrait})]})]}),l.landscape&&!y&&require$$0.jsx(Visibility.Visibility,{...k,sizes:constants.VISIBILITY_LANDSCAPE_MEDIA,children:require$$0.jsxs(style.MediaLandscape,{children:[require$$0.jsx(style.Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),q?require$$0.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):require$$0.jsx(style.Media,{src:l.landscape})]})}),t.onClick&&require$$0.jsx(style.PositionedIconButton,{size:"l",icon:"close",...t}),require$$0.jsxs(DialogContainer.DialogContainer,{...k,children:[S&&require$$0.jsx(Visibility.Visibility,{...k,sizes:constants.VISIBILITY_LANDSCAPE,children:require$$0.jsx(style.DraggingHandle,{onPointerDown:z,children:require$$0.jsx(style.DraggingIconContainer,{tabIndex:0,onKeyDown:T,children:require$$0.jsx(Icon.Icon,{icon:require$$0.jsx(dragging.default,{}),size:34,color:"content-onmain-tertiary",...a})})})}),require$$0.jsx(style.Fading,{visible:w===!1}),require$$0.jsx(style.ScrollableContent,{ref:R,tabIndex:0,onScroll:e=>{resizeObserver&&L(e.currentTarget)},onKeyDown:e=>{constants$1.keyboardKeys.ArrowUp.validate(e.key)?(e.preventDefault(),e.currentTarget.scrollBy(0,-13)):constants$1.keyboardKeys.ArrowDown.validate(e.key)&&(e.preventDefault(),e.currentTarget.scrollBy(0,13))},children:require$$0.jsxs(require$$0.Fragment,q?{children:[require$$0.jsx(Skeleton.Skeleton,{children:require$$0.jsx(Text.Text,{appearance:"heading",marginBottom:"1.5em",sizes:constants.SIZES_TITLE,...B,...n})}),require$$0.jsx(Skeleton.Skeleton,{width:"90%",children:require$$0.jsx(Text.Text,{appearance:"body",marginBottom:"0.4em",sizes:constants.SIZES_SUBTITLE,...B,...o})}),require$$0.jsx(Skeleton.Skeleton,{width:"70%",children:require$$0.jsx(Text.Text,{appearance:"body",marginBottom:"0.4em",sizes:constants.SIZES_SUBTITLE,...B,...o})}),require$$0.jsx(Skeleton.Skeleton,{width:"50%",children:require$$0.jsx(Text.Text,{appearance:"body",marginBottom:"0.8em",sizes:constants.SIZES_SUBTITLE,...B,...o})})]}:{children:[u&&require$$0.jsx(Text.Text,{appearance:"body",color:"content-onmain-tertiary",wordBreak:"break-word",marginBottom:"0.8em",sizes:constants.SIZES_CAPTION,...B,...s,children:u}),$&&require$$0.jsx(Text.Text,{as:"h2",appearance:"heading",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.5em",sizes:constants.SIZES_TITLE,...B,...n,children:$}),g&&require$$0.jsx(Text.Text,{as:"p",appearance:"body",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.8em",sizes:constants.SIZES_SUBTITLE,...B,...o,children:g}),d]})}),require$$0.jsx(style.Fading,{visible:P===!1,after:!0}),x&&require$$0.jsx(style.Controls,{children:q?require$$0.jsx(Skeleton.Skeleton,{borderRadius:48,...c,children:require$$0.jsx(Button.Button,{preset:"brand",...B})}):x(B)})]}),l.landscape&&y&&require$$0.jsx(Visibility.Visibility,{...k,sizes:constants.VISIBILITY_LANDSCAPE_MEDIA,children:require$$0.jsxs(style.MediaLandscape,{children:[require$$0.jsx(style.Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),q?require$$0.jsx(style.MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):require$$0.jsx(style.Media,{src:l.landscape})]})})]})})),{sizes:constants.SIZES,displayName:'DialogComponent'});exports.SIZES=constants.SIZES,exports.DialogComponent=DialogComponent;
|
|
2
|
+
//# sourceMappingURL=DialogComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogComponent.js","sources":["../../../../src/components/DialogComponent/DialogComponent.tsx"],"sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState, useCallback } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { keyboardKeys } from 'shared/constants'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Visibility } from 'components/Visibility'\nimport { Skeleton } from 'components/Skeleton'\nimport { Button } from 'components/Button'\nimport type { Nullable } from 'shared/types'\nimport { DialogContainer } from './DialogContainer'\nimport Dragging from './images/dragging.svg?module'\nimport * as Styled from './style'\nimport { getCommonSizeProps } from './utils'\nimport {\n SIZES,\n SIZES_CAPTION,\n SIZES_TITLE,\n SIZES_SUBTITLE,\n VISIBILITY_PORTRAIT,\n VISIBILITY_LANDSCAPE,\n VISIBILITY_LANDSCAPE_MEDIA,\n} from './constants'\nimport type { DialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'DialogComponent'\n\nconst resizeHandlerSymbol = Symbol('resize-handler')\n\nconst resizeObserver: Nullable<ResizeObserver> = ResizeObserver\n ? new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n if (typeof entry.target[resizeHandlerSymbol] === 'function') {\n entry.target[resizeHandlerSymbol](entry.target)\n }\n })\n })\n : null\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n */\nconst DialogComponent: React.ForwardRefExoticComponent<DialogComponentProps> = withMergedProps<\n DialogComponentProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n iconButtonProps = {},\n captionProps = {},\n titleProps = {},\n subtitleProps = {},\n draggingIconProps = {},\n imgSrc = {},\n skeletonProps = {},\n children,\n caption,\n title,\n subtitle,\n controls,\n imgLandscapePositionRight,\n draggable,\n loading,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n onGrab,\n onNudge,\n ...restProps\n } = props\n\n const dialogSizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const sizeProps = getCommonSizeProps(dialogSizeProps)\n\n const [scrollTop, setScrollTop] = useState<Nullable<boolean>>(null)\n const [scrollBottom, setScrollBottom] = useState<Nullable<boolean>>(null)\n\n const scrollable = useRef<HTMLDivElement | null>(null)\n\n const handleScrollThresholds = useCallback((e: HTMLDivElement) => {\n if (e.scrollHeight === e.clientHeight) {\n setScrollTop(null)\n setScrollBottom(null)\n } else {\n setScrollTop(e.scrollTop <= 0)\n setScrollBottom(Math.abs(e.scrollHeight - e.clientHeight - e.scrollTop) <= 1)\n }\n }, [])\n\n useLayoutEffect(() => {\n if (resizeObserver && scrollable.current) {\n scrollable.current[resizeHandlerSymbol] = handleScrollThresholds\n resizeObserver.observe(scrollable.current, { box: 'border-box' })\n }\n\n return () => {\n if (resizeObserver && scrollable.current) {\n resizeObserver.unobserve(scrollable.current)\n }\n }\n }, [handleScrollThresholds])\n\n return (\n <Styled.Root {...restProps} {...dialogSizeProps} ref={ref}>\n {(draggable || imgSrc.portrait) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n {imgSrc.portrait && (\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio='3:1' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n )}\n </Visibility>\n )}\n {imgSrc.landscape && !imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {iconButtonProps.onClick && <Styled.PositionedIconButton size='l' icon='close' {...iconButtonProps} />}\n <DialogContainer {...dialogSizeProps}>\n {draggable && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE}>\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n </Visibility>\n )}\n <Styled.Fading visible={scrollTop === false} />\n <Styled.ScrollableContent\n ref={scrollable}\n tabIndex={0}\n onScroll={(evt) => {\n if (!resizeObserver) return\n handleScrollThresholds(evt.currentTarget)\n }}\n onKeyDown={(evt) => {\n if (keyboardKeys.ArrowUp.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, -13)\n } else if (keyboardKeys.ArrowDown.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, 13)\n }\n }}\n >\n {loading ? (\n <>\n <Skeleton>\n <Text appearance='heading' marginBottom='1.5em' sizes={SIZES_TITLE} {...sizeProps} {...titleProps} />\n </Skeleton>\n <Skeleton width='90%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='70%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='50%'>\n <Text\n appearance='body'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n </>\n ) : (\n <>\n {caption && (\n <Text\n appearance='body'\n color='content-onmain-tertiary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_CAPTION}\n {...sizeProps}\n {...captionProps}\n >\n {caption}\n </Text>\n )}\n {title && (\n <Text\n as='h2'\n appearance='heading'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.5em'\n sizes={SIZES_TITLE}\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {subtitle && (\n <Text\n as='p'\n appearance='body'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n >\n {subtitle}\n </Text>\n )}\n {children}\n </>\n )}\n </Styled.ScrollableContent>\n <Styled.Fading visible={scrollBottom === false} after />\n {controls && (\n <Styled.Controls>\n {loading ? (\n <Skeleton borderRadius={48} {...skeletonProps}>\n <Button preset='brand' {...sizeProps} />\n </Skeleton>\n ) : (\n controls(sizeProps)\n )}\n </Styled.Controls>\n )}\n </DialogContainer>\n {imgSrc.landscape && imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogComponent }\n\nexport { SIZES }\n"],"names":["resizeHandlerSymbol","Symbol","resizeObserver","ResizeObserver","entries","forEach","entry","target","DialogComponent","withMergedProps","forwardRef","props","ref","size","iconButtonProps","captionProps","titleProps","subtitleProps","draggingIconProps","imgSrc","skeletonProps","children","caption","title","subtitle","controls","imgLandscapePositionRight","draggable","loading","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","onGrab","onNudge","restProps","dialogSizeProps","sizeProps","getCommonSizeProps","scrollTop","setScrollTop","useState","scrollBottom","setScrollBottom","scrollable","useRef","handleScrollThresholds","useCallback","e","scrollHeight","clientHeight","Math","abs","useLayoutEffect","current","observe","box","unobserve","_jsxs","Styled","portrait","jsxs","Visibility","sizes","VISIBILITY_PORTRAIT","_jsx","jsx","onPointerDown","tabIndex","onKeyDown","Icon","icon","Dragging","default","color","orientation","aspectRatio","width","height","borderRadius","src","landscape","VISIBILITY_LANDSCAPE_MEDIA","onClick","DialogContainer","VISIBILITY_LANDSCAPE","visible","onScroll","evt","currentTarget","keyboardKeys","ArrowUp","validate","key","preventDefault","scrollBy","ArrowDown","_Fragment","Skeleton","Text","appearance","marginBottom","SIZES_TITLE","SIZES_SUBTITLE","wordBreak","SIZES_CAPTION","as","after","Button","preset","SIZES","displayName"],"mappings":"2mBA0BA,MAAMA,oBAAsBC,OAAO,kBAEnC,MAAMC,eAA2CC,eAC7C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';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{keyboardKeys}from'../../shared/constants.mjs';import{DialogContainer}from'./DialogContainer.mjs';import SvgDragging from'./images/dragging.svg.mjs';import{Root,DraggingHandle,DraggingIconContainer,MediaPortrait,Placeholder,MediaSkeleton,Media,MediaLandscape,PositionedIconButton,Fading,ScrollableContent,Controls}from'./style.mjs';import{getCommonSizeProps}from'./utils.mjs';import{SIZES,VISIBILITY_PORTRAIT,VISIBILITY_LANDSCAPE_MEDIA,VISIBILITY_LANDSCAPE,SIZES_TITLE,SIZES_SUBTITLE,SIZES_CAPTION}from'./constants.mjs';import{jsxs,jsx,Fragment}from'react/jsx-runtime';import{Visibility}from'../Visibility/Visibility.mjs';import{Icon}from'../Icon/Icon.mjs';import{Skeleton}from'../Skeleton/Skeleton.mjs';import{Text}from'../Text/Text.mjs';import{Button}from'../Button/Button.mjs';const resizeHandlerSymbol=Symbol('resize-handler');const resizeObserver=ResizeObserver?new ResizeObserver((e=>{e.forEach((e=>{typeof e.target[resizeHandlerSymbol]=='function'&&e.target[resizeHandlerSymbol](e.target)}))})):null;const DialogComponent=withMergedProps(forwardRef(((e,r)=>{const{size:o="s",iconButtonProps:i={},captionProps:t={},titleProps:n={},subtitleProps:s={},draggingIconProps:a={},imgSrc:l={},skeletonProps:c={},children:d,caption:m,title:g,subtitle:S,controls:p,imgLandscapePositionRight:I,draggable:x,loading:j,sizeXXS:h,sizeXS:b,sizeS:u,sizeM:z,sizeL:T,sizeXL:y,onGrab:f,onNudge:E,...B}=e;const D={size:o,sizeXXS:h,sizeXS:b,sizeS:u,sizeM:z,sizeL:T,sizeXL:y};const P=getCommonSizeProps(D);const[L,k]=useState(null);const[w,C]=useState(null);const M=useRef(null);const v=useCallback((e=>{e.scrollHeight===e.clientHeight?(k(null),C(null)):(k(e.scrollTop<=0),C(Math.abs(e.scrollHeight-e.clientHeight-e.scrollTop)<=1))}),[]);return useLayoutEffect((()=>(resizeObserver&&M.current&&(M.current[resizeHandlerSymbol]=v,resizeObserver.observe(M.current,{box:'border-box'})),()=>{resizeObserver&&M.current&&resizeObserver.unobserve(M.current)})),[v]),jsxs(Root,{...B,...D,ref:r,children:[(x||l.portrait)&&jsxs(Visibility,{...D,sizes:VISIBILITY_PORTRAIT,children:[x&&jsx(DraggingHandle,{onPointerDown:f,children:jsx(DraggingIconContainer,{tabIndex:0,onKeyDown:E,children:jsx(Icon,{icon:jsx(SvgDragging,{}),size:34,color:"content-onmain-tertiary",...a})})}),l.portrait&&jsxs(MediaPortrait,{children:[jsx(Placeholder,{orientation:"portrait",aspectRatio:"3:1"}),j?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.portrait})]})]}),l.landscape&&!I&&jsx(Visibility,{...D,sizes:VISIBILITY_LANDSCAPE_MEDIA,children:jsxs(MediaLandscape,{children:[jsx(Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),j?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.landscape})]})}),i.onClick&&jsx(PositionedIconButton,{size:"l",icon:"close",...i}),jsxs(DialogContainer,{...D,children:[x&&jsx(Visibility,{...D,sizes:VISIBILITY_LANDSCAPE,children:jsx(DraggingHandle,{onPointerDown:f,children:jsx(DraggingIconContainer,{tabIndex:0,onKeyDown:E,children:jsx(Icon,{icon:jsx(SvgDragging,{}),size:34,color:"content-onmain-tertiary",...a})})})}),jsx(Fading,{visible:L===!1}),jsx(ScrollableContent,{ref:M,tabIndex:0,onScroll:e=>{resizeObserver&&v(e.currentTarget)},onKeyDown:e=>{keyboardKeys.ArrowUp.validate(e.key)?(e.preventDefault(),e.currentTarget.scrollBy(0,-13)):keyboardKeys.ArrowDown.validate(e.key)&&(e.preventDefault(),e.currentTarget.scrollBy(0,13))},children:jsxs(Fragment,j?{children:[jsx(Skeleton,{children:jsx(Text,{appearance:"heading",marginBottom:"1.5em",sizes:SIZES_TITLE,...P,...n})}),jsx(Skeleton,{width:"90%",children:jsx(Text,{appearance:"body",marginBottom:"0.4em",sizes:SIZES_SUBTITLE,...P,...s})}),jsx(Skeleton,{width:"70%",children:jsx(Text,{appearance:"body",marginBottom:"0.4em",sizes:SIZES_SUBTITLE,...P,...s})}),jsx(Skeleton,{width:"50%",children:jsx(Text,{appearance:"body",marginBottom:"0.8em",sizes:SIZES_SUBTITLE,...P,...s})})]}:{children:[m&&jsx(Text,{appearance:"body",color:"content-onmain-tertiary",wordBreak:"break-word",marginBottom:"0.8em",sizes:SIZES_CAPTION,...P,...t,children:m}),g&&jsx(Text,{as:"h2",appearance:"heading",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.5em",sizes:SIZES_TITLE,...P,...n,children:g}),S&&jsx(Text,{as:"p",appearance:"body",color:"content-onmain-primary",wordBreak:"break-word",marginBottom:"0.8em",sizes:SIZES_SUBTITLE,...P,...s,children:S}),d]})}),jsx(Fading,{visible:w===!1,after:!0}),p&&jsx(Controls,{children:j?jsx(Skeleton,{borderRadius:48,...c,children:jsx(Button,{preset:"brand",...P})}):p(P)})]}),l.landscape&&I&&jsx(Visibility,{...D,sizes:VISIBILITY_LANDSCAPE_MEDIA,children:jsxs(MediaLandscape,{children:[jsx(Placeholder,{orientation:"landscape",aspectRatio:"5:7"}),j?jsx(MediaSkeleton,{width:"100%",height:"100%",borderRadius:0,...c}):jsx(Media,{src:l.landscape})]})})]})})),{sizes:SIZES,displayName:'DialogComponent'});export{DialogComponent,SIZES};
|
|
2
|
+
//# sourceMappingURL=DialogComponent.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogComponent.mjs","sources":["../../../../src/components/DialogComponent/DialogComponent.tsx"],"sourcesContent":["import { forwardRef, useLayoutEffect, useRef, useState, useCallback } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { keyboardKeys } from 'shared/constants'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Visibility } from 'components/Visibility'\nimport { Skeleton } from 'components/Skeleton'\nimport { Button } from 'components/Button'\nimport type { Nullable } from 'shared/types'\nimport { DialogContainer } from './DialogContainer'\nimport Dragging from './images/dragging.svg?module'\nimport * as Styled from './style'\nimport { getCommonSizeProps } from './utils'\nimport {\n SIZES,\n SIZES_CAPTION,\n SIZES_TITLE,\n SIZES_SUBTITLE,\n VISIBILITY_PORTRAIT,\n VISIBILITY_LANDSCAPE,\n VISIBILITY_LANDSCAPE_MEDIA,\n} from './constants'\nimport type { DialogComponentProps } from './types'\n\nconst COMPONENT_NAME = 'DialogComponent'\n\nconst resizeHandlerSymbol = Symbol('resize-handler')\n\nconst resizeObserver: Nullable<ResizeObserver> = ResizeObserver\n ? new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n if (typeof entry.target[resizeHandlerSymbol] === 'function') {\n entry.target[resizeHandlerSymbol](entry.target)\n }\n })\n })\n : null\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<div\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/DialogComponent/types.ts).\n */\nconst DialogComponent: React.ForwardRefExoticComponent<DialogComponentProps> = withMergedProps<\n DialogComponentProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n iconButtonProps = {},\n captionProps = {},\n titleProps = {},\n subtitleProps = {},\n draggingIconProps = {},\n imgSrc = {},\n skeletonProps = {},\n children,\n caption,\n title,\n subtitle,\n controls,\n imgLandscapePositionRight,\n draggable,\n loading,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n onGrab,\n onNudge,\n ...restProps\n } = props\n\n const dialogSizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const sizeProps = getCommonSizeProps(dialogSizeProps)\n\n const [scrollTop, setScrollTop] = useState<Nullable<boolean>>(null)\n const [scrollBottom, setScrollBottom] = useState<Nullable<boolean>>(null)\n\n const scrollable = useRef<HTMLDivElement | null>(null)\n\n const handleScrollThresholds = useCallback((e: HTMLDivElement) => {\n if (e.scrollHeight === e.clientHeight) {\n setScrollTop(null)\n setScrollBottom(null)\n } else {\n setScrollTop(e.scrollTop <= 0)\n setScrollBottom(Math.abs(e.scrollHeight - e.clientHeight - e.scrollTop) <= 1)\n }\n }, [])\n\n useLayoutEffect(() => {\n if (resizeObserver && scrollable.current) {\n scrollable.current[resizeHandlerSymbol] = handleScrollThresholds\n resizeObserver.observe(scrollable.current, { box: 'border-box' })\n }\n\n return () => {\n if (resizeObserver && scrollable.current) {\n resizeObserver.unobserve(scrollable.current)\n }\n }\n }, [handleScrollThresholds])\n\n return (\n <Styled.Root {...restProps} {...dialogSizeProps} ref={ref}>\n {(draggable || imgSrc.portrait) && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_PORTRAIT}>\n {draggable && (\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n )}\n {imgSrc.portrait && (\n <Styled.MediaPortrait>\n <Styled.Placeholder orientation='portrait' aspectRatio='3:1' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.portrait} />\n )}\n </Styled.MediaPortrait>\n )}\n </Visibility>\n )}\n {imgSrc.landscape && !imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n {iconButtonProps.onClick && <Styled.PositionedIconButton size='l' icon='close' {...iconButtonProps} />}\n <DialogContainer {...dialogSizeProps}>\n {draggable && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE}>\n <Styled.DraggingHandle onPointerDown={onGrab}>\n <Styled.DraggingIconContainer tabIndex={0} onKeyDown={onNudge}>\n <Icon icon={<Dragging />} size={34} color='content-onmain-tertiary' {...draggingIconProps} />\n </Styled.DraggingIconContainer>\n </Styled.DraggingHandle>\n </Visibility>\n )}\n <Styled.Fading visible={scrollTop === false} />\n <Styled.ScrollableContent\n ref={scrollable}\n tabIndex={0}\n onScroll={(evt) => {\n if (!resizeObserver) return\n handleScrollThresholds(evt.currentTarget)\n }}\n onKeyDown={(evt) => {\n if (keyboardKeys.ArrowUp.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, -13)\n } else if (keyboardKeys.ArrowDown.validate(evt.key)) {\n evt.preventDefault()\n evt.currentTarget.scrollBy(0, 13)\n }\n }}\n >\n {loading ? (\n <>\n <Skeleton>\n <Text appearance='heading' marginBottom='1.5em' sizes={SIZES_TITLE} {...sizeProps} {...titleProps} />\n </Skeleton>\n <Skeleton width='90%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='70%'>\n <Text\n appearance='body'\n marginBottom='0.4em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n <Skeleton width='50%'>\n <Text\n appearance='body'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n />\n </Skeleton>\n </>\n ) : (\n <>\n {caption && (\n <Text\n appearance='body'\n color='content-onmain-tertiary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_CAPTION}\n {...sizeProps}\n {...captionProps}\n >\n {caption}\n </Text>\n )}\n {title && (\n <Text\n as='h2'\n appearance='heading'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.5em'\n sizes={SIZES_TITLE}\n {...sizeProps}\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {subtitle && (\n <Text\n as='p'\n appearance='body'\n color='content-onmain-primary'\n wordBreak='break-word'\n marginBottom='0.8em'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...subtitleProps}\n >\n {subtitle}\n </Text>\n )}\n {children}\n </>\n )}\n </Styled.ScrollableContent>\n <Styled.Fading visible={scrollBottom === false} after />\n {controls && (\n <Styled.Controls>\n {loading ? (\n <Skeleton borderRadius={48} {...skeletonProps}>\n <Button preset='brand' {...sizeProps} />\n </Skeleton>\n ) : (\n controls(sizeProps)\n )}\n </Styled.Controls>\n )}\n </DialogContainer>\n {imgSrc.landscape && imgLandscapePositionRight && (\n <Visibility {...dialogSizeProps} sizes={VISIBILITY_LANDSCAPE_MEDIA}>\n <Styled.MediaLandscape>\n <Styled.Placeholder orientation='landscape' aspectRatio='5:7' />\n {loading ? (\n <Styled.MediaSkeleton width='100%' height='100%' borderRadius={0} {...skeletonProps} />\n ) : (\n <Styled.Media src={imgSrc.landscape} />\n )}\n </Styled.MediaLandscape>\n </Visibility>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogComponent }\n\nexport { SIZES }\n"],"names":["resizeHandlerSymbol","Symbol","resizeObserver","ResizeObserver","entries","forEach","entry","target","DialogComponent","withMergedProps","forwardRef","props","ref","size","iconButtonProps","captionProps","titleProps","subtitleProps","draggingIconProps","imgSrc","skeletonProps","children","caption","title","subtitle","controls","imgLandscapePositionRight","draggable","loading","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","onGrab","onNudge","restProps","dialogSizeProps","sizeProps","getCommonSizeProps","scrollTop","setScrollTop","useState","scrollBottom","setScrollBottom","scrollable","useRef","handleScrollThresholds","useCallback","e","scrollHeight","clientHeight","Math","abs","useLayoutEffect","current","observe","box","unobserve","_jsxs","Styled","portrait","Visibility","sizes","VISIBILITY_PORTRAIT","_jsx","onPointerDown","tabIndex","onKeyDown","Icon","icon","Dragging","color","orientation","aspectRatio","width","height","borderRadius","src","landscape","VISIBILITY_LANDSCAPE_MEDIA","onClick","DialogContainer","VISIBILITY_LANDSCAPE","visible","onScroll","evt","currentTarget","keyboardKeys","ArrowUp","validate","key","preventDefault","scrollBy","ArrowDown","_Fragment","Skeleton","Text","appearance","marginBottom","SIZES_TITLE","SIZES_SUBTITLE","wordBreak","SIZES_CAPTION","as","after","Button","preset","SIZES","displayName"],"mappings":"w5BA0BA,MAAMA,oBAAsBC,OAAO,kBAEnC,MAAMC,eAA2CC,eAC7C,IAAIA,gBAAgBC,IAClBA,EAAQC,SAASC,WACJA,EAAMC,OAAOP,sBAAyB,YAC/CM,EAAMC,OAAOP,qBAAqBM,EAAMC,OAC1C,GACA,IAEJ,KAYEC,MAAAA,gBAAyEC,gBAI7EC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KACJA,EAAO,IAAGC,gBACVA,EAAkB,CAAE,EAAAC,aACpBA,EAAe,CAAE,EAAAC,WACjBA,EAAa,CAAE,EAAAC,cACfA,EAAgB,CAAE,EAAAC,kBAClBA,EAAoB,CAAE,EAAAC,OACtBA,EAAS,CAAE,EAAAC,cACXA,EAAgB,CAAE,EAAAC,SAClBA,EAAQC,QACRA,EAAOC,MACPA,EAAKC,SACLA,EAAQC,SACRA,EAAQC,0BACRA,EAAyBC,UACzBA,EAASC,QACTA,EAAOC,QACPA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,OACNA,EAAMC,QACNA,KACGC,GACD1B,EAEJ,MAAM2B,EAAkB,CACtBzB,OACAgB,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMK,EAAYC,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C,MAAOsC,kBACH/D,KACAtB,MAGRiD,IAAC+B,SAAQ,CAACrB,MAAM,MAAKvD,SACnB6C,IAACgC,KAAI,CACHC,WAAW,OACXC,aAAa,QACbpC,MAAOsC,kBACH/D,KACAtB,QAKV,CAAAI,SACGC,CAAAA,GACC4C,IAACgC,KAAI,CACHC,WAAW,OACX1B,MAAM,0BACN8B,UAAU,aACVH,aAAa,QACbpC,MAAOwC,iBACHjE,KACAxB,EAAYM,SAEfC,IAGJC,GACC2C,IAACgC,KAAI,CACHO,GAAG,KACHN,WAAW,UACX1B,MAAM,yBACN8B,UAAU,aACVH,aAAa,QACbpC,MAAOqC,eACH9D,KACAvB,EAAUK,SAEbE,IAGJC,GACC0C,IAACgC,KAAI,CACHO,GAAG,IACHN,WAAW,OACX1B,MAAM,yBACN8B,UAAU,aACVH,aAAa,QACbpC,MAAOsC,kBACH/D,KACAtB,EAAaI,SAEhBG,IAGJH,OAIP6C,IAACL,OAAa,CAACwB,QAASzC,KAAiB,EAAO8D,OAAK,IACpDjF,GACCyC,IAACL,SAAe,CAAAxC,SACbO,EACCsC,IAAC+B,SAAQ,CAACnB,aAAc,MAAQ1D,EAAaC,SAC3C6C,IAACyC,OAAM,CAACC,OAAO,WAAYrE,MAG7Bd,EAASc,QAKhBpB,EAAO6D,WAAatD,GACnBwC,IAACH,WAAU,IAAKzB,EAAiB0B,MAAOiB,2BAA2B5D,SACjEuC,KAACC,eAAqB,CAAAxC,SACpB6C,CAAAA,IAACL,YAAkB,CAACa,YAAY,YAAYC,YAAY,QACvD/C,EACCsC,IAACL,cAAoB,CAACe,MAAM,OAAOC,OAAO,OAAOC,aAAc,KAAO1D,IAEtE8C,IAACL,MAAY,CAACkB,IAAK5D,EAAO6D,mBAKtB,IAGlB,CACEhB,MAAO6C,MACPC,YA/QmB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var withMergedProps=require('../../hocs/withMergedProps.js');var style=require('./style.js');var constants=require('./constants.js');var require$$0=require('react/jsx-runtime');const DialogContainer=withMergedProps.withMergedProps((({size:e="s",...r})=>require$$0.jsx(style.Container,{...r,size:e})),{sizes:constants.SIZES_CONTAINER,displayName:'DialogContainer'});exports.DialogContainer=DialogContainer;
|
|
2
|
+
//# sourceMappingURL=DialogContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContainer.js","sources":["../../../../src/components/DialogComponent/DialogContainer.tsx"],"sourcesContent":["import { withMergedProps } from 'hocs/withMergedProps'\nimport * as Styled from './style'\nimport { SIZES_CONTAINER } from './constants'\nimport type { DialogContainerProps } from './types'\n\nconst COMPONENT_NAME = 'DialogContainer'\n\nconst DialogContainer: React.ForwardRefExoticComponent<DialogContainerProps> = withMergedProps<DialogContainerProps>(\n ({ size = 's', ...restProps }) => <Styled.Container {...restProps} size={size} />,\n {\n sizes: SIZES_CONTAINER,\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { DialogContainer }\n"],"names":["DialogContainer","withMergedProps","size","restProps","_jsx","Styled","sizes","SIZES_CONTAINER","displayName"],"mappings":"8LAOA,MAAMA,gBAAyEC,gBAAeA,iBAC5F,EAAGC,OAAO,OAAQC,KAAgBC,WAAAA,IAACC,MAAAA,UAAgB,IAAKF,EAAWD,KAAMA,KACzE,CACEI,MAAOC,UAAeA,gBACtBC,YANmB"}
|