@blerp/design 1.3.16 → 1.4.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.
- package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
- package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
- package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
- package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
- package/dist/cjs/Blerp.js +9 -16
- package/dist/cjs/BlerpAudioContextProvider.js +2 -2
- package/dist/cjs/BlerpListView.js +318 -168
- package/dist/cjs/BlerpListViewPremium.js +155 -130
- package/dist/cjs/BlerpListViewSkeleton.js +60 -13
- package/dist/cjs/BlerpSkeleton.js +32 -9
- package/dist/cjs/CollectionCard.js +139 -60
- package/dist/cjs/CollectionListViewPremium.js +368 -297
- package/dist/cjs/CollectionSkeleton.js +74 -13
- package/dist/cjs/Dropdown.js +272 -172
- package/dist/cjs/EllipsisLoader.js +66 -21
- package/dist/cjs/GroupCard.js +64 -57
- package/dist/cjs/Icons/Icons.js +288 -426
- package/dist/cjs/ImageEditor.js +247 -0
- package/dist/cjs/ImageUpload.js +226 -0
- package/dist/cjs/NewBlerp.js +354 -160
- package/dist/cjs/NewBlerpTest.js +10 -792
- package/dist/cjs/NewCollectionModal.js +294 -310
- package/dist/cjs/PremiumCollectionCard.js +191 -454
- package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/cjs/ReactionButtons.js +26 -13
- package/dist/cjs/SnackbarContextProvider.js +200 -116
- package/dist/cjs/Theme.js +217 -90
- package/dist/cjs/Toggle.js +86 -32
- package/dist/cjs/UserCard.js +13 -32
- package/dist/cjs/UserPage/LibraryControls.js +180 -93
- package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
- package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
- package/dist/cjs/UsernameWithPopout.js +12 -8
- package/dist/cjs/colors.js +15 -8
- package/dist/cjs/helpers.js +131 -0
- package/dist/cjs/index.js +98 -52
- package/dist/cjs/neo-components/Autocomplete.js +280 -0
- package/dist/cjs/neo-components/BottomNavigation.js +120 -0
- package/dist/cjs/neo-components/Box.js +48 -0
- package/dist/cjs/neo-components/Button.js +206 -0
- package/dist/cjs/neo-components/CircularProgress.js +92 -0
- package/dist/cjs/neo-components/Container.js +75 -0
- package/dist/cjs/neo-components/Dialog.js +441 -0
- package/dist/cjs/neo-components/Fab.js +237 -0
- package/dist/cjs/neo-components/FormControls.js +1057 -0
- package/dist/cjs/neo-components/Grid.js +256 -0
- package/dist/cjs/neo-components/IconButton.js +111 -0
- package/dist/cjs/neo-components/Input.js +493 -0
- package/dist/cjs/neo-components/Layout.js +1213 -0
- package/dist/cjs/neo-components/Misc.js +858 -0
- package/dist/cjs/neo-components/Navigation.js +1578 -0
- package/dist/cjs/neo-components/Paper.js +256 -0
- package/dist/cjs/neo-components/Stack.js +194 -0
- package/dist/cjs/neo-components/Stepper.js +291 -0
- package/dist/cjs/neo-components/Text.js +290 -0
- package/dist/cjs/neo-components/ThemeProvider.js +731 -0
- package/dist/cjs/neo-components/ToggleButton.js +223 -0
- package/dist/cjs/neo-components/createTheme.js +306 -0
- package/dist/cjs/neo-components/withSx.js +164 -0
- package/dist/cjs/neo-utils/sxToStyle.js +508 -0
- package/dist/esm/Blerp/BlerpImageRow.js +166 -46
- package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
- package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
- package/dist/esm/Blerp/BlerpTopRow.js +85 -16
- package/dist/esm/Blerp.js +4 -12
- package/dist/esm/BlerpAudioContextProvider.js +1 -2
- package/dist/esm/BlerpListView.js +313 -160
- package/dist/esm/BlerpListViewPremium.js +135 -109
- package/dist/esm/BlerpListViewSkeleton.js +60 -11
- package/dist/esm/BlerpSkeleton.js +32 -7
- package/dist/esm/CollectionCard.js +118 -38
- package/dist/esm/CollectionListViewPremium.js +367 -294
- package/dist/esm/CollectionSkeleton.js +73 -11
- package/dist/esm/Dropdown.js +260 -161
- package/dist/esm/EllipsisLoader.js +63 -18
- package/dist/esm/GroupCard.js +54 -46
- package/dist/esm/Icons/Icons.js +226 -367
- package/dist/esm/ImageEditor.js +240 -0
- package/dist/esm/ImageUpload.js +217 -0
- package/dist/esm/NewBlerp.js +282 -79
- package/dist/esm/NewBlerpTest.js +11 -781
- package/dist/esm/NewCollectionModal.js +289 -304
- package/dist/esm/PremiumCollectionCard.js +192 -451
- package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/esm/ReactionButtons.js +23 -8
- package/dist/esm/SnackbarContextProvider.js +196 -110
- package/dist/esm/Theme.js +187 -66
- package/dist/esm/Toggle.js +84 -29
- package/dist/esm/UserCard.js +1 -20
- package/dist/esm/UserPage/LibraryControls.js +159 -65
- package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
- package/dist/esm/UserPage/UserProfileHeader.js +100 -79
- package/dist/esm/UsernameWithPopout.js +7 -4
- package/dist/esm/colors.js +11 -9
- package/dist/esm/helpers.js +122 -0
- package/dist/esm/icons.js +1 -1
- package/dist/esm/index.js +39 -3
- package/dist/esm/neo-components/Autocomplete.js +269 -0
- package/dist/esm/neo-components/BottomNavigation.js +109 -0
- package/dist/esm/neo-components/Box.js +36 -0
- package/dist/esm/neo-components/Button.js +194 -0
- package/dist/esm/neo-components/CircularProgress.js +81 -0
- package/dist/esm/neo-components/Container.js +63 -0
- package/dist/esm/neo-components/Dialog.js +423 -0
- package/dist/esm/neo-components/Fab.js +225 -0
- package/dist/esm/neo-components/FormControls.js +1041 -0
- package/dist/esm/neo-components/Grid.js +244 -0
- package/dist/esm/neo-components/IconButton.js +99 -0
- package/dist/esm/neo-components/Input.js +478 -0
- package/dist/esm/neo-components/Layout.js +1179 -0
- package/dist/esm/neo-components/Misc.js +840 -0
- package/dist/esm/neo-components/Navigation.js +1556 -0
- package/dist/esm/neo-components/Paper.js +243 -0
- package/dist/esm/neo-components/Stack.js +182 -0
- package/dist/esm/neo-components/Stepper.js +278 -0
- package/dist/esm/neo-components/Text.js +277 -0
- package/dist/esm/neo-components/ThemeProvider.js +718 -0
- package/dist/esm/neo-components/ToggleButton.js +214 -0
- package/dist/esm/neo-components/createTheme.js +297 -0
- package/dist/esm/neo-components/withSx.js +153 -0
- package/dist/esm/neo-utils/sxToStyle.js +502 -0
- package/package.json +19 -15
package/dist/cjs/index.js
CHANGED
|
@@ -2,7 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var ThemeProvider$1 = require('./neo-components/ThemeProvider.js');
|
|
6
|
+
var createTheme$1 = require('./neo-components/createTheme.js');
|
|
7
|
+
var CircularProgress$1 = require('./neo-components/CircularProgress.js');
|
|
8
|
+
var Box$1 = require('./neo-components/Box.js');
|
|
9
|
+
var Stack$1 = require('./neo-components/Stack.js');
|
|
10
|
+
var Grid$1 = require('./neo-components/Grid.js');
|
|
11
|
+
var Container$1 = require('./neo-components/Container.js');
|
|
12
|
+
var Text$1 = require('./neo-components/Text.js');
|
|
13
|
+
var Button$1 = require('./neo-components/Button.js');
|
|
14
|
+
var IconButton$1 = require('./neo-components/IconButton.js');
|
|
15
|
+
var Fab = require('./neo-components/Fab.js');
|
|
16
|
+
require('./neo-components/ToggleButton.js');
|
|
17
|
+
var Input$1 = require('./neo-components/Input.js');
|
|
18
|
+
var FormControls = require('./neo-components/FormControls.js');
|
|
19
|
+
var Autocomplete$1 = require('./neo-components/Autocomplete.js');
|
|
20
|
+
var Paper$1 = require('./neo-components/Paper.js');
|
|
21
|
+
var Dialog$1 = require('./neo-components/Dialog.js');
|
|
22
|
+
var Navigation = require('./neo-components/Navigation.js');
|
|
23
|
+
var BottomNavigation$1 = require('./neo-components/BottomNavigation.js');
|
|
24
|
+
var Stepper$1 = require('./neo-components/Stepper.js');
|
|
25
|
+
var Misc = require('./neo-components/Misc.js');
|
|
26
|
+
var Layout = require('./neo-components/Layout.js');
|
|
27
|
+
require('@babel/runtime/helpers/extends');
|
|
28
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
29
|
+
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
30
|
+
require('react');
|
|
6
31
|
var Blerp$1 = require('./Blerp.js');
|
|
7
32
|
var NewBlerp$1 = require('./NewBlerp.js');
|
|
8
33
|
var NewBlerpTest$1 = require('./NewBlerpTest.js');
|
|
@@ -31,54 +56,59 @@ var PremiumBlerpCheckoutModal = require('./PurchaseModals/PremiumBlerpCheckoutMo
|
|
|
31
56
|
var PremiumCollectionCheckoutModal = require('./PurchaseModals/PremiumCollectionCheckoutModal.js');
|
|
32
57
|
var PremiumSubscriptionCheckoutModal = require('./PurchaseModals/PremiumSubscriptionCheckoutModal.js');
|
|
33
58
|
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
59
|
+
// import {
|
|
60
|
+
const Theme = Theme$1["default"];
|
|
61
|
+
const AccordionSummary = Layout.AccordionSummary;
|
|
62
|
+
const AccordionDetails = Layout.AccordionDetails;
|
|
63
|
+
const AccordionActions = Layout.AccordionActions;
|
|
64
|
+
const Box = Box$1.Box;
|
|
65
|
+
const Container = Container$1.Container;
|
|
66
|
+
const Grid = Grid$1.Grid;
|
|
67
|
+
const Stack = Stack$1.Stack;
|
|
68
|
+
const ImageList = Layout.ImageList;
|
|
69
|
+
const Autocomplete = Autocomplete$1.Autocomplete;
|
|
70
|
+
const Button = Button$1.Button;
|
|
71
|
+
const ButtonGroup = Layout.ButtonGroup;
|
|
72
|
+
const Checkbox = FormControls.Checkbox;
|
|
73
|
+
const FloatingActionButton = Fab.Fab;
|
|
74
|
+
const RadioButton = FormControls.Radio;
|
|
75
|
+
const Rating = FormControls.Rating;
|
|
76
|
+
const Select = FormControls.Select;
|
|
77
|
+
const Slider = FormControls.Slider;
|
|
78
|
+
const Switch = FormControls.Switch;
|
|
79
|
+
const Input = Input$1.TextField;
|
|
80
|
+
const BottomNavigation = BottomNavigation$1.BottomNavigation;
|
|
81
|
+
const Breadcrumbs = Layout.Breadcrumbs;
|
|
82
|
+
const Drawer = Navigation.Drawer;
|
|
83
|
+
const Link = Misc.Link;
|
|
84
|
+
const Menu = Navigation.Menu;
|
|
85
|
+
const Pagination = Layout.Pagination;
|
|
86
|
+
const SpeedDial = Fab.SpeedDial;
|
|
87
|
+
const Stepper = Stepper$1.Stepper;
|
|
88
|
+
const Tabs = Navigation.Tabs;
|
|
89
|
+
const Tab = Navigation.Tab;
|
|
90
|
+
const Accordion = Layout.Accordion;
|
|
91
|
+
const AppBar = Layout.AppBar;
|
|
92
|
+
const Card = Paper$1.Card;
|
|
93
|
+
const Paper = Paper$1.Paper;
|
|
94
|
+
const Alert = Navigation.Alert;
|
|
95
|
+
const Backdrop = Dialog$1.Backdrop;
|
|
96
|
+
const Dialog = Dialog$1.Dialog;
|
|
97
|
+
const LinearProgress = Misc.LinearProgress;
|
|
98
|
+
const Skeleton = Misc.Skeleton;
|
|
99
|
+
const Snackbar = Navigation.Snackbar;
|
|
100
|
+
const Avatar = Misc.Avatar;
|
|
101
|
+
const Badge = Misc.Badge;
|
|
102
|
+
const Chip = Misc.Chip;
|
|
103
|
+
const Divider = Misc.Divider;
|
|
104
|
+
const List = Layout.List;
|
|
105
|
+
const Table = Layout.Table;
|
|
106
|
+
const CircularProgress = CircularProgress$1.CircularProgress;
|
|
107
|
+
const Tooltip = Misc.Tooltip;
|
|
108
|
+
const Toolbar = Layout.Toolbar;
|
|
109
|
+
const Text = Text$1.Typography;
|
|
110
|
+
const Modal = Dialog$1.Modal;
|
|
111
|
+
const Popover = Navigation.Popover;
|
|
82
112
|
const Blerp = Blerp$1.Blerp;
|
|
83
113
|
const NewBlerp = NewBlerp$1.NewBlerp;
|
|
84
114
|
const NewBlerpTest = NewBlerpTest$1.NewBlerpTest;
|
|
@@ -86,11 +116,11 @@ const GroupCard = GroupCard$1.GroupCard;
|
|
|
86
116
|
const UserCard = UserCard$1.UserCard;
|
|
87
117
|
const UsernameWithPopout = UsernameWithPopout$1.UsernameWithPopout;
|
|
88
118
|
const BlerpAudioContextProvider = BlerpAudioContextProvider$1.BlerpAudioContextProvider;
|
|
89
|
-
const IconButton =
|
|
119
|
+
const IconButton = IconButton$1.IconButton;
|
|
90
120
|
const Toggle = Toggle$1.Toggle;
|
|
91
121
|
const Dropdown = Dropdown$1.Dropdown;
|
|
92
122
|
const NewDropdown = Dropdown$1.NewDropdown;
|
|
93
|
-
const MenuItem =
|
|
123
|
+
const MenuItem = Navigation.MenuItem;
|
|
94
124
|
const NewCollectionModal = NewCollectionModal$1.NewCollectionModal;
|
|
95
125
|
const CollectionCard = CollectionCard$1.CollectionCard;
|
|
96
126
|
const BlerpListView = BlerpListView$1.BlerpListView;
|
|
@@ -99,7 +129,13 @@ const BlerpListViewPremium = BlerpListViewPremium$1.BlerpListViewPremium;
|
|
|
99
129
|
const BlerpSkeleton = BlerpSkeleton$1.BlerpSkeleton;
|
|
100
130
|
const BlerpListViewSkeleton = BlerpListViewSkeleton$1.BlerpListViewSkeleton;
|
|
101
131
|
const CollectionSkeleton = CollectionSkeleton$1.CollectionSkeleton;
|
|
102
|
-
const InputAdornment =
|
|
132
|
+
const InputAdornment = Input$1.InputAdornment;
|
|
133
|
+
const createTheme = createTheme$1.createTheme;
|
|
134
|
+
const ThemeProvider = ThemeProvider$1.ThemeProvider;
|
|
135
|
+
const AlertTitle = Navigation.AlertTitle;
|
|
136
|
+
const SvgIcon = Layout.SvgIcon;
|
|
137
|
+
const FormControl = Layout.FormControl;
|
|
138
|
+
const InputLabel = Layout.InputLabel; // export const BlerpContextMenu = MBlerpContextMenu;
|
|
103
139
|
// export const ListItem = MListItem;
|
|
104
140
|
// // export const ListItemText = MListItemText;
|
|
105
141
|
// export const ListItemButtonText = MListItemButtonText;
|
|
@@ -375,7 +411,11 @@ exports.PremiumBlerpCheckoutModal = PremiumBlerpCheckoutModal;
|
|
|
375
411
|
exports.PremiumCollectionCheckoutModal = PremiumCollectionCheckoutModal;
|
|
376
412
|
exports.PremiumSubscriptionCheckoutModal = PremiumSubscriptionCheckoutModal;
|
|
377
413
|
exports.Accordion = Accordion;
|
|
414
|
+
exports.AccordionActions = AccordionActions;
|
|
415
|
+
exports.AccordionDetails = AccordionDetails;
|
|
416
|
+
exports.AccordionSummary = AccordionSummary;
|
|
378
417
|
exports.Alert = Alert;
|
|
418
|
+
exports.AlertTitle = AlertTitle;
|
|
379
419
|
exports.AppBar = AppBar;
|
|
380
420
|
exports.Autocomplete = Autocomplete;
|
|
381
421
|
exports.Avatar = Avatar;
|
|
@@ -395,6 +435,7 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
395
435
|
exports.Card = Card;
|
|
396
436
|
exports.Checkbox = Checkbox;
|
|
397
437
|
exports.Chip = Chip;
|
|
438
|
+
exports.CircularProgress = CircularProgress;
|
|
398
439
|
exports.CollectionCard = CollectionCard;
|
|
399
440
|
exports.CollectionListViewPremium = CollectionListViewPremium;
|
|
400
441
|
exports.CollectionSkeleton = CollectionSkeleton;
|
|
@@ -404,12 +445,14 @@ exports.Divider = Divider;
|
|
|
404
445
|
exports.Drawer = Drawer;
|
|
405
446
|
exports.Dropdown = Dropdown;
|
|
406
447
|
exports.FloatingActionButton = FloatingActionButton;
|
|
448
|
+
exports.FormControl = FormControl;
|
|
407
449
|
exports.Grid = Grid;
|
|
408
450
|
exports.GroupCard = GroupCard;
|
|
409
451
|
exports.IconButton = IconButton;
|
|
410
452
|
exports.ImageList = ImageList;
|
|
411
453
|
exports.Input = Input;
|
|
412
454
|
exports.InputAdornment = InputAdornment;
|
|
455
|
+
exports.InputLabel = InputLabel;
|
|
413
456
|
exports.LinearProgress = LinearProgress;
|
|
414
457
|
exports.Link = Link;
|
|
415
458
|
exports.List = List;
|
|
@@ -432,18 +475,21 @@ exports.Snackbar = Snackbar;
|
|
|
432
475
|
exports.SpeedDial = SpeedDial;
|
|
433
476
|
exports.Stack = Stack;
|
|
434
477
|
exports.Stepper = Stepper;
|
|
478
|
+
exports.SvgIcon = SvgIcon;
|
|
435
479
|
exports.Switch = Switch;
|
|
436
480
|
exports.Tab = Tab;
|
|
437
481
|
exports.Table = Table;
|
|
438
482
|
exports.Tabs = Tabs;
|
|
439
483
|
exports.Text = Text;
|
|
440
484
|
exports.Theme = Theme;
|
|
485
|
+
exports.ThemeProvider = ThemeProvider;
|
|
441
486
|
exports.Themes = Themes;
|
|
442
487
|
exports.Toggle = Toggle;
|
|
443
488
|
exports.Toolbar = Toolbar;
|
|
444
489
|
exports.Tooltip = Tooltip;
|
|
445
490
|
exports.UserCard = UserCard;
|
|
446
491
|
exports.UsernameWithPopout = UsernameWithPopout;
|
|
492
|
+
exports.createTheme = createTheme;
|
|
447
493
|
exports.darkThemeV1 = darkThemeV1;
|
|
448
494
|
exports.lightThemeV1 = lightThemeV1;
|
|
449
495
|
exports.mainTheme = mainTheme;
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var withSx = require('./withSx.js');
|
|
10
|
+
var Input = require('./Input.js');
|
|
11
|
+
var Paper = require('./Paper.js');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
16
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
+
|
|
20
|
+
const _excluded = ["options", "value", "defaultValue", "onChange", "onInputChange", "inputValue", "getOptionLabel", "isOptionEqualToValue", "filterOptions", "renderInput", "renderOption", "renderTags", "multiple", "freeSolo", "disabled", "disableClearable", "loading", "loadingText", "noOptionsText", "open", "onOpen", "onClose", "autoComplete", "autoHighlight", "clearOnBlur", "clearOnEscape", "disableCloseOnSelect", "disableListWrap", "disablePortal", "fullWidth", "groupBy", "includeInputInList", "limitTags", "ListboxComponent", "ListboxProps", "openOnFocus", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "selectOnFocus", "size", "clearIcon", "forcePopupIcon", "placeholder", "className", "style"];
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
|
+
/**
|
|
26
|
+
* Autocomplete - combo box with filtering
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
const AutocompleteBase = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
30
|
+
let {
|
|
31
|
+
options = [],
|
|
32
|
+
value,
|
|
33
|
+
defaultValue,
|
|
34
|
+
onChange,
|
|
35
|
+
onInputChange,
|
|
36
|
+
inputValue: controlledInputValue,
|
|
37
|
+
getOptionLabel = option => {
|
|
38
|
+
var _ref2, _option$label, _option$toString;
|
|
39
|
+
|
|
40
|
+
return (_ref2 = (_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : option === null || option === void 0 ? void 0 : (_option$toString = option.toString) === null || _option$toString === void 0 ? void 0 : _option$toString.call(option)) !== null && _ref2 !== void 0 ? _ref2 : "";
|
|
41
|
+
},
|
|
42
|
+
isOptionEqualToValue = (option, value) => option === value,
|
|
43
|
+
filterOptions,
|
|
44
|
+
renderInput,
|
|
45
|
+
renderOption,
|
|
46
|
+
renderTags,
|
|
47
|
+
multiple = false,
|
|
48
|
+
freeSolo = false,
|
|
49
|
+
disabled = false,
|
|
50
|
+
disableClearable = false,
|
|
51
|
+
loading = false,
|
|
52
|
+
loadingText = "Loading…",
|
|
53
|
+
noOptionsText = "No options",
|
|
54
|
+
open: controlledOpen,
|
|
55
|
+
onOpen,
|
|
56
|
+
onClose,
|
|
57
|
+
autoComplete = false,
|
|
58
|
+
autoHighlight = false,
|
|
59
|
+
clearOnBlur = !freeSolo,
|
|
60
|
+
clearOnEscape = false,
|
|
61
|
+
disableCloseOnSelect = false,
|
|
62
|
+
disableListWrap = false,
|
|
63
|
+
disablePortal = false,
|
|
64
|
+
fullWidth = false,
|
|
65
|
+
groupBy,
|
|
66
|
+
includeInputInList = false,
|
|
67
|
+
limitTags = -1,
|
|
68
|
+
ListboxComponent = "ul",
|
|
69
|
+
ListboxProps,
|
|
70
|
+
openOnFocus = false,
|
|
71
|
+
PaperComponent = Paper.Paper,
|
|
72
|
+
PopperComponent,
|
|
73
|
+
popupIcon,
|
|
74
|
+
readOnly = false,
|
|
75
|
+
selectOnFocus = false,
|
|
76
|
+
size = "medium",
|
|
77
|
+
clearIcon,
|
|
78
|
+
forcePopupIcon = "auto",
|
|
79
|
+
placeholder,
|
|
80
|
+
className,
|
|
81
|
+
style
|
|
82
|
+
} = _ref,
|
|
83
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
84
|
+
|
|
85
|
+
const [internalOpen, setInternalOpen] = React.useState(false);
|
|
86
|
+
const [internalInputValue, setInternalInputValue] = React.useState("");
|
|
87
|
+
const [internalValue, setInternalValue] = React.useState(multiple ? defaultValue || [] : defaultValue || null);
|
|
88
|
+
const inputRef = React.useRef(null);
|
|
89
|
+
const listboxRef = React.useRef(null);
|
|
90
|
+
const open = controlledOpen !== undefined ? controlledOpen : internalOpen;
|
|
91
|
+
const inputValue = controlledInputValue !== undefined ? controlledInputValue : internalInputValue;
|
|
92
|
+
const selectedValue = value !== undefined ? value : internalValue;
|
|
93
|
+
|
|
94
|
+
const handleOpen = () => {
|
|
95
|
+
if (disabled || readOnly) return;
|
|
96
|
+
setInternalOpen(true);
|
|
97
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const handleClose = () => {
|
|
101
|
+
setInternalOpen(false);
|
|
102
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const handleInputChange = event => {
|
|
106
|
+
const newValue = event.target.value;
|
|
107
|
+
setInternalInputValue(newValue);
|
|
108
|
+
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, newValue, "input");
|
|
109
|
+
if (!open) handleOpen();
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const handleSelect = option => {
|
|
113
|
+
if (multiple) {
|
|
114
|
+
const newValue = Array.isArray(selectedValue) ? selectedValue.some(v => isOptionEqualToValue(option, v)) ? selectedValue.filter(v => !isOptionEqualToValue(option, v)) : [...selectedValue, option] : [option];
|
|
115
|
+
setInternalValue(newValue);
|
|
116
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null, newValue, "selectOption");
|
|
117
|
+
} else {
|
|
118
|
+
setInternalValue(option);
|
|
119
|
+
setInternalInputValue(getOptionLabel(option));
|
|
120
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null, option, "selectOption");
|
|
121
|
+
if (!disableCloseOnSelect) handleClose();
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const handleClear = event => {
|
|
126
|
+
event.stopPropagation();
|
|
127
|
+
setInternalValue(multiple ? [] : null);
|
|
128
|
+
setInternalInputValue("");
|
|
129
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event, multiple ? [] : null, "clear");
|
|
130
|
+
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, "", "clear");
|
|
131
|
+
}; // Filter options
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
const filteredOptions = filterOptions ? filterOptions(options, {
|
|
135
|
+
inputValue,
|
|
136
|
+
getOptionLabel
|
|
137
|
+
}) : options.filter(option => getOptionLabel(option).toLowerCase().includes(inputValue.toLowerCase())); // Group options if groupBy provided
|
|
138
|
+
|
|
139
|
+
const groupedOptions = groupBy ? filteredOptions.reduce((acc, option) => {
|
|
140
|
+
const group = groupBy(option);
|
|
141
|
+
if (!acc[group]) acc[group] = [];
|
|
142
|
+
acc[group].push(option);
|
|
143
|
+
return acc;
|
|
144
|
+
}, {}) : null;
|
|
145
|
+
|
|
146
|
+
const baseStyle = _objectSpread({
|
|
147
|
+
position: "relative",
|
|
148
|
+
display: "inline-flex",
|
|
149
|
+
flexDirection: "column",
|
|
150
|
+
width: fullWidth ? "100%" : undefined
|
|
151
|
+
}, style);
|
|
152
|
+
|
|
153
|
+
const listboxStyle = {
|
|
154
|
+
position: "absolute",
|
|
155
|
+
top: "100%",
|
|
156
|
+
left: 0,
|
|
157
|
+
right: 0,
|
|
158
|
+
zIndex: 1300,
|
|
159
|
+
maxHeight: 300,
|
|
160
|
+
overflow: "auto",
|
|
161
|
+
margin: 0,
|
|
162
|
+
padding: 0,
|
|
163
|
+
listStyle: "none",
|
|
164
|
+
backgroundColor: "#FFFFFF",
|
|
165
|
+
borderRadius: 4,
|
|
166
|
+
boxShadow: "0 2px 4px -1px rgba(0,0,0,0.2), 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12)"
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const optionStyle = (isSelected, isHighlighted) => ({
|
|
170
|
+
padding: "8px 16px",
|
|
171
|
+
cursor: "pointer",
|
|
172
|
+
backgroundColor: isSelected ? "#E3F2FD" : isHighlighted ? "#F5F5F5" : "transparent"
|
|
173
|
+
}); // Close on outside click
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
React.useEffect(() => {
|
|
177
|
+
const handleClickOutside = event => {
|
|
178
|
+
if (inputRef.current && !inputRef.current.contains(event.target) && listboxRef.current && !listboxRef.current.contains(event.target)) {
|
|
179
|
+
handleClose();
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
184
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
185
|
+
}, []);
|
|
186
|
+
const inputProps = {
|
|
187
|
+
ref: inputRef,
|
|
188
|
+
value: inputValue,
|
|
189
|
+
onChange: handleInputChange,
|
|
190
|
+
onFocus: openOnFocus ? handleOpen : undefined,
|
|
191
|
+
disabled,
|
|
192
|
+
readOnly,
|
|
193
|
+
placeholder,
|
|
194
|
+
size
|
|
195
|
+
};
|
|
196
|
+
const showClearButton = !disableClearable && !disabled && !readOnly && (multiple ? (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) > 0 : selectedValue !== null);
|
|
197
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
198
|
+
ref: ref,
|
|
199
|
+
className: className,
|
|
200
|
+
style: baseStyle
|
|
201
|
+
}, props), renderInput ? renderInput(_objectSpread(_objectSpread({}, inputProps), {}, {
|
|
202
|
+
InputProps: {
|
|
203
|
+
endAdornment: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showClearButton && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
204
|
+
onClick: handleClear,
|
|
205
|
+
style: {
|
|
206
|
+
background: "none",
|
|
207
|
+
border: "none",
|
|
208
|
+
cursor: "pointer",
|
|
209
|
+
padding: 4
|
|
210
|
+
}
|
|
211
|
+
}, clearIcon || "×"), forcePopupIcon !== false && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
212
|
+
onClick: () => open ? handleClose() : handleOpen(),
|
|
213
|
+
style: {
|
|
214
|
+
background: "none",
|
|
215
|
+
border: "none",
|
|
216
|
+
cursor: "pointer",
|
|
217
|
+
padding: 4,
|
|
218
|
+
transform: open ? "rotate(180deg)" : "none"
|
|
219
|
+
}
|
|
220
|
+
}, popupIcon || "▼"))
|
|
221
|
+
}
|
|
222
|
+
})) : /*#__PURE__*/React__default["default"].createElement(Input.TextField, inputProps), open && /*#__PURE__*/React__default["default"].createElement(PaperComponent, {
|
|
223
|
+
style: listboxStyle
|
|
224
|
+
}, /*#__PURE__*/React__default["default"].createElement(ListboxComponent, _extends__default["default"]({
|
|
225
|
+
ref: listboxRef
|
|
226
|
+
}, ListboxProps), loading ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
227
|
+
style: {
|
|
228
|
+
padding: "8px 16px",
|
|
229
|
+
color: "#757575"
|
|
230
|
+
}
|
|
231
|
+
}, loadingText) : filteredOptions.length === 0 ? /*#__PURE__*/React__default["default"].createElement("li", {
|
|
232
|
+
style: {
|
|
233
|
+
padding: "8px 16px",
|
|
234
|
+
color: "#757575"
|
|
235
|
+
}
|
|
236
|
+
}, noOptionsText) : groupedOptions ? Object.entries(groupedOptions).map(_ref3 => {
|
|
237
|
+
let [group, groupOptions] = _ref3;
|
|
238
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
239
|
+
key: group
|
|
240
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
241
|
+
style: {
|
|
242
|
+
padding: "8px 16px",
|
|
243
|
+
fontWeight: 600,
|
|
244
|
+
backgroundColor: "#F5F5F5"
|
|
245
|
+
}
|
|
246
|
+
}, group), /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
247
|
+
style: {
|
|
248
|
+
listStyle: "none",
|
|
249
|
+
margin: 0,
|
|
250
|
+
padding: 0
|
|
251
|
+
}
|
|
252
|
+
}, groupOptions.map((option, index) => {
|
|
253
|
+
const isSelected = multiple ? selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.some(v => isOptionEqualToValue(option, v)) : isOptionEqualToValue(option, selectedValue);
|
|
254
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
255
|
+
key: index,
|
|
256
|
+
style: optionStyle(isSelected, false),
|
|
257
|
+
onClick: () => handleSelect(option)
|
|
258
|
+
}, renderOption ? renderOption({
|
|
259
|
+
option
|
|
260
|
+
}, option, {
|
|
261
|
+
selected: isSelected
|
|
262
|
+
}) : getOptionLabel(option));
|
|
263
|
+
})));
|
|
264
|
+
}) : filteredOptions.map((option, index) => {
|
|
265
|
+
const isSelected = multiple ? selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.some(v => isOptionEqualToValue(option, v)) : isOptionEqualToValue(option, selectedValue);
|
|
266
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
267
|
+
key: index,
|
|
268
|
+
style: optionStyle(isSelected, false),
|
|
269
|
+
onClick: () => handleSelect(option)
|
|
270
|
+
}, renderOption ? renderOption({
|
|
271
|
+
option
|
|
272
|
+
}, option, {
|
|
273
|
+
selected: isSelected
|
|
274
|
+
}) : getOptionLabel(option));
|
|
275
|
+
}))));
|
|
276
|
+
});
|
|
277
|
+
AutocompleteBase.displayName = "Autocomplete";
|
|
278
|
+
const Autocomplete = withSx.withSx(AutocompleteBase);
|
|
279
|
+
|
|
280
|
+
exports.Autocomplete = Autocomplete;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var withSx = require('./withSx.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
+
|
|
13
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
14
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
15
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
|
|
18
|
+
const _excluded = ["children", "value", "onChange", "showLabels", "className", "style"],
|
|
19
|
+
_excluded2 = ["icon", "label", "value", "selected", "showLabel", "onChange", "className", "style"];
|
|
20
|
+
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
24
|
+
/**
|
|
25
|
+
* BottomNavigation - navigation bar at bottom of screen
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const BottomNavigationBase = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
29
|
+
let {
|
|
30
|
+
children,
|
|
31
|
+
value,
|
|
32
|
+
onChange,
|
|
33
|
+
showLabels = false,
|
|
34
|
+
className,
|
|
35
|
+
style
|
|
36
|
+
} = _ref,
|
|
37
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
38
|
+
|
|
39
|
+
const baseStyle = _objectSpread({
|
|
40
|
+
display: "flex",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
height: 56,
|
|
44
|
+
backgroundColor: "#FFFFFF",
|
|
45
|
+
boxShadow: "0 -1px 3px rgba(0,0,0,0.12)"
|
|
46
|
+
}, style);
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
49
|
+
ref: ref,
|
|
50
|
+
className: className,
|
|
51
|
+
style: baseStyle
|
|
52
|
+
}, props), React__default["default"].Children.map(children, (child, index) => /*#__PURE__*/React__default["default"].isValidElement(child) ? /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
53
|
+
selected: value === index || value === child.props.value,
|
|
54
|
+
showLabel: showLabels || child.props.showLabel,
|
|
55
|
+
onChange: event => {
|
|
56
|
+
var _child$props$value;
|
|
57
|
+
|
|
58
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(event, (_child$props$value = child.props.value) !== null && _child$props$value !== void 0 ? _child$props$value : index);
|
|
59
|
+
}
|
|
60
|
+
}) : child));
|
|
61
|
+
});
|
|
62
|
+
BottomNavigationBase.displayName = "BottomNavigation";
|
|
63
|
+
const BottomNavigation = withSx.withSx(BottomNavigationBase);
|
|
64
|
+
/**
|
|
65
|
+
* BottomNavigationAction - individual action in BottomNavigation
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
const BottomNavigationActionBase = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref) => {
|
|
69
|
+
let {
|
|
70
|
+
icon,
|
|
71
|
+
label,
|
|
72
|
+
value,
|
|
73
|
+
selected = false,
|
|
74
|
+
showLabel = false,
|
|
75
|
+
onChange,
|
|
76
|
+
className,
|
|
77
|
+
style
|
|
78
|
+
} = _ref2,
|
|
79
|
+
props = _objectWithoutProperties__default["default"](_ref2, _excluded2);
|
|
80
|
+
|
|
81
|
+
const baseStyle = _objectSpread({
|
|
82
|
+
display: "flex",
|
|
83
|
+
flexDirection: "column",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
justifyContent: "center",
|
|
86
|
+
flex: 1,
|
|
87
|
+
minWidth: 80,
|
|
88
|
+
maxWidth: 168,
|
|
89
|
+
padding: "6px 12px",
|
|
90
|
+
cursor: "pointer",
|
|
91
|
+
backgroundColor: "transparent",
|
|
92
|
+
border: "none",
|
|
93
|
+
color: selected ? "#7C4DFF" : "#757575",
|
|
94
|
+
transition: "color 0.2s"
|
|
95
|
+
}, style);
|
|
96
|
+
|
|
97
|
+
const iconStyle = {
|
|
98
|
+
fontSize: 24,
|
|
99
|
+
marginBottom: showLabel || selected ? 4 : 0
|
|
100
|
+
};
|
|
101
|
+
const labelStyle = {
|
|
102
|
+
fontSize: 12,
|
|
103
|
+
opacity: showLabel || selected ? 1 : 0,
|
|
104
|
+
transition: "opacity 0.2s"
|
|
105
|
+
};
|
|
106
|
+
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({
|
|
107
|
+
ref: ref,
|
|
108
|
+
className: className,
|
|
109
|
+
style: baseStyle,
|
|
110
|
+
onClick: onChange
|
|
111
|
+
}, props), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
112
|
+
style: iconStyle
|
|
113
|
+
}, icon), (showLabel || selected) && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
114
|
+
style: labelStyle
|
|
115
|
+
}, label));
|
|
116
|
+
});
|
|
117
|
+
BottomNavigationActionBase.displayName = "BottomNavigationAction";
|
|
118
|
+
withSx.withSx(BottomNavigationActionBase);
|
|
119
|
+
|
|
120
|
+
exports.BottomNavigation = BottomNavigation;
|