@appdirect/design-system 0.0.22 → 0.0.24

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 (53) 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/Select.js +13 -19
  5. package/dist/Combobox/Select.tsx +15 -44
  6. package/dist/Combobox/index.js +1 -1
  7. package/dist/Combobox/index.ts +2 -2
  8. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/CustomBottomToolbar.module.css +1 -24
  9. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.js +2 -5
  10. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.tsx +15 -22
  11. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.js +1 -2
  12. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.module.css +2 -9
  13. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.tsx +4 -5
  14. package/dist/ComplexComponents/DataTable/DataTableGrid/DataTableGrid.module.css +2 -6
  15. package/dist/ComplexComponents/DataTable/DataTableGrid/index.js +1 -1
  16. package/dist/ComplexComponents/DataTable/DataTableGrid/index.tsx +1 -1
  17. package/dist/DESIGN.md +7 -7
  18. package/dist/DataDisplay/Pill.js +21 -79
  19. package/dist/DataDisplay/Pill.tsx +34 -116
  20. package/dist/Inputs/ColorInput.js +12 -18
  21. package/dist/Inputs/ColorInput.tsx +13 -41
  22. package/dist/Inputs/NumberInput.js +15 -50
  23. package/dist/Inputs/NumberInput.tsx +18 -117
  24. package/dist/Inputs/Radio.js +1 -1
  25. package/dist/Inputs/Radio.tsx +1 -1
  26. package/dist/Inputs/RadioGroup.js +1 -1
  27. package/dist/Inputs/RadioGroup.tsx +1 -1
  28. package/dist/Inputs/TextArea.js +12 -18
  29. package/dist/Inputs/TextArea.tsx +13 -41
  30. package/dist/Inputs/TextInput.js +12 -18
  31. package/dist/Inputs/TextInput.tsx +13 -41
  32. package/dist/Inputs/inputLabel.js +35 -0
  33. package/dist/Inputs/inputLabel.tsx +83 -0
  34. package/dist/Overlays/Tooltip.js +2 -2
  35. package/dist/Overlays/Tooltip.tsx +4 -1
  36. package/dist/contracts/index.json +1 -1
  37. package/dist/css/foundations.css +44 -2
  38. package/dist/css/mantine.css +236 -43
  39. package/dist/css/tokens.css +58 -26
  40. package/dist/index.js +3 -3
  41. package/dist/index.ts +4 -4
  42. package/dist/stories/Combobox/{Multiselect.stories.tsx → ADMultiselect.stories.tsx} +159 -53
  43. package/dist/stories/Combobox/Select.stories.tsx +1 -1
  44. package/dist/stories/Inputs/ColorInput.stories.tsx +12 -0
  45. package/dist/stories/Inputs/NumberInput.stories.tsx +12 -0
  46. package/dist/stories/Inputs/Radio.stories.tsx +10 -5
  47. package/dist/stories/Inputs/RadioGroup.stories.tsx +122 -80
  48. package/dist/stories/Inputs/TextArea.stories.tsx +12 -0
  49. package/dist/stories/Inputs/TextInput.stories.tsx +12 -0
  50. package/dist/stories/index.json +40 -32
  51. package/package.json +10 -6
  52. package/dist/Combobox/Multiselect.js +0 -31
  53. package/dist/Combobox/Multiselect.tsx +0 -158
@@ -49,9 +49,11 @@ export const Default: Story = {
49
49
 
50
50
  return (
51
51
  <RadioGroup label="Choose an option" value={value} onChange={(v) => setValue(String(v))}>
52
- <Radio value="option1" label="First option" />
53
- <Radio value="option2" label="Second option" />
54
- <Radio value="option3" label="Third option" />
52
+ <Stack gap="xs">
53
+ <Radio value="option1" label="First option" />
54
+ <Radio value="option2" label="Second option" />
55
+ <Radio value="option3" label="Third option" />
56
+ </Stack>
55
57
  </RadioGroup>
56
58
  );
57
59
  },
