@drivenets/design-system 0.18.1 → 0.20.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.
Files changed (216) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/index.cjs +17038 -10114
  3. package/dist/index.d.cts +1355 -444
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +1354 -443
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +17073 -10172
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +41 -41
  11. package/src/components/ds-bot-button/ds-bot-button.figma.ts +38 -0
  12. package/src/components/ds-bot-button/ds-bot-button.module.scss +41 -0
  13. package/src/components/ds-bot-button/ds-bot-button.tsx +48 -0
  14. package/src/components/ds-bot-button/ds-bot-button.types.ts +33 -0
  15. package/src/components/ds-bot-button/index.ts +2 -0
  16. package/src/components/ds-bot-button/net-gen-logo.tsx +46 -0
  17. package/src/components/ds-bulk-actions/components/action-button.tsx +42 -0
  18. package/src/components/ds-bulk-actions/components/menu-entries.tsx +76 -0
  19. package/src/components/ds-bulk-actions/components/overflow.tsx +75 -0
  20. package/src/components/ds-bulk-actions/ds-bulk-actions.figma.ts +28 -0
  21. package/src/components/ds-bulk-actions/ds-bulk-actions.module.scss +199 -0
  22. package/src/components/ds-bulk-actions/ds-bulk-actions.tsx +220 -0
  23. package/src/components/ds-bulk-actions/ds-bulk-actions.types.ts +170 -0
  24. package/src/components/ds-bulk-actions/ds-bulk-actions.unit.test.ts +195 -0
  25. package/src/components/ds-bulk-actions/ds-bulk-actions.utils.ts +91 -0
  26. package/src/components/ds-bulk-actions/ds-bulk-actions.utils.unit.test.ts +134 -0
  27. package/src/components/ds-bulk-actions/hooks/compute-bulk-actions-overflow.ts +85 -0
  28. package/src/components/ds-bulk-actions/hooks/use-bulk-actions-overflow.ts +153 -0
  29. package/src/components/ds-bulk-actions/index.ts +18 -0
  30. package/src/components/ds-button-v3/ds-button-v3.module.scss +2 -2
  31. package/src/components/ds-catalog-layout/ds-catalog-layout.figma.ts +1 -1
  32. package/src/components/ds-checkbox/ds-checkbox.figma.ts +3 -0
  33. package/src/components/ds-checkbox/ds-checkbox.module.scss +102 -20
  34. package/src/components/ds-checkbox/ds-checkbox.tsx +30 -2
  35. package/src/components/ds-checkbox/ds-checkbox.types.ts +10 -0
  36. package/src/components/ds-code-input/collapsed-code-field/collapsed-code-field.module.scss +169 -0
  37. package/src/components/ds-code-input/collapsed-code-field/collapsed-code-field.tsx +92 -0
  38. package/src/components/ds-code-input/collapsed-code-field/index.ts +1 -0
  39. package/src/components/ds-code-input/ds-code-input-panel/ds-code-input-panel.module.scss +110 -0
  40. package/src/components/ds-code-input/ds-code-input-panel/ds-code-input-panel.tsx +61 -0
  41. package/src/components/ds-code-input/ds-code-input-panel/index.ts +1 -0
  42. package/src/components/ds-code-input/ds-code-input.module.scss +25 -0
  43. package/src/components/ds-code-input/ds-code-input.tsx +401 -0
  44. package/src/components/ds-code-input/ds-code-input.types.ts +166 -0
  45. package/src/components/ds-code-input/ds-code-input.utils.ts +94 -0
  46. package/src/components/ds-code-input/ds-code-input.utils.unit.test.ts +166 -0
  47. package/src/components/ds-code-input/index.ts +2 -0
  48. package/src/components/ds-code-input/use-collapsed-viewport.ts +289 -0
  49. package/src/components/ds-code-input/use-editor-host.ts +87 -0
  50. package/src/components/ds-dropdown-menu/ds-dropdown-menu.tsx +2 -0
  51. package/src/components/ds-empty-state/ds-empty-state.module.scss +16 -0
  52. package/src/components/ds-empty-state/ds-empty-state.tsx +45 -0
  53. package/src/components/ds-empty-state/ds-empty-state.types.ts +38 -0
  54. package/src/components/ds-empty-state/index.ts +3 -0
  55. package/src/components/ds-file-upload/ds-file-upload.tsx +4 -1
  56. package/src/components/ds-filters-bar/components/ds-filters-bar-builder/ds-filters-bar-builder.ts +11 -0
  57. package/src/components/ds-filters-bar/components/ds-filters-bar-builder/ds-filters-bar-builder.types.ts +41 -0
  58. package/src/components/ds-filters-bar/components/ds-filters-bar-builder/index.ts +1 -0
  59. package/src/components/ds-filters-bar/components/ds-filters-bar-clear-all.ts +11 -0
  60. package/src/components/ds-filters-bar/components/ds-filters-bar-conditions/ds-filters-bar-conditions.ts +11 -0
  61. package/src/components/ds-filters-bar/components/ds-filters-bar-conditions/ds-filters-bar-conditions.types.ts +30 -0
  62. package/src/components/ds-filters-bar/components/ds-filters-bar-conditions/index.ts +1 -0
  63. package/src/components/ds-filters-bar/components/ds-filters-bar-pinned.ts +31 -0
  64. package/src/components/ds-filters-bar/components/ds-filters-bar-query/ds-filters-bar-query.ts +11 -0
  65. package/src/components/ds-filters-bar/components/ds-filters-bar-query/ds-filters-bar-query.types.ts +22 -0
  66. package/src/components/ds-filters-bar/components/ds-filters-bar-query/index.ts +1 -0
  67. package/src/components/ds-filters-bar/components/ds-filters-bar-saved-filters.ts +19 -0
  68. package/src/components/ds-filters-bar/components/ds-filters-bar-search.ts +11 -0
  69. package/src/components/ds-filters-bar/components/ds-filters-bar-summary.ts +11 -0
  70. package/src/components/ds-filters-bar/components/ds-filters-bar-toolbar.ts +11 -0
  71. package/src/components/ds-filters-bar/components/ds-filters-bar-view-switch.ts +11 -0
  72. package/src/components/ds-filters-bar/components/ds-filters-bar-view.ts +11 -0
  73. package/src/components/ds-filters-bar/components/index.ts +11 -0
  74. package/src/components/ds-filters-bar/ds-filters-bar.context.ts +69 -0
  75. package/src/components/ds-filters-bar/ds-filters-bar.tsx +120 -0
  76. package/src/components/ds-filters-bar/ds-filters-bar.types.ts +440 -0
  77. package/src/components/ds-filters-bar/ds-filters-bar.unit.test.ts +216 -0
  78. package/src/components/ds-filters-bar/ds-filters-bar.utils.ts +141 -0
  79. package/src/components/ds-filters-bar/index.ts +1 -0
  80. package/src/components/ds-form-control/ds-form-control.module.scss +18 -0
  81. package/src/components/ds-form-control/ds-form-control.tsx +61 -19
  82. package/src/components/ds-form-control/ds-form-control.types.ts +2 -1
  83. package/src/components/ds-icon/custom-icons/index.ts +2 -0
  84. package/src/components/ds-icon/custom-icons/special-adv-filters.tsx +28 -0
  85. package/src/components/ds-illustration/ds-illustration.figma.ts +34 -0
  86. package/src/components/ds-illustration/ds-illustration.module.scss +6 -0
  87. package/src/components/ds-illustration/ds-illustration.tsx +29 -0
  88. package/src/components/ds-illustration/ds-illustration.types.ts +45 -0
  89. package/src/components/ds-illustration/illustrations/configuration.tsx +51 -0
  90. package/src/components/ds-illustration/illustrations/device.tsx +133 -0
  91. package/src/components/ds-illustration/illustrations/done.tsx +107 -0
  92. package/src/components/{ds-catalog-layout/catalog-layout-empty-illustration.tsx → ds-illustration/illustrations/empty-inbox.tsx} +10 -14
  93. package/src/components/ds-illustration/illustrations/error.tsx +86 -0
  94. package/src/components/ds-illustration/illustrations/go-filter.tsx +51 -0
  95. package/src/components/ds-illustration/illustrations/illustration-clouds.tsx +10 -0
  96. package/src/components/ds-illustration/illustrations/index.ts +39 -0
  97. package/src/components/ds-illustration/illustrations/no-connection.tsx +54 -0
  98. package/src/components/ds-illustration/illustrations/no-credit-card.tsx +48 -0
  99. package/src/components/ds-illustration/illustrations/no-device.tsx +61 -0
  100. package/src/components/ds-illustration/illustrations/no-documents.tsx +52 -0
  101. package/src/components/ds-illustration/illustrations/no-gps.tsx +57 -0
  102. package/src/components/ds-illustration/illustrations/no-images.tsx +82 -0
  103. package/src/components/ds-illustration/illustrations/no-items-cart.tsx +86 -0
  104. package/src/components/ds-illustration/illustrations/no-messages.tsx +51 -0
  105. package/src/components/ds-illustration/illustrations/no-search-result.tsx +76 -0
  106. package/src/components/ds-illustration/illustrations/no-tasks.tsx +61 -0
  107. package/src/components/ds-illustration/illustrations/site.tsx +80 -0
  108. package/src/components/ds-illustration/index.ts +3 -0
  109. package/src/components/ds-main-menu/components/expanded-item/expanded-item.tsx +108 -0
  110. package/src/components/ds-main-menu/components/expanded-item/expanded-item.types.ts +8 -0
  111. package/src/components/ds-main-menu/components/expanded-item/index.ts +1 -0
  112. package/src/components/ds-main-menu/components/menu-graphic/index.ts +1 -0
  113. package/src/components/ds-main-menu/components/menu-graphic/menu-graphic.tsx +16 -0
  114. package/src/components/ds-main-menu/components/menu-graphic/menu-graphic.types.ts +7 -0
  115. package/src/components/ds-main-menu/components/tile-link/index.ts +1 -0
  116. package/src/components/ds-main-menu/components/tile-link/tile-link.tsx +85 -0
  117. package/src/components/ds-main-menu/components/tile-link/tile-link.types.ts +8 -0
  118. package/src/components/ds-main-menu/components/utility-link/index.ts +1 -0
  119. package/src/components/ds-main-menu/components/utility-link/utility-link.tsx +37 -0
  120. package/src/components/ds-main-menu/components/utility-link/utility-link.types.ts +7 -0
  121. package/src/components/ds-main-menu/ds-main-menu.figma.ts +17 -0
  122. package/src/components/ds-main-menu/ds-main-menu.module.scss +349 -0
  123. package/src/components/ds-main-menu/ds-main-menu.tsx +102 -0
  124. package/src/components/ds-main-menu/ds-main-menu.types.ts +86 -0
  125. package/src/components/ds-main-menu/ds-main-menu.utils.ts +40 -0
  126. package/src/components/ds-main-menu/index.ts +9 -0
  127. package/src/components/ds-modal/figma/ds-modal-footer.figma.ts +1 -1
  128. package/src/components/ds-pin-toggle/ds-pin-toggle.figma.ts +27 -0
  129. package/src/components/ds-pin-toggle/ds-pin-toggle.module.scss +41 -0
  130. package/src/components/ds-pin-toggle/ds-pin-toggle.tsx +43 -0
  131. package/src/components/ds-pin-toggle/ds-pin-toggle.types.ts +29 -0
  132. package/src/components/ds-pin-toggle/index.ts +2 -0
  133. package/src/components/ds-popover/components/popover-trigger/index.ts +1 -0
  134. package/src/components/ds-popover/components/popover-trigger/popover-trigger.tsx +15 -0
  135. package/src/components/ds-popover/ds-popover.context.ts +18 -0
  136. package/src/components/ds-popover/ds-popover.hover-intent.ts +65 -0
  137. package/src/components/ds-popover/ds-popover.tsx +164 -41
  138. package/src/components/ds-popover/ds-popover.types.ts +65 -0
  139. package/src/components/ds-popover/ds-popover.utils.ts +60 -0
  140. package/src/components/ds-popover/ds-popover.utils.unit.test.ts +25 -0
  141. package/src/components/ds-saved-filters/components/ds-saved-filters-delete-confirm.tsx +53 -0
  142. package/src/components/ds-saved-filters/components/ds-saved-filters-name-entry.tsx +64 -0
  143. package/src/components/ds-saved-filters/components/ds-saved-filters-name-modal.tsx +50 -0
  144. package/src/components/ds-saved-filters/components/ds-saved-filters-row/ds-saved-filters-row.module.scss +68 -0
  145. package/src/components/ds-saved-filters/components/ds-saved-filters-row/ds-saved-filters-row.tsx +83 -0
  146. package/src/components/ds-saved-filters/components/ds-saved-filters-row/index.ts +1 -0
  147. package/src/components/ds-saved-filters/components/ds-saved-filters-save.tsx +164 -0
  148. package/src/components/ds-saved-filters/components/ds-saved-filters-trigger/ds-saved-filters-trigger.module.scss +21 -0
  149. package/src/components/ds-saved-filters/components/ds-saved-filters-trigger/ds-saved-filters-trigger.tsx +237 -0
  150. package/src/components/ds-saved-filters/components/ds-saved-filters-trigger/index.ts +1 -0
  151. package/src/components/ds-saved-filters/components/index.ts +2 -0
  152. package/src/components/ds-saved-filters/ds-saved-filters.ts +6 -0
  153. package/src/components/ds-saved-filters/ds-saved-filters.types.ts +106 -0
  154. package/src/components/ds-saved-filters/ds-saved-filters.utils.ts +35 -0
  155. package/src/components/ds-saved-filters/hooks/index.ts +1 -0
  156. package/src/components/ds-saved-filters/hooks/use-picker-outside-dismiss.ts +42 -0
  157. package/src/components/ds-saved-filters/index.ts +2 -0
  158. package/src/components/ds-segment-group/ds-segment-group.module.scss +65 -37
  159. package/src/components/ds-segment-group/ds-segment-group.tsx +17 -5
  160. package/src/components/ds-segment-group/ds-segment-group.types.ts +20 -5
  161. package/src/components/ds-segment-group/figma/ds-segment-group-v2-item.figma.ts +109 -0
  162. package/src/components/ds-segment-group/figma/ds-segment-group-v2.figma.ts +31 -0
  163. package/src/components/ds-site-node/ds-site-node.tsx +2 -2
  164. package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.module.scss +12 -2
  165. package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx +2 -3
  166. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss +1 -6
  167. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx +6 -3
  168. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +18 -7
  169. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +27 -21
  170. package/src/components/ds-table/components/ds-table-header-label.module.scss +12 -0
  171. package/src/components/ds-table/components/ds-table-header-label.tsx +28 -0
  172. package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +0 -1
  173. package/src/components/ds-table/context/ds-table-context.tsx +8 -0
  174. package/src/components/ds-table/ds-table.module.scss +26 -16
  175. package/src/components/ds-table/ds-table.tsx +46 -14
  176. package/src/components/ds-table/ds-table.types.ts +33 -3
  177. package/src/components/ds-table/hooks/use-column-resize.ts +114 -11
  178. package/src/components/ds-table/hooks/use-scrollbar-spacer.ts +108 -0
  179. package/src/components/ds-table/hooks/use-scrollbar-spacer.unit.test.ts +26 -0
  180. package/src/components/ds-table/styles/_variables.scss +0 -2
  181. package/src/components/ds-table/utils/column-size.ts +274 -1
  182. package/src/components/ds-table/utils/column-size.unit.test.ts +157 -0
  183. package/src/components/ds-table/utils/constants.ts +13 -5
  184. package/src/components/ds-table/utils/table-columns.tsx +27 -13
  185. package/src/components/ds-table/utils/table-columns.unit.test.ts +44 -0
  186. package/src/components/ds-tag/ds-tag.figma.ts +23 -3
  187. package/src/components/ds-tag/ds-tag.module.scss +71 -7
  188. package/src/components/ds-tag/ds-tag.tsx +115 -14
  189. package/src/components/ds-tag/ds-tag.types.ts +70 -3
  190. package/src/components/ds-tag/ds-tag.unit.test.ts +23 -4
  191. package/src/components/ds-tag/index.ts +2 -2
  192. package/src/components/ds-text-input/ds-input-field-v02.figma.ts +2 -0
  193. package/src/components/ds-toggle/ds-toggle.module.scss +18 -0
  194. package/src/components/ds-toggle/ds-toggle.tsx +15 -9
  195. package/src/components/ds-toggle/ds-toggle.types.ts +6 -0
  196. package/src/components/ds-toggle-filter-data/ds-toggle-filter-data.module.scss +69 -0
  197. package/src/components/ds-toggle-filter-data/ds-toggle-filter-data.tsx +55 -0
  198. package/src/components/ds-toggle-filter-data/ds-toggle-filter-data.types.ts +43 -0
  199. package/src/components/ds-toggle-filter-data/index.ts +1 -0
  200. package/src/components/ds-tooltip/ds-tooltip.module.scss +8 -0
  201. package/src/components/ds-tooltip/ds-tooltip.tsx +7 -3
  202. package/src/components/ds-tooltip/ds-tooltip.types.ts +17 -0
  203. package/src/components/ds-top-bar-navigation/ds-top-bar-navigation.figma.ts +35 -0
  204. package/src/components/ds-top-bar-navigation/ds-top-bar-navigation.module.scss +150 -0
  205. package/src/components/ds-top-bar-navigation/ds-top-bar-navigation.tsx +161 -0
  206. package/src/components/ds-top-bar-navigation/ds-top-bar-navigation.types.ts +117 -0
  207. package/src/components/ds-top-bar-navigation/index.ts +2 -0
  208. package/src/components/ds-tree/ds-tree.tsx +10 -10
  209. package/src/components/ds-tree/ds-tree.types.ts +40 -7
  210. package/src/index.ts +8 -0
  211. package/src/utils/use-is-horizontally-overflowing.ts +35 -0
  212. package/src/components/ds-site-node/hooks/use-is-overflowing.ts +0 -31
  213. package/src/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.module.scss +0 -112
  214. package/src/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.tsx +0 -67
  215. package/src/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.types.ts +0 -41
  216. package/src/components/ds-table/components/ds-table-bulk-actions/index.ts +0 -2
