@deephaven/components 0.54.1-styleguide-tests.21 → 0.54.1-ui.1

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 CHANGED
@@ -1,14 +1,15 @@
1
1
  import React from 'react';
2
- type baseSelectProps = Omit<React.HTMLProps<HTMLSelectElement>, 'onChange'>;
3
- export type SelectProps = baseSelectProps & {
2
+ export type SelectProps = {
3
+ children: React.ReactNode;
4
+ onBlur?: React.FocusEventHandler<HTMLSelectElement>;
4
5
  onChange: (value: string) => void;
6
+ className?: string;
7
+ defaultValue?: string;
8
+ name?: string;
9
+ value?: string;
10
+ disabled?: boolean;
5
11
  'data-testid'?: string;
6
12
  };
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>>;
13
+ declare function Select({ children, onBlur, onChange, className, defaultValue, name, value, disabled, 'data-testid': dataTestId, }: SelectProps): JSX.Element;
13
14
  export default Select;
14
15
  //# sourceMappingURL=Select.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,aAAa,EAAE,UAAU,GAC1B,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAsB3B;AAED,eAAe,MAAM,CAAC"}
package/dist/Select.js CHANGED
@@ -1,43 +1,32 @@
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; }
9
1
  import React, { useCallback } from 'react';
10
2
  import classNames from 'classnames';
11
- import { useForwardedRef } from '@deephaven/react-hooks';
12
3
  import { jsx as _jsx } from "react/jsx-runtime";
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) => {
4
+ function Select(_ref) {
20
5
  var {
21
- children,
22
- className,
23
- onChange,
24
- 'data-testid': dataTestId
25
- } = props,
26
- rest = _objectWithoutProperties(props, _excluded);
27
- var ref = useForwardedRef(forwardedRef);
6
+ children,
7
+ onBlur,
8
+ onChange,
9
+ className,
10
+ defaultValue,
11
+ name,
12
+ value,
13
+ disabled,
14
+ 'data-testid': dataTestId
15
+ } = _ref;
28
16
  var handleChange = useCallback(event => {
29
17
  onChange(event.target.value);
30
18
  }, [onChange]);
31
- return /*#__PURE__*/_jsx("select", _objectSpread(_objectSpread({
32
- ref: ref,
19
+ return /*#__PURE__*/_jsx("select", {
33
20
  className: classNames('custom-select', className),
21
+ onBlur: onBlur,
34
22
  onChange: handleChange,
35
- "data-testid": dataTestId
36
- // eslint-disable-next-line react/jsx-props-no-spreading
37
- }, rest), {}, {
23
+ defaultValue: defaultValue,
24
+ value: value,
25
+ name: name,
26
+ disabled: disabled,
27
+ "data-testid": dataTestId,
38
28
  children: children
39
- }));
40
- });
41
- Select.displayName = 'Select';
29
+ });
30
+ }
42
31
  export default Select;
43
32
  //# sourceMappingURL=Select.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"Select.js","names":["React","useCallback","classNames","jsx","_jsx","Select","_ref","children","onBlur","onChange","className","defaultValue","name","value","disabled","dataTestId","handleChange","event","target"],"sources":["../src/Select.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport classNames from 'classnames';\n\nexport type SelectProps = {\n children: React.ReactNode;\n onBlur?: React.FocusEventHandler<HTMLSelectElement>;\n onChange: (value: string) => void;\n className?: string;\n defaultValue?: string;\n name?: string;\n value?: string;\n disabled?: boolean;\n 'data-testid'?: string;\n};\n\nfunction Select({\n children,\n onBlur,\n onChange,\n className,\n defaultValue,\n name,\n value,\n disabled,\n 'data-testid': dataTestId,\n}: SelectProps): JSX.Element {\n const handleChange = useCallback(\n event => {\n onChange(event.target.value);\n },\n [onChange]\n );\n\n return (\n <select\n className={classNames('custom-select', className)}\n onBlur={onBlur}\n onChange={handleChange}\n defaultValue={defaultValue}\n value={value}\n name={name}\n disabled={disabled}\n data-testid={dataTestId}\n >\n {children}\n </select>\n );\n}\n\nexport default Select;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,UAAU,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAcpC,SAASC,MAAMA,CAAAC,IAAA,EAUc;EAAA,IAVb;IACdC,QAAQ;IACRC,MAAM;IACNC,QAAQ;IACRC,SAAS;IACTC,YAAY;IACZC,IAAI;IACJC,KAAK;IACLC,QAAQ;IACR,aAAa,EAAEC;EACJ,CAAC,GAAAT,IAAA;EACZ,IAAMU,YAAY,GAAGf,WAAW,CAC9BgB,KAAK,IAAI;IACPR,QAAQ,CAACQ,KAAK,CAACC,MAAM,CAACL,KAAK,CAAC;EAC9B,CAAC,EACD,CAACJ,QAAQ,CACX,CAAC;EAED,oBACEL,IAAA;IACEM,SAAS,EAAER,UAAU,CAAC,eAAe,EAAEQ,SAAS,CAAE;IAClDF,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEO,YAAa;IACvBL,YAAY,EAAEA,YAAa;IAC3BE,KAAK,EAAEA,KAAM;IACbD,IAAI,EAAEA,IAAK;IACXE,QAAQ,EAAEA,QAAS;IACnB,eAAaC,UAAW;IAAAR,QAAA,EAEvBA;EAAQ,CACH,CAAC;AAEb;AAEA,eAAeF,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/components",
3
- "version": "0.54.1-styleguide-tests.21+0f7f7ba3",
3
+ "version": "0.54.1-ui.1+8baf873d",
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.1-styleguide-tests.21+0f7f7ba3",
29
- "@deephaven/log": "^0.54.1-styleguide-tests.21+0f7f7ba3",
30
- "@deephaven/react-hooks": "^0.54.1-styleguide-tests.21+0f7f7ba3",
31
- "@deephaven/utils": "^0.54.1-styleguide-tests.21+0f7f7ba3",
28
+ "@deephaven/icons": "^0.54.1-ui.1+8baf873d",
29
+ "@deephaven/log": "^0.54.1-ui.1+8baf873d",
30
+ "@deephaven/react-hooks": "^0.54.1-ui.1+8baf873d",
31
+ "@deephaven/utils": "^0.54.1-ui.1+8baf873d",
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.1-styleguide-tests.21+0f7f7ba3"
55
+ "@deephaven/mocks": "^0.54.1-ui.1+8baf873d"
56
56
  },
57
57
  "files": [
58
58
  "dist",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "0f7f7ba3369f0a6e1c57a273aed1d38746ce4932"
68
+ "gitHead": "8baf873d1d488b9ef1061565e621110e31367cf2"
69
69
  }