@@ -80,9 +82,11 @@ export const Sizes: Story = {
80
82
  value={values[size]}
81
83
  onChange={(val) => setValues(prev => ({ ...prev, [size]: String(val) }))}
82
84
  >
83
- <Radio value="option1" label="First option" />
84
- <Radio value="option2" label="Second option" />
85
- <Radio value="option3" label="Third option" />
85
+ <Stack gap="xs">
86
+ <Radio value="option1" label="First option" />
87
+ <Radio value="option2" label="Second option" />
88
+ <Radio value="option3" label="Third option" />
89
+ </Stack>
86
90
  </RadioGroup>
87
91
  </div>
88
92
  ))}
@@ -109,9 +113,11 @@ export const WithDescription: Story = {
109
113
  value={value}
110
114
  onChange={(v) => setValue(String(v))}
111
115
  >
112
- <Radio value="basic" label="Basic - $9/month" />
113
- <Radio value="pro" label="Pro - $29/month" />
114
- <Radio value="enterprise" label="Enterprise - $99/month" />
116
+ <Stack gap="xs">
117
+ <Radio value="basic" label="Basic - $9/month" />
118
+ <Radio value="pro" label="Pro - $29/month" />
119
+ <Radio value="enterprise" label="Enterprise - $99/month" />
120
+ </Stack>
115
121
  </RadioGroup>
116
122
  );
117
123
  },
@@ -136,10 +142,12 @@ export const Required: Story = {
136
142
  value={value}
137
143
  onChange={(v) => setValue(String(v))}
138
144
  >
139
- <Radio value="card" label="Credit Card" />
140
- <Radio value="paypal" label="PayPal" />
141
- <Radio value="bank" label="Bank Transfer" />
142
- <Radio value="crypto" label="Cryptocurrency" />
145
+ <Stack gap="xs">
146
+ <Radio value="card" label="Credit Card" />
147
+ <Radio value="paypal" label="PayPal" />
148
+ <Radio value="bank" label="Bank Transfer" />
149
+ <Radio value="crypto" label="Cryptocurrency" />
150
+ </Stack>
143
151
  </RadioGroup>
144
152
  );
145
153
  },
@@ -165,10 +173,12 @@ export const WithError: Story = {
165
173
  value={value}
166
174
  onChange={(v) => setValue(String(v))}
167
175
  >
168
- <Radio value="standard" label="Standard Delivery (5-7 days)" />
169
- <Radio value="express" label="Express Delivery (2-3 days)" />
170
- <Radio value="overnight" label="Overnight Delivery" />
171
- <Radio value="pickup" label="Store Pickup" />
176
+ <Stack gap="xs">
177
+ <Radio value="standard" label="Standard Delivery (5-7 days)" />
178
+ <Radio value="express" label="Express Delivery (2-3 days)" />
179
+ <Radio value="overnight" label="Overnight Delivery" />
180
+ <Radio value="pickup" label="Store Pickup" />
181
+ </Stack>
172
182
  </RadioGroup>
173
183
  );
174
184
  },
