aristid-ds 13.0.0 → 14.0.0-127ba2b
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 +134 -4
- package/README.md +21 -0
- package/dist/Kit/Ant/index.d.ts +1 -0
- package/dist/Kit/App/index.js +15 -15
- package/dist/Kit/DataDisplay/Avatar/index.js +1 -1
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Collapse/index.js +26 -26
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +1 -1
- package/dist/Kit/DataDisplay/IdCard/index.js +66 -18
- package/dist/Kit/DataDisplay/IdCard/types.d.ts +5 -3
- package/dist/Kit/DataDisplay/ItemCard/index.js +24 -23
- package/dist/Kit/DataDisplay/ItemList/index.js +33 -31
- package/dist/Kit/DataDisplay/RedirectCard/index.js +28 -27
- package/dist/Kit/DataDisplay/Table/index.js +60 -57
- package/dist/Kit/DataDisplay/Tabs/index.js +36 -21
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +55 -54
- package/dist/Kit/DataDisplay/Tag/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Tree/index.js +5 -5
- package/dist/Kit/DataEntry/AutoComplete/index.js +20 -19
- package/dist/Kit/DataEntry/Checkbox/index.js +2 -2
- package/dist/Kit/DataEntry/ColorPicker/index.js +69 -62
- package/dist/Kit/DataEntry/ColorPicker/types.d.ts +3 -1
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +1 -12
- package/dist/Kit/DataEntry/DatePicker/index.js +30 -27
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +5 -4
- package/dist/Kit/DataEntry/Input/index.js +34 -30
- package/dist/Kit/DataEntry/Input/types.d.ts +3 -1
- package/dist/Kit/DataEntry/InputNumber/index.js +20 -19
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +2 -1
- package/dist/Kit/DataEntry/InputWrapper/InputWrapper.d.ts +2 -2
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js +4 -4
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/types.d.ts +1 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.d.ts +3 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js +11 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/types.d.ts +5 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +38 -18
- package/dist/Kit/DataEntry/RichText/MenuBar/miniLayout.d.ts +3 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/types.d.ts +7 -0
- package/dist/Kit/DataEntry/RichText/index.js +52 -46
- package/dist/Kit/DataEntry/RichText/types.d.ts +2 -0
- package/dist/Kit/DataEntry/Select/index.js +60 -61
- package/dist/Kit/DataEntry/Select/types.d.ts +3 -2
- package/dist/Kit/DataEntry/TreeSelect/index.d.ts +4 -0
- package/dist/Kit/DataEntry/TreeSelect/index.js +84 -0
- package/dist/Kit/DataEntry/TreeSelect/renders.d.ts +7 -0
- package/dist/Kit/DataEntry/TreeSelect/types.d.ts +19 -0
- package/dist/Kit/DataEntry/TreeSelect/useIcons.d.ts +10 -0
- package/dist/Kit/DataEntry/Upload/UploadedItem.d.ts +4 -0
- package/dist/Kit/DataEntry/Upload/convertBytes.d.ts +2 -0
- package/dist/Kit/DataEntry/Upload/getBase64.d.ts +2 -0
- package/dist/Kit/DataEntry/Upload/index.d.ts +2 -8
- package/dist/Kit/DataEntry/Upload/index.js +81 -26
- package/dist/Kit/DataEntry/Upload/types.d.ts +30 -12
- package/dist/Kit/Feedback/Alert/index.js +7 -7
- package/dist/Kit/Feedback/Modal/index.js +35 -34
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/Progress/index.js +1 -1
- package/dist/Kit/Feedback/Skeleton/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/SnackBarProvider.d.ts +3 -1
- package/dist/Kit/Feedback/SnackBar/index.d.ts +4 -3
- package/dist/Kit/Feedback/SnackBar/index.js +23 -22
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.d.ts +2 -2
- package/dist/Kit/Feedback/SnackBar/types.d.ts +4 -0
- package/dist/Kit/General/Button/index.js +55 -54
- package/dist/Kit/General/Button/types.d.ts +2 -2
- package/dist/Kit/General/Typography/AdvancedLink.d.ts +4 -0
- package/dist/Kit/General/Typography/AdvancedParagraph.d.ts +4 -0
- package/dist/Kit/General/Typography/AdvancedText.d.ts +4 -0
- package/dist/Kit/General/Typography/AdvancedTitle.d.ts +4 -0
- package/dist/Kit/General/Typography/Link.d.ts +4 -2
- package/dist/Kit/General/Typography/Paragraph.d.ts +4 -2
- package/dist/Kit/General/Typography/Text.d.ts +4 -2
- package/dist/Kit/General/Typography/Title.d.ts +5 -3
- package/dist/Kit/General/Typography/commons.d.ts +11 -1
- package/dist/Kit/General/Typography/index.js +117 -49
- package/dist/Kit/General/Typography/types.d.ts +31 -3
- package/dist/Kit/Navigation/DropDown/index.js +46 -31
- package/dist/Kit/Navigation/Header/index.js +30 -29
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +33 -33
- package/dist/Kit/Navigation/SidePanel/SidePanelContent.d.ts +4 -0
- package/dist/Kit/Navigation/SidePanel/SidePanelHeader.d.ts +4 -0
- package/dist/Kit/Navigation/SidePanel/index.d.ts +2 -0
- package/dist/Kit/Navigation/SidePanel/index.js +74 -53
- package/dist/Kit/Navigation/SidePanel/types.d.ts +13 -4
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/index.d.ts +3 -0
- package/dist/Kit/index.js +127 -123
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/InputWrapper.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/styles.css +1 -0
- package/dist/assets/styles2.css +1 -0
- package/dist/assets/useGetPopupContainer.css +1 -0
- package/dist/chunks/Avatar.BvI60jet.js +47 -0
- package/dist/chunks/InputWrapper.hIFFr5AB.js +27 -0
- package/dist/chunks/{KitNotification.RhW3PPyX.js → KitNotification.DzpYf5_j.js} +9 -9
- package/dist/chunks/SnackBarProvider.wBpPNyLk.js +23 -0
- package/dist/chunks/constants.DINGxt3I.js +6 -0
- package/dist/chunks/styles.module.V-A2OGgm.js +7 -0
- package/dist/chunks/styles.module.shsViPAW.js +9 -0
- package/dist/chunks/useGetPopupContainer.IH43I5PS.js +18 -0
- package/dist/index.es.js +133 -129
- package/dist/theme/aristid/general/height/index.d.ts +3 -0
- package/dist/theme/aristid/general/height/index.js +13 -0
- package/dist/theme/aristid/general/index.js +4 -2
- package/dist/theme/types/components/Navigation/SidePanel/index.d.ts +6 -1
- package/dist/theme/types/general/height/index.d.ts +11 -0
- package/dist/theme/types/index.d.ts +2 -2
- package/dist/translation/en-US/components/DataEntry/RichText/index.js +2 -1
- package/dist/translation/en-US/components/DataEntry/Upload/index.d.ts +2 -0
- package/dist/translation/en-US/components/DataEntry/Upload/index.js +11 -0
- package/dist/translation/en-US/index.js +6 -4
- package/dist/translation/fr-FR/components/DataEntry/RichText/index.js +2 -1
- package/dist/translation/fr-FR/components/DataEntry/Upload/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/DataEntry/Upload/index.js +11 -0
- package/dist/translation/fr-FR/index.js +8 -6
- package/dist/translation/types/components/DataEntry/RichText/index.d.ts +1 -0
- package/dist/translation/types/components/DataEntry/Upload/index.d.ts +8 -0
- package/dist/translation/types/index.d.ts +2 -0
- package/dist/utils/constants.d.ts +3 -0
- package/dist/utils/functions/index.d.ts +2 -1
- package/dist/utils/functions/index.js +48 -43
- package/dist/utils/hooks/useGetPopupContainer.d.ts +6 -0
- package/package.json +163 -164
- package/dist/assets/index50.css +0 -1
- package/dist/assets/index51.css +0 -1
- package/dist/chunks/Avatar.N2w2jq_C.js +0 -30
- package/dist/chunks/InputWrapper.DPygx2dQ.js +0 -23
- package/dist/chunks/SnackBarProvider.nqDzpFo3.js +0 -23
- package/dist/index.umd.js +0 -10
- package/dist/theme/aristid/components/DataEntry/Upload/index.d.ts +0 -3
- package/dist/theme/aristid/components/DataEntry/Upload/index.js +0 -55
- package/dist/theme/types/components/DataEntry/Upload/index.d.ts +0 -178
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,134 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [X.Y.Z](https://www.npmjs.com/package/aristid-ds/v/X.Y.Z) (2025-MM-DD)
|
|
4
|
+
|
|
5
|
+
### ✨ Features
|
|
6
|
+
|
|
7
|
+
- **⚠️ Breaking change - Button**:
|
|
8
|
+
- Remove `checked` prop from segmented button (@evoiron)
|
|
9
|
+
- **⚠️ Breaking change - IdCard**:
|
|
10
|
+
- Replacing `size` options (@fatb38)
|
|
11
|
+
- removing `medium` and `large`
|
|
12
|
+
- adding `xxs-medium`, `xs-medium`, `xs-bold`, `s`, `m`, `l`, `xl`
|
|
13
|
+
- **⚠️ Breaking change - Input**:
|
|
14
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
15
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
16
|
+
- **⚠️ Breaking change - DatePicker/RangePicker**:
|
|
17
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
18
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
19
|
+
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
20
|
+
- **⚠️ Breaking change - RichText**:
|
|
21
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
22
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
23
|
+
- **⚠️ Breaking change - Select**:
|
|
24
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
25
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
26
|
+
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
27
|
+
- **⚠️ Breaking change - Avatar**:
|
|
28
|
+
- Replace `size` option by : `xs`, `s`, `m`, `l`, `xl` (@fatb38)
|
|
29
|
+
- **Header**:
|
|
30
|
+
- Change 'height' to 48px instead of 64px
|
|
31
|
+
- **SideMenu**:
|
|
32
|
+
- Change 'width' to 48px instead of 64px
|
|
33
|
+
- **AutoComplete**:
|
|
34
|
+
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
35
|
+
- **ColorPicker**:
|
|
36
|
+
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
37
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
38
|
+
- **InputNumber**:
|
|
39
|
+
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
40
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
41
|
+
- **SidePanel**:
|
|
42
|
+
- Add opening and closing animations (@philippechevieux)
|
|
43
|
+
- Add `l` size (@7Remy)
|
|
44
|
+
- Add `useChildrenOnly` property to display the side panel as a container for other components or not. Also export two new components `KitSidePanelHeader` and `KitSidePanelContent` for layout purpose (@philippechevieux)
|
|
45
|
+
- Add `headerExtraButtons` property to display buttons or any components on the right side of the header next to the close button (@philippechevieux)
|
|
46
|
+
- Add `showSeparator` property to display a separator between header and content (@philippechevieux)
|
|
47
|
+
- Add `onCloseAfterAnimation` callback that triggers after the closing animation completes instead of immediately on close (@philippechevieux)
|
|
48
|
+
- Allow user to use `size` property when using `idCardProps` (@philippechevieux)
|
|
49
|
+
- Reduce internal paddings to save space (@philippechevieux)
|
|
50
|
+
- Improve alignments of `KitSidePanelHeader` (@philippechevieux)
|
|
51
|
+
- **IdCard:**
|
|
52
|
+
- Add support for ReactNode in `title` and `descriptions` props to allow custom rendering (@philippechevieux)
|
|
53
|
+
- **Tabs:**
|
|
54
|
+
- Add `xsmall` size (@florianSimonAristid)
|
|
55
|
+
- **All components with a DropDown:**
|
|
56
|
+
- All components using a dropdown inside a `SidePanel` component, will render the dropdown inside the `SidePanel`, to avoid issues with the `closeOnOutsideClick` property of `SidePanel` (@evoiron)
|
|
57
|
+
- **Snackbar**
|
|
58
|
+
- Allow multiple snackbar areas (@evoiron)
|
|
59
|
+
- **Button**
|
|
60
|
+
- Add size `m`and `s` to segmented button (@evoiron)
|
|
61
|
+
- **InputWrapper**:
|
|
62
|
+
- Add forwardRef support to enable ref forwarding to the wrapper element (@philippechevieux)
|
|
63
|
+
|
|
64
|
+
### 🐛 Bug Fixes
|
|
65
|
+
|
|
66
|
+
- **Modal:**
|
|
67
|
+
- Fix double execution of close function when clicking the close button due to duplicate onClick handlers on button and icon (@philippechevieux)
|
|
68
|
+
- **DropDown:**
|
|
69
|
+
- Clicking outside the `DropDown` now closes it even when inside an iframe (@philippechevieux)
|
|
70
|
+
- Keep the `DropDown` open when selecting items (@philippechevieux)
|
|
71
|
+
- Fix double toggle issue when clicking the trigger after closing via blur (@philippechevieux)
|
|
72
|
+
- **Upload:**
|
|
73
|
+
- Fix upload dragger height unexpectedly growing in some cases (@evoiron)
|
|
74
|
+
- **SidePanel**:
|
|
75
|
+
- Export `KitSidePanelHeader` and `KitSidePanelContent` components from the main package entry point (@philippechevieux)
|
|
76
|
+
- Fix CSS structure by extracting nested header and content styles into separate classes for proper component isolation (@philippechevieux)
|
|
77
|
+
|
|
78
|
+
### 📚 Documentation
|
|
79
|
+
|
|
80
|
+
- **Table**:
|
|
81
|
+
- Add `onRow` usage (@philippechevieux)
|
|
82
|
+
- **Filter**:
|
|
83
|
+
- Update `With custom Action` exemple implementation (@philippechevieux)
|
|
84
|
+
|
|
85
|
+
### 🔐 Security
|
|
86
|
+
|
|
87
|
+
- Update `color-string` to `2.1.2`(@philippechevieux)
|
|
88
|
+
|
|
89
|
+
## [14.0.0](https://www.npmjs.com/package/aristid-ds/v/14.0.0) (2025-05-20)
|
|
90
|
+
|
|
91
|
+
### ✨ Features
|
|
92
|
+
|
|
93
|
+
- **Typography**:
|
|
94
|
+
- Original `Text`, `Link`, `Title` and `Paragraph` have been renamed to `AdvancedText`, `AdvancedLink`, `AdvancedTitle` and `AdvancedParagraph`. (@evoiron)
|
|
95
|
+
- `Text`, `Link`, `Title` and `Paragraph` components are now lightweight versions of original ones providing only basic features. (@evoiron)
|
|
96
|
+
- Added `withTooltip` prop for non Advanced versions to add a tooltip which is now not displayed by deefault when content is ellipsed. (@evoiron)
|
|
97
|
+
- **IdCard**:
|
|
98
|
+
- Remove use of `Typography.Text` component (@evoiron)
|
|
99
|
+
- Add `disableTooltip` property to disable tooltip on title and description (@evoiron)
|
|
100
|
+
- **⚠️ Breaking change - Upload**:
|
|
101
|
+
- Remove the following properties: (@philippechevieux)
|
|
102
|
+
- `listType`
|
|
103
|
+
- `itemRender`
|
|
104
|
+
- `openFileDialogOnClick`
|
|
105
|
+
- `loading`
|
|
106
|
+
- `isImageUrl`
|
|
107
|
+
- `imageUrl`
|
|
108
|
+
- `progress`
|
|
109
|
+
- `previewFile`
|
|
110
|
+
- `showUploadList`
|
|
111
|
+
- Update component render (@philippechevieux)
|
|
112
|
+
- **RichText**:
|
|
113
|
+
- Add `mini` property to display a minified version of the component (@renaudamsellem)
|
|
114
|
+
- **SidePanel**:
|
|
115
|
+
- Add opening and closing animations (@philippechevieux)
|
|
116
|
+
|
|
117
|
+
### 🐛 Bug Fixes
|
|
118
|
+
|
|
119
|
+
- **Modal:**
|
|
120
|
+
- KitModal.setAppElement was defined in typescript but not implemented (@evoiron)
|
|
121
|
+
- **Tag:**
|
|
122
|
+
- Hide `closeIcon` for tags in a group if handleCloseTag is not provided (@philippechevieux)
|
|
123
|
+
- Remove tooltip for other tags in TagGroup (@NicoSourimant)
|
|
124
|
+
- **DatePicker/RangePicker**
|
|
125
|
+
- Fix color of prefix icon when component is `disabled`, in `warning` or `error` status (@philippechevieux)
|
|
126
|
+
|
|
127
|
+
### 📚 Documentation
|
|
128
|
+
|
|
129
|
+
- **Tree**:
|
|
130
|
+
- Add exemple of a long title with ellipsis (@philippechevieux)
|
|
131
|
+
|
|
3
132
|
## [13.0.0](https://www.npmjs.com/package/aristid-ds/v/13.0.0) (2025-02-17)
|
|
4
133
|
|
|
5
134
|
### ✨ CI
|
|
@@ -60,10 +189,6 @@ The following points are the impact of this version upgrade:
|
|
|
60
189
|
|
|
61
190
|
### ✨ Features
|
|
62
191
|
|
|
63
|
-
- **Snackbar**:
|
|
64
|
-
- Add `snackbarId` property to allow to update a snackbar (@evoiron)
|
|
65
|
-
- **Button**:
|
|
66
|
-
- Add `action` type button (@evoiron)
|
|
67
192
|
- **⚠️ Breaking change - Tree**:
|
|
68
193
|
- Remove `showLine` and `switcherIcon` properties (@philippechevieux)
|
|
69
194
|
- Update component render (@philippechevieux)
|
|
@@ -72,12 +197,17 @@ The following points are the impact of this version upgrade:
|
|
|
72
197
|
- Complete rewriting of the `Progress` component without Ant (@philippechevieux)
|
|
73
198
|
- Remove all Ant props (@philippechevieux)
|
|
74
199
|
- `circle` and `dashboard` type are no longer available (@philippechevieux)
|
|
200
|
+
- **Snackbar**:
|
|
201
|
+
- Add `snackbarId` property to allow to update a snackbar (@evoiron)
|
|
202
|
+
- **Button**:
|
|
203
|
+
- Add `action` type button (@evoiron)
|
|
75
204
|
- **Tabs**:
|
|
76
205
|
- Add controlled state to handle navigation within tabs (@renaudamsellem)
|
|
77
206
|
- **SidePanel**:
|
|
78
207
|
- Add `headerExtra` prop to display extra content above header title (@philippechevieux)
|
|
79
208
|
|
|
80
209
|
### 🐛 Bug Fixes
|
|
210
|
+
|
|
81
211
|
- **SidePanel**
|
|
82
212
|
- Fix `closeOnOutsideClick` behavior to listen to `click` event instead on `mousedeown` (@evoiron)
|
|
83
213
|
- **ColorPicker**
|
package/README.md
CHANGED
|
@@ -122,6 +122,15 @@ import {KitButton, Kitcheckbox} from 'aristid-ds';
|
|
|
122
122
|
|
|
123
123
|
<br/>
|
|
124
124
|
|
|
125
|
+
### Usage via Docker
|
|
126
|
+
|
|
127
|
+
We provide a containerized way to develop on the project. You need to have [Docker](https://www.docker.com/) installed
|
|
128
|
+
on your computer. The docker stack allows you to add stories to storybook and change in live the changes.
|
|
129
|
+
|
|
130
|
+
```shell
|
|
131
|
+
docker compose up -d
|
|
132
|
+
```
|
|
133
|
+
|
|
125
134
|
## Development
|
|
126
135
|
|
|
127
136
|
### Code structure
|
|
@@ -459,6 +468,18 @@ A nightly version of the package is published on daily basis on branch develop (
|
|
|
459
468
|
|
|
460
469
|
## Tests
|
|
461
470
|
|
|
471
|
+
### Accessing Chromatic tests locally
|
|
472
|
+
|
|
473
|
+
To access the test files used by Chromatic locally, replace `docs` with `chromatic-test` in the Storybook URL. For example:
|
|
474
|
+
|
|
475
|
+
```
|
|
476
|
+
http://localhost:6006/?path=/chromatic-test/design-system-datadisplay-idcard--chromatic-test
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
This will allow you to view and test components in the same context that Chromatic uses for automated testing.
|
|
480
|
+
|
|
481
|
+
### Performance issue
|
|
482
|
+
|
|
462
483
|
Tests can be slow when using the Design system. It is caused by jsdom which heavily use Window.GetComputedStyle. To workaround this performance issue, you shoud update the version of jsdom used by you test library (typically jest) to 21.1.0 or even 24.0.0. To achieve this, update your projects package.json and add these lines:
|
|
463
484
|
|
|
464
485
|
if using yarn:
|
package/dist/Kit/Ant/index.d.ts
CHANGED
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../assets/
|
|
1
|
+
import "../../assets/index29.css";
|
|
2
2
|
import { jsx as n, jsxs as f, Fragment as h } from "react/jsx-runtime";
|
|
3
3
|
import { useState as u, useLayoutEffect as L, useRef as S, useEffect as P } from "react";
|
|
4
4
|
import { ConfigProvider as C } from "antd";
|
|
5
|
-
import {
|
|
5
|
+
import { K as b } from "../../chunks/SnackBarProvider.wBpPNyLk.js";
|
|
6
6
|
import { toCssVariables as g, uuid as y } from "../../utils/functions/index.js";
|
|
7
7
|
import a from "lodash/merge";
|
|
8
8
|
import { Style as m } from "react-style-tag";
|
|
9
9
|
import { K as E } from "../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
import { KitAristidThemeGeneral as l } from "../../theme/aristid/general/index.js";
|
|
11
|
-
import { antdThemeConfig as
|
|
11
|
+
import { antdThemeConfig as T } from "../../theme/utils/tokens-mapper/index.js";
|
|
12
12
|
import { frFR as d } from "../../translation/fr-FR/index.js";
|
|
13
|
-
import { enUS as
|
|
14
|
-
import { K as
|
|
15
|
-
import { mapKitLocaleToAntdLocale as
|
|
16
|
-
import { d as
|
|
13
|
+
import { enUS as $ } from "../../translation/en-US/index.js";
|
|
14
|
+
import { K as j, u as k } from "../../chunks/useKitLocale.96CdK3og.js";
|
|
15
|
+
import { mapKitLocaleToAntdLocale as x } from "../../translation/utils/index.js";
|
|
16
|
+
import { d as A } from "../../chunks/notification-provider.9msrEKBe.js";
|
|
17
17
|
import { KitEmpty as p } from "../DataDisplay/Empty/index.js";
|
|
18
|
-
const
|
|
18
|
+
const F = "aristid-ds-global", I = (t, e) => {
|
|
19
19
|
const o = g(t);
|
|
20
20
|
return `
|
|
21
21
|
.${e} {
|
|
@@ -27,11 +27,11 @@ const A = "aristid-ds-global", F = (t, e) => {
|
|
|
27
27
|
return L(() => {
|
|
28
28
|
const s = g(l, "--general");
|
|
29
29
|
i(s);
|
|
30
|
-
}, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id:
|
|
30
|
+
}, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id: F, hasSourceMap: !1, children: `
|
|
31
31
|
:root {
|
|
32
32
|
${Object.keys(r).map((s) => `${s}: ${r[s]}`).join(";")}
|
|
33
33
|
}
|
|
34
|
-
` }), e && n(m, { hasSourceMap: !1, children:
|
|
34
|
+
` }), e && n(m, { hasSourceMap: !1, children: I(a({ general: { utilities: l.utilities } }, e), c) }), t] }) });
|
|
35
35
|
}, _ = (t, e) => {
|
|
36
36
|
var o;
|
|
37
37
|
const r = S(t || "ds-" + y().substring(0, 8)), i = a(l.spacing, (o = e == null ? void 0 : e.general) === null || o === void 0 ? void 0 : o.spacing);
|
|
@@ -42,7 +42,7 @@ const A = "aristid-ds-global", F = (t, e) => {
|
|
|
42
42
|
};
|
|
43
43
|
}, M = ({ children: t }) => {
|
|
44
44
|
const e = N();
|
|
45
|
-
return n(
|
|
45
|
+
return n(j.Provider, { value: e, children: t });
|
|
46
46
|
}, N = () => {
|
|
47
47
|
const [t, e] = u(d);
|
|
48
48
|
return { locale: t, setKitLocale: (r) => {
|
|
@@ -50,18 +50,18 @@ const A = "aristid-ds-global", F = (t, e) => {
|
|
|
50
50
|
const i = a(d, r);
|
|
51
51
|
e(i);
|
|
52
52
|
} else {
|
|
53
|
-
const i = a(
|
|
53
|
+
const i = a($, r);
|
|
54
54
|
e(i);
|
|
55
55
|
}
|
|
56
56
|
} };
|
|
57
57
|
}, te = ({ children: t, locale: e, customTheme: o, id: r }) => n(R, { customTheme: o, id: r, children: n(M, { children: n(O, { locale: e, children: t }) }) }), O = ({ children: t, locale: e }) => {
|
|
58
|
-
const { locale: o, setKitLocale: r } =
|
|
58
|
+
const { locale: o, setKitLocale: r } = k();
|
|
59
59
|
return P(() => {
|
|
60
60
|
e !== void 0 && r(e);
|
|
61
|
-
}, [e, r]), n(C, { theme:
|
|
61
|
+
}, [e, r]), n(C, { theme: T, locale: x(e), renderEmpty: () => {
|
|
62
62
|
var i;
|
|
63
63
|
return n(p, { className: "default-render", image: p.ASSET_LIST, description: (i = o.Empty) === null || i === void 0 ? void 0 : i.noData });
|
|
64
|
-
}, children: f(
|
|
64
|
+
}, children: f(A, { children: [n(b, {}), t] }) });
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
67
|
te as KitApp
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as t, K as n } from "../../../chunks/Avatar.
|
|
1
|
+
import { s as t, K as n } from "../../../chunks/Avatar.BvI60jet.js";
|
|
2
2
|
import { jsx as u } from "react/jsx-runtime";
|
|
3
3
|
import { Avatar as c } from "antd";
|
|
4
4
|
import { u as d } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
@@ -4,10 +4,10 @@ import { cloneElement as C, useState as N } from "react";
|
|
|
4
4
|
import { Collapse as E } from "antd";
|
|
5
5
|
import { u as y } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { faChevronDown as _, faEye as
|
|
8
|
-
import
|
|
7
|
+
import { faChevronDown as _, faEye as T, faEllipsisVertical as A } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
import I from "classnames";
|
|
9
9
|
import { KitTypography as g } from "../../General/Typography/index.js";
|
|
10
|
-
import { KitTag as
|
|
10
|
+
import { KitTag as D } from "../Tag/index.js";
|
|
11
11
|
import { KitImage as z } from "../Image/index.js";
|
|
12
12
|
import { KitSwitch as S } from "../../DataEntry/Switch/index.js";
|
|
13
13
|
import { KitTooltip as h } from "../Tooltip/index.js";
|
|
@@ -18,9 +18,9 @@ const u = {
|
|
|
18
18
|
"kit-collapse": "_kit-collapse_h05zd_2",
|
|
19
19
|
"kit-collapse-header": "_kit-collapse-header_h05zd_78",
|
|
20
20
|
"kit-collapse-header-extra": "_kit-collapse-header-extra_h05zd_113"
|
|
21
|
-
}, M = () => t(k, { icon: _ }),
|
|
21
|
+
}, M = () => t(k, { icon: _ }), w = ({ className: o, expandIcon: e, items: i, collapsible: l, ...a }) => {
|
|
22
22
|
const { appId: n } = y();
|
|
23
|
-
|
|
23
|
+
l === "disabled" && (i == null || i.forEach((r) => {
|
|
24
24
|
var s, d;
|
|
25
25
|
if (r.label !== void 0) {
|
|
26
26
|
const p = r.label, m = r.extra;
|
|
@@ -31,29 +31,29 @@ const u = {
|
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
33
|
}));
|
|
34
|
-
const c =
|
|
35
|
-
return t(E, { ...a, className: c, expandIcon: e ?? M, expandIconPosition: "end", collapsible:
|
|
34
|
+
const c = I(n, u["kit-collapse"], o);
|
|
35
|
+
return t(E, { ...a, className: c, expandIcon: e ?? M, expandIconPosition: "end", collapsible: l, items: i });
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
w.displayName = "KitCollapse";
|
|
38
38
|
const $ = ({ onSwitchChange: o, disabled: e }) => t("div", { className: "kit-collapse-header-switch", onClick: (
|
|
39
39
|
// We don't want to collapse/extand item when clicking
|
|
40
|
-
(
|
|
41
|
-
), children: t(S, { onChange: (
|
|
42
|
-
const n =
|
|
43
|
-
n == null || n.setAttribute("data-item-selected",
|
|
40
|
+
(i) => i.stopPropagation()
|
|
41
|
+
), children: t(S, { onChange: (i, l) => {
|
|
42
|
+
const n = l.target.closest(".ant-collapse-item");
|
|
43
|
+
n == null || n.setAttribute("data-item-selected", i.toString()), o(i, l);
|
|
44
44
|
}, disabled: e }) }), j = ({ imageSrc: o }) => t("div", { className: "kit-collapse-header-image", onClick: (
|
|
45
45
|
// We don't want to collapse/extand item when clicking
|
|
46
46
|
(e) => e.stopPropagation()
|
|
47
47
|
), children: t(z, { src: o, style: { height: "auto", width: "auto", maxHeight: "90px", maxWidth: "50px" }, preview: {
|
|
48
|
-
mask: t(k, { icon:
|
|
49
|
-
} }) }), O = ({ title: o, description: e, tagProps:
|
|
48
|
+
mask: t(k, { icon: T })
|
|
49
|
+
} }) }), O = ({ title: o, description: e, tagProps: i, disabled: l }) => {
|
|
50
50
|
let a = "kit-collapse-header-content";
|
|
51
|
-
return a += o !== void 0 && e !== void 0 ? " kit-collapse-header-content-rows" : "", f("div", { className: a, children: [
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
const B =
|
|
55
|
-
var
|
|
56
|
-
const [
|
|
51
|
+
return a += o !== void 0 && e !== void 0 ? " kit-collapse-header-content-rows" : "", f("div", { className: a, children: [i !== void 0 && t("div", { className: "kit-collapse-header-tag", children: t(D, { ...i, disabled: l ?? i.disabled }) }), o !== void 0 && t(g.Text, { className: "kit-collapse-header-content-title", size: "fontSize5", weight: "bold", ellipsis: !0, withTooltip: !0, disabled: l, children: o }), e !== void 0 && t(g.Text, { className: "kit-collapse-header-content-description", size: "fontSize5", ellipsis: !0, withTooltip: !0, disabled: l, children: e })] });
|
|
52
|
+
}, K = ({ onSwitchChange: o, imageSrc: e, title: i, description: l, tagProps: a, disabled: n = !1 }) => f("div", { className: `${u["kit-collapse-header"]}`, children: [o !== void 0 && t($, { onSwitchChange: o, disabled: n }), e !== void 0 && t(j, { imageSrc: e }), t(O, { title: i, description: l, tagProps: a, disabled: n })] });
|
|
53
|
+
K.displayName = "KitHeader";
|
|
54
|
+
const B = K, F = ({ actions: o, disabled: e }) => {
|
|
55
|
+
var i;
|
|
56
|
+
const [l, a] = N(!1), { locale: n } = P(), c = o[0] ? o[0] : null, r = o.length <= 2 && o[1] ? o[1] : null;
|
|
57
57
|
return f("div", { className: "kit-collapse-header-extra-actions", children: [c && t(h, { title: c.label, open: e ? !1 : void 0, children: t(v, { icon: c.icon, disabled: e, onClick: (s) => {
|
|
58
58
|
s.stopPropagation(), c.onClick && c.onClick(s);
|
|
59
59
|
} }) }), r && t(h, { title: r.label, open: e ? !1 : void 0, children: t(v, { icon: r.icon, disabled: e, onClick: (s) => {
|
|
@@ -62,18 +62,18 @@ const B = w, F = ({ actions: o, disabled: e }) => {
|
|
|
62
62
|
s.stopPropagation();
|
|
63
63
|
}, children: t(b, { menu: {
|
|
64
64
|
items: L({ actions: o })
|
|
65
|
-
}, trigger: ["click"], onOpenChange: () => a(!1), children: t(h, { title: (
|
|
65
|
+
}, trigger: ["click"], onOpenChange: () => a(!1), children: t(h, { title: (i = n.Collapse) === null || i === void 0 ? void 0 : i.more, open: e ? !1 : l, onOpenChange: a, children: t(v, { icon: t(k, { icon: A }), disabled: e }) }) }) })] });
|
|
66
66
|
}, L = ({ actions: o }) => {
|
|
67
67
|
const e = [...o];
|
|
68
|
-
return e.splice(0, 1), e.map((
|
|
68
|
+
return e.splice(0, 1), e.map((l, a) => ({
|
|
69
69
|
key: a,
|
|
70
|
-
icon:
|
|
71
|
-
label:
|
|
72
|
-
onClick: (n) =>
|
|
70
|
+
icon: l.icon,
|
|
71
|
+
label: l.label,
|
|
72
|
+
onClick: (n) => l.onClick && l.onClick(n)
|
|
73
73
|
}));
|
|
74
74
|
}, H = ({ actions: o, disabled: e = !1 }) => t("div", { className: `${u["kit-collapse-header-extra"]}`, children: o !== void 0 && t(F, { actions: o, disabled: e }) });
|
|
75
75
|
H.displayName = "KitHeaderExtra";
|
|
76
|
-
const V = H, x =
|
|
76
|
+
const V = H, x = w;
|
|
77
77
|
x.displayName = "KitCollapse";
|
|
78
78
|
x.Header = B;
|
|
79
79
|
x.HeaderExtra = V;
|
|
@@ -1,24 +1,72 @@
|
|
|
1
1
|
import "../../../assets/index2.css";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import n from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { K as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import { t as S } from "../../../chunks/styles.module.shsViPAW.js";
|
|
5
|
+
import { u as T } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import { K as v } from "../../../chunks/Avatar.BvI60jet.js";
|
|
7
|
+
import { KitTooltip as d } from "../Tooltip/index.js";
|
|
8
|
+
import { T as m } from "../../../chunks/constants.DINGxt3I.js";
|
|
9
|
+
const D = {
|
|
10
|
+
"kit-id-card": "_kit-id-card_1vabr_2"
|
|
11
|
+
}, h = [
|
|
12
|
+
S["kit-typography-text"],
|
|
13
|
+
"ant-typography",
|
|
14
|
+
"ant-typography-text",
|
|
15
|
+
"ant-typography-ellipsis",
|
|
16
|
+
"ant-typography-ellipsis-single-line"
|
|
17
|
+
], z = (t) => {
|
|
18
|
+
switch (t) {
|
|
19
|
+
case "xl":
|
|
20
|
+
return "kit-typography-fontSize5";
|
|
21
|
+
case "l":
|
|
22
|
+
return "kit-typography-fontSize6";
|
|
23
|
+
default:
|
|
24
|
+
return "kit-typography-fontSize7";
|
|
25
|
+
}
|
|
26
|
+
}, N = (t) => {
|
|
27
|
+
switch (t) {
|
|
28
|
+
case "xl":
|
|
29
|
+
return "kit-typography-fontSize1";
|
|
30
|
+
case "l":
|
|
31
|
+
return "kit-typography-fontSize2";
|
|
32
|
+
case "m":
|
|
33
|
+
return "kit-typography-fontSize3";
|
|
34
|
+
case "s":
|
|
35
|
+
return "kit-typography-fontSize4";
|
|
36
|
+
case "xs-bold":
|
|
37
|
+
case "xs-medium":
|
|
38
|
+
case "xxs-medium":
|
|
39
|
+
return "kit-typography-fontSize5";
|
|
40
|
+
}
|
|
41
|
+
}, _ = (t) => {
|
|
42
|
+
switch (t) {
|
|
43
|
+
case "xl":
|
|
44
|
+
case "l":
|
|
45
|
+
return "xl";
|
|
46
|
+
case "m":
|
|
47
|
+
case "s":
|
|
48
|
+
return "l";
|
|
49
|
+
case "xxs-medium":
|
|
50
|
+
return "s";
|
|
51
|
+
default:
|
|
52
|
+
return "m";
|
|
53
|
+
}
|
|
54
|
+
}, E = (t, e, r, i) => {
|
|
55
|
+
const s = n("kit-id-card-title", ...h, N(e), {
|
|
56
|
+
"ant-typography-bold": e !== "xs-medium",
|
|
57
|
+
"ant-typography-disabled": r
|
|
12
58
|
});
|
|
13
|
-
return
|
|
14
|
-
},
|
|
15
|
-
const s =
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
59
|
+
return a("span", { className: s, children: a(d, { title: i ? "" : t, mouseEnterDelay: m, children: a("span", { children: t }) }) });
|
|
60
|
+
}, K = (t, e, r, i) => {
|
|
61
|
+
const s = n("kit-id-card-description", ...h, "ant-typography-regular", z(e), {
|
|
62
|
+
"ant-typography-disabled": r
|
|
63
|
+
});
|
|
64
|
+
return a("span", { className: s, children: a(d, { title: i ? "" : t, mouseEnterDelay: m, children: a("span", { children: t }) }) });
|
|
65
|
+
}, I = ({ className: t, title: e, description: r, avatarProps: i, size: s = "xs-bold", disabled: o = !1, disableTooltip: c = !1, ...u }) => {
|
|
66
|
+
const { appId: g } = T(), f = n(g, D["kit-id-card"], t), x = i !== void 0, p = e !== void 0, l = r !== void 0, k = p || l;
|
|
67
|
+
return y("div", { className: `${f} id-card-grid`, ...u, children: [x && a("div", { className: "card-avatar", children: a(v, { size: _(s), ...i, disabled: o }) }), k && y("div", { className: "card-info", children: [p && typeof e == "string" ? E(e, s, o, c) : e, l && typeof r == "string" ? K(r, s, o, c) : r] })] });
|
|
20
68
|
};
|
|
21
|
-
|
|
69
|
+
I.displayName = "KitIdCard";
|
|
22
70
|
export {
|
|
23
|
-
|
|
71
|
+
I as KitIdCard
|
|
24
72
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import {ReactNode} from 'react';
|
|
1
2
|
import {KitHTMLAttributes} from '../../../types';
|
|
2
3
|
import {IKitAvatar} from '../Avatar/types';
|
|
3
4
|
|
|
4
5
|
export interface IKitIdCard extends KitHTMLAttributes<HTMLDivElement> {
|
|
5
6
|
avatarProps?: IKitAvatar;
|
|
6
|
-
size?: 'medium' | '
|
|
7
|
-
title?:
|
|
8
|
-
description?:
|
|
7
|
+
size?: 'xxs-medium' | 'xs-medium' | 'xs-bold' | 's' | 'm' | 'l' | 'xl';
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
description?: ReactNode;
|
|
9
10
|
disabled?: boolean;
|
|
11
|
+
disableTooltip?: boolean;
|
|
10
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index30.css";
|
|
2
2
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as b, useEffect as Q, forwardRef as V } from "react";
|
|
4
4
|
import Y from "classnames";
|
|
5
5
|
import { KitTypography as w } from "../../General/Typography/index.js";
|
|
6
6
|
import { KitCheckbox as Z } from "../../DataEntry/Checkbox/index.js";
|
|
@@ -8,40 +8,41 @@ import { KitSwitch as G } from "../../DataEntry/Switch/index.js";
|
|
|
8
8
|
import { KitBreadcrumb as ii } from "../../Navigation/Breadcrumb/index.js";
|
|
9
9
|
import { u as ti } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
import { KitTag as ei } from "../Tag/index.js";
|
|
11
|
-
import { KitButton as
|
|
12
|
-
import { KitTooltip as
|
|
13
|
-
import { FontAwesomeIcon as
|
|
14
|
-
import { faEllipsis as
|
|
11
|
+
import { KitButton as B } from "../../General/Button/index.js";
|
|
12
|
+
import { KitTooltip as si } from "../Tooltip/index.js";
|
|
13
|
+
import { FontAwesomeIcon as O } from "@fortawesome/react-fontawesome";
|
|
14
|
+
import { faEllipsis as oi, faImage as ri } from "@fortawesome/free-solid-svg-icons";
|
|
15
15
|
import { KitDropDown as ai } from "../../Navigation/DropDown/index.js";
|
|
16
16
|
import { u as di } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
17
17
|
import { useDebouncedCallback as ci } from "use-debounce";
|
|
18
|
-
|
|
18
|
+
import { N as ni, F as li } from "../../../chunks/constants.DINGxt3I.js";
|
|
19
|
+
const mi = {
|
|
19
20
|
"kit-item-card": "_kit-item-card_308fs_2"
|
|
20
|
-
},
|
|
21
|
-
const [d, a] =
|
|
21
|
+
}, L = () => {
|
|
22
|
+
const [d, a] = b(window.innerWidth), [s, r] = b(window.innerHeight), t = ci(() => {
|
|
22
23
|
a(window.innerWidth), r(window.innerHeight);
|
|
23
24
|
}, 100);
|
|
24
|
-
return
|
|
25
|
-
},
|
|
25
|
+
return Q(() => (t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), [t]), { width: d, height: s };
|
|
26
|
+
}, hi = 1300, _ = ({ display: d = "card", disabled: a = !1, actions: s }) => {
|
|
26
27
|
var r;
|
|
27
|
-
const { locale: t } = di(), { width: c } =
|
|
28
|
-
return i("div", { className: "kit-item-card-actions", children: d === "list" && c <
|
|
29
|
-
},
|
|
30
|
-
const { appId:
|
|
28
|
+
const { locale: t } = di(), { width: c } = L();
|
|
29
|
+
return i("div", { className: "kit-item-card-actions", children: d === "list" && c < hi ? i(ai, { disabled: a, menu: { items: s }, children: i(B, { title: (r = t.General) === null || r === void 0 ? void 0 : r.more, icon: i(O, { icon: oi }) }) }) : s == null ? void 0 : s.map((o) => i(si, { title: o.label, children: i(B, { icon: o.icon, onClick: o.onClick, disabled: o.disabled || a }) }, o.key)) });
|
|
30
|
+
}, E = 900, pi = V(({ className: d, style: a, imageSrc: s, icon: r, tagGroup: t, breadcrumbItems: c, title: o, description: m, draggableHandler: u, selected: D, onSelect: g, activateLabel: R, activated: z, onActivate: y, extra: C, actions: h, display: n = "card", disabled: e = !1, imageAlt: F = "", imageCover: H = !1 }, S) => {
|
|
31
|
+
const { appId: W } = ti(), { width: N } = L(), T = g !== void 0, x = u !== void 0, j = s !== void 0, U = r !== void 0, p = t !== void 0, I = c !== void 0, X = o !== void 0 || m !== void 0, K = C !== void 0, P = y !== void 0, k = h !== void 0, A = [p, I, K].filter(Boolean).length, f = n === "list" && N > E, v = n === "card" || N <= E, $ = Y(mi["kit-item-card"], d, W, {
|
|
31
32
|
"kit-item-card-display-list": f,
|
|
32
33
|
"kit-item-card-display-card": v,
|
|
33
|
-
[`kit-item-card-display-list-with-${
|
|
34
|
-
"kit-item-card-display-card-checkbox-or-draggable-handler": v && (
|
|
34
|
+
[`kit-item-card-display-list-with-${A}-rows`]: f && A > 0,
|
|
35
|
+
"kit-item-card-display-card-checkbox-or-draggable-handler": v && (T || x),
|
|
35
36
|
"kit-item-card-disabled": e,
|
|
36
37
|
"kit-item-card-selected": D,
|
|
37
38
|
"kit-item-card-with-actions": k,
|
|
38
|
-
"kit-item-card-image-cover":
|
|
39
|
+
"kit-item-card-image-cover": H
|
|
39
40
|
});
|
|
40
|
-
e && p && (t.tags = t.tags.map((
|
|
41
|
-
const
|
|
42
|
-
return l("div", { tabIndex: e ?
|
|
41
|
+
e && p && (t.tags = t.tags.map((M) => ({ ...M, disabled: e })), t.othersTagDisabled = !0);
|
|
42
|
+
const q = i("div", { className: "kit-item-card-checkbox", children: i(Z, { onChange: g, checked: D, disabled: e }) }), J = i("div", { className: "kit-item-card-draggable-handler", children: u });
|
|
43
|
+
return l("div", { tabIndex: e ? ni : li, className: $, style: a, ref: S, children: [T && q, x && J, l("div", { className: "kit-item-card-image", children: [j ? i("img", { src: s, alt: F }) : i("div", { className: "kit-item-card-image-placeholder", children: U ? r : i(O, { icon: ri }) }), i("div", { className: "kit-item-card-actions-mask" }), k && v && i(_, { actions: h, disabled: e, display: "card" })] }), p && i("div", { className: "kit-item-card-tags", style: { width: n === "card" ? "inherit" : "auto" }, children: i(ei.Group, { tags: t.tags, othersTagType: t.othersTagType, othersTagDisabled: t.othersTagDisabled }) }), I && i("div", { className: "kit-item-card-breadcrumb", children: i(ii, { items: c }) }), X && l("div", { className: "kit-item-card-content", children: [o && i(w.AdvancedTitle, { level: "h3", ellipsis: { tooltip: !0, rows: 2 }, disabled: e, children: o }), m && i(w.AdvancedParagraph, { ellipsis: { tooltip: !0, rows: 2 }, disabled: e, children: m })] }), K && i("div", { className: "kit-item-card-extra", children: C }), k && f && i(_, { actions: h, disabled: e, display: n }), P && l("div", { className: "kit-item-card-switch", children: [i(G, { onChange: y, checked: z, disabled: e }), i(w.Text, { disabled: e, ellipsis: !0, children: R })] })] });
|
|
43
44
|
});
|
|
44
|
-
|
|
45
|
+
pi.displayName = "KitItemCard";
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
pi as KitItemCard
|
|
47
48
|
};
|