@altimateai/ui-components 0.0.60 → 0.0.61-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.
- package/dist/TagsInput.js +22 -9
- package/dist/storybook/Combobox.stories.tsx +10 -8
- package/package.json +1 -1
package/dist/TagsInput.js
CHANGED
|
@@ -3561,21 +3561,21 @@ const Jf = ({
|
|
|
3561
3561
|
getLabelForValue: s
|
|
3562
3562
|
}) => {
|
|
3563
3563
|
if (r)
|
|
3564
|
-
return /* @__PURE__ */ c.jsx("
|
|
3564
|
+
return /* @__PURE__ */ c.jsx("div", { className: "al-truncate", children: t });
|
|
3565
3565
|
if (!e) {
|
|
3566
3566
|
const p = n ? s(n) : void 0;
|
|
3567
|
-
return /* @__PURE__ */ c.jsx("
|
|
3567
|
+
return /* @__PURE__ */ c.jsx("div", { className: "al-truncate", children: p || t || "Select item" });
|
|
3568
3568
|
}
|
|
3569
3569
|
const i = o ? Array.isArray(n) ? n : n ? [n] : [] : a;
|
|
3570
3570
|
if (i.length === 0)
|
|
3571
|
-
return /* @__PURE__ */ c.jsx("
|
|
3571
|
+
return /* @__PURE__ */ c.jsx("div", { className: "al-truncate", children: t || "All Items" });
|
|
3572
3572
|
if (i.length === 1)
|
|
3573
|
-
return /* @__PURE__ */ c.jsx("
|
|
3573
|
+
return /* @__PURE__ */ c.jsx("div", { className: "al-truncate", children: s(i[0]) });
|
|
3574
3574
|
const u = i.slice(0, 2).map((p) => s(p)), d = i.length - 2, f = i.map((p) => s(p));
|
|
3575
3575
|
return /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-gap-none al-min-w-0", children: [
|
|
3576
3576
|
u.map((p, g) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
3577
3577
|
/* @__PURE__ */ c.jsx(
|
|
3578
|
-
"
|
|
3578
|
+
"div",
|
|
3579
3579
|
{
|
|
3580
3580
|
className: O("al-truncate al-inline-block", g === 0 ? "" : "al-ml-1"),
|
|
3581
3581
|
style: { maxWidth: "150px" },
|
|
@@ -3753,7 +3753,7 @@ const Jf = ({
|
|
|
3753
3753
|
value: A,
|
|
3754
3754
|
placeholder: o || "Search...",
|
|
3755
3755
|
debounceMs: 300,
|
|
3756
|
-
className: s == null ? void 0 : s.className
|
|
3756
|
+
className: `!al-h-10 ${s == null ? void 0 : s.className}`,
|
|
3757
3757
|
id: i ? `${i}-combobox` : "default-combobox",
|
|
3758
3758
|
role: "combobox",
|
|
3759
3759
|
"aria-expanded": K,
|
|
@@ -3787,7 +3787,7 @@ const Jf = ({
|
|
|
3787
3787
|
id: i ? `${i}-combobox` : "default-combobox",
|
|
3788
3788
|
...s,
|
|
3789
3789
|
className: O(
|
|
3790
|
-
"al-w-56 al-flex al-items-center al-justify-between al-py-3 al-px-2",
|
|
3790
|
+
"al-w-56 !al-h-10 al-flex al-items-center al-justify-between al-py-3 al-px-2",
|
|
3791
3791
|
s == null ? void 0 : s.className
|
|
3792
3792
|
),
|
|
3793
3793
|
children: [
|
|
@@ -3815,7 +3815,13 @@ const Jf = ({
|
|
|
3815
3815
|
Un,
|
|
3816
3816
|
{
|
|
3817
3817
|
..._,
|
|
3818
|
-
className: O(
|
|
3818
|
+
className: O(
|
|
3819
|
+
"!al-p-0",
|
|
3820
|
+
// to match width of trigger
|
|
3821
|
+
// https://github.com/shadcn-ui/ui/issues/3045#issuecomment-2773835617
|
|
3822
|
+
"!al-w-[var(--radix-popover-trigger-width)]",
|
|
3823
|
+
_ == null ? void 0 : _.className
|
|
3824
|
+
),
|
|
3819
3825
|
id: `${i}-combobox-content`,
|
|
3820
3826
|
onWheel: (A) => {
|
|
3821
3827
|
A.stopPropagation();
|
|
@@ -3854,7 +3860,14 @@ const Jf = ({
|
|
|
3854
3860
|
onMouseEnter: () => he(A),
|
|
3855
3861
|
onMouseLeave: Le,
|
|
3856
3862
|
children: /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-gap-2 al-w-full", children: [
|
|
3857
|
-
d ? ve.includes(A.value) ? /* @__PURE__ */ c.jsx(
|
|
3863
|
+
d ? ve.includes(A.value) ? /* @__PURE__ */ c.jsx(
|
|
3864
|
+
ec,
|
|
3865
|
+
{
|
|
3866
|
+
className: "al-mr-2 al-size-4 al-text-primary",
|
|
3867
|
+
role: "checkbox",
|
|
3868
|
+
"aria-checked": "true"
|
|
3869
|
+
}
|
|
3870
|
+
) : /* @__PURE__ */ c.jsx(sc, { className: "al-mr-2 al-size-4 al-text-muted-foreground" }) : /* @__PURE__ */ c.jsx(
|
|
3858
3871
|
Ji,
|
|
3859
3872
|
{
|
|
3860
3873
|
className: O(
|
|
@@ -159,14 +159,16 @@ export const ComboboxMultiSelectExample: StoryFn = () => {
|
|
|
159
159
|
<p className="al-text-sm al-text-muted-foreground">
|
|
160
160
|
Changes are applied immediately when selecting/deselecting options
|
|
161
161
|
</p>
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
<div className="al-w-40">
|
|
163
|
+
<Combobox
|
|
164
|
+
options={options}
|
|
165
|
+
value={selectedValues}
|
|
166
|
+
placeholder="Select frameworks..."
|
|
167
|
+
multiSelect={true}
|
|
168
|
+
buttonProps={{ className: "al-w-full" }}
|
|
169
|
+
onChange={handleMultiSelectChange}
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
170
172
|
<div className="al-text-sm">
|
|
171
173
|
Selected: {selectedValues.length > 0 ? selectedValues.join(", ") : "None"}
|
|
172
174
|
</div>
|