@segmentify/ui 0.0.67 → 0.0.69
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/segmentify-ui.js
CHANGED
|
@@ -71856,18 +71856,27 @@ const t2t = "dd/MM/yyyy", J_t = ({ date: e, format: t = t2t }) => e ? /* @__PURE
|
|
|
71856
71856
|
] })
|
|
71857
71857
|
] });
|
|
71858
71858
|
};
|
|
71859
|
-
function r2t({
|
|
71860
|
-
|
|
71859
|
+
function r2t({
|
|
71860
|
+
value: e,
|
|
71861
|
+
onChange: t,
|
|
71862
|
+
className: n,
|
|
71863
|
+
inputClassName: r,
|
|
71864
|
+
name: i,
|
|
71865
|
+
placeholder: o,
|
|
71866
|
+
label: a,
|
|
71867
|
+
autoFocus: l = !1
|
|
71868
|
+
}) {
|
|
71869
|
+
const [c, u] = $t(e), d = ct(null), f = ct(t);
|
|
71861
71870
|
Lt(() => {
|
|
71862
|
-
|
|
71871
|
+
f.current = t;
|
|
71863
71872
|
}, [t]);
|
|
71864
|
-
const
|
|
71865
|
-
|
|
71866
|
-
|
|
71873
|
+
const h = Je((g) => {
|
|
71874
|
+
d.current && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
71875
|
+
g.length >= 3 ? f.current(g) : f.current("");
|
|
71867
71876
|
}, 300);
|
|
71868
|
-
}, []),
|
|
71869
|
-
const
|
|
71870
|
-
|
|
71877
|
+
}, []), p = (g) => {
|
|
71878
|
+
const m = decodeURIComponent(g);
|
|
71879
|
+
u(m), h(m);
|
|
71871
71880
|
};
|
|
71872
71881
|
return /* @__PURE__ */ ue("search", { className: te("ui:w-full", n), children: [
|
|
71873
71882
|
a && /* @__PURE__ */ w(Pa, { htmlFor: i, className: "ui:leading-6 ui:w-full ui:mb-2", children: a }),
|
|
@@ -71879,10 +71888,10 @@ function r2t({ value: e, onChange: t, className: n, inputClassName: r, name: i,
|
|
|
71879
71888
|
id: i,
|
|
71880
71889
|
"data-test-id": i,
|
|
71881
71890
|
placeholder: o,
|
|
71882
|
-
value:
|
|
71883
|
-
onChange: ({ target:
|
|
71891
|
+
value: c,
|
|
71892
|
+
onChange: ({ target: g }) => p(g.value),
|
|
71884
71893
|
className: te("ui:max-h-10", r),
|
|
71885
|
-
autoFocus:
|
|
71894
|
+
autoFocus: l
|
|
71886
71895
|
}
|
|
71887
71896
|
)
|
|
71888
71897
|
] });
|
|
@@ -73554,25 +73563,30 @@ function L2t({
|
|
|
73554
73563
|
function H2t({
|
|
73555
73564
|
className: e,
|
|
73556
73565
|
children: t,
|
|
73557
|
-
position: n
|
|
73566
|
+
position: n,
|
|
73558
73567
|
isPortal: r = !1,
|
|
73559
73568
|
align: i = "center",
|
|
73560
|
-
|
|
73561
|
-
|
|
73569
|
+
alignItemWithTrigger: o = !1,
|
|
73570
|
+
side: a = "bottom",
|
|
73571
|
+
sideOffset: l = 4,
|
|
73572
|
+
style: c,
|
|
73573
|
+
...u
|
|
73562
73574
|
}) {
|
|
73563
|
-
const { layer:
|
|
73575
|
+
const d = n ?? (o ? "item-aligned" : "popper"), { layer: f } = Ine(), h = f != null ? parseInt(getComputedStyle(f).zIndex, 10) : NaN, p = Number.isFinite(h) ? h + 1 : void 0, g = /* @__PURE__ */ ue(
|
|
73564
73576
|
gbe,
|
|
73565
73577
|
{
|
|
73566
73578
|
"data-slot": "select-content",
|
|
73567
73579
|
className: te(
|
|
73568
73580
|
"ui:relative ui:z-50 ui:max-h-96 ui:min-w-32 ui:overflow-hidden ui:rounded-md ui:border ui:bg-popover ui:text-popover-foreground ui:shadow-md ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",
|
|
73569
|
-
|
|
73581
|
+
d === "popper" && "ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",
|
|
73570
73582
|
e
|
|
73571
73583
|
),
|
|
73572
|
-
position:
|
|
73584
|
+
position: d,
|
|
73573
73585
|
align: i,
|
|
73574
|
-
|
|
73575
|
-
|
|
73586
|
+
side: d === "popper" ? a : void 0,
|
|
73587
|
+
sideOffset: d === "popper" ? l : void 0,
|
|
73588
|
+
style: p != null ? { zIndex: p, ...c } : c,
|
|
73589
|
+
...u,
|
|
73576
73590
|
children: [
|
|
73577
73591
|
/* @__PURE__ */ w(V2t, {}),
|
|
73578
73592
|
/* @__PURE__ */ w(
|
|
@@ -73580,7 +73594,7 @@ function H2t({
|
|
|
73580
73594
|
{
|
|
73581
73595
|
className: te(
|
|
73582
73596
|
"ui:p-1",
|
|
73583
|
-
|
|
73597
|
+
d === "popper" && "ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"
|
|
73584
73598
|
),
|
|
73585
73599
|
children: t
|
|
73586
73600
|
}
|
|
@@ -73589,7 +73603,7 @@ function H2t({
|
|
|
73589
73603
|
]
|
|
73590
73604
|
}
|
|
73591
73605
|
);
|
|
73592
|
-
return r ? /* @__PURE__ */ w(mbe, { children:
|
|
73606
|
+
return r ? /* @__PURE__ */ w(mbe, { children: g }) : g;
|
|
73593
73607
|
}
|
|
73594
73608
|
function Mkt({ className: e, ...t }) {
|
|
73595
73609
|
return /* @__PURE__ */ w(
|
|
@@ -104653,20 +104667,21 @@ function zDt({
|
|
|
104653
104667
|
};
|
|
104654
104668
|
return /* @__PURE__ */ w(N0e.Provider, { value: l, children: /* @__PURE__ */ w("div", { className: te("ui:w-full", a), children: t }) });
|
|
104655
104669
|
}
|
|
104656
|
-
function DDt({ placeholder: e = "Search...", filterColumn: t, className: n, label: r }) {
|
|
104657
|
-
const { table:
|
|
104658
|
-
const
|
|
104659
|
-
t ?
|
|
104660
|
-
},
|
|
104670
|
+
function DDt({ placeholder: e = "Search...", filterColumn: t, className: n, label: r, autoFocus: i = !1 }) {
|
|
104671
|
+
const { table: o, search: a, onSearchChange: l } = tb(), c = (d) => {
|
|
104672
|
+
const f = String(d);
|
|
104673
|
+
t ? o.getColumn(t)?.setFilterValue(f) : l(f);
|
|
104674
|
+
}, u = t ? o.getColumn(t)?.getFilterValue() ?? "" : a;
|
|
104661
104675
|
return /* @__PURE__ */ w(
|
|
104662
104676
|
r2t,
|
|
104663
104677
|
{
|
|
104664
104678
|
placeholder: e,
|
|
104665
|
-
value:
|
|
104666
|
-
onChange:
|
|
104679
|
+
value: u,
|
|
104680
|
+
onChange: c,
|
|
104667
104681
|
className: te(n),
|
|
104668
104682
|
label: r ?? "",
|
|
104669
|
-
name: "debounced-search-label"
|
|
104683
|
+
name: "debounced-search-label",
|
|
104684
|
+
autoFocus: i
|
|
104670
104685
|
}
|
|
104671
104686
|
);
|
|
104672
104687
|
}
|