@deephaven/components 0.85.10 → 0.85.11

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.
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type SpectrumCheckboxGroupProps } from '@adobe/react-spectrum';
3
+ export type CheckboxGroupProps = {
4
+ children: ReactNode;
5
+ } & Omit<SpectrumCheckboxGroupProps, 'children'>;
6
+ /**
7
+ * Augmented version of the Spectrum CheckboxGroup component that supports
8
+ * primitive item children.
9
+ */
10
+ export declare function CheckboxGroup({ children, ...props }: CheckboxGroupProps): JSX.Element;
11
+ export default CheckboxGroup;
12
+ //# sourceMappingURL=CheckboxGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../src/spectrum/CheckboxGroup.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AACvD,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAmBlC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,37 @@
1
+ var _excluded = ["children"];
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
+ /* eslint-disable react/no-array-index-key */
10
+ import { isElementOfType } from '@deephaven/react-hooks';
11
+ import React, { useMemo } from 'react';
12
+ import { Checkbox, CheckboxGroup as SpectrumCheckboxGroup } from '@adobe/react-spectrum';
13
+ import { ensureArray } from '@deephaven/utils';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ /**
16
+ * Augmented version of the Spectrum CheckboxGroup component that supports
17
+ * primitive item children.
18
+ */
19
+ export function CheckboxGroup(_ref) {
20
+ var {
21
+ children
22
+ } = _ref,
23
+ props = _objectWithoutProperties(_ref, _excluded);
24
+ var wrappedChildren = useMemo(() => ensureArray(children).map(child => isElementOfType(child, Checkbox) ? child : /*#__PURE__*/_jsx(Checkbox, {
25
+ value: String(child),
26
+ children: String(child)
27
+ }, String(child))), [children]);
28
+ return (
29
+ /*#__PURE__*/
30
+ // eslint-disable-next-line react/jsx-props-no-spreading
31
+ _jsx(SpectrumCheckboxGroup, _objectSpread(_objectSpread({}, props), {}, {
32
+ children: wrappedChildren
33
+ }))
34
+ );
35
+ }
36
+ export default CheckboxGroup;
37
+ //# sourceMappingURL=CheckboxGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxGroup.js","names":["isElementOfType","React","useMemo","Checkbox","CheckboxGroup","SpectrumCheckboxGroup","ensureArray","jsx","_jsx","_ref","children","props","_objectWithoutProperties","_excluded","wrappedChildren","map","child","value","String","_objectSpread"],"sources":["../../src/spectrum/CheckboxGroup.tsx"],"sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport { isElementOfType } from '@deephaven/react-hooks';\nimport React, { type ReactNode, useMemo } from 'react';\nimport {\n Checkbox,\n CheckboxGroup as SpectrumCheckboxGroup,\n type SpectrumCheckboxGroupProps,\n} from '@adobe/react-spectrum';\nimport { ensureArray } from '@deephaven/utils';\n\nexport type CheckboxGroupProps = {\n children: ReactNode;\n} & Omit<SpectrumCheckboxGroupProps, 'children'>;\n\n/**\n * Augmented version of the Spectrum CheckboxGroup component that supports\n * primitive item children.\n */\nexport function CheckboxGroup({\n children,\n ...props\n}: CheckboxGroupProps): JSX.Element {\n const wrappedChildren = useMemo(\n () =>\n ensureArray(children).map(child =>\n isElementOfType(child, Checkbox) ? (\n child\n ) : (\n <Checkbox key={String(child)} value={String(child)}>\n {String(child)}\n </Checkbox>\n )\n ),\n [children]\n );\n\n return (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <SpectrumCheckboxGroup {...props}>{wrappedChildren}</SpectrumCheckboxGroup>\n );\n}\n\nexport default CheckboxGroup;\n"],"mappings":";;;;;;;;AAAA;AACA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,OAAOC,KAAK,IAAoBC,OAAO,QAAQ,OAAO;AACtD,SACEC,QAAQ,EACRC,aAAa,IAAIC,qBAAqB,QAEjC,uBAAuB;AAC9B,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM/C;AACA;AACA;AACA;AACA,OAAO,SAASJ,aAAaA,CAAAK,IAAA,EAGO;EAAA,IAHN;MAC5BC;IAEkB,CAAC,GAAAD,IAAA;IADhBE,KAAK,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAER,IAAMC,eAAe,GAAGZ,OAAO,CAC7B,MACEI,WAAW,CAACI,QAAQ,CAAC,CAACK,GAAG,CAACC,KAAK,IAC7BhB,eAAe,CAACgB,KAAK,EAAEb,QAAQ,CAAC,GAC9Ba,KAAK,gBAELR,IAAA,CAACL,QAAQ;IAAqBc,KAAK,EAAEC,MAAM,CAACF,KAAK,CAAE;IAAAN,QAAA,EAChDQ,MAAM,CAACF,KAAK;EAAC,GADDE,MAAM,CAACF,KAAK,CAEjB,CAEd,CAAC,EACH,CAACN,QAAQ,CACX,CAAC;EAED;IAAA;IACE;IACAF,IAAA,CAACH,qBAAqB,EAAAc,aAAA,CAAAA,aAAA,KAAKR,KAAK;MAAAD,QAAA,EAAGI;IAAe,EAAwB;EAAC;AAE/E;AAEA,eAAeV,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAkB,MAAM,WAAW,CAAC;AAGzD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;AAEhF,eAAO,MAAM,QAAQ;;;;;;;;;;mFAgCnB,CAAC"}
1
+ {"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAkB,MAAM,WAAW,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;AAEhF,eAAO,MAAM,QAAQ;;;;;;;;;;mFAgCnB,CAAC"}
@@ -10,8 +10,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
10
10
  import React from 'react';
