@divayth/brick-ui 0.10.0 → 0.11.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/styles.css +1 -1
- package/dist/ui/Accordion/Accordion.module.css.js +7 -7
- package/dist/ui/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/ui/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/ui/Autocomplete/Autocomplete.js +1 -1
- package/dist/ui/Autocomplete/index.d.ts +2 -0
- package/dist/ui/Autocomplete/index.d.ts.map +1 -0
- package/dist/ui/Grid/GridRoot.js +13 -13
- package/dist/ui/Select/Select.d.ts.map +1 -1
- package/dist/ui/Select/Select.js +1 -1
- package/dist/ui/Select/Select.module.css.js +42 -18
- package/dist/ui/Select/Select.types.d.ts +1 -2
- package/dist/ui/Select/Select.types.d.ts.map +1 -1
- package/dist/ui/Select/components/SelectControl.d.ts +3 -0
- package/dist/ui/Select/components/SelectControl.d.ts.map +1 -0
- package/dist/ui/Select/components/SelectControl.js +154 -0
- package/dist/ui/Select/{SelectOption.d.ts → components/SelectOption.d.ts} +1 -1
- package/dist/ui/Select/components/SelectOption.d.ts.map +1 -0
- package/dist/ui/Select/components/SelectOption.js +30 -0
- package/dist/ui/Select/components/SelectOptions.d.ts +3 -0
- package/dist/ui/Select/components/SelectOptions.d.ts.map +1 -0
- package/dist/ui/Select/components/SelectOptions.js +62 -0
- package/dist/ui/Select/{SelectSearch.d.ts → components/SelectSearch.d.ts} +1 -1
- package/dist/ui/Select/components/SelectSearch.d.ts.map +1 -0
- package/dist/ui/Select/components/SelectSearch.js +44 -0
- package/dist/ui/Select/index.d.ts +4 -0
- package/dist/ui/Select/index.d.ts.map +1 -0
- package/dist/ui/Tabs/Tabs.d.ts +1 -1
- package/dist/ui/Tabs/Tabs.module.css.js +18 -10
- package/dist/ui/Tabs/TabsList.d.ts +4 -2
- package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
- package/dist/ui/Tabs/TabsList.js +18 -14
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ui/Select/SelectControl.d.ts +0 -3
- package/dist/ui/Select/SelectControl.d.ts.map +0 -1
- package/dist/ui/Select/SelectControl.js +0 -152
- package/dist/ui/Select/SelectOption.d.ts.map +0 -1
- package/dist/ui/Select/SelectOption.js +0 -29
- package/dist/ui/Select/SelectOption.module.css.js +0 -9
- package/dist/ui/Select/SelectOptions.d.ts +0 -3
- package/dist/ui/Select/SelectOptions.d.ts.map +0 -1
- package/dist/ui/Select/SelectOptions.js +0 -62
- package/dist/ui/Select/SelectOptions.module.css.js +0 -7
- package/dist/ui/Select/SelectSearch.d.ts.map +0 -1
- package/dist/ui/Select/SelectSearch.js +0 -43
- package/dist/ui/Select/SelectSearch.module.css.js +0 -13
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as s, jsxs as e } from "react/jsx-runtime";
|
|
3
|
-
import i from "clsx";
|
|
4
|
-
import { Checkbox as p } from "../Checkbox/Checkbox.js";
|
|
5
|
-
import { Flex as c } from "../Flex/Flex.js";
|
|
6
|
-
import a from "./SelectOption.module.css.js";
|
|
7
|
-
const g = ({
|
|
8
|
-
item: o,
|
|
9
|
-
checked: r,
|
|
10
|
-
multiple: n,
|
|
11
|
-
onSelect: t
|
|
12
|
-
}) => /* @__PURE__ */ s(
|
|
13
|
-
n ? "label" : "button",
|
|
14
|
-
{
|
|
15
|
-
role: "option",
|
|
16
|
-
"aria-selected": r,
|
|
17
|
-
type: n ? void 0 : "button",
|
|
18
|
-
className: i(a.option, r && a.active),
|
|
19
|
-
onClick: n ? void 0 : () => t(o),
|
|
20
|
-
children: /* @__PURE__ */ e(c, { alignItems: "center", gap: "sm", children: [
|
|
21
|
-
n && /* @__PURE__ */ s(p, { checked: r, onChange: () => t(o) }),
|
|
22
|
-
o.icon,
|
|
23
|
-
o.label ?? String(o.value ?? "")
|
|
24
|
-
] })
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
export {
|
|
28
|
-
g as SelectOption
|
|
29
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SelectOptionsProps, SelectValue } from './Select.types.js';
|
|
2
|
-
export declare const SelectOptions: <T extends SelectValue>({ options, values, search, filterOptions, sortSelectedFirst, isLoading, multiple, searchable, anchorRef, onSelect, ...props }: SelectOptionsProps<T>) => import("react").JSX.Element;
|
|
3
|
-
//# sourceMappingURL=SelectOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOptions.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectOptions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKzE,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,EAAE,+HAYlD,kBAAkB,CAAC,CAAC,CAAC,gCA6DvB,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { useProvider as N } from "../../app/Provider.js";
|
|
4
|
-
import { CircularLoading as S } from "../CircularLoading/CircularLoading.js";
|
|
5
|
-
import { Flex as C } from "../Flex/Flex.js";
|
|
6
|
-
import { Popover as O } from "../Popover/Popover.js";
|
|
7
|
-
import { Text as h } from "../Text/Text.js";
|
|
8
|
-
import { SelectOption as y } from "./SelectOption.js";
|
|
9
|
-
import j from "./SelectOptions.module.css.js";
|
|
10
|
-
const A = ({
|
|
11
|
-
options: c,
|
|
12
|
-
values: r,
|
|
13
|
-
search: i,
|
|
14
|
-
filterOptions: n = !1,
|
|
15
|
-
sortSelectedFirst: m = !1,
|
|
16
|
-
isLoading: o = !1,
|
|
17
|
-
multiple: l,
|
|
18
|
-
searchable: u,
|
|
19
|
-
anchorRef: a,
|
|
20
|
-
onSelect: f,
|
|
21
|
-
...d
|
|
22
|
-
}) => {
|
|
23
|
-
const { messages: p } = N(), s = c.filter(
|
|
24
|
-
(e) => !n || (e.label ?? String(e.value ?? "")).toLocaleLowerCase().includes(i.toLocaleLowerCase())
|
|
25
|
-
);
|
|
26
|
-
return m && s.sort((e, g) => {
|
|
27
|
-
const v = r.includes(e.value), x = r.includes(g.value);
|
|
28
|
-
return Number(x) - Number(v);
|
|
29
|
-
}), /* @__PURE__ */ b(
|
|
30
|
-
O.Content,
|
|
31
|
-
{
|
|
32
|
-
container: a.current?.closest('dialog, [role="dialog"]'),
|
|
33
|
-
role: "listbox",
|
|
34
|
-
"aria-busy": o,
|
|
35
|
-
"aria-multiselectable": l || void 0,
|
|
36
|
-
align: "start",
|
|
37
|
-
sideOffset: 4,
|
|
38
|
-
className: j.dropdown,
|
|
39
|
-
onOpenAutoFocus: u ? (e) => e.preventDefault() : void 0,
|
|
40
|
-
onInteractOutside: (e) => {
|
|
41
|
-
e.target instanceof Node && a.current?.contains(e.target) && e.preventDefault();
|
|
42
|
-
},
|
|
43
|
-
...d,
|
|
44
|
-
children: [
|
|
45
|
-
o && /* @__PURE__ */ t(C, { justifyContent: "center", className: "p-2", children: /* @__PURE__ */ t(S, { size: "sm" }) }),
|
|
46
|
-
!o && (s.length ? s.map((e) => /* @__PURE__ */ t(
|
|
47
|
-
y,
|
|
48
|
-
{
|
|
49
|
-
item: e,
|
|
50
|
-
checked: r.includes(e.value),
|
|
51
|
-
multiple: l,
|
|
52
|
-
onSelect: f
|
|
53
|
-
},
|
|
54
|
-
`${typeof e.value}:${String(e.value)}`
|
|
55
|
-
)) : /* @__PURE__ */ t(h, { className: "p-2 text-gray-1", children: p.noData }))
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
A as SelectOptions
|
|
62
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectSearch.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectSearch.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,eAAO,MAAM,YAAY,GAAI,iDAM1B,iBAAiB,gCA4BnB,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as c } from "clsx";
|
|
3
|
-
import { Flex as n } from "../Flex/Flex.js";
|
|
4
|
-
import { Input as p } from "../Input/Input.js";
|
|
5
|
-
import o from "./SelectSearch.module.css.js";
|
|
6
|
-
const g = ({
|
|
7
|
-
id: e,
|
|
8
|
-
open: r,
|
|
9
|
-
displayValue: t,
|
|
10
|
-
className: m,
|
|
11
|
-
...s
|
|
12
|
-
}) => {
|
|
13
|
-
const a = !r && t != null;
|
|
14
|
-
return /* @__PURE__ */ i(n, { gap: "none", className: o.root, children: [
|
|
15
|
-
/* @__PURE__ */ l(
|
|
16
|
-
p,
|
|
17
|
-
{
|
|
18
|
-
fullWidth: !0,
|
|
19
|
-
id: e,
|
|
20
|
-
"aria-expanded": r,
|
|
21
|
-
role: "combobox",
|
|
22
|
-
autoComplete: "off",
|
|
23
|
-
"aria-controls": `${e}-options`,
|
|
24
|
-
"aria-autocomplete": "list",
|
|
25
|
-
className: c(o.input, m, a && o.hiddenValue),
|
|
26
|
-
...s
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
a && /* @__PURE__ */ l(
|
|
30
|
-
n,
|
|
31
|
-
{
|
|
32
|
-
alignItems: "center",
|
|
33
|
-
gap: "none",
|
|
34
|
-
className: o.value,
|
|
35
|
-
"aria-hidden": "true",
|
|
36
|
-
children: t
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
] });
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
g as SelectSearch
|
|
43
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const c = "_root_29ccb_1", t = "_input_29ccb_7", o = "_hiddenValue_29ccb_14", _ = "_value_29ccb_20", e = {
|
|
2
|
-
root: c,
|
|
3
|
-
input: t,
|
|
4
|
-
hiddenValue: o,
|
|
5
|
-
value: _
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
e as default,
|
|
9
|
-
o as hiddenValue,
|
|
10
|
-
t as input,
|
|
11
|
-
c as root,
|
|
12
|
-
_ as value
|
|
13
|
-
};
|