@sebgroup/green-react 1.0.3 → 1.1.0
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/index.esm.js +372 -152
- package/index.umd.js +370 -150
- package/lib/alert-ribbon/alert-ribbon.d.ts +2 -2
- package/lib/form/iconButton/iconButton.d.ts +9 -0
- package/lib/form/index.d.ts +1 -0
- package/lib/form/input/input.d.ts +5 -6
- package/lib/form/radioButton/radioGroup.d.ts +6 -2
- package/lib/form/types.d.ts +2 -0
- package/lib/formItem/formItem.d.ts +16 -0
- package/lib/formItem/index.d.ts +1 -0
- package/lib/icons/bankId.d.ts +2 -0
- package/lib/icons/check.d.ts +2 -1
- package/lib/icons/chevronDown.d.ts +2 -1
- package/lib/icons/index.d.ts +5 -2
- package/lib/icons/infoCircle.d.ts +2 -0
- package/lib/icons/square-exclamation.d.ts +2 -1
- package/lib/icons/square-info.d.ts +2 -1
- package/lib/icons/times.d.ts +2 -0
- package/lib/layout/flexbox/flexbox.d.ts +1 -1
- package/lib/select/select.d.ts +3 -0
- package/package.json +1 -1
- package/types/props/index.d.ts +6 -0
package/lib/form/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
import { CheckboxProps, NumberInputProps, RadioButtonProps, TextInputProps } from '../types';
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
3
2
|
import { IValidator } from '@sebgroup/extract';
|
|
4
|
-
import
|
|
5
|
-
export declare type Renderer = (type: string, props: InputHTMLAttributes<HTMLInputElement>, onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string, label?: string, info?: string, validator?: IValidator) => JSX.Element;
|
|
3
|
+
import { CheckboxProps, NumberInputProps, RadioButtonProps, TextInputProps } from '../types';
|
|
4
|
+
export declare type Renderer = (type: string, props: InputHTMLAttributes<HTMLInputElement>, onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string, label?: string, info?: string, validator?: IValidator, expandableInfo?: string, expandableInfoButtonLabel?: string) => JSX.Element;
|
|
6
5
|
export declare const RenderInput: Renderer;
|
|
7
|
-
export declare const TextInput: ({ label, info, onChange, onChangeInput, validator, ...props }: TextInputProps) => JSX.Element;
|
|
6
|
+
export declare const TextInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: TextInputProps) => JSX.Element;
|
|
8
7
|
export declare const EmailInput: ({ label, info, onChange, onChangeInput, validator, ...props }: TextInputProps) => JSX.Element;
|
|
9
|
-
export declare const NumberInput: ({ label, info, onChange, onChangeInput, validator, ...props }: NumberInputProps) => JSX.Element;
|
|
8
|
+
export declare const NumberInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: NumberInputProps) => JSX.Element;
|
|
10
9
|
export declare const Checkbox: ({ label, onChange, validator, ...props }: CheckboxProps) => JSX.Element;
|
|
11
10
|
export declare const RadioButton: React.ForwardRefExoticComponent<Pick<RadioButtonProps, "label" | "onChange" | "validator" | "type" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IValidator } from '@sebgroup/extract';
|
|
3
3
|
export interface RadioGroupProps {
|
|
4
|
+
label?: string;
|
|
4
5
|
title?: string;
|
|
5
|
-
|
|
6
|
+
labelInformation?: string;
|
|
6
7
|
valueSelected?: string;
|
|
7
8
|
description?: string;
|
|
9
|
+
expandableInfo?: string;
|
|
10
|
+
expandableInfoButtonLabel?: string;
|
|
11
|
+
defaultSelected?: string;
|
|
8
12
|
validator?: IValidator;
|
|
9
13
|
onChangeRadio?: (value: string) => string;
|
|
10
14
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
15
|
name?: string;
|
|
12
16
|
}
|
|
13
|
-
export declare const RadioGroup: ({ defaultSelected, valueSelected,
|
|
17
|
+
export declare const RadioGroup: ({ defaultSelected, valueSelected, label, title, labelInformation, description, expandableInfo, expandableInfoButtonLabel, validator, onChangeRadio, onChange, name, children, }: React.PropsWithChildren<RadioGroupProps>) => JSX.Element;
|
|
14
18
|
export default RadioGroup;
|
package/lib/form/types.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface TextInputProps extends HTMLProps<HTMLInputElement> {
|
|
|
4
4
|
type?: 'text' | 'email' | 'number';
|
|
5
5
|
label?: string;
|
|
6
6
|
info?: string;
|
|
7
|
+
expandableInfo?: string;
|
|
8
|
+
expandableInfoButtonLabel?: string;
|
|
7
9
|
validator?: IValidator;
|
|
8
10
|
onChangeInput?: (value: string) => string;
|
|
9
11
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IValidator } from '@sebgroup/extract';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
|
+
interface FormItemProps {
|
|
4
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
onChangeInput?: (value: string) => string;
|
|
6
|
+
label?: string;
|
|
7
|
+
labelInformation?: string;
|
|
8
|
+
validator?: IValidator;
|
|
9
|
+
expandableInfo?: string;
|
|
10
|
+
inputId?: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
expandableInfoButtonLabel?: string;
|
|
13
|
+
role?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const FormItem: ({ expandableInfo, label, labelInformation, validator, inputId, children, expandableInfoButtonLabel, role, }: FormItemProps) => JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './formItem';
|
package/lib/icons/check.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconProps } from '../../types/props';
|
|
2
|
+
export declare const Check: ({ focusable, title }: IconProps) => JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconProps } from '../../types/props';
|
|
2
|
+
export declare const ChevronDown: ({ focusable, title }: IconProps) => JSX.Element;
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './square-info';
|
|
1
|
+
export * from './bankId';
|
|
3
2
|
export * from './check';
|
|
4
3
|
export * from './chevronDown';
|
|
4
|
+
export * from './square-exclamation';
|
|
5
|
+
export * from './square-info';
|
|
6
|
+
export * from './times';
|
|
7
|
+
export * from './infoCircle';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconProps } from '../../types/props';
|
|
2
|
+
export declare const SquareExclamation: ({ focusable, title, ...props }: IconProps) => JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconProps } from '../../types/props';
|
|
2
|
+
export declare const SquareInfo: ({ focusable, title, ...props }: IconProps) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { AlignContentType, AlignType, FlexDirectionType, FlexWrapType, JustifyCo
|
|
|
3
3
|
export interface FlexboxProps extends HTMLProps<HTMLDivElement> {
|
|
4
4
|
alignContent?: AlignContentType;
|
|
5
5
|
alignItems?: AlignType;
|
|
6
|
-
alignSelf?: AlignType;
|
|
6
|
+
alignSelf?: AlignType | 'auto';
|
|
7
7
|
justifyContent?: JustifyContentType;
|
|
8
8
|
flexDirection?: FlexDirectionType;
|
|
9
9
|
flexWrap?: FlexWrapType;
|
package/lib/select/select.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export interface SelectProps extends SelectorAttributesProps, LabelProps {
|
|
|
8
8
|
onSelect?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
9
9
|
defaultValue?: string | number;
|
|
10
10
|
value?: string | number;
|
|
11
|
+
testId?: string;
|
|
12
|
+
expandableInfo?: string;
|
|
13
|
+
expandableInfoButtonLabel?: string;
|
|
11
14
|
}
|
|
12
15
|
interface OptionProps {
|
|
13
16
|
children: string;
|
package/package.json
CHANGED