@adamjanicki/ui-extended 1.1.7 → 1.1.9

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.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import Popover from "./Popover";
3
- import { IconInput } from "@adamjanicki/ui";
3
+ import { IconInput, ui } from "@adamjanicki/ui";
4
4
  type Props<T> = {
5
5
  /**
6
6
  * The value of the input field
@@ -59,7 +59,7 @@ type Props<T> = {
59
59
  /**
60
60
  * Allow free text input
61
61
  */
62
- freeSolo?: boolean;
62
+ customize?: boolean;
63
63
  /**
64
64
  * Props for the input field
65
65
  */
@@ -71,11 +71,11 @@ type Props<T> = {
71
71
  /**
72
72
  * Props for the list element
73
73
  */
74
- listProps?: React.ComponentProps<"ul">;
74
+ listProps?: React.ComponentProps<typeof ui.ul>;
75
75
  /**
76
76
  * Props for the list item elements
77
77
  */
78
- listItemProps?: React.ComponentProps<"li">;
78
+ listItemProps?: React.ComponentProps<typeof ui.li>;
79
79
  /**
80
80
  * Footer node to render at the bottom of the popover
81
81
  */
@@ -20,20 +20,18 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
23
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import React from "react";
25
25
  import Popover from "./Popover";
26
- import { Box, ClickOutside, IconInput } from "@adamjanicki/ui";
26
+ import { Box, ClickOutside, IconInput, ui } from "@adamjanicki/ui";
27
27
  import { classNames } from "@adamjanicki/ui/functions";
28
- var defaultRenderOption = function (option) { return (_jsx(Box, { className: "aui-pa-m", children: "".concat(option) })); };
28
+ var defaultRenderOption = function (option) { return (_jsx(Box, { vfx: { padding: "s" }, children: "".concat(option) })); };
29
29
  var Autocomplete = function (props) {
30
30
  var _a, _b;
31
- var options = props.options, _c = props.renderOption, renderOption = _c === void 0 ? defaultRenderOption : _c, _d = props.filterOption, filterOption = _d === void 0 ? function () { return true; } : _d, groupBy = props.groupBy, renderGroup = props.renderGroup, noOptionsNode = props.noOptionsNode, _e = props.InputProps, InputProps = _e === void 0 ? {} : _e, _f = props.freeSolo, freeSolo = _f === void 0 ? false : _f, value = props.value, onInputChange = props.onInputChange, onSelect = props.onSelect, popoverProps = props.popoverProps, footer = props.footer, _g = props.listItemProps, listItemProps = _g === void 0 ? {} : _g, _h = props.listProps, listProps = _h === void 0 ? {} : _h, onUnselectedEnter = props.onUnselectedEnter, _j = props.closeOnFooterClick, closeOnFooterClick = _j === void 0 ? true : _j, _k = props.remainOpenOnSelectOrEnter, remainOpenOnSelectOrEnter = _k === void 0 ? false : _k, rest = __rest(props, ["options", "renderOption", "filterOption", "groupBy", "renderGroup", "noOptionsNode", "InputProps", "freeSolo", "value", "onInputChange", "onSelect", "popoverProps", "footer", "listItemProps", "listProps", "onUnselectedEnter", "closeOnFooterClick", "remainOpenOnSelectOrEnter"]);
31
+ var options = props.options, _c = props.renderOption, renderOption = _c === void 0 ? defaultRenderOption : _c, _d = props.filterOption, filterOption = _d === void 0 ? function () { return true; } : _d, groupBy = props.groupBy, renderGroup = props.renderGroup, noOptionsNode = props.noOptionsNode, _e = props.InputProps, InputProps = _e === void 0 ? {} : _e, _f = props.customize, customize = _f === void 0 ? false : _f, value = props.value, onInputChange = props.onInputChange, onSelect = props.onSelect, popoverProps = props.popoverProps, footer = props.footer, _g = props.listItemProps, listItemProps = _g === void 0 ? {} : _g, _h = props.listProps, listProps = _h === void 0 ? {} : _h, onUnselectedEnter = props.onUnselectedEnter, _j = props.closeOnFooterClick, closeOnFooterClick = _j === void 0 ? true : _j, _k = props.remainOpenOnSelectOrEnter, remainOpenOnSelectOrEnter = _k === void 0 ? false : _k, rest = __rest(props, ["options", "renderOption", "filterOption", "groupBy", "renderGroup", "noOptionsNode", "InputProps", "customize", "value", "onInputChange", "onSelect", "popoverProps", "footer", "listItemProps", "listProps", "onUnselectedEnter", "closeOnFooterClick", "remainOpenOnSelectOrEnter"]);
32
32
  var inputContainerRef = React.useRef(null);
33
33
  var inputRef = React.useRef(null);
34
34
  var onRef = React.useRef(null);
35
- var nextRef = React.useRef(null);
36
- var prevRef = React.useRef(null);
37
35
  var _l = React.useState(), on = _l[0], setOn = _l[1];
38
36
  var _m = React.useState(false), open = _m[0], setOpen = _m[1];
39
37
  var filteredOptions = options.filter(filterOption);
@@ -56,7 +54,7 @@ var Autocomplete = function (props) {
56
54
  })
57
55
  .flat();
58
56
  }
59
- if (freeSolo && value.length > 0 && filteredOptions.length === 0) {
57
+ if (customize && value.length > 0 && filteredOptions.length === 0) {
60
58
  filteredOptions.push(value);
61
59
  }
62
60
  var focusInput = function () { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); };
@@ -79,15 +77,16 @@ var Autocomplete = function (props) {
79
77
  closeMenu();
80
78
  }
81
79
  var modulo = filteredOptions.length;
80
+ if (modulo <= 0) {
81
+ return;
82
+ }
82
83
  if (code === "Enter") {
83
84
  var current = onRef.current;
84
- if (modulo > 0 && current) {
85
+ if (current) {
85
86
  // Horrible heuristic to handle links
86
- // It's terrible, but efficient
87
+ // It's terrible, but speedy
87
88
  var child = current.firstChild;
88
- if (child && child.nodeName === "A")
89
- (_b = child.click) === null || _b === void 0 ? void 0 : _b.call(child);
90
- current.click();
89
+ (_b = child === null || child === void 0 ? void 0 : child.click) === null || _b === void 0 ? void 0 : _b.call(child);
91
90
  }
92
91
  else if (onUnselectedEnter) {
93
92
  onUnselectedEnter();
@@ -95,30 +94,20 @@ var Autocomplete = function (props) {
95
94
  closeMenu();
96
95
  }
97
96
  }
98
- if (modulo > 0 && code === "ArrowDown") {
99
- var newOn = ((on !== undefined ? on : -1) + 1) % modulo;
100
- setOn(newOn);
101
- if (nextRef.current) {
102
- nextRef.current.scrollIntoView({
103
- block: "nearest",
104
- behavior: "smooth",
105
- });
106
- }
97
+ if (code === "ArrowDown") {
98
+ setOn(function (on) { return ((on !== null && on !== void 0 ? on : -1) + 1) % modulo; });
107
99
  }
108
- else if (modulo > 0 && code === "ArrowUp") {
109
- var newOn = ((on !== undefined ? on : 0) - 1 + modulo) % modulo;
110
- setOn(newOn);
111
- if (prevRef.current) {
112
- prevRef.current.scrollIntoView({
113
- block: "nearest",
114
- behavior: "smooth",
115
- });
116
- }
100
+ else if (code === "ArrowUp") {
101
+ setOn(function (on) { return ((on !== null && on !== void 0 ? on : 0) - 1 + modulo) % modulo; });
117
102
  }
118
103
  };
119
- var prev = ((on !== null && on !== void 0 ? on : filteredOptions.length) + filteredOptions.length - 1) %
120
- filteredOptions.length;
121
- var next = ((on !== null && on !== void 0 ? on : -1) + filteredOptions.length + 1) % filteredOptions.length;
104
+ React.useEffect(function () {
105
+ var _a;
106
+ (_a = onRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
107
+ block: "nearest",
108
+ behavior: "smooth",
109
+ });
110
+ }, [on]);
122
111
  var popoverOpen = open && (filteredOptions.length > 0 || value.length > 0);
123
112
  return (_jsx(ClickOutside, { onClickOutside: closeMenu, children: _jsxs(Box, __assign({}, rest, { onKeyUp: function (e) { return handleKeys(e); }, children: [_jsx(IconInput, __assign({}, InputProps, { ref: inputContainerRef, inputProps: __assign(__assign({}, (InputProps.inputProps || {})), { value: value, onChange: function (e) {
124
113
  setOn(undefined);
@@ -135,21 +124,20 @@ var Autocomplete = function (props) {
135
124
  if (!open) {
136
125
  openMenu();
137
126
  }
138
- }, ref: inputRef, autoComplete: "off" }) })), _jsxs(Popover, __assign({}, popoverProps, { open: popoverOpen, triggerRef: inputContainerRef, style: __assign(__assign({ zIndex: 100 }, ((popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.style) || {})), { padding: 0, margin: 0, width: (_b = (_a = inputContainerRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0 }), className: classNames("aui-autocomplete-popover", popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.className), children: [_jsx("ul", __assign({}, listProps, { className: classNames("aui-autocomplete-ul aui-pa-m aui-ma-none", listProps.className), children: filteredOptions.length
139
- ? filteredOptions.map(function (option, index) {
140
- var group = groupMap.get(index);
141
- var ref = index === on
142
- ? onRef
143
- : index === prev
144
- ? prevRef
145
- : index === next
146
- ? nextRef
147
- : undefined;
148
- return (_jsxs(React.Fragment, { children: [group && ((renderGroup === null || renderGroup === void 0 ? void 0 : renderGroup(group)) || group), _jsx("li", __assign({}, listItemProps, { ref: ref, onMouseEnter: function () { return setOn(index); }, className: classNames("aui-autocomplete-li", on === index
149
- ? "aui-autocomplete-on-option"
150
- : undefined, listItemProps.className), onClick: function () { return handleChange(option); }, children: renderOption(option) }))] }, index));
151
- })
152
- : !freeSolo &&
153
- (noOptionsNode || defaultRenderOption("No results found")) })), footer && (_jsx(Box, { onClick: closeOnFooterClick ? closeMenu : undefined, children: _jsx(_Fragment, { children: footer }) }))] }))] })) }));
127
+ }, ref: inputRef, autoComplete: "off" }) })), _jsxs(Popover, __assign({}, popoverProps, { open: popoverOpen, triggerRef: inputContainerRef, vfx: {
128
+ padding: "none",
129
+ margin: "none",
130
+ overflow: "hidden",
131
+ fontWeight: 4,
132
+ }, style: __assign(__assign({}, popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.style), { width: (_b = (_a = inputContainerRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0 }), children: [_jsx(ui.ul, __assign({}, listProps, { vfx: __assign({ axis: "y", padding: "s", margin: "none", overflow: "scroll" }, listProps.vfx), style: __assign({ maxHeight: 300 }, listProps.style), tabIndex: -1, children: _jsx(_Fragment, { children: filteredOptions.length
133
+ ? filteredOptions.map(function (option, index) {
134
+ var group = groupMap.get(index);
135
+ var ref = index === on ? onRef : undefined;
136
+ return (_jsxs(React.Fragment, { children: [group && ((renderGroup === null || renderGroup === void 0 ? void 0 : renderGroup(group)) || group), _jsx(ui.li, __assign({}, listItemProps, { vfx: __assign({ axis: "x", cursor: "pointer", radius: "rounded" }, listItemProps.vfx), ref: ref, onMouseEnter: function () { return setOn(index); }, className: classNames(on === index
137
+ ? "aui-autocomplete-on-option"
138
+ : undefined, listItemProps.className), onClick: function () { return handleChange(option); }, children: _jsx(_Fragment, { children: renderOption(option) }) }))] }, index));
139
+ })
140
+ : !customize &&
141
+ (noOptionsNode || defaultRenderOption("No results found")) }) })), !!footer && (_jsx(Box, { onClick: closeOnFooterClick ? closeMenu : undefined, children: _jsx(_Fragment, { children: footer }) }))] }))] })) }));
154
142
  };
