aristid-ds 0.11.0 → 0.12.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 (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/Kit/DataDisplay/Card/index.js +24 -24
  3. package/dist/Kit/DataDisplay/ItemList/index.js +37 -258
  4. package/dist/Kit/DataDisplay/ItemList/style.d.ts +3 -0
  5. package/dist/Kit/DataDisplay/ItemList/style.js +236 -0
  6. package/dist/Kit/DataDisplay/ItemList/types.d.ts +2 -1
  7. package/dist/Kit/DataDisplay/Tag/Tag.js +6 -3
  8. package/dist/Kit/DataEntry/AutoComplete/index.js +3 -3
  9. package/dist/Kit/DataEntry/Checkbox/Checkbox.js +4 -4
  10. package/dist/Kit/DataEntry/Checkbox/Group.js +26 -25
  11. package/dist/Kit/DataEntry/Checkbox/index.d.ts +2 -3
  12. package/dist/Kit/DataEntry/Checkbox/types.d.ts +5 -0
  13. package/dist/Kit/DataEntry/ColorPicker/index.js +5 -5
  14. package/dist/Kit/DataEntry/DatePicker/DatePicker.js +7 -7
  15. package/dist/Kit/DataEntry/DatePicker/RangePicker.js +7 -7
  16. package/dist/Kit/DataEntry/Input/Input.js +8 -8
  17. package/dist/Kit/DataEntry/Input/Password.js +7 -7
  18. package/dist/Kit/DataEntry/Input/TextArea.js +8 -8
  19. package/dist/Kit/DataEntry/Input/types.d.ts +0 -8
  20. package/dist/Kit/DataEntry/InputNumber/index.js +5 -5
  21. package/dist/Kit/DataEntry/InputWrapper/InputWrapper.js +102 -0
  22. package/dist/Kit/DataEntry/InputWrapper/index.d.ts +1 -0
  23. package/dist/Kit/DataEntry/InputWrapper/types.d.ts +10 -0
  24. package/dist/Kit/DataEntry/Radio/Group.d.ts +2 -2
  25. package/dist/Kit/DataEntry/Radio/Group.js +21 -20
  26. package/dist/Kit/DataEntry/Radio/index.d.ts +2 -2
  27. package/dist/Kit/DataEntry/Radio/types.d.ts +6 -1
  28. package/dist/Kit/DataEntry/Select/index.js +37 -39
  29. package/dist/Kit/DataEntry/Select/style.js +182 -165
  30. package/dist/Kit/DataEntry/Select/types.d.ts +3 -2
  31. package/dist/Kit/DataEntry/index.d.ts +1 -0
  32. package/dist/Kit/Feedback/Modal/Modal.js +33 -26
  33. package/dist/Kit/Feedback/Modal/types.d.ts +1 -0
  34. package/dist/Kit/General/Typography/commons.js +2 -2
  35. package/dist/index.umd.js +984 -862
  36. package/dist/theme/aristid/components/DataEntry/Input/index.d.ts +1 -2
  37. package/dist/theme/aristid/components/DataEntry/Input/index.js +3 -4
  38. package/dist/theme/aristid/components/DataEntry/InputWrapper/index.d.ts +2 -0
  39. package/dist/theme/aristid/components/DataEntry/InputWrapper/index.js +5 -0
  40. package/dist/theme/types/components/DataEntry/Input/index.d.ts +0 -54
  41. package/dist/theme/types/components/DataEntry/InputWrapper/index.d.ts +95 -0
  42. package/dist/theme/types/index.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/dist/Kit/DataEntry/Input/InputWrapper.js +0 -27
  45. /package/dist/Kit/DataEntry/{Input → InputWrapper}/InputWrapper.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.12.0](https://www.npmjs.com/package/aristid-ds/v/0.12.0) (2024-02-02)
4
+
5
+ ### ✨ Features
6
+ * **Modal:**
7
+ * Add `fullscreen`option (@evoiron)
8
+
9
+ * **⚠️ Breaking change - ItemList**
10
+ * Add `selected` props to display a colored border (@Delmotte-Vincent)
11
+ * Rename `onSelectChange` by `onSelect` (@Delmotte-Vincent)
12
+
13
+ ### 🐛 Bug Fixes
14
+ * A build option was removed by error
15
+ * **Select**
16
+ * Remove unused props `suffixIcon` and adapt the documentation (@Delmotte-Vincent)
17
+ * Add focus state on select dropdown (@Delmotte-Vincent)
18
+ * Fix Ellipsed tag on select (@Delmotte-Vincent)
19
+ * **Storybook**
20
+ * fix a visual bug on storybook caused by an addon (@evoiron)
21
+
22
+ ### 📚 Documentation
23
+ * New documentation page to list available design tokens (@evoiron)
24
+ * Display each design token corresponding css variable (@evoiron)
25
+ * Display package version number on the top right corner of Storybook (@philippechevieux)
26
+
3
27
  ## [0.11.0](https://www.npmjs.com/package/aristid-ds/v/0.11.0) (2024-01-24)
4
28
  ### ✨ Features
5
29
  * **Notification:**
@@ -1,4 +1,4 @@
1
- import e from "react";
1
+ import r from "react";
2
2
  import { styled as G } from "styled-components";
3
3
  import N from "classnames";
4
4
  import { kitColorsPaletteCssTokens as t } from "../../../theme/aristid/general/colors/index.js";
@@ -6,7 +6,7 @@ import { typographyCssTokens as i } from "../../../theme/aristid/general/typogra
6
6
  import { spacingCssTokens as h } from "../../../theme/aristid/general/spacing/index.js";
7
7
  import { FontAwesomeIcon as T } from "@fortawesome/react-fontawesome";
8
8
  import { faEllipsis as S } from "@fortawesome/free-solid-svg-icons";
9
- import { kitCardCssTokens as r } from "../../../theme/aristid/components/DataDisplay/Card/index.js";
9
+ import { kitCardCssTokens as e } from "../../../theme/aristid/components/DataDisplay/Card/index.js";
10
10
  import { useKitTheme as z } from "../../../theme/useKitTheme.js";
11
11
  import { KitTag as K } from "../Tag/index.js";
12
12
  import { convertToPixel as d } from "../../../theme/utils/convert.js";
@@ -21,12 +21,12 @@ const I = G.div`
21
21
  border-radius: 10px;
22
22
  overflow: hidden;
23
23
  background-color: var(
24
- ${r.colors.background.default},
24
+ ${e.colors.background.default},
25
25
  var(${t.neutral.white})
26
26
  );
27
27
  border: 1px solid
28
28
  var(
29
- ${r.colors.border.default},
29
+ ${e.colors.border.default},
30
30
  var(${t.secondary.mediumGrey.mediumGrey200})
31
31
  );
32
32
  margin: 2px;
@@ -35,12 +35,12 @@ const I = G.div`
35
35
 
36
36
  &.kit-card-disabled {
37
37
  background-color: var(
38
- ${r.colors.background.disabled},
38
+ ${e.colors.background.disabled},
39
39
  var(${t.secondary.mediumGrey.mediumGrey100})
40
40
  );
41
41
  .kit-card-picture {
42
42
  border-color: var(
43
- ${r.colors.separator.disabled},
43
+ ${e.colors.separator.disabled},
44
44
  var(${t.secondary.mediumGrey.mediumGrey400})
45
45
  );
46
46
  }
@@ -48,19 +48,19 @@ const I = G.div`
48
48
  .kit-card-content {
49
49
  .kit-card-title {
50
50
  color: var(
51
- ${r.colors.typography.title.disabled},
51
+ ${e.colors.typography.title.disabled},
52
52
  var(${t.secondary.mediumGrey.mediumGrey400})
53
53
  );
54
54
  }
55
55
  .kit-card-description {
56
56
  color: var(
57
- ${r.colors.typography.description.disabled},
57
+ ${e.colors.typography.description.disabled},
58
58
  var(${t.secondary.mediumGrey.mediumGrey400})
59
59
  );
60
60
  }
61
61
  .kit-card-extra {
62
62
  color: var(
63
- ${r.colors.typography.extra.disabled},
63
+ ${e.colors.typography.extra.disabled},
64
64
  var(${t.secondary.mediumGrey.mediumGrey400})
65
65
  );
66
66
  }
@@ -70,7 +70,7 @@ const I = G.div`
70
70
  &.kit-card-selected {
71
71
  margin: 0;
72
72
  border: 3px solid
73
- var(${r.colors.border.selected}, var(${t.primary.primary400}));
73
+ var(${e.colors.border.selected}, var(${t.primary.primary400}));
74
74
  }
75
75
 
76
76
  .kit-card-content {
@@ -81,37 +81,37 @@ const I = G.div`
81
81
  padding: ${d(h.s)};
82
82
 
83
83
  .kit-card-title {
84
- font-size: ${d(r.typography.title.fontSize, i.fontSize3)};
84
+ font-size: ${d(e.typography.title.fontSize, i.fontSize3)};
85
85
  font-weight: var(
86
- ${r.typography.title.fontWeight},
86
+ ${e.typography.title.fontWeight},
87
87
  var(${i.boldFontWeight})
88
88
  );
89
89
  color: var(
90
- ${r.colors.typography.title.default},
90
+ ${e.colors.typography.title.default},
91
91
  var(${t.primary.primary400})
92
92
  );
93
93
  }
94
94
 
95
95
  .kit-card-description {
96
- font-size: ${d(r.typography.description.fontSize, i.fontSize5)};
96
+ font-size: ${d(e.typography.description.fontSize, i.fontSize5)};
97
97
  font-weight: var(
98
- ${r.typography.description.fontWeight},
98
+ ${e.typography.description.fontWeight},
99
99
  var(${i.regularFontWeight})
100
100
  );
101
101
  color: var(
102
- ${r.colors.typography.description.default},
102
+ ${e.colors.typography.description.default},
103
103
  var(${t.secondary.mediumGrey.mediumGrey600})
104
104
  );
105
105
  }
106
106
 
107
107
  .kit-card-extra {
108
- font-size: ${d(r.typography.extra.fontSize, i.fontSize4)};
108
+ font-size: ${d(e.typography.extra.fontSize, i.fontSize4)};
109
109
  font-weight: var(
110
- ${r.typography.extra.fontWeight},
110
+ ${e.typography.extra.fontWeight},
111
111
  var(${i.boldFontWeight})
112
112
  );
113
113
  color: var(
114
- ${r.colors.typography.extra.default},
114
+ ${e.colors.typography.extra.default},
115
115
  var(${t.primary.primary400})
116
116
  );
117
117
  }
@@ -125,7 +125,7 @@ const I = G.div`
125
125
  overflow: hidden;
126
126
  position: relative;
127
127
  border-bottom: 4px solid
128
- ${({ $brandingBar: o }) => o ? `var(${r.colors.separator.default}, var(${t.primary.primary400}))` : "transparent"};
128
+ ${({ $brandingBar: o }) => o ? `var(${e.colors.separator.default}, var(${t.primary.primary400}))` : "transparent"};
129
129
 
130
130
  img {
131
131
  height: 100%;
@@ -160,14 +160,14 @@ const I = G.div`
160
160
  &:focus-within:not(.kit-card-disabled) {
161
161
  margin: 0;
162
162
  border: 3px solid
163
- var(${r.colors.border.focus}, var(${t.primary.primary200}));
163
+ var(${e.colors.border.focus}, var(${t.primary.primary200}));
164
164
  outline: none;
165
165
  }
166
166
 
167
167
  &:hover:not(.kit-card-disabled) {
168
168
  margin: 0;
169
169
  border: 3px solid
170
- var(${r.colors.border.hover}, var(${t.primary.primary400}));
170
+ var(${e.colors.border.hover}, var(${t.primary.primary400}));
171
171
 
172
172
  .kit-card-picture {
173
173
  border-color: transparent;
@@ -177,10 +177,10 @@ const I = G.div`
177
177
  }
178
178
  }
179
179
  }
180
- `, A = ({ actions: o, description: s, className: v, style: x, title: l, extra: m, previewSrc: p, tags: y, onActivate: g, onSelect: f, brandingBar: k = !1, selected: u = !1, activated: $ = !1, disabled: a = !1 }) => {
180
+ `, A = ({ actions: o, description: l, className: v, style: x, title: s, extra: m, previewSrc: p, tags: y, onActivate: g, onSelect: f, brandingBar: k = !1, selected: u = !1, activated: $ = !1, disabled: a = !1 }) => {
181
181
  const E = z().appId;
182
182
  var C = o && 2 < o.length, w = o && o.length <= 2;
183
- return e.createElement(I, { tabIndex: a ? -1 : 0, className: N(v, E, { "kit-card-selected": u, "kit-card-disabled": a }), style: x, $brandingBar: k }, e.createElement("div", { className: "kit-card-picture" }, e.createElement("img", { src: p ?? "public/images/no-preview.png" }), f && e.createElement(F, { className: "kit-card-checkbox", onChange: f, checked: u, disabled: a }), g && e.createElement(W, { className: "kit-card-switch", onChange: g, checked: $, disabled: a }), e.createElement("div", { className: "kit-card-buttons" }, w && e.createElement(e.Fragment, null, o.map((b) => e.createElement(c, { type: "segmented", icon: b.icon, onClick: b.onClick, disabled: a }))), C && e.createElement(e.Fragment, null, e.createElement(c, { type: "segmented", icon: o[0].icon, onClick: o[0].onClick, disabled: a }), e.createElement(B, { menu: { items: o.slice(1) }, disabled: a }, e.createElement(c, { type: "segmented", icon: e.createElement(T, { icon: S }) }))))), e.createElement("div", { className: "kit-card-content" }, y && e.createElement(K.Group, { tags: y }), l && e.createElement(n.Text, { className: "kit-card-title" }, l), s && e.createElement(n.Text, { className: "kit-card-description" }, s), m && e.createElement(n.Text, { className: "kit-card-extra", ellipsis: { tooltip: !0 } }, m)));
183
+ return r.createElement(I, { tabIndex: a ? -1 : 0, className: N(v, E, { "kit-card-selected": u, "kit-card-disabled": a }), style: x, $brandingBar: k }, r.createElement("div", { className: "kit-card-picture" }, r.createElement("img", { src: p ?? "public/images/no-preview.png" }), f && r.createElement(F, { className: "kit-card-checkbox", onChange: f, checked: u, disabled: a }), g && r.createElement(W, { className: "kit-card-switch", onChange: g, checked: $, disabled: a }), r.createElement("div", { className: "kit-card-buttons" }, w && r.createElement(r.Fragment, null, o.map((b) => r.createElement(c, { type: "segmented", icon: b.icon, onClick: b.onClick, disabled: a }))), C && r.createElement(r.Fragment, null, r.createElement(c, { type: "segmented", icon: o[0].icon, onClick: o[0].onClick, disabled: a }), r.createElement(B, { menu: { items: o.slice(1) }, disabled: a }, r.createElement(c, { type: "segmented", icon: r.createElement(T, { icon: S }) }))))), r.createElement("div", { className: "kit-card-content" }, y && r.createElement(K.Group, { tags: y }), s && r.createElement(n.Text, { className: "kit-card-title" }, s), l && r.createElement(n.Text, { className: "kit-card-description" }, l), m && r.createElement(n.Text, { className: "kit-card-extra", ellipsis: { tooltip: !0 } }, m)));
184
184
  };
185
185
  A.displayName = "KitCard";
186
186
  export {
@@ -1,266 +1,45 @@
1
- import i, { useState as z, cloneElement as J } from "react";
2
- import { styled as M } from "styled-components";
3
- import { KitTag as O } from "../Tag/index.js";
4
- import { useKitTheme as Q } from "../../../theme/useKitTheme.js";
5
- import { useKitLocale as U } from "../../../translation/useKitLocale.js";
6
- import { FontAwesomeIcon as S } from "@fortawesome/react-fontawesome";
7
- import { faEye as V } from "@fortawesome/free-regular-svg-icons";
8
- import { faAngleRight as X } from "@fortawesome/free-solid-svg-icons";
9
- import K from "../../../hooks/useSecureClick/index.js";
10
- import { kitItemListCssTokens as t } from "../../../theme/aristid/components/DataDisplay/ItemList/index.js";
11
- import { kitColorsPaletteCssTokens as r } from "../../../theme/aristid/general/colors/index.js";
12
- import { borderCssTokens as Y } from "../../../theme/aristid/general/border/index.js";
13
- import { typographyCssTokens as s } from "../../../theme/aristid/general/typography/index.js";
14
- import { convertToPixel as u } from "../../../theme/utils/convert.js";
15
- import { KitCheckbox as Z } from "../../DataEntry/Checkbox/index.js";
16
- import { KitTypography as n } from "../../General/Typography/index.js";
17
- const _ = M.div`
18
- display: grid;
19
- grid-template-columns: ${({ $gridTemplateColumns: l }) => l};
20
- align-items: center;
21
- min-height: 75px;
22
- padding: 0px 8px;
23
- background-color: var(
24
- ${t.itemList.colors.background.default},
25
- var(${r.neutral.white})
26
- );
27
- box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.1);
28
- border: 1px solid
29
- var(
30
- ${t.itemList.colors.border.default},
31
- var(${r.secondary.mediumGrey.mediumGrey200})
32
- );
33
- border-radius: ${u(t.itemList.border.radius.toString(), Y.radius.s)};
34
-
35
- &:hover {
36
- border: 1px solid
37
- var(
38
- ${t.itemList.colors.border.hover},
39
- var(${r.primary.primary400})
40
- );
41
- }
42
-
43
- &:focus {
44
- border-style: dashed;
45
- }
46
-
47
- &.kit-item-list-clickable {
48
- cursor: pointer;
49
- }
50
-
51
- .kit-item-list-picture-container {
52
- width: 50px;
53
- height: 50px;
54
- display: flex;
55
- align-items: center;
56
- justify-content: center;
57
- overflow: hidden;
58
-
59
- &:not(:first-child) {
60
- margin: 0px 0px 0px 10px;
61
- }
62
-
63
- &.noBorder {
64
- border-color: transparent;
65
- }
66
-
67
- &.kit-item-list-icon {
68
- .kit-icon {
69
- font-size: 1.5rem;
70
- width: 34px;
71
- height: 34px;
72
- }
73
- }
74
-
75
- .kit-item-list-image-container {
76
- display: flex;
77
- align-items: center;
78
- justify-content: center;
79
-
80
- img,
81
- svg {
82
- width: auto;
83
- max-width: 100%;
84
- max-height: 100%;
85
- }
86
- }
87
- }
88
-
89
- .kit-item-list-text-container {
90
- display: flex;
91
- padding: 10px 20px;
92
- flex-direction: column;
93
- align-items: flex-start;
94
- flex: 1 0 0;
95
-
96
- &.kit-item-list-text-container-with-gap {
97
- gap: 5px;
98
- }
99
-
100
- .kit-item-list-text {
101
- margin-bottom: 0px;
102
-
103
- &.kit-item-list-title {
104
- font-weight: var(
105
- ${t.title.typography.fontWeight},
106
- var(${s.boldFontWeight})
107
- );
108
- font-size: ${u(t.title.typography.fontSize, s.fontSize5)};
109
- color: var(
110
- ${t.title.colors.default},
111
- var(${r.primary.primary600})
112
- );
113
- }
114
-
115
- &.kit-item-list-description {
116
- font-weight: var(
117
- ${t.description.typography.fontWeight},
118
- var(${s.regularFontWeight})
119
- );
120
- font-size: ${u(t.description.typography.fontSize, s.fontSize5)};
121
- color: var(
122
- ${t.description.colors.default},
123
- var(${r.primary.primary600})
124
- );
125
-
126
- .ant-typography-expand {
127
- visibility: hidden;
128
- }
129
- }
130
- }
131
-
132
- .kit-item-list-description-container {
133
- position: relative;
134
- }
135
-
136
- .kit-item-list-description-collexp {
137
- color: var(
138
- ${t.collexp.colors.default},
139
- var(${r.primary.primary600})
140
- );
141
-
142
- &:hover {
143
- color: var(
144
- ${t.collexp.colors.hover},
145
- var(${r.primary.primary400})
146
- );
147
- }
148
-
149
- &.kit-item-list-description-collapse {
150
- float: right;
151
- }
152
-
153
- &.kit-item-list-description-expand {
154
- position: absolute;
155
- right: 0;
156
- bottom: 0;
157
- }
158
- }
159
- }
160
-
161
- .kit-item-list-tag {
162
- &:last-child .ant-tag {
163
- margin-inline-end: 0px;
164
- }
165
-
166
- &:not(:last-child) .ant-tag {
167
- margin-inline-end: 10px;
168
- }
169
- }
170
-
171
- .kit-item-list-rafter {
172
- color: var(
173
- ${t.rafter.colors.default},
174
- var(${r.neutral.grey.grey400})
175
- );
176
- font-size: 14px;
177
-
178
- &:hover {
179
- color: var(
180
- ${t.rafter.colors.hover},
181
- var(${r.primary.primary400})
182
- );
183
- cursor: pointer;
184
- }
185
- }
186
-
187
- &.kit-item-list-disabled {
188
- background-color: var(
189
- ${t.itemList.colors.background.disabled},
190
- var(${r.secondary.mediumGrey.mediumGrey100})
191
- );
192
- border: 1px solid
193
- var(
194
- ${t.itemList.colors.border.disabled},
195
- var(${r.secondary.mediumGrey.mediumGrey200})
196
- );
197
- pointer-events: none;
198
-
199
- .kit-item-list-image-container img {
200
- opacity: 0.5;
201
- }
202
-
203
- .kit-item-list-text-container {
204
- .kit-item-list-text {
205
- &.kit-item-list-title {
206
- color: var(
207
- ${t.title.colors.disabled},
208
- var(${r.secondary.mediumGrey.mediumGrey400})
209
- );
210
- }
211
-
212
- &.kit-item-list-description {
213
- color: var(
214
- ${t.description.colors.disabled},
215
- var(${r.secondary.mediumGrey.mediumGrey400})
216
- );
217
- }
218
- }
219
-
220
- .kit-item-list-description-collexp {
221
- color: var(
222
- ${t.collexp.colors.disabled},
223
- var(${r.secondary.mediumGrey.mediumGrey400})
224
- );
225
- }
226
- }
227
-
228
- .kit-item-list-tag,
229
- .kit-item-list-icon {
230
- opacity: 0.4;
231
- }
232
- }
233
- `, tt = ({ title: l, description: x, picture: h, onSelectChange: m, tagNumber: f, onRafterClick: c, disabled: b = !1, onClick: p, className: d, disableSecureClick: $, ...P }) => {
234
- var o = Q().appId;
235
- const C = U().locale, [g, w] = z(!1), [W, F] = z(!1), R = l !== void 0, j = x !== void 0, A = h !== void 0, E = f !== void 0, B = p !== void 0, L = m !== void 0, N = c !== void 0, G = (e) => {
236
- e.stopPropagation(), c && c();
237
- }, q = K(G);
238
- var T = (e) => {
239
- e.stopPropagation(), p && p();
240
- }, D = K(T);
241
- return i.createElement(_, { className: o + " " + (o = d, o += b ? " kit-item-list-disabled" : "") + (B ? " kit-item-list-clickable" : ""), $gridTemplateColumns: (d = "", (d += L ? " min-content" : "") + (A ? " min-content" : "") + " minmax(0px, auto)" + (E ? " min-content" : "") + (N ? " min-content" : "")), onClick: $ ? T : D, ...P }, L && i.createElement("div", null, i.createElement(Z, { disabled: b, onClick: (e) => e.stopPropagation(), onChange: (e) => {
242
- m && m(e);
1
+ import e, { useState as L, cloneElement as H } from "react";
2
+ import { KitTag as J } from "../Tag/index.js";
3
+ import { useKitTheme as M } from "../../../theme/useKitTheme.js";
4
+ import { useKitLocale as O } from "../../../translation/useKitLocale.js";
5
+ import { FontAwesomeIcon as P } from "@fortawesome/react-fontawesome";
6
+ import { faEye as Q } from "@fortawesome/free-regular-svg-icons";
7
+ import { faAngleRight as U } from "@fortawesome/free-solid-svg-icons";
8
+ import S from "../../../hooks/useSecureClick/index.js";
9
+ import { StyledItemList as V } from "./style.js";
10
+ import g from "classnames";
11
+ import { KitCheckbox as W } from "../../DataEntry/Checkbox/index.js";
12
+ import { KitTypography as l } from "../../General/Typography/index.js";
13
+ const X = ({ title: u, description: v, picture: E, onSelect: a, tagNumber: f, onRafterClick: s, onClick: r, className: m, disableSecureClick: N, selected: i = !1, disabled: n = !1, ...T }) => {
14
+ const R = M().appId, x = O().locale, [c, C] = L(!1), [z, A] = L(!1), B = u !== void 0, F = v !== void 0, $ = E !== void 0, b = f !== void 0, j = r !== void 0, h = a !== void 0, I = s !== void 0, w = (t) => {
15
+ t.stopPropagation(), s && s();
16
+ }, q = S(w);
17
+ var K = (t) => {
18
+ t.stopPropagation(), r && r();
19
+ }, D = S(K);
20
+ return e.createElement(V, { tabIndex: n ? -1 : 0, className: g(m, R, { "kit-item-list-disabled": n, "kit-item-list-clickable": j, "kit-item-list-selected": i }), $gridTemplateColumns: (m = "", (m += h ? " min-content" : "") + ($ ? " min-content" : "") + " minmax(0px, auto)" + (b ? " min-content" : "") + (I ? " min-content" : "")), onClick: N ? K : D, ...T }, h && e.createElement("div", null, e.createElement(W, { disabled: n, onClick: (t) => t.stopPropagation(), onChange: (t) => {
21
+ a && a(t);
243
22
  } })), (() => {
244
- var e, k, a = h;
245
- if (!a || !a.type)
23
+ var t, p, o = E;
24
+ if (!o || !o.type)
246
25
  return null;
247
- let I = !1, v = {}, y = "kit-item-list-picture-container";
248
- switch (a.type.displayName) {
26
+ let y = !1, d = {}, k = "kit-item-list-picture-container";
27
+ switch (o.type.displayName) {
249
28
  case "KitImage":
250
- k = a.props, v = { preview: { ...(e = k.preview) != null ? e : {}, mask: i.createElement(S, { icon: V }) }, width: "100%", height: "100%", bordered: !0, rounded: !0, rootClassName: (k.rootClassName || "") + " kit-item-list-image-container" }, y += " kit-item-list-image";
29
+ p = o.props, d = { preview: { ...(t = p.preview) != null ? t : {}, mask: e.createElement(P, { icon: Q }) }, width: "100%", height: "100%", bordered: !0, rounded: !0, rootClassName: (p.rootClassName || "") + " kit-item-list-image-container" }, k += " kit-item-list-image";
251
30
  break;
252
31
  case "KitIcon":
253
- I = !0, v = { on: !0 }, y += " kit-item-list-icon";
254
- }
255
- var H = J(a, v);
256
- return i.createElement("div", { className: y + " " + (I ? "noBorder" : "") }, H);
257
- })(), (o = "kit-item-list-text-container", o += R && j ? " kit-item-list-text-container-with-gap" : "", i.createElement("div", { className: o }, i.createElement(n.Text, { className: "kit-item-list-text kit-item-list-title", size: "large", weight: "bold", ellipsis: { tooltip: !0 } }, l), i.createElement("div", { className: "kit-item-list-description-container" }, i.createElement(n.Paragraph, { className: "kit-item-list-text kit-item-list-description", size: "large", weight: "regular", ellipsis: !g && { rows: 2, expandable: !0, onEllipsis: () => F(!0) } }, x, g && i.createElement(n.Link, { className: "kit-item-list-description-collexp kit-item-list-description-collapse", onClick: (e) => {
258
- e.stopPropagation(), w(!1);
259
- } }, (o = C.ItemList) == null ? void 0 : o.less)), W && !g && i.createElement(n.Link, { className: "kit-item-list-description-collexp kit-item-list-description-expand", onClick: (e) => {
260
- e.stopPropagation(), w(!0);
261
- } }, (o = C.ItemList) == null ? void 0 : o.more)))), E && i.createElement("div", { className: "kit-item-list-tag" }, i.createElement(O, { color: "blue" }, f)), N && i.createElement("div", { className: "kit-item-list-rafter", onClick: $ ? G : q }, i.createElement(S, { icon: X })));
32
+ y = !0, d = { on: !0 }, k += " kit-item-list-icon";
33
+ }
34
+ var G = H(o, d);
35
+ return e.createElement("div", { className: g(k, { noBorder: y }) }, G);
36
+ })(), (i = g("kit-item-list-text-container", { "kit-item-list-text-container-with-gap": B && F }), e.createElement("div", { className: i }, e.createElement(l.Text, { className: "kit-item-list-text kit-item-list-title", size: "large", weight: "bold", ellipsis: { tooltip: !0 } }, u), e.createElement("div", { className: "kit-item-list-description-container" }, e.createElement(l.Paragraph, { className: "kit-item-list-text kit-item-list-description", size: "large", weight: "regular", ellipsis: !c && { rows: 2, expandable: !0, onEllipsis: () => A(!0) } }, v, c && e.createElement(l.Link, { className: "kit-item-list-description-collexp kit-item-list-description-collapse", onClick: (t) => {
37
+ t.stopPropagation(), C(!1);
38
+ } }, (i = x.ItemList) == null ? void 0 : i.less)), z && !c && e.createElement(l.Link, { className: "kit-item-list-description-collexp kit-item-list-description-expand", onClick: (t) => {
39
+ t.stopPropagation(), C(!0);
40
+ } }, (i = x.ItemList) == null ? void 0 : i.more)))), b && e.createElement("div", { className: "kit-item-list-tag" }, e.createElement(J, { color: "blue" }, f)), I && e.createElement("div", { className: "kit-item-list-rafter", onClick: N ? w : q }, e.createElement(P, { icon: U })));
262
41
  };
263
- tt.displayName = "KitItemList";
42
+ X.displayName = "KitItemList";
264
43
  export {
265
- tt as KitItemList
44
+ X as KitItemList
266
45
  };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IStyledKitItemList } from './types';
3
+ export declare const StyledItemList: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IStyledKitItemList>>;