@ainias42/react-bootstrap-mobile 1.0.9 → 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/Components/Clickable/Clickable.d.ts +2 -1
- package/dist/Components/List/BulletList/BulletList.d.ts +8 -0
- package/dist/Components/List/BulletList/ListItem.d.ts +7 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +85 -12
- package/dist/index.js.map +1 -1
- package/package.json +54 -56
- package/src/Components/Clickable/Clickable.tsx +3 -1
- package/src/Components/Clickable/clickable.module.scss +7 -0
- package/src/Components/FormElements/Controller/withHookController.tsx +19 -4
- package/src/Components/Icon/BaseIcon.tsx +1 -2
- package/src/Components/List/BulletList/BulletList.tsx +33 -0
- package/src/Components/List/BulletList/ListItem.tsx +34 -0
- package/src/index.ts +2 -0
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,
|
|
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,
|
|
@@ -4096,9 +4099,10 @@ var withHookController_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
4096
4099
|
|
|
4097
4100
|
|
|
4098
4101
|
|
|
4102
|
+
|
|
4099
4103
|
function withHookController(Comp, onChangeProp, emptyValue = null) {
|
|
4100
4104
|
function WithHookComponent(_a) {
|
|
4101
|
-
var _b, _c, _d;
|
|
4105
|
+
var _b, _c, _d, _e;
|
|
4102
4106
|
var {
|
|
4103
4107
|
name,
|
|
4104
4108
|
ref
|
|
@@ -4107,7 +4111,8 @@ function withHookController(Comp, onChangeProp, emptyValue = null) {
|
|
|
4107
4111
|
const children = 'children' in otherProps ? otherProps.children : undefined;
|
|
4108
4112
|
const {
|
|
4109
4113
|
field,
|
|
4110
|
-
fieldState
|
|
4114
|
+
fieldState,
|
|
4115
|
+
formState
|
|
4111
4116
|
} = useController({
|
|
4112
4117
|
name
|
|
4113
4118
|
});
|
|
@@ -4115,11 +4120,24 @@ function withHookController(Comp, onChangeProp, emptyValue = null) {
|
|
|
4115
4120
|
clearErrors
|
|
4116
4121
|
} = useFormContext();
|
|
4117
4122
|
const composedRef = useComposedRef(ref, field.ref);
|
|
4118
|
-
|
|
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
|
+
}
|
|
4119
4137
|
const internalOnChange = useCallback(arg => {
|
|
4120
|
-
clearErrors(
|
|
4138
|
+
clearErrors(clearErrorName);
|
|
4121
4139
|
field.onChange(arg);
|
|
4122
|
-
}, [clearErrors, field
|
|
4140
|
+
}, [clearErrorName, clearErrors, field]);
|
|
4123
4141
|
const onChangeProps = {
|
|
4124
4142
|
[onChangeProp]: internalOnChange
|
|
4125
4143
|
};
|
|
@@ -4130,8 +4148,8 @@ function withHookController(Comp, onChangeProp, emptyValue = null) {
|
|
|
4130
4148
|
onBlur: field.onBlur,
|
|
4131
4149
|
disabled: field.disabled
|
|
4132
4150
|
}, onChangeProps, {
|
|
4133
|
-
value: (
|
|
4134
|
-
checked: (
|
|
4151
|
+
value: (_d = field.value) !== null && _d !== void 0 ? _d : emptyValue,
|
|
4152
|
+
checked: (_e = field.value) !== null && _e !== void 0 ? _e : emptyValue,
|
|
4135
4153
|
ref: composedRef,
|
|
4136
4154
|
error: errorMessage
|
|
4137
4155
|
}), children)
|
|
@@ -5566,6 +5584,59 @@ function GridItem({
|
|
|
5566
5584
|
// Need GridItemMemo for autocompletion of phpstorm
|
|
5567
5585
|
const GridItemMemo = withMemo(GridItem);
|
|
5568
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
|
+
|
|
5569
5640
|
;// ./src/index.ts
|
|
5570
5641
|
|
|
5571
5642
|
|
|
@@ -5696,6 +5767,8 @@ const GridItemMemo = withMemo(GridItem);
|
|
|
5696
5767
|
|
|
5697
5768
|
|
|
5698
5769
|
|
|
5699
|
-
|
|
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 };
|
|
5700
5773
|
|
|
5701
5774
|
//# sourceMappingURL=index.js.map
|