@delightui/components 0.1.6 → 0.1.8
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 +2 -29
- package/dist/cjs/App.d.ts +1 -1
- package/dist/cjs/components/atoms/ActionCard/ActionCard.types.d.ts +15 -1
- package/dist/cjs/components/atoms/IconButton/IconButton.types.d.ts +12 -1
- package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +4 -0
- package/dist/cjs/library.css +8823 -1906
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/App.d.ts +1 -1
- package/dist/esm/components/atoms/ActionCard/ActionCard.types.d.ts +15 -1
- package/dist/esm/components/atoms/IconButton/IconButton.types.d.ts +12 -1
- package/dist/esm/components/molecules/FormField/FormField.types.d.ts +4 -0
- package/dist/esm/library.css +8823 -1906
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +31 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React$1, { HTMLAttributes, ReactNode, ImgHTMLAttributes, SyntheticEvent, MouseEvent, InputHTMLAttributes, Dispatch, SetStateAction, TextareaHTMLAttributes, CSSProperties, FormHTMLAttributes, Ref, LiHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
2
|
+
import { LinkProps } from 'react-router-dom';
|
|
2
3
|
import { Offset } from 'react-overlays/usePopper';
|
|
3
4
|
import FlatPickr from 'react-flatpickr';
|
|
4
|
-
import { LinkProps } from 'react-router-dom';
|
|
5
5
|
|
|
6
|
-
type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
|
|
7
7
|
/**
|
|
8
8
|
* The content to be displayed within the action card.
|
|
9
9
|
*/
|
|
@@ -17,6 +17,19 @@ type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
17
17
|
* Additional class for styling.
|
|
18
18
|
*/
|
|
19
19
|
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The destination URL or path for the navigation link.
|
|
22
|
+
* If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
|
|
23
|
+
* Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Internal link
|
|
27
|
+
* <NavLink to="/home">Home</NavLink>
|
|
28
|
+
*
|
|
29
|
+
* // External link
|
|
30
|
+
* <NavLink to="https://www.example.com">External</NavLink>
|
|
31
|
+
*/
|
|
32
|
+
to?: string | -1;
|
|
20
33
|
};
|
|
21
34
|
|
|
22
35
|
/**
|
|
@@ -176,11 +189,22 @@ interface IconProps {
|
|
|
176
189
|
declare const Icon: (props: IconProps) => React$1.JSX.Element | null;
|
|
177
190
|
|
|
178
191
|
type IconButtonStyleEnum = 'Primary' | 'Secondary';
|
|
179
|
-
|
|
192
|
+
type IconButtonSizeEnum = 'Small' | 'Medium';
|
|
193
|
+
interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon' | 'style' | 'size'> {
|
|
180
194
|
/**
|
|
181
195
|
* The icon to be displayed.
|
|
182
196
|
*/
|
|
183
197
|
icon?: ReactNode;
|
|
198
|
+
/**
|
|
199
|
+
* Style of the button.
|
|
200
|
+
* @default 'Primary'
|
|
201
|
+
*/
|
|
202
|
+
style?: IconButtonStyleEnum;
|
|
203
|
+
/**
|
|
204
|
+
* Size of the button.
|
|
205
|
+
* @default 'Medium'
|
|
206
|
+
*/
|
|
207
|
+
size?: IconButtonSizeEnum;
|
|
184
208
|
}
|
|
185
209
|
|
|
186
210
|
declare const IconButton: (props: IconButtonProps) => React$1.JSX.Element;
|
|
@@ -860,6 +884,10 @@ type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
860
884
|
* Info icon for message
|
|
861
885
|
*/
|
|
862
886
|
infoIcon?: React.ReactNode;
|
|
887
|
+
/**
|
|
888
|
+
* Optional field for possible error message
|
|
889
|
+
*/
|
|
890
|
+
hasMessage?: boolean;
|
|
863
891
|
};
|
|
864
892
|
/**
|
|
865
893
|
* Props for the FormFieldProvider component.
|