@terraware/web-components 1.0.2 → 1.0.5
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/components/Autocomplete.d.ts +16 -0
- package/components/Autocomplete.d.ts.map +1 -0
- package/components/Autocomplete.js +53 -0
- package/components/Button/Button.d.ts +18 -0
- package/components/Button/Button.d.ts.map +1 -0
- package/components/Button/Button.js +42 -0
- package/components/Button/button.test.d.ts +2 -0
- package/components/Button/button.test.d.ts.map +1 -0
- package/components/Button/button.test.js +33 -0
- package/components/Button/styles.scss +443 -0
- package/components/Checkbox.d.ts +12 -0
- package/components/Checkbox.d.ts.map +1 -0
- package/components/Checkbox.js +33 -0
- package/components/DatePicker.d.ts +19 -0
- package/components/DatePicker.d.ts.map +1 -0
- package/components/DatePicker.js +45 -0
- package/components/DialogBox/DialogBox.d.ts +16 -0
- package/components/DialogBox/DialogBox.d.ts.map +1 -0
- package/components/DialogBox/DialogBox.js +85 -0
- package/components/DialogBox/styles.scss +138 -0
- package/components/Divisor.d.ts +6 -0
- package/components/Divisor.d.ts.map +1 -0
- package/components/Divisor.js +24 -0
- package/components/Dropdown.d.ts +15 -0
- package/components/Dropdown.d.ts.map +1 -0
- package/components/Dropdown.js +59 -0
- package/components/Icon/Icon.d.ts +11 -0
- package/components/Icon/Icon.d.ts.map +1 -0
- package/components/Icon/Icon.js +25 -0
- package/components/Icon/icons/assets/BlobbyGrayIconUploadToTheCloud.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyGrayIconUploadToTheCloud.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyGrayIconUploadToTheCloud.js +41 -0
- package/components/Icon/icons/assets/BlobbyIconHappy.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconHappy.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconHappy.js +165 -0
- package/components/Icon/icons/assets/BlobbyIconHeartMonitor.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconHeartMonitor.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconHeartMonitor.js +165 -0
- package/components/Icon/icons/assets/BlobbyIconLeaf.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconLeaf.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconLeaf.js +165 -0
- package/components/Icon/icons/assets/BlobbyIconLibrary.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconLibrary.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconLibrary.js +165 -0
- package/components/Icon/icons/assets/BlobbyIconOrganization.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconOrganization.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconOrganization.js +158 -0
- package/components/Icon/icons/assets/BlobbyIconPeople.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconPeople.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconPeople.js +158 -0
- package/components/Icon/icons/assets/BlobbyIconSeedBank.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconSeedBank.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconSeedBank.js +165 -0
- package/components/Icon/icons/assets/BlobbyIconWrench.d.ts +8 -0
- package/components/Icon/icons/assets/BlobbyIconWrench.d.ts.map +1 -0
- package/components/Icon/icons/assets/BlobbyIconWrench.js +165 -0
- package/components/Icon/icons/assets/Bug.d.ts +8 -0
- package/components/Icon/icons/assets/Bug.d.ts.map +1 -0
- package/components/Icon/icons/assets/Bug.js +36 -0
- package/components/Icon/icons/assets/Calendar.d.ts +8 -0
- package/components/Icon/icons/assets/Calendar.d.ts.map +1 -0
- package/components/Icon/icons/assets/Calendar.js +35 -0
- package/components/Icon/icons/assets/CaretDown.d.ts +8 -0
- package/components/Icon/icons/assets/CaretDown.d.ts.map +1 -0
- package/components/Icon/icons/assets/CaretDown.js +35 -0
- package/components/Icon/icons/assets/CaretLeft.d.ts +8 -0
- package/components/Icon/icons/assets/CaretLeft.d.ts.map +1 -0
- package/components/Icon/icons/assets/CaretLeft.js +35 -0
- package/components/Icon/icons/assets/CaretUp.d.ts +8 -0
- package/components/Icon/icons/assets/CaretUp.d.ts.map +1 -0
- package/components/Icon/icons/assets/CaretUp.js +35 -0
- package/components/Icon/icons/assets/ChevronDown.d.ts +8 -0
- package/components/Icon/icons/assets/ChevronDown.d.ts.map +1 -0
- package/components/Icon/icons/assets/ChevronDown.js +36 -0
- package/components/Icon/icons/assets/ChevronUp.d.ts +8 -0
- package/components/Icon/icons/assets/ChevronUp.d.ts.map +1 -0
- package/components/Icon/icons/assets/ChevronUp.js +35 -0
- package/components/Icon/icons/assets/Close.d.ts +8 -0
- package/components/Icon/icons/assets/Close.d.ts.map +1 -0
- package/components/Icon/icons/assets/Close.js +35 -0
- package/components/Icon/icons/assets/Critical.d.ts +8 -0
- package/components/Icon/icons/assets/Critical.d.ts.map +1 -0
- package/components/Icon/icons/assets/Critical.js +35 -0
- package/components/Icon/icons/assets/Edit.d.ts +8 -0
- package/components/Icon/icons/assets/Edit.d.ts.map +1 -0
- package/components/Icon/icons/assets/Edit.js +158 -0
- package/components/Icon/icons/assets/Error.d.ts +8 -0
- package/components/Icon/icons/assets/Error.d.ts.map +1 -0
- package/components/Icon/icons/assets/Error.js +35 -0
- package/components/Icon/icons/assets/Export.d.ts +8 -0
- package/components/Icon/icons/assets/Export.d.ts.map +1 -0
- package/components/Icon/icons/assets/Export.js +36 -0
- package/components/Icon/icons/assets/Filter.d.ts +8 -0
- package/components/Icon/icons/assets/Filter.d.ts.map +1 -0
- package/components/Icon/icons/assets/Filter.js +36 -0
- package/components/Icon/icons/assets/Folder.d.ts +8 -0
- package/components/Icon/icons/assets/Folder.d.ts.map +1 -0
- package/components/Icon/icons/assets/Folder.js +35 -0
- package/components/Icon/icons/assets/Help.d.ts +8 -0
- package/components/Icon/icons/assets/Help.d.ts.map +1 -0
- package/components/Icon/icons/assets/Help.js +35 -0
- package/components/Icon/icons/assets/Home.d.ts +8 -0
- package/components/Icon/icons/assets/Home.d.ts.map +1 -0
- package/components/Icon/icons/assets/Home.js +35 -0
- package/components/Icon/icons/assets/IconCancel.d.ts +8 -0
- package/components/Icon/icons/assets/IconCancel.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconCancel.js +36 -0
- package/components/Icon/icons/assets/IconChargingBattery.d.ts +8 -0
- package/components/Icon/icons/assets/IconChargingBattery.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconChargingBattery.js +36 -0
- package/components/Icon/icons/assets/IconCheckmark.d.ts +8 -0
- package/components/Icon/icons/assets/IconCheckmark.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconCheckmark.js +36 -0
- package/components/Icon/icons/assets/IconDashboard.d.ts +8 -0
- package/components/Icon/icons/assets/IconDashboard.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconDashboard.js +36 -0
- package/components/Icon/icons/assets/IconHeartMonitor.d.ts +8 -0
- package/components/Icon/icons/assets/IconHeartMonitor.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconHeartMonitor.js +35 -0
- package/components/Icon/icons/assets/IconMail.d.ts +8 -0
- package/components/Icon/icons/assets/IconMail.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconMail.js +36 -0
- package/components/Icon/icons/assets/IconManager.d.ts +8 -0
- package/components/Icon/icons/assets/IconManager.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconManager.js +36 -0
- package/components/Icon/icons/assets/IconMenu.d.ts +8 -0
- package/components/Icon/icons/assets/IconMenu.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconMenu.js +36 -0
- package/components/Icon/icons/assets/IconOrg.d.ts +8 -0
- package/components/Icon/icons/assets/IconOrg.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconOrg.js +36 -0
- package/components/Icon/icons/assets/IconSeedBank.d.ts +8 -0
- package/components/Icon/icons/assets/IconSeedBank.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconSeedBank.js +35 -0
- package/components/Icon/icons/assets/IconWifi.d.ts +8 -0
- package/components/Icon/icons/assets/IconWifi.d.ts.map +1 -0
- package/components/Icon/icons/assets/IconWifi.js +36 -0
- package/components/Icon/icons/assets/Info.d.ts +8 -0
- package/components/Icon/icons/assets/Info.d.ts.map +1 -0
- package/components/Icon/icons/assets/Info.js +35 -0
- package/components/Icon/icons/assets/Key.d.ts +8 -0
- package/components/Icon/icons/assets/Key.d.ts.map +1 -0
- package/components/Icon/icons/assets/Key.js +35 -0
- package/components/Icon/icons/assets/Leaf.d.ts +8 -0
- package/components/Icon/icons/assets/Leaf.d.ts.map +1 -0
- package/components/Icon/icons/assets/Leaf.js +35 -0
- package/components/Icon/icons/assets/Lock.d.ts +8 -0
- package/components/Icon/icons/assets/Lock.d.ts.map +1 -0
- package/components/Icon/icons/assets/Lock.js +34 -0
- package/components/Icon/icons/assets/MenuVertical.d.ts +8 -0
- package/components/Icon/icons/assets/MenuVertical.d.ts.map +1 -0
- package/components/Icon/icons/assets/MenuVertical.js +36 -0
- package/components/Icon/icons/assets/Notification.d.ts +8 -0
- package/components/Icon/icons/assets/Notification.d.ts.map +1 -0
- package/components/Icon/icons/assets/Notification.js +35 -0
- package/components/Icon/icons/assets/Person.d.ts +8 -0
- package/components/Icon/icons/assets/Person.d.ts.map +1 -0
- package/components/Icon/icons/assets/Person.js +35 -0
- package/components/Icon/icons/assets/Plus.d.ts +8 -0
- package/components/Icon/icons/assets/Plus.d.ts.map +1 -0
- package/components/Icon/icons/assets/Plus.js +35 -0
- package/components/Icon/icons/assets/RestorationSite.d.ts +8 -0
- package/components/Icon/icons/assets/RestorationSite.d.ts.map +1 -0
- package/components/Icon/icons/assets/RestorationSite.js +35 -0
- package/components/Icon/icons/assets/Search.d.ts +8 -0
- package/components/Icon/icons/assets/Search.d.ts.map +1 -0
- package/components/Icon/icons/assets/Search.js +35 -0
- package/components/Icon/icons/assets/Seeds.d.ts +8 -0
- package/components/Icon/icons/assets/Seeds.d.ts.map +1 -0
- package/components/Icon/icons/assets/Seeds.js +35 -0
- package/components/Icon/icons/assets/Site.d.ts +8 -0
- package/components/Icon/icons/assets/Site.d.ts.map +1 -0
- package/components/Icon/icons/assets/Site.js +35 -0
- package/components/Icon/icons/assets/Sparkles.d.ts +8 -0
- package/components/Icon/icons/assets/Sparkles.d.ts.map +1 -0
- package/components/Icon/icons/assets/Sparkles.js +36 -0
- package/components/Icon/icons/assets/Species.d.ts +8 -0
- package/components/Icon/icons/assets/Species.d.ts.map +1 -0
- package/components/Icon/icons/assets/Species.js +35 -0
- package/components/Icon/icons/assets/Species2.d.ts +8 -0
- package/components/Icon/icons/assets/Species2.d.ts.map +1 -0
- package/components/Icon/icons/assets/Species2.js +158 -0
- package/components/Icon/icons/assets/Spinner.d.ts +8 -0
- package/components/Icon/icons/assets/Spinner.d.ts.map +1 -0
- package/components/Icon/icons/assets/Spinner.js +61 -0
- package/components/Icon/icons/assets/Success.d.ts +8 -0
- package/components/Icon/icons/assets/Success.d.ts.map +1 -0
- package/components/Icon/icons/assets/Success.js +35 -0
- package/components/Icon/icons/assets/Touchscreen.d.ts +8 -0
- package/components/Icon/icons/assets/Touchscreen.d.ts.map +1 -0
- package/components/Icon/icons/assets/Touchscreen.js +36 -0
- package/components/Icon/icons/assets/UploadCloud.d.ts +8 -0
- package/components/Icon/icons/assets/UploadCloud.d.ts.map +1 -0
- package/components/Icon/icons/assets/UploadCloud.js +158 -0
- package/components/Icon/icons/assets/Warning.d.ts +8 -0
- package/components/Icon/icons/assets/Warning.d.ts.map +1 -0
- package/components/Icon/icons/assets/Warning.js +35 -0
- package/components/Icon/icons/assets/index.d.ts +57 -0
- package/components/Icon/icons/assets/index.d.ts.map +1 -0
- package/components/Icon/icons/assets/index.js +455 -0
- package/components/Icon/icons/index.d.ts +8 -0
- package/components/Icon/icons/index.d.ts.map +1 -0
- package/components/Icon/icons/index.js +179 -0
- package/components/Icon/styles.scss +43 -0
- package/components/Navbar/NavFooter.d.ts +7 -0
- package/components/Navbar/NavFooter.d.ts.map +1 -0
- package/components/Navbar/NavFooter.js +19 -0
- package/components/Navbar/NavItem.d.ts +13 -0
- package/components/Navbar/NavItem.d.ts.map +1 -0
- package/components/Navbar/NavItem.js +42 -0
- package/components/Navbar/NavSection.d.ts +7 -0
- package/components/Navbar/NavSection.d.ts.map +1 -0
- package/components/Navbar/NavSection.js +23 -0
- package/components/Navbar/Navbar.d.ts +8 -0
- package/components/Navbar/Navbar.d.ts.map +1 -0
- package/components/Navbar/Navbar.js +64 -0
- package/components/Navbar/logo.svg +25 -0
- package/components/Navbar/styles.scss +159 -0
- package/components/Note.d.ts +6 -0
- package/components/Note.d.ts.map +1 -0
- package/components/Note.js +35 -0
- package/components/ProgressCircle/ProgressCircle.d.ts +10 -0
- package/components/ProgressCircle/ProgressCircle.d.ts.map +1 -0
- package/components/ProgressCircle/ProgressCircle.js +37 -0
- package/components/ProgressCircle/styles.scss +84 -0
- package/components/RadioButton.d.ts +10 -0
- package/components/RadioButton.d.ts.map +1 -0
- package/components/RadioButton.js +31 -0
- package/components/Select/Select.d.ts +23 -0
- package/components/Select/Select.d.ts.map +1 -0
- package/components/Select/Select.js +248 -0
- package/components/Select/styles.scss +282 -0
- package/components/Size.d.ts +2 -0
- package/components/Size.d.ts.map +1 -0
- package/components/Size.js +5 -0
- package/components/SummaryBox.d.ts +11 -0
- package/components/SummaryBox.d.ts.map +1 -0
- package/components/SummaryBox.js +79 -0
- package/components/Textfield/Textfield.d.ts +27 -0
- package/components/Textfield/Textfield.d.ts.map +1 -0
- package/components/Textfield/Textfield.js +123 -0
- package/components/Textfield/styles.scss +216 -0
- package/components/table/EnhancedTableToolbar.d.ts +9 -0
- package/components/table/EnhancedTableToolbar.d.ts.map +1 -0
- package/components/table/EnhancedTableToolbar.js +53 -0
- package/components/table/TableCellRenderer.d.ts +26 -0
- package/components/table/TableCellRenderer.d.ts.map +1 -0
- package/components/table/TableCellRenderer.js +166 -0
- package/components/table/TableHeader.d.ts +16 -0
- package/components/table/TableHeader.d.ts.map +1 -0
- package/components/table/TableHeader.js +68 -0
- package/components/table/TableHeaderItem.d.ts +17 -0
- package/components/table/TableHeaderItem.d.ts.map +1 -0
- package/components/table/TableHeaderItem.js +77 -0
- package/components/table/index.d.ts +40 -0
- package/components/table/index.d.ts.map +1 -0
- package/components/table/index.js +322 -0
- package/components/table/sort.d.ts +9 -0
- package/components/table/sort.d.ts.map +1 -0
- package/components/table/sort.js +51 -0
- package/components/table/types.d.ts +34 -0
- package/components/table/types.d.ts.map +1 -0
- package/components/table/types.js +5 -0
- package/fonts/Inter.ttf +0 -0
- package/index.css +13 -0
- package/index.d.ts +26 -0
- package/index.d.ts.map +1 -0
- package/license-report.html +50 -0
- package/package.json +1 -77
- package/setupTests.d.ts +2 -0
- package/setupTests.d.ts.map +1 -0
- package/setupTests.js +5 -0
- package/stories/Autocomplete.stories.d.ts +9 -0
- package/stories/Autocomplete.stories.d.ts.map +1 -0
- package/stories/Button.stories.d.ts +35 -0
- package/stories/Button.stories.d.ts.map +1 -0
- package/stories/Checkbox.stories.d.ts +9 -0
- package/stories/Checkbox.stories.d.ts.map +1 -0
- package/stories/DatePicker.stories.d.ts +11 -0
- package/stories/DatePicker.stories.d.ts.map +1 -0
- package/stories/DialogBox.stories.d.ts +14 -0
- package/stories/DialogBox.stories.d.ts.map +1 -0
- package/stories/Divisor.stories.d.ts +20 -0
- package/stories/Divisor.stories.d.ts.map +1 -0
- package/stories/Dropdown.stories.d.ts +9 -0
- package/stories/Dropdown.stories.d.ts.map +1 -0
- package/stories/Icon.stories.d.ts +9 -0
- package/stories/Icon.stories.d.ts.map +1 -0
- package/stories/Navbar.stories.d.ts +10 -0
- package/stories/Navbar.stories.d.ts.map +1 -0
- package/stories/Note.stories.d.ts +9 -0
- package/stories/Note.stories.d.ts.map +1 -0
- package/stories/ProgressCircle.stories.d.ts +9 -0
- package/stories/ProgressCircle.stories.d.ts.map +1 -0
- package/stories/RadioButton.stories.d.ts +9 -0
- package/stories/RadioButton.stories.d.ts.map +1 -0
- package/stories/Select.stories.d.ts +9 -0
- package/stories/Select.stories.d.ts.map +1 -0
- package/stories/SummaryBox.stories.d.ts +11 -0
- package/stories/SummaryBox.stories.d.ts.map +1 -0
- package/stories/Table.stories.d.ts +12 -0
- package/stories/Table.stories.d.ts.map +1 -0
- package/stories/TextfieldNew.stories.d.ts +29 -0
- package/stories/TextfieldNew.stories.d.ts.map +1 -0
- package/style-dictionary-dist/button_variables.scss +299 -0
- package/style-dictionary-dist/dialogBox_variables.scss +251 -0
- package/style-dictionary-dist/navbar_variables.scss +257 -0
- package/style-dictionary-dist/progressCircle_variables.scss +251 -0
- package/style-dictionary-dist/textfield_variables.scss +297 -0
- package/theme.d.ts +60 -0
- package/theme.d.ts.map +1 -0
- package/theme.js +76 -0
- package/utils/date.d.ts +3 -0
- package/utils/date.d.ts.map +1 -0
- package/utils/date.js +13 -0
- package/utils/index.d.ts +6 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/index.js +39 -0
- package/utils/preventDefaultEvent.d.ts +4 -0
- package/utils/preventDefaultEvent.d.ts.map +1 -0
- package/utils/preventDefaultEvent.js +13 -0
- package/utils/text.d.ts +3 -0
- package/utils/text.d.ts.map +1 -0
- package/utils/text.js +13 -0
- package/utils/useDeviceInfo.d.ts +42 -0
- package/utils/useDeviceInfo.d.ts.map +1 -0
- package/utils/useDeviceInfo.js +87 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _reactResponsive = require("react-responsive");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This function returns properties on device type.
|
|
12
|
+
*
|
|
13
|
+
* {
|
|
14
|
+
* type: 'desktop' | 'tablet' | 'mobile',
|
|
15
|
+
* orientation: 'portrait' | 'landscape',
|
|
16
|
+
* isDesktop: <boolean>,
|
|
17
|
+
* isTablet: <boolean>,
|
|
18
|
+
* isMobile: <boolean>,
|
|
19
|
+
* isRetina: <boolean>,
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* Clients can use whichever properties they see fit.
|
|
23
|
+
*
|
|
24
|
+
* This function also acceps a callback function to be called
|
|
25
|
+
* if there's a change in any of our interested device properties.
|
|
26
|
+
*/
|
|
27
|
+
var useDeviceInfo = function useDeviceInfo() {
|
|
28
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
29
|
+
onChange = _ref.onChange;
|
|
30
|
+
|
|
31
|
+
var deviceChangeCallback = function deviceChangeCallback(matches) {
|
|
32
|
+
if (matches && onChange) {
|
|
33
|
+
onChange();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var isDesktop = (0, _reactResponsive.useMediaQuery)({
|
|
38
|
+
minWidth: 1024
|
|
39
|
+
}, undefined, deviceChangeCallback);
|
|
40
|
+
var isTablet = (0, _reactResponsive.useMediaQuery)({
|
|
41
|
+
maxWidth: 1023,
|
|
42
|
+
minWidth: 768
|
|
43
|
+
}, undefined, deviceChangeCallback);
|
|
44
|
+
var isMobile = (0, _reactResponsive.useMediaQuery)({
|
|
45
|
+
maxWidth: 767
|
|
46
|
+
}, undefined, deviceChangeCallback);
|
|
47
|
+
var isPortrait = (0, _reactResponsive.useMediaQuery)({
|
|
48
|
+
orientation: 'portrait'
|
|
49
|
+
}, undefined, deviceChangeCallback);
|
|
50
|
+
var isRetina = (0, _reactResponsive.useMediaQuery)({
|
|
51
|
+
query: '(min-resolution: 2dppx)'
|
|
52
|
+
}, undefined, deviceChangeCallback);
|
|
53
|
+
|
|
54
|
+
var getDeviceType = function getDeviceType() {
|
|
55
|
+
if (isTablet) {
|
|
56
|
+
return 'tablet';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (isMobile) {
|
|
60
|
+
return 'mobile';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return 'desktop';
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var getDeviceOrientation = function getDeviceOrientation() {
|
|
67
|
+
if (isPortrait) {
|
|
68
|
+
return 'portrait';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return 'landscape';
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
type: getDeviceType(),
|
|
76
|
+
orientation: getDeviceOrientation(),
|
|
77
|
+
isRetina: isRetina,
|
|
78
|
+
isDesktop: isDesktop,
|
|
79
|
+
isTablet: isTablet,
|
|
80
|
+
isMobile: isMobile,
|
|
81
|
+
isPortrait: isPortrait,
|
|
82
|
+
isLandscape: !isPortrait
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var _default = useDeviceInfo;
|
|
87
|
+
exports.default = _default;
|