@pixum/combobox 1.0.2 → 1.1.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.
@@ -1 +1 @@
1
- export declare const useIsDesktop: () => boolean;
1
+ export declare const useIsDesktop: () => boolean;
@@ -1,14 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useIsDesktop = void 0;
4
- var react_1 = require("react");
5
- var react_device_detect_1 = require("react-device-detect");
6
- var useIsDesktop = function () {
7
- var _a = (0, react_1.useState)(false), isPageLoaded = _a[0], setPageLoaded = _a[1];
8
- (0, react_1.useEffect)(function () {
9
- setPageLoaded(true);
10
- }, []);
11
- return (0, react_1.useMemo)(function () { return isPageLoaded && react_device_detect_1.isDesktop; }, [react_device_detect_1.isDesktop, isPageLoaded]);
12
- };
13
- exports.useIsDesktop = useIsDesktop;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useIsDesktop = void 0;
4
+ var react_1 = require("react");
5
+ var react_device_detect_1 = require("react-device-detect");
6
+ var useIsDesktop = function () {
7
+ var _a = (0, react_1.useState)(false), isPageLoaded = _a[0], setPageLoaded = _a[1];
8
+ (0, react_1.useEffect)(function () {
9
+ setPageLoaded(true);
10
+ }, []);
11
+ return (0, react_1.useMemo)(function () { return isPageLoaded && react_device_detect_1.isDesktop; }, [react_device_detect_1.isDesktop, isPageLoaded]);
12
+ };
13
+ exports.useIsDesktop = useIsDesktop;
14
14
  //# sourceMappingURL=useIsDesktop.js.map
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import ComboBox from './ComboBox';
2
- export default ComboBox;
3
- export * from './types';
1
+ import ComboBox from './ComboBox';
2
+ export default ComboBox;
3
+ export * from './types';
package/lib/index.js CHANGED
@@ -1,19 +1,19 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- var __importDefault = (this && this.__importDefault) || function (mod) {
13
- return (mod && mod.__esModule) ? mod : { "default": mod };
14
- };
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- var ComboBox_1 = __importDefault(require("./ComboBox"));
17
- exports.default = ComboBox_1.default;
18
- __exportStar(require("./types"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ var ComboBox_1 = __importDefault(require("./ComboBox"));
17
+ exports.default = ComboBox_1.default;
18
+ __exportStar(require("./types"), exports);
19
19
  //# sourceMappingURL=index.js.map
package/lib/types.d.ts CHANGED
@@ -1,33 +1,33 @@
1
- /// <reference types="react" />
2
- import { LeadingType, MenuItemProps } from '@pixum/menu-item';
3
- import { InputMode } from '@pixum/user-input';
4
- interface ComboBoxOptionsProps {
5
- options: Record<string, ComboBoxOptionProps[]> | ComboBoxOptionProps[];
6
- selectedOption?: string;
7
- onClick?: (value?: string) => void;
8
- leadingType?: LeadingType;
9
- optionDetails?: React.ReactNode;
10
- }
11
- interface ComboBoxProps extends ComboBoxOptionsProps {
12
- className?: string;
13
- headline?: string;
14
- helperText?: string;
15
- id?: string;
16
- label?: string;
17
- onChange?: (value: string) => void;
18
- onOptionItemClick?: (value: string) => void;
19
- onOutsideClick?: () => void;
20
- onClick?: () => void;
21
- onSheetClose?: () => void;
22
- placeholder?: string;
23
- searchPattern?: string;
24
- open?: boolean;
25
- value?: string;
26
- noResultsText?: string;
27
- inputMode?: InputMode;
28
- withSearch?: boolean;
29
- }
30
- interface ComboBoxOptionProps extends MenuItemProps {
31
- key?: string;
32
- }
33
- export { ComboBoxProps, ComboBoxOptionProps, ComboBoxOptionsProps };
1
+ /// <reference types="react" />
2
+ import { LeadingType, MenuItemProps } from '@pixum/menu-item';
3
+ import { InputMode } from '@pixum/user-input';
4
+ interface ComboBoxOptionsProps {
5
+ options: Record<string, ComboBoxOptionProps[]> | ComboBoxOptionProps[];
6
+ selectedOption?: string;
7
+ onClick?: (value?: string) => void;
8
+ leadingType?: LeadingType;
9
+ optionDetails?: React.ReactNode;
10
+ }
11
+ interface ComboBoxProps extends ComboBoxOptionsProps {
12
+ className?: string;
13
+ headline?: string;
14
+ helperText?: string;
15
+ id?: string;
16
+ label?: string;
17
+ onChange?: (value: string) => void;
18
+ onOptionItemClick?: (value: string) => void;
19
+ onOutsideClick?: () => void;
20
+ onClick?: () => void;
21
+ onSheetClose?: () => void;
22
+ placeholder?: string;
23
+ searchPattern?: string;
24
+ open?: boolean;
25
+ value?: string;
26
+ noResultsText?: string;
27
+ inputMode?: InputMode;
28
+ withSearch?: boolean;
29
+ }
30
+ interface ComboBoxOptionProps extends MenuItemProps {
31
+ key?: string;
32
+ }
33
+ export { ComboBoxProps, ComboBoxOptionProps, ComboBoxOptionsProps };
package/lib/types.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixum/combobox",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "main": "lib/index.js",
5
5
  "module": "lib/index.js",
6
6
  "license": "UNLICENSED",
@@ -17,5 +17,5 @@
17
17
  "files": [
18
18
  "lib"
19
19
  ],
20
- "gitHead": "986a2c3444d0c0cab53ab1d2a185f9cd90a816ec"
20
+ "gitHead": "ef9852128c1b521e55e58362aee1dc1cac81e751"
21
21
  }