155
143
  export default Autocomplete;
@@ -1,10 +1,7 @@
1
1
  import React from "react";
2
+ import { BoxProps } from "@adamjanicki/ui/components/Box/Box";
2
3
  import { type Placement } from "@floating-ui/react";
3
- type Props = {
4
- /**
5
- * Children to render inside the popover.
6
- */
7
- children: React.ReactNode | React.ReactNode[];
4
+ type Props = BoxProps & {
8
5
  /**
9
6
  * The trigger ref for the element to position the popover over.
10
7
  */
@@ -18,14 +15,6 @@ type Props = {
18
15
  * @default "bottom"
19
16
  */
20
17
  placement?: Placement;
21
- /**
22
- * Additional styles to apply to the popover container.
23
- */
24
- style?: React.CSSProperties;
25
- /**
26
- * Additional classes to apply to the popover container.
27
- */
28
- className?: string;
29
18
  /**
30
19
  * The offset of the popover relative to the trigger element.
31
20
  * @default 0
@@ -42,5 +31,6 @@ type Props = {
42
31
  */
43
32
  returnFocusOnEscape?: boolean;
44
33
  };
45
- declare const Popover: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
34
+ export declare const UnstyledPopover: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
35
+ declare const Popover: ({ vfx, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
46
36
  export default Popover;
@@ -9,11 +9,22 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
12
23
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
13
- import { Box } from "@adamjanicki/ui";
24
+ import Box from "@adamjanicki/ui/components/Box/Box";
14
25
  import { useFloating, autoUpdate, offset, useDismiss, useTransitionStyles, } from "@floating-ui/react";
15
- var Popover = function (props) {
16
- var triggerRef = props.triggerRef, open = props.open, _a = props.placement, placement = _a === void 0 ? "bottom" : _a, style = props.style, _b = props.offset, placementOffset = _b === void 0 ? 0 : _b, className = props.className, children = props.children, onClose = props.onClose, _c = props.returnFocusOnEscape, returnFocusOnEscape = _c === void 0 ? false : _c;
26
+ export var UnstyledPopover = function (props) {
27
+ var triggerRef = props.triggerRef, open = props.open, _a = props.placement, placement = _a === void 0 ? "bottom" : _a, style = props.style, _b = props.offset, placementOffset = _b === void 0 ? 0 : _b, children = props.children, onClose = props.onClose, _c = props.returnFocusOnEscape, returnFocusOnEscape = _c === void 0 ? false : _c, rest = __rest(props, ["triggerRef", "open", "placement", "style", "offset", "children", "onClose", "returnFocusOnEscape"]);
17
28
  var handleOnClose = function () {
18
29
  var _a, _b;
19
30
  if (!returnFocusOnEscape)
@@ -36,6 +47,10 @@ var Popover = function (props) {
36
47
  duration: { open: 0, close: 250 }, // default aui-transition value
37
48
  }), isMounted = _e.isMounted, transitionStyles = _e.styles;
38
49
  useDismiss(context);
39
- return isMounted ? (_jsx(Box, { ref: refs.setFloating, style: __assign(__assign(__assign({}, (style || {})), floatingStyles), transitionStyles), className: className, children: _jsx(_Fragment, { children: children }) })) : null;
50
+ return isMounted ? (_jsx(Box, __assign({ ref: refs.setFloating, style: __assign(__assign(__assign({}, floatingStyles), transitionStyles), style) }, rest, { children: _jsx(_Fragment, { children: children }) }))) : null;
51
+ };
52
+ var Popover = function (_a) {
53
+ var vfx = _a.vfx, rest = __rest(_a, ["vfx"]);
54
+ return (_jsx(UnstyledPopover, __assign({ vfx: __assign({ padding: "s", backgroundColor: "default", border: true, shadow: "floating", radius: "rounded", z: "floating" }, vfx) }, rest)));
40
55
  };
41
56
  export default Popover;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
+ import { BoxProps } from "@adamjanicki/ui/components/Box/Box";
2
3
  import { type Placement } from "@floating-ui/react";
3
- type Props<T extends React.ElementType> = {
4
+ type Props = Omit<BoxProps, "children" | "onMouseEnter" | "onMouseLeave"> & {
4
5
  /**
5
6
  * Children to render inside the tooltip container.
6
7
  */
@@ -9,20 +10,12 @@ type Props<T extends React.ElementType> = {
9
10
  * The element to attach the tooltip to.
10
11
  * **IMPORTANT**: This must be able to hold a ref.
11
12
  */
12
- children: React.ReactElement<React.ComponentPropsWithRef<T>>;
13
+ children: React.ReactElement<any>;
13
14
  /**
14
15
  * The placement of the popover relative to the trigger element.
15
16
  * @default "bottom"
16
17
  */
17
18
  placement?: Placement;
18
- /**
19
- * Additional styles to apply to the tooltip container.
20
- */
21
- style?: React.CSSProperties;
22
- /**
23
- * Additional classes to apply to the tooltip container.
24
- */
25
- className?: string;
26
19
  /**
27
20
  * The offset of the popover relative to the trigger element.
28
21
  * @default 0
@@ -38,5 +31,6 @@ type Props<T extends React.ElementType> = {
38
31
  */
39
32
  disabled?: boolean;
40
33
  };
41
- declare const Tooltip: <T extends React.ElementType>(props: Props<T>) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const UnstyledTooltip: (props: Props) => import("react/jsx-runtime").JSX.Element;
35
+ export declare const Tooltip: ({ vfx, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
42
36
  export default Tooltip;
@@ -9,12 +9,23 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
12
23
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
24
  import { cloneElement, useState } from "react";
14
- import { Box } from "@adamjanicki/ui";
25
+ import Box from "@adamjanicki/ui/components/Box/Box";
15
26
  import { useFloating, useHover, useInteractions, flip, safePolygon, autoUpdate, offset, useTransitionStyles, } from "@floating-ui/react";
16
- var Tooltip = function (props) {
17
- var children = props.children, content = props.tooltipContent, _a = props.placement, placement = _a === void 0 ? "bottom" : _a, style = props.style, _b = props.offset, placementOffset = _b === void 0 ? 0 : _b, className = props.className, _c = props.disableFlip, disableFlip = _c === void 0 ? false : _c, _d = props.disabled, disabled = _d === void 0 ? false : _d;
27
+ export var UnstyledTooltip = function (props) {
28
+ var children = props.children, content = props.tooltipContent, _a = props.placement, placement = _a === void 0 ? "bottom" : _a, style = props.style, _b = props.offset, placementOffset = _b === void 0 ? 0 : _b, _c = props.disableFlip, disableFlip = _c === void 0 ? false : _c, _d = props.disabled, disabled = _d === void 0 ? false : _d, rest = __rest(props, ["children", "tooltipContent", "placement", "style", "offset", "disableFlip", "disabled"]);
18
29
  var _e = useState(false), open = _e[0], setOpen = _e[1];
19
30
  var middleware = [offset(placementOffset)];
20
31
  if (!disableFlip) {
@@ -38,6 +49,10 @@ var Tooltip = function (props) {
38
49
  if (disabled)
39
50
  return children;
40
51
  var _j = getFloatingProps(), onMouseEnter = _j.onMouseEnter, onMouseLeave = _j.onMouseLeave;
41
- return (_jsxs(_Fragment, { children: [cloneElement(children, __assign({ ref: refs.setReference }, getReferenceProps())), isMounted && (_jsx(Box, __assign({ ref: refs.setFloating, style: __assign(__assign(__assign({}, style), floatingStyles), transitionStyles) }, { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, { className: className, children: _jsx(_Fragment, { children: content }) })))] }));
52
+ return (_jsxs(_Fragment, { children: [cloneElement(children, __assign({ ref: refs.setReference }, getReferenceProps())), isMounted && (_jsx(Box, __assign({ ref: refs.setFloating, style: __assign(__assign(__assign({}, floatingStyles), transitionStyles), style) }, { onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, rest, { children: _jsx(_Fragment, { children: content }) })))] }));
53
+ };
54
+ export var Tooltip = function (_a) {
55
+ var vfx = _a.vfx, rest = __rest(_a, ["vfx"]);
56
+ return (_jsx(UnstyledTooltip, __assign({ vfx: __assign({ padding: "s", backgroundColor: "default", border: true, shadow: "floating", radius: "rounded", z: "floating" }, vfx) }, rest)));
42
57
  };
43
58
  export default Tooltip;
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export { default as Popover } from "./components/Popover";
2
- export { default as Tooltip } from "./components/Tooltip";
1
+ import Tooltip, { UnstyledTooltip } from "./components/Tooltip";
2
+ import Popover, { UnstyledPopover } from "./components/Popover";
3
+ export { Tooltip, UnstyledTooltip, Popover, UnstyledPopover };
3
4
  export { default as Autocomplete } from "./components/Autocomplete";
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // Components
2
- export { default as Popover } from "./components/Popover";
3
- export { default as Tooltip } from "./components/Tooltip";
2
+ import Tooltip, { UnstyledTooltip } from "./components/Tooltip";
3
+ import Popover, { UnstyledPopover } from "./components/Popover";
4
+ export { Tooltip, UnstyledTooltip, Popover, UnstyledPopover };
4
5
  export { default as Autocomplete } from "./components/Autocomplete";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamjanicki/ui-extended",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "More advanced UI components and hooks for React in TypeScript",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "react-dom": ">=18"
23
23
  },
24
24
  "dependencies": {
25
- "@adamjanicki/ui": "^1.6.1",
25
+ "@adamjanicki/ui": "^1.7.1",
26
26
  "@floating-ui/react": "^0.26.17"
27
27
  },
28
28
  "devDependencies": {
package/style.css CHANGED
@@ -1,5 +1,4 @@
1
1
  :root {
2
- --aui-autocomplete-popover-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
3
2
  --aui-autocomplete-highlighted: #eee;
4
3
  }
5
4
 
@@ -13,26 +12,3 @@
13
12
  background-color: var(--aui-autocomplete-highlighted);
14
13
  }
15
14
  }
16
-
17
- .aui-autocomplete-popover {
18
- background-color: var(--aui-default-background);
19
- font-weight: 400;
20
- box-shadow: 0 0 0 1px var(--aui-default-border) inset,
21
- var(--aui-container-box-shadow);
22
- overflow: hidden;
23
- border-radius: var(--aui-rounded-radius);
24
- }
25
-
26
- .aui-autocomplete-ul {
27
- overflow: scroll;
28
- max-height: 300px;
29
- display: flex;
30
- flex-direction: column;
31
- outline: none;
32
- }
33
-
34
- .aui-autocomplete-li {
35
- display: flex;
36
- cursor: pointer;
37
- border-radius: var(--aui-rounded-radius);
38
- }