@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/README.md CHANGED
@@ -1,30 +1,3 @@
1
- # React + TypeScript + Vite
1
+ # @delightui/components
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
- ## Expanding the ESLint configuration
11
-
12
- If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
-
14
- - Configure the top-level `parserOptions` property like this:
15
-
16
- ```js
17
- export default {
18
- // other rules...
19
- parserOptions: {
20
- ecmaVersion: 'latest',
21
- sourceType: 'module',
22
- project: ['./tsconfig.json', './tsconfig.node.json'],
23
- tsconfigRootDir: __dirname,
24
- },
25
- }
26
- ```
27
-
28
- - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29
- - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30
- - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
3
+ React components for delight ui
package/dist/cjs/App.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './resources/themes/base.css';
3
3
  import './resources/themes/dark.css';
4
- import './custom.css';
4
+ import './resources/themes/custom.css';
5
5
  declare function App(): React.JSX.Element;
6
6
  export default App;
@@ -1,5 +1,6 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
- export type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
2
+ import { LinkProps } from 'react-router-dom';
3
+ export type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
3
4
  /**
4
5
  * The content to be displayed within the action card.
5
6
  */
@@ -13,4 +14,17 @@ export type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
13
14
  * Additional class for styling.
14
15
  */
15
16
  className?: string;
17
+ /**
18
+ * The destination URL or path for the navigation link.
19
+ * If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
20
+ * Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
21
+ *
22
+ * @example
23
+ * // Internal link
24
+ * <NavLink to="/home">Home</NavLink>
25
+ *
26
+ * // External link
27
+ * <NavLink to="https://www.example.com">External</NavLink>
28
+ */
29
+ to?: string | -1;
16
30
  };
@@ -1,9 +1,20 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ButtonProps } from '../Button/Button.types';
3
3
  export type IconButtonStyleEnum = 'Primary' | 'Secondary';
4
- export interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon'> {
4
+ export type IconButtonSizeEnum = 'Small' | 'Medium';
5
+ export interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon' | 'style' | 'size'> {
5
6
  /**
6
7
  * The icon to be displayed.
7
8
  */
8
9
  icon?: ReactNode;
10
+ /**
11
+ * Style of the button.
12
+ * @default 'Primary'
13
+ */
14
+ style?: IconButtonStyleEnum;
15
+ /**
16
+ * Size of the button.
17
+ * @default 'Medium'
18
+ */
19
+ size?: IconButtonSizeEnum;
9
20
  }