@divayth/brick-ui 0.9.0 → 0.11.0

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 (77) hide show
  1. package/dist/app/Provider.js +7 -7
  2. package/dist/app/ThemeProvider.js +6 -6
  3. package/dist/styles.css +1 -1
  4. package/dist/ui/Autocomplete/Autocomplete.d.ts +2 -2
  5. package/dist/ui/Autocomplete/Autocomplete.d.ts.map +1 -1
  6. package/dist/ui/Autocomplete/Autocomplete.js +1 -1
  7. package/dist/ui/Autocomplete/index.d.ts +2 -0
  8. package/dist/ui/Autocomplete/index.d.ts.map +1 -0
  9. package/dist/ui/DropdownMenu/DropdownMenu.js +17 -17
  10. package/dist/ui/Grid/Grid.d.ts +1 -1
  11. package/dist/ui/Grid/Grid.module.css.js +4 -4
  12. package/dist/ui/Grid/Grid.types.d.ts +0 -2
  13. package/dist/ui/Grid/Grid.types.d.ts.map +1 -1
  14. package/dist/ui/Grid/GridItem.d.ts +1 -1
  15. package/dist/ui/Grid/GridItem.d.ts.map +1 -1
  16. package/dist/ui/Grid/GridItem.js +25 -33
  17. package/dist/ui/Grid/GridRoot.js +36 -36
  18. package/dist/ui/Grid/index.d.ts +2 -0
  19. package/dist/ui/Grid/index.d.ts.map +1 -0
  20. package/dist/ui/IconButton/IconButton.d.ts +1 -1
  21. package/dist/ui/IconButton/IconButton.d.ts.map +1 -1
  22. package/dist/ui/IconButton/IconButton.module.css.js +30 -28
  23. package/dist/ui/List/List.d.ts.map +1 -1
  24. package/dist/ui/List/List.js +19 -19
  25. package/dist/ui/List/index.d.ts +2 -0
  26. package/dist/ui/List/index.d.ts.map +1 -0
  27. package/dist/ui/Modal/Modal.d.ts.map +1 -1
  28. package/dist/ui/Modal/Modal.js +56 -48
  29. package/dist/ui/ProgressBar/ProgressBar.d.ts.map +1 -1
  30. package/dist/ui/ProgressBar/ProgressBar.js +16 -13
  31. package/dist/ui/ProgressBar/index.d.ts +2 -0
  32. package/dist/ui/ProgressBar/index.d.ts.map +1 -0
  33. package/dist/ui/Select/Select.d.ts.map +1 -1
  34. package/dist/ui/Select/Select.js +1 -1
  35. package/dist/ui/Select/Select.module.css.js +42 -18
  36. package/dist/ui/Select/Select.types.d.ts +1 -2
  37. package/dist/ui/Select/Select.types.d.ts.map +1 -1
  38. package/dist/ui/Select/components/SelectControl.d.ts +3 -0
  39. package/dist/ui/Select/components/SelectControl.d.ts.map +1 -0
  40. package/dist/ui/Select/components/SelectControl.js +154 -0
  41. package/dist/ui/Select/{SelectOption.d.ts → components/SelectOption.d.ts} +1 -1
  42. package/dist/ui/Select/components/SelectOption.d.ts.map +1 -0
  43. package/dist/ui/Select/components/SelectOption.js +30 -0
  44. package/dist/ui/Select/components/SelectOptions.d.ts +3 -0
  45. package/dist/ui/Select/components/SelectOptions.d.ts.map +1 -0
  46. package/dist/ui/Select/components/SelectOptions.js +62 -0
  47. package/dist/ui/Select/{SelectSearch.d.ts → components/SelectSearch.d.ts} +1 -1
  48. package/dist/ui/Select/components/SelectSearch.d.ts.map +1 -0
  49. package/dist/ui/Select/components/SelectSearch.js +44 -0
  50. package/dist/ui/Select/index.d.ts +4 -0
  51. package/dist/ui/Select/index.d.ts.map +1 -0
  52. package/dist/ui/Tabs/Tab.d.ts +1 -1
  53. package/dist/ui/Tabs/Tab.d.ts.map +1 -1
  54. package/dist/ui/Tabs/Tab.js +6 -6
  55. package/dist/ui/Tabs/Tabs.module.css.js +10 -10
  56. package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
  57. package/dist/ui/Tabs/TabsList.js +6 -6
  58. package/dist/ui/Tabs/index.d.ts +2 -0
  59. package/dist/ui/Tabs/index.d.ts.map +1 -0
  60. package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
  61. package/dist/ui/Tooltip/Tooltip.js +44 -37
  62. package/dist/ui/index.d.ts +7 -7
  63. package/dist/ui/index.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/ui/Select/SelectControl.d.ts +0 -3
  66. package/dist/ui/Select/SelectControl.d.ts.map +0 -1
  67. package/dist/ui/Select/SelectControl.js +0 -152
  68. package/dist/ui/Select/SelectOption.d.ts.map +0 -1
  69. package/dist/ui/Select/SelectOption.js +0 -29
  70. package/dist/ui/Select/SelectOption.module.css.js +0 -9
  71. package/dist/ui/Select/SelectOptions.d.ts +0 -3
  72. package/dist/ui/Select/SelectOptions.d.ts.map +0 -1
  73. package/dist/ui/Select/SelectOptions.js +0 -62
  74. package/dist/ui/Select/SelectOptions.module.css.js +0 -7
  75. package/dist/ui/Select/SelectSearch.d.ts.map +0 -1
  76. package/dist/ui/Select/SelectSearch.js +0 -43
  77. package/dist/ui/Select/SelectSearch.module.css.js +0 -13
