@drivenets/design-system 0.16.0 → 0.18.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 +31 -0
- package/dist/index.cjs +1893 -824
- package/dist/index.d.cts +363 -247
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +363 -247
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1896 -829
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/package.json +25 -25
- package/src/components/ds-alert-banner/ds-alert-banner-global.figma.ts +49 -0
- package/src/components/ds-alert-banner/ds-alert-banner.figma.ts +51 -0
- 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-autocomplete/ds-autocomplete.module.scss +15 -4
- package/src/components/ds-autocomplete/ds-autocomplete.tsx +10 -3
- package/src/components/ds-autocomplete/ds-autocomplete.types.ts +8 -0
- 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 +7 -5
- package/src/components/ds-button-v3/ds-button-v3.module.scss +84 -17
- package/src/components/ds-button-v3/ds-button-v3.tsx +2 -0
- package/src/components/ds-button-v3/ds-button-v3.types.ts +11 -2
- package/src/components/ds-button-v3/ds-button-v4.figma.ts +121 -0
- 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-comment-bubble/ds-comment-bubble.figma.ts +52 -0
- package/src/components/ds-comment-card/ds-comment-card.figma.ts +36 -0
- package/src/components/ds-comment-indicator/ds-comment-indicator.figma.ts +32 -0
- package/src/components/ds-comments-drawer/components/comments-filter-modal/index.ts +0 -1
- package/src/components/ds-comments-drawer/ds-comments-drawer.figma.ts +19 -0
- 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 +4 -3
- package/src/components/ds-select/ds-select.tsx +6 -1
- package/src/components/ds-select/ds-select.types.ts +2 -1
- package/src/components/ds-site-node/ds-site-node.figma.ts +2 -2
- package/src/components/ds-slider/ds-slider.figma.ts +29 -0
- package/src/components/ds-slider/ds-slider.module.scss +104 -0
- package/src/components/ds-slider/ds-slider.tsx +118 -0
- package/src/components/ds-slider/ds-slider.types.ts +102 -0
- package/src/components/ds-slider/ds-slider.utils.ts +14 -0
- package/src/components/ds-slider/index.ts +11 -0
- package/src/components/ds-smart-tabs/ds-smart-tabs.tsx +5 -4
- package/src/components/ds-smart-tabs/figma/ds-smart-tabs-tab.figma.ts +83 -0
- package/src/components/ds-smart-tabs/figma/ds-smart-tabs.figma.ts +23 -0
- 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/ds-table-group-header-cell.module.scss +5 -1
- package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx +15 -3
- 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 +17 -3
- package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +30 -9
- package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.module.scss +23 -0
- package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.tsx +218 -0
- package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.types.ts +14 -0
- package/src/components/ds-table/components/ds-table-resize-handle/index.ts +1 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.module.scss +18 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.tsx +16 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.types.ts +13 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/index.ts +1 -0
- package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +1 -1
- package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +9 -2
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +2 -1
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +9 -2
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx +2 -2
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx +2 -1
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx +2 -1
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx +2 -1
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx +2 -1
- package/src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx +12 -3
- package/src/components/ds-table/context/ds-table-context.tsx +208 -0
- package/src/components/ds-table/ds-table-defaults.ts +42 -0
- package/src/components/ds-table/ds-table.module.scss +19 -1
- package/src/components/ds-table/ds-table.tsx +163 -235
- package/src/components/ds-table/ds-table.types.ts +59 -47
- 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-table/grouping/utils/column-group.ts +7 -5
- package/src/components/ds-table/hooks/use-cell-editor.ts +5 -1
- package/src/components/ds-table/hooks/use-column-resize.ts +385 -0
- package/src/components/ds-table/hooks/use-editing-state.ts +190 -0
- package/src/components/ds-table/index.ts +1 -0
- package/src/components/ds-table/styles/_variables.scss +2 -1
- package/src/components/ds-table/utils/column-size-meta.augmentation.ts +16 -0
- package/src/components/ds-table/utils/column-size.ts +213 -10
- package/src/components/ds-table/utils/column-size.unit.test.ts +213 -0
- package/src/components/ds-table/utils/constants.ts +28 -0
- package/src/components/ds-table/utils/frozen-body.ts +33 -0
- package/src/components/ds-table/utils/frozen-body.unit.test.ts +44 -0
- package/src/components/ds-table/utils/table-api.ts +42 -0
- package/src/components/ds-table/utils/table-api.unit.test.ts +82 -0
- package/src/components/ds-table/utils/table-columns.tsx +119 -0
- package/src/components/ds-table/utils/table-columns.unit.test.ts +199 -0
- 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-tag/ds-tag.figma.ts +51 -0
- package/src/components/ds-tag-filter/ds-tag-filter.figma.ts +16 -0
- package/src/components/ds-text-input/ds-input-field-v02.figma.ts +31 -6
- package/src/components/ds-text-input/ds-text-input.figma.ts +5 -4
- package/src/components/ds-text-input/ds-text-input.tsx +1 -0
- package/src/components/ds-text-input/ds-text-input.types.ts +1 -1
- 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.figma.ts +54 -0
- 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.figma.ts +99 -0
- package/src/components/ds-workspace-layout/ds-workspace-layout.module.scss +1 -8
- package/src/components/ds-workspace-layout/ds-workspace-layout.tsx +11 -10
- package/src/index.ts +1 -0
- package/src/styles/_gradients.scss +19 -0
- package/src/styles/_root.scss +39 -15
- package/src/styles/_typography.scss +1 -0
- package/src/styles/shared/_input.scss +10 -0
- package/src/styles/styles.scss +1 -0
- package/src/components/ds-table/context/ds-table-context.ts +0 -112
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=39666-40247
|
|
2
|
+
// source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-button-v3
|
|
3
|
+
// component=DsButtonV3
|
|
4
|
+
import figma from 'figma';
|
|
5
|
+
|
|
6
|
+
// Figma ships several button generations; the `DsButtonV4` component set maps onto the
|
|
7
|
+
// same code component as `DsButtonV3` (see ds-button-v3.figma.ts for the older set).
|
|
8
|
+
const instance = figma.selectedInstance;
|
|
9
|
+
|
|
10
|
+
const variant = instance.getEnum('variant', {
|
|
11
|
+
primary: 'primary',
|
|
12
|
+
'primary-subtle': 'primary-subtle',
|
|
13
|
+
secondary: 'secondary',
|
|
14
|
+
tertiary: 'tertiary',
|
|
15
|
+
});
|
|
16
|
+
const color = instance.getEnum('color', {
|
|
17
|
+
default: 'default',
|
|
18
|
+
error: 'error',
|
|
19
|
+
light: 'light',
|
|
20
|
+
});
|
|
21
|
+
const state = instance.getEnum('state', {
|
|
22
|
+
default: 'default',
|
|
23
|
+
hover: 'hover',
|
|
24
|
+
focus: 'focus',
|
|
25
|
+
active: 'active',
|
|
26
|
+
disabled: 'disabled',
|
|
27
|
+
isLoading: 'isLoading',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const disabled = state === 'disabled';
|
|
31
|
+
const loading = state === 'isLoading';
|
|
32
|
+
|
|
33
|
+
const structure = instance.findInstance('Part_ButtonStructureV2', { traverseInstances: true });
|
|
34
|
+
|
|
35
|
+
const size =
|
|
36
|
+
structure.type === 'INSTANCE'
|
|
37
|
+
? (structure.getEnum('size', {
|
|
38
|
+
large: 'large',
|
|
39
|
+
medium: 'medium',
|
|
40
|
+
small: 'small',
|
|
41
|
+
tiny: 'tiny',
|
|
42
|
+
}) ?? 'medium')
|
|
43
|
+
: 'medium';
|
|
44
|
+
|
|
45
|
+
const iconOnly =
|
|
46
|
+
structure.type === 'INSTANCE' ? structure.getEnum('icon-only', { True: true, False: false }) : false;
|
|
47
|
+
|
|
48
|
+
const highEmphasis =
|
|
49
|
+
structure.type === 'INSTANCE' ? structure.getEnum('high-emphasis', { true: true, false: false }) : false;
|
|
50
|
+
|
|
51
|
+
const showIcon = structure.type === 'INSTANCE' ? structure.getBoolean('isIconBefore') : false;
|
|
52
|
+
|
|
53
|
+
// `DsButtonV3.icon` is an icon-name string. Swapped icons keep the placeholder layer
|
|
54
|
+
// name (e.g. `DAP_GM_O_check_circle`), so resolve via Code Connect ID or metadata.
|
|
55
|
+
const toIconName = (name: string): string =>
|
|
56
|
+
name
|
|
57
|
+
.replace(/^DAP_DAP_/, 'DAP_')
|
|
58
|
+
.replace(/^DAP_GM_[OS]_/, '')
|
|
59
|
+
.replace(/^DAP_outline_icon\//, '')
|
|
60
|
+
.replace(/^DAP_/, '')
|
|
61
|
+
.replace(/^\/+/, '')
|
|
62
|
+
.replace(/[\s/]+/g, '_')
|
|
63
|
+
.toLowerCase();
|
|
64
|
+
|
|
65
|
+
const iconNameFromCodeConnectId = (id: string | null): string | undefined => {
|
|
66
|
+
if (!id) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
if (id.startsWith('ds-icon-o-')) {
|
|
70
|
+
return id.slice('ds-icon-o-'.length);
|
|
71
|
+
}
|
|
72
|
+
if (id.startsWith('ds-icon-s-')) {
|
|
73
|
+
return id.slice('ds-icon-s-'.length);
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const resolveIcon = (iconInstance: figma.InstanceHandle): string | undefined => {
|
|
79
|
+
const fromCcId = iconNameFromCodeConnectId(iconInstance.codeConnectId());
|
|
80
|
+
if (fromCcId) {
|
|
81
|
+
return fromCcId;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const iconFromMetadata = iconInstance.executeTemplate().metadata?.props?.icon;
|
|
85
|
+
if (typeof iconFromMetadata === 'string') {
|
|
86
|
+
return iconFromMetadata;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return toIconName(iconInstance.name);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const leadingIcon = structure.type === 'INSTANCE' ? structure.getInstanceSwap('iconBefore') : undefined;
|
|
93
|
+
const iconFromSwap = leadingIcon?.type === 'INSTANCE' ? resolveIcon(leadingIcon) : undefined;
|
|
94
|
+
const iconFromChild =
|
|
95
|
+
structure.type === 'INSTANCE'
|
|
96
|
+
? structure
|
|
97
|
+
.findConnectedInstances((node) => node.codeConnectId()?.startsWith('ds-icon-') ?? false, {
|
|
98
|
+
traverseInstances: true,
|
|
99
|
+
})
|
|
100
|
+
.find((node): node is figma.InstanceHandle => node.type === 'INSTANCE')
|
|
101
|
+
: undefined;
|
|
102
|
+
const icon = iconFromSwap ?? (iconFromChild ? resolveIcon(iconFromChild) : undefined);
|
|
103
|
+
|
|
104
|
+
const labelNode = instance.findText('Button', { traverseInstances: true });
|
|
105
|
+
const label = labelNode.type === 'TEXT' ? labelNode.textContent : 'Button';
|
|
106
|
+
|
|
107
|
+
const iconProp = icon ? figma.code` icon="${icon}"` : '';
|
|
108
|
+
const disabledProp = disabled ? ' disabled' : '';
|
|
109
|
+
const loadingProp = loading ? ' loading' : '';
|
|
110
|
+
const highEmphasisProp = highEmphasis ? ' highEmphasis' : '';
|
|
111
|
+
|
|
112
|
+
export default {
|
|
113
|
+
example: iconOnly
|
|
114
|
+
? figma.code`<DsButtonV3 variant="${variant}" color="${color}" size="${size}"${disabledProp}${loadingProp}${highEmphasisProp}${iconProp} aria-label="${label}" />`
|
|
115
|
+
: showIcon && icon
|
|
116
|
+
? figma.code`<DsButtonV3 variant="${variant}" color="${color}" size="${size}"${disabledProp}${loadingProp}${highEmphasisProp} icon="${icon}">${label}</DsButtonV3>`
|
|
117
|
+
: figma.code`<DsButtonV3 variant="${variant}" color="${color}" size="${size}"${disabledProp}${loadingProp}${highEmphasisProp}>${label}</DsButtonV3>`,
|
|
118
|
+
imports: ["import { DsButtonV3 } from '@drivenets/design-system';"],
|
|
119
|
+
id: 'ds-button-v4',
|
|
120
|
+
metadata: { nestable: true },
|
|
121
|
+
} 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;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=18638-7430
|
|
2
|
+
// source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-comment-bubble
|
|
3
|
+
// component=DsCommentBubble
|
|
4
|
+
//
|
|
5
|
+
// `DsCommentBubbleV1` is the floating comment bubble. Its Figma `type` axis
|
|
6
|
+
// (`initial` / `start typing` vs `open`) selects between the empty compose state and
|
|
7
|
+
// a thread; in code this is driven by whether the `comment` prop is present, so the
|
|
8
|
+
// snippet emits `comment` / `currentUser` identifier placeholders for the developer to
|
|
9
|
+
// wire to state. The `action required` axis maps to `hideActionRequired` (the
|
|
10
|
+
// `no checkbox` variant hides the control); `State` is visual only and has no prop.
|
|
11
|
+
import figma from 'figma';
|
|
12
|
+
|
|
13
|
+
const instance = figma.selectedInstance;
|
|
14
|
+
|
|
15
|
+
const bubbleType =
|
|
16
|
+
instance.getEnum('type', {
|
|
17
|
+
initial: 'compose',
|
|
18
|
+
'start typing': 'compose',
|
|
19
|
+
open: 'thread',
|
|
20
|
+
}) ?? 'compose';
|
|
21
|
+
|
|
22
|
+
const hideActionRequired =
|
|
23
|
+
instance.getEnum('action required', {
|
|
24
|
+
'no checkbox': true,
|
|
25
|
+
false: false,
|
|
26
|
+
true: false,
|
|
27
|
+
}) ?? false;
|
|
28
|
+
|
|
29
|
+
const hideActionRequiredAttr = hideActionRequired ? '\n\thideActionRequired' : '';
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
example:
|
|
33
|
+
bubbleType === 'thread'
|
|
34
|
+
? figma.code`<DsCommentBubble
|
|
35
|
+
comment={comment}
|
|
36
|
+
currentUser={currentUser}
|
|
37
|
+
value={value}
|
|
38
|
+
onValueChange={setValue}
|
|
39
|
+
onSend={handleSend}
|
|
40
|
+
onClose={handleClose}${hideActionRequiredAttr}
|
|
41
|
+
/>`
|
|
42
|
+
: figma.code`<DsCommentBubble
|
|
43
|
+
currentUser={currentUser}
|
|
44
|
+
value={value}
|
|
45
|
+
onValueChange={setValue}
|
|
46
|
+
onSend={handleSend}
|
|
47
|
+
onClose={handleClose}${hideActionRequiredAttr}
|
|
48
|
+
/>`,
|
|
49
|
+
imports: ["import { DsCommentBubble } from '@drivenets/design-system';"],
|
|
50
|
+
id: 'ds-comment-bubble',
|
|
51
|
+
metadata: { nestable: true },
|
|
52
|
+
} satisfies figma.Template;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=18166-58292
|
|
2
|
+
// source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-comment-card
|
|
3
|
+
// component=DsCommentCard
|
|
4
|
+
//
|
|
5
|
+
// `DsCommentCardV1` composes the inner `Structure_CommentCardV1`. Its `overflow` axis
|
|
6
|
+
// maps directly to the `overflow` prop. The `type` axis is interaction state
|
|
7
|
+
// (default/hover are visual and CSS-driven — only `disabled` maps to a prop),
|
|
8
|
+
// mirroring `ds-card.figma.ts`. The `action required` axis is encoded in the `comment`
|
|
9
|
+
// data (`isActionRequired`), not a prop. `comment` is a data object that is not
|
|
10
|
+
// derivable from Figma, so it is emitted as an identifier placeholder for the
|
|
11
|
+
// developer to wire (see `ds-smart-tabs.figma.ts`).
|
|
12
|
+
import figma from 'figma';
|
|
13
|
+
|
|
14
|
+
const instance = figma.selectedInstance;
|
|
15
|
+
|
|
16
|
+
const state =
|
|
17
|
+
instance.getEnum('type', {
|
|
18
|
+
default: 'default',
|
|
19
|
+
hover: 'default',
|
|
20
|
+
disabled: 'disabled',
|
|
21
|
+
}) ?? 'default';
|
|
22
|
+
|
|
23
|
+
const overflow =
|
|
24
|
+
instance.getEnum('overflow', {
|
|
25
|
+
hidden: 'hidden',
|
|
26
|
+
displayed: 'displayed',
|
|
27
|
+
}) ?? 'hidden';
|
|
28
|
+
|
|
29
|
+
const disabledAttr = state === 'disabled' ? ' disabled' : '';
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
example: figma.code`<DsCommentCard comment={comment} overflow="${overflow}"${disabledAttr} />`,
|
|
33
|
+
imports: ["import { DsCommentCard } from '@drivenets/design-system';"],
|
|
34
|
+
id: 'ds-comment-card',
|
|
35
|
+
metadata: { nestable: true },
|
|
36
|
+
} satisfies figma.Template;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=19208-6889
|
|
2
|
+
// source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-comment-indicator
|
|
3
|
+
// component=DsCommentIndicator
|
|
4
|
+
//
|
|
5
|
+
// The linked node is `Structure_CommentIndicatorV1`, the inner structure shared by the
|
|
6
|
+
// indicator variants. The `type` axis (placeholder / default / action-required) maps
|
|
7
|
+
// directly to the `type` prop; on the bare structure node it has no value, so it falls
|
|
8
|
+
// back to `default`. For the `placeholder` state no avatar is shown; the `default` /
|
|
9
|
+
// `action-required` states carry the initiator's avatar. `avatarSrc` is a photo URL
|
|
10
|
+
// and `avatarName` is content — neither is derivable from Figma — so `avatarName` is
|
|
11
|
+
// emitted as a placeholder for the developer to fill in (see `ds-avatar.figma.ts`).
|
|
12
|
+
import figma from 'figma';
|
|
13
|
+
|
|
14
|
+
const instance = figma.selectedInstance;
|
|
15
|
+
|
|
16
|
+
const type =
|
|
17
|
+
instance.getEnum('type', {
|
|
18
|
+
placeholder: 'placeholder',
|
|
19
|
+
default: 'default',
|
|
20
|
+
'action-required': 'action-required',
|
|
21
|
+
'action required': 'action-required',
|
|
22
|
+
}) ?? 'default';
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
example:
|
|
26
|
+
type === 'placeholder'
|
|
27
|
+
? figma.code`<DsCommentIndicator type="placeholder" onClick={() => {}} />`
|
|
28
|
+
: figma.code`<DsCommentIndicator type="${type}" avatarName="Full Name" onClick={() => {}} />`,
|
|
29
|
+
imports: ["import { DsCommentIndicator } from '@drivenets/design-system';"],
|
|
30
|
+
id: 'ds-comment-indicator',
|
|
31
|
+
metadata: { nestable: true },
|
|
32
|
+
} satisfies figma.Template;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=19346-10511
|
|
2
|
+
// source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-comments-drawer
|
|
3
|
+
// component=DsCommentsDrawer
|
|
4
|
+
//
|
|
5
|
+
// `DsCommentsDrawerV1` is the comments side panel. Unlike `ds-drawer` / `ds-modal` it
|
|
6
|
+
// does not compose its children through slots: the toolbar, search, and the comment
|
|
7
|
+
// list are all internal, and the cards are rendered from the `comments` data array.
|
|
8
|
+
// There is therefore nothing to resolve via `executeTemplate` — the snippet emits
|
|
9
|
+
// `comments` / `onOpenChange` identifier placeholders for the developer to wire to
|
|
10
|
+
// state. The Figma `Type` axis (`Default` / `Regular`) has no `DsCommentsDrawer` prop
|
|
11
|
+
// equivalent — both render the same composition.
|
|
12
|
+
import figma from 'figma';
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
example: figma.code`<DsCommentsDrawer open comments={comments} onOpenChange={() => {}} />`,
|
|
16
|
+
imports: ["import { DsCommentsDrawer } from '@drivenets/design-system';"],
|
|
17
|
+
id: 'ds-comments-drawer',
|
|
18
|
+
metadata: { nestable: false },
|
|
19
|
+
} 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;
|