@delightui/components 0.1.7 → 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/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
- interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon'> {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delightui/components",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",