diditui 0.0.13 → 1.0.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/README.md +10 -1
- package/dist/_commonjsHelpers-6jR-N8xe.cjs +1 -0
- package/dist/_commonjsHelpers-HP5nalso.js +26 -0
- package/dist/diditui.cjs +87 -0
- package/dist/diditui.d.ts +49 -6
- package/dist/diditui.js +1918 -3002
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -0
- package/dist/tailwind.d.ts +101 -0
- package/dist/tailwind.js +2047 -0
- package/package.json +45 -31
- package/dist/diditui.umd.cjs +0 -87
package/dist/diditui.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
3
|
import { ComponentProps } from 'react';
|
|
4
|
-
import { Config } from 'tailwindcss';
|
|
5
4
|
import { default as default_2 } from 'react';
|
|
6
5
|
import { FC } from 'react';
|
|
7
6
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
8
|
-
import { Props } from 'react-modal';
|
|
7
|
+
import { Props as Props_2 } from 'react-modal';
|
|
9
8
|
import { VariantProps } from 'class-variance-authority';
|
|
10
9
|
|
|
11
10
|
declare type AsProp<C extends default_2.ElementType> = {
|
|
@@ -41,7 +40,16 @@ declare const cardStyles: (props?: ({
|
|
|
41
40
|
|
|
42
41
|
export declare function cn(...classes: ClassValue[]): string;
|
|
43
42
|
|
|
44
|
-
export declare
|
|
43
|
+
export declare function CopyValue({ label, value, isSecret, className, ...props }: CopyValueProps): JSX_2.Element;
|
|
44
|
+
|
|
45
|
+
declare type CopyValueProps = ComponentProps<'div'> & VariantProps<typeof copyValueStyles> & {
|
|
46
|
+
value: string;
|
|
47
|
+
label?: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
declare const copyValueStyles: (props?: ({
|
|
51
|
+
isSecret?: boolean | null | undefined;
|
|
52
|
+
} & ClassProp) | undefined) => string;
|
|
45
53
|
|
|
46
54
|
/**
|
|
47
55
|
* Allows for extending a set of props (`ExtendedProps`) by an overriding set of props
|
|
@@ -52,7 +60,7 @@ declare type ExtendableProps<ExtendedProps = {}, OverrideProps = {}> = OverrideP
|
|
|
52
60
|
|
|
53
61
|
export declare function Icon({ type, size, className, ...props }: IconProps): JSX_2.Element;
|
|
54
62
|
|
|
55
|
-
export declare function IconButton({ icon, label, size, className, ...props }: IconButtonProps): JSX_2.Element;
|
|
63
|
+
export declare function IconButton({ icon, label, size, variant, withBorder, className, ...props }: IconButtonProps): JSX_2.Element;
|
|
56
64
|
|
|
57
65
|
declare type IconButtonProps = ComponentProps<'button'> & VariantProps<typeof iconButtonStyles> & {
|
|
58
66
|
icon?: IconType;
|
|
@@ -60,7 +68,9 @@ declare type IconButtonProps = ComponentProps<'button'> & VariantProps<typeof ic
|
|
|
60
68
|
};
|
|
61
69
|
|
|
62
70
|
declare const iconButtonStyles: (props?: ({
|
|
71
|
+
variant?: "default" | "primary" | null | undefined;
|
|
63
72
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
73
|
+
withBorder?: boolean | null | undefined;
|
|
64
74
|
} & ClassProp) | undefined) => string;
|
|
65
75
|
|
|
66
76
|
declare type IconProps = ComponentProps<'span'> & VariantProps<typeof iconStyles> & {
|
|
@@ -71,7 +81,7 @@ declare const iconStyles: (props?: ({
|
|
|
71
81
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
72
82
|
} & ClassProp) | undefined) => string;
|
|
73
83
|
|
|
74
|
-
export declare type IconType = 'settings' | 'info' | 'arrowRight' | 'scan' | 'warning' | 'check' | 'copy' | 'connect' | 'passKey' | 'didit' | 'close' | 'diditLogo' | 'idCard' | 'car' | 'passport' | 'closeCircle' | 'closeCircleBold' | 'checkCircle' | 'checkCircleBold' | 'refresh' | 'chevronLeft';
|
|
84
|
+
export declare type IconType = 'settings' | 'info' | 'arrowRight' | 'scan' | 'warning' | 'check' | 'copy' | 'connect' | 'passKey' | 'didit' | 'diditNameLogo' | 'close' | 'diditLogo' | 'idCard' | 'car' | 'passport' | 'closeCircle' | 'closeCircleBold' | 'checkCircle' | 'checkCircleBold' | 'refresh' | 'chevronLeft' | 'eye' | 'eyeSlash';
|
|
75
85
|
|
|
76
86
|
/**
|
|
77
87
|
* Allows for inheriting the props from the specified element type so that
|
|
@@ -80,6 +90,18 @@ export declare type IconType = 'settings' | 'info' | 'arrowRight' | 'scan' | 'wa
|
|
|
80
90
|
*/
|
|
81
91
|
declare type InheritableElementProps<C extends default_2.ElementType, Props = {}> = ExtendableProps<PropsOf<C>, Props>;
|
|
82
92
|
|
|
93
|
+
export declare function Input({ label, placeholder, value, icon, disabled, className, error, onValueChange, ...props }: InputProps): JSX_2.Element;
|
|
94
|
+
|
|
95
|
+
declare type InputProps = ComponentProps<'input'> & {
|
|
96
|
+
label: string;
|
|
97
|
+
placeholder: string;
|
|
98
|
+
value: string;
|
|
99
|
+
icon?: IconType;
|
|
100
|
+
diabled?: boolean;
|
|
101
|
+
error?: string;
|
|
102
|
+
onValueChange?: (v: string) => void;
|
|
103
|
+
};
|
|
104
|
+
|
|
83
105
|
export declare const MediaQuery: {
|
|
84
106
|
SM: number;
|
|
85
107
|
MD: number;
|
|
@@ -88,7 +110,7 @@ export declare const MediaQuery: {
|
|
|
88
110
|
XXL: number;
|
|
89
111
|
};
|
|
90
112
|
|
|
91
|
-
export declare function Modal({ children, contentLabel, overlayClassName, className, onRequestClose, ...props }: Props): JSX_2.Element;
|
|
113
|
+
export declare function Modal({ children, contentLabel, overlayClassName, className, withBorder, onRequestClose, ...props }: Props): JSX_2.Element;
|
|
92
114
|
|
|
93
115
|
/**
|
|
94
116
|
* A more sophisticated version of `InheritableElementProps` where
|
|
@@ -102,6 +124,10 @@ declare type PolymorphicComponentPropsWithRef<C extends default_2.ElementType, P
|
|
|
102
124
|
|
|
103
125
|
declare type PolymorphicRef<C extends default_2.ElementType> = default_2.ComponentPropsWithRef<C>['ref'];
|
|
104
126
|
|
|
127
|
+
declare interface Props extends Props_2 {
|
|
128
|
+
withBorder?: boolean;
|
|
129
|
+
}
|
|
130
|
+
|
|
105
131
|
declare type PropsOf<C extends keyof JSX.IntrinsicElements | default_2.JSXElementConstructor<unknown>> = JSX.LibraryManagedAttributes<C, default_2.ComponentPropsWithoutRef<C>>;
|
|
106
132
|
|
|
107
133
|
export declare function QrCode({ uri, size, color, iconName, className, ...props }: QrCodeProps): JSX_2.Element;
|
|
@@ -122,6 +148,16 @@ declare const spinnerStyles: (props?: ({
|
|
|
122
148
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
123
149
|
} & ClassProp) | undefined) => string;
|
|
124
150
|
|
|
151
|
+
export declare function StatusLabel({ label, variant, className, ...props }: StatusLabelProps): JSX_2.Element;
|
|
152
|
+
|
|
153
|
+
declare type StatusLabelProps = ComponentProps<'div'> & VariantProps<typeof statusLabelStyles> & {
|
|
154
|
+
label: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
declare const statusLabelStyles: (props?: ({
|
|
158
|
+
variant?: "warning" | "primary" | "accent" | "error" | "success" | null | undefined;
|
|
159
|
+
} & ClassProp) | undefined) => string;
|
|
160
|
+
|
|
125
161
|
declare type SVGIcon = FC<React.SVGProps<SVGElement>>;
|
|
126
162
|
|
|
127
163
|
export declare const svgOptions: Record<IconType, SVGIcon>;
|
|
@@ -140,6 +176,13 @@ declare const textStyles: (props?: ({
|
|
|
140
176
|
underline?: boolean | null | undefined;
|
|
141
177
|
} & ClassProp) | undefined) => string;
|
|
142
178
|
|
|
179
|
+
export declare function Toggle({ onToggle, label, checked, className, ...props }: ToggleProps): JSX_2.Element;
|
|
180
|
+
|
|
181
|
+
declare type ToggleProps = ComponentProps<'input'> & {
|
|
182
|
+
label?: string;
|
|
183
|
+
onToggle?: (checked: boolean) => void;
|
|
184
|
+
};
|
|
185
|
+
|
|
143
186
|
export declare function useLgMediaQuery(options?: UseMediaQueryOptions): boolean;
|
|
144
187
|
|
|
145
188
|
export declare function useMdMediaQuery(options?: UseMediaQueryOptions): boolean;
|