@ainias42/react-bootstrap-mobile 0.2.9 → 0.2.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/bootstrapReactMobile.js +64 -45
- package/dist/bootstrapReactMobile.js.map +1 -1
- package/dist/src/Components/Dialog/DialogBackground.d.ts +2 -1
- package/dist/src/Components/FormElements/ColorInput/ColorInput.d.ts +2 -1
- package/dist/src/Components/FormElements/Controller/ColorInputController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/InputController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/MultipleFileInputController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/PasswordInputController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/SelectController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/SwitchController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/TextareaController.d.ts +1 -1
- package/dist/src/Components/FormElements/Controller/withHookController.d.ts +1 -1
- package/dist/src/Components/FormElements/Select/Select.d.ts +12 -6
- package/dist/src/Components/Layout/Block.d.ts +1 -1
- package/dist/src/Components/Layout/Flex.d.ts +1 -1
- package/dist/src/Components/Layout/Inline.d.ts +1 -1
- package/dist/src/Components/Layout/InlineBlock.d.ts +1 -1
- package/dist/src/Components/Layout/View.d.ts +1 -1
- package/dist/src/Components/Layout/ViewWithoutListeners.d.ts +1 -1
- package/package.json +1 -1
- package/src/Components/Dialog/DialogBackground.tsx +19 -7
- package/src/Components/FormElements/ColorInput/ColorInput.tsx +4 -1
- package/src/Components/FormElements/ColorInput/colorInput.scss +0 -2
- package/src/Components/FormElements/Select/Select.tsx +17 -6
|
@@ -2,5 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { RbmComponentProps } from '../RbmComponentProps';
|
|
3
3
|
export type DialogBackgroundProps = RbmComponentProps<{
|
|
4
4
|
title?: string;
|
|
5
|
+
onClose?: () => void;
|
|
5
6
|
}>;
|
|
6
|
-
export declare const DialogBackground: ({ children, className, style, title }: DialogBackgroundProps) => React.JSX.Element;
|
|
7
|
+
export declare const DialogBackground: ({ children, className, style, title, onClose }: DialogBackgroundProps) => React.JSX.Element;
|
|
@@ -13,7 +13,8 @@ export type ColorInputProps<OnChangeData> = {
|
|
|
13
13
|
sharedColorKey?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
error?: string;
|
|
16
|
+
className?: string;
|
|
16
17
|
} & OptionalListener<'onChange', OnChangeData>;
|
|
17
|
-
declare function ColorInput<OnChangeData>({ defaultValue, value, label, onChangeColor, onChangeColorComplete, onOpen, onClose, disableAlpha, presetColors, error, sharedColorKey, disabled, ...otherProps }: ColorInputProps<OnChangeData>): React.JSX.Element;
|
|
18
|
+
declare function ColorInput<OnChangeData>({ defaultValue, value, label, onChangeColor, onChangeColorComplete, onOpen, onClose, disableAlpha, presetColors, error, sharedColorKey, disabled, className, ...otherProps }: ColorInputProps<OnChangeData>): React.JSX.Element;
|
|
18
19
|
declare const ColorInputMemo: typeof ColorInput;
|
|
19
20
|
export { ColorInputMemo as ColorInput };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ColorInputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../ColorInput/ColorInput").ColorInputProps<unknown>, "value" | "
|
|
1
|
+
export declare const ColorInputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../ColorInput/ColorInput").ColorInputProps<unknown>, "value" | "onBlur" | "ref" | "name" | "onChangeColor"> & {
|
|
2
2
|
name: string;
|
|
3
3
|
}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const InputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Input/Input").InputProps<unknown, unknown, unknown> & import("react").RefAttributes<HTMLInputElement>, "value" | "
|
|
2
|
+
export declare const InputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Input/Input").InputProps<unknown, unknown, unknown> & import("react").RefAttributes<HTMLInputElement>, "value" | "onBlur" | "ref" | "name" | "onChangeText"> & {
|
|
3
3
|
name: string;
|
|
4
4
|
}, HTMLInputElement>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const MultipleFileInputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Input/FileInput/MultipleFileInput").MultipleFileInputProps<unknown>, "value" | "
|
|
1
|
+
export declare const MultipleFileInputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Input/FileInput/MultipleFileInput").MultipleFileInputProps<unknown>, "value" | "onBlur" | "ref" | "name" | "onChangeFiles"> & {
|
|
2
2
|
name: string;
|
|
3
3
|
}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const PasswordInputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Input/PasswordInput/PasswordInput").PasswordInputProps<unknown, unknown, unknown> & import("react").RefAttributes<HTMLInputElement>, "value" | "
|
|
2
|
+
export declare const PasswordInputController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Input/PasswordInput/PasswordInput").PasswordInputProps<unknown, unknown, unknown> & import("react").RefAttributes<HTMLInputElement>, "value" | "onBlur" | "ref" | "name" | "onChangeText"> & {
|
|
3
3
|
name: string;
|
|
4
4
|
}, HTMLInputElement>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SelectController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Select/Select").SelectProps<unknown>, "value" | "
|
|
1
|
+
export declare const SelectController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Select/Select").SelectProps<unknown>, "value" | "onBlur" | "ref" | "name" | "onChangeValue"> & {
|
|
2
2
|
name: string;
|
|
3
3
|
}, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SwitchController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Switch/Switch").SwitchProps<unknown>, "value" | "
|
|
1
|
+
export declare const SwitchController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Switch/Switch").SwitchProps<unknown>, "value" | "onBlur" | "ref" | "name" | "onChangeChecked"> & {
|
|
2
2
|
name: string;
|
|
3
3
|
}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const TextareaController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Textarea/Textarea").TextareaProps<unknown, unknown> & import("react").RefAttributes<HTMLTextAreaElement>, "value" | "
|
|
2
|
+
export declare const TextareaController: import("../../../helper/withForwardRef").RefComponent<Omit<import("../Textarea/Textarea").TextareaProps<unknown, unknown> & import("react").RefAttributes<HTMLTextAreaElement>, "value" | "onBlur" | "ref" | "name" | "onChangeText"> & {
|
|
3
3
|
name: string;
|
|
4
4
|
}, HTMLTextAreaElement>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React, { ComponentProps, ComponentType } from "react";
|
|
2
|
-
export declare function withHookController<C extends ComponentType<any>, OnChangeProp extends keyof ComponentProps<C>>(Comp: C, onChangeProp: OnChangeProp, emptyValue?: any): import("../../../helper/withForwardRef").RefComponent<Omit<React.ComponentProps<C>, "value" | "
|
|
2
|
+
export declare function withHookController<C extends ComponentType<any>, OnChangeProp extends keyof ComponentProps<C>>(Comp: C, onChangeProp: OnChangeProp, emptyValue?: any): import("../../../helper/withForwardRef").RefComponent<Omit<React.ComponentProps<C>, "value" | "onBlur" | "ref" | "name" | OnChangeProp> & {
|
|
3
3
|
name: string;
|
|
4
4
|
}, React.ComponentRef<C>>;
|
|
@@ -3,17 +3,23 @@ import { RbmComponentProps } from '../../RbmComponentProps';
|
|
|
3
3
|
import { Override } from '../../../TypeHelpers';
|
|
4
4
|
import { SelectHTMLAttributes } from 'react';
|
|
5
5
|
import { OptionalListener } from '../../Hooks/useListener';
|
|
6
|
-
export type SelectOption = {
|
|
6
|
+
export type SelectOption<ValueType = string> = {
|
|
7
7
|
label: string;
|
|
8
|
-
value:
|
|
8
|
+
value: ValueType;
|
|
9
9
|
key?: string;
|
|
10
10
|
};
|
|
11
11
|
export type SelectProps<OnChangeData> = RbmComponentProps<Override<SelectHTMLAttributes<HTMLSelectElement>, {
|
|
12
12
|
label?: string;
|
|
13
|
-
options: SelectOption[];
|
|
14
|
-
onChangeValue?: (newValue: string) => void;
|
|
15
13
|
inline?: boolean;
|
|
16
14
|
small?: boolean;
|
|
17
15
|
error?: string;
|
|
18
|
-
} &
|
|
19
|
-
|
|
16
|
+
} & ({
|
|
17
|
+
options: SelectOption[];
|
|
18
|
+
onChangeValue?: (newValue: string) => void;
|
|
19
|
+
useNumericValues?: false;
|
|
20
|
+
} | {
|
|
21
|
+
options: SelectOption<number>[];
|
|
22
|
+
onChangeValue?: (newValue: number) => void;
|
|
23
|
+
useNumericValues: true;
|
|
24
|
+
}) & OptionalListener<'onChange', OnChangeData>>>;
|
|
25
|
+
export declare const Select: <OnChangeData>({ label, options, className, style, onChangeValue, inline, small, error, useNumericValues, ...otherProps }: SelectProps<OnChangeData>) => React.JSX.Element;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
import { RbmComponentProps } from '../RbmComponentProps';
|
|
4
4
|
import { ViewWithoutListenersProps } from './ViewWithoutListeners';
|
|
5
5
|
export type BlockProps<AsType extends keyof JSX.IntrinsicElements> = RbmComponentProps<ViewWithoutListenersProps<AsType>>;
|
|
6
|
-
declare const BlockMemo: import("../../helper/withForwardRef").RefComponent<BlockProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement |
|
|
6
|
+
declare const BlockMemo: import("../../helper/withForwardRef").RefComponent<BlockProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement | HTMLStyleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLWebViewElement | SVGSVGElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEDropShadowElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGSetElement | SVGStopElement | SVGSwitchElement | SVGTextPathElement | SVGTSpanElement | SVGUseElement | SVGViewElement>;
|
|
7
7
|
export { BlockMemo as Block };
|
|
@@ -6,5 +6,5 @@ export type FlexProps<AsType extends keyof JSX.IntrinsicElements> = RbmComponent
|
|
|
6
6
|
horizontal?: boolean;
|
|
7
7
|
grow?: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
declare const tmp: import("../../helper/withForwardRef").RefComponent<FlexProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement |
|
|
9
|
+
declare const tmp: import("../../helper/withForwardRef").RefComponent<FlexProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement | HTMLStyleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLWebViewElement | SVGSVGElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEDropShadowElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGSetElement | SVGStopElement | SVGSwitchElement | SVGTextPathElement | SVGTSpanElement | SVGUseElement | SVGViewElement>;
|
|
10
10
|
export { tmp as Flex };
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
import { RbmComponentProps } from '../RbmComponentProps';
|
|
4
4
|
import { ViewWithoutListenersProps } from './ViewWithoutListeners';
|
|
5
5
|
export type InlineProps<AsType extends keyof JSX.IntrinsicElements> = RbmComponentProps<ViewWithoutListenersProps<AsType>>;
|
|
6
|
-
declare const InlineMemo: import("../../helper/withForwardRef").RefComponent<InlineProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement |
|
|
6
|
+
declare const InlineMemo: import("../../helper/withForwardRef").RefComponent<InlineProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement | HTMLStyleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLWebViewElement | SVGSVGElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEDropShadowElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGSetElement | SVGStopElement | SVGSwitchElement | SVGTextPathElement | SVGTSpanElement | SVGUseElement | SVGViewElement>;
|
|
7
7
|
export { InlineMemo as Inline };
|
|
@@ -6,5 +6,5 @@ export type InlineBlockProps<AsType extends keyof JSX.IntrinsicElements> = RbmCo
|
|
|
6
6
|
id?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
}>;
|
|
9
|
-
declare const InlineBlockMemo: import("../../helper/withForwardRef").RefComponent<InlineBlockProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement |
|
|
9
|
+
declare const InlineBlockMemo: import("../../helper/withForwardRef").RefComponent<InlineBlockProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement | HTMLStyleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLWebViewElement | SVGSVGElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEDropShadowElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGSetElement | SVGStopElement | SVGSwitchElement | SVGTextPathElement | SVGTSpanElement | SVGUseElement | SVGViewElement>;
|
|
10
10
|
export { InlineBlockMemo as InlineBlock };
|
|
@@ -5,4 +5,4 @@ export type ViewProps<AsType extends keyof JSX.IntrinsicElements> = PropsWithChi
|
|
|
5
5
|
as?: AsType;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}>>;
|
|
8
|
-
export declare const View: import("../../helper/withForwardRef").RefComponent<ViewProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement |
|
|
8
|
+
export declare const View: import("../../helper/withForwardRef").RefComponent<ViewProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement | HTMLStyleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLWebViewElement | SVGSVGElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEDropShadowElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGSetElement | SVGStopElement | SVGSwitchElement | SVGTextPathElement | SVGTSpanElement | SVGUseElement | SVGViewElement>;
|
|
@@ -7,4 +7,4 @@ export type ViewWithoutListenersProps<AsType extends keyof JSX.IntrinsicElements
|
|
|
7
7
|
__html: string | TrustedHTML;
|
|
8
8
|
} | undefined;
|
|
9
9
|
};
|
|
10
|
-
export declare const ViewWithoutListeners: import("../../helper/withForwardRef").RefComponent<ViewWithoutListenersProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement |
|
|
10
|
+
export declare const ViewWithoutListeners: import("../../helper/withForwardRef").RefComponent<ViewWithoutListenersProps<keyof JSX.IntrinsicElements>, SVGSymbolElement | SVGElement | HTMLObjectElement | HTMLElement | HTMLHtmlElement | SVGTextElement | HTMLTitleElement | HTMLStyleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLParamElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableDataCellElement | HTMLTextAreaElement | HTMLTableHeaderCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLWebViewElement | SVGSVGElement | SVGCircleElement | SVGClipPathElement | SVGDefsElement | SVGDescElement | SVGEllipseElement | SVGFEBlendElement | SVGFEColorMatrixElement | SVGFEComponentTransferElement | SVGFECompositeElement | SVGFEConvolveMatrixElement | SVGFEDiffuseLightingElement | SVGFEDisplacementMapElement | SVGFEDistantLightElement | SVGFEDropShadowElement | SVGFEFloodElement | SVGFEFuncAElement | SVGFEFuncBElement | SVGFEFuncGElement | SVGFEFuncRElement | SVGFEGaussianBlurElement | SVGFEImageElement | SVGFEMergeElement | SVGFEMergeNodeElement | SVGFEMorphologyElement | SVGFEOffsetElement | SVGFEPointLightElement | SVGFESpecularLightingElement | SVGFESpotLightElement | SVGFETileElement | SVGFETurbulenceElement | SVGFilterElement | SVGForeignObjectElement | SVGGElement | SVGImageElement | SVGLineElement | SVGLinearGradientElement | SVGMarkerElement | SVGMaskElement | SVGMetadataElement | SVGPathElement | SVGPatternElement | SVGPolygonElement | SVGPolylineElement | SVGRadialGradientElement | SVGRectElement | SVGSetElement | SVGStopElement | SVGSwitchElement | SVGTextPathElement | SVGTSpanElement | SVGUseElement | SVGViewElement>;
|
package/package.json
CHANGED
|
@@ -2,14 +2,24 @@ import * as React from 'react';
|
|
|
2
2
|
import { withMemo } from '../../helper/withMemo';
|
|
3
3
|
import { RbmComponentProps } from '../RbmComponentProps';
|
|
4
4
|
import { Block } from '../Layout/Block';
|
|
5
|
-
|
|
6
5
|
import styles from './dialogBackground.scss';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
|
-
import {Heading} from "../Text/Heading";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
import { Heading } from "../Text/Heading";
|
|
8
|
+
import { Flex } from "../Layout/Flex";
|
|
9
|
+
import { Grow } from "../Layout/Grow";
|
|
10
|
+
import { Clickable } from "../Clickable/Clickable";
|
|
11
|
+
import { Icon } from "../Icon/Icon";
|
|
12
|
+
import { faCircleXmark } from "@fortawesome/free-solid-svg-icons";
|
|
13
|
+
|
|
14
|
+
export type DialogBackgroundProps = RbmComponentProps<{ title?: string, onClose?: () => void }>;
|
|
15
|
+
|
|
16
|
+
export const DialogBackground = withMemo(function DialogBackground({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
title,
|
|
21
|
+
onClose
|
|
22
|
+
}: DialogBackgroundProps) {
|
|
13
23
|
// Variables
|
|
14
24
|
|
|
15
25
|
// Refs
|
|
@@ -28,7 +38,9 @@ export const DialogBackground = withMemo(function DialogBackground({ children, c
|
|
|
28
38
|
|
|
29
39
|
return (
|
|
30
40
|
<Block __allowChildren="all" className={classNames(styles.dialogBackground, className)} style={style}>
|
|
31
|
-
{!!title && <
|
|
41
|
+
{(!!title || !!onClose) && <Flex horizontal={true} className={styles.title}>{!!title &&
|
|
42
|
+
<Grow><Heading >{title}</Heading></Grow>}{!!onClose &&
|
|
43
|
+
<Clickable onClick={onClose}><Icon size={"lg"} icon={faCircleXmark}/></Clickable>}</Flex>}
|
|
32
44
|
{children}
|
|
33
45
|
</Block>
|
|
34
46
|
);
|
|
@@ -8,6 +8,7 @@ import { useSharedSelectedColor } from './sharedSelectedColor';
|
|
|
8
8
|
import { Menu } from "../../Menu/Menu";
|
|
9
9
|
import { useClientLayoutEffect } from "../../Hooks/useClientLayoutEffect";
|
|
10
10
|
import { FormError } from "../FormError";
|
|
11
|
+
import classNames from "classnames";
|
|
11
12
|
|
|
12
13
|
export type ColorInputProps<OnChangeData> = {
|
|
13
14
|
defaultValue?: string;
|
|
@@ -22,6 +23,7 @@ export type ColorInputProps<OnChangeData> = {
|
|
|
22
23
|
sharedColorKey?: string;
|
|
23
24
|
disabled?: boolean
|
|
24
25
|
error?: string;
|
|
26
|
+
className?: string;
|
|
25
27
|
} & OptionalListener<'onChange', OnChangeData>;
|
|
26
28
|
|
|
27
29
|
function convertToHex(color: { r: number; g: number; b: number; a?: number }, disableAlpha?: boolean) {
|
|
@@ -49,6 +51,7 @@ function ColorInput<OnChangeData>({
|
|
|
49
51
|
error,
|
|
50
52
|
sharedColorKey = "default",
|
|
51
53
|
disabled,
|
|
54
|
+
className,
|
|
52
55
|
...otherProps
|
|
53
56
|
}: ColorInputProps<OnChangeData>) {
|
|
54
57
|
// Variables
|
|
@@ -136,7 +139,7 @@ function ColorInput<OnChangeData>({
|
|
|
136
139
|
// Render Functions
|
|
137
140
|
return (
|
|
138
141
|
<>
|
|
139
|
-
<span className={styles.colorInput}>
|
|
142
|
+
<span className={classNames(styles.colorInput, className)}>
|
|
140
143
|
<Menu x={position.x} y={position.y} isOpen={realIsOpen} onClose={onMenuClose}>
|
|
141
144
|
<SketchPicker
|
|
142
145
|
color={colVal}
|
|
@@ -10,9 +10,9 @@ import classNames from 'classnames';
|
|
|
10
10
|
import { InlineBlock } from "../../Layout/InlineBlock";
|
|
11
11
|
import { Text } from "../../Text/Text";
|
|
12
12
|
|
|
13
|
-
export type SelectOption = {
|
|
13
|
+
export type SelectOption<ValueType=string> = {
|
|
14
14
|
label: string;
|
|
15
|
-
value:
|
|
15
|
+
value: ValueType;
|
|
16
16
|
key?: string;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -21,12 +21,18 @@ export type SelectProps<OnChangeData> = RbmComponentProps<
|
|
|
21
21
|
SelectHTMLAttributes<HTMLSelectElement>,
|
|
22
22
|
{
|
|
23
23
|
label?: string;
|
|
24
|
-
options: SelectOption[];
|
|
25
|
-
onChangeValue?: (newValue: string) => void;
|
|
26
24
|
inline?: boolean;
|
|
27
25
|
small?: boolean;
|
|
28
26
|
error?: string;
|
|
29
|
-
} &
|
|
27
|
+
} & ({
|
|
28
|
+
options: SelectOption[];
|
|
29
|
+
onChangeValue?: (newValue: string) => void;
|
|
30
|
+
useNumericValues?: false;
|
|
31
|
+
}|{
|
|
32
|
+
options: SelectOption<number>[];
|
|
33
|
+
onChangeValue?: (newValue: number) => void;
|
|
34
|
+
useNumericValues: true;
|
|
35
|
+
})& OptionalListener<'onChange', OnChangeData>
|
|
30
36
|
>
|
|
31
37
|
>;
|
|
32
38
|
|
|
@@ -39,6 +45,7 @@ export const Select = withMemo(function Select<OnChangeData>({
|
|
|
39
45
|
inline = false,
|
|
40
46
|
small = false,
|
|
41
47
|
error,
|
|
48
|
+
useNumericValues,
|
|
42
49
|
...otherProps
|
|
43
50
|
}: SelectProps<OnChangeData>) {
|
|
44
51
|
// Variables
|
|
@@ -53,7 +60,11 @@ export const Select = withMemo(function Select<OnChangeData>({
|
|
|
53
60
|
const [onChangeWithData, propsWithoutData] = useListenerWithExtractedProps<'onChange', OnChangeData>('onChange', otherProps);
|
|
54
61
|
const onChange = useCallback<ChangeEventHandler<HTMLSelectElement>>(
|
|
55
62
|
(e) => {
|
|
56
|
-
|
|
63
|
+
if (useNumericValues) {
|
|
64
|
+
onChangeValue?.(Number(e.target.value));
|
|
65
|
+
} else {
|
|
66
|
+
onChangeValue?.(e.target.value);
|
|
67
|
+
}
|
|
57
68
|
onChangeWithData(e);
|
|
58
69
|
},
|
|
59
70
|
[onChangeWithData, onChangeValue]
|