@appdirect/design-system 0.0.22 → 0.0.25

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 (65) hide show
  1. package/README.md +1 -1
  2. package/dist/Combobox/ADMultiselect.js +91 -0
  3. package/dist/Combobox/ADMultiselect.tsx +237 -0
  4. package/dist/Combobox/AutocompleteClearable.js +33 -35
  5. package/dist/Combobox/AutocompleteClearable.tsx +56 -121
  6. package/dist/Combobox/SearchableSelect.js +23 -42
  7. package/dist/Combobox/SearchableSelect.tsx +33 -129
  8. package/dist/Combobox/Select.js +13 -19
  9. package/dist/Combobox/Select.tsx +15 -44
  10. package/dist/Combobox/index.js +1 -1
  11. package/dist/Combobox/index.ts +2 -2
  12. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/CustomBottomToolbar.module.css +1 -24
  13. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.js +2 -5
  14. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.tsx +15 -22
  15. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.js +1 -2
  16. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.module.css +2 -9
  17. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.tsx +4 -5
  18. package/dist/ComplexComponents/DataTable/DataTableGrid/DataTableGrid.module.css +2 -6
  19. package/dist/ComplexComponents/DataTable/DataTableGrid/index.js +1 -1
  20. package/dist/ComplexComponents/DataTable/DataTableGrid/index.tsx +1 -1
  21. package/dist/ComplexComponents/Utilities/CopyButton.js +15 -27
  22. package/dist/ComplexComponents/Utilities/CopyButton.tsx +35 -49
  23. package/dist/DESIGN.md +7 -7
  24. package/dist/DataDisplay/Avatar.js +26 -81
  25. package/dist/DataDisplay/Avatar.tsx +35 -93
  26. package/dist/DataDisplay/Pill.js +21 -79
  27. package/dist/DataDisplay/Pill.tsx +34 -116
  28. package/dist/Inputs/ColorInput.js +12 -18
  29. package/dist/Inputs/ColorInput.tsx +13 -41
  30. package/dist/Inputs/NumberInput.js +15 -50
  31. package/dist/Inputs/NumberInput.tsx +18 -117
  32. package/dist/Inputs/Radio.js +1 -1
  33. package/dist/Inputs/Radio.tsx +1 -1
  34. package/dist/Inputs/RadioGroup.js +1 -1
  35. package/dist/Inputs/RadioGroup.tsx +1 -1
  36. package/dist/Inputs/TextArea.js +12 -18
  37. package/dist/Inputs/TextArea.tsx +13 -41
  38. package/dist/Inputs/TextInput.js +12 -18
  39. package/dist/Inputs/TextInput.tsx +13 -41
  40. package/dist/Inputs/inputLabel.js +35 -0
  41. package/dist/Inputs/inputLabel.tsx +83 -0
  42. package/dist/Layout/Inline.js +5 -42
  43. package/dist/Layout/Inline.tsx +6 -79
  44. package/dist/Overlays/Tooltip.js +2 -2
  45. package/dist/Overlays/Tooltip.tsx +4 -1
  46. package/dist/contracts/index.json +1 -1
  47. package/dist/css/foundations.css +44 -2
  48. package/dist/css/mantine.css +236 -43
  49. package/dist/css/tokens.css +58 -26
  50. package/dist/index.js +3 -3
  51. package/dist/index.ts +4 -4
  52. package/dist/stories/Combobox/{Multiselect.stories.tsx → ADMultiselect.stories.tsx} +159 -53
  53. package/dist/stories/Combobox/SearchableSelect.stories.tsx +3 -3
  54. package/dist/stories/Combobox/Select.stories.tsx +1 -1
  55. package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +4 -14
  56. package/dist/stories/Inputs/ColorInput.stories.tsx +12 -0
  57. package/dist/stories/Inputs/NumberInput.stories.tsx +12 -0
  58. package/dist/stories/Inputs/Radio.stories.tsx +10 -5
  59. package/dist/stories/Inputs/RadioGroup.stories.tsx +122 -80
  60. package/dist/stories/Inputs/TextArea.stories.tsx +12 -0
  61. package/dist/stories/Inputs/TextInput.stories.tsx +12 -0
  62. package/dist/stories/index.json +42 -35
  63. package/package.json +10 -6
  64. package/dist/Combobox/Multiselect.js +0 -31
  65. package/dist/Combobox/Multiselect.tsx +0 -158
