@sebgroup/green-react 1.2.1 → 1.3.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.
Files changed (58) hide show
  1. package/{index.esm.js → index.js} +151 -73
  2. package/package.json +7 -6
  3. package/{index.d.ts → src/index.d.ts} +2 -1
  4. package/{lib → src/lib}/dropdown/hooks.d.ts +1 -1
  5. package/{lib → src/lib}/form/input/input.d.ts +2 -2
  6. package/{lib → src/lib}/form/types.d.ts +1 -1
  7. package/src/lib/layout/flexbox/types.d.ts +5 -0
  8. package/{lib → src/lib}/modal/modal.d.ts +1 -1
  9. package/src/lib/slider/index.d.ts +1 -0
  10. package/src/lib/slider/slider.d.ts +3 -0
  11. package/src/types/props/index.d.ts +28 -0
  12. package/index.umd.js +0 -3654
  13. package/lib/layout/flexbox/types.d.ts +0 -5
  14. package/types/props/index.d.ts +0 -15
  15. /package/{lib → src/lib}/accordion/accordion-item.d.ts +0 -0
  16. /package/{lib → src/lib}/accordion/accordion.d.ts +0 -0
  17. /package/{lib → src/lib}/alert-ribbon/alert-ribbon.d.ts +0 -0
  18. /package/{lib → src/lib}/badge/badge.d.ts +0 -0
  19. /package/{lib → src/lib}/card/card.d.ts +0 -0
  20. /package/{lib → src/lib}/datepicker/datepicker.d.ts +0 -0
  21. /package/{lib → src/lib}/datepicker/hook.d.ts +0 -0
  22. /package/{lib → src/lib}/dropdown/dropdown.d.ts +0 -0
  23. /package/{lib → src/lib}/form/button/button.d.ts +0 -0
  24. /package/{lib → src/lib}/form/buttonGroup/buttonGroup.d.ts +0 -0
  25. /package/{lib → src/lib}/form/form.d.ts +0 -0
  26. /package/{lib → src/lib}/form/formContext.d.ts +0 -0
  27. /package/{lib → src/lib}/form/formItems.d.ts +0 -0
  28. /package/{lib → src/lib}/form/group/group.d.ts +0 -0
  29. /package/{lib → src/lib}/form/iconButton/iconButton.d.ts +0 -0
  30. /package/{lib → src/lib}/form/index.d.ts +0 -0
  31. /package/{lib → src/lib}/form/radioButton/radioGroup.d.ts +0 -0
  32. /package/{lib → src/lib}/form/text/text.d.ts +0 -0
  33. /package/{lib → src/lib}/form/useInput.d.ts +0 -0
  34. /package/{lib → src/lib}/form/validateInput.d.ts +0 -0
  35. /package/{lib → src/lib}/formItem/formItem.d.ts +0 -0
  36. /package/{lib → src/lib}/formItem/index.d.ts +0 -0
  37. /package/{lib → src/lib}/icons/bankId.d.ts +0 -0
  38. /package/{lib → src/lib}/icons/check.d.ts +0 -0
  39. /package/{lib → src/lib}/icons/chevronDown.d.ts +0 -0
  40. /package/{lib → src/lib}/icons/index.d.ts +0 -0
  41. /package/{lib → src/lib}/icons/infoCircle.d.ts +0 -0
  42. /package/{lib → src/lib}/icons/square-exclamation.d.ts +0 -0
  43. /package/{lib → src/lib}/icons/square-info.d.ts +0 -0
  44. /package/{lib → src/lib}/icons/times.d.ts +0 -0
  45. /package/{lib → src/lib}/layout/flexbox/flexbox.d.ts +0 -0
  46. /package/{lib → src/lib}/layout/index.d.ts +0 -0
  47. /package/{lib → src/lib}/link/link.d.ts +0 -0
  48. /package/{lib → src/lib}/list/index.d.ts +0 -0
  49. /package/{lib → src/lib}/list/list.d.ts +0 -0
  50. /package/{lib → src/lib}/list/listItem.d.ts +0 -0
  51. /package/{lib → src/lib}/list/valueList.d.ts +0 -0
  52. /package/{lib → src/lib}/navbar/navbar.d.ts +0 -0
  53. /package/{lib → src/lib}/select/index.d.ts +0 -0
  54. /package/{lib → src/lib}/select/select.d.ts +0 -0
  55. /package/{lib → src/lib}/stepper/hook.d.ts +0 -0
  56. /package/{lib → src/lib}/stepper/stepper.d.ts +0 -0
  57. /package/{lib → src/lib}/tabs/tabs.d.ts +0 -0
  58. /package/{types → src/types}/index.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import React, { useState, useLayoutEffect, useEffect, useRef, useMemo } from 'react';
