@deephaven/components 0.90.0 → 0.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BulkActionBar.d.ts.map +1 -1
- package/dist/BulkActionBar.js +1 -1
- package/dist/BulkActionBar.js.map +1 -1
- package/dist/SearchableCombobox.d.ts +1 -1
- package/dist/SearchableCombobox.d.ts.map +1 -1
- package/dist/SearchableCombobox.js +2 -2
- package/dist/SearchableCombobox.js.map +1 -1
- package/dist/TableViewEmptyState.d.ts.map +1 -1
- package/dist/TableViewEmptyState.js +1 -1
- package/dist/TableViewEmptyState.js.map +1 -1
- package/dist/actions/IconActionButton.d.ts +2 -2
- package/dist/actions/IconActionButton.d.ts.map +1 -1
- package/dist/actions/IconActionButton.js +1 -1
- package/dist/actions/IconActionButton.js.map +1 -1
- package/dist/dialogs/ActionButtonDialogTrigger.d.ts.map +1 -1
- package/dist/dialogs/ActionButtonDialogTrigger.js +1 -2
- package/dist/dialogs/ActionButtonDialogTrigger.js.map +1 -1
- package/dist/dialogs/ConfirmationDialog.d.ts.map +1 -1
- package/dist/dialogs/ConfirmationDialog.js +3 -4
- package/dist/dialogs/ConfirmationDialog.js.map +1 -1
- package/dist/spectrum/comboBox/ComboBox.d.ts +2 -1
- package/dist/spectrum/comboBox/ComboBox.d.ts.map +1 -1
- package/dist/spectrum/comboBox/ComboBox.js +1 -0
- package/dist/spectrum/comboBox/ComboBox.js.map +1 -1
- package/dist/theme/ThemeUtils.d.ts.map +1 -1
- package/dist/theme/ThemeUtils.js +5 -10
- package/dist/theme/ThemeUtils.js.map +1 -1
- package/dist/theme/colorUtils.d.ts +1 -0
- package/dist/theme/colorUtils.d.ts.map +1 -1
- package/dist/theme/colorUtils.js +1 -0
- package/dist/theme/colorUtils.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkActionBar.d.ts","sourceRoot":"","sources":["../src/BulkActionBar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"BulkActionBar.d.ts","sourceRoot":"","sources":["../src/BulkActionBar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,EAAE,KAAK,GAAG,MAAM,CAAC;IAClC,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAalC;AAED,eAAe,aAAa,CAAC"}
|
package/dist/BulkActionBar.js
CHANGED
|
@@ -3,7 +3,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
3
3
|
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; }
|
|
4
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
5
|
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); }
|
|
6
|
-
import { ActionBar } from
|
|
6
|
+
import { ActionBar } from "./spectrum/index.js";
|
|
7
7
|
import commonStyles from "./SpectrumComponent.module.css";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export function BulkActionBar(_ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkActionBar.js","names":["ActionBar","commonStyles","jsx","_jsx","BulkActionBar","_ref","styleProps","selectedItemCount","onClearSelection","_objectSpread","UNSAFE_className","spectrumActionBar","isEmphasized"],"sources":["../src/BulkActionBar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"BulkActionBar.js","names":["ActionBar","commonStyles","jsx","_jsx","BulkActionBar","_ref","styleProps","selectedItemCount","onClearSelection","_objectSpread","UNSAFE_className","spectrumActionBar","isEmphasized"],"sources":["../src/BulkActionBar.tsx"],"sourcesContent":["import type { StyleProps } from '@react-types/shared';\nimport { ActionBar } from './spectrum';\nimport commonStyles from './SpectrumComponent.module.scss';\n\nexport interface BulkActionBarProps {\n styleProps?: StyleProps;\n selectedItemCount: 'all' | number;\n onClearSelection: () => void;\n}\n\nexport function BulkActionBar({\n styleProps,\n selectedItemCount,\n onClearSelection,\n}: BulkActionBarProps): JSX.Element {\n return (\n <ActionBar\n UNSAFE_className={commonStyles.spectrumActionBar}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...styleProps}\n isEmphasized\n selectedItemCount={selectedItemCount}\n onClearSelection={onClearSelection}\n >\n {/* */}\n </ActionBar>\n );\n}\n\nexport default BulkActionBar;\n"],"mappings":";;;;;SACSA,SAAS;AAAA,OACXC,YAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQnB,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAIO;EAAA,IAJN;IAC5BC,UAAU;IACVC,iBAAiB;IACjBC;EACkB,CAAC,GAAAH,IAAA;EACnB,oBACEF,IAAA,CAACH,SAAS,EAAAS,aAAA,CAAAA,aAAA;IACRC,gBAAgB,EAAET,YAAY,CAACU;IAC/B;EAAA,GACIL,UAAU;IACdM,YAAY;IACZL,iBAAiB,EAAEA,iBAAkB;IACrCC,gBAAgB,EAAEA;EAAiB,EAG1B,CAAC;AAEhB;AAEA,eAAeJ,aAAa"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Key } from 'react';
|
|
2
|
-
import { SpectrumComboBoxProps } from '@adobe/react-spectrum';
|
|
3
2
|
import type { DOMRefValue } from '@react-types/shared';
|
|
3
|
+
import { SpectrumComboBoxProps } from './spectrum';
|
|
4
4
|
export interface SearchableComboboxProps<TItem, TKey extends Key> extends Omit<SpectrumComboBoxProps<TItem>, 'children' | 'menuTrigger' | 'onSelectionChange'> {
|
|
5
5
|
getItemDisplayText: (item: TItem | null | undefined) => string | null;
|
|
6
6
|
getKey: (item: TItem | null | undefined) => TKey | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchableCombobox.d.ts","sourceRoot":"","sources":["../src/SearchableCombobox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAe,MAAM,OAAO,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchableCombobox.d.ts","sourceRoot":"","sources":["../src/SearchableCombobox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAe,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAA0B,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAG3E,MAAM,WAAW,uBAAuB,CAAC,KAAK,EAAE,IAAI,SAAS,GAAG,CAC9D,SAAQ,IAAI,CACV,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,GAAG,aAAa,GAAG,mBAAmB,CACjD;IACD,kBAAkB,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,KAAK,MAAM,GAAG,IAAI,CAAC;IACtE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,GAAG,IAAI,CAAC;IACxD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,iBAAiB,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CAC/C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,IAAI,SAAS,GAAG,EAAE,EAC1D,SAAS,EACT,kBAAkB,EAClB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC,OAAO,CA4BpD;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,7 +8,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
8
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
9
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
10
10
|
import { useCallback } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import { SpectrumComboBox, Item } from "./spectrum/index.js";
|
|
12
12
|
import TextWithTooltip from "./TextWithTooltip.js";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export function SearchableCombobox(_ref) {
|
|
@@ -28,7 +28,7 @@ export function SearchableCombobox(_ref) {
|
|
|
28
28
|
})
|
|
29
29
|
}, key);
|
|
30
30
|
}, [getItemDisplayText, getKey]);
|
|
31
|
-
return /*#__PURE__*/_jsx(
|
|
31
|
+
return /*#__PURE__*/_jsx(SpectrumComboBox, _objectSpread(_objectSpread({}, props), {}, {
|
|
32
32
|
// The `ref`prop type defined by React Spectrum is incorrect here
|
|
33
33
|
ref: scrollRef,
|
|
34
34
|
menuTrigger: "focus"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchableCombobox.js","names":["useCallback","
|
|
1
|
+
{"version":3,"file":"SearchableCombobox.js","names":["useCallback","SpectrumComboBox","Item","TextWithTooltip","jsx","_jsx","SearchableCombobox","_ref","scrollRef","getItemDisplayText","getKey","props","_objectWithoutProperties","_excluded","renderItem","item","key","displayText","textValue","String","children","text","_objectSpread","ref","menuTrigger","onSelectionChange"],"sources":["../src/SearchableCombobox.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { Key, useCallback } from 'react';\nimport type { DOMRefValue, FocusableRef } from '@react-types/shared';\nimport { SpectrumComboBox, Item, SpectrumComboBoxProps } from './spectrum';\nimport TextWithTooltip from './TextWithTooltip';\n\nexport interface SearchableComboboxProps<TItem, TKey extends Key>\n extends Omit<\n SpectrumComboBoxProps<TItem>,\n 'children' | 'menuTrigger' | 'onSelectionChange'\n > {\n getItemDisplayText: (item: TItem | null | undefined) => string | null;\n getKey: (item: TItem | null | undefined) => TKey | null;\n scrollRef: React.RefObject<DOMRefValue>;\n onSelectionChange: (key: TKey | null) => void;\n}\n\nexport function SearchableCombobox<TItem, TKey extends Key>({\n scrollRef,\n getItemDisplayText,\n getKey,\n ...props\n}: SearchableComboboxProps<TItem, TKey>): JSX.Element {\n const renderItem = useCallback(\n item => {\n const key = getKey(item);\n const displayText = getItemDisplayText(item);\n\n return (\n <Item key={key} textValue={displayText ?? String(key)}>\n <TextWithTooltip text={displayText} />\n </Item>\n );\n },\n [getItemDisplayText, getKey]\n );\n\n return (\n <SpectrumComboBox\n {...props}\n // The `ref`prop type defined by React Spectrum is incorrect here\n ref={scrollRef as unknown as FocusableRef<HTMLElement>}\n menuTrigger=\"focus\"\n // Type assertion is necessary since <ComboBox> types don't recognize the\n // generic key arg\n onSelectionChange={props.onSelectionChange as (key: Key | null) => void}\n >\n {renderItem}\n </SpectrumComboBox>\n );\n}\n\nexport default SearchableCombobox;\n"],"mappings":";;;;;;;;AAAA;AACA,SAAcA,WAAW,QAAQ,OAAO;AAAC,SAEhCC,gBAAgB,EAAEC,IAAI;AAAA,OACxBC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAatB,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAKoB;EAAA,IALM;MAC1DC,SAAS;MACTC,kBAAkB;MAClBC;IAEoC,CAAC,GAAAH,IAAA;IADlCI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAER,IAAMC,UAAU,GAAGd,WAAW,CAC5Be,IAAI,IAAI;IACN,IAAMC,GAAG,GAAGN,MAAM,CAACK,IAAI,CAAC;IACxB,IAAME,WAAW,GAAGR,kBAAkB,CAACM,IAAI,CAAC;IAE5C,oBACEV,IAAA,CAACH,IAAI;MAAWgB,SAAS,EAAED,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAIE,MAAM,CAACH,GAAG,CAAE;MAAAI,QAAA,eACpDf,IAAA,CAACF,eAAe;QAACkB,IAAI,EAAEJ;MAAY,CAAE;IAAC,GAD7BD,GAEL,CAAC;EAEX,CAAC,EACD,CAACP,kBAAkB,EAAEC,MAAM,CAC7B,CAAC;EAED,oBACEL,IAAA,CAACJ,gBAAgB,EAAAqB,aAAA,CAAAA,aAAA,KACXX,KAAK;IACT;IACAY,GAAG,EAAEf,SAAkD;IACvDgB,WAAW,EAAC;IACZ;IACA;IAAA;IACAC,iBAAiB,EAAEd,KAAK,CAACc,iBAA+C;IAAAL,QAAA,EAEvEN;EAAU,EACK,CAAC;AAEvB;AAEA,eAAeR,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableViewEmptyState.d.ts","sourceRoot":"","sources":["../src/TableViewEmptyState.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TableViewEmptyState.d.ts","sourceRoot":"","sources":["../src/TableViewEmptyState.tsx"],"names":[],"mappings":";AAOA,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,OAAO,EACP,OAA0B,GAC3B,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAuB/C;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import { Content, Heading, Icon, IllustratedMessage } from '@adobe/react-spectrum';
|
|
4
3
|
import { vsEmptyWindow } from '@deephaven/icons';
|
|
4
|
+
import { Content, Heading, Icon, IllustratedMessage } from "./spectrum/index.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
var DEFAULT_DELAY_MS = 500;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableViewEmptyState.js","names":["useEffect","useState","FontAwesomeIcon","Content","Heading","Icon","IllustratedMessage","
|
|
1
|
+
{"version":3,"file":"TableViewEmptyState.js","names":["useEffect","useState","FontAwesomeIcon","vsEmptyWindow","Content","Heading","Icon","IllustratedMessage","jsx","_jsx","jsxs","_jsxs","DEFAULT_DELAY_MS","TableViewEmptyState","_ref","heading","content","delayMs","show","setShow","window","setTimeout","children","size","icon"],"sources":["../src/TableViewEmptyState.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { vsEmptyWindow } from '@deephaven/icons';\nimport { Content, Heading, Icon, IllustratedMessage } from './spectrum';\n\nconst DEFAULT_DELAY_MS = 500;\n\nexport interface TableViewEmptyStateProps {\n heading: string;\n content?: string;\n delayMs?: number;\n}\n\nexport function TableViewEmptyState({\n heading,\n content,\n delayMs = DEFAULT_DELAY_MS,\n}: TableViewEmptyStateProps): JSX.Element | null {\n const [show, setShow] = useState(false);\n\n // Spectrum `TableView` will render the result of `renderEmptyState` prop\n // immediately, and it will be hidden once data loads. In cases where the data\n // load is quick, there is a jarring flicker, and the empty data message is\n // not helpful. This delay will avoid showing the message if data loads within\n // the `delayMs`.\n useEffect(() => {\n window.setTimeout(() => {\n setShow(true);\n }, delayMs);\n }, [delayMs]);\n\n return show ? (\n <IllustratedMessage>\n <Icon size=\"XXL\">\n <FontAwesomeIcon icon={vsEmptyWindow} />\n </Icon>\n <Heading>{heading}</Heading>\n {content == null ? null : <Content>{content}</Content>}\n </IllustratedMessage>\n ) : null;\n}\n\nexport default TableViewEmptyState;\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,aAAa,QAAQ,kBAAkB;AAAC,SACxCC,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEnD,IAAMC,gBAAgB,GAAG,GAAG;AAQ5B,OAAO,SAASC,mBAAmBA,CAAAC,IAAA,EAIc;EAAA,IAJb;IAClCC,OAAO;IACPC,OAAO;IACPC,OAAO,GAAGL;EACc,CAAC,GAAAE,IAAA;EACzB,IAAM,CAACI,IAAI,EAAEC,OAAO,CAAC,GAAGlB,QAAQ,CAAC,KAAK,CAAC;;EAEvC;EACA;EACA;EACA;EACA;EACAD,SAAS,CAAC,MAAM;IACdoB,MAAM,CAACC,UAAU,CAAC,MAAM;MACtBF,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,EAAEF,OAAO,CAAC;EACb,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAOC,IAAI,gBACTP,KAAA,CAACJ,kBAAkB;IAAAe,QAAA,gBACjBb,IAAA,CAACH,IAAI;MAACiB,IAAI,EAAC,KAAK;MAAAD,QAAA,eACdb,IAAA,CAACP,eAAe;QAACsB,IAAI,EAAErB;MAAc,CAAE;IAAC,CACpC,CAAC,eACPM,IAAA,CAACJ,OAAO;MAAAiB,QAAA,EAAEP;IAAO,CAAU,CAAC,EAC3BC,OAAO,IAAI,IAAI,GAAG,IAAI,gBAAGP,IAAA,CAACL,OAAO;MAAAkB,QAAA,EAAEN;IAAO,CAAU,CAAC;EAAA,CACpC,CAAC,GACnB,IAAI;AACV;AAEA,eAAeH,mBAAmB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SpectrumActionButtonProps } from '@adobe/react-spectrum';
|
|
3
2
|
import type { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
-
|
|
3
|
+
import { ActionButtonProps } from '../spectrum';
|
|
4
|
+
export interface IconActionButtonProps extends Omit<ActionButtonProps, 'aria-label' | 'isQuiet' | 'height'> {
|
|
5
5
|
icon: IconProp;
|
|
6
6
|
label: string;
|
|
7
7
|
tooltip?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconActionButton.d.ts","sourceRoot":"","sources":["../../src/actions/IconActionButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"IconActionButton.d.ts","sourceRoot":"","sources":["../../src/actions/IconActionButton.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAsB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIpE,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;IACpE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAkBrC;yBAvBe,gBAAgB;;;AA0BhC,eAAe,gBAAgB,CAAC"}
|
|
@@ -7,8 +7,8 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
7
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
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
9
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
10
|
-
import { ActionButton, Icon } from '@adobe/react-spectrum';
|
|
11
10
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
11
|
+
import { ActionButton, Icon } from "../spectrum/index.js";
|
|
12
12
|
import { Tooltip } from "../popper/index.js";
|
|
13
13
|
import { ACTION_ICON_HEIGHT } from "../UIConstants.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconActionButton.js","names":["
|
|
1
|
+
{"version":3,"file":"IconActionButton.js","names":["FontAwesomeIcon","ActionButton","Icon","Tooltip","ACTION_ICON_HEIGHT","jsx","_jsx","jsxs","_jsxs","IconActionButton","_ref","icon","label","tooltip","props","_objectWithoutProperties","_excluded","_objectSpread","isQuiet","height","children","UNSAFE_className","undefined","displayName"],"sources":["../../src/actions/IconActionButton.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport type { IconProp } from '@fortawesome/fontawesome-svg-core';\nimport { ActionButton, Icon, ActionButtonProps } from '../spectrum';\nimport { Tooltip } from '../popper';\nimport { ACTION_ICON_HEIGHT } from '../UIConstants';\n\nexport interface IconActionButtonProps\n extends Omit<ActionButtonProps, 'aria-label' | 'isQuiet' | 'height'> {\n icon: IconProp;\n label: string;\n tooltip?: string;\n}\n\nexport function IconActionButton({\n icon,\n label,\n tooltip,\n ...props\n}: IconActionButtonProps): JSX.Element {\n return (\n <ActionButton\n {...props}\n aria-label={label}\n isQuiet\n height={ACTION_ICON_HEIGHT}\n >\n <Icon\n UNSAFE_className={\n tooltip == null ? undefined : 'action-button-icon-with-tooltip'\n }\n >\n <FontAwesomeIcon icon={icon} />\n </Icon>\n {tooltip == null ? null : <Tooltip>{tooltip}</Tooltip>}\n </ActionButton>\n );\n}\nIconActionButton.displayName = 'IconActionButton';\n\nexport default IconActionButton;\n"],"mappings":";;;;;;;;AAAA;AACA,SAASA,eAAe,QAAQ,gCAAgC;AAAC,SAExDC,YAAY,EAAEC,IAAI;AAAA,SAClBC,OAAO;AAAA,SACPC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAS3B,OAAO,SAASC,gBAAgBA,CAAAC,IAAA,EAKO;EAAA,IALN;MAC/BC,IAAI;MACJC,KAAK;MACLC;IAEqB,CAAC,GAAAH,IAAA;IADnBI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAER,oBACER,KAAA,CAACP,YAAY,EAAAgB,aAAA,CAAAA,aAAA,KACPH,KAAK;IACT,cAAYF,KAAM;IAClBM,OAAO;IACPC,MAAM,EAAEf,kBAAmB;IAAAgB,QAAA,gBAE3Bd,IAAA,CAACJ,IAAI;MACHmB,gBAAgB,EACdR,OAAO,IAAI,IAAI,GAAGS,SAAS,GAAG,iCAC/B;MAAAF,QAAA,eAEDd,IAAA,CAACN,eAAe;QAACW,IAAI,EAAEA;MAAK,CAAE;IAAC,CAC3B,CAAC,EACNE,OAAO,IAAI,IAAI,GAAG,IAAI,gBAAGP,IAAA,CAACH,OAAO;MAAAiB,QAAA,EAAEP;IAAO,CAAU,CAAC;EAAA,EAC1C,CAAC;AAEnB;AACAJ,gBAAgB,CAACc,WAAW,GAAG,kBAAkB;AAEjD,eAAed,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtonDialogTrigger.d.ts","sourceRoot":"","sources":["../../src/dialogs/ActionButtonDialogTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionButtonDialogTrigger.d.ts","sourceRoot":"","sources":["../../src/dialogs/ActionButtonDialogTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAK5E,MAAM,WAAW,8BAA+B,SAAQ,UAAU;IAChE,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,mBAAmB,GAAG,YAAY,CAAC;IAC7C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,GAAG,UAAU,EACd,EAAE,8BAA8B,GAAG,GAAG,CAAC,OAAO,CAuB9C;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -6,9 +6,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
6
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
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
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
|
-
import { ActionButton, DialogTrigger, Icon } from '@adobe/react-spectrum';
|
|
10
9
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
11
|
-
import { Text } from "../spectrum/index.js";
|
|
10
|
+
import { ActionButton, DialogTrigger, Icon, Text } from "../spectrum/index.js";
|
|
12
11
|
import { Tooltip } from "../popper/index.js";
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtonDialogTrigger.js","names":["ActionButton","DialogTrigger","Icon","
|
|
1
|
+
{"version":3,"file":"ActionButtonDialogTrigger.js","names":["FontAwesomeIcon","ActionButton","DialogTrigger","Icon","Text","Tooltip","jsx","_jsx","jsxs","_jsxs","ActionButtonDialogTrigger","_ref","ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip","styleProps","_objectWithoutProperties","_excluded","iconClassName","undefined","type","_objectSpread","UNSAFE_className"],"sources":["../../src/dialogs/ActionButtonDialogTrigger.tsx"],"sourcesContent":["import { ReactElement } from 'react';\nimport type { SpectrumDialogClose } from '@react-types/dialog';\nimport type { StyleProps } from '@react-types/shared';\nimport type { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { ActionButton, DialogTrigger, Icon, Text } from '../spectrum';\nimport { Tooltip } from '../popper';\n\nexport interface ActionButtonDialogTriggerProps extends StyleProps {\n icon: IconDefinition;\n isQuiet?: boolean;\n labelText?: string;\n ariaLabel?: string;\n tooltip?: string;\n children: SpectrumDialogClose | ReactElement;\n onOpenChange?: (isOpen: boolean) => void;\n}\n\n/**\n * Dialog trigger based on an ActionButton.\n */\nexport function ActionButtonDialogTrigger({\n ariaLabel,\n icon,\n isQuiet,\n labelText,\n children,\n onOpenChange,\n tooltip,\n ...styleProps\n}: ActionButtonDialogTriggerProps): JSX.Element {\n const iconClassName =\n labelText == null && tooltip != null\n ? 'action-button-icon-with-tooltip'\n : undefined;\n\n return (\n <DialogTrigger type=\"popover\" onOpenChange={onOpenChange}>\n <ActionButton\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...styleProps}\n aria-label={ariaLabel ?? labelText}\n isQuiet={isQuiet}\n >\n <Icon UNSAFE_className={iconClassName}>\n <FontAwesomeIcon icon={icon} />\n </Icon>\n {labelText == null ? null : <Text>{labelText}</Text>}\n {tooltip == null ? null : <Tooltip>{tooltip}</Tooltip>}\n </ActionButton>\n {children}\n </DialogTrigger>\n );\n}\n\nexport default ActionButtonDialogTrigger;\n"],"mappings":";;;;;;;;AAIA,SAASA,eAAe,QAAQ,gCAAgC;AAAC,SACxDC,YAAY,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI;AAAA,SACvCC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAYhB;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAAC,IAAA,EASO;EAAA,IATN;MACxCC,SAAS;MACTC,IAAI;MACJC,OAAO;MACPC,SAAS;MACTC,QAAQ;MACRC,YAAY;MACZC;IAE8B,CAAC,GAAAP,IAAA;IAD5BQ,UAAU,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA;EAEb,IAAMC,aAAa,GACjBP,SAAS,IAAI,IAAI,IAAIG,OAAO,IAAI,IAAI,GAChC,iCAAiC,GACjCK,SAAS;EAEf,oBACEd,KAAA,CAACP,aAAa;IAACsB,IAAI,EAAC,SAAS;IAACP,YAAY,EAAEA,YAAa;IAAAD,QAAA,gBACvDP,KAAA,CAACR;IACC;IAAA,EAAAwB,aAAA,CAAAA,aAAA,KACIN,UAAU;MACd,cAAYP,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIG,SAAU;MACnCD,OAAO,EAAEA,OAAQ;MAAAE,QAAA,gBAEjBT,IAAA,CAACJ,IAAI;QAACuB,gBAAgB,EAAEJ,aAAc;QAAAN,QAAA,eACpCT,IAAA,CAACP,eAAe;UAACa,IAAI,EAAEA;QAAK,CAAE;MAAC,CAC3B,CAAC,EACNE,SAAS,IAAI,IAAI,GAAG,IAAI,gBAAGR,IAAA,CAACH,IAAI;QAAAY,QAAA,EAAED;MAAS,CAAO,CAAC,EACnDG,OAAO,IAAI,IAAI,GAAG,IAAI,gBAAGX,IAAA,CAACF,OAAO;QAAAW,QAAA,EAAEE;MAAO,CAAU,CAAC;IAAA,EAC1C,CAAC,EACdF,QAAQ;EAAA,CACI,CAAC;AAEpB;AAEA,eAAeN,yBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/dialogs/ConfirmationDialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/dialogs/ConfirmationDialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAalE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,SAAS,CAAC;IACnB,uBAAuB,EAAE,MAAM,CAAC;IAChC,QAAQ,EACJ,YAAY,CAAC,sBAAsB,CAAC,GACpC,YAAY,CAAC,sBAAsB,CAAC,EAAE,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAqCvC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -5,9 +5,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
5
5
|
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); }
|
|
6
6
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
7
7
|
|
|
8
|
-
import { Button, ButtonGroup, Content, Dialog, Divider, Form } from '@adobe/react-spectrum';
|
|
9
8
|
import { useFormWithDetachedSubmitButton } from '@deephaven/react-hooks';
|
|
10
|
-
import { Heading } from "../spectrum/index.js";
|
|
9
|
+
import { SpectrumButton, ButtonGroup, Content, Dialog, Divider, Form, Heading } from "../spectrum/index.js";
|
|
11
10
|
import styles from "../SpectrumComponent.module.css";
|
|
12
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -35,11 +34,11 @@ export function ConfirmationDialog(_ref) {
|
|
|
35
34
|
children: children
|
|
36
35
|
}))
|
|
37
36
|
}), /*#__PURE__*/_jsxs(ButtonGroup, {
|
|
38
|
-
children: [/*#__PURE__*/_jsx(
|
|
37
|
+
children: [/*#__PURE__*/_jsx(SpectrumButton, {
|
|
39
38
|
variant: "secondary",
|
|
40
39
|
onPress: onCancel,
|
|
41
40
|
children: "Cancel"
|
|
42
|
-
}), /*#__PURE__*/_jsx(
|
|
41
|
+
}), /*#__PURE__*/_jsx(SpectrumButton, _objectSpread(_objectSpread({}, submitButtonProps), {}, {
|
|
43
42
|
// eslint-disable-next-line react/style-prop-object
|
|
44
43
|
style: "fill",
|
|
45
44
|
variant: "negative",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.js","names":["
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.js","names":["useFormWithDetachedSubmitButton","SpectrumButton","ButtonGroup","Content","Dialog","Divider","Form","Heading","styles","jsx","_jsx","jsxs","_jsxs","ConfirmationDialog","_ref","heading","confirmationButtonLabel","children","onCancel","onConfirm","formProps","submitButtonProps","level","UNSAFE_className","spectrumDialogComponentHeading","_objectSpread","variant","onPress","style","type"],"sources":["../../src/dialogs/ConfirmationDialog.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { ReactElement, ReactNode } from 'react';\nimport type { SpectrumLabelableProps } from '@react-types/shared';\nimport { useFormWithDetachedSubmitButton } from '@deephaven/react-hooks';\nimport {\n SpectrumButton,\n ButtonGroup,\n Content,\n Dialog,\n Divider,\n Form,\n Heading,\n} from '../spectrum';\nimport styles from '../SpectrumComponent.module.scss';\n\nexport interface ConfirmationDialogProps {\n heading: ReactNode;\n confirmationButtonLabel: string;\n children:\n | ReactElement<SpectrumLabelableProps>\n | ReactElement<SpectrumLabelableProps>[];\n onCancel: () => void;\n onConfirm: () => void;\n}\n\nexport function ConfirmationDialog({\n heading,\n confirmationButtonLabel,\n children,\n onCancel,\n onConfirm,\n}: ConfirmationDialogProps): JSX.Element {\n const { formProps, submitButtonProps } = useFormWithDetachedSubmitButton();\n\n return (\n <Dialog>\n <Heading\n level={3}\n UNSAFE_className={styles.spectrumDialogComponentHeading}\n >\n {heading}\n </Heading>\n <Divider />\n <Content>\n <Form\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...formProps}\n >\n {children}\n </Form>\n </Content>\n <ButtonGroup>\n <SpectrumButton variant=\"secondary\" onPress={onCancel}>\n Cancel\n </SpectrumButton>\n <SpectrumButton\n {...submitButtonProps}\n // eslint-disable-next-line react/style-prop-object\n style=\"fill\"\n variant=\"negative\"\n onPress={onConfirm}\n type=\"submit\"\n >\n {confirmationButtonLabel}\n </SpectrumButton>\n </ButtonGroup>\n </Dialog>\n );\n}\n\nexport default ConfirmationDialog;\n"],"mappings":";;;;;AAAA;;AAGA,SAASA,+BAA+B,QAAQ,wBAAwB;AAAC,SAEvEC,cAAc,EACdC,WAAW,EACXC,OAAO,EACPC,MAAM,EACNC,OAAO,EACPC,IAAI,EACJC,OAAO;AAAA,OAEFC,MAAM;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAYb,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAMO;EAAA,IANN;IACjCC,OAAO;IACPC,uBAAuB;IACvBC,QAAQ;IACRC,QAAQ;IACRC;EACuB,CAAC,GAAAL,IAAA;EACxB,IAAM;IAAEM,SAAS;IAAEC;EAAkB,CAAC,GAAGrB,+BAA+B,CAAC,CAAC;EAE1E,oBACEY,KAAA,CAACR,MAAM;IAAAa,QAAA,gBACLP,IAAA,CAACH,OAAO;MACNe,KAAK,EAAE,CAAE;MACTC,gBAAgB,EAAEf,MAAM,CAACgB,8BAA+B;MAAAP,QAAA,EAEvDF;IAAO,CACD,CAAC,eACVL,IAAA,CAACL,OAAO,IAAE,CAAC,eACXK,IAAA,CAACP,OAAO;MAAAc,QAAA,eACNP,IAAA,CAACJ;MACC;MAAA,EAAAmB,aAAA,CAAAA,aAAA,KACIL,SAAS;QAAAH,QAAA,EAEZA;MAAQ,EACL;IAAC,CACA,CAAC,eACVL,KAAA,CAACV,WAAW;MAAAe,QAAA,gBACVP,IAAA,CAACT,cAAc;QAACyB,OAAO,EAAC,WAAW;QAACC,OAAO,EAAET,QAAS;QAAAD,QAAA,EAAC;MAEvD,CAAgB,CAAC,eACjBP,IAAA,CAACT,cAAc,EAAAwB,aAAA,CAAAA,aAAA,KACTJ,iBAAiB;QACrB;QACAO,KAAK,EAAC,MAAM;QACZF,OAAO,EAAC,UAAU;QAClBC,OAAO,EAAER,SAAU;QACnBU,IAAI,EAAC,QAAQ;QAAAZ,QAAA,EAEZD;MAAuB,EACV,CAAC;IAAA,CACN,CAAC;EAAA,CACR,CAAC;AAEb;AAEA,eAAeH,kBAAkB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SpectrumComboBoxProps } from '@adobe/react-spectrum';
|
|
2
|
+
import { ComboBox as SpectrumComboBox, SpectrumComboBoxProps } from '@adobe/react-spectrum';
|
|
3
3
|
import type { NormalizedItem } from '../utils';
|
|
4
4
|
import { PickerPropsT } from '../picker';
|
|
5
5
|
export type ComboBoxProps = PickerPropsT<SpectrumComboBoxProps<NormalizedItem>>;
|
|
6
|
+
export { SpectrumComboBox };
|
|
6
7
|
export declare const ComboBox: React.ForwardRefExoticComponent<Omit<SpectrumComboBoxProps<NormalizedItem>, "children" | "items" | "selectedKey" | "defaultSelectedKey" | "disabledKeys" | "onSelectionChange" | "defaultItems"> & {
|
|
7
8
|
children: import("../utils").ItemOrSection<unknown> | import("../utils").ItemOrSection<unknown>[];
|
|
8
9
|
tooltip?: boolean | import("../utils").TooltipOptions | undefined;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,QAAQ,IAAI,gBAAgB,EAC5B,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,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,eAAO,MAAM,QAAQ;;;;;;;;;;mFAgCnB,CAAC"}
|
|
@@ -13,6 +13,7 @@ import cl from 'classnames';
|
|
|
13
13
|
import { useMergeRef } from '@deephaven/react-hooks';
|
|
14
14
|
import { usePickerProps } from "../picker/index.js";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
export { SpectrumComboBox };
|
|
16
17
|
export var ComboBox = /*#__PURE__*/React.forwardRef(function ComboBox(_ref, ref) {
|
|
17
18
|
var {
|
|
18
19
|
UNSAFE_className
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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 { SpectrumComboBox };\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,SAASL,gBAAgB;AAEzB,OAAO,IAAMD,QAAQ,gBAAGD,KAAK,CAACQ,UAAU,CAAC,SAASP,QAAQA,CAAAQ,IAAA,EAExDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAA0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KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAiCrE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1E,MAAM,EAAE,CAAC,EACT,aAAa,GAAE,WAA2B,EAC1C,eAAe,UAAQ,GACtB,CAAC,CAyDH;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,MAAM,GACZ,MAAM,CAyBR;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAKvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,oBAAoB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAkC,GAC5E,IAAI,CAyBN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI,CAkBN"}
|
package/dist/theme/ThemeUtils.js
CHANGED
|
@@ -240,19 +240,14 @@ export function resolveCssVariablesInRecord(record) {
|
|
|
240
240
|
var result = {};
|
|
241
241
|
recordArray.forEach((_ref3, i) => {
|
|
242
242
|
var [key, value] = _ref3;
|
|
243
|
-
// only resolve if it contains a css var expression
|
|
244
|
-
if (!value.includes(CSS_VAR_EXPRESSION_PREFIX)) {
|
|
245
|
-
result[key] = value;
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
243
|
// resolves any variables in the expression
|
|
249
244
|
var resolved = tempPropElComputedStyle.getPropertyValue("--".concat(TMP_CSS_PROP_PREFIX, "-").concat(i));
|
|
245
|
+
var containsCssVar = value.includes(CSS_VAR_EXPRESSION_PREFIX);
|
|
246
|
+
var isColor = CSS.supports('color', resolved);
|
|
250
247
|
if (
|
|
251
|
-
//
|
|
252
|
-
!/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(resolved) &&
|
|
253
|
-
// only try to normalize things that are valid colors
|
|
248
|
+
// only try to normalize non-hex strings that are valid colors
|
|
254
249
|
// otherwise non-colors will be made #00000000
|
|
255
|
-
|
|
250
|
+
isColor && !/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(resolved)) {
|
|
256
251
|
// getting the computed background color is necessary
|
|
257
252
|
// because resolved can still contain a color-mix() function
|
|
258
253
|
var el = tmpPropEl.children[i];
|
|
@@ -261,7 +256,7 @@ export function resolveCssVariablesInRecord(record) {
|
|
|
261
256
|
// convert color to hex, which is what monaco and plotly require
|
|
262
257
|
resolved = ColorUtils.normalizeCssColor(color, isAlphaOptional);
|
|
263
258
|
}
|
|
264
|
-
result[key] = resolved;
|
|
259
|
+
result[key] = containsCssVar || isColor ? resolved : value;
|
|
265
260
|
});
|
|
266
261
|
|
|
267
262
|
// Remove the temporary div
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeUtils.js","names":["Log","assertNotNull","ColorUtils","themeDark","themeLight","DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","THEME_CACHE_LOCAL_STORAGE_KEY","SVG_ICON_MANUAL_COLOR_MAP","log","module","CSS_VAR_EXPRESSION_PREFIX","TMP_CSS_PROP_PREFIX","NON_WHITESPACE_REGEX","WHITESPACE_REGEX","calculatePreloadStyleContent","defaultPreloadValues","resolveVar","createCssVariableResolver","document","body","pairs","Object","keys","map","key","concat","join","el","defaultValues","computedStyle","getComputedStyle","cssVariableResolver","varName","_defaultValues","value","getPropertyValue","createPreloadStyleElement","id","preloadStyleContent","style","createElement","innerHTML","head","appendChild","extractDistinctCssVariableExpressions","record","set","Set","values","forEach","getExpressionRanges","_ref","start","end","expression","substring","includes","add","getActiveThemes","themeKey","themeRegistration","_custom$baseThemeKey","custom","find","theme","baseThemeKey","base","error","debug","getDefaultBaseThemes","name","styleContent","getThemePreloadData","data","localStorage","getItem","JSON","parse","_unused","_NON_WHITESPACE_REGEX","_NON_WHITESPACE_REGEX2","ranges","exec","index","parenLevel","i","length","test","push","replaceSVGFillColor","svgContent","fillColor","replace","encodeURIComponent","resolveCssVariablesInRecord","targetElement","arguments","undefined","isAlphaOptional","perfStart","performance","now","tmpPropEl","display","recordArray","entries","_ref2","setProperty","backgroundColor","tempPropElComputedStyle","window","result","_ref3","resolved","CSS","supports","children","color","normalizeCssColor","remove","resolveCssVariablesInString","resolver","_ref4","setThemePreloadData","preloadData","setItem","stringify","getThemeKey","pluginName","themeName","preloadTheme","_getThemePreloadData","previousPreloadStyleContent","defaultPreloadStyleContent","overrideSVGFillColors","_ref5","removeProperty","newSVGContent"],"sources":["../../src/theme/ThemeUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport { assertNotNull, ColorUtils } from '@deephaven/utils';\nimport { themeDark } from './theme-dark';\nimport { themeLight } from './theme-light';\nimport {\n DEFAULT_DARK_THEME_KEY,\n DEFAULT_LIGHT_THEME_KEY,\n DEFAULT_PRELOAD_DATA_VARIABLES,\n ThemeData,\n ThemePreloadData,\n CssVariableStyleContent,\n ThemePreloadColorVariable,\n ThemeRegistrationData,\n THEME_CACHE_LOCAL_STORAGE_KEY,\n SVG_ICON_MANUAL_COLOR_MAP,\n ThemeCssVariableName,\n ThemeIconsRequiringManualColorChanges,\n} from './ThemeModel';\n\nconst log = Log.module('ThemeUtils');\n\nexport const CSS_VAR_EXPRESSION_PREFIX = 'var(--';\nexport const TMP_CSS_PROP_PREFIX = 'dh-tmp';\nexport const NON_WHITESPACE_REGEX = /\\S/;\nexport const WHITESPACE_REGEX = /\\s/;\n\nexport type VarExpressionResolver = (varExpression: string) => string;\n\n/**\n * Resolves the current values of CSS variables we want to preload. Preloading\n * happens before themes are fully loaded so that we can style things like the\n * loading spinner and background color which are shown to the user early on in\n * the app lifecycle.\n * @defaultPreloadValues Default values to use if a preload variable is not set.\n */\nexport function calculatePreloadStyleContent(\n defaultPreloadValues: Record<string, string>\n): CssVariableStyleContent {\n const resolveVar = createCssVariableResolver(\n document.body,\n defaultPreloadValues\n );\n\n // Calculate the current preload variables. If the variable is not set, use\n // the default value.\n const pairs = Object.keys(defaultPreloadValues).map(\n key => `${key}:${resolveVar(key as ThemePreloadColorVariable)}`\n );\n\n return `:root{${pairs.join(';')}}`;\n}\n\n/**\n * Create a resolver function for calculating the value of a css variable based\n * on a given element's computed style. If the variable resolves to '', we check\n * `defaultValues` for a default value, and if one does not exist,\n * return ''.\n * @param el Element to resolve css variables against\n * @param defaultValues Default values to use if a variable is not set.\n */\nexport function createCssVariableResolver(\n el: Element,\n defaultValues: Record<string, string>\n): (varName: ThemeCssVariableName) => string {\n const computedStyle = getComputedStyle(el);\n\n /**\n * Resolve the given css variable name to a value. If the variable is not set,\n * return the default preload value or '' if one does not exist.\n */\n return function cssVariableResolver(varName: ThemeCssVariableName): string {\n const value = computedStyle.getPropertyValue(varName);\n\n if (value !== '') {\n return value;\n }\n\n return defaultValues[varName as ThemePreloadColorVariable] ?? '';\n };\n}\n\n/**\n * Create a style tag containing preload css variables and add to the head.\n * @param id The id of the style tag\n * @param preloadStyleContent The css variable content to add to the style tag\n */\nexport function createPreloadStyleElement(\n id: `theme-preload-${string}`,\n preloadStyleContent: CssVariableStyleContent\n): void {\n const style = document.createElement('style');\n style.id = id;\n style.innerHTML = preloadStyleContent;\n document.head.appendChild(style);\n}\n\n/**\n * Extracts all css variable expressions from the given record and returns\n * a set of unique expressions.\n * @param record The record to extract css variable expressions from\n */\nexport function extractDistinctCssVariableExpressions(\n record: Record<string, string>\n): Set<string> {\n const set = new Set<string>();\n\n Object.values(record).forEach(value => {\n getExpressionRanges(value).forEach(([start, end]) => {\n const expression = value.substring(start, end + 1);\n\n if (expression.includes(CSS_VAR_EXPRESSION_PREFIX)) {\n set.add(expression);\n }\n });\n });\n\n return set;\n}\n\n/**\n * Returns an array of the active themes. The first item will always be one\n * of the base themes. Optionally, the second item will be a custom theme.\n */\nexport function getActiveThemes(\n themeKey: string,\n themeRegistration: ThemeRegistrationData\n): [ThemeData] | [ThemeData, ThemeData] {\n const custom = themeRegistration.custom.find(\n theme => theme.themeKey === themeKey\n );\n\n const baseThemeKey = custom?.baseThemeKey ?? themeKey;\n\n let base = themeRegistration.base.find(\n theme => theme.themeKey === baseThemeKey\n );\n\n if (base == null) {\n log.error(\n `No registered base theme found for theme key: '${baseThemeKey}'`,\n 'Registered:',\n themeRegistration.base.map(theme => theme.themeKey),\n themeRegistration.custom.map(theme => theme.themeKey)\n );\n base = themeRegistration.base.find(\n theme => theme.themeKey === DEFAULT_DARK_THEME_KEY\n );\n\n assertNotNull(\n base,\n `Default base theme '${DEFAULT_DARK_THEME_KEY}' is not registered`\n );\n }\n\n log.debug('Applied themes:', base.themeKey, custom?.themeKey);\n\n return custom == null ? [base] : [base, custom];\n}\n\n/**\n * Get default base theme data.\n */\nexport function getDefaultBaseThemes(): ThemeData[] {\n return [\n {\n name: 'Default Dark',\n themeKey: DEFAULT_DARK_THEME_KEY,\n styleContent: themeDark,\n },\n // The ThemePicker shows whenever more than 1 theme is available. Disable\n // light theme for now to keep the picker hidden until it is fully\n // implemented by #1539.\n {\n name: 'Default Light',\n themeKey: DEFAULT_LIGHT_THEME_KEY,\n styleContent: themeLight,\n },\n ];\n}\n\n/**\n * Get the preload data from local storage or null if it does not exist or is\n * invalid\n */\nexport function getThemePreloadData(): ThemePreloadData | null {\n const data = localStorage.getItem(THEME_CACHE_LOCAL_STORAGE_KEY);\n\n try {\n return data == null ? null : JSON.parse(data);\n } catch {\n // ignore\n }\n\n return null;\n}\n\n/**\n * Identifies start and end indices of any top-level expressions in the given\n * string.\n *\n * e.g.\n * getExpressionRanges('var(--aaa-aa) #fff var(--bbb-bb)')\n * yields:\n * [\n * [0, 12], // 'var(--aaa-aa)'\n * [14, 17] // '#fff'\n * [19, 31], // 'var(--bbb-bb)'\n * ]\n *\n * In cases where there are nested expressions, only the indices of the outermost\n * expression will be included.\n *\n * e.g.\n * getExpressionRanges('var(--ccc-cc, var(--aaa-aa, green)) var(--bbb-bb)')\n * yields:\n * [\n * [0, 34], // 'var(--ccc-cc, var(--aaa-aa, green))'\n * [36, 48], // 'var(--bbb-bb)'\n * ]\n * @param value The string to search for expressions\n * @returns An array of [start, end] index pairs for each expression\n */\nexport function getExpressionRanges(value: string): [number, number][] {\n const ranges: [number, number][] = [];\n\n let start = NON_WHITESPACE_REGEX.exec(value)?.index ?? 0;\n let parenLevel = 0;\n\n for (let i = 0; i < value.length; i += 1) {\n if (value[i] === '(') {\n parenLevel += 1;\n } else if (value[i] === ')') {\n parenLevel -= 1;\n }\n\n if (\n i === value.length - 1 ||\n (WHITESPACE_REGEX.test(value[i + 1]) && parenLevel === 0)\n ) {\n ranges.push([start, i]);\n\n while (i < value.length - 1 && WHITESPACE_REGEX.test(value[i + 1])) {\n i += 1;\n }\n\n start = i + 1;\n }\n }\n\n if (parenLevel !== 0) {\n log.error('Unbalanced parentheses in css var expression', value);\n return [];\n }\n\n return ranges;\n}\n\n/**\n * Replace the `fill='...'` attribute in the given SVG content with the given\n * color string.\n * @param svgContent Inline SVG content to replace the fill color in\n * @param fillColor The color to replace the fill color with\n */\nexport function replaceSVGFillColor(\n svgContent: string,\n fillColor: string\n): string {\n return svgContent.replace(\n /fill='.*?'/,\n `fill='${encodeURIComponent(fillColor)}'`\n );\n}\n\n/**\n * Make a copy of the given object replacing any css variable expressions\n * contained in its prop values with values resolved from the given HTML element.\n * Variables that resolve to color strings will also be normalized to 8 digit\n * hex values (or optionally 6 digit hex if `isAlphaOptional` is true).\n *\n * Note that the browser will force a reflow when calling `getComputedStyle` if\n * css properties have changed. In order to avoid a reflow for every property\n * check we use distinct setup, resolve / normalize, and cleanup passes:\n * 1. Setup - Create a tmp element and set all css props we want to evaluate\n * 2. Resolve / Normalize - Evaluate all css props via `getPropertyValue` calls\n * and replace the original expressions with resolved values. Also normalize\n * css colors to rgb/a.\n * 3. Cleanup - Remove the tmp element\n * @param record An object whose values may contain css var expressions\n * @param targetElement The element to resolve css variables against. Defaults\n * to document.body\n * @param isAlphaOptional If true, the alpha value will be dropped from resolved\n * 8 character hex colors if it is 'ff'. Defaults to false.\n */\nexport function resolveCssVariablesInRecord<T extends Record<string, string>>(\n record: T,\n targetElement: HTMLElement = document.body,\n isAlphaOptional = false\n): T {\n const perfStart = performance.now();\n\n // Add a temporary div to attach temp css variables to\n const tmpPropEl = document.createElement('div');\n tmpPropEl.style.display = 'none';\n\n const recordArray = Object.entries(record);\n recordArray.forEach(([, value], i) => {\n tmpPropEl.style.setProperty(`--${TMP_CSS_PROP_PREFIX}-${i}`, value);\n // faster to create these now all at once, even if we don't use them all\n // since the parent isn't added yet to the DOM\n const el = document.createElement('div');\n // use background color instead of color to avoid inherited values\n el.style.backgroundColor = value;\n tmpPropEl.appendChild(el);\n });\n\n // append only once to avoid multiple re-layouts\n // must be part of DOM to get computed color\n targetElement.appendChild(tmpPropEl);\n const tempPropElComputedStyle = window.getComputedStyle(tmpPropEl);\n\n const result = {} as T;\n recordArray.forEach(([key, value], i) => {\n // only resolve if it contains a css var expression\n if (!value.includes(CSS_VAR_EXPRESSION_PREFIX)) {\n (result as Record<string, string>)[key] = value;\n return;\n }\n // resolves any variables in the expression\n let resolved = tempPropElComputedStyle.getPropertyValue(\n `--${TMP_CSS_PROP_PREFIX}-${i}`\n );\n if (\n // skip if resolved is already hex\n !/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(resolved) &&\n // only try to normalize things that are valid colors\n // otherwise non-colors will be made #00000000\n CSS.supports('color', resolved)\n ) {\n // getting the computed background color is necessary\n // because resolved can still contain a color-mix() function\n const el = tmpPropEl.children[i] as HTMLDivElement;\n const computedStyle = window.getComputedStyle(el);\n const color = computedStyle.getPropertyValue('background-color');\n // convert color to hex, which is what monaco and plotly require\n resolved = ColorUtils.normalizeCssColor(color, isAlphaOptional);\n }\n (result as Record<string, string>)[key] = resolved;\n });\n\n // Remove the temporary div\n tmpPropEl.remove();\n\n log.debug('Resolved css variables', performance.now() - perfStart, 'ms');\n\n return result;\n}\n\n/**\n * Resolve css variable expressions in the given string using the\n * given resolver and replace the original expressions with the resolved values.\n *\n * @param resolver Function that can resolve a css variable expression\n * @param value Value that may contain css variable expressions\n */\nexport function resolveCssVariablesInString(\n resolver: VarExpressionResolver,\n value: string\n): string {\n const result: string[] = [];\n let i = 0;\n getExpressionRanges(value).forEach(([start, end]) => {\n if (i < start) {\n result.push(value.substring(i, start));\n i += start - i;\n }\n\n const expression = value.substring(start, end + 1);\n\n result.push(\n expression.includes(CSS_VAR_EXPRESSION_PREFIX)\n ? resolver(expression)\n : expression\n );\n\n i += end - start + 1;\n });\n\n if (result.length === 0) {\n return value;\n }\n\n return result.join('');\n}\n\n/**\n * Store theme preload data in local storage.\n * @param preloadData The preload data to set\n */\nexport function setThemePreloadData(preloadData: ThemePreloadData): void {\n localStorage.setItem(\n THEME_CACHE_LOCAL_STORAGE_KEY,\n JSON.stringify(preloadData)\n );\n}\n\n/**\n * Derive unique theme key from plugin root path and theme name.\n * @param pluginName The root path of the plugin\n * @param themeName The name of the theme\n */\nexport function getThemeKey(pluginName: string, themeName: string): string {\n return `${pluginName}_${themeName}`;\n}\n\n/**\n * Preload minimal theme variables from the cache.\n * @defaultPreloadValues Optional default values to use if a preload variable is not set.\n */\nexport function preloadTheme(\n defaultPreloadValues: Record<string, string> = DEFAULT_PRELOAD_DATA_VARIABLES\n): void {\n const previousPreloadStyleContent =\n getThemePreloadData()?.preloadStyleContent;\n\n const defaultPreloadStyleContent =\n calculatePreloadStyleContent(defaultPreloadValues);\n\n log.debug('Preloading theme content:', {\n defaultPreloadStyleContent,\n previousPreloadStyleContent,\n });\n\n createPreloadStyleElement(\n 'theme-preload-defaults',\n defaultPreloadStyleContent\n );\n\n // Any preload variables that were saved by last theme load should override\n // the defaults\n if (previousPreloadStyleContent != null) {\n createPreloadStyleElement(\n 'theme-preload-previous',\n previousPreloadStyleContent\n );\n }\n}\n\n/**\n * Inline SVGs cannot depend on dynamic CSS variables, so we have to statically\n * update them if we want to change their color.\n *\n * This function:\n * 1. Clears any previous overrides\n * 2. Resolves CSS variables containing inline SVG urls\n * 3. Resolves mapped color variables and replaces the `fill='...'` attribute with the result\n * 4. Sets the original CSS variable to the new replaced value\n *\n * Note that it is preferable to use inline SVGs as background-mask values and\n * just change the background color instead of relying on this util, but this\n * is not always possible. e.g. <select> elements don't support pseudo elements,\n * so there's not a good way to set icons via masks.\n * @param defaultValues Default values to use if a variable is not set.\n */\nexport function overrideSVGFillColors(\n defaultValues: Record<string, string>\n): void {\n const resolveVar = createCssVariableResolver(document.body, defaultValues);\n\n Object.entries(SVG_ICON_MANUAL_COLOR_MAP).forEach(([key, value]) => {\n // Clear any previous override so that our variables get resolved against the\n // actual svg content provided by the active themes and not from a previous\n // override\n document.body.style.removeProperty(key);\n\n const svgContent = resolveVar(key as ThemeIconsRequiringManualColorChanges);\n const fillColor = resolveVar(value as ThemePreloadColorVariable);\n\n const newSVGContent = replaceSVGFillColor(svgContent, fillColor);\n\n // This will take precedence over any values for the variable provided by\n // the active themes\n document.body.style.setProperty(key, newSVGContent);\n });\n}\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,EAAEC,UAAU,QAAQ,kBAAkB;AAAC,SACpDC,SAAS;AAAA,SACTC,UAAU;AAAA,SAEjBC,sBAAsB,EACtBC,uBAAuB,EACvBC,8BAA8B,EAM9BC,6BAA6B,EAC7BC,yBAAyB;AAK3B,IAAMC,GAAG,GAAGV,GAAG,CAACW,MAAM,CAAC,YAAY,CAAC;AAEpC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iG,cAAc,CAAChH,GAAG,CAAC;IAEvC,IAAMkE,UAAU,GAAG1E,UAAU,CAACQ,GAA4C,CAAC;IAC3E,IAAMmE,SAAS,GAAG3E,UAAU,CAACkB,KAAkC,CAAC;IAEhE,IAAMuG,aAAa,GAAGhD,mBAAmB,CAACC,UAAU,EAAEC,SAAS,CAAC;;IAEhE;IACA;IACAzE,QAAQ,CAACC,IAAI,CAACoB,KAAK,CAACoE,WAAW,CAACnF,GAAG,EAAEiH,aAAa,CAAC;EACrD,CAAC,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"ThemeUtils.js","names":["Log","assertNotNull","ColorUtils","themeDark","themeLight","DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","THEME_CACHE_LOCAL_STORAGE_KEY","SVG_ICON_MANUAL_COLOR_MAP","log","module","CSS_VAR_EXPRESSION_PREFIX","TMP_CSS_PROP_PREFIX","NON_WHITESPACE_REGEX","WHITESPACE_REGEX","calculatePreloadStyleContent","defaultPreloadValues","resolveVar","createCssVariableResolver","document","body","pairs","Object","keys","map","key","concat","join","el","defaultValues","computedStyle","getComputedStyle","cssVariableResolver","varName","_defaultValues","value","getPropertyValue","createPreloadStyleElement","id","preloadStyleContent","style","createElement","innerHTML","head","appendChild","extractDistinctCssVariableExpressions","record","set","Set","values","forEach","getExpressionRanges","_ref","start","end","expression","substring","includes","add","getActiveThemes","themeKey","themeRegistration","_custom$baseThemeKey","custom","find","theme","baseThemeKey","base","error","debug","getDefaultBaseThemes","name","styleContent","getThemePreloadData","data","localStorage","getItem","JSON","parse","_unused","_NON_WHITESPACE_REGEX","_NON_WHITESPACE_REGEX2","ranges","exec","index","parenLevel","i","length","test","push","replaceSVGFillColor","svgContent","fillColor","replace","encodeURIComponent","resolveCssVariablesInRecord","targetElement","arguments","undefined","isAlphaOptional","perfStart","performance","now","tmpPropEl","display","recordArray","entries","_ref2","setProperty","backgroundColor","tempPropElComputedStyle","window","result","_ref3","resolved","containsCssVar","isColor","CSS","supports","children","color","normalizeCssColor","remove","resolveCssVariablesInString","resolver","_ref4","setThemePreloadData","preloadData","setItem","stringify","getThemeKey","pluginName","themeName","preloadTheme","_getThemePreloadData","previousPreloadStyleContent","defaultPreloadStyleContent","overrideSVGFillColors","_ref5","removeProperty","newSVGContent"],"sources":["../../src/theme/ThemeUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport { assertNotNull, ColorUtils } from '@deephaven/utils';\nimport { themeDark } from './theme-dark';\nimport { themeLight } from './theme-light';\nimport {\n DEFAULT_DARK_THEME_KEY,\n DEFAULT_LIGHT_THEME_KEY,\n DEFAULT_PRELOAD_DATA_VARIABLES,\n ThemeData,\n ThemePreloadData,\n CssVariableStyleContent,\n ThemePreloadColorVariable,\n ThemeRegistrationData,\n THEME_CACHE_LOCAL_STORAGE_KEY,\n SVG_ICON_MANUAL_COLOR_MAP,\n ThemeCssVariableName,\n ThemeIconsRequiringManualColorChanges,\n} from './ThemeModel';\n\nconst log = Log.module('ThemeUtils');\n\nexport const CSS_VAR_EXPRESSION_PREFIX = 'var(--';\nexport const TMP_CSS_PROP_PREFIX = 'dh-tmp';\nexport const NON_WHITESPACE_REGEX = /\\S/;\nexport const WHITESPACE_REGEX = /\\s/;\n\nexport type VarExpressionResolver = (varExpression: string) => string;\n\n/**\n * Resolves the current values of CSS variables we want to preload. Preloading\n * happens before themes are fully loaded so that we can style things like the\n * loading spinner and background color which are shown to the user early on in\n * the app lifecycle.\n * @defaultPreloadValues Default values to use if a preload variable is not set.\n */\nexport function calculatePreloadStyleContent(\n defaultPreloadValues: Record<string, string>\n): CssVariableStyleContent {\n const resolveVar = createCssVariableResolver(\n document.body,\n defaultPreloadValues\n );\n\n // Calculate the current preload variables. If the variable is not set, use\n // the default value.\n const pairs = Object.keys(defaultPreloadValues).map(\n key => `${key}:${resolveVar(key as ThemePreloadColorVariable)}`\n );\n\n return `:root{${pairs.join(';')}}`;\n}\n\n/**\n * Create a resolver function for calculating the value of a css variable based\n * on a given element's computed style. If the variable resolves to '', we check\n * `defaultValues` for a default value, and if one does not exist,\n * return ''.\n * @param el Element to resolve css variables against\n * @param defaultValues Default values to use if a variable is not set.\n */\nexport function createCssVariableResolver(\n el: Element,\n defaultValues: Record<string, string>\n): (varName: ThemeCssVariableName) => string {\n const computedStyle = getComputedStyle(el);\n\n /**\n * Resolve the given css variable name to a value. If the variable is not set,\n * return the default preload value or '' if one does not exist.\n */\n return function cssVariableResolver(varName: ThemeCssVariableName): string {\n const value = computedStyle.getPropertyValue(varName);\n\n if (value !== '') {\n return value;\n }\n\n return defaultValues[varName as ThemePreloadColorVariable] ?? '';\n };\n}\n\n/**\n * Create a style tag containing preload css variables and add to the head.\n * @param id The id of the style tag\n * @param preloadStyleContent The css variable content to add to the style tag\n */\nexport function createPreloadStyleElement(\n id: `theme-preload-${string}`,\n preloadStyleContent: CssVariableStyleContent\n): void {\n const style = document.createElement('style');\n style.id = id;\n style.innerHTML = preloadStyleContent;\n document.head.appendChild(style);\n}\n\n/**\n * Extracts all css variable expressions from the given record and returns\n * a set of unique expressions.\n * @param record The record to extract css variable expressions from\n */\nexport function extractDistinctCssVariableExpressions(\n record: Record<string, string>\n): Set<string> {\n const set = new Set<string>();\n\n Object.values(record).forEach(value => {\n getExpressionRanges(value).forEach(([start, end]) => {\n const expression = value.substring(start, end + 1);\n\n if (expression.includes(CSS_VAR_EXPRESSION_PREFIX)) {\n set.add(expression);\n }\n });\n });\n\n return set;\n}\n\n/**\n * Returns an array of the active themes. The first item will always be one\n * of the base themes. Optionally, the second item will be a custom theme.\n */\nexport function getActiveThemes(\n themeKey: string,\n themeRegistration: ThemeRegistrationData\n): [ThemeData] | [ThemeData, ThemeData] {\n const custom = themeRegistration.custom.find(\n theme => theme.themeKey === themeKey\n );\n\n const baseThemeKey = custom?.baseThemeKey ?? themeKey;\n\n let base = themeRegistration.base.find(\n theme => theme.themeKey === baseThemeKey\n );\n\n if (base == null) {\n log.error(\n `No registered base theme found for theme key: '${baseThemeKey}'`,\n 'Registered:',\n themeRegistration.base.map(theme => theme.themeKey),\n themeRegistration.custom.map(theme => theme.themeKey)\n );\n base = themeRegistration.base.find(\n theme => theme.themeKey === DEFAULT_DARK_THEME_KEY\n );\n\n assertNotNull(\n base,\n `Default base theme '${DEFAULT_DARK_THEME_KEY}' is not registered`\n );\n }\n\n log.debug('Applied themes:', base.themeKey, custom?.themeKey);\n\n return custom == null ? [base] : [base, custom];\n}\n\n/**\n * Get default base theme data.\n */\nexport function getDefaultBaseThemes(): ThemeData[] {\n return [\n {\n name: 'Default Dark',\n themeKey: DEFAULT_DARK_THEME_KEY,\n styleContent: themeDark,\n },\n // The ThemePicker shows whenever more than 1 theme is available. Disable\n // light theme for now to keep the picker hidden until it is fully\n // implemented by #1539.\n {\n name: 'Default Light',\n themeKey: DEFAULT_LIGHT_THEME_KEY,\n styleContent: themeLight,\n },\n ];\n}\n\n/**\n * Get the preload data from local storage or null if it does not exist or is\n * invalid\n */\nexport function getThemePreloadData(): ThemePreloadData | null {\n const data = localStorage.getItem(THEME_CACHE_LOCAL_STORAGE_KEY);\n\n try {\n return data == null ? null : JSON.parse(data);\n } catch {\n // ignore\n }\n\n return null;\n}\n\n/**\n * Identifies start and end indices of any top-level expressions in the given\n * string.\n *\n * e.g.\n * getExpressionRanges('var(--aaa-aa) #fff var(--bbb-bb)')\n * yields:\n * [\n * [0, 12], // 'var(--aaa-aa)'\n * [14, 17] // '#fff'\n * [19, 31], // 'var(--bbb-bb)'\n * ]\n *\n * In cases where there are nested expressions, only the indices of the outermost\n * expression will be included.\n *\n * e.g.\n * getExpressionRanges('var(--ccc-cc, var(--aaa-aa, green)) var(--bbb-bb)')\n * yields:\n * [\n * [0, 34], // 'var(--ccc-cc, var(--aaa-aa, green))'\n * [36, 48], // 'var(--bbb-bb)'\n * ]\n * @param value The string to search for expressions\n * @returns An array of [start, end] index pairs for each expression\n */\nexport function getExpressionRanges(value: string): [number, number][] {\n const ranges: [number, number][] = [];\n\n let start = NON_WHITESPACE_REGEX.exec(value)?.index ?? 0;\n let parenLevel = 0;\n\n for (let i = 0; i < value.length; i += 1) {\n if (value[i] === '(') {\n parenLevel += 1;\n } else if (value[i] === ')') {\n parenLevel -= 1;\n }\n\n if (\n i === value.length - 1 ||\n (WHITESPACE_REGEX.test(value[i + 1]) && parenLevel === 0)\n ) {\n ranges.push([start, i]);\n\n while (i < value.length - 1 && WHITESPACE_REGEX.test(value[i + 1])) {\n i += 1;\n }\n\n start = i + 1;\n }\n }\n\n if (parenLevel !== 0) {\n log.error('Unbalanced parentheses in css var expression', value);\n return [];\n }\n\n return ranges;\n}\n\n/**\n * Replace the `fill='...'` attribute in the given SVG content with the given\n * color string.\n * @param svgContent Inline SVG content to replace the fill color in\n * @param fillColor The color to replace the fill color with\n */\nexport function replaceSVGFillColor(\n svgContent: string,\n fillColor: string\n): string {\n return svgContent.replace(\n /fill='.*?'/,\n `fill='${encodeURIComponent(fillColor)}'`\n );\n}\n\n/**\n * Make a copy of the given object replacing any css variable expressions\n * contained in its prop values with values resolved from the given HTML element.\n * Variables that resolve to color strings will also be normalized to 8 digit\n * hex values (or optionally 6 digit hex if `isAlphaOptional` is true).\n *\n * Note that the browser will force a reflow when calling `getComputedStyle` if\n * css properties have changed. In order to avoid a reflow for every property\n * check we use distinct setup, resolve / normalize, and cleanup passes:\n * 1. Setup - Create a tmp element and set all css props we want to evaluate\n * 2. Resolve / Normalize - Evaluate all css props via `getPropertyValue` calls\n * and replace the original expressions with resolved values. Also normalize\n * css colors to rgb/a.\n * 3. Cleanup - Remove the tmp element\n * @param record An object whose values may contain css var expressions\n * @param targetElement The element to resolve css variables against. Defaults\n * to document.body\n * @param isAlphaOptional If true, the alpha value will be dropped from resolved\n * 8 character hex colors if it is 'ff'. Defaults to false.\n */\nexport function resolveCssVariablesInRecord<T extends Record<string, string>>(\n record: T,\n targetElement: HTMLElement = document.body,\n isAlphaOptional = false\n): T {\n const perfStart = performance.now();\n\n // Add a temporary div to attach temp css variables to\n const tmpPropEl = document.createElement('div');\n tmpPropEl.style.display = 'none';\n\n const recordArray = Object.entries(record);\n recordArray.forEach(([, value], i) => {\n tmpPropEl.style.setProperty(`--${TMP_CSS_PROP_PREFIX}-${i}`, value);\n // faster to create these now all at once, even if we don't use them all\n // since the parent isn't added yet to the DOM\n const el = document.createElement('div');\n // use background color instead of color to avoid inherited values\n el.style.backgroundColor = value;\n tmpPropEl.appendChild(el);\n });\n\n // append only once to avoid multiple re-layouts\n // must be part of DOM to get computed color\n targetElement.appendChild(tmpPropEl);\n const tempPropElComputedStyle = window.getComputedStyle(tmpPropEl);\n\n const result = {} as T;\n recordArray.forEach(([key, value], i) => {\n // resolves any variables in the expression\n let resolved = tempPropElComputedStyle.getPropertyValue(\n `--${TMP_CSS_PROP_PREFIX}-${i}`\n );\n\n const containsCssVar = value.includes(CSS_VAR_EXPRESSION_PREFIX);\n const isColor = CSS.supports('color', resolved);\n\n if (\n // only try to normalize non-hex strings that are valid colors\n // otherwise non-colors will be made #00000000\n isColor &&\n !/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(resolved)\n ) {\n // getting the computed background color is necessary\n // because resolved can still contain a color-mix() function\n const el = tmpPropEl.children[i] as HTMLDivElement;\n const computedStyle = window.getComputedStyle(el);\n const color = computedStyle.getPropertyValue('background-color');\n // convert color to hex, which is what monaco and plotly require\n resolved = ColorUtils.normalizeCssColor(color, isAlphaOptional);\n }\n (result as Record<string, string>)[key] =\n containsCssVar || isColor ? resolved : value;\n });\n\n // Remove the temporary div\n tmpPropEl.remove();\n\n log.debug('Resolved css variables', performance.now() - perfStart, 'ms');\n\n return result;\n}\n\n/**\n * Resolve css variable expressions in the given string using the\n * given resolver and replace the original expressions with the resolved values.\n *\n * @param resolver Function that can resolve a css variable expression\n * @param value Value that may contain css variable expressions\n */\nexport function resolveCssVariablesInString(\n resolver: VarExpressionResolver,\n value: string\n): string {\n const result: string[] = [];\n let i = 0;\n getExpressionRanges(value).forEach(([start, end]) => {\n if (i < start) {\n result.push(value.substring(i, start));\n i += start - i;\n }\n\n const expression = value.substring(start, end + 1);\n\n result.push(\n expression.includes(CSS_VAR_EXPRESSION_PREFIX)\n ? resolver(expression)\n : expression\n );\n\n i += end - start + 1;\n });\n\n if (result.length === 0) {\n return value;\n }\n\n return result.join('');\n}\n\n/**\n * Store theme preload data in local storage.\n * @param preloadData The preload data to set\n */\nexport function setThemePreloadData(preloadData: ThemePreloadData): void {\n localStorage.setItem(\n THEME_CACHE_LOCAL_STORAGE_KEY,\n JSON.stringify(preloadData)\n );\n}\n\n/**\n * Derive unique theme key from plugin root path and theme name.\n * @param pluginName The root path of the plugin\n * @param themeName The name of the theme\n */\nexport function getThemeKey(pluginName: string, themeName: string): string {\n return `${pluginName}_${themeName}`;\n}\n\n/**\n * Preload minimal theme variables from the cache.\n * @defaultPreloadValues Optional default values to use if a preload variable is not set.\n */\nexport function preloadTheme(\n defaultPreloadValues: Record<string, string> = DEFAULT_PRELOAD_DATA_VARIABLES\n): void {\n const previousPreloadStyleContent =\n getThemePreloadData()?.preloadStyleContent;\n\n const defaultPreloadStyleContent =\n calculatePreloadStyleContent(defaultPreloadValues);\n\n log.debug('Preloading theme content:', {\n defaultPreloadStyleContent,\n previousPreloadStyleContent,\n });\n\n createPreloadStyleElement(\n 'theme-preload-defaults',\n defaultPreloadStyleContent\n );\n\n // Any preload variables that were saved by last theme load should override\n // the defaults\n if (previousPreloadStyleContent != null) {\n createPreloadStyleElement(\n 'theme-preload-previous',\n previousPreloadStyleContent\n );\n }\n}\n\n/**\n * Inline SVGs cannot depend on dynamic CSS variables, so we have to statically\n * update them if we want to change their color.\n *\n * This function:\n * 1. Clears any previous overrides\n * 2. Resolves CSS variables containing inline SVG urls\n * 3. Resolves mapped color variables and replaces the `fill='...'` attribute with the result\n * 4. Sets the original CSS variable to the new replaced value\n *\n * Note that it is preferable to use inline SVGs as background-mask values and\n * just change the background color instead of relying on this util, but this\n * is not always possible. e.g. <select> elements don't support pseudo elements,\n * so there's not a good way to set icons via masks.\n * @param defaultValues Default values to use if a variable is not set.\n */\nexport function overrideSVGFillColors(\n defaultValues: Record<string, string>\n): void {\n const resolveVar = createCssVariableResolver(document.body, defaultValues);\n\n Object.entries(SVG_ICON_MANUAL_COLOR_MAP).forEach(([key, value]) => {\n // Clear any previous override so that our variables get resolved against the\n // actual svg content provided by the active themes and not from a previous\n // override\n document.body.style.removeProperty(key);\n\n const svgContent = resolveVar(key as ThemeIconsRequiringManualColorChanges);\n const fillColor = resolveVar(value as ThemePreloadColorVariable);\n\n const newSVGContent = replaceSVGFillColor(svgContent, fillColor);\n\n // This will take precedence over any values for the variable provided by\n // the active themes\n document.body.style.setProperty(key, newSVGContent);\n });\n}\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,EAAEC,UAAU,QAAQ,kBAAkB;AAAC,SACpDC,SAAS;AAAA,SACTC,UAAU;AAAA,SAEjBC,sBAAsB,EACtBC,uBAAuB,EACvBC,8BAA8B,EAM9BC,6BAA6B,EAC7BC,yBAAyB;AAK3B,IAAMC,GAAG,GAAGV,GAAG,CAACW,MAAM,CAAC,YAAY,CAAC;AAEpC,OAAO,IAAMC,yBAAyB,GAAG,QAAQ;AACjD,OAAO,IAAMC,mBAAmB,GAAG,QAAQ;AAC3C,OAAO,IAAMC,oBAAoB,GAAG,IAAI;AACxC,OAAO,IAAMC,gBAAgB,GAAG,IAAI;AAIpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAC1CC,oBAA4C,EACnB;EACzB,IAAMC,UAAU,GAAGC,yBAAyB,CAC1CC,QAAQ,CAACC,IAAI,EACbJ,oBACF,CAAC;;EAED;EACA;EACA,IAAMK,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACP,oBAAoB,CAAC,CAACQ,GAAG,CACjDC,GAAG,OAAAC,MAAA,CAAOD,GAAG,OAAAC,MAAA,CAAIT,UAAU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AAA,uBAArBA,oBAAA,CAAuB/F,mBAAmB;EAE5C,IAAMiG,0BAA0B,GAC9BzH,4BAA4B,CAACC,oBAAoB,CAAC;EAEpDP,GAAG,CAAC4D,KAAK,CAAC,2BAA2B,EAAE;IACrCmE,0BAA0B;IAC1BD;EACF,CAAC,CAAC;EAEFlG,yBAAyB,CACvB,wBAAwB,EACxBmG,0BACF,CAAC;;EAED;EACA;EACA,IAAID,2BAA2B,IAAI,IAAI,EAAE;IACvClG,yBAAyB,CACvB,wBAAwB,EACxBkG,2BACF,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,qBAAqBA,CACnC5G,aAAqC,EAC/B;EACN,IAAMZ,UAAU,GAAGC,yBAAyB,CAACC,QAAQ,CAACC,IAAI,EAAES,aAAa,CAAC;EAE1EP,MAAM,CAACoF,OAAO,CAAClG,yBAAyB,CAAC,CAAC0C,OAAO,CAACwF,KAAA,IAAkB;IAAA,IAAjB,CAACjH,GAAG,EAAEU,KAAK,CAAC,GAAAuG,KAAA;IAC7D;IACA;IACA;IACAvH,QAAQ,CAACC,IAAI,CAACoB,KAAK,CAACmG,cAAc,CAAClH,GAAG,CAAC;IAEvC,IAAMkE,UAAU,GAAG1E,UAAU,CAACQ,GAA4C,CAAC;IAC3E,IAAMmE,SAAS,GAAG3E,UAAU,CAACkB,KAAkC,CAAC;IAEhE,IAAMyG,aAAa,GAAGlD,mBAAmB,CAACC,UAAU,EAAEC,SAAS,CAAC;;IAEhE;IACA;IACAzE,QAAQ,CAACC,IAAI,CAACoB,KAAK,CAACoE,WAAW,CAACnF,GAAG,EAAEmH,aAAa,CAAC;EACrD,CAAC,CAAC;AACJ"}
|
|
@@ -18,6 +18,7 @@ export declare function isDHColorValue(value: string): value is DHColorValue;
|
|
|
18
18
|
* ex. colorValueStyle('red') => 'red'
|
|
19
19
|
* ex. colorValueStyle('#F00') => '#F00'
|
|
20
20
|
*/
|
|
21
|
+
export declare function colorValueStyle(value: string): string;
|
|
21
22
|
export declare function colorValueStyle(value: string | undefined): string | undefined;
|
|
22
23
|
export {};
|
|
23
24
|
//# sourceMappingURL=colorUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../src/theme/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,WAAW,++FA2Nd,CAAC;AAEX,KAAK,YAAY,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAE/D,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAInE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../src/theme/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,WAAW,++FA2Nd,CAAC;AAEX,KAAK,YAAY,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAE/D,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAInE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;AACvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC"}
|
package/dist/theme/colorUtils.js
CHANGED
|
@@ -20,6 +20,7 @@ export function isDHColorValue(value) {
|
|
|
20
20
|
* ex. colorValueStyle('red') => 'red'
|
|
21
21
|
* ex. colorValueStyle('#F00') => '#F00'
|
|
22
22
|
*/
|
|
23
|
+
|
|
23
24
|
export function colorValueStyle(value) {
|
|
24
25
|
if (value != null && isDHColorValue(value)) {
|
|
25
26
|
return "var(--dh-color-".concat(value, ")");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorUtils.js","names":["ColorValues","isDHColorValue","value","includes","colorValueStyle","concat"],"sources":["../../src/theme/colorUtils.ts"],"sourcesContent":["import { CSSProperties } from 'react';\n\n/**\n * Color values for the DH color palette exposed to end users in spectrum components.\n */\nexport const ColorValues = [\n 'gray-50',\n 'gray-75',\n 'gray-100',\n 'gray-200',\n 'gray-300',\n 'gray-400',\n 'gray-500',\n 'gray-600',\n 'gray-700',\n 'gray-800',\n 'gray-900',\n 'red-100',\n 'red-200',\n 'red-300',\n 'red-400',\n 'red-500',\n 'red-600',\n 'red-700',\n 'red-800',\n 'red-900',\n 'red-1000',\n 'red-1100',\n 'red-1200',\n 'red-1300',\n 'red-1400',\n 'orange-100',\n 'orange-200',\n 'orange-300',\n 'orange-400',\n 'orange-500',\n 'orange-600',\n 'orange-700',\n 'orange-800',\n 'orange-900',\n 'orange-1000',\n 'orange-1100',\n 'orange-1200',\n 'orange-1300',\n 'orange-1400',\n 'yellow-100',\n 'yellow-200',\n 'yellow-300',\n 'yellow-400',\n 'yellow-500',\n 'yellow-600',\n 'yellow-700',\n 'yellow-800',\n 'yellow-900',\n 'yellow-1000',\n 'yellow-1100',\n 'yellow-1200',\n 'yellow-1300',\n 'yellow-1400',\n 'chartreuse-100',\n 'chartreuse-200',\n 'chartreuse-300',\n 'chartreuse-400',\n 'chartreuse-500',\n 'chartreuse-600',\n 'chartreuse-700',\n 'chartreuse-800',\n 'chartreuse-900',\n 'chartreuse-1000',\n 'chartreuse-1100',\n 'chartreuse-1200',\n 'chartreuse-1300',\n 'chartreuse-1400',\n 'celery-100',\n 'celery-200',\n 'celery-300',\n 'celery-400',\n 'celery-500',\n 'celery-600',\n 'celery-700',\n 'celery-800',\n 'celery-900',\n 'celery-1000',\n 'celery-1100',\n 'celery-1200',\n 'celery-1300',\n 'celery-1400',\n 'green-100',\n 'green-200',\n 'green-300',\n 'green-400',\n 'green-500',\n 'green-600',\n 'green-700',\n 'green-800',\n 'green-900',\n 'green-1000',\n 'green-1100',\n 'green-1200',\n 'green-1300',\n 'green-1400',\n 'seafoam-100',\n 'seafoam-200',\n 'seafoam-300',\n 'seafoam-400',\n 'seafoam-500',\n 'seafoam-600',\n 'seafoam-700',\n 'seafoam-800',\n 'seafoam-900',\n 'seafoam-1000',\n 'seafoam-1100',\n 'seafoam-1200',\n 'seafoam-1300',\n 'seafoam-1400',\n 'cyan-100',\n 'cyan-200',\n 'cyan-300',\n 'cyan-400',\n 'cyan-500',\n 'cyan-600',\n 'cyan-700',\n 'cyan-800',\n 'cyan-900',\n 'cyan-1000',\n 'cyan-1100',\n 'cyan-1200',\n 'cyan-1300',\n 'cyan-1400',\n 'blue-100',\n 'blue-200',\n 'blue-300',\n 'blue-400',\n 'blue-500',\n 'blue-600',\n 'blue-700',\n 'blue-800',\n 'blue-900',\n 'blue-1000',\n 'blue-1100',\n 'blue-1200',\n 'blue-1300',\n 'blue-1400',\n 'indigo-100',\n 'indigo-200',\n 'indigo-300',\n 'indigo-400',\n 'indigo-500',\n 'indigo-600',\n 'indigo-700',\n 'indigo-800',\n 'indigo-900',\n 'indigo-1000',\n 'indigo-1100',\n 'indigo-1200',\n 'indigo-1300',\n 'indigo-1400',\n 'purple-100',\n 'purple-200',\n 'purple-300',\n 'purple-400',\n 'purple-500',\n 'purple-600',\n 'purple-700',\n 'purple-800',\n 'purple-900',\n 'purple-1000',\n 'purple-1100',\n 'purple-1200',\n 'purple-1300',\n 'purple-1400',\n 'fuchsia-100',\n 'fuchsia-200',\n 'fuchsia-300',\n 'fuchsia-400',\n 'fuchsia-500',\n 'fuchsia-600',\n 'fuchsia-700',\n 'fuchsia-800',\n 'fuchsia-900',\n 'fuchsia-1000',\n 'fuchsia-1100',\n 'fuchsia-1200',\n 'fuchsia-1300',\n 'fuchsia-1400',\n 'magenta-100',\n 'magenta-200',\n 'magenta-300',\n 'magenta-400',\n 'magenta-500',\n 'magenta-600',\n 'magenta-700',\n 'magenta-800',\n 'magenta-900',\n 'magenta-1000',\n 'magenta-1100',\n 'magenta-1200',\n 'magenta-1300',\n 'magenta-1400',\n 'negative',\n 'notice',\n 'positive',\n 'info',\n // Additional DH ColorValues:\n 'accent',\n 'accent-100',\n 'accent-200',\n 'accent-300',\n 'accent-400',\n 'accent-500',\n 'accent-600',\n 'accent-700',\n 'accent-800',\n 'accent-900',\n 'accent-1000',\n 'accent-1100',\n 'accent-1200',\n 'accent-1300',\n 'accent-1400',\n 'bg',\n 'content-bg',\n 'subdued-content-bg',\n 'surface-bg',\n 'fg',\n] as const;\n\ntype DHColorValue = (typeof ColorValues)[number];\n\nexport type ColorValue = DHColorValue | CSSProperties['color'];\n\nexport function isDHColorValue(value: string): value is DHColorValue {\n return (\n typeof value === 'string' && ColorValues.includes(value as DHColorValue)\n );\n}\n\n/**\n * Returns the a css variable color value for a given theme color.\n * If the color value is a DH color value, it returns the CSS variable.\n * Otherwise, it returns the color value as is.\n *\n * @param value a string representing a color value\n * @returns CSS variable for DH color values, otherwise the color value as is\n *\n * ex. colorValueStyle('blue-1000') => 'var(--dh-color-blue-1000)'\n * ex. colorValueStyle('red') => 'red'\n * ex. colorValueStyle('#F00') => '#F00'\n */\nexport function colorValueStyle(value: string | undefined): string | undefined {\n if (value != null && isDHColorValue(value)) {\n return `var(--dh-color-${value})`;\n }\n\n return value;\n}\n"],"mappings":"AAEA;AACA;AACA;AACA,OAAO,IAAMA,WAAW,GAAG,CACzB,SAAS,EACT,SAAS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,CACI;AAMV,OAAO,SAASC,cAAcA,CAACC,KAAa,EAAyB;EACnE,OACE,OAAOA,KAAK,KAAK,QAAQ,IAAIF,WAAW,CAACG,QAAQ,CAACD,KAAqB,CAAC;AAE5E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"colorUtils.js","names":["ColorValues","isDHColorValue","value","includes","colorValueStyle","concat"],"sources":["../../src/theme/colorUtils.ts"],"sourcesContent":["import { CSSProperties } from 'react';\n\n/**\n * Color values for the DH color palette exposed to end users in spectrum components.\n */\nexport const ColorValues = [\n 'gray-50',\n 'gray-75',\n 'gray-100',\n 'gray-200',\n 'gray-300',\n 'gray-400',\n 'gray-500',\n 'gray-600',\n 'gray-700',\n 'gray-800',\n 'gray-900',\n 'red-100',\n 'red-200',\n 'red-300',\n 'red-400',\n 'red-500',\n 'red-600',\n 'red-700',\n 'red-800',\n 'red-900',\n 'red-1000',\n 'red-1100',\n 'red-1200',\n 'red-1300',\n 'red-1400',\n 'orange-100',\n 'orange-200',\n 'orange-300',\n 'orange-400',\n 'orange-500',\n 'orange-600',\n 'orange-700',\n 'orange-800',\n 'orange-900',\n 'orange-1000',\n 'orange-1100',\n 'orange-1200',\n 'orange-1300',\n 'orange-1400',\n 'yellow-100',\n 'yellow-200',\n 'yellow-300',\n 'yellow-400',\n 'yellow-500',\n 'yellow-600',\n 'yellow-700',\n 'yellow-800',\n 'yellow-900',\n 'yellow-1000',\n 'yellow-1100',\n 'yellow-1200',\n 'yellow-1300',\n 'yellow-1400',\n 'chartreuse-100',\n 'chartreuse-200',\n 'chartreuse-300',\n 'chartreuse-400',\n 'chartreuse-500',\n 'chartreuse-600',\n 'chartreuse-700',\n 'chartreuse-800',\n 'chartreuse-900',\n 'chartreuse-1000',\n 'chartreuse-1100',\n 'chartreuse-1200',\n 'chartreuse-1300',\n 'chartreuse-1400',\n 'celery-100',\n 'celery-200',\n 'celery-300',\n 'celery-400',\n 'celery-500',\n 'celery-600',\n 'celery-700',\n 'celery-800',\n 'celery-900',\n 'celery-1000',\n 'celery-1100',\n 'celery-1200',\n 'celery-1300',\n 'celery-1400',\n 'green-100',\n 'green-200',\n 'green-300',\n 'green-400',\n 'green-500',\n 'green-600',\n 'green-700',\n 'green-800',\n 'green-900',\n 'green-1000',\n 'green-1100',\n 'green-1200',\n 'green-1300',\n 'green-1400',\n 'seafoam-100',\n 'seafoam-200',\n 'seafoam-300',\n 'seafoam-400',\n 'seafoam-500',\n 'seafoam-600',\n 'seafoam-700',\n 'seafoam-800',\n 'seafoam-900',\n 'seafoam-1000',\n 'seafoam-1100',\n 'seafoam-1200',\n 'seafoam-1300',\n 'seafoam-1400',\n 'cyan-100',\n 'cyan-200',\n 'cyan-300',\n 'cyan-400',\n 'cyan-500',\n 'cyan-600',\n 'cyan-700',\n 'cyan-800',\n 'cyan-900',\n 'cyan-1000',\n 'cyan-1100',\n 'cyan-1200',\n 'cyan-1300',\n 'cyan-1400',\n 'blue-100',\n 'blue-200',\n 'blue-300',\n 'blue-400',\n 'blue-500',\n 'blue-600',\n 'blue-700',\n 'blue-800',\n 'blue-900',\n 'blue-1000',\n 'blue-1100',\n 'blue-1200',\n 'blue-1300',\n 'blue-1400',\n 'indigo-100',\n 'indigo-200',\n 'indigo-300',\n 'indigo-400',\n 'indigo-500',\n 'indigo-600',\n 'indigo-700',\n 'indigo-800',\n 'indigo-900',\n 'indigo-1000',\n 'indigo-1100',\n 'indigo-1200',\n 'indigo-1300',\n 'indigo-1400',\n 'purple-100',\n 'purple-200',\n 'purple-300',\n 'purple-400',\n 'purple-500',\n 'purple-600',\n 'purple-700',\n 'purple-800',\n 'purple-900',\n 'purple-1000',\n 'purple-1100',\n 'purple-1200',\n 'purple-1300',\n 'purple-1400',\n 'fuchsia-100',\n 'fuchsia-200',\n 'fuchsia-300',\n 'fuchsia-400',\n 'fuchsia-500',\n 'fuchsia-600',\n 'fuchsia-700',\n 'fuchsia-800',\n 'fuchsia-900',\n 'fuchsia-1000',\n 'fuchsia-1100',\n 'fuchsia-1200',\n 'fuchsia-1300',\n 'fuchsia-1400',\n 'magenta-100',\n 'magenta-200',\n 'magenta-300',\n 'magenta-400',\n 'magenta-500',\n 'magenta-600',\n 'magenta-700',\n 'magenta-800',\n 'magenta-900',\n 'magenta-1000',\n 'magenta-1100',\n 'magenta-1200',\n 'magenta-1300',\n 'magenta-1400',\n 'negative',\n 'notice',\n 'positive',\n 'info',\n // Additional DH ColorValues:\n 'accent',\n 'accent-100',\n 'accent-200',\n 'accent-300',\n 'accent-400',\n 'accent-500',\n 'accent-600',\n 'accent-700',\n 'accent-800',\n 'accent-900',\n 'accent-1000',\n 'accent-1100',\n 'accent-1200',\n 'accent-1300',\n 'accent-1400',\n 'bg',\n 'content-bg',\n 'subdued-content-bg',\n 'surface-bg',\n 'fg',\n] as const;\n\ntype DHColorValue = (typeof ColorValues)[number];\n\nexport type ColorValue = DHColorValue | CSSProperties['color'];\n\nexport function isDHColorValue(value: string): value is DHColorValue {\n return (\n typeof value === 'string' && ColorValues.includes(value as DHColorValue)\n );\n}\n\n/**\n * Returns the a css variable color value for a given theme color.\n * If the color value is a DH color value, it returns the CSS variable.\n * Otherwise, it returns the color value as is.\n *\n * @param value a string representing a color value\n * @returns CSS variable for DH color values, otherwise the color value as is\n *\n * ex. colorValueStyle('blue-1000') => 'var(--dh-color-blue-1000)'\n * ex. colorValueStyle('red') => 'red'\n * ex. colorValueStyle('#F00') => '#F00'\n */\nexport function colorValueStyle(value: string): string;\nexport function colorValueStyle(value: string | undefined): string | undefined;\nexport function colorValueStyle(value: string | undefined): string | undefined {\n if (value != null && isDHColorValue(value)) {\n return `var(--dh-color-${value})`;\n }\n\n return value;\n}\n"],"mappings":"AAEA;AACA;AACA;AACA,OAAO,IAAMA,WAAW,GAAG,CACzB,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EAC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,QAAQ,IAAIF,WAAW,CAACG,QAAQ,CAACD,KAAqB,CAAC;AAE5E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAO,SAASE,eAAeA,CAACF,KAAyB,EAAsB;EAC7E,IAAIA,KAAK,IAAI,IAAI,IAAID,cAAc,CAACC,KAAK,CAAC,EAAE;IAC1C,yBAAAG,MAAA,CAAyBH,KAAK;EAChC;EAEA,OAAOA,KAAK;AACd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.91.0",
|
|
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.35.1",
|
|
28
|
-
"@deephaven/icons": "^0.
|
|
29
|
-
"@deephaven/log": "^0.
|
|
30
|
-
"@deephaven/react-hooks": "^0.
|
|
31
|
-
"@deephaven/utils": "^0.
|
|
28
|
+
"@deephaven/icons": "^0.91.0",
|
|
29
|
+
"@deephaven/log": "^0.91.0",
|
|
30
|
+
"@deephaven/react-hooks": "^0.91.0",
|
|
31
|
+
"@deephaven/utils": "^0.91.0",
|
|
32
32
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
33
33
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
34
34
|
"@internationalized/date": "^3.5.5",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react-is": ">=16.8.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@deephaven/mocks": "^0.
|
|
61
|
+
"@deephaven/mocks": "^0.91.0",
|
|
62
62
|
"react-redux": "^7.2.4"
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "336e1f353a51f4bcf1f4f7ad6195fd1301acb462"
|
|
77
77
|
}
|