@altimateai/ui-components 0.0.21 → 0.0.23-beta.1

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.
@@ -307,3 +307,157 @@ const ComboboxColumnsExample = () => {
307
307
  />
308
308
  );
309
309
  };
310
+
311
+ export const ComboboxAdvancedExample: StoryFn = () => {
312
+ const options = [
313
+ { value: "react", label: "React" },
314
+ { value: "vue", label: "Vue" },
315
+ { value: "angular", label: "Angular" },
316
+ { value: "svelte", label: "Svelte" },
317
+ { value: "nextjs", label: "Next.js" },
318
+ { value: "remix", label: "Remix" },
319
+ { value: "gatsby", label: "Gatsby" },
320
+ { value: "ember", label: "Ember.js" },
321
+ ];
322
+
323
+ const [singleValue, setSingleValue] = useState("");
324
+ const [multiValue, setMultiValue] = useState<string[]>(["react", "vue"]);
325
+ const [clearableValue, setClearableValue] = useState("angular");
326
+ const [multiClearableValue, setMultiClearableValue] = useState<string[]>(["nextjs", "remix"]);
327
+ const [multiApplyValue, setMultiApplyValue] = useState<string[]>(["gatsby", "ember"]);
328
+
329
+ return (
330
+ <div className="al-flex al-flex-col al-gap-8 al-justify-start al-items-start">
331
+ <div className="al-flex al-flex-col al-gap-4">
332
+ <h3 className="al-text-lg al-font-medium">Search Placeholders</h3>
333
+ <p className="al-text-sm al-text-muted-foreground">Different search placeholder examples</p>
334
+
335
+ <div className="al-flex al-flex-col al-gap-2">
336
+ <label className="al-text-sm al-font-medium">Default Search Placeholder</label>
337
+ <Combobox
338
+ options={options}
339
+ value={singleValue}
340
+ onChange={value => setSingleValue(value as string)}
341
+ placeholder="Select framework..."
342
+ buttonProps={{ className: "al-w-[250px]" }}
343
+ />
344
+ </div>
345
+
346
+ <div className="al-flex al-flex-col al-gap-2">
347
+ <label className="al-text-sm al-font-medium">Custom Search Placeholder</label>
348
+ <Combobox
349
+ options={options}
350
+ value={singleValue}
351
+ onChange={value => setSingleValue(value as string)}
352
+ placeholder="Select framework..."
353
+ searchPlaceholder="Type to find frameworks..."
354
+ buttonProps={{ className: "al-w-[250px]" }}
355
+ />
356
+ </div>
357
+
358
+ <div className="al-flex al-flex-col al-gap-2">
359
+ <label className="al-text-sm al-font-medium">Empty Search Placeholder</label>
360
+ <Combobox
361
+ options={options}
362
+ value={singleValue}
363
+ onChange={value => setSingleValue(value as string)}
364
+ placeholder="Select framework..."
365
+ searchPlaceholder=""
366
+ buttonProps={{ className: "al-w-[250px]" }}
367
+ />
368
+ </div>
369
+ </div>
370
+
371
+ <div className="al-flex al-flex-col al-gap-4">
372
+ <h3 className="al-text-lg al-font-medium">Clear Button Examples</h3>
373
+ <p className="al-text-sm al-text-muted-foreground">
374
+ Demonstrating showClearButton prop with different configurations
375
+ </p>
376
+
377
+ <div className="al-flex al-flex-col al-gap-2">
378
+ <label className="al-text-sm al-font-medium">
379
+ Single Select - No Clear Button (Default)
380
+ </label>
381
+ <Combobox
382
+ options={options}
383
+ value={clearableValue}
384
+ onChange={value => setClearableValue(value as string)}
385
+ placeholder="Select framework..."
386
+ searchPlaceholder="Search frameworks..."
387
+ showClearButton={false}
388
+ buttonProps={{ className: "al-w-[250px]" }}
389
+ />
390
+ </div>
391
+
392
+ <div className="al-flex al-flex-col al-gap-2">
393
+ <label className="al-text-sm al-font-medium">Single Select - With Clear Button</label>
394
+ <Combobox
395
+ options={options}
396
+ value={clearableValue}
397
+ onChange={value => setClearableValue(value as string)}
398
+ placeholder="Select framework..."
399
+ searchPlaceholder="Search frameworks..."
400
+ showClearButton={true}
401
+ buttonProps={{ className: "al-w-[250px]" }}
402
+ />
403
+ </div>
404
+
405
+ <div className="al-flex al-flex-col al-gap-2">
406
+ <label className="al-text-sm al-font-medium">Multi Select - No Clear Button</label>
407
+ <Combobox
408
+ options={options}
409
+ value={multiValue}
410
+ onChange={value => setMultiValue(value as string[])}
411
+ placeholder="Select frameworks..."
412
+ searchPlaceholder="Find your frameworks..."
413
+ multiSelect={true}
414
+ showClearButton={false}
415
+ buttonProps={{ className: "al-w-[250px]" }}
416
+ />
417
+ <div className="al-text-sm">
418
+ Selected: {multiValue.length > 0 ? multiValue.join(", ") : "None"}
419
+ </div>
420
+ </div>
421
+
422
+ <div className="al-flex al-flex-col al-gap-2">
423
+ <label className="al-text-sm al-font-medium">Multi Select - With Clear Button</label>
424
+ <Combobox
425
+ options={options}
426
+ value={multiClearableValue}
427
+ onChange={value => setMultiClearableValue(value as string[])}
428
+ placeholder="Select frameworks..."
429
+ searchPlaceholder="Find your frameworks..."
430
+ multiSelect={true}
431
+ showClearButton={true}
432
+ buttonProps={{ className: "al-w-[250px]" }}
433
+ />
434
+ <div className="al-text-sm">
435
+ Selected: {multiClearableValue.length > 0 ? multiClearableValue.join(", ") : "None"}
436
+ </div>
437
+ </div>
438
+
439
+ <div className="al-flex al-flex-col al-gap-2">
440
+ <label className="al-text-sm al-font-medium">
441
+ Multi Select - With Apply Button & Clear Button
442
+ </label>
443
+ <Combobox
444
+ options={options}
445
+ value={multiApplyValue}
446
+ onChange={value => setMultiApplyValue(value as string[])}
447
+ placeholder="Select frameworks..."
448
+ searchPlaceholder="Filter options..."
449
+ multiSelect={true}
450
+ showApplyButton={true}
451
+ showClearButton={true}
452
+ buttonProps={{ className: "al-w-[250px]" }}
453
+ />
454
+ <div className="al-text-sm">
455
+ Selected: {multiApplyValue.length > 0 ? multiApplyValue.join(", ") : "None"}
456
+ </div>
457
+ </div>
458
+ </div>
459
+ </div>
460
+ );
461
+ };
462
+
463
+ // Example that matches the UI in the screenshot
@@ -39,8 +39,8 @@ export const Typography: Story = {
39
39
  Heading 1 <br />
40
40
  Bold
41
41
  </Component>
42
- <Component variant="caption" className="al-text-gray-500">
43
- 48px / Line height: 60px
42
+ <Component variant="caption" className="text-gray-500">
43
+ 32px / Line height: 32px
44
44
  </Component>
45
45
  </div>
46
46
 
@@ -62,8 +62,8 @@ export const Typography: Story = {
62
62
  Heading 2 <br />
63
63
  Bold
64
64
  </Component>
65
- <Component variant="caption" className="al-text-gray-500">
66
- 36px / Line height: 44px
65
+ <Component variant="caption" className="text-gray-500">
66
+ 24px / Line height: 32px
67
67
  </Component>
68
68
  </div>
69
69
 
@@ -85,8 +85,8 @@ export const Typography: Story = {
85
85
  Heading 3 <br />
86
86
  Bold
87
87
  </Component>
88
- <Component variant="caption" className="al-text-gray-500">
89
- 30px / Line height: 38px
88
+ <Component variant="caption" className="text-gray-500">
89
+ 18px / Line height: 26px
90
90
  </Component>
91
91
  </div>
92
92
 
@@ -108,8 +108,8 @@ export const Typography: Story = {
108
108
  Heading 4 <br />
109
109
  Bold
110
110
  </Component>
111
- <Component variant="caption" className="al-text-gray-500">
112
- 24px / Line height: 32px
111
+ <Component variant="caption" className="text-gray-500">
112
+ 16px / Line height: 24px
113
113
  </Component>
114
114
  </div>
115
115
 
@@ -131,8 +131,8 @@ export const Typography: Story = {
131
131
  Sub heading <br />
132
132
  Bold
133
133
  </Component>
134
- <Component variant="caption" className="al-text-gray-500">
135
- 20px / Line height: 30px
134
+ <Component variant="caption" className="text-gray-500">
135
+ 14px / Line height: 20px
136
136
  </Component>
137
137
  </div>
138
138
 
@@ -150,8 +150,8 @@ export const Typography: Story = {
150
150
  <Component variant="body" size="xl">
151
151
  Body XL <br /> Regular
152
152
  </Component>
153
- <Component variant="caption" className="al-text-gray-500">
154
- 20px, 16px, 14px, 12px | Line height: 30px, 24px, 20px, 18px
153
+ <Component variant="caption" className="text-gray-500">
154
+ 14px, 10px, 8px | Line height: 18px, 16px, 14px
155
155
  </Component>
156
156
  </div>
157
157
 
@@ -169,8 +169,8 @@ export const Typography: Story = {
169
169
  <Component variant="caption" weight="medium" size="lg">
170
170
  Caption LG <br /> Medium
171
171
  </Component>
172
- <Component variant="caption" className="al-text-gray-500">
173
- 12px, 14px, 16px | Line height: 24px, 20px, 18px
172
+ <Component variant="caption" className="text-gray-500">
173
+ 14px, 10px | Line height: 18px, 16px
174
174
  </Component>
175
175
  </div>
176
176
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.21",
3
+ "version": "0.0.23-beta.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"
@@ -52,4 +52,4 @@
52
52
  "react": "^17.0.0 || ^18.0.0",
53
53
  "react-dom": "^17.0.0 || ^18.0.0"
54
54
  }
55
- }
55
+ }
package/dist/Label.js DELETED
@@ -1,48 +0,0 @@
1
- import { j as o } from "./index2.js";
2
- import * as l from "react";
3
- import "react-dom";
4
- import { c, a as b, b as p } from "./Tooltip.js";
5
- var v = [
6
- "a",
7
- "button",
8
- "div",
9
- "form",
10
- "h2",
11
- "h3",
12
- "img",
13
- "input",
14
- "label",
15
- "li",
16
- "nav",
17
- "ol",
18
- "p",
19
- "select",
20
- "span",
21
- "svg",
22
- "ul"
23
- ], w = v.reduce((e, t) => {
24
- const a = c(`Primitive.${t}`), i = l.forwardRef((r, m) => {
25
- const { asChild: d, ...f } = r, u = d ? a : t;
26
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o.jsx(u, { ...f, ref: m });
27
- });
28
- return i.displayName = `Primitive.${t}`, { ...e, [t]: i };
29
- }, {}), x = "Label", s = l.forwardRef((e, t) => /* @__PURE__ */ o.jsx(
30
- w.label,
31
- {
32
- ...e,
33
- ref: t,
34
- onMouseDown: (a) => {
35
- var r;
36
- a.target.closest("button, input, select, textarea") || ((r = e.onMouseDown) == null || r.call(e, a), !a.defaultPrevented && a.detail > 1 && a.preventDefault());
37
- }
38
- }
39
- ));
40
- s.displayName = x;
41
- var n = s;
42
- const N = p(
43
- "al-text-sm al-font-medium al-leading-none peer-disabled:al-cursor-not-allowed peer-disabled:al-opacity-70"
44
- ), y = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx(n, { ref: a, className: b(N(), e), ...t }));
45
- y.displayName = n.displayName;
46
- export {
47
- y as L
48
- };