@foxford/ui 2.0.0-beta-8e01b3e-20220707 → 2.0.0-beta-a9b3e3f-20220707
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/style.js +1 -1
- package/components/Checkbox/style.js.map +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input/helpers.js +1 -1
- package/components/Input/helpers.js.map +1 -1
- package/components/Input/style.js +1 -1
- package/components/Input/style.js.map +1 -1
- package/components/Radio/Radio.js +1 -1
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/style.js +1 -1
- package/components/Radio/style.js.map +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/Select.js.map +1 -1
- package/components/Select/style.js +1 -1
- package/components/Select/style.js.map +1 -1
- package/dts/index.d.ts +30 -11
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/mixins/responsive-property.js.map +1 -1
- package/mixins/shared.js.map +1 -1
- package/package.json +1 -1
- package/components/Input/constants.js +0 -2
- package/components/Input/constants.js.map +0 -1
package/dts/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import * as type_fest_source_partial_deep from 'type-fest/source/partial-deep';
|
|
|
12
12
|
import * as react_floater_lib_types from 'react-floater/lib/types';
|
|
13
13
|
import Floater from 'react-floater';
|
|
14
14
|
import { InputState, MaskOptions } from 'react-input-mask';
|
|
15
|
+
import { SizeInput as SizeInput$1 } from 'shared/enums/sizeInput';
|
|
15
16
|
import { ReactSelectProps } from 'react-select';
|
|
16
17
|
|
|
17
18
|
declare enum ColorNames {
|
|
@@ -230,7 +231,7 @@ declare type ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL';
|
|
|
230
231
|
declare type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = {
|
|
231
232
|
[key in `${T}${ResponsiveKeys}`]?: V;
|
|
232
233
|
};
|
|
233
|
-
declare type ResponsiveProperty<V = number |
|
|
234
|
+
declare type ResponsiveProperty<V = number | keyof typeof SizeLatin> = V | [desktop: V, tablet: V, mobile: V] | [xl: V, l: V, m: V, s: V, xs: V, xxs: V];
|
|
234
235
|
declare const property: (value: PossibleValues, cssProperty?: CssProperty, sizing?: null | string) => () => () => FlattenSimpleInterpolation | null;
|
|
235
236
|
/**
|
|
236
237
|
* Sort keys as desktop first
|
|
@@ -273,6 +274,13 @@ declare const responsiveNamedProperty: <T extends PropsProperties>({ sizes, cssP
|
|
|
273
274
|
*/
|
|
274
275
|
declare const responsiveProperty: (property: string, cssProperty?: string | null, sizing?: null | string) => () => (props: any) => styled_components.FlattenInterpolation<styled_components.ThemeProps<styled_components.DefaultTheme>> | null;
|
|
275
276
|
|
|
277
|
+
declare enum SizeInput {
|
|
278
|
+
l = 380,
|
|
279
|
+
m = 300,
|
|
280
|
+
s = 220,
|
|
281
|
+
xs = 140
|
|
282
|
+
}
|
|
283
|
+
|
|
276
284
|
declare type HEX = `#${string}`;
|
|
277
285
|
declare type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
278
286
|
declare type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
@@ -291,7 +299,7 @@ interface BaseProps {
|
|
|
291
299
|
*/
|
|
292
300
|
style?: React.CSSProperties;
|
|
293
301
|
}
|
|
294
|
-
interface InputField extends Color, Color<'placeholderColor'>, ResponsiveNamedProperty<'width', 'auto' |
|
|
302
|
+
interface InputField extends Color, Color<'placeholderColor'>, ResponsiveNamedProperty<'width', 'auto' | keyof typeof SizeInput | number> {
|
|
295
303
|
/**
|
|
296
304
|
* Is disabled field
|
|
297
305
|
*/
|
|
@@ -2268,7 +2276,7 @@ declare class InputPhone extends PureComponent<typeof InputPhone.defaultProps &
|
|
|
2268
2276
|
static defaultProps: {
|
|
2269
2277
|
rounded: boolean;
|
|
2270
2278
|
type: string;
|
|
2271
|
-
width:
|
|
2279
|
+
width: SizeInput;
|
|
2272
2280
|
color: string;
|
|
2273
2281
|
mask: string;
|
|
2274
2282
|
placeholderColor: string;
|
|
@@ -2348,12 +2356,12 @@ interface InputProps extends BaseProps, InputField, InputHTMLAttributes {
|
|
|
2348
2356
|
* - [`InputField`](#/Миксины)
|
|
2349
2357
|
* - `React.InputHTMLAttributes<HTMLInputElement>`
|
|
2350
2358
|
*/
|
|
2351
|
-
declare function Input(props: InputProps
|
|
2359
|
+
declare function Input(props: InputProps): JSX.Element;
|
|
2352
2360
|
declare namespace Input {
|
|
2353
2361
|
var defaultProps: {
|
|
2354
2362
|
rounded: boolean;
|
|
2355
2363
|
type: string;
|
|
2356
|
-
width:
|
|
2364
|
+
width: SizeInput$1;
|
|
2357
2365
|
color: string;
|
|
2358
2366
|
mask: string;
|
|
2359
2367
|
placeholderColor: string;
|
|
@@ -2376,8 +2384,8 @@ interface RadioGroupProps extends BaseProps {
|
|
|
2376
2384
|
}
|
|
2377
2385
|
declare function RadioGroup({ children, ...props }: RadioGroupProps): JSX.Element;
|
|
2378
2386
|
|
|
2379
|
-
declare type RadioInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
2380
|
-
interface RadioProps extends BaseProps, RadioInputHtmlAttributes {
|
|
2387
|
+
declare type RadioInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'width'>;
|
|
2388
|
+
interface RadioProps extends BaseProps, Display, RadioInputHtmlAttributes {
|
|
2381
2389
|
/**
|
|
2382
2390
|
* Field id
|
|
2383
2391
|
*/
|
|
@@ -2419,6 +2427,8 @@ interface RadioProps extends BaseProps, RadioInputHtmlAttributes {
|
|
|
2419
2427
|
* Value
|
|
2420
2428
|
*/
|
|
2421
2429
|
value?: string | number;
|
|
2430
|
+
fluid?: boolean;
|
|
2431
|
+
width?: ResponsiveProperty<'auto' | number | keyof typeof SizeInput>;
|
|
2422
2432
|
}
|
|
2423
2433
|
/**
|
|
2424
2434
|
* Расширен:
|
|
@@ -2431,6 +2441,8 @@ declare namespace Radio {
|
|
|
2431
2441
|
disabled: boolean;
|
|
2432
2442
|
size: string;
|
|
2433
2443
|
defaultChecked: boolean;
|
|
2444
|
+
display: string;
|
|
2445
|
+
width: SizeInput;
|
|
2434
2446
|
onChange: (e: react.ChangeEvent<HTMLInputElement>) => void;
|
|
2435
2447
|
};
|
|
2436
2448
|
var Group: typeof RadioGroup;
|
|
@@ -2443,8 +2455,8 @@ interface CheckboxGroupProps extends BaseProps {
|
|
|
2443
2455
|
}
|
|
2444
2456
|
declare function CheckboxGroup({ children, ...props }: CheckboxGroupProps): JSX.Element;
|
|
2445
2457
|
|
|
2446
|
-
declare type CheckboxInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
2447
|
-
interface CheckboxProps extends BaseProps, CheckboxInputHtmlAttributes {
|
|
2458
|
+
declare type CheckboxInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'width'>;
|
|
2459
|
+
interface CheckboxProps extends BaseProps, Display, CheckboxInputHtmlAttributes {
|
|
2448
2460
|
/**
|
|
2449
2461
|
* Children react node
|
|
2450
2462
|
*/
|
|
@@ -2485,6 +2497,8 @@ interface CheckboxProps extends BaseProps, CheckboxInputHtmlAttributes {
|
|
|
2485
2497
|
* Checkbox size
|
|
2486
2498
|
*/
|
|
2487
2499
|
size?: 'small' | 'medium' | 'large' | 'extraLarge' | 's' | 'm' | 'l' | 'xl';
|
|
2500
|
+
fluid?: boolean;
|
|
2501
|
+
width?: ResponsiveProperty<'auto' | number | keyof typeof SizeInput>;
|
|
2488
2502
|
}
|
|
2489
2503
|
/**
|
|
2490
2504
|
* Расширен:
|
|
@@ -2497,22 +2511,25 @@ declare namespace Checkbox {
|
|
|
2497
2511
|
disabled: boolean;
|
|
2498
2512
|
size: string;
|
|
2499
2513
|
defaultChecked: boolean;
|
|
2514
|
+
display: string;
|
|
2515
|
+
width: SizeInput;
|
|
2500
2516
|
onChange: (e: react.ChangeEvent<HTMLInputElement>) => void;
|
|
2501
2517
|
};
|
|
2502
2518
|
var Group: typeof CheckboxGroup;
|
|
2503
2519
|
var displayName: string;
|
|
2504
2520
|
}
|
|
2505
2521
|
|
|
2506
|
-
interface SelectProps extends BaseProps, ReactSelectProps {
|
|
2522
|
+
interface SelectProps extends BaseProps, ReactSelectProps, Display {
|
|
2507
2523
|
fluid?: boolean;
|
|
2508
2524
|
error?: boolean;
|
|
2525
|
+
width?: ResponsiveProperty<'auto' | number | keyof typeof SizeInput>;
|
|
2509
2526
|
}
|
|
2510
2527
|
/**
|
|
2511
2528
|
* Расширен:
|
|
2512
2529
|
* - [`BaseProps`](#/Миксины)
|
|
2513
2530
|
* - `ReactSelectProps`
|
|
2514
2531
|
*/
|
|
2515
|
-
declare function Select(props:
|
|
2532
|
+
declare function Select(props: SelectProps): JSX.Element;
|
|
2516
2533
|
declare namespace Select {
|
|
2517
2534
|
var defaultProps: {
|
|
2518
2535
|
allowCreate: boolean;
|
|
@@ -2528,6 +2545,8 @@ declare namespace Select {
|
|
|
2528
2545
|
loadingPlaceholder: string;
|
|
2529
2546
|
autoload: boolean;
|
|
2530
2547
|
loadOptions: boolean;
|
|
2548
|
+
display: string;
|
|
2549
|
+
width: SizeInput;
|
|
2531
2550
|
};
|
|
2532
2551
|
var displayName: string;
|
|
2533
2552
|
}
|