@mirohq/design-system-input 0.1.0-forms.2 → 0.1.0-forms.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/dist/main.js +113 -59
- package/dist/main.js.map +1 -1
- package/dist/module.js +113 -59
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +17 -33
- package/package.json +7 -6
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ComponentPropsWithRef,
|
|
3
|
-
import { inputSymbol } from '@mirohq/design-system-base-input';
|
|
2
|
+
import react__default, { ComponentPropsWithRef, InputHTMLAttributes, HTMLProps } from 'react';
|
|
4
3
|
import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
|
|
5
4
|
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
6
5
|
import * as _stitches_react_types_css_util from '@stitches/react/types/css-util';
|
|
@@ -8,7 +7,6 @@ import * as _mirohq_design_system_components_primitive from '@mirohq/design-syst
|
|
|
8
7
|
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
|
|
9
8
|
import * as packages_components_internal_base_button_src_base_button from 'packages/components/internal/base-button/src/base-button';
|
|
10
9
|
import * as _mirohq_design_system_hooks_use_press from '@mirohq/design-system-hooks/use-press';
|
|
11
|
-
import { Booleanish } from '@mirohq/design-system-types';
|
|
12
10
|
|
|
13
11
|
declare const StyledIconSlot: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<_stitches_react_types_styled_component.StyledComponent<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}, _stitches_react_types_css_util.CSS<{}, {
|
|
14
12
|
'border-widths': {
|
|
@@ -4458,20 +4456,14 @@ declare const StyledBaseInput: react.ForwardRefExoticComponent<Omit<Omit<_mirohq
|
|
|
4458
4456
|
}, {}>;
|
|
4459
4457
|
declare type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>;
|
|
4460
4458
|
|
|
4461
|
-
interface BaseInputProps extends Omit<StyledBaseInputProps, keyof
|
|
4462
|
-
'aria-disabled'?: Booleanish | undefined;
|
|
4463
|
-
disabled?: boolean | undefined;
|
|
4464
|
-
readOnly?: boolean | undefined;
|
|
4465
|
-
valid?: boolean | undefined;
|
|
4466
|
-
hovered?: boolean | undefined;
|
|
4467
|
-
focused?: boolean | undefined;
|
|
4468
|
-
children: react__default.ReactNode;
|
|
4469
|
-
className?: string | undefined;
|
|
4470
|
-
value?: string | number | readonly string[] | undefined;
|
|
4471
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
4459
|
+
interface BaseInputProps extends Omit<StyledBaseInputProps, Exclude<keyof InputHTMLAttributes<'input' | 'div'>, 'size'>>, Omit<InputHTMLAttributes<any>, 'size'> {
|
|
4472
4460
|
label?: react__default.ReactNode;
|
|
4461
|
+
valid?: boolean;
|
|
4462
|
+
hovered?: boolean;
|
|
4463
|
+
focused?: boolean;
|
|
4473
4464
|
}
|
|
4474
4465
|
|
|
4466
|
+
declare type Value = HTMLProps<'input'>['value'];
|
|
4475
4467
|
interface InputSharedProps extends Omit<InputProps$1, 'size'> {
|
|
4476
4468
|
/** The input's state is indicated by both an icon and border color. A
|
|
4477
4469
|
* green check mark signifies valid input, while a red warning icon denotes
|
|
@@ -4488,8 +4480,6 @@ interface InputSharedProps extends Omit<InputProps$1, 'size'> {
|
|
|
4488
4480
|
*/
|
|
4489
4481
|
children?: React.ReactNode;
|
|
4490
4482
|
}
|
|
4491
|
-
|
|
4492
|
-
declare type Value$1 = HTMLProps<'input'>['value'];
|
|
4493
4483
|
interface ClearProps {
|
|
4494
4484
|
/**
|
|
4495
4485
|
* Show X button for clearing the input value.
|
|
@@ -4502,26 +4492,24 @@ interface ClearProps {
|
|
|
4502
4492
|
/**
|
|
4503
4493
|
* Callback event called when clearing the input.
|
|
4504
4494
|
*/
|
|
4505
|
-
onClear?: (value: Value
|
|
4495
|
+
onClear?: (value: Value) => void;
|
|
4506
4496
|
/**
|
|
4507
4497
|
* The controlled input's value.
|
|
4508
4498
|
*/
|
|
4509
|
-
value?: Value
|
|
4499
|
+
value?: Value;
|
|
4510
4500
|
}
|
|
4511
|
-
|
|
4512
|
-
declare type InputProps = InputSharedProps & ({
|
|
4501
|
+
declare type ClearableInputProps = InputSharedProps & ({
|
|
4513
4502
|
clearable?: never;
|
|
4514
4503
|
} | ClearProps);
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4504
|
+
|
|
4505
|
+
declare type InputProps = ClearableInputProps;
|
|
4506
|
+
declare const Input: react__default.ForwardRefExoticComponent<ClearableInputProps> & Partials$2;
|
|
4518
4507
|
interface Partials$2 {
|
|
4519
4508
|
ActionButton: typeof ActionButton;
|
|
4520
4509
|
IconSlot: typeof IconSlot;
|
|
4521
4510
|
}
|
|
4522
4511
|
|
|
4523
|
-
|
|
4524
|
-
interface InputPasswordProps extends Omit<InputSharedProps, 'type' | 'children'> {
|
|
4512
|
+
interface InputPasswordProps extends Omit<ClearableInputProps, 'type' | 'children'> {
|
|
4525
4513
|
/**
|
|
4526
4514
|
* A boolean for the default password state (visible or masked).
|
|
4527
4515
|
*/
|
|
@@ -4549,18 +4537,14 @@ interface InputPasswordProps extends Omit<InputSharedProps, 'type' | 'children'>
|
|
|
4549
4537
|
}
|
|
4550
4538
|
declare const InputPassword: react__default.ForwardRefExoticComponent<Omit<InputPasswordProps, "ref"> & react__default.RefAttributes<HTMLInputElement>>;
|
|
4551
4539
|
|
|
4552
|
-
declare type InputEmailProps =
|
|
4553
|
-
|
|
4554
|
-
} | ClearProps);
|
|
4555
|
-
declare const InputEmail: react__default.ForwardRefExoticComponent<InputEmailProps> & Partials$1;
|
|
4540
|
+
declare type InputEmailProps = ClearableInputProps;
|
|
4541
|
+
declare const InputEmail: react__default.ForwardRefExoticComponent<ClearableInputProps> & Partials$1;
|
|
4556
4542
|
interface Partials$1 {
|
|
4557
4543
|
ActionButton: typeof ActionButton;
|
|
4558
4544
|
}
|
|
4559
4545
|
|
|
4560
|
-
declare type InputSearchProps =
|
|
4561
|
-
|
|
4562
|
-
} | ClearProps);
|
|
4563
|
-
declare const InputSearch: react__default.ForwardRefExoticComponent<InputSearchProps> & Partials;
|
|
4546
|
+
declare type InputSearchProps = ClearableInputProps;
|
|
4547
|
+
declare const InputSearch: react__default.ForwardRefExoticComponent<ClearableInputProps> & Partials;
|
|
4564
4548
|
interface Partials {
|
|
4565
4549
|
ActionButton: typeof ActionButton;
|
|
4566
4550
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-input",
|
|
3
|
-
"version": "0.1.0-forms.
|
|
3
|
+
"version": "0.1.0-forms.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -27,19 +27,20 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@react-aria/interactions": "^3.13.0",
|
|
30
|
-
"@react-aria/utils": "^3.13.0",
|
|
31
30
|
"@react-types/shared": "^3.16.0",
|
|
32
31
|
"@mirohq/design-system-base-button": "^0.4.36-forms.1",
|
|
32
|
+
"@mirohq/design-system-base-form": "^0.1.0-forms.0",
|
|
33
|
+
"@mirohq/design-system-base-input": "^0.1.0-forms.2",
|
|
33
34
|
"@mirohq/design-system-base-icon": "^0.1.21-forms.0",
|
|
34
35
|
"@mirohq/design-system-icon-button": "^2.1.8-forms.1",
|
|
35
|
-
"@mirohq/design-system-icons": "^0.
|
|
36
|
+
"@mirohq/design-system-icons": "^0.36.1-forms.1",
|
|
36
37
|
"@mirohq/design-system-primitive": "^1.1.2-forms.0",
|
|
37
38
|
"@mirohq/design-system-stitches": "^2.6.0",
|
|
38
|
-
"@mirohq/design-system-base-input": "^0.1.0-forms.1",
|
|
39
39
|
"@mirohq/design-system-styles": "^1.1.19",
|
|
40
|
+
"@mirohq/design-system-use-aria-disabled": "^0.1.0-forms.0",
|
|
40
41
|
"@mirohq/design-system-tooltip": "^3.3.4-forms.1",
|
|
41
|
-
"@mirohq/design-system-
|
|
42
|
-
"@mirohq/design-system-
|
|
42
|
+
"@mirohq/design-system-utils": "^0.15.0-forms.0",
|
|
43
|
+
"@mirohq/design-system-use-layout-effect": "^0.2.1"
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
|
45
46
|
"build": "rollup -c ../../../rollup.config.js",
|