@@ -0,0 +1,141 @@
1
+ import {
2
+ filtersBarViews,
3
+ type DsFilterCondition,
4
+ type DsFilterField,
5
+ type DsFilterOption,
6
+ type DsFilterRange,
7
+ type DsFilterScalarField,
8
+ type DsFilterSearchCondition,
9
+ type DsFilterValue,
10
+ type DsFiltersBarView,
11
+ } from './ds-filters-bar.types';
12
+
13
+ const ID_RANDOM_WORDS = 2;
14
+ const HEX_RADIX = 16;
15
+
16
+ const QUERY_LOCKED_VIEWS: ReadonlyArray<DsFiltersBarView> = Object.freeze(['filters', 'builder']);
17
+ const NO_LOCKED_VIEWS: ReadonlyArray<DsFiltersBarView> = Object.freeze([]);
18
+
19
+ export const isFiltersBarView = (value: string | null): value is DsFiltersBarView =>
20
+ filtersBarViews.some((view) => view === value);
21
+
22
+ /**
23
+ * Blank query text is not an edited query: it hands control back to the conditions.
24
+ */
25
+ export const normalizeQuery = (query: string | null): string | null => (query?.trim() ? query : null);
26
+
27
+ export const lockedViewsFor = (query: string | null): ReadonlyArray<DsFiltersBarView> =>
28
+ query === null ? NO_LOCKED_VIEWS : QUERY_LOCKED_VIEWS;
29
+
30
+ /**
31
+ * Random, so ids stay unique across reloads and conditions restored from a **Saved filter**.
32
+ * `crypto.randomUUID` is avoided because it needs a secure context.
33
+ */
34
+ export const createConditionId = (): string => {
35
+ const words = crypto.getRandomValues(new Uint32Array(ID_RANDOM_WORDS));
36
+
37
+ return `condition-${Array.from(words, (word) => word.toString(HEX_RADIX)).join('')}`;
38
+ };
39
+
40
+ export const createSearchCondition = (text: string): DsFilterSearchCondition | null => {
41
+ const trimmed = text.trim();
42
+
43
+ if (!trimmed) {
44
+ return null;
45
+ }
46
+
47
+ return { kind: 'search', id: createConditionId(), text: trimmed };
48
+ };
49
+
50
+ export const appendCondition = (
51
+ conditions: ReadonlyArray<DsFilterCondition>,
52
+ condition: DsFilterCondition,
53
+ ): ReadonlyArray<DsFilterCondition> => [...conditions, condition];
54
+
55
+ export const replaceCondition = (
56
+ conditions: ReadonlyArray<DsFilterCondition>,
57
+ condition: DsFilterCondition,
58
+ ): ReadonlyArray<DsFilterCondition> =>
59
+ conditions.map((item) => (item.id === condition.id ? condition : item));
60
+
61
+ export const removeConditionById = (
62
+ conditions: ReadonlyArray<DsFilterCondition>,
63
+ id: string,
64
+ ): ReadonlyArray<DsFilterCondition> => conditions.filter((item) => item.id !== id);
65
+
66
+ /**
67
+ * Shared by the summary line and the chips, so every view words a condition the same way
68
+ */
69
+ export interface DsFilterConditionDescription {
70
+ /**
71
+ * Field then subfield labels, for example `['Input', 'Name']`. Empty for search conditions.
72
+ */
73
+ fieldPath: ReadonlyArray<string>;
74
+ /**
75
+ * Operator in words, for example `not equals`
76
+ */
77
+ operator?: string;
78
+ /**
79
+ * Operator in compact form for chips, for example `≠`
80
+ */
81
+ operatorSymbol?: string;
82
+ value: string;
83
+ }
84
+
85
+ const RANGE_SEPARATOR = ' – ';
86
+
87
+ const labelFor = (options: ReadonlyArray<DsFilterOption>, value: string) =>
88
+ options.find((option) => option.value === value)?.label ?? value;
89
+
90
+ const isRange = (value: DsFilterValue): value is DsFilterRange<number> | DsFilterRange<string> =>
91
+ typeof value === 'object' && 'from' in value;
92
+
93
+ const formatValue = (value: DsFilterValue, field: DsFilterScalarField | undefined): string => {
94
+ if (isRange(value)) {
95
+ return [value.from ?? '', value.to ?? ''].map(String).join(RANGE_SEPARATOR).trim();
96
+ }
97
+
98
+ if (typeof value === 'object') {
99
+ const options = field?.type === 'enum' ? field.options : [];
100
+
101
+ return value.map((item) => labelFor(options, item)).join(', ');
102
+ }
103
+
104
+ if (typeof value === 'string' && field?.type === 'date') {
105
+ return labelFor(field.presets ?? [], value);
106
+ }
107
+
108
+ return String(value);
109
+ };
110
+
111
+ /**
112
+ * Falls back to raw ids when a field, subfield, operator or option is missing from `fields`, so a
113
+ * **Saved filter** that references a removed field still shows instead of breaking the bar.
114
+ */
115
+ export const describeCondition = (
116
+ condition: DsFilterCondition,
117
+ fields: ReadonlyArray<DsFilterField>,
118
+ ): DsFilterConditionDescription => {
119
+ if (condition.kind === 'search') {
120
+ return { fieldPath: [], value: condition.text };
121
+ }
122
+
123
+ const field = fields.find((item) => item.id === condition.field);
124
+ const subfield =
125
+ field?.type === 'compound' ? field.subfields.find((item) => item.id === condition.subfield) : undefined;
126
+ const scalarField = field?.type === 'compound' ? subfield : field;
127
+ const operator = scalarField?.operators.find((item) => item.value === condition.operator);
128
+
129
+ const fieldPath = [field?.label ?? condition.field];
130
+
131
+ if (condition.subfield) {
132
+ fieldPath.push(subfield?.label ?? condition.subfield);
133
+ }
134
+
135
+ return {
136
+ fieldPath,
137
+ operator: operator?.label ?? condition.operator,
138
+ operatorSymbol: operator?.symbol ?? operator?.label ?? condition.operator,
139
+ value: formatValue(condition.value, scalarField),
140
+ };
141
+ };
@@ -0,0 +1 @@
1
+ export { DsFiltersBar } from './ds-filters-bar';
@@ -125,6 +125,24 @@ $form-control-description-max-height: calc(
125
125
  }
