@drivenets/design-system 0.16.0 → 0.17.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 +13 -0
- package/dist/index.cjs +234 -191
- package/dist/index.d.cts +250 -197
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +250 -197
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +234 -191
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/package.json +24 -24
- package/src/components/ds-alert-banner/ds-alert-banner.tsx +7 -6
- package/src/components/ds-autocomplete/ds-autocomplete.figma.ts +2 -2
- package/src/components/ds-avatar/ds-avatar.figma.ts +2 -2
- package/src/components/ds-avatar-group/ds-avatar-group.figma.ts +2 -2
- package/src/components/ds-breadcrumb/ds-breadcrumb.figma.ts +2 -2
- package/src/components/ds-button-v3/ds-button-v3.figma.ts +2 -2
- package/src/components/ds-card/figma/ds-card-content.figma.ts +2 -2
- package/src/components/ds-card/figma/ds-card-footer.figma.ts +2 -2
- package/src/components/ds-card/figma/ds-card-header.figma.ts +2 -2
- package/src/components/ds-card/figma/ds-card.figma.ts +2 -2
- package/src/components/ds-catalog-layout/ds-catalog-layout.figma.ts +51 -0
- package/src/components/ds-catalog-layout/ds-catalog-layout.tsx +9 -8
- package/src/components/ds-checkbox/ds-checkbox-level-2.figma.ts +2 -2
- package/src/components/ds-checkbox/ds-checkbox.figma.ts +2 -2
- package/src/components/ds-checkbox-group/ds-checkbox-group.figma.ts +2 -2
- package/src/components/ds-comments-drawer/components/comments-filter-modal/index.ts +0 -1
- package/src/components/ds-confirmation/ds-confirmation.tsx +13 -11
- package/src/components/ds-date-picker/ds-date-picker.figma.ts +2 -2
- package/src/components/ds-divider/ds-divider.figma.ts +2 -2
- package/src/components/ds-drawer/ds-drawer.tsx +11 -10
- package/src/components/ds-drawer/figma/ds-drawer-content.figma.ts +2 -2
- package/src/components/ds-drawer/figma/ds-drawer-footer.figma.ts +2 -2
- package/src/components/ds-drawer/figma/ds-drawer-header.figma.ts +2 -2
- package/src/components/ds-drawer/figma/ds-drawer.figma.ts +2 -2
- package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-footer.figma.ts +2 -2
- package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-group.figma.ts +2 -2
- package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-item.figma.ts +2 -2
- package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-separator.figma.ts +2 -2
- package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu.figma.ts +2 -2
- package/src/components/ds-expandable-text-input/ds-expandable-text-input.figma.ts +2 -2
- package/src/components/ds-file-upload/components/file-upload-item/index.ts +0 -1
- package/src/components/ds-file-upload/ds-file-upload.figma.ts +2 -2
- package/src/components/ds-filter-status-icon/ds-filter-status-icon.figma.ts +2 -2
- package/src/components/ds-form-control/ds-form-control.figma.ts +2 -2
- package/src/components/ds-form-control/ds-form-control.tsx +15 -13
- package/src/components/ds-icon/figma/ds-icon-material.figma.batch.ts +1 -1
- package/src/components/ds-icon/figma/ds-icon-special.figma.batch.ts +1 -1
- package/src/components/ds-key-value-pair/ds-key-value-pair.figma.ts +2 -2
- package/src/components/ds-loader/ds-loader.figma.ts +2 -2
- package/src/components/ds-modal/ds-modal.tsx +10 -9
- package/src/components/ds-modal/figma/ds-modal-content.figma.ts +2 -2
- package/src/components/ds-modal/figma/ds-modal-footer.figma.ts +2 -2
- package/src/components/ds-modal/figma/ds-modal-header.figma.ts +2 -2
- package/src/components/ds-modal/figma/ds-modal.figma.ts +2 -2
- package/src/components/ds-number-input/ds-number-input.tsx +1 -0
- package/src/components/ds-panel/ds-panel.figma.ts +2 -2
- package/src/components/ds-popover/figma/ds-popover-content-item.figma.ts +2 -2
- package/src/components/ds-popover/figma/ds-popover-content.figma.ts +2 -2
- package/src/components/ds-popover/figma/ds-popover-footer.figma.ts +2 -2
- package/src/components/ds-popover/figma/ds-popover-header.figma.ts +2 -2
- package/src/components/ds-popover/figma/ds-popover.figma.ts +2 -2
- package/src/components/ds-progress-arc/ds-progress-arc.figma.ts +2 -2
- package/src/components/ds-progress-donut/ds-progress-donut.figma.ts +2 -2
- package/src/components/ds-progress-linear/ds-progress-linear.figma.ts +2 -2
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.figma.ts +2 -2
- package/src/components/ds-radio-group/figma/ds-radio-group-item.figma.ts +2 -2
- package/src/components/ds-radio-group/figma/ds-radio-group.figma.ts +2 -2
- package/src/components/ds-segment-group/figma/ds-segment-group-item.figma.ts +2 -2
- package/src/components/ds-segment-group/figma/ds-segment-group.figma.ts +2 -2
- package/src/components/ds-select/ds-select.figma.ts +2 -2
- package/src/components/ds-site-node/ds-site-node.figma.ts +2 -2
- package/src/components/ds-smart-tabs/ds-smart-tabs.tsx +5 -4
- package/src/components/ds-spinner/ds-spinner.figma.ts +2 -2
- package/src/components/ds-split-button/ds-split-button.figma.ts +2 -2
- package/src/components/ds-status-badge-v2/ds-status-badge-v2.figma.ts +2 -2
- package/src/components/ds-stepper/ds-stepper.figma.ts +2 -2
- package/src/components/ds-table/components/ds-table-group-header-cell/index.ts +0 -1
- package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +2 -2
- package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +2 -4
- package/src/components/ds-table/ds-table.module.scss +15 -0
- package/src/components/ds-table/ds-table.tsx +37 -34
- package/src/components/ds-table/ds-table.types.ts +6 -0
- package/src/components/ds-table/figma/ds-table-expandable.figma.ts +2 -2
- package/src/components/ds-table/figma/ds-table.figma.ts +2 -2
- package/src/components/ds-tabs/figma/ds-tabs-tab-vertical.figma.ts +2 -2
- package/src/components/ds-tabs/figma/ds-tabs-tab.figma.ts +2 -2
- package/src/components/ds-tabs/figma/ds-tabs-vertical.figma.ts +2 -2
- package/src/components/ds-tabs/figma/ds-tabs.figma.ts +2 -2
- package/src/components/ds-text-input/ds-input-field-v02.figma.ts +2 -2
- package/src/components/ds-text-input/ds-text-input.figma.ts +2 -2
- package/src/components/ds-time-picker/ds-time-picker.figma.ts +2 -2
- package/src/components/ds-toast/ds-toast.figma.ts +3 -3
- package/src/components/ds-toggle/ds-toggle.figma.ts +2 -2
- package/src/components/ds-tooltip/ds-tooltip.figma.ts +2 -2
- package/src/components/ds-tree/ds-tree.module.scss +2 -2
- package/src/components/ds-tree/ds-tree.tsx +6 -0
- package/src/components/ds-tree/ds-tree.types.ts +16 -0
- package/src/components/ds-typography/ds-typography.figma.ts +2 -2
- package/src/components/ds-user-card/ds-user-card.figma.ts +2 -2
- package/src/components/ds-vertical-tabs/ds-vertical-tabs.tsx +13 -6
- package/src/components/ds-workspace-layout/ds-workspace-layout.tsx +11 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivenets/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
42
42
|
"@dnd-kit/sortable": "^10.0.0",
|
|
43
43
|
"@dnd-kit/utilities": "^3.2.2",
|
|
44
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
45
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
46
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
47
|
-
"@radix-ui/react-visually-hidden": "^1.2.
|
|
44
|
+
"@radix-ui/react-collapsible": "^1.1.17",
|
|
45
|
+
"@radix-ui/react-dialog": "^1.1.20",
|
|
46
|
+
"@radix-ui/react-dropdown-menu": "^2.1.21",
|
|
47
|
+
"@radix-ui/react-visually-hidden": "^1.2.8",
|
|
48
48
|
"@tanstack/react-table": "^8.21.3",
|
|
49
|
-
"@tanstack/react-virtual": "^3.14.
|
|
50
|
-
"@zag-js/react": "^1.
|
|
51
|
-
"@zag-js/steps": "^1.
|
|
49
|
+
"@tanstack/react-virtual": "^3.14.6",
|
|
50
|
+
"@zag-js/react": "^1.42.0",
|
|
51
|
+
"@zag-js/steps": "^1.42.0",
|
|
52
52
|
"classnames": "^2.5.1",
|
|
53
53
|
"csstype": "^3.2.3"
|
|
54
54
|
},
|
|
@@ -61,25 +61,25 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
63
63
|
"@eslint/compat": "^2.1.0",
|
|
64
|
-
"@faker-js/faker": "^10.
|
|
65
|
-
"@figma/code-connect": "^1.4.
|
|
64
|
+
"@faker-js/faker": "^10.5.0",
|
|
65
|
+
"@figma/code-connect": "^1.4.9",
|
|
66
66
|
"@github-ui/storybook-addon-performance-panel": "^1.1.4",
|
|
67
|
-
"@hookform/resolvers": "^5.4.
|
|
67
|
+
"@hookform/resolvers": "^5.4.2",
|
|
68
68
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
69
69
|
"@storybook/addon-a11y": "^10.4.1",
|
|
70
70
|
"@storybook/addon-docs": "^10.4.1",
|
|
71
71
|
"@storybook/addon-mcp": "^0.6.0",
|
|
72
72
|
"@storybook/addon-vitest": "^10.4.1",
|
|
73
73
|
"@storybook/react-vite": "^10.4.1",
|
|
74
|
-
"@tanstack/react-query": "^5.
|
|
75
|
-
"@tanstack/react-router": "^1.170.
|
|
76
|
-
"@tsdown/css": "^0.22.
|
|
74
|
+
"@tanstack/react-query": "^5.101.4",
|
|
75
|
+
"@tanstack/react-router": "^1.170.18",
|
|
76
|
+
"@tsdown/css": "^0.22.14",
|
|
77
77
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
78
|
-
"@types/react": "^19.2.
|
|
78
|
+
"@types/react": "^19.2.17",
|
|
79
79
|
"@types/react-dom": "^19.2.3",
|
|
80
80
|
"@types/serve-handler": "^6.1.4",
|
|
81
81
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
82
|
-
"@vitejs/plugin-react": "^6.0.
|
|
82
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
83
83
|
"@vitest/browser-playwright": "^4.1.10",
|
|
84
84
|
"@vitest/coverage-v8": "^4.1.10",
|
|
85
85
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
@@ -87,22 +87,22 @@
|
|
|
87
87
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
88
88
|
"eslint-plugin-react": "^7.37.5",
|
|
89
89
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
90
|
-
"eslint-plugin-storybook": "^10.
|
|
90
|
+
"eslint-plugin-storybook": "^10.5.0",
|
|
91
91
|
"mockdate": "^3.0.5",
|
|
92
|
-
"playwright": "^1.
|
|
93
|
-
"publint": "^0.3.
|
|
94
|
-
"react": "^19.2.
|
|
95
|
-
"react-dom": "^19.2.
|
|
96
|
-
"react-hook-form": "^7.
|
|
92
|
+
"playwright": "^1.62.0",
|
|
93
|
+
"publint": "^0.3.22",
|
|
94
|
+
"react": "^19.2.8",
|
|
95
|
+
"react-dom": "^19.2.8",
|
|
96
|
+
"react-hook-form": "^7.83.0",
|
|
97
97
|
"remark-gfm": "^4.0.1",
|
|
98
98
|
"sass-embedded": "^1.100.0",
|
|
99
99
|
"serve-handler": "^6.1.7",
|
|
100
100
|
"storybook": "^10.4.1",
|
|
101
|
-
"tsdown": "^0.22.
|
|
101
|
+
"tsdown": "^0.22.14",
|
|
102
102
|
"typed-scss-modules": "^8.1.1",
|
|
103
103
|
"typescript": "npm:@typescript/typescript6",
|
|
104
104
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
105
|
-
"vite": "8.
|
|
105
|
+
"vite": "8.1.5",
|
|
106
106
|
"vitest": "^4.1.10",
|
|
107
107
|
"vitest-browser-react": "^2.1.0",
|
|
108
108
|
"zod": "^4.4.3",
|
|
@@ -12,7 +12,7 @@ import { DsTypography } from '../ds-typography';
|
|
|
12
12
|
* severity variants, an optional icon, and an optional close button. Compose the
|
|
13
13
|
* content with `DsAlertBanner.Title`, `DsAlertBanner.Body`, and `DsAlertBanner.Actions`.
|
|
14
14
|
*/
|
|
15
|
-
const
|
|
15
|
+
const DsAlertBannerRoot = ({
|
|
16
16
|
open,
|
|
17
17
|
onOpenChange,
|
|
18
18
|
inline = false,
|
|
@@ -115,10 +115,11 @@ Title.displayName = 'DsAlertBanner.Title';
|
|
|
115
115
|
Body.displayName = 'DsAlertBanner.Body';
|
|
116
116
|
Actions.displayName = 'DsAlertBanner.Actions';
|
|
117
117
|
|
|
118
|
-
DsAlertBanner
|
|
119
|
-
DsAlertBanner
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
const DsAlertBanner = Object.assign(DsAlertBannerRoot, {
|
|
119
|
+
displayName: 'DsAlertBanner',
|
|
120
|
+
Title,
|
|
121
|
+
Body,
|
|
122
|
+
Actions,
|
|
123
|
+
});
|
|
123
124
|
|
|
124
125
|
export default DsAlertBanner;
|
|
@@ -30,7 +30,7 @@ const attrs = [
|
|
|
30
30
|
|
|
31
31
|
export default {
|
|
32
32
|
example: figma.code`<DsAutocomplete ${attrs} />`,
|
|
33
|
-
imports: ["import { DsAutocomplete } from '@drivenets/design-system'"],
|
|
33
|
+
imports: ["import { DsAutocomplete } from '@drivenets/design-system';"],
|
|
34
34
|
id: 'ds-autocomplete',
|
|
35
35
|
metadata: { nestable: true },
|
|
36
|
-
};
|
|
36
|
+
} satisfies figma.Template;
|
|
@@ -24,7 +24,7 @@ const type = instance.getEnum('Type', { Circle: 'circle', Rounded: 'rounded' })
|
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
26
|
example: figma.code`<DsAvatar name="Full Name" size="${size}" type="${type}" />`,
|
|
27
|
-
imports: ["import { DsAvatar } from '@drivenets/design-system'"],
|
|
27
|
+
imports: ["import { DsAvatar } from '@drivenets/design-system';"],
|
|
28
28
|
id: 'ds-avatar',
|
|
29
29
|
metadata: { nestable: true },
|
|
30
|
-
};
|
|
30
|
+
} satisfies figma.Template;
|
|
@@ -21,7 +21,7 @@ const size =
|
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
23
|
example: figma.code`<DsAvatarGroup avatars={[]} size="${size}" />`,
|
|
24
|
-
imports: ["import { DsAvatarGroup } from '@drivenets/design-system'"],
|
|
24
|
+
imports: ["import { DsAvatarGroup } from '@drivenets/design-system';"],
|
|
25
25
|
id: 'ds-avatar-group',
|
|
26
26
|
metadata: { nestable: true },
|
|
27
|
-
};
|
|
27
|
+
} satisfies figma.Template;
|
|
@@ -13,7 +13,7 @@ import figma from 'figma';
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
example: figma.code`<DsBreadcrumb items={[]} />`,
|
|
16
|
-
imports: ["import { DsBreadcrumb } from '@drivenets/design-system'"],
|
|
16
|
+
imports: ["import { DsBreadcrumb } from '@drivenets/design-system';"],
|
|
17
17
|
id: 'ds-breadcrumb',
|
|
18
18
|
metadata: { nestable: true },
|
|
19
|
-
};
|
|
19
|
+
} satisfies figma.Template;
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
: showIcon && icon
|
|
94
94
|
? figma.code`<DsButtonV3 variant="${variant}" color="${color}" size="${size}" ${disabled ? 'disabled' : ''} icon="${icon}">${label}</DsButtonV3>`
|
|
95
95
|
: figma.code`<DsButtonV3 variant="${variant}" color="${color}" size="${size}" ${disabled ? 'disabled' : ''}>${label}</DsButtonV3>`,
|
|
96
|
-
imports: ["import { DsButtonV3 } from '@drivenets/design-system'"],
|
|
96
|
+
imports: ["import { DsButtonV3 } from '@drivenets/design-system';"],
|
|
97
97
|
id: 'ds-button-v3',
|
|
98
98
|
metadata: { nestable: true },
|
|
99
|
-
};
|
|
99
|
+
} satisfies figma.Template;
|
|
@@ -9,7 +9,7 @@ import figma from 'figma';
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
example: figma.code`<DsCard.Body>Card content</DsCard.Body>`,
|
|
12
|
-
imports: ["import { DsCard } from '@drivenets/design-system'"],
|
|
12
|
+
imports: ["import { DsCard } from '@drivenets/design-system';"],
|
|
13
13
|
id: 'ds-card-content',
|
|
14
14
|
metadata: { nestable: true },
|
|
15
|
-
};
|
|
15
|
+
} satisfies figma.Template;
|
|
@@ -9,7 +9,7 @@ import figma from 'figma';
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
example: figma.code`<DsCard.Footer>Card footer</DsCard.Footer>`,
|
|
12
|
-
imports: ["import { DsCard } from '@drivenets/design-system'"],
|
|
12
|
+
imports: ["import { DsCard } from '@drivenets/design-system';"],
|
|
13
13
|
id: 'ds-card-footer',
|
|
14
14
|
metadata: { nestable: true },
|
|
15
|
-
};
|
|
15
|
+
} satisfies figma.Template;
|
|
@@ -9,7 +9,7 @@ import figma from 'figma';
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
example: figma.code`<DsCard.Header>Card title</DsCard.Header>`,
|
|
12
|
-
imports: ["import { DsCard } from '@drivenets/design-system'"],
|
|
12
|
+
imports: ["import { DsCard } from '@drivenets/design-system';"],
|
|
13
13
|
id: 'ds-card-header',
|
|
14
14
|
metadata: { nestable: true },
|
|
15
|
-
};
|
|
15
|
+
} satisfies figma.Template;
|
|
@@ -66,7 +66,7 @@ if (footer.type === 'INSTANCE') {
|
|
|
66
66
|
|
|
67
67
|
export default {
|
|
68
68
|
example: figma.code`<DsCard.Root size="${size}"${flagsAttr}>${headerCode}${contentCode}${footerCode}</DsCard.Root>`,
|
|
69
|
-
imports: ["import { DsCard } from '@drivenets/design-system'"],
|
|
69
|
+
imports: ["import { DsCard } from '@drivenets/design-system';"],
|
|
70
70
|
id: 'ds-card',
|
|
71
71
|
metadata: { nestable: false },
|
|
72
|
-
};
|
|
72
|
+
} satisfies figma.Template;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=38148-43478
|
|
2
|
+
// source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-catalog-layout
|
|
3
|
+
// component=DsCatalogLayout
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
|
|
6
|
+
const instance = figma.selectedInstance;
|
|
7
|
+
|
|
8
|
+
const type =
|
|
9
|
+
instance.getEnum('Type', {
|
|
10
|
+
empty: 'empty',
|
|
11
|
+
'collapsed side menu': 'collapsed',
|
|
12
|
+
'hover to expand side menu': 'hover',
|
|
13
|
+
'pin expanded side menu': 'pinned',
|
|
14
|
+
}) ?? 'empty';
|
|
15
|
+
|
|
16
|
+
const hasSideMenu = type !== 'empty';
|
|
17
|
+
const pinnedAttr = type === 'pinned' ? 'pinned' : 'pinned={false}';
|
|
18
|
+
|
|
19
|
+
const sideMenu = hasSideMenu
|
|
20
|
+
? figma.code`
|
|
21
|
+
<DsCatalogLayout.SideMenu ${pinnedAttr} onPinnedChange={() => {}}>
|
|
22
|
+
{/* DsTree / DsSideMenu navigation items */}
|
|
23
|
+
</DsCatalogLayout.SideMenu>`
|
|
24
|
+
: '';
|
|
25
|
+
|
|
26
|
+
const contentHeader =
|
|
27
|
+
type === 'empty'
|
|
28
|
+
? figma.code`<DsCatalogLayout.ContentHeader title={<DsTypography variant="heading3">Title</DsTypography>} />`
|
|
29
|
+
: figma.code`<DsCatalogLayout.ContentHeader title={<DsTypography variant="heading3">Title</DsTypography>}>
|
|
30
|
+
{/* DsSmartTabs */}
|
|
31
|
+
</DsCatalogLayout.ContentHeader>`;
|
|
32
|
+
|
|
33
|
+
const contentBody =
|
|
34
|
+
type === 'empty'
|
|
35
|
+
? '{/* EmptyStateCard + DsButtonV3 (no data / clear filters) */}'
|
|
36
|
+
: '{/* DsTable with data rows */}';
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
example: figma.code`<DsCatalogLayout>
|
|
40
|
+
<DsCatalogLayout.Header>{/* DsTopBarNavigation */}</DsCatalogLayout.Header>
|
|
41
|
+
<DsCatalogLayout.Body>${sideMenu}
|
|
42
|
+
<DsCatalogLayout.Content>
|
|
43
|
+
${contentHeader}
|
|
44
|
+
${contentBody}
|
|
45
|
+
</DsCatalogLayout.Content>
|
|
46
|
+
</DsCatalogLayout.Body>
|
|
47
|
+
</DsCatalogLayout>`,
|
|
48
|
+
imports: ["import { DsCatalogLayout, DsTypography } from '@drivenets/design-system';"],
|
|
49
|
+
id: 'ds-catalog-layout',
|
|
50
|
+
metadata: { nestable: false },
|
|
51
|
+
} satisfies figma.Template;
|
|
@@ -17,7 +17,7 @@ const DEFAULT_LOCALE = Object.freeze({
|
|
|
17
17
|
unpinButtonLabel: 'Unpin side menu',
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const DsCatalogLayoutRoot = ({ className, fillParent = false, ...rest }: DsCatalogLayoutProps) => {
|
|
21
21
|
const [hasSideMenu, setHasSideMenu] = useState(false);
|
|
22
22
|
|
|
23
23
|
const registerSideMenu = useCallback(() => setHasSideMenu(true), []);
|
|
@@ -127,12 +127,13 @@ SideMenu.displayName = 'DsCatalogLayout.SideMenu';
|
|
|
127
127
|
Content.displayName = 'DsCatalogLayout.Content';
|
|
128
128
|
ContentHeader.displayName = 'DsCatalogLayout.ContentHeader';
|
|
129
129
|
|
|
130
|
-
DsCatalogLayout
|
|
131
|
-
DsCatalogLayout
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
const DsCatalogLayout = Object.assign(DsCatalogLayoutRoot, {
|
|
131
|
+
displayName: 'DsCatalogLayout',
|
|
132
|
+
Header,
|
|
133
|
+
Body,
|
|
134
|
+
SideMenu,
|
|
135
|
+
Content,
|
|
136
|
+
ContentHeader,
|
|
137
|
+
});
|
|
137
138
|
|
|
138
139
|
export default DsCatalogLayout;
|
|
@@ -34,7 +34,7 @@ const attrs = [
|
|
|
34
34
|
|
|
35
35
|
export default {
|
|
36
36
|
example: figma.code`<DsCheckbox ${attrs} />`,
|
|
37
|
-
imports: ["import { DsCheckbox } from '@drivenets/design-system'"],
|
|
37
|
+
imports: ["import { DsCheckbox } from '@drivenets/design-system';"],
|
|
38
38
|
id: 'ds-checkbox-level-2',
|
|
39
39
|
metadata: { nestable: true },
|
|
40
|
-
};
|
|
40
|
+
} satisfies figma.Template;
|
|
@@ -39,7 +39,7 @@ const attrs = [
|
|
|
39
39
|
|
|
40
40
|
export default {
|
|
41
41
|
example: figma.code`<DsCheckbox ${attrs} />`,
|
|
42
|
-
imports: ["import { DsCheckbox } from '@drivenets/design-system'"],
|
|
42
|
+
imports: ["import { DsCheckbox } from '@drivenets/design-system';"],
|
|
43
43
|
id: 'ds-checkbox',
|
|
44
44
|
metadata: { nestable: true },
|
|
45
|
-
};
|
|
45
|
+
} satisfies figma.Template;
|
|
@@ -9,7 +9,7 @@ const checkboxes = instance.getSlot('checkboxes slot');
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
example: figma.code`<DsCheckboxGroup>${checkboxes}</DsCheckboxGroup>`,
|
|
12
|
-
imports: ["import { DsCheckboxGroup, DsCheckbox } from '@drivenets/design-system'"],
|
|
12
|
+
imports: ["import { DsCheckboxGroup, DsCheckbox } from '@drivenets/design-system';"],
|
|
13
13
|
id: 'ds-checkbox-group',
|
|
14
14
|
metadata: { nestable: false },
|
|
15
|
-
};
|
|
15
|
+
} satisfies figma.Template;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { DsModal } from '../ds-modal';
|
|
2
2
|
import type { DsConfirmationProps } from './ds-confirmation.types';
|
|
3
3
|
|
|
4
|
+
const DsConfirmationRoot = (props: DsConfirmationProps) => (
|
|
5
|
+
<DsModal columns={4} closeOnEscape closeOnInteractOutside {...props} />
|
|
6
|
+
);
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* @deprecated DsConfirmation is deprecated. Use DsModal instead.
|
|
6
10
|
* @see {@link ../ds-modal} for the replacement component.
|
|
7
11
|
*/
|
|
8
|
-
export const DsConfirmation = (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
DsConfirmation.Actions = DsModal.Actions;
|
|
18
|
-
DsConfirmation.displayName = 'DsConfirmation';
|
|
12
|
+
export const DsConfirmation = Object.assign(DsConfirmationRoot, {
|
|
13
|
+
displayName: 'DsConfirmation',
|
|
14
|
+
Header: DsModal.Header,
|
|
15
|
+
Title: DsModal.Title,
|
|
16
|
+
CloseTrigger: DsModal.CloseTrigger,
|
|
17
|
+
Body: DsModal.Body,
|
|
18
|
+
Footer: DsModal.Footer,
|
|
19
|
+
Actions: DsModal.Actions,
|
|
20
|
+
});
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
example: figma.code`const [value, setValue] = useState<Date | null>(null);
|
|
14
14
|
|
|
15
15
|
<DsDatePicker value={value} onChange={setValue} withTime placeholder="mm/dd/yyyy, hh:mm AM/PM" />`,
|
|
16
|
-
imports: ["import {
|
|
16
|
+
imports: ["import { DsDatePicker } from '@drivenets/design-system';", "import { useState } from 'react';"],
|
|
17
17
|
id: 'ds-date-picker',
|
|
18
18
|
metadata: { nestable: true, props: { fcMember: 'DatePicker', fcProps: '' } },
|
|
19
|
-
};
|
|
19
|
+
} satisfies figma.Template;
|
|
@@ -13,7 +13,7 @@ const orientation =
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
example: figma.code`<DsDivider orientation="${orientation}" />`,
|
|
16
|
-
imports: ["import { DsDivider } from '@drivenets/design-system'"],
|
|
16
|
+
imports: ["import { DsDivider } from '@drivenets/design-system';"],
|
|
17
17
|
id: 'ds-divider',
|
|
18
18
|
metadata: { nestable: true },
|
|
19
|
-
};
|
|
19
|
+
} satisfies figma.Template;
|
|
@@ -9,7 +9,7 @@ import { DsTypography } from '../ds-typography';
|
|
|
9
9
|
import { useArkDialogBodyLockCleanup } from '../../utils/use-ark-dialog-body-lock-cleanup';
|
|
10
10
|
import { useResponsiveValue } from '../../utils/responsive';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const DsDrawerRoot = ({
|
|
13
13
|
open,
|
|
14
14
|
onOpenChange,
|
|
15
15
|
onOpenAutoFocus,
|
|
@@ -178,14 +178,15 @@ Body.displayName = 'DsDrawer.Body';
|
|
|
178
178
|
Footer.displayName = 'DsDrawer.Footer';
|
|
179
179
|
Actions.displayName = 'DsDrawer.Actions';
|
|
180
180
|
|
|
181
|
-
DsDrawer
|
|
182
|
-
DsDrawer
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
181
|
+
const DsDrawer = Object.assign(DsDrawerRoot, {
|
|
182
|
+
displayName: 'DsDrawer',
|
|
183
|
+
Header,
|
|
184
|
+
Title,
|
|
185
|
+
CloseTrigger,
|
|
186
|
+
Toolbar,
|
|
187
|
+
Body,
|
|
188
|
+
Footer,
|
|
189
|
+
Actions,
|
|
190
|
+
});
|
|
190
191
|
|
|
191
192
|
export default DsDrawer;
|
|
@@ -9,7 +9,7 @@ const content = instance.getSlot('Drawer content slot');
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
example: figma.code`<DsDrawer.Body>${content}</DsDrawer.Body>`,
|
|
12
|
-
imports: ["import { DsDrawer } from '@drivenets/design-system'"],
|
|
12
|
+
imports: ["import { DsDrawer } from '@drivenets/design-system';"],
|
|
13
13
|
id: 'ds-drawer-content',
|
|
14
14
|
metadata: { nestable: true },
|
|
15
|
-
};
|
|
15
|
+
} satisfies figma.Template;
|
|
@@ -13,7 +13,7 @@ if (button.type === 'INSTANCE') {
|
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
example: figma.code`<DsDrawer.Footer><DsDrawer.Actions>${buttonCode}</DsDrawer.Actions></DsDrawer.Footer>`,
|
|
16
|
-
imports: ["import { DsDrawer } from '@drivenets/design-system'"],
|
|
16
|
+
imports: ["import { DsDrawer } from '@drivenets/design-system';"],
|
|
17
17
|
id: 'ds-drawer-footer',
|
|
18
18
|
metadata: { nestable: true },
|
|
19
|
-
};
|
|
19
|
+
} satisfies figma.Template;
|
|
@@ -10,7 +10,7 @@ const title = titleNode.type === 'TEXT' ? titleNode.textContent : 'Drawer title'
|
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
example: figma.code`<DsDrawer.Header><DsDrawer.Title>${title}</DsDrawer.Title><DsDrawer.CloseTrigger /></DsDrawer.Header>`,
|
|
13
|
-
imports: ["import { DsDrawer } from '@drivenets/design-system'"],
|
|
13
|
+
imports: ["import { DsDrawer } from '@drivenets/design-system';"],
|
|
14
14
|
id: 'ds-drawer-header',
|
|
15
15
|
metadata: { nestable: true },
|
|
16
|
-
};
|
|
16
|
+
} satisfies figma.Template;
|
|
@@ -30,7 +30,7 @@ if (footer.type === 'INSTANCE') {
|
|
|
30
30
|
|
|
31
31
|
export default {
|
|
32
32
|
example: figma.code`<DsDrawer open columns={4} onOpenChange={() => {}}>${headerCode}${contentCode}${footerCode}</DsDrawer>`,
|
|
33
|
-
imports: ["import { DsDrawer } from '@drivenets/design-system'"],
|
|
33
|
+
imports: ["import { DsDrawer } from '@drivenets/design-system';"],
|
|
34
34
|
id: 'ds-drawer',
|
|
35
35
|
metadata: { nestable: false },
|
|
36
|
-
};
|
|
36
|
+
} satisfies figma.Template;
|
|
@@ -5,7 +5,7 @@ import figma from 'figma';
|
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
example: figma.code`<DsDropdownMenu.Actions>{/* action buttons */}</DsDropdownMenu.Actions>`,
|
|
8
|
-
imports: ["import { DsDropdownMenu } from '@drivenets/design-system'"],
|
|
8
|
+
imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
|
|
9
9
|
id: 'ds-dropdown-menu-footer',
|
|
10
10
|
metadata: { nestable: true },
|
|
11
|
-
};
|
|
11
|
+
} satisfies figma.Template;
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
<DsDropdownMenu.ItemGroupLabel>${label}</DsDropdownMenu.ItemGroupLabel>
|
|
18
18
|
<DsDropdownMenu.ItemGroupContent>{/* group items */}</DsDropdownMenu.ItemGroupContent>
|
|
19
19
|
</DsDropdownMenu.ItemGroup>`,
|
|
20
|
-
imports: ["import { DsDropdownMenu } from '@drivenets/design-system'"],
|
|
20
|
+
imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
|
|
21
21
|
id: 'ds-dropdown-menu-group',
|
|
22
22
|
metadata: { nestable: true },
|
|
23
|
-
};
|
|
23
|
+
} satisfies figma.Template;
|
|
@@ -23,7 +23,7 @@ const indicator = type === 'checkbox' || type === 'radio' ? '<DsDropdownMenu.Ite
|
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
25
|
example: figma.code`<DsDropdownMenu.Item value="item"${variantAttr}${selectedAttr}>${label}${indicator}</DsDropdownMenu.Item>`,
|
|
26
|
-
imports: ["import { DsDropdownMenu } from '@drivenets/design-system'"],
|
|
26
|
+
imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
|
|
27
27
|
id: 'ds-dropdown-menu-item',
|
|
28
28
|
metadata: { nestable: true },
|
|
29
|
-
};
|
|
29
|
+
} satisfies figma.Template;
|
|
@@ -5,7 +5,7 @@ import figma from 'figma';
|
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
example: figma.code`<DsDropdownMenu.Separator />`,
|
|
8
|
-
imports: ["import { DsDropdownMenu } from '@drivenets/design-system'"],
|
|
8
|
+
imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
|
|
9
9
|
id: 'ds-dropdown-menu-separator',
|
|
10
10
|
metadata: { nestable: true },
|
|
11
|
-
};
|
|
11
|
+
} satisfies figma.Template;
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
<DsDropdownMenu.Trigger>{/* trigger element */}</DsDropdownMenu.Trigger>
|
|
19
19
|
<DsDropdownMenu.Content>${items}${footerCode}</DsDropdownMenu.Content>
|
|
20
20
|
</DsDropdownMenu.Root>`,
|
|
21
|
-
imports: ["import { DsDropdownMenu } from '@drivenets/design-system'"],
|
|
21
|
+
imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
|
|
22
22
|
id: 'ds-dropdown-menu',
|
|
23
23
|
metadata: { nestable: false },
|
|
24
|
-
};
|
|
24
|
+
} satisfies figma.Template;
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
example: isExpandable
|
|
19
19
|
? figma.code`<DsExpandableTextInput icon="search" />`
|
|
20
20
|
: figma.code`<DsAutocomplete options={[]} showTrigger={false} />`,
|
|
21
|
-
imports: [`import { ${component} } from '@drivenets/design-system'
|
|
21
|
+
imports: [`import { ${component} } from '@drivenets/design-system';`],
|
|
22
22
|
id: 'ds-expandable-text-input',
|
|
23
23
|
metadata: { nestable: true },
|
|
24
|
-
};
|
|
24
|
+
} satisfies figma.Template;
|
|
@@ -23,7 +23,7 @@ const attrs = [
|
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
25
|
example: figma.code`<DsFileUpload ${attrs} />`,
|
|
26
|
-
imports: ["import { DsFileUpload } from '@drivenets/design-system'"],
|
|
26
|
+
imports: ["import { DsFileUpload } from '@drivenets/design-system';"],
|
|
27
27
|
id: 'ds-file-upload',
|
|
28
28
|
metadata: { nestable: false },
|
|
29
|
-
};
|
|
29
|
+
} satisfies figma.Template;
|
|
@@ -16,7 +16,7 @@ const activeProp = active ? '' : ' active={false}';
|
|
|
16
16
|
|
|
17
17
|
export default {
|
|
18
18
|
example: figma.code`<DsFilterStatusIcon status="${status}"${activeProp} />`,
|
|
19
|
-
imports: ["import { DsFilterStatusIcon } from '@drivenets/design-system'"],
|
|
19
|
+
imports: ["import { DsFilterStatusIcon } from '@drivenets/design-system';"],
|
|
20
20
|
id: 'ds-filter-status-icon',
|
|
21
21
|
metadata: { nestable: true },
|
|
22
|
-
};
|
|
22
|
+
} satisfies figma.Template;
|
|
@@ -70,7 +70,7 @@ const formControlAttrs = [labelAttr, requiredAttr, hideLabelAttr, statusAttr, me
|
|
|
70
70
|
|
|
71
71
|
export default {
|
|
72
72
|
example: figma.code`<DsFormControl ${formControlAttrs}>${description}${child}</DsFormControl>`,
|
|
73
|
-
imports: ["import { DsFormControl } from '@drivenets/design-system'"],
|
|
73
|
+
imports: ["import { DsFormControl } from '@drivenets/design-system';"],
|
|
74
74
|
id: 'ds-form-control',
|
|
75
75
|
metadata: { nestable: false },
|
|
76
|
-
};
|
|
76
|
+
} satisfies figma.Template;
|
|
@@ -41,7 +41,7 @@ const DsFormControlDescription: React.FC<DsFormControlDescriptionProps> = ({ chi
|
|
|
41
41
|
return <div className={classNames(styles.description, className)}>{children}</div>;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
const DsFormControlRoot = ({
|
|
45
45
|
id,
|
|
46
46
|
status,
|
|
47
47
|
label,
|
|
@@ -96,18 +96,20 @@ const DsFormControl = ({
|
|
|
96
96
|
);
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
DsFormControl.NumberInput = controlify(DsNumberInput);
|
|
101
|
-
DsFormControl.PasswordInput = controlify(DsPasswordInput);
|
|
102
|
-
/** @deprecated DsDateInput is deprecated. Use DsDatePicker or DsDateRangePicker instead. */
|
|
103
|
-
DsFormControl.DateInput = controlify(DsDateInput);
|
|
104
|
-
DsFormControl.DatePicker = controlify(DsDatePicker);
|
|
105
|
-
DsFormControl.TimePicker = controlify(DsTimePicker);
|
|
106
|
-
DsFormControl.Textarea = controlify(DsTextarea);
|
|
107
|
-
DsFormControl.Select = controlify(DsSelect);
|
|
108
|
-
DsFormControl.Description = DsFormControlDescription;
|
|
99
|
+
DsFormControlDescription.displayName = 'DsFormControl.Description';
|
|
109
100
|
|
|
110
|
-
DsFormControl
|
|
111
|
-
|
|
101
|
+
const DsFormControl = Object.assign(DsFormControlRoot, {
|
|
102
|
+
displayName: 'DsFormControl',
|
|
103
|
+
TextInput: controlify(DsTextInput),
|
|
104
|
+
NumberInput: controlify(DsNumberInput),
|
|
105
|
+
PasswordInput: controlify(DsPasswordInput),
|
|
106
|
+
/** @deprecated DsDateInput is deprecated. Use DsDatePicker or DsDateRangePicker instead. */
|
|
107
|
+
DateInput: controlify(DsDateInput),
|
|
108
|
+
DatePicker: controlify(DsDatePicker),
|
|
109
|
+
TimePicker: controlify(DsTimePicker),
|
|
110
|
+
Textarea: controlify(DsTextarea),
|
|
111
|
+
Select: controlify(DsSelect),
|
|
112
|
+
Description: DsFormControlDescription,
|
|
113
|
+
});
|
|
112
114
|
|
|
113
115
|
export default DsFormControl;
|
|
@@ -4,7 +4,7 @@ const batch = figma.batch as { icon: string; filled: boolean; id: string };
|
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
example: figma.code`<DsIcon icon="${batch.icon}"${batch.filled ? ' filled' : ''} />`,
|
|
7
|
-
imports: ["import { DsIcon } from '@drivenets/design-system'"],
|
|
7
|
+
imports: ["import { DsIcon } from '@drivenets/design-system';"],
|
|
8
8
|
id: batch.id,
|
|
9
9
|
metadata: { nestable: true, props: { icon: batch.icon } },
|
|
10
10
|
};
|