@alfalab/core-components-custom-picker-button 3.0.1 → 3.0.3
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/Component.responsive.d.ts +2 -2
- package/Component.responsive.js.map +1 -1
- package/cssm/Component.responsive.d.ts +2 -2
- package/cssm/Component.responsive.js.map +1 -1
- package/cssm/desktop/Component.desktop.d.ts +2 -2
- package/cssm/desktop/Component.desktop.js.map +1 -1
- package/cssm/field/Component.d.ts +4 -4
- package/cssm/field/Component.js.map +1 -1
- package/cssm/field/index.module.css +1 -1
- package/cssm/mobile/Component.mobile.d.ts +2 -2
- package/cssm/mobile/Component.mobile.js.map +1 -1
- package/desktop/Component.desktop.d.ts +2 -2
- package/desktop/Component.desktop.js.map +1 -1
- package/esm/Component.responsive.d.ts +2 -2
- package/esm/Component.responsive.js.map +1 -1
- package/esm/desktop/Component.desktop.d.ts +2 -2
- package/esm/desktop/Component.desktop.js.map +1 -1
- package/esm/field/Component.d.ts +4 -4
- package/esm/field/Component.js.map +1 -1
- package/esm/field/index.css +5 -5
- package/esm/field/index.module.css.js +1 -1
- package/esm/field/index.module.css.js.map +1 -1
- package/esm/mobile/Component.mobile.d.ts +2 -2
- package/esm/mobile/Component.mobile.js.map +1 -1
- package/field/Component.d.ts +4 -4
- package/field/Component.js.map +1 -1
- package/field/index.css +5 -5
- package/field/index.module.css.js +1 -1
- package/field/index.module.css.js.map +1 -1
- package/mobile/Component.mobile.d.ts +2 -2
- package/mobile/Component.mobile.js.map +1 -1
- package/modern/Component.responsive.d.ts +2 -2
- package/modern/Component.responsive.js.map +1 -1
- package/modern/desktop/Component.desktop.d.ts +2 -2
- package/modern/desktop/Component.desktop.js.map +1 -1
- package/modern/field/Component.d.ts +4 -4
- package/modern/field/Component.js.map +1 -1
- package/modern/field/index.css +5 -5
- package/modern/field/index.module.css.js +1 -1
- package/modern/field/index.module.css.js.map +1 -1
- package/modern/mobile/Component.mobile.d.ts +2 -2
- package/modern/mobile/Component.mobile.js.map +1 -1
- package/moderncssm/Component.responsive.d.ts +2 -2
- package/moderncssm/Component.responsive.js.map +1 -1
- package/moderncssm/desktop/Component.desktop.d.ts +2 -2
- package/moderncssm/desktop/Component.desktop.js.map +1 -1
- package/moderncssm/field/Component.d.ts +4 -4
- package/moderncssm/field/Component.js.map +1 -1
- package/moderncssm/field/index.module.css +3 -1
- package/moderncssm/mobile/Component.mobile.d.ts +2 -2
- package/moderncssm/mobile/Component.mobile.js.map +1 -1
- package/package.json +4 -4
- package/src/Component.responsive.tsx +4 -4
- package/src/desktop/Component.desktop.tsx +2 -2
- package/src/field/Component.tsx +10 -5
- package/src/field/index.module.css +1 -1
- package/src/mobile/Component.mobile.tsx +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
-
import type
|
|
4
|
-
import { CustomPickerButtonDesktopProps } from './desktop';
|
|
3
|
+
import { type AdditionalMobileProps, type BottomSheetSelectMobileProps } from '@alfalab/core-components-select/shared';
|
|
4
|
+
import { type CustomPickerButtonDesktopProps } from './desktop';
|
|
5
5
|
export declare type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 {\n type AdditionalMobileProps,\n type BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, type 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,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CustomButtonProps } from '@alfalab/core-components-custom-button/cssm';
|
|
3
|
-
import type
|
|
4
|
-
import { CustomPickerButtonDesktopProps } from './desktop';
|
|
3
|
+
import { type AdditionalMobileProps, type BottomSheetSelectMobileProps } from '@alfalab/core-components-select/cssm/shared';
|
|
4
|
+
import { type CustomPickerButtonDesktopProps } from './desktop';
|
|
5
5
|
export declare type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 {\n type AdditionalMobileProps,\n type BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, type 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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/cssm/desktop';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/cssm';
|
|
3
|
+
import { type PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/cssm/desktop';
|
|
4
4
|
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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,7 +1,7 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button/cssm';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/cssm/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/cssm/shared';
|
|
1
|
+
import React, { type ComponentType, type SVGProps } from 'react';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/cssm';
|
|
3
|
+
import { type PickerButtonSize, type PickerButtonVariant } from '@alfalab/core-components-picker-button/cssm/shared';
|
|
4
|
+
import { type FieldProps as BaseFieldProps } from '@alfalab/core-components-select/cssm/shared';
|
|
5
5
|
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
7
7
|
buttonVariant?: PickerButtonVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, {\n type ButtonHTMLAttributes,\n type ComponentType,\n Fragment,\n type SVGProps,\n} from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, type CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n type PickerButtonSize,\n type PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { type 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":";;;;;;;;;;;;;;;;;AA0BA,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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/cssm/mobile';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/cssm';
|
|
3
|
+
import { type PickerButtonMobileProps } from '@alfalab/core-components-picker-button/cssm/mobile';
|
|
4
4
|
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
+
import { type PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/desktop';
|
|
4
4
|
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CustomButtonProps } from '@alfalab/core-components-custom-button/esm';
|
|
3
|
-
import type
|
|
4
|
-
import { CustomPickerButtonDesktopProps } from './desktop';
|
|
3
|
+
import { type AdditionalMobileProps, type BottomSheetSelectMobileProps } from '@alfalab/core-components-select/esm/shared';
|
|
4
|
+
import { type CustomPickerButtonDesktopProps } from './desktop';
|
|
5
5
|
export declare type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 {\n type AdditionalMobileProps,\n type BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, type 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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/esm/desktop';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/esm';
|
|
3
|
+
import { type PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/esm/desktop';
|
|
4
4
|
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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/field/Component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button/esm';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/esm/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/esm/shared';
|
|
1
|
+
import React, { type ComponentType, type SVGProps } from 'react';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/esm';
|
|
3
|
+
import { type PickerButtonSize, type PickerButtonVariant } from '@alfalab/core-components-picker-button/esm/shared';
|
|
4
|
+
import { type FieldProps as BaseFieldProps } from '@alfalab/core-components-select/esm/shared';
|
|
5
5
|
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
7
7
|
buttonVariant?: PickerButtonVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, {\n type ButtonHTMLAttributes,\n type ComponentType,\n Fragment,\n type SVGProps,\n} from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, type CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n type PickerButtonSize,\n type PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { type 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":";;;;;;;AA0BA,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.css
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
--gap-4: var(--gap-2xs);
|
|
4
4
|
} :root {
|
|
5
5
|
--arrow-transform: rotate(180deg);
|
|
6
|
-
} .custom-picker-
|
|
6
|
+
} .custom-picker-button__iconContainer_jrjfg {
|
|
7
7
|
display: flex;
|
|
8
8
|
transition: transform 0.15s ease-in-out;
|
|
9
|
-
} .custom-picker-
|
|
10
|
-
display: flex
|
|
11
|
-
} .custom-picker-
|
|
9
|
+
} .custom-picker-button__addonsContainer_jrjfg {
|
|
10
|
+
display: flex;
|
|
11
|
+
} .custom-picker-button__addonsContainer_jrjfg.custom-picker-button__showControlIcon_jrjfg {
|
|
12
12
|
margin-right: var(--gap-4);
|
|
13
|
-
} .custom-picker-
|
|
13
|
+
} .custom-picker-button__open_jrjfg {
|
|
14
14
|
transform: var(--arrow-transform);
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"iconContainer":"custom-picker-
|
|
3
|
+
var styles = {"iconContainer":"custom-picker-button__iconContainer_jrjfg","addonsContainer":"custom-picker-button__addonsContainer_jrjfg","showControlIcon":"custom-picker-button__showControlIcon_jrjfg","open":"custom-picker-button__open_jrjfg"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-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;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/esm/mobile';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/esm';
|
|
3
|
+
import { type PickerButtonMobileProps } from '@alfalab/core-components-picker-button/esm/mobile';
|
|
4
4
|
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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/field/Component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
1
|
+
import React, { type ComponentType, type SVGProps } from 'react';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
+
import { type PickerButtonSize, type PickerButtonVariant } from '@alfalab/core-components-picker-button/shared';
|
|
4
|
+
import { type FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
5
5
|
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
7
7
|
buttonVariant?: PickerButtonVariant;
|
package/field/Component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../src/field/Component.tsx"],"sourcesContent":["import React, {\n type ButtonHTMLAttributes,\n type ComponentType,\n Fragment,\n type SVGProps,\n} from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, type CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n type PickerButtonSize,\n type PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { type 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":";;;;;;;;;;;;;;;;AA0BA,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.css
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
--gap-4: var(--gap-2xs);
|
|
4
4
|
} :root {
|
|
5
5
|
--arrow-transform: rotate(180deg);
|
|
6
|
-
} .custom-picker-
|
|
6
|
+
} .custom-picker-button__iconContainer_jrjfg {
|
|
7
7
|
display: flex;
|
|
8
8
|
transition: transform 0.15s ease-in-out;
|
|
9
|
-
} .custom-picker-
|
|
10
|
-
display: flex
|
|
11
|
-
} .custom-picker-
|
|
9
|
+
} .custom-picker-button__addonsContainer_jrjfg {
|
|
10
|
+
display: flex;
|
|
11
|
+
} .custom-picker-button__addonsContainer_jrjfg.custom-picker-button__showControlIcon_jrjfg {
|
|
12
12
|
margin-right: var(--gap-4);
|
|
13
|
-
} .custom-picker-
|
|
13
|
+
} .custom-picker-button__open_jrjfg {
|
|
14
14
|
transform: var(--arrow-transform);
|
|
15
15
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"iconContainer":"custom-picker-
|
|
5
|
+
var styles = {"iconContainer":"custom-picker-button__iconContainer_jrjfg","addonsContainer":"custom-picker-button__addonsContainer_jrjfg","showControlIcon":"custom-picker-button__showControlIcon_jrjfg","open":"custom-picker-button__open_jrjfg"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-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;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
3
|
+
import { type PickerButtonMobileProps } from '@alfalab/core-components-picker-button/mobile';
|
|
4
4
|
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CustomButtonProps } from '@alfalab/core-components-custom-button/modern';
|
|
3
|
-
import type
|
|
4
|
-
import { CustomPickerButtonDesktopProps } from './desktop';
|
|
3
|
+
import { type AdditionalMobileProps, type BottomSheetSelectMobileProps } from '@alfalab/core-components-select/modern/shared';
|
|
4
|
+
import { type CustomPickerButtonDesktopProps } from './desktop';
|
|
5
5
|
export declare type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 {\n type AdditionalMobileProps,\n type BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, type 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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/modern/desktop';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/modern';
|
|
3
|
+
import { type PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/modern/desktop';
|
|
4
4
|
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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,7 +1,7 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button/modern';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/modern/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/modern/shared';
|
|
1
|
+
import React, { type ComponentType, type SVGProps } from 'react';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/modern';
|
|
3
|
+
import { type PickerButtonSize, type PickerButtonVariant } from '@alfalab/core-components-picker-button/modern/shared';
|
|
4
|
+
import { type FieldProps as BaseFieldProps } from '@alfalab/core-components-select/modern/shared';
|
|
5
5
|
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
7
7
|
buttonVariant?: PickerButtonVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, {\n type ButtonHTMLAttributes,\n type ComponentType,\n Fragment,\n type SVGProps,\n} from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, type CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n type PickerButtonSize,\n type PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { type 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":";;;;;;AA0BA,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;;;;"}
|
package/modern/field/index.css
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
--gap-4: var(--gap-2xs);
|
|
4
4
|
} :root {
|
|
5
5
|
--arrow-transform: rotate(180deg);
|
|
6
|
-
} .custom-picker-
|
|
6
|
+
} .custom-picker-button__iconContainer_jrjfg {
|
|
7
7
|
display: flex;
|
|
8
8
|
transition: transform 0.15s ease-in-out;
|
|
9
|
-
} .custom-picker-
|
|
10
|
-
display: flex
|
|
11
|
-
} .custom-picker-
|
|
9
|
+
} .custom-picker-button__addonsContainer_jrjfg {
|
|
10
|
+
display: flex;
|
|
11
|
+
} .custom-picker-button__addonsContainer_jrjfg.custom-picker-button__showControlIcon_jrjfg {
|
|
12
12
|
margin-right: var(--gap-4);
|
|
13
|
-
} .custom-picker-
|
|
13
|
+
} .custom-picker-button__open_jrjfg {
|
|
14
14
|
transform: var(--arrow-transform);
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"iconContainer":"custom-picker-
|
|
3
|
+
const styles = {"iconContainer":"custom-picker-button__iconContainer_jrjfg","addonsContainer":"custom-picker-button__addonsContainer_jrjfg","showControlIcon":"custom-picker-button__showControlIcon_jrjfg","open":"custom-picker-button__open_jrjfg"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-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;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../src/field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/modern/mobile';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/modern';
|
|
3
|
+
import { type PickerButtonMobileProps } from '@alfalab/core-components-picker-button/modern/mobile';
|
|
4
4
|
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CustomButtonProps } from '@alfalab/core-components-custom-button/moderncssm';
|
|
3
|
-
import type
|
|
4
|
-
import { CustomPickerButtonDesktopProps } from './desktop';
|
|
3
|
+
import { type AdditionalMobileProps, type BottomSheetSelectMobileProps } from '@alfalab/core-components-select/moderncssm/shared';
|
|
4
|
+
import { type CustomPickerButtonDesktopProps } from './desktop';
|
|
5
5
|
export declare type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & BottomSheetSelectMobileProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Контрольная точка, с нее начинается desktop версия
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 {\n type AdditionalMobileProps,\n type BottomSheetSelectMobileProps,\n} from '@alfalab/core-components-select/shared';\n\nimport { CustomPickerButtonDesktop, type 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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/moderncssm/desktop';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/moderncssm';
|
|
3
|
+
import { type PickerButtonDesktopProps } from '@alfalab/core-components-picker-button/moderncssm/desktop';
|
|
4
4
|
export declare type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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,7 +1,7 @@
|
|
|
1
|
-
import React, { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CustomButtonProps } from '@alfalab/core-components-custom-button/moderncssm';
|
|
3
|
-
import { PickerButtonSize, PickerButtonVariant } from '@alfalab/core-components-picker-button/moderncssm/shared';
|
|
4
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/moderncssm/shared';
|
|
1
|
+
import React, { type ComponentType, type SVGProps } from 'react';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/moderncssm';
|
|
3
|
+
import { type PickerButtonSize, type PickerButtonVariant } from '@alfalab/core-components-picker-button/moderncssm/shared';
|
|
4
|
+
import { type FieldProps as BaseFieldProps } from '@alfalab/core-components-select/moderncssm/shared';
|
|
5
5
|
declare type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
|
|
6
6
|
buttonSize?: PickerButtonSize;
|
|
7
7
|
buttonVariant?: PickerButtonVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/field/Component.tsx"],"sourcesContent":["import React, {\n type ButtonHTMLAttributes,\n type ComponentType,\n Fragment,\n type SVGProps,\n} from 'react';\nimport cn from 'classnames';\n\nimport { CustomButton, type CustomButtonProps } from '@alfalab/core-components-custom-button';\nimport {\n getIcon,\n type PickerButtonSize,\n type PickerButtonVariant,\n} from '@alfalab/core-components-picker-button/shared';\nimport { type 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":";;;;;;AA0BA,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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { PickerButtonMobileProps } from '@alfalab/core-components-picker-button/moderncssm/mobile';
|
|
2
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button/moderncssm';
|
|
3
|
+
import { type PickerButtonMobileProps } from '@alfalab/core-components-picker-button/moderncssm/mobile';
|
|
4
4
|
export declare type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
5
|
export declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "view" | "colors"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type
|
|
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 type 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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-custom-picker-button",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Custom picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@alfalab/core-components-custom-button": "^4.0.1",
|
|
14
14
|
"@alfalab/core-components-mq": "^5.0.1",
|
|
15
|
-
"@alfalab/core-components-picker-button": "^12.0.
|
|
16
|
-
"@alfalab/core-components-select": "^18.0
|
|
15
|
+
"@alfalab/core-components-picker-button": "^12.0.3",
|
|
16
|
+
"@alfalab/core-components-select": "^18.2.0",
|
|
17
17
|
"classnames": "^2.5.1",
|
|
18
18
|
"tslib": "^2.4.0"
|
|
19
19
|
},
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"access": "public",
|
|
26
26
|
"directory": "dist"
|
|
27
27
|
},
|
|
28
|
-
"themesVersion": "14.1.
|
|
28
|
+
"themesVersion": "14.1.2",
|
|
29
29
|
"varsVersion": "10.1.0"
|
|
30
30
|
}
|
|
@@ -3,12 +3,12 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
4
|
import { CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
5
5
|
import { useIsDesktop } from '@alfalab/core-components-mq';
|
|
6
|
-
import
|
|
7
|
-
AdditionalMobileProps,
|
|
8
|
-
BottomSheetSelectMobileProps,
|
|
6
|
+
import {
|
|
7
|
+
type AdditionalMobileProps,
|
|
8
|
+
type BottomSheetSelectMobileProps,
|
|
9
9
|
} from '@alfalab/core-components-select/shared';
|
|
10
10
|
|
|
11
|
-
import { CustomPickerButtonDesktop, CustomPickerButtonDesktopProps } from './desktop';
|
|
11
|
+
import { CustomPickerButtonDesktop, type CustomPickerButtonDesktopProps } from './desktop';
|
|
12
12
|
import { CustomPickerButtonMobile } from './mobile';
|
|
13
13
|
|
|
14
14
|
export type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps &
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import type
|
|
3
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
4
4
|
import {
|
|
5
5
|
PickerButtonDesktop,
|
|
6
|
-
PickerButtonDesktopProps,
|
|
6
|
+
type PickerButtonDesktopProps,
|
|
7
7
|
} from '@alfalab/core-components-picker-button/desktop';
|
|
8
8
|
|
|
9
9
|
import { Field as DefaultField } from '../field';
|
package/src/field/Component.tsx
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
type ButtonHTMLAttributes,
|
|
3
|
+
type ComponentType,
|
|
4
|
+
Fragment,
|
|
5
|
+
type SVGProps,
|
|
6
|
+
} from 'react';
|
|
2
7
|
import cn from 'classnames';
|
|
3
8
|
|
|
4
|
-
import { CustomButton, CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
9
|
+
import { CustomButton, type CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
5
10
|
import {
|
|
6
11
|
getIcon,
|
|
7
|
-
PickerButtonSize,
|
|
8
|
-
PickerButtonVariant,
|
|
12
|
+
type PickerButtonSize,
|
|
13
|
+
type PickerButtonVariant,
|
|
9
14
|
} from '@alfalab/core-components-picker-button/shared';
|
|
10
|
-
import { FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
15
|
+
import { type FieldProps as BaseFieldProps } from '@alfalab/core-components-select/shared';
|
|
11
16
|
|
|
12
17
|
import styles from './index.module.css';
|
|
13
18
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import type
|
|
3
|
+
import { type CustomButtonProps } from '@alfalab/core-components-custom-button';
|
|
4
4
|
import {
|
|
5
5
|
PickerButtonMobile,
|
|
6
|
-
PickerButtonMobileProps,
|
|
6
|
+
type PickerButtonMobileProps,
|
|
7
7
|
} from '@alfalab/core-components-picker-button/mobile';
|
|
8
8
|
|
|
9
9
|
import { Field as DefaultField } from '../field';
|