3
- import { randomId, debounce, validateClassName, delay, createStepper, createDropdown, dropdownValues, createDatepicker, months, years } from '@sebgroup/extract';
3
+ import { randomId, debounce, validateClassName, delay, sliderColors, getSliderTrackBackground, createStepper, createDropdown, dropdownValues, createDatepicker, months, years } from '@sebgroup/extract';
4
4
  import classNames from 'classnames';
5
5
 
6
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -333,10 +333,10 @@ var store$2 = sharedStore;
333
333
  (shared$3.exports = function (key, value) {
334
334
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
335
335
  })('versions', []).push({
336
- version: '3.29.0',
336
+ version: '3.29.1',
337
337
  mode: 'global',
338
338
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
339
- license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
339
+ license: 'https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE',
340
340
  source: 'https://github.com/zloirock/core-js'
341
341
  });
342
342
 
@@ -3005,6 +3005,153 @@ function Badge(_a) {
3005
3005
  })) : null;
3006
3006
  }
3007
3007
 
3008
+ const Select = /*#__PURE__*/React.forwardRef(({
3009
+ id,
3010
+ className,
3011
+ children,
3012
+ validator,
3013
+ label,
3014
+ labelInformation,
3015
+ defaultValue,
3016
+ value,
3017
+ testId,
3018
+ onChange,
3019
+ onSelect,
3020
+ expandableInfo,
3021
+ expandableInfoButtonLabel
3022
+ }, ref) => {
3023
+ const selectId = id !== null && id !== void 0 ? id : randomId();
3024
+ const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
3025
+ return jsx(FormItem, Object.assign({
3026
+ label: label,
3027
+ labelInformation: labelInformation,
3028
+ expandableInfo: expandableInfo,
3029
+ expandableInfoButtonLabel: expandableInfoButtonLabel,
3030
+ inputId: selectId,
3031
+ validator: validator
3032
+ }, {
3033
+ children: jsxs("div", Object.assign({
3034
+ className: `gds-select ${validatorClassName}`
3035
+ }, {
3036
+ children: [jsx("select", Object.assign({
3037
+ id: selectId,
3038
+ "data-testid": testId,
3039
+ className: className,
3040
+ defaultValue: defaultValue,
3041
+ value: value,
3042
+ ref: ref,
3043
+ onChange: event => {
3044
+ onChange && onChange(event);
3045
+ }
3046
+ }, {
3047
+ children: children
3048
+ })), jsx(ChevronDown, {})]
3049
+ }))
3050
+ }));
3051
+ });
3052
+ const Option = _a => {
3053
+ var {
3054
+ value,
3055
+ children
3056
+ } = _a,
3057
+ rest = __rest(_a, ["value", "children"]);
3058
+ return jsx("option", Object.assign({
3059
+ value: value
3060
+ }, rest, {
3061
+ children: children
3062
+ }));
3063
+ };
3064
+ const OptionGroup = ({
3065
+ label,
3066
+ disabled,
3067
+ children
3068
+ }) => {
3069
+ return jsx("optgroup", Object.assign({
3070
+ label: label,
3071
+ disabled: disabled
3072
+ }, {
3073
+ children: children
3074
+ }));
3075
+ };
3076
+
3077
+ function Slider({
3078
+ name = `${randomId()}-slider`,
3079
+ defaultValue,
3080
+ min = 0,
3081
+ max = 100,
3082
+ step = 1,
3083
+ label,
3084
+ instruction,
3085
+ errorMessage,
3086
+ hasTextbox = false,
3087
+ disabled = false,
3088
+ onChange
3089
+ }) {
3090
+ const [background, setBackground] = React.useState();
3091
+ const [sliderValue, setSliderValue] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0);
3092
+ React.useLayoutEffect(() => {
3093
+ if (disabled) {
3094
+ setBackground(sliderColors.disabled);
3095
+ return;
3096
+ }
3097
+ const percent = (sliderValue - min) / (max - min) * 100;
3098
+ setBackground(getSliderTrackBackground(percent));
3099
+ }, [disabled, sliderValue]);
3100
+ const handleChange = e => {
3101
+ const {
3102
+ value
3103
+ } = e.target;
3104
+ setSliderValue(Number(value));
3105
+ if (onChange) onChange(Number(value));
3106
+ };
3107
+ return jsxs(Fragment, {
3108
+ children: [label && jsxs("div", Object.assign({
3109
+ className: "gds-slider-label-container"
3110
+ }, {
3111
+ children: [jsxs("div", {
3112
+ children: [jsx("label", Object.assign({
3113
+ htmlFor: name
3114
+ }, {
3115
+ children: label
3116
+ })), instruction && jsx("p", {
3117
+ children: instruction
3118
+ })]
3119
+ }), hasTextbox && jsxs("div", Object.assign({
3120
+ className: "form-group"
3121
+ }, {
3122
+ children: [jsx("input", {
3123
+ type: "number",
3124
+ value: sliderValue,
3125
+ id: `${name}-textbox`,
3126
+ name: name,
3127
+ className: errorMessage ? 'is-invalid' : '',
3128
+ disabled: disabled,
3129
+ onChange: handleChange
3130
+ }), jsx("span", {
3131
+ className: "form-info"
3132
+ })]
3133
+ }))]
3134
+ })), jsx("input", {
3135
+ type: "range",
3136
+ value: sliderValue,
3137
+ id: name,
3138
+ name: name,
3139
+ min: min,
3140
+ max: max,
3141
+ step: step,
3142
+ disabled: disabled,
3143
+ onChange: handleChange,
3144
+ style: {
3145
+ background
3146
+ }
3147
+ }), errorMessage && jsx("p", Object.assign({
3148
+ className: "gds-slider-error-info"
3149
+ }, {
3150
+ children: errorMessage
3151
+ }))]
3152
+ });
3153
+ }
3154
+
3008
3155
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3009
3156
  const noop = () => {};
