@ainias42/react-bootstrap-mobile 1.0.8 → 1.0.10

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/index.js CHANGED
@@ -651,7 +651,7 @@ function useListenerWithExtractedProps(listener, listenerProps) {
651
651
  }
652
652
  ;// ./src/Components/Clickable/clickable.module.scss
653
653
  // extracted by mini-css-extract-plugin
654
- /* harmony default export */ const clickable_module = ({"clickable":"clickable__sSYd7","link":"link__E1VPO"});
654
+ /* harmony default export */ const clickable_module = ({"clickable":"clickable__sSYd7","link":"link__E1VPO","hiddenLink":"hiddenLink__sTL2V"});
655
655
  ;// ./src/Components/Clickable/Clickable.tsx
656
656
  var Clickable_rest = undefined && undefined.__rest || function (s, e) {
657
657
  var t = {};
@@ -684,9 +684,10 @@ const Clickable = withMemo(function Clickable(_a) {
684
684
  tabIndex,
685
685
  draggable,
686
686
  title,
687
- ref
687
+ ref,
688
+ hiddenLink
688
689
  } = _a,
689
- clickData = Clickable_rest(_a, ["className", "children", "style", "href", "target", "id", "interactable", "preventDefault", "stopPropagation", "useReactOnMouseLeave", "tabIndex", "draggable", "title", "ref"]);
690
+ clickData = Clickable_rest(_a, ["className", "children", "style", "href", "target", "id", "interactable", "preventDefault", "stopPropagation", "useReactOnMouseLeave", "tabIndex", "draggable", "title", "ref", "hiddenLink"]);
690
691
  // States
691
692
  // Refs
692
693
  const clickableRef = useRef(null);
@@ -843,7 +844,9 @@ const Clickable = withMemo(function Clickable(_a) {
843
844
  id,
844
845
  role: interactable ? 'button' : undefined,
845
846
  'aria-hidden': interactable ? undefined : true,
846
- className: default_1(clickable_module.clickable, className),
847
+ className: default_1(clickable_module.clickable, {
848
+ [clickable_module.hiddenLink]: hiddenLink
849
+ }, className),
847
850
  onClick: realOnClick,
848
851
  onPointerDown: realOnPointerDown,
849
852
  onPointerMove: realOnPointerMove,
@@ -1094,6 +1097,42 @@ const Card = withMemo(function Card(_a) {
1094
1097
  className: card_module.content
1095
1098
  }, children));
1096
1099
  });
1100
+ ;// ./src/Components/DesignProvider/Design.ts
1101
+ var Design;
1102
+ (function (Design) {
1103
+ Design["FLAT"] = "flat-design";
1104
+ Design["MATERIAL"] = "material-design";
1105
+ })(Design || (Design = {}));
1106
+ ;// ./src/Components/DesignProvider/DesignContext.ts
1107
+
1108
+
1109
+ const DesignContext = createContext(Design.FLAT);
1110
+ function useDesign() {
1111
+ return useContext(DesignContext);
1112
+ }
1113
+ ;// ./src/Components/DesignProvider/DesignProvider.tsx
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+ const DesignProvider = withMemo(function DesignProvider({
1120
+ design = Design.FLAT,
1121
+ children,
1122
+ className
1123
+ }) {
1124
+ // Refs
1125
+ // States/Variables/Selectors
1126
+ // Callbacks
1127
+ // Effects
1128
+ // Other
1129
+ // RenderFunctions
1130
+ return default_0.createElement(DesignContext, {
1131
+ value: design
1132
+ }, default_0.createElement("div", {
1133
+ className: default_1(design, className)
1134
+ }, children));
1135
+ });
1097
1136
  ;// ./src/Components/Dialog/buttonDialog.module.scss
1098
1137
  // extracted by mini-css-extract-plugin
1099
1138
  /* harmony default export */ const buttonDialog_module = ({"buttonDialog":"buttonDialog__pOdXZ","title":"title__IAojL","buttonContainer":"buttonContainer__OBrhL","button":"button__uKLy1","buttonText":"buttonText__tvqEz","message":"message__DdDbz"});
@@ -3263,6 +3302,36 @@ function Table({
3263
3302
  }
3264
3303
  const Table_tmp = withMemo(Table);
3265
3304
 
3305
+ ;// ./src/Components/ThemeProvider/ThemeContext.ts
3306
+
3307
+ const ThemeContext = createContext('light');
3308
+ function useTheme() {
3309
+ return useContext(ThemeContext);
3310
+ }
3311
+ ;// ./src/Components/ThemeProvider/ThemeProvider.tsx
3312
+
3313
+
3314
+
3315
+ const ThemeProvider = withMemo(function ThemeProvider({
3316
+ theme,
3317
+ children
3318
+ }) {
3319
+ // Refs
3320
+ // States/Variables/Selectors
3321
+ // Callbacks
3322
+ // Effects
3323
+ useEffect(() => {
3324
+ document.body.classList.add(theme);
3325
+ return () => {
3326
+ document.body.classList.remove(theme);
3327
+ };
3328
+ }, [theme]);
3329
+ // Other
3330
+ // RenderFunctions
3331
+ return default_0.createElement(ThemeContext, {
3332
+ value: theme
3333
+ }, children);
3334
+ });
3266
3335
  ;// ./src/Components/Toast/toast.module.scss
3267
3336
  // extracted by mini-css-extract-plugin
3268
3337
  /* harmony default export */ const toast_module = ({"toastContainer":"toastContainer__cS48V","toast":"toast__ZKwwx","hiding":"hiding__YbyHM","action":"action__criZK"});
@@ -4030,9 +4099,10 @@ var withHookController_rest = undefined && undefined.__rest || function (s, e) {
4030
4099
 
4031
4100
 
4032
4101
 
4102
+
4033
4103
  function withHookController(Comp, onChangeProp, emptyValue = null) {
4034
4104
  function WithHookComponent(_a) {
4035
- var _b, _c, _d;
4105
+ var _b, _c, _d, _e;
4036
4106
  var {
4037
4107
  name,
4038
4108
  ref
@@ -4041,7 +4111,8 @@ function withHookController(Comp, onChangeProp, emptyValue = null) {
4041
4111
  const children = 'children' in otherProps ? otherProps.children : undefined;
4042
4112
  const {
4043
4113
  field,
4044
- fieldState
4114
+ fieldState,
4115
+ formState
4045
4116
  } = useController({
4046
4117
  name
4047
4118
  });
@@ -4049,11 +4120,24 @@ function withHookController(Comp, onChangeProp, emptyValue = null) {
4049
4120
  clearErrors
4050
4121
  } = useFormContext();
4051
4122
  const composedRef = useComposedRef(ref, field.ref);
4052
- const errorMessage = (_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
4123
+ let errorMessage = (_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
4124
+ if (Array.isArray(fieldState.error)) {
4125
+ errorMessage = fieldState.error.map(error => error === null || error === void 0 ? void 0 : error.message).join('\n');
4126
+ }
4127
+ let clearErrorName = name;
4128
+ if (!errorMessage) {
4129
+ for (const [key, error] of ObjectHelper.entries(formState.errors)) {
4130
+ if (key.startsWith(`${name}.`) || key.startsWith(`${name}[`)) {
4131
+ errorMessage = (_c = error.message) === null || _c === void 0 ? void 0 : _c.toString();
4132
+ clearErrorName = key;
4133
+ break;
4134
+ }
4135
+ }
4136
+ }
4053
4137
  const internalOnChange = useCallback(arg => {
4054
- clearErrors(name);
4138
+ clearErrors(clearErrorName);
4055
4139
  field.onChange(arg);
4056
- }, [clearErrors, field, name]);
4140
+ }, [clearErrorName, clearErrors, field]);
4057
4141
  const onChangeProps = {
4058
4142
  [onChangeProp]: internalOnChange
4059
4143
  };
@@ -4064,8 +4148,8 @@ function withHookController(Comp, onChangeProp, emptyValue = null) {
4064
4148
  onBlur: field.onBlur,
4065
4149
  disabled: field.disabled
4066
4150
  }, onChangeProps, {
4067
- value: (_c = field.value) !== null && _c !== void 0 ? _c : emptyValue,
4068
- checked: (_d = field.value) !== null && _d !== void 0 ? _d : emptyValue,
4151
+ value: (_d = field.value) !== null && _d !== void 0 ? _d : emptyValue,
4152
+ checked: (_e = field.value) !== null && _e !== void 0 ? _e : emptyValue,
4069
4153
  ref: composedRef,
4070
4154
  error: errorMessage
4071
4155
  }), children)
@@ -5500,6 +5584,59 @@ function GridItem({
5500
5584
  // Need GridItemMemo for autocompletion of phpstorm
5501
5585
  const GridItemMemo = withMemo(GridItem);
5502
5586
 
5587
+ ;// ./src/Components/List/BulletList/BulletList.tsx
5588
+
5589
+
5590
+ function BulletList({
5591
+ numbered = false,
5592
+ className,
5593
+ children,
5594
+ style
5595
+ }) {
5596
+ // Variables
5597
+ // Refs
5598
+ // States
5599
+ // Selectors
5600
+ // Callbacks
5601
+ // Effects
5602
+ // Other
5603
+ const props = {
5604
+ className,
5605
+ style
5606
+ };
5607
+ // Render Functions
5608
+ if (numbered) {
5609
+ return createElement("ol", Object.assign({}, props), children);
5610
+ }
5611
+ return createElement("ul", Object.assign({}, props), children);
5612
+ }
5613
+ // Need BulletListMemo for autocompletion of phpstorm
5614
+ const BulletListMemo = withMemo(BulletList);
5615
+
5616
+ ;// ./src/Components/List/BulletList/ListItem.tsx
5617
+
5618
+
5619
+ function ListItem({
5620
+ className,
5621
+ children,
5622
+ style
5623
+ }) {
5624
+ // Variables
5625
+ // Refs
5626
+ // States
5627
+ // Selectors
5628
+ // Callbacks
5629
+ // Effects
5630
+ // Other
5631
+ // Render Functions
5632
+ return createElement("li", {
5633
+ className: className,
5634
+ style: style
5635
+ }, children);
5636
+ }
5637
+ // Need ListItemMemo for autocompletion of phpstorm
5638
+ const ListItemMemo = withMemo(ListItem);
5639
+
5503
5640
  ;// ./src/index.ts
5504
5641
 
5505
5642
 
@@ -5625,6 +5762,13 @@ const GridItemMemo = withMemo(GridItem);
5625
5762
 
5626
5763
 
5627
5764
 
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 };
5765
+
5766
+
5767
+
5768
+
5769
+
5770
+
5771
+
5772
+ export { ActionSheet, AlertDialog, BaseBlock, BaseIcon, BaseInlineBlock, Block, BreakpointNames, Breakpoints, BulletListMemo as BulletList, Button, ButtonDialogMemo as ButtonDialog, ButtonType, CONTAINER_CLASSES, Card, Characters, Checkbox, Clickable, ColorInput, ColorInputController, ConfirmDialog, Container, Design, DesignContext, DesignProvider, 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, ListItemMemo as ListItem, 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, ThemeContext, ThemeProvider, 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, useDesign, useDialog, useHoverMenu, useInViewport, useKeyListener, useKeyPressed, useKeyUpListener, useListener, useListenerWithExtractedProps, useMenu, useMenuClose, useMousePosition, useOnChangeDone, useOnMount, useOnce, useRerender, useSendFormContext, useSharedSelectedColor, useSpoilerGroup, useStrictEnabled, useTheme, useToast, useWindow, useWindowDimensions, useYupResolver, withHookController, withMemo, withRenderBrowserOnly, withRestrictedChildren, withTitle };
5629
5773
 
5630
5774
  //# sourceMappingURL=index.js.map