aristid-ds 0.9.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -1
- package/README.md +3 -3
- package/dist/Kit/Ant/index.d.ts +68 -0
- package/dist/Kit/App/index.d.ts +3 -2
- package/dist/Kit/App/index.js +27 -0
- package/dist/Kit/DataDisplay/Avatar/Avatar.js +25 -0
- package/dist/Kit/DataDisplay/Avatar/AvatarGroup.js +29 -0
- package/dist/Kit/DataDisplay/Avatar/index.js +7 -0
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/Badge/index.js +53 -0
- package/dist/Kit/DataDisplay/Badge/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/Card/index.d.ts +1 -1
- package/dist/Kit/DataDisplay/Card/index.js +188 -0
- package/dist/Kit/DataDisplay/Card/types.d.ts +25 -24
- package/dist/Kit/DataDisplay/Collapse/Collapse.js +155 -0
- package/dist/Kit/DataDisplay/Collapse/Header.js +62 -0
- package/dist/Kit/DataDisplay/Collapse/HeaderExtra.js +45 -0
- package/dist/Kit/DataDisplay/Collapse/index.js +8 -0
- package/dist/Kit/DataDisplay/Collapse/types.d.ts +32 -6
- package/dist/Kit/DataDisplay/Image/index.js +31 -0
- package/dist/Kit/DataDisplay/ItemCard/ColorBar.js +25 -0
- package/dist/Kit/DataDisplay/ItemCard/index.js +376 -0
- package/dist/Kit/DataDisplay/ItemList/index.js +266 -0
- package/dist/Kit/DataDisplay/LegacyCard/index.d.ts +3 -0
- package/dist/Kit/DataDisplay/LegacyCard/index.js +159 -0
- package/dist/Kit/DataDisplay/LegacyCard/types.d.ts +31 -0
- package/dist/Kit/DataDisplay/Tabs/index.js +77 -0
- package/dist/Kit/DataDisplay/Tabs/style.js +54 -0
- package/dist/Kit/DataDisplay/Tag/Group.d.ts +4 -0
- package/dist/Kit/DataDisplay/Tag/Group.js +17 -0
- package/dist/Kit/DataDisplay/Tag/Tag.d.ts +2 -3
- package/dist/Kit/DataDisplay/Tag/Tag.js +64 -0
- package/dist/Kit/DataDisplay/Tag/index.d.ts +5 -3
- package/dist/Kit/DataDisplay/Tag/index.js +7 -0
- package/dist/Kit/DataDisplay/Tag/types.d.ts +18 -2
- package/dist/Kit/DataDisplay/Tag/useTagGroup.d.ts +4 -0
- package/dist/Kit/DataDisplay/Tag/useTagGroup.js +40 -0
- package/dist/Kit/DataDisplay/Tooltip/index.js +7 -0
- package/dist/Kit/DataDisplay/Tour/index.js +10 -0
- package/dist/Kit/DataDisplay/Tour/style.js +86 -0
- package/dist/Kit/DataDisplay/Tree/index.js +228 -0
- package/dist/Kit/DataDisplay/index.d.ts +1 -0
- package/dist/Kit/DataEntry/AutoComplete/index.js +19 -0
- package/dist/Kit/DataEntry/Checkbox/Checkbox.js +271 -0
- package/dist/Kit/DataEntry/Checkbox/Group.js +28 -0
- package/dist/Kit/DataEntry/Checkbox/index.js +7 -0
- package/dist/Kit/DataEntry/ColorPicker/index.d.ts +2 -2
- package/dist/Kit/DataEntry/ColorPicker/index.js +12 -0
- package/dist/Kit/DataEntry/ColorPicker/style.js +105 -0
- package/dist/Kit/DataEntry/DatePicker/DatePicker.js +264 -0
- package/dist/Kit/DataEntry/DatePicker/RangePicker.js +317 -0
- package/dist/Kit/DataEntry/DatePicker/index.js +7 -0
- package/dist/Kit/DataEntry/DatePicker/style.js +52 -0
- package/dist/Kit/DataEntry/Input/Input.js +314 -0
- package/dist/Kit/DataEntry/Input/InputWrapper.js +27 -0
- package/dist/Kit/DataEntry/Input/Password.js +294 -0
- package/dist/Kit/DataEntry/Input/TextArea.js +257 -0
- package/dist/Kit/DataEntry/Input/index.js +8 -0
- package/dist/Kit/DataEntry/InputNumber/index.js +223 -0
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -1
- package/dist/Kit/DataEntry/Radio/Group.js +22 -0
- package/dist/Kit/DataEntry/Radio/Radio.js +233 -0
- package/dist/Kit/DataEntry/Radio/context.js +6 -0
- package/dist/Kit/DataEntry/Radio/index.js +7 -0
- package/dist/Kit/DataEntry/Rate/index.js +58 -0
- package/dist/Kit/DataEntry/Rate/types.d.ts +1 -1
- package/dist/Kit/DataEntry/Select/index.js +48 -0
- package/dist/Kit/DataEntry/Select/style.js +620 -0
- package/dist/Kit/DataEntry/Select/types.d.ts +0 -3
- package/dist/Kit/DataEntry/Slider/index.js +81 -0
- package/dist/Kit/DataEntry/Switch/index.js +153 -0
- package/dist/Kit/DataEntry/Upload/Dragger.js +85 -0
- package/dist/Kit/DataEntry/Upload/Upload.js +122 -0
- package/dist/Kit/DataEntry/Upload/index.js +8 -0
- package/dist/Kit/Feedback/Alert/index.js +99 -0
- package/dist/Kit/Feedback/Modal/ConfirmDialog.js +37 -0
- package/dist/Kit/Feedback/Modal/Modal.js +135 -0
- package/dist/Kit/Feedback/Modal/confirm.js +45 -0
- package/dist/Kit/Feedback/Modal/index.js +17 -0
- package/dist/Kit/Feedback/Notification/KitNotification.d.ts +3 -0
- package/dist/Kit/Feedback/Notification/KitNotification.js +188 -0
- package/dist/Kit/Feedback/Notification/index.d.ts +1 -0
- package/dist/Kit/Feedback/Notification/notification-provider.js +31 -0
- package/dist/Kit/Feedback/Notification/style.d.ts +16 -0
- package/dist/Kit/Feedback/Notification/style.js +77 -0
- package/dist/Kit/Feedback/Notification/types.d.ts +1 -0
- package/dist/Kit/Feedback/Notification/useKitNotification.js +11 -0
- package/dist/Kit/Feedback/Progress/index.js +24 -0
- package/dist/Kit/Feedback/SnackBar/SnackBar.js +118 -0
- package/dist/Kit/Feedback/SnackBar/SnackBarProvider.js +12 -0
- package/dist/Kit/Feedback/SnackBar/index.js +8 -0
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.js +10 -0
- package/dist/Kit/Feedback/index.d.ts +1 -1
- package/dist/Kit/Font/index.d.ts +2 -0
- package/dist/Kit/Font/index.js +25 -0
- package/dist/Kit/General/Button/index.js +285 -0
- package/dist/Kit/General/Button/types.d.ts +2 -2
- package/dist/Kit/General/Icon/index.js +34 -0
- package/dist/Kit/General/Icon/types.d.ts +1 -1
- package/dist/Kit/General/Typography/Link.js +36 -0
- package/dist/Kit/General/Typography/Paragraph.js +38 -0
- package/dist/Kit/General/Typography/Text.js +35 -0
- package/dist/Kit/General/Typography/Title.js +7 -0
- package/dist/Kit/General/Typography/commons.js +8 -0
- package/dist/Kit/General/Typography/index.js +8 -0
- package/dist/Kit/General/Typography/style.js +78 -0
- package/dist/Kit/Layout/Divider/index.js +32 -0
- package/dist/Kit/Layout/Grid/Col.js +6 -0
- package/dist/Kit/Layout/Grid/Row.js +6 -0
- package/dist/Kit/Layout/Grid/index.js +6 -0
- package/dist/Kit/Layout/Space/index.js +14 -0
- package/dist/Kit/Layout/Space/types.d.ts +1 -1
- package/dist/Kit/Navigation/Breadcrumb/index.js +25 -0
- package/dist/Kit/Navigation/DropDown/index.js +11 -0
- package/dist/Kit/Navigation/DropDown/style.js +226 -0
- package/dist/Kit/Navigation/Header/index.js +74 -0
- package/dist/Kit/Navigation/Header/types.d.ts +1 -1
- package/dist/Kit/Navigation/Menu/ItemMenu.js +196 -0
- package/dist/Kit/Navigation/Menu/Menu.js +88 -0
- package/dist/Kit/Navigation/Menu/index.js +7 -0
- package/dist/Kit/Navigation/Menu/types.d.ts +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +156 -0
- package/dist/Kit/Navigation/Steps/index.js +51 -0
- package/dist/Kit/index.d.ts +3 -2
- package/dist/fonts/Inter-italic.var.woff2.js +4 -0
- package/dist/fonts/Inter-roman.var.woff2.js +4 -0
- package/dist/hooks/useSecureClick/index.js +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +163 -6471
- package/dist/index.umd.js +6320 -0
- package/dist/theme/aristid/components/DataDisplay/Avatar/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Avatar/index.js +6 -0
- package/dist/theme/aristid/components/DataDisplay/Badge/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Badge/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Card/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Card/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Collapse/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Collapse/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Image/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Image/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/ItemCard/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/ItemCard/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/ItemList/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/ItemList/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/LegacyCard/index.d.ts +2 -0
- package/dist/theme/aristid/components/DataDisplay/LegacyCard/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Tabs/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tabs/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Tag/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tag/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Tooltip/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tooltip/index.js +5 -0
- package/dist/theme/aristid/components/DataDisplay/Tree/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tree/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Checkbox/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Checkbox/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/ColorPicker/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/ColorPicker/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/DatePicker/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/DatePicker/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Input/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Input/index.js +8 -0
- package/dist/theme/aristid/components/DataEntry/InputNumber/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/InputNumber/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Radio/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Radio/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Rate/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Rate/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Select/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Select/index.js +7 -0
- package/dist/theme/aristid/components/DataEntry/Slider/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Slider/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Switch/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Switch/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Upload/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Upload/index.js +6 -0
- package/dist/theme/aristid/components/Feedback/Alert/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Alert/index.js +5 -0
- package/dist/theme/aristid/components/Feedback/Modal/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Modal/index.js +5 -0
- package/dist/theme/aristid/components/Feedback/Notification/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Notification/index.js +5 -0
- package/dist/theme/aristid/components/Feedback/Progress/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Progress/index.js +5 -0
- package/dist/theme/aristid/components/Feedback/SnackBar/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/SnackBar/index.js +5 -0
- package/dist/theme/aristid/components/General/Button/index.d.ts +1 -1
- package/dist/theme/aristid/components/General/Button/index.js +13 -0
- package/dist/theme/aristid/components/General/Icon/index.d.ts +1 -1
- package/dist/theme/aristid/components/General/Icon/index.js +5 -0
- package/dist/theme/aristid/components/General/Typography/index.d.ts +1 -1
- package/dist/theme/aristid/components/General/Typography/index.js +5 -0
- package/dist/theme/aristid/components/Layout/Divider/index.d.ts +1 -1
- package/dist/theme/aristid/components/Layout/Divider/index.js +5 -0
- package/dist/theme/aristid/components/Navigation/Breadcrumb/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Breadcrumb/index.js +5 -0
- package/dist/theme/aristid/components/Navigation/DropDown/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/DropDown/index.js +5 -0
- package/dist/theme/aristid/components/Navigation/Header/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Header/index.js +5 -0
- package/dist/theme/aristid/components/Navigation/Menu/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Menu/index.js +5 -0
- package/dist/theme/aristid/components/Navigation/Pagination/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Pagination/index.js +5 -0
- package/dist/theme/aristid/components/Navigation/Steps/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Steps/index.js +5 -0
- package/dist/theme/aristid/general/border/index.d.ts +1 -1
- package/dist/theme/aristid/general/border/index.js +5 -0
- package/dist/theme/aristid/general/colors/index.d.ts +1 -1
- package/dist/theme/aristid/general/colors/index.js +5 -0
- package/dist/theme/aristid/general/index.d.ts +1 -1
- package/dist/theme/aristid/general/index.js +8 -0
- package/dist/theme/aristid/general/spacing/index.d.ts +1 -1
- package/dist/theme/aristid/general/spacing/index.js +5 -0
- package/dist/theme/aristid/general/typography/index.d.ts +1 -1
- package/dist/theme/aristid/general/typography/index.js +5 -0
- package/dist/theme/theme-context.js +26 -0
- package/dist/theme/types/components/DataDisplay/Card/index.d.ts +17 -87
- package/dist/theme/types/components/DataDisplay/Collapse/index.d.ts +16 -0
- package/dist/theme/types/components/DataDisplay/LegacyCard/index.d.ts +251 -0
- package/dist/theme/types/components/DataEntry/DatePicker/index.d.ts +5 -0
- package/dist/theme/types/components/DataEntry/Input/index.d.ts +15 -0
- package/dist/theme/types/components/DataEntry/InputNumber/index.d.ts +5 -1
- package/dist/theme/types/components/DataEntry/Radio/index.d.ts +2 -0
- package/dist/theme/types/components/DataEntry/Select/index.d.ts +5 -1
- package/dist/theme/types/components/Feedback/Notification/index.d.ts +1 -0
- package/dist/theme/types/components/General/Button/index.d.ts +1 -1
- package/dist/theme/types/components/General/Typography/index.d.ts +2 -0
- package/dist/theme/types/index.d.ts +3 -1
- package/dist/theme/useKitTheme.js +11 -0
- package/dist/theme/utils/convert.d.ts +1 -0
- package/dist/theme/utils/convert.js +4 -0
- package/dist/theme/utils/css-tokens-generator.js +9 -0
- package/dist/theme/utils/index.js +4 -0
- package/dist/theme/utils/tokens-mapper/DataDisplay/Badge/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataDisplay/Collapse/index.js +6 -0
- package/dist/theme/utils/tokens-mapper/DataDisplay/Tabs/index.d.ts +0 -6
- package/dist/theme/utils/tokens-mapper/DataDisplay/Tabs/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataDisplay/Tooltip/index.js +8 -0
- package/dist/theme/utils/tokens-mapper/DataDisplay/Tree/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Checkbox/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/ColorPicker/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/DatePicker/index.js +8 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Input/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Radio/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Rate/index.js +6 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Select/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Slider/index.js +6 -0
- package/dist/theme/utils/tokens-mapper/DataEntry/Tag/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/Feedback/Alert/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/Feedback/Progress/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/Layout/Divider/index.js +7 -0
- package/dist/theme/utils/tokens-mapper/Navigation/Pagination/index.js +8 -0
- package/dist/theme/utils/tokens-mapper/Navigation/Steps/index.js +8 -0
- package/dist/theme/utils/tokens-mapper/index.js +24 -0
- package/dist/translation/en-US/components/DataDisplay/Collapse/index.d.ts +2 -0
- package/dist/translation/en-US/components/DataDisplay/Collapse/index.js +5 -0
- package/dist/translation/en-US/components/DataDisplay/Image/index.d.ts +1 -1
- package/dist/translation/en-US/components/DataDisplay/Image/index.js +4 -0
- package/dist/translation/en-US/components/DataDisplay/ItemCard/index.js +5 -0
- package/dist/translation/en-US/components/DataDisplay/ItemList/index.js +5 -0
- package/dist/translation/en-US/general/index.d.ts +1 -1
- package/dist/translation/en-US/general/index.js +4 -0
- package/dist/translation/en-US/index.js +8 -0
- package/dist/translation/fr-FR/components/DataDisplay/Collapse/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/DataDisplay/Collapse/index.js +5 -0
- package/dist/translation/fr-FR/components/DataDisplay/Image/index.d.ts +1 -1
- package/dist/translation/fr-FR/components/DataDisplay/Image/index.js +4 -0
- package/dist/translation/fr-FR/components/DataDisplay/ItemCard/index.js +5 -0
- package/dist/translation/fr-FR/components/DataDisplay/ItemList/index.js +5 -0
- package/dist/translation/fr-FR/general/index.d.ts +1 -1
- package/dist/translation/fr-FR/general/index.js +4 -0
- package/dist/translation/fr-FR/index.js +8 -0
- package/dist/translation/locale-context.js +18 -0
- package/dist/translation/types/components/DataDisplay/Collapse/index.d.ts +3 -0
- package/dist/translation/types/components/DataDisplay/ItemCard/index.d.ts +2 -2
- package/dist/translation/types/components/DataDisplay/ItemList/index.d.ts +2 -2
- package/dist/translation/types/index.d.ts +6 -4
- package/dist/translation/useKitLocale.js +11 -0
- package/dist/translation/utils/index.js +15 -0
- package/dist/utils/functions/index.d.ts +6 -0
- package/dist/utils/functions/index.js +34 -0
- package/package.json +31 -30
- package/dist/index.js +0 -5820
- package/dist/style.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [0.11.0](https://www.npmjs.com/package/aristid-ds/v/0.11.0) (2024-01-24)
|
|
4
|
+
### ✨ Features
|
|
5
|
+
* **Notification:**
|
|
6
|
+
* Add `KitNotification` component usable without using `useKitNotification` hook (@evoiron)
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Fix warning at build time about potential cycling dependencies (@evoiron)
|
|
11
|
+
* Remove deprecated package `react-uuid` (@evoiron)
|
|
12
|
+
* Enable 3 Select options, to allow dynamic filtering of options (@evoiron)
|
|
13
|
+
|
|
14
|
+
## [0.10.0](https://www.npmjs.com/package/aristid-ds/v/0.10.0) (2024-01-19)
|
|
15
|
+
|
|
16
|
+
### ✨ Features
|
|
17
|
+
* **⚠️ Breaking change - Card:**
|
|
18
|
+
* Update visual render and properties (@Delmotte-Vincent)
|
|
19
|
+
* This `Card` aim to replace actual `Card` and `ItemCard`
|
|
20
|
+
* **⚠️ Breaking change - Collapse:**
|
|
21
|
+
* Update visual render (@philippechevieux)
|
|
22
|
+
* Update properties of `KitHeader` and `KitExtraHeader`
|
|
23
|
+
* **Notification:**
|
|
24
|
+
* Update visual render (@evoiron, @renaudAmsellem)
|
|
25
|
+
* **DataEntry components:**
|
|
26
|
+
* Update visual render of `hover` and `focus` state for all those components (@evoiron, @renaudAmsellem)
|
|
27
|
+
* **Antd components:**
|
|
28
|
+
* Export all components of `Ant Design`. Those components are now available in `aristid-ds`, all prefixed by `Ant` (eg `AntLayout`) (@evoiron)
|
|
29
|
+
* **Tree shaking:**
|
|
30
|
+
* All components are now tree shakable (@evoiron)
|
|
31
|
+
|
|
32
|
+
### 🚨 Tests
|
|
33
|
+
|
|
34
|
+
* **Chromatic:**
|
|
35
|
+
* Reduce number of snapshots (Group set of visual tests) (@fatb38)
|
|
36
|
+
|
|
37
|
+
## [0.9.1](https://www.npmjs.com/package/aristid-ds/v/0.9.1) (2023-12-22)
|
|
38
|
+
|
|
39
|
+
### 🐛 Bug Fixes
|
|
40
|
+
|
|
41
|
+
* Fix types issues in `IKitLocale` that was causing build to crash (@fatb38)
|
|
42
|
+
|
|
43
|
+
## [0.9.0](https://www.npmjs.com/package/aristid-ds/v/0.9.0) (2023-12-22)
|
|
44
|
+
|
|
45
|
+
### 🎨 Theming
|
|
46
|
+
|
|
47
|
+
* Improve performance when using multiple `KitApp` component (@Delmotte-Vincent, @evoiron, @fatb38, @philippechevieux)
|
|
48
|
+
* Replace `css-in-js` theming variables by `css variables` (@Delmotte-Vincent, @evoiron, @fatb38, @philippechevieux)
|
|
49
|
+
|
|
50
|
+
### 🤖 CI
|
|
4
51
|
|
|
52
|
+
* Add `eslint` to CI pipeline (@evoiron)
|
|
53
|
+
* Add a build to CI pipeline (@evoiron)
|
|
5
54
|
|
|
6
55
|
## [0.8.0](https://www.npmjs.com/package/aristid-ds/v/0.8.0) (2023-11-16)
|
|
7
56
|
|
package/README.md
CHANGED
|
@@ -491,7 +491,7 @@ We use Gitflow as Git branching model for this project. We have two branches to
|
|
|
491
491
|
|
|
492
492
|
#### Feature
|
|
493
493
|
|
|
494
|
-
<img src="public/images/gitflow-feature.png" alt="Logo" height="250px">
|
|
494
|
+
<img src="http://storybook.aristid.com/public/images/gitflow-feature.png" alt="Logo" height="250px">
|
|
495
495
|
|
|
496
496
|
Creating a feature branch
|
|
497
497
|
|
|
@@ -509,7 +509,7 @@ git flow feature finish addTooltipComponent
|
|
|
509
509
|
|
|
510
510
|
#### Release
|
|
511
511
|
|
|
512
|
-
<img src="public/images/gitflow-release.png" alt="Logo" height="250px">
|
|
512
|
+
<img src="http://storybook.aristid.com/public/images/gitflow-release.png" alt="Logo" height="250px">
|
|
513
513
|
|
|
514
514
|
Creating a release
|
|
515
515
|
|
|
@@ -527,7 +527,7 @@ git flow release finish '0.1.0'
|
|
|
527
527
|
|
|
528
528
|
#### Hotfix
|
|
529
529
|
|
|
530
|
-
<img src="public/images/gitflow-hotfix.png" alt="Logo" height="250px">
|
|
530
|
+
<img src="http://storybook.aristid.com/public/images/gitflow-hotfix.png" alt="Logo" height="250px">
|
|
531
531
|
|
|
532
532
|
Creating a release
|
|
533
533
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export { Affix as AntAffix } from "antd";
|
|
2
|
+
export { Alert as AntAlert } from "antd";
|
|
3
|
+
export { Anchor as AntAnchor } from "antd";
|
|
4
|
+
export { App as AntApp } from "antd";
|
|
5
|
+
export { AutoComplete as AntAutoComplete } from "antd";
|
|
6
|
+
export { Avatar as AntAvatar } from "antd";
|
|
7
|
+
export { BackTop as AntBackTop } from "antd";
|
|
8
|
+
export { Badge as AntBadge } from "antd";
|
|
9
|
+
export { Breadcrumb as AntBreadcrumb } from "antd";
|
|
10
|
+
export { Button as AntButton } from "antd";
|
|
11
|
+
export { Calendar as AntCalendar } from "antd";
|
|
12
|
+
export { Card as AntCard } from "antd";
|
|
13
|
+
export { Carousel as AntCarousel } from "antd";
|
|
14
|
+
export { Cascader as AntCascader } from "antd";
|
|
15
|
+
export { Checkbox as AntCheckbox } from "antd";
|
|
16
|
+
export { Col as AntCol } from "antd";
|
|
17
|
+
export { Collapse as AntCollapse } from "antd";
|
|
18
|
+
export { ColorPicker as AntColorPicker } from "antd";
|
|
19
|
+
export { ConfigProvider as AntConfigProvider } from "antd";
|
|
20
|
+
export { DatePicker as AntDatePicker } from "antd";
|
|
21
|
+
export { Descriptions as AntDescriptions } from "antd";
|
|
22
|
+
export { Divider as AntDivider } from "antd";
|
|
23
|
+
export { Drawer as AntDrawer } from "antd";
|
|
24
|
+
export { Dropdown as AntDropdown } from "antd";
|
|
25
|
+
export { Empty as AntEmpty } from "antd";
|
|
26
|
+
export { Flex as AntFlex } from "antd";
|
|
27
|
+
export { FloatButton as AntFloatButton } from "antd";
|
|
28
|
+
export { Form as AntForm } from "antd";
|
|
29
|
+
export { Grid as AntGrid } from "antd";
|
|
30
|
+
export { Image as AntImage } from "antd";
|
|
31
|
+
export { Input as AntInput } from "antd";
|
|
32
|
+
export { InputNumber as AntInputNumber } from "antd";
|
|
33
|
+
export { Layout as AntLayout } from "antd";
|
|
34
|
+
export { List as AntList } from "antd";
|
|
35
|
+
export { Mentions as AntMentions } from "antd";
|
|
36
|
+
export { Menu as AntMenu } from "antd";
|
|
37
|
+
export { Modal as AntModal } from "antd";
|
|
38
|
+
export { Pagination as AntPagination } from "antd";
|
|
39
|
+
export { Popconfirm as AntPopconfirm } from "antd";
|
|
40
|
+
export { Popover as AntPopover } from "antd";
|
|
41
|
+
export { Progress as AntProgress } from "antd";
|
|
42
|
+
export { QRCode as AntQRCode } from "antd";
|
|
43
|
+
export { Radio as AntRadio } from "antd";
|
|
44
|
+
export { Rate as AntRate } from "antd";
|
|
45
|
+
export { Result as AntResult } from "antd";
|
|
46
|
+
export { Row as AntRow } from "antd";
|
|
47
|
+
export { Segmented as AntSegmented } from "antd";
|
|
48
|
+
export { Select as AntSelect } from "antd";
|
|
49
|
+
export { Skeleton as AntSkeleton } from "antd";
|
|
50
|
+
export { Slider as AntSlider } from "antd";
|
|
51
|
+
export { Space as AntSpace } from "antd";
|
|
52
|
+
export { Spin as AntSpin } from "antd";
|
|
53
|
+
export { Statistic as AntStatistic } from "antd";
|
|
54
|
+
export { Steps as AntSteps } from "antd";
|
|
55
|
+
export { Switch as AntSwitch } from "antd";
|
|
56
|
+
export { Table as AntTable } from "antd";
|
|
57
|
+
export { Tabs as AntTabs } from "antd";
|
|
58
|
+
export { Tag as AntTag } from "antd";
|
|
59
|
+
export { TimePicker as AntTimePicker } from "antd";
|
|
60
|
+
export { Timeline as AntTimeline } from "antd";
|
|
61
|
+
export { Tooltip as AntTooltip } from "antd";
|
|
62
|
+
export { Tour as AntTour } from "antd";
|
|
63
|
+
export { Transfer as AntTransfer } from "antd";
|
|
64
|
+
export { Tree as AntTree } from "antd";
|
|
65
|
+
export { TreeSelect as AntTreeSelect } from "antd";
|
|
66
|
+
export { Typography as AntTypography } from "antd";
|
|
67
|
+
export { Upload as AntUpload } from "antd";
|
|
68
|
+
export { Watermark as AntWatermark } from "antd";
|
package/dist/Kit/App/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { IKitCustomTheme } from '
|
|
3
|
-
import { IKitLocale } from '
|
|
2
|
+
import { IKitCustomTheme } from '@theme/types';
|
|
3
|
+
import { IKitLocale } from '@translation/types';
|
|
4
4
|
export declare const KitApp: FunctionComponent<{
|
|
5
5
|
customTheme?: IKitCustomTheme;
|
|
6
6
|
locale?: IKitLocale;
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
id?: string;
|
|
9
|
+
includeFont?: boolean;
|
|
9
10
|
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import e, { useEffect as i } from "react";
|
|
2
|
+
import { ConfigProvider as n } from "antd";
|
|
3
|
+
import c from "../Feedback/SnackBar/SnackBarProvider.js";
|
|
4
|
+
import { DropDownStyle as a } from "../Navigation/DropDown/style.js";
|
|
5
|
+
import { SelectDropDownStyle as p } from "../DataEntry/Select/style.js";
|
|
6
|
+
import { DatePickerDropDownStyle as f } from "../DataEntry/DatePicker/style.js";
|
|
7
|
+
import { NotificationStyle as u } from "../Feedback/Notification/style.js";
|
|
8
|
+
import { KitThemeProvider as E } from "../../theme/theme-context.js";
|
|
9
|
+
import { TypographyStyle as d } from "../General/Typography/style.js";
|
|
10
|
+
import { TabsDropDownStyle as y } from "../DataDisplay/Tabs/style.js";
|
|
11
|
+
import { antdThemeConfig as S } from "../../theme/utils/tokens-mapper/index.js";
|
|
12
|
+
import { KitLocaleProvider as K } from "../../translation/locale-context.js";
|
|
13
|
+
import { mapKitLocaleToAntdLocale as D } from "../../translation/utils/index.js";
|
|
14
|
+
import { ColorPickerPanelStyle as h } from "../DataEntry/ColorPicker/style.js";
|
|
15
|
+
import { TourStyle as s } from "../DataDisplay/Tour/style.js";
|
|
16
|
+
import { useKitLocale as P } from "../../translation/useKitLocale.js";
|
|
17
|
+
import { KitNotificationProvider as T } from "../Feedback/Notification/notification-provider.js";
|
|
18
|
+
import { KitFontStyle as v } from "../Font/index.js";
|
|
19
|
+
const M = ({ children: r, locale: t, customTheme: l, id: o, includeFont: m = !0 }) => e.createElement(E, { customTheme: l, id: o }, e.createElement(K, null, e.createElement(L, { locale: t, includeFont: m }, r))), L = ({ children: r, locale: t, includeFont: l }) => {
|
|
20
|
+
const o = P().setKitLocale;
|
|
21
|
+
return i(() => {
|
|
22
|
+
t !== void 0 && o(t);
|
|
23
|
+
}, [t, o]), e.createElement(n, { theme: S, locale: D(t) }, e.createElement(T, null, l && e.createElement(v, null), e.createElement(c, null), e.createElement(h, null), e.createElement(a, null), e.createElement(p, null), e.createElement(y, null), e.createElement(f, null), e.createElement(u, null), e.createElement(d, null), e.createElement(s, null), r));
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
M as KitApp
|
|
27
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import c, { useMemo as p } from "react";
|
|
2
|
+
import { Avatar as d } from "antd";
|
|
3
|
+
import { styled as u } from "styled-components";
|
|
4
|
+
import { useKitTheme as v } from "../../../theme/useKitTheme.js";
|
|
5
|
+
import { isValidColor as y, getColor as f, isSecondaryColor as g, getLighterColor as C, getContrastColor as k } from "../../../utils/functions/index.js";
|
|
6
|
+
import { kitAvatarCssTokens as a } from "../../../theme/aristid/components/DataDisplay/Avatar/index.js";
|
|
7
|
+
import { kitColorsPaletteCssTokens as l } from "../../../theme/aristid/general/colors/index.js";
|
|
8
|
+
const A = u(d)`
|
|
9
|
+
&:not(.ant-avatar-image) {
|
|
10
|
+
background: var(
|
|
11
|
+
${a.colors.background.default},
|
|
12
|
+
var(${l.neutral.black60})
|
|
13
|
+
);
|
|
14
|
+
color: var(
|
|
15
|
+
${a.colors.typography.default},
|
|
16
|
+
var(${l.neutral.typography.white})
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
`, h = (r, o) => r && y(r) ? { [a.colors.background.default]: f(r, o), [a.colors.typography.default]: g(r) ? C(r, o) : k(r) } : null, s = ({ color: r, className: o, style: t, secondaryColorInvert: e = !1, ...m }) => {
|
|
20
|
+
var n = v().appId, i = p(() => ({ ...t, ...h(r, e) }), [r, e, t]);
|
|
21
|
+
return c.createElement(A, { style: i, className: n + " " + (o ?? ""), ...m });
|
|
22
|
+
}, w = (s.displayName = "KitAvatar", s);
|
|
23
|
+
export {
|
|
24
|
+
w as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import s from "react";
|
|
2
|
+
import { Avatar as i } from "antd";
|
|
3
|
+
import { useKitTheme as m } from "../../../theme/useKitTheme.js";
|
|
4
|
+
import p, { css as u } from "styled-components";
|
|
5
|
+
import { kitAvatarGroupCssTokens as a } from "../../../theme/aristid/components/DataDisplay/Avatar/index.js";
|
|
6
|
+
import { kitColorsPaletteCssTokens as e } from "../../../theme/aristid/general/colors/index.js";
|
|
7
|
+
const n = p(i.Group)`
|
|
8
|
+
${({ $shouldOverrideLastAvatarStyle: r }) => r ? u`
|
|
9
|
+
&.ant-avatar-group > span:last-child {
|
|
10
|
+
background: var(
|
|
11
|
+
${a.colors.background.default},
|
|
12
|
+
var(${e.primary.primary100})
|
|
13
|
+
);
|
|
14
|
+
color: var(
|
|
15
|
+
${a.colors.typography.default},
|
|
16
|
+
var(
|
|
17
|
+
${a.colors.background.default},
|
|
18
|
+
var(${e.primary.primary200})
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
` : void 0}
|
|
23
|
+
`, v = ({ className: r, maxCount: o, ...t }) => {
|
|
24
|
+
var l = m().appId;
|
|
25
|
+
return s.createElement(n, { ...t, maxCount: o, $shouldOverrideLastAvatarStyle: !!o, className: l + " " + (r ?? ""), maxStyle: { cursor: t.maxPopoverTrigger === "click" ? "pointer" : "initial" } });
|
|
26
|
+
}, $ = v;
|
|
27
|
+
export {
|
|
28
|
+
$ as default
|
|
29
|
+
};
|
|
@@ -2,7 +2,7 @@ import {AvatarProps} from 'antd';
|
|
|
2
2
|
import {GroupProps} from 'antd/lib/avatar';
|
|
3
3
|
import {KitHTMLAttributes} from '../../../types';
|
|
4
4
|
import {FunctionComponent} from 'react';
|
|
5
|
-
import {KitColorProp} from '
|
|
5
|
+
import {KitColorProp} from '../../../utils/functions/types';
|
|
6
6
|
|
|
7
7
|
type AntdAvatarTypesToOmit = '';
|
|
8
8
|
type AntdAvatarGroupTypesToOmit = 'maxStyle';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import l, { useMemo as m } from "react";
|
|
2
|
+
import { Badge as d } from "antd";
|
|
3
|
+
import { styled as p } from "styled-components";
|
|
4
|
+
import { useKitTheme as g } from "../../../theme/useKitTheme.js";
|
|
5
|
+
import { isValidColor as c, getColor as u, getLighterColor as f } from "../../../utils/functions/index.js";
|
|
6
|
+
import { kitBadgeCssTokens as e } from "../../../theme/aristid/components/DataDisplay/Badge/index.js";
|
|
7
|
+
import { kitColorsPaletteCssTokens as n } from "../../../theme/aristid/general/colors/index.js";
|
|
8
|
+
import { typographyCssTokens as y } from "../../../theme/aristid/general/typography/index.js";
|
|
9
|
+
import { convertToPixel as h } from "../../../theme/utils/convert.js";
|
|
10
|
+
const C = p(d)`
|
|
11
|
+
height: 16px;
|
|
12
|
+
min-width: 16px;
|
|
13
|
+
line-height: 16px;
|
|
14
|
+
font-size: ${h(y.fontSize7)};
|
|
15
|
+
|
|
16
|
+
.ant-badge-count {
|
|
17
|
+
background: var(
|
|
18
|
+
${e.colors.background.default},
|
|
19
|
+
var(${n.secondary.red.red400})
|
|
20
|
+
);
|
|
21
|
+
color: var(
|
|
22
|
+
${e.colors.typography.default},
|
|
23
|
+
var(${n.neutral.typography.white})
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.ant-badge {
|
|
28
|
+
.ant-badge-status-processing {
|
|
29
|
+
&.ant-scroll-number {
|
|
30
|
+
position: absolute;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&::after {
|
|
34
|
+
animation-name: none;
|
|
35
|
+
content: initial;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.ant-badge-status-dot {
|
|
39
|
+
&::after {
|
|
40
|
+
animation-name: none;
|
|
41
|
+
content: initial;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`, b = (o, t) => o && c(o) ? { [e.colors.background.default]: u(o, t), [e.colors.typography.default]: f(o, t) } : null, k = ({ color: o, style: t, secondaryColorInvert: r = !1, ...a }) => {
|
|
47
|
+
var i = g().appId, s = m(() => ({ ...t, ...b(o, r) }), [o, r, t]);
|
|
48
|
+
return l.createElement(C, { style: s, className: a.className + " " + i, ...a });
|
|
49
|
+
};
|
|
50
|
+
k.displayName = "KitBadge";
|
|
51
|
+
export {
|
|
52
|
+
k as KitBadge
|
|
53
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {BadgeProps} from 'antd';
|
|
2
2
|
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
-
import {KitColorProp} from '
|
|
3
|
+
import {KitColorProp} from '../../../utils/functions/types';
|
|
4
4
|
|
|
5
5
|
type AntdBadgeTypesToOmit = 'color' | 'size' | 'offset' | 'text';
|
|
6
6
|
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { styled as G } from "styled-components";
|
|
3
|
+
import N from "classnames";
|
|
4
|
+
import { kitColorsPaletteCssTokens as t } from "../../../theme/aristid/general/colors/index.js";
|
|
5
|
+
import { typographyCssTokens as i } from "../../../theme/aristid/general/typography/index.js";
|
|
6
|
+
import { spacingCssTokens as h } from "../../../theme/aristid/general/spacing/index.js";
|
|
7
|
+
import { FontAwesomeIcon as T } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import { faEllipsis as S } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
+
import { kitCardCssTokens as r } from "../../../theme/aristid/components/DataDisplay/Card/index.js";
|
|
10
|
+
import { useKitTheme as z } from "../../../theme/useKitTheme.js";
|
|
11
|
+
import { KitTag as K } from "../Tag/index.js";
|
|
12
|
+
import { convertToPixel as d } from "../../../theme/utils/convert.js";
|
|
13
|
+
import { KitCheckbox as F } from "../../DataEntry/Checkbox/index.js";
|
|
14
|
+
import { KitSwitch as W } from "../../DataEntry/Switch/index.js";
|
|
15
|
+
import { KitButton as c } from "../../General/Button/index.js";
|
|
16
|
+
import { KitDropDown as B } from "../../Navigation/DropDown/index.js";
|
|
17
|
+
import { KitTypography as n } from "../../General/Typography/index.js";
|
|
18
|
+
const I = G.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
border-radius: 10px;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
background-color: var(
|
|
24
|
+
${r.colors.background.default},
|
|
25
|
+
var(${t.neutral.white})
|
|
26
|
+
);
|
|
27
|
+
border: 1px solid
|
|
28
|
+
var(
|
|
29
|
+
${r.colors.border.default},
|
|
30
|
+
var(${t.secondary.mediumGrey.mediumGrey200})
|
|
31
|
+
);
|
|
32
|
+
margin: 2px;
|
|
33
|
+
box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.1);
|
|
34
|
+
width: 300px;
|
|
35
|
+
|
|
36
|
+
&.kit-card-disabled {
|
|
37
|
+
background-color: var(
|
|
38
|
+
${r.colors.background.disabled},
|
|
39
|
+
var(${t.secondary.mediumGrey.mediumGrey100})
|
|
40
|
+
);
|
|
41
|
+
.kit-card-picture {
|
|
42
|
+
border-color: var(
|
|
43
|
+
${r.colors.separator.disabled},
|
|
44
|
+
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.kit-card-content {
|
|
49
|
+
.kit-card-title {
|
|
50
|
+
color: var(
|
|
51
|
+
${r.colors.typography.title.disabled},
|
|
52
|
+
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
.kit-card-description {
|
|
56
|
+
color: var(
|
|
57
|
+
${r.colors.typography.description.disabled},
|
|
58
|
+
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
.kit-card-extra {
|
|
62
|
+
color: var(
|
|
63
|
+
${r.colors.typography.extra.disabled},
|
|
64
|
+
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.kit-card-selected {
|
|
71
|
+
margin: 0;
|
|
72
|
+
border: 3px solid
|
|
73
|
+
var(${r.colors.border.selected}, var(${t.primary.primary400}));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.kit-card-content {
|
|
77
|
+
grid-area: content;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: ${d(h.xs)};
|
|
81
|
+
padding: ${d(h.s)};
|
|
82
|
+
|
|
83
|
+
.kit-card-title {
|
|
84
|
+
font-size: ${d(r.typography.title.fontSize, i.fontSize3)};
|
|
85
|
+
font-weight: var(
|
|
86
|
+
${r.typography.title.fontWeight},
|
|
87
|
+
var(${i.boldFontWeight})
|
|
88
|
+
);
|
|
89
|
+
color: var(
|
|
90
|
+
${r.colors.typography.title.default},
|
|
91
|
+
var(${t.primary.primary400})
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.kit-card-description {
|
|
96
|
+
font-size: ${d(r.typography.description.fontSize, i.fontSize5)};
|
|
97
|
+
font-weight: var(
|
|
98
|
+
${r.typography.description.fontWeight},
|
|
99
|
+
var(${i.regularFontWeight})
|
|
100
|
+
);
|
|
101
|
+
color: var(
|
|
102
|
+
${r.colors.typography.description.default},
|
|
103
|
+
var(${t.secondary.mediumGrey.mediumGrey600})
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.kit-card-extra {
|
|
108
|
+
font-size: ${d(r.typography.extra.fontSize, i.fontSize4)};
|
|
109
|
+
font-weight: var(
|
|
110
|
+
${r.typography.extra.fontWeight},
|
|
111
|
+
var(${i.boldFontWeight})
|
|
112
|
+
);
|
|
113
|
+
color: var(
|
|
114
|
+
${r.colors.typography.extra.default},
|
|
115
|
+
var(${t.primary.primary400})
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.kit-card-picture {
|
|
121
|
+
display: flex;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
height: 200px;
|
|
124
|
+
padding: 10px;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
position: relative;
|
|
127
|
+
border-bottom: 4px solid
|
|
128
|
+
${({ $brandingBar: o }) => o ? `var(${r.colors.separator.default}, var(${t.primary.primary400}))` : "transparent"};
|
|
129
|
+
|
|
130
|
+
img {
|
|
131
|
+
height: 100%;
|
|
132
|
+
transition-duration: 500ms;
|
|
133
|
+
transition-property: transform;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.kit-card-checkbox {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 10px;
|
|
139
|
+
left: 10px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.kit-card-switch {
|
|
143
|
+
position: absolute;
|
|
144
|
+
top: 10px;
|
|
145
|
+
right: 10px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.kit-card-buttons {
|
|
149
|
+
position: absolute;
|
|
150
|
+
bottom: 10px;
|
|
151
|
+
right: 10px;
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: column;
|
|
154
|
+
gap: 8px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&:focus:not(.kit-card-disabled),
|
|
159
|
+
&:focus-visible:not(.kit-card-disabled),
|
|
160
|
+
&:focus-within:not(.kit-card-disabled) {
|
|
161
|
+
margin: 0;
|
|
162
|
+
border: 3px solid
|
|
163
|
+
var(${r.colors.border.focus}, var(${t.primary.primary200}));
|
|
164
|
+
outline: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:hover:not(.kit-card-disabled) {
|
|
168
|
+
margin: 0;
|
|
169
|
+
border: 3px solid
|
|
170
|
+
var(${r.colors.border.hover}, var(${t.primary.primary400}));
|
|
171
|
+
|
|
172
|
+
.kit-card-picture {
|
|
173
|
+
border-color: transparent;
|
|
174
|
+
|
|
175
|
+
img {
|
|
176
|
+
transform: scale(1.3);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
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 }) => {
|
|
181
|
+
const E = z().appId;
|
|
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)));
|
|
184
|
+
};
|
|
185
|
+
A.displayName = "KitCard";
|
|
186
|
+
export {
|
|
187
|
+
A as KitCard
|
|
188
|
+
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CSSProperties, ReactNode} from 'react';
|
|
2
|
+
import {IKitTagConfig} from '../../DataDisplay/Tag/types';
|
|
3
|
+
import {CheckboxChangeEvent} from 'antd/lib/checkbox';
|
|
4
|
+
import {SwitchChangeEventHandler} from 'antd/lib/switch';
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| 'tabBarExtraContent'
|
|
13
|
-
| 'onTabChange';
|
|
14
|
-
|
|
15
|
-
export default interface IKitCard extends Omit<CardProps, AntdCardTypesToOmit> {
|
|
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;
|
|
16
15
|
disabled?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
previewSrc?: string;
|
|
17
|
+
onActivate?: SwitchChangeEventHandler;
|
|
18
|
+
onSelect?: (e: CheckboxChangeEvent) => void;
|
|
19
|
+
selected?: boolean;
|
|
20
|
+
tags?: IKitTagConfig[];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export interface
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
export interface IKitCardAction {
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
icon: ReactNode;
|
|
27
|
+
onClick: (e: unknown) => void;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
export interface
|
|
29
|
-
$
|
|
30
|
-
$disabled: boolean;
|
|
30
|
+
export interface IStyledKitCard {
|
|
31
|
+
$brandingBar: boolean;
|
|
31
32
|
}
|