aristid-ds 1.1.0 → 2.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.
Files changed (164) hide show
  1. package/CHANGELOG.md +45 -2
  2. package/dist/Kit/App/index.js +34 -34
  3. package/dist/Kit/App/types.d.ts +6 -0
  4. package/dist/Kit/DataDisplay/Avatar/types.d.ts +21 -0
  5. package/dist/Kit/DataDisplay/Badge/index.js +13 -13
  6. package/dist/Kit/DataDisplay/Badge/types.d.ts +10 -0
  7. package/dist/Kit/DataDisplay/Card/index.js +2 -2
  8. package/dist/Kit/DataDisplay/Card/types.d.ts +32 -0
  9. package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
  10. package/dist/Kit/DataDisplay/Collapse/types.d.ts +68 -0
  11. package/dist/Kit/DataDisplay/Image/types.d.ts +19 -0
  12. package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
  13. package/dist/Kit/DataDisplay/ItemCard/types.d.ts +40 -0
  14. package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
  15. package/dist/Kit/DataDisplay/ItemList/types.d.ts +21 -0
  16. package/dist/Kit/DataDisplay/LegacyCard/index.js +10 -7
  17. package/dist/Kit/DataDisplay/LegacyCard/types.d.ts +31 -0
  18. package/dist/Kit/DataDisplay/Tabs/index.js +7 -7
  19. package/dist/Kit/DataDisplay/Tabs/types.d.ts +6 -0
  20. package/dist/Kit/DataDisplay/Tag/index.js +1 -1
  21. package/dist/Kit/DataDisplay/Tag/types.d.ts +29 -0
  22. package/dist/Kit/DataDisplay/Tooltip/types.d.ts +9 -0
  23. package/dist/Kit/DataDisplay/Tour/types.d.ts +5 -0
  24. package/dist/Kit/DataDisplay/Tree/types.d.ts +19 -0
  25. package/dist/Kit/DataDisplay/index.js +1 -1
  26. package/dist/Kit/DataEntry/AutoComplete/index.js +19 -19
  27. package/dist/Kit/DataEntry/AutoComplete/types.d.ts +15 -0
  28. package/dist/Kit/DataEntry/Checkbox/index.js +32 -32
  29. package/dist/Kit/DataEntry/Checkbox/types.d.ts +56 -0
  30. package/dist/Kit/DataEntry/ColorPicker/index.d.ts +2 -2
  31. package/dist/Kit/DataEntry/ColorPicker/index.js +11 -11
  32. package/dist/Kit/DataEntry/ColorPicker/types.d.ts +19 -0
  33. package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +2 -2
  34. package/dist/Kit/DataEntry/DatePicker/index.js +23 -25
  35. package/dist/Kit/DataEntry/DatePicker/types.d.ts +40 -0
  36. package/dist/Kit/DataEntry/Input/index.js +34 -34
  37. package/dist/Kit/DataEntry/Input/types.d.ts +45 -0
  38. package/dist/Kit/DataEntry/InputNumber/index.js +14 -14
  39. package/dist/Kit/DataEntry/InputNumber/types.d.ts +17 -0
  40. package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
  41. package/dist/Kit/DataEntry/InputWrapper/types.d.ts +15 -0
  42. package/dist/Kit/DataEntry/Radio/index.d.ts +3 -3
  43. package/dist/Kit/DataEntry/Radio/index.js +32 -32
  44. package/dist/Kit/DataEntry/Radio/types.d.ts +30 -0
  45. package/dist/Kit/DataEntry/Rate/types.d.ts +13 -0
  46. package/dist/Kit/DataEntry/Select/index.d.ts +1 -1
  47. package/dist/Kit/DataEntry/Select/index.js +9 -9
  48. package/dist/Kit/DataEntry/Select/types.d.ts +48 -0
  49. package/dist/Kit/DataEntry/Slider/types.d.ts +26 -0
  50. package/dist/Kit/DataEntry/Switch/types.d.ts +4 -0
  51. package/dist/Kit/DataEntry/Upload/types.d.ts +24 -0
  52. package/dist/Kit/DataEntry/index.js +2 -2
  53. package/dist/Kit/Feedback/Alert/types.d.ts +8 -0
  54. package/dist/Kit/Feedback/Modal/index.js +122 -102
  55. package/dist/Kit/Feedback/Modal/types.d.ts +62 -0
  56. package/dist/Kit/Feedback/Notification/KitNotification.d.ts +2 -2
  57. package/dist/Kit/Feedback/Notification/index.js +1 -1
  58. package/dist/Kit/Feedback/Notification/types.d.ts +27 -0
  59. package/dist/Kit/Feedback/Progress/types.d.ts +4 -0
  60. package/dist/Kit/Feedback/SnackBar/index.js +4 -4
  61. package/dist/Kit/Feedback/SnackBar/types.d.ts +21 -0
  62. package/dist/Kit/Feedback/index.js +1 -1
  63. package/dist/Kit/General/Button/index.js +14 -13
  64. package/dist/Kit/General/Button/types.d.ts +49 -0
  65. package/dist/Kit/General/Icon/types.d.ts +20 -0
  66. package/dist/Kit/General/Typography/types.d.ts +77 -0
  67. package/dist/Kit/Layout/Divider/types.d.ts +16 -0
  68. package/dist/Kit/Layout/Grid/types.d.ts +12 -0
  69. package/dist/Kit/Layout/Section/index.d.ts +4 -0
  70. package/dist/Kit/Layout/Section/index.js +20 -0
  71. package/dist/Kit/Layout/Section/types.d.ts +8 -0
  72. package/dist/Kit/Layout/Space/types.d.ts +16 -0
  73. package/dist/Kit/Layout/index.d.ts +1 -0
  74. package/dist/Kit/Layout/index.js +4 -2
  75. package/dist/Kit/Navigation/Breadcrumb/types.d.ts +12 -0
  76. package/dist/Kit/Navigation/DropDown/types.d.ts +6 -0
  77. package/dist/Kit/Navigation/Header/index.js +6 -3
  78. package/dist/Kit/Navigation/Header/types.d.ts +11 -0
  79. package/dist/Kit/Navigation/Menu/index.js +1 -1
  80. package/dist/Kit/Navigation/Menu/types.d.ts +51 -0
  81. package/dist/Kit/Navigation/Pagination/index.js +1 -1
  82. package/dist/Kit/Navigation/Pagination/types.d.ts +6 -0
  83. package/dist/Kit/Navigation/Steps/types.d.ts +12 -0
  84. package/dist/Kit/Navigation/index.js +1 -1
  85. package/dist/Kit/index.js +154 -149
  86. package/dist/assets/InputWrapper.css +1 -1
  87. package/dist/assets/index14.css +1 -1
  88. package/dist/assets/index19.css +1 -1
  89. package/dist/assets/index22.css +1 -1
  90. package/dist/assets/index25.css +1 -1
  91. package/dist/assets/index27.css +1 -1
  92. package/dist/assets/index29.css +1 -1
  93. package/dist/assets/index5.css +1 -1
  94. package/dist/assets/styles.css +1 -1
  95. package/dist/assets/styles2.css +1 -0
  96. package/dist/chunks/InputWrapper.69dUKMaK.js +47 -0
  97. package/dist/chunks/{KitNotification.3hnPgsKv.js → KitNotification.o3gKIpvN.js} +7 -4
  98. package/dist/chunks/{SnackBarProvider.v49b6mkx.js → SnackBarProvider.i0xeV0xG.js} +6 -6
  99. package/dist/chunks/index.F6xtnegv.js +757 -0
  100. package/dist/chunks/styles.module.cDfGpFWX.js +8 -0
  101. package/dist/chunks/{styles.module.x1Oajwjm.js → styles.module.h70MuyQF.js} +1 -1
  102. package/dist/index.es.js +158 -153
  103. package/dist/theme/aristid/general/colors/index.js +2 -0
  104. package/dist/theme/theme-context.d.ts +2 -2
  105. package/dist/theme/types/components/DataDisplay/Avatar/index.d.ts +59 -0
  106. package/dist/theme/types/components/DataDisplay/Badge/index.d.ts +59 -0
  107. package/dist/theme/types/components/DataDisplay/Card/index.d.ts +181 -0
  108. package/dist/theme/types/components/DataDisplay/Collapse/index.d.ts +67 -0
  109. package/dist/theme/types/components/DataDisplay/Image/index.d.ts +45 -0
  110. package/dist/theme/types/components/DataDisplay/ItemCard/index.d.ts +313 -0
  111. package/dist/theme/types/components/DataDisplay/ItemList/index.d.ts +185 -0
  112. package/dist/theme/types/components/DataDisplay/LegacyCard/index.d.ts +251 -0
  113. package/dist/theme/types/components/DataDisplay/Tabs/index.d.ts +315 -0
  114. package/dist/theme/types/components/DataDisplay/Tag/index.d.ts +61 -0
  115. package/dist/theme/types/components/DataDisplay/Tooltip/index.d.ts +51 -0
  116. package/dist/theme/types/components/DataDisplay/Tree/index.d.ts +177 -0
  117. package/dist/theme/types/components/DataEntry/Checkbox/index.d.ts +169 -0
  118. package/dist/theme/types/components/DataEntry/ColorPicker/index.d.ts +228 -0
  119. package/dist/theme/types/components/DataEntry/DatePicker/index.d.ts +576 -0
  120. package/dist/theme/types/components/DataEntry/Input/index.d.ts +332 -0
  121. package/dist/theme/types/components/DataEntry/InputNumber/index.d.ts +211 -0
  122. package/dist/theme/types/components/DataEntry/InputWrapper/index.d.ts +95 -0
  123. package/dist/theme/types/components/DataEntry/Radio/index.d.ts +181 -0
  124. package/dist/theme/types/components/DataEntry/Rate/index.d.ts +25 -0
  125. package/dist/theme/types/components/DataEntry/Select/index.d.ts +373 -0
  126. package/dist/theme/types/components/DataEntry/Slider/index.d.ts +169 -0
  127. package/dist/theme/types/components/DataEntry/Switch/index.d.ts +91 -0
  128. package/dist/theme/types/components/DataEntry/Upload/index.d.ts +178 -0
  129. package/dist/theme/types/components/Feedback/Alert/index.d.ts +162 -0
  130. package/dist/theme/types/components/Feedback/Modal/index.d.ts +158 -0
  131. package/dist/theme/types/components/Feedback/Notification/index.d.ts +130 -0
  132. package/dist/theme/types/components/Feedback/Progress/index.d.ts +64 -0
  133. package/dist/theme/types/components/Feedback/SnackBar/index.d.ts +114 -0
  134. package/dist/theme/types/components/General/Button/index.d.ts +81 -0
  135. package/dist/theme/types/components/General/Icon/index.d.ts +36 -0
  136. package/dist/theme/types/components/General/Typography/index.d.ts +119 -0
  137. package/dist/theme/types/components/Layout/Divider/index.d.ts +34 -0
  138. package/dist/theme/types/components/Navigation/Breadcrumb/index.d.ts +21 -0
  139. package/dist/theme/types/components/Navigation/DropDown/index.d.ts +297 -0
  140. package/dist/theme/types/components/Navigation/Header/index.d.ts +33 -0
  141. package/dist/theme/types/components/Navigation/Menu/index.d.ts +123 -0
  142. package/dist/theme/types/components/Navigation/Pagination/index.d.ts +191 -0
  143. package/dist/theme/types/components/Navigation/Steps/index.d.ts +77 -0
  144. package/dist/theme/types/general/border/index.d.ts +29 -0
  145. package/dist/theme/types/general/colors/index.d.ts +385 -0
  146. package/dist/theme/types/general/spacing/index.d.ts +25 -0
  147. package/dist/theme/types/general/typography/index.d.ts +45 -0
  148. package/dist/theme/types/index.d.ts +113 -0
  149. package/dist/theme/utils/tokens-mapper/DataEntry/ColorPicker/index.js +6 -6
  150. package/dist/theme/utils/tokens-mapper/DataEntry/DatePicker/index.js +3 -3
  151. package/dist/theme/utils/tokens-mapper/DataEntry/Input/index.js +5 -5
  152. package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.js +5 -5
  153. package/dist/translation/types/components/DataDisplay/Collapse/index.d.ts +3 -0
  154. package/dist/translation/types/components/DataDisplay/Image/index.d.ts +3 -0
  155. package/dist/translation/types/components/DataDisplay/ItemCard/index.d.ts +4 -0
  156. package/dist/translation/types/components/DataDisplay/ItemList/index.d.ts +4 -0
  157. package/dist/translation/types/general/index.d.ts +4 -0
  158. package/dist/translation/types/index.d.ts +15 -0
  159. package/dist/types.d.ts +174 -0
  160. package/dist/utils/functions/types.d.ts +4 -0
  161. package/dist/vite-env.d.ts +1 -0
  162. package/package.json +5 -2
  163. package/dist/chunks/InputWrapper.7RKY3QZ2.js +0 -40
  164. package/dist/chunks/index.0RmfE2Nm.js +0 -757