3010
3157
  const useStepper = ({
@@ -3120,75 +3267,6 @@ function Stepper(_a) {
3120
3267
  }));
3121
3268
  }
3122
3269
 
3123
- const Select = /*#__PURE__*/React.forwardRef(({
3124
- id,
3125
- className,
3126
- children,
3127
- validator,
3128
- label,
3129
- labelInformation,
3130
- defaultValue,
3131
- value,
3132
- testId,
3133
- onChange,
3134
- onSelect,
3135
- expandableInfo,
3136
- expandableInfoButtonLabel
3137
- }, ref) => {
3138
- const selectId = id !== null && id !== void 0 ? id : randomId();
3139
- const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
3140
- return jsx(FormItem, Object.assign({
3141
- label: label,
3142
- labelInformation: labelInformation,
3143
- expandableInfo: expandableInfo,
3144
- expandableInfoButtonLabel: expandableInfoButtonLabel,
3145
- inputId: selectId,
3146
- validator: validator
3147
- }, {
3148
- children: jsxs("div", Object.assign({
3149
- className: `gds-select ${validatorClassName}`
3150
- }, {
3151
- children: [jsx("select", Object.assign({
3152
- id: selectId,
3153
- "data-testid": testId,
3154
- className: className,
3155
- defaultValue: defaultValue,
3156
- value: value,
3157
- ref: ref,
3158
- onChange: event => {
3159
- onChange && onChange(event);
3160
- }
3161
- }, {
3162
- children: children
3163
- })), jsx(ChevronDown, {})]
3164
- }))
3165
- }));
3166
- });
3167
- const Option = _a => {
3168
- var {
3169
- value,
3170
- children
3171
- } = _a,
3172
- rest = __rest(_a, ["value", "children"]);
3173
- return jsx("option", Object.assign({
3174
- value: value
3175
- }, rest, {
3176
- children: children
3177
- }));
3178
- };
3179
- const OptionGroup = ({
3180
- label,
3181
- disabled,
3182
- children
3183
- }) => {
3184
- return jsx("optgroup", Object.assign({
3185
- label: label,
3186
- disabled: disabled
3187
- }, {
3188
- children: children
3189
- }));
3190
- };
3191
-
3192
3270
  const useDropdown = ({
3193
3271
  id,
3194
3272
  value,
@@ -3612,4 +3690,4 @@ const Datepicker = (options = {}) => {
3612
3690
  });
3613
3691
  };
