@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/README.md
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @delightui/components
|
|
2
2
|
|
|
3
|
-
|
|
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,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
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
|
|
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
|
}
|
|
@@ -16,6 +16,10 @@ export type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
16
16
|
* Info icon for message
|
|
17
17
|
*/
|
|
18
18
|
infoIcon?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Optional field for possible error message
|
|
21
|
+
*/
|
|
22
|
+
hasMessage?: boolean;
|
|
19
23
|
};
|
|
20
24
|
/**
|
|
21
25
|
* Context values for the FormField component.
|