@@ -195,10 +205,12 @@ export const DisabledStates: Story = {
195
205
  value={value}
196
206
  onChange={(v) => setValue(String(v))}
197
207
  >
198
- <Radio value="option1" label="Available option" />
199
- <Radio value="option2" label="Selected option" />
200
- <Radio value="option3" label="Disabled option" disabled />
201
- <Radio value="option4" label="Another disabled option" disabled />
208
+ <Stack gap="xs">
209
+ <Radio value="option1" label="Available option" />
210
+ <Radio value="option2" label="Selected option" />
211
+ <Radio value="option3" label="Disabled option" disabled />
212
+ <Radio value="option4" label="Another disabled option" disabled />
213
+ </Stack>
202
214
  </RadioGroup>
203
215
  </div>
204
216
  </Stack>
@@ -250,10 +262,12 @@ export const FormIntegration: Story = {
250
262
  value={formData.priority}
251
263
  onChange={(val) => setFormData(prev => ({ ...prev, priority: String(val) }))}
252
264
  >
253
- <Radio value="low" label="🟢 Low Priority" />
254
- <Radio value="medium" label="🟡 Medium Priority" />
255
- <Radio value="high" label="🟠 High Priority" />
256
- <Radio value="urgent" label="🔴 Urgent" />
265
+ <Stack gap="xs">
266
+ <Radio value="low" label="🟢 Low Priority" />
267
+ <Radio value="medium" label="🟡 Medium Priority" />
268
+ <Radio value="high" label="🟠 High Priority" />
269
+ <Radio value="urgent" label="🔴 Urgent" />
270
+ </Stack>
257
271
  </RadioGroup>
258
272
 
259
273
  <RadioGroup
@@ -264,10 +278,12 @@ export const FormIntegration: Story = {
264
278
  value={formData.category}
265
279
  onChange={(val) => setFormData(prev => ({ ...prev, category: String(val) }))}
266
280
  >
267
- <Radio value="development" label="Development" />
268
- <Radio value="design" label="Design" />
269
- <Radio value="testing" label="Testing" />
270
- <Radio value="documentation" label="Documentation" />
281
+ <Stack gap="xs">
282
+ <Radio value="development" label="Development" />
283
+ <Radio value="design" label="Design" />
284
+ <Radio value="testing" label="Testing" />
285
+ <Radio value="documentation" label="Documentation" />
286
+ </Stack>
271
287
  </RadioGroup>
272
288
 
273
289
  <RadioGroup
@@ -278,9 +294,11 @@ export const FormIntegration: Story = {
278
294
  value={formData.visibility}
279
295
  onChange={(val) => setFormData(prev => ({ ...prev, visibility: String(val) }))}
280
296
  >
281
- <Radio value="private" label="Private (Only me)" />
282
- <Radio value="team" label="Team members" />
283
- <Radio value="public" label="Everyone" />
297
+ <Stack gap="xs">
298
+ <Radio value="private" label="Private (Only me)" />
299
+ <Radio value="team" label="Team members" />
300
+ <Radio value="public" label="Everyone" />
301
+ </Stack>
284
302
  </RadioGroup>
285
303
 
286
304
  <Button variant="primary" onClick={handleSubmit}>
@@ -317,9 +335,11 @@ export const SettingsConfiguration: Story = {
317
335
  value={settings.theme}
318
336
  onChange={(val) => setSettings(prev => ({ ...prev, theme: String(val) }))}
319
337
  >
320
- <Radio value="light" label="☀️ Light Theme" />
321
- <Radio value="dark" label="🌙 Dark Theme" />
322
- <Radio value="auto" label="🔄 Auto (System)" />
338
+ <Stack gap="xs">
339
+ <Radio value="light" label="☀️ Light Theme" />
340
+ <Radio value="dark" label="🌙 Dark Theme" />
341
+ <Radio value="auto" label="🔄 Auto (System)" />
342
+ </Stack>
323
343
  </RadioGroup>
324
344
 
325
345
  <RadioGroup
@@ -328,10 +348,12 @@ export const SettingsConfiguration: Story = {
328
348
  value={settings.notifications}
329
349
  onChange={(val) => setSettings(prev => ({ ...prev, notifications: String(val) }))}
330
350
  >
331
- <Radio value="all" label="All notifications" />
332
- <Radio value="important" label="Important only" />
333
- <Radio value="mentions" label="Mentions and replies" />
334
- <Radio value="none" label="No notifications" />
351
+ <Stack gap="xs">
352
+ <Radio value="all" label="All notifications" />
353
+ <Radio value="important" label="Important only" />
354
+ <Radio value="mentions" label="Mentions and replies" />
355
+ <Radio value="none" label="No notifications" />
356
+ </Stack>
335
357
  </RadioGroup>
336
358
 
337
359
  <RadioGroup
@@ -340,9 +362,11 @@ export const SettingsConfiguration: Story = {
340
362
  value={settings.privacy}
341
363
  onChange={(val) => setSettings(prev => ({ ...prev, privacy: String(val) }))}
342
364
  >
343
- <Radio value="public" label="🌍 Public" />
344
- <Radio value="friends" label="👥 Friends only" />
345
- <Radio value="private" label="🔒 Private" />
365
+ <Stack gap="xs">
366
+ <Radio value="public" label="🌍 Public" />
367
+ <Radio value="friends" label="👥 Friends only" />
368
+ <Radio value="private" label="🔒 Private" />
369
+ </Stack>
346
370
  </RadioGroup>
347
371
 
348
372
  <RadioGroup
@@ -351,10 +375,12 @@ export const SettingsConfiguration: Story = {
351
375
  value={settings.language}
352
376
  onChange={(val) => setSettings(prev => ({ ...prev, language: String(val) }))}
353
377
  >
354
- <Radio value="en" label="🇺🇸 English" />
355
- <Radio value="es" label="🇪🇸 Spanish" />
356
- <Radio value="fr" label="🇫🇷 French" />
357
- <Radio value="de" label="🇩🇪 German" />
378
+ <Stack gap="xs">
379
+ <Radio value="en" label="🇺🇸 English" />
380
+ <Radio value="es" label="🇪🇸 Spanish" />
381
+ <Radio value="fr" label="🇫🇷 French" />
382
+ <Radio value="de" label="🇩🇪 German" />
383
+ </Stack>
358
384
  </RadioGroup>
359
385
  </Stack>
360
386
  );
@@ -387,11 +413,13 @@ export const SurveyQuestions: Story = {
387
413
  value={answers.satisfaction}
388
414
  onChange={(val) => setAnswers(prev => ({ ...prev, satisfaction: String(val) }))}
389
415
  >
390
- <Radio value="very-satisfied" label="😊 Very Satisfied" />
391
- <Radio value="satisfied" label="🙂 Satisfied" />
392
- <Radio value="neutral" label="😐 Neutral" />
393
- <Radio value="dissatisfied" label="🙁 Dissatisfied" />
394
- <Radio value="very-dissatisfied" label="😞 Very Dissatisfied" />
416
+ <Stack gap="xs">
417
+ <Radio value="very-satisfied" label="😊 Very Satisfied" />
418
+ <Radio value="satisfied" label="🙂 Satisfied" />
419
+ <Radio value="neutral" label="😐 Neutral" />
420
+ <Radio value="dissatisfied" label="🙁 Dissatisfied" />
421
+ <Radio value="very-dissatisfied" label="😞 Very Dissatisfied" />
422
+ </Stack>
395
423
  </RadioGroup>
396
424
 
397
425
  <RadioGroup
@@ -414,11 +442,13 @@ export const SurveyQuestions: Story = {
414
442
  value={answers.frequency}
415
443
  onChange={(val) => setAnswers(prev => ({ ...prev, frequency: String(val) }))}
416
444
  >
417
- <Radio value="daily" label="Daily" />
418
- <Radio value="weekly" label="Weekly" />
419
- <Radio value="monthly" label="Monthly" />
420
- <Radio value="rarely" label="Rarely" />
421
- <Radio value="first-time" label="This is my first time" />
445
+ <Stack gap="xs">
446
+ <Radio value="daily" label="Daily" />
447
+ <Radio value="weekly" label="Weekly" />
448
+ <Radio value="monthly" label="Monthly" />
449
+ <Radio value="rarely" label="Rarely" />
450
+ <Radio value="first-time" label="This is my first time" />
451
+ </Stack>
422
452
  </RadioGroup>
423
453
 
424
454
  <RadioGroup
@@ -426,12 +456,14 @@ export const SurveyQuestions: Story = {
426
456
  value={answers.improvement}
427
457
  onChange={(val) => setAnswers(prev => ({ ...prev, improvement: String(val) }))}
428
458
  >
429
- <Radio value="speed" label="Speed and performance" />
430
- <Radio value="features" label="Features and functionality" />
431
- <Radio value="design" label="User interface design" />
432
- <Radio value="support" label="Customer support" />
433
- <Radio value="pricing" label="Pricing" />
434
- <Radio value="other" label="Other" />
459
+ <Stack gap="xs">
460
+ <Radio value="speed" label="Speed and performance" />
461
+ <Radio value="features" label="Features and functionality" />
462
+ <Radio value="design" label="User interface design" />
463
+ <Radio value="support" label="Customer support" />
464
+ <Radio value="pricing" label="Pricing" />
465
+ <Radio value="other" label="Other" />
466
+ </Stack>
435
467
  </RadioGroup>
436
468
  </Stack>
437
469
  );
@@ -453,38 +485,46 @@ export const UseCases: Story = {
453
485
  <div>
454
486
  <Text size="sm" fw={500} mb="sm">1. Payment Methods:</Text>
455
487
  <RadioGroup label="Payment Method" defaultValue="card">
456
- <Radio value="card" label="💳 Credit/Debit Card" />
457
- <Radio value="paypal" label="🅿️ PayPal" />
458
- <Radio value="apple" label="🍎 Apple Pay" />
459
- <Radio value="google" label="🔵 Google Pay" />
488
+ <Stack gap="xs">
489
+ <Radio value="card" label="💳 Credit/Debit Card" />
490
+ <Radio value="paypal" label="🅿️ PayPal" />
491
+ <Radio value="apple" label="🍎 Apple Pay" />
492
+ <Radio value="google" label="🔵 Google Pay" />
493
+ </Stack>
460
494
  </RadioGroup>
461
495
  </div>
462
496
 
463
497
  <div>
464
498
  <Text size="sm" fw={500} mb="sm">2. Shipping Options:</Text>
465
499
  <RadioGroup label="Delivery Speed" defaultValue="standard">
466
- <Radio value="standard" label="📦 Standard (5-7 days) - Free" />
467
- <Radio value="express" label="⚡ Express (2-3 days) - $9.99" />
468
- <Radio value="overnight" label="🚀 Overnight - $24.99" />
500
+ <Stack gap="xs">
501
+ <Radio value="standard" label="📦 Standard (5-7 days) - Free" />
502
+ <Radio value="express" label="⚡ Express (2-3 days) - $9.99" />
503
+ <Radio value="overnight" label="🚀 Overnight - $24.99" />
504
+ </Stack>
469
505
  </RadioGroup>
470
506
  </div>
471
507
 
472
508
  <div>
473
509
  <Text size="sm" fw={500} mb="sm">3. Account Types:</Text>
474
510
  <RadioGroup label="Account Type" defaultValue="personal">
475
- <Radio value="personal" label="👤 Personal Account" />
476
- <Radio value="business" label="🏢 Business Account" />
477
- <Radio value="enterprise" label="🏭 Enterprise Account" />
511
+ <Stack gap="xs">
512
+ <Radio value="personal" label="👤 Personal Account" />
513
+ <Radio value="business" label="🏢 Business Account" />
514
+ <Radio value="enterprise" label="🏭 Enterprise Account" />
515
+ </Stack>
478
516
  </RadioGroup>
479
517
  </div>
480
518
 
481
519
  <div>
482
520
  <Text size="sm" fw={500} mb="sm">4. Contact Preferences:</Text>
483
521
  <RadioGroup label="Preferred Contact Method" defaultValue="email">
484
- <Radio value="email" label="📧 Email" />
485
- <Radio value="phone" label="📞 Phone" />
486
- <Radio value="sms" label="💬 SMS" />
487
- <Radio value="none" label="🚫 Do not contact" />
522
+ <Stack gap="xs">
523
+ <Radio value="email" label="📧 Email" />
524
+ <Radio value="phone" label="📞 Phone" />
525
+ <Radio value="sms" label="💬 SMS" />
526
+ <Radio value="none" label="🚫 Do not contact" />
527
+ </Stack>
488
528
  </RadioGroup>
489
529
  </div>
490
530
  </Stack>
@@ -503,16 +543,18 @@ export const Interactive: Story = {
503
543
  label: 'Interactive RadioGroup',
504
544
  description: 'Use the controls to modify this RadioGroup',
505
545
  required: false,
506
- size: 'md',
546
+ size: 'sm',
507
547
  },
508
548
  render: (args) => {
509
549
  const [value, setValue] = useState<string>('');
510
550
 
511
551
  return (
512
552
  <RadioGroup {...args} value={value} onChange={(v) => setValue(String(v))}>
513
- <Radio value="option1" label="First option" />
514
- <Radio value="option2" label="Second option" />
515
- <Radio value="option3" label="Third option" />
553
+ <Stack gap="xs">
554
+ <Radio value="option1" label="First option" />
555
+ <Radio value="option2" label="Second option" />
556
+ <Radio value="option3" label="Third option" />
557
+ </Stack>
516
558
  </RadioGroup>
517
559
  );
518
560
  },
@@ -33,6 +33,8 @@ const meta: Meta<typeof TextArea> = {
33
33
  control: 'boolean',
34
34
  description: 'Required field (shows asterisk)',
35
35
  },
36
+ hasHelpIcon: { control: 'boolean' },
37
+ helpIconLabel: { control: 'text' },
36
38
  showOptional: {
37
39
  control: 'boolean',
38
40
  description: 'Show "(Optional)" text after label',
@@ -78,6 +80,16 @@ export const Default: Story = {
78
80
  },
79
81
  };
80
82
 
83
+ export const WithHelpIcon: Story = {
84
+ args: {
85
+ label: 'Comments',
86
+ placeholder: 'Enter your comments',
87
+ required: true,
88
+ hasHelpIcon: true,
89
+ helpIconLabel: 'More information about this field',
90
+ },
91
+ };
92
+
81
93
  export const Sizes: Story = {
82
94
  render: () => (
83
95
  <Stack gap="md" w={400}>
@@ -34,6 +34,8 @@ const meta: Meta<typeof TextInput> = {
34
34
  control: 'boolean',
35
35
  description: 'Required field (shows asterisk)',
36
36
  },
37
+ hasHelpIcon: { control: 'boolean' },
38
+ helpIconLabel: { control: 'text' },
37
39
  showOptional: {
38
40
  control: 'boolean',
39
41
  description: 'Show "(Optional)" text after label',
@@ -63,6 +65,16 @@ export const Default: Story = {
63
65
  },
64
66
  };
65
67
 
68
+ export const WithHelpIcon: Story = {
69
+ args: {
70
+ label: 'Name',
71
+ placeholder: 'Enter your name',
72
+ required: true,
73
+ hasHelpIcon: true,
74
+ helpIconLabel: 'More information about this field',
75
+ },
76
+ };
77
+
66
78
  export const Sizes: Story = {
67
79
  render: () => (
68
80
  <Stack gap="md" w={300}>
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.22",
2
+ "version": "0.0.24",
3
3
  "stories": [
4
4
  {
5
5
  "title": "Design System/Buttons/ActionIcon",
@@ -67,6 +67,40 @@
67
67
  "Stack"
68
68
  ]
69
69
  },
70
+ {
71
+ "title": "Design System/Combobox/ADMultiselect",
72
+ "component": "ADMultiselect",
73
+ "description": "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.",
74
+ "stories": [
75
+ "Default",
76
+ "WithHelpIcon",
77
+ "WithErrorCaption",
78
+ "Sizes",
79
+ "WithDescription",
80
+ "RequiredAndOptional",
81
+ "WithError",
82
+ "DisabledState",
83
+ "MaxDisplayedValues",
84
+ "DifferentDataTypes",
85
+ "FormIntegration",
86
+ "TagSelection",
87
+ "TeamAndPermissions",
88
+ "UseCases",
89
+ "Controlled",
90
+ "GroupedAndSearchable",
91
+ "Interactive"
92
+ ],
93
+ "file": "Combobox/ADMultiselect.stories.tsx",
94
+ "designSystem": [
95
+ "ADMultiselect",
96
+ "Text",
97
+ "Title"
98
+ ],
99
+ "mantine": [
100
+ "Box",
101
+ "Stack"
102
+ ]
103
+ },
70
104
  {
71
105
  "title": "Design System/Combobox/AutocompleteClearable",
72
106
  "component": "AutocompleteClearable",
@@ -113,36 +147,6 @@
113
147
  ],
114
148
  "mantine": []
115
149
  },
116
- {
117
- "title": "Design System/Combobox/Multiselect",
118
- "component": "Multiselect",
119
- "description": "Multi-selection input with pills display and checkbox options.",
120
- "stories": [
121
- "Default",
122
- "Sizes",
123
- "WithDescription",
124
- "RequiredAndOptional",
125
- "WithError",
126
- "DisabledState",
127
- "MaxDisplayedValues",
128
- "DifferentDataTypes",
129
- "FormIntegration",
130
- "TagSelection",
131
- "TeamAndPermissions",
132
- "UseCases",
133
- "Interactive"
134
- ],
135
- "file": "Combobox/Multiselect.stories.tsx",
136
- "designSystem": [
137
- "Inline",
138
- "Multiselect",
139
- "Text",
140
- "Title"
141
- ],
142
- "mantine": [
143
- "Stack"
144
- ]
145
- },
146
150
  {
147
151
  "title": "Design System/Combobox/SearchableSelect",
148
152
  "component": "SearchableSelect",
@@ -176,7 +180,7 @@
176
180
  {
177
181
  "title": "Design System/Combobox/Select",
178
182
  "component": "Select",
179
- "description": "A flexible select component built on Mantine's Select with design system defaults. **Features:** - **Regular mode**: Standard select with borders, labels, and validation - **Borderless mode**: Clean, minimal appearance for dashboard widgets - **Searchable / Clearable**: Optional search and clear functionality - **Help icon**: Tooltip-based contextual help in the right section - **Optional label**: Shows \"(Optional)\" text next to the label - **Error caption**: Separate error message prop for controlled error display",
183
+ "description": "A flexible select component built on Mantine's Select with design system defaults. **Features:** - **Regular mode**: Standard select with borders, labels, and validation - **Borderless mode**: Clean, minimal appearance for dashboard widgets - **Searchable / Clearable**: Optional search and clear functionality - **Help icon**: Tooltip-based contextual help, a (?) icon to the right of the label - **Optional label**: Shows \"(Optional)\" text next to the label - **Error caption**: Separate error message prop for controlled error display",
180
184
  "stories": [
181
185
  "Default",
182
186
  "WithObjectData",
@@ -767,6 +771,7 @@
767
771
  "description": "ColorInput component for color selection with consistent design system styling and multiple format support.",
768
772
  "stories": [
769
773
  "Default",
774
+ "WithHelpIcon",
770
775
  "Sizes",
771
776
  "LabelVariants",
772
777
  "States",
@@ -846,6 +851,7 @@
846
851
  "description": "NumberInput component for numeric values with consistent design system styling and validation.",
847
852
  "stories": [
848
853
  "Default",
854
+ "WithHelpIcon",
849
855
  "Sizes",
850
856
  "LabelVariants",
851
857
  "States",
@@ -1002,6 +1008,7 @@
1002
1008
  "description": "TextArea component for multi-line text input with consistent design system styling and auto-sizing capabilities.",
1003
1009
  "stories": [
1004
1010
  "Default",
1011
+ "WithHelpIcon",
1005
1012
  "Sizes",
1006
1013
  "LabelVariants",
1007
1014
  "States",
@@ -1028,6 +1035,7 @@
1028
1035
  "description": "TextInput component with design system sizing, consistent styling, and enhanced label options.",
1029
1036
  "stories": [
1030
1037
  "Default",
1038
+ "WithHelpIcon",
1031
1039
  "Sizes",
1032
1040
  "LabelVariants",
1033
1041
  "WithIcons",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appdirect/design-system",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "AppDirect Design System components. Wraps Mantine v9 with standardized props, variants, and tokens.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.ts",
@@ -49,21 +49,25 @@
49
49
  "prepublishOnly": "npm run build"
50
50
  },
51
51
  "dependencies": {
52
- "@appdirect/ad-design-tokens": "0.0.22",
53
- "@mantine/dropzone": "^9.6.0",
52
+ "@appdirect/ad-design-tokens": "0.0.24",
54
53
  "@remixicon/react": "^4.6.0",
55
54
  "@tabler/icons-react": "^3.33.0",
56
55
  "@tanstack/react-table": "^9.2.4",
57
56
  "clsx": "^2.1.1"
58
57
  },
59
58
  "peerDependencies": {
60
- "@mantine/core": "^9.6.0",
61
- "@mantine/dates": "^9.6.0",
62
- "@mantine/hooks": "^9.6.0",
59
+ "@mantine/core": "^9.8.2",
60
+ "@mantine/dates": "^9.8.2",
61
+ "@mantine/dropzone": "^9.8.2",
62
+ "@mantine/hooks": "^9.8.2",
63
63
  "react": "^19.2.0",
64
64
  "react-dom": "^19.2.0"
65
65
  },
66
66
  "devDependencies": {
67
+ "@mantine/core": "^9.8.2",
68
+ "@mantine/dates": "^9.8.2",
69
+ "@mantine/dropzone": "^9.8.2",
70
+ "@mantine/hooks": "^9.8.2",
67
71
  "typescript": "^5.9.3"
68
72
  },
69
73
  "repository": {
@@ -1,31 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useState } from 'react';
4
- import { Checkbox, Combobox, Input, Pill as MantinePill, PillsInput, useCombobox, InputWrapper } from '@mantine/core';
5
- import { Inline } from '../index.js';
6
- import { Pill } from '../DataDisplay/Pill.js';
7
- const technologies = ['React', 'Vue', 'Angular', 'Node.js', 'Docker', 'Kubernetes', 'AWS', 'MongoDB'];
8
- const MAX_DISPLAYED_VALUES = 2;
9
- export function Multiselect({ label, placeholder = "Pick one or more technologies", data = technologies, description, error, required = false, showOptional = false, disabled = false, searchable = true, size = 'md', style, maxDisplayedValues = MAX_DISPLAYED_VALUES, ...props }) {
10
- const combobox = useCombobox({
11
- onDropdownClose: () => combobox.resetSelectedOption(),
12
- onDropdownOpen: () => combobox.updateSelectedOptionIndex('active'),
13
- });
14
- const [value, setValue] = useState([]);
15
- const handleValueSelect = (val) => setValue((current) => current.includes(val) ? current.filter((v) => v !== val) : [...current, val]);
16
- const handleValueRemove = (val) => setValue((current) => current.filter((v) => v !== val));
17
- const values = value
18
- .slice(0, maxDisplayedValues === value.length ? maxDisplayedValues : maxDisplayedValues - 1)
19
- .map((item) => (_jsx(Pill, { withRemoveButton: true, onRemove: () => handleValueRemove(item), size: size, children: item }, item)));
20
- // Convert data to consistent format
21
- const normalizedData = data.map(item => typeof item === 'string' ? { value: item, label: item } : item);
22
- const options = normalizedData.map((item) => (_jsx(Combobox.Option, { value: item.value, active: value.includes(item.value), children: _jsxs(Inline, { gap: "sm", children: [_jsx(Checkbox, { checked: value.includes(item.value), onChange: () => { }, "aria-hidden": true, tabIndex: -1, style: { pointerEvents: 'none' } }), _jsx("span", { children: item.label })] }) }, item.value)));
23
- // Determine the display label
24
- const displayLabel = showOptional && !required && label ? `${label} (optional)` : label;
25
- return (_jsx("div", { style: style, children: _jsx(InputWrapper, { label: displayLabel, description: description, error: error, required: required && !showOptional, size: size, withAsterisk: required && !showOptional, children: _jsxs(Combobox, { store: combobox, onOptionSubmit: handleValueSelect, withinPortal: false, disabled: disabled, children: [_jsx(Combobox.DropdownTarget, { children: _jsx(PillsInput, { pointer: true, onClick: () => !disabled && combobox.toggleDropdown(), size: size, disabled: disabled, error: !!error, children: _jsxs(MantinePill.Group, { children: [value.length > 0 ? (_jsxs(_Fragment, { children: [values, value.length > maxDisplayedValues && (_jsxs(Pill, { size: size, children: ["+", value.length - (maxDisplayedValues - 1), " more"] }))] })) : (_jsx(Input.Placeholder, { children: placeholder })), _jsx(Combobox.EventsTarget, { children: _jsx(PillsInput.Field, { type: "hidden", onBlur: () => combobox.closeDropdown(), onKeyDown: (event) => {
26
- if (event.key === 'Backspace' && !disabled) {
27
- event.preventDefault();
28
- handleValueRemove(value[value.length - 1]);
29
- }
30
- }, disabled: disabled }) })] }) }) }), _jsx(Combobox.Dropdown, { children: _jsx(Combobox.Options, { children: options }) })] }) }) }));
31
- }