126
126
  }
127
127
 
128
+ // Stays in the tree while empty, so a message that appears later is announced. Out of the flex
129
+ // flow while empty, so it adds no gap.
130
+ .messageRegion:empty {
131
+ position: absolute;
132
+ }
133
+
134
+ .visuallyHidden {
135
+ position: absolute;
136
+ width: 1px;
137
+ height: 1px;
138
+ margin: -1px;
139
+ padding: 0;
140
+ border: 0;
141
+ overflow: hidden;
142
+ white-space: nowrap;
143
+ clip-path: inset(50%);
144
+ }
145
+
128
146
  .message {
129
147
  @include typography.body-xs-reg;
130
148
  color: var(--font-secondary);
@@ -4,6 +4,7 @@ import classNames from 'classnames';
4
4
  import { DsIcon } from '../ds-icon';
5
5
  import { DsSelect } from '../ds-select';
6
6
  import { DsTextInput } from '../ds-text-input';
7
+ import { DsCodeInput } from '../ds-code-input';
7
8
  import { DsTextarea } from '../ds-textarea';
8
9
  import { DsNumberInput } from '../ds-number-input';
9
10
  import { DsPasswordInput } from '../ds-password-input';
@@ -13,7 +14,13 @@ import { DsDateInput } from '../ds-date-input';
13
14
  import { DsDatePicker } from '../ds-date-picker';
14
15
  import { DsTimePicker } from '../ds-time-picker';
15
16
 
16
- const FormControlContext = createContext<{ controlId: string } | null>(null);
17
+ const FormControlContext = createContext<{
18
+ controlId: string;
19
+ /**
20
+ * Id of the message, while there is one
21
+ */
22
+ messageId?: string;
23
+ } | null>(null);
17
24
 
18
25
  const useFormControlContext = () => {
19
26
  const context = useContext(FormControlContext);
@@ -28,13 +35,40 @@ const useFormControlContext = () => {
28
35
  * into any component that expects an 'id' prop.
29
36
  *
30
37
  * @param Component - The component to wrap with form control context
38
+ * @param displayName - Compound display name so Storybook Show code renders the member name
31
39
  * @returns A new component that automatically receives the controlId
32
40
  */
33
- const controlify = <TProps extends { id?: string }>(Component: ComponentType<TProps>) => {
34
- return function WrappedFormControl(props: TProps) {
41
+ const controlify = <TProps extends { id?: string }>(
42
+ Component: ComponentType<TProps>,
43
+ displayName: string,
44
+ ) => {
45
+ const WrappedFormControl = (props: TProps) => {
35
46
  const { controlId } = useFormControlContext();
36
47
  return <Component id={controlId} {...props} />;
37
48
  };
49
+
50
+ WrappedFormControl.displayName = displayName;
51
+
52
+ return WrappedFormControl;
53
+ };
54
+
55
+ /**
56
+ * HOC, same as `controlify`. Also sets `aria-describedby` to the message, for inputs that accept that prop.
57
+ */
58
+ const controlifyDescribed = <TProps extends { id?: string; 'aria-describedby'?: string }>(
59
+ Component: ComponentType<TProps>,
60
+ displayName: string,
61
+ ) => {
62
+ const WrappedFormControl = (props: TProps) => {
63
+ const { controlId, messageId } = useFormControlContext();
64
+ const describedBy = [messageId, props['aria-describedby']].filter(Boolean).join(' ') || undefined;
65
+
66
+ return <Component id={controlId} {...props} aria-describedby={describedBy} />;
67
+ };
68
+
69
+ WrappedFormControl.displayName = displayName;
70
+
71
+ return WrappedFormControl;
38
72
  };
39
73
 
40
74
  const DsFormControlDescription: React.FC<DsFormControlDescriptionProps> = ({ children, className }) => {
@@ -55,10 +89,11 @@ const DsFormControlRoot = ({
55
89
  children,
56
90
  }: DsFormControlProps) => {
57
91
  const generatedId = useId();
92
+ const messageId = useId();
58
93
  const controlId = id || generatedId;
59
94
 
60
95
  return (
61
- <FormControlContext.Provider value={{ controlId }}>
96
+ <FormControlContext.Provider value={{ controlId, messageId: message ? messageId : undefined }}>
62
97
  <div
63
98
  className={classNames(
64
99
  styles.container,
@@ -69,7 +104,11 @@ const DsFormControlRoot = ({
69
104
  )}
70
105
  style={style}
71
106
  >
72
- {!hideLabel && (
107
+ {hideLabel ? (
108
+ <label htmlFor={controlId} className={styles.visuallyHidden}>
109
+ {label}
110
+ </label>
111
+ ) : (
73
112
  <div className={styles.labelContainer}>
74
113
  <label
75
114
  htmlFor={controlId}
@@ -85,12 +124,14 @@ const DsFormControlRoot = ({
85
124
 
86
125
  {children}
87
126
 
88
- {message && (
89
- <div className={styles.message}>
90
- <DsIcon icon={messageIcon} size="tiny" filled />
91
- <span>{message}</span>
92
- </div>
93
- )}
127
+ <div className={styles.messageRegion} aria-live="polite">
128
+ {message && (
129
+ <div className={styles.message}>
130
+ <DsIcon icon={messageIcon} size="tiny" filled />
131
+ <span id={messageId}>{message}</span>
132
+ </div>
133
+ )}
134
+ </div>
94
135
  </div>
95
136
  </FormControlContext.Provider>
96
137
  );
@@ -100,15 +141,16 @@ DsFormControlDescription.displayName = 'DsFormControl.Description';
100
141
 
101
142
  const DsFormControl = Object.assign(DsFormControlRoot, {
102
143
  displayName: 'DsFormControl',
103
- TextInput: controlify(DsTextInput),
104
- NumberInput: controlify(DsNumberInput),
105
- PasswordInput: controlify(DsPasswordInput),
144
+ TextInput: controlify(DsTextInput, 'DsFormControl.TextInput'),
145
+ CodeInput: controlifyDescribed(DsCodeInput, 'DsFormControl.CodeInput'),
146
+ NumberInput: controlify(DsNumberInput, 'DsFormControl.NumberInput'),
147
+ PasswordInput: controlify(DsPasswordInput, 'DsFormControl.PasswordInput'),
106
148
  /** @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),
149
+ DateInput: controlify(DsDateInput, 'DsFormControl.DateInput'),
150
+ DatePicker: controlify(DsDatePicker, 'DsFormControl.DatePicker'),
151
+ TimePicker: controlify(DsTimePicker, 'DsFormControl.TimePicker'),
152
+ Textarea: controlify(DsTextarea, 'DsFormControl.Textarea'),
153
+ Select: controlify(DsSelect, 'DsFormControl.Select'),
112
154
  Description: DsFormControlDescription,
113
155
  });
114
156
 
@@ -18,7 +18,8 @@ export interface DsFormControlProps extends React.PropsWithChildren {
18
18
  */
19
19
  label: string;
20
20
  /**
21
- * When true, the label row is not rendered (e.g. inline table cell editors).
21
+ * Hides the label row (e.g. inline table cell editors). The label stays as the control's
22
+ * accessible name.
22
23
  */
23
24
  hideLabel?: boolean;
24
25
  /**
@@ -49,6 +49,7 @@ import { SpecialWebhook } from './special-webhook';
49
49
  import { SpecialMapView } from './special-map-view';
50
50
 
51
51
  // Misc icons
52
+ import { SpecialAdvFilters } from './special-adv-filters';
52
53
  import { SpecialHome } from './special-home';
53
54
  import { SpecialLeadingIcon } from './special-leading-icon';
54
55
  import { SpecialLego } from './special-lego';
@@ -120,6 +121,7 @@ export const customIcons = {
120
121
  'special-map-view': SpecialMapView,
121
122
 
122
123
  // Misc
124
+ 'special-adv-filters': SpecialAdvFilters,
123
125
  'special-home': SpecialHome,
124
126
  'special-leading-icon': SpecialLeadingIcon,
125
127
  'special-lego': SpecialLego,
@@ -0,0 +1,28 @@
1
+ import type { FC, SVGProps } from 'react';
2
+
3
+ /**
4
+ * Special Advanced Filters icon - magnifying glass with filter lines
5
+ * @figma https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=42571-31078
6
+ */
7
+ export const SpecialAdvFilters: FC<SVGProps<SVGSVGElement>> = (props) => (
8
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
9
+ <path
10
+ d="M9.70117 12.1478C9.82249 12.1478 9.92473 12.1952 10.0068 12.2903C10.089 12.3856 10.1299 12.504 10.1299 12.6448C10.1299 12.7857 10.089 12.905 10.0068 13.0023C9.92473 13.0993 9.8225 13.1478 9.70117 13.1478H8.27344C8.15211 13.1478 8.04988 13.1003 7.96777 13.0052C7.88563 12.9099 7.84473 12.7915 7.84473 12.6507C7.84473 12.5099 7.88563 12.3905 7.96777 12.2933C8.04988 12.1962 8.15211 12.1478 8.27344 12.1478H9.70117Z"
11
+ fill="currentColor"
12
+ />
13
+ <path
14
+ d="M11.416 9.64777C11.5374 9.6478 11.6396 9.6951 11.7217 9.79034C11.8038 9.88561 11.8447 10.004 11.8447 10.1448C11.8447 10.2857 11.8038 10.405 11.7217 10.5023C11.6396 10.5994 11.5374 10.6477 11.416 10.6478H6.55859C6.43723 10.6477 6.33504 10.6004 6.25293 10.5052C6.1708 10.4099 6.12989 10.2915 6.12988 10.1507C6.12988 10.0099 6.1708 9.89049 6.25293 9.79327C6.33504 9.69609 6.43723 9.6478 6.55859 9.64777H11.416Z"
15
+ fill="currentColor"
16
+ />
17
+ <path
18
+ d="M12.5586 7.14777C12.68 7.14777 12.7821 7.19514 12.8643 7.29034C12.9464 7.38562 12.9873 7.50401 12.9873 7.64484C12.9873 7.78567 12.9464 7.90504 12.8643 8.00226C12.7821 8.09941 12.68 8.14777 12.5586 8.14777H5.41602C5.29463 8.14777 5.19248 8.10039 5.11035 8.00519C5.02821 7.90991 4.98731 7.79152 4.9873 7.6507C4.9873 7.50986 5.02821 7.3905 5.11035 7.29327C5.19248 7.19612 5.29463 7.14777 5.41602 7.14777H12.5586Z"
19
+ fill="currentColor"
20
+ />
21
+ <path
22
+ fillRule="evenodd"
23
+ clipRule="evenodd"
24
+ d="M8.98535 2.14777C9.94489 2.14777 10.8519 2.3315 11.7061 2.69952C12.5602 3.06758 13.3036 3.56758 13.9355 4.19952C14.5675 4.83147 15.0675 5.57386 15.4355 6.42609C15.8036 7.27828 15.9873 8.18601 15.9873 9.14874C15.9873 9.98127 15.8491 10.7687 15.5723 11.511C15.2955 12.2535 14.9126 12.9311 14.4248 13.5433L17.4668 16.5853C17.6193 16.7329 17.6923 16.9052 17.6855 17.1019C17.6786 17.2988 17.5996 17.4745 17.4502 17.6273C17.3008 17.7797 17.1267 17.8557 16.9277 17.8558C16.7284 17.8558 16.5537 17.7798 16.4043 17.6273L13.3623 14.6058C12.7541 15.0933 12.0812 15.4724 11.3438 15.7425C10.6061 16.0126 9.82064 16.1478 8.9873 16.1478C8.01647 16.1478 7.10671 15.9641 6.25879 15.596C5.4111 15.228 4.66806 14.7277 4.0293 14.096C3.39041 13.4641 2.89041 12.7234 2.5293 11.8753C2.16829 11.0276 1.98736 10.1185 1.9873 9.14777C1.9873 8.18975 2.17104 7.28315 2.53906 6.42902C2.90712 5.57485 3.40627 4.83175 4.03516 4.19952C4.66407 3.56731 5.40284 3.06712 6.25195 2.69952C7.10137 2.33176 8.01274 2.14778 8.98535 2.14777ZM8.9873 3.64777C7.45523 3.64777 6.15525 4.18438 5.08789 5.25812C4.02067 6.33201 3.4873 7.62874 3.4873 9.14777C3.4873 10.6798 4.02066 11.9798 5.08691 13.0472C6.15288 14.1141 7.45106 14.6477 8.98145 14.6478C10.4989 14.6478 11.7967 14.1144 12.873 13.0482C13.9491 11.9822 14.4872 10.684 14.4873 9.15363C14.4873 7.63613 13.9507 6.33841 12.877 5.26202C11.8031 4.18565 10.5063 3.64777 8.9873 3.64777Z"
25
+ fill="currentColor"
26
+ />
27
+ </svg>
28
+ );
@@ -0,0 +1,34 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=27983-34300
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-illustration
3
+ // component=DsIllustration
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const variant =
9
+ instance.getEnum('Property 1', {
10
+ Done: 'done',
11
+ EmptyInbox: 'empty-inbox',
12
+ Error: 'error',
13
+ NoConnection: 'no-connection',
14
+ NoCreditCard: 'no-credit-card',
15
+ NoDocuments: 'no-documents',
16
+ NoGPS: 'no-gps',
17
+ NoImages: 'no-images',
18
+ NoItemsCart: 'no-items-cart',
19
+ NoMessages: 'no-messages',
20
+ NoSearchResult: 'no-search-result',
21
+ NoTasks: 'no-tasks',
22
+ 'No Device': 'no-device',
23
+ 'Go Filter': 'go-filter',
24
+ Device: 'device',
25
+ Site: 'site',
26
+ configuration: 'configuration',
27
+ }) ?? 'no-tasks';
28
+
29
+ export default {
30
+ example: figma.code`<DsIllustration variant="${variant}" />`,
31
+ imports: ["import { DsIllustration } from '@drivenets/design-system';"],
32
+ id: 'ds-illustration',
33
+ metadata: { nestable: true },
34
+ } satisfies figma.Template;
@@ -0,0 +1,6 @@
1
+ .root {
2
+ display: block;
3
+ width: 250px;
4
+ height: 200px;
5
+ max-width: 100%;
6
+ }
@@ -0,0 +1,29 @@
1
+ import classNames from 'classnames';
2
+ import styles from './ds-illustration.module.scss';
3
+ import { illustrations } from './illustrations';
4
+ import type { DsIllustrationProps } from './ds-illustration.types';
5
+
6
+ const DsIllustration = ({
7
+ variant = 'no-tasks',
8
+ className,
9
+ style,
10
+ ref,
11
+ 'aria-hidden': ariaHidden = true,
12
+ 'aria-label': ariaLabel,
13
+ }: DsIllustrationProps) => {
14
+ const Svg = illustrations[variant];
15
+
16
+ return (
17
+ <Svg
18
+ ref={ref}
19
+ className={classNames(styles.root, className)}
20
+ style={style}
21
+ aria-hidden={ariaHidden}
22
+ aria-label={ariaLabel}
23
+ />
24
+ );
25
+ };
26
+
27
+ DsIllustration.displayName = 'DsIllustration';
28
+
29
+ export default DsIllustration;
@@ -0,0 +1,45 @@
1
+ import type { CSSProperties, Ref } from 'react';
2
+
3
+ export const dsIllustrationVariants = [
4
+ 'configuration',
5
+ 'device',
6
+ 'done',
7
+ 'empty-inbox',
8
+ 'error',
9
+ 'go-filter',
10
+ 'no-connection',
11
+ 'no-credit-card',
12
+ 'no-device',
13
+ 'no-documents',
14
+ 'no-gps',
15
+ 'no-images',
16
+ 'no-items-cart',
17
+ 'no-messages',
18
+ 'no-search-result',
19
+ 'no-tasks',
20
+ 'site',
21
+ ] as const;
22
+
23
+ export type DsIllustrationVariant = (typeof dsIllustrationVariants)[number];
24
+
25
+ export interface DsIllustrationProps {
26
+ /**
27
+ * Which empty-screen tile to render.
28
+ * @default 'no-tasks'
29
+ */
30
+ variant?: DsIllustrationVariant;
31
+
32
+ className?: string;
33
+
34
+ style?: CSSProperties;
35
+
36
+ ref?: Ref<SVGSVGElement>;
37
+
38
+ /**
39
+ * Decorative by default. Set `false` with `aria-label` when the tile is informative.
40
+ * @default true
41
+ */
42
+ 'aria-hidden'?: boolean | 'true' | 'false';
43
+
44
+ 'aria-label'?: string;
45
+ }
@@ -0,0 +1,51 @@
1
+ import type { FC, SVGProps } from 'react';
2
+ import { IllustrationClouds } from './illustration-clouds';
3
+
4
+ export const ConfigurationIllustration: FC<SVGProps<SVGSVGElement>> = (props) => (
5
+ <svg
6
+ width="250"
7
+ height="200"
8
+ viewBox="0 0 250 200"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ {...props}
12
+ >
13
+ <rect width="250" height="200" fill="var(--background)" />
14
+ <IllustrationClouds />
15
+ <path
16
+ d="M140.238 48.25C140.621 48.2501 140.937 48.5362 140.982 48.9062L140.987 48.9482L140.995 48.9912L142.683 57.7295L142.821 58.4473L143.515 58.6777C144.17 58.8963 144.82 59.1328 145.466 59.3857L146.11 59.6445C146.961 59.9964 147.798 60.3775 148.622 60.7949L149.278 61.127L149.888 60.7148L157.375 55.6494C157.688 55.4384 158.104 55.495 158.351 55.7715L158.375 55.7998L158.401 55.8252L170.512 67.9355C170.777 68.2026 170.8 68.6213 170.579 68.9121L170.559 68.9395L170.539 68.9678L165.535 76.3623L165.124 76.9688L165.453 77.624C165.866 78.4456 166.252 79.2849 166.603 80.1338L166.604 80.1357C166.955 80.9829 167.28 81.8519 167.57 82.7344L167.8 83.4316L168.521 83.5713L177.393 85.2822H177.394C177.749 85.3506 178 85.6645 178 86.0156L178.004 103.253C178.004 103.636 177.718 103.952 177.348 103.997L177.306 104.002L177.263 104.01L168.521 105.697L167.8 105.837L167.57 106.534C167.284 107.404 166.959 108.269 166.606 109.123L166.604 109.128C166.259 109.972 165.874 110.807 165.457 111.638L165.128 112.292L165.539 112.898L170.603 120.383V120.384C170.782 120.651 170.769 120.989 170.598 121.234L170.515 121.334L158.323 133.525C158.058 133.791 157.64 133.815 157.349 133.599L157.326 133.581L157.303 133.565L149.889 128.546L149.281 128.135L148.626 128.464C147.796 128.881 146.957 129.267 146.119 129.614H146.118C145.273 129.965 144.408 130.286 143.523 130.577L142.826 130.807L142.687 131.528L140.976 140.399V140.4C140.907 140.755 140.594 141.007 140.242 141.007L123.004 141.011L122.864 140.998C122.547 140.938 122.301 140.679 122.261 140.352L122.255 140.309L122.247 140.267L120.563 131.528L120.425 130.807L119.727 130.577C118.853 130.29 117.992 129.968 117.152 129.62L117.055 129.577L117.029 129.567L116.419 129.307C115.811 129.041 115.211 128.758 114.62 128.458L113.963 128.125L113.354 128.538L105.873 133.604L105.872 133.605C105.576 133.806 105.181 133.763 104.936 133.515L104.931 133.51L92.7432 121.326L92.7383 121.321L92.6543 121.222C92.4826 120.976 92.4752 120.639 92.6494 120.38L97.7148 112.895L98.126 112.288L97.7969 111.633C97.3842 110.811 96.9983 109.972 96.6475 109.123L96.6465 109.121C96.2943 108.273 95.9697 107.408 95.6797 106.526L95.4502 105.829L94.7295 105.689L85.8623 103.979H85.8604C85.5057 103.91 85.254 103.597 85.2539 103.245L85.25 86.0068L85.2627 85.8672C85.3222 85.5505 85.581 85.3038 85.9092 85.2637L85.9521 85.2578L85.9941 85.25L94.7324 83.5664L95.4531 83.4277L95.6826 82.7314C95.9734 81.8517 96.2992 80.9802 96.6484 80.1299L96.6475 80.1289C96.9934 79.2907 97.3796 78.4579 97.7998 77.625L98.1309 76.9688L97.7188 76.3604L92.6523 68.876C92.4415 68.5611 92.502 68.1441 92.7734 67.9043L92.8018 67.8789L92.8291 67.8516L104.934 55.7422C105.199 55.4772 105.617 55.4527 105.909 55.6699L105.932 55.6865L105.955 55.7021L113.365 60.7178L113.973 61.1299L114.629 60.7988C115.457 60.381 116.286 59.9975 117.123 59.6533L117.214 59.6191L117.228 59.6143L117.24 59.6084C118.062 59.2715 118.898 58.9606 119.738 58.6807L120.432 58.4502L120.57 57.7324L122.281 48.8652V48.8633C122.349 48.5088 122.663 48.257 123.015 48.2568V48.2529L140.238 48.25Z"
17
+ fill="var(--background)"
18
+ stroke="var(--color-dap-blue-700)"
19
+ strokeWidth="2.5"
20
+ />
21
+ <path
22
+ fillRule="evenodd"
23
+ clipRule="evenodd"
24
+ d="M154.29 112.995C155.197 111.885 156.012 110.723 156.736 109.521C158.327 106.877 159.474 104.036 160.175 101.107C160.883 98.1449 161.136 95.0927 160.931 92.0628C160.752 89.4188 160.224 86.7918 159.347 84.2564C158.476 81.741 157.262 79.3156 155.701 77.0533C154.772 75.7052 153.719 74.4149 152.544 73.198C150.818 71.4113 148.925 69.8838 146.914 68.6165C144.753 67.2549 142.456 66.1935 140.082 65.4337C137.11 64.4822 134.018 64.0035 130.926 64C128.519 63.9973 126.113 64.2823 123.762 64.856C121.116 65.5018 118.54 66.5137 116.115 67.893C113.983 69.1055 111.968 70.602 110.123 72.3835C107.804 74.6223 105.926 77.146 104.49 79.8469C103.084 82.4912 102.102 85.3053 101.546 88.1883C100.972 91.1584 100.85 94.2016 101.182 97.2072C101.612 101.103 102.803 104.935 104.759 108.464C106.011 110.722 107.577 112.856 109.456 114.802C112.44 117.892 115.924 120.206 119.655 121.741C124.193 123.607 129.096 124.319 133.912 123.869C137.953 123.492 141.933 122.296 145.583 120.276"
25
+ fill="var(--background)"
26
+ />
27
+ <path
28
+ d="M154.29 112.995C155.197 111.885 156.012 110.723 156.736 109.521C158.327 106.877 159.474 104.036 160.175 101.107C160.883 98.1449 161.136 95.0927 160.931 92.0628C160.752 89.4188 160.224 86.7918 159.347 84.2564C158.476 81.741 157.262 79.3156 155.701 77.0533C154.772 75.7052 153.719 74.4149 152.544 73.198C150.818 71.4113 148.925 69.8838 146.914 68.6165C144.753 67.2549 142.456 66.1935 140.082 65.4337C137.11 64.4822 134.018 64.0035 130.926 64C128.519 63.9973 126.113 64.2823 123.762 64.856C121.116 65.5018 118.54 66.5137 116.115 67.893C113.983 69.1055 111.968 70.602 110.123 72.3835C107.804 74.6223 105.926 77.146 104.49 79.8469C103.084 82.4912 102.102 85.3053 101.546 88.1883C100.972 91.1584 100.85 94.2016 101.182 97.2072C101.612 101.103 102.803 104.935 104.759 108.464C106.011 110.722 107.577 112.856 109.456 114.802C112.44 117.892 115.924 120.206 119.655 121.741C124.193 123.607 129.096 124.319 133.912 123.869C137.953 123.492 141.933 122.296 145.583 120.276"
29
+ stroke="var(--color-dap-blue-700)"
30
+ strokeWidth="2.5"
31
+ strokeLinecap="round"
32
+ strokeLinejoin="round"
33
+ />
34
+ <path
35
+ d="M157 95.62C156.823 95.6232 156.645 95.6248 156.468 95.6248C140.834 95.6248 128.034 83.4367 126.961 68C114.518 69.9628 105 80.7849 105 93.8412C105 108.288 116.654 120 131.03 120C144.81 120 156.09 109.238 157 95.62Z"
36
+ fill="var(--color-dap-blue-075)"
37
+ />
38
+ <path
39
+ d="M124.755 71.4868C123.483 71.9639 122.24 72.5437 121.04 73.2264C119.175 74.2873 117.412 75.5966 115.798 77.1553C115.136 77.7943 114.515 78.4597 113.936 79.1485"
40
+ stroke="var(--color-dap-blue-400)"
41
+ strokeWidth="2.5"
42
+ strokeLinecap="round"
43
+ />
44
+ <path
45
+ d="M111.142 82.5464C110.682 83.2428 110.258 83.9568 109.87 84.6854C109.584 85.2236 109.318 85.7698 109.072 86.3229"
46
+ stroke="var(--color-dap-blue-400)"
47
+ strokeWidth="2.5"
48
+ strokeLinecap="round"
49
+ />
50
+ </svg>
51
+ );
@@ -0,0 +1,133 @@
1
+ import type { FC, SVGProps } from 'react';
2
+ import { IllustrationClouds } from './illustration-clouds';
3
+
4
+ export const DeviceIllustration: FC<SVGProps<SVGSVGElement>> = (props) => (
5
+ <svg
6
+ width="250"
7
+ height="200"
8
+ viewBox="0 0 250 200"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ {...props}
12
+ >
13
+ <rect width="250" height="200" fill="var(--background)" />
14
+ <IllustrationClouds />
15
+ <path
16
+ d="M143.375 63H109.625C106.518 63 104 65.2565 104 68.04V78.96C104 81.7435 106.518 84 109.625 84H143.375C146.482 84 149 81.7435 149 78.96V68.04C149 65.2565 146.482 63 143.375 63Z"
17
+ fill="var(--background)"
18
+ />
19
+ <path
20
+ d="M113.25 113H84.75C82.1266 113 80 115.364 80 118.28V129.72C80 132.636 82.1266 135 84.75 135H113.25C115.873 135 118 132.636 118 129.72V118.28C118 115.364 115.873 113 113.25 113Z"
21
+ fill="var(--background)"
22
+ />
23
+ <path
24
+ d="M169.25 113H140.75C138.127 113 136 115.364 136 118.28V129.72C136 132.636 138.127 135 140.75 135H169.25C171.873 135 174 132.636 174 129.72V118.28C174 115.364 171.873 113 169.25 113Z"
25
+ fill="var(--background)"
26
+ />
27
+ <path
28
+ d="M93 109V103H156V109"
29
+ stroke="var(--color-dap-blue-300)"
30
+ strokeWidth="3"
31
+ strokeLinecap="square"
32
+ strokeLinejoin="round"
33
+ />
34
+ <path
35
+ d="M125 94L125 102"
36
+ stroke="var(--color-dap-blue-300)"
37
+ strokeWidth="3"
38
+ strokeLinecap="square"
39
+ strokeLinejoin="round"
40
+ />
41
+ <path
42
+ d="M144.125 62.625H105.875C102.354 62.625 99.5 65.4792 99.5 69V82.8125C99.5 86.3333 102.354 89.1875 105.875 89.1875H144.125C147.646 89.1875 150.5 86.3333 150.5 82.8125V69C150.5 65.4792 147.646 62.625 144.125 62.625Z"
43
+ stroke="var(--color-dap-blue-700)"
44
+ strokeWidth="2.5"
45
+ strokeLinecap="round"
46
+ strokeLinejoin="round"
47
+ />
48
+ <path
49
+ d="M112.25 113.625H82.5C78.9792 113.625 76.125 116.479 76.125 120V133.813C76.125 137.333 78.9792 140.188 82.5 140.188H112.25C115.771 140.188 118.625 137.333 118.625 133.813V120C118.625 116.479 115.771 113.625 112.25 113.625Z"
50
+ stroke="var(--color-dap-blue-700)"
51
+ strokeWidth="2.5"
52
+ strokeLinecap="round"
53
+ strokeLinejoin="round"
54
+ />
55
+ <path
56
+ d="M167.5 113.625H137.75C134.229 113.625 131.375 116.479 131.375 120V133.813C131.375 137.333 134.229 140.188 137.75 140.188H167.5C171.021 140.188 173.875 137.333 173.875 133.813V120C173.875 116.479 171.021 113.625 167.5 113.625Z"
57
+ stroke="var(--color-dap-blue-700)"
58
+ strokeWidth="2.5"
59
+ strokeLinecap="round"
60
+ strokeLinejoin="round"
61
+ />
62
+ <path
63
+ d="M139 70C140.795 70 142.25 71.4551 142.25 73.25C142.25 75.0449 140.795 76.5 139 76.5C137.205 76.5 135.75 75.0449 135.75 73.25C135.75 71.4551 137.205 70 139 70Z"
64
+ stroke="var(--color-dap-blue-700)"
65
+ strokeWidth="2"
66
+ strokeLinecap="round"
67
+ strokeLinejoin="round"
68
+ />
69
+ <path
70
+ d="M113.5 72.6129V80.2629"
71
+ stroke="var(--color-dap-blue-300)"
72
+ strokeWidth="3"
73
+ strokeLinecap="round"
74
+ strokeLinejoin="round"
75
+ />
76
+ <path
77
+ d="M123.062 72.6129V80.2629"
78
+ stroke="var(--color-dap-blue-300)"
79
+ strokeWidth="3"
80
+ strokeLinecap="round"
81
+ strokeLinejoin="round"
82
+ />
83
+ <path
84
+ d="M109.25 121C111.045 121 112.5 122.455 112.5 124.25C112.5 126.045 111.045 127.5 109.25 127.5C107.455 127.5 106 126.045 106 124.25C106 122.455 107.455 121 109.25 121Z"
85
+ stroke="var(--color-dap-blue-700)"
86
+ strokeWidth="2"
87
+ strokeLinecap="round"
88
+ strokeLinejoin="round"
89
+ />
90
+ <path
91
+ d="M88 123.613V131.263"
92
+ stroke="var(--color-dap-blue-300)"
93
+ strokeWidth="3"
94
+ strokeLinecap="round"
95
+ strokeLinejoin="round"
96
+ />
97
+ <path
98
+ d="M97.5625 123.613V131.263"
99
+ stroke="var(--color-dap-blue-300)"
100
+ strokeWidth="3"
101
+ strokeLinecap="round"
102
+ strokeLinejoin="round"
103
+ />
104
+ <path
105
+ d="M164.5 121C166.295 121 167.75 122.455 167.75 124.25C167.75 126.045 166.295 127.5 164.5 127.5C162.705 127.5 161.25 126.045 161.25 124.25C161.25 122.455 162.705 121 164.5 121Z"
106
+ stroke="var(--color-dap-blue-700)"
107
+ strokeWidth="2"
108
+ strokeLinecap="round"
109
+ strokeLinejoin="round"
110
+ />
111
+ <path
112
+ d="M143.25 123.613V131.263"
113
+ stroke="var(--color-dap-blue-300)"
114
+ strokeWidth="3"
115
+ strokeLinecap="round"
116
+ strokeLinejoin="round"
117
+ />
118
+ <path
119
+ d="M152.812 123.613V131.263"
120
+ stroke="var(--color-dap-blue-300)"
121
+ strokeWidth="3"
122
+ strokeLinecap="round"
123
+ strokeLinejoin="round"
124
+ />
125
+ <path
126
+ d="M99 34.3027L110.1 46.7559M151.1 34.3027L140 46.7559L151.1 34.3027ZM125 30V46.7559V30Z"
127
+ stroke="var(--color-dap-blue-300)"
128
+ strokeWidth="2.5"
129
+ strokeLinecap="round"
130
+ strokeLinejoin="round"
131
+ />
132
+ </svg>
133
+ );