package/CHANGELOG.md CHANGED
@@ -1,6 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.0](https://www.npmjs.com/package/aristid-ds/v/2.0.0) (2024-03-06)
4
+ ### ✨ Features
5
+ * **⚠️ Breaking change - Modal:** (@evoiron)
6
+ * update Modal Design
7
+ * update confirmModal Options:
8
+ * remove `secondLine` property
9
+ * rename `firstLine` to `content`
10
+ * add `dangerConfirm` property to show Cta Button as danger look n' feel,
11
+ * add `showCloseIcon` to display top tight button for closing
12
+ * **Section:** (@Delmotte-Vincent)
13
+ * Add new component Section
14
+ * **Typography:**
15
+ * update default typography color (@evoiron)
16
+ * **InputWrapper:**
17
+ * Add 4 properties: (@evoiron)
18
+ * `required`: show a red asterisk right after the label
19
+ * `actions`: an array of items to display at the right of the label
20
+ * `onInfoClick`: When set, display a clickable info icon which triggers this event
21
+ * `infoIcon`: customise the infoIcon displayed
22
+ * These components now accept the 4 properties above: (@evoiron)
23
+ * `AutoComplete`, `Checkbox.Group`, `Radio.Group`, `ColorPicker`, `DatePicker`, `RangePicker`, `Input`, `InputNumber`, `Select`
24
+ * **ItemList**
25
+ * Add `draggable` property showing an icon that indicates the item is draggable (@fatb38)
26
+ * **Tabs:**
27
+ * Add `hideSeparator` prop to hide separator between tabs and content (@P0ppoff)
28
+ * (Style) Allow tabs center on extraContent (@P0ppoff)
29
+ * (Style) Reduce space between tabs and separator (@P0ppoff)
30
+
31
+ ### 🐛 Bug Fixes
32
+ * **Package**: include typescript definitions for each component in built package (@evoiron)
33
+ * **Select:**
34
+ * Fix default border color (@philippechevieux)
35
+ * **Badge:**
36
+ * Fix custom className bug (@evoiron)
37
+ * **Input:**
38
+ * Update color of content, label, placeholder and clear icon (@TdyP)
39
+ * Add aria-label on clear icon to improve testability (@TdyP)
40
+ * **InputNumber:**
41
+ * Update color of content, label, placeholder and clear icon (@TdyP)
42
+ * **ColorPicker:**
43
+ * Update color of content, label and placeholder (@TdyP)
44
+ * **DatePicker:**
45
+ * Update color of content, label and placeholder (@TdyP)
46
+
3
47
  ## [1.1.0](https://www.npmjs.com/package/aristid-ds/v/1.1.0) (2024-02-28)
48
+
4
49
  ### ✨ Features
5
50
  * **Nightly build:**
6
51
  * publish a nightly version of the package under `next`. (@evoiron)
@@ -19,8 +64,6 @@
19
64
  * **InputWrapper:**
20
65
  * Fix border default color (@philippechevieux)
21
66
 
22
-
23
-
24
67
  ## [1.0.1](https://www.npmjs.com/package/aristid-ds/v/1.0.1) (2024-02-26)
25
68
  ### 🐛 Bug Fixes
26
69
  * **Typography:**
@@ -1,74 +1,74 @@
1
1
  import "../../assets/index19.css";
2
- import r, { useState as p, useLayoutEffect as g, useRef as v, useEffect as K } from "react";
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 { I as L } from "../../chunks/SnackBarProvider.v49b6mkx.js";
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 l from "lodash/merge";
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 s } from "../../theme/aristid/general/index.js";
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 I } from "../../translation/en-US/index.js";
14
- import { K as F, u as R } from "../../chunks/useKitLocale.96CdK3og.js";
15
- import { mapKitLocaleToAntdLocale as T } from "../../translation/utils/index.js";
16
- import { d as $ } from "../../chunks/notification-provider.KGowspef.js";
17
- const k = P`
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
- `, y = "aristid-ds-global", A = ({ children: t, customTheme: e, id: o }) => {
22
- const [n, i] = p(null), { theme: f, appId: c, spacing: u } = x(o, e);
23
- return g(() => {
24
- const a = d(s, "--general");
25
- i(a);
26
- }, []), r.createElement(b.Provider, { value: { theme: f, appId: c, spacing: u } }, n !== null && r.createElement(
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: y, hasSourceMap: !1 }, `
29
+ r.createElement(C, { id: A, hasSourceMap: !1 }, `
30
30
  :root{
31
- ${Object.keys(n).map((a) => `${a}: ${n[a]}`).join(";")}
31
+ ${Object.keys(i).map((a) => `${a}: ${i[a]}`).join(";")}
32
32
  }
33
33
  `),
34
- e && r.createElement(k, { id: c, customTheme: e }),
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 n = v(t || "ds-" + S().substring(0, 8)), i = l(s.spacing, (o = e == null ? void 0 : e.general) === null || o === void 0 ? void 0 : o.spacing);
40
- return { theme: s, appId: n.current, spacing: i };
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(F.Provider, { value: e }, t);
43
+ return r.createElement(R.Provider, { value: e }, t);
44
44
  }, G = () => {
45
45
  const [t, e] = p(m);
46
- return { locale: t, setKitLocale: (n) => {
47
- if (n.locale === "frFR") {
48
- const i = l(m, n);
49
- e(i);
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 i = l(I, n);
52
- e(i);
51
+ const n = s(F, i);
52
+ e(n);
53
53
  }
54
54
  } };
55
- }, Z = ({ children: t, locale: e, customTheme: o, id: n }) => r.createElement(
56
- A,
57
- { customTheme: o, id: n },
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 } = R();
65
- return K(() => {
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: T(e) },
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,6 @@
1
+ import {KitHTMLAttributes} from '../../types';
2
+ import {ReactNode} from 'react';
3
+
4
+ export interface KitAppProps extends KitHTMLAttributes {
5
+ children?: ReactNode;
6
+ }
@@ -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 l, { useMemo as p } from "react";
3
- import { Badge as g } from "antd";
4
- import { u } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
5
- import { isValidColor as c, getColor as d, getLighterColor as f } from "../../../utils/functions/index.js";
6
- import { kitBadgeCssTokens as m } from "../../../theme/aristid/components/DataDisplay/Badge/index.js";
7
- import n from "classnames";
8
- const k = {
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 || !c(t) ? null : {
11
- [m.colors.background.default]: d(t, e),
12
- [m.colors.typography.default]: f(t, e)
13
- }, C = ({ color: t, style: e, secondaryColorInvert: o = !1, ...s }) => {
14
- const { appId: a } = u(), i = p(() => ({ ...e, ...B(t, o) }), [t, o, e]), r = n(a, k["kit-badge"], s.className);
15
- return l.createElement(g, { style: i, className: r, ...s });
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.0RmfE2Nm.js";
11
+ import { K as y } from "../../../chunks/index.F6xtnegv.js";
12
12
  import "../../DataEntry/Switch/index.js";
13
13
  import "../../DataEntry/DatePicker/index.js";
14
14
  import "../../DataEntry/AutoComplete/index.js";
@@ -22,7 +22,7 @@ import "../../Navigation/DropDown/index.js";
22
22
  import "../../Navigation/Steps/index.js";
23
23
  import "antd";
24
24
  import "../../../chunks/useKitTheme.KSAU-Pdv.js";
25
- import "../../../chunks/styles.module.x1Oajwjm.js";
25
+ import "../../../chunks/styles.module.h70MuyQF.js";
26
26
  export {
27
27
  y as KitCard
28
28
  };
@@ -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
+ }
@@ -1,4 +1,4 @@
1
- import { b as e } from "../../../chunks/index.0RmfE2Nm.js";
1
+ import { b as e } from "../../../chunks/index.F6xtnegv.js";
2
2
  export {
3
3
  e as KitCollapse
4
4
  };
@@ -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.0RmfE2Nm.js";
3
+ import { a as q } from "../../../chunks/index.F6xtnegv.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.0RmfE2Nm.js";
7
+ import { c as u } from "../../../chunks/index.F6xtnegv.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
+ }
@@ -1,13 +1,16 @@
1
1
  import "../../../assets/index2.css";
2
- import a, { cloneElement as d } from "react";
2
+ import a, { cloneElement as p } from "react";
3
3
  import { Card as E } from "antd";
4
4
  import h from "classnames";
5
5
  import "../../General/Button/index.js";
6
- import { KitTypography as p } from "../../General/Typography/index.js";
6
+ import { KitTypography as d } from "../../General/Typography/index.js";
7
7
  import { KitIcon as x } from "../../General/Icon/index.js";
8
8
  import "../../Layout/Divider/index.js";
9
9
  import "../../Layout/Grid/index.js";
10
10
  import { KitSpace as _ } from "../../Layout/Space/index.js";
11
+ import "color-convert";
12
+ import "color-string";
13
+ import "../../../chunks/styles.module.cDfGpFWX.js";
11
14
  import { u as N } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
12
15
  import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
13
16
  import { faLink as K } from "@fortawesome/free-solid-svg-icons";
@@ -18,13 +21,13 @@ const A = {
18
21
  let e = null;
19
22
  if (o) {
20
23
  const r = o;
21
- e = d(r, {
24
+ e = p(r, {
22
25
  className: `kit-card-cover ${(t = r.props.className) !== null && t !== void 0 ? t : ""}`
23
26
  });
24
27
  }
25
28
  return e;
26
29
  }, I = (o, t) => o && t ? t == null ? void 0 : t.reduce((e, r) => {
27
- const l = d(r, {
30
+ const l = p(r, {
28
31
  onClick: void 0
29
32
  });
30
33
  return e.push(l), e;
@@ -33,7 +36,7 @@ const A = {
33
36
  let r = null;
34
37
  if (t) {
35
38
  const c = t;
36
- r = d(c, {
39
+ r = p(c, {
37
40
  className: `kit-card-extra ${(e = c.props.className) !== null && e !== void 0 ? e : ""}`,
38
41
  href: o ? null : c.props.href
39
42
  });
@@ -57,9 +60,9 @@ const A = {
57
60
  "div",
58
61
  { className: `content-title-container ${i ? "content-title-click" : ""}`, onClick: m ? void 0 : i },
59
62
  i && a.createElement(x, { className: "kit-card-content-title-icon", icon: a.createElement(k, { icon: K }) }),
60
- r && a.createElement(p.Text, { className: "card-content-title" }, r)
63
+ r && a.createElement(d.Text, { className: "card-content-title" }, r)
61
64
  ),
62
- c && a.createElement(p.Text, { className: "card-content-description" }, c)
65
+ c && a.createElement(d.Text, { className: "card-content-description" }, c)
63
66
  )
64
67
  );
65
68
  };
@@ -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 e } from "antd";
4
- import { u as m } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
5
- import c from "classnames";
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-tabs_1cr1a_2"
8
- }, b = ({ className: o, popupClassName: t, ...r }) => {
9
- const { appId: s } = m(), a = c(s, n["kit-tabs"], o);
10
- return i.createElement(e, { className: a, popupClassName: `${s} ${t ?? ""}`, ...r });
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,6 @@
1
+ import type {TabsProps} from 'antd';
2
+ import {KitHTMLAttributes} from '../../../types';
3
+
4
+ export interface IKitTabs extends TabsProps, KitHTMLAttributes<HTMLDivElement> {
5
+ hideSeparator?: boolean;
6
+ }
@@ -1,4 +1,4 @@
1
- import { d as r } from "../../../chunks/index.0RmfE2Nm.js";
1
+ import { d as r } from "../../../chunks/index.F6xtnegv.js";
2
2
  export {
3
3
  r as KitTag
4
4
  };
@@ -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,5 @@
1
+ import {TourProps} from 'antd';
2
+
3
+ type AntdTourTypesToOmit = '';
4
+
5
+ export interface IKitTour extends Omit<TourProps, AntdTourTypesToOmit> {}