3614
3692
 
3615
- export { AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, Link, List$1 as List, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, RenderInput, Select, Stepper, Text, TextInput, valueList$1 as ValueList };
3693
+ export { AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, Link, List$1 as List, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, RenderInput, Select, Slider, Stepper, Text, TextInput, valueList$1 as ValueList };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.0.0",
10
- "@sebgroup/extract": "^1.0.0",
9
+ "@sebgroup/chlorophyll": "^1.4.0",
10
+ "@sebgroup/extract": "^1.2.0",
11
11
  "classnames": "^2.3.2"
12
12
  },
13
13
  "description": "React components built on top of @sebgroup/chlorophyll.",
@@ -26,7 +26,8 @@
26
26
  "url": "https://github.com/sebgroup/green/labels/react"
27
27
  },
28
28
  "homepage": "https://sebgroup.github.io/green/latest/react/",
29
- "main": "./index.umd.js",
30
- "module": "./index.esm.js",
31
- "typings": "./index.d.ts"
29
+ "module": "./index.js",
30
+ "main": "./index.js",
31
+ "type": "module",
32
+ "types": "./src/index.d.ts"
32
33
  }
@@ -8,8 +8,9 @@ export * from './lib/list';
8
8
  export * from './lib/navbar/navbar';
9
9
  export * from './lib/link/link';
10
10
  export * from './lib/badge/badge';
11
- export * from './lib/stepper/stepper';
12
11
  export * from './lib/select';
12
+ export * from './lib/slider';
13
+ export * from './lib/stepper/stepper';
13
14
  export * from './lib/dropdown/dropdown';
14
15
  export * from './lib/datepicker/datepicker';
15
16
  export * from './types';
@@ -7,7 +7,7 @@ interface HookArgs extends DropdownArgs {
7
7
  onChange?: OnChange;
8
8
  validator?: IValidator;
9
9
  }
10
- declare type Props = HTMLAttributes<HTMLElement>;
10
+ type Props = HTMLAttributes<HTMLElement>;
11
11
  interface CheckboxItem {
12
12
  labelProps: Props;
13
13
  inputProps: InputHTMLAttributes<HTMLInputElement>;
@@ -1,10 +1,10 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { IValidator } from '@sebgroup/extract';
3
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;
4
+ export 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;
5
5
  export declare const RenderInput: Renderer;
6
6
  export declare const TextInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: TextInputProps) => JSX.Element;
7
7
  export declare const EmailInput: ({ label, info, onChange, onChangeInput, validator, ...props }: TextInputProps) => JSX.Element;
8
8
  export declare const NumberInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: NumberInputProps) => JSX.Element;
9
9
  export declare const Checkbox: ({ label, onChange, validator, ...props }: CheckboxProps) => JSX.Element;
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>>;
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" | "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" | "nonce" | "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" | "onResize" | "onResizeCapture" | "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>>;
@@ -24,4 +24,4 @@ export interface RadioButtonProps extends HTMLProps<HTMLInputElement> {
24
24
  validator?: string;
25
25
  value: string;
26
26
  }
