@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.
Files changed (48) hide show
  1. package/dist/styles.css +1 -1
  2. package/dist/ui/Accordion/Accordion.module.css.js +7 -7
  3. package/dist/ui/Autocomplete/Autocomplete.d.ts +2 -2
  4. package/dist/ui/Autocomplete/Autocomplete.d.ts.map +1 -1
  5. package/dist/ui/Autocomplete/Autocomplete.js +1 -1
  6. package/dist/ui/Autocomplete/index.d.ts +2 -0
  7. package/dist/ui/Autocomplete/index.d.ts.map +1 -0
  8. package/dist/ui/Grid/GridRoot.js +13 -13
  9. package/dist/ui/Select/Select.d.ts.map +1 -1
  10. package/dist/ui/Select/Select.js +1 -1
  11. package/dist/ui/Select/Select.module.css.js +42 -18
  12. package/dist/ui/Select/Select.types.d.ts +1 -2
  13. package/dist/ui/Select/Select.types.d.ts.map +1 -1
  14. package/dist/ui/Select/components/SelectControl.d.ts +3 -0
  15. package/dist/ui/Select/components/SelectControl.d.ts.map +1 -0
  16. package/dist/ui/Select/components/SelectControl.js +154 -0
  17. package/dist/ui/Select/{SelectOption.d.ts → components/SelectOption.d.ts} +1 -1
  18. package/dist/ui/Select/components/SelectOption.d.ts.map +1 -0
  19. package/dist/ui/Select/components/SelectOption.js +30 -0
  20. package/dist/ui/Select/components/SelectOptions.d.ts +3 -0
  21. package/dist/ui/Select/components/SelectOptions.d.ts.map +1 -0
  22. package/dist/ui/Select/components/SelectOptions.js +62 -0
  23. package/dist/ui/Select/{SelectSearch.d.ts → components/SelectSearch.d.ts} +1 -1
  24. package/dist/ui/Select/components/SelectSearch.d.ts.map +1 -0
  25. package/dist/ui/Select/components/SelectSearch.js +44 -0
  26. package/dist/ui/Select/index.d.ts +4 -0
  27. package/dist/ui/Select/index.d.ts.map +1 -0
  28. package/dist/ui/Tabs/Tabs.d.ts +1 -1
  29. package/dist/ui/Tabs/Tabs.module.css.js +18 -10
  30. package/dist/ui/Tabs/TabsList.d.ts +4 -2
  31. package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
  32. package/dist/ui/Tabs/TabsList.js +18 -14
  33. package/dist/ui/index.d.ts +3 -3
  34. package/dist/ui/index.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/ui/Select/SelectControl.d.ts +0 -3
  37. package/dist/ui/Select/SelectControl.d.ts.map +0 -1
  38. package/dist/ui/Select/SelectControl.js +0 -152
  39. package/dist/ui/Select/SelectOption.d.ts.map +0 -1
  40. package/dist/ui/Select/SelectOption.js +0 -29
  41. package/dist/ui/Select/SelectOption.module.css.js +0 -9
  42. package/dist/ui/Select/SelectOptions.d.ts +0 -3
  43. package/dist/ui/Select/SelectOptions.d.ts.map +0 -1
  44. package/dist/ui/Select/SelectOptions.js +0 -62
  45. package/dist/ui/Select/SelectOptions.module.css.js +0 -7
  46. package/dist/ui/Select/SelectSearch.d.ts.map +0 -1
  47. package/dist/ui/Select/SelectSearch.js +0 -43
  48. 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,9 +0,0 @@
1
- const t = "_option_1jot6_2", o = "_active_1jot6_18", c = {
2
- option: t,
3
- active: o
4
- };
5
- export {
6
- o as active,
7
- c as default,
8
- t as option
9
- };
@@ -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,7 +0,0 @@
1
- const o = "_dropdown_3l0fl_2", d = {
2
- dropdown: o
3
- };
4
- export {
5
- d as default,
6
- o as dropdown
7
- };
@@ -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
- };