11
11
  import { ComboBox as SpectrumComboBox } from '@adobe/react-spectrum';
12
12
  import cl from 'classnames';
13
+ import { useMergeRef } from '@deephaven/react-hooks';
13
14
  import { usePickerProps } from "../picker/index.js";
14
- import useMultiRef from "../picker/useMultiRef.js";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  export var ComboBox = /*#__PURE__*/React.forwardRef(function ComboBox(_ref, ref) {
17
17
  var {
@@ -26,7 +26,7 @@ export var ComboBox = /*#__PURE__*/React.forwardRef(function ComboBox(_ref, ref)
26
26
  ref: scrollRef
27
27
  } = _usePickerProps,
28
28
  comboBoxProps = _objectWithoutProperties(_usePickerProps, _excluded2);
29
- var pickerRef = useMultiRef(ref, scrollRef);
29
+ var pickerRef = useMergeRef(ref, scrollRef);
30
30
  return /*#__PURE__*/_jsx(SpectrumComboBox
31
31
  // eslint-disable-next-line react/jsx-props-no-spreading
32
32
  , _objectSpread(_objectSpread({}, comboBoxProps), {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","names":["React","ComboBox","SpectrumComboBox","cl","usePickerProps","useMultiRef","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","comboBoxProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"sourcesContent":["import React from 'react';\nimport {\n ComboBox as SpectrumComboBox,\n SpectrumComboBoxProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport type { NormalizedItem } from '../utils';\nimport { PickerPropsT, usePickerProps } from '../picker';\nimport useMultiRef from '../picker/useMultiRef';\n\nexport type ComboBoxProps = PickerPropsT<SpectrumComboBoxProps<NormalizedItem>>;\n\nexport const ComboBox = React.forwardRef(function ComboBox(\n { UNSAFE_className, ...props }: ComboBoxProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...comboBoxProps\n } = usePickerProps(props);\n const pickerRef = useMultiRef(ref, scrollRef);\n return (\n <SpectrumComboBox\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...comboBoxProps}\n UNSAFE_className={cl('dh-combobox', UNSAFE_className)}\n ref={pickerRef}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumComboBoxProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumComboBoxProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumComboBoxProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nComboBox.displayName = 'ComboBox';\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,IAAIC,gBAAgB,QAEvB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAAC,SAELC,cAAc;AAAA,OAC9BC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIlB,OAAO,IAAMN,QAAQ,gBAAGD,KAAK,CAACQ,UAAU,CAAC,SAASP,QAAQA,CAAAQ,IAAA,EAExDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAA0C,CAAC,GAAAF,IAAA;IAAtBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIX,cAAc,CAACQ,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,aAAa,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAElB,IAAMC,SAAS,GAAGjB,WAAW,CAACK,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACL;EACC;EAAA,EAAAqB,aAAA,CAAAA,aAAA,KACIH,aAAa;IACjBT,gBAAgB,EAAER,EAAE,CAAC,aAAa,EAAEQ,gBAAgB,CAAE;IACtDD,GAAG,EAAEY;IACL;IACA;IACA;IAAA;IACAN,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFjB,QAAQ,CAACuB,WAAW,GAAG,UAAU"}
1
+ {"version":3,"file":"ComboBox.js","names":["React","ComboBox","SpectrumComboBox","cl","useMergeRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","comboBoxProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"sourcesContent":["import React from 'react';\nimport {\n ComboBox as SpectrumComboBox,\n SpectrumComboBoxProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport { useMergeRef } from '@deephaven/react-hooks';\nimport type { NormalizedItem } from '../utils';\nimport { PickerPropsT, usePickerProps } from '../picker';\n\nexport type ComboBoxProps = PickerPropsT<SpectrumComboBoxProps<NormalizedItem>>;\n\nexport const ComboBox = React.forwardRef(function ComboBox(\n { UNSAFE_className, ...props }: ComboBoxProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...comboBoxProps\n } = usePickerProps(props);\n const pickerRef = useMergeRef(ref, scrollRef);\n return (\n <SpectrumComboBox\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...comboBoxProps}\n UNSAFE_className={cl('dh-combobox', UNSAFE_className)}\n ref={pickerRef}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumComboBoxProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumComboBoxProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumComboBoxProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nComboBox.displayName = 'ComboBox';\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,IAAIC,gBAAgB,QAEvB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,WAAW,QAAQ,wBAAwB;AAAC,SAE9BC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrC,OAAO,IAAMN,QAAQ,gBAAGD,KAAK,CAACQ,UAAU,CAAC,SAASP,QAAQA,CAAAQ,IAAA,EAExDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAA0C,CAAC,GAAAF,IAAA;IAAtBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,aAAa,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAElB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACL;EACC;EAAA,EAAAqB,aAAA,CAAAA,aAAA,KACIH,aAAa;IACjBT,gBAAgB,EAAER,EAAE,CAAC,aAAa,EAAEQ,gBAAgB,CAAE;IACtDD,GAAG,EAAEY;IACL;IACA;IACA;IAAA;IACAN,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFjB,QAAQ,CAACuB,WAAW,GAAG,UAAU"}
@@ -1,2 +1,6 @@
1
+ import { CalendarDate, CalendarDateTime, ZonedDateTime } from '@internationalized/date';
1
2
  export { Calendar, type SpectrumCalendarProps as CalendarProps, DateField, type SpectrumDateFieldProps as DateFieldProps, DatePicker, type SpectrumDatePickerProps as DatePickerProps, DateRangePicker, type SpectrumDateRangePickerProps as DateRangePickerProps, RangeCalendar, type SpectrumRangeCalendarProps as RangeCalendarProps, TimeField, type SpectrumTimeFieldProps as TimeFieldProps, } from '@adobe/react-spectrum';
3
+ export type { CalendarDate, CalendarDateTime, ZonedDateTime };
4
+ export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
5
+ export type MappedDateValue<T> = T extends ZonedDateTime ? ZonedDateTime : T extends CalendarDateTime ? CalendarDateTime : T extends CalendarDate ? CalendarDate : never;
2
6
  //# sourceMappingURL=dateAndTime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateAndTime.d.ts","sourceRoot":"","sources":["../../src/spectrum/dateAndTime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,qBAAqB,IAAI,aAAa,EAC3C,SAAS,EACT,KAAK,sBAAsB,IAAI,cAAc,EAC7C,UAAU,EACV,KAAK,uBAAuB,IAAI,eAAe,EAC/C,eAAe,EACf,KAAK,4BAA4B,IAAI,oBAAoB,EACzD,aAAa,EACb,KAAK,0BAA0B,IAAI,kBAAkB,EACrD,SAAS,EACT,KAAK,sBAAsB,IAAI,cAAc,GAC9C,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"dateAndTime.d.ts","sourceRoot":"","sources":["../../src/spectrum/dateAndTime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,QAAQ,EACR,KAAK,qBAAqB,IAAI,aAAa,EAC3C,SAAS,EACT,KAAK,sBAAsB,IAAI,cAAc,EAC7C,UAAU,EACV,KAAK,uBAAuB,IAAI,eAAe,EAC/C,eAAe,EACf,KAAK,4BAA4B,IAAI,oBAAoB,EACzD,aAAa,EACb,KAAK,0BAA0B,IAAI,kBAAkB,EACrD,SAAS,EACT,KAAK,sBAAsB,IAAI,cAAc,GAC9C,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC;AAG9D,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAGxE,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,GACpD,aAAa,GACb,CAAC,SAAS,gBAAgB,GAC1B,gBAAgB,GAChB,CAAC,SAAS,YAAY,GACtB,YAAY,GACZ,KAAK,CAAC"}
@@ -1,2 +1,6 @@
1
1
  export { Calendar, DateField, DatePicker, DateRangePicker, RangeCalendar, TimeField } from '@adobe/react-spectrum';
2
+
3
+ // This is the type for the DatePicker value
4
+
5
+ // This is the type for DatePicker onChange
2
6
  //# sourceMappingURL=dateAndTime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateAndTime.js","names":["Calendar","DateField","DatePicker","DateRangePicker","RangeCalendar","TimeField"],"sources":["../../src/spectrum/dateAndTime.ts"],"sourcesContent":["export {\n Calendar,\n type SpectrumCalendarProps as CalendarProps,\n DateField,\n type SpectrumDateFieldProps as DateFieldProps,\n DatePicker,\n type SpectrumDatePickerProps as DatePickerProps,\n DateRangePicker,\n type SpectrumDateRangePickerProps as DateRangePickerProps,\n RangeCalendar,\n type SpectrumRangeCalendarProps as RangeCalendarProps,\n TimeField,\n type SpectrumTimeFieldProps as TimeFieldProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,QAAQ,EAERC,SAAS,EAETC,UAAU,EAEVC,eAAe,EAEfC,aAAa,EAEbC,SAAS,QAEJ,uBAAuB"}
1
+ {"version":3,"file":"dateAndTime.js","names":["Calendar","DateField","DatePicker","DateRangePicker","RangeCalendar","TimeField"],"sources":["../../src/spectrum/dateAndTime.ts"],"sourcesContent":["import {\n CalendarDate,\n CalendarDateTime,\n ZonedDateTime,\n} from '@internationalized/date';\n\nexport {\n Calendar,\n type SpectrumCalendarProps as CalendarProps,\n DateField,\n type SpectrumDateFieldProps as DateFieldProps,\n DatePicker,\n type SpectrumDatePickerProps as DatePickerProps,\n DateRangePicker,\n type SpectrumDateRangePickerProps as DateRangePickerProps,\n RangeCalendar,\n type SpectrumRangeCalendarProps as RangeCalendarProps,\n TimeField,\n type SpectrumTimeFieldProps as TimeFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type { CalendarDate, CalendarDateTime, ZonedDateTime };\n\n// This is the type for the DatePicker value\nexport type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;\n\n// This is the type for DatePicker onChange\nexport type MappedDateValue<T> = T extends ZonedDateTime\n ? ZonedDateTime\n : T extends CalendarDateTime\n ? CalendarDateTime\n : T extends CalendarDate\n ? CalendarDate\n : never;\n"],"mappings":"AAMA,SACEA,QAAQ,EAERC,SAAS,EAETC,UAAU,EAEVC,eAAe,EAEfC,aAAa,EAEbC,SAAS,QAEJ,uBAAuB;;AAI9B;;AAGA"}
@@ -1,4 +1,4 @@
1
- export { Checkbox as SpectrumCheckbox, type SpectrumCheckboxProps, CheckboxGroup, type SpectrumCheckboxGroupProps as CheckboxGroupProps, Form, type SpectrumFormProps as FormProps, NumberField, type SpectrumNumberFieldProps as NumberFieldProps, Radio, RadioGroup, RangeSlider, type SpectrumRangeSliderProps as RangeSliderProps, SearchField, type SpectrumSearchFieldProps as SearchFieldProps, Slider, type SpectrumSliderProps as SliderProps, Switch, type SpectrumSwitchProps as SwitchProps, TextArea, TextField, type SpectrumTextFieldProps as TextFieldProps, } from '@adobe/react-spectrum';
1
+ export { Checkbox as SpectrumCheckbox, type SpectrumCheckboxProps, Form, type SpectrumFormProps as FormProps, NumberField, type SpectrumNumberFieldProps as NumberFieldProps, Radio, RadioGroup, RangeSlider, type SpectrumRangeSliderProps as RangeSliderProps, SearchField, type SpectrumSearchFieldProps as SearchFieldProps, Slider, type SpectrumSliderProps as SliderProps, Switch, type SpectrumSwitchProps as SwitchProps, TextArea, TextField, type SpectrumTextFieldProps as TextFieldProps, } from '@adobe/react-spectrum';
2
2
  export type { SpectrumRadioGroupProps as RadioGroupProps, SpectrumRadioProps as RadioProps, } from '@react-types/radio';
3
3
  export type { SpectrumTextAreaProps as TextAreaProps } from '@react-types/textfield';
4
4
  //# sourceMappingURL=forms.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/spectrum/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,gBAAgB,EAC5B,KAAK,qBAAqB,EAC1B,aAAa,EACb,KAAK,0BAA0B,IAAI,kBAAkB,EACrD,IAAI,EACJ,KAAK,iBAAiB,IAAI,SAAS,EACnC,WAAW,EACX,KAAK,wBAAwB,IAAI,gBAAgB,EACjD,KAAK,EACL,UAAU,EACV,WAAW,EACX,KAAK,wBAAwB,IAAI,gBAAgB,EACjD,WAAW,EACX,KAAK,wBAAwB,IAAI,gBAAgB,EACjD,MAAM,EACN,KAAK,mBAAmB,IAAI,WAAW,EACvC,MAAM,EACN,KAAK,mBAAmB,IAAI,WAAW,EACvC,QAAQ,EACR,SAAS,EACT,KAAK,sBAAsB,IAAI,cAAc,GAC9C,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,uBAAuB,IAAI,eAAe,EAC1C,kBAAkB,IAAI,UAAU,GACjC,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,qBAAqB,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/spectrum/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,gBAAgB,EAC5B,KAAK,qBAAqB,EAC1B,IAAI,EACJ,KAAK,iBAAiB,IAAI,SAAS,EACnC,WAAW,EACX,KAAK,wBAAwB,IAAI,gBAAgB,EACjD,KAAK,EACL,UAAU,EACV,WAAW,EACX,KAAK,wBAAwB,IAAI,gBAAgB,EACjD,WAAW,EACX,KAAK,wBAAwB,IAAI,gBAAgB,EACjD,MAAM,EACN,KAAK,mBAAmB,IAAI,WAAW,EACvC,MAAM,EACN,KAAK,mBAAmB,IAAI,WAAW,EACvC,QAAQ,EACR,SAAS,EACT,KAAK,sBAAsB,IAAI,cAAc,GAC9C,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,uBAAuB,IAAI,eAAe,EAC1C,kBAAkB,IAAI,UAAU,GACjC,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,qBAAqB,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { Checkbox as SpectrumCheckbox, CheckboxGroup, Form, NumberField, Radio, RadioGroup, RangeSlider, SearchField, Slider, Switch, TextArea, TextField } from '@adobe/react-spectrum';
1
+ export { Checkbox as SpectrumCheckbox, Form, NumberField, Radio, RadioGroup, RangeSlider, SearchField, Slider, Switch, TextArea, TextField } from '@adobe/react-spectrum';
2
2
 
3
3
  // @react-types/textfield is unecessary if https://github.com/adobe/react-spectrum/pull/6090 merge
4
4
  //# sourceMappingURL=forms.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"forms.js","names":["Checkbox","SpectrumCheckbox","CheckboxGroup","Form","NumberField","Radio","RadioGroup","RangeSlider","SearchField","Slider","Switch","TextArea","TextField"],"sources":["../../src/spectrum/forms.ts"],"sourcesContent":["export {\n Checkbox as SpectrumCheckbox,\n type SpectrumCheckboxProps,\n CheckboxGroup,\n type SpectrumCheckboxGroupProps as CheckboxGroupProps,\n Form,\n type SpectrumFormProps as FormProps,\n NumberField,\n type SpectrumNumberFieldProps as NumberFieldProps,\n Radio,\n RadioGroup,\n RangeSlider,\n type SpectrumRangeSliderProps as RangeSliderProps,\n SearchField,\n type SpectrumSearchFieldProps as SearchFieldProps,\n Slider,\n type SpectrumSliderProps as SliderProps,\n Switch,\n type SpectrumSwitchProps as SwitchProps,\n TextArea,\n TextField,\n type SpectrumTextFieldProps as TextFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type {\n SpectrumRadioGroupProps as RadioGroupProps,\n SpectrumRadioProps as RadioProps,\n} from '@react-types/radio';\n\n// @react-types/textfield is unecessary if https://github.com/adobe/react-spectrum/pull/6090 merge\nexport type { SpectrumTextAreaProps as TextAreaProps } from '@react-types/textfield';\n"],"mappings":"AAAA,SACEA,QAAQ,IAAIC,gBAAgB,EAE5BC,aAAa,EAEbC,IAAI,EAEJC,WAAW,EAEXC,KAAK,EACLC,UAAU,EACVC,WAAW,EAEXC,WAAW,EAEXC,MAAM,EAENC,MAAM,EAENC,QAAQ,EACRC,SAAS,QAEJ,uBAAuB;;AAO9B"}
1
+ {"version":3,"file":"forms.js","names":["Checkbox","SpectrumCheckbox","Form","NumberField","Radio","RadioGroup","RangeSlider","SearchField","Slider","Switch","TextArea","TextField"],"sources":["../../src/spectrum/forms.ts"],"sourcesContent":["export {\n Checkbox as SpectrumCheckbox,\n type SpectrumCheckboxProps,\n Form,\n type SpectrumFormProps as FormProps,\n NumberField,\n type SpectrumNumberFieldProps as NumberFieldProps,\n Radio,\n RadioGroup,\n RangeSlider,\n type SpectrumRangeSliderProps as RangeSliderProps,\n SearchField,\n type SpectrumSearchFieldProps as SearchFieldProps,\n Slider,\n type SpectrumSliderProps as SliderProps,\n Switch,\n type SpectrumSwitchProps as SwitchProps,\n TextArea,\n TextField,\n type SpectrumTextFieldProps as TextFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type {\n SpectrumRadioGroupProps as RadioGroupProps,\n SpectrumRadioProps as RadioProps,\n} from '@react-types/radio';\n\n// @react-types/textfield is unecessary if https://github.com/adobe/react-spectrum/pull/6090 merge\nexport type { SpectrumTextAreaProps as TextAreaProps } from '@react-types/textfield';\n"],"mappings":"AAAA,SACEA,QAAQ,IAAIC,gBAAgB,EAE5BC,IAAI,EAEJC,WAAW,EAEXC,KAAK,EACLC,UAAU,EACVC,WAAW,EAEXC,WAAW,EAEXC,MAAM,EAENC,MAAM,EAENC,QAAQ,EACRC,SAAS,QAEJ,uBAAuB;;AAO9B"}
@@ -25,6 +25,7 @@ export * from './picker';
25
25
  export * from './Heading';
26
26
  export * from './Text';
27
27
  export * from './View';
28
+ export * from './CheckboxGroup';
28
29
  /**
29
30
  * Custom DH spectrum utils
30
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spectrum/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB;;GAEG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spectrum/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAEhC;;GAEG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
@@ -25,6 +25,7 @@ export * from "./picker/index.js";
25
25
  export * from "./Heading.js";
26
26
  export * from "./Text.js";
27
27
  export * from "./View.js";
28
+ export * from "./CheckboxGroup.js";
28
29
  /**
29
30
  * Custom DH spectrum utils
30
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/spectrum/index.ts"],"sourcesContent":["/**\n * Re-exporting React Spectrum components + props.\n */\nexport * from './buttons';\nexport * from './collections';\nexport * from './content';\nexport * from './dateAndTime';\nexport * from './forms';\nexport * from './icons';\nexport * from './layout';\nexport * from './navigation';\nexport * from './overlays';\nexport * from './shared';\nexport * from './status';\n\n/**\n * Custom DH components wrapping React Spectrum components.\n */\nexport * from './ActionMenu';\nexport * from './ActionGroup';\nexport * from './comboBox';\nexport * from './ListActionGroup';\nexport * from './ListActionMenu';\nexport * from './listView';\nexport * from './picker';\nexport * from './Heading';\nexport * from './Text';\nexport * from './View';\n\n/**\n * Custom DH spectrum utils\n */\nexport * from './ItemContent';\nexport * from './ItemTooltip';\nexport * from './utils';\n"],"mappings":"AAAA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA;AACA;AACA;AAFA;AAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/spectrum/index.ts"],"sourcesContent":["/**\n * Re-exporting React Spectrum components + props.\n */\nexport * from './buttons';\nexport * from './collections';\nexport * from './content';\nexport * from './dateAndTime';\nexport * from './forms';\nexport * from './icons';\nexport * from './layout';\nexport * from './navigation';\nexport * from './overlays';\nexport * from './shared';\nexport * from './status';\n\n/**\n * Custom DH components wrapping React Spectrum components.\n */\nexport * from './ActionMenu';\nexport * from './ActionGroup';\nexport * from './comboBox';\nexport * from './ListActionGroup';\nexport * from './ListActionMenu';\nexport * from './listView';\nexport * from './picker';\nexport * from './Heading';\nexport * from './Text';\nexport * from './View';\nexport * from './CheckboxGroup';\n\n/**\n * Custom DH spectrum utils\n */\nexport * from './ItemContent';\nexport * from './ItemTooltip';\nexport * from './utils';\n"],"mappings":"AAAA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;mFAgCjB,CAAC;AAGH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI/C;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;mFAgCjB,CAAC;AAGH,eAAe,MAAM,CAAC"}
@@ -10,7 +10,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
10
10
  import { Picker as SpectrumPicker } from '@adobe/react-spectrum';
11
11
  import cl from 'classnames';
12
12
  import React from 'react';
13
- import useMultiRef from "./useMultiRef.js";
13
+ import { useMergeRef } from '@deephaven/react-hooks';
14
14
  import { usePickerProps } from "./usePickerProps.js";
15
15
  /**
16
16
  * Picker component for selecting items from a list of items. Items can be
@@ -33,7 +33,7 @@ export var Picker = /*#__PURE__*/React.forwardRef(function Picker(_ref, ref) {
33
33
  ref: scrollRef
34
34
  } = _usePickerProps,
35
35
  pickerProps = _objectWithoutProperties(_usePickerProps, _excluded2);
36
- var pickerRef = useMultiRef(ref, scrollRef);
36
+ var pickerRef = useMergeRef(ref, scrollRef);
37
37
  return /*#__PURE__*/_jsx(SpectrumPicker
38
38
  // eslint-disable-next-line react/jsx-props-no-spreading
39
39
  , _objectSpread(_objectSpread({}, pickerProps), {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"Picker.js","names":["Picker","SpectrumPicker","cl","React","useMultiRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","pickerProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/picker/Picker.tsx"],"sourcesContent":["import {\n Picker as SpectrumPicker,\n SpectrumPickerProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport React from 'react';\nimport type { NormalizedItem } from '../utils';\nimport type { PickerProps } from './PickerProps';\nimport useMultiRef from './useMultiRef';\nimport { usePickerProps } from './usePickerProps';\n\n/**\n * Picker component for selecting items from a list of items. Items can be\n * provided via the `children` prop. Each item can be a string,\tnumber, boolean,\n * or a Spectrum <Item> element. The remaining props are just\tpass through props\n * for the Spectrum Picker component.\n * See https://react-spectrum.adobe.com/react-spectrum/Picker.html\n */\nexport const Picker = React.forwardRef(function Picker(\n { UNSAFE_className, ...props }: PickerProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...pickerProps\n } = usePickerProps(props);\n const pickerRef = useMultiRef(ref, scrollRef);\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n ref={pickerRef}\n UNSAFE_className={cl('dh-picker', UNSAFE_className)}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumPickerProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumPickerProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumPickerProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nPicker.displayName = 'Picker';\n\nexport default Picker;\n"],"mappings":";;;;;;;;;AAAA,SACEA,MAAM,IAAIC,cAAc,QAEnB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,KAAK,MAAM,OAAO;AAAC,OAGnBC,WAAW;AAAA,SACTC,cAAc;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA;AAOA,OAAO,IAAMP,MAAM,gBAAGG,KAAK,CAACK,UAAU,CAAC,SAASR,MAAMA,CAAAS,IAAA,EAEpDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAAwC,CAAC,GAAAF,IAAA;IAApBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,WAAW,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAEhB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACN;EACC;EAAA,EAAAsB,aAAA,CAAAA,aAAA,KACIH,WAAW;IACfV,GAAG,EAAEY,SAAU;IACfX,gBAAgB,EAAET,EAAE,CAAC,WAAW,EAAES,gBAAgB;IAClD;IACA;IACA;IAAA;IACAK,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFlB,MAAM,CAACwB,WAAW,GAAG,QAAQ;AAE7B,eAAexB,MAAM"}
1
+ {"version":3,"file":"Picker.js","names":["Picker","SpectrumPicker","cl","React","useMergeRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","pickerProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/picker/Picker.tsx"],"sourcesContent":["import {\n Picker as SpectrumPicker,\n SpectrumPickerProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport React from 'react';\nimport { useMergeRef } from '@deephaven/react-hooks';\nimport type { NormalizedItem } from '../utils';\nimport type { PickerProps } from './PickerProps';\nimport { usePickerProps } from './usePickerProps';\n\n/**\n * Picker component for selecting items from a list of items. Items can be\n * provided via the `children` prop. Each item can be a string,\tnumber, boolean,\n * or a Spectrum <Item> element. The remaining props are just\tpass through props\n * for the Spectrum Picker component.\n * See https://react-spectrum.adobe.com/react-spectrum/Picker.html\n */\nexport const Picker = React.forwardRef(function Picker(\n { UNSAFE_className, ...props }: PickerProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...pickerProps\n } = usePickerProps(props);\n const pickerRef = useMergeRef(ref, scrollRef);\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n ref={pickerRef}\n UNSAFE_className={cl('dh-picker', UNSAFE_className)}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumPickerProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumPickerProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumPickerProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nPicker.displayName = 'Picker';\n\nexport default Picker;\n"],"mappings":";;;;;;;;;AAAA,SACEA,MAAM,IAAIC,cAAc,QAEnB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,wBAAwB;AAAC,SAG5CC,cAAc;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA;AAOA,OAAO,IAAMP,MAAM,gBAAGG,KAAK,CAACK,UAAU,CAAC,SAASR,MAAMA,CAAAS,IAAA,EAEpDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAAwC,CAAC,GAAAF,IAAA;IAApBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,WAAW,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAEhB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACN;EACC;EAAA,EAAAsB,aAAA,CAAAA,aAAA,KACIH,WAAW;IACfV,GAAG,EAAEY,SAAU;IACfX,gBAAgB,EAAET,EAAE,CAAC,WAAW,EAAES,gBAAgB;IAClD;IACA;IACA;IAAA;IACAK,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFlB,MAAM,CAACwB,WAAW,GAAG,QAAQ;AAE7B,eAAexB,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/components",
3
- "version": "0.85.10",
3
+ "version": "0.85.11",
4
4
  "description": "Deephaven React component library",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -27,10 +27,11 @@
27
27
  "@adobe/react-spectrum": "3.35.1",
28
28
  "@deephaven/icons": "^0.85.0",
29
29
  "@deephaven/log": "^0.85.0",
30
- "@deephaven/react-hooks": "^0.85.2",
30
+ "@deephaven/react-hooks": "^0.85.11",
31
31
  "@deephaven/utils": "^0.85.2",
32
32
  "@fortawesome/fontawesome-svg-core": "^6.2.1",
33
33
  "@fortawesome/react-fontawesome": "^0.2.0",
34
+ "@internationalized/date": "^3.5.5",
34
35
  "@react-spectrum/theme-default": "^3.5.1",
35
36
  "@react-spectrum/utils": "^3.11.5",
36
37
  "@react-types/radio": "^3.8.1",
@@ -70,5 +71,5 @@
70
71
  "publishConfig": {
71
72
  "access": "public"
72
73
  },
73
- "gitHead": "cc67bce0a9f8b38c71e949823725fd2bee61f1b7"
74
+ "gitHead": "674ab3288ff6c5d02f9a4b5075a5336cf28bac1f"
74
75
  }
@@ -1,9 +0,0 @@
1
- import { Ref, RefCallback } from 'react';
2
- /**
3
- * Takes in multiple refs and then returns one ref that can be assigned to the component.
4
- * In turn all the refs passed in will be assigned when the ref returned is assigned.
5
- * @param refs The refs to assign
6
- */
7
- declare function useMultiRef<T>(...refs: readonly Ref<T>[]): RefCallback<T>;
8
- export default useMultiRef;
9
- //# sourceMappingURL=useMultiRef.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMultiRef.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/useMultiRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,GAAG,EAAE,WAAW,EAAe,MAAM,OAAO,CAAC;AAExE;;;;GAIG;AACH,iBAAS,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAYlE;AAED,eAAe,WAAW,CAAC"}
@@ -1,25 +0,0 @@
1
- import { useCallback } from 'react';
2
-
3
- /**
4
- * Takes in multiple refs and then returns one ref that can be assigned to the component.
5
- * In turn all the refs passed in will be assigned when the ref returned is assigned.
6
- * @param refs The refs to assign
7
- */
8
- function useMultiRef() {
9
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
10
- refs[_key] = arguments[_key];
11
- }
12
- return useCallback(newRef => {
13
- refs.forEach(ref => {
14
- if (typeof ref === 'function') {
15
- ref(newRef);
16
- } else if (ref != null) {
17
- // eslint-disable-next-line no-param-reassign
18
- ref.current = newRef;
19
- }
20
- });
21
- // eslint-disable-next-line react-hooks/exhaustive-deps
22
- }, refs);
23
- }
24
- export default useMultiRef;
25
- //# sourceMappingURL=useMultiRef.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMultiRef.js","names":["useCallback","useMultiRef","_len","arguments","length","refs","Array","_key","newRef","forEach","ref","current"],"sources":["../../../src/spectrum/picker/useMultiRef.ts"],"sourcesContent":["import { MutableRefObject, Ref, RefCallback, useCallback } from 'react';\n\n/**\n * Takes in multiple refs and then returns one ref that can be assigned to the component.\n * In turn all the refs passed in will be assigned when the ref returned is assigned.\n * @param refs The refs to assign\n */\nfunction useMultiRef<T>(...refs: readonly Ref<T>[]): RefCallback<T> {\n return useCallback(newRef => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(newRef);\n } else if (ref != null) {\n // eslint-disable-next-line no-param-reassign\n (ref as MutableRefObject<T | null>).current = newRef;\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\nexport default useMultiRef;\n"],"mappings":"AAAA,SAA6CA,WAAW,QAAQ,OAAO;;AAEvE;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAA,EAAgD;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAzCC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EAC7B,OAAOP,WAAW,CAACQ,MAAM,IAAI;IAC3BH,IAAI,CAACI,OAAO,CAACC,GAAG,IAAI;MAClB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC7BA,GAAG,CAACF,MAAM,CAAC;MACb,CAAC,MAAM,IAAIE,GAAG,IAAI,IAAI,EAAE;QACtB;QACCA,GAAG,CAAgCC,OAAO,GAAGH,MAAM;MACtD;IACF,CAAC,CAAC;IACF;EACF,CAAC,EAAEH,IAAI,CAAC;AACV;AAEA,eAAeJ,WAAW"}