@devopness/ui-react 2.150.1 → 2.151.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.
@@ -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';
@@ -1 +1,2 @@
1
1
  export * from './Alert';
2
+ export * from './Input';
@@ -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';
@@ -5,3 +5,4 @@ export * from './Link';
5
5
  export * from './Tooltip';
6
6
  export * from './ErrorMessage';
7
7
  export * from './Pagination';
8
+ 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 };