27
- export declare type InputListener<T> = (newValue?: T) => unknown;
27
+ export type InputListener<T> = (newValue?: T) => unknown;
@@ -0,0 +1,5 @@
1
+ export type AlignContentType = 'start' | 'between' | 'center' | 'stretch' | 'around' | 'end' | 'sm-start' | 'sm-between' | 'sm-center' | 'sm-stretch' | 'sm-around' | 'sm-end' | 'md-start' | 'md-between' | 'md-center' | 'md-stretch' | 'md-around' | 'md-end' | 'lg-start' | 'lg-between' | 'lg-center' | 'lg-stretch' | 'lg-around' | 'lg-end' | 'xl-start' | 'xl-between' | 'xl-center' | 'xl-stretch' | 'xl-around' | 'xl-end' | 'xxl-start' | 'xxl-between' | 'xxl-center' | 'xxl-stretch' | 'xxl-around' | 'xxl-end';
2
+ export type AlignType = 'start' | 'end' | 'center' | 'baseline' | 'stretch' | 'sm-start' | 'sm-end' | 'sm-center' | 'sm-baseline' | 'sm-stretch' | 'md-start' | 'md-end' | 'md-center' | 'md-baseline' | 'md-stretch' | 'lg-start' | 'lg-end' | 'lg-center' | 'lg-baseline' | 'lg-stretch' | 'xl-start' | 'xl-end' | 'xl-center' | 'xl-baseline' | 'xl-stretch' | 'xxl-start' | 'xxl-end' | 'xxl-center' | 'xxl-baseline' | 'xxl-stretch';
3
+ export type JustifyContentType = 'start' | 'between' | 'center' | 'evenly' | 'around' | 'end' | 'sm-start' | 'sm-between' | 'sm-center' | 'sm-evenly' | 'sm-around' | 'sm-end' | 'md-start' | 'md-between' | 'md-center' | 'md-evenly' | 'md-around' | 'md-end' | 'lg-start' | 'lg-between' | 'lg-center' | 'lg-evenly' | 'lg-around' | 'lg-end' | 'xl-start' | 'xl-between' | 'xl-center' | 'xl-evenly' | 'xl-around' | 'xl-end' | 'xxl-start' | 'xxl-between' | 'xxl-center' | 'xxl-evenly' | 'xxl-around' | 'xxl-end';
4
+ export type FlexDirectionType = 'row' | 'row-reverse' | 'column' | 'column-reverse' | 'sm-row' | 'sm-row-reverse' | 'sm-column' | 'sm-column-reverse' | 'md-row' | 'md-row-reverse' | 'md-column' | 'md-column-reverse' | 'lg-row' | 'lg-row-reverse' | 'lg-column' | 'lg-column-reverse' | 'xl-row' | 'xl-row-reverse' | 'xl-column' | 'xl-column-reverse' | 'xxl-row' | 'xxl-row-reverse' | 'xxl-column' | 'xxl-column-reverse';
5
+ export type FlexWrapType = 'nowrap' | 'wrap' | 'wrap-reverse' | 'sm-nowrap' | 'sm-wrap' | 'sm-wrap-reverse' | 'md-nowrap' | 'md-wrap' | 'md-wrap-reverse' | 'lg-nowrap' | 'lg-wrap' | 'lg-wrap-reverse' | 'xl-nowrap' | 'xl-wrap' | 'xl-wrap-reverse' | 'xxl-nowrap' | 'xxl-wrap' | 'xxl-wrap-reverse';
@@ -1,6 +1,6 @@
1
1
  import { ModalType, Size } from '@sebgroup/extract';
2
2
  import { MouseEvent, ReactNode } from 'react';
3
- declare type ModalEventListener = (event: MouseEvent<HTMLButtonElement>) => unknown;
3
+ type ModalEventListener = (event: MouseEvent<HTMLButtonElement>) => unknown;
4
4
  export interface ModalProps {
5
5
  type?: ModalType;
6
6
  header?: string;
@@ -0,0 +1 @@
1
+ export * from './slider';
@@ -0,0 +1,3 @@
1
+ import { SliderProps } from '../../types';
2
+ export declare function Slider({ name, defaultValue, min, max, step, label, instruction, errorMessage, hasTextbox, disabled, onChange, }: SliderProps): JSX.Element;
3
+ export default Slider;
@@ -0,0 +1,28 @@
1
+ export interface IconProps {
2
+ focusable?: boolean;
3
+ title?: string;
4
+ fill?: string;
5
+ 'aria-hidden'?: boolean;
6
+ }
7
+ export interface SelectorAttributesProps {
8
+ id?: string;
9
+ className?: string;
10
+ testId?: string;
11
+ }
12
+ export interface LabelProps {
13
+ label?: string;
14
+ labelInformation?: string;
15
+ }
16
+ export interface SliderProps {
17
+ name?: string;
18
+ defaultValue?: number;
19
+ min?: number;
20
+ max?: number;
21
+ step?: number;
22
+ label?: string;
23
+ instruction?: string;
24
+ errorMessage?: string;
25
+ hasTextbox?: boolean;
26
+ disabled?: boolean;
27
+ onChange?: (value: number) => void;
28
+ }