@@ -1,6 +1,6 @@
1
1
  export { Accordion, type AccordionProps } from './Accordion/index.js';
2
2
  export { Alert, type AlertProps } from './Alert/index.js';
3
- export { Autocomplete, type AutocompleteProps, } from './Autocomplete/Autocomplete.js';
3
+ export { Autocomplete, type AutocompleteProps, } from './Autocomplete/index.js';
4
4
  export { Button, type ButtonProps } from './Button/index.js';
5
5
  export { Card, type CardProps } from './Card/index.js';
6
6
  export { Checkbox, type CheckboxProps } from './Checkbox/index.js';
@@ -13,23 +13,23 @@ export { DropdownMenu, type DropdownMenuContentProps, type DropdownMenuItemProps
13
13
  export { FeedList, type FeedListProps } from './FeedList/FeedList.js';
14
14
  export { type ControlSize, Field, type FieldControlProps, type FieldErrorProps, type FieldIconProps, type FieldLabelProps, } from './Field/Field.js';
15
15
  export { Flex, type FlexProps } from './Flex/index.js';
16
- export { Grid, type GridGap, type GridItemProps, type GridItemSize, type GridRootProps, type ResponsiveValue, } from './Grid/Grid.js';
16
+ export { Grid, type GridGap, type GridItemProps, type GridItemSize, type GridRootProps, type ResponsiveValue, } from './Grid/index.js';
17
17
  export { IconButton, type IconButtonColor, type IconButtonProps, type IconButtonVariant, } from './IconButton/index.js';
18
18
  export { Input, type InputControlProps, type InputProps, } from './Input/index.js';
19
- export { List, type ListItemProps, type ListProps } from './List/List.js';
19
+ export { List, type ListItemProps, type ListProps } from './List/index.js';
20
20
  export { Modal, MODAL_SIZE, type ModalActions, ModalProvider, type ModalRootProps, type ModalSize, useModal, } from './Modal/index.js';
21
21
  export { MultipleChip, type MultipleChipOption, type MultipleChipProps, } from './MultipleChip/index.js';
22
22
  export { NoData, type NoDataProps } from './NoData/index.js';
23
23
  export { Popover, type PopoverContentProps, type PopoverRootProps, type PopoverTriggerProps, } from './Popover/Popover.js';
24
24
  export { Portal, type PortalProps } from './Portal/Portal.js';
25
- export { ProgressBar, type ProgressBarProps, } from './ProgressBar/ProgressBar.js';
26
- export { Select } from './Select/Select.js';
27
- export { type SelectCommonProps, type SelectControlProps, type SelectOption, type SelectProps, type SelectValue, } from './Select/Select.types.js';
25
+ export { ProgressBar, type ProgressBarProps, } from './ProgressBar/index.js';
26
+ export { Select } from './Select/index.js';
27
+ export { type SelectCommonProps, type SelectControlProps, type SelectOption, type SelectProps, type SelectValue, } from './Select/index.js';
28
28
  export { Skeleton, type SkeletonProps } from './Skeleton/index.js';
29
29
  export { Sticky, type StickyProps } from './Sticky/Sticky.js';
30
30
  export { TablePagination, type TablePaginationProps, } from './Table/components/pagination/TablePagination.js';
31
31
  export { type IColumn, SortOrder, type SortParams, Table, type TableBodyProps, type TableContextProps, type TableEmptyConfig, type TablePaginationConfig, type TablePaginationState, type TableParams, type TableProps, type TableSelectionState, type TableSortingState, useSelected, } from './Table/index.js';
32
- export { type TabProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, useTabs, } from './Tabs/Tabs.js';
32
+ export { type TabProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, useTabs, } from './Tabs/index.js';
33
33
  export { Text, type TextProps } from './Text/index.js';
34
34
  export { Textarea, type TextareaProps } from './Textarea/index.js';
35
35
  export { Tooltip, type TooltipContentProps, type TooltipRootProps, type TooltipTriggerProps, } from './Tooltip/Tooltip.js';
@@ -1 +1 @@
1
- {"version":3,"file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KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,QAAQ,EACb,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,OAAO,GACR,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divayth/brick-ui",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "React components for Brick UI",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,3 +0,0 @@
1
- import type { SelectControlProps, SelectValue } from './Select.types.js';
2
- export declare const SelectControl: <T extends SelectValue>({ value, onChange, renderValue, onSearchChange, filterOptions, sortSelectedFirst, isLoading, multiple, searchable, options, label, disabled, placeholder, searchPlaceholder, error, withArrow, clearable, className, size, variant, }: SelectControlProps<T>) => import("react").JSX.Element;
3
- //# sourceMappingURL=SelectControl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectControl.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectControl.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,kBAAkB,EAElB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAU3B,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,EAAE,uOAqBlD,kBAAkB,CAAC,CAAC,CAAC,gCA8IvB,CAAC"}
@@ -1,152 +0,0 @@
1
- "use client";
2
- import { jsx as o, jsxs as N } from "react/jsx-runtime";
3
- import { useId as H, useRef as J, useState as k } from "react";
4
- import { clsx as A } from "clsx";
5
- import { ChevronDown as K, X as M } from "lucide-react";
6
- import { useProvider as Q } from "../../app/Provider.js";
7
- import { Field as v } from "../Field/Field.js";
8
- import { Flex as U } from "../Flex/Flex.js";
9
- import { IconButton as V } from "../IconButton/IconButton.js";
10
- import { Popover as R } from "../Popover/Popover.js";
11
- import { SelectOptions as W } from "./SelectOptions.js";
12
- import { SelectSearch as Y } from "./SelectSearch.js";
13
- import r from "./Select.module.css.js";
14
- const z = { sm: 16, md: 20, lg: 24 }, ee = { sm: "xs", md: "sm", lg: "md" }, ue = ({
15
- value: l,
16
- onChange: u,
17
- renderValue: j,
18
- onSearchChange: E,
19
- filterOptions: L = !1,
20
- sortSelectedFirst: Z,
21
- isLoading: _ = !1,
22
- multiple: i,
23
- searchable: x = !1,
24
- options: O = [],
25
- label: h,
26
- disabled: c,
27
- placeholder: p,
28
- searchPlaceholder: q,
29
- error: f,
30
- withArrow: B = !0,
31
- clearable: S,
32
- className: D,
33
- size: g = "md",
34
- variant: T = "filled"
35
- }) => {
36
- const { messages: $ } = Q(), a = H(), y = J(null), [s, X] = k(!1), [b, w] = k("");
37
- let n = [];
38
- i ? n = l ?? [] : l !== void 0 && (n = [l]);
39
- const t = O.filter((e) => n.includes(e.value)), F = t.map(({ label: e, value: C }) => e ?? C).join(", ");
40
- let m;
41
- t.length && (i ? m = j?.(l ?? []) : l !== void 0 && (m = j?.(l)));
42
- const d = (e) => {
43
- X(e), w(""), E?.("");
44
- }, P = {
45
- id: a,
46
- className: r.trigger,
47
- disabled: c,
48
- "aria-expanded": s && !c,
49
- "aria-controls": `${a}-options`,
50
- "aria-invalid": !!f,
51
- "aria-describedby": f ? `${a}-error` : void 0
52
- }, G = (e) => {
53
- if (i) {
54
- const C = n.includes(e.value) ? n.filter((I) => I !== e.value) : [...n.filter((I) => I !== void 0), e.value];
55
- u?.(C);
56
- } else
57
- u?.(e.value);
58
- d(!!i), y.current?.querySelector("input, button")?.focus();
59
- };
60
- return /* @__PURE__ */ o(R.Root, { open: s && !c, onOpenChange: d, children: /* @__PURE__ */ N(v.Root, { className: D, children: [
61
- h && /* @__PURE__ */ o(v.Label, { htmlFor: a, label: h }),
62
- /* @__PURE__ */ o(v.Control, { size: g, children: /* @__PURE__ */ o(R.Anchor, { children: /* @__PURE__ */ N(
63
- U,
64
- {
65
- ref: y,
66
- gap: "sm",
67
- alignItems: "center",
68
- justifyContent: "between",
69
- className: A(r.select, r[T], {
70
- [r.error]: f,
71
- [r.disabled]: c
72
- }),
73
- children: [
74
- x ? /* @__PURE__ */ o(
75
- Y,
76
- {
77
- size: g,
78
- value: s ? b : F,
79
- displayValue: m,
80
- placeholder: s ? q ?? $.search : p,
81
- "aria-label": h ?? p,
82
- open: s && !c,
83
- onClick: () => {
84
- s || d(!0);
85
- },
86
- onChange: (e) => {
87
- s || d(!0), w(e.target.value), E?.(e.target.value);
88
- },
89
- ...P
90
- }
91
- ) : /* @__PURE__ */ o(R.Trigger, { children: /* @__PURE__ */ N("button", { type: "button", "aria-haspopup": "listbox", ...P, children: [
92
- !i && m == null && t[0]?.icon,
93
- /* @__PURE__ */ o(
94
- "span",
95
- {
96
- className: A(
97
- r.value,
98
- !t.length && r.placeholder
99
- ),
100
- children: t.length ? m ?? F : p
101
- }
102
- ),
103
- B && !(t.length && S) && /* @__PURE__ */ o(
104
- K,
105
- {
106
- size: z[g],
107
- className: r.arrow,
108
- "aria-hidden": !0
109
- }
110
- )
111
- ] }) }),
112
- S && (x || t.length > 0) && /* @__PURE__ */ o(
113
- V,
114
- {
115
- size: ee[g],
116
- color: "secondary",
117
- className: t.length ? void 0 : "invisible",
118
- disabled: c || !t.length,
119
- "aria-hidden": !t.length || void 0,
120
- "aria-label": $.clear,
121
- onClick: () => {
122
- i ? u?.([]) : S && u?.(void 0), d(!1);
123
- },
124
- children: /* @__PURE__ */ o(M, {})
125
- }
126
- ),
127
- /* @__PURE__ */ o(
128
- W,
129
- {
130
- id: `${a}-options`,
131
- "aria-label": h ?? p,
132
- options: O,
133
- values: n,
134
- search: b,
135
- filterOptions: L,
136
- sortSelectedFirst: Z,
137
- isLoading: _,
138
- multiple: i,
139
- searchable: x,
140
- anchorRef: y,
141
- onSelect: G
142
- }
143
- )
144
- ]
145
- }
146
- ) }) }),
147
- f && /* @__PURE__ */ o(v.Error, { id: `${a}-error`, error: f })
148
- ] }) });
149
- };
150
- export {
151
- ue as SelectControl
152
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectOption.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIxE,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,WAAW,EAAE,wCAKjD,iBAAiB,CAAC,CAAC,CAAC,gCAoBtB,CAAC"}
@@ -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
- };