@synerise/ds-card-tabs 1.5.21 → 1.5.23
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 +8 -0
- package/README.md +24 -27
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.5.23](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@1.5.22...@synerise/ds-card-tabs@1.5.23) (2026-03-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-card-tabs
|
|
9
|
+
|
|
10
|
+
## [1.5.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@1.5.21...@synerise/ds-card-tabs@1.5.22) (2026-03-09)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-card-tabs
|
|
13
|
+
|
|
6
14
|
## [1.5.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@1.5.20...@synerise/ds-card-tabs@1.5.21) (2026-02-23)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-card-tabs
|
package/README.md
CHANGED
|
@@ -25,37 +25,33 @@ import CardTabs from '@synerise/ds-card-tabs'
|
|
|
25
25
|
>
|
|
26
26
|
<CardTab
|
|
27
27
|
id={0}
|
|
28
|
-
index={0}
|
|
29
28
|
name="Variant A"
|
|
30
29
|
tag="A"
|
|
31
30
|
active={true}
|
|
32
31
|
greyBackground={false}
|
|
33
|
-
prefixIcon={<FileIcon />}
|
|
34
32
|
suffixIcon={<FileIcon />}
|
|
35
33
|
disabled={false}
|
|
36
34
|
prefix={prefixType.TAG}
|
|
37
|
-
onSelectTab={() => {}
|
|
38
|
-
onChangeName={() => {}
|
|
35
|
+
onSelectTab={() => {}}
|
|
36
|
+
onChangeName={() => {}}
|
|
39
37
|
onRemoveTab={() => {}}
|
|
40
|
-
onDuplicateTab={() => {}
|
|
38
|
+
onDuplicateTab={() => {}}
|
|
41
39
|
invalid={false}
|
|
42
40
|
draggable={false}
|
|
43
41
|
/>
|
|
44
42
|
<CardTab
|
|
45
43
|
id={1}
|
|
46
|
-
index={1}
|
|
47
44
|
name="Variant B"
|
|
48
45
|
tag="B"
|
|
49
46
|
active={false}
|
|
50
47
|
greyBackground={false}
|
|
51
|
-
prefixIcon={<FileIcon />}
|
|
52
48
|
suffixIcon={<FileIcon />}
|
|
53
49
|
disabled={false}
|
|
54
50
|
prefix={prefixType.TAG}
|
|
55
|
-
onSelectTab={() => {}
|
|
56
|
-
onChangeName={() => {}
|
|
51
|
+
onSelectTab={() => {}}
|
|
52
|
+
onChangeName={() => {}}
|
|
57
53
|
onRemoveTab={() => {}}
|
|
58
|
-
onDuplicateTab={() => {}
|
|
54
|
+
onDuplicateTab={() => {}}
|
|
59
55
|
invalid={false}
|
|
60
56
|
draggable={false}
|
|
61
57
|
/>
|
|
@@ -71,37 +67,38 @@ import CardTabs from '@synerise/ds-card-tabs'
|
|
|
71
67
|
|
|
72
68
|
### CardTabs Component
|
|
73
69
|
|
|
74
|
-
| Property | Description | Type
|
|
75
|
-
| ------------- | ---------------------------------------------- |
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
70
|
+
| Property | Description | Type | Default |
|
|
71
|
+
| ------------- | ---------------------------------------------- | ---------------------------------- | ------- |
|
|
72
|
+
| children | Array of CardTab elements | Array<ReactElement<CardTabProps>> | - |
|
|
73
|
+
| addTabLabel | Label text for the add-tab button | string | - |
|
|
74
|
+
| maxTabsCount | Max number of child components | number | - |
|
|
75
|
+
| onAddTab | Callback fired when user clicks on add button | () => void | - |
|
|
76
|
+
| onChangeOrder | Callback fired when user changes order of tabs | (newOrder: CardTabProps[]) => void | - |
|
|
79
77
|
|
|
80
78
|
### CardTab Component
|
|
81
79
|
|
|
82
80
|
| Property | Description | Type | Default |
|
|
83
81
|
| ----------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------- |
|
|
84
|
-
| id | Id of tab | number
|
|
85
|
-
| index | Position of tab | number | - |
|
|
82
|
+
| id | Id of tab | string \| number | - |
|
|
86
83
|
| name | Name of tab | string | - |
|
|
87
|
-
|
|
|
88
|
-
|
|
|
84
|
+
| prefix | Prefix variant selector | `prefixType.TAG` / `prefixType.DOT` / `prefixType.ICON` / `prefixType.HANDLE` | - |
|
|
85
|
+
| tag | Single letter (tag) shown when `prefix={prefixType.TAG}` | string | - |
|
|
89
86
|
| active | Flag of active tab | boolean | `false` |
|
|
90
87
|
| greyBackground | Change default color of tabs, use when background will be different then white | boolean | `false` |
|
|
91
|
-
| prefixIcon | Icon
|
|
88
|
+
| prefixIcon | Icon shown when `prefix={prefixType.ICON}` | ReactNode | - |
|
|
92
89
|
| suffixIcon | Icon visible on the right side of the tab, when set action icons will be hidden | SVG Icon | null |
|
|
93
90
|
| disabled | Flag of disabled tabs | boolean | `false` |
|
|
94
91
|
| invalid | Flag of tabs with some errors | boolean | `false` |
|
|
95
92
|
| invalidName | Flag of tabs with invalid name | boolean | `false` |
|
|
96
93
|
| draggable | Shows drag handler on the left side of tab | boolean | `false` |
|
|
97
|
-
| onSelectTab | Callback fired when user clicks on the tab | (id: number) => void
|
|
98
|
-
| onPreviewTab | Callback fired when user clicks on the preview tab icon | (id: number) => void
|
|
99
|
-
| onRemoveTab | Callback fired when user clicks on the remove tab icon | (id: number) => void
|
|
100
|
-
| onDuplicateTab | Callback fired when user clicks on the duplicate tab icon | (id: number) => void
|
|
101
|
-
| onChangeName | Callback fired when the edit name input blur | (id: number, newName: string)
|
|
94
|
+
| onSelectTab | Callback fired when user clicks on the tab | (id: string \| number) => void | - |
|
|
95
|
+
| onPreviewTab | Callback fired when user clicks on the preview tab icon | (id: string \| number) => void | - |
|
|
96
|
+
| onRemoveTab | Callback fired when user clicks on the remove tab icon | (id: string \| number) => void | - |
|
|
97
|
+
| onDuplicateTab | Callback fired when user clicks on the duplicate tab icon | (id: string \| number) => void | - |
|
|
98
|
+
| onChangeName | Callback fired when the edit name input blur | (id: string \| number, newName: string) => void | - |
|
|
102
99
|
| texts | Translations of CrudButtons tooltips | CardTabTexts | - |
|
|
103
100
|
| color | Color of CardTab | `red`/ `green`/ `grey`/ `yellow`/ `blue`/ `pink`/ `mars`/ `orange`/ `fern`/ `cyan`/ `purple`/ `violet` | `yellow` |
|
|
104
|
-
| colorDot |
|
|
101
|
+
| colorDot | Custom dot node shown when `prefix={prefixType.DOT}`; defaults to `CardDot` | React.ReactNode | - |
|
|
105
102
|
| itemData | Additional item data | any | - |
|
|
106
103
|
| renderSuffix | render custom suffix instead of cruds, dropdown menu or icon | (props: CardTabSuffixProps) => ReactNode | - |
|
|
107
104
|
| actionsAsDropdown | render crud actions in dropdown instead of icons | boolean | `false` |
|
|
@@ -112,7 +109,7 @@ import CardTabs from '@synerise/ds-card-tabs'
|
|
|
112
109
|
| ------------------ | -------------------- | ------------------------ | ----------- |
|
|
113
110
|
| changeNameTooltip | Rename tooltip | string / React.ReactNode | 'Rename' |
|
|
114
111
|
| duplicateTooltip | Duplicate tooltip | string / React.ReactNode | 'Duplicate' |
|
|
115
|
-
| previewTooltip |
|
|
112
|
+
| previewTooltip | Preview tooltip | string / React.ReactNode | 'Preview' |
|
|
116
113
|
| removeTooltip | Remove tooltip | string / React.ReactNode | 'Remove' |
|
|
117
114
|
| changeNameMenuItem | Rename menu label | string / React.ReactNode | 'Rename' |
|
|
118
115
|
| duplicateMenuItem | Duplicate menu label | string / React.ReactNode | 'Duplicate' |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-card-tabs",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.23",
|
|
4
4
|
"description": "CardTabs UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
26
|
-
"test": "vitest",
|
|
27
|
-
"test:watch": "
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
28
|
"types": "tsc --noEmit",
|
|
29
29
|
"check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
|
|
30
30
|
"upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-button": "^1.5.
|
|
39
|
-
"@synerise/ds-cruds": "^1.
|
|
40
|
-
"@synerise/ds-dropdown": "^1.
|
|
41
|
-
"@synerise/ds-icon": "^1.
|
|
42
|
-
"@synerise/ds-inline-edit": "^1.1.
|
|
43
|
-
"@synerise/ds-menu": "^1.4.
|
|
44
|
-
"@synerise/ds-sortable": "^1.3.
|
|
45
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
46
|
-
"@synerise/ds-typography": "^1.1.
|
|
47
|
-
"@synerise/ds-utils": "^1.
|
|
38
|
+
"@synerise/ds-button": "^1.5.17",
|
|
39
|
+
"@synerise/ds-cruds": "^1.1.1",
|
|
40
|
+
"@synerise/ds-dropdown": "^1.3.1",
|
|
41
|
+
"@synerise/ds-icon": "^1.15.0",
|
|
42
|
+
"@synerise/ds-inline-edit": "^1.1.23",
|
|
43
|
+
"@synerise/ds-menu": "^1.4.12",
|
|
44
|
+
"@synerise/ds-sortable": "^1.3.13",
|
|
45
|
+
"@synerise/ds-tooltip": "^1.4.9",
|
|
46
|
+
"@synerise/ds-typography": "^1.1.12",
|
|
47
|
+
"@synerise/ds-utils": "^1.7.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@synerise/ds-core": "*",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"styled-components": "^5.3.3",
|
|
55
55
|
"vitest": "4"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
|
|
58
58
|
}
|