package/dist/index.ts CHANGED
@@ -18,7 +18,7 @@
18
18
  import { TextInput, TextArea, NumberInput, ColorInput, Slider, SliderWithLabel, Switch, SegmentedControl, Checkbox, Radio, RadioGroup, DropZone, FileInput } from './Inputs';
19
19
  import { Button, ActionIcon, CloseButton } from './Buttons';
20
20
  import { Alert, Avatar, Badge, Card, CardSection, Chip, Pill, Indicator, Progress, ThemeIcon, List, Table } from './DataDisplay';
21
- import { SearchableSelect, AutocompleteClearable, Multiselect, Select, Combobox } from './Combobox';
21
+ import { SearchableSelect, AutocompleteClearable, ADMultiselect, Select, Combobox } from './Combobox';
22
22
  import { Breadcrumb, BackBreadcrumb, NavLink, Stepper, Tabs } from './Navigation';
23
23
  import { Drawer, Menu, Modal, ConfirmationModal, Popover, ConfirmationPopover, Tooltip } from './Overlays';
24
24
  import { Kbd, Code, Text, Title } from './Typography';
@@ -44,8 +44,8 @@ export { Button, ActionIcon, CloseButton } from './Buttons';
44
44
  export type { DSButtonProps, DSActionIconProps, DSCloseButtonProps } from './Buttons';
45
45
 
46
46
  // ========================== COMBOBOX ==========================
47
- export { SearchableSelect, AutocompleteClearable, Multiselect, Select, Combobox } from './Combobox';
48
- export type { DSSearchableSelectProps, DSAutocompleteClearableProps, DSMultiselectProps, DSSelectProps, DSComboboxProps } from './Combobox';
47
+ export { SearchableSelect, AutocompleteClearable, ADMultiselect, Select, Combobox } from './Combobox';
48
+ export type { DSSearchableSelectProps, DSAutocompleteClearableProps, ADMultiselectProps, DSSelectProps, DSComboboxProps } from './Combobox';
49
49
 
50
50
  // ========================== NAVIGATION ==========================
51
51
  export { Breadcrumb, BackBreadcrumb, NavLink, Stepper, Tabs } from './Navigation';
