aristid-ds 1.0.1 → 1.1.0-685d2b8
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 +54 -0
- package/README.md +9 -1
- package/dist/Kit/App/index.js +34 -34
- package/dist/Kit/App/types.d.ts +6 -0
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +21 -0
- package/dist/Kit/DataDisplay/Badge/index.js +13 -13
- package/dist/Kit/DataDisplay/Badge/types.d.ts +10 -0
- package/dist/Kit/DataDisplay/Card/index.js +1 -1
- package/dist/Kit/DataDisplay/Card/types.d.ts +32 -0
- package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
- package/dist/Kit/DataDisplay/Collapse/types.d.ts +68 -0
- package/dist/Kit/DataDisplay/Image/types.d.ts +19 -0
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/types.d.ts +40 -0
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/types.d.ts +21 -0
- package/dist/Kit/DataDisplay/LegacyCard/types.d.ts +31 -0
- package/dist/Kit/DataDisplay/Tabs/index.js +7 -7
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +6 -0
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/types.d.ts +29 -0
- package/dist/Kit/DataDisplay/Tooltip/types.d.ts +9 -0
- package/dist/Kit/DataDisplay/Tour/types.d.ts +5 -0
- package/dist/Kit/DataDisplay/Tree/types.d.ts +19 -0
- package/dist/Kit/DataDisplay/index.js +1 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +25 -17
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +15 -0
- package/dist/Kit/DataEntry/Checkbox/index.d.ts +2 -2
- package/dist/Kit/DataEntry/Checkbox/index.js +32 -32
- package/dist/Kit/DataEntry/Checkbox/types.d.ts +56 -0
- package/dist/Kit/DataEntry/ColorPicker/index.d.ts +2 -2
- package/dist/Kit/DataEntry/ColorPicker/index.js +11 -11
- package/dist/Kit/DataEntry/ColorPicker/types.d.ts +19 -0
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +4 -4
- package/dist/Kit/DataEntry/DatePicker/index.js +23 -25
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +40 -0
- package/dist/Kit/DataEntry/Input/index.js +34 -34
- package/dist/Kit/DataEntry/Input/types.d.ts +45 -0
- package/dist/Kit/DataEntry/InputNumber/index.js +14 -14
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +17 -0
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/InputWrapper/types.d.ts +15 -0
- package/dist/Kit/DataEntry/Radio/context.d.ts +1 -1
- package/dist/Kit/DataEntry/Radio/index.d.ts +4 -4
- package/dist/Kit/DataEntry/Radio/index.js +32 -32
- package/dist/Kit/DataEntry/Radio/types.d.ts +30 -0
- package/dist/Kit/DataEntry/Rate/index.d.ts +1 -1
- package/dist/Kit/DataEntry/Rate/types.d.ts +13 -0
- package/dist/Kit/DataEntry/Select/index.d.ts +1 -1
- package/dist/Kit/DataEntry/Select/index.js +9 -9
- package/dist/Kit/DataEntry/Select/types.d.ts +48 -0
- package/dist/Kit/DataEntry/Slider/index.d.ts +1 -1
- package/dist/Kit/DataEntry/Slider/types.d.ts +26 -0
- package/dist/Kit/DataEntry/Switch/types.d.ts +4 -0
- package/dist/Kit/DataEntry/Upload/Upload.d.ts +1 -1
- package/dist/Kit/DataEntry/Upload/types.d.ts +24 -0
- package/dist/Kit/DataEntry/index.js +2 -2
- package/dist/Kit/Feedback/Alert/types.d.ts +8 -0
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Modal/types.d.ts +61 -0
- package/dist/Kit/Feedback/Notification/KitNotification.d.ts +2 -2
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/Notification/types.d.ts +27 -0
- package/dist/Kit/Feedback/Progress/types.d.ts +4 -0
- package/dist/Kit/Feedback/SnackBar/index.js +4 -4
- package/dist/Kit/Feedback/SnackBar/types.d.ts +21 -0
- package/dist/Kit/Feedback/index.js +1 -1
- package/dist/Kit/General/Button/types.d.ts +49 -0
- package/dist/Kit/General/Icon/types.d.ts +20 -0
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/General/Typography/types.d.ts +77 -0
- package/dist/Kit/Layout/Divider/types.d.ts +16 -0
- package/dist/Kit/Layout/Grid/types.d.ts +12 -0
- package/dist/Kit/Layout/Space/index.d.ts +1 -1
- package/dist/Kit/Layout/Space/types.d.ts +16 -0
- package/dist/Kit/Navigation/Breadcrumb/types.d.ts +12 -0
- package/dist/Kit/Navigation/DropDown/types.d.ts +6 -0
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/Header/types.d.ts +11 -0
- package/dist/Kit/Navigation/Menu/index.js +1 -1
- package/dist/Kit/Navigation/Menu/types.d.ts +51 -0
- package/dist/Kit/Navigation/Pagination/types.d.ts +6 -0
- package/dist/Kit/Navigation/Steps/types.d.ts +12 -0
- package/dist/Kit/Navigation/index.js +1 -1
- package/dist/Kit/index.js +2 -2
- package/dist/assets/InputWrapper.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/chunks/InputWrapper.69dUKMaK.js +47 -0
- package/dist/chunks/{KitNotification.CO3zqMt0.js → KitNotification.3hnPgsKv.js} +1 -1
- package/dist/chunks/{SnackBarProvider.v49b6mkx.js → SnackBarProvider.i0xeV0xG.js} +6 -6
- package/dist/chunks/index.3dShBEOX.js +754 -0
- package/dist/chunks/{notification-provider.kV-P-2Jh.js → notification-provider.KGowspef.js} +10 -10
- package/dist/index.es.js +2 -2
- package/dist/theme/aristid/general/colors/index.js +2 -0
- package/dist/theme/theme-context.d.ts +2 -2
- package/dist/theme/types/components/DataDisplay/Avatar/index.d.ts +59 -0
- package/dist/theme/types/components/DataDisplay/Badge/index.d.ts +59 -0
- package/dist/theme/types/components/DataDisplay/Card/index.d.ts +181 -0
- package/dist/theme/types/components/DataDisplay/Collapse/index.d.ts +67 -0
- package/dist/theme/types/components/DataDisplay/Image/index.d.ts +45 -0
- package/dist/theme/types/components/DataDisplay/ItemCard/index.d.ts +313 -0
- package/dist/theme/types/components/DataDisplay/ItemList/index.d.ts +185 -0
- package/dist/theme/types/components/DataDisplay/LegacyCard/index.d.ts +251 -0
- package/dist/theme/types/components/DataDisplay/Tabs/index.d.ts +315 -0
- package/dist/theme/types/components/DataDisplay/Tag/index.d.ts +61 -0
- package/dist/theme/types/components/DataDisplay/Tooltip/index.d.ts +51 -0
- package/dist/theme/types/components/DataDisplay/Tree/index.d.ts +177 -0
- package/dist/theme/types/components/DataEntry/Checkbox/index.d.ts +169 -0
- package/dist/theme/types/components/DataEntry/ColorPicker/index.d.ts +228 -0
- package/dist/theme/types/components/DataEntry/DatePicker/index.d.ts +576 -0
- package/dist/theme/types/components/DataEntry/Input/index.d.ts +332 -0
- package/dist/theme/types/components/DataEntry/InputNumber/index.d.ts +211 -0
- package/dist/theme/types/components/DataEntry/InputWrapper/index.d.ts +95 -0
- package/dist/theme/types/components/DataEntry/Radio/index.d.ts +181 -0
- package/dist/theme/types/components/DataEntry/Rate/index.d.ts +25 -0
- package/dist/theme/types/components/DataEntry/Select/index.d.ts +373 -0
- package/dist/theme/types/components/DataEntry/Slider/index.d.ts +169 -0
- package/dist/theme/types/components/DataEntry/Switch/index.d.ts +91 -0
- package/dist/theme/types/components/DataEntry/Upload/index.d.ts +178 -0
- package/dist/theme/types/components/Feedback/Alert/index.d.ts +162 -0
- package/dist/theme/types/components/Feedback/Modal/index.d.ts +158 -0
- package/dist/theme/types/components/Feedback/Notification/index.d.ts +130 -0
- package/dist/theme/types/components/Feedback/Progress/index.d.ts +64 -0
- package/dist/theme/types/components/Feedback/SnackBar/index.d.ts +114 -0
- package/dist/theme/types/components/General/Button/index.d.ts +81 -0
- package/dist/theme/types/components/General/Icon/index.d.ts +36 -0
- package/dist/theme/types/components/General/Typography/index.d.ts +119 -0
- package/dist/theme/types/components/Layout/Divider/index.d.ts +34 -0
- package/dist/theme/types/components/Navigation/Breadcrumb/index.d.ts +21 -0
- package/dist/theme/types/components/Navigation/DropDown/index.d.ts +297 -0
- package/dist/theme/types/components/Navigation/Header/index.d.ts +33 -0
- package/dist/theme/types/components/Navigation/Menu/index.d.ts +123 -0
- package/dist/theme/types/components/Navigation/Pagination/index.d.ts +191 -0
- package/dist/theme/types/components/Navigation/Steps/index.d.ts +77 -0
- package/dist/theme/types/general/border/index.d.ts +29 -0
- package/dist/theme/types/general/colors/index.d.ts +385 -0
- package/dist/theme/types/general/spacing/index.d.ts +25 -0
- package/dist/theme/types/general/typography/index.d.ts +45 -0
- package/dist/theme/types/index.d.ts +113 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/ColorPicker/index.js +6 -6
- package/dist/theme/utils/tokens-mapper/DataEntry/DatePicker/index.js +3 -3
- package/dist/theme/utils/tokens-mapper/DataEntry/Input/index.js +5 -5
- package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.js +5 -5
- package/dist/translation/types/components/DataDisplay/Collapse/index.d.ts +3 -0
- package/dist/translation/types/components/DataDisplay/Image/index.d.ts +3 -0
- package/dist/translation/types/components/DataDisplay/ItemCard/index.d.ts +4 -0
- package/dist/translation/types/components/DataDisplay/ItemList/index.d.ts +4 -0
- package/dist/translation/types/general/index.d.ts +4 -0
- package/dist/translation/types/index.d.ts +15 -0
- package/dist/types.d.ts +174 -0
- package/dist/utils/functions/types.d.ts +4 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +11 -3
- package/dist/chunks/InputWrapper.sHItZx7l.js +0 -40
- package/dist/chunks/index.kVWdzwin.js +0 -755
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [X.X.X](https://www.npmjs.com/package/aristid-ds/v/X.X.Xx) (2024-XX-XX)
|
|
3
4
|
|
|
5
|
+
### ✨ Features
|
|
6
|
+
* **Typography:**
|
|
7
|
+
* update default typography color (@evoiron)
|
|
8
|
+
* **InputWrapper:**
|
|
9
|
+
* Add 4 properties: (@evoiron)
|
|
10
|
+
* `required`: show a red asterisk right after the label
|
|
11
|
+
* `actions`: an array of items to display at the right of the label
|
|
12
|
+
* `onInfoClick`: When set, display a clickable info icon which triggers this event
|
|
13
|
+
* `infoIcon`: customise the infoIcon displayed
|
|
14
|
+
* These components now accept the 4 properties above: (@evoiron)
|
|
15
|
+
* `AutoComplete`, `Checkbox.Group`, `Radio.Group`, `ColorPicker`, `DatePicker`, `RangePicker`, `Input`, `InputNumber`, `Select`
|
|
16
|
+
* **ItemList**
|
|
17
|
+
* Add `draggable` property showing an icon that indicates the item is draggable (@fatb38)
|
|
18
|
+
* **Tabs:**
|
|
19
|
+
* Add `hideSeparator` prop to hide separator between tabs and content (@P0ppoff)
|
|
20
|
+
* (Style) Allow tabs center on extraContent (@P0ppoff)
|
|
21
|
+
* (Style) Reduce space between tabs and separator (@P0ppoff)
|
|
22
|
+
|
|
23
|
+
### 🐛 Bug Fixes
|
|
24
|
+
* **Package**: include typescript definitions for each component in built package (@evoiron)
|
|
25
|
+
* **Select:**
|
|
26
|
+
* Fix default border color (@philippechevieux)
|
|
27
|
+
* **Badge:**
|
|
28
|
+
* Fix custom className bug (@evoiron)
|
|
29
|
+
* **Input:**
|
|
30
|
+
* Update color of content, label, placeholder and clear icon (@TdyP)
|
|
31
|
+
* Add aria-label on clear icon to improve testability (@TdyP)
|
|
32
|
+
* **InputNumber:**
|
|
33
|
+
* Update color of content, label, placeholder and clear icon (@TdyP)
|
|
34
|
+
* **ColorPicker:**
|
|
35
|
+
* Update color of content, label and placeholder (@TdyP)
|
|
36
|
+
* **DatePicker:**
|
|
37
|
+
* Update color of content, label and placeholder (@TdyP)
|
|
38
|
+
|
|
39
|
+
## [1.1.0](https://www.npmjs.com/package/aristid-ds/v/1.1.0) (2024-02-28)
|
|
40
|
+
|
|
41
|
+
### ✨ Features
|
|
42
|
+
* **Nightly build:**
|
|
43
|
+
* publish a nightly version of the package under `next`. (@evoiron)
|
|
44
|
+
|
|
45
|
+
### 🐛 Bug Fixes
|
|
46
|
+
* **AutoComplete:**
|
|
47
|
+
* Fix crashing release (@evoiron)
|
|
48
|
+
|
|
49
|
+
* **AutoComplete:**
|
|
50
|
+
* Fix dropdown border when focused or when a status is set (@philippechevieux)
|
|
51
|
+
|
|
52
|
+
* **Select:**
|
|
53
|
+
* Fix dropdown border when focused or when a status is set (@philippechevieux)
|
|
54
|
+
* Fix dropdown border on click on arrow (@renaudamsellem)
|
|
55
|
+
|
|
56
|
+
* **InputWrapper:**
|
|
57
|
+
* Fix border default color (@philippechevieux)
|
|
4
58
|
|
|
5
59
|
## [1.0.1](https://www.npmjs.com/package/aristid-ds/v/1.0.1) (2024-02-26)
|
|
6
60
|
### 🐛 Bug Fixes
|
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ ARiSTiD Design System Readme.
|
|
|
21
21
|
- [Component code](#component-code)
|
|
22
22
|
- [Component theming](#component-theming)
|
|
23
23
|
- [Component documentation](#component-documentation)
|
|
24
|
+
- [Nightly build](#nightly-build)
|
|
24
25
|
- [Important](#important)
|
|
25
26
|
- [Contributing](#contributing)
|
|
26
27
|
- [Commit](#commit)
|
|
@@ -451,9 +452,16 @@ Every components **style** of the design system can be **override** by tokens.
|
|
|
451
452
|
After the script run, section `Design Tokens` documentation is up to date with all design tokens.
|
|
452
453
|
|
|
453
454
|
|
|
455
|
+
## Nightly build
|
|
456
|
+
A nightly version of the package is published on daily basis on branch develop (assuming new commits have been pushed on develop branch). To use it just install the more recent next version :
|
|
457
|
+
|
|
458
|
+
```sh
|
|
459
|
+
yarn add aristid-ds@next
|
|
460
|
+
```
|
|
461
|
+
**Note:** Though it is useful to test upcoming feature, this version should **NEVER** be used in production
|
|
454
462
|
|
|
455
463
|
## Important
|
|
456
|
-
Every import of antd library should pass by `antd` or
|
|
464
|
+
Every import of antd library should pass by `antd` or `ant/es`. `lib` import will lead to issues in the build process.
|
|
457
465
|
|
|
458
466
|
## Contributing
|
|
459
467
|
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
import "../../assets/index19.css";
|
|
2
|
-
import r, { useState as p, useLayoutEffect as
|
|
2
|
+
import r, { useState as p, useLayoutEffect as K, useRef as g, useEffect as v } from "react";
|
|
3
3
|
import { ConfigProvider as E } from "antd";
|
|
4
|
-
import {
|
|
4
|
+
import { K as L } from "../../chunks/SnackBarProvider.i0xeV0xG.js";
|
|
5
5
|
import { createGlobalStyle as P } from "styled-components";
|
|
6
6
|
import { toCssVariables as d, uuid as S } from "../../utils/functions/index.js";
|
|
7
|
-
import
|
|
7
|
+
import s from "lodash/merge";
|
|
8
8
|
import { Style as C } from "react-style-tag";
|
|
9
9
|
import { K as b } from "../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
|
-
import { KitAristidThemeGeneral as
|
|
10
|
+
import { KitAristidThemeGeneral as l } from "../../theme/aristid/general/index.js";
|
|
11
11
|
import { antdThemeConfig as h } from "../../theme/utils/tokens-mapper/index.js";
|
|
12
12
|
import { frFR as m } from "../../translation/fr-FR/index.js";
|
|
13
|
-
import { enUS as
|
|
14
|
-
import { K as
|
|
15
|
-
import { mapKitLocaleToAntdLocale as
|
|
16
|
-
import { d as
|
|
17
|
-
const
|
|
13
|
+
import { enUS as F } from "../../translation/en-US/index.js";
|
|
14
|
+
import { K as R, u as T } from "../../chunks/useKitLocale.96CdK3og.js";
|
|
15
|
+
import { mapKitLocaleToAntdLocale as $ } from "../../translation/utils/index.js";
|
|
16
|
+
import { d as k } from "../../chunks/notification-provider.KGowspef.js";
|
|
17
|
+
const y = P`
|
|
18
18
|
.${(t) => t.id} {
|
|
19
19
|
${(t) => d(t.customTheme)};
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
22
|
-
const [
|
|
23
|
-
return
|
|
24
|
-
const a = d(
|
|
25
|
-
|
|
26
|
-
}, []), r.createElement(b.Provider, { value: { theme: f, appId: c, spacing: u } },
|
|
21
|
+
`, A = "aristid-ds-global", I = ({ children: t, customTheme: e, id: o }) => {
|
|
22
|
+
const [i, n] = p(null), { theme: f, appId: c, spacing: u } = x(o, e);
|
|
23
|
+
return K(() => {
|
|
24
|
+
const a = d(l, "--general");
|
|
25
|
+
n(a);
|
|
26
|
+
}, []), r.createElement(b.Provider, { value: { theme: f, appId: c, spacing: u } }, i !== null && r.createElement(
|
|
27
27
|
r.Fragment,
|
|
28
28
|
null,
|
|
29
|
-
r.createElement(C, { id:
|
|
29
|
+
r.createElement(C, { id: A, hasSourceMap: !1 }, `
|
|
30
30
|
:root{
|
|
31
|
-
${Object.keys(
|
|
31
|
+
${Object.keys(i).map((a) => `${a}: ${i[a]}`).join(";")}
|
|
32
32
|
}
|
|
33
33
|
`),
|
|
34
|
-
e && r.createElement(
|
|
34
|
+
e && r.createElement(y, { id: c, customTheme: e }),
|
|
35
35
|
t
|
|
36
36
|
));
|
|
37
37
|
}, x = (t, e) => {
|
|
38
38
|
var o;
|
|
39
|
-
const
|
|
40
|
-
return { theme:
|
|
39
|
+
const i = g(t || "ds-" + S().substring(0, 8)), n = s(l.spacing, (o = e == null ? void 0 : e.general) === null || o === void 0 ? void 0 : o.spacing);
|
|
40
|
+
return { theme: l, appId: i.current, spacing: n };
|
|
41
41
|
}, j = ({ children: t }) => {
|
|
42
42
|
const e = G();
|
|
43
|
-
return r.createElement(
|
|
43
|
+
return r.createElement(R.Provider, { value: e }, t);
|
|
44
44
|
}, G = () => {
|
|
45
45
|
const [t, e] = p(m);
|
|
46
|
-
return { locale: t, setKitLocale: (
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
e(
|
|
46
|
+
return { locale: t, setKitLocale: (i) => {
|
|
47
|
+
if (i.locale === "frFR") {
|
|
48
|
+
const n = s(m, i);
|
|
49
|
+
e(n);
|
|
50
50
|
} else {
|
|
51
|
-
const
|
|
52
|
-
e(
|
|
51
|
+
const n = s(F, i);
|
|
52
|
+
e(n);
|
|
53
53
|
}
|
|
54
54
|
} };
|
|
55
|
-
}, Z = ({ children: t, locale: e, customTheme: o, id:
|
|
56
|
-
|
|
57
|
-
{ customTheme: o, id:
|
|
55
|
+
}, Z = ({ children: t, locale: e, customTheme: o, id: i }) => r.createElement(
|
|
56
|
+
I,
|
|
57
|
+
{ customTheme: o, id: i },
|
|
58
58
|
r.createElement(
|
|
59
59
|
j,
|
|
60
60
|
null,
|
|
61
61
|
r.createElement(U, { locale: e }, t)
|
|
62
62
|
)
|
|
63
63
|
), U = ({ children: t, locale: e }) => {
|
|
64
|
-
const { setKitLocale: o } =
|
|
65
|
-
return
|
|
64
|
+
const { setKitLocale: o } = T();
|
|
65
|
+
return v(() => {
|
|
66
66
|
e !== void 0 && o(e);
|
|
67
67
|
}, [e, o]), r.createElement(
|
|
68
68
|
E,
|
|
69
|
-
{ theme: h, locale:
|
|
69
|
+
{ theme: h, locale: $(e) },
|
|
70
70
|
r.createElement(
|
|
71
|
-
|
|
71
|
+
k,
|
|
72
72
|
null,
|
|
73
73
|
r.createElement(L, null),
|
|
74
74
|
t
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {AvatarProps} from 'antd';
|
|
2
|
+
import {GroupProps} from 'antd/es/avatar';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
import {FunctionComponent} from 'react';
|
|
5
|
+
import {KitColorProp} from '../../../utils/functions/types';
|
|
6
|
+
|
|
7
|
+
type AntdAvatarTypesToOmit = '';
|
|
8
|
+
type AntdAvatarGroupTypesToOmit = 'maxStyle';
|
|
9
|
+
|
|
10
|
+
export interface IKitAvatar extends Omit<AvatarProps, AntdAvatarTypesToOmit>, KitHTMLAttributes<HTMLSpanElement> {
|
|
11
|
+
color?: KitColorProp;
|
|
12
|
+
secondaryColorInvert?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IKitAvatarGroup
|
|
16
|
+
extends Omit<GroupProps, AntdAvatarGroupTypesToOmit>,
|
|
17
|
+
KitHTMLAttributes<HTMLDivElement> {}
|
|
18
|
+
|
|
19
|
+
export type KitAvatarCompoundedComponent = FunctionComponent<IKitAvatar> & {
|
|
20
|
+
Group: FunctionComponent<IKitAvatarGroup>;
|
|
21
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../../../assets/index.css";
|
|
2
|
-
import
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { u } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
-
import { isValidColor as
|
|
6
|
-
import { kitBadgeCssTokens as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
2
|
+
import g, { useMemo as l } from "react";
|
|
3
|
+
import { Badge as u } from "antd";
|
|
4
|
+
import { u as d } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
+
import { isValidColor as f, getColor as n, getLighterColor as c } from "../../../utils/functions/index.js";
|
|
6
|
+
import { kitBadgeCssTokens as s } from "../../../theme/aristid/components/DataDisplay/Badge/index.js";
|
|
7
|
+
import k from "classnames";
|
|
8
|
+
const b = {
|
|
9
9
|
"kit-badge": "_kit-badge_16zpm_2"
|
|
10
|
-
}, B = (t, e) => !t || !
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
}, C = ({ color: t, style: e, secondaryColorInvert: o = !1, ...
|
|
14
|
-
const { appId: a } =
|
|
15
|
-
return
|
|
10
|
+
}, B = (t, e) => !t || !f(t) ? null : {
|
|
11
|
+
[s.colors.background.default]: n(t, e),
|
|
12
|
+
[s.colors.typography.default]: c(t, e)
|
|
13
|
+
}, C = ({ color: t, style: e, secondaryColorInvert: o = !1, className: m, ...r }) => {
|
|
14
|
+
const { appId: a } = d(), i = l(() => ({ ...e, ...B(t, o) }), [t, o, e]), p = k(a, b["kit-badge"], m);
|
|
15
|
+
return g.createElement(u, { style: i, ...r, className: p });
|
|
16
16
|
};
|
|
17
17
|
C.displayName = "KitBadge";
|
|
18
18
|
export {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {BadgeProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
import {KitColorProp} from '../../../utils/functions/types';
|
|
4
|
+
|
|
5
|
+
type AntdBadgeTypesToOmit = 'color' | 'size' | 'offset' | 'text';
|
|
6
|
+
|
|
7
|
+
export interface IKitBadge extends KitHTMLAttributes<HTMLDivElement>, Omit<BadgeProps, AntdBadgeTypesToOmit> {
|
|
8
|
+
color?: KitColorProp;
|
|
9
|
+
secondaryColorInvert?: boolean;
|
|
10
|
+
}
|
|
@@ -8,7 +8,7 @@ import "../../DataEntry/Input/index.js";
|
|
|
8
8
|
import "../../DataEntry/InputNumber/index.js";
|
|
9
9
|
import "../../DataEntry/Radio/index.js";
|
|
10
10
|
import "../../DataEntry/Rate/index.js";
|
|
11
|
-
import { K as y } from "../../../chunks/index.
|
|
11
|
+
import { K as y } from "../../../chunks/index.3dShBEOX.js";
|
|
12
12
|
import "../../DataEntry/Switch/index.js";
|
|
13
13
|
import "../../DataEntry/DatePicker/index.js";
|
|
14
14
|
import "../../DataEntry/AutoComplete/index.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {CSSProperties, ReactNode} from 'react';
|
|
2
|
+
import {IKitTagConfig} from '../../DataDisplay/Tag/types';
|
|
3
|
+
import {CheckboxChangeEvent} from 'antd/es/checkbox';
|
|
4
|
+
import {SwitchChangeEventHandler} from 'antd/es/switch';
|
|
5
|
+
|
|
6
|
+
export interface IKitCard {
|
|
7
|
+
title: string;
|
|
8
|
+
actions?: IKitCardAction[];
|
|
9
|
+
activated?: boolean;
|
|
10
|
+
brandingBar?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
extra?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
previewSrc?: string;
|
|
17
|
+
onActivate?: SwitchChangeEventHandler;
|
|
18
|
+
onSelect?: (e: CheckboxChangeEvent) => void;
|
|
19
|
+
selected?: boolean;
|
|
20
|
+
tags?: IKitTagConfig[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface IKitCardAction {
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
icon: ReactNode;
|
|
27
|
+
onClick: (e: unknown) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IStyledKitCard {
|
|
31
|
+
$brandingBar: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {CollapseProps} from 'antd';
|
|
2
|
+
import {ReactNode, MouseEvent, ReactInstance, KeyboardEvent, FunctionComponent} from 'react';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
import {SwitchChangeEventHandler} from 'antd/es/switch';
|
|
5
|
+
|
|
6
|
+
type AntdCollapseTypesToOmit = 'bordered' | 'expandIconPosition' | 'ghost';
|
|
7
|
+
|
|
8
|
+
export interface IKitCollapse extends Omit<CollapseProps, AntdCollapseTypesToOmit>, KitHTMLAttributes<HTMLDivElement> {}
|
|
9
|
+
|
|
10
|
+
export interface IKitHeader {
|
|
11
|
+
imageSrc?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
tagContent?: ReactNode;
|
|
15
|
+
onSwitchChange?: SwitchChangeEventHandler;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IKitHeaderSwitch {
|
|
20
|
+
onSwitchChange: NonNullable<IKitHeader['onSwitchChange']>;
|
|
21
|
+
disabled: NonNullable<IKitHeader['disabled']>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IKitHeaderImage {
|
|
25
|
+
imageSrc: NonNullable<IKitHeader['imageSrc']>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IKitHeaderContent {
|
|
29
|
+
title: IKitHeader['title'];
|
|
30
|
+
description: IKitHeader['description'];
|
|
31
|
+
tagContent: IKitHeader['tagContent'];
|
|
32
|
+
disabled: IKitHeader['disabled'];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IKitMenuInfo {
|
|
36
|
+
key: string;
|
|
37
|
+
keyPath: string[];
|
|
38
|
+
/** @deprecated This will not support in future. You should avoid to use this */
|
|
39
|
+
item: ReactInstance;
|
|
40
|
+
domEvent: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface IAction {
|
|
44
|
+
icon: ReactNode;
|
|
45
|
+
label: string;
|
|
46
|
+
onClick?: (e: MouseEvent<HTMLElement> | IKitMenuInfo) => void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface IActions extends Array<IAction> {}
|
|
50
|
+
|
|
51
|
+
export interface IKitHeaderExtra {
|
|
52
|
+
actions?: IActions;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface IKitHeaderExtraActions {
|
|
57
|
+
actions: NonNullable<IKitHeaderExtra['actions']>;
|
|
58
|
+
disabled: NonNullable<IKitHeaderExtra['disabled']>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface IKitHeaderExtraMoreActions {
|
|
62
|
+
actions: NonNullable<IKitHeaderExtra['actions']>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type KitCollapseCompoundedComponent = FunctionComponent<IKitCollapse> & {
|
|
66
|
+
Header: FunctionComponent<IKitHeader>;
|
|
67
|
+
HeaderExtra: FunctionComponent<IKitHeaderExtra>;
|
|
68
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type {ImageProps} from 'antd';
|
|
2
|
+
import {FunctionComponent, ReactElement} from 'react';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
import {Image as AntdImage} from 'antd';
|
|
5
|
+
|
|
6
|
+
export interface IKitImage extends ImageProps, KitHTMLAttributes<HTMLDivElement> {
|
|
7
|
+
rounded?: boolean;
|
|
8
|
+
bordered?: boolean;
|
|
9
|
+
PreviewGroup?: ReactElement;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IStyledKitImage {
|
|
13
|
+
$rounded?: boolean;
|
|
14
|
+
$bordered?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type KitImageCompoundedComponent = FunctionComponent<IKitImage> & {
|
|
18
|
+
PreviewGroup: typeof AntdImage.PreviewGroup;
|
|
19
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "classnames";
|
|
3
|
-
import { a as q } from "../../../chunks/index.
|
|
3
|
+
import { a as q } from "../../../chunks/index.3dShBEOX.js";
|
|
4
4
|
import "../../General/Button/index.js";
|
|
5
5
|
import "../../General/Typography/index.js";
|
|
6
6
|
import "../../General/Icon/index.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
2
|
+
import {IKitTag} from '../Tag/types';
|
|
3
|
+
import {ReactNode, MouseEvent} from 'react';
|
|
4
|
+
import {CheckboxChangeEvent} from 'antd/es/checkbox';
|
|
5
|
+
|
|
6
|
+
export type CardColor = {
|
|
7
|
+
label: string;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export interface IKitColorbar {
|
|
12
|
+
colors?: CardColor[] | null;
|
|
13
|
+
vertical?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IStyledKitColorbar {
|
|
18
|
+
$column: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//TODO change title wording and delete omit<title>
|
|
22
|
+
export default interface IKitItemCard extends Omit<KitHTMLAttributes<HTMLDivElement>, 'title'> {
|
|
23
|
+
vertical?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
colors?: CardColor[] | null;
|
|
26
|
+
fullWidthAvatar?: boolean;
|
|
27
|
+
picture?: ReactNode;
|
|
28
|
+
title?: ReactNode;
|
|
29
|
+
description?: ReactNode;
|
|
30
|
+
extrainfo?: ReactNode;
|
|
31
|
+
tags?: IKitTag[] | string[];
|
|
32
|
+
actions?: ReactNode[];
|
|
33
|
+
onSelectChange?: (e: CheckboxChangeEvent) => void;
|
|
34
|
+
onEdit?: (e: MouseEvent<HTMLElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IStyledKitItemCard {
|
|
38
|
+
$disabled: boolean;
|
|
39
|
+
$vertical?: boolean;
|
|
40
|
+
}
|
|
@@ -4,7 +4,7 @@ import "../../DataEntry/Input/index.js";
|
|
|
4
4
|
import "../../DataEntry/InputNumber/index.js";
|
|
5
5
|
import "../../DataEntry/Radio/index.js";
|
|
6
6
|
import "../../DataEntry/Rate/index.js";
|
|
7
|
-
import { c as u } from "../../../chunks/index.
|
|
7
|
+
import { c as u } from "../../../chunks/index.3dShBEOX.js";
|
|
8
8
|
import "../../DataEntry/Switch/index.js";
|
|
9
9
|
import "../../DataEntry/DatePicker/index.js";
|
|
10
10
|
import "../../DataEntry/AutoComplete/index.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
2
|
+
import {ReactNode} from 'react';
|
|
3
|
+
import {CheckboxChangeEvent} from 'antd/es/checkbox';
|
|
4
|
+
|
|
5
|
+
export interface IKitItemList extends KitHTMLAttributes<HTMLDivElement> {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
picture?: ReactNode;
|
|
9
|
+
onSelect?: (e: CheckboxChangeEvent) => void;
|
|
10
|
+
tagNumber?: number;
|
|
11
|
+
onRafterClick?: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
disableSecureClick?: boolean;
|
|
16
|
+
draggable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IStyledKitItemList {
|
|
20
|
+
$gridTemplateColumns: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {CardProps} from 'antd';
|
|
2
|
+
|
|
3
|
+
type AntdCardTypesToOmit =
|
|
4
|
+
| 'size'
|
|
5
|
+
| 'type'
|
|
6
|
+
| 'bordered'
|
|
7
|
+
| 'bodyStyle'
|
|
8
|
+
| 'hoverable'
|
|
9
|
+
| 'tabProps'
|
|
10
|
+
| 'tabList'
|
|
11
|
+
| 'defaultActiveTabKey'
|
|
12
|
+
| 'tabBarExtraContent'
|
|
13
|
+
| 'onTabChange';
|
|
14
|
+
|
|
15
|
+
export default interface IKitLegacyCard extends Omit<CardProps, AntdCardTypesToOmit> {
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
contentTitle?: string;
|
|
18
|
+
contentDescription?: string;
|
|
19
|
+
separator?: boolean;
|
|
20
|
+
onContentTitleClick?: () => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface IStyledKitLegacyCard {
|
|
24
|
+
$disabled: boolean;
|
|
25
|
+
$separator: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IStyledKitLegacyCardContentTitleContainer {
|
|
29
|
+
$isContentTitleClick: boolean;
|
|
30
|
+
$disabled: boolean;
|
|
31
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "../../../assets/index5.css";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import { Tabs as
|
|
4
|
-
import { u as
|
|
5
|
-
import
|
|
3
|
+
import { Tabs as c } from "antd";
|
|
4
|
+
import { u as l } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
+
import s from "classnames";
|
|
6
6
|
const n = {
|
|
7
|
-
"kit-tabs": "_kit-
|
|
8
|
-
}, b = ({ className:
|
|
9
|
-
const { appId:
|
|
10
|
-
return i.createElement(
|
|
7
|
+
"kit-tabs": "_kit-tabs_sc95q_2"
|
|
8
|
+
}, b = ({ className: a, popupClassName: o, hideSeparator: e = !1, ...p }) => {
|
|
9
|
+
const { appId: t } = l(), r = s(t, n["kit-tabs"], a, { "hide-separator": e }), m = s(t, o);
|
|
10
|
+
return i.createElement(c, { className: r, popupClassName: m, ...p });
|
|
11
11
|
};
|
|
12
12
|
b.displayName = "KitTabs";
|
|
13
13
|
export {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {TagProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
import {CSSProperties, ReactNode} from 'react';
|
|
4
|
+
import {KitColorProp} from '../../../utils/functions/types';
|
|
5
|
+
|
|
6
|
+
export type AntdTagPropsToOmit = 'color' | 'checkableTag' | 'icon' | 'closable';
|
|
7
|
+
|
|
8
|
+
export interface IKitTag extends Omit<TagProps, AntdTagPropsToOmit>, KitHTMLAttributes<HTMLSpanElement> {
|
|
9
|
+
color?: KitColorProp;
|
|
10
|
+
secondaryColorInvert?: boolean;
|
|
11
|
+
children?: ReactNode[] | ReactNode;
|
|
12
|
+
onClose?: TagProps['onClose'];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IKitTagConfig {
|
|
16
|
+
wording: string;
|
|
17
|
+
color?: KitColorProp;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IKitTagGroup {
|
|
21
|
+
tags: IKitTagConfig[];
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IUseTagGroup {
|
|
27
|
+
visibleTags: number;
|
|
28
|
+
remainingTags: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {TooltipProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AntdTooltipTypesToOmit = 'color' | 'overlayClassName' | 'overlayStyle' | 'overlayInnerStyle';
|
|
5
|
+
|
|
6
|
+
//TODO change title wording and delete Omit<title>
|
|
7
|
+
export interface IKitTooltip
|
|
8
|
+
extends Omit<TooltipProps, AntdTooltipTypesToOmit>,
|
|
9
|
+
Omit<KitHTMLAttributes<HTMLDivElement>, 'title'> {}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type {BasicDataNode} from 'rc-tree';
|
|
2
|
+
import {TreeProps} from 'antd';
|
|
3
|
+
import {DataNode} from 'antd/es/tree';
|
|
4
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
5
|
+
|
|
6
|
+
type AntdTreeTypesToOmit =
|
|
7
|
+
| 'blockNode'
|
|
8
|
+
| 'draggable'
|
|
9
|
+
| 'onDragEnd'
|
|
10
|
+
| 'onDragEnter'
|
|
11
|
+
| 'onDragLeave'
|
|
12
|
+
| 'onDragOver'
|
|
13
|
+
| 'onDragStart'
|
|
14
|
+
| 'onDrop'
|
|
15
|
+
| 'filterTreeNode';
|
|
16
|
+
|
|
17
|
+
export interface IKitTree
|
|
18
|
+
extends Omit<TreeProps<BasicDataNode | DataNode>, AntdTreeTypesToOmit>,
|
|
19
|
+
KitHTMLAttributes<HTMLDivElement> {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KitAvatar as o } from "./Avatar/index.js";
|
|
2
2
|
import { KitBadge as e } from "./Badge/index.js";
|
|
3
3
|
import { KitLegacyCard as K } from "./LegacyCard/index.js";
|
|
4
|
-
import { K as p, b as f, a as x, c as s, d } from "../../chunks/index.
|
|
4
|
+
import { K as p, b as f, a as x, c as s, d } from "../../chunks/index.3dShBEOX.js";
|
|
5
5
|
import { KitImage as g } from "./Image/index.js";
|
|
6
6
|
import { KitTooltip as l } from "./Tooltip/index.js";
|
|
7
7
|
import { KitTree as b } from "./Tree/index.js";
|