@alfalab/core-components-custom-picker-button 2.6.25-snapshot-1393ffa → 2.6.26
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/{cssm/src/Component.responsive.d.ts → Component.responsive.d.ts} +7 -5
- package/Component.responsive.js +3 -4
- package/{esm/src → cssm}/Component.responsive.d.ts +7 -5
- package/cssm/Component.responsive.js +5 -6
- package/cssm/desktop/Component.desktop.d.ts +7 -0
- package/cssm/desktop/Component.desktop.js +2 -3
- package/cssm/{src/desktop → desktop}/index.d.ts +2 -1
- package/cssm/desktop/index.js +2 -3
- package/cssm/field/Component.d.ts +14 -0
- package/cssm/field/Component.js +2 -3
- package/cssm/field/index.d.ts +1 -0
- package/cssm/field/index.js +2 -3
- package/cssm/field/index.module.css +23 -3
- package/cssm/index.d.ts +2 -0
- package/cssm/index.js +0 -1
- package/cssm/mobile/Component.mobile.d.ts +7 -0
- package/cssm/mobile/Component.mobile.js +2 -3
- package/{esm/src → cssm}/mobile/index.d.ts +2 -1
- package/cssm/mobile/index.js +2 -3
- package/desktop/Component.desktop.d.ts +7 -0
- package/desktop/Component.desktop.js +2 -3
- package/{esm/src/desktop → desktop}/index.d.ts +2 -1
- package/desktop/index.js +2 -3
- package/{modern/src → esm}/Component.responsive.d.ts +7 -5
- package/esm/Component.responsive.js +0 -1
- package/esm/desktop/Component.desktop.d.ts +7 -0
- package/esm/desktop/Component.desktop.js +0 -1
- package/{modern/src → esm}/desktop/index.d.ts +2 -1
- package/esm/desktop/index.js +0 -1
- package/esm/field/Component.d.ts +14 -0
- package/esm/field/Component.js +3 -2
- package/esm/field/index.css +27 -6
- package/esm/field/index.d.ts +1 -0
- package/esm/field/index.js +0 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +0 -1
- package/esm/mobile/Component.mobile.d.ts +7 -0
- package/esm/mobile/Component.mobile.js +0 -1
- package/{modern/src → esm}/mobile/index.d.ts +2 -1
- package/esm/mobile/index.js +0 -1
- package/field/Component.d.ts +14 -0
- package/field/Component.js +6 -5
- package/field/index.css +27 -6
- package/field/index.d.ts +1 -0
- package/field/index.js +2 -3
- package/index.d.ts +2 -0
- package/index.js +0 -1
- package/mobile/Component.mobile.d.ts +7 -0
- package/mobile/Component.mobile.js +2 -3
- package/{moderncssm/src/mobile → mobile}/index.d.ts +2 -1
- package/mobile/index.js +2 -3
- package/{moderncssm/src → modern}/Component.responsive.d.ts +7 -5
- package/modern/Component.responsive.js +0 -1
- package/modern/desktop/Component.desktop.d.ts +7 -0
- package/modern/desktop/Component.desktop.js +0 -1
- package/{moderncssm/src → modern}/desktop/index.d.ts +2 -1
- package/modern/desktop/index.js +0 -1
- package/modern/field/Component.d.ts +14 -0
- package/modern/field/Component.js +3 -2
- package/modern/field/index.css +27 -6
- package/modern/field/index.d.ts +1 -0
- package/modern/field/index.js +0 -1
- package/modern/index.d.ts +2 -0
- package/modern/index.js +0 -1
- package/modern/mobile/Component.mobile.d.ts +7 -0
- package/modern/mobile/Component.mobile.js +0 -1
- package/{cssm/src → modern}/mobile/index.d.ts +2 -1
- package/modern/mobile/index.js +0 -1
- package/moderncssm/Component.responsive.d.ts +38 -0
- package/moderncssm/Component.responsive.js +0 -1
- package/moderncssm/desktop/Component.desktop.d.ts +7 -0
- package/moderncssm/desktop/Component.desktop.js +0 -1
- package/moderncssm/desktop/index.d.ts +2 -0
- package/moderncssm/desktop/index.js +0 -1
- package/moderncssm/field/Component.d.ts +14 -0
- package/moderncssm/field/Component.js +0 -1
- package/moderncssm/field/index.d.ts +1 -0
- package/moderncssm/field/index.js +0 -1
- package/moderncssm/field/index.module.css +2 -0
- package/moderncssm/index.d.ts +2 -0
- package/moderncssm/index.js +0 -1
- package/moderncssm/mobile/Component.mobile.d.ts +7 -0
- package/moderncssm/mobile/Component.mobile.js +0 -1
- package/moderncssm/mobile/index.d.ts +2 -0
- package/moderncssm/mobile/index.js +0 -1
- package/package.json +9 -8
- package/Component.responsive.js.map +0 -1
- package/cssm/Component.responsive.js.map +0 -1
- package/cssm/desktop/Component.desktop.js.map +0 -1
- package/cssm/desktop/index.js.map +0 -1
- package/cssm/field/Component.js.map +0 -1
- package/cssm/field/index.js.map +0 -1
- package/cssm/index.js.map +0 -1
- package/cssm/mobile/Component.mobile.js.map +0 -1
- package/cssm/mobile/index.js.map +0 -1
- package/cssm/src/desktop/Component.desktop.d.ts +0 -5
- package/cssm/src/field/Component.d.ts +0 -12
- package/cssm/src/field/index.d.ts +0 -1
- package/cssm/src/index.d.ts +0 -1
- package/cssm/src/mobile/Component.mobile.d.ts +0 -5
- package/desktop/Component.desktop.js.map +0 -1
- package/desktop/index.js.map +0 -1
- package/esm/Component.responsive.js.map +0 -1
- package/esm/desktop/Component.desktop.js.map +0 -1
- package/esm/desktop/index.js.map +0 -1
- package/esm/field/Component.js.map +0 -1
- package/esm/field/index.js.map +0 -1
- package/esm/field/index.module.css.js +0 -6
- package/esm/field/index.module.css.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/mobile/Component.mobile.js.map +0 -1
- package/esm/mobile/index.js.map +0 -1
- package/esm/src/desktop/Component.desktop.d.ts +0 -5
- package/esm/src/field/Component.d.ts +0 -12
- package/esm/src/field/index.d.ts +0 -1
- package/esm/src/index.d.ts +0 -1
- package/esm/src/mobile/Component.mobile.d.ts +0 -5
- package/field/Component.js.map +0 -1
- package/field/index.js.map +0 -1
- package/field/index.module.css.js +0 -8
- package/field/index.module.css.js.map +0 -1
- package/index.js.map +0 -1
- package/mobile/Component.mobile.js.map +0 -1
- package/mobile/index.js.map +0 -1
- package/modern/Component.responsive.js.map +0 -1
- package/modern/desktop/Component.desktop.js.map +0 -1
- package/modern/desktop/index.js.map +0 -1
- package/modern/field/Component.js.map +0 -1
- package/modern/field/index.js.map +0 -1
- package/modern/field/index.module.css.js +0 -6
- package/modern/field/index.module.css.js.map +0 -1
- package/modern/index.js.map +0 -1
- package/modern/mobile/Component.mobile.js.map +0 -1
- package/modern/mobile/index.js.map +0 -1
- package/modern/src/desktop/Component.desktop.d.ts +0 -5
- package/modern/src/field/Component.d.ts +0 -12
- package/modern/src/field/index.d.ts +0 -1
- package/modern/src/index.d.ts +0 -1
- package/modern/src/mobile/Component.mobile.d.ts +0 -5
- package/moderncssm/Component.responsive.js.map +0 -1
- package/moderncssm/desktop/Component.desktop.js.map +0 -1
- package/moderncssm/desktop/index.js.map +0 -1
- package/moderncssm/field/Component.js.map +0 -1
- package/moderncssm/field/index.js.map +0 -1
- package/moderncssm/index.js.map +0 -1
- package/moderncssm/mobile/Component.mobile.js.map +0 -1
- package/moderncssm/mobile/index.js.map +0 -1
- package/moderncssm/src/desktop/Component.desktop.d.ts +0 -5
- package/moderncssm/src/field/Component.d.ts +0 -12
- package/moderncssm/src/field/index.d.ts +0 -1
- package/moderncssm/src/index.d.ts +0 -1
- package/moderncssm/src/mobile/Component.mobile.d.ts +0 -5
- package/src/Component.responsive.d.ts +0 -36
- package/src/desktop/Component.desktop.d.ts +0 -5
- package/src/desktop/index.d.ts +0 -1
- package/src/field/Component.d.ts +0 -12
- package/src/field/index.d.ts +0 -1
- package/src/index.d.ts +0 -1
- package/src/mobile/Component.mobile.d.ts +0 -5
- package/src/mobile/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-custom-picker-button",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.26",
|
|
4
4
|
"description": "Custom picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@alfalab/core-components-picker-button": "11.12.
|
|
20
|
-
"@alfalab/core-components-custom-button": "3.12.7
|
|
21
|
-
"@alfalab/core-components-mq": "
|
|
22
|
-
"@alfalab/core-components-select": "17.
|
|
19
|
+
"@alfalab/core-components-picker-button": "^11.12.26",
|
|
20
|
+
"@alfalab/core-components-custom-button": "^3.12.7",
|
|
21
|
+
"@alfalab/core-components-mq": "^4.4.1",
|
|
22
|
+
"@alfalab/core-components-select": "^17.21.0",
|
|
23
23
|
"classnames": "^2.5.1",
|
|
24
|
-
"tslib": "^2.4.0"
|
|
24
|
+
"tslib": "^2.4.0",
|
|
25
|
+
"@alfalab/core-components-shared": "^0.17.0"
|
|
25
26
|
},
|
|
26
|
-
"themesVersion": "
|
|
27
|
-
"varsVersion": "9.20.
|
|
27
|
+
"themesVersion": "13.7.3",
|
|
28
|
+
"varsVersion": "9.20.0"
|
|
28
29
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\nimport type {\n AdditionalMobileProps,\n BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './desktop';\nimport { CustomPickerButtonMobile } from './mobile';\n\nexport type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps &\n AdditionalMobileProps &\n BottomSheetSelectMobileProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n * @deprecated Используйте client\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n };\n\nexport const CustomPickerButtonResponsive = forwardRef<\n HTMLInputElement,\n CustomPickerButtonResponsiveProps\n>(\n (\n {\n OptionsList,\n onScroll,\n footer,\n swipeable,\n bottomSheetProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return isDesktop ? (\n <CustomPickerButtonDesktop\n ref={ref}\n OptionsList={OptionsList}\n onScroll={onScroll}\n {...restProps}\n />\n ) : (\n <CustomPickerButtonMobile\n ref={ref}\n footer={footer}\n swipeable={swipeable}\n bottomSheetProps={bottomSheetProps}\n {...restProps}\n />\n );\n },\n);\n\nCustomPickerButtonResponsive.displayName = 'CustomPickerButtonResponsive';\n"],"names":["forwardRef","__rest","useIsDesktop","React","CustomPickerButtonDesktop","__assign","CustomPickerButtonMobile"],"mappings":";;;;;;;;;;;;;;IAkCa,4BAA4B,GAAGA,gBAAU,CAIlD,UACI,EAUC,EACD,GAAG,EAAA;AAVC,IAAA,IAAA,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,8BAAgF,EAAhF,sBAAsB,mBAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,GAAA,EAAA,EAC7E,SAAS,GAAAC,YAAA,CAAA,EAAA,EAThB,wHAUC,CADe;IAIhB,IAAM,SAAS,GAAGC,6BAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,OAAO,SAAS,IACZC,sBAAC,CAAA,aAAA,CAAAC,2CAAyB,EACtBC,cAAA,CAAA,EAAA,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAAA,EACd,SAAS,CAAA,CACf,KAEFF,qCAACG,yCAAwB,EAAAD,cAAA,CAAA,EACrB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAC9B,EAAA,SAAS,CACf,CAAA,CACL;AACL,CAAC;AAGL,4BAA4B,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\nimport type {\n AdditionalMobileProps,\n BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './desktop';\nimport { CustomPickerButtonMobile } from './mobile';\n\nexport type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps &\n AdditionalMobileProps &\n BottomSheetSelectMobileProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n * @deprecated Используйте client\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n };\n\nexport const CustomPickerButtonResponsive = forwardRef<\n HTMLInputElement,\n CustomPickerButtonResponsiveProps\n>(\n (\n {\n OptionsList,\n onScroll,\n footer,\n swipeable,\n bottomSheetProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return isDesktop ? (\n <CustomPickerButtonDesktop\n ref={ref}\n OptionsList={OptionsList}\n onScroll={onScroll}\n {...restProps}\n />\n ) : (\n <CustomPickerButtonMobile\n ref={ref}\n footer={footer}\n swipeable={swipeable}\n bottomSheetProps={bottomSheetProps}\n {...restProps}\n />\n );\n },\n);\n\nCustomPickerButtonResponsive.displayName = 'CustomPickerButtonResponsive';\n"],"names":["forwardRef","__rest","useIsDesktop","React","CustomPickerButtonDesktop","__assign","CustomPickerButtonMobile"],"mappings":";;;;;;;;;;;;;;IAkCa,4BAA4B,GAAGA,gBAAU,CAIlD,UACI,EAUC,EACD,GAAG,EAAA;AAVC,IAAA,IAAA,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,8BAAgF,EAAhF,sBAAsB,mBAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,GAAA,EAAA,EAC7E,SAAS,GAAAC,YAAA,CAAA,EAAA,EAThB,wHAUC,CADe;IAIhB,IAAM,SAAS,GAAGC,iBAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,OAAO,SAAS,IACZC,sBAAC,CAAA,aAAA,CAAAC,2CAAyB,EACtBC,cAAA,CAAA,EAAA,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAAA,EACd,SAAS,CAAA,CACf,KAEFF,qCAACG,yCAAwB,EAAAD,cAAA,CAAA,EACrB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAC9B,EAAA,SAAS,CACf,CAAA,CACL;AACL,CAAC;AAGL,4BAA4B,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonDesktop,\n PickerButtonDesktopProps,\n} from '@alfalab/core-components-picker-button/desktop';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonDesktop = forwardRef<\n HTMLInputElement,\n CustomPickerButtonDesktopProps\n>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n icon,\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonDesktop\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n breakpoint: 1,\n icon,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["forwardRef","__rest","React","PickerButtonDesktop","DefaultField"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,oBAAoB,GAAG,SAAS;AACtC,IAAM,qBAAqB,GAAG,OAAO;IAKxB,yBAAyB,GAAGA,gBAAU,CAI/C,UACI,EAMC,EACD,GAAG,EAAA;IANC,IAAA,EAAA,GAAA,EAAA,CAAA,eAAsC,EAAtC,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,oBAAoB,GAAA,EAAA,EACtC,EAAoC,GAAA,EAAA,CAAA,YAAA,EAApC,YAAY,GAAA,EAAA,KAAA,MAAA,GAAG,qBAAqB,GAAA,EAAA,EACpC,EAAA,GAAA,EAAA,CAAA,SAAuB,EAAvB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,GAAA,EAAA,EACvB,IAAI,GAAA,EAAA,CAAA,IAAA,EACD,SAAS,GALhBC,YAAA,CAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,MAAA,CAMC,CADe;AAGf,IAAA,QACDC,sBAAC,CAAA,aAAA,CAAAC,2BAAmB,qBACZ,SAAS,EAAA,EACb,UAAU,EAAE;AACR,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,SAAS,EAAA,SAAA;AACT,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,IAAI,EAAA,IAAA;SACP,EACD,KAAK,EAAEC,eAAY,EACnB,GAAG,EAAE,GAAG,EACV,CAAA,CAAA;AACL,CAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, ComponentType, Fragment, SVGProps } from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n PickerButtonSize,\n PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';\n\nimport styles from './index.module.css';\n\ntype FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> &\n CustomButtonProps & {\n buttonSize?: PickerButtonSize;\n buttonVariant?: PickerButtonVariant;\n showArrow?: boolean;\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n };\n\nconst SIZE_TO_CLASSNAME_MAP = {\n xxs: 'size-32',\n xs: 'size-40',\n s: 'size-48',\n m: 'size-56',\n l: 'size-64',\n xl: 'size-72',\n 32: 'size-32',\n 40: 'size-40',\n 48: 'size-48',\n 56: 'size-56',\n 64: 'size-64',\n 72: 'size-72',\n};\n\nexport const Field = ({\n buttonSize = 56,\n buttonVariant = 'default',\n backgroundColor,\n contentColor,\n stateType,\n label,\n open,\n rightAddons,\n innerProps,\n className,\n showArrow = true,\n icon,\n ...restProps\n}: FieldProps) => {\n const Icon: ComponentType<SVGProps<SVGSVGElement>> = getIcon(\n buttonVariant,\n SIZE_TO_CLASSNAME_MAP[buttonSize],\n icon,\n );\n\n const buttonProps = {\n ...restProps,\n ...innerProps,\n } as ButtonHTMLAttributes<HTMLButtonElement>;\n\n return (\n <CustomButton\n {...buttonProps}\n rightAddons={\n <Fragment>\n {rightAddons && (\n <span\n className={cn(styles.addonsContainer, {\n [styles.showControlIcon]: showArrow || buttonVariant === 'compact',\n })}\n >\n {rightAddons}\n </span>\n )}\n\n {(showArrow || buttonVariant === 'compact') && (\n <span\n className={cn(\n styles.iconContainer,\n buttonVariant !== 'compact' && open && styles.open,\n )}\n >\n <Icon data-test-id='custom-picker-button-icon' />\n </span>\n )}\n </Fragment>\n }\n block={true}\n size={buttonSize}\n backgroundColor={backgroundColor}\n contentColor={contentColor}\n stateType={stateType}\n className={className}\n >\n {buttonVariant !== 'compact' && label}\n </CustomButton>\n );\n};\n"],"names":["__rest","getIcon","__assign","React","CustomButton","Fragment","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,IAAM,qBAAqB,GAAG;AAC1B,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;CAChB;AAEM,IAAM,KAAK,GAAG,UAAC,EAcT,EAAA;;IAbT,IAAA,EAAA,GAAA,EAAA,CAAA,UAAe,EAAf,UAAU,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACf,EAAyB,GAAA,EAAA,CAAA,aAAA,EAAzB,aAAa,GAAA,EAAA,KAAA,MAAA,GAAG,SAAS,GAAA,EAAA,EACzB,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,YAAY,kBAAA,EACZ,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,EAAA,GAAA,EAAA,CAAA,SAAgB,EAAhB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EAChB,IAAI,UAAA,EACD,SAAS,GAbMA,YAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,OAAA,EAAA,MAAA,EAAA,aAAA,EAAA,YAAA,EAAA,WAAA,EAAA,WAAA,EAAA,MAAA,CAcrB,CADe;AAEZ,IAAA,IAAM,IAAI,GAA2CC,cAAO,CACxD,aAAa,EACb,qBAAqB,CAAC,UAAU,CAAC,EACjC,IAAI,CACP;AAED,IAAA,IAAM,WAAW,GAAGC,cAAA,CAAAA,cAAA,CAAA,EAAA,EACb,SAAS,CACT,EAAA,UAAU,CAC2B;IAE5C,QACIC,qCAACC,iBAAY,EAAAF,cAAA,CAAA,EAAA,EACL,WAAW,EACf,EAAA,WAAW,EACPC,sBAAA,CAAA,aAAA,CAACE,cAAQ,EAAA,IAAA;YACJ,WAAW,KACRF,sBACI,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAEG,mBAAE,CAACC,uBAAM,CAAC,eAAe,GAAA,EAAA,GAAA,EAAA;oBAChC,EAAC,CAAAA,uBAAM,CAAC,eAAe,CAAA,GAAG,SAAS,IAAI,aAAa,KAAK,SAAS;wBACpE,EAED,EAAA,WAAW,CACT,CACV;YAEA,CAAC,SAAS,IAAI,aAAa,KAAK,SAAS,MACtCJ,sBAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAEG,mBAAE,CACTC,uBAAM,CAAC,aAAa,EACpB,aAAa,KAAK,SAAS,IAAI,IAAI,IAAIA,uBAAM,CAAC,IAAI,CACrD,EAAA;AAED,gBAAAJ,sBAAA,CAAA,aAAA,CAAC,IAAI,EAAc,EAAA,cAAA,EAAA,2BAA2B,EAAG,CAAA,CAC9C,CACV,CACM,EAEf,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,UAAU,EAChB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EAAA,CAAA,EAEnB,aAAa,KAAK,SAAS,IAAI,KAAK,CAC1B;AAEvB;;;;"}
|
package/cssm/field/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/cssm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonMobile,\n PickerButtonMobileProps,\n} from '@alfalab/core-components-picker-button/mobile';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonMobile = forwardRef<HTMLInputElement, CustomPickerButtonMobileProps>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonMobile\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["forwardRef","__rest","React","PickerButtonMobile","DefaultField"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,oBAAoB,GAAG,SAAS;AACtC,IAAM,qBAAqB,GAAG,OAAO;IAKxB,wBAAwB,GAAGA,gBAAU,CAC9C,UACI,EAKC,EACD,GAAG,EAAA;IALC,IAAA,EAAA,GAAA,EAAA,CAAA,eAAsC,EAAtC,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,oBAAoB,KAAA,EACtC,EAAA,GAAA,EAAA,CAAA,YAAoC,EAApC,YAAY,GAAG,EAAA,KAAA,MAAA,GAAA,qBAAqB,KAAA,EACpC,EAAA,GAAA,EAAA,CAAA,SAAuB,EAAvB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,KAAA,EACpB,SAAS,GAJhBC,YAAA,CAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,CAKC,CADe;AAGf,IAAA,QACDC,sBAAC,CAAA,aAAA,CAAAC,yBAAkB,qBACX,SAAS,EAAA,EACb,UAAU,EAAE;AACR,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,SAAS,EAAA,SAAA;SACZ,EACD,KAAK,EAAEC,eAAY,EACnB,GAAG,EAAE,GAAG,EACV,CAAA,CAAA;AACL,CAAA;;;;"}
|
package/cssm/mobile/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
4
|
-
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
5
|
-
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
|
-
buttonSize?: PickerButtonSize;
|
|
7
|
-
buttonVariant?: PickerButtonVariant;
|
|
8
|
-
showArrow?: boolean;
|
|
9
|
-
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, icon, ...restProps }: FieldProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/cssm/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CustomPickerButtonResponsive as CustomPickerButton, CustomPickerButtonResponsiveProps as CustomPickerButtonProps, } from './Component.responsive';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
4
|
-
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonDesktop,\n PickerButtonDesktopProps,\n} from '@alfalab/core-components-picker-button/desktop';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonDesktop = forwardRef<\n HTMLInputElement,\n CustomPickerButtonDesktopProps\n>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n icon,\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonDesktop\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n breakpoint: 1,\n icon,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["forwardRef","__rest","React","PickerButtonDesktop","DefaultField"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,oBAAoB,GAAG,SAAS;AACtC,IAAM,qBAAqB,GAAG,OAAO;IAKxB,yBAAyB,GAAGA,gBAAU,CAI/C,UACI,EAMC,EACD,GAAG,EAAA;IANC,IAAA,EAAA,GAAA,EAAA,CAAA,eAAsC,EAAtC,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,oBAAoB,GAAA,EAAA,EACtC,EAAoC,GAAA,EAAA,CAAA,YAAA,EAApC,YAAY,GAAA,EAAA,KAAA,MAAA,GAAG,qBAAqB,GAAA,EAAA,EACpC,EAAA,GAAA,EAAA,CAAA,SAAuB,EAAvB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,GAAA,EAAA,EACvB,IAAI,GAAA,EAAA,CAAA,IAAA,EACD,SAAS,GALhBC,YAAA,CAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,MAAA,CAMC,CADe;AAGf,IAAA,QACDC,sBAAC,CAAA,aAAA,CAAAC,2BAAmB,qBACZ,SAAS,EAAA,EACb,UAAU,EAAE;AACR,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,SAAS,EAAA,SAAA;AACT,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,IAAI,EAAA,IAAA;SACP,EACD,KAAK,EAAEC,eAAY,EACnB,GAAG,EAAE,GAAG,EACV,CAAA,CAAA;AACL,CAAA;;;;"}
|
package/desktop/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\nimport type {\n AdditionalMobileProps,\n BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './desktop';\nimport { CustomPickerButtonMobile } from './mobile';\n\nexport type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps &\n AdditionalMobileProps &\n BottomSheetSelectMobileProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n * @deprecated Используйте client\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n };\n\nexport const CustomPickerButtonResponsive = forwardRef<\n HTMLInputElement,\n CustomPickerButtonResponsiveProps\n>(\n (\n {\n OptionsList,\n onScroll,\n footer,\n swipeable,\n bottomSheetProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return isDesktop ? (\n <CustomPickerButtonDesktop\n ref={ref}\n OptionsList={OptionsList}\n onScroll={onScroll}\n {...restProps}\n />\n ) : (\n <CustomPickerButtonMobile\n ref={ref}\n footer={footer}\n swipeable={swipeable}\n bottomSheetProps={bottomSheetProps}\n {...restProps}\n />\n );\n },\n);\n\nCustomPickerButtonResponsive.displayName = 'CustomPickerButtonResponsive';\n"],"names":[],"mappings":";;;;;;IAkCa,4BAA4B,GAAG,UAAU,CAIlD,UACI,EAUC,EACD,GAAG,EAAA;AAVC,IAAA,IAAA,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,8BAAgF,EAAhF,sBAAsB,mBAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,GAAA,EAAA,EAC7E,SAAS,GAAA,MAAA,CAAA,EAAA,EAThB,wHAUC,CADe;IAIhB,IAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,OAAO,SAAS,IACZ,KAAC,CAAA,aAAA,CAAA,yBAAyB,EACtB,QAAA,CAAA,EAAA,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAAA,EACd,SAAS,CAAA,CACf,KAEF,oBAAC,wBAAwB,EAAA,QAAA,CAAA,EACrB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAC9B,EAAA,SAAS,CACf,CAAA,CACL;AACL,CAAC;AAGL,4BAA4B,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonDesktop,\n PickerButtonDesktopProps,\n} from '@alfalab/core-components-picker-button/desktop';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonDesktop = forwardRef<\n HTMLInputElement,\n CustomPickerButtonDesktopProps\n>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n icon,\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonDesktop\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n breakpoint: 1,\n icon,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["DefaultField"],"mappings":";;;;;AAUA,IAAM,oBAAoB,GAAG,SAAS;AACtC,IAAM,qBAAqB,GAAG,OAAO;IAKxB,yBAAyB,GAAG,UAAU,CAI/C,UACI,EAMC,EACD,GAAG,EAAA;IANC,IAAA,EAAA,GAAA,EAAA,CAAA,eAAsC,EAAtC,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,oBAAoB,GAAA,EAAA,EACtC,EAAoC,GAAA,EAAA,CAAA,YAAA,EAApC,YAAY,GAAA,EAAA,KAAA,MAAA,GAAG,qBAAqB,GAAA,EAAA,EACpC,EAAA,GAAA,EAAA,CAAA,SAAuB,EAAvB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,GAAA,EAAA,EACvB,IAAI,GAAA,EAAA,CAAA,IAAA,EACD,SAAS,GALhB,MAAA,CAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,MAAA,CAMC,CADe;AAGf,IAAA,QACD,KAAC,CAAA,aAAA,CAAA,mBAAmB,eACZ,SAAS,EAAA,EACb,UAAU,EAAE;AACR,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,SAAS,EAAA,SAAA;AACT,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,IAAI,EAAA,IAAA;SACP,EACD,KAAK,EAAEA,KAAY,EACnB,GAAG,EAAE,GAAG,EACV,CAAA,CAAA;AACL,CAAA;;;;"}
|
package/esm/desktop/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, ComponentType, Fragment, SVGProps } from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n PickerButtonSize,\n PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';\n\nimport styles from './index.module.css';\n\ntype FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> &\n CustomButtonProps & {\n buttonSize?: PickerButtonSize;\n buttonVariant?: PickerButtonVariant;\n showArrow?: boolean;\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n };\n\nconst SIZE_TO_CLASSNAME_MAP = {\n xxs: 'size-32',\n xs: 'size-40',\n s: 'size-48',\n m: 'size-56',\n l: 'size-64',\n xl: 'size-72',\n 32: 'size-32',\n 40: 'size-40',\n 48: 'size-48',\n 56: 'size-56',\n 64: 'size-64',\n 72: 'size-72',\n};\n\nexport const Field = ({\n buttonSize = 56,\n buttonVariant = 'default',\n backgroundColor,\n contentColor,\n stateType,\n label,\n open,\n rightAddons,\n innerProps,\n className,\n showArrow = true,\n icon,\n ...restProps\n}: FieldProps) => {\n const Icon: ComponentType<SVGProps<SVGSVGElement>> = getIcon(\n buttonVariant,\n SIZE_TO_CLASSNAME_MAP[buttonSize],\n icon,\n );\n\n const buttonProps = {\n ...restProps,\n ...innerProps,\n } as ButtonHTMLAttributes<HTMLButtonElement>;\n\n return (\n <CustomButton\n {...buttonProps}\n rightAddons={\n <Fragment>\n {rightAddons && (\n <span\n className={cn(styles.addonsContainer, {\n [styles.showControlIcon]: showArrow || buttonVariant === 'compact',\n })}\n >\n {rightAddons}\n </span>\n )}\n\n {(showArrow || buttonVariant === 'compact') && (\n <span\n className={cn(\n styles.iconContainer,\n buttonVariant !== 'compact' && open && styles.open,\n )}\n >\n <Icon data-test-id='custom-picker-button-icon' />\n </span>\n )}\n </Fragment>\n }\n block={true}\n size={buttonSize}\n backgroundColor={backgroundColor}\n contentColor={contentColor}\n stateType={stateType}\n className={className}\n >\n {buttonVariant !== 'compact' && label}\n </CustomButton>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAqBA,IAAM,qBAAqB,GAAG;AAC1B,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;CAChB;AAEM,IAAM,KAAK,GAAG,UAAC,EAcT,EAAA;;IAbT,IAAA,EAAA,GAAA,EAAA,CAAA,UAAe,EAAf,UAAU,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACf,EAAyB,GAAA,EAAA,CAAA,aAAA,EAAzB,aAAa,GAAA,EAAA,KAAA,MAAA,GAAG,SAAS,GAAA,EAAA,EACzB,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,YAAY,kBAAA,EACZ,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,EAAA,GAAA,EAAA,CAAA,SAAgB,EAAhB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EAChB,IAAI,UAAA,EACD,SAAS,GAbM,MAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,OAAA,EAAA,MAAA,EAAA,aAAA,EAAA,YAAA,EAAA,WAAA,EAAA,WAAA,EAAA,MAAA,CAcrB,CADe;AAEZ,IAAA,IAAM,IAAI,GAA2C,OAAO,CACxD,aAAa,EACb,qBAAqB,CAAC,UAAU,CAAC,EACjC,IAAI,CACP;AAED,IAAA,IAAM,WAAW,GAAG,QAAA,CAAA,QAAA,CAAA,EAAA,EACb,SAAS,CACT,EAAA,UAAU,CAC2B;IAE5C,QACI,oBAAC,YAAY,EAAA,QAAA,CAAA,EAAA,EACL,WAAW,EACf,EAAA,WAAW,EACP,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA;YACJ,WAAW,KACR,KACI,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,GAAA,EAAA,GAAA,EAAA;oBAChC,EAAC,CAAA,MAAM,CAAC,eAAe,CAAA,GAAG,SAAS,IAAI,aAAa,KAAK,SAAS;wBACpE,EAED,EAAA,WAAW,CACT,CACV;YAEA,CAAC,SAAS,IAAI,aAAa,KAAK,SAAS,MACtC,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,aAAa,EACpB,aAAa,KAAK,SAAS,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,CACrD,EAAA;AAED,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAc,EAAA,cAAA,EAAA,2BAA2B,EAAG,CAAA,CAC9C,CACV,CACM,EAEf,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,UAAU,EAChB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EAAA,CAAA,EAEnB,aAAa,KAAK,SAAS,IAAI,KAAK,CAC1B;AAEvB;;;;"}
|
package/esm/field/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
|
|
3
|
-
var styles = {"iconContainer":"custom-picker-button__iconContainer_d5wdl","addonsContainer":"custom-picker-button__addonsContainer_d5wdl","showControlIcon":"custom-picker-button__showControlIcon_d5wdl","open":"custom-picker-button__open_d5wdl"};
|
|
4
|
-
|
|
5
|
-
export { styles as default };
|
|
6
|
-
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '../../../vars/src/index.css';\n\n.iconContainer {\n display: flex;\n transition: transform 0.15s ease-in-out;\n}\n\n.addonsContainer {\n display: flex;\n\n &.showControlIcon {\n margin-right: var(--gap-4);\n }\n}\n\n.open {\n transform: var(--arrow-transform);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,2CAA2C,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,MAAM,CAAC,kCAAkC,CAAC;;;;"}
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonMobile,\n PickerButtonMobileProps,\n} from '@alfalab/core-components-picker-button/mobile';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonMobile = forwardRef<HTMLInputElement, CustomPickerButtonMobileProps>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonMobile\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["DefaultField"],"mappings":";;;;;AAUA,IAAM,oBAAoB,GAAG,SAAS;AACtC,IAAM,qBAAqB,GAAG,OAAO;IAKxB,wBAAwB,GAAG,UAAU,CAC9C,UACI,EAKC,EACD,GAAG,EAAA;IALC,IAAA,EAAA,GAAA,EAAA,CAAA,eAAsC,EAAtC,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,oBAAoB,KAAA,EACtC,EAAA,GAAA,EAAA,CAAA,YAAoC,EAApC,YAAY,GAAG,EAAA,KAAA,MAAA,GAAA,qBAAqB,KAAA,EACpC,EAAA,GAAA,EAAA,CAAA,SAAuB,EAAvB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,KAAA,EACpB,SAAS,GAJhB,MAAA,CAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,CAKC,CADe;AAGf,IAAA,QACD,KAAC,CAAA,aAAA,CAAA,kBAAkB,eACX,SAAS,EAAA,EACb,UAAU,EAAE;AACR,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,SAAS,EAAA,SAAA;SACZ,EACD,KAAK,EAAEA,KAAY,EACnB,GAAG,EAAE,GAAG,EACV,CAAA,CAAA;AACL,CAAA;;;;"}
|
package/esm/mobile/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
4
|
-
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
5
|
-
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
|
-
buttonSize?: PickerButtonSize;
|
|
7
|
-
buttonVariant?: PickerButtonVariant;
|
|
8
|
-
showArrow?: boolean;
|
|
9
|
-
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, icon, ...restProps }: FieldProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
package/esm/src/field/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/esm/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CustomPickerButtonResponsive as CustomPickerButton, CustomPickerButtonResponsiveProps as CustomPickerButtonProps, } from './Component.responsive';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
4
|
-
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
package/field/Component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, ComponentType, Fragment, SVGProps } from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n PickerButtonSize,\n PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';\n\nimport styles from './index.module.css';\n\ntype FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> &\n CustomButtonProps & {\n buttonSize?: PickerButtonSize;\n buttonVariant?: PickerButtonVariant;\n showArrow?: boolean;\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n };\n\nconst SIZE_TO_CLASSNAME_MAP = {\n xxs: 'size-32',\n xs: 'size-40',\n s: 'size-48',\n m: 'size-56',\n l: 'size-64',\n xl: 'size-72',\n 32: 'size-32',\n 40: 'size-40',\n 48: 'size-48',\n 56: 'size-56',\n 64: 'size-64',\n 72: 'size-72',\n};\n\nexport const Field = ({\n buttonSize = 56,\n buttonVariant = 'default',\n backgroundColor,\n contentColor,\n stateType,\n label,\n open,\n rightAddons,\n innerProps,\n className,\n showArrow = true,\n icon,\n ...restProps\n}: FieldProps) => {\n const Icon: ComponentType<SVGProps<SVGSVGElement>> = getIcon(\n buttonVariant,\n SIZE_TO_CLASSNAME_MAP[buttonSize],\n icon,\n );\n\n const buttonProps = {\n ...restProps,\n ...innerProps,\n } as ButtonHTMLAttributes<HTMLButtonElement>;\n\n return (\n <CustomButton\n {...buttonProps}\n rightAddons={\n <Fragment>\n {rightAddons && (\n <span\n className={cn(styles.addonsContainer, {\n [styles.showControlIcon]: showArrow || buttonVariant === 'compact',\n })}\n >\n {rightAddons}\n </span>\n )}\n\n {(showArrow || buttonVariant === 'compact') && (\n <span\n className={cn(\n styles.iconContainer,\n buttonVariant !== 'compact' && open && styles.open,\n )}\n >\n <Icon data-test-id='custom-picker-button-icon' />\n </span>\n )}\n </Fragment>\n }\n block={true}\n size={buttonSize}\n backgroundColor={backgroundColor}\n contentColor={contentColor}\n stateType={stateType}\n className={className}\n >\n {buttonVariant !== 'compact' && label}\n </CustomButton>\n );\n};\n"],"names":["__rest","getIcon","__assign","React","CustomButton","Fragment","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAqBA,IAAM,qBAAqB,GAAG;AAC1B,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;CAChB;AAEM,IAAM,KAAK,GAAG,UAAC,EAcT,EAAA;;IAbT,IAAA,EAAA,GAAA,EAAA,CAAA,UAAe,EAAf,UAAU,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACf,EAAyB,GAAA,EAAA,CAAA,aAAA,EAAzB,aAAa,GAAA,EAAA,KAAA,MAAA,GAAG,SAAS,GAAA,EAAA,EACzB,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,YAAY,kBAAA,EACZ,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,EAAA,GAAA,EAAA,CAAA,SAAgB,EAAhB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EAChB,IAAI,UAAA,EACD,SAAS,GAbMA,YAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,OAAA,EAAA,MAAA,EAAA,aAAA,EAAA,YAAA,EAAA,WAAA,EAAA,WAAA,EAAA,MAAA,CAcrB,CADe;AAEZ,IAAA,IAAM,IAAI,GAA2CC,cAAO,CACxD,aAAa,EACb,qBAAqB,CAAC,UAAU,CAAC,EACjC,IAAI,CACP;AAED,IAAA,IAAM,WAAW,GAAGC,cAAA,CAAAA,cAAA,CAAA,EAAA,EACb,SAAS,CACT,EAAA,UAAU,CAC2B;IAE5C,QACIC,qCAACC,uCAAY,EAAAF,cAAA,CAAA,EAAA,EACL,WAAW,EACf,EAAA,WAAW,EACPC,sBAAA,CAAA,aAAA,CAACE,cAAQ,EAAA,IAAA;YACJ,WAAW,KACRF,sBACI,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,eAAe,GAAA,EAAA,GAAA,EAAA;oBAChC,EAAC,CAAAA,YAAM,CAAC,eAAe,CAAA,GAAG,SAAS,IAAI,aAAa,KAAK,SAAS;wBACpE,EAED,EAAA,WAAW,CACT,CACV;YAEA,CAAC,SAAS,IAAI,aAAa,KAAK,SAAS,MACtCJ,sBAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAEG,mBAAE,CACTC,YAAM,CAAC,aAAa,EACpB,aAAa,KAAK,SAAS,IAAI,IAAI,IAAIA,YAAM,CAAC,IAAI,CACrD,EAAA;AAED,gBAAAJ,sBAAA,CAAA,aAAA,CAAC,IAAI,EAAc,EAAA,cAAA,EAAA,2BAA2B,EAAG,CAAA,CAC9C,CACV,CACM,EAEf,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,UAAU,EAChB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EAAA,CAAA,EAEnB,aAAa,KAAK,SAAS,IAAI,KAAK,CAC1B;AAEvB;;;;"}
|
package/field/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('./index.css');
|
|
4
|
-
|
|
5
|
-
var styles = {"iconContainer":"custom-picker-button__iconContainer_d5wdl","addonsContainer":"custom-picker-button__addonsContainer_d5wdl","showControlIcon":"custom-picker-button__showControlIcon_d5wdl","open":"custom-picker-button__open_d5wdl"};
|
|
6
|
-
|
|
7
|
-
module.exports = styles;
|
|
8
|
-
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '../../../vars/src/index.css';\n\n.iconContainer {\n display: flex;\n transition: transform 0.15s ease-in-out;\n}\n\n.addonsContainer {\n display: flex;\n\n &.showControlIcon {\n margin-right: var(--gap-4);\n }\n}\n\n.open {\n transform: var(--arrow-transform);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,eAAe,CAAC,2CAA2C,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,MAAM,CAAC,kCAAkC,CAAC;;;;"}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonMobile,\n PickerButtonMobileProps,\n} from '@alfalab/core-components-picker-button/mobile';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonMobile = forwardRef<HTMLInputElement, CustomPickerButtonMobileProps>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonMobile\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["forwardRef","__rest","React","PickerButtonMobile","DefaultField"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,oBAAoB,GAAG,SAAS;AACtC,IAAM,qBAAqB,GAAG,OAAO;IAKxB,wBAAwB,GAAGA,gBAAU,CAC9C,UACI,EAKC,EACD,GAAG,EAAA;IALC,IAAA,EAAA,GAAA,EAAA,CAAA,eAAsC,EAAtC,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,oBAAoB,KAAA,EACtC,EAAA,GAAA,EAAA,CAAA,YAAoC,EAApC,YAAY,GAAG,EAAA,KAAA,MAAA,GAAA,qBAAqB,KAAA,EACpC,EAAA,GAAA,EAAA,CAAA,SAAuB,EAAvB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,KAAA,EACpB,SAAS,GAJhBC,YAAA,CAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,WAAA,CAKC,CADe;AAGf,IAAA,QACDC,sBAAC,CAAA,aAAA,CAAAC,yBAAkB,qBACX,SAAS,EAAA,EACb,UAAU,EAAE;AACR,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,SAAS,EAAA,SAAA;SACZ,EACD,KAAK,EAAEC,eAAY,EACnB,GAAG,EAAE,GAAG,EACV,CAAA,CAAA;AACL,CAAA;;;;"}
|
package/mobile/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\nimport type {\n AdditionalMobileProps,\n BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './desktop';\nimport { CustomPickerButtonMobile } from './mobile';\n\nexport type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps &\n AdditionalMobileProps &\n BottomSheetSelectMobileProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n * @deprecated Используйте client\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n };\n\nexport const CustomPickerButtonResponsive = forwardRef<\n HTMLInputElement,\n CustomPickerButtonResponsiveProps\n>(\n (\n {\n OptionsList,\n onScroll,\n footer,\n swipeable,\n bottomSheetProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return isDesktop ? (\n <CustomPickerButtonDesktop\n ref={ref}\n OptionsList={OptionsList}\n onScroll={onScroll}\n {...restProps}\n />\n ) : (\n <CustomPickerButtonMobile\n ref={ref}\n footer={footer}\n swipeable={swipeable}\n bottomSheetProps={bottomSheetProps}\n {...restProps}\n />\n );\n },\n);\n\nCustomPickerButtonResponsive.displayName = 'CustomPickerButtonResponsive';\n"],"names":[],"mappings":";;;;;MAkCa,4BAA4B,GAAG,UAAU,CAIlD,CACI,EACI,WAAW,EACX,QAAQ,EACR,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,MAAM,EACN,sBAAsB,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,EAChF,GAAG,SAAS,EACf,EACD,GAAG,KACH;IACA,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,OAAO,SAAS,IACZ,KAAC,CAAA,aAAA,CAAA,yBAAyB,EACtB,EAAA,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAAA,GACd,SAAS,EAAA,CACf,KAEF,oBAAC,wBAAwB,EAAA,EACrB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAC9B,GAAA,SAAS,EACf,CAAA,CACL;AACL,CAAC;AAGL,4BAA4B,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonDesktop,\n PickerButtonDesktopProps,\n} from '@alfalab/core-components-picker-button/desktop';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonDesktop = forwardRef<\n HTMLInputElement,\n CustomPickerButtonDesktopProps\n>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n icon,\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonDesktop\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n breakpoint: 1,\n icon,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["DefaultField"],"mappings":";;;;AAUA,MAAM,oBAAoB,GAAG,SAAS;AACtC,MAAM,qBAAqB,GAAG,OAAO;AAKxB,MAAA,yBAAyB,GAAG,UAAU,CAI/C,CACI,EACI,eAAe,GAAG,oBAAoB,EACtC,YAAY,GAAG,qBAAqB,EACpC,SAAS,GAAG,WAAW,EACvB,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,MAEH,KAAC,CAAA,aAAA,CAAA,mBAAmB,OACZ,SAAS,EACb,UAAU,EAAE;QACR,eAAe;QACf,YAAY;QACZ,SAAS;AACT,QAAA,UAAU,EAAE,CAAC;QACb,IAAI;KACP,EACD,KAAK,EAAEA,KAAY,EACnB,GAAG,EAAE,GAAG,EAAA,CACV,CACL;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, ComponentType, Fragment, SVGProps } from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n PickerButtonSize,\n PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';\n\nimport styles from './index.module.css';\n\ntype FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> &\n CustomButtonProps & {\n buttonSize?: PickerButtonSize;\n buttonVariant?: PickerButtonVariant;\n showArrow?: boolean;\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n };\n\nconst SIZE_TO_CLASSNAME_MAP = {\n xxs: 'size-32',\n xs: 'size-40',\n s: 'size-48',\n m: 'size-56',\n l: 'size-64',\n xl: 'size-72',\n 32: 'size-32',\n 40: 'size-40',\n 48: 'size-48',\n 56: 'size-56',\n 64: 'size-64',\n 72: 'size-72',\n};\n\nexport const Field = ({\n buttonSize = 56,\n buttonVariant = 'default',\n backgroundColor,\n contentColor,\n stateType,\n label,\n open,\n rightAddons,\n innerProps,\n className,\n showArrow = true,\n icon,\n ...restProps\n}: FieldProps) => {\n const Icon: ComponentType<SVGProps<SVGSVGElement>> = getIcon(\n buttonVariant,\n SIZE_TO_CLASSNAME_MAP[buttonSize],\n icon,\n );\n\n const buttonProps = {\n ...restProps,\n ...innerProps,\n } as ButtonHTMLAttributes<HTMLButtonElement>;\n\n return (\n <CustomButton\n {...buttonProps}\n rightAddons={\n <Fragment>\n {rightAddons && (\n <span\n className={cn(styles.addonsContainer, {\n [styles.showControlIcon]: showArrow || buttonVariant === 'compact',\n })}\n >\n {rightAddons}\n </span>\n )}\n\n {(showArrow || buttonVariant === 'compact') && (\n <span\n className={cn(\n styles.iconContainer,\n buttonVariant !== 'compact' && open && styles.open,\n )}\n >\n <Icon data-test-id='custom-picker-button-icon' />\n </span>\n )}\n </Fragment>\n }\n block={true}\n size={buttonSize}\n backgroundColor={backgroundColor}\n contentColor={contentColor}\n stateType={stateType}\n className={className}\n >\n {buttonVariant !== 'compact' && label}\n </CustomButton>\n );\n};\n"],"names":[],"mappings":";;;;;;AAqBA,MAAM,qBAAqB,GAAG;AAC1B,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;CAChB;AAEY,MAAA,KAAK,GAAG,CAAC,EAClB,UAAU,GAAG,EAAE,EACf,aAAa,GAAG,SAAS,EACzB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,GAAG,IAAI,EAChB,IAAI,EACJ,GAAG,SAAS,EACH,KAAI;AACb,IAAA,MAAM,IAAI,GAA2C,OAAO,CACxD,aAAa,EACb,qBAAqB,CAAC,UAAU,CAAC,EACjC,IAAI,CACP;AAED,IAAA,MAAM,WAAW,GAAG;AAChB,QAAA,GAAG,SAAS;AACZ,QAAA,GAAG,UAAU;KAC2B;IAE5C,QACI,oBAAC,YAAY,EAAA,EAAA,GACL,WAAW,EACf,WAAW,EACP,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA;YACJ,WAAW,KACR,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE;oBAClC,CAAC,MAAM,CAAC,eAAe,GAAG,SAAS,IAAI,aAAa,KAAK,SAAS;iBACrE,CAAC,EAAA,EAED,WAAW,CACT,CACV;YAEA,CAAC,SAAS,IAAI,aAAa,KAAK,SAAS,MACtC,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,aAAa,EACpB,aAAa,KAAK,SAAS,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,CACrD,EAAA;AAED,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAc,EAAA,cAAA,EAAA,2BAA2B,EAAG,CAAA,CAC9C,CACV,CACM,EAEf,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,UAAU,EAChB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EAAA,EAEnB,aAAa,KAAK,SAAS,IAAI,KAAK,CAC1B;AAEvB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
|
|
3
|
-
const styles = {"iconContainer":"custom-picker-button__iconContainer_d5wdl","addonsContainer":"custom-picker-button__addonsContainer_d5wdl","showControlIcon":"custom-picker-button__showControlIcon_d5wdl","open":"custom-picker-button__open_d5wdl"};
|
|
4
|
-
|
|
5
|
-
export { styles as default };
|
|
6
|
-
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '../../../vars/src/index.css';\n\n.iconContainer {\n display: flex;\n transition: transform 0.15s ease-in-out;\n}\n\n.addonsContainer {\n display: flex;\n\n &.showControlIcon {\n margin-right: var(--gap-4);\n }\n}\n\n.open {\n transform: var(--arrow-transform);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,eAAe,CAAC,2CAA2C,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,MAAM,CAAC,kCAAkC,CAAC;;;;"}
|
package/modern/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonMobile,\n PickerButtonMobileProps,\n} from '@alfalab/core-components-picker-button/mobile';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonMobile = forwardRef<HTMLInputElement, CustomPickerButtonMobileProps>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonMobile\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["DefaultField"],"mappings":";;;;AAUA,MAAM,oBAAoB,GAAG,SAAS;AACtC,MAAM,qBAAqB,GAAG,OAAO;AAK9B,MAAM,wBAAwB,GAAG,UAAU,CAC9C,CACI,EACI,eAAe,GAAG,oBAAoB,EACtC,YAAY,GAAG,qBAAqB,EACpC,SAAS,GAAG,WAAW,EACvB,GAAG,SAAS,EACf,EACD,GAAG,MAEH,oBAAC,kBAAkB,EAAA,EAAA,GACX,SAAS,EACb,UAAU,EAAE;QACR,eAAe;QACf,YAAY;QACZ,SAAS;KACZ,EACD,KAAK,EAAEA,KAAY,EACnB,GAAG,EAAE,GAAG,EAAA,CACV,CACL;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
4
|
-
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
5
|
-
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
|
-
buttonSize?: PickerButtonSize;
|
|
7
|
-
buttonVariant?: PickerButtonVariant;
|
|
8
|
-
showArrow?: boolean;
|
|
9
|
-
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, icon, ...restProps }: FieldProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/modern/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CustomPickerButtonResponsive as CustomPickerButton, CustomPickerButtonResponsiveProps as CustomPickerButtonProps, } from './Component.responsive';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
4
|
-
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\nimport type {\n AdditionalMobileProps,\n BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './desktop';\nimport { CustomPickerButtonMobile } from './mobile';\n\nexport type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps &\n AdditionalMobileProps &\n BottomSheetSelectMobileProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n * @deprecated Используйте client\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n };\n\nexport const CustomPickerButtonResponsive = forwardRef<\n HTMLInputElement,\n CustomPickerButtonResponsiveProps\n>(\n (\n {\n OptionsList,\n onScroll,\n footer,\n swipeable,\n bottomSheetProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return isDesktop ? (\n <CustomPickerButtonDesktop\n ref={ref}\n OptionsList={OptionsList}\n onScroll={onScroll}\n {...restProps}\n />\n ) : (\n <CustomPickerButtonMobile\n ref={ref}\n footer={footer}\n swipeable={swipeable}\n bottomSheetProps={bottomSheetProps}\n {...restProps}\n />\n );\n },\n);\n\nCustomPickerButtonResponsive.displayName = 'CustomPickerButtonResponsive';\n"],"names":[],"mappings":";;;;;MAkCa,4BAA4B,GAAG,UAAU,CAIlD,CACI,EACI,WAAW,EACX,QAAQ,EACR,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,MAAM,EACN,sBAAsB,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,EAChF,GAAG,SAAS,EACf,EACD,GAAG,KACH;IACA,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,OAAO,SAAS,IACZ,KAAC,CAAA,aAAA,CAAA,yBAAyB,EACtB,EAAA,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAAA,GACd,SAAS,EAAA,CACf,KAEF,oBAAC,wBAAwB,EAAA,EACrB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAC9B,GAAA,SAAS,EACf,CAAA,CACL;AACL,CAAC;AAGL,4BAA4B,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonDesktop,\n PickerButtonDesktopProps,\n} from '@alfalab/core-components-picker-button/desktop';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonDesktop = forwardRef<\n HTMLInputElement,\n CustomPickerButtonDesktopProps\n>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n icon,\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonDesktop\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n breakpoint: 1,\n icon,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["DefaultField"],"mappings":";;;;AAUA,MAAM,oBAAoB,GAAG,SAAS;AACtC,MAAM,qBAAqB,GAAG,OAAO;AAKxB,MAAA,yBAAyB,GAAG,UAAU,CAI/C,CACI,EACI,eAAe,GAAG,oBAAoB,EACtC,YAAY,GAAG,qBAAqB,EACpC,SAAS,GAAG,WAAW,EACvB,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,MAEH,KAAC,CAAA,aAAA,CAAA,mBAAmB,OACZ,SAAS,EACb,UAAU,EAAE;QACR,eAAe;QACf,YAAY;QACZ,SAAS;AACT,QAAA,UAAU,EAAE,CAAC;QACb,IAAI;KACP,EACD,KAAK,EAAEA,KAAY,EACnB,GAAG,EAAE,GAAG,EAAA,CACV,CACL;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, ComponentType, Fragment, SVGProps } from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n PickerButtonSize,\n PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';\n\nimport styles from './index.module.css';\n\ntype FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> &\n CustomButtonProps & {\n buttonSize?: PickerButtonSize;\n buttonVariant?: PickerButtonVariant;\n showArrow?: boolean;\n icon?: ComponentType<SVGProps<SVGSVGElement>>;\n };\n\nconst SIZE_TO_CLASSNAME_MAP = {\n xxs: 'size-32',\n xs: 'size-40',\n s: 'size-48',\n m: 'size-56',\n l: 'size-64',\n xl: 'size-72',\n 32: 'size-32',\n 40: 'size-40',\n 48: 'size-48',\n 56: 'size-56',\n 64: 'size-64',\n 72: 'size-72',\n};\n\nexport const Field = ({\n buttonSize = 56,\n buttonVariant = 'default',\n backgroundColor,\n contentColor,\n stateType,\n label,\n open,\n rightAddons,\n innerProps,\n className,\n showArrow = true,\n icon,\n ...restProps\n}: FieldProps) => {\n const Icon: ComponentType<SVGProps<SVGSVGElement>> = getIcon(\n buttonVariant,\n SIZE_TO_CLASSNAME_MAP[buttonSize],\n icon,\n );\n\n const buttonProps = {\n ...restProps,\n ...innerProps,\n } as ButtonHTMLAttributes<HTMLButtonElement>;\n\n return (\n <CustomButton\n {...buttonProps}\n rightAddons={\n <Fragment>\n {rightAddons && (\n <span\n className={cn(styles.addonsContainer, {\n [styles.showControlIcon]: showArrow || buttonVariant === 'compact',\n })}\n >\n {rightAddons}\n </span>\n )}\n\n {(showArrow || buttonVariant === 'compact') && (\n <span\n className={cn(\n styles.iconContainer,\n buttonVariant !== 'compact' && open && styles.open,\n )}\n >\n <Icon data-test-id='custom-picker-button-icon' />\n </span>\n )}\n </Fragment>\n }\n block={true}\n size={buttonSize}\n backgroundColor={backgroundColor}\n contentColor={contentColor}\n stateType={stateType}\n className={className}\n >\n {buttonVariant !== 'compact' && label}\n </CustomButton>\n );\n};\n"],"names":[],"mappings":";;;;;;AAqBA,MAAM,qBAAqB,GAAG;AAC1B,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;CAChB;AAEY,MAAA,KAAK,GAAG,CAAC,EAClB,UAAU,GAAG,EAAE,EACf,aAAa,GAAG,SAAS,EACzB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,GAAG,IAAI,EAChB,IAAI,EACJ,GAAG,SAAS,EACH,KAAI;AACb,IAAA,MAAM,IAAI,GAA2C,OAAO,CACxD,aAAa,EACb,qBAAqB,CAAC,UAAU,CAAC,EACjC,IAAI,CACP;AAED,IAAA,MAAM,WAAW,GAAG;AAChB,QAAA,GAAG,SAAS;AACZ,QAAA,GAAG,UAAU;KAC2B;IAE5C,QACI,oBAAC,YAAY,EAAA,EAAA,GACL,WAAW,EACf,WAAW,EACP,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA;YACJ,WAAW,KACR,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE;oBAClC,CAAC,MAAM,CAAC,eAAe,GAAG,SAAS,IAAI,aAAa,KAAK,SAAS;iBACrE,CAAC,EAAA,EAED,WAAW,CACT,CACV;YAEA,CAAC,SAAS,IAAI,aAAa,KAAK,SAAS,MACtC,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,aAAa,EACpB,aAAa,KAAK,SAAS,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,CACrD,EAAA;AAED,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAc,EAAA,cAAA,EAAA,2BAA2B,EAAG,CAAA,CAC9C,CACV,CACM,EAEf,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,UAAU,EAChB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EAAA,EAEnB,aAAa,KAAK,SAAS,IAAI,KAAK,CAC1B;AAEvB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/moderncssm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n PickerButtonMobile,\n PickerButtonMobileProps,\n} from '@alfalab/core-components-picker-button/mobile';\n\nimport { Field as DefaultField } from '../field';\n\nconst DEFAULT_BUTTON_COLOR = '#FF45C3';\nconst DEFAULT_CONTENT_COLOR = 'white';\n\nexport type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> &\n Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;\n\nexport const CustomPickerButtonMobile = forwardRef<HTMLInputElement, CustomPickerButtonMobileProps>(\n (\n {\n backgroundColor = DEFAULT_BUTTON_COLOR,\n contentColor = DEFAULT_CONTENT_COLOR,\n stateType = 'darkening',\n ...restProps\n },\n ref,\n ) => (\n <PickerButtonMobile\n {...restProps}\n fieldProps={{\n backgroundColor,\n contentColor,\n stateType,\n }}\n Field={DefaultField}\n ref={ref}\n />\n ),\n);\n"],"names":["DefaultField"],"mappings":";;;;AAUA,MAAM,oBAAoB,GAAG,SAAS;AACtC,MAAM,qBAAqB,GAAG,OAAO;AAK9B,MAAM,wBAAwB,GAAG,UAAU,CAC9C,CACI,EACI,eAAe,GAAG,oBAAoB,EACtC,YAAY,GAAG,qBAAqB,EACpC,SAAS,GAAG,WAAW,EACvB,GAAG,SAAS,EACf,EACD,GAAG,MAEH,oBAAC,kBAAkB,EAAA,EAAA,GACX,SAAS,EACb,UAAU,EAAE;QACR,eAAe;QACf,YAAY;QACZ,SAAS;KACZ,EACD,KAAK,EAAEA,KAAY,EACnB,GAAG,EAAE,GAAG,EAAA,CACV,CACL;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
4
|
-
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
5
|
-
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
|
-
buttonSize?: PickerButtonSize;
|
|
7
|
-
buttonVariant?: PickerButtonVariant;
|
|
8
|
-
showArrow?: boolean;
|
|
9
|
-
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, icon, ...restProps }: FieldProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CustomPickerButtonResponsive as CustomPickerButton, CustomPickerButtonResponsiveProps as CustomPickerButtonProps, } from './Component.responsive';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
4
|
-
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import type { AdditionalMobileProps, BottomSheetSelectMobileProps } from '@alfalab/core-components-select/shared';
|
|
4
|
-
import { CustomPickerButtonDesktopProps } from './desktop';
|
|
5
|
-
export declare type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
|
-
/**
|
|
7
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
8
|
-
* @default 1024
|
|
9
|
-
*/
|
|
10
|
-
breakpoint?: number;
|
|
11
|
-
/**
|
|
12
|
-
* Версия, которая будет использоваться при серверном рендеринге
|
|
13
|
-
*/
|
|
14
|
-
client?: 'desktop' | 'mobile';
|
|
15
|
-
/**
|
|
16
|
-
* Значение по-умолчанию для хука useMatchMedia
|
|
17
|
-
* @deprecated Используйте client
|
|
18
|
-
*/
|
|
19
|
-
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
20
|
-
};
|
|
21
|
-
export declare const CustomPickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-picker-button/desktop").PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
22
|
-
/**
|
|
23
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
24
|
-
* @default 1024
|
|
25
|
-
*/
|
|
26
|
-
breakpoint?: number | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Версия, которая будет использоваться при серверном рендеринге
|
|
29
|
-
*/
|
|
30
|
-
client?: "desktop" | "mobile" | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Значение по-умолчанию для хука useMatchMedia
|
|
33
|
-
* @deprecated Используйте client
|
|
34
|
-
*/
|
|
35
|
-
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
36
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
4
|
-
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
package/src/desktop/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './Component.desktop';
|
package/src/field/Component.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
5
|
-
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
|
-
buttonSize?: PickerButtonSize;
|
|
7
|
-
buttonVariant?: PickerButtonVariant;
|
|
8
|
-
showArrow?: boolean;
|
|
9
|
-
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, icon, ...restProps }: FieldProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
package/src/field/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CustomPickerButtonResponsive as CustomPickerButton, CustomPickerButtonResponsiveProps as CustomPickerButtonProps, } from './Component.responsive';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
4
|
-
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
-
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|