@snack-uikit/button
Advanced tools
Comparing version 0.19.6-preview-a2f98ef7.0 to 0.19.6
@@ -6,2 +6,13 @@ # Change Log | ||
## 0.19.6 (2025-01-23) | ||
### Only dependencies have been changed | ||
* [@snack-uikit/counter@0.8.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/counter/CHANGELOG.md) | ||
* [@snack-uikit/loaders@0.9.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/loaders/CHANGELOG.md) | ||
* [@snack-uikit/utils@3.7.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/utils/CHANGELOG.md) | ||
## 0.19.5 (2024-12-17) | ||
@@ -8,0 +19,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
import { Size } from './types'; | ||
@@ -10,5 +10,5 @@ export type ButtonElevatedProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition' | 'label' | 'appearance' | 'labelClassName' | 'size' | 'fullWidth'> & Required<Pick<CommonButtonProps, 'icon'>> & { | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition" | "label" | "size" | "appearance" | "fullWidth" | "labelClassName"> & Required<Pick<CommonButtonProps, "icon">> & { | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "appearance" | "size" | "label" | "iconPosition" | "fullWidth" | "labelClassName"> & Required<Pick<CommonButtonProps, "icon">> & { | ||
/** Размер */ | ||
size?: Size; | ||
} & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -23,5 +23,7 @@ "use strict"; | ||
const react_1 = require("react"); | ||
const button_private_1 = require("@snack-uikit/button-private"); | ||
const utils_1 = require("@snack-uikit/utils"); | ||
const constants_1 = require("./constants"); | ||
const constants_1 = require("../../constants"); | ||
const helperComponents_1 = require("../../helperComponents"); | ||
const utils_2 = require("../../utils"); | ||
const constants_2 = require("./constants"); | ||
const styles_module_scss_1 = __importDefault(require('./styles.module.css')); | ||
@@ -31,9 +33,9 @@ exports.ButtonElevated = (0, react_1.forwardRef)((_a, ref) => { | ||
className, | ||
size = constants_1.SIZE.S, | ||
target = button_private_1.TARGET.Blank, | ||
type = button_private_1.HTML_TYPE.Button, | ||
size = constants_2.SIZE.S, | ||
target = constants_1.TARGET.Blank, | ||
type = constants_1.HTML_TYPE.Button, | ||
tabIndex | ||
} = _a, | ||
rest = __rest(_a, ["className", "size", "target", "type", "tabIndex"]); | ||
return (0, jsx_runtime_1.jsx)(button_private_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, button_private_1.extractCommonButtonProps)(rest), { | ||
return (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, utils_2.extractCommonButtonProps)(rest), { | ||
className: (0, classnames_1.default)(styles_module_scss_1.default.button, className), | ||
@@ -40,0 +42,0 @@ iconClassName: styles_module_scss_1.default.icon, |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonFilledProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonFilled: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -23,4 +23,6 @@ "use strict"; | ||
const react_1 = require("react"); | ||
const button_private_1 = require("@snack-uikit/button-private"); | ||
const utils_1 = require("@snack-uikit/utils"); | ||
const constants_1 = require("../../constants"); | ||
const helperComponents_1 = require("../../helperComponents"); | ||
const utils_2 = require("../../utils"); | ||
const styles_module_scss_1 = __importDefault(require('./styles.module.css')); | ||
@@ -30,6 +32,6 @@ exports.ButtonFilled = (0, react_1.forwardRef)((_a, ref) => { | ||
className, | ||
size = button_private_1.SIZE.S, | ||
target = button_private_1.TARGET.Blank, | ||
type = button_private_1.HTML_TYPE.Button, | ||
appearance = button_private_1.APPEARANCE.Primary, | ||
size = constants_1.SIZE.S, | ||
target = constants_1.TARGET.Blank, | ||
type = constants_1.HTML_TYPE.Button, | ||
appearance = constants_1.APPEARANCE.Primary, | ||
tabIndex, | ||
@@ -39,3 +41,3 @@ fullWidth = false | ||
rest = __rest(_a, ["className", "size", "target", "type", "appearance", "tabIndex", "fullWidth"]); | ||
return (0, jsx_runtime_1.jsx)(button_private_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, button_private_1.extractCommonButtonProps)(rest), { | ||
return (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, utils_2.extractCommonButtonProps)(rest), { | ||
className: (0, classnames_1.default)(styles_module_scss_1.default.button, className), | ||
@@ -42,0 +44,0 @@ iconClassName: styles_module_scss_1.default.icon, |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps, CounterButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, CounterButtonProps } from '../../types'; | ||
export type ButtonFunctionProps = WithSupportProps<CommonButtonProps> & CounterButtonProps; | ||
export declare const ButtonFunction: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & import("@snack-uikit/button-private").AnchorButtonProps & import("@snack-uikit/button-private").BaseButtonProps & CounterButtonProps & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & import("../../types").AnchorButtonProps & import("../../types").BaseButtonProps & CounterButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -23,4 +23,6 @@ "use strict"; | ||
const react_1 = require("react"); | ||
const button_private_1 = require("@snack-uikit/button-private"); | ||
const utils_1 = require("@snack-uikit/utils"); | ||
const constants_1 = require("../../constants"); | ||
const helperComponents_1 = require("../../helperComponents"); | ||
const utils_2 = require("../../utils"); | ||
const styles_module_scss_1 = __importDefault(require('./styles.module.css')); | ||
@@ -30,7 +32,7 @@ exports.ButtonFunction = (0, react_1.forwardRef)((_a, ref) => { | ||
className, | ||
iconPosition = button_private_1.ICON_POSITION.After, | ||
size = button_private_1.SIZE.S, | ||
target = button_private_1.TARGET.Blank, | ||
type = button_private_1.HTML_TYPE.Button, | ||
appearance = button_private_1.APPEARANCE.Neutral, | ||
iconPosition = constants_1.ICON_POSITION.After, | ||
size = constants_1.SIZE.S, | ||
target = constants_1.TARGET.Blank, | ||
type = constants_1.HTML_TYPE.Button, | ||
appearance = constants_1.APPEARANCE.Neutral, | ||
fullWidth = false, | ||
@@ -40,3 +42,3 @@ tabIndex | ||
rest = __rest(_a, ["className", "iconPosition", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (0, jsx_runtime_1.jsx)(button_private_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, button_private_1.extractCounterButtonProps)(rest), (0, button_private_1.extractCommonButtonProps)(rest), { | ||
return (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, utils_2.extractCounterButtonProps)(rest), (0, utils_2.extractCommonButtonProps)(rest), { | ||
className: (0, classnames_1.default)(styles_module_scss_1.default.button, className), | ||
@@ -43,0 +45,0 @@ iconClassName: styles_module_scss_1.default.icon, |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonOutlineProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonOutline: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -23,4 +23,6 @@ "use strict"; | ||
const react_1 = require("react"); | ||
const button_private_1 = require("@snack-uikit/button-private"); | ||
const utils_1 = require("@snack-uikit/utils"); | ||
const constants_1 = require("../../constants"); | ||
const helperComponents_1 = require("../../helperComponents"); | ||
const utils_2 = require("../../utils"); | ||
const styles_module_scss_1 = __importDefault(require('./styles.module.css')); | ||
@@ -30,6 +32,6 @@ exports.ButtonOutline = (0, react_1.forwardRef)((_a, ref) => { | ||
className, | ||
size = button_private_1.SIZE.S, | ||
target = button_private_1.TARGET.Blank, | ||
type = button_private_1.HTML_TYPE.Button, | ||
appearance = button_private_1.APPEARANCE.Primary, | ||
size = constants_1.SIZE.S, | ||
target = constants_1.TARGET.Blank, | ||
type = constants_1.HTML_TYPE.Button, | ||
appearance = constants_1.APPEARANCE.Primary, | ||
fullWidth = false, | ||
@@ -39,3 +41,3 @@ tabIndex | ||
rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (0, jsx_runtime_1.jsx)(button_private_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, button_private_1.extractCommonButtonProps)(rest), { | ||
return (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, utils_2.extractCommonButtonProps)(rest), { | ||
className: (0, classnames_1.default)(styles_module_scss_1.default.button, className), | ||
@@ -42,0 +44,0 @@ iconClassName: styles_module_scss_1.default.icon, |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonSimpleProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonSimple: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -23,4 +23,6 @@ "use strict"; | ||
const react_1 = require("react"); | ||
const button_private_1 = require("@snack-uikit/button-private"); | ||
const utils_1 = require("@snack-uikit/utils"); | ||
const constants_1 = require("../../constants"); | ||
const helperComponents_1 = require("../../helperComponents"); | ||
const utils_2 = require("../../utils"); | ||
const styles_module_scss_1 = __importDefault(require('./styles.module.css')); | ||
@@ -30,6 +32,6 @@ exports.ButtonSimple = (0, react_1.forwardRef)((_a, ref) => { | ||
className, | ||
size = button_private_1.SIZE.S, | ||
target = button_private_1.TARGET.Blank, | ||
type = button_private_1.HTML_TYPE.Button, | ||
appearance = button_private_1.APPEARANCE.Neutral, | ||
size = constants_1.SIZE.S, | ||
target = constants_1.TARGET.Blank, | ||
type = constants_1.HTML_TYPE.Button, | ||
appearance = constants_1.APPEARANCE.Neutral, | ||
fullWidth = false, | ||
@@ -39,3 +41,3 @@ tabIndex | ||
rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (0, jsx_runtime_1.jsx)(button_private_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, button_private_1.extractCommonButtonProps)(rest), { | ||
return (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, utils_2.extractCommonButtonProps)(rest), { | ||
className: (0, classnames_1.default)(styles_module_scss_1.default.button, className), | ||
@@ -42,0 +44,0 @@ iconClassName: styles_module_scss_1.default.icon, |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonTonalProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonTonal: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -23,4 +23,6 @@ "use strict"; | ||
const react_1 = require("react"); | ||
const button_private_1 = require("@snack-uikit/button-private"); | ||
const utils_1 = require("@snack-uikit/utils"); | ||
const constants_1 = require("../../constants"); | ||
const helperComponents_1 = require("../../helperComponents"); | ||
const utils_2 = require("../../utils"); | ||
const styles_module_scss_1 = __importDefault(require('./styles.module.css')); | ||
@@ -30,6 +32,6 @@ exports.ButtonTonal = (0, react_1.forwardRef)((_a, ref) => { | ||
className, | ||
size = button_private_1.SIZE.S, | ||
target = button_private_1.TARGET.Blank, | ||
type = button_private_1.HTML_TYPE.Button, | ||
appearance = button_private_1.APPEARANCE.Primary, | ||
size = constants_1.SIZE.S, | ||
target = constants_1.TARGET.Blank, | ||
type = constants_1.HTML_TYPE.Button, | ||
appearance = constants_1.APPEARANCE.Primary, | ||
fullWidth = false, | ||
@@ -39,3 +41,3 @@ tabIndex | ||
rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (0, jsx_runtime_1.jsx)(button_private_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, button_private_1.extractCommonButtonProps)(rest), { | ||
return (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonPrivate, Object.assign({}, (0, utils_1.extractSupportProps)(rest), (0, utils_2.extractCommonButtonProps)(rest), { | ||
className: (0, classnames_1.default)(styles_module_scss_1.default.button, className), | ||
@@ -42,0 +44,0 @@ iconClassName: styles_module_scss_1.default.icon, |
@@ -1,3 +0,3 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
import { Size } from './types'; | ||
@@ -10,5 +10,5 @@ export type ButtonElevatedProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition' | 'label' | 'appearance' | 'labelClassName' | 'size' | 'fullWidth'> & Required<Pick<CommonButtonProps, 'icon'>> & { | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition" | "label" | "size" | "appearance" | "fullWidth" | "labelClassName"> & Required<Pick<CommonButtonProps, "icon">> & { | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "appearance" | "size" | "label" | "iconPosition" | "fullWidth" | "labelClassName"> & Required<Pick<CommonButtonProps, "icon">> & { | ||
/** Размер */ | ||
size?: Size; | ||
} & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -15,4 +15,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { forwardRef } from 'react'; | ||
import { ButtonPrivate, extractCommonButtonProps, HTML_TYPE, TARGET, } from '@snack-uikit/button-private'; | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { HTML_TYPE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
import { extractCommonButtonProps } from '../../utils'; | ||
import { SIZE } from './constants'; | ||
@@ -19,0 +21,0 @@ import styles from './styles.module.css'; |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonFilledProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonFilled: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -15,4 +15,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { forwardRef } from 'react'; | ||
import { APPEARANCE, ButtonPrivate, extractCommonButtonProps, HTML_TYPE, SIZE, TARGET, } from '@snack-uikit/button-private'; | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
import { extractCommonButtonProps } from '../../utils'; | ||
import styles from './styles.module.css'; | ||
@@ -19,0 +21,0 @@ export const ButtonFilled = forwardRef((_a, ref) => { |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps, CounterButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, CounterButtonProps } from '../../types'; | ||
export type ButtonFunctionProps = WithSupportProps<CommonButtonProps> & CounterButtonProps; | ||
export declare const ButtonFunction: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & import("@snack-uikit/button-private").AnchorButtonProps & import("@snack-uikit/button-private").BaseButtonProps & CounterButtonProps & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & import("../../types").AnchorButtonProps & import("../../types").BaseButtonProps & CounterButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -15,4 +15,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { forwardRef } from 'react'; | ||
import { APPEARANCE, ButtonPrivate, extractCommonButtonProps, extractCounterButtonProps, HTML_TYPE, ICON_POSITION, SIZE, TARGET, } from '@snack-uikit/button-private'; | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, ICON_POSITION, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
import { extractCommonButtonProps, extractCounterButtonProps } from '../../utils'; | ||
import styles from './styles.module.css'; | ||
@@ -19,0 +21,0 @@ export const ButtonFunction = forwardRef((_a, ref) => { |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonOutlineProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonOutline: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -15,4 +15,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { forwardRef } from 'react'; | ||
import { APPEARANCE, ButtonPrivate, extractCommonButtonProps, HTML_TYPE, SIZE, TARGET, } from '@snack-uikit/button-private'; | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
import { extractCommonButtonProps } from '../../utils'; | ||
import styles from './styles.module.css'; | ||
@@ -19,0 +21,0 @@ export const ButtonOutline = forwardRef((_a, ref) => { |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonSimpleProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonSimple: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -15,4 +15,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { forwardRef } from 'react'; | ||
import { APPEARANCE, ButtonPrivate, extractCommonButtonProps, HTML_TYPE, SIZE, TARGET, } from '@snack-uikit/button-private'; | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
import { extractCommonButtonProps } from '../../utils'; | ||
import styles from './styles.module.css'; | ||
@@ -19,0 +21,0 @@ export const ButtonSimple = forwardRef((_a, ref) => { |
@@ -1,6 +0,6 @@ | ||
import { CommonButtonProps } from '@snack-uikit/button-private'; | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonTonalProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonTonal: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -15,4 +15,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { forwardRef } from 'react'; | ||
import { APPEARANCE, ButtonPrivate, extractCommonButtonProps, HTML_TYPE, SIZE, TARGET, } from '@snack-uikit/button-private'; | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
import { extractCommonButtonProps } from '../../utils'; | ||
import styles from './styles.module.css'; | ||
@@ -19,0 +21,0 @@ export const ButtonTonal = forwardRef((_a, ref) => { |
@@ -7,3 +7,3 @@ { | ||
"title": "Button", | ||
"version": "0.19.6-preview-a2f98ef7.0", | ||
"version": "0.19.6", | ||
"sideEffects": [ | ||
@@ -40,7 +40,8 @@ "*.css", | ||
"dependencies": { | ||
"@snack-uikit/button-private": "0.0.1-preview-a2f98ef7.0", | ||
"@snack-uikit/utils": "3.6.0", | ||
"@snack-uikit/counter": "0.8.3", | ||
"@snack-uikit/loaders": "0.9.1", | ||
"@snack-uikit/utils": "3.7.0", | ||
"classnames": "2.5.1" | ||
}, | ||
"gitHead": "16999df080b0b870c1a90ba74aa6c296cd4d480b" | ||
"gitHead": "3528e78aec23804dca44d311947c1dcd4ed3792b" | ||
} |
@@ -56,2 +56,18 @@ # Button | ||
|------|------|---------------|-------------| | ||
| href | `string` | - | Ссылка | | ||
| target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| className | `string` | - | CSS-класс | | ||
| disabled | `boolean` | - | Флаг неактивности компонента | | ||
| icon | `ReactElement` | - | Иконка | | ||
| label | `string` | - | Текст кнопки | | ||
| loading | `boolean` | - | Флаг состояния загрузки | | ||
| onClick | `MouseEventHandler<HTMLElement>` | - | Колбек обработки клика | | ||
| onKeyDown | `KeyboardEventHandler<HTMLElement>` | - | Колбек обработки нажатия клавиши | | ||
| onFocus | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки фокуса | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | primary | Внешний вид кнопки | | ||
| type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| ref | `LegacyRef<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | ||
@@ -63,2 +79,18 @@ | key | `Key` | - | | | ||
|------|------|---------------|-------------| | ||
| href | `string` | - | Ссылка | | ||
| target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| className | `string` | - | CSS-класс | | ||
| disabled | `boolean` | - | Флаг неактивности компонента | | ||
| icon | `ReactElement` | - | Иконка | | ||
| label | `string` | - | Текст кнопки | | ||
| loading | `boolean` | - | Флаг состояния загрузки | | ||
| onClick | `MouseEventHandler<HTMLElement>` | - | Колбек обработки клика | | ||
| onKeyDown | `KeyboardEventHandler<HTMLElement>` | - | Колбек обработки нажатия клавиши | | ||
| onFocus | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки фокуса | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | neutral | Внешний вид кнопки | | ||
| type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| ref | `LegacyRef<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | ||
@@ -70,2 +102,18 @@ | key | `Key` | - | | | ||
|------|------|---------------|-------------| | ||
| href | `string` | - | Ссылка | | ||
| target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| className | `string` | - | CSS-класс | | ||
| disabled | `boolean` | - | Флаг неактивности компонента | | ||
| icon | `ReactElement` | - | Иконка | | ||
| label | `string` | - | Текст кнопки | | ||
| loading | `boolean` | - | Флаг состояния загрузки | | ||
| onClick | `MouseEventHandler<HTMLElement>` | - | Колбек обработки клика | | ||
| onKeyDown | `KeyboardEventHandler<HTMLElement>` | - | Колбек обработки нажатия клавиши | | ||
| onFocus | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки фокуса | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | primary | Внешний вид кнопки | | ||
| type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| ref | `LegacyRef<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | ||
@@ -77,2 +125,18 @@ | key | `Key` | - | | | ||
|------|------|---------------|-------------| | ||
| href | `string` | - | Ссылка | | ||
| target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| className | `string` | - | CSS-класс | | ||
| disabled | `boolean` | - | Флаг неактивности компонента | | ||
| icon | `ReactElement` | - | Иконка | | ||
| label | `string` | - | Текст кнопки | | ||
| loading | `boolean` | - | Флаг состояния загрузки | | ||
| onClick | `MouseEventHandler<HTMLElement>` | - | Колбек обработки клика | | ||
| onKeyDown | `KeyboardEventHandler<HTMLElement>` | - | Колбек обработки нажатия клавиши | | ||
| onFocus | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки фокуса | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | primary | Внешний вид кнопки | | ||
| type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| ref | `LegacyRef<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | ||
@@ -84,2 +148,22 @@ | key | `Key` | - | | | ||
|------|------|---------------|-------------| | ||
| href | `string` | - | Ссылка | | ||
| target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| className | `string` | - | CSS-класс | | ||
| disabled | `boolean` | - | Флаг неактивности компонента | | ||
| icon | `ReactElement` | - | Иконка | | ||
| iconPosition | enum IconPosition: `"before"`, `"after"` | after | Позиция иконки | | ||
| label | `string` | - | Текст кнопки | | ||
| loading | `boolean` | - | Флаг состояния загрузки | | ||
| onClick | `MouseEventHandler<HTMLElement>` | - | Колбек обработки клика | | ||
| onKeyDown | `KeyboardEventHandler<HTMLElement>` | - | Колбек обработки нажатия клавиши | | ||
| onFocus | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки фокуса | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | neutral | Внешний вид кнопки | | ||
| type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| counter | `CounterInButtonProps` | - | Пропсы каунтера в кнопке | | ||
| ref | `LegacyRef<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | ||
| key | `Key` | - | | | ||
## ButtonElevated | ||
@@ -89,2 +173,15 @@ ### Props | ||
|------|------|---------------|-------------| | ||
| href | `string` | - | Ссылка | | ||
| target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| className | `string` | - | CSS-класс | | ||
| disabled | `boolean` | - | Флаг неактивности компонента | | ||
| icon | `ReactElement` | - | Иконка | | ||
| loading | `boolean` | - | Флаг состояния загрузки | | ||
| onClick | `MouseEventHandler<HTMLElement>` | - | Колбек обработки клика | | ||
| onKeyDown | `KeyboardEventHandler<HTMLElement>` | - | Колбек обработки нажатия клавиши | | ||
| onFocus | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки фокуса | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| ref | `LegacyRef<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | ||
@@ -91,0 +188,0 @@ | key | `Key` | - | | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
298559
148
5916
186
4
+ Added@snack-uikit/counter@0.8.3
+ Added@snack-uikit/loaders@0.9.1
+ Added@snack-uikit/counter@0.8.3(transitive)
+ Added@snack-uikit/loaders@0.9.1(transitive)
+ Added@snack-uikit/utils@3.7.0(transitive)
- Removed@snack-uikit/button-private@0.0.1-preview-a2f98ef7.0
- Removed@snack-uikit/button-private@0.0.1-preview-a2f98ef7.0(transitive)
- Removed@snack-uikit/counter@0.8.2(transitive)
- Removed@snack-uikit/loaders@0.9.0(transitive)
- Removed@snack-uikit/utils@3.6.0(transitive)
Updated@snack-uikit/utils@3.7.0