-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
124 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import type * as icons from '@deephaven/icons'; | ||
|
||
/** Namespaces */ | ||
export const UI_COMPONENTS_NAMESPACE = 'deephaven.ui.components'; | ||
export const UI_ELEMENTS_NAMESPACE = 'deephaven.ui.elements'; | ||
|
||
/** Table */ | ||
export const UITABLE_ELEMENT_TYPE = `${UI_ELEMENTS_NAMESPACE}.UITable` as const; | ||
export type UITableElementName = typeof UITABLE_ELEMENT_TYPE; | ||
|
||
/** Layout */ | ||
export const PANEL_ELEMENT_NAME = `${UI_COMPONENTS_NAMESPACE}.Panel` as const; | ||
export const ROW_ELEMENT_NAME = `${UI_COMPONENTS_NAMESPACE}.Row` as const; | ||
export const COLUMN_ELEMENT_NAME = `${UI_COMPONENTS_NAMESPACE}.Column` as const; | ||
export const STACK_ELEMENT_NAME = `${UI_COMPONENTS_NAMESPACE}.Stack` as const; | ||
export const DASHBOARD_ELEMENT_NAME = | ||
`${UI_COMPONENTS_NAMESPACE}.Dashboard` as const; | ||
|
||
export type PanelElementType = typeof PANEL_ELEMENT_NAME; | ||
export type RowElementType = typeof ROW_ELEMENT_NAME; | ||
export type ColumnElementType = typeof COLUMN_ELEMENT_NAME; | ||
export type StackElementType = typeof STACK_ELEMENT_NAME; | ||
export type DashboardElementType = typeof DASHBOARD_ELEMENT_NAME; | ||
|
||
/** Icons */ | ||
export const ICON_ELEMENT_TYPE_PREFIX = 'deephaven.ui.icons.'; | ||
export type IconElementName = | ||
`${typeof ICON_ELEMENT_TYPE_PREFIX}${keyof typeof icons}`; | ||
|
||
/** Specific Components */ | ||
export const ITEM_ELEMENT_NAME = `${UI_COMPONENTS_NAMESPACE}.Item` as const; | ||
export const PICKER_ELEMENT_NAME = `${UI_COMPONENTS_NAMESPACE}.Picker` as const; | ||
export const SECTION_ELEMENT_NAME = | ||
`${UI_COMPONENTS_NAMESPACE}.Section` as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { | ||
Picker as DHPicker, | ||
PickerProps as DHPickerProps, | ||
} from '@deephaven/components'; | ||
|
||
function Picker(props: DHPickerProps) { | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
return <DHPicker {...props} />; | ||
} | ||
|
||
export default Picker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Wrapping Spectrum `Item` components will break functionality due to the way | ||
* they are consumed by collection components. They are only used to pass data | ||
* and don't render anything on their own, so they don't need to be wrapped. | ||
* See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Item.ts#L17 | ||
*/ | ||
import { Item } from '@adobe/react-spectrum'; | ||
|
||
export default Item; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Wrapping Spectrum `Section` components will break functionality due to the way | ||
* they are consumed by collection components. They are only used to pass data | ||
* and don't render anything on their own, so they don't need to be wrapped. | ||
* See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Section.ts#L18 | ||
*/ | ||
import { Section } from '@adobe/react-spectrum'; | ||
|
||
export default Section; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters