@dfds-ui/forms 2.0.29-alpha.fae844df → 2.2.0-alpha.4e495871
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/assistive-text/AssistiveText.d.ts +1 -1
- package/asterisk/Asterisk.d.ts +1 -1
- package/asterisk/Asterisk.js +2 -2
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +3 -3
- package/checkbox/CheckboxContext.d.ts +1 -1
- package/checkbox/CheckboxGroup.d.ts +1 -1
- package/checkbox/CheckboxGroup.js +3 -3
- package/cjs/assistive-text/AssistiveText.d.ts +1 -1
- package/cjs/assistive-text/AssistiveText.js +1 -1
- package/cjs/asterisk/Asterisk.d.ts +1 -1
- package/cjs/asterisk/Asterisk.js +5 -5
- package/cjs/checkbox/Checkbox.d.ts +2 -2
- package/cjs/checkbox/Checkbox.js +19 -24
- package/cjs/checkbox/CheckboxContext.d.ts +1 -1
- package/cjs/checkbox/CheckboxContext.js +2 -1
- package/cjs/checkbox/CheckboxGroup.d.ts +1 -1
- package/cjs/checkbox/CheckboxGroup.js +16 -21
- package/cjs/checkbox/index.js +2 -2
- package/cjs/counter/Counter.d.ts +2 -2
- package/cjs/counter/Counter.js +33 -45
- package/cjs/counter/index.js +1 -1
- package/cjs/enhanced/EnhancedField.d.ts +4 -4
- package/cjs/enhanced/EnhancedField.js +15 -14
- package/cjs/enhanced/index.js +1 -1
- package/cjs/error-text/ErrorText.d.ts +1 -1
- package/cjs/error-text/ErrorText.js +1 -1
- package/cjs/field-wrap/FieldWrap.d.ts +1 -1
- package/cjs/field-wrap/FieldWrap.js +2 -2
- package/cjs/field-wrap/index.js +1 -1
- package/cjs/help-icon/HelpIcon.d.ts +1 -1
- package/cjs/help-icon/HelpIcon.js +1 -1
- package/cjs/index.js +19 -19
- package/cjs/label/Label.d.ts +1 -1
- package/cjs/label/Label.js +11 -17
- package/cjs/password-field/PasswordField.d.ts +1 -1
- package/cjs/password-field/PasswordField.js +5 -13
- package/cjs/radio/Radio.d.ts +3 -3
- package/cjs/radio/Radio.js +17 -21
- package/cjs/radio/RadioContext.d.ts +1 -1
- package/cjs/radio/RadioContext.js +2 -1
- package/cjs/radio/RadioGroup.d.ts +1 -1
- package/cjs/radio/RadioGroup.js +1 -1
- package/cjs/radio/index.js +2 -2
- package/cjs/rating/Rating.d.ts +2 -2
- package/cjs/rating/Rating.js +6 -14
- package/cjs/rating/index.js +1 -1
- package/cjs/select-field/AsyncSelectField.d.ts +3 -83
- package/cjs/select-field/AsyncSelectField.js +21 -26
- package/cjs/select-field/CreatableSelectField.d.ts +3 -83
- package/cjs/select-field/CreatableSelectField.js +56 -63
- package/cjs/select-field/NativeSelectField.d.ts +2 -2
- package/cjs/select-field/NativeSelectField.js +19 -22
- package/cjs/select-field/SelectField.d.ts +3 -3
- package/cjs/select-field/SelectField.js +58 -65
- package/cjs/switch/Switch.d.ts +3 -3
- package/cjs/switch/Switch.js +27 -30
- package/cjs/switch/SwitchContext.d.ts +1 -1
- package/cjs/switch/SwitchContext.js +2 -1
- package/cjs/switch/SwitchGroup.d.ts +1 -1
- package/cjs/switch/SwitchGroup.js +1 -1
- package/cjs/switch/index.js +2 -2
- package/cjs/tel-field/TelField.d.ts +2 -2
- package/cjs/tel-field/TelField.js +33 -54
- package/cjs/text-field/TextField.d.ts +2 -2
- package/cjs/text-field/TextField.js +35 -40
- package/cjs/textarea-field/TextareaField.d.ts +2 -2
- package/cjs/textarea-field/TextareaField.js +24 -38
- package/cjs/types/field.d.ts +1 -1
- package/cjs/types/index.js +2 -2
- package/cjs/types/size.d.ts +1 -1
- package/counter/Counter.d.ts +2 -2
- package/counter/Counter.js +7 -7
- package/enhanced/EnhancedField.d.ts +4 -4
- package/enhanced/EnhancedField.js +3 -3
- package/error-text/ErrorText.d.ts +1 -1
- package/field-wrap/FieldWrap.d.ts +1 -1
- package/field-wrap/FieldWrap.js +1 -1
- package/help-icon/HelpIcon.d.ts +1 -1
- package/label/Label.d.ts +1 -1
- package/label/Label.js +3 -3
- package/package.json +7 -7
- package/password-field/PasswordField.d.ts +1 -1
- package/password-field/PasswordField.js +5 -5
- package/radio/Radio.d.ts +3 -3
- package/radio/Radio.js +4 -4
- package/radio/RadioContext.d.ts +1 -1
- package/radio/RadioGroup.d.ts +1 -1
- package/rating/Rating.d.ts +2 -2
- package/rating/Rating.js +8 -8
- package/select-field/AsyncSelectField.d.ts +3 -83
- package/select-field/AsyncSelectField.js +4 -4
- package/select-field/CreatableSelectField.d.ts +3 -83
- package/select-field/CreatableSelectField.js +6 -6
- package/select-field/NativeSelectField.d.ts +2 -2
- package/select-field/NativeSelectField.js +3 -3
- package/select-field/SelectField.d.ts +3 -3
- package/select-field/SelectField.js +6 -6
- package/switch/Switch.d.ts +3 -3
- package/switch/Switch.js +20 -20
- package/switch/SwitchContext.d.ts +1 -1
- package/switch/SwitchGroup.d.ts +1 -1
- package/tel-field/TelField.d.ts +2 -2
- package/tel-field/TelField.js +8 -8
- package/text-field/TextField.d.ts +2 -2
- package/text-field/TextField.js +3 -3
- package/textarea-field/TextareaField.d.ts +2 -2
- package/textarea-field/TextareaField.js +7 -7
- package/types/field.d.ts +1 -1
- package/types/size.d.ts +1 -1
|
@@ -5,14 +5,14 @@ var _excluded = ["assistiveText", "components", "defaultValue", "disabled", "err
|
|
|
5
5
|
var _templateObject;
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _objectDestructuringEmpty(
|
|
12
|
-
function _extends() {
|
|
13
|
-
function _objectWithoutProperties(
|
|
14
|
-
function _objectWithoutPropertiesLoose(
|
|
15
|
-
function _taggedTemplateLiteral(
|
|
11
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
16
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { css } from '@emotion/react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseFieldProps, Size } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type NativeSelectFieldProps = BaseFieldProps & React.ComponentPropsWithRef<'select'> & {
|
|
4
4
|
className?: string;
|
|
5
5
|
visualSize?: Size;
|
|
6
6
|
};
|
|
7
|
-
export declare const NativeSelectField: React.ForwardRefExoticComponent<Pick<NativeSelectFieldProps, "required" | "key" | "id" | "name" | "color" | "translate" | "value" | "hidden" | "form" | "label" | "slot" | "style" | "title" | "dir" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "tabIndex" | "disabled" | "multiple" | "size" | "help" | "autoComplete" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "
|
|
7
|
+
export declare const NativeSelectField: React.ForwardRefExoticComponent<Pick<NativeSelectFieldProps, "required" | "key" | "id" | "name" | "color" | "translate" | "value" | "hidden" | "form" | "label" | "slot" | "style" | "title" | "dir" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "role" | "children" | "contentEditable" | "inputMode" | "tabIndex" | "disabled" | "multiple" | "size" | "help" | "autoComplete" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "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" | "css" | "hideAsterisk" | "assistiveText" | "errorMessage" | "visualSize" | "helpPlacement"> & React.RefAttributes<HTMLSelectElement>>;
|
|
8
8
|
export default NativeSelectField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["name", "label", "defaultValue", "className", "help", "children", "helpPlacement", "assistiveText", "errorMessage", "disabled", "required", "hideAsterisk", "visualSize"];
|
|
2
|
-
function _extends() {
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
6
|
import { css } from '@emotion/react';
|
|
7
7
|
import { ChevronDown } from '@dfds-ui/icons/system/';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Select, { ActionMeta, createFilter, GroupBase, MultiValue, OptionsOrGroups, SingleValue } from 'react-select';
|
|
3
3
|
import { BaseFieldProps } from '../types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type BaseReactSelectProps = Omit<React.PropsWithRef<Select>, 'size' | 'css'>;
|
|
5
|
+
export type Size = 'small' | 'medium' | 'large';
|
|
6
6
|
export declare const ReactSelectWrapper: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: React.ElementType<any> | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const ReactSelectWrapper: import("@emotion/styled").StyledCompone
|
|
|
13
13
|
selected?: boolean | undefined;
|
|
14
14
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
15
|
export declare const Menu: (props: any) => JSX.Element;
|
|
16
|
-
export
|
|
16
|
+
export type SelectFieldProps<T = string> = BaseFieldProps & {
|
|
17
17
|
assistiveText?: string;
|
|
18
18
|
autoFocus?: boolean;
|
|
19
19
|
className?: string;
|
|
@@ -5,14 +5,14 @@ var _excluded = ["assistiveText", "components", "defaultValue", "disabled", "err
|
|
|
5
5
|
var _templateObject;
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _objectDestructuringEmpty(
|
|
12
|
-
function _extends() {
|
|
13
|
-
function _objectWithoutProperties(
|
|
14
|
-
function _objectWithoutPropertiesLoose(
|
|
15
|
-
function _taggedTemplateLiteral(
|
|
11
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
16
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { css } from '@emotion/react';
|
package/switch/Switch.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ChangeEvent } from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type Size = 'small' | 'medium';
|
|
3
|
+
export type SwitchProps = React.PropsWithRef<JSX.IntrinsicElements['label']> & {
|
|
4
4
|
/**
|
|
5
5
|
* Name of the input element
|
|
6
6
|
*/
|
|
@@ -28,5 +28,5 @@ export declare type SwitchProps = React.PropsWithRef<JSX.IntrinsicElements['labe
|
|
|
28
28
|
size?: Size;
|
|
29
29
|
error?: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "
|
|
31
|
+
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "key" | "error" | "name" | "right" | "disabled" | "size" | "checked" | "css" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
32
32
|
export {};
|