@@ -147,7 +147,7 @@ export const Buttons = {
147
147
  export const ComboboxComponents = {
148
148
  SearchableSelect,
149
149
  AutocompleteClearable,
150
- Multiselect,
150
+ ADMultiselect,
151
151
  Select,
152
152
  Combobox,
153
153
  };
@@ -1,19 +1,27 @@
1
1
  import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
- import { Stack } from '@mantine/core';
3
- import { Inline, Multiselect, Title, Text } from '@appdirect/design-system';
2
+ import { useState } from 'react';
3
+ import { Box, Stack } from '@mantine/core';
4
+ import { ADMultiselect, Title, Text } from '@appdirect/design-system';
4
5
 
5
- const meta: Meta<typeof Multiselect> = {
6
- title: 'Design System/Combobox/Multiselect',
7
- component: Multiselect,
6
+ const meta: Meta<typeof ADMultiselect> = {
7
+ title: 'Design System/Combobox/ADMultiselect',
8
+ component: ADMultiselect,
8
9
  parameters: {
9
10
  layout: 'centered',
10
11
  docs: {
11
12
  description: {
12
- component: 'Multi-selection input with pills display and checkbox options.',
13
+ component: 'Mantine MultiSelect with checkbox options and a "+N more" pill. Hovering "+N more" lists the hidden values. All core MultiSelect props (value, onChange, searchable, clearable, name, ...) are supported.',
13
14
  },
14
15
  },
15
16
  },
16
- tags: ['autodocs', 'code-connected'],
17
+ decorators: [
18
+ (Story) => (
19
+ <Box miw={400}>
20
+ <Story />
21
+ </Box>
22
+ ),
23
+ ],
24
+ tags: ['autodocs'],
17
25
  argTypes: {
18
26
  label: {
19
27
  control: 'text',
@@ -29,7 +37,19 @@ const meta: Meta<typeof Multiselect> = {
29
37
  },
30
38
  error: {
31
39
  control: 'text',
32
- description: 'Error message',
40
+ description: 'Error message, or true for the error state only (then errorCaption supplies the message)',
41
+ },
42
+ errorCaption: {
43
+ control: 'text',
44
+ description: 'Message shown below the input when error is true',
45
+ },
46
+ hasHelpIcon: {
47
+ control: 'boolean',
48
+ description: 'Show a (?) help icon with a tooltip to the right of the label',
49
+ },
50
+ helpIconLabel: {
51
+ control: 'text',
52
+ description: 'Tooltip label for the help icon (also its aria-label)',
33
53
  },
34
54
  required: {
35
55
  control: 'boolean',
@@ -37,7 +57,7 @@ const meta: Meta<typeof Multiselect> = {
37
57
  },
38
58
  showOptional: {
39
59
  control: 'boolean',
40
- description: 'Whether to show "(optional)" next to the label',
60
+ description: 'Whether to show "(Optional)" next to the label',
41
61
  },
42
62
  disabled: {
43
63
  control: 'boolean',
@@ -45,7 +65,7 @@ const meta: Meta<typeof Multiselect> = {
45
65
  },
46
66
  searchable: {
47
67
  control: 'boolean',
48
- description: 'Whether the select is searchable',
68
+ description: 'Whether the field is typeable and filters options (core default: false)',
49
69
  },
50
70
  size: {
51
71
  control: 'select',
@@ -103,12 +123,33 @@ export const Default: Story = {
103
123
  },
104
124
  };
105
125
 
126
+ export const WithHelpIcon: Story = {
127
+ args: {
128
+ label: 'Technologies',
129
+ placeholder: 'Pick one or more technologies',
130
+ data: technologies,
131
+ required: true,
132
+ hasHelpIcon: true,
133
+ helpIconLabel: 'Choose every technology used by the project',
134
+ },
135
+ };
136
+
137
+ export const WithErrorCaption: Story = {
138
+ args: {
139
+ label: 'Technologies',
140
+ placeholder: 'Pick one or more technologies',
141
+ data: technologies,
142
+ error: true,
143
+ errorCaption: 'Select at least one technology',
144
+ },
145
+ };
146
+
106
147
  export const Sizes: Story = {
107
148
  render: () => (
108
149
  <Stack gap="lg" w={400}>
109
150
  <div>
110
151
  <Text size="sm" fw={500} mb="xs">Extra Small (xs):</Text>
111
- <Multiselect
152
+ <ADMultiselect
112
153
  label="Technologies"
113
154
  placeholder="Select technologies"
114
155
  data={technologies.slice(0, 6)}
@@ -118,7 +159,7 @@ export const Sizes: Story = {
118
159
 
119
160
  <div>
120
161
  <Text size="sm" fw={500} mb="xs">Small (sm):</Text>
121
- <Multiselect
162
+ <ADMultiselect
122
163
  label="Technologies"
123
164
  placeholder="Select technologies"
124
165
  data={technologies.slice(0, 6)}
@@ -128,7 +169,7 @@ export const Sizes: Story = {
128
169
 
129
170
  <div>
130
171
  <Text size="sm" fw={500} mb="xs">Medium (md):</Text>
131
- <Multiselect
172
+ <ADMultiselect
132
173
  label="Technologies"
133
174
  placeholder="Select technologies"
134
175
  data={technologies.slice(0, 6)}
@@ -138,7 +179,7 @@ export const Sizes: Story = {
138
179
 
139
180
  <div>
140
181
  <Text size="sm" fw={500} mb="xs">Large (lg):</Text>
141
- <Multiselect
182
+ <ADMultiselect
142
183
  label="Technologies"
143
184
  placeholder="Select technologies"
144
185
  data={technologies.slice(0, 6)}
@@ -148,7 +189,7 @@ export const Sizes: Story = {
148
189
 
149
190
  <div>
150
191
  <Text size="sm" fw={500} mb="xs">Extra Large (xl):</Text>
151
- <Multiselect
192
+ <ADMultiselect
152
193
  label="Technologies"
153
194
  placeholder="Select technologies"
154
195
  data={technologies.slice(0, 6)}
@@ -160,7 +201,7 @@ export const Sizes: Story = {
160
201
  parameters: {
161
202
  docs: {
162
203
  description: {
163
- story: 'Multiselect component in different sizes.',
204
+ story: 'ADMultiselect component in different sizes.',
164
205
  },
165
206
  },
166
207
  },
@@ -169,14 +210,14 @@ export const Sizes: Story = {
169
210
  export const WithDescription: Story = {
170
211
  render: () => (
171
212
  <Stack gap="lg" w={400}>
172
- <Multiselect
213
+ <ADMultiselect
173
214
  label="Programming Languages"
174
215
  description="Select all programming languages you're proficient in"
175
216
  placeholder="Choose languages"
176
217
  data={['JavaScript', 'TypeScript', 'Python', 'Java', 'C#', 'Go', 'Rust', 'Swift']}
177
218
  />
178
219
 
179
- <Multiselect
220
+ <ADMultiselect
180
221
  label="Skills"
181
222
  description="Pick your areas of expertise (you can select multiple)"
182
223
  placeholder="Select skills"
@@ -187,7 +228,7 @@ export const WithDescription: Story = {
187
228
  parameters: {
188
229
  docs: {
189
230
  description: {
190
- story: 'Multiselect with helpful description text.',
231
+ story: 'ADMultiselect with helpful description text.',
191
232
  },
192
233
  },
193
234
  },
@@ -196,7 +237,7 @@ export const WithDescription: Story = {
196
237
  export const RequiredAndOptional: Story = {
197
238
  render: () => (
198
239
  <Stack gap="lg" w={400}>
199
- <Multiselect
240
+ <ADMultiselect
200
241
  label="Required Skills"
201
242
  placeholder="Select at least one skill"
202
243
  data={skills}
@@ -204,7 +245,7 @@ export const RequiredAndOptional: Story = {
204
245
  description="You must select at least one skill"
205
246
  />
206
247
 
207
- <Multiselect
248
+ <ADMultiselect
208
249
  label="Additional Technologies"
209
250
  placeholder="Optional technology preferences"
210
251
  data={technologies}
@@ -225,7 +266,7 @@ export const RequiredAndOptional: Story = {
225
266
  export const WithError: Story = {
226
267
  render: () => (
227
268
  <Stack gap="lg" w={400}>
228
- <Multiselect
269
+ <ADMultiselect
229
270
  label="Technologies"
230
271
  placeholder="Select technologies"
231
272
  data={technologies}
@@ -233,7 +274,7 @@ export const WithError: Story = {
233
274
  required
234
275
  />
235
276
 
236
- <Multiselect
277
+ <ADMultiselect
237
278
  label="Skills"
238
279
  placeholder="Choose skills"
239
280
  data={skills}
@@ -244,7 +285,7 @@ export const WithError: Story = {
244
285
  parameters: {
245
286
  docs: {
246
287
  description: {
247
- story: 'Multiselect with error states and validation messages.',
288
+ story: 'ADMultiselect with error states and validation messages.',
248
289
  },
249
290
  },
250
291
  },
@@ -253,7 +294,7 @@ export const WithError: Story = {
253
294
  export const DisabledState: Story = {
254
295
  render: () => (
255
296
  <Stack gap="lg" w={400}>
256
- <Multiselect
297
+ <ADMultiselect
257
298
  label="Technologies"
258
299
  placeholder="Not available"
259
300
  data={technologies}
@@ -261,7 +302,7 @@ export const DisabledState: Story = {
261
302
  description="This field is currently disabled"
262
303
  />
263
304
 
264
- <Multiselect
305
+ <ADMultiselect
265
306
  label="Skills"
266
307
  placeholder="Select skills"
267
308
  data={skills}
@@ -272,7 +313,7 @@ export const DisabledState: Story = {
272
313
  parameters: {
273
314
  docs: {
274
315
  description: {
275
- story: 'Disabled Multiselect inputs.',
316
+ story: 'Disabled ADMultiselect inputs.',
276
317
  },
277
318
  },
278
319
  },
@@ -283,33 +324,36 @@ export const MaxDisplayedValues: Story = {
283
324
  <Stack gap="lg" w={400}>
284
325
  <div>
285
326
  <Text size="sm" fw={500} mb="sm">Max 2 displayed (default):</Text>
286
- <Multiselect
327
+ <ADMultiselect
287
328
  label="Technologies"
288
329
  placeholder="Select multiple technologies"
289
330
  data={technologies}
290
331
  maxDisplayedValues={2}
332
+ defaultValue={['React', 'Vue', 'Angular', 'Docker']}
291
333
  description="Shows max 2 pills, then '+X more'"
292
334
  />
293
335
  </div>
294
336
 
295
337
  <div>
296
338
  <Text size="sm" fw={500} mb="sm">Max 4 displayed:</Text>
297
- <Multiselect
339
+ <ADMultiselect
298
340
  label="Skills"
299
341
  placeholder="Select multiple skills"
300
342
  data={skills}
301
343
  maxDisplayedValues={4}
344
+ defaultValue={['frontend', 'backend', 'mobile', 'devops', 'design', 'data']}
302
345
  description="Shows max 4 pills before collapsing"
303
346
  />
304
347
  </div>
305
348
 
306
349
  <div>
307
350
  <Text size="sm" fw={500} mb="sm">Max 1 displayed:</Text>
308
- <Multiselect
351
+ <ADMultiselect
309
352
  label="Languages"
310
353
  placeholder="Select languages"
311
354
  data={['English', 'Spanish', 'French', 'German', 'Italian', 'Portuguese', 'Japanese', 'Chinese']}
312
355
  maxDisplayedValues={1}
356
+ defaultValue={['English', 'Spanish', 'French']}
313
357
  description="Very compact display"
314
358
  />
315
359
  </div>
@@ -329,7 +373,7 @@ export const DifferentDataTypes: Story = {
329
373
  <Stack gap="lg" w={400}>
330
374
  <div>
331
375
  <Text size="sm" fw={500} mb="sm">String Array Data:</Text>
332
- <Multiselect
376
+ <ADMultiselect
333
377
  label="Frameworks"
334
378
  placeholder="Select frameworks"
335
379
  data={['React', 'Vue.js', 'Angular', 'Svelte', 'Next.js', 'Nuxt.js', 'Gatsby']}
@@ -338,7 +382,7 @@ export const DifferentDataTypes: Story = {
338
382
 
339
383
  <div>
340
384
  <Text size="sm" fw={500} mb="sm">Object Array Data (value/label):</Text>
341
- <Multiselect
385
+ <ADMultiselect
342
386
  label="Job Roles"
343
387
  placeholder="Select roles"
344
388
  data={[
@@ -354,7 +398,7 @@ export const DifferentDataTypes: Story = {
354
398
 
355
399
  <div>
356
400
  <Text size="sm" fw={500} mb="sm">Large Dataset:</Text>
357
- <Multiselect
401
+ <ADMultiselect
358
402
  label="Technologies"
359
403
  placeholder="Select from 15 technologies"
360
404
  data={technologies}
@@ -366,7 +410,7 @@ export const DifferentDataTypes: Story = {
366
410
  parameters: {
367
411
  docs: {
368
412
  description: {
369
- story: 'Multiselect with different data formats and sizes.',
413
+ story: 'ADMultiselect with different data formats and sizes.',
370
414
  },
371
415
  },
372
416
  },
@@ -377,7 +421,7 @@ export const FormIntegration: Story = {
377
421
  <Stack gap="lg" w={450}>
378
422
  <Title order={3} size="md" fw={500}>Developer Profile Form</Title>
379
423
 
380
- <Multiselect
424
+ <ADMultiselect
381
425
  label="Programming Languages"
382
426
  placeholder="Select languages you know"
383
427
  data={['JavaScript', 'TypeScript', 'Python', 'Java', 'C#', 'Go', 'Rust', 'Swift', 'Kotlin', 'PHP']}
@@ -386,7 +430,7 @@ export const FormIntegration: Story = {
386
430
  maxDisplayedValues={3}
387
431
  />
388
432
 
389
- <Multiselect
433
+ <ADMultiselect
390
434
  label="Frameworks & Libraries"
391
435
  placeholder="Choose frameworks"
392
436
  data={[
@@ -404,7 +448,7 @@ export const FormIntegration: Story = {
404
448
  maxDisplayedValues={2}
405
449
  />
406
450
 
407
- <Multiselect
451
+ <ADMultiselect
408
452
  label="Areas of Interest"
409
453
  placeholder="What interests you?"
410
454
  data={[
@@ -428,7 +472,7 @@ export const FormIntegration: Story = {
428
472
  parameters: {
429
473
  docs: {
430
474
  description: {
431
- story: 'Multiselect components integrated in a form context.',
475
+ story: 'ADMultiselect components integrated in a form context.',
432
476
  },
433
477
  },
434
478
  },
@@ -439,7 +483,7 @@ export const TagSelection: Story = {
439
483
  <Stack gap="lg" w={450}>
440
484
  <div>
441
485
  <Text size="sm" fw={500} mb="sm">Article Tags:</Text>
442
- <Multiselect
486
+ <ADMultiselect
443
487
  label="Tags"
444
488
  placeholder="Add tags to your article"
445
489
  data={[
@@ -454,7 +498,7 @@ export const TagSelection: Story = {
454
498
 
455
499
  <div>
456
500
  <Text size="sm" fw={500} mb="sm">Product Categories:</Text>
457
- <Multiselect
501
+ <ADMultiselect
458
502
  label="Categories"
459
503
  placeholder="Categorize your product"
460
504
  data={[
@@ -475,7 +519,7 @@ export const TagSelection: Story = {
475
519
 
476
520
  <div>
477
521
  <Text size="sm" fw={500} mb="sm">Project Labels:</Text>
478
- <Multiselect
522
+ <ADMultiselect
479
523
  label="Labels"
480
524
  placeholder="Add project labels"
481
525
  data={[
@@ -493,7 +537,7 @@ export const TagSelection: Story = {
493
537
  parameters: {
494
538
  docs: {
495
539
  description: {
496
- story: 'Multiselect used for tagging and categorization scenarios.',
540
+ story: 'ADMultiselect used for tagging and categorization scenarios.',
497
541
  },
498
542
  },
499
543
  },
@@ -504,7 +548,7 @@ export const TeamAndPermissions: Story = {
504
548
  <Stack gap="lg" w={450}>
505
549
  <div>
506
550
  <Text size="sm" fw={500} mb="sm">Team Members:</Text>
507
- <Multiselect
551
+ <ADMultiselect
508
552
  label="Assign Team Members"
509
553
  placeholder="Select team members"
510
554
  data={[
@@ -522,7 +566,7 @@ export const TeamAndPermissions: Story = {
522
566
 
523
567
  <div>
524
568
  <Text size="sm" fw={500} mb="sm">User Permissions:</Text>
525
- <Multiselect
569
+ <ADMultiselect
526
570
  label="Permissions"
527
571
  placeholder="Select permissions"
528
572
  data={[
@@ -538,7 +582,7 @@ export const TeamAndPermissions: Story = {
538
582
 
539
583
  <div>
540
584
  <Text size="sm" fw={500} mb="sm">Notification Preferences:</Text>
541
- <Multiselect
585
+ <ADMultiselect
542
586
  label="Notifications"
543
587
  placeholder="Choose notification types"
544
588
  data={[
@@ -559,7 +603,7 @@ export const TeamAndPermissions: Story = {
559
603
  parameters: {
560
604
  docs: {
561
605
  description: {
562
- story: 'Multiselect for team management and permission assignment.',
606
+ story: 'ADMultiselect for team management and permission assignment.',
563
607
  },
564
608
  },
565
609
  },
@@ -572,7 +616,7 @@ export const UseCases: Story = {
572
616
 
573
617
  <div>
574
618
  <Text size="sm" fw={500} mb="sm">1. Skill Assessment:</Text>
575
- <Multiselect
619
+ <ADMultiselect
576
620
  label="Technical Skills"
577
621
  placeholder="Select your skills"
578
622
  data={technologies}
@@ -583,7 +627,7 @@ export const UseCases: Story = {
583
627
 
584
628
  <div>
585
629
  <Text size="sm" fw={500} mb="sm">2. Filter Selection:</Text>
586
- <Multiselect
630
+ <ADMultiselect
587
631
  label="Filters"
588
632
  placeholder="Apply filters"
589
633
  data={[
@@ -598,7 +642,7 @@ export const UseCases: Story = {
598
642
 
599
643
  <div>
600
644
  <Text size="sm" fw={500} mb="sm">3. Multi-language Support:</Text>
601
- <Multiselect
645
+ <ADMultiselect
602
646
  label="Languages"
603
647
  placeholder="Select languages"
604
648
  data={[
@@ -619,7 +663,7 @@ export const UseCases: Story = {
619
663
 
620
664
  <div>
621
665
  <Text size="sm" fw={500} mb="sm">4. Feature Selection:</Text>
622
- <Multiselect
666
+ <ADMultiselect
623
667
  label="Features"
624
668
  placeholder="Choose features"
625
669
  data={[
@@ -636,7 +680,68 @@ export const UseCases: Story = {
636
680
  parameters: {
637
681
  docs: {
638
682
  description: {
639
- story: 'Real-world examples of Multiselect usage in different application contexts.',
683
+ story: 'Real-world examples of ADMultiselect usage in different application contexts.',
684
+ },
685
+ },
686
+ },
687
+ };
688
+
689
+ export const Controlled: Story = {
690
+ render: () => {
691
+ const [value, setValue] = useState<string[]>(['react', 'vue', 'angular']);
692
+
693
+ return (
694
+ <Stack gap="sm" w={400}>
695
+ <ADMultiselect
696
+ label="Frameworks"
697
+ placeholder="Pick frameworks"
698
+ data={[
699
+ { value: 'react', label: 'React' },
700
+ { value: 'vue', label: 'Vue.js' },
701
+ { value: 'angular', label: 'Angular' },
702
+ { value: 'svelte', label: 'Svelte' },
703
+ { value: 'solid', label: 'SolidJS' },
704
+ ]}
705
+ value={value}
706
+ onChange={setValue}
707
+ maxDisplayedValues={2}
708
+ clearable
709
+ />
710
+ <Text size="sm" c="dimmed">Selected values: {value.join(', ') || 'none'}</Text>
711
+ </Stack>
712
+ );
713
+ },
714
+ parameters: {
715
+ docs: {
716
+ description: {
717
+ story: 'Controlled with value/onChange. Pills show option labels while values stay as the option value.',
718
+ },
719
+ },
720
+ },
721
+ };
722
+
723
+ export const GroupedAndSearchable: Story = {
724
+ render: () => (
725
+ <Stack gap="lg" w={400}>
726
+ <ADMultiselect
727
+ label="Regions"
728
+ placeholder="Search regions"
729
+ searchable
730
+ nothingFoundMessage="No regions found"
731
+ data={[
732
+ { group: 'Americas', items: ['US East', 'US West', 'Canada', 'Brazil'] },
733
+ { group: 'Europe', items: ['Ireland', 'Germany', 'France'] },
734
+ { group: 'Asia Pacific', items: ['Japan', 'Singapore', 'Australia'] },
735
+ ]}
736
+ defaultValue={['US East', 'Germany', 'Japan', 'Australia']}
737
+ maxDisplayedValues={2}
738
+ />
739
+ </Stack>
740
+ ),
741
+ parameters: {
742
+ docs: {
743
+ description: {
744
+ story: 'Core features still work: grouped data, search with filtering, and hidden values grouped in "+N more".',
640
745
  },
641
746
  },
642
747
  },
@@ -651,13 +756,14 @@ export const Interactive: Story = {
651
756
  required: false,
652
757
  showOptional: false,
653
758
  disabled: false,
654
- searchable: true,
759
+ searchable: false,
655
760
  maxDisplayedValues: 2,
761
+ defaultValue: ['React', 'Vue', 'Angular'],
656
762
  },
657
763
  parameters: {
658
764
  docs: {
659
765
  description: {
660
- story: 'Use the controls below to interact with the Multiselect and see different combinations.',
766
+ story: 'Use the controls below to interact with the ADMultiselect and see different combinations.',
661
767
  },
662
768
  },
663
769
  },
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
2
  import { Stack } from '@mantine/core';
3
- import { Inline, SearchableSelect, Title, Text } from '@appdirect/design-system';
3
+ import { SearchableSelect, Title, Text } from '@appdirect/design-system';
4
4
 
5
5
  const meta: Meta<typeof SearchableSelect> = {
6
6
  title: 'Design System/Combobox/SearchableSelect',
@@ -9,11 +9,11 @@ const meta: Meta<typeof SearchableSelect> = {
9
9
  layout: 'centered',
10
10
  docs: {
11
11
  description: {
12
- component: 'Searchable select input with filtering capabilities and dropdown options.',
12
+ component: 'The DS Select with `searchable` on by default. Designers use Combobox in Figma; engineering swaps in SearchableSelect for type-to-filter fields.',
13
13
  },
14
14
  },
15
15
  },
16
- tags: ['autodocs', 'code-connected'],
16
+ tags: ['autodocs'],
17
17
  argTypes: {
18
18
  label: {
19
19
  control: 'text',
@@ -16,7 +16,7 @@ A flexible select component built on Mantine's Select with design system default
16
16
  - **Regular mode**: Standard select with borders, labels, and validation
17
17
  - **Borderless mode**: Clean, minimal appearance for dashboard widgets
18
18
  - **Searchable / Clearable**: Optional search and clear functionality
19
- - **Help icon**: Tooltip-based contextual help in the right section
19
+ - **Help icon**: Tooltip-based contextual help, a (?) icon to the right of the label
20
20
  - **Optional label**: Shows "(Optional)" text next to the label
21
21
  - **Error caption**: Separate error message prop for controlled error display
22
22
  `,