@deephaven/components 0.54.0 → 0.54.1-beta.2
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/Select.d.ts +8 -9
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +31 -20
- package/dist/Select.js.map +1 -1
- package/package.json +7 -7
package/dist/Select.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onBlur?: React.FocusEventHandler<HTMLSelectElement>;
|
|
2
|
+
type baseSelectProps = Omit<React.HTMLProps<HTMLSelectElement>, 'onChange'>;
|
|
3
|
+
export type SelectProps = baseSelectProps & {
|
|
5
4
|
onChange: (value: string) => void;
|
|
6
|
-
className?: string;
|
|
7
|
-
defaultValue?: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
value?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
5
|
'data-testid'?: string;
|
|
12
6
|
};
|
|
13
|
-
|
|
7
|
+
/**
|
|
8
|
+
* A custom select component with styling, which is a wrapper around the
|
|
9
|
+
* native select element.
|
|
10
|
+
* @param props.onChange returns a string value and not the event
|
|
11
|
+
*/
|
|
12
|
+
declare const Select: React.ForwardRefExoticComponent<Pick<SelectProps, "className" | "pattern" | "placeholder" | "value" | "onChange" | "onSelect" | "onSubmit" | "onFocus" | "onBlur" | "data-testid" | "key" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "color" | "hidden" | "type" | "onKeyDown" | "onSelectCapture" | "start" | "children" | "width" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "role" | "tabIndex" | "crossOrigin" | "href" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "list" | "rows" | "download" | "alt" | "autoFocus" | "accept" | "capture" | "checked" | "defaultChecked" | "defaultValue" | "disabled" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "src" | "step" | "useMap" | "spellCheck" | "formEncType" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "kind" | "htmlFor" | "action" | "content" | "default" | "wrap" | "open" | "nonce" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoComplete" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "encType" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "rel" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "wmode"> & React.RefAttributes<HTMLSelectElement>>;
|
|
14
13
|
export default Select;
|
|
15
14
|
//# sourceMappingURL=Select.d.ts.map
|
package/dist/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,KAAK,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,CAAC;AAE5E,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG;IAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AAEH,QAAA,MAAM,MAAM,20LAgCX,CAAC;AAIF,eAAe,MAAM,CAAC"}
|
package/dist/Select.js
CHANGED
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "onChange", "data-testid"];
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
1
9
|
import React, { useCallback } from 'react';
|
|
2
10
|
import classNames from 'classnames';
|
|
11
|
+
import { useForwardedRef } from '@deephaven/react-hooks';
|
|
3
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A custom select component with styling, which is a wrapper around the
|
|
15
|
+
* native select element.
|
|
16
|
+
* @param props.onChange returns a string value and not the event
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
var Select = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
5
20
|
var {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
disabled,
|
|
14
|
-
'data-testid': dataTestId
|
|
15
|
-
} = _ref;
|
|
21
|
+
children,
|
|
22
|
+
className,
|
|
23
|
+
onChange,
|
|
24
|
+
'data-testid': dataTestId
|
|
25
|
+
} = props,
|
|
26
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
27
|
+
var ref = useForwardedRef(forwardedRef);
|
|
16
28
|
var handleChange = useCallback(event => {
|
|
17
29
|
onChange(event.target.value);
|
|
18
30
|
}, [onChange]);
|
|
19
|
-
return /*#__PURE__*/_jsx("select", {
|
|
31
|
+
return /*#__PURE__*/_jsx("select", _objectSpread(_objectSpread({
|
|
32
|
+
ref: ref,
|
|
20
33
|
className: classNames('custom-select', className),
|
|
21
|
-
onBlur: onBlur,
|
|
22
34
|
onChange: handleChange,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
disabled: disabled,
|
|
27
|
-
"data-testid": dataTestId,
|
|
35
|
+
"data-testid": dataTestId
|
|
36
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
37
|
+
}, rest), {}, {
|
|
28
38
|
children: children
|
|
29
|
-
});
|
|
30
|
-
}
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
Select.displayName = 'Select';
|
|
31
42
|
export default Select;
|
|
32
43
|
//# sourceMappingURL=Select.js.map
|
package/dist/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":["React","useCallback","classNames","jsx","_jsx","Select","
|
|
1
|
+
{"version":3,"file":"Select.js","names":["React","useCallback","classNames","useForwardedRef","jsx","_jsx","Select","forwardRef","props","forwardedRef","children","className","onChange","dataTestId","rest","_objectWithoutProperties","_excluded","ref","handleChange","event","target","value","_objectSpread","displayName"],"sources":["../src/Select.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport classNames from 'classnames';\nimport { useForwardedRef } from '@deephaven/react-hooks';\n\ntype baseSelectProps = Omit<React.HTMLProps<HTMLSelectElement>, 'onChange'>;\n\nexport type SelectProps = baseSelectProps & {\n onChange: (value: string) => void;\n 'data-testid'?: string;\n};\n\n/**\n * A custom select component with styling, which is a wrapper around the\n * native select element.\n * @param props.onChange returns a string value and not the event\n */\n\nconst Select = React.forwardRef<HTMLSelectElement, SelectProps>(\n (props, forwardedRef) => {\n const {\n children,\n className,\n onChange,\n 'data-testid': dataTestId,\n ...rest\n } = props;\n\n const ref = useForwardedRef<HTMLSelectElement>(forwardedRef);\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>): void => {\n onChange(event.target.value);\n },\n [onChange]\n );\n\n return (\n <select\n ref={ref}\n className={classNames('custom-select', className)}\n onChange={handleChange}\n data-testid={dataTestId}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n >\n {children}\n </select>\n );\n }\n);\n\nSelect.displayName = 'Select';\n\nexport default Select;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,eAAe,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASzD;AACA;AACA;AACA;AACA;;AAEA,IAAMC,MAAM,gBAAGN,KAAK,CAACO,UAAU,CAC7B,CAACC,KAAK,EAAEC,YAAY,KAAK;EACvB,IAAM;MACJC,QAAQ;MACRC,SAAS;MACTC,QAAQ;MACR,aAAa,EAAEC;IAEjB,CAAC,GAAGL,KAAK;IADJM,IAAI,GAAAC,wBAAA,CACLP,KAAK,EAAAQ,SAAA;EAET,IAAMC,GAAG,GAAGd,eAAe,CAAoBM,YAAY,CAAC;EAE5D,IAAMS,YAAY,GAAGjB,WAAW,CAC7BkB,KAA2C,IAAW;IACrDP,QAAQ,CAACO,KAAK,CAACC,MAAM,CAACC,KAAK,CAAC;EAC9B,CAAC,EACD,CAACT,QAAQ,CACX,CAAC;EAED,oBACEP,IAAA,WAAAiB,aAAA,CAAAA,aAAA;IACEL,GAAG,EAAEA,GAAI;IACTN,SAAS,EAAET,UAAU,CAAC,eAAe,EAAES,SAAS,CAAE;IAClDC,QAAQ,EAAEM,YAAa;IACvB,eAAaL;IACb;EAAA,GACIC,IAAI;IAAAJ,QAAA,EAEPA;EAAQ,EACH,CAAC;AAEb,CACF,CAAC;AAEDJ,MAAM,CAACiB,WAAW,GAAG,QAAQ;AAE7B,eAAejB,MAAM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/components",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.1-beta.2+737d1aa9",
|
|
4
4
|
"description": "Deephaven React component library",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@adobe/react-spectrum": "^3.29.0",
|
|
28
|
-
"@deephaven/icons": "^0.54.
|
|
29
|
-
"@deephaven/log": "^0.54.
|
|
30
|
-
"@deephaven/react-hooks": "^0.54.
|
|
31
|
-
"@deephaven/utils": "^0.54.
|
|
28
|
+
"@deephaven/icons": "^0.54.1-beta.2+737d1aa9",
|
|
29
|
+
"@deephaven/log": "^0.54.1-beta.2+737d1aa9",
|
|
30
|
+
"@deephaven/react-hooks": "^0.54.1-beta.2+737d1aa9",
|
|
31
|
+
"@deephaven/utils": "^0.54.1-beta.2+737d1aa9",
|
|
32
32
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
33
33
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
34
34
|
"@react-spectrum/theme-default": "^3.5.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react-dom": "^17.x"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@deephaven/mocks": "^0.54.
|
|
55
|
+
"@deephaven/mocks": "^0.54.1-beta.2+737d1aa9"
|
|
56
56
|
},
|
|
57
57
|
"files": [
|
|
58
58
|
"dist",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "737d1aa98d04800377035d7d189219fefacfa23f"
|
|
69
69
|
}
|