@ainias42/react-bootstrap-mobile 1.0.6 → 1.0.7
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/.storybook/preview.ts +3 -1
- package/dist/Components/Flavor.d.ts +4 -4
- package/dist/Components/FlavorWithText.d.ts +19 -0
- package/dist/Components/Icon/BaseIcon.d.ts +4 -1
- package/dist/Components/Icon/DoubleIcon.d.ts +3 -2
- package/dist/Components/Icon/DoubleIcon.stories.d.ts +1 -1
- package/dist/Components/Icon/Icon.stories.d.ts +1 -1
- package/dist/Components/Image/Image.d.ts +1 -1
- package/dist/Components/Layout/Grow.d.ts +1 -1
- package/dist/Components/Menu/Menu.d.ts +2 -1
- package/dist/Components/Menu/MenuItem.d.ts +5 -3
- package/dist/Components/Menu/MenuItem.stories.d.ts +1 -1
- package/dist/Components/Menu/Submenu.d.ts +3 -2
- package/dist/Components/Menu/Submenu.stories.d.ts +1 -1
- package/dist/index.css +10 -10
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +48 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/ActionSheet/actionSheet.module.scss +3 -3
- package/src/Components/Card/card.module.scss +1 -0
- package/src/Components/Dialog/ButtonDialog.tsx +1 -1
- package/src/Components/Dialog/dialog.module.scss +1 -1
- package/src/Components/Flavor.ts +4 -4
- package/src/Components/FlavorWithText.ts +11 -0
- package/src/Components/FormElements/Button/Button.stories.tsx +4 -4
- package/src/Components/FormElements/Button/Button.tsx +1 -1
- package/src/Components/FormElements/ColorInput/colorInput.module.scss +2 -2
- package/src/Components/FormElements/SearchSelectInput/seachSelectInput.module.scss +1 -1
- package/src/Components/Icon/BaseIcon.tsx +7 -2
- package/src/Components/Icon/DoubleIcon.stories.tsx +3 -2
- package/src/Components/Icon/DoubleIcon.tsx +6 -5
- package/src/Components/Icon/Icon.stories.tsx +4 -2
- package/src/Components/Icon/icon.module.scss +6 -0
- package/src/Components/Image/Image.tsx +1 -1
- package/src/Components/Layout/Container.tsx +5 -5
- package/src/Components/Layout/Grid/grid.module.scss +8 -8
- package/src/Components/Layout/Grow.tsx +1 -1
- package/src/Components/Layout/container.module.scss +15 -14
- package/src/Components/Menu/Menu.stories.tsx +3 -2
- package/src/Components/Menu/Menu.tsx +7 -6
- package/src/Components/Menu/MenuItem.tsx +7 -4
- package/src/Components/Menu/Submenu.tsx +4 -3
- package/src/Components/Text/text.module.scss +1 -0
- package/src/Components/Title/Title.stories.tsx +3 -2
- package/src/Components/Toast/toast.module.scss +1 -1
- package/src/Components/TopBar/topBar.module.scss +1 -1
- package/src/index.ts +1 -0
- package/src/scss/_colors.scss +33 -0
- package/src/scss/_default.scss +1 -0
- package/src/scss/_firstUpper.scss +5 -0
- package/src/scss/_flavorMixin.scss +24 -4
- package/src/scss/_variables.scss +2 -2
- package/src/scss/breakpoints.scss +19 -18
- package/tsconfig.json +1 -0
package/dist/index.js
CHANGED
|
@@ -423,11 +423,21 @@ class ErrorBoundary extends Component {
|
|
|
423
423
|
;// ./src/Components/Flavor.ts
|
|
424
424
|
var Flavor;
|
|
425
425
|
(function (Flavor) {
|
|
426
|
-
Flavor["
|
|
427
|
-
Flavor["
|
|
428
|
-
Flavor["
|
|
429
|
-
Flavor["
|
|
426
|
+
Flavor["ACCENT"] = "flavorAccent";
|
|
427
|
+
Flavor["BASIC"] = "flavorBasic";
|
|
428
|
+
Flavor["DESTRUCTIVE"] = "flavorDestructive";
|
|
429
|
+
Flavor["CONSTRUCTIVE"] = "flavorConstructive";
|
|
430
430
|
})(Flavor || (Flavor = {}));
|
|
431
|
+
;// ./src/Components/FlavorWithText.ts
|
|
432
|
+
|
|
433
|
+
var TextValues;
|
|
434
|
+
(function (TextValues) {
|
|
435
|
+
TextValues["PRIMARY"] = "textPrimary";
|
|
436
|
+
TextValues["SECONDARY"] = "textSecondary";
|
|
437
|
+
TextValues["TERTIARY"] = "textTertiary";
|
|
438
|
+
TextValues["INVERSE"] = "textInverse";
|
|
439
|
+
})(TextValues || (TextValues = {}));
|
|
440
|
+
const FlavorWithText = Object.assign(Object.assign({}, TextValues), Flavor);
|
|
431
441
|
;// ./src/helper/Characters.ts
|
|
432
442
|
const Characters = {
|
|
433
443
|
NBSP: '\u00A0',
|
|
@@ -499,7 +509,7 @@ function useWindow() {
|
|
|
499
509
|
|
|
500
510
|
;// ./src/Components/Icon/icon.module.scss
|
|
501
511
|
// extracted by mini-css-extract-plugin
|
|
502
|
-
/* harmony default export */ const icon_module = ({"margin":"margin__Oq6ib","imgIcon":"imgIcon__B6ZP0","doubleIconContainer":"doubleIconContainer__TzWce","secondIcon":"secondIcon__YwXe_"});
|
|
512
|
+
/* harmony default export */ const icon_module = ({"margin":"margin__Oq6ib","icon":"icon__p2egC","imgIcon":"imgIcon__B6ZP0","doubleIconContainer":"doubleIconContainer__TzWce","secondIcon":"secondIcon__YwXe_"});
|
|
503
513
|
;// ./src/Components/Icon/BaseIcon.tsx
|
|
504
514
|
var BaseIcon_rest = undefined && undefined.__rest || function (s, e) {
|
|
505
515
|
var t = {};
|
|
@@ -514,6 +524,7 @@ var BaseIcon_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
514
524
|
|
|
515
525
|
|
|
516
526
|
|
|
527
|
+
|
|
517
528
|
const BaseIcon = withMemo(function BaseIcon(_a) {
|
|
518
529
|
// Variables
|
|
519
530
|
var {
|
|
@@ -522,9 +533,10 @@ const BaseIcon = withMemo(function BaseIcon(_a) {
|
|
|
522
533
|
className,
|
|
523
534
|
noMargin = true,
|
|
524
535
|
style,
|
|
525
|
-
ref
|
|
536
|
+
ref,
|
|
537
|
+
flavor = FlavorWithText.PRIMARY
|
|
526
538
|
} = _a,
|
|
527
|
-
props = BaseIcon_rest(_a, ["icon", "alt", "className", "noMargin", "style", "ref"]);
|
|
539
|
+
props = BaseIcon_rest(_a, ["icon", "alt", "className", "noMargin", "style", "ref", "flavor"]);
|
|
528
540
|
// States
|
|
529
541
|
// Refs
|
|
530
542
|
// Callbacks
|
|
@@ -538,7 +550,7 @@ const BaseIcon = withMemo(function BaseIcon(_a) {
|
|
|
538
550
|
return createElement("img", {
|
|
539
551
|
src: icon,
|
|
540
552
|
alt: alt,
|
|
541
|
-
className: default_1(icon_module.imgIcon, className, {
|
|
553
|
+
className: default_1(icon_module.imgIcon, flavor, className, {
|
|
542
554
|
[icon_module.margin]: !noMargin
|
|
543
555
|
}),
|
|
544
556
|
style: style,
|
|
@@ -547,7 +559,7 @@ const BaseIcon = withMemo(function BaseIcon(_a) {
|
|
|
547
559
|
}
|
|
548
560
|
return createElement(FontAwesomeIcon, Object.assign({}, props, {
|
|
549
561
|
icon: icon,
|
|
550
|
-
className: default_1(className, {
|
|
562
|
+
className: default_1(icon_module.icon, flavor, className, {
|
|
551
563
|
[icon_module.margin]: !noMargin
|
|
552
564
|
}),
|
|
553
565
|
style: style,
|
|
@@ -860,18 +872,18 @@ const Clickable = withMemo(function Clickable(_a) {
|
|
|
860
872
|
});
|
|
861
873
|
;// ./src/Components/Layout/container.module.scss
|
|
862
874
|
// extracted by mini-css-extract-plugin
|
|
863
|
-
/* harmony default export */ const container_module = ({"container":"container__nH0mk","
|
|
875
|
+
/* harmony default export */ const container_module = ({"container":"container__nH0mk","containerFluid":"containerFluid__ebYVF","containerSm":"containerSm__uSYxe","containerXs":"containerXs__oO19Y","containerMd":"containerMd__ZoTFr","containerLg":"containerLg__AXkVX","containerXl":"containerXl__vvtLm","containerXxl":"containerXxl__DYjnb"});
|
|
864
876
|
;// ./src/Components/Layout/Container.tsx
|
|
865
877
|
|
|
866
878
|
|
|
867
879
|
|
|
868
880
|
|
|
869
881
|
const CONTAINER_CLASSES = {
|
|
870
|
-
sm: container_module
|
|
871
|
-
md: container_module
|
|
872
|
-
lg: container_module
|
|
873
|
-
xl: container_module
|
|
874
|
-
xxl: container_module
|
|
882
|
+
sm: container_module.containerSm,
|
|
883
|
+
md: container_module.containerMd,
|
|
884
|
+
lg: container_module.containerLg,
|
|
885
|
+
xl: container_module.containerXl,
|
|
886
|
+
xxl: container_module.containerXxl
|
|
875
887
|
};
|
|
876
888
|
const Container = withMemo(function Container({
|
|
877
889
|
fluid,
|
|
@@ -956,7 +968,7 @@ const Flex = withMemo(function Flex(_a) {
|
|
|
956
968
|
/* harmony default export */ const baseClasses_module = ({"fullHeight":"fullHeight__mOnJS","fullWidth":"fullWidth__a7NPL","flatHidden":"flatHidden__HzSI_","materialHidden":"materialHidden__PmvyJ"});
|
|
957
969
|
;// ./src/Components/ActionSheet/actionSheet.module.scss
|
|
958
970
|
// extracted by mini-css-extract-plugin
|
|
959
|
-
/* harmony default export */ const actionSheet_module = ({"actionSheet":"actionSheet__cs0Vt","open":"open__mZnwp","content":"content__iKqqg","title":"title__gukj3","action":"action__p3lv_","actionName":"actionName__ErBRd","cancel":"cancel__shM_7","
|
|
971
|
+
/* harmony default export */ const actionSheet_module = ({"actionSheet":"actionSheet__cs0Vt","open":"open__mZnwp","content":"content__iKqqg","title":"title__gukj3","action":"action__p3lv_","actionName":"actionName__ErBRd","cancel":"cancel__shM_7","fullHeight":"fullHeight__JsLol","actionIcon":"actionIcon__bFr3R","destructive":"destructive__wLoAD"});
|
|
960
972
|
;// ./src/Components/ActionSheet/ActionSheet.tsx
|
|
961
973
|
|
|
962
974
|
|
|
@@ -1129,7 +1141,7 @@ function ButtonDialog({
|
|
|
1129
1141
|
className: default_1(buttonDialog_module.button),
|
|
1130
1142
|
key: i + b.text
|
|
1131
1143
|
}, createElement(tmp, {
|
|
1132
|
-
className: default_1(buttonDialog_module.buttonText, (_a = b.flavor) !== null && _a !== void 0 ? _a : Flavor.
|
|
1144
|
+
className: default_1(buttonDialog_module.buttonText, (_a = b.flavor) !== null && _a !== void 0 ? _a : Flavor.ACCENT)
|
|
1133
1145
|
}, b.text))
|
|
1134
1146
|
);
|
|
1135
1147
|
})));
|
|
@@ -1989,10 +2001,10 @@ const DoubleIcon = withMemo(function DoubleIcon(_a) {
|
|
|
1989
2001
|
// Refs
|
|
1990
2002
|
var {
|
|
1991
2003
|
secondIcon,
|
|
1992
|
-
|
|
1993
|
-
|
|
2004
|
+
secondIconFlavor,
|
|
2005
|
+
flavor
|
|
1994
2006
|
} = _a,
|
|
1995
|
-
otherProps = DoubleIcon_rest(_a, ["secondIcon", "
|
|
2007
|
+
otherProps = DoubleIcon_rest(_a, ["secondIcon", "secondIconFlavor", "flavor"]);
|
|
1996
2008
|
// States/Variables/Selectors
|
|
1997
2009
|
// Dispatch
|
|
1998
2010
|
// Callbacks
|
|
@@ -2002,12 +2014,12 @@ const DoubleIcon = withMemo(function DoubleIcon(_a) {
|
|
|
2002
2014
|
return default_0.createElement(BaseInlineBlock, {
|
|
2003
2015
|
className: icon_module.doubleIconContainer
|
|
2004
2016
|
}, default_0.createElement(BaseIcon, Object.assign({}, otherProps, {
|
|
2005
|
-
|
|
2017
|
+
flavor: flavor
|
|
2006
2018
|
})), default_0.createElement(BaseIcon, {
|
|
2007
2019
|
icon: secondIcon,
|
|
2008
2020
|
size: "xs",
|
|
2009
2021
|
className: icon_module.secondIcon,
|
|
2010
|
-
|
|
2022
|
+
flavor: secondIconFlavor !== null && secondIconFlavor !== void 0 ? secondIconFlavor : flavor
|
|
2011
2023
|
}));
|
|
2012
2024
|
});
|
|
2013
2025
|
;// ./src/Components/Title/hoverTitle.module.scss
|
|
@@ -2449,7 +2461,8 @@ const MenuItem = withMemo(function MenuItem(_a) {
|
|
|
2449
2461
|
var {
|
|
2450
2462
|
children,
|
|
2451
2463
|
icon,
|
|
2452
|
-
|
|
2464
|
+
iconFlavor,
|
|
2465
|
+
iconStyle,
|
|
2453
2466
|
className,
|
|
2454
2467
|
onClick,
|
|
2455
2468
|
onMouseEnter,
|
|
@@ -2458,7 +2471,7 @@ const MenuItem = withMemo(function MenuItem(_a) {
|
|
|
2458
2471
|
item,
|
|
2459
2472
|
disabled = false
|
|
2460
2473
|
} = _a,
|
|
2461
|
-
props = MenuItem_rest(_a, ["children", "icon", "
|
|
2474
|
+
props = MenuItem_rest(_a, ["children", "icon", "iconFlavor", "iconStyle", "className", "onClick", "onMouseEnter", "onMouseLeave", "active", "item", "disabled"]);
|
|
2462
2475
|
// States/Variables/Selectors
|
|
2463
2476
|
const close = useMenuClose();
|
|
2464
2477
|
// Dispatch
|
|
@@ -2500,8 +2513,9 @@ const MenuItem = withMemo(function MenuItem(_a) {
|
|
|
2500
2513
|
className: default_1(menu_module.itemChildren)
|
|
2501
2514
|
}, !!icon && default_0.createElement(BaseIcon, {
|
|
2502
2515
|
icon: icon,
|
|
2503
|
-
|
|
2504
|
-
className: menu_module.icon
|
|
2516
|
+
flavor: iconFlavor,
|
|
2517
|
+
className: menu_module.icon,
|
|
2518
|
+
style: iconStyle
|
|
2505
2519
|
}), childElements));
|
|
2506
2520
|
}, 'text');
|
|
2507
2521
|
;// external "react-dom"
|
|
@@ -2626,15 +2640,15 @@ const Menu = withMemo(withRenderBrowserOnly(function Menu({
|
|
|
2626
2640
|
ref: menuRef,
|
|
2627
2641
|
__allowChildren: "all"
|
|
2628
2642
|
}, items === null || items === void 0 ? void 0 : items.map(item => {
|
|
2629
|
-
const icon = !!item.icon && typeof item.icon === 'object' && '
|
|
2630
|
-
const
|
|
2643
|
+
const icon = !!item.icon && typeof item.icon === 'object' && 'flavor' in item.icon ? item.icon.icon : item.icon;
|
|
2644
|
+
const iconFlavor = !!item.icon && typeof item.icon === 'object' && 'flavor' in item.icon ? item.icon.flavor : undefined;
|
|
2631
2645
|
return createElement(MenuItem, {
|
|
2632
2646
|
key: item.key,
|
|
2633
2647
|
onClick: item.callback,
|
|
2634
2648
|
className: default_1(menu_module.item, item.className),
|
|
2635
2649
|
onMouseEnter: item.onMouseEnter,
|
|
2636
2650
|
icon: icon,
|
|
2637
|
-
|
|
2651
|
+
iconFlavor: iconFlavor,
|
|
2638
2652
|
onMouseLeave: item.onMouseLeave
|
|
2639
2653
|
}, item.label);
|
|
2640
2654
|
}), children)), portalContainer));
|
|
@@ -2741,7 +2755,7 @@ const Submenu = withMemo(function Submenu({
|
|
|
2741
2755
|
children,
|
|
2742
2756
|
label,
|
|
2743
2757
|
icon,
|
|
2744
|
-
|
|
2758
|
+
iconFlavor,
|
|
2745
2759
|
className,
|
|
2746
2760
|
style,
|
|
2747
2761
|
disabled = false,
|
|
@@ -2806,7 +2820,7 @@ const Submenu = withMemo(function Submenu({
|
|
|
2806
2820
|
horizontal: true
|
|
2807
2821
|
}, !!icon && default_0.createElement(BaseIcon, {
|
|
2808
2822
|
icon: icon,
|
|
2809
|
-
|
|
2823
|
+
flavor: iconFlavor,
|
|
2810
2824
|
className: menu_module.icon
|
|
2811
2825
|
}), default_0.createElement(Grow, null, default_0.createElement(tmp, null, label)), default_0.createElement(BaseIcon, {
|
|
2812
2826
|
icon: faChevronRight
|
|
@@ -3669,7 +3683,7 @@ const Button = withTitle(function Button(_a) {
|
|
|
3669
3683
|
disabled,
|
|
3670
3684
|
size,
|
|
3671
3685
|
fullWidth = false,
|
|
3672
|
-
flavor = Flavor.
|
|
3686
|
+
flavor = Flavor.ACCENT,
|
|
3673
3687
|
type = ButtonType.Primary,
|
|
3674
3688
|
stopPropagation = true
|
|
3675
3689
|
} = _a,
|
|
@@ -5610,6 +5624,7 @@ const GridItemMemo = withMemo(GridItem);
|
|
|
5610
5624
|
|
|
5611
5625
|
|
|
5612
5626
|
|
|
5613
|
-
|
|
5627
|
+
|
|
5628
|
+
export { ActionSheet, AlertDialog, BaseBlock, BaseIcon, BaseInlineBlock, Block, BreakpointNames, Breakpoints, Button, ButtonDialogMemo as ButtonDialog, ButtonType, CONTAINER_CLASSES, Card, Characters, Checkbox, Clickable, ColorInput, ColorInputController, ConfirmDialog, Container, DialogMemo as Dialog, DialogBackground, DialogContainer, DialogProvider, DoubleIcon, DragItemMemo as DragItem, DropArea, ErrorBoundary, FileInput, FileInputController, Flavor, FlavorWithText, Flex, FormError, FullScreen, Grid, GridItemMemo as GridItem, Grow, HeadingMemo as Heading, HiddenInput, HookForm, HoverMenu, HoverTitle, Icon, Image, InViewportMemo as InViewport, Inline, InlineBlock, Input, InputController, LoadingArea, LoadingCircle, MENU_CONTAINER_CLASS, Menu, MenuCloseContextProvider, MenuDivider, MenuItem, MoreButton, MultipleFileInput, MultipleFileInputController, PasswordInput, PasswordInputController, RESTRICT_CHILDREN, SearchSelectInput, Select, SelectController, SendFormContext, Size, SizeCalculatorMemo as SizeCalculator, Slider, SliderController, Spoiler, SpoilerList, Submenu, Switch, SwitchController, TEXT_PRIO, TEXT_SIZE, TabBar, TabBarButton, Table_tmp as Table, tmp as Text, Textarea, TextareaController, Toast, ToastContainerMemo as ToastContainer, ToastContext, TopBar, TopBarButton, View, ViewWithoutListeners, WindowContext, WrongChildError, memoComparator, nonEmptyString, treeshakeTest, useAlertDialog, useBreakpoint, useBreakpointSelect, useClientLayoutEffect, useComposedRef, useConfirmDialog, useDebounced, useDeepShallow, useDelayed, useDelayedEffect, useDelayedState, useDialog, useHoverMenu, useInViewport, useKeyListener, useKeyPressed, useKeyUpListener, useListener, useListenerWithExtractedProps, useMenu, useMenuClose, useMousePosition, useOnChangeDone, useOnMount, useOnce, useRerender, useSendFormContext, useSharedSelectedColor, useSpoilerGroup, useStrictEnabled, useToast, useWindow, useWindowDimensions, useYupResolver, withHookController, withMemo, withRenderBrowserOnly, withRestrictedChildren, withTitle };
|
|
5614
5629
|
|
|
5615
5630
|
//# sourceMappingURL=index.js.map
|