@devopness/ui-react 2.150.1 → 2.152.0
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/src/components/Forms/Input/Input.d.ts +107 -0
- package/dist/src/components/Forms/Input/Input.styled.d.ts +14 -0
- package/dist/src/components/Forms/Input/index.d.ts +1 -0
- package/dist/src/components/Forms/index.d.ts +1 -0
- package/dist/src/components/Primitives/ArrowHead/ArrowHead.d.ts +24 -0
- package/dist/src/components/Primitives/ArrowHead/ArrowHead.styled.d.ts +9 -0
- package/dist/src/components/Primitives/ArrowHead/index.d.ts +1 -0
- package/dist/src/components/Primitives/Label/Label.d.ts +31 -0
- package/dist/src/components/Primitives/Label/Label.styled.d.ts +4 -0
- package/dist/src/components/Primitives/Label/index.d.ts +1 -0
- package/dist/src/components/Primitives/index.d.ts +2 -0
- package/dist/src/components/styles.d.ts +13 -0
- package/dist/ui-react.cjs +229 -133
- package/dist/ui-react.js +2779 -2623
- package/package.json +12 -12
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ErrorMessageProps } from '../../Primitives/ErrorMessage';
|
|
3
|
+
import { LabelProps } from '../../Primitives/Label';
|
|
4
|
+
type SharedProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
5
|
+
/** React ref for direct DOM manipulation */
|
|
6
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
7
|
+
/** Error message configuration */
|
|
8
|
+
error?: ErrorMessageProps['error'];
|
|
9
|
+
/** Props passed directly to Label component */
|
|
10
|
+
labelProps?: LabelProps;
|
|
11
|
+
/** Custom styling options for input text */
|
|
12
|
+
publicStyle?: {
|
|
13
|
+
/** Font style applied to input value */
|
|
14
|
+
fontStyleValue?: string;
|
|
15
|
+
/** Font style applied to placeholder */
|
|
16
|
+
fontStylePlaceholder?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Props passed directly to input HTML element
|
|
20
|
+
*
|
|
21
|
+
* @override props, e.g: inputProps.type overrides props.type
|
|
22
|
+
*
|
|
23
|
+
* <Input type="text" inputProps={{type: 'number'}} /> // input type is number
|
|
24
|
+
*/
|
|
25
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
26
|
+
};
|
|
27
|
+
type InputProps = (SharedProps & {
|
|
28
|
+
/** HTML input type (text, number, email, etc) */
|
|
29
|
+
type: Exclude<React.HTMLInputTypeAttribute, 'number'>;
|
|
30
|
+
}) | (SharedProps & {
|
|
31
|
+
/** HTML input type (text, number, email, etc) */
|
|
32
|
+
type: 'number';
|
|
33
|
+
/** Removes increment/decrement arrows from number inputs */
|
|
34
|
+
removeArrows?: boolean;
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Allows users to enter and edit text
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```
|
|
41
|
+
* <Input
|
|
42
|
+
* type="text"
|
|
43
|
+
* label={{ value: "Username" }}
|
|
44
|
+
* placeholder="Enter username"
|
|
45
|
+
* error={{ message: "This field is required" }}
|
|
46
|
+
* publicStyle={{
|
|
47
|
+
* fontStyleValue: "bold",
|
|
48
|
+
* fontStylePlaceholder: "italic"
|
|
49
|
+
* }}
|
|
50
|
+
* />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare const Input: React.ForwardRefExoticComponent<(Omit<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
54
|
+
/** React ref for direct DOM manipulation */
|
|
55
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
56
|
+
/** Error message configuration */
|
|
57
|
+
error?: ErrorMessageProps["error"];
|
|
58
|
+
/** Props passed directly to Label component */
|
|
59
|
+
labelProps?: LabelProps;
|
|
60
|
+
/** Custom styling options for input text */
|
|
61
|
+
publicStyle?: {
|
|
62
|
+
/** Font style applied to input value */
|
|
63
|
+
fontStyleValue?: string;
|
|
64
|
+
/** Font style applied to placeholder */
|
|
65
|
+
fontStylePlaceholder?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Props passed directly to input HTML element
|
|
69
|
+
*
|
|
70
|
+
* @override props, e.g: inputProps.type overrides props.type
|
|
71
|
+
*
|
|
72
|
+
* <Input type="text" inputProps={{type: 'number'}} /> // input type is number
|
|
73
|
+
*/
|
|
74
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
75
|
+
} & {
|
|
76
|
+
/** HTML input type (text, number, email, etc) */
|
|
77
|
+
type: Exclude<React.HTMLInputTypeAttribute, "number">;
|
|
78
|
+
}, "ref"> | Omit<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
79
|
+
/** React ref for direct DOM manipulation */
|
|
80
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
81
|
+
/** Error message configuration */
|
|
82
|
+
error?: ErrorMessageProps["error"];
|
|
83
|
+
/** Props passed directly to Label component */
|
|
84
|
+
labelProps?: LabelProps;
|
|
85
|
+
/** Custom styling options for input text */
|
|
86
|
+
publicStyle?: {
|
|
87
|
+
/** Font style applied to input value */
|
|
88
|
+
fontStyleValue?: string;
|
|
89
|
+
/** Font style applied to placeholder */
|
|
90
|
+
fontStylePlaceholder?: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Props passed directly to input HTML element
|
|
94
|
+
*
|
|
95
|
+
* @override props, e.g: inputProps.type overrides props.type
|
|
96
|
+
*
|
|
97
|
+
* <Input type="text" inputProps={{type: 'number'}} /> // input type is number
|
|
98
|
+
*/
|
|
99
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
100
|
+
} & {
|
|
101
|
+
/** HTML input type (text, number, email, etc) */
|
|
102
|
+
type: "number";
|
|
103
|
+
/** Removes increment/decrement arrows from number inputs */
|
|
104
|
+
removeArrows?: boolean;
|
|
105
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
106
|
+
export type { InputProps };
|
|
107
|
+
export { Input };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type PropsStyled = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
type: string;
|
|
5
|
+
removeArrows?: boolean;
|
|
6
|
+
publicStyle?: {
|
|
7
|
+
fontStyleValue?: string;
|
|
8
|
+
fontStylePlaceholder?: string;
|
|
9
|
+
};
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
declare const InputText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, PropsStyled>> & string;
|
|
14
|
+
export { Container, InputText };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Input';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type ArrowHeadProps = {
|
|
2
|
+
/** Fill color for the arrow shape */
|
|
3
|
+
fill: string;
|
|
4
|
+
/** Stroke color for the arrow shape border */
|
|
5
|
+
stroke: string;
|
|
6
|
+
/** CSS styles to apply to the arrow shape */
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
/**
|
|
9
|
+
* Event handler called when the arrow is clicked.
|
|
10
|
+
*/
|
|
11
|
+
onClick?: React.MouseEventHandler;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* An arrow separator
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <ArrowHead
|
|
18
|
+
* fill="#000000"
|
|
19
|
+
* stroke="#FFFFFF"
|
|
20
|
+
* />
|
|
21
|
+
*/
|
|
22
|
+
declare const ArrowHead: ({ fill, stroke, style, onClick }: ArrowHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export type { ArrowHeadProps };
|
|
24
|
+
export { ArrowHead };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ArrowShapeProps = {
|
|
2
|
+
fill: string;
|
|
3
|
+
stroke: string;
|
|
4
|
+
};
|
|
5
|
+
declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
declare const ArrowShape: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, Omit<import('react').SVGProps<SVGSVGElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: SVGSVGElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<SVGSVGElement> | null | undefined;
|
|
8
|
+
}>, never>, ArrowShapeProps>> & string;
|
|
9
|
+
export { Container, ArrowShape };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArrowHead';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type LabelProps = {
|
|
3
|
+
/** Main label text/node */
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
/** Help text shown in tooltip */
|
|
6
|
+
helpValue?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Indicates that the field is optional
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
isOptional?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A caption for an item in the UI, usually associated with a form control
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```jsx
|
|
18
|
+
* // Basic label
|
|
19
|
+
* <Label value="Username" />
|
|
20
|
+
*
|
|
21
|
+
* // Label with help text and optional marker
|
|
22
|
+
* <Label
|
|
23
|
+
* value="Description"
|
|
24
|
+
* helpValue="A description of the item"
|
|
25
|
+
* isOptional
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare const Label: ({ value, helpValue, isOptional }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export type { LabelProps };
|
|
31
|
+
export { Label };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const LabelElement: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
2
|
+
declare const ContentFlex: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
declare const QuestionIcon: import('styled-components/dist/types').IStyledComponentBase<"web", any> & (string | (string & Omit<IconType, keyof import('react').Component<any, {}, any>>));
|
|
4
|
+
export { LabelElement, ContentFlex, QuestionIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Label';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes browser default focus outlines to ensure clean base styling, allowing
|
|
3
|
+
* Devopness design system styles to be applied without conflicts.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { removeBlueMark } from './styles'
|
|
7
|
+
* import { styled } from 'styled-components'
|
|
8
|
+
* const Container = styled.div`
|
|
9
|
+
* ${removeBlueMark}
|
|
10
|
+
* `
|
|
11
|
+
*/
|
|
12
|
+
declare const removeBlueMark: import('styled-components').RuleSet<object>;
|
|
13
|
+
export { removeBlueMark };
|