aristid-ds 11.0.0 → 12.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/CHANGELOG.md +48 -2
- package/README.md +9 -8
- package/dist/Kit/App/index.js +2 -3
- package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +1 -1
- package/dist/Kit/DataDisplay/IdCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Tag/useTagGroup.d.ts +13 -3
- package/dist/Kit/DataDisplay/index.js +1 -1
- package/dist/Kit/DataDisplay/types.d.ts +3 -2
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +5 -8
- package/dist/Kit/DataEntry/Checkbox/index.js +1 -1
- package/dist/Kit/DataEntry/Checkbox/types.d.ts +3 -7
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/ColorPicker/types.d.ts +6 -7
- package/dist/Kit/DataEntry/DatePicker/DatePicker.d.ts +2 -1
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +2 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +3 -15
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Input/index.js +1 -1
- package/dist/Kit/DataEntry/Input/types.d.ts +7 -22
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +3 -8
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/InputWrapper/types.d.ts +11 -6
- package/dist/Kit/DataEntry/Radio/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/types.d.ts +6 -7
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontStylesButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/IndentListButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ListButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/TextAlignButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/UndoRedoButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/types.d.ts +3 -8
- package/dist/Kit/DataEntry/Select/index.js +1 -1
- package/dist/Kit/DataEntry/Select/renders.d.ts +0 -12
- package/dist/Kit/DataEntry/Select/types.d.ts +7 -9
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- package/dist/Kit/DataEntry/index.js +1 -1
- package/dist/Kit/Feedback/Alert/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.d.ts +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +39 -25
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.d.ts +1 -1
- package/dist/Kit/Feedback/SnackBar/types.d.ts +7 -13
- package/dist/Kit/Feedback/index.js +2 -2
- package/dist/Kit/General/Button/index.js +1 -1
- package/dist/Kit/General/DynamicActions/DynamicActions.d.ts +3 -0
- package/dist/Kit/General/DynamicActions/EllipsisButton.d.ts +3 -0
- package/dist/Kit/General/DynamicActions/index.d.ts +7 -0
- package/dist/Kit/General/DynamicActions/index.js +46 -0
- package/dist/Kit/General/DynamicActions/types.d.ts +14 -0
- package/dist/Kit/General/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Layout/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +37 -9
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/types.d.ts +2 -0
- package/dist/Kit/Navigation/index.js +1 -1
- package/dist/Kit/index.js +2 -2
- package/dist/assets/icons/chevrons/LeftChevrons.d.ts +2 -0
- package/dist/assets/icons/chevrons/RightChevrons.d.ts +2 -0
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/chunks/{KitNotification.GTRTPM11.js → KitNotification.yY3RY8ac.js} +1 -1
- package/dist/chunks/index.Lkobh8cF.js +1667 -0
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +5 -5
- package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.js +1 -1
- package/dist/translation/en-US/components/DataEntry/ColorPicker/index.d.ts +2 -0
- package/dist/translation/en-US/components/DataEntry/ColorPicker/index.js +6 -0
- package/dist/translation/en-US/index.js +13 -11
- package/dist/translation/fr-FR/components/DataEntry/ColorPicker/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/DataEntry/ColorPicker/index.js +6 -0
- package/dist/translation/fr-FR/index.js +9 -7
- package/dist/translation/types/components/DataEntry/ColorPicker/index.d.ts +3 -0
- package/dist/translation/types/index.d.ts +2 -0
- package/dist/utils/hooks/useClickOutside.d.ts +8 -0
- package/dist/utils/hooks/useKeyboardShortcut.d.ts +7 -0
- package/package.json +15 -14
- package/dist/chunks/SnackBarProvider.xMKXdZ88.js +0 -22
- package/dist/chunks/index.2xXr1nME.js +0 -1616
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [12.0.0](https://www.npmjs.com/package/aristid-ds/v/12.0.0) (2024-01-09)
|
|
4
|
+
|
|
5
|
+
### ✨ Features
|
|
6
|
+
- **Tag Group**:
|
|
7
|
+
- Display hidden tags (@Delmotte-Vincent)
|
|
8
|
+
- **SidePanel**:
|
|
9
|
+
- Close side panel on escape key press (@Delmotte-Vincent)
|
|
10
|
+
- Close side panel on click outside (@Delmotte-Vincent)
|
|
11
|
+
- **⚠️ Breaking change - InputWrapper**:
|
|
12
|
+
- Removed `actions` prop and replace it by `extra` prop (@philippechevieux)
|
|
13
|
+
- Remove `infoIcon` and `onInfoClick` props. Please use `extra` prop instead (@philippechevieux)
|
|
14
|
+
- **⚠️ Breaking change - SnackBar**:
|
|
15
|
+
- Deprecated `ctaText` and `ctaOnClick` props and replace it by `actions` prop (@evoiron)
|
|
16
|
+
- `message` prop now accepts a `ReactNode` (@evoiron)
|
|
17
|
+
- Add `onClose` prop to allow some action when closing the snackbar (@evoiron)
|
|
18
|
+
- Add `actionsInDropDown` prop to force display all actions in a dropdown. By default it can handle 3 actions before showing a dropdown (@evoiron)
|
|
19
|
+
- **DatePicker**:
|
|
20
|
+
- Design update (@fatb38)
|
|
21
|
+
- **ColorPicker**:
|
|
22
|
+
- Displays a placeholder when no color is selected (@philippechevieux)
|
|
23
|
+
- Add `placeholder` prop to customize the default placeholder (@philippechevieux)
|
|
24
|
+
- Delete button to remove color from DropDown (@philippechevieux)
|
|
25
|
+
- Add a default `min-width` to prevent from changing width when selecting a color (@philippechevieux)
|
|
26
|
+
- **Select**:
|
|
27
|
+
- Add `onDeselect` prop called when an option is deselected. Only called for `multiple` or `tags` (@philippechevieux)
|
|
28
|
+
- Add `onTagClose` prop to `IKitOption` called when a tag is closed (@philippechevieux)
|
|
29
|
+
- **RichText**:
|
|
30
|
+
- Add suport for HTML `autoFocus` prop (@philippechevieux)
|
|
31
|
+
|
|
32
|
+
### 🐛 Bug Fixes
|
|
33
|
+
|
|
34
|
+
- **ColorPicker**:
|
|
35
|
+
- Fix an issue related to `defaultValue` prop (@philippechevieux)
|
|
36
|
+
- Fix an issue where the DropDown remained open even if the `open` prop was set to `false` (@philippechevieux)
|
|
37
|
+
- Fix an issue where it was no longer possible to change the color type (`rgb`, `hex`, `hsb`) from the DropDown (@philippechevieux)
|
|
38
|
+
- Fix an issue where opacity was no longer displayed as a percentage for a hex color (@philippechevieux)
|
|
39
|
+
- Fix clear icon position when using `showText` prop (@philippechevieux)
|
|
40
|
+
- **InputNumber**:
|
|
41
|
+
- Fix text default color (@philippechevieux)
|
|
42
|
+
- **Error:**
|
|
43
|
+
- Fix svg responsiveness (@philippechevieux)
|
|
44
|
+
- **RedirectCard**:
|
|
45
|
+
- Fix arrow position (@nicolasnssm)
|
|
46
|
+
- **Tabs**:
|
|
47
|
+
- Fix full-width instead of fit-content for pill tabs (@fatb38)
|
|
48
|
+
|
|
3
49
|
## [11.0.0](https://www.npmjs.com/package/aristid-ds/v/11.0.0) (2024-11-27)
|
|
4
50
|
|
|
5
51
|
### ✨ Features
|
|
@@ -13,6 +59,8 @@
|
|
|
13
59
|
- **⚠️ Breaking change - Pagination:**
|
|
14
60
|
- `bordered` prop doesn't exist anymore (@7Remy)
|
|
15
61
|
- New design (@7Remy)
|
|
62
|
+
- **⚠️ Breaking change - Button:**
|
|
63
|
+
- Change available colors on segmented button (same as `Tag` component) (@evoiron)
|
|
16
64
|
- **Table**:
|
|
17
65
|
- Handle two different line heights (m/l) (@7Remy)
|
|
18
66
|
- Reduce sort icons size (@7Remy)
|
|
@@ -21,8 +69,6 @@
|
|
|
21
69
|
- Make table and rows background customisable with `cellsBackgroundColor` and `backgroundColor`props (@evoiron)
|
|
22
70
|
- Add `showHeader`prop to show or hide table header (@evoiron)
|
|
23
71
|
- Add `borderedRows` prop to add a border to table rows (@evoiron)
|
|
24
|
-
- **⚠️ Breaking change - Button:**
|
|
25
|
-
- Change available colors on segmented button (same as `Tag` compoent) (@evoiron)
|
|
26
72
|
- **Button**
|
|
27
73
|
- Add role `link` when type prop is set to `link` or `redirect` (@philippechevieux)
|
|
28
74
|
- Add `size` props, usable when type is `primary`, `secondary` or `tertiary` (@evoiron)
|
package/README.md
CHANGED
|
@@ -244,8 +244,8 @@ Every components **style** of the design system can be **override** by tokens.
|
|
|
244
244
|
mkdir DESIGN-SYSTEM/src/theme/type/components/DataDisplay/tooltip
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
<br/>
|
|
248
|
+
In this file, you have all the tokens type definition. The tokens follow some rules you can find here [TODO]
|
|
249
249
|
|
|
250
250
|
2. **Create a token file**
|
|
251
251
|
The token file is the definition of all tokens with their value. It exports a function that create the theme for the cmponent. You define this file in the `aristid` that is the default theme of the design system.
|
|
@@ -263,8 +263,8 @@ Every components **style** of the design system can be **override** by tokens.
|
|
|
263
263
|
5. **Component Antd mapper**
|
|
264
264
|
As we use both `antd` and `design system` tokens, we normalize all token to follow a same model. If your component uses antd tokens, you have to add a mapper in the `src/theme/utils/tokens-mapper` folder. This folder as the same folder structure as the rest of the application.
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
<br/>
|
|
267
|
+
Example of component mapper :
|
|
268
268
|
|
|
269
269
|
```tsx
|
|
270
270
|
// utils/tokens-mapper/DataDisplay/Tag
|
|
@@ -288,7 +288,7 @@ Every components **style** of the design system can be **override** by tokens.
|
|
|
288
288
|
7. **Theme consumption**
|
|
289
289
|
You can use the theme in your styled component by calling the hook `useKitTheme`. You can get the component theme by calling `theme.components.Tooltip`.
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
</br>
|
|
292
292
|
|
|
293
293
|
```tsx
|
|
294
294
|
const {theme} = useKitTheme();
|
|
@@ -570,17 +570,18 @@ git flow release finish '0.1.0'
|
|
|
570
570
|
|
|
571
571
|
<img src="http://storybook.aristid.com/public/images/gitflow-hotfix.png" alt="Logo" height="250px">
|
|
572
572
|
|
|
573
|
-
Creating a
|
|
573
|
+
Creating a hotfix
|
|
574
574
|
|
|
575
575
|
```sh
|
|
576
576
|
git flow hotfix start fixTooltip
|
|
577
577
|
```
|
|
578
578
|
|
|
579
|
-
Finishing a
|
|
579
|
+
Finishing a hotfix
|
|
580
580
|
|
|
581
581
|
```sh
|
|
582
582
|
git flow hotfix finish fixTooltip
|
|
583
583
|
```
|
|
584
|
+
|
|
584
585
|
## Documentation
|
|
585
586
|
|
|
586
|
-
All architectural decisions are recorded inside [docs/ folder](./docs/ADR.md)
|
|
587
|
+
All architectural decisions are recorded inside [docs/ folder](./docs/ADR.md)
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "antd";
|
|
4
|
-
import "../../chunks/
|
|
5
|
-
import { K as g } from "../../chunks/index.2xXr1nME.js";
|
|
4
|
+
import { K as d } from "../../chunks/index.Lkobh8cF.js";
|
|
6
5
|
import "../../theme/utils/tokens-mapper/index.js";
|
|
7
6
|
import "../../translation/utils/index.js";
|
|
8
7
|
import "../../chunks/index.S1tc6cnV.js";
|
|
@@ -14,5 +13,5 @@ import "../DataDisplay/Tooltip/index.js";
|
|
|
14
13
|
import "../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
15
14
|
import "classnames";
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
d as KitApp
|
|
18
17
|
};
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import "antd";
|
|
4
4
|
import "../../../chunks/index.S1tc6cnV.js";
|
|
5
5
|
import "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
-
import { c as k } from "../../../chunks/index.
|
|
6
|
+
import { c as k } from "../../../chunks/index.Lkobh8cF.js";
|
|
7
7
|
import "../../General/Typography/index.js";
|
|
8
8
|
import "../../General/Icon/index.js";
|
|
9
9
|
import "../../Layout/Divider/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "classnames";
|
|
3
|
-
import { d as e } from "../../../chunks/index.
|
|
3
|
+
import { d as e } from "../../../chunks/index.Lkobh8cF.js";
|
|
4
4
|
import "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
5
|
import "../../General/Typography/index.js";
|
|
6
6
|
import "../../General/Icon/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "classnames";
|
|
4
|
-
import { a as h } from "../../../chunks/index.
|
|
4
|
+
import { a as h } from "../../../chunks/index.Lkobh8cF.js";
|
|
5
5
|
import "../../General/Typography/index.js";
|
|
6
6
|
import "../../General/Icon/index.js";
|
|
7
7
|
import "../../DataEntry/Rate/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { e as u } from "../../../chunks/index.
|
|
3
|
+
import { e as u } from "../../../chunks/index.Lkobh8cF.js";
|
|
4
4
|
import "../../DataEntry/Rate/index.js";
|
|
5
5
|
import "../../DataEntry/Switch/index.js";
|
|
6
6
|
import "../../DataEntry/Slider/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "classnames";
|
|
3
|
-
import { f as b } from "../../../chunks/index.
|
|
3
|
+
import { f as b } from "../../../chunks/index.Lkobh8cF.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import "@fortawesome/react-fontawesome";
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
4
4
|
import "classnames";
|
|
5
|
-
import { h as g } from "../../../chunks/index.
|
|
5
|
+
import { h as g } from "../../../chunks/index.Lkobh8cF.js";
|
|
6
6
|
import "../../General/Typography/index.js";
|
|
7
7
|
import "../../General/Icon/index.js";
|
|
8
8
|
import "../../../chunks/index.bf78FwPu.js";
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { IKitTagConfig
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { IKitTagConfig } from './types';
|
|
3
|
+
type TagGroupProps = {
|
|
4
|
+
tags: IKitTagConfig[];
|
|
5
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
6
|
+
measureRef: RefObject<HTMLDivElement>;
|
|
7
|
+
handleCloseTag?: (index: number) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const useTagGroup: ({ tags, containerRef, measureRef, handleCloseTag }: TagGroupProps) => {
|
|
10
|
+
measureTags: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
visibleTags: IKitTagConfig[];
|
|
12
|
+
hiddenCount: number;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { K as a } from "../../chunks/index.bf78FwPu.js";
|
|
2
2
|
import { KitBadge as i } from "./Badge/index.js";
|
|
3
|
-
import { b as K, c as s, d as m, a as p, e as f, f as x, g as d, h as T, i as g } from "../../chunks/index.
|
|
3
|
+
import { b as K, c as s, d as m, a as p, e as f, f as x, g as d, h as T, i as g } from "../../chunks/index.Lkobh8cF.js";
|
|
4
4
|
import { KitEmpty as C } from "./Empty/index.js";
|
|
5
5
|
import { K as b } from "../../chunks/index.S1tc6cnV.js";
|
|
6
6
|
import { KitTree as E } from "./Tree/index.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {ReactNode} from 'react';
|
|
2
2
|
|
|
3
3
|
export interface IKitActionButton {
|
|
4
|
-
key: string;
|
|
4
|
+
key: string | number;
|
|
5
5
|
label: string;
|
|
6
|
-
icon: ReactNode;
|
|
7
6
|
onClick: (e: unknown) => void;
|
|
7
|
+
icon?: ReactNode;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
title?: string;
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "antd";
|
|
4
|
-
import { r as f } from "../../../chunks/index.
|
|
4
|
+
import { r as f } from "../../../chunks/index.Lkobh8cF.js";
|
|
5
5
|
import "@fortawesome/react-fontawesome";
|
|
6
6
|
import "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import "classnames";
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {AutoCompleteProps} from 'antd';
|
|
2
2
|
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
-
import {
|
|
3
|
+
import {IKitInputWrapperBase} from '../InputWrapper/types';
|
|
4
4
|
|
|
5
|
-
export interface IKitAutoComplete
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export interface IKitAutoComplete
|
|
6
|
+
extends AutoCompleteProps<T, E>,
|
|
7
|
+
KitHTMLAttributes<HTMLInputElement>,
|
|
8
|
+
IKitInputWrapperBase {
|
|
9
9
|
allowClear?: boolean;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
wrapperClassName?: string;
|
|
12
12
|
required?: boolean;
|
|
13
|
-
infoIcon?: ReactNode;
|
|
14
|
-
actions?: ReactElement[];
|
|
15
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
16
13
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {ReactNode, CSSProperties
|
|
1
|
+
import {ReactNode, CSSProperties} from 'react';
|
|
2
2
|
import {CheckboxProps} from 'antd';
|
|
3
3
|
import {KitHTMLAttributes} from '../../../types';
|
|
4
4
|
import type {CheckboxChangeEvent} from 'antd/es/checkbox/Checkbox';
|
|
5
|
+
import {IKitInputWrapperBase} from '../InputWrapper/types';
|
|
5
6
|
|
|
6
7
|
export interface IKitCheckbox extends CheckboxProps, KitHTMLAttributes<HTMLLabelElement> {
|
|
7
8
|
danger?: boolean;
|
|
@@ -28,11 +29,9 @@ interface AbstractCheckboxGroup {
|
|
|
28
29
|
style?: CSSProperties;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
export interface ICheckboxGroup extends AbstractCheckboxGroup {
|
|
32
|
+
export interface ICheckboxGroup extends AbstractCheckboxGroup, Omit<IKitInputWrapperBase, 'htmlFor'> {
|
|
32
33
|
name?: string;
|
|
33
34
|
defaultValue?: Array<CheckboxValueType>;
|
|
34
|
-
label?: string;
|
|
35
|
-
helper?: string;
|
|
36
35
|
status?: '' | 'warning' | 'error';
|
|
37
36
|
bordered?: boolean;
|
|
38
37
|
wrapperClassName?: string;
|
|
@@ -40,9 +39,6 @@ export interface ICheckboxGroup extends AbstractCheckboxGroup {
|
|
|
40
39
|
onChange?: (checkedValue: Array<CheckboxValueType>) => void;
|
|
41
40
|
children?: ReactNode;
|
|
42
41
|
required?: boolean;
|
|
43
|
-
infoIcon?: ReactNode;
|
|
44
|
-
actions?: ReactElement[];
|
|
45
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
export interface ICheckboxGroupContext {
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import {ColorPickerProps} from 'antd';
|
|
2
2
|
import {KitHTMLAttributes} from '../../../types';
|
|
3
3
|
import type {Color} from 'antd/es/color-picker';
|
|
4
|
-
import {
|
|
4
|
+
import {IKitInputWrapperBase} from '../InputWrapper/types';
|
|
5
5
|
|
|
6
6
|
type AntdColorPickerTypesToOmit = 'size';
|
|
7
7
|
|
|
8
8
|
export interface KitColorPickerProps
|
|
9
9
|
extends Omit<ColorPickerProps, AntdColorPickerTypesToOmit>,
|
|
10
|
-
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement
|
|
11
|
-
|
|
12
|
-
helper?: string;
|
|
10
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement>,
|
|
11
|
+
IKitInputWrapperBase {
|
|
13
12
|
required?: boolean;
|
|
14
|
-
|
|
15
|
-
actions?: ReactElement[];
|
|
16
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
13
|
+
placeholder?: string;
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
export type KitColor = Color;
|
|
@@ -22,6 +19,8 @@ export type KitColorPickerInternalTextProps = {
|
|
|
22
19
|
color: KitColor;
|
|
23
20
|
format: Exclude<KitColorPickerProps['format'], undefined>;
|
|
24
21
|
showText: KitColorPickerProps['showText'];
|
|
22
|
+
placeholder: KitColorPickerProps['placeholder'];
|
|
23
|
+
isColorPickerValueEmpty: boolean;
|
|
25
24
|
allowClear: KitColorPickerProps['allowClear'];
|
|
26
25
|
onClear: () => void;
|
|
27
26
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IKitDatePicker } from './types';
|
|
3
|
-
|
|
3
|
+
import { PickerRef } from 'rc-picker';
|
|
4
|
+
declare const KitDatePicker: import("react").ForwardRefExoticComponent<Omit<IKitDatePicker, "ref"> & import("react").RefAttributes<PickerRef>>;
|
|
4
5
|
export default KitDatePicker;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { PickerRef } from 'rc-picker';
|
|
2
3
|
declare const KitRangePicker: import("react").ForwardRefExoticComponent<Omit<import("rc-picker").RangePickerProps<import("dayjs").Dayjs>, "locale" | "generateConfig" | "hideHeader"> & {
|
|
3
4
|
locale?: import("antd/es/date-picker/generatePicker").PickerLocale | undefined;
|
|
4
5
|
size?: import("antd/es/button").ButtonSize;
|
|
@@ -10,5 +11,5 @@ declare const KitRangePicker: import("react").ForwardRefExoticComponent<Omit<imp
|
|
|
10
11
|
popupClassName?: string | undefined;
|
|
11
12
|
rootClassName?: string | undefined;
|
|
12
13
|
popupStyle?: import("react").CSSProperties | undefined;
|
|
13
|
-
} & import("./types").IInternalRangerPicker & import("react").RefAttributes<
|
|
14
|
+
} & import("./types").IInternalRangerPicker & import("../InputWrapper/types").IKitInputWrapperBase & import("react").RefAttributes<PickerRef>>;
|
|
14
15
|
export default KitRangePicker;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import {DatePickerProps, RangePickerProps} from 'antd/es/date-picker';
|
|
2
|
-
import {
|
|
2
|
+
import {IKitInputWrapperBase} from '../InputWrapper/types';
|
|
3
3
|
|
|
4
4
|
// Use "never" instead of Omit properties to avoid issues with Antd type/interface declarations
|
|
5
5
|
interface IInternalDatePicker {
|
|
6
6
|
size?: never;
|
|
7
7
|
bordered?: never;
|
|
8
|
-
label?: string;
|
|
9
|
-
helper?: string;
|
|
10
|
-
htmlFor?: string;
|
|
11
8
|
allowClear?: boolean;
|
|
12
9
|
cellRender?: DatePickerProps['cellrender'];
|
|
13
10
|
wrapperClassName?: string;
|
|
14
11
|
disabledTime?: unknow;
|
|
15
12
|
required?: boolean;
|
|
16
|
-
infoIcon?: ReactNode;
|
|
17
|
-
actions?: ReactElement[];
|
|
18
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
19
13
|
readonly?: boolean;
|
|
20
14
|
}
|
|
21
15
|
|
|
@@ -24,21 +18,15 @@ interface IDatePickerProps extends Omit<DatePickerProps, 'picker'> {
|
|
|
24
18
|
showTime?: boolean | object;
|
|
25
19
|
}
|
|
26
20
|
|
|
27
|
-
export type IKitDatePicker = IDatePickerProps & IInternalDatePicker;
|
|
21
|
+
export type IKitDatePicker = IDatePickerProps & IInternalDatePicker & IKitInputWrapperBase;
|
|
28
22
|
|
|
29
23
|
// Use "never" instead of Omit properties to avoid issues with Antd type/interface declarations
|
|
30
24
|
interface IInternalRangerPicker {
|
|
31
25
|
size?: never;
|
|
32
26
|
bordered?: never;
|
|
33
|
-
label?: string;
|
|
34
|
-
helper?: string;
|
|
35
|
-
htmlFor?: string;
|
|
36
27
|
allowClear?: boolean;
|
|
37
28
|
required?: boolean;
|
|
38
|
-
infoIcon?: ReactNode;
|
|
39
|
-
actions?: ReactElement[];
|
|
40
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
41
29
|
readonly?: boolean;
|
|
42
30
|
}
|
|
43
31
|
|
|
44
|
-
export type IKitRangePicker = RangePickerProps & IInternalRangerPicker;
|
|
32
|
+
export type IKitRangePicker = RangePickerProps & IInternalRangerPicker & IKitInputWrapperBase;
|
|
@@ -6,7 +6,7 @@ import "@fortawesome/react-fontawesome";
|
|
|
6
6
|
import "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import "../../../chunks/index.bf78FwPu.js";
|
|
8
8
|
import "../../DataDisplay/Badge/index.js";
|
|
9
|
-
import { u as h } from "../../../chunks/index.
|
|
9
|
+
import { u as h } from "../../../chunks/index.Lkobh8cF.js";
|
|
10
10
|
import "../../DataDisplay/Empty/index.js";
|
|
11
11
|
import "../../../chunks/index.S1tc6cnV.js";
|
|
12
12
|
import "../../DataDisplay/Tree/index.js";
|
|
@@ -1,50 +1,35 @@
|
|
|
1
1
|
import {InputProps} from 'antd';
|
|
2
2
|
import {PasswordProps, TextAreaProps} from 'antd/es/input';
|
|
3
3
|
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
-
import {
|
|
4
|
+
import {IKitInputWrapperBase} from '../InputWrapper/types';
|
|
5
5
|
|
|
6
6
|
type AntdInputTypesToOmit = 'styles' | 'bordered' | 'size' | 'addonBefore' | 'addonAfter';
|
|
7
7
|
|
|
8
8
|
export interface IKitInput
|
|
9
9
|
extends Omit<InputProps, AntdInputTypesToOmit>,
|
|
10
|
-
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement
|
|
11
|
-
|
|
12
|
-
helper?: string;
|
|
13
|
-
htmlFor?: string;
|
|
10
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement>,
|
|
11
|
+
IKitInputWrapperBase {
|
|
14
12
|
allowClear?: boolean;
|
|
15
13
|
wrapperClassName?: string;
|
|
16
14
|
required?: boolean;
|
|
17
|
-
infoIcon?: ReactNode;
|
|
18
|
-
actions?: ReactElement[];
|
|
19
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
20
15
|
readonly?: boolean;
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
export interface IKitTextArea
|
|
24
19
|
extends Omit<TextAreaProps, AntdInputTypesToOmit>,
|
|
25
|
-
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement
|
|
26
|
-
|
|
27
|
-
helper?: string;
|
|
28
|
-
htmlFor?: string;
|
|
20
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement>,
|
|
21
|
+
IKitInputWrapperBase {
|
|
29
22
|
allowClear?: boolean;
|
|
30
23
|
wrapperClassName?: string;
|
|
31
24
|
required?: boolean;
|
|
32
|
-
infoIcon?: ReactNode;
|
|
33
|
-
actions?: ReactElement[];
|
|
34
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
35
25
|
readonly?: boolean;
|
|
36
26
|
}
|
|
37
27
|
|
|
38
28
|
export interface IKitPassword
|
|
39
29
|
extends Omit<PasswordProps, AntdInputTypesToOmit>,
|
|
40
|
-
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement
|
|
41
|
-
|
|
42
|
-
helper?: string;
|
|
43
|
-
htmlFor?: string;
|
|
30
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement>,
|
|
31
|
+
IKitInputWrapperBase {
|
|
44
32
|
allowClear?: boolean;
|
|
45
33
|
wrapperClassName?: string;
|
|
46
34
|
required?: boolean;
|
|
47
|
-
infoIcon?: ReactNode;
|
|
48
|
-
actions?: ReactElement[];
|
|
49
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
50
35
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "antd";
|
|
4
|
-
import { m as u } from "../../../chunks/index.
|
|
4
|
+
import { m as u } from "../../../chunks/index.Lkobh8cF.js";
|
|
5
5
|
import "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import "classnames";
|
|
7
7
|
export {
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import {InputNumberProps} from 'antd';
|
|
2
2
|
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
-
import {
|
|
3
|
+
import {IKitInputWrapperBase} from '../InputWrapper/types';
|
|
4
4
|
|
|
5
5
|
type AntdInputNumberTypesToOmit = 'size' | 'addonBefore' | 'addonAfter' | 'borderless' | 'suffix';
|
|
6
6
|
|
|
7
7
|
export interface KitInputNumberProps
|
|
8
8
|
extends Omit<InputNumberProps, AntdInputNumberTypesToOmit>,
|
|
9
|
-
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement
|
|
10
|
-
|
|
11
|
-
helper?: string;
|
|
12
|
-
htmlFor?: string;
|
|
9
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement>,
|
|
10
|
+
IKitInputWrapperBase {
|
|
13
11
|
wrapperClassName?: string;
|
|
14
12
|
required?: boolean;
|
|
15
|
-
infoIcon?: ReactNode;
|
|
16
|
-
actions?: ReactElement[];
|
|
17
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
18
13
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import {KitHTMLAttributes} from '../../../types';
|
|
2
|
-
import {ReactNode
|
|
2
|
+
import {ReactNode} from 'react';
|
|
3
3
|
|
|
4
|
-
export interface
|
|
4
|
+
export interface IKitInputWrapperBase {
|
|
5
5
|
label?: string;
|
|
6
|
-
htmlFor?: string;
|
|
7
6
|
helper?: string;
|
|
7
|
+
htmlFor?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Will be removed in a future version. Please use `extra` instead
|
|
10
|
+
*/
|
|
11
|
+
actions?: ReactNode;
|
|
12
|
+
extra?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IKitInputWrapper extends IKitInputWrapperBase, KitHTMLAttributes<HTMLDivElement> {
|
|
8
16
|
disabled?: boolean;
|
|
9
17
|
status?: '' | 'warning' | 'error';
|
|
10
18
|
className?: string;
|
|
11
19
|
bordered?: boolean;
|
|
12
20
|
hoverable?: boolean;
|
|
13
21
|
required?: boolean;
|
|
14
|
-
infoIcon?: ReactNode;
|
|
15
|
-
actions?: ReactElement[];
|
|
16
|
-
onInfoClick?: (e: MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
17
22
|
onFocus?: (e: FocusEvent<HTMLDivElement>) => void;
|
|
18
23
|
onBlur?: (e: FocusEvent<HTMLDivElement>) => void;
|
|
19
24
|
}
|